Skip to content

Conversation

@jpinkney-aws
Copy link
Contributor

Problem

  • We removed chat a while ago from the feature/amazonqLSP branch because we were just starting with inline suggestions

Solution

  • Now that we're moving to use chat we can re-add it
  • Implement explain, refactor, fix, optimize, sendToPrompt, openTab
  • Add a feature flag for enabling/disabling chat
    • note: amazonqLSP and amazonqChatLSP must be enabled in order for chat support to work
  • extended the baseinstaller so that individual lsps installers can provider their own resource paths

Notes


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

@jpinkney-aws jpinkney-aws requested a review from a team as a code owner March 13, 2025 14:16
@github-actions
Copy link

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

return result.payload as T
}

async function handlePartialResult<T extends ChatResult>(
Copy link
Contributor

Choose a reason for hiding this comment

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

What's a partial result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a docstring but its basically a partial chat response that needs to get rendered. Then handleCompleteResult is the final chat response that gets rendered

languageClient.info(`[VSCode Client] Received ${JSON.stringify(message)} from chat`)

switch (message.command) {
case COPY_TO_CLIPBOARD:
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems some cases only log. Can we handle them or TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added todos to unblock other teams but I'll look into them seperately


constructor(private readonly mynahUIPath: string) {}

public resolveWebviewView(webviewView: WebviewView, context: WebviewViewResolveContext, _token: CancellationToken) {
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 mean the chat webview resources come from the LSP?

Copy link
Contributor Author

@jpinkney-aws jpinkney-aws Mar 17, 2025

Choose a reason for hiding this comment

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

Sort of, both the client assets (mynah UI) and the lsp assets come in the same zip but different subfolders

Copy link
Contributor

@hayemaxi hayemaxi left a comment

Choose a reason for hiding this comment

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

LGTM after CI

@jpinkney-aws jpinkney-aws requested review from a team as code owners March 20, 2025 16:30
@jpinkney-aws
Copy link
Contributor Author

Turns out the problem was we can't import focusAmazonQPanel because it ends up pulling in a bunch of node specific dependencies into the web package. This is because currently inline starts on web + node, chat only starts on node. With flare everything starts on web + node

@jpinkney-aws jpinkney-aws merged commit 119d2f4 into aws:feature/amazonqLSP Mar 20, 2025
17 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.

2 participants