diff options
| author | Dax Raad <[email protected]> | 2025-06-11 00:37:43 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-11 00:37:43 -0400 |
| commit | 07cffebc8fc71d8ae5c1f6407e441e506807d934 (patch) | |
| tree | c01b176f9ad92617f3987ee6eab86cb57d30283b | |
| parent | f1de1634d664c09ffdb667a1fd3a2e2e0c327a12 (diff) | |
| download | opencode-07cffebc8fc71d8ae5c1f6407e441e506807d934.tar.gz opencode-07cffebc8fc71d8ae5c1f6407e441e506807d934.zip | |
fix bash
| -rw-r--r-- | packages/web/src/components/Share.tsx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index 9e057ee66..89ebddc3f 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -1434,11 +1434,10 @@ export default function Share(props: { const command = part().toolInvocation.args.command const desc = part().toolInvocation.args.description - const stdout = metadata()?.stdout - const result = - stdout || - (part().toolInvocation.state === "result" && - part().toolInvocation.result) + const result = createMemo(() => { + const invocation = part().toolInvocation + return metadata()?.stdout || (invocation.state === "result" && invocation.result) + }) const duration = createMemo(() => DateTime.fromMillis(metadata()?.time.end || 0) @@ -1467,7 +1466,7 @@ export default function Share(props: { desc={desc} data-size="sm" text={ - command + (result ? `\n${result}` : "") + command + (result() ? `\n${result}` : "") } /> </div> @@ -1631,9 +1630,10 @@ export default function Share(props: { const url = args.url const format = args.format const hasError = metadata()?.error - const result = - part().toolInvocation.state === "result" && - part().toolInvocation.result + const result = createMemo(() => { + const invocation = part().toolInvocation + return invocation.state === "result" && invocation.result + }) const duration = createMemo(() => DateTime.fromMillis(metadata()?.time.end || 0) @@ -1667,7 +1667,7 @@ export default function Share(props: { <div data-part-tool-result> <TextPart expand - text={result} + text={result()} data-size="sm" data-color="dimmed" /> @@ -1685,7 +1685,7 @@ export default function Share(props: { <div data-part-tool-code> <CodeBlock lang={format || "text"} - code={result} + code={result()} /> </div> </Show> |
