Skip to content

feat(amazonq): initial UI for execute bash chat message #1041

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 2 commits into from
Apr 22, 2025
Merged

Conversation

zixlin7
Copy link
Contributor

@zixlin7 zixlin7 commented Apr 22, 2025

Problem

  • currently execute bash output json to chat message

Solution

  • have UI message for asking user confirmation and handle reject/ accept onButtonClick
  • write stderr/stdout to chat message
Screenshot 2025-04-21 at 10 42 25 PM

remaining work:

  • currently commented out blocking on user confirmation (this line) because intermediate messages are somehow not streamed to the chat window (the confirmation buttons are not there yet)
  • testing to verify once we block on user confirmation the buttons are functioning as expected
  • polish UI to match the mock

License

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

@zixlin7 zixlin7 requested a review from a team as a code owner April 22, 2025 05:48
success: true,
}
} else {
return { success: false, failureReason: 'not implemented' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Guessing this will be replaced soon

): Promise<ToolResult[]> {
const results: ToolResult[] = []

for (const toolUse of toolUses) {
if (!toolUse.name || !toolUse.toolUseId) continue

let needsConfirmation
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want this to be conditional on the tool type when we move towards granular permissions

// so the buttons are not in the window for the promise to be rejected/resolved
// this can to be brought back once intermediate messages are shown

// await deferred.promise
Copy link
Contributor

Choose a reason for hiding this comment

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

the client-side changes should be merged now. What other changes do we need before this can be enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this also needs improvement for intermediate chat result to show up

@zixlin7 zixlin7 merged commit b3ed518 into aws:main Apr 22, 2025
6 checks passed
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