@aws/lsp-codewhisperer 0.0.79 → 0.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/out/language-server/agenticChat/agenticChatController.js +57 -2
  3. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  4. package/out/language-server/agenticChat/tools/mcp/agentPermissionManager.d.ts +60 -0
  5. package/out/language-server/agenticChat/tools/mcp/agentPermissionManager.js +190 -0
  6. package/out/language-server/agenticChat/tools/mcp/agentPermissionManager.js.map +1 -0
  7. package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +1 -0
  8. package/out/language-server/agenticChat/tools/mcp/mcpManager.js +9 -120
  9. package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -1
  10. package/out/language-server/agenticChat/tools/workspaceContext/semanticSearch.d.ts +40 -0
  11. package/out/language-server/agenticChat/tools/workspaceContext/semanticSearch.js +106 -0
  12. package/out/language-server/agenticChat/tools/workspaceContext/semanticSearch.js.map +1 -0
  13. package/out/language-server/netTransform/artifactManager.d.ts +1 -0
  14. package/out/language-server/netTransform/artifactManager.js +63 -10
  15. package/out/language-server/netTransform/artifactManager.js.map +1 -1
  16. package/out/language-server/workspaceContext/util.d.ts +4 -0
  17. package/out/language-server/workspaceContext/util.js +8 -1
  18. package/out/language-server/workspaceContext/util.js.map +1 -1
  19. package/out/language-server/workspaceContext/workspaceContextServer.js +19 -18
  20. package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
  21. package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +8 -2
  22. package/out/language-server/workspaceContext/workspaceFolderManager.js +35 -3
  23. package/out/language-server/workspaceContext/workspaceFolderManager.js.map +1 -1
  24. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js +7 -5
  25. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js.map +1 -1
  26. package/out/shared/amazonQServiceManager/qDeveloperProfiles.d.ts +1 -2
  27. package/out/shared/amazonQServiceManager/qDeveloperProfiles.js.map +1 -1
  28. package/out/shared/codeWhispererService.js +3 -0
  29. package/out/shared/codeWhispererService.js.map +1 -1
  30. package/out/shared/streamingClientService.js +9 -0
  31. package/out/shared/streamingClientService.js.map +1 -1
  32. package/out/shared/testUtils.d.ts +1 -1
  33. package/out/shared/testUtils.js.map +1 -1
  34. package/out/shared/utils.d.ts +1 -2
  35. package/out/shared/utils.js +1 -3
  36. package/out/shared/utils.js.map +1 -1
  37. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.80](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.79...lsp-codewhisperer/v0.0.80) (2025-09-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * **amazonq:** semantic search tool integration ([#2283](https://github.com/aws/language-servers/issues/2283)) ([8eb3c34](https://github.com/aws/language-servers/commit/8eb3c340534f3c66fd9082a83b31e84a4d9348bb))
9
+ * **amazonq:** support for wildcard permissions from agent config ([#2249](https://github.com/aws/language-servers/issues/2249)) ([2f6e86b](https://github.com/aws/language-servers/commit/2f6e86b0a676674744b962b0e335543c6c39e9e1))
10
+ * support sending requests with the 'external_idp' type ([#2247](https://github.com/aws/language-servers/issues/2247)) ([4d3b938](https://github.com/aws/language-servers/commit/4d3b938b7e961def0db2a51fba57e8fe73ea0a01))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * filetype filtering and consolidation of other filtering logic during artifact generation ([#2233](https://github.com/aws/language-servers/issues/2233)) ([a3e66f2](https://github.com/aws/language-servers/commit/a3e66f2d414060adde90cc7312f07c6359ae3246))
16
+
3
17
  ## [0.0.79](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.78...lsp-codewhisperer/v0.0.79) (2025-09-10)
4
18
 
5
19
 
@@ -67,6 +67,7 @@ const displayFindings_1 = require("./tools/qCodeAnalysis/displayFindings");
67
67
  const constants_3 = require("../../shared/constants");
68
68
  const IdleWorkspaceManager_1 = require("../workspaceContext/IdleWorkspaceManager");
69
69
  const escapeHTML = require("escape-html");
70
+ const semanticSearch_1 = require("./tools/workspaceContext/semanticSearch");
70
71
  class AgenticChatController {
71
72
  #features;
72
73
  #chatSessionManagementService;
@@ -1274,7 +1275,9 @@ class AgenticChatController {
1274
1275
  }
1275
1276
  case codeReview_1.CodeReview.toolName:
1276
1277
  case displayFindings_1.DisplayFindings.toolName:
1277
- // no need to write tool message for CodeReview or DisplayFindings
1278
+ // no need to write tool message for CodeReview or DisplayFindings
1279
+ case semanticSearch_1.SemanticSearch.toolName:
1280
+ // For internal A/B we don't need tool message
1278
1281
  break;
1279
1282
  // — DEFAULT ⇒ Only MCP tools, but can also handle generic tool execution messages
1280
1283
  default:
@@ -1446,6 +1449,9 @@ class AgenticChatController {
1446
1449
  });
1447
1450
  }
1448
1451
  break;
1452
+ case semanticSearch_1.SemanticSearch.toolName:
1453
+ await this.#handleSemanticSearchToolResult(toolUse, result, session, chatResultStream);
1454
+ break;
1449
1455
  // — DEFAULT ⇒ MCP tools
1450
1456
  default:
1451
1457
  await this.#handleMcpToolResult(toolUse, result, session, chatResultStream);
@@ -3542,6 +3548,55 @@ class AgenticChatController {
3542
3548
  body: (0, textFormatting_1.toolResultMessage)(toolUse, result),
3543
3549
  });
3544
3550
  }
3551
+ async #handleSemanticSearchToolResult(toolUse, result, session, chatResultStream) {
3552
+ // Early return if toolUseId is undefined
3553
+ if (!toolUse.toolUseId) {
3554
+ this.#log(`Cannot handle semantic search tool result: missing toolUseId`);
3555
+ return;
3556
+ }
3557
+ // Format the tool result and input as JSON strings
3558
+ const toolInput = JSON.stringify(toolUse.input, null, 2);
3559
+ const toolResultContent = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
3560
+ const toolResultCard = {
3561
+ type: 'tool',
3562
+ messageId: toolUse.toolUseId,
3563
+ summary: {
3564
+ content: {
3565
+ header: {
3566
+ icon: 'tools',
3567
+ body: `${semanticSearch_1.SemanticSearch.toolName}`,
3568
+ fileList: undefined,
3569
+ },
3570
+ },
3571
+ collapsedContent: [
3572
+ {
3573
+ header: {
3574
+ body: 'Parameters',
3575
+ },
3576
+ body: `\`\`\`json\n${toolInput}\n\`\`\``,
3577
+ },
3578
+ {
3579
+ header: {
3580
+ body: 'Result',
3581
+ },
3582
+ body: `\`\`\`json\n${toolResultContent}\n\`\`\``,
3583
+ },
3584
+ ],
3585
+ },
3586
+ };
3587
+ // Get the stored blockId for this tool use
3588
+ const cachedToolUse = session.toolUseLookup.get(toolUse.toolUseId);
3589
+ const cachedButtonBlockId = cachedToolUse?.cachedButtonBlockId;
3590
+ if (cachedButtonBlockId !== undefined) {
3591
+ // Update the existing card with the results
3592
+ await chatResultStream.overwriteResultBlock(toolResultCard, cachedButtonBlockId);
3593
+ }
3594
+ else {
3595
+ // Fallback to creating a new card
3596
+ this.#log(`Warning: No blockId found for tool use ${toolUse.toolUseId}, creating new card`);
3597
+ await chatResultStream.writeResultBlock(toolResultCard);
3598
+ }
3599
+ }
3545
3600
  scheduleABTestingFetching(userContext) {
3546
3601
  if (!userContext) {
3547
3602
  return;
@@ -3563,7 +3618,7 @@ class AgenticChatController {
3563
3618
  codeWhispererServiceToken
3564
3619
  .listFeatureEvaluations({ userContext })
3565
3620
  .then(result => {
3566
- const feature = result.featureEvaluations?.find(feature => feature.feature === 'MaestroWorkspaceContext');
3621
+ const feature = result.featureEvaluations?.find(feature => ['MaestroWorkspaceContext', 'SematicSearchTool'].includes(feature.feature));
3567
3622
  if (feature) {
3568
3623
  this.#abTestingAllocation = {
3569
3624
  experimentName: feature.feature,