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

Method startMessage

ui-tui/src/app/turnController.ts:899–924  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

897 }
898
899 startMessage() {
900 this.endReasoningPhase()
901 this.clearReasoning()
902 this.activeTools = []
903 this.activeReasoningText = ''
904 this.reasoningSegmentIndex = null
905 this.turnTools = []
906 this.toolTokenAcc = 0
907 this.interrupted = false
908 this.persistedToolLabels.clear()
909 // "Flash and yield" notices clear when a new turn starts: a usage-band heads-up
910 // (credits.usage, 50/75/90%) and the one-time "grant spent" transition
911 // (credits.grant_spent) should show once, then get out of the way — not camp the
912 // bar (e.g. "Grant spent · $990 top-up left" sitting there with plenty of top-up
913 // left). Depletion (credits.depleted) and other notices stay — they're explicitly
914 // sticky until the policy clears them. The Python `active` latch retains the key,
915 // so a yielded notice won't re-fire on the next turn.
916 const yieldingNoticeKey = getUiState().notice?.key
917
918 if (yieldingNoticeKey === 'credits.usage' || yieldingNoticeKey === 'credits.grant_spent') {
919 this.clearNotice(yieldingNoticeKey)
920 }
921
922 patchUiState({ busy: true })
923 patchTurnState({ activity: [], outcome: '', subagents: [], toolTokens: 0, tools: [], turnTrail: [] })
924 }
925
926 upsertSubagent(
927 p: SubagentEventPayload,

Callers 2

Calls 7

endReasoningPhaseMethod · 0.95
clearReasoningMethod · 0.95
clearNoticeMethod · 0.95
getUiStateFunction · 0.85
patchUiStateFunction · 0.85
patchTurnStateFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected