@@ -37,6 +37,7 @@ export class ChatSession {
37
37
* _showDiffOnFileWrite = Controls whether to show diff view (true) or file context view (false) to the user
38
38
* _context = Additional context to be passed to the LLM for generating the response
39
39
* _messageIdToUpdate = messageId of a chat message to be updated, used for reducing consecutive tool messages
40
+ * _messageOperations = Maps messageId to filePaths which helps to open the read files and to open the code diff accordingly.
40
41
*/
41
42
private _toolUseWithError : ToolUseWithError | undefined
42
43
private _showDiffOnFileWrite : boolean = false
@@ -187,7 +188,7 @@ export class ChatSession {
187
188
/**
188
189
* Adds a file operation for a specific message
189
190
* @param messageId The ID of the message
190
- * @param type The type of operation ('read' or 'write')
191
+ * @param type The type of operation ('read' or 'listDir' or ' write')
191
192
* @param filePaths Array of DocumentReference involved in the operation
192
193
*/
193
194
public addMessageOperation ( messageId : string , type : OperationType , filePaths : DocumentReference [ ] ) {
@@ -220,19 +221,4 @@ export class ChatSession {
220
221
public getOperationTypeByMessageId ( messageId : string ) : OperationType | undefined {
221
222
return this . _messageOperations . get ( messageId ) ?. type
222
223
}
223
-
224
- /**
225
- * Clears the operation for a specific message
226
- * @param messageId The ID of the message
227
- */
228
- public clearMessageOperation ( messageId : string ) {
229
- this . _messageOperations . delete ( messageId )
230
- }
231
-
232
- /**
233
- * Clears all message operations
234
- */
235
- public clearAllMessageOperations ( ) {
236
- this . _messageOperations . clear ( )
237
- }
238
224
}
0 commit comments