Skip to content

feat(chat-client): open use input prompt for agentic chat and new prompt should st… #1081

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

Merged
merged 3 commits into from
Apr 23, 2025

Conversation

ashishrp-aws
Copy link
Contributor

…op current response

Problem

  • User prompt is closed while agentic chat loop runs, the requirement is to keep it open and stop current running loop incase of new prompt.

Solution

  • promptInputDisabledState is set to false
  • Each new prompt triggers stop response, so we can cancel the current loop incase of new prompt.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashishrp-aws ashishrp-aws requested a review from a team as a code owner April 23, 2025 06:47
@ctlai95
Copy link
Contributor

ctlai95 commented Apr 23, 2025

tests are failing

Copy link
Contributor

@Hweinstock Hweinstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This will be a great UI improvement. After fixing the tests this looks good to me.

@@ -90,6 +90,7 @@ export const handleChatPrompt = (
_eventId?: string
) => {
let userPrompt = prompt.escapedPrompt
messager.onStopChatResponse(tabId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this affect regular chat too? maybe that's ok

Copy link
Contributor Author

@ashishrp-aws ashishrp-aws Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not affect user experience in anyway and any token cancellation is fine. but yeah added here, so the new user prompt kickstarts stop UI changes.

@ashishrp-aws ashishrp-aws merged commit ca1a01d into aws:main Apr 23, 2025
6 checks passed
opieter-aws pushed a commit to opieter-aws/language-servers that referenced this pull request Apr 23, 2025
…mpt should st… (aws#1081)

feat: open use input prompt for agentic chat and new prompt should stop current response
opieter-aws added a commit that referenced this pull request Apr 23, 2025
* fix: add result attribute when emitting telemetry event

* fix: remove comment

* fix: unit test

* fix: fix unit test

* fix: fix unit test

* feat(chat-client): open use input prompt for agentic chat and new prompt should st… (#1081)

feat: open use input prompt for agentic chat and new prompt should stop current response

* fix: ux polish for list directory tool messages. (#1075)

## Problem
- Existing UX shows multiple context list chatItem cards for list directory tool messages.
## Solution
- Use a `messageIdToUpdateListDir` state to store the messageId and update this for next list directory tool messages.
![image](https://github.com/user-attachments/assets/08fff204-0bbc-4467-b05b-7f90be062fc1)

## TODO:
- Need to combine both read and list directory tool messages into one context list.
- This code change is equivalent to this PR: aws/aws-toolkit-vscode#7006 in `feature/agentic-chat` branch.

* fix: execute command should show when no approval required & add more loading (#1091)

* fix: fix unit test

---------

Co-authored-by: invictus <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
Co-authored-by: Zoe Lin <[email protected]>
@ashishrp-aws ashishrp-aws deleted the input-prompt-agentic-chat branch May 5, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants