Merged
Conversation
On the new session page, chatService.sendRequest() cannot be used because the chat session hasn't been initialized yet. Detect isUntitled sessions and route through NewChatViewPane.sendQuery() instead, which sets the editor value and triggers the normal _send() flow (including slash command expansion). Also adds prefillInput/sendQuery public methods to NewChatWidget and NewChatViewPane, and injects IViewsService into RunScriptContribution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename add-run-action.prompt.md → generate-run-commands.prompt.md
- Update runScriptAction.ts to send /generate-run-commands
- Rewrite prompt with:
- Two task schema fields: inSessions (required) and
runOptions.runOn: worktreeCreated (optional, for setup commands)
- Smart inference: reads project files to determine commands;
only asks the user if ambiguous
- Modify mode: if run commands already exist, treat as an update
- Merge-safe: always preserves existing tasks.json entries
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After sendRequestForNewSession completes successfully, clear the editor value so it doesn't persist when the user navigates back to a new session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ssions
chatService.sendRequest() bypasses the chat widget's prompt file resolution
logic (_applyPromptFileIfSet). Use IChatWidgetService.getWidgetBySessionResource()
and call acceptInput('/generate-run-commands') instead, which goes through
the full input pipeline including slash command parsing and prompt file
attachment.
Also removes now-unused IChatService and ChatAgentLocation imports.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a “Generate New Action…” entry to the Agent Sessions Run dropdown, intended to invoke a new built-in prompt (/generate-run-commands) that helps create/modify session run commands (tasks with inSessions: true) in .vscode/tasks.json.
Changes:
- Add a new built-in prompt:
generate-run-commands.prompt.mddescribing how to infer/mergeinSessionstasks into.vscode/tasks.json. - Add a “Generate New Action…” menu item to the sessions Run dropdown that submits
/generate-run-commandsto chat. - Extend
NewChatViewPanewith helpers to prefill/send input programmatically.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/vs/sessions/prompts/generate-run-commands.prompt.md |
New built-in prompt content for generating/modifying sessions run commands. |
src/vs/sessions/prompts/add-run-action.prompt.md |
New/modified prompt file (currently empty). |
src/vs/sessions/contrib/chat/browser/runScriptAction.ts |
Adds “Generate New Action…” command to Run dropdown and routes to chat. |
src/vs/sessions/contrib/chat/browser/newChatViewPane.ts |
Adds prefillInput / sendQuery helpers; clears editor after sending. |
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
mjbvz
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.