fix: prevent 1 from showing when preparing write

This commit is contained in:
Aiden Cline
2025-12-17 15:24:35 -06:00
parent 4d7c3f56fa
commit a50ab4b5b5

View File

@@ -1423,11 +1423,14 @@ 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>
<Show when={done}>
<line_number fg={theme.textMuted} minWidth={3} paddingRight={1}>
<code
conceal={false}
@@ -1437,6 +1440,7 @@ ToolRegistry.register<typeof WriteTool>({
content={code()}
/>
</line_number>
</Show>
<Show when={diagnostics().length}>
<For each={diagnostics()}>
{(diagnostic) => (