diff --git a/webview-ui/src/components/chat/CommandPatternSelector.tsx b/webview-ui/src/components/chat/CommandPatternSelector.tsx index 81ce112376..798d6779ec 100644 --- a/webview-ui/src/components/chat/CommandPatternSelector.tsx +++ b/webview-ui/src/components/chat/CommandPatternSelector.tsx @@ -33,7 +33,7 @@ export const CommandPatternSelector: React.FC = ({ // Create a combined list with full command first, then patterns const allPatterns = useMemo(() => { - const fullCommandPattern = { pattern: command, description: "Full command" } + const fullCommandPattern: CommandPattern = { pattern: command } return [fullCommandPattern, ...patterns] }, [command, patterns]) @@ -65,37 +65,30 @@ export const CommandPatternSelector: React.FC = ({ "-rotate-90": !isExpanded, })} /> - {t("chat:commandExecution.commandPermissions")} + {t("chat:commandExecution.manageCommands")} -

{t("chat:commandExecution.permissionsTooltip")}

-

- - ), - }} - /> -

+
+ + ), + }} + />
}>
- - {allowedCommands.length} {t("chat:commandExecution.allowed")} - + {allowedCommands.length} allowed - - {deniedCommands.length} {t("chat:commandExecution.denied")} - + {deniedCommands.length} denied
diff --git a/webview-ui/src/components/chat/__tests__/CommandPatternSelector.spec.tsx b/webview-ui/src/components/chat/__tests__/CommandPatternSelector.spec.tsx index 76b052192b..0b8ff18b00 100644 --- a/webview-ui/src/components/chat/__tests__/CommandPatternSelector.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/CommandPatternSelector.spec.tsx @@ -48,7 +48,7 @@ describe("CommandPatternSelector", () => { expect(container).toBeTruthy() // Check for the command permissions text - expect(screen.getByText("chat:commandExecution.commandPermissions")).toBeInTheDocument() + expect(screen.getByText("chat:commandExecution.manageCommands")).toBeInTheDocument() }) it("should show full command as first pattern when expanded", () => { @@ -62,9 +62,8 @@ describe("CommandPatternSelector", () => { const expandButton = screen.getByRole("button") fireEvent.click(expandButton) - // Check that the full command is shown with description + // Check that the full command is shown expect(screen.getByText("npm install express")).toBeInTheDocument() - expect(screen.getByText("- Full command")).toBeInTheDocument() }) it("should show extracted patterns when expanded", () => {