@@ -21,7 +21,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
21
21
import { ILogService } from 'vs/platform/log/common/log' ;
22
22
import { ChatAgentLocation , IChatAgentCommand , IChatAgentData , IChatAgentHistoryEntry , IChatAgentRequest , IChatAgentResult , IChatAgentService , reviveSerializedAgent } from 'vs/workbench/contrib/chat/common/chatAgents' ;
23
23
import { ChatRequestTextPart , IParsedChatRequest , getPromptText , reviveParsedChatRequest } from 'vs/workbench/contrib/chat/common/chatParserTypes' ;
24
- import { ChatAgentVoteDirection , IChatAgentMarkdownContentWithVulnerability , IChatCodeCitation , IChatCommandButton , IChatConfirmation , IChatContentInlineReference , IChatContentReference , IChatFollowup , IChatMarkdownContent , IChatProgress , IChatProgressMessage , IChatResponseProgressFileTreeData , IChatTask , IChatTextEdit , IChatTreeData , IChatUsedContext , IChatWarningMessage , isIUsedContext } from 'vs/workbench/contrib/chat/common/chatService' ;
24
+ import { ChatAgentVoteDirection , IChatAgentMarkdownContentWithVulnerability , IChatCodeCitation , IChatCommandButton , IChatConfirmation , IChatContentInlineReference , IChatContentReference , IChatFollowup , IChatLocationData , IChatMarkdownContent , IChatProgress , IChatProgressMessage , IChatResponseProgressFileTreeData , IChatTask , IChatTextEdit , IChatTreeData , IChatUsedContext , IChatWarningMessage , isIUsedContext } from 'vs/workbench/contrib/chat/common/chatService' ;
25
25
import { IChatRequestVariableValue } from 'vs/workbench/contrib/chat/common/chatVariables' ;
26
26
27
27
export interface IChatRequestVariableEntry {
@@ -52,6 +52,7 @@ export interface IChatRequestModel {
52
52
readonly message : IParsedChatRequest ;
53
53
readonly attempt : number ;
54
54
readonly variableData : IChatRequestVariableData ;
55
+ readonly locationData ?: IChatLocationData ;
55
56
readonly response ?: IChatResponseModel ;
56
57
}
57
58
@@ -144,11 +145,16 @@ export class ChatRequestModel implements IChatRequestModel {
144
145
this . _variableData = v ;
145
146
}
146
147
148
+ public get locationData ( ) : IChatLocationData | undefined {
149
+ return this . _locationData ;
150
+ }
151
+
147
152
constructor (
148
153
private _session : ChatModel ,
149
154
public readonly message : IParsedChatRequest ,
150
155
private _variableData : IChatRequestVariableData ,
151
- private _attempt : number = 0
156
+ private _attempt : number = 0 ,
157
+ private _locationData ?: IChatLocationData
152
158
) {
153
159
this . id = 'request_' + ChatRequestModel . nextId ++ ;
154
160
}
@@ -861,8 +867,8 @@ export class ChatModel extends Disposable implements IChatModel {
861
867
return this . _requests ;
862
868
}
863
869
864
- addRequest ( message : IParsedChatRequest , variableData : IChatRequestVariableData , attempt : number , chatAgent ?: IChatAgentData , slashCommand ?: IChatAgentCommand ) : ChatRequestModel {
865
- const request = new ChatRequestModel ( this , message , variableData , attempt ) ;
870
+ addRequest ( message : IParsedChatRequest , variableData : IChatRequestVariableData , attempt : number , chatAgent ?: IChatAgentData , slashCommand ?: IChatAgentCommand , locationData ?: IChatLocationData ) : ChatRequestModel {
871
+ const request = new ChatRequestModel ( this , message , variableData , attempt , locationData ) ;
866
872
request . response = new ChatResponseModel ( [ ] , this , chatAgent , slashCommand , request . id ) ;
867
873
868
874
this . _requests . push ( request ) ;
0 commit comments