@aws/lsp-codewhisperer 0.0.39 → 0.0.41

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 (432) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/node_modules/@amzn/codewhisperer-streaming/README.md +56 -0
  3. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +2 -0
  4. package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +2 -0
  5. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +3 -0
  6. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +3 -0
  7. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +3 -0
  8. package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +10 -0
  9. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/package.json +2 -2
  10. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -2
  11. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -1
  12. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -2
  13. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -3
  14. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -7
  15. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -7
  16. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -7
  17. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -3
  18. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -3
  19. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -1
  20. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -1
  21. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -2
  22. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -1
  23. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -1
  24. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -1
  25. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -1
  26. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -1
  27. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -1
  28. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -1
  29. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -2
  30. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/package.json +5 -5
  31. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/LICENSE +201 -0
  32. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/README.md +115 -0
  33. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort-handler.js +1 -0
  34. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort.js +1 -0
  35. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +1 -0
  36. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +1 -0
  37. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +1 -0
  38. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +1 -0
  39. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +1 -0
  40. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/auth.js +1 -0
  41. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/index.js +1 -0
  42. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +1 -0
  43. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/checksum.js +1 -0
  44. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/client.js +1 -0
  45. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/command.js +1 -0
  46. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/config.js +1 -0
  47. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/index.js +1 -0
  48. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/manager.js +1 -0
  49. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/pool.js +1 -0
  50. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/crypto.js +1 -0
  51. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +1 -0
  52. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/encode.js +1 -0
  53. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoint.js +1 -0
  54. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +1 -0
  55. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +1 -0
  56. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +1 -0
  57. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +1 -0
  58. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/index.js +1 -0
  59. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +1 -0
  60. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/eventStream.js +1 -0
  61. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +1 -0
  62. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +1 -0
  63. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +1 -0
  64. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/index.js +1 -0
  65. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/retry.js +1 -0
  66. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +1 -0
  67. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/feature-ids.js +1 -0
  68. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +1 -0
  69. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http.js +1 -0
  70. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +1 -0
  71. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +1 -0
  72. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/identity.js +1 -0
  73. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/index.js +1 -0
  74. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +1 -0
  75. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/index.js +144 -0
  76. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/logger.js +1 -0
  77. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/middleware.js +1 -0
  78. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/pagination.js +1 -0
  79. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/profile.js +1 -0
  80. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/response.js +1 -0
  81. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/retry.js +1 -0
  82. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/schema.js +1 -0
  83. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/sentinels.js +1 -0
  84. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/traits.js +1 -0
  85. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/serde.js +1 -0
  86. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/shapes.js +1 -0
  87. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/signature.js +1 -0
  88. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/stream.js +1 -0
  89. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +1 -0
  90. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  91. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  92. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transfer.js +1 -0
  93. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +1 -0
  94. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +1 -0
  95. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/exact.js +1 -0
  96. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/mutable.js +1 -0
  97. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +1 -0
  98. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +1 -0
  99. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/uri.js +1 -0
  100. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/util.js +1 -0
  101. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/waiter.js +1 -0
  102. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
  103. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort.js +1 -0
  104. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
  105. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
  106. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
  107. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
  108. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
  109. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
  110. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/index.js +6 -0
  111. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
  112. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/checksum.js +1 -0
  113. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/client.js +1 -0
  114. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/command.js +1 -0
  115. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
  116. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
  117. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
  118. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
  119. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/crypto.js +1 -0
  120. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
  121. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/encode.js +1 -0
  122. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
  123. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
  124. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
  125. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
  126. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
  127. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
  128. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
  129. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
  130. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
  131. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
  132. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
  133. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/index.js +3 -0
  134. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
  135. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
  136. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
  137. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
  138. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http.js +5 -0
  139. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
  140. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
  141. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
  142. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/index.js +4 -0
  143. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
  144. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/index.js +40 -0
  145. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/logger.js +1 -0
  146. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/middleware.js +1 -0
  147. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/pagination.js +1 -0
  148. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/profile.js +6 -0
  149. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/response.js +1 -0
  150. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/retry.js +1 -0
  151. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
  152. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
  153. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
  154. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/serde.js +1 -0
  155. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/shapes.js +1 -0
  156. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/signature.js +1 -0
  157. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/stream.js +1 -0
  158. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
  159. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  160. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  161. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transfer.js +6 -0
  162. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
  163. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
  164. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
  165. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
  166. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
  167. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
  168. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/uri.js +1 -0
  169. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/util.js +1 -0
  170. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/waiter.js +1 -0
  171. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
  172. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort.d.ts +50 -0
  173. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
  174. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
  175. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
  176. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
  177. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
  178. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/auth.d.ts +57 -0
  179. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/index.d.ts +6 -0
  180. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +40 -0
  181. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
  182. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
  183. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/command.d.ts +25 -0
  184. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/config.d.ts +10 -0
  185. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
  186. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
  187. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
  188. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
  189. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +25 -0
  190. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
  191. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
  192. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
  193. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
  194. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
  195. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
  196. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
  197. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
  198. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
  199. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
  200. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +33 -0
  201. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
  202. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/index.d.ts +4 -0
  203. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
  204. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
  205. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
  206. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +121 -0
  207. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http.d.ts +112 -0
  208. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
  209. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
  210. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
  211. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
  212. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
  213. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/index.d.ts +40 -0
  214. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
  215. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/middleware.d.ts +534 -0
  216. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
  217. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
  218. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
  219. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/retry.d.ts +133 -0
  220. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/schema.d.ts +263 -0
  221. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
  222. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
  223. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
  224. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/shapes.d.ts +82 -0
  225. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/signature.d.ts +155 -0
  226. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
  227. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +32 -0
  228. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
  229. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
  230. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transfer.d.ts +41 -0
  231. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
  232. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +77 -0
  233. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
  234. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
  235. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
  236. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +34 -0
  237. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
  238. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +50 -0
  239. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
  240. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
  241. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
  242. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
  243. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
  244. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +57 -0
  245. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +6 -0
  246. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +40 -0
  247. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +63 -0
  248. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
  249. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +25 -0
  250. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +10 -0
  251. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
  252. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
  253. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
  254. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +60 -0
  255. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +41 -0
  256. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
  257. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
  258. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
  259. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
  260. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
  261. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
  262. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
  263. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
  264. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
  265. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
  266. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +33 -0
  267. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
  268. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +4 -0
  269. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
  270. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
  271. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
  272. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +121 -0
  273. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +112 -0
  274. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
  275. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
  276. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
  277. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
  278. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
  279. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +40 -0
  280. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
  281. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +534 -0
  282. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
  283. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
  284. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
  285. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +133 -0
  286. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +278 -0
  287. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
  288. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
  289. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
  290. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +82 -0
  291. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +155 -0
  292. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
  293. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +32 -0
  294. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
  295. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
  296. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +41 -0
  297. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
  298. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +81 -0
  299. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
  300. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
  301. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
  302. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +41 -0
  303. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
  304. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
  305. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
  306. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
  307. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
  308. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
  309. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/package.json +60 -0
  310. package/node_modules/@amzn/codewhisperer-streaming/package.json +1 -1
  311. package/out/client/sigv4/service.json +8 -0
  312. package/out/client/token/bearer-token-service.json +20 -0
  313. package/out/language-server/agenticChat/agenticChatController.d.ts +9 -3
  314. package/out/language-server/agenticChat/agenticChatController.js +379 -85
  315. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  316. package/out/language-server/agenticChat/agenticChatResultStream.d.ts +9 -0
  317. package/out/language-server/agenticChat/agenticChatResultStream.js +41 -1
  318. package/out/language-server/agenticChat/agenticChatResultStream.js.map +1 -1
  319. package/out/language-server/agenticChat/constants.d.ts +0 -1
  320. package/out/language-server/agenticChat/constants.js +1 -2
  321. package/out/language-server/agenticChat/constants.js.map +1 -1
  322. package/out/language-server/agenticChat/context/addtionalContextProvider.d.ts +2 -3
  323. package/out/language-server/agenticChat/context/addtionalContextProvider.js +3 -5
  324. package/out/language-server/agenticChat/context/addtionalContextProvider.js.map +1 -1
  325. package/out/language-server/agenticChat/context/agenticChatTriggerContext.d.ts +1 -0
  326. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js +15 -2
  327. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js.map +1 -1
  328. package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +1 -1
  329. package/out/language-server/agenticChat/context/contextCommandsProvider.js +8 -24
  330. package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -1
  331. package/out/language-server/agenticChat/errors.d.ts +2 -1
  332. package/out/language-server/agenticChat/errors.js +11 -1
  333. package/out/language-server/agenticChat/errors.js.map +1 -1
  334. package/out/language-server/agenticChat/tabBarController.d.ts +10 -1
  335. package/out/language-server/agenticChat/tabBarController.js +54 -27
  336. package/out/language-server/agenticChat/tabBarController.js.map +1 -1
  337. package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +8 -9
  338. package/out/language-server/agenticChat/tools/chatDb/chatDb.js +58 -124
  339. package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -1
  340. package/out/language-server/agenticChat/tools/codeSearch.js +1 -1
  341. package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -1
  342. package/out/language-server/agenticChat/tools/executeBash.d.ts +10 -2
  343. package/out/language-server/agenticChat/tools/executeBash.js +80 -21
  344. package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
  345. package/out/language-server/agenticChat/tools/fsRead.js +1 -1
  346. package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
  347. package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
  348. package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
  349. package/out/language-server/agenticChat/tools/{fileSearch.d.ts → fuzzySearch.d.ts} +17 -11
  350. package/out/language-server/agenticChat/tools/{fileSearch.js → fuzzySearch.js} +53 -55
  351. package/out/language-server/agenticChat/tools/fuzzySearch.js.map +1 -0
  352. package/out/language-server/agenticChat/tools/grepSearch.d.ts +74 -0
  353. package/out/language-server/agenticChat/tools/grepSearch.js +254 -0
  354. package/out/language-server/agenticChat/tools/grepSearch.js.map +1 -0
  355. package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
  356. package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
  357. package/out/language-server/agenticChat/tools/toolServer.js +14 -5
  358. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  359. package/out/language-server/agenticChat/tools/toolShared.d.ts +1 -1
  360. package/out/language-server/agenticChat/tools/toolShared.js +2 -2
  361. package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
  362. package/out/language-server/chat/chatController.d.ts +1 -1
  363. package/out/language-server/chat/chatController.js.map +1 -1
  364. package/out/language-server/chat/chatSessionService.d.ts +13 -0
  365. package/out/language-server/chat/chatSessionService.js +28 -4
  366. package/out/language-server/chat/chatSessionService.js.map +1 -1
  367. package/out/language-server/chat/contexts/triggerContext.js +1 -0
  368. package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
  369. package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -4
  370. package/out/language-server/chat/telemetry/chatTelemetryController.js +29 -5
  371. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  372. package/out/language-server/inline-completion/codePercentage.js +1 -0
  373. package/out/language-server/inline-completion/codePercentage.js.map +1 -1
  374. package/out/language-server/inline-completion/codeWhispererServer.d.ts +1 -0
  375. package/out/language-server/inline-completion/codeWhispererServer.js +55 -19
  376. package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
  377. package/out/language-server/inline-completion/session/sessionManager.d.ts +5 -1
  378. package/out/language-server/inline-completion/session/sessionManager.js +4 -0
  379. package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
  380. package/out/language-server/localProjectContext/localProjectContextServer.js +8 -8
  381. package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -1
  382. package/out/language-server/workspaceContext/artifactManager.d.ts +1 -1
  383. package/out/language-server/workspaceContext/artifactManager.js +55 -22
  384. package/out/language-server/workspaceContext/artifactManager.js.map +1 -1
  385. package/out/language-server/workspaceContext/client.d.ts +1 -2
  386. package/out/language-server/workspaceContext/client.js +8 -16
  387. package/out/language-server/workspaceContext/client.js.map +1 -1
  388. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.d.ts +2 -0
  389. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js +11 -1
  390. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js.map +1 -1
  391. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.d.ts +17 -0
  392. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js +75 -0
  393. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js.map +1 -0
  394. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js +9 -9
  395. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js.map +1 -1
  396. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js +9 -9
  397. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js.map +1 -1
  398. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.d.ts +7 -5
  399. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js +21 -15
  400. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js.map +1 -1
  401. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.d.ts +1 -1
  402. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js +4 -4
  403. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js.map +1 -1
  404. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js +38 -29
  405. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js.map +1 -1
  406. package/out/language-server/workspaceContext/javaManager.js +1 -1
  407. package/out/language-server/workspaceContext/javaManager.js.map +1 -1
  408. package/out/language-server/workspaceContext/util.d.ts +1 -0
  409. package/out/language-server/workspaceContext/util.js +12 -6
  410. package/out/language-server/workspaceContext/util.js.map +1 -1
  411. package/out/language-server/workspaceContext/workspaceContextServer.js +266 -236
  412. package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
  413. package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +21 -50
  414. package/out/language-server/workspaceContext/workspaceFolderManager.js +254 -496
  415. package/out/language-server/workspaceContext/workspaceFolderManager.js.map +1 -1
  416. package/out/shared/languageDetection.d.ts +1 -1
  417. package/out/shared/languageDetection.js +4 -0
  418. package/out/shared/languageDetection.js.map +1 -1
  419. package/out/shared/localProjectContextController.d.ts +5 -3
  420. package/out/shared/localProjectContextController.js +47 -21
  421. package/out/shared/localProjectContextController.js.map +1 -1
  422. package/out/shared/telemetry/telemetryService.d.ts +10 -1
  423. package/out/shared/telemetry/telemetryService.js +36 -7
  424. package/out/shared/telemetry/telemetryService.js.map +1 -1
  425. package/out/shared/telemetry/types.d.ts +39 -0
  426. package/out/shared/telemetry/types.js +1 -0
  427. package/out/shared/telemetry/types.js.map +1 -1
  428. package/package.json +8 -6
  429. package/out/language-server/agenticChat/tools/fileSearch.js.map +0 -1
  430. package/out/shared/initializeUtils.d.ts +0 -3
  431. package/out/shared/initializeUtils.js +0 -32
  432. package/out/shared/initializeUtils.js.map +0 -1
@@ -5,6 +5,7 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AgenticChatController = void 0;
8
+ const crypto = require("crypto");
8
9
  const path = require("path");
9
10
  const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
10
11
  const protocol_1 = require("@aws/language-server-runtimes/protocol");
@@ -37,7 +38,8 @@ const listDirectory_1 = require("./tools/listDirectory");
37
38
  const fsWrite_1 = require("./tools/fsWrite");
38
39
  const executeBash_1 = require("./tools/executeBash");
39
40
  const toolShared_1 = require("./tools/toolShared");
40
- const fileSearch_1 = require("./tools/fileSearch");
41
+ const grepSearch_1 = require("./tools/grepSearch");
42
+ const fuzzySearch_1 = require("./tools/fuzzySearch");
41
43
  const lsp_core_2 = require("@aws/lsp-core");
42
44
  const diff_1 = require("diff");
43
45
  const constants_2 = require("./constants");
@@ -59,6 +61,8 @@ class AgenticChatController {
59
61
  #contextCommandsProvider;
60
62
  #stoppedToolUses = new Set();
61
63
  #userWrittenCodeTracker;
64
+ #toolUseStartTimes = {};
65
+ #toolUseLatencies = [];
62
66
  /**
63
67
  * Determines the appropriate message ID for a tool use based on tool type and name
64
68
  * @param toolType The type of tool being used
@@ -79,7 +83,7 @@ class AgenticChatController {
79
83
  this.#serviceManager = serviceManager;
80
84
  this.#chatHistoryDb = new chatDb_1.ChatDatabase(features);
81
85
  this.#tabBarController = new tabBarController_1.TabBarController(features, this.#chatHistoryDb, telemetryService);
82
- this.#additionalContextProvider = new addtionalContextProvider_1.AdditionalContextProvider(features.workspace, features.lsp);
86
+ this.#additionalContextProvider = new addtionalContextProvider_1.AdditionalContextProvider(features.workspace);
83
87
  this.#contextCommandsProvider = new contextCommandsProvider_1.ContextCommandsProvider(this.#features.logging, this.#features.chat, this.#features.workspace, this.#features.lsp);
84
88
  }
85
89
  async onButtonClick(params) {
@@ -117,7 +121,7 @@ class AgenticChatController {
117
121
  try {
118
122
  await this.#undoFileChange(toolUseId, session.data);
119
123
  this.#updateUndoButtonAfterClick(params.tabId, toolUseId, session.data);
120
- this.#telemetryController.emitInteractWithAgenticChat('RejectDiff', params.tabId);
124
+ this.#telemetryController.emitInteractWithAgenticChat('RejectDiff', params.tabId, session.data?.pairProgrammingMode, session.data?.getConversationType());
121
125
  }
122
126
  catch (err) {
123
127
  return { success: false, failureReason: err.message };
@@ -277,20 +281,26 @@ class AgenticChatController {
277
281
  // depends on it
278
282
  session.conversationId = (0, uuid_1.v4)();
279
283
  }
284
+ const chatResultStream = this.#getChatResultStream(params.partialResultToken);
280
285
  token.onCancellationRequested(async () => {
281
286
  this.#log('cancellation requested');
287
+ // Abort all operations immediately
288
+ session.abortRequest();
289
+ void this.#invalidateAllShellCommands(params.tabId, session);
290
+ session.rejectAllDeferredToolExecutions(new lsp_core_1.CancellationError('user'));
291
+ // Then update UI to inform the user
282
292
  await this.#showUndoAllIfRequired(chatResultStream, session);
293
+ await chatResultStream.updateOngoingProgressResult('Canceled');
283
294
  await this.#getChatResultStream(params.partialResultToken).writeResultBlock({
284
295
  type: 'directive',
285
296
  messageId: 'stopped' + (0, uuid_1.v4)(),
286
297
  body: 'You stopped your current work, please provide additional examples or ask another question.',
287
298
  });
288
- this.#telemetryController.emitInteractWithAgenticChat('StopChat', params.tabId);
289
- session.abortRequest();
290
- void this.#invalidateAllShellCommands(params.tabId, session);
291
- session.rejectAllDeferredToolExecutions(new lsp_core_1.CancellationError('user'));
299
+ // Finally, send telemetry/metrics
300
+ this.#telemetryController.emitInteractWithAgenticChat('StopChat', params.tabId, session.pairProgrammingMode, session.getConversationType());
301
+ await this.#telemetryController.emitAddMessageMetric(params.tabId, metric.metric, 'Cancelled');
292
302
  });
293
- const chatResultStream = this.#getChatResultStream(params.partialResultToken);
303
+ session.setConversationType('AgenticChat');
294
304
  const additionalContext = await this.#additionalContextProvider.getAdditionalContext(triggerContext, params.context);
295
305
  if (additionalContext.length) {
296
306
  triggerContext.documentReference =
@@ -298,8 +308,11 @@ class AgenticChatController {
298
308
  }
299
309
  // Get the initial request input
300
310
  const initialRequestInput = await this.#prepareRequestInput(params, session, triggerContext, additionalContext, chatResultStream);
311
+ // Generate a unique ID for this prompt
312
+ const promptId = crypto.randomUUID();
313
+ session.setCurrentPromptId(promptId);
301
314
  // Start the agent loop
302
- const finalResult = await this.#runAgentLoop(initialRequestInput, session, metric, chatResultStream, params.tabId, session.conversationId, token, triggerContext.documentReference);
315
+ const finalResult = await this.#runAgentLoop(initialRequestInput, session, metric, chatResultStream, params.tabId, promptId, session.conversationId, token, triggerContext.documentReference);
303
316
  // Phase 5: Result Handling - This happens only once
304
317
  return await this.#handleFinalResult(finalResult, session, params, metric, triggerContext, isNewConversation, chatResultStream);
305
318
  }
@@ -327,7 +340,7 @@ class AgenticChatController {
327
340
  buttons: [],
328
341
  };
329
342
  }
330
- return this.#handleRequestError(err, errorMessageId, params.tabId, metric);
343
+ return this.#handleRequestError(session.conversationId, err, errorMessageId, params.tabId, metric, session.pairProgrammingMode);
331
344
  }
332
345
  }
333
346
  /**
@@ -342,17 +355,18 @@ class AgenticChatController {
342
355
  /**
343
356
  * Runs the agent loop, making requests and processing tool uses until completion
344
357
  */
345
- async #runAgentLoop(initialRequestInput, session, metric, chatResultStream, tabId, conversationIdentifier, token, documentReference) {
358
+ async #runAgentLoop(initialRequestInput, session, metric, chatResultStream, tabId, promptId, conversationIdentifier, token, documentReference) {
346
359
  let currentRequestInput = { ...initialRequestInput };
347
360
  let finalResult = null;
348
361
  let iterationCount = 0;
349
362
  let shouldDisplayMessage = true;
350
363
  metric.recordStart();
351
- while (iterationCount < constants_2.maxAgentLoopIterations) {
364
+ while (true) {
352
365
  iterationCount++;
353
366
  this.#debug(`Agent loop iteration ${iterationCount} for conversation id:`, conversationIdentifier || '');
354
367
  // Check for cancellation
355
- if (token?.isCancellationRequested) {
368
+ if (this.#isPromptCanceled(token, session, promptId)) {
369
+ this.#debug('Stopping agent loop - cancelled by user');
356
370
  throw new lsp_core_1.CancellationError('user');
357
371
  }
358
372
  const currentMessage = currentRequestInput.conversationState?.currentMessage;
@@ -360,9 +374,10 @@ class AgenticChatController {
360
374
  if (!currentMessage || !conversationId) {
361
375
  this.#debug(`Warning: ${!currentMessage ? 'currentMessage' : ''}${!currentMessage && !conversationId ? ' and ' : ''}${!conversationId ? 'conversationIdentifier' : ''} is empty in agent loop iteration ${iterationCount}.`);
362
376
  }
377
+ const remainingCharacterBudget = this.truncateRequest(currentRequestInput);
363
378
  // Fix the history to maintain invariants
364
379
  if (currentMessage) {
365
- const isHistoryValid = this.#chatHistoryDb.fixHistory(tabId, currentMessage, conversationIdentifier ?? '');
380
+ const isHistoryValid = this.#chatHistoryDb.fixAndValidateHistory(tabId, currentMessage, conversationIdentifier ?? '', remainingCharacterBudget);
366
381
  if (!isHistoryValid) {
367
382
  this.#features.logging.warn('Skipping request due to invalid tool result/tool use relationship');
368
383
  break;
@@ -377,20 +392,31 @@ class AgenticChatController {
377
392
  const loadingMessageId = `loading-${(0, uuid_1.v4)()}`;
378
393
  await chatResultStream.writeResultBlock({ ...constants_1.loadingMessage, messageId: loadingMessageId });
379
394
  // Phase 3: Request Execution
380
- this.#truncateRequest(currentRequestInput);
395
+ // Note: these logs are very noisy, but contain information redacted on the backend.
396
+ this.#debug(`generateAssistantResponse Request: ${JSON.stringify(currentRequestInput, undefined, 2)}`);
381
397
  const response = await session.generateAssistantResponse(currentRequestInput);
398
+ if (response.$metadata.requestId) {
399
+ metric.mergeWith({
400
+ requestIds: [response.$metadata.requestId],
401
+ });
402
+ }
382
403
  this.#features.logging.info(`generateAssistantResponse ResponseMetadata: ${lsp_core_2.loggingUtils.formatObj(response.$metadata)}`);
383
404
  await chatResultStream.removeResultBlock(loadingMessageId);
384
405
  // Add the current user message to the history DB
385
406
  if (currentMessage && conversationIdentifier) {
386
- this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier, {
387
- body: currentMessage.userInputMessage?.content ?? '',
388
- type: 'prompt',
389
- userIntent: currentMessage.userInputMessage?.userIntent,
390
- origin: currentMessage.userInputMessage?.origin,
391
- userInputMessageContext: currentMessage.userInputMessage?.userInputMessageContext,
392
- shouldDisplayMessage: shouldDisplayMessage,
393
- });
407
+ if (this.#isPromptCanceled(token, session, promptId)) {
408
+ this.#debug('Skipping adding user message to history - cancelled by user');
409
+ }
410
+ else {
411
+ this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier, {
412
+ body: currentMessage.userInputMessage?.content ?? '',
413
+ type: 'prompt',
414
+ userIntent: currentMessage.userInputMessage?.userIntent,
415
+ origin: currentMessage.userInputMessage?.origin,
416
+ userInputMessageContext: currentMessage.userInputMessage?.userInputMessageContext,
417
+ shouldDisplayMessage: shouldDisplayMessage,
418
+ });
419
+ }
394
420
  }
395
421
  shouldDisplayMessage = true;
396
422
  // Phase 4: Response Processing
@@ -402,34 +428,43 @@ class AgenticChatController {
402
428
  // and we want to auto-retry
403
429
  if (!result.success && result.error.startsWith(constants_2.responseTimeoutPartialMsg)) {
404
430
  const content = 'You took too long to respond - try to split up the work into smaller steps. Do not apologize.';
405
- this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', {
406
- body: 'Response timed out - message took too long to generate',
407
- type: 'answer',
408
- shouldDisplayMessage: false,
409
- });
431
+ if (!this.#isPromptCanceled(token, session, promptId)) {
432
+ this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', {
433
+ body: 'Response timed out - message took too long to generate',
434
+ type: 'answer',
435
+ shouldDisplayMessage: false,
436
+ });
437
+ }
410
438
  currentRequestInput = this.#updateRequestInputWithToolResults(currentRequestInput, [], content);
411
439
  shouldDisplayMessage = false;
440
+ // set the in progress tool use UI status to Error
441
+ await chatResultStream.updateOngoingProgressResult('Error');
412
442
  continue;
413
443
  }
414
444
  // Add the current assistantResponse message to the history DB
415
445
  if (result.data?.chatResult.body !== undefined) {
416
- this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', {
417
- body: result.data?.chatResult.body,
418
- type: 'answer',
419
- codeReference: result.data.chatResult.codeReference,
420
- relatedContent: result.data.chatResult.relatedContent?.content &&
421
- result.data.chatResult.relatedContent.content.length > 0
422
- ? result.data?.chatResult.relatedContent
423
- : undefined,
424
- toolUses: Object.keys(result.data?.toolUses)
425
- .filter(k => result.data.toolUses[k].stop)
426
- .map(k => ({
427
- toolUseId: result.data.toolUses[k].toolUseId,
428
- name: result.data.toolUses[k].name,
429
- input: result.data.toolUses[k].input,
430
- })),
431
- shouldDisplayMessage: shouldDisplayMessage,
432
- });
446
+ if (this.#isPromptCanceled(token, session, promptId)) {
447
+ this.#debug('Skipping adding assistant message to history - cancelled by user');
448
+ }
449
+ else {
450
+ this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', {
451
+ body: result.data?.chatResult.body,
452
+ type: 'answer',
453
+ codeReference: result.data.chatResult.codeReference,
454
+ relatedContent: result.data.chatResult.relatedContent?.content &&
455
+ result.data.chatResult.relatedContent.content.length > 0
456
+ ? result.data?.chatResult.relatedContent
457
+ : undefined,
458
+ toolUses: Object.keys(result.data?.toolUses)
459
+ .filter(k => result.data.toolUses[k].stop)
460
+ .map(k => ({
461
+ toolUseId: result.data.toolUses[k].toolUseId,
462
+ name: result.data.toolUses[k].name,
463
+ input: result.data.toolUses[k].input,
464
+ })),
465
+ shouldDisplayMessage: shouldDisplayMessage,
466
+ });
467
+ }
433
468
  }
434
469
  else {
435
470
  this.#features.logging.warn('No ChatResult body in response, skipping adding to history');
@@ -438,11 +473,13 @@ class AgenticChatController {
438
473
  const pendingToolUses = this.#getPendingToolUses(result.data?.toolUses || {});
439
474
  if (pendingToolUses.length === 0) {
440
475
  // No more tool uses, we're done
476
+ this.#telemetryController.emitAgencticLoop_InvokeLLM(response.$metadata.requestId, conversationId, 'AgenticChat', undefined, undefined, 'Succeeded', this.#features.runtime.serverInfo.version ?? '', undefined, session.pairProgrammingMode);
441
477
  finalResult = result;
442
478
  break;
443
479
  }
444
480
  let content = '';
445
481
  let toolResults;
482
+ session.setConversationType('AgenticChatWithToolUse');
446
483
  if (result.success) {
447
484
  // Process tool uses and update the request input for the next iteration
448
485
  toolResults = await this.#processToolUses(pendingToolUses, chatResultStream, session, tabId, token);
@@ -450,7 +487,13 @@ class AgenticChatController {
450
487
  content = 'There was an error processing one or more tool uses. Try again, do not apologize.';
451
488
  shouldDisplayMessage = false;
452
489
  }
453
- metric.setDimension('cwsprChatConversationType', 'AgenticChatWithToolUse');
490
+ const conversationType = session.getConversationType();
491
+ metric.setDimension('cwsprChatConversationType', conversationType);
492
+ metric.setDimension('requestIds', metric.metric.requestIds);
493
+ const toolNames = this.#toolUseLatencies.map(item => item.toolName);
494
+ const toolUseIds = this.#toolUseLatencies.map(item => item.toolUseId);
495
+ const latency = this.#toolUseLatencies.map(item => item.latency);
496
+ this.#telemetryController.emitAgencticLoop_InvokeLLM(response.$metadata.requestId, conversationId, 'AgenticChatWithToolUse', toolNames ?? undefined, toolUseIds ?? undefined, 'Succeeded', this.#features.runtime.serverInfo.version ?? '', latency, session.pairProgrammingMode);
454
497
  }
455
498
  else {
456
499
  // Send an error card to UI?
@@ -459,17 +502,21 @@ class AgenticChatController {
459
502
  status: codewhisperer_streaming_1.ToolResultStatus.ERROR,
460
503
  content: [{ text: result.error }],
461
504
  }));
505
+ this.#telemetryController.emitAgencticLoop_InvokeLLM(response.$metadata.requestId, conversationId, 'AgenticChatWithToolUse', undefined, undefined, 'Failed', this.#features.runtime.serverInfo.version ?? '', undefined, session.pairProgrammingMode);
462
506
  if (result.error.startsWith('ToolUse input is invalid JSON:')) {
463
507
  content =
464
508
  'Your toolUse input is incomplete, try again. If the error happens consistently, break this task down into multiple tool uses with smaller input. Do not apologize.';
465
509
  shouldDisplayMessage = false;
466
510
  }
511
+ // set the in progress tool use UI status to Error
512
+ await chatResultStream.updateOngoingProgressResult('Error');
513
+ }
514
+ if (result.success && this.#toolUseLatencies.length > 0) {
515
+ // Clear latencies for the next LLM call
516
+ this.#toolUseLatencies = [];
467
517
  }
468
518
  currentRequestInput = this.#updateRequestInputWithToolResults(currentRequestInput, toolResults, content);
469
519
  }
470
- if (iterationCount >= constants_2.maxAgentLoopIterations) {
471
- throw new errors_2.AgenticChatError('Agent loop reached iteration limit', 'MaxAgentLoopIterations');
472
- }
473
520
  return (finalResult || {
474
521
  success: false,
475
522
  error: 'Agent loop failed to produce a final result',
@@ -478,19 +525,58 @@ class AgenticChatController {
478
525
  }
479
526
  /**
480
527
  * performs truncation of request before sending to backend service.
528
+ * Returns the remaining character budget for chat history.
481
529
  * @param request
482
530
  */
483
- #truncateRequest(request) {
484
- // Note: these logs are very noisy, but contain information redacted on the backend.
485
- this.#debug(`generateAssistantResponse Request: ${JSON.stringify(request, undefined, 2)}`);
531
+ truncateRequest(request) {
532
+ let remainingCharacterBudget = constants_2.generateAssistantResponseInputLimit;
486
533
  if (!request?.conversationState?.currentMessage?.userInputMessage) {
487
- return;
534
+ return remainingCharacterBudget;
488
535
  }
489
536
  const message = request.conversationState?.currentMessage?.userInputMessage?.content;
490
- if (message && message.length > constants_2.generateAssistantResponseInputLimit) {
491
- this.#debug(`Truncating userInputMessage to ${constants_2.generateAssistantResponseInputLimit} characters}`);
492
- request.conversationState.currentMessage.userInputMessage.content = message.substring(0, constants_2.generateAssistantResponseInputLimit);
537
+ // 1. prioritize user input message
538
+ let truncatedUserInputMessage = '';
539
+ if (message) {
540
+ if (message.length > constants_2.generateAssistantResponseInputLimit) {
541
+ this.#debug(`Truncating userInputMessage to ${constants_2.generateAssistantResponseInputLimit} characters}`);
542
+ truncatedUserInputMessage = message.substring(0, constants_2.generateAssistantResponseInputLimit);
543
+ remainingCharacterBudget = remainingCharacterBudget - truncatedUserInputMessage.length;
544
+ request.conversationState.currentMessage.userInputMessage.content = truncatedUserInputMessage;
545
+ }
546
+ else {
547
+ remainingCharacterBudget = remainingCharacterBudget - message.length;
548
+ }
549
+ }
550
+ // 2. try to fit @context into budget
551
+ let truncatedRelevantDocuments = [];
552
+ if (request.conversationState.currentMessage.userInputMessage.userInputMessageContext?.editorState
553
+ ?.relevantDocuments) {
554
+ for (const relevantDoc of request.conversationState.currentMessage.userInputMessage.userInputMessageContext
555
+ ?.editorState?.relevantDocuments) {
556
+ const docLength = relevantDoc?.text?.length || 0;
557
+ if (remainingCharacterBudget > docLength) {
558
+ truncatedRelevantDocuments.push(relevantDoc);
559
+ remainingCharacterBudget = remainingCharacterBudget - docLength;
560
+ }
561
+ }
562
+ request.conversationState.currentMessage.userInputMessage.userInputMessageContext.editorState.relevantDocuments =
563
+ truncatedRelevantDocuments;
564
+ }
565
+ // 3. try to fit current file context
566
+ let truncatedCurrentDocument = undefined;
567
+ if (request.conversationState.currentMessage.userInputMessage.userInputMessageContext?.editorState?.document) {
568
+ const docLength = request.conversationState.currentMessage.userInputMessage.userInputMessageContext?.editorState?.document
569
+ .text?.length || 0;
570
+ if (remainingCharacterBudget > docLength) {
571
+ truncatedCurrentDocument =
572
+ request.conversationState.currentMessage.userInputMessage.userInputMessageContext?.editorState
573
+ ?.document;
574
+ remainingCharacterBudget = remainingCharacterBudget - docLength;
575
+ }
576
+ request.conversationState.currentMessage.userInputMessage.userInputMessageContext.editorState.document =
577
+ truncatedCurrentDocument;
493
578
  }
579
+ return remainingCharacterBudget;
494
580
  }
495
581
  /**
496
582
  * Extracts tool uses that need to be processed
@@ -525,28 +611,38 @@ class AgenticChatController {
525
611
  if (!toolUse.name || !toolUse.toolUseId)
526
612
  continue;
527
613
  session.toolUseLookup.set(toolUse.toolUseId, toolUse);
614
+ // Record the start time for this tool use for latency calculation
615
+ if (toolUse.toolUseId) {
616
+ this.#toolUseStartTimes[toolUse.toolUseId] = Date.now();
617
+ }
528
618
  try {
529
619
  // TODO: Can we move this check in the event parser before the stream completes?
530
620
  const availableToolNames = this.#getTools(session).map(tool => tool.toolSpecification.name);
531
621
  if (!availableToolNames.includes(toolUse.name)) {
532
622
  throw new Error(`Tool ${toolUse.name} is not available in the current mode`);
533
623
  }
624
+ // remove progress UI
625
+ await chatResultStream.removeResultBlockAndUpdateUI(agenticChatResultStream_1.progressPrefix + toolUse.toolUseId);
534
626
  // fsRead and listDirectory write to an existing card and could show nothing in the current position
535
627
  if (!['fsWrite', 'fsRead', 'listDirectory'].includes(toolUse.name)) {
536
628
  await this.#showUndoAllIfRequired(chatResultStream, session);
537
629
  }
538
- const { explanation } = toolUse.input;
539
- if (explanation) {
540
- await chatResultStream.writeResultBlock({
541
- type: 'directive',
542
- messageId: toolUse.toolUseId + '_explanation',
543
- body: explanation,
544
- });
630
+ // fsWrite can take a long time, so we render fsWrite Explanatory upon partial streaming responses.
631
+ if (toolUse.name !== 'fsWrite') {
632
+ const { explanation } = toolUse.input;
633
+ if (explanation) {
634
+ await chatResultStream.writeResultBlock({
635
+ type: 'directive',
636
+ messageId: toolUse.toolUseId + '_explanation',
637
+ body: explanation,
638
+ });
639
+ }
545
640
  }
546
641
  switch (toolUse.name) {
547
642
  case 'fsRead':
548
643
  case 'listDirectory':
549
- case 'fileSearch':
644
+ case 'grepSearch':
645
+ case 'fuzzySearch':
550
646
  case 'fsWrite':
551
647
  case 'executeBash': {
552
648
  const toolMap = {
@@ -554,7 +650,8 @@ class AgenticChatController {
554
650
  listDirectory: { Tool: listDirectory_1.ListDirectory },
555
651
  fsWrite: { Tool: fsWrite_1.FsWrite },
556
652
  executeBash: { Tool: executeBash_1.ExecuteBash },
557
- fileSearch: { Tool: fileSearch_1.FileSearch },
653
+ grepSearch: { Tool: grepSearch_1.GrepSearch },
654
+ fuzzySearch: { Tool: fuzzySearch_1.FuzzySearch },
558
655
  };
559
656
  const { Tool } = toolMap[toolUse.name];
560
657
  const tool = new Tool(this.#features);
@@ -568,13 +665,13 @@ class AgenticChatController {
568
665
  cachedButtonBlockId = await chatResultStream.writeResultBlock(confirmationResult);
569
666
  const isExecuteBash = toolUse.name === 'executeBash';
570
667
  if (isExecuteBash) {
571
- this.#telemetryController.emitInteractWithAgenticChat('GeneratedCommand', tabId);
668
+ this.#telemetryController.emitInteractWithAgenticChat('GeneratedCommand', tabId, session.pairProgrammingMode, session.getConversationType());
572
669
  }
573
670
  if (requiresAcceptance) {
574
671
  await this.waitForToolApproval(toolUse, chatResultStream, cachedButtonBlockId, session);
575
672
  }
576
673
  if (isExecuteBash) {
577
- this.#telemetryController.emitInteractWithAgenticChat('RunCommand', tabId);
674
+ this.#telemetryController.emitInteractWithAgenticChat('RunCommand', tabId, session.pairProgrammingMode, session.getConversationType());
578
675
  }
579
676
  }
580
677
  break;
@@ -627,19 +724,22 @@ class AgenticChatController {
627
724
  switch (toolUse.name) {
628
725
  case 'fsRead':
629
726
  case 'listDirectory':
630
- case 'fileSearch':
727
+ case 'fuzzySearch':
631
728
  const initialListDirResult = this.#processReadOrListOrSearch(toolUse, chatResultStream);
632
729
  if (initialListDirResult) {
633
730
  await chatResultStream.writeResultBlock(initialListDirResult);
634
731
  }
635
732
  break;
636
- // no need to write tool result for listDir,fsRead,fileSearch into chat stream
733
+ // no need to write tool result for listDir,fsRead,fuzzySearch into chat stream
637
734
  case 'executeBash':
638
735
  // no need to write tool result for listDir and fsRead into chat stream
639
736
  // executeBash will stream the output instead of waiting until the end
640
737
  break;
641
- case 'codeSearch':
642
- // no need to write tool result for code search.
738
+ case 'grepSearch':
739
+ const grepSearchResult = this.#processGrepSearchResult(toolUse, result, chatResultStream);
740
+ if (grepSearchResult) {
741
+ await chatResultStream.writeResultBlock(grepSearchResult);
742
+ }
643
743
  break;
644
744
  case 'fsWrite':
645
745
  const input = toolUse.input;
@@ -653,7 +753,7 @@ class AgenticChatController {
653
753
  fileChange: { ...cachedToolUse.fileChange, after: doc?.getText() },
654
754
  });
655
755
  }
656
- this.#telemetryController.emitInteractWithAgenticChat('GeneratedDiff', tabId);
756
+ this.#telemetryController.emitInteractWithAgenticChat('GeneratedDiff', tabId, session.pairProgrammingMode, session.getConversationType());
657
757
  await chatResultStream.writeResultBlock(chatResult);
658
758
  break;
659
759
  default:
@@ -666,8 +766,21 @@ class AgenticChatController {
666
766
  break;
667
767
  }
668
768
  this.#updateUndoAllState(toolUse, session);
669
- if (toolUse.name) {
670
- this.#telemetryController.emitToolUseSuggested(toolUse, session.conversationId ?? '', this.#features.runtime.serverInfo.version ?? '');
769
+ if (toolUse.name && toolUse.toolUseId) {
770
+ // Calculate latency if we have a start time for this tool use
771
+ let latency = undefined;
772
+ if (this.#toolUseStartTimes[toolUse.toolUseId]) {
773
+ latency = Date.now() - this.#toolUseStartTimes[toolUse.toolUseId];
774
+ delete this.#toolUseStartTimes[toolUse.toolUseId];
775
+ if (latency !== undefined) {
776
+ this.#toolUseLatencies.push({
777
+ toolName: toolUse.name,
778
+ toolUseId: toolUse.toolUseId,
779
+ latency: latency,
780
+ });
781
+ }
782
+ }
783
+ this.#telemetryController.emitToolUseSuggested(toolUse, session.conversationId ?? '', this.#features.runtime.serverInfo.version ?? '', latency, session.pairProgrammingMode);
671
784
  }
672
785
  }
673
786
  catch (err) {
@@ -700,6 +813,68 @@ class AgenticChatController {
700
813
  continue;
701
814
  }
702
815
  }
816
+ // display fs write failure status in the UX of that file card
817
+ if (toolUse.name === 'fsWrite' && toolUse.toolUseId) {
818
+ const existingCard = chatResultStream.getMessageBlockId(toolUse.toolUseId);
819
+ const fsParam = toolUse.input;
820
+ const fileName = path.basename(fsParam.path);
821
+ const errorResult = {
822
+ type: 'tool',
823
+ messageId: toolUse.toolUseId,
824
+ header: {
825
+ fileList: {
826
+ filePaths: [fileName],
827
+ details: {
828
+ [fileName]: {
829
+ description: fsParam.path,
830
+ },
831
+ },
832
+ },
833
+ status: {
834
+ status: 'error',
835
+ icon: 'error',
836
+ text: 'Error',
837
+ },
838
+ },
839
+ };
840
+ if (existingCard) {
841
+ await chatResultStream.overwriteResultBlock(errorResult, existingCard);
842
+ }
843
+ else {
844
+ await chatResultStream.writeResultBlock(errorResult);
845
+ }
846
+ }
847
+ else if (toolUse.name === 'executeBash' && toolUse.toolUseId) {
848
+ const existingCard = chatResultStream.getMessageBlockId(toolUse.toolUseId);
849
+ const command = toolUse.input.command;
850
+ const completedErrorResult = {
851
+ type: 'tool',
852
+ messageId: toolUse.toolUseId,
853
+ body: `\`\`\`shell\n${command}\n\`\`\``,
854
+ header: {
855
+ body: 'shell',
856
+ status: {
857
+ status: 'success',
858
+ icon: 'ok',
859
+ text: 'Completed',
860
+ },
861
+ buttons: [],
862
+ },
863
+ };
864
+ if (existingCard) {
865
+ await chatResultStream.overwriteResultBlock(completedErrorResult, existingCard);
866
+ }
867
+ else {
868
+ this.#features.chat.sendChatUpdate({
869
+ tabId,
870
+ state: { inProgress: false },
871
+ data: {
872
+ messages: [completedErrorResult],
873
+ },
874
+ });
875
+ }
876
+ this.#stoppedToolUses.add(toolUse.toolUseId);
877
+ }
703
878
  const errMsg = err instanceof Error ? err.message : 'unknown error';
704
879
  this.#log(`Error running tool ${toolUse.name}:`, errMsg);
705
880
  results.push({
@@ -783,11 +958,15 @@ class AgenticChatController {
783
958
  * @param err
784
959
  * @returns
785
960
  */
786
- isUserAction(err, token) {
961
+ isUserAction(err, token, session) {
787
962
  return (lsp_core_1.CancellationError.isUserCancelled(err) ||
788
963
  err instanceof toolShared_1.ToolApprovalException ||
964
+ (0, errors_2.isRequestAbortedError)(err) ||
789
965
  (token?.isCancellationRequested ?? false));
790
966
  }
967
+ #isPromptCanceled(token, session, promptId) {
968
+ return token?.isCancellationRequested === true || !session.isCurrentPrompt(promptId);
969
+ }
791
970
  #validateToolResult(toolUse, result) {
792
971
  let maxToolResponseSize;
793
972
  switch (toolUse.name) {
@@ -925,7 +1104,7 @@ class AgenticChatController {
925
1104
  },
926
1105
  };
927
1106
  break;
928
- case 'fileSearch':
1107
+ case 'fuzzySearch':
929
1108
  const searchPath = toolUse.input.path;
930
1109
  header = {
931
1110
  body: 'File Search',
@@ -1158,7 +1337,7 @@ class AgenticChatController {
1158
1337
  title =
1159
1338
  toolUse.name === 'fsRead'
1160
1339
  ? `${itemCount} file${itemCount > 1 ? 's' : ''} read`
1161
- : toolUse.name === 'fileSearch'
1340
+ : toolUse.name === 'fuzzySearch'
1162
1341
  ? `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} searched`
1163
1342
  : `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} listed`;
1164
1343
  }
@@ -1181,6 +1360,59 @@ class AgenticChatController {
1181
1360
  body: '',
1182
1361
  };
1183
1362
  }
1363
+ /**
1364
+ * Process grep search results and format them for display in the chat UI
1365
+ */
1366
+ #processGrepSearchResult(toolUse, result, chatResultStream) {
1367
+ if (toolUse.name !== 'grepSearch') {
1368
+ return undefined;
1369
+ }
1370
+ let messageIdToUpdate = toolUse.toolUseId;
1371
+ const currentId = chatResultStream.getMessageIdToUpdateForTool(toolUse.name);
1372
+ if (currentId) {
1373
+ messageIdToUpdate = currentId;
1374
+ }
1375
+ else {
1376
+ chatResultStream.setMessageIdToUpdateForTool(toolUse.name, messageIdToUpdate);
1377
+ }
1378
+ // Extract search results from the tool output
1379
+ const output = result.output.content;
1380
+ if (!output || !output.fileMatches || !Array.isArray(output.fileMatches)) {
1381
+ return {
1382
+ type: 'tool',
1383
+ messageId: messageIdToUpdate,
1384
+ body: 'No search results found.',
1385
+ };
1386
+ }
1387
+ // Process the matches into a structured format
1388
+ const matches = output.fileMatches;
1389
+ const fileDetails = {};
1390
+ // Create file details directly from matches
1391
+ for (const match of matches) {
1392
+ const filePath = match.filePath;
1393
+ if (!filePath)
1394
+ continue;
1395
+ fileDetails[`${filePath} (${match.matches.length} ${match.matches.length <= 1 ? 'result' : 'results'})`] = {
1396
+ description: filePath,
1397
+ lineRanges: [{ first: -1, second: -1 }],
1398
+ };
1399
+ }
1400
+ // Create sorted array of file paths
1401
+ const sortedFilePaths = Object.keys(fileDetails);
1402
+ // Create the context list for display
1403
+ const query = toolUse.input?.query || 'search term';
1404
+ const contextList = {
1405
+ rootFolderTitle: `Grepped for "${query}", ${output.matchCount} ${output.matchCount <= 1 ? 'result' : 'results'} found`,
1406
+ filePaths: sortedFilePaths,
1407
+ details: fileDetails,
1408
+ };
1409
+ return {
1410
+ type: 'tool',
1411
+ fileList: contextList,
1412
+ messageId: messageIdToUpdate,
1413
+ body: '',
1414
+ };
1415
+ }
1184
1416
  /**
1185
1417
  * Updates the request input with tool results for the next iteration
1186
1418
  */
@@ -1222,6 +1454,7 @@ class AgenticChatController {
1222
1454
  }
1223
1455
  metric.setDimension('codewhispererCustomizationArn', this.#customizationArn);
1224
1456
  metric.setDimension('languageServerVersion', this.#features.runtime.serverInfo.version);
1457
+ metric.setDimension('enabled', session.pairProgrammingMode);
1225
1458
  const profileArn = AmazonQTokenServiceManager_1.AmazonQTokenServiceManager.getInstance().getActiveProfileArn();
1226
1459
  if (profileArn) {
1227
1460
  this.#telemetryService.updateProfileArn(profileArn);
@@ -1241,7 +1474,7 @@ class AgenticChatController {
1241
1474
  cwsprChatFocusFileContextLength: triggerContext.text?.length,
1242
1475
  });
1243
1476
  }
1244
- await this.#telemetryController.emitAddMessageMetric(params.tabId, metric.metric);
1477
+ await this.#telemetryController.emitAddMessageMetric(params.tabId, metric.metric, 'Succeeded');
1245
1478
  this.#telemetryController.updateTriggerInfo(params.tabId, {
1246
1479
  lastMessageTrigger: {
1247
1480
  ...triggerContext,
@@ -1256,18 +1489,22 @@ class AgenticChatController {
1256
1489
  /**
1257
1490
  * Handles errors that occur during the request
1258
1491
  */
1259
- #handleRequestError(err, errorMessageId, tabId, metric) {
1492
+ async #handleRequestError(conversationId, err, errorMessageId, tabId, metric, agenticCodingMode) {
1260
1493
  const errorMessage = (0, utils_2.getErrorMessage)(err);
1261
1494
  const requestID = (0, utils_2.getRequestID)(err) ?? '';
1262
1495
  metric.setDimension('cwsprChatResponseCode', (0, utils_2.getHttpStatusCode)(err) ?? 0);
1263
1496
  metric.setDimension('languageServerVersion', this.#features.runtime.serverInfo.version);
1497
+ metric.metric.requestIds = [requestID];
1498
+ metric.metric.cwsprChatMessageId = errorMessageId;
1499
+ metric.metric.cwsprChatConversationId = conversationId;
1500
+ await this.#telemetryController.emitAddMessageMetric(tabId, metric.metric, 'Failed');
1264
1501
  // use custom error message for unactionable errors (user-dependent errors like PromptCharacterLimit)
1265
1502
  if (err.code && err.code in errors_2.unactionableErrorCodes) {
1266
1503
  const customErrMessage = errors_2.unactionableErrorCodes[err.code];
1267
- this.#telemetryController.emitMessageResponseError(tabId, metric.metric, requestID, customErrMessage);
1504
+ this.#telemetryController.emitMessageResponseError(tabId, metric.metric, requestID, customErrMessage, agenticCodingMode);
1268
1505
  }
1269
1506
  else {
1270
- this.#telemetryController.emitMessageResponseError(tabId, metric.metric, requestID, errorMessage ?? constants_2.genericErrorMsg);
1507
+ this.#telemetryController.emitMessageResponseError(tabId, metric.metric, requestID, errorMessage ?? constants_2.genericErrorMsg, agenticCodingMode);
1271
1508
  }
1272
1509
  let authFollowType = undefined;
1273
1510
  // first check if there is an AmazonQ related auth follow up
@@ -1288,7 +1525,9 @@ class AgenticChatController {
1288
1525
  // Clear the chat history in the database for this tab
1289
1526
  this.#chatHistoryDb.clearTab(tabId);
1290
1527
  }
1291
- const errorBody = err.code === 'QModelResponse' && requestID ? `${err.message}\n\nRequest ID: ${requestID}` : err.message;
1528
+ const errorBody = err.code === 'QModelResponse' && requestID
1529
+ ? `${err.message} \n\nRequest ID: ${requestID} `
1530
+ : err.message;
1292
1531
  return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err.message, {
1293
1532
  type: 'answer',
1294
1533
  body: errorBody,
@@ -1299,7 +1538,7 @@ class AgenticChatController {
1299
1538
  this.#features.logging.error(`Unknown Error: ${lsp_core_2.loggingUtils.formatErr(err)}`);
1300
1539
  return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err.message, {
1301
1540
  type: 'answer',
1302
- body: requestID ? `${constants_2.genericErrorMsg}\n\nRequest ID: ${requestID}` : constants_2.genericErrorMsg,
1541
+ body: requestID ? `${constants_2.genericErrorMsg} \n\nRequest ID: ${requestID}` : constants_2.genericErrorMsg,
1303
1542
  messageId: errorMessageId,
1304
1543
  buttons: [],
1305
1544
  });
@@ -1356,7 +1595,7 @@ class AgenticChatController {
1356
1595
  missingParams.push('cursorPosition');
1357
1596
  if (!params.code)
1358
1597
  missingParams.push('code');
1359
- this.#log(`Q Chat server failed to insert code. Missing required parameters for insert code: ${missingParams.join(', ')}`);
1598
+ this.#log(`Q Chat server failed to insert code.Missing required parameters for insert code: ${missingParams.join(', ')}`);
1360
1599
  return;
1361
1600
  }
1362
1601
  let cursorPosition = params.cursorPosition;
@@ -1544,7 +1783,7 @@ class AgenticChatController {
1544
1783
  }
1545
1784
  async #resolveAbsolutePath(relativePath) {
1546
1785
  try {
1547
- const workspaceFolders = lsp_core_1.workspaceUtils.getWorkspaceFolderPaths(this.#features.lsp);
1786
+ const workspaceFolders = lsp_core_1.workspaceUtils.getWorkspaceFolderPaths(this.#features.workspace);
1548
1787
  for (const workspaceRoot of workspaceFolders) {
1549
1788
  const candidatePath = path.join(workspaceRoot, relativePath);
1550
1789
  if (await this.#features.workspace.fs.exists(candidatePath)) {
@@ -1636,6 +1875,56 @@ class AgenticChatController {
1636
1875
  throw err;
1637
1876
  }
1638
1877
  }
1878
+ async #showToolUseIntermediateResult(data, chatResultStream, streamWriter) {
1879
+ // extract the key value from incomplete JSON response stream
1880
+ function extractKey(incompleteJson, key) {
1881
+ const pattern = new RegExp(`"${key}":\\s*"([^"]*)"`, 'g');
1882
+ const match = pattern.exec(incompleteJson);
1883
+ return match?.[1];
1884
+ }
1885
+ const toolUses = Object.values(data.toolUses);
1886
+ for (const toolUse of toolUses) {
1887
+ if (toolUse.name === 'fsWrite' && typeof toolUse.input === 'string') {
1888
+ const filepath = extractKey(toolUse.input, 'path');
1889
+ const msgId = agenticChatResultStream_1.progressPrefix + toolUse.toolUseId;
1890
+ // render fs write UI as soon as fs write starts
1891
+ if (filepath && !chatResultStream.hasMessage(msgId)) {
1892
+ const fileName = path.basename(filepath);
1893
+ await streamWriter.close();
1894
+ await chatResultStream.writeResultBlock({
1895
+ type: 'tool',
1896
+ messageId: msgId,
1897
+ header: {
1898
+ fileList: {
1899
+ filePaths: [fileName],
1900
+ details: {
1901
+ [fileName]: {
1902
+ description: filepath,
1903
+ },
1904
+ },
1905
+ },
1906
+ status: {
1907
+ status: 'info',
1908
+ icon: 'progress',
1909
+ text: '',
1910
+ },
1911
+ },
1912
+ });
1913
+ }
1914
+ // render the tool use explanatory as soon as this is received for fsWrite
1915
+ const explanation = extractKey(toolUse.input, 'explanation');
1916
+ const messageId = agenticChatResultStream_1.progressPrefix + toolUse.toolUseId + '_explanation';
1917
+ if (explanation && !chatResultStream.hasMessage(messageId)) {
1918
+ await streamWriter.close();
1919
+ await chatResultStream.writeResultBlock({
1920
+ type: 'directive',
1921
+ messageId: messageId,
1922
+ body: explanation,
1923
+ });
1924
+ }
1925
+ }
1926
+ }
1927
+ }
1639
1928
  async #processGenerateAssistantResponseResponse(response, metric, chatResultStream, streamWriter, session, contextList, abortSignal) {
1640
1929
  const requestId = response.$metadata.requestId;
1641
1930
  const chatEventParser = new agenticChatEventParser_1.AgenticChatEventParser(requestId, metric, this.#features.logging);
@@ -1666,6 +1955,7 @@ class AgenticChatController {
1666
1955
  }
1667
1956
  if (chatEvent.toolUseEvent) {
1668
1957
  await this.#showLoadingIfRequired(chatEvent.toolUseEvent, streamWriter, toolUseStartTimes, toolUseLoadingTimeouts);
1958
+ await this.#showToolUseIntermediateResult(result.data, chatResultStream, streamWriter);
1669
1959
  }
1670
1960
  }
1671
1961
  await streamWriter.close();
@@ -1687,6 +1977,10 @@ class AgenticChatController {
1687
1977
  if (!toolUseEvent.stop && toolUseId) {
1688
1978
  if (!toolUseStartTimes[toolUseId]) {
1689
1979
  toolUseStartTimes[toolUseId] = Date.now();
1980
+ // Also record in the class-level toolUseStartTimes for latency calculation
1981
+ if (!this.#toolUseStartTimes[toolUseId]) {
1982
+ this.#toolUseStartTimes[toolUseId] = Date.now();
1983
+ }
1690
1984
  this.#debug(`ToolUseEvent ${toolUseId} started`);
1691
1985
  toolUseLoadingTimeouts[toolUseId] = setTimeout(async () => {
1692
1986
  this.#debug(`ToolUseEvent ${toolUseId} is taking longer than ${constants_2.loadingThresholdMs}ms, showing loading indicator`);