Skip to content

Commit 413ce4b

Browse files
authored
feat(amazonq): add @code context for PHP, Ruby, Scala, Shell, Swift #6963
## Problem Users can't add `@Code` context from PHP, Ruby, Scala, Shell, and Swift files ## Solution Add support for adding `@Code` context for PHP, Ruby, Scala, Shell, and Swift
1 parent 0224426 commit 413ce4b

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Amazon Q Chat: Add @Code context for PHP, Ruby, Scala, Shell, and Swift projects"
4+
}

packages/core/src/amazonq/lsp/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface LspConfig {
1616

1717
export const defaultAmazonQWorkspaceLspConfig: LspConfig = {
1818
manifestUrl: 'https://aws-toolkit-language-servers.amazonaws.com/q-context/manifest.json',
19-
supportedVersions: '0.1.46',
19+
supportedVersions: '0.1.47',
2020
id: 'AmazonQ-Workspace', // used across IDEs for identifying global storage/local disk locations. Do not change.
2121
suppressPromptPrefix: 'amazonQWorkspace',
2222
path: undefined,

packages/core/src/amazonq/lsp/lspClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class LspClient {
188188
GetContextCommandPromptRequestType,
189189
await this.encrypt(request)
190190
)
191-
return resp
191+
return resp || []
192192
} catch (e) {
193193
getLogger().error(`LspClient: getContextCommandPrompt error: ${e}`)
194194
throw e

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,7 @@ export class ChatController {
577577
id: contextCommandItem.id,
578578
icon: 'folder' as MynahIconsType,
579579
})
580-
}
581-
// TODO: Remove the limit of 25k once the performance issue of mynahUI in webview is fixed.
582-
else if (
583-
contextCommandItem.symbol &&
584-
symbolsCmd.children &&
585-
symbolsCmd.children[0].commands.length < 25_000
586-
) {
580+
} else if (contextCommandItem.symbol && symbolsCmd.children) {
587581
symbolsCmd.children?.[0].commands.push({
588582
command: contextCommandItem.symbol.name,
589583
description: `${contextCommandItem.symbol.kind}, ${path.join(wsFolderName, contextCommandItem.relativePath)}, L${contextCommandItem.symbol.range.start.line}-${contextCommandItem.symbol.range.end.line}`,

0 commit comments

Comments
 (0)