tuna-agent 0.1.84 → 0.1.86
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;
|
|
@@ -312,7 +312,7 @@ export async function handleGenerateScript(ws, code, taskId, idea, topic, style,
|
|
|
312
312
|
cwd: CONTENT_CREATOR_DIR,
|
|
313
313
|
maxTurns: 4,
|
|
314
314
|
outputFormat: 'stream-json',
|
|
315
|
-
includePartialMessages:
|
|
315
|
+
includePartialMessages: false,
|
|
316
316
|
timeoutMs: 180000,
|
|
317
317
|
onStreamLine: (data) => {
|
|
318
318
|
if (streamChunks < 5) {
|
package/dist/daemon/index.js
CHANGED
|
@@ -782,7 +782,7 @@ ${skillContent.slice(0, 15000)}`;
|
|
|
782
782
|
cwd,
|
|
783
783
|
allowedTools: ['Read', 'Edit', 'Write', 'Bash', 'Glob', 'Grep'],
|
|
784
784
|
outputFormat: 'stream-json',
|
|
785
|
-
includePartialMessages:
|
|
785
|
+
includePartialMessages: false,
|
|
786
786
|
agentTeam: true,
|
|
787
787
|
maxTurns: 200,
|
|
788
788
|
resumeSessionId: sessionId,
|
package/dist/pm/planner.js
CHANGED
|
@@ -142,7 +142,7 @@ export async function planTask(task, onProgress, signal, onTextChunk, inputFiles
|
|
|
142
142
|
systemPrompt,
|
|
143
143
|
maxTurns,
|
|
144
144
|
outputFormat: 'stream-json',
|
|
145
|
-
includePartialMessages:
|
|
145
|
+
includePartialMessages: false,
|
|
146
146
|
onStreamLine: createPlanningStreamHandler(task.id, onProgress, onTextChunk),
|
|
147
147
|
signal,
|
|
148
148
|
inputFiles,
|
|
@@ -284,7 +284,7 @@ User message: ${userMessage}`;
|
|
|
284
284
|
maxTurns: 1,
|
|
285
285
|
lightweight: true,
|
|
286
286
|
outputFormat: 'stream-json',
|
|
287
|
-
includePartialMessages:
|
|
287
|
+
includePartialMessages: false,
|
|
288
288
|
inputFiles,
|
|
289
289
|
onStreamLine: onTextChunk ? (data) => {
|
|
290
290
|
// Parse stream_event → content_block_delta for real token streaming
|