diff options
| author | Aiden Cline <[email protected]> | 2025-11-20 22:33:46 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-11-20 22:33:59 -0600 |
| commit | 5413b16b573320f0626d93e701b783ce986750e3 (patch) | |
| tree | e58195d80535cdcdbbea31483cf2de5da44b4c17 | |
| parent | 43c021ed800f5943bb81036b6025fef495246cf6 (diff) | |
| download | opencode-5413b16b573320f0626d93e701b783ce986750e3.tar.gz opencode-5413b16b573320f0626d93e701b783ce986750e3.zip | |
fix: split not a function error
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 0698f366f..f0954ed52 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 |
