tuna-agent 0.1.86 → 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/index.js +11 -10
- package/package.json +1 -1
package/dist/daemon/index.js
CHANGED
|
@@ -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
|
}
|