Skip to content

Conversation

@Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented May 15, 2025

Problem

When manually invoking inline suggestions, it is possible for the backend to still not reply with results. Since the user took an action to invoke this, we should let them know when it fails.

Solution

  • add a message with same timeout as original implementation.

Testing and Verification

  • added unit test.
  • E2E flow demo (notice it doesn't trigger on automatic failures, but does on manual invoke failures):
noSuggestionsDemo.mov

  • 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.

@github-actions
Copy link

  • 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.

}

if (!session || !items.length || !editor) {
getLogger().debug(
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 log message can help us determine if results not showing are due to vscode quirks or backend issues.

@Hweinstock Hweinstock marked this pull request as ready for review May 15, 2025 14:32
@Hweinstock Hweinstock requested review from a team as code owners May 15, 2025 14:32
mockToken
)
// Wait up to a second for message to appear since there is potential race condition.
await waitUntil(async () => messageShown, { timeout: 1000, interval: 100 })
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of waiting I think you might be able to do something like this:

const p = new Promise((resolve) => {
     getTestWindow().onDidShowMessage((e) => {
         assert.strictEqual(e.message, noInlineSuggestionsMsg)
         resolve()
     })
})

and then

await p

here

@Hweinstock Hweinstock merged commit b5540e2 into aws:feature/flare-inline May 15, 2025
22 checks passed
@Hweinstock Hweinstock deleted the feat/noSuggestionsMessage branch May 15, 2025 16:17
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.

2 participants