Skip to content

bug(desktop): slash picker opens when / is attached to preceding text #3849

Description

@Sun-GLiang

What happened

The slash command/Skill picker opens when / is typed as a path separator inside an existing text token in the Maka Desktop composer.

For example, first type:

帮我整理到/Users

Then type another /, producing:

帮我整理到/Users/

At that point, Maka opens the slash command/Skill popup and displays “No matching commands or skills” (没有匹配的命令或技能).

The newly typed / is part of the existing filesystem path. It is attached to the preceding Users text and does not begin a new token, so it should be treated as ordinary message content rather than a command or Skill trigger.

Expected behavior:

  • / opens the command/Skill picker when typed at the start of the composer.
  • / may open the appropriate picker after whitespace if inline Skill discovery is supported there.
  • / used as a path separator inside an existing token must remain ordinary text and must not open any command or Skill popup.

How to reproduce

  1. Open Maka Desktop and focus the session composer.
  2. Type 帮我整理到/Users.
  3. Keep the caret at the end of the text.
  4. Type another /, so the composer contains 帮我整理到/Users/.
  5. Observe that the command/Skill picker opens and displays “没有匹配的命令或技能”.

Actual result: Typing the trailing / in 帮我整理到/Users/ opens the slash command/Skill picker.

Expected result: No popup opens because the trailing / is a path separator attached to the preceding text and does not start a new token.

Environment

  • Maka version or commit: ad48130be
  • OS and version: macOS 15.6
  • Surface: Desktop
  • UI language: Simplified Chinese
  • Node.js version, if running from source: 24.19.0

Logs, screenshots, or additional context

Slash discovery should require a clear token boundary before /, such as:

  • the start of the input;
  • whitespace;
  • a new line.

Suggested acceptance scenarios:

  • / opens the command/Skill picker.
  • 帮我整理到 / follows the supported inline-slash behavior because / begins a new token.
  • Typing the trailing slash in 帮我整理到/Users/ does not open a popup.
  • Typing / anywhere inside path/to/file/ does not open a popup.
  • Suppressing the popup does not modify the draft or move the caret.

Related: #2948 covers context detection for a non-leading slash after whitespace. This issue covers the distinct case where / is used inside a continuous text/path token and should not be a trigger at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions