@aws/lsp-codewhisperer 0.0.70 → 0.0.72

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 (119) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/out/language-server/agenticChat/agenticChatController.js +27 -8
  3. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  4. package/out/language-server/agenticChat/constants/modelSelection.js +1 -1
  5. package/out/language-server/agenticChat/constants/modelSelection.js.map +1 -1
  6. package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +7 -1
  7. package/out/language-server/agenticChat/tools/chatDb/chatDb.js +64 -17
  8. package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -1
  9. package/out/language-server/agenticChat/tools/chatDb/util.d.ts +3 -2
  10. package/out/language-server/agenticChat/tools/chatDb/util.js.map +1 -1
  11. package/out/language-server/agenticChat/tools/executeBash.d.ts +4 -1
  12. package/out/language-server/agenticChat/tools/executeBash.js +61 -24
  13. package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
  14. package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js +279 -181
  15. package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js.map +1 -1
  16. package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +38 -17
  17. package/out/language-server/agenticChat/tools/mcp/mcpManager.js +263 -110
  18. package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -1
  19. package/out/language-server/agenticChat/tools/mcp/mcpTypes.d.ts +4 -1
  20. package/out/language-server/agenticChat/tools/mcp/mcpTypes.js.map +1 -1
  21. package/out/language-server/agenticChat/tools/mcp/mcpUtils.d.ts +1 -2
  22. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js +106 -28
  23. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js.map +1 -1
  24. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.d.ts +1 -0
  25. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.js +10 -15
  26. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReview.js.map +1 -1
  27. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.d.ts +2 -1
  28. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.js +3 -2
  29. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.js.map +1 -1
  30. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.d.ts +6 -0
  31. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.js +9 -0
  32. package/out/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.js.map +1 -1
  33. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindings.d.ts +89 -0
  34. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindings.js +138 -0
  35. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindings.js.map +1 -0
  36. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsConstants.d.ts +14 -0
  37. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsConstants.js +41 -0
  38. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsConstants.js.map +1 -0
  39. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsSchemas.d.ts +177 -0
  40. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsSchemas.js +93 -0
  41. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsSchemas.js.map +1 -0
  42. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsTypes.d.ts +27 -0
  43. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsTypes.js +12 -0
  44. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsTypes.js.map +1 -0
  45. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsUtils.d.ts +17 -0
  46. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsUtils.js +33 -0
  47. package/out/language-server/agenticChat/tools/qCodeAnalysis/displayFindingsUtils.js.map +1 -0
  48. package/out/language-server/agenticChat/tools/toolServer.js +22 -2
  49. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  50. package/out/language-server/agenticChat/utils/agenticChatControllerHelper.js +1 -1
  51. package/out/language-server/agenticChat/utils/agenticChatControllerHelper.js.map +1 -1
  52. package/out/language-server/agenticChat/utils/commandParser.d.ts +17 -0
  53. package/out/language-server/agenticChat/utils/commandParser.js +85 -0
  54. package/out/language-server/agenticChat/utils/commandParser.js.map +1 -0
  55. package/out/language-server/chat/chatController.js +77 -0
  56. package/out/language-server/chat/chatController.js.map +1 -1
  57. package/out/language-server/chat/chatSessionService.js +1 -1
  58. package/out/language-server/chat/chatSessionService.js.map +1 -1
  59. package/out/language-server/chat/constants.d.ts +1 -0
  60. package/out/language-server/chat/constants.js +2 -1
  61. package/out/language-server/chat/constants.js.map +1 -1
  62. package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +2 -0
  63. package/out/language-server/chat/telemetry/chatTelemetryController.js +12 -0
  64. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  65. package/out/language-server/chat/utils.js +6 -0
  66. package/out/language-server/chat/utils.js.map +1 -1
  67. package/out/language-server/configuration/qConfigurationServer.d.ts +1 -0
  68. package/out/language-server/configuration/qConfigurationServer.js.map +1 -1
  69. package/out/language-server/inline-completion/auto-trigger/autoTrigger.js +2 -1
  70. package/out/language-server/inline-completion/auto-trigger/autoTrigger.js.map +1 -1
  71. package/out/language-server/inline-completion/codeDiffTracker.d.ts +9 -0
  72. package/out/language-server/inline-completion/codeDiffTracker.js.map +1 -1
  73. package/out/language-server/inline-completion/codeWhispererServer.d.ts +0 -3
  74. package/out/language-server/inline-completion/codeWhispererServer.js +80 -201
  75. package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
  76. package/out/language-server/inline-completion/constants.d.ts +9 -0
  77. package/out/language-server/inline-completion/constants.js +10 -0
  78. package/out/language-server/inline-completion/constants.js.map +1 -0
  79. package/out/language-server/inline-completion/documentChangedListener.d.ts +8 -0
  80. package/out/language-server/inline-completion/documentChangedListener.js +20 -0
  81. package/out/language-server/inline-completion/documentChangedListener.js.map +1 -0
  82. package/out/language-server/inline-completion/editCompletionHandler.d.ts +49 -0
  83. package/out/language-server/inline-completion/editCompletionHandler.js +320 -0
  84. package/out/language-server/inline-completion/editCompletionHandler.js.map +1 -0
  85. package/out/language-server/inline-completion/session/sessionManager.d.ts +10 -2
  86. package/out/language-server/inline-completion/session/sessionManager.js +34 -7
  87. package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
  88. package/out/language-server/inline-completion/telemetry.js +12 -2
  89. package/out/language-server/inline-completion/telemetry.js.map +1 -1
  90. package/out/language-server/inline-completion/trigger.d.ts +17 -0
  91. package/out/language-server/inline-completion/trigger.js +42 -0
  92. package/out/language-server/inline-completion/trigger.js.map +1 -0
  93. package/out/language-server/workspaceContext/artifactManager.js +25 -6
  94. package/out/language-server/workspaceContext/artifactManager.js.map +1 -1
  95. package/out/shared/codeWhispererService.d.ts +36 -1
  96. package/out/shared/codeWhispererService.js +77 -0
  97. package/out/shared/codeWhispererService.js.map +1 -1
  98. package/out/shared/constants.d.ts +1 -0
  99. package/out/shared/constants.js +2 -1
  100. package/out/shared/constants.js.map +1 -1
  101. package/out/shared/languageDetection.js +0 -2
  102. package/out/shared/languageDetection.js.map +1 -1
  103. package/out/shared/models/constants.js +2 -1
  104. package/out/shared/models/constants.js.map +1 -1
  105. package/out/shared/supplementalContextUtil/crossFileContextUtil.d.ts +5 -6
  106. package/out/shared/supplementalContextUtil/crossFileContextUtil.js +114 -10
  107. package/out/shared/supplementalContextUtil/crossFileContextUtil.js.map +1 -1
  108. package/out/shared/supplementalContextUtil/supplementalContextUtil.d.ts +1 -2
  109. package/out/shared/supplementalContextUtil/supplementalContextUtil.js +2 -2
  110. package/out/shared/supplementalContextUtil/supplementalContextUtil.js.map +1 -1
  111. package/out/shared/telemetry/telemetryService.js +42 -18
  112. package/out/shared/telemetry/telemetryService.js.map +1 -1
  113. package/out/shared/telemetry/types.d.ts +16 -1
  114. package/out/shared/telemetry/types.js +2 -0
  115. package/out/shared/telemetry/types.js.map +1 -1
  116. package/out/shared/utils.d.ts +13 -0
  117. package/out/shared/utils.js +60 -4
  118. package/out/shared/utils.js.map +1 -1
  119. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.72](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.71...lsp-codewhisperer/v0.0.72) (2025-08-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * add support for SMUS Q CodeEditor client to send MD IDE origin ([#2032](https://github.com/aws/language-servers/issues/2032)) ([a8725b4](https://github.com/aws/language-servers/commit/a8725b4b7dcb7718864620721aa3633151e8877b))
9
+ * **amazonq:** enable sonnet 4 for fra region ([#2069](https://github.com/aws/language-servers/issues/2069)) ([3a4b8df](https://github.com/aws/language-servers/commit/3a4b8df981b2c3b0532360a11472169fffec7924))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **amazonq:** add distinctive identifier for cloud trail ([#2059](https://github.com/aws/language-servers/issues/2059)) ([18bbc2c](https://github.com/aws/language-servers/commit/18bbc2c54f5cc72e2624020fc17214c448926b0e))
15
+ * **amazonq:** fix to add disable/enable feature back to mcp servers ([#2052](https://github.com/aws/language-servers/issues/2052)) ([c03e017](https://github.com/aws/language-servers/commit/c03e017b9ccbbbb9c80a3c3afd5da38a50bd6cff))
16
+ * **amazonq:** make display findings tool run more often ([#2067](https://github.com/aws/language-servers/issues/2067)) ([479ccd0](https://github.com/aws/language-servers/commit/479ccd0a1b8b7e98684275c66274d284599c5933))
17
+ * outdated history when trimming happens, add missing metric for compaction ([#2047](https://github.com/aws/language-servers/issues/2047)) ([8390f66](https://github.com/aws/language-servers/commit/8390f6686c804dfbeff91018635df21e9dd89236))
18
+ * should keep reporting UTDE telemetry if there are still pending Edits suggestions ([#2051](https://github.com/aws/language-servers/issues/2051)) ([78c67b1](https://github.com/aws/language-servers/commit/78c67b1a29821f54006d160695e997870d17f3b5))
19
+
20
+ ## [0.0.71](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.70...lsp-codewhisperer/v0.0.71) (2025-08-04)
21
+
22
+
23
+ ### Features
24
+
25
+ * adding inline chat telemetry ([#2001](https://github.com/aws/language-servers/issues/2001)) ([8b1c9c7](https://github.com/aws/language-servers/commit/8b1c9c7c3859cdfbbd0abb059066a5c6fe2ffaf2))
26
+ * **amazonq:** implement displayFindings tool ([#2029](https://github.com/aws/language-servers/issues/2029)) ([da11663](https://github.com/aws/language-servers/commit/da1166340f3d13e1d7fd83b260359661443230ea))
27
+ * improve code review tool reliability and error handling ([#2033](https://github.com/aws/language-servers/issues/2033)) ([124244e](https://github.com/aws/language-servers/commit/124244ee7d97adf71a52c4fde7ddb908dbc0bd08))
28
+ * support http transport without authorization for MCP ([97e806c](https://github.com/aws/language-servers/commit/97e806ce7ea5e5be1fd60c4a4d9a54cf76c8f8cb))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * add bash command parsing for telemetry metrics ([#2039](https://github.com/aws/language-servers/issues/2039)) ([01d8112](https://github.com/aws/language-servers/commit/01d811225281a2e32f9cd6dab1b575aad8c0b4d6))
34
+ * adding acceptedCharacterCount to UserTriggerDecisionEvent ([#2014](https://github.com/aws/language-servers/issues/2014)) ([3f94486](https://github.com/aws/language-servers/commit/3f944865483a6913138335fe61eee70ae71d7c03))
35
+ * adjust bash command categories ([#2030](https://github.com/aws/language-servers/issues/2030)) ([25ed99f](https://github.com/aws/language-servers/commit/25ed99fcf0eeaa86b0a5e040e90d69becf625c71))
36
+ * adjust cross file context config ([#2011](https://github.com/aws/language-servers/issues/2011)) ([f7ade37](https://github.com/aws/language-servers/commit/f7ade3767e714d5178f24fd9cc90349c5f417979))
37
+ * **amazonq:** fix for mcp server permissions ([#2026](https://github.com/aws/language-servers/issues/2026)) ([89ae720](https://github.com/aws/language-servers/commit/89ae720dc036a90338d192aca801a858e8fa19f8))
38
+ * **amazonq:** fix for mcp server permissions to prefer workspace agent config files ([#2038](https://github.com/aws/language-servers/issues/2038)) ([d2ac614](https://github.com/aws/language-servers/commit/d2ac614f0f16faa8bf689ac9c8bff09d64fc3a3b))
39
+ * **amazonq:** fix processing empty unsupported workspace file ([#2017](https://github.com/aws/language-servers/issues/2017)) ([9e4d0af](https://github.com/aws/language-servers/commit/9e4d0af244b5edba73771b6cb4290d922ef83c43))
40
+ * correct the implementation of gathering open tabs in cross file context ([#2040](https://github.com/aws/language-servers/issues/2040)) ([b7b7a2b](https://github.com/aws/language-servers/commit/b7b7a2bd2020f50069ce89f6505cc2a36b1f3fa7))
41
+ * remove malicious characters from prompt input ([#2009](https://github.com/aws/language-servers/issues/2009)) ([bf8a1e6](https://github.com/aws/language-servers/commit/bf8a1e6136801532132f2bf82def4ca5bf49c82f))
42
+ * sanitize request input ([#2025](https://github.com/aws/language-servers/issues/2025)) ([7c0efd7](https://github.com/aws/language-servers/commit/7c0efd73d5e9a0e3f42d143a10c16782f6e35db8))
43
+ * skip image sanitization ([#2031](https://github.com/aws/language-servers/issues/2031)) ([f02fc23](https://github.com/aws/language-servers/commit/f02fc231136940bd644c426d2b222ae2cba779c4))
44
+ * sometimes Enter does not auto trigger ([#2005](https://github.com/aws/language-servers/issues/2005)) ([c9af035](https://github.com/aws/language-servers/commit/c9af0353a6c6f3b2ca4eead02f19e8ab5ddb8ef1))
45
+ * use fast glob streaming when collecting files ([#2003](https://github.com/aws/language-servers/issues/2003)) ([f7c0a0b](https://github.com/aws/language-servers/commit/f7c0a0b0ef9ce3ecd620acfef00e55745db3d71f))
46
+ * use new language server runtime ([#2023](https://github.com/aws/language-servers/issues/2023)) ([83ea1e4](https://github.com/aws/language-servers/commit/83ea1e42fe52990696eb9b878fa11e2c5331bec5))
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * The following workspace dependencies were updated
52
+ * dependencies
53
+ * @aws/lsp-core bumped from ^0.0.12 to ^0.0.13
54
+
3
55
  ## [0.0.70](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.69...lsp-codewhisperer/v0.0.70) (2025-07-29)
4
56
 
5
57
 
@@ -64,6 +64,7 @@ const imageVerification_1 = require("../../shared/imageVerification");
64
64
  const path_1 = require("@aws/lsp-core/out/util/path");
65
65
  const agenticChatControllerHelper_1 = require("./utils/agenticChatControllerHelper");
66
66
  const activeUserTracker_1 = require("../../shared/activeUserTracker");
67
+ const displayFindings_1 = require("./tools/qCodeAnalysis/displayFindings");
67
68
  class AgenticChatController {
68
69
  #features;
69
70
  #chatSessionManagementService;
@@ -148,7 +149,7 @@ class AgenticChatController {
148
149
  this.#additionalContextProvider = new additionalContextProvider_1.AdditionalContextProvider(features, this.#chatHistoryDb);
149
150
  this.#contextCommandsProvider = new contextCommandsProvider_1.ContextCommandsProvider(this.#features.logging, this.#features.chat, this.#features.workspace, this.#features.lsp);
150
151
  this.#mcpEventHandler = new mcpEventHandler_1.McpEventHandler(features, telemetryService);
151
- this.#origin = (0, utils_2.getOriginFromClientInfo)(this.#features.lsp.getClientInitializeParams()?.clientInfo?.name);
152
+ this.#origin = (0, utils_2.getOriginFromClientInfo)((0, utils_2.getClientName)(this.#features.lsp.getClientInitializeParams()));
152
153
  this.#activeUserTracker = activeUserTracker_1.ActiveUserTracker.getInstance(this.#features);
153
154
  }
154
155
  async onExecuteCommand(params, _token) {
@@ -463,7 +464,8 @@ class AgenticChatController {
463
464
  }
464
465
  async onChatPrompt(params, token) {
465
466
  // Phase 1: Initial Setup - This happens only once
466
- const maybeDefaultResponse = (0, utils_1.getDefaultChatResponse)(params.prompt.prompt);
467
+ params.prompt.prompt = (0, utils_2.sanitizeInput)(params.prompt.prompt || '');
468
+ const maybeDefaultResponse = !params.prompt.command && (0, utils_1.getDefaultChatResponse)(params.prompt.prompt);
467
469
  if (maybeDefaultResponse) {
468
470
  return maybeDefaultResponse;
469
471
  }
@@ -643,7 +645,7 @@ class AgenticChatController {
643
645
  if (currentMessage) {
644
646
  // Get and process the messages from history DB to maintain invariants for service requests
645
647
  try {
646
- const { messages: historyMessages, count: historyCharCount } = this.#chatHistoryDb.fixAndGetHistory(tabId, currentMessage, []);
648
+ const { history: historyMessages, historyCount: historyCharCount } = this.#chatHistoryDb.fixAndGetHistory(tabId, conversationIdentifier ?? '', currentMessage, []);
647
649
  messages = historyMessages;
648
650
  characterCount = historyCharCount;
649
651
  }
@@ -693,6 +695,7 @@ class AgenticChatController {
693
695
  this.#debug(`Compacting history with ${characterCount} characters`);
694
696
  this.#llmRequestStartTime = Date.now();
695
697
  // Phase 3: Request Execution
698
+ currentRequestInput = (0, utils_2.sanitizeRequestInput)(currentRequestInput);
696
699
  this.#debug(`Compaction Request: ${JSON.stringify(currentRequestInput, undefined, 2)}`);
697
700
  const response = await session.getChatResponse(currentRequestInput);
698
701
  if (response.$metadata.requestId) {
@@ -760,10 +763,9 @@ class AgenticChatController {
760
763
  if (currentMessage) {
761
764
  // Get and process the messages from history DB to maintain invariants for service requests
762
765
  try {
763
- const newUserInputCount = this.#chatHistoryDb.calculateNewMessageCharacterCount(currentMessage, pinnedContextMessages);
764
- const { messages: historyMessages, count: historyCharacterCount } = this.#chatHistoryDb.fixAndGetHistory(tabId, currentMessage, pinnedContextMessages, newUserInputCount);
766
+ const { history: historyMessages, historyCount: historyCharacterCount, currentCount: currentInputCount, } = this.#chatHistoryDb.fixAndGetHistory(tabId, conversationId, currentMessage, pinnedContextMessages);
765
767
  messages = historyMessages;
766
- currentRequestCount = newUserInputCount + historyCharacterCount;
768
+ currentRequestCount = currentInputCount + historyCharacterCount;
767
769
  this.#debug(`Request total character count: ${currentRequestCount}`);
768
770
  }
769
771
  catch (err) {
@@ -783,6 +785,7 @@ class AgenticChatController {
783
785
  await chatResultStream.writeResultBlock({ ...constants_1.loadingMessage, messageId: loadingMessageId });
784
786
  this.#llmRequestStartTime = Date.now();
785
787
  // Phase 3: Request Execution
788
+ currentRequestInput = (0, utils_2.sanitizeRequestInput)(currentRequestInput);
786
789
  // Note: these logs are very noisy, but contain information redacted on the backend.
787
790
  this.#debug(`generateAssistantResponse/SendMessage Request: ${JSON.stringify(currentRequestInput, this.#imageReplacer, 2)}`);
788
791
  const response = await session.getChatResponse(currentRequestInput);
@@ -924,6 +927,7 @@ class AgenticChatController {
924
927
  currentRequestInput = this.#updateRequestInputWithToolResults(currentRequestInput, toolResults, content);
925
928
  }
926
929
  if (this.#shouldCompact(currentRequestCount)) {
930
+ this.#telemetryController.emitCompactNudge(currentRequestCount, this.#features.runtime.serverInfo.version ?? '');
927
931
  const messageId = this.#getMessageIdForCompact((0, uuid_1.v4)());
928
932
  const confirmationResult = this.#processCompactConfirmation(messageId, currentRequestCount);
929
933
  const cachedButtonBlockId = await chatResultStream.writeResultBlock(confirmationResult);
@@ -1170,7 +1174,8 @@ class AgenticChatController {
1170
1174
  break;
1171
1175
  }
1172
1176
  case codeReview_1.CodeReview.toolName:
1173
- // no need to write tool message for code review
1177
+ case displayFindings_1.DisplayFindings.toolName:
1178
+ // no need to write tool message for CodeReview or DisplayFindings
1174
1179
  break;
1175
1180
  // — DEFAULT ⇒ Only MCP tools, but can also handle generic tool execution messages
1176
1181
  default:
@@ -1313,11 +1318,25 @@ class AgenticChatController {
1313
1318
  codeReviewResult.output.content?.findingsByFile) {
1314
1319
  await chatResultStream.writeResultBlock({
1315
1320
  type: 'tool',
1316
- messageId: toolUse.toolUseId + codeReviewConstants_1.FINDINGS_MESSAGE_SUFFIX,
1321
+ messageId: toolUse.toolUseId + codeReviewConstants_1.CODE_REVIEW_FINDINGS_MESSAGE_SUFFIX,
1317
1322
  body: codeReviewResult.output.content.findingsByFile,
1318
1323
  });
1319
1324
  }
1320
1325
  break;
1326
+ case displayFindings_1.DisplayFindings.toolName:
1327
+ // no need to write tool result for code review, this is handled by model via chat
1328
+ // Push result in message so that it is picked by IDE plugin to show in issues panel
1329
+ const displayFindingsResult = result;
1330
+ if (displayFindingsResult?.output?.kind === 'json' &&
1331
+ displayFindingsResult.output.success &&
1332
+ displayFindingsResult.output.content !== undefined) {
1333
+ await chatResultStream.writeResultBlock({
1334
+ type: 'tool',
1335
+ messageId: toolUse.toolUseId + codeReviewConstants_1.DISPLAY_FINDINGS_MESSAGE_SUFFIX,
1336
+ body: JSON.stringify(displayFindingsResult.output.content),
1337
+ });
1338
+ }
1339
+ break;
1321
1340
  // — DEFAULT ⇒ MCP tools
1322
1341
  default:
1323
1342
  await this.#handleMcpToolResult(toolUse, result, session, chatResultStream);