generated from nhcarrigan/template
feat: display per-agent model override in agent monitor tree
Parse the model field from Agent/Task tool input and surface it in the agent monitor panel as a purple subtitle, so users can immediately see which agents are running on a non-default model. Closes #207
This commit is contained in:
@@ -309,6 +309,13 @@
|
||||
{agent.description}
|
||||
</p>
|
||||
|
||||
<!-- Model override badge -->
|
||||
{#if agent.model}
|
||||
<p class="mt-0.5 text-[10px] text-purple-400 truncate" title="Model: {agent.model}">
|
||||
✦ {agent.model}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<!-- Status indicator -->
|
||||
<div class="mt-1 flex items-center gap-1">
|
||||
{#if agent.status === "running"}
|
||||
|
||||
@@ -43,6 +43,22 @@ describe("agents store", () => {
|
||||
expect(agents[0]).toMatchObject(agent);
|
||||
});
|
||||
|
||||
it("preserves model field when provided", () => {
|
||||
const agent = createMockAgent({ model: "claude-opus-4-6" });
|
||||
agentStore.addAgent(conversationId, agent);
|
||||
|
||||
const agents = get(getAgentsForConversation(conversationId));
|
||||
expect(agents[0].model).toBe("claude-opus-4-6");
|
||||
});
|
||||
|
||||
it("leaves model undefined when not provided", () => {
|
||||
const agent = createMockAgent();
|
||||
agentStore.addAgent(conversationId, agent);
|
||||
|
||||
const agents = get(getAgentsForConversation(conversationId));
|
||||
expect(agents[0].model).toBeUndefined();
|
||||
});
|
||||
|
||||
it("assigns a character name and avatar to added agents", () => {
|
||||
const agent = createMockAgent();
|
||||
agentStore.addAgent(conversationId, agent);
|
||||
|
||||
@@ -515,6 +515,7 @@ export async function initializeTauriListeners() {
|
||||
agent_id,
|
||||
description,
|
||||
subagent_type,
|
||||
model,
|
||||
started_at,
|
||||
conversation_id,
|
||||
parent_tool_use_id,
|
||||
@@ -526,6 +527,7 @@ export async function initializeTauriListeners() {
|
||||
agentId: agent_id,
|
||||
description,
|
||||
subagentType: subagent_type,
|
||||
model,
|
||||
startedAt: started_at,
|
||||
status: "running",
|
||||
parentToolUseId: parent_tool_use_id,
|
||||
|
||||
@@ -6,6 +6,7 @@ export interface AgentInfo {
|
||||
agentType?: string;
|
||||
description: string;
|
||||
subagentType: string;
|
||||
model?: string;
|
||||
startedAt: number;
|
||||
endedAt?: number;
|
||||
status: AgentStatus;
|
||||
@@ -21,6 +22,7 @@ export interface AgentStartPayload {
|
||||
agent_id?: string;
|
||||
description: string;
|
||||
subagent_type: string;
|
||||
model?: string;
|
||||
started_at: number;
|
||||
conversation_id?: string;
|
||||
parent_tool_use_id?: string;
|
||||
|
||||
Reference in New Issue
Block a user