Skip to content

fix: add requestId to chat for QModelResponse errors #1284

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 1 commit into from
May 7, 2025

Conversation

tsmithsz
Copy link
Contributor

@tsmithsz tsmithsz commented May 7, 2025

Problem

We do not currently send the requestId to the chat window for errors thrown during sending the request. We log them but do not make them easily accessible for users to fetch. It was requested that we show this in the chat window

Solution

  • Add requestId to chat window for QModelResponse errors

Testing

Screenshot 2025-05-07 at 12 19 03 PM

License

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

@tsmithsz tsmithsz requested a review from a team as a code owner May 7, 2025 19:05
@tsmithsz tsmithsz merged commit cfea9fa into aws:main May 7, 2025
6 checks passed
yueny2020 pushed a commit to yueny2020/language-servers that referenced this pull request May 8, 2025
bywang56 pushed a commit that referenced this pull request May 13, 2025
* fix: update listDirectory tool to output in tree-like format to reduce toolSize (#1260)

* fix: clear history for `inputTooLong` errors (#1268)

* fix: errors/cancellation not resetting undoAll state (#1273)

* fix: errors/cancellation not resetting undoAll state

* test: add unit tests

* test: update test

* style: revert formatting change

* feat: adding a check before invoking workspace context (#1227)

Co-authored-by: Supraja Venkatesh <[email protected]>

* fix: improve data synchronization of server side workspace context (#1278)

* fix: improve data synchronization of server side workspace context

* fix: adding catch to snapshotWorkspace call

---------

Co-authored-by: Weitao Wang <[email protected]>
Co-authored-by: Paras <[email protected]>

* chore: update netTransform unsupportedViewComponents

* chore(release): release packages from branch main

* fix: update versions manually (release-please bug)

* fix: use the correct command name for testing bundles (#1280)

* fix: use the correct command name for testing bundles

* chore: change return type to pipe to see if more logs can be available

---------

Co-authored-by: Paras <[email protected]>

* fix: regex should match workspace text in bold style and startLine can be 0 (#1272)

* fix: regex should match workspace text in bold style and startLine can be 0

* fix: remove unintended debug lines

* fix: abandon requests with invalid toolResults (#1274)

* fix: prevent timeout messages from displaying (#1282)

* fix: set streamingClient timeout config (#1283)

* fix: filter out .git folder from listDirectory (#1286)

* fix: add requestId to chat for QModelResponse errors (#1284)

* fix: add more common ignore patterns for listDirectory (#1287)

* fix: wrap load chats on ready in try-catch (#1289)

Problem
Currently when the chat loads up a UI ready event is sent to the lsp, to load up previous chats and start indexing. If loading of previous chats fail, the LSP process crashes. This is particularly evident when openTab event has not been handled by the client.
An error in that flow should not crash the LSP process or block the rest of the indexing from continuing.

Solution
This change surrounds the load chat logic within a try catch of its own to allow the rest of the indexing logic to proceed and not crash the server process

* fix: stop chat response first when close tab (#1292)

* fix: undo buttom not dimmed the card (#1276)

* fix: undo buttom not dimmed the card

* fix: fix more regression case for reject

* fix: permission check ux changes (#1290)

* fix: permission ux

* fix: minor edits

* fix: address bugs impacting indexing disabled functionality (#1293)

* fix(amazonq): add codewhispererCustomizationArn to codewhisperer_perceivedLatency (#1285)

## Problem
events between vscode and flare are not aligned

## Solution
add codewhispererCustomizationArn

* fix: show tooltip for warning message and remove the warning text  (#1259)

* fix: add tooltip for warning message

* fix: fix the string

* fix: add enum

* fix: remove numbers

* fix: the icon for different category icon and reject button

* fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302)

* fix: add visibleName property to fix empty directory name when the directory ends with a slash

* fix: format

---------

Co-authored-by: Francesco Piccoli <[email protected]>

* chore: bump mynah-ui version (#1303)

Co-authored-by: Francesco Piccoli <[email protected]>

* chore(release): release packages from branch main (#1279)

* chore(release): release packages from branch main

* fix: update versions manually (release-please bug)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francesco Piccoli <[email protected]>

* feat: merge updates for inline completions (#1299)

* fix: stop buttom work expected (#1307)

* fix: allowing reading multiple files with fsRead, minor tool validation fix (#1297)

* fix: bug fix for exportResultsArchive to call with profileArn as parameter (#1300)

* fix: for exportResultsArchive to call with profileArn
---------

Co-authored-by: Pranav Firake <[email protected]>

* chore: refactor common customization logic to a function and update corresponding CONTRIBUTION.md (#1281)

Co-authored-by: Paras <[email protected]>

* fix: remove @ mention in placeholder q chat text if agentic mode not available (#1311)

* fix: remove @ mention in placeholder q chat text if agentic mode not available

* style: rename DEFAULT_TAB_DATA to getDefaultTabConfig

---------

Co-authored-by: Francesco Piccoli <[email protected]>

* chore: update netTransform unsupportedViewComponents  (#1306)

* chore: update netTransform unsupportedViewComponents

* chore: update netTransform unsupportedViewComponents

* feat: add userWrittenCodeTracker (#1308)

* feat: add userWrittenCodeTracker

* fix: add unit test

* fix: bug in skip edit for userWrittenCode (#1315)

---------

Co-authored-by: Jason Guo <[email protected]>
Co-authored-by: tsmithsz <[email protected]>
Co-authored-by: Tai Lai <[email protected]>
Co-authored-by: suprajaven <[email protected]>
Co-authored-by: Supraja Venkatesh <[email protected]>
Co-authored-by: Ivan <[email protected]>
Co-authored-by: Weitao Wang <[email protected]>
Co-authored-by: Paras <[email protected]>
Co-authored-by: Jiayu Wang <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ivan Mykhailovskyi <[email protected]>
Co-authored-by: pras0131 <[email protected]>
Co-authored-by: andrewyuq <[email protected]>
Co-authored-by: Shruti Sinha <[email protected]>
Co-authored-by: Na Yue <[email protected]>
Co-authored-by: Randall-Jiang <[email protected]>
Co-authored-by: Nicolas <[email protected]>
Co-authored-by: Josh Pinkney <[email protected]>
Co-authored-by: Francesco Piccoli <[email protected]>
Co-authored-by: Francesco Piccoli <[email protected]>
Co-authored-by: Zoe Lin <[email protected]>
Co-authored-by: Pranav Firake <[email protected]>
Co-authored-by: Pranav Firake <[email protected]>
Co-authored-by: JiayuW2 <[email protected]>
laileni-aws added a commit that referenced this pull request May 19, 2025
* fix: update listDirectory tool to output in tree-like format to reduce toolSize (#1260)

* fix: clear history for `inputTooLong` errors (#1268)

* fix: errors/cancellation not resetting undoAll state (#1273)

* fix: errors/cancellation not resetting undoAll state

* test: add unit tests

* test: update test

* style: revert formatting change

* feat: adding a check before invoking workspace context (#1227)

Co-authored-by: Supraja Venkatesh <[email protected]>

* fix: improve data synchronization of server side workspace context (#1278)

* fix: improve data synchronization of server side workspace context

* fix: adding catch to snapshotWorkspace call

---------

Co-authored-by: Weitao Wang <[email protected]>
Co-authored-by: Paras <[email protected]>

* chore: update netTransform unsupportedViewComponents

* chore(release): release packages from branch main

* fix: update versions manually (release-please bug)

* fix: use the correct command name for testing bundles (#1280)

* fix: use the correct command name for testing bundles

* chore: change return type to pipe to see if more logs can be available

---------

Co-authored-by: Paras <[email protected]>

* fix: regex should match workspace text in bold style and startLine can be 0 (#1272)

* fix: regex should match workspace text in bold style and startLine can be 0

* fix: remove unintended debug lines

* fix: abandon requests with invalid toolResults (#1274)

* fix: prevent timeout messages from displaying (#1282)

* fix: set streamingClient timeout config (#1283)

* fix: filter out .git folder from listDirectory (#1286)

* fix: add requestId to chat for QModelResponse errors (#1284)

* fix: add more common ignore patterns for listDirectory (#1287)

* fix: wrap load chats on ready in try-catch (#1289)

Problem
Currently when the chat loads up a UI ready event is sent to the lsp, to load up previous chats and start indexing. If loading of previous chats fail, the LSP process crashes. This is particularly evident when openTab event has not been handled by the client.
An error in that flow should not crash the LSP process or block the rest of the indexing from continuing.

Solution
This change surrounds the load chat logic within a try catch of its own to allow the rest of the indexing logic to proceed and not crash the server process

* fix: stop chat response first when close tab (#1292)

* fix: undo buttom not dimmed the card (#1276)

* fix: undo buttom not dimmed the card

* fix: fix more regression case for reject

* fix: permission check ux changes (#1290)

* fix: permission ux

* fix: minor edits

* fix: address bugs impacting indexing disabled functionality (#1293)

* fix(amazonq): add codewhispererCustomizationArn to codewhisperer_perceivedLatency (#1285)

## Problem
events between vscode and flare are not aligned

## Solution
add codewhispererCustomizationArn

* fix: show tooltip for warning message and remove the warning text  (#1259)

* fix: add tooltip for warning message

* fix: fix the string

* fix: add enum

* fix: remove numbers

* fix: the icon for different category icon and reject button

* fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302)

* fix: add visibleName property to fix empty directory name when the directory ends with a slash

* fix: format

---------

Co-authored-by: Francesco Piccoli <[email protected]>

* chore: bump mynah-ui version (#1303)

Co-authored-by: Francesco Piccoli <[email protected]>

* chore(release): release packages from branch main (#1279)

* chore(release): release packages from branch main

* fix: update versions manually (release-please bug)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francesco Piccoli <[email protected]>

* feat: merge updates for inline completions (#1299)

* fix: stop buttom work expected (#1307)

* fix: allowing reading multiple files with fsRead, minor tool validation fix (#1297)

* fix: bug fix for exportResultsArchive to call with profileArn as parameter (#1300)

* fix: for exportResultsArchive to call with profileArn
---------

Co-authored-by: Pranav Firake <[email protected]>

* chore: refactor common customization logic to a function and update corresponding CONTRIBUTION.md (#1281)

Co-authored-by: Paras <[email protected]>

* fix: remove @ mention in placeholder q chat text if agentic mode not available (#1311)

* fix: remove @ mention in placeholder q chat text if agentic mode not available

* style: rename DEFAULT_TAB_DATA to getDefaultTabConfig

---------

Co-authored-by: Francesco Piccoli <[email protected]>

* chore: update netTransform unsupportedViewComponents  (#1306)

* chore: update netTransform unsupportedViewComponents

* chore: update netTransform unsupportedViewComponents

* feat: add userWrittenCodeTracker (#1308)

* feat: add userWrittenCodeTracker

* fix: add unit test

* fix: bug in skip edit for userWrittenCode (#1315)

* fix: update ignore pattern of glob for sspc (#1319)

* chore: stub timeout (#1316)

* fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions (#1322)

* fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions

* fix: push banner message to initial tab after chat options are received

* fix: bump runtimes and fix broken test (#1323)

* chore: bump runtimes version

* fix: broken test after bumping runtimes

---------

Co-authored-by: Francesco Piccoli <[email protected]>

* feat(amazonq): telemetry for chat history and export (#1314)

* fix: update fileSearch toolSpec and implementation (#1320)

* fix: update fileSearch toolSpec and implementation

* fix: update unit test

* fix(amazonq): 500k max input limit in user input box. Align payload prompt with user typed prompt. (#1325)

* fix: truncate userInputMessage to first 500k characters (#1327)

* fix: truncate userInputMessage to 500k

* fix: duplicate suggestion in inline response (#1331)

* fix: welcome card shows everytime (#1332)

* chore: script to create local build (#1301)

* chore: script to create local build

* fix: refactor custom webpack config to allow .node files to be created inside build directory

add local-build script usage to package.json

add README for local-build

---------

Co-authored-by: Paras <[email protected]>

* chore(release): release packages from branch main (#1305)

* chore(release): release packages from branch main

* fix: update versions manually (release-please bug)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francesco Piccoli <[email protected]>

* chore: bump runtimes-types and chat-client-ui-types version to latest (#1333)

Co-authored-by: Francesco Piccoli <[email protected]>

* fix(amazonq): export q chat in windows not working due to invalid path (#1330)

* fix(amazonq): export chat in Windows not working due to invalid path

* chore: emit telemetry for inline chat result (#1131)

* feat: change to emit STE event for inline chat action

* chore: add support for emitting telemetry related to inlineChatResult

* fix: fix merge conflict

* chore: remove the unused imports from TelemetryService class

---------

Co-authored-by: Paras <[email protected]>

* refactor(amazonq): optimization: remove validation call for selected profile (#1329)

* refactor(amazonq): optimization: only call listAvailableProfile with region associated with the arn

* revert(amazonq): console.log

* refactor(amazonq): stop validating profile availability on configurationChanged

* fix(amazonq): fix typo

* fix(amazonq): test

* test(amazonq): amazonQTokenServiceManager.test.ts

* refactor(amazonq): revert unneeded changes

* refactor(amazonq): nit

* refactor(amazonq): more nit

* refactor(amazonq): fix test

* refactor(amazonq): fix test

* refactor(amazonq): nit

* refactor(amazonq): revert unneeded changes

* chore(release): release packages from branch main (#1334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: don't force commit-lint locally (#1337)

Problem:
Forcing commit-lint locally is very disruptive.

Solution:
Drop it.

* fix: add requestIds for each LLM call for amazonq_addMessage metric (#1338)

* fix: adding new telemetry metrics and addtional fields for existing metrics (#1341)

* fix: adding new telemetry metrics and addtional fields for existing metrics

* Minor edits

* fix: failing tests

* fix: adding agenticCodingMode to emitMessageResponseError metric

* chore: bumping language server runtime versions (#1344)

* feat: migrate inline completion telemetry to Flare (#1336)

* feat: migrate inline completion telemetry to Flare

* feat: migrate inline completion telemetry to Flare

* chore: bump the typescript-eslint group with 2 updates (#1255)

Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `@typescript-eslint/eslint-plugin` from 8.31.0 to 8.31.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.31.0 to 8.31.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.31.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: typescript-eslint
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.31.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: typescript-eslint
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: adding error handling for export tab (#1350)

Current export chat functionality doesn't properly handle user cancellation of the save dialog, leading to incorrect telemetry reporting and runs into errors.

Solution
Added proper handling of save dialog cancellation.
Enhanced error handling to differentiate between user cancellation and other failure cases.
Updated telemetry emission to accurately reflect the export operation outcome.

* fix: add robust validation logic to fixHistory (#1340)

* fix: Reduce perceived latency of fsWrite. Show fsWrite errors in the UX  (#1351)

* fix: reduce perceived latency

* fix: only do render on partial results for fsWrite (#1354)

* fix: re-categorize error status code (#1355)

* chore: revert "chore: bump the typescript-eslint group with 2 updates (#1255)" (#1357)

This reverts commit 140104a.

* fix: convert RTS improperly formed request error to 500 (#1356)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jason Guo <[email protected]>
Co-authored-by: tsmithsz <[email protected]>
Co-authored-by: Tai Lai <[email protected]>
Co-authored-by: suprajaven <[email protected]>
Co-authored-by: Supraja Venkatesh <[email protected]>
Co-authored-by: Ivan <[email protected]>
Co-authored-by: Weitao Wang <[email protected]>
Co-authored-by: Paras <[email protected]>
Co-authored-by: Jiayu Wang <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ivan Mykhailovskyi <[email protected]>
Co-authored-by: pras0131 <[email protected]>
Co-authored-by: andrewyuq <[email protected]>
Co-authored-by: Shruti Sinha <[email protected]>
Co-authored-by: Na Yue <[email protected]>
Co-authored-by: Randall-Jiang <[email protected]>
Co-authored-by: Nicolas <[email protected]>
Co-authored-by: Josh Pinkney <[email protected]>
Co-authored-by: Francesco Piccoli <[email protected]>
Co-authored-by: Francesco Piccoli <[email protected]>
Co-authored-by: Zoe Lin <[email protected]>
Co-authored-by: Pranav Firake <[email protected]>
Co-authored-by: Pranav Firake <[email protected]>
Co-authored-by: JiayuW2 <[email protected]>
Co-authored-by: wweitao <[email protected]>
Co-authored-by: Oksana Volodkevych <[email protected]>
Co-authored-by: Viktor Shcherba <[email protected]>
Co-authored-by: Avi Alpert <[email protected]>
Co-authored-by: Lei Gao <[email protected]>
Co-authored-by: Will Lo <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: chungjac <[email protected]>
Co-authored-by: yzhangok <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lokesh <[email protected]>
Co-authored-by: Natalia Durlik <[email protected]>
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.

4 participants