fix: improve subagent UI display and interruption handling (#330)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -180,7 +180,7 @@ export function addToolCall(
|
||||
*/
|
||||
export function completeSubagent(
|
||||
id: string,
|
||||
result: { success: boolean; error?: string },
|
||||
result: { success: boolean; error?: string; totalTokens?: number },
|
||||
): void {
|
||||
const agent = store.agents.get(id);
|
||||
if (!agent) return;
|
||||
@@ -191,6 +191,7 @@ export function completeSubagent(
|
||||
status: result.success ? "completed" : "error",
|
||||
error: result.error,
|
||||
durationMs: Date.now() - agent.startTime,
|
||||
totalTokens: result.totalTokens ?? agent.totalTokens,
|
||||
} as SubagentState;
|
||||
store.agents.set(id, updatedAgent);
|
||||
notifyListeners();
|
||||
|
||||
Reference in New Issue
Block a user