feat: add processor tracing toggle to exchange detail views
Wire getActions on ProcessorTimeline and RouteFlow to send SET_TRACED_PROCESSORS commands to all agents of the same application. Tracing state managed via Zustand store with optimistic UI and rollback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
ui/src/api/queries/commands.ts
Normal file
21
ui/src/api/queries/commands.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { api } from '../client'
|
||||
|
||||
interface SendGroupCommandParams {
|
||||
group: string
|
||||
type: string
|
||||
payload: Record<string, unknown>
|
||||
}
|
||||
|
||||
export function useSendGroupCommand() {
|
||||
return useMutation({
|
||||
mutationFn: async ({ group, type, payload }: SendGroupCommandParams) => {
|
||||
const { data, error } = await api.POST('/agents/groups/{group}/commands', {
|
||||
params: { path: { group } },
|
||||
body: { type, payload } as any,
|
||||
})
|
||||
if (error) throw new Error('Failed to send command')
|
||||
return data!
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user