Skip to content

Commit 47c2b6b

Browse files
committed
fix(chat): Add session context for the agentic loop, fix toolUseInput parsing bug
1 parent b1beba3 commit 47c2b6b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ export class ChatController {
774774
toolResults: toolResults,
775775
profile: AuthUtil.instance.regionProfileManager.activeRegionProfile,
776776
origin: Origin.IDE,
777-
context: [],
777+
context: session.context ?? [],
778778
relevantTextDocuments: [],
779779
additionalContents: [],
780780
documentReferences: [],

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,7 @@ export class Messenger {
257257
}
258258

259259
const cwChatEvent: cwChatResponseStream = chatEvent
260-
if (
261-
cwChatEvent.toolUseEvent?.input !== undefined &&
262-
cwChatEvent.toolUseEvent.input.length > 0 &&
263-
!cwChatEvent.toolUseEvent.stop
264-
) {
260+
if (cwChatEvent.toolUseEvent?.input !== undefined && cwChatEvent.toolUseEvent.input.length > 0) {
265261
toolUseInput += cwChatEvent.toolUseEvent.input
266262
}
267263

0 commit comments

Comments
 (0)