Expose provider-owned draft session configuration for serialization
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Description
Provider-contributed controls in `NewChatInputWidget` write mode, permission, and other configuration directly to the provider-owned draft session. This works when starting a normal session because the configured draft is sent as-is.
Other consumers, such as the automation dialog, need to serialize those selected values before sending. The available `ISession` reference does not expose permission or provider execution configuration, and reading contributed picker state would couple consumers to UI implementations.
### Proposal
Add a provider-neutral API for reading—and ideally reapplying—a draft session's execution configuration:
```ts
interface ISessionExecutionConfiguration {
modeId?: string;
permissionLevel?: string;
}
```
This could be exposed through `ISessionsProvider` and routed through `ISessionsManagementService`.
Providers would remain the source of truth:
- Agent Host maps session configuration such as `mode` and `autoApprove`.
- Copilot maps its existing mode and permission state.
- Unsupported providers may omit the capability.
This would allow non-send workflows to serialize configuration and preserve it when recreating a draft without exposing picker internals or conflating Agent Host execution mode with `ISession.mode`.
Contributor guide
Assessment
This issue has not been assessed yet.