File tree Expand file tree Collapse file tree 2 files changed +1
-32
lines changed
packages/core/src/codewhispererChat
controllers/chat/messenger Expand file tree Collapse file tree 2 files changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ export class Messenger {
295295 }
296296 return true
297297 } ,
298- { timeout : 60000 , truthy : true }
298+ { timeout : 600000 , truthy : true }
299299 )
300300 . catch ( ( error : any ) => {
301301 let errorMessage = 'Error reading chat stream.'
Original file line number Diff line number Diff line change @@ -188,37 +188,6 @@ export class ChatHistoryManager {
188188 return newUserMessage
189189 }
190190 }
191- } else {
192- if (
193- newUserMessage . userInputMessage ?. userInputMessageContext ?. toolResults &&
194- newUserMessage . userInputMessage ?. userInputMessageContext ?. toolResults . length > 0
195- ) {
196- // correct toolUse section of lastAssistantResponse in case of empty toolUse for user message with tool Results.
197- const toolResults = newUserMessage . userInputMessage . userInputMessageContext . toolResults
198- const updatedToolUses = toolResults . map ( ( toolResult ) => ( {
199- toolUseId : toolResult . toolUseId ,
200- name : lastHistoryMessage . assistantResponseMessage . toolUses ?. find (
201- ( tu ) => tu . toolUseId === toolResult . toolUseId
202- ) ?. name ,
203- input : lastHistoryMessage . assistantResponseMessage . toolUses ?. find (
204- ( tu ) => tu . toolUseId === toolResult . toolUseId
205- ) ?. input ,
206- } ) )
207-
208- // Create a new assistant response message with updated toolUses
209- const updatedAssistantResponseMessage = {
210- ...lastHistoryMessage . assistantResponseMessage ,
211- toolUses : updatedToolUses ,
212- }
213-
214- // Create a new chat message with the updated assistant response
215- const updatedChatMessage : ChatMessage = {
216- assistantResponseMessage : updatedAssistantResponseMessage ,
217- }
218-
219- // Replace the last message in history
220- this . history [ this . history . length - 1 ] = updatedChatMessage
221- }
222191 }
223192 }
224193
You can’t perform that action at this time.
0 commit comments