mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: optimize bash output processing to reduce redundant ANSI stripping operations
This commit is contained in:
parent
4293fef069
commit
8034129051
1 changed files with 2 additions and 2 deletions
|
|
@ -632,7 +632,7 @@ ToolRegistry.register<typeof BashTool>({
|
|||
name: "bash",
|
||||
container: "block",
|
||||
ready(props) {
|
||||
const output = createMemo(() => props.output?.trim() ?? "")
|
||||
const output = createMemo(() => Bun.stripANSI(props.output?.trim() ?? ""))
|
||||
return (
|
||||
<>
|
||||
<ToolTitle icon="#" fallback="Writing command..." when={props.input.command}>
|
||||
|
|
@ -643,7 +643,7 @@ ToolRegistry.register<typeof BashTool>({
|
|||
</Show>
|
||||
<Show when={output()}>
|
||||
<box>
|
||||
<text fg={Theme.text}>{Bun.stripANSI(output())}</text>
|
||||
<text fg={Theme.text}>{output()}</text>
|
||||
</box>
|
||||
</Show>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue