fix(ui): auto-navigate to run page and refresh runs list after invoke
After clicking Invoke on the agent detail page, the heartbeats query is now invalidated so the runs list updates immediately. The existing navigate logic also ensures you're taken to the new run's page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f4698b73de
commit
88855a6535
1 changed files with 1 additions and 0 deletions
|
|
@ -289,6 +289,7 @@ export function AgentDetail() {
|
|||
queryClient.invalidateQueries({ queryKey: queryKeys.agents.taskSessions(agentId!) });
|
||||
if (selectedCompanyId) {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.agents.list(selectedCompanyId) });
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.heartbeats(selectedCompanyId, agentId!) });
|
||||
}
|
||||
if (action === "invoke" && data && typeof data === "object" && "id" in data) {
|
||||
navigate(`/agents/${agentId}/runs/${(data as HeartbeatRun).id}`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue