@@ -23,7 +23,7 @@ import { AgentSessionProviders, AgentSessionTarget } from '../../../../workbench
2323import { IChatService , IChatSendRequestOptions } from '../../../../workbench/contrib/chat/common/chatService/chatService.js' ;
2424import { IChatResponseModel } from '../../../../workbench/contrib/chat/common/model/chatModel.js' ;
2525import { ChatSessionStatus , IChatSessionsService , IChatSessionProviderOptionGroup , IChatSessionProviderOptionItem , SessionType } from '../../../../workbench/contrib/chat/common/chatSessionsService.js' ;
26- import { ISession , IChat , ISessionRepository , ISessionWorkspace , SessionStatus , GITHUB_REMOTE_FILE_SCHEME , IGitHubInfo , CopilotCLISessionType , CopilotCloudSessionType , ClaudeCodeSessionType , ISessionType , ISessionWorkspaceBrowseAction , ISessionFileChange , toSessionId , SESSION_WORKSPACE_GROUP_LOCAL } from '../../../services/sessions/common/session.js' ;
26+ import { ISession , IChat , ISessionRepository , ISessionWorkspace , SessionStatus , GITHUB_REMOTE_FILE_SCHEME , IGitHubInfo , CopilotCLISessionType , CopilotCloudSessionType , ClaudeCodeSessionType , ISessionType , ISessionWorkspaceBrowseAction , ISessionFileChange , toSessionId , SESSION_WORKSPACE_GROUP_LOCAL , ISessionChangeset } from '../../../services/sessions/common/session.js' ;
2727import { ChatAgentLocation , ChatConfiguration , ChatModeKind , ChatPermissionLevel , isChatPermissionLevel } from '../../../../workbench/contrib/chat/common/constants.js' ;
2828import { basename , dirname , isEqual } from '../../../../base/common/resources.js' ;
2929import { ISendRequestOptions , ISessionChangeEvent , ISessionsProvider } from '../../../services/sessions/common/sessionsProvider.js' ;
@@ -71,6 +71,8 @@ export interface ICopilotChatSession {
7171 readonly updatedAt : IObservable < Date > ;
7272 /** Current session status. */
7373 readonly status : IObservable < SessionStatus > ;
74+ /** File changesets produced by the session. */
75+ readonly changesets : IObservable < readonly ISessionChangeset [ ] > ;
7476 /** File changes produced by the session. */
7577 readonly changes : IObservable < readonly ISessionFileChange [ ] > ;
7678 /** Currently selected model identifier. */
@@ -180,6 +182,9 @@ class CopilotCLISession extends Disposable implements ICopilotChatSession {
180182 private readonly _loading = observableValue ( this , true ) ;
181183 readonly loading : IObservable < boolean > = this . _loading ;
182184
185+ private readonly _changesets : ReturnType < typeof observableValue < readonly ISessionChangeset [ ] > > ;
186+ readonly changesets : IObservable < readonly ISessionChangeset [ ] > ;
187+
183188 private readonly _changes : ReturnType < typeof observableValue < readonly ISessionFileChange [ ] > > ;
184189 readonly changes : IObservable < readonly ISessionFileChange [ ] > ;
185190
@@ -259,6 +264,9 @@ class CopilotCLISession extends Disposable implements ICopilotChatSession {
259264 this . _description = observableValue ( this , undefined ) ;
260265 this . description = this . _description ;
261266
267+ this . _changesets = observableValue < readonly ISessionChangeset [ ] > ( this , [ ] ) ;
268+ this . changesets = this . _changesets ;
269+
262270 this . _changes = observableValue < readonly ISessionFileChange [ ] > ( this , [ ] ) ;
263271 this . changes = this . _changes ;
264272 }
@@ -416,6 +424,7 @@ class CopilotCLISession extends Disposable implements ICopilotChatSession {
416424 this . _title . set ( session . title . get ( ) , undefined ) ;
417425 this . _status . set ( session . status . get ( ) , undefined ) ;
418426 this . _updatedAt . set ( session . updatedAt . get ( ) , undefined ) ;
427+ this . _changesets . set ( session . changesets . get ( ) , undefined ) ;
419428 this . _changes . set ( session . changes . get ( ) , undefined ) ;
420429 this . _description . set ( session . description . get ( ) , undefined ) ;
421430 }
@@ -463,6 +472,7 @@ export class RemoteNewSession extends Disposable implements ICopilotChatSession
463472 private readonly _workspaceData = observableValue < ISessionWorkspace | undefined > ( this , undefined ) ;
464473 readonly workspace : IObservable < ISessionWorkspace | undefined > = this . _workspaceData ;
465474
475+ readonly changesets : IObservable < readonly ISessionChangeset [ ] > = observableValue < readonly ISessionChangeset [ ] > ( this , [ ] ) ;
466476 readonly changes : IObservable < readonly ISessionFileChange [ ] > = observableValue < readonly ISessionFileChange [ ] > ( this , [ ] ) ;
467477
468478 private readonly _modelIdObservable = observableValue < string | undefined > ( this , undefined ) ;
@@ -705,6 +715,7 @@ class ClaudeCodeNewSession extends Disposable implements ICopilotChatSession {
705715 private readonly _workspaceData = observableValue < ISessionWorkspace | undefined > ( this , undefined ) ;
706716 readonly workspace : IObservable < ISessionWorkspace | undefined > = this . _workspaceData ;
707717
718+ readonly changesets : IObservable < readonly ISessionChangeset [ ] > = observableValue < readonly ISessionChangeset [ ] > ( this , [ ] ) ;
708719 readonly changes : IObservable < readonly ISessionFileChange [ ] > = observableValue < readonly ISessionFileChange [ ] > ( this , [ ] ) ;
709720
710721 private readonly _modelIdObservable = observableValue < string | undefined > ( this , undefined ) ;
@@ -844,6 +855,9 @@ class AgentSessionAdapter implements ICopilotChatSession {
844855 private readonly _status : ReturnType < typeof observableValue < SessionStatus > > ;
845856 readonly status : IObservable < SessionStatus > ;
846857
858+ private readonly _changesets : ReturnType < typeof observableValue < readonly ISessionChangeset [ ] > > ;
859+ readonly changesets : IObservable < readonly ISessionChangeset [ ] > ;
860+
847861 private readonly _changes : ReturnType < typeof observableValue < readonly ISessionFileChange [ ] > > ;
848862 readonly changes : IObservable < readonly ISessionFileChange [ ] > ;
849863
@@ -896,6 +910,9 @@ class AgentSessionAdapter implements ICopilotChatSession {
896910 this . _status = observableValue ( this , toSessionStatus ( session . status ) ) ;
897911 this . status = this . _status ;
898912
913+ this . _changesets = observableValue < readonly ISessionChangeset [ ] > ( this , this . _extractChangesets ( session ) ) ;
914+ this . changesets = this . _changesets ;
915+
899916 this . _changes = observableValue < readonly ISessionFileChange [ ] > ( this , this . _extractChanges ( session ) ) ;
900917 this . changes = this . _changes ;
901918
@@ -1094,6 +1111,10 @@ class AgentSessionAdapter implements ICopilotChatSession {
10941111 return undefined ;
10951112 }
10961113
1114+ private _extractChangesets ( session : IAgentSession ) : readonly ISessionChangeset [ ] {
1115+ return [ ] ;
1116+ }
1117+
10971118 private _extractChanges ( session : IAgentSession ) : readonly ISessionFileChange [ ] {
10981119 if ( ! session . changes ) {
10991120 return [ ] ;
@@ -2593,6 +2614,7 @@ export class CopilotChatSessionsProvider extends Disposable implements ISessions
25932614 title : primaryChat . title ,
25942615 updatedAt : chatsObs . map ( ( chats , reader ) => this . _latestDate ( chats , c => c . updatedAt . read ( reader ) ) ! ) ,
25952616 status : chatsObs . map ( ( chats , reader ) => this . _aggregateStatus ( chats , reader ) ) ,
2617+ changesets : primaryChat . changesets ,
25962618 changes : primaryChat . changes ,
25972619 modelId : primaryChat . modelId ,
25982620 mode : primaryChat . mode ,
@@ -2623,6 +2645,7 @@ export class CopilotChatSessionsProvider extends Disposable implements ISessions
26232645 title : chat . title ,
26242646 updatedAt : chat . updatedAt ,
26252647 status : chat . status ,
2648+ changesets : chat . changesets ,
26262649 changes : chat . changes ,
26272650 modelId : chat . modelId ,
26282651 mode : chat . mode ,
@@ -2645,6 +2668,7 @@ export class CopilotChatSessionsProvider extends Disposable implements ISessions
26452668 title : chat . title ,
26462669 updatedAt : chat . updatedAt ,
26472670 status : chat . status ,
2671+ changesets : chat . changesets ,
26482672 changes : chat . changes ,
26492673 modelId : chat . modelId ,
26502674 mode : chat . mode ,
0 commit comments