Function
user
(id: string, text: string)
Source from the content-addressed store, hash-verified
| 5 | const sessionID = "ses_test" |
| 6 | |
| 7 | function user(id: string, text: string): MessageV2.WithParts { |
| 8 | return { |
| 9 | info: { |
| 10 | id, |
| 11 | sessionID, |
| 12 | role: "user", |
| 13 | time: { created: 0 }, |
| 14 | agent: "build", |
| 15 | model: { providerID: "anthropic", modelID: "claude-sonnet-4-20250514" }, |
| 16 | }, |
| 17 | parts: [ |
| 18 | { |
| 19 | id: "p_" + id, |
| 20 | sessionID, |
| 21 | messageID: id, |
| 22 | type: "text", |
| 23 | text, |
| 24 | }, |
| 25 | ], |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | function assistant(id: string, parentID: string, text: string): MessageV2.WithParts { |
| 30 | return { |
Tested by
no test coverage detected