You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/codewhispererChat/controllers/chat/controller.ts
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -744,6 +744,7 @@ export class ChatController {
744
744
consttoolResults: ToolResult[]=[]
745
745
746
746
letresponse=''
747
+
letshouldSkipHistory=false
747
748
if(toolUseError){
748
749
toolResults.push({
749
750
content: [{text: toolUseError.message}],
@@ -753,6 +754,7 @@ export class ChatController {
753
754
if(toolUseErrorinstanceofSyntaxError){
754
755
response=
755
756
"Your toolUse input isn't valid. Please check the syntax and make sure the input is complete. If the input is large, break it down into multiple tool uses with smaller input."
757
+
shouldSkipHistory=true
756
758
}
757
759
}else{
758
760
constresult=ToolUtils.tryFromToolUse(toolUse)
@@ -844,6 +846,7 @@ export class ChatController {
844
846
contextLengths: {
845
847
...defaultContextLengths,
846
848
},
849
+
skipHistoryRecord: shouldSkipHistory,
847
850
},
848
851
triggerID
849
852
)
@@ -1120,9 +1123,6 @@ export class ChatController {
this.logger.info(`Found ${allMessages.length} messages in conversation`)
377
336
378
337
// Drop empty assistant partial if it’s the last message
@@ -387,7 +346,14 @@ export class Database {
387
346
// If the last message is from the assistant and it contains tool uses, and a next user message is set without tool results, then the user message will have cancelled tool results.
388
347
this.handleToolUses(allMessages,newUserMessage)
389
348
390
-
activeConversation.messages=allMessages
349
+
tabData.conversations=[
350
+
{
351
+
conversationId: conversationId,
352
+
clientType: ClientType.VSCode,
353
+
messages: allMessages,
354
+
},
355
+
]
356
+
tabData.updatedAt=newDate()
391
357
tabCollection.update(tabData)
392
358
this.logger.info(`Updated tab data in collection`)
0 commit comments