akseljoonas HF Staff commited on
Commit
d211359
·
1 Parent(s): ae24efc

fix: show activity status for approval-flow tools and revert chip override

Browse files

- Call onToolRunning on tool_state_change with state 'running' so the
activity bar updates for approval-flow tools (hf_jobs, sandbox_create)
- Revert description override in ToolCallGroup status chip

frontend/src/lib/ws-chat-transport.ts CHANGED
@@ -547,6 +547,7 @@ export class WebSocketChatTransport implements ChatTransport<UIMessage> {
547
  case 'tool_state_change': {
548
  const tcId = (event.data?.tool_call_id as string) || '';
549
  const state = (event.data?.state as string) || '';
 
550
  const jobUrl = (event.data?.jobUrl as string) || undefined;
551
 
552
  if (tcId.startsWith('plan_tool')) break;
@@ -555,6 +556,10 @@ export class WebSocketChatTransport implements ChatTransport<UIMessage> {
555
  useAgentStore.getState().setJobUrl(tcId, jobUrl);
556
  }
557
 
 
 
 
 
558
  if (this.streamController && (state === 'rejected' || state === 'abandoned')) {
559
  this.enqueue({ type: 'tool-output-denied', toolCallId: tcId });
560
  }
 
547
  case 'tool_state_change': {
548
  const tcId = (event.data?.tool_call_id as string) || '';
549
  const state = (event.data?.state as string) || '';
550
+ const toolName = (event.data?.tool as string) || '';
551
  const jobUrl = (event.data?.jobUrl as string) || undefined;
552
 
553
  if (tcId.startsWith('plan_tool')) break;
 
556
  useAgentStore.getState().setJobUrl(tcId, jobUrl);
557
  }
558
 
559
+ if (state === 'running' && toolName) {
560
+ this.sideChannel.onToolRunning(toolName);
561
+ }
562
+
563
  if (this.streamController && (state === 'rejected' || state === 'abandoned')) {
564
  this.enqueue({ type: 'tool-output-denied', toolCallId: tcId });
565
  }