@aws/lsp-codewhisperer 0.0.39 → 0.0.40

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 (421) hide show
  1. package/CHANGELOG.md +49 -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 +335 -75
  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/errors.d.ts +2 -1
  329. package/out/language-server/agenticChat/errors.js +11 -1
  330. package/out/language-server/agenticChat/errors.js.map +1 -1
  331. package/out/language-server/agenticChat/tabBarController.d.ts +10 -1
  332. package/out/language-server/agenticChat/tabBarController.js +54 -27
  333. package/out/language-server/agenticChat/tabBarController.js.map +1 -1
  334. package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +8 -9
  335. package/out/language-server/agenticChat/tools/chatDb/chatDb.js +58 -124
  336. package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -1
  337. package/out/language-server/agenticChat/tools/codeSearch.js +1 -1
  338. package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -1
  339. package/out/language-server/agenticChat/tools/executeBash.d.ts +2 -2
  340. package/out/language-server/agenticChat/tools/executeBash.js +4 -4
  341. package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
  342. package/out/language-server/agenticChat/tools/fileSearch.js +1 -1
  343. package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -1
  344. package/out/language-server/agenticChat/tools/fsRead.js +1 -1
  345. package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
  346. package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
  347. package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
  348. package/out/language-server/agenticChat/tools/grepSearch.d.ts +74 -0
  349. package/out/language-server/agenticChat/tools/grepSearch.js +254 -0
  350. package/out/language-server/agenticChat/tools/grepSearch.js.map +1 -0
  351. package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
  352. package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
  353. package/out/language-server/agenticChat/tools/toolServer.js +2 -1
  354. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  355. package/out/language-server/agenticChat/tools/toolShared.d.ts +1 -1
  356. package/out/language-server/agenticChat/tools/toolShared.js +2 -2
  357. package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
  358. package/out/language-server/chat/chatController.d.ts +1 -1
  359. package/out/language-server/chat/chatController.js.map +1 -1
  360. package/out/language-server/chat/chatSessionService.d.ts +13 -0
  361. package/out/language-server/chat/chatSessionService.js +28 -4
  362. package/out/language-server/chat/chatSessionService.js.map +1 -1
  363. package/out/language-server/chat/contexts/triggerContext.js +1 -0
  364. package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
  365. package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -4
  366. package/out/language-server/chat/telemetry/chatTelemetryController.js +29 -5
  367. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  368. package/out/language-server/inline-completion/codePercentage.js +1 -0
  369. package/out/language-server/inline-completion/codePercentage.js.map +1 -1
  370. package/out/language-server/inline-completion/codeWhispererServer.d.ts +1 -0
  371. package/out/language-server/inline-completion/codeWhispererServer.js +40 -5
  372. package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
  373. package/out/language-server/inline-completion/session/sessionManager.d.ts +2 -0
  374. package/out/language-server/inline-completion/session/sessionManager.js +2 -0
  375. package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
  376. package/out/language-server/localProjectContext/localProjectContextServer.js +3 -4
  377. package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -1
  378. package/out/language-server/workspaceContext/artifactManager.d.ts +1 -1
  379. package/out/language-server/workspaceContext/artifactManager.js +55 -22
  380. package/out/language-server/workspaceContext/artifactManager.js.map +1 -1
  381. package/out/language-server/workspaceContext/client.d.ts +1 -2
  382. package/out/language-server/workspaceContext/client.js +8 -16
  383. package/out/language-server/workspaceContext/client.js.map +1 -1
  384. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.d.ts +2 -0
  385. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js +11 -1
  386. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js.map +1 -1
  387. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.d.ts +17 -0
  388. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js +75 -0
  389. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js.map +1 -0
  390. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js +9 -9
  391. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js.map +1 -1
  392. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js +9 -9
  393. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js.map +1 -1
  394. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.d.ts +7 -5
  395. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js +21 -15
  396. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js.map +1 -1
  397. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.d.ts +1 -1
  398. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js +4 -4
  399. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js.map +1 -1
  400. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js +38 -29
  401. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js.map +1 -1
  402. package/out/language-server/workspaceContext/javaManager.js +1 -1
  403. package/out/language-server/workspaceContext/javaManager.js.map +1 -1
  404. package/out/language-server/workspaceContext/util.d.ts +1 -0
  405. package/out/language-server/workspaceContext/util.js +12 -6
  406. package/out/language-server/workspaceContext/util.js.map +1 -1
  407. package/out/language-server/workspaceContext/workspaceContextServer.js +63 -82
  408. package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
  409. package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +22 -50
  410. package/out/language-server/workspaceContext/workspaceFolderManager.js +259 -496
  411. package/out/language-server/workspaceContext/workspaceFolderManager.js.map +1 -1
  412. package/out/shared/telemetry/telemetryService.d.ts +10 -1
  413. package/out/shared/telemetry/telemetryService.js +36 -7
  414. package/out/shared/telemetry/telemetryService.js.map +1 -1
  415. package/out/shared/telemetry/types.d.ts +39 -0
  416. package/out/shared/telemetry/types.js +1 -0
  417. package/out/shared/telemetry/types.js.map +1 -1
  418. package/package.json +6 -5
  419. package/out/shared/initializeUtils.d.ts +0 -3
  420. package/out/shared/initializeUtils.js +0 -32
  421. package/out/shared/initializeUtils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agenticChatTriggerContext.js","sourceRoot":"","sources":["../../../../src/language-server/agenticChat/context/agenticChatTriggerContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EASsC;AACtC,qFAQuD;AAEvD,yEAA+F;AAC/F,4CAA8C;AAC9C,2CAAgC;AAChC,iGAA6F;AAC7F,6BAA4B;AAE5B,yEAAuE;AAEvE,iDAAwF;AAkBxF,qCAAqC;AACxB,QAAA,qBAAqB,GAAG,MAAM,CAAA;AAE3C,4CAA4C;AAC/B,QAAA,0BAA0B,GAAG,GAAG,CAAA;AAE7C,MAAa,yBAAyB;IAC1B,MAAM,CAAU,oBAAoB,GAAgB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,CAAA;IAEnG,UAAU,CAAuB;IACjC,IAAI,CAAiB;IACrB,QAAQ,CAAqB;IAC7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,OAAO,IAAI,CAAC,CAAC;iBAC/B,CAAA;gBAED,IAAI,KAAK,CAAC,mBAAmB,IAAI,KAAK,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;oBACvE,qBAAqB,CAAC,IAAI,CAAC;wBACvB,GAAG,YAAY;wBACf,mBAAmB,EAAE;4BACjB,YAAY,EAAE,KAAK,CAAC,mBAAmB;yBAC1C;wBACD,IAAI,EAAE,qCAAW,CAAC,SAAS;qBAC9B,CAAC,CAAA;gBACN,CAAC;qBAAM,CAAC;oBACJ,qBAAqB,CAAC,IAAI,CAAC;wBACvB,GAAG,YAAY;wBACf,IAAI,EAAE,qCAAW,CAAC,SAAS;qBAC9B,CAAC,CAAA;gBACN,CAAC;YACL,CAAC;YAED,OAAO,qBAAqB,CAAA;QAChC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,gEAAgE,CAAC,EAAE,CAAC,CAAA;YACxF,OAAO,EAAE,CAAA;QACb,CAAC;IACL,CAAC;;AAtRL,8DAuRC"}
1
+ {"version":3,"file":"agenticChatTriggerContext.js","sourceRoot":"","sources":["../../../../src/language-server/agenticChat/context/agenticChatTriggerContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EASsC;AACtC,qFAQuD;AAEvD,yEAA+F;AAC/F,4CAA8C;AAC9C,2CAAgC;AAChC,iGAA6F;AAC7F,6BAA4B;AAE5B,yEAAuE;AAEvE,iDAAwF;AACxF,0FAAsF;AAkBtF,qCAAqC;AACxB,QAAA,qBAAqB,GAAG,MAAM,CAAA;AAE3C,4CAA4C;AAC/B,QAAA,0BAA0B,GAAG,GAAG,CAAA;AAE7C,yDAAyD;AAC5C,QAAA,mBAAmB,GAAG,GAAG,CAAA;AAEtC,MAAa,yBAAyB;IAC1B,MAAM,CAAU,oBAAoB,GAAgB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAA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azonQServiceManager' | 'FailedResult' | 'MaxAgentLoopIterations' | 'InputTooLong' | 'PromptCharacterLimit' | 'ResponseProcessingTimeout';
1
+ type AgenticChatErrorCode = 'QModelResponse' | 'AmazonQServiceManager' | 'FailedResult' | 'InputTooLong' | 'PromptCharacterLimit' | 'ResponseProcessingTimeout' | 'RequestAborted';
2
2
  export declare const customerFacingErrorCodes: AgenticChatErrorCode[];
3
3
  export declare const unactionableErrorCodes: Partial<Record<AgenticChatErrorCode, string>>;
4
4
  export declare class AgenticChatError extends Error {
@@ -8,4 +8,5 @@ export declare class AgenticChatError extends Error {
8
8
  }
9
9
  export declare function wrapErrorWithCode(error: unknown, code: AgenticChatErrorCode): AgenticChatError;
10
10
  export declare function isInputTooLongError(error: unknown): boolean;
11
+ export declare function isRequestAbortedError(error: unknown): boolean;
11
12
  export {};
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgenticChatError = exports.unactionableErrorCodes = exports.customerFacingErrorCodes = void 0;
4
4
  exports.wrapErrorWithCode = wrapErrorWithCode;
5
5
  exports.isInputTooLongError = isInputTooLongError;
6
+ exports.isRequestAbortedError = isRequestAbortedError;
6
7
  const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
7
8
  exports.customerFacingErrorCodes = [
8
9
  'QModelResponse',
9
- 'MaxAgentLoopIterations',
10
10
  'InputTooLong',
11
11
  'PromptCharacterLimit',
12
12
  ];
@@ -42,4 +42,14 @@ function isInputTooLongError(error) {
42
42
  }
43
43
  return false;
44
44
  }
45
+ function isRequestAbortedError(error) {
46
+ if (error instanceof AgenticChatError && error.code === 'RequestAborted') {
47
+ return true;
48
+ }
49
+ if (error instanceof Error) {
50
+ // This is fragile (breaks if the backend changes their error message wording)
51
+ return error.message.includes('Request aborted');
52
+ }
53
+ return false;
54
+ }
45
55
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/language-server/agenticChat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;IACtD,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/language-server/agenticChat/errors.ts"],"names":[],"mappings":";;;AAgCA,8CASC;AAED,kDAWC;AAED,sDAWC;AAnED,2EAAsF;AAWzE,QAAA,wBAAwB,GAA2B;IAC5D,gBAAgB;IAChB,cAAc;IACd,sBAAsB;CACzB,CAAA;AAEY,QAAA,sBAAsB,GAAkD;IACjF,oBAAoB,EAAE,0CAA0C;CACnE,CAAA;AAED,MAAa,gBAAiB,SAAQ,KAAK;IAGnB;IAEA;IAJpB,YACI,OAAe,EACC,IAA0B,EAC1C,KAAa,EACG,SAAkB;QAElC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;QAJhB,SAAI,GAAJ,IAAI,CAAsB;QAE1B,cAAS,GAAT,SAAS,CAAS;IAGtC,CAAC;CACJ;AATD,4CASC;AAED,SAAgB,iBAAiB,CAAC,KAAc,EAAE,IAA0B;IACxE,IAAI,KAAK,YAAY,gEAAsC,EAAE,CAAC;QAC1D,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IACvF,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IAC3D,CAAC;IACD,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;AACpD,CAAC;AAED,SAAgB,mBAAmB,CAAC,KAAc;IAC9C,IAAI,KAAK,YAAY,gBAAgB,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QACrE,OAAO,IAAI,CAAA;IACf,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QACzB,+EAA+E;QAC/E,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAA;IACtD,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC;AAED,SAAgB,qBAAqB,CAAC,KAAc;IAChD,IAAI,KAAK,YAAY,gBAAgB,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACvE,OAAO,IAAI,CAAA;IACf,CAAC;IAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QACzB,+EAA+E;QAC/E,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACpD,CAAC;IAED,OAAO,KAAK,CAAA;AAChB,CAAC"}
@@ -43,7 +43,16 @@ export declare class TabBarController {
43
43
  tabId?: string;
44
44
  action: import("@aws/language-server-runtimes-types").TabBarAction;
45
45
  }>;
46
- onExportTab(tabId: string): Promise<"markdown" | "html">;
46
+ onExportTab(tabId: string): Promise<{
47
+ format: string;
48
+ result: "Succeeded";
49
+ } | {
50
+ format: string;
51
+ result: "Cancelled";
52
+ } | {
53
+ format: string;
54
+ result: "Failed";
55
+ }>;
47
56
  /**
48
57
  * Opens new tab with a conversation from history.
49
58
  */
@@ -9,6 +9,7 @@ const chatDb_1 = require("./tools/chatDb/chatDb");
9
9
  const util_1 = require("./tools/chatDb/util");
10
10
  const vscode_uri_1 = require("vscode-uri");
11
11
  const types_1 = require("../../shared/telemetry/types");
12
+ const lsp_core_1 = require("@aws/lsp-core");
12
13
  /**
13
14
  * Controller for managing chat history and export functionality.
14
15
  *
@@ -157,13 +158,16 @@ class TabBarController {
157
158
  this.#features.logging.error('Failed to restore Chat Client Tab from history');
158
159
  return { ...params, success: false };
159
160
  }
160
- const format = await this.onExportTab(openTabID);
161
+ const exportTabResponse = await this.onExportTab(openTabID);
161
162
  this.#telemetryService.emitChatHistoryAction({
162
163
  action: types_1.ChatHistoryActionType.Export,
163
164
  languageServerVersion: this.#features.runtime.serverInfo.version,
164
- filenameExt: format,
165
- result: 'Succeeded',
165
+ filenameExt: exportTabResponse.format,
166
+ result: exportTabResponse.result,
166
167
  });
168
+ if (exportTabResponse.result !== 'Succeeded') {
169
+ return { ...params, success: false };
170
+ }
167
171
  }
168
172
  else {
169
173
  this.#features.logging.error(`Unsupported action: ${params.action}`);
@@ -173,41 +177,64 @@ class TabBarController {
173
177
  }
174
178
  async onTabBarAction(params) {
175
179
  if (params.action === 'export' && params.tabId) {
176
- const format = await this.onExportTab(params.tabId);
180
+ const exportTabResponse = await this.onExportTab(params.tabId);
177
181
  this.#telemetryService.emitExportTab({
178
- filenameExt: format,
182
+ filenameExt: exportTabResponse.format,
179
183
  languageServerVersion: this.#features.runtime.serverInfo.version,
180
- result: 'Succeeded',
184
+ result: exportTabResponse.result,
181
185
  });
182
- return { ...params, success: true };
186
+ const actionResult = exportTabResponse.result === 'Succeeded';
187
+ return { ...params, success: actionResult };
183
188
  }
184
189
  this.#features.logging.error(`Unsupported action ${params.action}`);
185
190
  return { ...params, success: false };
186
191
  }
187
192
  async onExportTab(tabId) {
188
193
  const defaultFileName = `q-dev-chat-${new Date().toISOString().split('T')[0]}.md`;
189
- let defaultUri;
190
- const clientParams = this.#features.lsp.getClientInitializeParams();
191
- let workspaceFolders = clientParams?.workspaceFolders;
192
- if (workspaceFolders && workspaceFolders.length > 0) {
193
- const workspaceUri = vscode_uri_1.URI.parse(workspaceFolders[0].uri);
194
- defaultUri = vscode_uri_1.Utils.joinPath(workspaceUri, defaultFileName);
194
+ try {
195
+ let defaultUri;
196
+ let workspaceFolders = this.#features.workspace.getAllWorkspaceFolders();
197
+ if (workspaceFolders && workspaceFolders.length > 0) {
198
+ const workspaceUri = vscode_uri_1.URI.parse(workspaceFolders[0].uri);
199
+ defaultUri = vscode_uri_1.Utils.joinPath(workspaceUri, defaultFileName);
200
+ }
201
+ else {
202
+ defaultUri = vscode_uri_1.URI.file(defaultFileName);
203
+ }
204
+ const { targetUri } = await this.#features.lsp.window.showSaveFileDialog({
205
+ supportedFormats: ['markdown', 'html'],
206
+ defaultUri: defaultUri.toString(),
207
+ });
208
+ if (targetUri === null || targetUri === '') {
209
+ // If user cancelled the show save file dialog, targetUri will be empty.
210
+ throw new lsp_core_1.CancellationError('user');
211
+ }
212
+ const targetPath = vscode_uri_1.URI.parse(targetUri);
213
+ const format = targetPath.fsPath.endsWith('.md') ? 'markdown' : 'html';
214
+ const { content } = await this.#features.chat.getSerializedChat({
215
+ tabId,
216
+ format,
217
+ });
218
+ await this.#features.workspace.fs.writeFile(targetPath.fsPath, content);
219
+ return {
220
+ format: format,
221
+ result: 'Succeeded',
222
+ };
195
223
  }
196
- else {
197
- defaultUri = vscode_uri_1.URI.file(defaultFileName);
224
+ catch (error) {
225
+ if (error instanceof lsp_core_1.CancellationError) {
226
+ this.#features.logging.debug('Export cancelled by user');
227
+ return {
228
+ format: '',
229
+ result: 'Cancelled',
230
+ };
231
+ }
232
+ this.#features.logging.error(`Unable to export tab "${tabId}": ${error.message || error}`);
233
+ return {
234
+ format: '',
235
+ result: 'Failed',
236
+ };
198
237
  }
199
- const { targetUri } = await this.#features.lsp.window.showSaveFileDialog({
200
- supportedFormats: ['markdown', 'html'],
201
- defaultUri: defaultUri.toString(),
202
- });
203
- const targetPath = vscode_uri_1.URI.parse(targetUri);
204
- const format = targetPath.fsPath.endsWith('.md') ? 'markdown' : 'html';
205
- const { content } = await this.#features.chat.getSerializedChat({
206
- tabId,
207
- format,
208
- });
209
- await this.#features.workspace.fs.writeFile(targetPath.fsPath, content);
210
- return format;
211
238
  }
212
239
  /**
213
240
  * Opens new tab with a conversation from history.
@@ -1 +1 @@
1
- {"version":3,"file":"tabBarController.js","sourceRoot":"","sources":["../../../src/language-server/agenticChat/tabBarController.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kDAAgF;AAChF,8CAA6E;AAW7E,2CAAuC;AAGvC,wDAAoE;AAEpE;;;;;;;;;;GAUG;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c,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBACjE,sBAAsB,EAAE,IAAI,CAAC,cAAc,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;gBACvE,YAAY,EAAE,iBAAiB,CAAC,MAAM;gBACtC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;gBAChE,MAAM,EAAE,WAAW;aACtB,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,MAAyB;QACpD,IAAI,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;YACxF,mFAAmF;YACnF,OAAO,IAAI,CAAA;QACf,CAAC;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ;AA7QD,4CA6QC"}
1
+ {"version":3,"file":"tabBarController.js","sourceRoot":"","sources":["../../../src/language-server/agenticChat/tabBarController.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kDAAgF;AAChF,8CAA6E;AAW7E,2CAAuC;AAGvC,wDAAoE;AACpE,4CAAiD;AAEjD;;;;;;;;;;GAUG;AACH,MAAa,gBAAgB;IACzB,YAAY,GAAY,KAAK,CAAA;IAC7B,cAAc,GAA+B,SAAS,CAAA;IAC7C,aAAa,GAAG,GAAG,CAAA,CAAC,eAAe;IAC5C,SAAS,CAAU;IACnB,cAAc,CAAc;IAC5B,iBAAiB,CAAkB;IAEnC,YAAY,QAAkB,EAAE,aAA2B,EAAE,gBAAkC;QAC3F,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,cAAc,GAAG,aAAa,CAAA;QACnC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,mBAAmB,CAAC,MAA+B;QACrD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,Q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,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,CAAA;QAC3D,IAAI,iBAAiB,EAAE,CAAC;YACpB,KAAK,MAAM,YAAY,IAAI,iBAAiB,EAAE,CAAC;gBAC3C,IAAI,YAAY,CAAC,aAAa,IAAI,YAAY,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACtE,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;gBACvC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC;gBACnC,wBAAwB,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBACjE,sBAAsB,EAAE,IAAI,CAAC,cAAc,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;gBACvE,YAAY,EAAE,iBAAiB,CAAC,MAAM;gBACtC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;gBAChE,MAAM,EAAE,WAAW;aACtB,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,MAAyB;QACpD,IAAI,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;YACxF,mFAAmF;YACnF,OAAO,IAAI,CAAA;QACf,CAAC;QAED,OAAO,KAAK,CAAA;IAChB,CAAC;CACJ;AAxSD,4CAwSC"}
@@ -79,20 +79,19 @@ export declare class ChatDatabase {
79
79
  /**
80
80
  * Fixes the history to maintain the following invariants:
81
81
  * 1. The history contains at most MaxConversationHistoryMessages messages. Oldest messages are dropped.
82
- * 2. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped.
83
- * 3. The first message is from the user. Oldest messages are dropped if needed.
84
- * 4. The last message is from the assistant. The last message is dropped if it is from the user.
85
- * 5. If the last message is from the assistant and it contains tool uses, and a next user
86
- * message is set without tool results, then the user message will have cancelled tool results.
82
+ * 2. The first message is from the user. Oldest messages are dropped if needed.
83
+ * 3. The last message is from the assistant. The last message is dropped if it is from the user.
84
+ * 4. The history contains alternating sequene of userMessage followed by assistantMessages
85
+ * 5. The toolUse and toolResult relationship is valid
86
+ * 6. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped.
87
87
  */
88
- fixHistory(tabId: string, newUserMessage: ChatMessage, conversationId: string): boolean;
88
+ fixAndValidateHistory(tabId: string, newUserMessage: ChatMessage, conversationId: string, remainingCharacterBudget: number): boolean;
89
89
  private trimHistoryToMaxLength;
90
90
  private findIndexToTrim;
91
91
  private isValidUserMessageWithoutToolResults;
92
92
  private handleEmptyAssistantMessage;
93
93
  private trimMessagesToMaxLength;
94
94
  private calculateHistoryCharacterCount;
95
- private calculateCurrentMessageCharacterCount;
96
- private ensureValidMessageSequence;
97
- private validateToolUses;
95
+ ensureValidMessageSequence(messages: Message[], newUserMessage: ChatMessage): void;
96
+ validateNewMessageToolResults(messages: Message[], newUserMessage: ChatMessage): boolean;
98
97
  }
@@ -12,8 +12,6 @@ const path = require("path");
12
12
  const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
13
13
  const path_1 = require("@aws/lsp-core/out/util/path");
14
14
  exports.EMPTY_CONVERSATION_LIST_ID = 'empty';
15
- // Maximum number of characters to keep in history
16
- const MaxConversationHistoryCharacters = 600_000;
17
15
  // Maximum number of messages to keep in history
18
16
  const MaxConversationHistoryMessages = 250;
19
17
  /**
@@ -83,8 +81,9 @@ class ChatDatabase {
83
81
  * Generates an identifier for the open workspace folder(s).
84
82
  */
85
83
  getWorkspaceIdentifier() {
86
- let clientParams = this.#features.lsp.getClientInitializeParams();
87
- let workspaceFolderPaths = clientParams?.workspaceFolders?.map(({ uri }) => new URL(uri).pathname);
84
+ let workspaceFolderPaths = this.#features.workspace
85
+ .getAllWorkspaceFolders()
86
+ ?.map(({ uri }) => new URL(uri).pathname);
88
87
  // Case 1: Multi-root workspace (unsaved)
89
88
  if (workspaceFolderPaths && workspaceFolderPaths.length > 1) {
90
89
  // Create hash from all folder paths combined
@@ -330,13 +329,13 @@ class ChatDatabase {
330
329
  /**
331
330
  * Fixes the history to maintain the following invariants:
332
331
  * 1. The history contains at most MaxConversationHistoryMessages messages. Oldest messages are dropped.
333
- * 2. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped.
334
- * 3. The first message is from the user. Oldest messages are dropped if needed.
335
- * 4. The last message is from the assistant. The last message is dropped if it is from the user.
336
- * 5. If the last message is from the assistant and it contains tool uses, and a next user
337
- * message is set without tool results, then the user message will have cancelled tool results.
332
+ * 2. The first message is from the user. Oldest messages are dropped if needed.
333
+ * 3. The last message is from the assistant. The last message is dropped if it is from the user.
334
+ * 4. The history contains alternating sequene of userMessage followed by assistantMessages
335
+ * 5. The toolUse and toolResult relationship is valid
336
+ * 6. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped.
338
337
  */
339
- fixHistory(tabId, newUserMessage, conversationId) {
338
+ fixAndValidateHistory(tabId, newUserMessage, conversationId, remainingCharacterBudget) {
340
339
  if (!this.#initialized) {
341
340
  return true;
342
341
  }
@@ -356,12 +355,12 @@ class ChatDatabase {
356
355
  allMessages = this.trimHistoryToMaxLength(allMessages);
357
356
  // Drop empty assistant partial if it’s the last message
358
357
  this.handleEmptyAssistantMessage(allMessages);
359
- // Make sure max characters ≤ MaxConversationHistoryCharacters - newUserMessageCharacterCount
360
- allMessages = this.trimMessagesToMaxLength(allMessages, newUserMessage);
361
358
  // Ensure messages in history a valid for server side checks
362
- this.ensureValidMessageSequence(allMessages);
363
- // If the last message is from the assistant and it contains tool uses, and a next user message is set without tool results, then the user message will have cancelled tool results.
364
- const isValid = this.validateToolUses(allMessages, newUserMessage);
359
+ this.ensureValidMessageSequence(allMessages, newUserMessage);
360
+ // Ensure lastMessage in history toolUse and newMessage toolResult relationship is valid
361
+ const isValid = this.validateNewMessageToolResults(allMessages, newUserMessage);
362
+ // Make sure max characters ≤ remaining Character Budget
363
+ allMessages = this.trimMessagesToMaxLength(allMessages, remainingCharacterBudget);
365
364
  const clientType = this.#features.lsp.getClientInitializeParams()?.clientInfo?.name || 'unknown';
366
365
  tabData.conversations = [
367
366
  {
@@ -404,7 +403,7 @@ class ChatDatabase {
404
403
  return !!ctx && (!ctx.toolResults || ctx.toolResults.length === 0) && message.body !== '';
405
404
  }
406
405
  handleEmptyAssistantMessage(messages) {
407
- if (messages.length === 0) {
406
+ if (messages.length < 2) {
408
407
  return;
409
408
  }
410
409
  const lastMsg = messages[messages.length - 1];
@@ -415,12 +414,11 @@ class ChatDatabase {
415
414
  messages.splice(-2);
416
415
  }
417
416
  }
418
- trimMessagesToMaxLength(messages, newUserMessage) {
417
+ trimMessagesToMaxLength(messages, remainingCharacterBudget) {
419
418
  let totalCharacters = this.calculateHistoryCharacterCount(messages);
420
419
  this.#features.logging.debug(`Current history characters: ${totalCharacters}`);
421
- const currentUserInputCharacterCount = this.calculateCurrentMessageCharacterCount((0, util_1.chatMessageToMessage)(newUserMessage));
422
- this.#features.logging.debug(`Current user message characters: ${currentUserInputCharacterCount}`);
423
- const maxHistoryCharacterSize = Math.max(0, MaxConversationHistoryCharacters - currentUserInputCharacterCount);
420
+ this.#features.logging.debug(`Current remaining character budget: ${remainingCharacterBudget}`);
421
+ const maxHistoryCharacterSize = Math.max(0, remainingCharacterBudget);
424
422
  while (totalCharacters > maxHistoryCharacterSize && messages.length > 2) {
425
423
  // Find the next valid user message to start from
426
424
  const indexToTrim = this.findIndexToTrim(messages);
@@ -483,64 +481,10 @@ class ChatDatabase {
483
481
  }
484
482
  return count;
485
483
  }
486
- calculateCurrentMessageCharacterCount(message) {
487
- let count = 0;
488
- // Count characters of message text
489
- count += message.body.length;
490
- // Count characters in tool uses
491
- if (message.toolUses) {
492
- try {
493
- for (const toolUse of message.toolUses) {
494
- count += JSON.stringify(toolUse).length;
495
- }
496
- }
497
- catch (e) {
498
- this.#features.logging.error(`Error counting toolUses: ${String(e)}`);
499
- }
500
- }
501
- // Count characters in tool results
502
- if (message.userInputMessageContext?.toolResults) {
503
- try {
504
- for (const toolResul of message.userInputMessageContext.toolResults) {
505
- count += JSON.stringify(toolResul).length;
506
- }
507
- }
508
- catch (e) {
509
- this.#features.logging.error(`Error counting toolResults: ${String(e)}`);
510
- }
511
- }
512
- // Count characters in tool spec for the current user message
513
- if (message.userInputMessageContext?.tools) {
514
- try {
515
- for (const toolSpec of message.userInputMessageContext.tools) {
516
- count += JSON.stringify(toolSpec).length;
517
- }
518
- }
519
- catch (e) {
520
- this.#features.logging.error(`Error counting tool spec length: ${String(e)}`);
521
- }
522
- }
523
- if (message.userInputMessageContext?.additionalContext) {
524
- try {
525
- for (const addtionalContext of message.userInputMessageContext.additionalContext) {
526
- count += JSON.stringify(addtionalContext).length;
527
- }
528
- }
529
- catch (e) {
530
- this.#features.logging.error(`Error counting addtionalContext length: ${String(e)}`);
531
- }
532
- }
533
- if (message.userInputMessageContext?.editorState) {
534
- try {
535
- count += JSON.stringify(message.userInputMessageContext?.editorState).length;
536
- }
537
- catch (e) {
538
- this.#features.logging.error(`Error counting editorState length: ${String(e)}`);
539
- }
484
+ ensureValidMessageSequence(messages, newUserMessage) {
485
+ if (messages.length === 0) {
486
+ return;
540
487
  }
541
- return count;
542
- }
543
- ensureValidMessageSequence(messages) {
544
488
  // Make sure the first stored message is from the user (type === 'prompt'), else drop
545
489
  while (messages.length > 0 && messages[0].type === 'answer') {
546
490
  messages.shift();
@@ -551,64 +495,54 @@ class ChatDatabase {
551
495
  messages.pop();
552
496
  this.#features.logging.debug('Dropped trailing user message');
553
497
  }
554
- }
555
- validateToolUses(messages, newUserMessage) {
556
498
  if (messages.length === 0) {
557
- if (newUserMessage.userInputMessage?.userInputMessageContext?.toolResults) {
558
- this.#features.logging.debug('No history message found, but new user message has tool results.');
559
- newUserMessage.userInputMessage.userInputMessageContext.toolResults = undefined;
560
- // tool results are empty, so content must not be empty
561
- newUserMessage.userInputMessage.content = 'Conversation history was too large, so it was cleared.';
562
- }
563
- return true;
499
+ return;
564
500
  }
565
- const lastMsg = messages[messages.length - 1];
566
- const toolResults = newUserMessage.userInputMessage?.userInputMessageContext?.toolResults;
567
- if (toolResults && toolResults.length > 0) {
501
+ // Make sure there are alternating user and assistant messages
502
+ const currentMessageType = (0, util_1.chatMessageToMessage)(newUserMessage).type;
503
+ const lastMessageType = messages[messages.length - 1].type;
504
+ if (currentMessageType === lastMessageType) {
505
+ this.#features.logging.warn(`Invalid alternation: last message is ${lastMessageType}, dropping it before inserting new ${currentMessageType}`);
506
+ messages.splice(messages.length - 1, 1);
507
+ }
508
+ }
509
+ validateNewMessageToolResults(messages, newUserMessage) {
510
+ if (newUserMessage?.userInputMessage?.userInputMessageContext) {
511
+ const newUserMessageContext = newUserMessage.userInputMessage.userInputMessageContext;
512
+ const toolResults = newUserMessageContext.toolResults || [];
513
+ if (messages.length === 0) {
514
+ if (toolResults && toolResults.length > 0) {
515
+ this.#features.logging.warn('New message has tool results but last message has no tool uses');
516
+ return false;
517
+ }
518
+ return true;
519
+ }
520
+ const lastMsg = messages[messages.length - 1];
521
+ const lastMsgToolUses = lastMsg?.toolUses || [];
568
522
  // If last message has no tool uses but new message has tool results, this is invalid
569
- if (!lastMsg.toolUses || lastMsg.toolUses.length === 0) {
523
+ if (toolResults && toolResults.length > 0 && lastMsgToolUses.length === 0) {
570
524
  this.#features.logging.warn('New message has tool results but last message has no tool uses');
571
525
  return false;
572
526
  }
573
- const toolUseIds = new Set(lastMsg.toolUses.map(toolUse => toolUse.toolUseId));
527
+ const toolUseIds = new Set(lastMsgToolUses.map(toolUse => toolUse.toolUseId));
574
528
  const validToolResults = toolResults.filter(toolResult => toolUseIds.has(toolResult.toolUseId));
575
- const invalidToolResults = toolResults.filter(toolResult => !toolUseIds.has(toolResult.toolUseId));
576
- if (invalidToolResults.length > 0) {
577
- this.#features.logging.warn(`Found ${invalidToolResults.length} tool results without matching tool uses, marking them as cancelled`);
578
- // Mark invalid tool results as cancelled
579
- for (const invalidResult of invalidToolResults) {
580
- invalidResult.status = codewhisperer_streaming_1.ToolResultStatus.ERROR;
581
- invalidResult.content = [
582
- {
583
- text: 'Tool use was cancelled by the user',
584
- },
585
- ];
586
- }
587
- // Update the tool results in the message
588
- if (newUserMessage.userInputMessage?.userInputMessageContext) {
589
- newUserMessage.userInputMessage.userInputMessageContext.toolResults = [
590
- ...validToolResults,
591
- ...invalidToolResults,
592
- ];
593
- }
594
- }
595
- }
596
- if (lastMsg.toolUses && lastMsg.toolUses.length > 0) {
597
- if (!toolResults || toolResults.length === 0) {
598
- this.#features.logging.debug(`No tools results in last user message following a tool use message from assisstant, marking as canceled`);
599
- if (newUserMessage.userInputMessage?.userInputMessageContext) {
600
- newUserMessage.userInputMessage.userInputMessageContext.toolResults = lastMsg.toolUses.map(toolUse => ({
529
+ if (validToolResults.length < toolUseIds.size) {
530
+ // Add cancelled tool results for missing IDs
531
+ const missingToolUses = lastMsgToolUses.filter(toolUses => !validToolResults.some(toolResults => toolResults.toolUseId === toolUses.toolUseId));
532
+ for (const toolUse of missingToolUses) {
533
+ this.#features.logging.warn(`newUserMessage missing ToolResult for ${toolUse.toolUseId}. Inserting cancelled.`);
534
+ validToolResults.push({
601
535
  toolUseId: toolUse.toolUseId,
602
- content: [
603
- {
604
- type: 'Text',
605
- text: 'Tool use was cancelled by the user',
606
- },
607
- ],
608
536
  status: codewhisperer_streaming_1.ToolResultStatus.ERROR,
609
- }));
537
+ content: [{ text: 'Tool use was cancelled by the user' }],
538
+ });
610
539
  }
611
540
  }
541
+ newUserMessageContext.toolResults = validToolResults;
542
+ if (newUserMessageContext.toolResults.length === 0 &&
543
+ (!newUserMessage.userInputMessage.content || newUserMessage.userInputMessage.content?.trim() == '')) {
544
+ return false;
545
+ }
612
546
  }
613
547
  return true;
614
548
  }