temporarily remove bun strip ansi due to bug

This commit is contained in:
Dax Raad
2025-11-05 18:27:19 -05:00
parent 306f45f04a
commit e316050bf5
2 changed files with 8 additions and 10 deletions

View File

@@ -2,7 +2,6 @@ import type { Argv } from "yargs"
import { Session } from "../../session"
import { cmd } from "./cmd"
import { bootstrap } from "../bootstrap"
import { UI } from "../ui"
import { Storage } from "../../storage/storage"
import { Instance } from "../../project/instance"
import { EOL } from "os"
@@ -19,20 +18,19 @@ export const ImportCommand = cmd({
},
handler: async (args) => {
await bootstrap(process.cwd(), async () => {
const file = Bun.file(args.file as string)
const exists = await file.exists()
if (!exists) {
UI.error(`File not found: ${args.file}`)
process.exit(1)
}
const exportData = (await file.json()) as {
const file = Bun.file(args.file)
const exportData = (await file.json().catch(() => {})) as {
info: Session.Info
messages: Array<{
info: any
parts: any[]
}>
}
if (!exportData) {
process.stdout.write(`File not found: ${args.file}`)
process.stdout.write(EOL)
return
}
await Storage.write(["session", Instance.project.id, exportData.info.id], exportData.info)

View File

@@ -1171,7 +1171,7 @@ ToolRegistry.register<typeof BashTool>({
name: "bash",
container: "block",
render(props) {
const output = createMemo(() => Bun.stripANSI(props.metadata.output?.trim() ?? ""))
const output = createMemo(() => props.metadata.output?.trim() ?? "")
const { theme } = useTheme()
return (
<>