Skip to content

Conversation

rwoll
Copy link
Member

@rwoll rwoll commented Aug 26, 2025

workbench.action.chat.open did not always trigger a parse of the input resulting in /<prompt> not being recognized as a prompt command when it's expected to.

If isPartialQuery: false (default), then the command used acceptInput intead of setInput only the latter of which will trigger a re-parse of the query to critcially turn /<prompt> into a ChatRequestSlashPromptPart.

Reviewers: There's a few places acceptInput is called with a query in the codebase. It's not clear to me if the others have the same issue or if always triggering a re-parse would double parse.

`workbench.action.chat.open` did not always trigger a parse of the input
resulting in `/<prompt>` not being recognized as a prompt command.

If `isPartialQuery: false` (default), then the commanded used
[`acceptInput` intead of `setInput`](https://github.com/microsoft/vscode/blob/709b8fabf55c505cbe5603ce654ecf3a8766a7a6/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts#L244)
only the latter of which will trigger a [re-parse of the query](https://github.com/microsoft/vscode/blob/709b8fabf55c505cbe5603ce654ecf3a8766a7a6/src/vs/workbench/contrib/chat/browser/chatWidget.ts#L1640)
to critcially turn [`/<prompt>` into a `ChatRequestSlashPromptPart`](https://github.com/microsoft/vscode/blob/d2ff8d16065d4748b8a205bfebdc98d7d76f7864/src/vs/workbench/contrib/chat/common/chatRequestParser.ts#L231).

**Reviewers**: There's a few places `acceptInput` is called with a query
in the codebase. It's not clear to me if the others have the same issue
or if always triggering a re-parse would double parse.
@rwoll rwoll marked this pull request as draft August 26, 2025 19:08
@rwoll rwoll marked this pull request as ready for review August 26, 2025 19:18
@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 26, 2025
@amunger amunger merged commit 70d16be into microsoft:main Aug 26, 2025
17 checks passed
osortega pushed a commit that referenced this pull request Aug 26, 2025
`workbench.action.chat.open` did not always trigger a parse of the input
resulting in `/<prompt>` not being recognized as a prompt command.

If `isPartialQuery: false` (default), then the commanded used
[`acceptInput` intead of `setInput`](https://github.com/microsoft/vscode/blob/709b8fabf55c505cbe5603ce654ecf3a8766a7a6/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts#L244)
only the latter of which will trigger a [re-parse of the query](https://github.com/microsoft/vscode/blob/709b8fabf55c505cbe5603ce654ecf3a8766a7a6/src/vs/workbench/contrib/chat/browser/chatWidget.ts#L1640)
to critcially turn [`/<prompt>` into a `ChatRequestSlashPromptPart`](https://github.com/microsoft/vscode/blob/d2ff8d16065d4748b8a205bfebdc98d7d76f7864/src/vs/workbench/contrib/chat/common/chatRequestParser.ts#L231).

**Reviewers**: There's a few places `acceptInput` is called with a query
in the codebase. It's not clear to me if the others have the same issue
or if always triggering a re-parse would double parse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants