(params?: { cursor?: string })
| 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++ |