(input: SessionPrompt.PromptInput, text: string)
| 109 | } |
| 110 | |
| 111 | function reply(input: SessionPrompt.PromptInput, text: string): SessionV1.WithParts { |
| 112 | const id = MessageID.ascending() |
| 113 | return { |
| 114 | info: { |
| 115 | id, |
| 116 | role: "assistant", |
| 117 | parentID: input.messageID ?? MessageID.ascending(), |
| 118 | sessionID: input.sessionID, |
| 119 | mode: input.agent ?? "general", |
| 120 | agent: input.agent ?? "general", |
| 121 | cost: 0, |
| 122 | path: { cwd: "/tmp", root: "/tmp" }, |
| 123 | tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }, |
| 124 | modelID: input.model?.modelID ?? ref.modelID, |
| 125 | providerID: input.model?.providerID ?? ref.providerID, |
| 126 | time: { created: Date.now() }, |
| 127 | finish: "stop", |
| 128 | }, |
| 129 | parts: [ |
| 130 | { |
| 131 | id: PartID.ascending(), |
| 132 | messageID: id, |
| 133 | sessionID: input.sessionID, |
| 134 | type: "text", |
| 135 | text, |
| 136 | }, |
| 137 | ], |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | describe("tool.task", () => { |
| 142 | it.instance( |
no outgoing calls
no test coverage detected