@aws/lsp-codewhisperer 0.0.31 → 0.0.33

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 (743) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/README.md +18 -1
  3. package/node_modules/@amzn/amazon-q-developer-streaming-client/LICENSE +201 -0
  4. package/node_modules/@amzn/amazon-q-developer-streaming-client/README.md +864 -0
  5. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/QDeveloperStreaming.js +15 -0
  6. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/QDeveloperStreamingClient.js +49 -0
  7. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  8. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/auth/httpAuthSchemeProvider.js +50 -0
  9. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/GenerateCodeFromCommandsCommand.js +26 -0
  10. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/SendMessageCommand.js +26 -0
  11. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/index.js +5 -0
  12. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoints.js +211 -0
  13. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/extensionConfiguration.js +2 -0
  14. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/index.js +10 -0
  15. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/QDeveloperStreamingServiceException.js +12 -0
  16. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/index.js +4 -0
  17. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/models_0.js +1051 -0
  18. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/protocols/Aws_json1_0.js +597 -0
  19. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.browser.js +40 -0
  20. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.js +48 -0
  21. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.native.js +15 -0
  22. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.shared.js +32 -0
  23. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeExtensions.js +25 -0
  24. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/QDeveloperStreaming.js +11 -0
  25. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/QDeveloperStreamingClient.js +45 -0
  26. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  27. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/auth/httpAuthSchemeProvider.js +44 -0
  28. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/GenerateCodeFromCommandsCommand.js +22 -0
  29. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/SendMessageCommand.js +22 -0
  30. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/index.js +2 -0
  31. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoints.js +207 -0
  32. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/index.js +5 -0
  33. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/QDeveloperStreamingServiceException.js +8 -0
  34. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/index.js +1 -0
  35. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/models_0.js +963 -0
  36. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/protocols/Aws_json1_0.js +590 -0
  37. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.browser.js +35 -0
  38. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.js +43 -0
  39. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.native.js +11 -0
  40. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.shared.js +28 -0
  41. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeExtensions.js +21 -0
  42. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/QDeveloperStreaming.d.ts +23 -0
  43. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/QDeveloperStreamingClient.d.ts +196 -0
  44. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  45. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  46. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/GenerateCodeFromCommandsCommand.d.ts +102 -0
  47. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/SendMessageCommand.d.ts +796 -0
  48. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/index.d.ts +2 -0
  49. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoints.d.ts +2 -0
  50. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/extensionConfiguration.d.ts +9 -0
  51. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/index.d.ts +7 -0
  52. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/QDeveloperStreamingServiceException.d.ts +14 -0
  53. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/index.d.ts +1 -0
  54. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/models_0.d.ts +2985 -0
  55. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/protocols/Aws_json1_0.d.ts +20 -0
  56. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.browser.d.ts +47 -0
  57. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.d.ts +47 -0
  58. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.native.d.ts +46 -0
  59. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.shared.d.ts +19 -0
  60. package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeExtensions.d.ts +17 -0
  61. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/README.md +4 -0
  62. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-cjs/index.js +294 -0
  63. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/auth.js +1 -0
  64. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/checksum.js +1 -0
  65. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/client.js +1 -0
  66. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/command.js +1 -0
  67. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/connection.js +1 -0
  68. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/credentials.js +1 -0
  69. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/crypto.js +1 -0
  70. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/dns.js +5 -0
  71. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/encode.js +1 -0
  72. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/endpoint.js +1 -0
  73. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/eventStream.js +1 -0
  74. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/extensions/index.js +1 -0
  75. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/feature-ids.js +1 -0
  76. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/http.js +1 -0
  77. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js +1 -0
  78. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js +1 -0
  79. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/Identity.js +1 -0
  80. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js +1 -0
  81. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js +1 -0
  82. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/index.js +5 -0
  83. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/index.js +33 -0
  84. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/logger.js +1 -0
  85. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/middleware.js +1 -0
  86. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/pagination.js +1 -0
  87. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/profile.js +1 -0
  88. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/request.js +1 -0
  89. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/response.js +1 -0
  90. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/retry.js +1 -0
  91. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/serde.js +1 -0
  92. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/shapes.js +1 -0
  93. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/signature.js +1 -0
  94. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/stream.js +1 -0
  95. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/token.js +1 -0
  96. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/transfer.js +1 -0
  97. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/uri.js +1 -0
  98. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/util.js +1 -0
  99. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/waiter.js +1 -0
  100. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/abort.d.ts +1 -0
  101. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/auth.d.ts +1 -0
  102. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts +2 -0
  103. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +1 -0
  104. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/client.d.ts +1 -0
  105. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/command.d.ts +1 -0
  106. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/connection.d.ts +1 -0
  107. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +50 -0
  108. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +1 -0
  109. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/dns.d.ts +85 -0
  110. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/encode.d.ts +1 -0
  111. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +1 -0
  112. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts +1 -0
  113. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts +8 -0
  114. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +59 -0
  115. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/http.d.ts +33 -0
  116. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts +6 -0
  117. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +47 -0
  118. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts +1 -0
  119. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts +18 -0
  120. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +1 -0
  121. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts +5 -0
  122. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/index.d.ts +33 -0
  123. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/logger.d.ts +22 -0
  124. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +13 -0
  125. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/pagination.d.ts +1 -0
  126. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/profile.d.ts +1 -0
  127. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/request.d.ts +7 -0
  128. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/response.d.ts +7 -0
  129. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/retry.d.ts +1 -0
  130. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/serde.d.ts +24 -0
  131. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/shapes.d.ts +1 -0
  132. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/signature.d.ts +1 -0
  133. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/stream.d.ts +1 -0
  134. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/token.d.ts +17 -0
  135. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/transfer.d.ts +1 -0
  136. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts +1 -0
  137. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts +5 -0
  138. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts +2 -0
  139. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts +1 -0
  140. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts +1 -0
  141. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts +1 -0
  142. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts +6 -0
  143. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +13 -0
  144. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts +7 -0
  145. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts +19 -0
  146. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts +6 -0
  147. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +9 -0
  148. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts +24 -0
  149. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts +5 -0
  150. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +54 -0
  151. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts +17 -0
  152. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts +2 -0
  153. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +25 -0
  154. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts +1 -0
  155. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts +6 -0
  156. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts +1 -0
  157. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts +5 -0
  158. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +33 -0
  159. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts +15 -0
  160. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +47 -0
  161. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts +1 -0
  162. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts +6 -0
  163. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts +4 -0
  164. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts +4 -0
  165. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts +12 -0
  166. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts +16 -0
  167. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts +6 -0
  168. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts +15 -0
  169. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts +4 -0
  170. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts +4 -0
  171. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts +7 -0
  172. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts +1 -0
  173. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts +14 -0
  174. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts +1 -0
  175. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/uri.d.ts +1 -0
  176. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/util.d.ts +1 -0
  177. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/waiter.d.ts +1 -0
  178. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/package.json +56 -0
  179. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/LICENSE +201 -0
  180. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/README.md +4 -0
  181. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/index.js +84 -0
  182. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/AbortController.js +9 -0
  183. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js +20 -0
  184. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/index.js +2 -0
  185. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts +16 -0
  186. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts +21 -0
  187. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/index.d.ts +9 -0
  188. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts +16 -0
  189. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts +21 -0
  190. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts +9 -0
  191. package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller}/package.json +21 -31
  192. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/LICENSE +201 -0
  193. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/README.md +9 -0
  194. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/index.js +806 -0
  195. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js +1 -0
  196. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
  197. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
  198. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
  199. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +209 -0
  200. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +86 -0
  201. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
  202. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +167 -0
  203. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +19 -0
  204. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +88 -0
  205. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
  206. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
  207. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +24 -0
  208. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +11 -0
  209. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
  210. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +19 -0
  211. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
  212. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +56 -0
  213. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
  214. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
  215. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
  216. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
  217. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +25 -0
  218. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +13 -0
  219. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +62 -0
  220. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +15 -0
  221. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +12 -0
  222. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +9 -0
  223. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +13 -0
  224. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +9 -0
  225. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +8 -0
  226. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +6 -0
  227. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +15 -0
  228. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
  229. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
  230. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
  231. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
  232. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +46 -0
  233. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +25 -0
  234. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +13 -0
  235. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +62 -0
  236. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +13 -0
  237. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +12 -0
  238. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +3 -0
  239. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +7 -0
  240. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +3 -0
  241. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +6 -0
  242. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +6 -0
  243. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +13 -0
  244. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
  245. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
  246. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +13 -0
  247. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/package.json +67 -0
  248. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/CHANGELOG.md +274 -0
  249. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/CONTRIBUTING.md +18 -0
  250. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/LICENSE.md +9 -0
  251. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/README.md +466 -0
  252. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/bin/uuid +2 -0
  253. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  254. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  255. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  256. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  257. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  258. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  259. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  260. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  261. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  262. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  263. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  264. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  265. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  266. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  267. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  268. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  269. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/index.js +9 -0
  270. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  271. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/native.js +4 -0
  272. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  273. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  274. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  275. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/rng.js +18 -0
  276. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  277. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
  278. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  279. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  280. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v35.js +66 -0
  281. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v4.js +29 -0
  282. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  283. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  284. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/version.js +11 -0
  285. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/index.js +9 -0
  286. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/md5.js +13 -0
  287. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/native.js +4 -0
  288. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/nil.js +1 -0
  289. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/parse.js +35 -0
  290. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/regex.js +1 -0
  291. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/rng.js +12 -0
  292. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  293. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/stringify.js +33 -0
  294. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v1.js +95 -0
  295. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v3.js +4 -0
  296. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v35.js +66 -0
  297. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v4.js +29 -0
  298. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v5.js +4 -0
  299. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/validate.js +7 -0
  300. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/version.js +11 -0
  301. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/index.js +79 -0
  302. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/md5-browser.js +223 -0
  303. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/md5.js +23 -0
  304. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/native-browser.js +11 -0
  305. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/native.js +15 -0
  306. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/nil.js +8 -0
  307. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/parse.js +45 -0
  308. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/regex.js +8 -0
  309. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/rng-browser.js +25 -0
  310. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/rng.js +24 -0
  311. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/sha1-browser.js +104 -0
  312. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/sha1.js +23 -0
  313. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/stringify.js +44 -0
  314. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/uuid-bin.js +85 -0
  315. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v1.js +107 -0
  316. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v3.js +16 -0
  317. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v35.js +80 -0
  318. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v4.js +43 -0
  319. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v5.js +16 -0
  320. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/validate.js +17 -0
  321. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/version.js +21 -0
  322. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/package.json +135 -0
  323. package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/wrapper.mjs +10 -0
  324. package/node_modules/@amzn/amazon-q-developer-streaming-client/package.json +88 -0
  325. package/node_modules/@amzn/codewhisperer-streaming/README.md +121 -1
  326. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/CodeWhispererStreamingClient.js +1 -0
  327. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/endpoints.js +2 -0
  328. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/models/models_0.js +266 -42
  329. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +205 -3
  330. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.browser.js +1 -1
  331. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.js +8 -6
  332. package/node_modules/@amzn/codewhisperer-streaming/dist-es/CodeWhispererStreamingClient.js +1 -0
  333. package/node_modules/@amzn/codewhisperer-streaming/dist-es/endpoints.js +2 -0
  334. package/node_modules/@amzn/codewhisperer-streaming/dist-es/models/models_0.js +241 -33
  335. package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +207 -5
  336. package/node_modules/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.browser.js +2 -2
  337. package/node_modules/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.js +9 -7
  338. package/node_modules/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreamingClient.d.ts +18 -0
  339. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/ExportResultArchiveCommand.d.ts +1 -0
  340. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +168 -8
  341. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +169 -8
  342. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +168 -8
  343. package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +874 -221
  344. package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.browser.d.ts +6 -1
  345. package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.d.ts +3 -1
  346. package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.native.d.ts +3 -1
  347. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +25 -17
  348. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +12 -3
  349. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +3 -3
  350. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +6 -8
  351. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +6 -2
  352. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +1 -0
  353. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +3 -1
  354. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +4 -3
  355. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +8 -3
  356. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +6 -2
  357. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +5 -1
  358. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/package.json +11 -12
  359. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-cjs/index.js +0 -1
  360. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/feature-ids.js +1 -0
  361. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/index.js +1 -0
  362. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +1 -0
  363. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +59 -0
  364. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +47 -1
  365. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/index.d.ts +1 -0
  366. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +12 -0
  367. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +1 -0
  368. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +54 -0
  369. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +21 -0
  370. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +1 -0
  371. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +7 -0
  372. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/package.json +4 -4
  373. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/dist-cjs/index.js +8 -6
  374. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/package.json +6 -6
  375. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-cjs/index.js +41 -39
  376. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +2 -1
  377. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +3 -1
  378. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +2 -2
  379. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +8 -0
  380. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +3 -0
  381. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +6 -1
  382. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +1 -0
  383. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
  384. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +2 -0
  385. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
  386. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -0
  387. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +4 -0
  388. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +1 -0
  389. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +8 -0
  390. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +3 -0
  391. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +6 -1
  392. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +4 -0
  393. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +1 -1
  394. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +1 -1
  395. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/package.json +10 -10
  396. package/node_modules/@amzn/codewhisperer-streaming/package.json +42 -42
  397. package/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +1 -0
  398. package/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +1 -0
  399. package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +1 -0
  400. package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +1 -0
  401. package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-cjs/index.js +8 -30
  402. package/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js +1 -0
  403. package/node_modules/@smithy/protocol-http/dist-cjs/types.js +1 -0
  404. package/node_modules/@smithy/protocol-http/dist-es/httpHandler.js +1 -0
  405. package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/httpRequest.js +8 -13
  406. package/node_modules/@smithy/protocol-http/dist-es/types.js +1 -0
  407. package/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +23 -0
  408. package/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +23 -0
  409. package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/package.json +6 -6
  410. package/out/client/sigv4/codewhisperer.d.ts +2 -2
  411. package/out/client/sigv4/codewhisperer.js +4 -3
  412. package/out/client/sigv4/codewhisperer.js.map +1 -1
  413. package/out/client/streamingClient/codewhispererStreamingClient.d.ts +3 -3
  414. package/out/client/streamingClient/codewhispererStreamingClient.js +4 -3
  415. package/out/client/streamingClient/codewhispererStreamingClient.js.map +1 -1
  416. package/out/client/token/codewhisperer.d.ts +2 -2
  417. package/out/client/token/codewhisperer.js +4 -3
  418. package/out/client/token/codewhisperer.js.map +1 -1
  419. package/out/index.d.ts +1 -0
  420. package/out/index.js +4 -1
  421. package/out/index.js.map +1 -1
  422. package/out/language-server/agenticChat/agenticChatController.d.ts +35 -4
  423. package/out/language-server/agenticChat/agenticChatController.js +1337 -91
  424. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  425. package/out/language-server/agenticChat/agenticChatEventParser.d.ts +52 -0
  426. package/out/language-server/agenticChat/agenticChatEventParser.js +186 -0
  427. package/out/language-server/agenticChat/agenticChatEventParser.js.map +1 -0
  428. package/out/language-server/agenticChat/agenticChatResultStream.d.ts +83 -0
  429. package/out/language-server/agenticChat/agenticChatResultStream.js +176 -0
  430. package/out/language-server/agenticChat/agenticChatResultStream.js.map +1 -0
  431. package/out/language-server/agenticChat/constants.d.ts +4 -0
  432. package/out/language-server/agenticChat/constants.js +8 -0
  433. package/out/language-server/agenticChat/constants.js.map +1 -0
  434. package/out/language-server/agenticChat/context/addtionalContextProvider.d.ts +14 -0
  435. package/out/language-server/agenticChat/context/addtionalContextProvider.js +191 -0
  436. package/out/language-server/agenticChat/context/addtionalContextProvider.js.map +1 -0
  437. package/out/language-server/agenticChat/context/agenticChatTriggerContext.d.ts +54 -0
  438. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js +246 -0
  439. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js.map +1 -0
  440. package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +20 -0
  441. package/out/language-server/agenticChat/context/contextCommandsProvider.js +206 -0
  442. package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -0
  443. package/out/language-server/agenticChat/context/contextUtils.d.ts +27 -0
  444. package/out/language-server/agenticChat/context/contextUtils.js +44 -0
  445. package/out/language-server/agenticChat/context/contextUtils.js.map +1 -0
  446. package/out/language-server/agenticChat/errors.d.ts +10 -0
  447. package/out/language-server/agenticChat/errors.js +42 -0
  448. package/out/language-server/agenticChat/errors.js.map +1 -0
  449. package/out/language-server/agenticChat/qAgenticChatServer.js +42 -15
  450. package/out/language-server/agenticChat/qAgenticChatServer.js.map +1 -1
  451. package/out/language-server/agenticChat/tabBarController.d.ts +55 -0
  452. package/out/language-server/agenticChat/tabBarController.js +216 -0
  453. package/out/language-server/agenticChat/tabBarController.js.map +1 -0
  454. package/out/language-server/agenticChat/textFormatting.d.ts +4 -0
  455. package/out/language-server/agenticChat/textFormatting.js +28 -0
  456. package/out/language-server/agenticChat/textFormatting.js.map +1 -0
  457. package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +89 -0
  458. package/out/language-server/agenticChat/tools/chatDb/chatDb.js +561 -0
  459. package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -0
  460. package/out/language-server/agenticChat/tools/chatDb/util.d.ts +74 -0
  461. package/out/language-server/agenticChat/tools/chatDb/util.js +255 -0
  462. package/out/language-server/agenticChat/tools/chatDb/util.js.map +1 -0
  463. package/out/language-server/agenticChat/tools/codeSearch.d.ts +43 -0
  464. package/out/language-server/agenticChat/tools/codeSearch.js +168 -0
  465. package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -0
  466. package/out/language-server/agenticChat/tools/executeBash.d.ts +70 -0
  467. package/out/language-server/agenticChat/tools/executeBash.js +463 -0
  468. package/out/language-server/agenticChat/tools/executeBash.js.map +1 -0
  469. package/out/language-server/agenticChat/tools/fileSearch.d.ts +45 -0
  470. package/out/language-server/agenticChat/tools/fileSearch.js +115 -0
  471. package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -0
  472. package/out/language-server/agenticChat/tools/fsRead.d.ts +13 -9
  473. package/out/language-server/agenticChat/tools/fsRead.js +68 -22
  474. package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
  475. package/out/language-server/agenticChat/tools/fsWrite.d.ts +21 -12
  476. package/out/language-server/agenticChat/tools/fsWrite.js +127 -44
  477. package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
  478. package/out/language-server/agenticChat/tools/listDirectory.d.ts +36 -0
  479. package/out/language-server/agenticChat/tools/listDirectory.js +110 -0
  480. package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -0
  481. package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.d.ts +100 -0
  482. package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.js +140 -0
  483. package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.js.map +1 -0
  484. package/out/language-server/agenticChat/tools/lspGetDocuments.d.ts +24 -0
  485. package/out/language-server/agenticChat/tools/lspGetDocuments.js +45 -0
  486. package/out/language-server/agenticChat/tools/lspGetDocuments.js.map +1 -0
  487. package/out/language-server/agenticChat/tools/lspReadDocumentContents.d.ts +37 -0
  488. package/out/language-server/agenticChat/tools/lspReadDocumentContents.js +116 -0
  489. package/out/language-server/agenticChat/tools/lspReadDocumentContents.js.map +1 -0
  490. package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +21 -0
  491. package/out/language-server/agenticChat/tools/mcp/mcpManager.js +106 -0
  492. package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -0
  493. package/out/language-server/agenticChat/tools/mcp/mcpTool.d.ts +21 -0
  494. package/out/language-server/agenticChat/tools/mcp/mcpTool.js +54 -0
  495. package/out/language-server/agenticChat/tools/mcp/mcpTool.js.map +1 -0
  496. package/out/language-server/agenticChat/tools/mcp/mcpTypes.d.ts +28 -0
  497. package/out/language-server/agenticChat/tools/mcp/mcpTypes.js +7 -0
  498. package/out/language-server/agenticChat/tools/mcp/mcpTypes.js.map +1 -0
  499. package/out/language-server/agenticChat/tools/mcp/mcpUtils.d.ts +7 -0
  500. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js +78 -0
  501. package/out/language-server/agenticChat/tools/mcp/mcpUtils.js.map +1 -0
  502. package/out/language-server/agenticChat/tools/toolServer.d.ts +3 -0
  503. package/out/language-server/agenticChat/tools/toolServer.js +62 -6
  504. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  505. package/out/language-server/agenticChat/tools/toolShared.d.ts +48 -5
  506. package/out/language-server/agenticChat/tools/toolShared.js +109 -2
  507. package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
  508. package/out/language-server/chat/chatController.d.ts +7 -4
  509. package/out/language-server/chat/chatController.js +13 -18
  510. package/out/language-server/chat/chatController.js.map +1 -1
  511. package/out/language-server/chat/chatEventParser.d.ts +3 -1
  512. package/out/language-server/chat/chatEventParser.js.map +1 -1
  513. package/out/language-server/chat/chatSessionManagementService.d.ts +2 -2
  514. package/out/language-server/chat/chatSessionManagementService.js +4 -4
  515. package/out/language-server/chat/chatSessionManagementService.js.map +1 -1
  516. package/out/language-server/chat/chatSessionService.d.ts +36 -3
  517. package/out/language-server/chat/chatSessionService.js +88 -5
  518. package/out/language-server/chat/chatSessionService.js.map +1 -1
  519. package/out/language-server/chat/constants.d.ts +3 -0
  520. package/out/language-server/chat/constants.js +17 -1
  521. package/out/language-server/chat/constants.js.map +1 -1
  522. package/out/language-server/chat/contexts/documentContext.d.ts +2 -1
  523. package/out/language-server/chat/contexts/documentContext.js +2 -0
  524. package/out/language-server/chat/contexts/documentContext.js.map +1 -1
  525. package/out/language-server/chat/contexts/triggerContext.d.ts +7 -3
  526. package/out/language-server/chat/contexts/triggerContext.js +39 -2
  527. package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
  528. package/out/language-server/chat/qChatServer.d.ts +4 -1
  529. package/out/language-server/chat/qChatServer.js +17 -17
  530. package/out/language-server/chat/qChatServer.js.map +1 -1
  531. package/out/language-server/chat/quickActions.d.ts +2 -0
  532. package/out/language-server/chat/quickActions.js +2 -0
  533. package/out/language-server/chat/quickActions.js.map +1 -1
  534. package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -3
  535. package/out/language-server/chat/telemetry/chatTelemetryController.js +50 -4
  536. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  537. package/out/language-server/chat/tools/relevantTextDocuments.d.ts +3 -0
  538. package/out/language-server/chat/tools/relevantTextDocuments.js +42 -0
  539. package/out/language-server/chat/tools/relevantTextDocuments.js.map +1 -0
  540. package/out/language-server/chat/utils.js +18 -3
  541. package/out/language-server/chat/utils.js.map +1 -1
  542. package/out/language-server/configuration/qConfigurationServer.d.ts +2 -3
  543. package/out/language-server/configuration/qConfigurationServer.js +27 -20
  544. package/out/language-server/configuration/qConfigurationServer.js.map +1 -1
  545. package/out/language-server/inline-completion/auto-trigger/coefficients.json +4 -1
  546. package/out/language-server/inline-completion/codeWhispererServer.d.ts +2 -3
  547. package/out/language-server/inline-completion/codeWhispererServer.js +29 -30
  548. package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
  549. package/out/language-server/localProjectContext/localProjectContextServer.d.ts +2 -0
  550. package/out/language-server/localProjectContext/localProjectContextServer.js +130 -0
  551. package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -0
  552. package/out/language-server/netTransform/artifactManager.js +12 -4
  553. package/out/language-server/netTransform/artifactManager.js.map +1 -1
  554. package/out/language-server/netTransform/metrics.d.ts +2 -0
  555. package/out/language-server/netTransform/metrics.js +26 -1
  556. package/out/language-server/netTransform/metrics.js.map +1 -1
  557. package/out/language-server/netTransform/models.d.ts +2 -0
  558. package/out/language-server/netTransform/models.js.map +1 -1
  559. package/out/language-server/netTransform/netTransformServer.d.ts +2 -4
  560. package/out/language-server/netTransform/netTransformServer.js +21 -16
  561. package/out/language-server/netTransform/netTransformServer.js.map +1 -1
  562. package/out/language-server/netTransform/tests/mockData.js +1 -0
  563. package/out/language-server/netTransform/tests/mockData.js.map +1 -1
  564. package/out/language-server/netTransform/transformHandler.d.ts +6 -5
  565. package/out/language-server/netTransform/transformHandler.js +35 -12
  566. package/out/language-server/netTransform/transformHandler.js.map +1 -1
  567. package/out/language-server/securityScan/codeWhispererSecurityScanServer.js +10 -11
  568. package/out/language-server/securityScan/codeWhispererSecurityScanServer.js.map +1 -1
  569. package/out/language-server/securityScan/types.d.ts +2 -1
  570. package/out/shared/amazonQServer.d.ts +5 -0
  571. package/out/shared/amazonQServer.js +53 -0
  572. package/out/shared/amazonQServer.js.map +1 -0
  573. package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.d.ts +19 -0
  574. package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.js +61 -0
  575. package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.js.map +1 -0
  576. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.d.ts +14 -28
  577. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js +78 -99
  578. package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js.map +1 -1
  579. package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.d.ts +72 -5
  580. package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.js +116 -0
  581. package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.js.map +1 -1
  582. package/out/shared/amazonQServiceManager/configurationUtils.d.ts +13 -1
  583. package/out/shared/amazonQServiceManager/configurationUtils.js +41 -22
  584. package/out/shared/amazonQServiceManager/configurationUtils.js.map +1 -1
  585. package/out/shared/amazonQServiceManager/errors.d.ts +9 -0
  586. package/out/shared/amazonQServiceManager/errors.js +22 -1
  587. package/out/shared/amazonQServiceManager/errors.js.map +1 -1
  588. package/out/shared/amazonQServiceManager/qDeveloperProfiles.d.ts +2 -1
  589. package/out/shared/amazonQServiceManager/qDeveloperProfiles.js +26 -3
  590. package/out/shared/amazonQServiceManager/qDeveloperProfiles.js.map +1 -1
  591. package/out/shared/amazonQServiceManager/testUtils.d.ts +48 -0
  592. package/out/shared/amazonQServiceManager/testUtils.js +112 -0
  593. package/out/shared/amazonQServiceManager/testUtils.js.map +1 -0
  594. package/out/shared/codeWhispererService.d.ts +3 -3
  595. package/out/shared/codeWhispererService.js +4 -4
  596. package/out/shared/codeWhispererService.js.map +1 -1
  597. package/out/shared/constants.d.ts +10 -0
  598. package/out/shared/constants.js +12 -1
  599. package/out/shared/constants.js.map +1 -1
  600. package/out/shared/localProjectContextController.d.ts +56 -0
  601. package/out/shared/localProjectContextController.js +371 -0
  602. package/out/shared/localProjectContextController.js.map +1 -0
  603. package/out/shared/models/constants.d.ts +5 -0
  604. package/out/shared/models/constants.js +6 -1
  605. package/out/shared/models/constants.js.map +1 -1
  606. package/out/shared/models/model.d.ts +2 -1
  607. package/out/shared/proxy-server.d.ts +4 -2
  608. package/out/shared/proxy-server.js +11 -10
  609. package/out/shared/proxy-server.js.map +1 -1
  610. package/out/shared/streamingClientService.d.ts +23 -7
  611. package/out/shared/streamingClientService.js +56 -9
  612. package/out/shared/streamingClientService.js.map +1 -1
  613. package/out/shared/supplementalContextUtil/crossFileContextUtil.d.ts +4 -1
  614. package/out/shared/supplementalContextUtil/crossFileContextUtil.js +73 -17
  615. package/out/shared/supplementalContextUtil/crossFileContextUtil.js.map +1 -1
  616. package/out/shared/supplementalContextUtil/supplementalContextUtil.d.ts +8 -0
  617. package/out/shared/supplementalContextUtil/supplementalContextUtil.js +63 -2
  618. package/out/shared/supplementalContextUtil/supplementalContextUtil.js.map +1 -1
  619. package/out/shared/telemetry/telemetryService.d.ts +16 -2
  620. package/out/shared/telemetry/telemetryService.js +25 -2
  621. package/out/shared/telemetry/telemetryService.js.map +1 -1
  622. package/out/shared/telemetry/types.d.ts +37 -2
  623. package/out/shared/telemetry/types.js +2 -0
  624. package/out/shared/telemetry/types.js.map +1 -1
  625. package/out/shared/telemetryUtils.d.ts +1 -0
  626. package/out/shared/telemetryUtils.js +5 -3
  627. package/out/shared/telemetryUtils.js.map +1 -1
  628. package/out/shared/testUtils.d.ts +2 -1
  629. package/out/shared/testUtils.js +10 -1
  630. package/out/shared/testUtils.js.map +1 -1
  631. package/out/shared/utils.d.ts +30 -0
  632. package/out/shared/utils.js +184 -0
  633. package/out/shared/utils.js.map +1 -1
  634. package/package.json +21 -7
  635. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +0 -53
  636. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +0 -53
  637. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/README.md +0 -105
  638. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +0 -26
  639. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +0 -12
  640. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +0 -12
  641. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +0 -206
  642. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +0 -13
  643. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +0 -18
  644. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js +0 -4
  645. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js +0 -4
  646. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js +0 -22
  647. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js +0 -3
  648. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js +0 -8
  649. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js +0 -8
  650. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js +0 -5
  651. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js +0 -8
  652. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +0 -39
  653. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js +0 -9
  654. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js +0 -14
  655. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +0 -52
  656. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js +0 -6
  657. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js +0 -9
  658. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts +0 -8
  659. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts +0 -2
  660. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts +0 -2
  661. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts +0 -6
  662. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts +0 -5
  663. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts +0 -4
  664. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts +0 -44
  665. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts +0 -6
  666. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts +0 -8
  667. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +0 -26
  668. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts +0 -10
  669. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts +0 -7
  670. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts +0 -2
  671. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts +0 -15
  672. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts +0 -5
  673. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts +0 -8
  674. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts +0 -2
  675. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts +0 -2
  676. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts +0 -6
  677. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts +0 -5
  678. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts +0 -4
  679. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts +0 -44
  680. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts +0 -6
  681. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts +0 -8
  682. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +0 -26
  683. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts +0 -10
  684. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts +0 -7
  685. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts +0 -2
  686. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts +0 -15
  687. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts +0 -5
  688. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts +0 -13
  689. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts +0 -13
  690. package/out/shared/amazonQServiceManager/factories.d.ts +0 -15
  691. package/out/shared/amazonQServiceManager/factories.js +0 -47
  692. package/out/shared/amazonQServiceManager/factories.js.map +0 -1
  693. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/httpHandler.js → amazon-q-developer-streaming-client/dist-es/extensionConfiguration.js} +0 -0
  694. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types}/LICENSE +0 -0
  695. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/types.js → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/abort.js} +0 -0
  696. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js} +0 -0
  697. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Field.js → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js} +0 -0
  698. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Fields.js → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js} +0 -0
  699. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/constants.js} +0 -0
  700. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js} +0 -0
  701. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js} +0 -0
  702. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js} +0 -0
  703. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/types.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js} +0 -0
  704. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js} +0 -0
  705. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js} +0 -0
  706. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js} +0 -0
  707. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js} +0 -0
  708. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js} +0 -0
  709. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js} +0 -0
  710. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js} +0 -0
  711. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/extensions → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector}/index.js +0 -0
  712. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/timing.js} +0 -0
  713. /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js} +0 -0
  714. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/LICENSE +0 -0
  715. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/README.md +0 -0
  716. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js → @smithy/protocol-http/dist-cjs/Field.js} +0 -0
  717. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js → @smithy/protocol-http/dist-cjs/Fields.js} +0 -0
  718. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js → @smithy/protocol-http/dist-cjs/httpHandler.js} +0 -0
  719. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/Field.js +0 -0
  720. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/Fields.js +0 -0
  721. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +0 -0
  722. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/extensions/index.js +0 -0
  723. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/httpResponse.js +0 -0
  724. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/index.js +0 -0
  725. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/isValidHostname.js +0 -0
  726. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/Field.d.ts +0 -0
  727. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/Fields.d.ts +0 -0
  728. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts +0 -0
  729. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/extensions/index.d.ts +0 -0
  730. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/httpHandler.d.ts +0 -0
  731. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/httpResponse.d.ts +0 -0
  732. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/index.d.ts +0 -0
  733. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/isValidHostname.d.ts +0 -0
  734. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/Field.d.ts +0 -0
  735. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/Fields.d.ts +0 -0
  736. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts +0 -0
  737. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/extensions/index.d.ts +0 -0
  738. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/httpHandler.d.ts +0 -0
  739. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/httpResponse.d.ts +0 -0
  740. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/index.d.ts +0 -0
  741. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/isValidHostname.d.ts +0 -0
  742. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/types.d.ts +0 -0
  743. /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/types.d.ts +0 -0
@@ -5,8 +5,10 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AgenticChatController = void 0;
8
+ const path = require("path");
8
9
  const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
9
10
  const protocol_1 = require("@aws/language-server-runtimes/protocol");
11
+ const protocol_2 = require("@aws/language-server-runtimes/protocol");
10
12
  const server_interface_1 = require("@aws/language-server-runtimes/server-interface");
11
13
  const uuid_1 = require("uuid");
12
14
  const types_1 = require("../../shared/telemetry/types");
@@ -16,10 +18,31 @@ const chatTelemetryController_1 = require("../chat/telemetry/chatTelemetryContro
16
18
  const quickActions_1 = require("../chat/quickActions");
17
19
  const metric_1 = require("../../shared/telemetry/metric");
18
20
  const utils_2 = require("../../shared/utils");
19
- const triggerContext_1 = require("../chat/contexts/triggerContext");
20
21
  const constants_1 = require("../chat/constants");
21
22
  const errors_1 = require("../../shared/amazonQServiceManager/errors");
22
23
  const AmazonQTokenServiceManager_1 = require("../../shared/amazonQServiceManager/AmazonQTokenServiceManager");
24
+ const tabBarController_1 = require("./tabBarController");
25
+ const chatDb_1 = require("./tools/chatDb/chatDb");
26
+ const agenticChatEventParser_1 = require("./agenticChatEventParser");
27
+ const agenticChatResultStream_1 = require("./agenticChatResultStream");
28
+ const textFormatting_1 = require("./textFormatting");
29
+ const agenticChatTriggerContext_1 = require("./context/agenticChatTriggerContext");
30
+ const addtionalContextProvider_1 = require("./context/addtionalContextProvider");
31
+ const contextUtils_1 = require("./context/contextUtils");
32
+ const contextCommandsProvider_1 = require("./context/contextCommandsProvider");
33
+ const localProjectContextController_1 = require("../../shared/localProjectContextController");
34
+ const lsp_core_1 = require("@aws/lsp-core");
35
+ const fsRead_1 = require("./tools/fsRead");
36
+ const listDirectory_1 = require("./tools/listDirectory");
37
+ const fsWrite_1 = require("./tools/fsWrite");
38
+ const executeBash_1 = require("./tools/executeBash");
39
+ const toolShared_1 = require("./tools/toolShared");
40
+ const fileSearch_1 = require("./tools/fileSearch");
41
+ const lsp_core_2 = require("@aws/lsp-core");
42
+ const diff_1 = require("diff");
43
+ const constants_2 = require("./constants");
44
+ const vscode_uri_1 = require("vscode-uri");
45
+ const errors_2 = require("./errors");
23
46
  class AgenticChatController {
24
47
  #features;
25
48
  #chatSessionManagementService;
@@ -27,20 +50,202 @@ class AgenticChatController {
27
50
  #triggerContext;
28
51
  #customizationArn;
29
52
  #telemetryService;
30
- #amazonQServiceManager;
31
- constructor(chatSessionManagementService, features, telemetryService, amazonQServiceManager) {
53
+ #serviceManager;
54
+ #tabBarController;
55
+ #chatHistoryDb;
56
+ #additionalContextProvider;
57
+ #contextCommandsProvider;
58
+ #stoppedToolUses = new Set();
59
+ /**
60
+ * Determines the appropriate message ID for a tool use based on tool type and name
61
+ * @param toolType The type of tool being used
62
+ * @param toolUse The tool use object
63
+ * @returns The message ID to use
64
+ */
65
+ #getMessageIdForToolUse(toolType, toolUse) {
66
+ const toolUseId = toolUse.toolUseId;
67
+ // Return plain toolUseId for executeBash, add "_permission" suffix for all other tools
68
+ return toolUse.name === 'executeBash' || toolType === 'executeBash' ? toolUseId : `${toolUseId}_permission`;
69
+ }
70
+ constructor(chatSessionManagementService, features, telemetryService, serviceManager) {
32
71
  this.#features = features;
33
72
  this.#chatSessionManagementService = chatSessionManagementService;
34
- this.#triggerContext = new triggerContext_1.QChatTriggerContext(features.workspace, features.logging);
73
+ this.#triggerContext = new agenticChatTriggerContext_1.AgenticChatTriggerContext(features);
35
74
  this.#telemetryController = new chatTelemetryController_1.ChatTelemetryController(features, telemetryService);
36
75
  this.#telemetryService = telemetryService;
37
- this.#amazonQServiceManager = amazonQServiceManager;
76
+ this.#serviceManager = serviceManager;
77
+ this.#chatHistoryDb = new chatDb_1.ChatDatabase(features);
78
+ this.#tabBarController = new tabBarController_1.TabBarController(features, this.#chatHistoryDb);
79
+ this.#additionalContextProvider = new addtionalContextProvider_1.AdditionalContextProvider(features.workspace, features.lsp);
80
+ this.#contextCommandsProvider = new contextCommandsProvider_1.ContextCommandsProvider(this.#features.logging, this.#features.chat, this.#features.workspace, this.#features.lsp);
81
+ }
82
+ async onButtonClick(params) {
83
+ this.#log(`onButtonClick event with params: ${JSON.stringify(params)}`);
84
+ const session = this.#chatSessionManagementService.getSession(params.tabId);
85
+ if (params.buttonId === 'run-shell-command' ||
86
+ params.buttonId === 'reject-shell-command' ||
87
+ params.buttonId === 'allow-tools') {
88
+ if (!session.data) {
89
+ return { success: false, failureReason: `could not find chat session for tab: ${params.tabId} ` };
90
+ }
91
+ // For 'allow-tools', remove suffix as permission card needs to be seperate from file list card
92
+ const messageId = params.buttonId === 'allow-tools' && params.messageId.endsWith('_permission')
93
+ ? params.messageId.replace('_permission', '')
94
+ : params.messageId;
95
+ const handler = session.data.getDeferredToolExecution(messageId);
96
+ if (!handler?.reject || !handler.resolve) {
97
+ return {
98
+ success: false,
99
+ failureReason: `could not find deferred tool execution for message: ${messageId} `,
100
+ };
101
+ }
102
+ params.buttonId === 'reject-shell-command'
103
+ ? (() => {
104
+ handler.reject(new toolShared_1.ToolApprovalException('Command was rejected.', true));
105
+ this.#stoppedToolUses.add(messageId);
106
+ })()
107
+ : handler.resolve();
108
+ return {
109
+ success: true,
110
+ };
111
+ }
112
+ else if (params.buttonId === 'undo-changes') {
113
+ const toolUseId = params.messageId;
114
+ try {
115
+ await this.#undoFileChange(toolUseId, session.data);
116
+ this.#updateUndoButtonAfterClick(params.tabId, toolUseId, session.data);
117
+ this.#telemetryController.emitInteractWithAgenticChat('RejectDiff', params.tabId);
118
+ }
119
+ catch (err) {
120
+ return { success: false, failureReason: err.message };
121
+ }
122
+ return {
123
+ success: true,
124
+ };
125
+ }
126
+ else if (params.buttonId === 'undo-all-changes') {
127
+ const toolUseId = params.messageId.replace('_undoall', '');
128
+ await this.#undoAllFileChanges(params.tabId, toolUseId, session.data);
129
+ return {
130
+ success: true,
131
+ };
132
+ }
133
+ else if (params.buttonId === 'stop-shell-command') {
134
+ this.#stoppedToolUses.add(params.messageId);
135
+ await this.#renderStoppedShellCommand(params.tabId, params.messageId);
136
+ return { success: true };
137
+ }
138
+ else {
139
+ return {
140
+ success: false,
141
+ failureReason: 'not implemented',
142
+ };
143
+ }
144
+ }
145
+ async #undoFileChange(toolUseId, session) {
146
+ this.#log(`Reverting file change for tooluseId: ${toolUseId}`);
147
+ const toolUse = session?.toolUseLookup.get(toolUseId);
148
+ const input = toolUse?.input;
149
+ if (toolUse?.fileChange?.before) {
150
+ await this.#features.workspace.fs.writeFile(input.path, toolUse.fileChange.before);
151
+ }
152
+ else {
153
+ await this.#features.workspace.fs.rm(input.path);
154
+ }
155
+ }
156
+ #updateUndoButtonAfterClick(tabId, toolUseId, session) {
157
+ const cachedToolUse = session?.toolUseLookup.get(toolUseId);
158
+ if (!cachedToolUse) {
159
+ return;
160
+ }
161
+ const fileList = cachedToolUse.chatResult?.header?.fileList;
162
+ const button = cachedToolUse.chatResult?.header?.buttons?.filter(button => button.id !== 'undo-changes');
163
+ const updatedHeader = {
164
+ ...cachedToolUse.chatResult?.header,
165
+ buttons: button,
166
+ status: {
167
+ status: 'error',
168
+ icon: 'cancel',
169
+ text: 'Change discarded',
170
+ },
171
+ muted: true,
172
+ };
173
+ if (fileList && fileList.filePaths && fileList.details) {
174
+ const updatedFileList = {
175
+ ...fileList,
176
+ muted: true,
177
+ };
178
+ const updatedDetails = { ...fileList.details };
179
+ for (const filePath of fileList.filePaths) {
180
+ if (updatedDetails[filePath]) {
181
+ ;
182
+ updatedDetails[filePath] = {
183
+ ...updatedDetails[filePath],
184
+ clickable: false,
185
+ };
186
+ }
187
+ }
188
+ updatedFileList.details = updatedDetails;
189
+ updatedHeader.fileList = updatedFileList;
190
+ }
191
+ this.#features.chat.sendChatUpdate({
192
+ tabId,
193
+ data: {
194
+ messages: [
195
+ {
196
+ ...cachedToolUse.chatResult,
197
+ header: updatedHeader,
198
+ },
199
+ ],
200
+ },
201
+ });
202
+ }
203
+ async #undoAllFileChanges(tabId, toolUseId, session) {
204
+ this.#log(`Reverting all file changes starting from ${toolUseId}`);
205
+ const toUndo = session?.toolUseLookup.get(toolUseId)?.relatedToolUses;
206
+ if (!toUndo) {
207
+ return;
208
+ }
209
+ for (const messageId of [...toUndo].reverse()) {
210
+ await this.onButtonClick({ buttonId: 'undo-changes', messageId, tabId });
211
+ }
212
+ }
213
+ async onCreatePrompt(params) {
214
+ const newFilePath = (0, contextUtils_1.getNewPromptFilePath)(params.promptName);
215
+ const newFileContent = '';
216
+ try {
217
+ await this.#features.workspace.fs.mkdir((0, contextUtils_1.getUserPromptsDirectory)(), { recursive: true });
218
+ await this.#features.workspace.fs.writeFile(newFilePath, newFileContent, { mode: 0o600 });
219
+ await this.#features.lsp.window.showDocument({ uri: vscode_uri_1.URI.file(newFilePath).toString() });
220
+ }
221
+ catch (e) {
222
+ this.#features.logging.warn(`Error creating prompt file: ${e}`);
223
+ }
38
224
  }
39
225
  dispose() {
40
226
  this.#chatSessionManagementService.dispose();
41
227
  this.#telemetryController.dispose();
228
+ this.#chatHistoryDb.close();
229
+ this.#contextCommandsProvider?.dispose();
230
+ }
231
+ async onListConversations(params) {
232
+ return this.#tabBarController.onListConversations(params);
233
+ }
234
+ async onConversationClick(params) {
235
+ return this.#tabBarController.onConversationClick(params);
236
+ }
237
+ async #sendProgressToClient(chunk, partialResultToken) {
238
+ if (!(0, utils_2.isNullish)(partialResultToken)) {
239
+ await this.#features.lsp.sendProgress(protocol_1.chatRequestType, partialResultToken, chunk);
240
+ }
241
+ }
242
+ #getChatResultStream(partialResultToken) {
243
+ return new agenticChatResultStream_1.AgenticChatResultStream(async (result) => {
244
+ return this.#sendProgressToClient(result, partialResultToken);
245
+ });
42
246
  }
43
247
  async onChatPrompt(params, token) {
248
+ // Phase 1: Initial Setup - This happens only once
44
249
  const maybeDefaultResponse = (0, utils_1.getDefaultChatResponse)(params.prompt.prompt);
45
250
  if (maybeDefaultResponse) {
46
251
  return maybeDefaultResponse;
@@ -48,92 +253,974 @@ class AgenticChatController {
48
253
  const sessionResult = this.#chatSessionManagementService.getSession(params.tabId);
49
254
  const { data: session, success } = sessionResult;
50
255
  if (!success) {
51
- return new server_interface_1.ResponseError(protocol_1.ErrorCodes.InternalError, sessionResult.error);
256
+ return new server_interface_1.ResponseError(protocol_2.ErrorCodes.InternalError, sessionResult.error);
52
257
  }
258
+ session.rejectAllDeferredToolExecutions(new toolShared_1.ToolApprovalException('Command ignored: new prompt', false));
259
+ await this.#invalidateAllShellCommands(params.tabId, session);
53
260
  const metric = new metric_1.Metric({
54
- cwsprChatConversationType: 'Chat',
261
+ cwsprChatConversationType: 'AgenticChat',
55
262
  });
56
- const triggerContext = await this.#getTriggerContext(params, metric);
57
- const isNewConversation = !session.conversationId;
58
- token.onCancellationRequested(() => {
59
- this.#log('cancellation requested');
60
- session.abortRequest();
61
- });
62
- let response;
63
- let requestInput;
64
- const conversationIdentifier = session?.conversationId ?? 'New conversation';
65
263
  try {
66
- this.#log('Request for conversation id:', conversationIdentifier);
67
- const profileArn = AmazonQTokenServiceManager_1.AmazonQTokenServiceManager.getInstance(this.#features).getActiveProfileArn();
68
- requestInput = this.#triggerContext.getChatParamsFromTrigger(params, triggerContext, codewhisperer_streaming_1.ChatTriggerType.MANUAL, this.#customizationArn, profileArn);
69
- metric.recordStart();
70
- response = await session.sendMessage(requestInput);
71
- this.#log('Response for conversation id:', conversationIdentifier, JSON.stringify(response.$metadata));
264
+ const triggerContext = await this.#getTriggerContext(params, metric);
265
+ const isNewConversation = !session.conversationId;
266
+ session.contextListSent = false;
267
+ if (isNewConversation) {
268
+ // agentic chat does not support conversationId in API response,
269
+ // so we set it to random UUID per session, as other chat functionality
270
+ // depends on it
271
+ session.conversationId = (0, uuid_1.v4)();
272
+ }
273
+ token.onCancellationRequested(async () => {
274
+ this.#log('cancellation requested');
275
+ await this.#getChatResultStream(params.partialResultToken).writeResultBlock({
276
+ type: 'directive',
277
+ messageId: 'stopped' + (0, uuid_1.v4)(),
278
+ body: 'You stopped your current work, please provide additional examples or ask another question.',
279
+ });
280
+ this.#telemetryController.emitInteractWithAgenticChat('StopChat', params.tabId);
281
+ session.abortRequest();
282
+ void this.#invalidateAllShellCommands(params.tabId, session);
283
+ session.rejectAllDeferredToolExecutions(new lsp_core_1.CancellationError('user'));
284
+ });
285
+ const chatResultStream = this.#getChatResultStream(params.partialResultToken);
286
+ const additionalContext = await this.#additionalContextProvider.getAdditionalContext(triggerContext, params.prompt.context);
287
+ if (additionalContext.length) {
288
+ triggerContext.documentReference =
289
+ this.#additionalContextProvider.getFileListFromContext(additionalContext);
290
+ }
291
+ // Get the initial request input
292
+ const initialRequestInput = await this.#prepareRequestInput(params, session, triggerContext, additionalContext, chatResultStream);
293
+ // Start the agent loop
294
+ const finalResult = await this.#runAgentLoop(initialRequestInput, session, metric, chatResultStream, params.tabId, session.conversationId, token, triggerContext.documentReference);
295
+ // Phase 5: Result Handling - This happens only once
296
+ return await this.#handleFinalResult(finalResult, session, params, metric, triggerContext, isNewConversation, chatResultStream);
72
297
  }
73
298
  catch (err) {
74
- if ((0, utils_2.isAwsError)(err) || ((0, utils_2.isObject)(err) && 'statusCode' in err && typeof err.statusCode === 'number')) {
75
- metric.setDimension('cwsprChatRepsonseCode', err.statusCode ?? 400);
76
- this.#telemetryController.emitMessageResponseError(params.tabId, metric.metric);
77
- }
78
- if (err instanceof errors_1.AmazonQServicePendingSigninError) {
79
- this.#log(`Q Chat SSO Connection error: ${(0, utils_2.getErrorMessage)(err)}`);
80
- return (0, utils_1.createAuthFollowUpResult)('full-auth');
81
- }
82
- if (err instanceof errors_1.AmazonQServicePendingProfileError) {
83
- this.#log(`Q Chat SSO Connection error: ${(0, utils_2.getErrorMessage)(err)}`);
84
- const followUpResult = (0, utils_1.createAuthFollowUpResult)('use-supported-auth');
85
- // Access first element in array
86
- if (followUpResult.followUp?.options) {
87
- followUpResult.followUp.options[0].pillText = 'Select Q Developer Profile';
88
- }
89
- return followUpResult;
90
- }
91
- const authFollowType = (0, utils_1.getAuthFollowUpType)(err);
92
- if (authFollowType) {
93
- this.#log(`Q auth error: ${(0, utils_2.getErrorMessage)(err)}`);
94
- return (0, utils_1.createAuthFollowUpResult)(authFollowType);
299
+ // HACK: the chat-client needs to have a partial event with the associated messageId sent before it can accept the final result.
300
+ // Without this, the `thinking` indicator never goes away.
301
+ // Note: buttons being explicitly empty is required for this hack to work.
302
+ const errorMessageId = `error-message-id-${(0, uuid_1.v4)()}`;
303
+ await this.#sendProgressToClient({
304
+ type: 'answer',
305
+ body: '',
306
+ messageId: errorMessageId,
307
+ buttons: [],
308
+ }, params.partialResultToken);
309
+ if (this.isUserAction(err, token)) {
310
+ /**
311
+ * when the session is aborted it generates an error.
312
+ * we need to resolve this error with an answer so the
313
+ * stream stops
314
+ */
315
+ return {
316
+ type: 'answer',
317
+ body: '',
318
+ messageId: errorMessageId,
319
+ buttons: [],
320
+ };
95
321
  }
96
- this.#log(`Q api request error ${err instanceof Error ? err.message : 'unknown'}`);
97
- return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err instanceof Error ? err.message : 'Unknown request error');
322
+ return this.#handleRequestError(err, errorMessageId, params.tabId, metric);
98
323
  }
99
- try {
100
- const result = await this.#processSendMessageResponse(response, metric.mergeWith({
324
+ }
325
+ /**
326
+ * Prepares the initial request input for the chat prompt
327
+ */
328
+ async #prepareRequestInput(params, session, triggerContext, additionalContext, chatResultStream) {
329
+ this.#debug('Preparing request input');
330
+ const profileArn = AmazonQTokenServiceManager_1.AmazonQTokenServiceManager.getInstance().getActiveProfileArn();
331
+ const requestInput = await this.#triggerContext.getChatParamsFromTrigger(params, triggerContext, codewhisperer_streaming_1.ChatTriggerType.MANUAL, this.#customizationArn, chatResultStream, profileArn, [], this.#getTools(session), additionalContext);
332
+ return requestInput;
333
+ }
334
+ /**
335
+ * Runs the agent loop, making requests and processing tool uses until completion
336
+ */
337
+ async #runAgentLoop(initialRequestInput, session, metric, chatResultStream, tabId, conversationIdentifier, token, documentReference) {
338
+ let currentRequestInput = { ...initialRequestInput };
339
+ let finalResult = null;
340
+ let iterationCount = 0;
341
+ metric.recordStart();
342
+ while (iterationCount < constants_2.maxAgentLoopIterations) {
343
+ iterationCount++;
344
+ this.#debug(`Agent loop iteration ${iterationCount} for conversation id:`, conversationIdentifier || '');
345
+ // Check for cancellation
346
+ if (token?.isCancellationRequested) {
347
+ throw new lsp_core_1.CancellationError('user');
348
+ }
349
+ const currentMessage = currentRequestInput.conversationState?.currentMessage;
350
+ const conversationId = conversationIdentifier ?? '';
351
+ if (!currentMessage || !conversationId) {
352
+ this.#debug(`Warning: ${!currentMessage ? 'currentMessage' : ''}${!currentMessage && !conversationId ? ' and ' : ''}${!conversationId ? 'conversationIdentifier' : ''} is empty in agent loop iteration ${iterationCount}.`);
353
+ }
354
+ // Fix the history to maintain invariants
355
+ if (currentMessage) {
356
+ this.#chatHistoryDb.fixHistory(tabId, currentMessage, conversationIdentifier ?? '');
357
+ }
358
+ // Retrieve the history from DB; Do not include chatHistory for requests going to Mynah Backend
359
+ currentRequestInput.conversationState.history = currentRequestInput.conversationState?.currentMessage
360
+ ?.userInputMessage?.userIntent
361
+ ? []
362
+ : this.#chatHistoryDb.getMessages(tabId);
363
+ // Add loading message before making the request
364
+ const loadingMessageId = `loading-${(0, uuid_1.v4)()}`;
365
+ await chatResultStream.writeResultBlock({ ...constants_1.loadingMessage, messageId: loadingMessageId });
366
+ // Phase 3: Request Execution
367
+ this.#validateRequest(currentRequestInput);
368
+ const response = await session.generateAssistantResponse(currentRequestInput);
369
+ this.#debug(`Q Model Response: ${lsp_core_2.loggingUtils.formatObj(response, { depth: 5 })}`);
370
+ await chatResultStream.removeResultBlock(loadingMessageId);
371
+ // Add the current user message to the history DB
372
+ if (currentMessage && conversationIdentifier) {
373
+ this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier, {
374
+ body: currentMessage.userInputMessage?.content ?? '',
375
+ type: 'prompt',
376
+ userIntent: currentMessage.userInputMessage?.userIntent,
377
+ origin: currentMessage.userInputMessage?.origin,
378
+ userInputMessageContext: currentMessage.userInputMessage?.userInputMessageContext,
379
+ });
380
+ }
381
+ // Phase 4: Response Processing
382
+ const result = await this.#processGenerateAssistantResponseResponse(response, metric.mergeWith({
101
383
  cwsprChatResponseCode: response.$metadata.httpStatusCode,
102
384
  cwsprChatMessageId: response.$metadata.requestId,
103
- }), params.partialResultToken);
104
- session.conversationId = result.data?.conversationId;
105
- this.#log('Session conversation id:', session.conversationId || '');
106
- if (session.conversationId) {
107
- this.#telemetryController.setConversationId(params.tabId, session.conversationId);
108
- if (isNewConversation) {
109
- this.#telemetryController.updateTriggerInfo(params.tabId, {
110
- startTrigger: {
111
- hasUserSnippet: metric.metric.cwsprChatHasCodeSnippet ?? false,
112
- triggerType: triggerContext.triggerType,
113
- },
385
+ }), chatResultStream, session, documentReference);
386
+ // Add the current assistantResponse message to the history DB
387
+ if (result.data?.chatResult.body !== undefined) {
388
+ this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', {
389
+ body: result.data?.chatResult.body,
390
+ type: 'answer',
391
+ codeReference: result.data.chatResult.codeReference,
392
+ relatedContent: result.data.chatResult.relatedContent?.content &&
393
+ result.data.chatResult.relatedContent.content.length > 0
394
+ ? result.data?.chatResult.relatedContent
395
+ : undefined,
396
+ toolUses: Object.keys(result.data?.toolUses).map(k => ({
397
+ toolUseId: result.data.toolUses[k].toolUseId,
398
+ name: result.data.toolUses[k].name,
399
+ input: result.data.toolUses[k].input,
400
+ })),
401
+ });
402
+ }
403
+ else {
404
+ this.#features.logging.warn('No ChatResult body in response, skipping adding to history');
405
+ }
406
+ // Check if we have any tool uses that need to be processed
407
+ const pendingToolUses = this.#getPendingToolUses(result.data?.toolUses || {});
408
+ if (pendingToolUses.length === 0) {
409
+ // No more tool uses, we're done
410
+ finalResult = result;
411
+ break;
412
+ }
413
+ let content = '';
414
+ let toolResults;
415
+ if (result.success) {
416
+ // Process tool uses and update the request input for the next iteration
417
+ toolResults = await this.#processToolUses(pendingToolUses, chatResultStream, session, tabId, token);
418
+ if (toolResults.some(toolResult => toolResult.status === codewhisperer_streaming_1.ToolResultStatus.ERROR)) {
419
+ content = 'There was an error processing one or more tool uses. Please try again.';
420
+ }
421
+ metric.setDimension('cwsprChatConversationType', 'AgenticChatWithToolUse');
422
+ }
423
+ else {
424
+ // Send an error card to UI?
425
+ toolResults = pendingToolUses.map(toolUse => ({
426
+ toolUseId: toolUse.toolUseId,
427
+ status: codewhisperer_streaming_1.ToolResultStatus.ERROR,
428
+ content: [{ text: result.error }],
429
+ }));
430
+ if (result.error.startsWith('ToolUse input is invalid JSON:')) {
431
+ content =
432
+ 'Your toolUse input is incomplete because it is too large. Break this task down into multiple tool uses with smaller input.';
433
+ }
434
+ }
435
+ currentRequestInput = this.#updateRequestInputWithToolResults(currentRequestInput, toolResults, content);
436
+ }
437
+ if (iterationCount >= constants_2.maxAgentLoopIterations) {
438
+ throw new errors_2.AgenticChatError('Agent loop reached iteration limit', 'MaxAgentLoopIterations');
439
+ }
440
+ return (finalResult || {
441
+ success: false,
442
+ error: 'Agent loop failed to produce a final result',
443
+ data: { chatResult: {}, toolUses: {} },
444
+ });
445
+ }
446
+ /**
447
+ * performs pre-validation of request before sending to backend service.
448
+ * @param request
449
+ */
450
+ #validateRequest(request) {
451
+ // Note: these logs are very noisy, but contain information redacted on the backend.
452
+ this.#debug(`Q Model Request: ${JSON.stringify(request, undefined, 2)}`);
453
+ const message = request.conversationState?.currentMessage?.userInputMessage?.content;
454
+ if (message && message.length > constants_2.generateAssistantResponseInputLimit) {
455
+ throw new errors_2.AgenticChatError(`Message is too long with ${message.length} characters, max is ${constants_2.generateAssistantResponseInputLimit}`, 'PromptCharacterLimit');
456
+ }
457
+ }
458
+ /**
459
+ * Extracts tool uses that need to be processed
460
+ */
461
+ #getPendingToolUses(toolUses) {
462
+ return Object.values(toolUses).filter(toolUse => toolUse.stop);
463
+ }
464
+ /**
465
+ * Creates a promise that does not resolve until the user accepts or rejects the tool usage.
466
+ * @param toolUseId
467
+ * @param toolUseName
468
+ * @param resultStream
469
+ * @param promptBlockId id of approval block. This allows us to overwrite the buttons with 'accepted' or 'rejected' text.
470
+ * @param session
471
+ */
472
+ async waitForToolApproval(toolUse, resultStream, promptBlockId, session) {
473
+ const deferred = this.#createDeferred();
474
+ session.setDeferredToolExecution(toolUse.toolUseId, deferred.resolve, deferred.reject);
475
+ this.#log(`Prompting for tool approval for tool: ${toolUse.name}`);
476
+ await deferred.promise;
477
+ // Note: we want to overwrite the button block because it already exists in the stream.
478
+ await resultStream.overwriteResultBlock(this.#getUpdateToolConfirmResult(toolUse, true), promptBlockId);
479
+ }
480
+ /**
481
+ * Processes tool uses by running the tools and collecting results
482
+ */
483
+ async #processToolUses(toolUses, chatResultStream, session, tabId, token) {
484
+ const results = [];
485
+ for (const toolUse of toolUses) {
486
+ // Store buttonBlockId to use it in `catch` block if needed
487
+ let cachedButtonBlockId;
488
+ if (!toolUse.name || !toolUse.toolUseId)
489
+ continue;
490
+ session.toolUseLookup.set(toolUse.toolUseId, toolUse);
491
+ try {
492
+ // TODO: Can we move this check in the event parser before the stream completes?
493
+ const availableToolNames = this.#getTools(session).map(tool => tool.toolSpecification.name);
494
+ if (!availableToolNames.includes(toolUse.name)) {
495
+ throw new Error(`Tool ${toolUse.name} is not available in the current mode`);
496
+ }
497
+ // fsRead and listDirectory write to an existing card and could show nothing in the current position
498
+ if (!['fsWrite', 'fsRead', 'listDirectory'].includes(toolUse.name)) {
499
+ await this.#showUndoAllIfRequired(chatResultStream, session);
500
+ }
501
+ const { explanation } = toolUse.input;
502
+ if (explanation) {
503
+ await chatResultStream.writeResultBlock({
504
+ type: 'directive',
505
+ messageId: toolUse.toolUseId + '_explanation',
506
+ body: explanation,
507
+ });
508
+ }
509
+ switch (toolUse.name) {
510
+ case 'fsRead':
511
+ case 'listDirectory':
512
+ case 'fileSearch':
513
+ case 'fsWrite':
514
+ case 'executeBash': {
515
+ const toolMap = {
516
+ fsRead: { Tool: fsRead_1.FsRead },
517
+ listDirectory: { Tool: listDirectory_1.ListDirectory },
518
+ fsWrite: { Tool: fsWrite_1.FsWrite },
519
+ executeBash: { Tool: executeBash_1.ExecuteBash },
520
+ fileSearch: { Tool: fileSearch_1.FileSearch },
521
+ };
522
+ const { Tool } = toolMap[toolUse.name];
523
+ const tool = new Tool(this.#features);
524
+ // Get the approved paths from the session
525
+ const approvedPaths = session.approvedPaths;
526
+ // Pass the approved paths to the tool's requiresAcceptance method
527
+ const { requiresAcceptance, warning } = await tool.requiresAcceptance(toolUse.input, approvedPaths);
528
+ if (requiresAcceptance || toolUse.name === 'executeBash') {
529
+ // for executeBash, we till send the confirmation message without action buttons
530
+ const confirmationResult = this.#processToolConfirmation(toolUse, requiresAcceptance, warning);
531
+ cachedButtonBlockId = await chatResultStream.writeResultBlock(confirmationResult);
532
+ const isExecuteBash = toolUse.name === 'executeBash';
533
+ if (isExecuteBash) {
534
+ this.#telemetryController.emitInteractWithAgenticChat('GeneratedCommand', tabId);
535
+ }
536
+ if (requiresAcceptance) {
537
+ await this.waitForToolApproval(toolUse, chatResultStream, cachedButtonBlockId, session);
538
+ }
539
+ if (isExecuteBash) {
540
+ this.#telemetryController.emitInteractWithAgenticChat('RunCommand', tabId);
541
+ }
542
+ }
543
+ break;
544
+ }
545
+ case 'codeSearch':
546
+ // no need to write tool message for code search.
547
+ break;
548
+ default:
549
+ this.#features.logging.warn(`Recieved unrecognized tool: ${toolUse.name}`);
550
+ await chatResultStream.writeResultBlock({
551
+ type: 'tool',
552
+ body: `${(0, textFormatting_1.executeToolMessage)(toolUse)}`,
553
+ messageId: toolUse.toolUseId,
554
+ });
555
+ break;
556
+ }
557
+ if (toolUse.name === 'fsWrite') {
558
+ const input = toolUse.input;
559
+ const document = await this.#triggerContext.getTextDocument(input.path);
560
+ session.toolUseLookup.set(toolUse.toolUseId, {
561
+ ...toolUse,
562
+ fileChange: { before: document?.getText() },
563
+ });
564
+ }
565
+ // After approval, add the path to the approved paths in the session
566
+ const inputPath = toolUse.input?.path || toolUse.input?.cwd;
567
+ if (inputPath) {
568
+ session.addApprovedPath(inputPath);
569
+ }
570
+ const ws = this.#getWritableStream(chatResultStream, toolUse);
571
+ const result = await this.#features.agent.runTool(toolUse.name, toolUse.input, token, ws);
572
+ let toolResultContent;
573
+ if (typeof result === 'string') {
574
+ toolResultContent = { text: result };
575
+ }
576
+ else if (Array.isArray(result)) {
577
+ toolResultContent = { json: { items: result } };
578
+ }
579
+ else if (typeof result === 'object') {
580
+ toolResultContent = { json: result };
581
+ }
582
+ else
583
+ toolResultContent = { text: JSON.stringify(result) };
584
+ this.#validateToolResult(toolUse, toolResultContent);
585
+ results.push({
586
+ toolUseId: toolUse.toolUseId,
587
+ status: 'success',
588
+ content: [toolResultContent],
589
+ });
590
+ switch (toolUse.name) {
591
+ case 'fsRead':
592
+ case 'listDirectory':
593
+ case 'fileSearch':
594
+ const initialListDirResult = this.#processReadOrListOrSearch(toolUse, chatResultStream);
595
+ if (initialListDirResult) {
596
+ await chatResultStream.writeResultBlock(initialListDirResult);
597
+ }
598
+ break;
599
+ // no need to write tool result for listDir,fsRead,fileSearch into chat stream
600
+ case 'executeBash':
601
+ // no need to write tool result for listDir and fsRead into chat stream
602
+ // executeBash will stream the output instead of waiting until the end
603
+ break;
604
+ case 'codeSearch':
605
+ // no need to write tool result for code search.
606
+ break;
607
+ case 'fsWrite':
608
+ const input = toolUse.input;
609
+ const doc = await this.#triggerContext.getTextDocument(input.path);
610
+ const chatResult = await this.#getFsWriteChatResult(toolUse, doc, session);
611
+ const cachedToolUse = session.toolUseLookup.get(toolUse.toolUseId);
612
+ if (cachedToolUse) {
613
+ session.toolUseLookup.set(toolUse.toolUseId, {
614
+ ...cachedToolUse,
615
+ chatResult,
616
+ fileChange: { ...cachedToolUse.fileChange, after: doc?.getText() },
617
+ });
618
+ }
619
+ this.#telemetryController.emitInteractWithAgenticChat('GeneratedDiff', tabId);
620
+ await chatResultStream.writeResultBlock(chatResult);
621
+ break;
622
+ default:
623
+ this.#features.logging.warn(`Processing unrecognized tool: ${toolUse.name}`);
624
+ await chatResultStream.writeResultBlock({
625
+ type: 'tool',
626
+ body: (0, textFormatting_1.toolResultMessage)(toolUse, result),
627
+ messageId: toolUse.toolUseId,
628
+ });
629
+ break;
630
+ }
631
+ this.#updateUndoAllState(toolUse, session);
632
+ if (toolUse.name) {
633
+ this.#telemetryController.emitToolUseSuggested(toolUse, session.conversationId ?? '', this.#features.runtime.serverInfo.version ?? '');
634
+ }
635
+ }
636
+ catch (err) {
637
+ if (this.isUserAction(err, token)) {
638
+ if (toolUse.name === 'executeBash') {
639
+ if (err instanceof toolShared_1.ToolApprovalException) {
640
+ if (cachedButtonBlockId) {
641
+ await chatResultStream.overwriteResultBlock(this.#getUpdateToolConfirmResult(toolUse, false), cachedButtonBlockId);
642
+ if (err.shouldShowMessage) {
643
+ await chatResultStream.writeResultBlock({
644
+ type: 'answer',
645
+ messageId: `reject-message-${toolUse.toolUseId}`,
646
+ body: err.message || 'Command was rejected.',
647
+ });
648
+ }
649
+ }
650
+ else {
651
+ this.#features.logging.warn('Failed to update tool block: no blockId is available.');
652
+ }
653
+ }
654
+ throw err;
655
+ }
656
+ if (err instanceof lsp_core_1.CancellationError) {
657
+ results.push({
658
+ toolUseId: toolUse.toolUseId,
659
+ status: codewhisperer_streaming_1.ToolResultStatus.ERROR,
660
+ content: [{ text: 'Command stopped by user' }],
661
+ });
662
+ continue;
663
+ }
664
+ }
665
+ const errMsg = err instanceof Error ? err.message : 'unknown error';
666
+ this.#log(`Error running tool ${toolUse.name}:`, errMsg);
667
+ results.push({
668
+ toolUseId: toolUse.toolUseId,
669
+ status: 'error',
670
+ content: [{ json: { error: err instanceof Error ? err.message : 'Unknown error' } }],
671
+ });
672
+ }
673
+ }
674
+ return results;
675
+ }
676
+ /**
677
+ * Updates the currentUndoAllId state in the session
678
+ */
679
+ #updateUndoAllState(toolUse, session) {
680
+ if (toolUse.name === 'fsRead' || toolUse.name === 'listDirectory') {
681
+ return;
682
+ }
683
+ if (toolUse.name === 'fsWrite') {
684
+ if (session.currentUndoAllId === undefined) {
685
+ session.currentUndoAllId = toolUse.toolUseId;
686
+ }
687
+ if (session.currentUndoAllId) {
688
+ const prev = session.toolUseLookup.get(session.currentUndoAllId);
689
+ if (prev && toolUse.toolUseId) {
690
+ const relatedToolUses = prev.relatedToolUses || new Set();
691
+ relatedToolUses.add(toolUse.toolUseId);
692
+ session.toolUseLookup.set(session.currentUndoAllId, {
693
+ ...prev,
694
+ relatedToolUses,
114
695
  });
115
- this.#telemetryController.emitStartConversationMetric(params.tabId, metric.metric);
116
696
  }
117
697
  }
118
- metric.setDimension('codewhispererCustomizationArn', requestInput.conversationState?.customizationArn);
119
- await this.#telemetryController.emitAddMessageMetric(params.tabId, metric.metric);
120
- this.#telemetryController.updateTriggerInfo(params.tabId, {
121
- lastMessageTrigger: {
122
- ...triggerContext,
123
- messageId: response.$metadata.requestId,
124
- followUpActions: new Set(result.data?.chatResult.followUp?.options
125
- ?.map(option => option.prompt ?? '')
126
- .filter(prompt => prompt.length > 0)),
698
+ }
699
+ else {
700
+ session.currentUndoAllId = undefined;
701
+ }
702
+ }
703
+ /**
704
+ * Shows an "Undo all changes" button if there are multiple related file changes
705
+ * that can be undone together.
706
+ */
707
+ async #showUndoAllIfRequired(chatResultStream, session) {
708
+ if (session.currentUndoAllId === undefined) {
709
+ return;
710
+ }
711
+ const toUndo = session.toolUseLookup.get(session.currentUndoAllId)?.relatedToolUses;
712
+ if (!toUndo || toUndo.size <= 1) {
713
+ return;
714
+ }
715
+ await chatResultStream.writeResultBlock({
716
+ type: 'answer',
717
+ messageId: `${session.currentUndoAllId}_undoall`,
718
+ buttons: [
719
+ {
720
+ id: 'undo-all-changes',
721
+ text: 'Undo all changes',
722
+ icon: 'revert',
723
+ status: 'clear',
724
+ keepCardAfterClick: false,
725
+ },
726
+ ],
727
+ });
728
+ session.currentUndoAllId = undefined;
729
+ }
730
+ /**
731
+ * Determines if error is thrown as a result of a user action (Ex. rejecting tool, stop button)
732
+ * @param err
733
+ * @returns
734
+ */
735
+ isUserAction(err, token) {
736
+ return (lsp_core_1.CancellationError.isUserCancelled(err) ||
737
+ err instanceof toolShared_1.ToolApprovalException ||
738
+ (token?.isCancellationRequested ?? false));
739
+ }
740
+ #validateToolResult(toolUse, result) {
741
+ let maxToolResponseSize;
742
+ switch (toolUse.name) {
743
+ case 'fsRead':
744
+ case 'executeBash':
745
+ // fsRead and executeBash already have truncation logic
746
+ return;
747
+ case 'listDirectory':
748
+ maxToolResponseSize = 30_000;
749
+ break;
750
+ default:
751
+ maxToolResponseSize = 100_000;
752
+ break;
753
+ }
754
+ if ((result.text && result.text.length > maxToolResponseSize) ||
755
+ (result.json && JSON.stringify(result.json).length > maxToolResponseSize)) {
756
+ throw Error(`${toolUse.name} output exceeds maximum character limit of ${maxToolResponseSize}`);
757
+ }
758
+ }
759
+ #getWritableStream(chatResultStream, toolUse) {
760
+ if (toolUse.name !== 'executeBash') {
761
+ return;
762
+ }
763
+ const toolMsgId = toolUse.toolUseId;
764
+ const chatMsgId = chatResultStream.getResult().messageId;
765
+ let headerEmitted = false;
766
+ const initialHeader = {
767
+ body: 'shell',
768
+ buttons: [{ id: 'stop-shell-command', text: 'Stop', icon: 'stop' }],
769
+ };
770
+ const completedHeader = {
771
+ body: 'shell',
772
+ status: { status: 'success', icon: 'ok', text: 'Completed' },
773
+ buttons: [],
774
+ };
775
+ return new WritableStream({
776
+ write: async (chunk) => {
777
+ if (this.#stoppedToolUses.has(toolMsgId))
778
+ return;
779
+ await chatResultStream.writeResultBlock({
780
+ type: 'tool',
781
+ messageId: toolMsgId,
782
+ body: chunk,
783
+ header: headerEmitted ? undefined : initialHeader,
784
+ });
785
+ headerEmitted = true;
786
+ },
787
+ close: async () => {
788
+ if (this.#stoppedToolUses.has(toolMsgId))
789
+ return;
790
+ await chatResultStream.writeResultBlock({
791
+ type: 'tool',
792
+ messageId: toolMsgId,
793
+ body: '```',
794
+ header: completedHeader,
795
+ });
796
+ await chatResultStream.writeResultBlock({
797
+ type: 'answer',
798
+ messageId: chatMsgId,
799
+ body: '',
800
+ header: undefined,
801
+ });
802
+ this.#stoppedToolUses.add(toolMsgId);
803
+ },
804
+ });
805
+ }
806
+ /**
807
+ * Creates an updated ChatResult for tool confirmation based on tool type
808
+ * @param toolUse The tool use object
809
+ * @param isAccept Whether the tool was accepted or rejected
810
+ * @param toolType Optional tool type for specialized handling
811
+ * @returns ChatResult with appropriate confirmation UI
812
+ */
813
+ #getUpdateToolConfirmResult(toolUse, isAccept, toolType) {
814
+ const toolName = toolType || toolUse.name;
815
+ // Handle bash commands with special formatting
816
+ if (toolName === 'executeBash') {
817
+ return {
818
+ messageId: toolUse.toolUseId,
819
+ type: 'tool',
820
+ body: '```shell\n' + toolUse.input.command + '\n',
821
+ header: {
822
+ body: 'shell',
823
+ ...(isAccept
824
+ ? {}
825
+ : {
826
+ status: {
827
+ status: 'error',
828
+ icon: 'cancel',
829
+ text: 'Rejected',
830
+ },
831
+ }),
832
+ buttons: isAccept ? [{ id: 'stop-shell-command', text: 'Stop', icon: 'stop' }] : [],
833
+ },
834
+ };
835
+ }
836
+ // For file operations and other tools, create appropriate confirmation UI
837
+ let header;
838
+ let body;
839
+ switch (toolName) {
840
+ case 'fsWrite':
841
+ const writeFilePath = toolUse.input.path;
842
+ header = {
843
+ body: 'File Write',
844
+ status: {
845
+ status: isAccept ? 'success' : 'error',
846
+ icon: isAccept ? 'ok' : 'cancel',
847
+ text: isAccept ? 'Allowed' : 'Rejected',
848
+ },
849
+ };
850
+ body = isAccept
851
+ ? `File modification allowed: \`${writeFilePath}\``
852
+ : `File modification rejected: \`${writeFilePath}\``;
853
+ break;
854
+ case 'fsRead':
855
+ case 'listDirectory':
856
+ // Common handling for read operations
857
+ const path = toolUse.input.path;
858
+ const isDirectory = toolName === 'listDirectory';
859
+ header = {
860
+ body: isDirectory ? 'Directory Listing' : 'File Read',
861
+ status: {
862
+ status: isAccept ? 'success' : 'error',
863
+ icon: isAccept ? 'ok' : 'cancel',
864
+ text: isAccept ? 'Allowed' : 'Rejected',
865
+ },
866
+ };
867
+ body = isAccept
868
+ ? `${isDirectory ? 'Directory listing' : 'File read'} allowed: \`${path}\``
869
+ : `${isDirectory ? 'Directory listing' : 'File read'} rejected: \`${path}\``;
870
+ break;
871
+ case 'fileSearch':
872
+ const searchPath = toolUse.input.path;
873
+ header = {
874
+ body: 'File Search',
875
+ status: {
876
+ status: isAccept ? 'success' : 'error',
877
+ icon: isAccept ? 'ok' : 'cancel',
878
+ text: isAccept ? 'Allowed' : 'Rejected',
879
+ },
880
+ };
881
+ body = isAccept ? `File search allowed: \`${searchPath}\`` : `File search rejected: \`${searchPath}\``;
882
+ break;
883
+ default:
884
+ // Generic handler for other tool types
885
+ header = {
886
+ body: toolUse.name || 'Tool',
887
+ status: {
888
+ status: isAccept ? 'success' : 'error',
889
+ icon: isAccept ? 'ok' : 'cancel',
890
+ text: isAccept ? 'Allowed' : 'Rejected',
891
+ },
892
+ };
893
+ body = isAccept ? `Tool execution allowed: ${toolUse.name}` : `Tool execution rejected: ${toolUse.name}`;
894
+ break;
895
+ }
896
+ return {
897
+ messageId: this.#getMessageIdForToolUse(toolType, toolUse),
898
+ type: 'tool',
899
+ body,
900
+ header,
901
+ };
902
+ }
903
+ async #renderStoppedShellCommand(tabId, messageId) {
904
+ const session = this.#chatSessionManagementService.getSession(tabId).data;
905
+ const toolUse = session?.toolUseLookup.get(messageId);
906
+ const command = toolUse.input.command;
907
+ await this.#features.chat.sendChatUpdate({
908
+ tabId,
909
+ state: { inProgress: false },
910
+ data: {
911
+ messages: [
912
+ {
913
+ messageId,
914
+ type: 'tool',
915
+ body: `\`\`\`shell\n${command}\n\`\`\``,
916
+ header: {
917
+ body: 'shell',
918
+ status: {
919
+ status: 'error',
920
+ icon: 'stop',
921
+ text: 'Stopped',
922
+ },
923
+ buttons: [],
924
+ },
925
+ },
926
+ ],
927
+ },
928
+ });
929
+ }
930
+ #processToolConfirmation(toolUse, requiresAcceptance, warning, toolType) {
931
+ let buttons = [];
932
+ let header;
933
+ let body;
934
+ switch (toolType || toolUse.name) {
935
+ case 'executeBash':
936
+ buttons = requiresAcceptance
937
+ ? [
938
+ {
939
+ id: 'run-shell-command',
940
+ text: 'Run',
941
+ icon: 'play',
942
+ },
943
+ {
944
+ id: 'reject-shell-command',
945
+ status: 'dimmed-clear',
946
+ text: 'Reject',
947
+ icon: 'cancel',
948
+ },
949
+ ]
950
+ : [];
951
+ header = {
952
+ status: {
953
+ icon: 'warning',
954
+ status: 'warning',
955
+ position: 'left',
956
+ // TODO: Add `description` if necessary to show a tooltip
957
+ },
958
+ body: 'shell',
959
+ buttons,
960
+ };
961
+ const commandString = toolUse.input.command;
962
+ body = '```shell\n' + commandString + '\n';
963
+ break;
964
+ case 'fsWrite':
965
+ buttons = [
966
+ {
967
+ id: 'allow-tools', // Reusing the same ID for simplicity, could be changed to 'allow-write-tools'
968
+ text: 'Allow',
969
+ icon: 'ok',
970
+ status: 'clear',
971
+ },
972
+ ];
973
+ header = {
974
+ icon: 'warning',
975
+ iconForegroundStatus: 'warning',
976
+ body: '#### Allow file modification outside of your workspace',
977
+ buttons,
978
+ };
979
+ const writeFilePath = toolUse.input.path;
980
+ body = `I need permission to modify files in your workspace.\n\`${writeFilePath}\``;
981
+ break;
982
+ case 'fsRead':
983
+ case 'listDirectory':
984
+ default:
985
+ buttons = [
986
+ {
987
+ id: 'allow-tools',
988
+ text: 'Allow',
989
+ icon: 'ok',
990
+ status: 'clear',
991
+ },
992
+ ];
993
+ header = {
994
+ icon: 'warning',
995
+ iconForegroundStatus: 'warning',
996
+ body: '#### Allow read-only tools outside your workspace',
997
+ buttons,
998
+ };
999
+ // ⚠️ Warning: This accesses files outside the workspace
1000
+ const readFilePath = toolUse.input.path;
1001
+ body = `I need permission to read files and list directories outside the workspace.\n\`${readFilePath}\``;
1002
+ break;
1003
+ }
1004
+ return {
1005
+ type: 'tool',
1006
+ messageId: this.#getMessageIdForToolUse(toolType, toolUse),
1007
+ header,
1008
+ body: warning ? warning + (toolType === 'executeBash' ? '' : '\n\n') + body : body,
1009
+ };
1010
+ }
1011
+ async #getFsWriteChatResult(toolUse, doc, session) {
1012
+ const input = toolUse.input;
1013
+ const oldContent = session.toolUseLookup.get(toolUse.toolUseId)?.fileChange?.before ?? '';
1014
+ // Get just the filename instead of the full path
1015
+ const fileName = path.basename(input.path);
1016
+ const diffChanges = (0, diff_1.diffLines)(oldContent, doc?.getText() ?? '');
1017
+ const changes = diffChanges.reduce((acc, { count = 0, added, removed }) => {
1018
+ if (added) {
1019
+ acc.added += count;
1020
+ }
1021
+ else if (removed) {
1022
+ acc.deleted += count;
1023
+ }
1024
+ return acc;
1025
+ }, { added: 0, deleted: 0 });
1026
+ return {
1027
+ type: 'tool',
1028
+ messageId: toolUse.toolUseId,
1029
+ header: {
1030
+ fileList: {
1031
+ filePaths: [fileName],
1032
+ details: {
1033
+ [fileName]: {
1034
+ changes,
1035
+ description: input.path,
1036
+ },
1037
+ },
127
1038
  },
1039
+ buttons: [{ id: 'undo-changes', text: 'Undo', icon: 'undo' }],
1040
+ },
1041
+ };
1042
+ }
1043
+ #processReadOrListOrSearch(toolUse, chatResultStream) {
1044
+ let messageIdToUpdate = toolUse.toolUseId;
1045
+ const currentId = chatResultStream.getMessageIdToUpdateForTool(toolUse.name);
1046
+ if (currentId) {
1047
+ messageIdToUpdate = currentId;
1048
+ }
1049
+ else {
1050
+ chatResultStream.setMessageIdToUpdateForTool(toolUse.name, messageIdToUpdate);
1051
+ }
1052
+ const currentPath = toolUse.input?.path;
1053
+ if (!currentPath)
1054
+ return;
1055
+ const existingPaths = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths || [];
1056
+ // Check if path already exists in the list
1057
+ const isPathAlreadyProcessed = existingPaths.some(path => path.relativeFilePath === currentPath);
1058
+ if (!isPathAlreadyProcessed) {
1059
+ const currentFileDetail = {
1060
+ relativeFilePath: currentPath,
1061
+ lineRanges: [{ first: -1, second: -1 }],
1062
+ };
1063
+ chatResultStream.addMessageOperation(messageIdToUpdate, toolUse.name, [
1064
+ ...existingPaths,
1065
+ currentFileDetail,
1066
+ ]);
1067
+ }
1068
+ let title;
1069
+ const itemCount = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths.length;
1070
+ const filePathsPushed = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths ?? [];
1071
+ if (!itemCount) {
1072
+ title = 'Gathering context';
1073
+ }
1074
+ else {
1075
+ title =
1076
+ toolUse.name === 'fsRead'
1077
+ ? `${itemCount} file${itemCount > 1 ? 's' : ''} read`
1078
+ : toolUse.name === 'fileSearch'
1079
+ ? `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} searched`
1080
+ : `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} listed`;
1081
+ }
1082
+ const details = {};
1083
+ for (const item of filePathsPushed) {
1084
+ details[item.relativeFilePath] = {
1085
+ lineRanges: item.lineRanges,
1086
+ description: item.relativeFilePath,
1087
+ };
1088
+ }
1089
+ const fileList = {
1090
+ rootFolderTitle: title,
1091
+ filePaths: filePathsPushed.map(item => item.relativeFilePath),
1092
+ details,
1093
+ };
1094
+ return {
1095
+ type: 'tool',
1096
+ fileList,
1097
+ messageId: messageIdToUpdate,
1098
+ body: '',
1099
+ };
1100
+ }
1101
+ /**
1102
+ * Updates the request input with tool results for the next iteration
1103
+ */
1104
+ #updateRequestInputWithToolResults(requestInput, toolResults, content) {
1105
+ // Create a deep copy of the request input
1106
+ const updatedRequestInput = JSON.parse(JSON.stringify(requestInput));
1107
+ // Add tool results to the request
1108
+ updatedRequestInput.conversationState.currentMessage.userInputMessage.userInputMessageContext.toolResults =
1109
+ [];
1110
+ updatedRequestInput.conversationState.currentMessage.userInputMessage.content = content;
1111
+ for (const toolResult of toolResults) {
1112
+ this.#debug(`ToolResult: ${JSON.stringify(toolResult)}`);
1113
+ updatedRequestInput.conversationState.currentMessage.userInputMessage.userInputMessageContext.toolResults.push({
1114
+ ...toolResult,
128
1115
  });
129
- return result.success
130
- ? result.data.chatResult
131
- : new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, result.error);
132
1116
  }
133
- catch (err) {
134
- this.#log('Error encountered during response streaming:', err instanceof Error ? err.message : 'unknown');
135
- return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err instanceof Error ? err.message : 'Unknown error occured during response stream');
1117
+ return updatedRequestInput;
1118
+ }
1119
+ /**
1120
+ * Handles the final result after the agent loop completes
1121
+ */
1122
+ async #handleFinalResult(result, session, params, metric, triggerContext, isNewConversation, chatResultStream) {
1123
+ if (!result.success) {
1124
+ throw new errors_2.AgenticChatError(result.error, 'FailedResult');
1125
+ }
1126
+ const conversationId = session.conversationId;
1127
+ this.#debug('Final session conversation id:', conversationId || '');
1128
+ if (conversationId) {
1129
+ this.#telemetryController.setConversationId(params.tabId, conversationId);
1130
+ if (isNewConversation) {
1131
+ this.#telemetryController.updateTriggerInfo(params.tabId, {
1132
+ startTrigger: {
1133
+ hasUserSnippet: metric.metric.cwsprChatHasCodeSnippet ?? false,
1134
+ triggerType: triggerContext.triggerType,
1135
+ },
1136
+ });
1137
+ this.#telemetryController.emitStartConversationMetric(params.tabId, metric.metric);
1138
+ }
1139
+ }
1140
+ metric.setDimension('codewhispererCustomizationArn', this.#customizationArn);
1141
+ metric.setDimension('languageServerVersion', this.#features.runtime.serverInfo.version);
1142
+ const profileArn = AmazonQTokenServiceManager_1.AmazonQTokenServiceManager.getInstance().getActiveProfileArn();
1143
+ if (profileArn) {
1144
+ this.#telemetryService.updateProfileArn(profileArn);
1145
+ }
1146
+ if (triggerContext.contextInfo) {
1147
+ metric.mergeWith({
1148
+ cwsprChatHasContextList: triggerContext.documentReference?.filePaths?.length ? true : false,
1149
+ cwsprChatFolderContextCount: triggerContext.contextInfo.contextCount.folderContextCount,
1150
+ cwsprChatFileContextCount: triggerContext.contextInfo.contextCount.fileContextCount,
1151
+ cwsprChatRuleContextCount: triggerContext.contextInfo.contextCount.ruleContextCount,
1152
+ cwsprChatPromptContextCount: triggerContext.contextInfo.contextCount.promptContextCount,
1153
+ cwsprChatFileContextLength: triggerContext.contextInfo.contextLength.fileContextLength,
1154
+ cwsprChatRuleContextLength: triggerContext.contextInfo.contextLength.ruleContextLength,
1155
+ cwsprChatPromptContextLength: triggerContext.contextInfo.contextLength.promptContextLength,
1156
+ cwsprChatCodeContextCount: triggerContext.contextInfo.contextCount.codeContextCount,
1157
+ cwsprChatCodeContextLength: triggerContext.contextInfo.contextLength.codeContextLength,
1158
+ cwsprChatFocusFileContextLength: triggerContext.text?.length,
1159
+ });
1160
+ }
1161
+ await this.#telemetryController.emitAddMessageMetric(params.tabId, metric.metric);
1162
+ this.#telemetryController.updateTriggerInfo(params.tabId, {
1163
+ lastMessageTrigger: {
1164
+ ...triggerContext,
1165
+ messageId: result.data?.chatResult.messageId,
1166
+ followUpActions: new Set(result.data?.chatResult.followUp?.options
1167
+ ?.map(option => option.prompt ?? '')
1168
+ .filter(prompt => prompt.length > 0)),
1169
+ },
1170
+ });
1171
+ return chatResultStream.getResult();
1172
+ }
1173
+ /**
1174
+ * Handles errors that occur during the request
1175
+ */
1176
+ #handleRequestError(err, errorMessageId, tabId, metric) {
1177
+ let errorMessage;
1178
+ let requestID;
1179
+ if ((0, utils_2.isAwsError)(err) || ((0, utils_2.isObject)(err) && typeof (0, utils_2.getHttpStatusCode)(err) === 'number')) {
1180
+ if (err instanceof codewhisperer_streaming_1.CodeWhispererStreamingServiceException) {
1181
+ errorMessage = err.message;
1182
+ requestID = err.$metadata.requestId;
1183
+ }
1184
+ else if (err?.cause?.message) {
1185
+ errorMessage = err?.cause?.message;
1186
+ requestID = err.cause?.$metadata.requestId;
1187
+ }
1188
+ else if (err instanceof Error || err?.message) {
1189
+ errorMessage = err.message;
1190
+ }
1191
+ metric.setDimension('cwsprChatResponseCode', (0, utils_2.getHttpStatusCode)(err) ?? 0);
1192
+ metric.setDimension('languageServerVersion', this.#features.runtime.serverInfo.version);
1193
+ this.#telemetryController.emitMessageResponseError(tabId, metric.metric, requestID, errorMessage);
1194
+ }
1195
+ let authFollowType = undefined;
1196
+ // first check if there is an AmazonQ related auth follow up
1197
+ if (err.cause instanceof errors_1.AmazonQError) {
1198
+ authFollowType = (0, utils_1.getAuthFollowUpType)(err.cause);
1199
+ }
1200
+ // if not check full error for auth follow up
1201
+ if (!authFollowType) {
1202
+ authFollowType = (0, utils_1.getAuthFollowUpType)(err);
1203
+ }
1204
+ if (authFollowType) {
1205
+ this.#log(`Q auth error: ${(0, utils_2.getErrorMessage)(err)}`);
1206
+ return (0, utils_1.createAuthFollowUpResult)(authFollowType);
1207
+ }
1208
+ if (errors_2.customerFacingErrorCodes.includes(err.code)) {
1209
+ this.#features.logging.error(`${lsp_core_2.loggingUtils.formatErr(err)}`);
1210
+ return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err.message, {
1211
+ type: 'answer',
1212
+ body: err.message,
1213
+ messageId: errorMessageId,
1214
+ buttons: [],
1215
+ });
136
1216
  }
1217
+ this.#features.logging.error(`Unknown Error: ${lsp_core_2.loggingUtils.formatErr(err)}`);
1218
+ return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err.message, {
1219
+ type: 'answer',
1220
+ body: requestID ? constants_2.genericErrorMsg + `\n\nRequest ID: ${requestID}` : constants_2.genericErrorMsg,
1221
+ messageId: errorMessageId,
1222
+ buttons: [],
1223
+ });
137
1224
  }
138
1225
  async onInlineChatPrompt(params, token) {
139
1226
  // TODO: This metric needs to be removed later, just added for now to be able to create a ChatEventParser object
@@ -144,12 +1231,11 @@ class AgenticChatController {
144
1231
  let response;
145
1232
  let requestInput;
146
1233
  try {
147
- const profileArn = AmazonQTokenServiceManager_1.AmazonQTokenServiceManager.getInstance(this.#features).getActiveProfileArn();
148
- requestInput = this.#triggerContext.getChatParamsFromTrigger(params, triggerContext, codewhisperer_streaming_1.ChatTriggerType.INLINE_CHAT, this.#customizationArn, profileArn);
149
- if (!this.#amazonQServiceManager) {
1234
+ requestInput = await this.#triggerContext.getChatParamsFromTrigger(params, triggerContext, codewhisperer_streaming_1.ChatTriggerType.INLINE_CHAT, this.#customizationArn);
1235
+ if (!this.#serviceManager) {
150
1236
  throw new Error('amazonQServiceManager is not initialized');
151
1237
  }
152
- const client = this.#amazonQServiceManager.getStreamingClient();
1238
+ const client = this.#serviceManager.getStreamingClient();
153
1239
  response = await client.sendMessage(requestInput);
154
1240
  this.#log('Response for inline chat', JSON.stringify(response.$metadata), JSON.stringify(response));
155
1241
  }
@@ -158,7 +1244,7 @@ class AgenticChatController {
158
1244
  this.#log(`Q Inline Chat SSO Connection error: ${(0, utils_2.getErrorMessage)(err)}`);
159
1245
  return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err.message);
160
1246
  }
161
- this.#log(`Q api request error ${err instanceof Error ? err.message : 'unknown'}`);
1247
+ this.#log(`Q api request error ${err instanceof Error ? JSON.stringify(err) : 'unknown'}`);
162
1248
  return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err instanceof Error ? err.message : 'Unknown request error');
163
1249
  }
164
1250
  try {
@@ -175,6 +1261,7 @@ class AgenticChatController {
175
1261
  return new server_interface_1.ResponseError(server_interface_1.LSPErrorCodes.RequestFailed, err instanceof Error ? err.message : 'Unknown error occurred during inline chat response stream');
176
1262
  }
177
1263
  }
1264
+ async onInlineChatResult(handler) { }
178
1265
  async onCodeInsertToCursorPosition(params) {
179
1266
  // Implementation based on https://github.com/aws/aws-toolkit-vscode/blob/1814cc84228d4bf20270574c5980b91b227f31cf/packages/core/src/amazonq/commons/controllers/contentController.ts#L38
180
1267
  if (!params.textDocument || !params.cursorPosition || !params.code) {
@@ -230,8 +1317,8 @@ class AgenticChatController {
230
1317
  const workspaceEdit = {
231
1318
  edit: {
232
1319
  documentChanges: [
233
- protocol_1.TextDocumentEdit.create({ uri: params.textDocument.uri, version: 0 }, [
234
- protocol_1.TextEdit.insert(cursorPosition, textWithIndent),
1320
+ protocol_2.TextDocumentEdit.create({ uri: params.textDocument.uri, version: 0 }, [
1321
+ protocol_2.TextEdit.insert(cursorPosition, textWithIndent),
235
1322
  ]),
236
1323
  ],
237
1324
  },
@@ -250,10 +1337,44 @@ class AgenticChatController {
250
1337
  const { success } = this.#chatSessionManagementService.deleteSession(params.tabId);
251
1338
  return success;
252
1339
  }
1340
+ async onFileClicked(params) {
1341
+ const session = this.#chatSessionManagementService.getSession(params.tabId);
1342
+ const toolUseId = params.messageId;
1343
+ const toolUse = toolUseId ? session.data?.toolUseLookup.get(toolUseId) : undefined;
1344
+ if (toolUse?.name === 'fsWrite') {
1345
+ const input = toolUse.input;
1346
+ this.#features.lsp.workspace.openFileDiff({
1347
+ originalFileUri: input.path,
1348
+ originalFileContent: toolUse.fileChange?.before,
1349
+ isDeleted: false,
1350
+ fileContent: toolUse.fileChange?.after,
1351
+ });
1352
+ }
1353
+ else if (toolUse?.name === 'fsRead') {
1354
+ await this.#features.lsp.window.showDocument({ uri: vscode_uri_1.URI.file(params.filePath).toString() });
1355
+ }
1356
+ else {
1357
+ const absolutePath = params.fullPath ?? (await this.#resolveAbsolutePath(params.filePath));
1358
+ if (absolutePath) {
1359
+ await this.#features.lsp.window.showDocument({ uri: vscode_uri_1.URI.file(absolutePath).toString() });
1360
+ }
1361
+ }
1362
+ }
253
1363
  onFollowUpClicked() { }
254
1364
  onInfoLinkClick() { }
255
1365
  onLinkClick() { }
256
- onReady() { }
1366
+ async onReady() {
1367
+ await this.#tabBarController.loadChats();
1368
+ try {
1369
+ const localProjectContextController = await localProjectContextController_1.LocalProjectContextController.getInstance();
1370
+ const contextItems = await localProjectContextController.getContextCommandItems();
1371
+ await this.#contextCommandsProvider.processContextCommandUpdate(contextItems);
1372
+ void this.#contextCommandsProvider.maybeUpdateCodeSymbols();
1373
+ }
1374
+ catch (error) {
1375
+ this.#log('Error initializing context commands: ' + error);
1376
+ }
1377
+ }
257
1378
  onSendFeedback({ tabId, feedbackPayload }) {
258
1379
  this.#features.telemetry.emitMetric({
259
1380
  name: 'amazonq_sendFeedback',
@@ -294,6 +1415,7 @@ class AgenticChatController {
294
1415
  });
295
1416
  this.#telemetryController.activeTabId = undefined;
296
1417
  }
1418
+ this.#chatHistoryDb.updateTabOpenState(params.tabId, false);
297
1419
  this.#chatSessionManagementService.deleteSession(params.tabId);
298
1420
  this.#telemetryController.removeConversation(params.tabId);
299
1421
  }
@@ -308,6 +1430,7 @@ class AgenticChatController {
308
1430
  },
309
1431
  });
310
1432
  this.#telemetryController.removeConversation(params.tabId);
1433
+ this.#chatHistoryDb.clearTab(params.tabId);
311
1434
  sessionResult.data?.clear();
312
1435
  return {};
313
1436
  }
@@ -326,10 +1449,33 @@ class AgenticChatController {
326
1449
  return {};
327
1450
  }
328
1451
  }
1452
+ async onTabBarAction(params) {
1453
+ return this.#tabBarController.onTabBarAction(params);
1454
+ }
329
1455
  async #getInlineChatTriggerContext(params) {
330
1456
  let triggerContext = await this.#triggerContext.getNewTriggerContext(params);
331
1457
  return triggerContext;
332
1458
  }
1459
+ async #resolveAbsolutePath(relativePath) {
1460
+ try {
1461
+ const workspaceFolders = lsp_core_1.workspaceUtils.getWorkspaceFolderPaths(this.#features.lsp);
1462
+ for (const workspaceRoot of workspaceFolders) {
1463
+ const candidatePath = path.join(workspaceRoot, relativePath);
1464
+ if (await this.#features.workspace.fs.exists(candidatePath)) {
1465
+ return candidatePath;
1466
+ }
1467
+ }
1468
+ // handle prompt file outside of workspace
1469
+ if (relativePath.endsWith(contextUtils_1.promptFileExtension)) {
1470
+ return path.join((0, contextUtils_1.getUserPromptsDirectory)(), relativePath);
1471
+ }
1472
+ this.#features.logging.error(`File not found: ${relativePath}`);
1473
+ }
1474
+ catch (e) {
1475
+ this.#features.logging.error(`Error resolving absolute path: ${e.message}`);
1476
+ }
1477
+ return undefined;
1478
+ }
333
1479
  async #getTriggerContext(params, metric) {
334
1480
  const lastMessageTrigger = this.#telemetryController.getLastMessageTrigger(params.tabId);
335
1481
  let triggerContext;
@@ -356,19 +1502,64 @@ class AgenticChatController {
356
1502
  });
357
1503
  return triggerContext;
358
1504
  }
359
- async #processSendMessageResponse(response, metric, partialResultToken) {
1505
+ async #invalidateAllShellCommands(tabId, session) {
1506
+ for (const [toolUseId, toolUse] of session.toolUseLookup.entries()) {
1507
+ if (toolUse.name !== 'executeBash' || this.#stoppedToolUses.has(toolUseId))
1508
+ continue;
1509
+ const params = toolUse.input;
1510
+ const command = params.command;
1511
+ await this.#features.chat.sendChatUpdate({
1512
+ tabId,
1513
+ state: { inProgress: false },
1514
+ data: {
1515
+ messages: [
1516
+ {
1517
+ messageId: toolUseId,
1518
+ type: 'tool',
1519
+ body: `\`\`\`shell\n${command}\n\`\`\``,
1520
+ header: {
1521
+ body: 'shell',
1522
+ status: { status: 'info', icon: 'info', text: 'Ignored' },
1523
+ buttons: [],
1524
+ },
1525
+ },
1526
+ ],
1527
+ },
1528
+ });
1529
+ this.#stoppedToolUses.add(toolUseId);
1530
+ }
1531
+ }
1532
+ async #processGenerateAssistantResponseResponse(response, metric, chatResultStream, session, contextList) {
360
1533
  const requestId = response.$metadata.requestId;
361
- const chatEventParser = new chatEventParser_1.ChatEventParser(requestId, metric);
362
- for await (const chatEvent of response.sendMessageResponse) {
1534
+ const chatEventParser = new agenticChatEventParser_1.AgenticChatEventParser(requestId, metric, this.#features.logging);
1535
+ const streamWriter = chatResultStream.getResultStreamWriter();
1536
+ // Display context transparency list once at the beginning of response
1537
+ // Use a flag to track if contextList has been sent already to avoid ux flickering
1538
+ if (contextList && !session.contextListSent) {
1539
+ await streamWriter.write({ body: '', contextList });
1540
+ session.contextListSent = true;
1541
+ }
1542
+ const toolUseStartTimes = {};
1543
+ const toolUseLoadingTimeouts = {};
1544
+ for await (const chatEvent of response.generateAssistantResponseResponse) {
1545
+ if (chatEvent.assistantResponseEvent) {
1546
+ await this.#showUndoAllIfRequired(chatResultStream, session);
1547
+ }
363
1548
  const result = chatEventParser.processPartialEvent(chatEvent);
364
1549
  // terminate early when there is an error
365
1550
  if (!result.success) {
1551
+ await streamWriter.close();
366
1552
  return result;
367
1553
  }
368
- if (!(0, utils_2.isNullish)(partialResultToken)) {
369
- await this.#features.lsp.sendProgress(protocol_1.chatRequestType, partialResultToken, result.data.chatResult);
1554
+ // make sure to save code reference events
1555
+ if (chatEvent.assistantResponseEvent || chatEvent.codeReferenceEvent) {
1556
+ await streamWriter.write(result.data.chatResult);
1557
+ }
1558
+ if (chatEvent.toolUseEvent) {
1559
+ await this.#showLoadingIfRequired(chatEvent.toolUseEvent, streamWriter, toolUseStartTimes, toolUseLoadingTimeouts);
370
1560
  }
371
1561
  }
1562
+ await streamWriter.close();
372
1563
  metric.mergeWith({
373
1564
  cwsprChatFullResponseLatency: metric.getTimeElapsed(),
374
1565
  cwsprChatFollowUpCount: chatEventParser.totalEvents.followupPromptEvent,
@@ -378,6 +1569,34 @@ class AgenticChatController {
378
1569
  });
379
1570
  return chatEventParser.getResult();
380
1571
  }
1572
+ /**
1573
+ * This is needed to handle the case where a toolUseEvent takes a long time to resolve the stream and looks like
1574
+ * nothing is happening.
1575
+ */
1576
+ async #showLoadingIfRequired(toolUseEvent, streamWriter, toolUseStartTimes, toolUseLoadingTimeouts) {
1577
+ const toolUseId = toolUseEvent.toolUseId;
1578
+ if (!toolUseEvent.stop && toolUseId) {
1579
+ if (!toolUseStartTimes[toolUseId]) {
1580
+ toolUseStartTimes[toolUseId] = Date.now();
1581
+ this.#debug(`ToolUseEvent ${toolUseId} started`);
1582
+ toolUseLoadingTimeouts[toolUseId] = setTimeout(async () => {
1583
+ this.#debug(`ToolUseEvent ${toolUseId} is taking longer than ${constants_2.loadingThresholdMs}ms, showing loading indicator`);
1584
+ await streamWriter.write({ ...constants_1.loadingMessage, messageId: `loading-${toolUseId}` });
1585
+ }, constants_2.loadingThresholdMs);
1586
+ }
1587
+ }
1588
+ else if (toolUseEvent.stop && toolUseId) {
1589
+ if (toolUseStartTimes[toolUseId]) {
1590
+ const duration = Date.now() - toolUseStartTimes[toolUseId];
1591
+ this.#debug(`ToolUseEvent ${toolUseId} finished streaming after ${duration}ms`);
1592
+ if (toolUseLoadingTimeouts[toolUseId]) {
1593
+ clearTimeout(toolUseLoadingTimeouts[toolUseId]);
1594
+ delete toolUseLoadingTimeouts[toolUseId];
1595
+ }
1596
+ delete toolUseStartTimes[toolUseId];
1597
+ }
1598
+ }
1599
+ }
381
1600
  async #processSendMessageResponseForInlineChat(response, metric, partialResultToken) {
382
1601
  const requestId = response.$metadata.requestId;
383
1602
  const chatEventParser = new chatEventParser_1.ChatEventParser(requestId, metric);
@@ -387,15 +1606,22 @@ class AgenticChatController {
387
1606
  if (!result.success) {
388
1607
  return result;
389
1608
  }
390
- if (!(0, utils_2.isNullish)(partialResultToken)) {
391
- await this.#features.lsp.sendProgress(protocol_1.chatRequestType, partialResultToken, result.data.chatResult);
392
- }
1609
+ await this.#sendProgressToClient(result.data.chatResult, partialResultToken);
393
1610
  }
394
1611
  return chatEventParser.getResult();
395
1612
  }
1613
+ onPromptInputOptionChange(params) {
1614
+ const sessionResult = this.#chatSessionManagementService.getSession(params.tabId);
1615
+ const { data: session, success } = sessionResult;
1616
+ if (!success) {
1617
+ this.#log('onPromptInputOptionChange: on valid session found');
1618
+ return;
1619
+ }
1620
+ session.pairProgrammingMode = !session.pairProgrammingMode;
1621
+ }
396
1622
  updateConfiguration = (newConfig) => {
397
1623
  this.#customizationArn = newConfig.customizationArn;
398
- this.#log(`Chat configuration updated to use ${this.#customizationArn}`);
1624
+ this.#log(`Chat configuration updated customizationArn to ${this.#customizationArn}`);
399
1625
  /*
400
1626
  The flag enableTelemetryEventsToDestination is set to true temporarily. It's value will be determined through destination
401
1627
  configuration post all events migration to STE. It'll be replaced by qConfig['enableTelemetryEventsToDestination'] === true
@@ -406,9 +1632,29 @@ class AgenticChatController {
406
1632
  this.#telemetryService.updateOptOutPreference(updatedOptOutPreference);
407
1633
  this.#log(`Chat configuration telemetry preference to ${updatedOptOutPreference}`);
408
1634
  };
1635
+ #getTools(session) {
1636
+ const tools = this.#features.agent.getTools({ format: 'bedrock' });
1637
+ // it's disabled so filter out the write tools
1638
+ if (!session.pairProgrammingMode) {
1639
+ return tools.filter(tool => !['fsWrite', 'executeBash'].includes(tool.toolSpecification?.name || ''));
1640
+ }
1641
+ return tools;
1642
+ }
1643
+ #createDeferred() {
1644
+ let resolve;
1645
+ let reject;
1646
+ const promise = new Promise((res, rej) => {
1647
+ resolve = res;
1648
+ reject = (e) => rej(e);
1649
+ });
1650
+ return { promise, resolve, reject };
1651
+ }
409
1652
  #log(...messages) {
410
1653
  this.#features.logging.log(messages.join(' '));
411
1654
  }
1655
+ #debug(...messages) {
1656
+ this.#features.logging.debug(messages.join(' '));
1657
+ }
412
1658
  }
413
1659
  exports.AgenticChatController = AgenticChatController;
414
1660
  //# sourceMappingURL=agenticChatController.js.map