revert(agent): remove parallel tool execution patch, keep serial

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jiayuan Zhang 2026-02-15 20:43:37 +08:00
parent e39f9a5dfe
commit 084657868f
3 changed files with 8 additions and 18 deletions

View file

@ -44,9 +44,6 @@
"overrides": {
"@types/react": "catalog:",
"@types/react-dom": "catalog:"
},
"patchedDependencies": {
"@mariozechner/pi-agent-core@0.52.9": "patches/@mariozechner__pi-agent-core@0.52.9.patch"
}
},
"devDependencies": {

View file

@ -783,19 +783,17 @@ export class Agent {
private handleRunLogEvent(event: AgentEvent) {
if (event.type === "tool_execution_start") {
const toolCallId = (event as any).toolCallId ?? "unknown";
const toolName = (event as any).toolName ?? "unknown";
this.toolStartTimes.set(toolCallId, Date.now());
this.toolStartTimes.set(toolName, Date.now());
this.runLog.log("tool_start", {
tool: toolName,
args: JSON.stringify((event as any).args ?? {}).slice(0, 500),
});
} else if (event.type === "tool_execution_end") {
const toolCallId = (event as any).toolCallId ?? "unknown";
const toolName = (event as any).toolName ?? "unknown";
const startTime = this.toolStartTimes.get(toolCallId);
const startTime = this.toolStartTimes.get(toolName);
const duration_ms = startTime ? Date.now() - startTime : undefined;
this.toolStartTimes.delete(toolCallId);
this.toolStartTimes.delete(toolName);
// Extract result metadata for run-log persistence (survives session compaction)
const result = (event as any).result;

15
pnpm-lock.yaml generated
View file

@ -68,18 +68,13 @@ overrides:
'@types/react': ^19.2.0
'@types/react-dom': ^19.2.0
patchedDependencies:
'@mariozechner/pi-agent-core@0.52.9':
hash: befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00
path: patches/@mariozechner__pi-agent-core@0.52.9.patch
importers:
.:
dependencies:
'@mariozechner/pi-agent-core':
specifier: 'catalog:'
version: 0.52.9(patch_hash=befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00)(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-ai':
specifier: 'catalog:'
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
@ -596,7 +591,7 @@ importers:
dependencies:
'@mariozechner/pi-agent-core':
specifier: 'catalog:'
version: 0.52.9(patch_hash=befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00)(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-ai':
specifier: 'catalog:'
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
@ -695,7 +690,7 @@ importers:
devDependencies:
'@mariozechner/pi-agent-core':
specifier: 'catalog:'
version: 0.52.9(patch_hash=befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00)(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-ai':
specifier: 'catalog:'
version: 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
@ -12503,7 +12498,7 @@ snapshots:
std-env: 3.10.0
yoctocolors: 2.1.2
'@mariozechner/pi-agent-core@0.52.9(patch_hash=befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00)(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)':
'@mariozechner/pi-agent-core@0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)':
dependencies:
'@mariozechner/pi-ai': 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
transitivePeerDependencies:
@ -12542,7 +12537,7 @@ snapshots:
'@mariozechner/pi-coding-agent@0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)':
dependencies:
'@mariozechner/jiti': 2.6.5
'@mariozechner/pi-agent-core': 0.52.9(patch_hash=befbe3b9fd1a6d3e13dfa4927d9f0addd2f3b3454bd9d407c16dacb9a71c0f00)(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-agent-core': 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-ai': 0.52.9(@modelcontextprotocol/sdk@1.26.0(zod@4.3.6))(ws@8.19.0)(zod@4.3.6)
'@mariozechner/pi-tui': 0.52.9
'@silvia-odwyer/photon-node': 0.3.4