@@ -28,7 +28,7 @@ import { ExtensionsRegistry } from '../../../services/extensions/common/extensio
2828import { ChatEditorInput } from '../browser/chatEditorInput.js' ;
2929import { IChatAgentAttachmentCapabilities , IChatAgentData , IChatAgentRequest , IChatAgentService } from '../common/chatAgents.js' ;
3030import { ChatContextKeys } from '../common/chatContextKeys.js' ;
31- import { ChatSession , ChatSessionStatus , IChatSessionContentProvider , IChatSessionItem , IChatSessionItemProvider , IChatSessionProviderOptionGroup , IChatSessionsExtensionPoint , IChatSessionsService } from '../common/chatSessionsService.js' ;
31+ import { ChatSession , ChatSessionStatus , IChatSessionContentProvider , IChatSessionItem , IChatSessionItemProvider , IChatSessionProviderOptionGroup , IChatSessionsExtensionPoint , IChatSessionsService , SessionOptionsChangedCallback } from '../common/chatSessionsService.js' ;
3232import { AGENT_SESSIONS_VIEWLET_ID , ChatAgentLocation , ChatModeKind } from '../common/constants.js' ;
3333import { CHAT_CATEGORY } from './actions/chatActions.js' ;
3434import { IChatEditorOptions } from './chatEditor.js' ;
@@ -822,18 +822,18 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ
822822 this . _sessions . delete ( sessionResource ) ;
823823 }
824824
825- public hasAnySessionOptions ( resource : URI ) : boolean {
826- const session = this . _sessions . get ( resource ) ;
825+ public hasAnySessionOptions ( sessionResource : URI ) : boolean {
826+ const session = this . _sessions . get ( sessionResource ) ;
827827 return ! ! session && ! ! session . options && Object . keys ( session . options ) . length > 0 ;
828828 }
829829
830- public getSessionOption ( chatSessionType : string , resource : URI , optionId : string ) : string | undefined {
831- const session = this . _sessions . get ( resource ) ;
830+ public getSessionOption ( sessionResource : URI , optionId : string ) : string | undefined {
831+ const session = this . _sessions . get ( sessionResource ) ;
832832 return session ?. getOption ( optionId ) ;
833833 }
834834
835- public setSessionOption ( chatSessionType : string , resource : URI , optionId : string , value : string ) : boolean {
836- const session = this . _sessions . get ( resource ) ;
835+ public setSessionOption ( sessionResource : URI , optionId : string , value : string ) : boolean {
836+ const session = this . _sessions . get ( sessionResource ) ;
837837 return ! ! session ?. setOption ( optionId , value ) ;
838838 }
839839
@@ -878,27 +878,27 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ
878878 return this . _sessionTypeOptions . get ( chatSessionType ) ;
879879 }
880880
881- private _optionsChangeCallback ?: ( chatSessionType : string , sessionResource : URI , updates : ReadonlyArray < { optionId : string ; value : string } > ) => Promise < void > ;
881+ private _optionsChangeCallback ?: SessionOptionsChangedCallback ;
882882
883883 /**
884884 * Set the callback for notifying extensions about option changes
885885 */
886- public setOptionsChangeCallback ( callback : ( chatSessionType : string , sessionResource : URI , updates : ReadonlyArray < { optionId : string ; value : string } > ) => Promise < void > ) : void {
886+ public setOptionsChangeCallback ( callback : SessionOptionsChangedCallback ) : void {
887887 this . _optionsChangeCallback = callback ;
888888 }
889889
890890 /**
891891 * Notify extension about option changes for a session
892892 */
893- public async notifySessionOptionsChange ( chatSessionType : string , sessionResource : URI , updates : ReadonlyArray < { optionId : string ; value : string } > ) : Promise < void > {
893+ public async notifySessionOptionsChange ( sessionResource : URI , updates : ReadonlyArray < { optionId : string ; value : string } > ) : Promise < void > {
894894 if ( ! updates . length ) {
895895 return ;
896896 }
897897 if ( this . _optionsChangeCallback ) {
898- await this . _optionsChangeCallback ( chatSessionType , sessionResource , updates ) ;
898+ await this . _optionsChangeCallback ( sessionResource , updates ) ;
899899 }
900900 for ( const u of updates ) {
901- this . setSessionOption ( chatSessionType , sessionResource , u . optionId , u . value ) ;
901+ this . setSessionOption ( sessionResource , u . optionId , u . value ) ;
902902 }
903903 }
904904
0 commit comments