MCPcopy Create free account
hub / github.com/apache/maka / appendThinking

Function appendThinking

packages/cli/src/pi-transcript.ts:1496–1503  ·  view source on GitHub ↗
(state: MakaPiTranscriptState, messageId: string, text: string)

Source from the content-addressed store, hash-verified

1494}
1495
1496function appendThinking(state: MakaPiTranscriptState, messageId: string, text: string): void {
1497 const last = state.entries[state.entries.length - 1];
1498 if (last?.kind === 'thinking' && last.messageId === messageId) {
1499 last.text += text;
1500 return;
1501 }
1502 state.entries.push({ kind: 'thinking', messageId, text, expanded: state.expandAllThinking });
1503}
1504
1505function setThinking(state: MakaPiTranscriptState, messageId: string, text: string): void {
1506 // thinking_complete can arrive after the reply text or tool events; replace

Callers 1

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected