Skip to content

Commit bec294b

Browse files
committed
fix(app): remove copy button from summary
1 parent 1ee8a9c commit bec294b

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

packages/ui/src/components/session-turn.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
type PermissionRequest,
77
TextPart,
88
ToolPart,
9-
UserMessage,
109
} from "@opencode-ai/sdk/v2/client"
1110
import { useData } from "../context"
1211
import { useDiffComponent } from "../context/diff"
@@ -21,8 +20,6 @@ import { Accordion } from "./accordion"
2120
import { StickyAccordionHeader } from "./sticky-accordion-header"
2221
import { FileIcon } from "./file-icon"
2322
import { Icon } from "./icon"
24-
import { IconButton } from "./icon-button"
25-
import { Tooltip } from "./tooltip"
2623
import { Card } from "./card"
2724
import { Dynamic } from "solid-js/web"
2825
import { Button } from "./button"
@@ -352,7 +349,6 @@ export function SessionTurn(
352349
const hasDiffs = createMemo(() => (data.store.session_diff?.[props.sessionID]?.length ?? 0) > 0)
353350
const hideResponsePart = createMemo(() => !working() && !!responsePartId())
354351

355-
const [responseCopied, setResponseCopied] = createSignal(false)
356352
const [rootRef, setRootRef] = createSignal<HTMLDivElement | undefined>()
357353
const [stickyRef, setStickyRef] = createSignal<HTMLDivElement | undefined>()
358354

@@ -362,13 +358,6 @@ export function SessionTurn(
362358
const next = Math.ceil(height)
363359
root.style.setProperty("--session-turn-sticky-height", `${next}px`)
364360
}
365-
const handleCopyResponse = async () => {
366-
const content = response()
367-
if (!content) return
368-
await navigator.clipboard.writeText(content)
369-
setResponseCopied(true)
370-
setTimeout(() => setResponseCopied(false), 2000)
371-
}
372361

373362
function duration() {
374363
const msg = message()
@@ -589,15 +578,6 @@ export function SessionTurn(
589578
{/* Response */}
590579
<Show when={!working() && (response() || hasDiffs())}>
591580
<div data-slot="session-turn-summary-section">
592-
<div data-slot="session-turn-summary-copy">
593-
<Tooltip value={responseCopied() ? "Copied!" : "Copy"} placement="top" gutter={8}>
594-
<IconButton
595-
icon={responseCopied() ? "check" : "copy"}
596-
variant="secondary"
597-
onClick={handleCopyResponse}
598-
/>
599-
</Tooltip>
600-
</div>
601581
<div data-slot="session-turn-summary-header">
602582
<h2 data-slot="session-turn-summary-title">Response</h2>
603583
<Markdown

0 commit comments

Comments
 (0)