(sessionID: SessionID, text: string)
| 89 | const wide = () => ProviderTest.fake({ model: createModel({ context: 100_000, output: 32_000 }) }) |
| 90 | |
| 91 | function createUserMessage(sessionID: SessionID, text: string) { |
| 92 | return Effect.gen(function* () { |
| 93 | const ssn = yield* SessionNs.Service |
| 94 | const msg = yield* ssn.updateMessage({ |
| 95 | id: MessageID.ascending(), |
| 96 | role: "user", |
| 97 | sessionID, |
| 98 | agent: "build", |
| 99 | model: ref, |
| 100 | time: { created: Date.now() }, |
| 101 | }) |
| 102 | yield* ssn.updatePart({ |
| 103 | id: PartID.ascending(), |
| 104 | messageID: msg.id, |
| 105 | sessionID, |
| 106 | type: "text", |
| 107 | text, |
| 108 | }) |
| 109 | return msg |
| 110 | }) |
| 111 | } |
| 112 | |
| 113 | function createAssistantMessage(sessionID: SessionID, parentID: MessageID, root: string) { |
| 114 | return SessionNs.Service.use((ssn) => |
no outgoing calls
no test coverage detected