mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: prevent 1 from showing when preparing write
This commit is contained in:
parent
4d7c3f56fa
commit
a50ab4b5b5
1 changed files with 14 additions and 10 deletions
|
|
@ -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) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue