diff options
| author | Aiden Cline <[email protected]> | 2025-12-17 15:24:35 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-17 15:25:04 -0600 |
| commit | a50ab4b5b5b7fcb9194816e67dda2c85bfadc859 (patch) | |
| tree | 36c532aa6b37029670a10ea478be864f83aeb7ff | |
| parent | 4d7c3f56fa44d5e6c0171bd728d3cad3691b157e (diff) | |
| download | opencode-a50ab4b5b5b7fcb9194816e67dda2c85bfadc859.tar.gz opencode-a50ab4b5b5b7fcb9194816e67dda2c85bfadc859.zip | |
fix: prevent 1 from showing when preparing write
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | 24 |
1 files changed, 14 insertions, 10 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 79d379f6e..c7d7537a2 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1423,20 +1423,24 @@ ToolRegistry.register<typeof WriteTool>({ return props.metadata.diagnostics?.[filePath] ?? [] }) + const done = !!props.input.filePath + return ( <> - <ToolTitle icon="←" fallback="Preparing write..." when={props.input.filePath}> + <ToolTitle icon="←" fallback="Preparing write..." when={done}> Wrote {props.input.filePath} </ToolTitle> - <line_number fg={theme.textMuted} minWidth={3} paddingRight={1}> - <code - conceal={false} - fg={theme.text} - filetype={filetype(props.input.filePath!)} - syntaxStyle={syntax()} - content={code()} - /> - </line_number> + <Show when={done}> + <line_number fg={theme.textMuted} minWidth={3} paddingRight={1}> + <code + conceal={false} + fg={theme.text} + filetype={filetype(props.input.filePath!)} + syntaxStyle={syntax()} + content={code()} + /> + </line_number> + </Show> <Show when={diagnostics().length}> <For each={diagnostics()}> {(diagnostic) => ( |
