mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-06 19:58:43 +02:00
fix: preserve toolArguments through normalization and activity state
- Add toolArguments to normalizeRunTimelineEvent output so persisted sessions retain tool argument data across app restarts - Add toolArguments field to AgentActivityState and propagate it in applySessionEventActivity for real-time activity labels - Add tests for normalization round-trip with and without toolArguments - Add test for activity state including toolArguments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ export interface AgentActivityState {
|
||||
agentName: string;
|
||||
activityType?: SessionEventRecord['activityType'];
|
||||
toolName?: string;
|
||||
toolArguments?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface SessionUsageState {
|
||||
@@ -45,6 +46,7 @@ export function applySessionEventActivity(
|
||||
agentName: event.agentName?.trim() || event.agentId?.trim() || agentKey,
|
||||
activityType: event.activityType,
|
||||
toolName: event.toolName,
|
||||
toolArguments: event.toolArguments,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -494,6 +494,7 @@ function normalizeRunTimelineEvent(
|
||||
targetAgentName: normalizeOptionalString(event.targetAgentName),
|
||||
toolName: normalizeOptionalString(event.toolName),
|
||||
toolCallId: normalizeOptionalString(event.toolCallId),
|
||||
toolArguments: event.toolArguments,
|
||||
fileChanges: normalizeToolCallFileChanges(event.fileChanges),
|
||||
approvalId: normalizeOptionalString(event.approvalId),
|
||||
approvalKind: event.approvalKind,
|
||||
|
||||
Reference in New Issue
Block a user