@@ -37,6 +37,7 @@ export class ChatSession {
3737 * _showDiffOnFileWrite = Controls whether to show diff view (true) or file context view (false) to the user
3838 * _context = Additional context to be passed to the LLM for generating the response
3939 * _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.
4041 */
4142 private _toolUseWithError : ToolUseWithError | undefined
4243 private _showDiffOnFileWrite : boolean = false
@@ -187,7 +188,7 @@ export class ChatSession {
187188 /**
188189 * Adds a file operation for a specific message
189190 * @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')
191192 * @param filePaths Array of DocumentReference involved in the operation
192193 */
193194 public addMessageOperation ( messageId : string , type : OperationType , filePaths : DocumentReference [ ] ) {
@@ -220,19 +221,4 @@ export class ChatSession {
220221 public getOperationTypeByMessageId ( messageId : string ) : OperationType | undefined {
221222 return this . _messageOperations . get ( messageId ) ?. type
222223 }
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- }
238224}
0 commit comments