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

Method listPrompts

packages/opencode/test/mcp/lifecycle.test.ts:222–230  ·  view source on GitHub ↗
(params?: { cursor?: string })

Source from the content-addressed store, hash-verified

220 }
221
222 async listPrompts(params?: { cursor?: string }) {
223 if (this._state) this._state.listPromptsCalls++
224 if (this._state?.listPromptsShouldFail) {
225 throw new Error("listPrompts failed")
226 }
227 const page = this._state?.promptPages[params === undefined ? "initial" : (params.cursor ?? "")]
228 if (page) return page
229 return { prompts: this._state?.prompts ?? [] }
230 }
231
232 async listResources(params?: { cursor?: string }) {
233 if (this._state) this._state.listResourcesCalls++

Callers 1

promptsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected