Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Both ChatContextKeys.chatSessionType and ChatContextKeys.agentSessionType were using the same underlying context key string 'chatSessionType', causing ambiguity in context key resolution.

Changes

Changed agentSessionType to use distinct key string:

// Before
export const agentSessionType = new RawContextKey<string>('chatSessionType', '', ...);

// After  
export const agentSessionType = new RawContextKey<string>('agentSessionType', '', ...);

All usages already reference the context key through the API (.key, .isEqualTo(), .bindTo()), so no consumer changes required.

Original prompt

This section details on the original issue you should resolve

<issue_title>There's a naming collision: both ChatContextKeys.chatSessionType (line 65) and ChatContextKeys.agentSessionType (line 103) use the same context key string 'chatSessionType'. This creates ambiguity and can lead to unexpected behavior. The agentSessionType export should use a different key string, such as 'agentSessionType'.</issue_title>
<issue_description>There's a naming collision: both ChatContextKeys.chatSessionType (line 65) and ChatContextKeys.agentSessionType (line 103) use the same context key string 'chatSessionType'. This creates ambiguity and can lead to unexpected behavior. The agentSessionType export should use a different key string, such as 'agentSessionType'.

	export const chatSessionType = new RawContextKey<string>('sessionType', '', { type: 'string', description: localize('chatSessionType', "The type of the current chat session.") });

Originally posted by @copilot in #288181 (comment)
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…pe' to 'agentSessionType'

Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix naming collision in ChatContextKeys exports Fix context key collision: agentSessionType and chatSessionType Feb 3, 2026
Copilot AI requested a review from osortega February 3, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants