Skip to content

agentHost: support askQuestions/elicitation and InProgress#308864

Merged
connor4312 merged 2 commits intomainfrom
connor4312/ahp-elicitation
Apr 9, 2026
Merged

agentHost: support askQuestions/elicitation and InProgress#308864
connor4312 merged 2 commits intomainfrom
connor4312/ahp-elicitation

Conversation

@connor4312
Copy link
Copy Markdown
Member

Adopts new AHP additions to support this stuff. askQuestions work and state is updated in the session list.

Adopts new AHP additions to support this stuff. askQuestions work and
state is updated in the session list.
Copilot AI review requested due to automatic review settings April 9, 2026 20:09
@connor4312 connor4312 self-assigned this Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Screenshot Changes

Base: 763d8945 Current: 04194827

Changed (1)

agentSessionsViewer/NeedsInput/Dark
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates VS Code’s agent host integration to support ask_user-style elicitation (“askQuestions”) end-to-end (protocol → reducer/state → Copilot agent session → chat UI), and surfaces richer live session status (including “InProgress”/“Needs input”) in the session list.

Changes:

  • Introduces session input request/answer actions and types in the Agent Host Protocol, plus reducer logic to derive summary status from pending confirmations/input requests.
  • Adds Copilot SDK-side user input request handling and maps it through to protocol actions and the chat UI question carousel.
  • Extends subscription APIs with an unmanaged “peek” accessor and updates session list/status plumbing to use live state.
Show a summary per file
File Description
src/vs/workbench/contrib/terminal/test/browser/agentHostPty.test.ts Updates terminal agent-host test mock for new subscription API.
src/vs/workbench/contrib/chat/test/browser/agentSessions/convertCarouselAnswers.test.ts Adds unit tests for converting carousel answers into protocol answers.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Updates agent host service mock to support unmanaged subscription peeking.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/loggingAgentConnection.ts Forwards new getSubscriptionUnmanaged method to inner connection.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListController.ts Attempts to update sidebar items from live session state/status (incl. NeedsInput/InProgress).
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts Adds input request carousel creation + SessionInputCompleted dispatch; exports convertCarouselAnswers.
src/vs/platform/agentHost/test/node/reducers.test.ts Adds reducer tests for summary status with tool confirmations and input requests.
src/vs/platform/agentHost/test/node/mockAgent.ts Extends mock agents with respondToUserInputRequest.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Adds tests covering CopilotAgentSession user input request/response lifecycle.
src/vs/platform/agentHost/test/node/agentEventMapper.test.ts Tests mapping user_input_request progress to session/inputRequested.
src/vs/platform/agentHost/test/common/agentSubscription.test.ts Tests unmanaged subscription access semantics (no refcount impact).
src/vs/platform/agentHost/node/protocolServerHandler.ts Includes session status in sessionAdded notification summaries.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Implements SDK ask_user → progress event → renderer response plumbing.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Plumbs user input callbacks and forwards user input responses to sessions.
src/vs/platform/agentHost/node/agentSideEffects.ts Forwards SessionInputCompleted to agent(s).
src/vs/platform/agentHost/node/agentService.ts Overlays live session status from state manager into listSessions().
src/vs/platform/agentHost/node/agentEventMapper.ts Maps user_input_request to protocol session/inputRequested.
src/vs/platform/agentHost/electron-browser/remoteAgentHostProtocolClient.ts Adds unmanaged subscription accessor + forwards status from remote listSessions.
src/vs/platform/agentHost/electron-browser/agentHostService.ts Adds unmanaged subscription accessor on renderer-side service client.
src/vs/platform/agentHost/common/state/sessionState.ts Re-exports new session input request/answer enums and types.
src/vs/platform/agentHost/common/state/sessionActions.ts Re-exports new input-related action types.
src/vs/platform/agentHost/common/state/protocol/version/registry.ts Registers new action types in version map (still v1).
src/vs/platform/agentHost/common/state/protocol/state.ts Changes SessionStatus to a numeric bitset; adds inputRequests and session input type definitions.
src/vs/platform/agentHost/common/state/protocol/reducers.ts Implements summary status derivation + reducers for input request/answer lifecycle.
src/vs/platform/agentHost/common/state/protocol/notifications.ts Updates notification docs to reflect numeric status encoding.
src/vs/platform/agentHost/common/state/protocol/actions.ts Adds session/inputRequested, session/inputAnswerChanged, session/inputCompleted actions.
src/vs/platform/agentHost/common/state/protocol/action-origin.generated.ts Marks new actions as client/server dispatchable in generated origin table.
src/vs/platform/agentHost/common/state/protocol/.ahp-version Bumps vendored protocol sync hash.
src/vs/platform/agentHost/common/state/agentSubscription.ts Switches subscription map to ResourceMap and adds unmanaged subscription getter.
src/vs/platform/agentHost/common/agentService.ts Extends core interfaces with session status, user input request event, and unmanaged subscription API.

Copilot's findings

  • Files reviewed: 30/30 changed files
  • Comments generated: 7

@connor4312 connor4312 marked this pull request as ready for review April 9, 2026 20:51
@connor4312 connor4312 enabled auto-merge April 9, 2026 21:33
@connor4312 connor4312 merged commit a475a87 into main Apr 9, 2026
26 checks passed
@connor4312 connor4312 deleted the connor4312/ahp-elicitation branch April 9, 2026 21:35
@vs-code-engineering vs-code-engineering bot added this to the 1.116.0 milestone Apr 9, 2026
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.

3 participants