File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -598,6 +598,8 @@ export class Cline {
598598
599599 let modifiedOldUserContent : UserContent // either the last message if its user message, or the user message before the last (assistant) message
600600 let modifiedApiConversationHistory : Anthropic . Messages . MessageParam [ ] // need to remove the last user message to replace with new modified user message
601+ modifiedOldUserContent = [ ]
602+ modifiedApiConversationHistory = [ ]
601603 if ( existingApiConversationHistory . length > 0 ) {
602604 const lastMessage = existingApiConversationHistory [ existingApiConversationHistory . length - 1 ]
603605
@@ -667,7 +669,7 @@ export class Cline {
667669 throw new Error ( "Unexpected: Last message is not a user or assistant message" )
668670 }
669671 } else {
670- throw new Error ( "Unexpected: No existing API conversation history" )
672+ console . debug ( Error ( "Unexpected: No existing API conversation history" ) )
671673 }
672674
673675 let newUserContent : UserContent = [ ...modifiedOldUserContent ]
You can’t perform that action at this time.
0 commit comments