Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/transcriptParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TASK_DESCRIPTION_DISPLAY_MAX_LENGTH,
} from './constants.js';

export const PERMISSION_EXEMPT_TOOLS = new Set(['Task', 'AskUserQuestion']);
export const PERMISSION_EXEMPT_TOOLS = new Set(['Task', 'Agent', 'AskUserQuestion']);

export function formatToolStatus(toolName: string, input: Record<string, unknown>): string {
const base = (p: unknown) => typeof p === 'string' ? path.basename(p) : '';
Expand All @@ -31,6 +31,7 @@ export function formatToolStatus(toolName: string, input: Record<string, unknown
case 'Grep': return 'Searching code';
case 'WebFetch': return 'Fetching web content';
case 'WebSearch': return 'Searching the web';
case 'Agent':
case 'Task': {
const desc = typeof input.description === 'string' ? input.description : '';
return desc ? `Subtask: ${desc.length > TASK_DESCRIPTION_DISPLAY_MAX_LENGTH ? desc.slice(0, TASK_DESCRIPTION_DISPLAY_MAX_LENGTH) + '\u2026' : desc}` : 'Running subtask';
Expand Down Expand Up @@ -108,8 +109,8 @@ export function processTranscriptLine(
if (block.type === 'tool_result' && block.tool_use_id) {
console.log(`[Pixel Agents] Agent ${agentId} tool done: ${block.tool_use_id}`);
const completedToolId = block.tool_use_id;
// If the completed tool was a Task, clear its subagent tools
if (agent.activeToolNames.get(completedToolId) === 'Task') {
// If the completed tool was a Task or Agent, clear its subagent tools
if (agent.activeToolNames.get(completedToolId) === 'Task' || agent.activeToolNames.get(completedToolId) === 'Agent') {
agent.activeSubagentToolIds.delete(completedToolId);
agent.activeSubagentToolNames.delete(completedToolId);
webview?.postMessage({
Expand Down