Uh oh!
There was an error while loading. Please reload this page.
fix(app): support slash command picker on any line of multiline input - #34728
fix(app): support slash command picker on any line of multiline input#347280xSkybreaker wants to merge 1 commit into
Conversation
fix(app): support slash command picker on any line of multiline input The slash command picker used `rawText.match(/^\/(\S*)$/)` which requires the entire input to start with `/`. This means typing text first, then Shift+Enter, then `/` on a new line would not trigger the picker. Fix by checking only the text before the cursor position for a line-start `/`, matching the same pattern used for @mention triggers. This allows users to compose multiline prompts and trigger slash commands on any line. Fixesanomalyco#34693 Co-Authored-By: Claude <noreply@anthropic.com> @
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
This PR appears to address the exact same issue: supporting the slash command picker on any line of multiline input. It covers both the app and TUI components, while PR #34728 (the current PR) focuses on the app component. These PRs likely overlap significantly in functionality and should be reviewed together to avoid duplicate work. |
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
0xSkybreaker
commented
Jul 1, 2026
Superseded by #34710 which has a more complete fix. |
Issue for this PR
Closes#34693
Type of change
What does this PR do?
The slash command picker (
/trigger) in the web chat input only worked when the cursor was at position 0 — typing text first, pressing Shift+Enter, and then typing/on a new line would not trigger the picker.Changed the regex from whole-string anchor to cursor-aware line-start match, consistent with the existing
@mentiontrigger approach:How did you verify your code works?
Code review — the fix mirrors the exact pattern used by the
@mentiontrigger which already handles multiline input correctly. The change is a 2-line diff.Screenshots / recordings
No UI change — picker now opens on any line instead of only at position 0.
Checklist