Skip to content

Commit dcbb90f

Browse files
committed
Merge branch 'feature/agentic-chat' into agentic-loop-context
2 parents 7165245 + eed4803 commit dcbb90f

File tree

11 files changed

+259
-200
lines changed

11 files changed

+259
-200
lines changed

packages/core/src/amazonq/webview/ui/apps/cwChatConnector.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ export class Connector extends BaseConnector {
264264
tabID: tabId,
265265
})
266266

267-
if (!this.onChatAnswerUpdated || !['accept-code-diff', 'reject-code-diff'].includes(action.id)) {
267+
if (
268+
!this.onChatAnswerUpdated ||
269+
!['accept-code-diff', 'reject-code-diff', 'confirm-tool-use'].includes(action.id)
270+
) {
268271
return
269272
}
270273
const answer: ChatItem = {
@@ -297,6 +300,18 @@ export class Connector extends BaseConnector {
297300
},
298301
]
299302
break
303+
case 'confirm-tool-use':
304+
answer.buttons = [
305+
{
306+
keepCardAfterClick: true,
307+
text: 'Confirmed',
308+
id: 'confirmed-tool-use',
309+
status: 'success',
310+
position: 'outside',
311+
disabled: true,
312+
},
313+
]
314+
break
300315
default:
301316
break
302317
}

packages/core/src/codewhispererChat/clients/chat/v0/chat.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ export class ChatSession {
2020
private sessionId?: string
2121
/**
2222
* _readFiles = list of files read from the project to gather context before generating response.
23-
* _filePath = The path helps the system locate exactly where to make the necessary changes in the project structure
24-
* _tempFilePath = Used to show the code diff view in the editor including LLM changes.
2523
* _showDiffOnFileWrite = Controls whether to show diff view (true) or file context view (false) to the user
2624
* _context = Additional context to be passed to the LLM for generating the response
2725
*/
2826
private _readFiles: string[] = []
29-
private _filePath: string | undefined
30-
private _tempFilePath: string | undefined
3127
private _toolUse: ToolUse | undefined
3228
private _showDiffOnFileWrite: boolean = false
3329
private _context: PromptMessage['context']
@@ -72,24 +68,12 @@ export class ChatSession {
7268
public get readFiles(): string[] {
7369
return this._readFiles
7470
}
75-
public get filePath(): string | undefined {
76-
return this._filePath
77-
}
78-
public get tempFilePath(): string | undefined {
79-
return this._tempFilePath
80-
}
8171
public get showDiffOnFileWrite(): boolean {
8272
return this._showDiffOnFileWrite
8373
}
8474
public setShowDiffOnFileWrite(value: boolean) {
8575
this._showDiffOnFileWrite = value
8676
}
87-
public setFilePath(filePath: string | undefined) {
88-
this._filePath = filePath
89-
}
90-
public setTempFilePath(tempFilePath: string | undefined) {
91-
this._tempFilePath = tempFilePath
92-
}
9377
public addToReadFiles(filePath: string) {
9478
this._readFiles.push(filePath)
9579
}

0 commit comments

Comments
 (0)