MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / recordToolStart

Method recordToolStart

ui-tui/src/app/turnController.ts:820–836  ·  view source on GitHub ↗
(toolId: string, name: string, context: string, verboseArgs?: string)

Source from the content-addressed store, hash-verified

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()

Callers 1

Calls 7

flushStreamingSegmentMethod · 0.95
closeReasoningSegmentMethod · 0.95
pruneTransientMethod · 0.95
endReasoningPhaseMethod · 0.95
estimateTokensRoughFunction · 0.85
patchTurnStateFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected