MCPcopy Create free account
hub / github.com/anomalyco/opencode / promptCopy

Function promptCopy

packages/opencode/src/cli/cmd/run/prompt.shared.ts:28–35  ·  view source on GitHub ↗
(prompt: RunPrompt)

Source from the content-addressed store, hash-verified

26}
27
28export function promptCopy(prompt: RunPrompt): RunPrompt {
29 return {
30 text: prompt.text,
31 parts: structuredClone(prompt.parts),
32 ...(prompt.mode ? { mode: prompt.mode } : {}),
33 ...(prompt.command ? { command: prompt.command } : {}),
34 }
35}
36
37export function promptSame(a: RunPrompt, b: RunPrompt): boolean {
38 return (

Callers 2

sessionHistoryFunction · 0.90
pushPromptHistoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected