tuna-agent 0.1.84 → 0.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -224,7 +224,7 @@ export class ClaudeCodeAdapter {
|
|
|
224
224
|
prompt: userMessage,
|
|
225
225
|
cwd,
|
|
226
226
|
outputFormat: 'stream-json',
|
|
227
|
-
includePartialMessages:
|
|
227
|
+
includePartialMessages: false,
|
|
228
228
|
maxTurns: 200,
|
|
229
229
|
resumeSessionId: round > 0 ? sessionId : undefined,
|
|
230
230
|
signal,
|
|
@@ -297,27 +297,11 @@ export class ClaudeCodeAdapter {
|
|
|
297
297
|
console.log(`[ClaudeCode] Init tools: total=${toolNames.length}, mcp=${mcpTools.length} (${mcpTools.join(', ') || 'none'})`);
|
|
298
298
|
console.log(`[ClaudeCode] All tools: ${toolNames.join(', ')}`);
|
|
299
299
|
}
|
|
300
|
-
// Extract
|
|
300
|
+
// Extract tool usage from assistant messages (for activity tab)
|
|
301
301
|
if (data.type === 'assistant' && data.message) {
|
|
302
302
|
const msg = data.message;
|
|
303
303
|
const content = msg.content;
|
|
304
304
|
if (content) {
|
|
305
|
-
// Extract full text from assistant message as source of truth
|
|
306
|
-
// (stream_event content_block_delta may miss chunks on rate limits)
|
|
307
|
-
const fullText = content
|
|
308
|
-
.filter(b => b.type === 'text' && b.text)
|
|
309
|
-
.map(b => b.text)
|
|
310
|
-
.join('');
|
|
311
|
-
if (fullText && fullText.length > turnAccumulatedText.length) {
|
|
312
|
-
const missed = fullText.slice(turnAccumulatedText.length);
|
|
313
|
-
if (missed.length > 0) {
|
|
314
|
-
console.log(`[ClaudeCode] 🔧 Stream missed ${missed.length} chars — patching from assistant message`);
|
|
315
|
-
turnAccumulatedText = fullText;
|
|
316
|
-
// Stream the missed portion to app
|
|
317
|
-
ws.sendPMStream(task.id, missed);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
// Send tool usage to activity tab
|
|
321
305
|
for (const block of content) {
|
|
322
306
|
if (block.type === 'tool_use') {
|
|
323
307
|
const toolName = block.name;
|