(messages: OcMessage[], startIndex: number, parentId: string)
| 126 | } |
| 127 | |
| 128 | function findAssistantMessage(messages: OcMessage[], startIndex: number, parentId: string): OcMessage | null { |
| 129 | for (let i = startIndex; i < messages.length; i++) { |
| 130 | const candidate = messages[i]; |
| 131 | if (candidate.role === 'assistant' && candidate.parentID === parentId) return candidate; |
| 132 | } |
| 133 | |
| 134 | const next = messages[startIndex]; |
| 135 | return next?.role === 'assistant' ? next : null; |
| 136 | } |
| 137 | |
| 138 | function applyOpenCodePart(part: OcPart, data: Pick<OpenCodeAssistantData, 'toolsUsed' | 'editedFiles' | 'referencedFiles'>, textParts: string[]): void { |
| 139 | if (part.type === 'text' && part.text) { |
no outgoing calls
no test coverage detected