graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
gui: richer parallel-subagent rows (label + agent icon + count) (#17)
Rachb0b6afd03dea
diff --git a/gui/src-tauri/src/dto/activity.rs b/gui/src-tauri/src/dto/activity.rsindex 191a8661..6ea0b026 100644--- a/gui/src-tauri/src/dto/activity.rs+++ b/gui/src-tauri/src/dto/activity.rs@@ -62,6 +62,7 @@ pub enum ToolCallDetailDto {Task {#[serde(rename = "agentId")]agent_id: String,+ label: String,},TodoWrite {count: usize,diff --git a/gui/src-tauri/src/runtime/simple.rs b/gui/src-tauri/src/runtime/simple.rsindex 8b0e4a7b..595609d1 100644--- a/gui/src-tauri/src/runtime/simple.rs+++ b/gui/src-tauri/src/runtime/simple.rs@@ -2318,6 +2318,14 @@ fn tool_call_detail(name: &str, input: Option<&serde_json::Value>) -> ToolCallDepath: str_field("path").unwrap_or_default(),operation: FileOperationDto::Replace,},+ "subagent" => ToolCallDetailDto::Task {+ agent_id: str_field("agent").unwrap_or_default(),+ label: str_field("description").unwrap_or_else(|| "subagent".to_string()),+ },+ "workflow" => ToolCallDetailDto::Task {+ agent_id: String::new(),+ label: "workflow".to_string(),+ },other => ToolCallDetailDto::Unknown {name: other.to_string(),},diff --git a/gui/src/components/chat/utils/chatActivity.ts b/gui/src/components/chat/utils/chatActivity.tsindex 990440e9..095fea8e 100644--- a/gui/src/components/chat/utils/chatActivity.ts+++ b/gui/src/components/chat/utils/chatActivity.ts@@ -51,7 +51,9 @@ export function formatOperationLabel(case "skill":return `Loaded skill ${operation.detail.name}`;case "task":- return `Delegated to ${operation.detail.agentId}`;+ return operation.detail.agentId+ ? `${operation.detail.agentId} · ${operation.detail.label}`+ : `Subagent · ${operation.detail.label}`;case "todo_read":return "Read todos";case "todo_write":diff --git a/gui/src/components/chat/utils/chatThread.ts b/gui/src/components/chat/utils/chatThread.tsindex 259ea2d3..a002916e 100644--- a/gui/src/components/chat/utils/chatThread.ts+++ b/gui/src/components/chat/utils/chatThread.ts@@ -548,6 +548,7 @@ function summarizeActivityGroup(operations: ActivityOperation[]): string {let commands = 0;let searches = 0;let fetches = 0;+ let subagents = 0;let others = 0;for (const operation of operations) {@@ -568,12 +569,18 @@ function summarizeActivityGroup(operations: ActivityOperation[]): string {case "fetch":fetches += 1;break;+ case "task":+ subagents += 1;+ break;default:others += 1;break;}}+ if (subagents > 0) {+ return `${subagents} subagent${subagents === 1 ? "" : "s"}`;+ }if (fileReads > 0) {return `Explored ${fileReads} file${fileReads === 1 ? "" : "s"}`;}diff --git a/gui/src/services/desktop/types/contracts.generated.ts b/gui/src/services/desktop/types/contracts.generated.tsindex a1b332cb..2d64a19b 100644--- a/gui/src/services/desktop/types/contracts.generated.ts+++ b/gui/src/services/desktop/types/contracts.generated.ts@@ -7,7 +7,7 @@ export type FileOperation = "create" | "overwrite" | "replace" | "remove" | "undexport type OutputPreview = { content: string, totalLines: number, headDisplayLines: string | null, tailDisplayLines: string | null, fullOutputPath: string | null, };-export type ToolCallDetail = { "kind": "file_read", path: string, startLine: number | null, endLine: number | null, } | { "kind": "file_update", path: string, operation: FileOperation, } | { "kind": "shell", command: string, cwd: string | null, description: string | null, } | { "kind": "search", pattern: string, path: string | null, glob: string | null, fileType: string | null, } | { "kind": "codebase_search", queries: Array<string>, } | { "kind": "fetch", url: string, } | { "kind": "followup", question: string, } | { "kind": "plan", planName: string, } | { "kind": "skill", name: string, } | { "kind": "task", agentId: string, } | { "kind": "todo_write", count: number, } | { "kind": "todo_read" } | { "kind": "unknown", name: string, };+export type ToolCallDetail = { "kind": "file_read", path: string, startLine: number | null, endLine: number | null, } | { "kind": "file_update", path: string, operation: FileOperation, } | { "kind": "shell", command: string, cwd: string | null, description: string | null, } | { "kind": "search", pattern: string, path: string | null, glob: string | null, fileType: string | null, } | { "kind": "codebase_search", queries: Array<string>, } | { "kind": "fetch", url: string, } | { "kind": "followup", question: string, } | { "kind": "plan", planName: string, } | { "kind": "skill", name: string, } | { "kind": "task", agentId: string, label: string, } | { "kind": "todo_write", count: number, } | { "kind": "todo_read" } | { "kind": "unknown", name: string, };export type ToolResultDetail = { "kind": "file_diff", path: string, patch: string, } | { "kind": "shell_output", command: string, shell: string, exitCode: number | null, description: string | null, stdout: OutputPreview | null, stderr: OutputPreview | null, } | { "kind": "text", text: string, };