MCPcopy Index your code
hub / github.com/anomalyco/opencode / recordPrompt

Function recordPrompt

packages/opencode/test/server/httpapi-session.test.ts:571–576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

569 const session = yield* createSession({ title: "v2 prompt recording" })
570
571 const recordPrompt = () =>
572 request(`/api/session/${session.id}/prompt`, {
573 method: "POST",
574 headers: { ...headers, "content-type": "application/json" },
575 body: JSON.stringify({ id: "msg_http_prompt", prompt: { text: "hello" }, resume: false }),
576 })
577 const first = yield* recordPrompt()
578 const retried = yield* recordPrompt()
579 type PromptBody = { id: string; prompt: { text: string }; delivery: string; promotedSeq?: number }

Callers 1

Calls 1

requestFunction · 0.70

Tested by

no test coverage detected