Add filtering support for @ command selector in goto-anything #16063

Closed
opened 2026-02-21 19:24:30 -05:00 by yindo · 1 comment
Owner

Originally created by @lyzno1 on GitHub (Aug 11, 2025).

Description

When using the goto-anything feature (Cmd+K), typing @ shows a list of available commands (@app, @knowledge, @plugin, @node). However, when trying to filter these commands by typing additional characters (like @k for knowledge or @a for app), the command selector disappears entirely instead of filtering the results.

Expected Behavior

  • Typing @k should filter and show only @kb
  • Typing @p should show @plugin (and @app if it contains 'p')
  • The filtered results should maintain keyboard navigation highlight
  • An empty state should be shown when no commands match

Current Behavior

  • Only typing exactly @ shows the command selector
  • Any additional character causes the selector to disappear
  • No way to discover commands through partial matching
  • Inconsistent with the regular search filtering behavior

Steps to Reproduce

  1. Press Cmd+K to open goto-anything
  2. Type @ to see the command selector
  3. Type any additional character (e.g., @k)
  4. Observe that the command selector disappears

Impact

This affects user productivity as they need to remember exact command names and cannot use intuitive filtering to discover available commands.

Originally created by @lyzno1 on GitHub (Aug 11, 2025). ## Description When using the goto-anything feature (Cmd+K), typing @ shows a list of available commands (@app, @knowledge, @plugin, @node). However, when trying to filter these commands by typing additional characters (like @k for knowledge or @a for app), the command selector disappears entirely instead of filtering the results. ## Expected Behavior - Typing @k should filter and show only @kb - Typing @p should show @plugin (and @app if it contains 'p') - The filtered results should maintain keyboard navigation highlight - An empty state should be shown when no commands match ## Current Behavior - Only typing exactly @ shows the command selector - Any additional character causes the selector to disappear - No way to discover commands through partial matching - Inconsistent with the regular search filtering behavior ## Steps to Reproduce 1. Press Cmd+K to open goto-anything 2. Type @ to see the command selector 3. Type any additional character (e.g., @k) 4. Observe that the command selector disappears ## Impact This affects user productivity as they need to remember exact command names and cannot use intuitive filtering to discover available commands.
yindo added the 🐞 bug label 2026-02-21 19:24:30 -05:00
yindo closed this issue 2026-02-21 19:24:30 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 11, 2025):

Filtering support for the @ command selector in goto-anything is not currently implemented. The command selector only appears when the input is exactly "@", and any additional character causes it to disappear because the logic in web/app/components/goto-anything/index.tsx checks for an exact match (searchQuery.trim() === '@'). There is no filtering logic for partial matches like "@k" or "@a"—the CommandSelector component simply renders all commands when in commands mode and does not filter based on input beyond "@" itself (source).

To implement the filtering you described, you would need to:

  • Change the parent logic so that CommandSelector is rendered whenever the input starts with "@", not just when it equals "@".
  • Pass the current query (e.g., "@k") to CommandSelector and filter the available commands based on the characters after "@".
  • Update CommandSelector to filter its actions prop using a simple string match or fuzzy match on the command keys and descriptions.
  • Ensure keyboard navigation and empty state handling are preserved for the filtered list.

There are open issues and discussions recognizing this limitation and suggesting enhancements for discoverability and filtering support (see #23736), but there are no open or planned PRs that address this specific behavior yet.

If you want to implement this, focus on updating the logic in index.tsx to allow partial matching and filtering, and enhance the CommandSelector component to support filtering and empty states.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 11, 2025): <!-- Answer --> Filtering support for the @ command selector in goto-anything is not currently implemented. The command selector only appears when the input is exactly "@", and any additional character causes it to disappear because the logic in `web/app/components/goto-anything/index.tsx` checks for an exact match (`searchQuery.trim() === '@'`). There is no filtering logic for partial matches like "@k" or "@a"—the CommandSelector component simply renders all commands when in commands mode and does not filter based on input beyond "@" itself [(source)](https://github.com/langgenius/dify/blob/a44ca2971716ce530517e557326ba68c622f5b5a/web/app/components/goto-anything/index.tsx). To implement the filtering you described, you would need to: - Change the parent logic so that CommandSelector is rendered whenever the input starts with "@", not just when it equals "@". - Pass the current query (e.g., "@k") to CommandSelector and filter the available commands based on the characters after "@". - Update CommandSelector to filter its actions prop using a simple string match or fuzzy match on the command keys and descriptions. - Ensure keyboard navigation and empty state handling are preserved for the filtered list. There are open issues and discussions recognizing this limitation and suggesting enhancements for discoverability and filtering support [(see #23736)](https://github.com/langgenius/dify/issues/23736), but there are no open or planned PRs that address this specific behavior yet. If you want to implement this, focus on updating the logic in `index.tsx` to allow partial matching and filtering, and enhance the CommandSelector component to support filtering and empty states. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/87990a88-2d27-437a-a830-b5938c7675ed?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/23761)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16063