The open source coding agent.
TypeScript
fix: split not a function error
Aiden Cline5413b16b5733
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsxindex 0698f366f28..f0954ed52a9 100644--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx@@ -1310,7 +1310,10 @@ ToolRegistry.register<typeof WriteTool>({container: "block",render(props) {const { theme, syntax } = useTheme()- const lines = createMemo(() => props.input.content?.split("\n") ?? [], [] as string[])+ const lines = createMemo(+ () => (typeof props.input.content === "string" ? props.input.content.split("\n") : []),+ [] as string[],+ )const code = createMemo(() => {if (!props.input.content) return ""const text = props.input.content