Skip to content

Commit aae6d7f

Browse files
committed
test
1 parent 82f5d76 commit aae6d7f

File tree

18 files changed

+45
-8
lines changed

18 files changed

+45
-8
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
{
1313
"path": "packages/amazonq",
1414
},
15+
{
16+
"path": "../language-servers",
17+
},
1518
],
1619
"settings": {
1720
"typescript.tsdk": "node_modules/typescript/lib",

packages/.vscodeignore.packages

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
!package.json
2121
!package.nls.json
2222
!package.nls.*.json
23+
!**/*/clients.zip
24+
!**/*/servers.zip
2325

2426
!quickStart**
2527
!README.**

packages/amazonq/.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1414
"env": {
1515
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
16-
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
16+
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080",
1717
// Below allows for overrides used during development
18-
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19-
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
18+
"__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19+
"__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
2020
},
2121
"envFile": "${workspaceFolder}/.local.env",
2222
"outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
5-
"version": "1.70.0-SNAPSHOT",
5+
"version": "1.70.0-g82f5d76",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/lsp/activation.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,35 @@
44
*/
55

66
import vscode from 'vscode'
7+
import path from 'path'
78
import { startLanguageServer } from './client'
8-
import { AmazonQLspInstaller } from './lspInstaller'
9+
import { AmazonQResourcePaths } from './lspInstaller'
910
import { lspSetupStage, ToolkitError, messages } from 'aws-core-vscode/shared'
1011

1112
export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
1213
try {
1314
await lspSetupStage('all', async () => {
14-
const installResult = await new AmazonQLspInstaller().resolve()
15-
await lspSetupStage('launch', async () => await startLanguageServer(ctx, installResult.resourcePaths))
15+
// Use local servers instead of downloading
16+
const resourcesPath = path.join(ctx.extensionPath, 'resources')
17+
// Define paths to local resources
18+
const resourcePaths: AmazonQResourcePaths = {
19+
lsp: path.join(resourcesPath, 'servers/aws-lsp-codewhisperer.js'),
20+
node: path.join(resourcesPath, 'servers/node'),
21+
ripGrep: path.join(resourcesPath, 'servers/ripgrep/rg'),
22+
ui: path.join(resourcesPath, 'clients/amazonq-ui.js'),
23+
}
24+
// Log paths for debugging
25+
// eslint-disable-next-line aws-toolkits/no-console-log
26+
console.log('Amazon Q Resource Paths:', {
27+
extensionPath: ctx.extensionPath,
28+
resourcesPath: resourcesPath,
29+
lsp: resourcePaths.lsp,
30+
node: resourcePaths.node,
31+
ripGrep: resourcePaths.ripGrep,
32+
ui: resourcePaths.ui,
33+
})
34+
35+
await lspSetupStage('launch', async () => await startLanguageServer(ctx, resourcePaths))
1636
})
1737
} catch (err) {
1838
const e = err as ToolkitError

packages/amazonq/src/lsp/chat/webviewProvider.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
4444
) {
4545
const lspDir = Uri.file(LanguageServerResolver.defaultDir())
4646
const dist = Uri.joinPath(globals.context.extensionUri, 'dist')
47+
// Add the directory containing the UI file to resource roots
48+
const uiDir = Uri.file(path.dirname(this.mynahUIPath))
4749

48-
const resourcesRoots = [lspDir, dist]
50+
const resourcesRoots = [lspDir, dist, uiDir]
4951

5052
/**
5153
* if the mynah chat client is defined, then make sure to add it to the resource roots, otherwise
@@ -72,6 +74,14 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
7274
: webviewView.webview.asWebviewUri(Uri.joinPath(dist, source)).toString()
7375
this.uiPath = webviewView.webview.asWebviewUri(Uri.file(this.mynahUIPath)).toString()
7476

77+
// Log for debugging
78+
console.log('Amazon Q Webview paths:', {
79+
mynahUIPath: this.mynahUIPath,
80+
uiPath: this.uiPath,
81+
connectorAdapterPath: this.connectorAdapterPath,
82+
resourceRoots: resourcesRoots.map((r) => r.toString()),
83+
})
84+
7585
webviewView.webview.html = await this.getWebviewContent()
7686

7787
this.webviewView = webviewView

packages/core/src/testFixtures/workspaceFolder/java17-gradle/HelloWorldFunction/.gradle/7.3.3/gc.properties

Whitespace-only changes.

0 commit comments

Comments
 (0)