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.
@@ -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
- // Patch missing stream chunks from assistant message (same as handleTask)
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 fullText = content
828
- .filter(b => b.type === 'text' && b.text)
829
- .map(b => b.text)
830
- .join('');
831
- if (fullText && fullText.length > turnAccumulatedText.length) {
832
- const missed = fullText.slice(turnAccumulatedText.length);
833
- if (missed.length > 0) {
834
- turnAccumulatedText = fullText;
835
- wsClient.sendPMStream(taskId, missed);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuna-agent",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
4
4
  "description": "Tuna Agent - Run AI coding tasks on your machine",
5
5
  "bin": {
6
6
  "tuna-agent": "dist/cli/index.js"