Skip to content

Conversation

@yueny2020
Copy link
Contributor

Problem

  • Add header for shell command

Solution

  • Screen shots of the new shell command card for un-destructive command

image

  • Screen shots of high risk command

image
image


  • 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.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yueny2020 yueny2020 requested a review from a team as a code owner April 4, 2025 02:02
@github-actions
Copy link

github-actions bot commented Apr 4, 2025

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@laileni-aws laileni-aws changed the title Add header for shell command feat(amazonq): Add header for shell command Apr 4, 2025
await this.handleCreatePrompt(message)
break
case 'accept-code-diff':
case 'confirm-tool-use':
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need confirm-tool-use ?
Can this be replaced with run-shell-command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can remove it in next pr.

break
case 'run-shell-command':
answer.header = {
body: 'shell',
Copy link
Contributor

@laileni-aws laileni-aws Apr 4, 2025

Choose a reason for hiding this comment

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

I think we can follow similar approach as this for storing body and icon values from messenger.ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure what you want me to follow?

Copy link
Contributor

Choose a reason for hiding this comment

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

If possible, Can we pass values of body and icon etc in this approach?

@yueny2020 yueny2020 changed the title feat(amazonq): Add header for shell command feat(chat): Add header for shell command Apr 4, 2025
@yueny2020 yueny2020 requested a review from laileni-aws April 4, 2025 02:10
status: 'info',
})
let shellCommandHeader = undefined
if (toolUse?.name === ToolType.ExecuteBash && message.startsWith('```shell')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this check ?

message.startsWith('```shell')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this is needed, as the execution log also has the ToolType.ExecuteBash.

@Hweinstock
Copy link
Contributor

from failing CI:

Invalid pull request title: `Add header for shell command`

* Problem: missing colon (:) char
* Expected format: `type(scope): subject...`
    * type: one of (build, ci, config, deps, docs, feat, fix, perf, refactor, revert, style, telemetry, test, types)
    * scope: lowercase, <30 chars
    * subject: must be <[10](https://github.com/aws/aws-toolkit-vscode/actions/runs/14256461851/job/39960002171?pr=6939#step:5:11)0 chars
    * documentation: https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title
* Hint: *close and re-open the PR* to re-trigger CI (after fixing the PR title).

@laileni-aws laileni-aws closed this Apr 4, 2025
@laileni-aws laileni-aws reopened this Apr 4, 2025
@github-actions
Copy link

github-actions bot commented Apr 4, 2025

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@yueny2020 yueny2020 closed this Apr 5, 2025
@yueny2020 yueny2020 force-pushed the feature/agentic-chat branch from 65791e5 to 69de65c Compare April 5, 2025 20:27
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.

3 participants