Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/anomalyco/opencode
/ onPrompt
Function
onPrompt
packages/opencode/test/cli/run/runtime.queue.test.ts:17–22 ·
view source on GitHub ↗
(fn)
Source
from the content-addressed store, hash-verified
15
return
closed
16
},
17
onPrompt(fn) {
18
prompts.add(fn)
19
return
() => {
20
prompts.delete(fn)
21
}
22
},
23
onQueuedRemove(fn) {
24
queuedRemoves.add(fn)
25
return
() => {
Callers
nothing calls this directly
Calls
2
add
Method · 0.65
delete
Method · 0.45
Tested by
no test coverage detected