tuna-agent 0.1.85 → 0.1.87
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.
- package/dist/daemon/extension-handlers.js +1 -1
- package/dist/daemon/index.js +12 -11
- package/dist/pm/planner.js +2 -2
- package/package.json +1 -1
|
@@ -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,
|
|
@@ -819,20 +819,21 @@ ${skillContent.slice(0, 15000)}`;
|
|
|
819
819
|
if (data.type === 'system' && data.subtype === 'init') {
|
|
820
820
|
sessionId = data.session_id;
|
|
821
821
|
}
|
|
822
|
-
//
|
|
822
|
+
// Extract tool usage from assistant messages (no text patching —
|
|
823
|
+
// content_block_delta is the sole source of streaming text)
|
|
823
824
|
if (data.type === 'assistant' && data.message) {
|
|
824
825
|
const msg = data.message;
|
|
825
826
|
const content = msg.content;
|
|
826
827
|
if (content) {
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
828
|
+
for (const block of content) {
|
|
829
|
+
if (block.type === 'tool_use') {
|
|
830
|
+
const toolName = block.name;
|
|
831
|
+
const toolInput = block.input;
|
|
832
|
+
const detail = toolInput?.file_path || toolInput?.command || toolInput?.pattern || '';
|
|
833
|
+
wsClient.sendProgress(taskId, 'subtask_log', {
|
|
834
|
+
subtaskId: 'agent-team',
|
|
835
|
+
log: { type: 'action', message: `${toolName}: ${String(detail).substring(0, 80)}` },
|
|
836
|
+
});
|
|
836
837
|
}
|
|
837
838
|
}
|
|
838
839
|
}
|
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
|