Skip to content

Commit a83acc7

Browse files
committed
fix(react-core): IntelligenceIndicator matches the renamed copilotkit_knowledge_base_shell tool
The Intelligence platform's MCP tool was renamed from `bash` to `copilotkit_knowledge_base_shell` (intelligence/mme/integrate-sl 4256c13). Update the indicator's `DEFAULT_TOOL_PATTERNS` to match the new name so the pill keeps rendering on the right assistant slots. Test fixtures that previously used the bare `bash` name follow the rename — both the default in `emitAssistantMessageWithToolCalls` and the explicit `tc_match` entry in the tool-match condition test.
1 parent 5b11748 commit a83acc7

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

packages/react-core/src/v2/components/intelligence-indicator/IntelligenceIndicator.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ const FADE_OUT_ANIMATION_MS = 480;
3030
* we add per-instance customization later (e.g. a `CopilotKitProvider`
3131
* prop or a runtime-info field), this constant becomes the fallback.
3232
*/
33-
const DEFAULT_TOOL_PATTERNS: readonly RegExp[] = [/^bash$/];
33+
const DEFAULT_TOOL_PATTERNS: readonly RegExp[] = [
34+
/^copilotkit_knowledge_base_shell$/,
35+
];
3436

3537
type Phase = "idle" | "spinner" | "check" | "fading" | "hidden";
3638

packages/react-core/src/v2/components/intelligence-indicator/__tests__/IntelligenceIndicator.e2e.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react";
44
import { EventType } from "@ag-ui/client";
55
import type { BaseEvent, RunAgentInput } from "@ag-ui/client";
66
import type { Observable } from "rxjs";
7-
import { type Subject } from "rxjs";
7+
import type { Subject } from "rxjs";
88
import { takeWhile } from "rxjs/operators";
99
import {
1010
MockStepwiseAgent,
@@ -76,7 +76,7 @@ const emitAssistantMessageWithToolCalls = (
7676
agent.emit(
7777
toolCallChunkEvent({
7878
toolCallId: tc.id,
79-
toolCallName: tc.name ?? "bash",
79+
toolCallName: tc.name ?? "copilotkit_knowledge_base_shell",
8080
parentMessageId: messageId,
8181
delta: tc.arg,
8282
}),
@@ -347,7 +347,7 @@ describe('IntelligenceIndicator — "Using CopilotKit Intelligence" (auto-mounte
347347

348348
// Second message has a bash call — pill should appear on it.
349349
emitAssistantMessageWithToolCalls(agent, "m_match", [
350-
{ id: "tc_match", name: "bash", arg: "{}" },
350+
{ id: "tc_match", name: "copilotkit_knowledge_base_shell", arg: "{}" },
351351
]);
352352
await waitFor(() => expectPillOn("m_match"));
353353
expectPillCount(1);

0 commit comments

Comments
 (0)