Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/amazonq/src/lsp/chat/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ import {
ShowDocumentRequest,
contextCommandsNotificationType,
ContextCommandParams,
LINK_CLICK_NOTIFICATION_METHOD,
LinkClickParams,
INFO_LINK_CLICK_NOTIFICATION_METHOD,
} from '@aws/language-server-runtimes/protocol'
import { v4 as uuidv4 } from 'uuid'
import * as vscode from 'vscode'
import { Disposable, LanguageClient, Position, TextDocumentIdentifier } from 'vscode-languageclient'
import * as jose from 'jose'
import { AmazonQChatViewProvider } from './webviewProvider'
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
import { AmazonQPromptSettings, messages } from 'aws-core-vscode/shared'
import { AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared'
import { DefaultAmazonQAppInitContext, messageDispatcher } from 'aws-core-vscode/amazonq'

export function registerLanguageServerEventListener(languageClient: LanguageClient, provider: AmazonQChatViewProvider) {
Expand Down Expand Up @@ -172,6 +175,12 @@ export function registerMessageListeners(
}
break
}
case INFO_LINK_CLICK_NOTIFICATION_METHOD:
case LINK_CLICK_NOTIFICATION_METHOD: {
const linkParams = message.params as LinkClickParams
void openUrl(vscode.Uri.parse(linkParams.link))
break
}
case chatRequestType.method: {
const chatParams = { ...message.params } as ChatParams
const partialResultToken = uuidv4()
Expand Down
Loading