Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

The Enter key currently submits prompts in GitHub Copilot coding agent / cloud agent chat sessions, which can lead to accidental submissions during multi-line prompt composition. Only the send button should trigger submission.

Changes

API Extension (vscode.proposed.chatSessionsProvider.d.ts)

  • Added acceptsInputOnEnter?: boolean to ChatSessionCapabilities
  • Defaults to true (backward compatible)
  • When false, Enter key is disabled for input submission

Cloud Agent Configuration (chatSessions.ts)

vscode.chat.registerChatSessionContentProvider(
    CopilotChatSessionsProvider.TYPE,
    copilotSessionsProvider,
    copilotSessionsProvider.chatParticipant,
    { supportsInterruptions: true, acceptsInputOnEnter: false }  // Enter disabled
);

Tests (copilotCloudSessionsProvider.spec.ts)

  • Verifies cloud agent sessions set acceptsInputOnEnter: false
  • Confirms default behavior for other session types

Scope

Only affects cloud agent sessions. CLI, Claude, and default chat sessions retain Enter key submission.

Original prompt

The enter key should not send a prompt when in the "GitHub Copilot coding agent" / cloud agent chat session provider. Only the send button should do that.

Created from VS Code via the GitHub Pull Request extension.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix enter key behavior in GitHub Copilot chat session Add acceptsInputOnEnter capability to disable Enter key submission in cloud agent sessions Oct 28, 2025
Copilot AI requested a review from pierceboggan October 28, 2025 00:15
Copilot finished work on behalf of pierceboggan October 28, 2025 00:15
@pierceboggan
Copy link
Contributor

The return key on the Copilot coding agent still sends on enter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants