MCPcopy
hub / github.com/opactorai/Claudable / buildAssistantPayload

Function buildAssistantPayload

lib/services/cli/codex.ts:585–601  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

583 const streamedToolHashes = new Set<string>();
584
585 const buildAssistantPayload = () => {
586 const trimmedAssistant = agentBuffer.trim();
587 const thinkingContent = thinkingSegments
588 .map((segment) => segment.trim())
589 .filter((segment) => segment.length > 0)
590 .map((segment) => `<thinking>${segment}</thinking>`)
591 .join('\n\n');
592
593 const parts: string[] = [];
594 if (thinkingContent) {
595 parts.push(thinkingContent);
596 }
597 if (trimmedAssistant) {
598 parts.push(trimmedAssistant);
599 }
600 return parts.join('\n\n').trim();
601 };
602
603 const streamAssistantDraft = (force = false) => {
604 const combined = buildAssistantPayload();

Callers 2

streamAssistantDraftFunction · 0.85
flushAssistantMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected