( toolCallId: string, text: string, timestamp = 3, )
| 70 | } |
| 71 | |
| 72 | export function toolResultMessage( |
| 73 | toolCallId: string, |
| 74 | text: string, |
| 75 | timestamp = 3, |
| 76 | ): PiMessage { |
| 77 | return { |
| 78 | role: "toolResult", |
| 79 | toolCallId, |
| 80 | toolName: "Read", |
| 81 | content: [{ type: "text", text }], |
| 82 | isError: false, |
| 83 | timestamp, |
| 84 | } as PiMessage; |
| 85 | } |
| 86 | |
| 87 | export function textOf(message: PiMessage | undefined): string { |
| 88 | if (!message) return ""; |
no outgoing calls
no test coverage detected