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

Function clonePrompt

packages/opencode/src/cli/cmd/run/footer.prompt.tsx:106–113  ·  view source on GitHub ↗
(prompt: RunPrompt)

Source from the content-addressed store, hash-verified

104}
105
106function clonePrompt(prompt: RunPrompt): RunPrompt {
107 return {
108 text: prompt.text,
109 parts: structuredClone(prompt.parts),
110 ...(prompt.mode ? { mode: prompt.mode } : {}),
111 ...(prompt.command ? { command: prompt.command } : {}),
112 }
113}
114
115function emptyPrompt(shell: boolean): RunPrompt {
116 return shell ? { text: "", parts: [], mode: "shell" } : { text: "", parts: [] }

Callers 6

restoreFunction · 0.70
moveFunction · 0.70
openEditorFunction · 0.70
selectFunction · 0.70
submitPromptFunction · 0.70
onSubmitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected