Function
partUpdated
(sessionID: string, messageID: string, partID: string, type: DeltaPartType)
Source from the content-addressed store, hash-verified
| 128 | } |
| 129 | |
| 130 | function partUpdated(sessionID: string, messageID: string, partID: string, type: DeltaPartType): Event { |
| 131 | return { |
| 132 | id: `evt_${sessionID}_${messageID}_${partID}`, |
| 133 | type: "message.part.updated", |
| 134 | properties: { |
| 135 | sessionID, |
| 136 | time: Date.now(), |
| 137 | part: |
| 138 | type === "text" |
| 139 | ? { |
| 140 | id: partID, |
| 141 | sessionID, |
| 142 | messageID, |
| 143 | type: "text", |
| 144 | text: "", |
| 145 | } |
| 146 | : { |
| 147 | id: partID, |
| 148 | sessionID, |
| 149 | messageID, |
| 150 | type: "reasoning", |
| 151 | text: "", |
| 152 | time: { start: Date.now() }, |
| 153 | }, |
| 154 | }, |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | function toolUpdated(part: ToolPart): Event { |
| 159 | return { |
Tested by
no test coverage detected