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

Function resetDraft

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

Source from the content-addressed store, hash-verified

607 }
608
609 const resetDraft = () => {
610 if (area && !area.isDestroyed) {
611 area.setText("")
612 }
613
614 clearParts()
615 hide()
616 draft = emptyPrompt(shell())
617 if (!area || area.isDestroyed) {
618 return
619 }
620
621 scheduleRows()
622 area.focus()
623 }
624
625 const replaceDraft = (text: string) => {
626 draft = shell() ? { text, parts: [], mode: "shell" } : { text, parts: [] }

Callers 2

requestExitFunction · 0.85
submitPromptFunction · 0.85

Calls 5

clearPartsFunction · 0.85
emptyPromptFunction · 0.85
shellFunction · 0.85
scheduleRowsFunction · 0.85
hideFunction · 0.70

Tested by

no test coverage detected