Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: goto-anything command filter should only match shortcut (#23862)
lyzno1e0fe0e1a3e8c
diff --git a/web/__tests__/goto-anything/command-selector.test.tsx b/web/__tests__/goto-anything/command-selector.test.tsxindex 1073b9d4818..1db4be31fbb 100644--- a/web/__tests__/goto-anything/command-selector.test.tsx+++ b/web/__tests__/goto-anything/command-selector.test.tsx@@ -37,7 +37,7 @@ describe('CommandSelector', () => {},knowledge: {key: '@knowledge',- shortcut: '@knowledge',+ shortcut: '@kb',title: 'Search Knowledge',description: 'Search knowledge bases',search: jest.fn(),@@ -75,7 +75,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.getByTestId('command-item-@plugin')).toBeInTheDocument()expect(screen.getByTestId('command-item-@node')).toBeInTheDocument()})@@ -90,7 +90,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.getByTestId('command-item-@plugin')).toBeInTheDocument()expect(screen.getByTestId('command-item-@node')).toBeInTheDocument()})@@ -107,7 +107,7 @@ describe('CommandSelector', () => {)expect(screen.queryByTestId('command-item-@app')).not.toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.queryByTestId('command-item-@plugin')).not.toBeInTheDocument()expect(screen.queryByTestId('command-item-@node')).not.toBeInTheDocument()})@@ -122,7 +122,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.queryByTestId('command-item-@knowledge')).not.toBeInTheDocument()+ expect(screen.queryByTestId('command-item-@kb')).not.toBeInTheDocument()expect(screen.getByTestId('command-item-@plugin')).toBeInTheDocument()expect(screen.queryByTestId('command-item-@node')).not.toBeInTheDocument()})@@ -137,7 +137,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.queryByTestId('command-item-@knowledge')).not.toBeInTheDocument()+ expect(screen.queryByTestId('command-item-@kb')).not.toBeInTheDocument()})it('should match partial strings', () => {@@ -145,14 +145,14 @@ describe('CommandSelector', () => {<CommandSelectoractions={mockActions}onCommandSelect={mockOnCommandSelect}- searchFilter="nowl"+ searchFilter="od"/>,)expect(screen.queryByTestId('command-item-@app')).not.toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.queryByTestId('command-item-@kb')).not.toBeInTheDocument()expect(screen.queryByTestId('command-item-@plugin')).not.toBeInTheDocument()- expect(screen.queryByTestId('command-item-@node')).not.toBeInTheDocument()+ expect(screen.getByTestId('command-item-@node')).toBeInTheDocument()})})@@ -167,7 +167,7 @@ describe('CommandSelector', () => {)expect(screen.queryByTestId('command-item-@app')).not.toBeInTheDocument()- expect(screen.queryByTestId('command-item-@knowledge')).not.toBeInTheDocument()+ expect(screen.queryByTestId('command-item-@kb')).not.toBeInTheDocument()expect(screen.queryByTestId('command-item-@plugin')).not.toBeInTheDocument()expect(screen.queryByTestId('command-item-@node')).not.toBeInTheDocument()@@ -210,7 +210,7 @@ describe('CommandSelector', () => {/>,)- expect(mockOnCommandValueChange).toHaveBeenCalledWith('@knowledge')+ expect(mockOnCommandValueChange).toHaveBeenCalledWith('@kb')})it('should not call onCommandValueChange if current value still exists', () => {@@ -246,10 +246,10 @@ describe('CommandSelector', () => {/>,)- const knowledgeItem = screen.getByTestId('command-item-@knowledge')+ const knowledgeItem = screen.getByTestId('command-item-@kb')fireEvent.click(knowledgeItem)- expect(mockOnCommandSelect).toHaveBeenCalledWith('@knowledge')+ expect(mockOnCommandSelect).toHaveBeenCalledWith('@kb')})})@@ -276,7 +276,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.getByTestId('command-item-@plugin')).toBeInTheDocument()expect(screen.getByTestId('command-item-@node')).toBeInTheDocument()})@@ -312,7 +312,7 @@ describe('CommandSelector', () => {)expect(screen.getByTestId('command-item-@app')).toBeInTheDocument()- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.getByTestId('command-item-@plugin')).toBeInTheDocument()expect(screen.getByTestId('command-item-@node')).toBeInTheDocument()})@@ -326,7 +326,7 @@ describe('CommandSelector', () => {/>,)- expect(screen.getByTestId('command-item-@knowledge')).toBeInTheDocument()+ expect(screen.getByTestId('command-item-@kb')).toBeInTheDocument()expect(screen.queryByTestId('command-item-@app')).not.toBeInTheDocument()})})diff --git a/web/app/components/goto-anything/command-selector.tsx b/web/app/components/goto-anything/command-selector.tsxindex d13421a0eb0..6ec179c3e30 100644--- a/web/app/components/goto-anything/command-selector.tsx+++ b/web/app/components/goto-anything/command-selector.tsx@@ -20,7 +20,6 @@ const CommandSelector: FC<Props> = ({ actions, onCommandSelect, searchFilter, coreturn trueconst filterLower = searchFilter.toLowerCase()return action.shortcut.toLowerCase().includes(filterLower)- || action.key.toLowerCase().includes(filterLower)})useEffect(() => {