Skip to content

Commit 732aa63

Browse files
committed
Fix: Fixing the lag for file write due to sendInitialStream event
1 parent 72f4a0a commit 732aa63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/src/codewhispererChat/controllers/chat/messenger/messenger.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ export class Messenger {
259259
// TODO: Handle the error
260260
}
261261
} else if (cwChatEvent.toolUseEvent?.stop === undefined && toolUseInput !== '') {
262-
// This is for the case when writing tool is executed. The toolUseEvent is non stop but in toolUseInput is not empty. In this case we need show user the current spinner UI.
263-
this.sendInitalStream(tabID, triggerID, undefined)
262+
// TODO: Add a spinner component if required for fsWrite if not we can remove this if condition check
264263
}
265264

266265
if (
@@ -527,7 +526,7 @@ export class Messenger {
527526
this.dispatcher.sendChatMessage(
528527
new ChatMessage(
529528
{
530-
message: message,
529+
message: toolUse?.name === ToolType.FsWrite ? ' ' : message,
531530
messageType: 'answer-part',
532531
followUps: undefined,
533532
followUpsHeader: undefined,

packages/core/src/shared/clients/codewhispererChatClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export async function createCodeWhispererChatStreamingClient(): Promise<CodeWhis
2020
requestHandler: {
2121
// TODO: use a real number
2222
timeoutInMs: 600000, // 10 mins for now
23+
connectionTimeout: 600000, // 10 mins for now
2324
},
2425
retryStrategy: new ConfiguredRetryStrategy(1, (attempt: number) => 500 + attempt ** 10),
2526
})

0 commit comments

Comments
 (0)