summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/components
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-06-18 18:21:44 -0400
committerJay V <[email protected]>2025-06-18 18:21:44 -0400
commit4d1afd01faa9232052e20a2e8ce9402c3f147fae (patch)
tree7fabc4bb0702223dc53e77b02592120c034d0937 /packages/web/src/components
parent801d5f47bd088ac0f13925fc50857338fbc6ceb8 (diff)
downloadopencode-4d1afd01faa9232052e20a2e8ce9402c3f147fae.tar.gz
opencode-4d1afd01faa9232052e20a2e8ce9402c3f147fae.zip
ignore: share
Diffstat (limited to 'packages/web/src/components')
-rw-r--r--packages/web/src/components/Share.tsx43
1 files changed, 25 insertions, 18 deletions
diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx
index dacf3b2f7..945c7504c 100644
--- a/packages/web/src/components/Share.tsx
+++ b/packages/web/src/components/Share.tsx
@@ -898,7 +898,12 @@ export default function Share(props: {
}
>
{(assistant) => {
- const system = () => assistant().system || []
+ const system = createMemo(() => {
+ const prompts = assistant().system || []
+ return prompts.filter(
+ (p: string) => !p.startsWith("You are Claude Code")
+ )
+ })
return (
<div
id={anchor()}
@@ -924,24 +929,26 @@ export default function Share(props: {
<span data-part-model>
{assistant().modelID}
</span>
- <div data-part-tool-result>
- <ResultsButton
- showCopy="Show system prompt"
- hideCopy="Hide system prompt"
- results={showResults()}
- onClick={() =>
- setShowResults((e) => !e)
- }
- />
- <Show when={showResults()}>
- <TextPart
- expand
- data-size="sm"
- data-color="dimmed"
- text={system().join("\n\n").trim()}
+ <Show when={system().length > 0}>
+ <div data-part-tool-result>
+ <ResultsButton
+ showCopy="Show system prompt"
+ hideCopy="Hide system prompt"
+ results={showResults()}
+ onClick={() =>
+ setShowResults((e) => !e)
+ }
/>
- </Show>
- </div>
+ <Show when={showResults()}>
+ <TextPart
+ expand
+ data-size="sm"
+ data-color="dimmed"
+ text={system().join("\n\n").trim()}
+ />
+ </Show>
+ </div>
+ </Show>
</div>
</div>
</div>