-
Notifications
You must be signed in to change notification settings - Fork 640
fix(amazonq): Grouping read tool messages under contextList #6975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(amazonq): Grouping read tool messages under contextList #6975
Conversation
|
packages/core/src/codewhispererChat/controllers/chat/controller.ts
Outdated
Show resolved
Hide resolved
packages/core/src/codewhispererChat/controllers/chat/messenger/messenger.ts
Show resolved
Hide resolved
652ae34
to
234e0c5
Compare
packages/core/src/codewhispererChat/controllers/chat/messenger/messenger.ts
Outdated
Show resolved
Hide resolved
This doesn't group listDirectory messages yet, right? |
if (toolUse?.name === ToolType.FsRead) { | ||
this.dispatcher.sendToolMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be cleaner if you move this check inside sendToolMessage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using sendToolMessage
for FsRead and ListDirectory and sendChatMessage
for FsWrite and ExecuteBash tool output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but can we not always use sendToolMessage
and then inside that function have a condition to use onChatAnswerUpdated
or onChatAnswerReceived
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we have this conditional logic?
We can not do this in webview ?
I think not in connector.ts too So, messenger will be the best place to do this!
b41dca8
to
940e55a
Compare
/retryBuilds |
if (toolUse?.name === ToolType.FsRead || toolUse?.name === ToolType.ListDirectory) { | ||
return this.sendReadAndListDirToolMessage(toolUse, session, tabID, triggerID, messageIdToUpdate) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is still confusing, I think the condition should not happen in this function and always call processToolMessage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock, please follow up in a future PR
## Problem - Reverting PR: #6975 as this is causing regression in some cases. ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
- We show read tool message for each file read which is occupying the entire chat with these messages which is not super important. - Group all the read tool messaged under ContextList.  --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
Solution
feature/x
branches will not be squash-merged at release time.