(value: unknown)
| 245 | } |
| 246 | |
| 247 | export function normalizeThreadTitle(value: unknown) { |
| 248 | const text = String(value || '') |
| 249 | .replace(/\s+/g, ' ') |
| 250 | .trim() |
| 251 | if (!text) { |
| 252 | return 'New thread' |
| 253 | } |
| 254 | |
| 255 | return text.length > 72 ? `${text.slice(0, 69)}...` : text |
| 256 | } |
| 257 | |
| 258 | function mapUserMessage(id: string, runtimeMessage: RuntimeMessage): Message | null { |
| 259 | const content = extractUserContent(runtimeMessage.content) |
no outgoing calls
no test coverage detected