(toolId: string, name: string, context: string, verboseArgs?: string)
| 818 | } |
| 819 | |
| 820 | recordToolStart(toolId: string, name: string, context: string, verboseArgs?: string) { |
| 821 | if (this.interrupted) { |
| 822 | return |
| 823 | } |
| 824 | |
| 825 | this.flushStreamingSegment() |
| 826 | this.closeReasoningSegment() |
| 827 | this.pruneTransient() |
| 828 | this.endReasoningPhase() |
| 829 | |
| 830 | const sample = `${name} ${context}`.trim() |
| 831 | |
| 832 | this.toolTokenAcc += sample ? estimateTokensRough(sample) : 0 |
| 833 | this.activeTools = [...this.activeTools, { context, id: toolId, name, startedAt: Date.now(), verboseArgs }] |
| 834 | |
| 835 | patchTurnState({ toolTokens: this.toolTokenAcc, tools: this.activeTools }) |
| 836 | } |
| 837 | |
| 838 | reset() { |
| 839 | this.clearReasoning() |
no test coverage detected