feat: add parentAgentId to client types and session store
Add parentAgentId field to: - Agent interface in session-store.ts - AgentDirectoryEntry in agent-directory.ts - getAgentDirectory() includes parentAgentId - normalizeAgentSnapshot() maps from server payload 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
dd697defbb
commit
cb78f29b31
@@ -139,6 +139,7 @@ function normalizeAgentSnapshot(snapshot: AgentSnapshotPayload, serverId: string
|
|||||||
requiresAttention: snapshot.requiresAttention ?? false,
|
requiresAttention: snapshot.requiresAttention ?? false,
|
||||||
attentionReason: snapshot.attentionReason ?? null,
|
attentionReason: snapshot.attentionReason ?? null,
|
||||||
attentionTimestamp,
|
attentionTimestamp,
|
||||||
|
parentAgentId: snapshot.parentAgentId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ export interface Agent {
|
|||||||
requiresAttention?: boolean;
|
requiresAttention?: boolean;
|
||||||
attentionReason?: "finished" | "error" | "permission" | null;
|
attentionReason?: "finished" | "error" | "permission" | null;
|
||||||
attentionTimestamp?: Date | null;
|
attentionTimestamp?: Date | null;
|
||||||
|
parentAgentId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Command {
|
export interface Command {
|
||||||
@@ -831,6 +832,7 @@ export const useSessionStore = create<SessionStore>()(
|
|||||||
requiresAttention: agent.requiresAttention ?? false,
|
requiresAttention: agent.requiresAttention ?? false,
|
||||||
attentionReason: agent.attentionReason ?? null,
|
attentionReason: agent.attentionReason ?? null,
|
||||||
attentionTimestamp: agent.attentionTimestamp ?? null,
|
attentionTimestamp: agent.attentionTimestamp ?? null,
|
||||||
|
parentAgentId: agent.parentAgentId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return entries;
|
return entries;
|
||||||
|
|||||||
@@ -12,4 +12,5 @@ export interface AgentDirectoryEntry {
|
|||||||
requiresAttention?: boolean;
|
requiresAttention?: boolean;
|
||||||
attentionReason?: "finished" | "error" | "permission" | null;
|
attentionReason?: "finished" | "error" | "permission" | null;
|
||||||
attentionTimestamp?: Date | null;
|
attentionTimestamp?: Date | null;
|
||||||
|
parentAgentId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user