@aws/lsp-codewhisperer 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/node_modules/@amzn/codewhisperer-streaming/README.md +56 -0
  3. package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +2 -0
  4. package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +2 -0
  5. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +3 -0
  6. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +3 -0
  7. package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +3 -0
  8. package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +10 -0
  9. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/package.json +2 -2
  10. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -2
  11. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -1
  12. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -2
  13. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -3
  14. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -7
  15. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -7
  16. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -7
  17. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -3
  18. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -3
  19. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -1
  20. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -1
  21. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -2
  22. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -1
  23. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -1
  24. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -1
  25. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -1
  26. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -1
  27. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -1
  28. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -1
  29. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -2
  30. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/package.json +5 -5
  31. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/LICENSE +201 -0
  32. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/README.md +115 -0
  33. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort-handler.js +1 -0
  34. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort.js +1 -0
  35. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +1 -0
  36. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +1 -0
  37. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +1 -0
  38. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +1 -0
  39. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +1 -0
  40. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/auth.js +1 -0
  41. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/index.js +1 -0
  42. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +1 -0
  43. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/checksum.js +1 -0
  44. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/client.js +1 -0
  45. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/command.js +1 -0
  46. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/config.js +1 -0
  47. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/index.js +1 -0
  48. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/manager.js +1 -0
  49. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/pool.js +1 -0
  50. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/crypto.js +1 -0
  51. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +1 -0
  52. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/encode.js +1 -0
  53. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoint.js +1 -0
  54. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +1 -0
  55. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +1 -0
  56. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +1 -0
  57. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +1 -0
  58. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/index.js +1 -0
  59. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +1 -0
  60. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/eventStream.js +1 -0
  61. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +1 -0
  62. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +1 -0
  63. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +1 -0
  64. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/index.js +1 -0
  65. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/retry.js +1 -0
  66. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +1 -0
  67. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/feature-ids.js +1 -0
  68. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +1 -0
  69. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http.js +1 -0
  70. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +1 -0
  71. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +1 -0
  72. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/identity.js +1 -0
  73. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/index.js +1 -0
  74. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +1 -0
  75. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/index.js +144 -0
  76. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/logger.js +1 -0
  77. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/middleware.js +1 -0
  78. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/pagination.js +1 -0
  79. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/profile.js +1 -0
  80. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/response.js +1 -0
  81. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/retry.js +1 -0
  82. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/schema.js +1 -0
  83. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/sentinels.js +1 -0
  84. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/traits.js +1 -0
  85. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/serde.js +1 -0
  86. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/shapes.js +1 -0
  87. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/signature.js +1 -0
  88. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/stream.js +1 -0
  89. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +1 -0
  90. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  91. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  92. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transfer.js +1 -0
  93. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +1 -0
  94. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +1 -0
  95. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/exact.js +1 -0
  96. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/mutable.js +1 -0
  97. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +1 -0
  98. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +1 -0
  99. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/uri.js +1 -0
  100. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/util.js +1 -0
  101. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/waiter.js +1 -0
  102. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
  103. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort.js +1 -0
  104. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
  105. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
  106. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
  107. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
  108. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
  109. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
  110. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/index.js +6 -0
  111. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
  112. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/checksum.js +1 -0
  113. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/client.js +1 -0
  114. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/command.js +1 -0
  115. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
  116. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
  117. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
  118. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
  119. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/crypto.js +1 -0
  120. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
  121. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/encode.js +1 -0
  122. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
  123. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
  124. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
  125. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
  126. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
  127. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
  128. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
  129. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
  130. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
  131. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
  132. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
  133. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/index.js +3 -0
  134. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
  135. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
  136. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
  137. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
  138. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http.js +5 -0
  139. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
  140. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
  141. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
  142. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/index.js +4 -0
  143. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
  144. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/index.js +40 -0
  145. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/logger.js +1 -0
  146. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/middleware.js +1 -0
  147. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/pagination.js +1 -0
  148. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/profile.js +6 -0
  149. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/response.js +1 -0
  150. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/retry.js +1 -0
  151. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
  152. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
  153. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
  154. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/serde.js +1 -0
  155. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/shapes.js +1 -0
  156. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/signature.js +1 -0
  157. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/stream.js +1 -0
  158. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
  159. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
  160. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
  161. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transfer.js +6 -0
  162. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
  163. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
  164. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
  165. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
  166. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
  167. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
  168. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/uri.js +1 -0
  169. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/util.js +1 -0
  170. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/waiter.js +1 -0
  171. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
  172. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort.d.ts +50 -0
  173. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
  174. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
  175. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
  176. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
  177. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
  178. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/auth.d.ts +57 -0
  179. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/index.d.ts +6 -0
  180. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +40 -0
  181. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
  182. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
  183. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/command.d.ts +25 -0
  184. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/config.d.ts +10 -0
  185. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
  186. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
  187. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
  188. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
  189. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +25 -0
  190. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
  191. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
  192. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
  193. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
  194. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
  195. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
  196. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
  197. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
  198. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
  199. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
  200. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +33 -0
  201. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
  202. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/index.d.ts +4 -0
  203. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
  204. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
  205. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
  206. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +121 -0
  207. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http.d.ts +112 -0
  208. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
  209. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
  210. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
  211. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
  212. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
  213. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/index.d.ts +40 -0
  214. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
  215. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/middleware.d.ts +534 -0
  216. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
  217. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
  218. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
  219. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/retry.d.ts +133 -0
  220. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/schema.d.ts +263 -0
  221. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
  222. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
  223. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
  224. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/shapes.d.ts +82 -0
  225. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/signature.d.ts +155 -0
  226. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
  227. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +32 -0
  228. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
  229. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
  230. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transfer.d.ts +41 -0
  231. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
  232. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +77 -0
  233. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
  234. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
  235. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
  236. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +34 -0
  237. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
  238. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +50 -0
  239. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
  240. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
  241. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
  242. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
  243. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
  244. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +57 -0
  245. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +6 -0
  246. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +40 -0
  247. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +63 -0
  248. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
  249. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +25 -0
  250. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +10 -0
  251. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
  252. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
  253. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
  254. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +60 -0
  255. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +41 -0
  256. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
  257. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
  258. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
  259. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
  260. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
  261. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
  262. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
  263. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
  264. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
  265. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
  266. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +33 -0
  267. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
  268. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +4 -0
  269. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
  270. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
  271. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
  272. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +121 -0
  273. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +112 -0
  274. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
  275. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
  276. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
  277. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
  278. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
  279. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +40 -0
  280. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
  281. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +534 -0
  282. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
  283. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
  284. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
  285. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +133 -0
  286. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +278 -0
  287. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
  288. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
  289. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
  290. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +82 -0
  291. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +155 -0
  292. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
  293. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +32 -0
  294. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
  295. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
  296. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +41 -0
  297. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
  298. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +81 -0
  299. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
  300. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
  301. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
  302. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +41 -0
  303. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
  304. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
  305. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
  306. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
  307. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
  308. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
  309. package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/package.json +60 -0
  310. package/node_modules/@amzn/codewhisperer-streaming/package.json +1 -1
  311. package/out/client/sigv4/service.json +8 -0
  312. package/out/client/token/bearer-token-service.json +20 -0
  313. package/out/language-server/agenticChat/agenticChatController.d.ts +9 -3
  314. package/out/language-server/agenticChat/agenticChatController.js +335 -75
  315. package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
  316. package/out/language-server/agenticChat/agenticChatResultStream.d.ts +9 -0
  317. package/out/language-server/agenticChat/agenticChatResultStream.js +41 -1
  318. package/out/language-server/agenticChat/agenticChatResultStream.js.map +1 -1
  319. package/out/language-server/agenticChat/constants.d.ts +0 -1
  320. package/out/language-server/agenticChat/constants.js +1 -2
  321. package/out/language-server/agenticChat/constants.js.map +1 -1
  322. package/out/language-server/agenticChat/context/addtionalContextProvider.d.ts +2 -3
  323. package/out/language-server/agenticChat/context/addtionalContextProvider.js +3 -5
  324. package/out/language-server/agenticChat/context/addtionalContextProvider.js.map +1 -1
  325. package/out/language-server/agenticChat/context/agenticChatTriggerContext.d.ts +1 -0
  326. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js +15 -2
  327. package/out/language-server/agenticChat/context/agenticChatTriggerContext.js.map +1 -1
  328. package/out/language-server/agenticChat/errors.d.ts +2 -1
  329. package/out/language-server/agenticChat/errors.js +11 -1
  330. package/out/language-server/agenticChat/errors.js.map +1 -1
  331. package/out/language-server/agenticChat/tabBarController.d.ts +10 -1
  332. package/out/language-server/agenticChat/tabBarController.js +54 -27
  333. package/out/language-server/agenticChat/tabBarController.js.map +1 -1
  334. package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +8 -9
  335. package/out/language-server/agenticChat/tools/chatDb/chatDb.js +58 -124
  336. package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -1
  337. package/out/language-server/agenticChat/tools/codeSearch.js +1 -1
  338. package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -1
  339. package/out/language-server/agenticChat/tools/executeBash.d.ts +2 -2
  340. package/out/language-server/agenticChat/tools/executeBash.js +4 -4
  341. package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
  342. package/out/language-server/agenticChat/tools/fileSearch.js +1 -1
  343. package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -1
  344. package/out/language-server/agenticChat/tools/fsRead.js +1 -1
  345. package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
  346. package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
  347. package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
  348. package/out/language-server/agenticChat/tools/grepSearch.d.ts +74 -0
  349. package/out/language-server/agenticChat/tools/grepSearch.js +254 -0
  350. package/out/language-server/agenticChat/tools/grepSearch.js.map +1 -0
  351. package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
  352. package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
  353. package/out/language-server/agenticChat/tools/toolServer.js +2 -1
  354. package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
  355. package/out/language-server/agenticChat/tools/toolShared.d.ts +1 -1
  356. package/out/language-server/agenticChat/tools/toolShared.js +2 -2
  357. package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
  358. package/out/language-server/chat/chatController.d.ts +1 -1
  359. package/out/language-server/chat/chatController.js.map +1 -1
  360. package/out/language-server/chat/chatSessionService.d.ts +13 -0
  361. package/out/language-server/chat/chatSessionService.js +28 -4
  362. package/out/language-server/chat/chatSessionService.js.map +1 -1
  363. package/out/language-server/chat/contexts/triggerContext.js +1 -0
  364. package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
  365. package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -4
  366. package/out/language-server/chat/telemetry/chatTelemetryController.js +29 -5
  367. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  368. package/out/language-server/inline-completion/codePercentage.js +1 -0
  369. package/out/language-server/inline-completion/codePercentage.js.map +1 -1
  370. package/out/language-server/inline-completion/codeWhispererServer.d.ts +1 -0
  371. package/out/language-server/inline-completion/codeWhispererServer.js +40 -5
  372. package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
  373. package/out/language-server/inline-completion/session/sessionManager.d.ts +2 -0
  374. package/out/language-server/inline-completion/session/sessionManager.js +2 -0
  375. package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
  376. package/out/language-server/localProjectContext/localProjectContextServer.js +3 -4
  377. package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -1
  378. package/out/language-server/workspaceContext/artifactManager.d.ts +1 -1
  379. package/out/language-server/workspaceContext/artifactManager.js +55 -22
  380. package/out/language-server/workspaceContext/artifactManager.js.map +1 -1
  381. package/out/language-server/workspaceContext/client.d.ts +1 -2
  382. package/out/language-server/workspaceContext/client.js +8 -16
  383. package/out/language-server/workspaceContext/client.js.map +1 -1
  384. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.d.ts +2 -0
  385. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js +11 -1
  386. package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js.map +1 -1
  387. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.d.ts +17 -0
  388. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js +75 -0
  389. package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js.map +1 -0
  390. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js +9 -9
  391. package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js.map +1 -1
  392. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js +9 -9
  393. package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js.map +1 -1
  394. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.d.ts +7 -5
  395. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js +21 -15
  396. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js.map +1 -1
  397. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.d.ts +1 -1
  398. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js +4 -4
  399. package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js.map +1 -1
  400. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js +38 -29
  401. package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js.map +1 -1
  402. package/out/language-server/workspaceContext/javaManager.js +1 -1
  403. package/out/language-server/workspaceContext/javaManager.js.map +1 -1
  404. package/out/language-server/workspaceContext/util.d.ts +1 -0
  405. package/out/language-server/workspaceContext/util.js +12 -6
  406. package/out/language-server/workspaceContext/util.js.map +1 -1
  407. package/out/language-server/workspaceContext/workspaceContextServer.js +63 -82
  408. package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
  409. package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +22 -50
  410. package/out/language-server/workspaceContext/workspaceFolderManager.js +259 -496
  411. package/out/language-server/workspaceContext/workspaceFolderManager.js.map +1 -1
  412. package/out/shared/telemetry/telemetryService.d.ts +10 -1
  413. package/out/shared/telemetry/telemetryService.js +36 -7
  414. package/out/shared/telemetry/telemetryService.js.map +1 -1
  415. package/out/shared/telemetry/types.d.ts +39 -0
  416. package/out/shared/telemetry/types.js +1 -0
  417. package/out/shared/telemetry/types.js.map +1 -1
  418. package/package.json +6 -5
  419. package/out/shared/initializeUtils.d.ts +0 -3
  420. package/out/shared/initializeUtils.js +0 -32
  421. package/out/shared/initializeUtils.js.map +0 -1
@@ -3,43 +3,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkspaceFolderManager = void 0;
4
4
  const client_1 = require("./client");
5
5
  const util_1 = require("./util");
6
+ const vscode_uri_1 = require("vscode-uri");
7
+ const path = require("path");
6
8
  class WorkspaceFolderManager {
7
9
  serviceManager;
8
10
  logging;
9
11
  artifactManager;
10
12
  dependencyDiscoverer;
11
- workspaceMap;
12
13
  static instance;
14
+ workspaceIdentifier;
15
+ workspaceState;
16
+ remoteWorkspaceIdPromise;
17
+ remoteWorkspaceIdResolver;
18
+ remoteWorkspaceIdRejecter;
13
19
  workspaceFolders;
14
20
  credentialsProvider;
15
21
  INITIAL_CHECK_INTERVAL = 40 * 1000; // 40 seconds
16
- INITIAL_TIMEOUT = 2 * 60 * 1000; // 2 minutes
22
+ INITIAL_CONNECTION_TIMEOUT = 2 * 60 * 1000; // 2 minutes
17
23
  CONTINUOUS_MONITOR_INTERVAL = 5 * 60 * 1000; // 5 minutes
18
- monitorIntervals = new Map();
24
+ MESSAGE_PUBLISH_INTERVAL = 100; // 100 milliseconds
25
+ continuousMonitorInterval;
26
+ optOutMonitorInterval;
27
+ messageQueueConsumerInterval;
19
28
  isOptedOut = false;
20
- static createInstance(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider) {
29
+ static createInstance(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier) {
21
30
  if (!this.instance) {
22
- this.instance = new WorkspaceFolderManager(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider);
31
+ this.instance = new WorkspaceFolderManager(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier);
23
32
  }
24
33
  return this.instance;
25
34
  }
26
35
  static getInstance() {
27
36
  return this.instance;
28
37
  }
29
- constructor(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider) {
38
+ constructor(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier) {
30
39
  this.serviceManager = serviceManager;
31
40
  this.logging = logging;
32
41
  this.artifactManager = artifactManager;
33
42
  this.dependencyDiscoverer = dependencyDiscoverer;
34
- this.workspaceMap = new Map();
35
43
  this.workspaceFolders = workspaceFolders;
36
44
  this.credentialsProvider = credentialsProvider;
45
+ this.workspaceIdentifier = workspaceIdentifier;
37
46
  this.dependencyDiscoverer.dependencyHandlerRegistry.forEach(handler => {
38
- handler.onDependencyChange(async (workspaceFolder, zips) => {
47
+ handler.onDependencyChange(async (workspaceFolder, zips, addWSFolderPathInS3) => {
39
48
  try {
40
49
  this.logging.log(`Dependency change detected in ${workspaceFolder.uri}`);
41
50
  // Process the dependencies
42
- await this.handleDependencyChanges(zips);
51
+ await this.handleDependencyChanges(zips, addWSFolderPathInS3);
43
52
  // Clean up only after successful processing
44
53
  await handler.cleanupZipFiles(zips);
45
54
  }
@@ -48,6 +57,28 @@ class WorkspaceFolderManager {
48
57
  }
49
58
  });
50
59
  });
60
+ this.remoteWorkspaceIdPromise = new Promise((resolve, reject) => {
61
+ this.remoteWorkspaceIdResolver = resolve;
62
+ this.remoteWorkspaceIdRejecter = reject;
63
+ });
64
+ this.workspaceState = {
65
+ remoteWorkspaceState: 'CREATION_PENDING',
66
+ messageQueue: [],
67
+ };
68
+ this.messageQueueConsumerInterval = setInterval(() => {
69
+ if (this.workspaceState.webSocketClient && this.workspaceState.webSocketClient.isConnected()) {
70
+ const message = this.workspaceState.messageQueue[0];
71
+ if (message) {
72
+ try {
73
+ this.workspaceState.webSocketClient.send(message);
74
+ this.workspaceState.messageQueue.shift();
75
+ }
76
+ catch (error) {
77
+ this.logging.error(`Error sending message: ${error}`);
78
+ }
79
+ }
80
+ }
81
+ }, this.MESSAGE_PUBLISH_INTERVAL);
51
82
  }
52
83
  /**
53
84
  * The function is used to track the latest state of workspace folders.
@@ -57,42 +88,15 @@ class WorkspaceFolderManager {
57
88
  updateWorkspaceFolders(workspaceFolders) {
58
89
  this.workspaceFolders = workspaceFolders;
59
90
  }
60
- getWorkspaces() {
61
- return this.workspaceMap;
62
- }
63
- getWorkspaceDetailsWithId(fileUri, workspaceFolders) {
64
- const workspaceRoot = (0, util_1.findWorkspaceRootFolder)(fileUri, workspaceFolders ?? this.workspaceFolders);
65
- if (!workspaceRoot) {
66
- return null;
67
- }
68
- const workspaceDetails = this.getWorkspaces().get(workspaceRoot.uri);
69
- if (!workspaceDetails) {
70
- this.logging.log(`Workspace details not found for workspace folder ${workspaceRoot.uri}`);
71
- return null;
72
- }
73
- if (!workspaceDetails.workspaceId) {
74
- this.logging.log(`Workspace initialization in progress - workspaceId not yet assigned for: ${workspaceRoot.uri}`);
75
- return { workspaceDetails, workspaceRoot };
76
- }
77
- return { workspaceDetails, workspaceRoot };
78
- }
79
- getWorkspaceFolder(fileUri) {
80
- return (0, util_1.findWorkspaceRootFolder)(fileUri, this.workspaceFolders);
81
- }
82
- getWorkspaceId(workspaceFolder) {
83
- if (!workspaceFolder) {
84
- return undefined;
85
- }
86
- const workspaceDetails = this.getWorkspaces().get(workspaceFolder.uri);
87
- if (!workspaceDetails || !workspaceDetails.workspaceId) {
88
- this.logging.log(`Unable to retrieve workspaceId - workspace initialization incomplete for: ${workspaceFolder.uri}`);
89
- return undefined;
90
- }
91
- return workspaceDetails.workspaceId;
91
+ getWorkspaceFolder(fileUri, workspaceFolders) {
92
+ return (0, util_1.findWorkspaceRootFolder)(fileUri, workspaceFolders ?? this.workspaceFolders);
92
93
  }
93
94
  getOptOutStatus() {
94
95
  return this.isOptedOut;
95
96
  }
97
+ getWorkspaceState() {
98
+ return this.workspaceState;
99
+ }
96
100
  async processNewWorkspaceFolders(folders) {
97
101
  // Check if user is opted in before trying to process any files
98
102
  const { optOut } = await this.listWorkspaceMetadata();
@@ -103,47 +107,32 @@ class WorkspaceFolderManager {
103
107
  await this.startOptOutMonitor();
104
108
  return;
105
109
  }
106
- // CreateWorkspace and Setup state machine workflow
107
- for (const folder of folders) {
108
- await this.handleNewWorkspace(folder.uri).catch(e => {
109
- this.logging.warn(`Error processing new workspace ${folder.uri} with error: ${e}`);
110
- });
111
- }
112
- // Snapshot the workspace
113
- this.snapshotWorkspace(folders).catch(e => {
114
- this.logging.warn(`Error during snapshot workspace: ${e}`);
110
+ // Wait for remote workspace id
111
+ await this.waitForRemoteWorkspaceId();
112
+ // Sync workspace source codes
113
+ await this.syncSourceCodesToS3(folders).catch(e => {
114
+ this.logging.warn(`Error during syncing workspace source codes: ${e}`);
115
115
  });
116
- }
117
- async snapshotWorkspace(folders) {
118
- let sourceCodeMetadata = [];
119
- sourceCodeMetadata = await this.artifactManager.addWorkspaceFolders(folders);
120
- // Kick off dependency discovery but don't wait
116
+ // Kick off dependency discovery but don't wait
121
117
  this.dependencyDiscoverer.searchDependencies(folders).catch(e => {
122
118
  this.logging.warn(`Error during dependency discovery: ${e}`);
123
119
  });
124
- const fileMetadataMap = new Map();
125
- sourceCodeMetadata.forEach((fileMetadata) => {
126
- let metadata = fileMetadataMap.get(fileMetadata.workspaceFolder.uri);
127
- if (!metadata) {
128
- metadata = [];
129
- fileMetadataMap.set(fileMetadata.workspaceFolder.uri, metadata);
130
- }
131
- metadata.push(fileMetadata);
132
- });
133
- folders.forEach(folder => {
134
- const workspaceDetails = this.getWorkspaces().get(folder.uri);
135
- if (workspaceDetails) {
136
- workspaceDetails.requiresS3Upload = true;
137
- }
138
- });
139
- await this.uploadWithTimeout(fileMetadataMap);
140
120
  }
141
- async uploadToS3(fileMetadata) {
121
+ async syncSourceCodesToS3(folders) {
122
+ let sourceCodeMetadata = [];
123
+ sourceCodeMetadata = await this.artifactManager.addWorkspaceFolders(folders);
124
+ await this.uploadS3AndQueueEvents(sourceCodeMetadata);
125
+ this.artifactManager.cleanup(true, folders);
126
+ }
127
+ async uploadToS3(fileMetadata, addWSFolderPathInS3 = true) {
142
128
  let relativePath = fileMetadata.relativePath.replace(fileMetadata.workspaceFolder.name, '');
143
129
  relativePath = relativePath.startsWith('/') ? relativePath.slice(1) : relativePath;
144
- const workspaceId = this.getWorkspaces().get(fileMetadata.workspaceFolder.uri)?.workspaceId ?? '';
130
+ if (addWSFolderPathInS3) {
131
+ relativePath = path.join(vscode_uri_1.URI.parse(fileMetadata.workspaceFolder.uri).path.slice(1), relativePath);
132
+ }
133
+ const workspaceId = this.workspaceState.workspaceId;
145
134
  if (!workspaceId) {
146
- this.logging.warn(`Workspace ID is not found for folder ${fileMetadata.workspaceFolder.uri}, skipping S3 upload`);
135
+ this.logging.warn(`Workspace ID is not found, skipping S3 upload`);
147
136
  return;
148
137
  }
149
138
  let s3Url;
@@ -175,13 +164,9 @@ class WorkspaceFolderManager {
175
164
  return s3Url;
176
165
  }
177
166
  async clearAllWorkspaceResources() {
178
- for (const workspace of this.monitorIntervals.keys()) {
179
- this.stopMonitoring(workspace);
180
- }
181
- for (const { webSocketClient } of this.workspaceMap.values()) {
182
- webSocketClient?.destroyClient();
183
- }
184
- this.workspaceMap.clear();
167
+ this.stopContinuousMonitoring();
168
+ this.resetRemoteWorkspaceId();
169
+ this.workspaceState.webSocketClient?.destroyClient();
185
170
  this.artifactManager.cleanup();
186
171
  this.dependencyDiscoverer.dispose();
187
172
  }
@@ -191,84 +176,40 @@ class WorkspaceFolderManager {
191
176
  * @param workspaceFolder
192
177
  */
193
178
  async processWorkspaceFoldersDeletion(workspaceFolders) {
179
+ const workspaceId = await this.waitForRemoteWorkspaceId();
194
180
  for (const folder of workspaceFolders) {
195
- const workspaceDetails = this.workspaceMap.get(folder.uri);
196
- const websocketClient = workspaceDetails?.webSocketClient;
197
181
  const languagesMap = this.artifactManager.getLanguagesForWorkspaceFolder(folder);
198
182
  const programmingLanguages = languagesMap ? Array.from(languagesMap.keys()) : [];
199
- if (websocketClient) {
200
- for (const language of programmingLanguages) {
201
- // Wait for message being sent before disconnecting
202
- await websocketClient
203
- .send(JSON.stringify({
204
- method: 'workspace/didChangeWorkspaceFolders',
205
- params: {
206
- workspaceFoldersChangeEvent: {
207
- added: [],
208
- removed: [
209
- {
210
- uri: '/',
211
- name: folder.name,
212
- },
213
- ],
214
- },
215
- workspaceChangeMetadata: {
216
- workspaceId: this.getWorkspaces().get(folder.uri)?.workspaceId ?? '',
217
- programmingLanguage: language,
218
- },
183
+ for (const language of programmingLanguages) {
184
+ const message = JSON.stringify({
185
+ method: 'workspace/didChangeWorkspaceFolders',
186
+ params: {
187
+ workspaceFoldersChangeEvent: {
188
+ added: [],
189
+ removed: [
190
+ {
191
+ uri: folder.uri,
192
+ name: folder.name,
193
+ },
194
+ ],
219
195
  },
220
- }))
221
- .catch(e => {
222
- this.logging.error(`Error sending didChangeWorkspaceFolders message: ${e}`);
223
- });
224
- }
225
- websocketClient.disconnect();
196
+ workspaceChangeMetadata: {
197
+ workspaceId: workspaceId,
198
+ programmingLanguage: language,
199
+ },
200
+ },
201
+ });
202
+ this.workspaceState.messageQueue.push(message);
226
203
  }
227
- this.removeWorkspaceEntry(folder.uri);
228
204
  this.dependencyDiscoverer.disposeWorkspaceFolder(folder);
229
- this.stopMonitoring(folder.uri);
230
205
  }
231
206
  await this.artifactManager.removeWorkspaceFolders(workspaceFolders);
232
207
  }
233
- processRemoteWorkspaceRefresh(workspaceFolders) {
234
- for (const folder of workspaceFolders) {
235
- const workspaceDetails = this.workspaceMap.get(folder.uri);
236
- const websocketClient = workspaceDetails?.webSocketClient;
237
- if (websocketClient) {
238
- websocketClient.destroyClient();
239
- }
240
- this.removeWorkspaceEntry(folder.uri);
241
- this.dependencyDiscoverer.disposeWorkspaceFolder(folder);
242
- }
243
- }
244
- updateWorkspaceEntry(workspaceRoot, workspaceState) {
245
- if (!workspaceState.messageQueue) {
246
- workspaceState.messageQueue = [];
247
- }
248
- if (!this.workspaceMap.has(workspaceRoot)) {
249
- workspaceState.requiresS3Upload = true;
250
- this.workspaceMap.set(workspaceRoot, workspaceState);
251
- }
252
- else {
253
- const existingWorkspaceState = this.workspaceMap.get(workspaceRoot);
254
- if (existingWorkspaceState) {
255
- existingWorkspaceState.remoteWorkspaceState =
256
- workspaceState.remoteWorkspaceState ?? existingWorkspaceState.remoteWorkspaceState;
257
- existingWorkspaceState.webSocketClient =
258
- workspaceState.webSocketClient ?? existingWorkspaceState.webSocketClient;
259
- existingWorkspaceState.workspaceId = workspaceState.workspaceId ?? existingWorkspaceState.workspaceId;
260
- existingWorkspaceState.messageQueue = workspaceState.messageQueue ?? existingWorkspaceState.messageQueue;
261
- }
262
- }
263
- }
264
- removeWorkspaceEntry(workspaceRoot) {
265
- this.workspaceMap.delete(workspaceRoot);
266
- }
267
- async handleDependencyChanges(zips) {
208
+ async handleDependencyChanges(zips, addWSFolderPathInS3) {
268
209
  this.logging.log(`Processing ${zips.length} dependency changes`);
269
210
  for (const zip of zips) {
270
211
  try {
271
- const s3Url = await this.uploadToS3(zip);
212
+ const s3Url = await this.uploadToS3(zip, addWSFolderPathInS3);
272
213
  if (!s3Url) {
273
214
  continue;
274
215
  }
@@ -280,46 +221,20 @@ class WorkspaceFolderManager {
280
221
  }
281
222
  }
282
223
  notifyDependencyChange(fileMetadata, s3Url) {
283
- const workspaceDetails = this.getWorkspaces().get(fileMetadata.workspaceFolder.uri);
284
- if (!workspaceDetails) {
285
- return;
286
- }
287
224
  const message = JSON.stringify({
288
225
  method: 'didChangeDependencyPaths',
289
226
  params: {
290
227
  event: { paths: [] },
291
228
  workspaceChangeMetadata: {
292
- workspaceId: workspaceDetails.workspaceId,
229
+ workspaceId: this.workspaceState.workspaceId,
293
230
  s3Path: (0, util_1.cleanUrl)(s3Url),
294
231
  programmingLanguage: fileMetadata.language,
295
232
  },
296
233
  },
297
234
  });
298
- if (!workspaceDetails.webSocketClient) {
299
- this.logging.log(`WebSocket client is not connected yet: ${fileMetadata.workspaceFolder.uri} adding didChangeDependencyPaths message to queue`);
300
- workspaceDetails.messageQueue?.push(message);
301
- }
302
- else {
303
- workspaceDetails.webSocketClient.send(message).catch(e => {
304
- this.logging.error(`Error sending didChangeDependencyPaths message: ${e}`);
305
- });
306
- }
235
+ this.workspaceState.messageQueue.push(message);
307
236
  }
308
- async createNewWorkspace(workspace) {
309
- const createWorkspaceResult = await this.createWorkspace(workspace);
310
- const workspaceDetails = createWorkspaceResult.response;
311
- if (!workspaceDetails) {
312
- this.logging.warn(`Failed to create remote workspace for ${workspace}`);
313
- return createWorkspaceResult;
314
- }
315
- this.updateWorkspaceEntry(workspace, {
316
- remoteWorkspaceState: workspaceDetails.workspace.workspaceStatus,
317
- workspaceId: workspaceDetails.workspace.workspaceId,
318
- });
319
- return createWorkspaceResult;
320
- }
321
- async establishConnection(workspace, existingMetadata) {
322
- const existingState = this.workspaceMap.get(workspace);
237
+ async establishConnection(existingMetadata) {
323
238
  if (!existingMetadata.environmentId) {
324
239
  throw new Error('No environment ID found for ready workspace');
325
240
  }
@@ -328,81 +243,53 @@ class WorkspaceFolderManager {
328
243
  }
329
244
  const websocketUrl = existingMetadata.environmentAddress;
330
245
  this.logging.log(`Establishing connection to ${websocketUrl}`);
331
- if (existingState?.webSocketClient) {
332
- const websocketConnectionState = existingState.webSocketClient.getWebsocketReadyState();
246
+ if (this.workspaceState.webSocketClient) {
247
+ const websocketConnectionState = this.workspaceState.webSocketClient.getWebsocketReadyState();
333
248
  if (websocketConnectionState === 'OPEN') {
334
- this.logging.log(`Active connection already exists for ${workspace}`);
249
+ this.logging.log(`Active websocket connection already exists.}`);
335
250
  return;
336
251
  }
337
252
  // If the client exists but isn't connected, it might be in the process of connecting
338
253
  if (websocketConnectionState === 'CONNECTING') {
339
- this.logging.log(`Connection attempt already in progress for ${workspace}`);
254
+ this.logging.log(`Connection attempt already in progress.`);
340
255
  return;
341
256
  }
342
257
  }
343
258
  const webSocketClient = new client_1.WebSocketClient(websocketUrl, this.logging, this.credentialsProvider);
344
- this.updateWorkspaceEntry(workspace, {
345
- remoteWorkspaceState: 'CONNECTED',
346
- webSocketClient,
347
- messageQueue: existingState?.messageQueue || [],
348
- });
349
- await this.processMessagesInQueue(workspace);
350
- }
351
- async handleNewWorkspace(workspace, queueEvents) {
352
- this.logging.log(`Processing new workspace ${workspace}`);
353
- // First check if the workspace already exists in the workspace map
354
- const existingWorkspace = this.workspaceMap.get(workspace);
355
- if (existingWorkspace) {
356
- this.logging.log(`Workspace ${workspace} already exists in memory`);
357
- return;
358
- }
359
- // Check if workspace exists remotely
360
- const { metadata, optOut } = await this.listWorkspaceMetadata(workspace);
361
- if (optOut) {
362
- this.logging.log(`Not creating a new workspace ${workspace}, user is opted out`);
363
- this.isOptedOut = true;
364
- await this.clearAllWorkspaceResources();
365
- await this.startOptOutMonitor();
366
- return;
367
- }
368
- if (metadata) {
369
- // Workspace exists remotely, add to map with current state
370
- this.updateWorkspaceEntry(workspace, {
371
- workspaceId: metadata.workspaceId,
372
- remoteWorkspaceState: metadata.workspaceStatus,
373
- messageQueue: queueEvents ?? [],
374
- });
375
- // We don't attempt a connection here even if remote workspace is ready and leave the connection attempt to the workspace status monitor
376
- }
377
- else {
378
- // Create new workspace
379
- const createWorkspaceResult = await this.createNewWorkspace(workspace);
380
- if (createWorkspaceResult.error && createWorkspaceResult.error.retryable) {
381
- this.logging.log(`Workspace creation failed with retryable error, starting monitor`);
382
- // todo, consider whether we should add the failed env to the map or not and what to do in the create failure case
383
- this.updateWorkspaceEntry(workspace, {
384
- remoteWorkspaceState: 'CREATION_PENDING',
385
- messageQueue: queueEvents ?? [],
386
- });
387
- }
259
+ this.workspaceState.remoteWorkspaceState = 'CONNECTED';
260
+ this.workspaceState.webSocketClient = webSocketClient;
261
+ }
262
+ async initializeWorkspaceStatusMonitor() {
263
+ this.logging.log(`Initializing workspace status check for workspace [${this.workspaceIdentifier}]`);
264
+ // Perform a one-time checkRemoteWorkspaceStatusAndReact first
265
+ // Pass skipUploads as true since it would be handled by processNewWorkspaceFolders
266
+ await this.checkRemoteWorkspaceStatusAndReact(true);
267
+ // Set up continuous monitoring which periodically invokes checkRemoteWorkspaceStatusAndReact
268
+ if (!this.isOptedOut) {
269
+ this.logging.log(`Starting continuous monitor for workspace [${this.workspaceIdentifier}]`);
270
+ const intervalId = setInterval(async () => {
271
+ try {
272
+ await this.checkRemoteWorkspaceStatusAndReact();
273
+ }
274
+ catch (error) {
275
+ this.logging.error(`Error monitoring workspace status: ${error}`);
276
+ }
277
+ }, this.CONTINUOUS_MONITOR_INTERVAL);
278
+ this.continuousMonitorInterval = intervalId;
388
279
  }
389
- this.startWorkspaceStatusMonitor(workspace).catch(error => {
390
- this.logging.error(`Error starting workspace monitor for ${workspace}: ${error}`);
391
- });
392
280
  }
393
- async waitForInitialConnection(workspace) {
394
- this.logging.log(`Waiting for initial connection to ${workspace}`);
281
+ async waitForInitialConnection() {
282
+ this.logging.log(`Waiting for initial connection to remote workspace`);
395
283
  return new Promise(resolve => {
396
284
  const startTime = Date.now();
397
285
  const intervalId = setInterval(async () => {
398
286
  try {
399
- const workspaceState = this.workspaceMap.get(workspace);
400
- if (!workspaceState) {
401
- this.logging.log(`Workspace ${workspace} no longer exists, stopping monitors for workspace`);
287
+ if (Date.now() - startTime >= this.INITIAL_CONNECTION_TIMEOUT) {
288
+ this.logging.warn(`Initial connection timeout.`);
402
289
  clearInterval(intervalId);
403
290
  return resolve(false);
404
291
  }
405
- const { metadata, optOut } = await this.listWorkspaceMetadata(workspace);
292
+ const { metadata, optOut } = await this.listWorkspaceMetadata(this.workspaceIdentifier);
406
293
  if (optOut) {
407
294
  this.logging.log(`User opted out during initial connection`);
408
295
  this.isOptedOut = true;
@@ -414,15 +301,12 @@ class WorkspaceFolderManager {
414
301
  // Continue polling by exiting only this iteration
415
302
  return;
416
303
  }
417
- this.updateWorkspaceEntry(workspace, {
418
- ...workspaceState,
419
- remoteWorkspaceState: metadata.workspaceStatus,
420
- });
304
+ this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus;
421
305
  switch (metadata.workspaceStatus) {
422
306
  case 'READY':
423
- const client = workspaceState.webSocketClient;
307
+ const client = this.workspaceState.webSocketClient;
424
308
  if (!client || !client.isConnected()) {
425
- await this.establishConnection(workspace, metadata);
309
+ await this.establishConnection(metadata);
426
310
  }
427
311
  clearInterval(intervalId);
428
312
  return resolve(true);
@@ -430,137 +314,130 @@ class WorkspaceFolderManager {
430
314
  // Continue polling
431
315
  break;
432
316
  case 'CREATED':
433
- const createWorkspaceResult = await this.createNewWorkspace(workspace);
434
- // If createWorkspace call returns a retyrable error, next interval will retry
435
- // If the call returns non-retryable error, we will re-throw the error and it will stop the interval
436
- if (createWorkspaceResult.error && !createWorkspaceResult.error.retryable) {
437
- throw createWorkspaceResult.error.originalError;
438
- }
439
- break;
317
+ clearInterval(intervalId);
318
+ return resolve(false);
440
319
  default:
441
320
  this.logging.warn(`Unknown workspace status: ${metadata.workspaceStatus}`);
442
321
  clearInterval(intervalId);
443
322
  return resolve(false);
444
323
  }
445
- if (Date.now() - startTime >= this.INITIAL_TIMEOUT) {
446
- this.logging.warn(`Initial connection timeout for workspace ${workspace}`);
447
- clearInterval(intervalId);
448
- return resolve(false);
449
- }
450
324
  }
451
325
  catch (error) {
452
- this.logging.error(`Error during initial connection for workspace ${workspace}: ${error}`);
326
+ this.logging.error(`Error during initializing connection for workspace [${this.workspaceIdentifier}]: ${error}`);
453
327
  clearInterval(intervalId);
454
328
  return resolve(false);
455
329
  }
456
330
  }, this.INITIAL_CHECK_INTERVAL);
457
331
  });
458
332
  }
459
- startContinuousMonitor(workspace) {
460
- this.logging.log(`Starting continuous monitor for workspace ${workspace}`);
461
- const intervalId = setInterval(async () => {
462
- try {
463
- const workspaceState = this.workspaceMap.get(workspace);
464
- if (!workspaceState) {
465
- // Previously we stop monitoring the workspace if it no longer exists
466
- // But now we want to try give it a chance to re-create the workspace
467
- // this.stopMonitoring(workspace)
468
- return;
469
- }
470
- const { metadata, optOut } = await this.listWorkspaceMetadata(workspace);
471
- if (optOut) {
472
- this.logging.log('User opted out, clearing all resources and starting opt-out monitor');
473
- this.isOptedOut = true;
474
- await this.clearAllWorkspaceResources();
475
- await this.startOptOutMonitor();
476
- return;
477
- }
478
- if (!metadata) {
479
- // Workspace no longer exists, Recreate it.
480
- await this.handleWorkspaceCreatedState(workspace);
481
- return;
482
- }
483
- this.updateWorkspaceEntry(workspace, {
484
- ...workspaceState,
485
- remoteWorkspaceState: metadata.workspaceStatus,
486
- });
487
- switch (metadata.workspaceStatus) {
488
- case 'READY':
489
- // Check if connection exists
490
- const client = workspaceState.webSocketClient;
491
- if (!client || !client.isConnected()) {
492
- this.logging.log(`Workspace ${workspace} is ready but no connection exists or connection lost. Re-establishing connection...`);
493
- await this.establishConnection(workspace, metadata);
494
- }
495
- break;
496
- case 'PENDING':
497
- // Do nothing while pending
498
- break;
499
- case 'CREATED':
500
- // Workspace has no environment, Recreate it.
501
- await this.handleWorkspaceCreatedState(workspace);
502
- break;
503
- default:
504
- this.logging.warn(`Unknown workspace status: ${metadata.workspaceStatus}`);
333
+ async checkRemoteWorkspaceStatusAndReact(skipUploads = false) {
334
+ this.logging.log(`Checking remote workspace status for workspace [${this.workspaceIdentifier}]`);
335
+ const { metadata, optOut } = await this.listWorkspaceMetadata(this.workspaceIdentifier);
336
+ if (optOut) {
337
+ this.logging.log('User opted out, clearing all resources and starting opt-out monitor');
338
+ this.isOptedOut = true;
339
+ await this.clearAllWorkspaceResources();
340
+ await this.startOptOutMonitor();
341
+ return;
342
+ }
343
+ if (!metadata) {
344
+ // Workspace no longer exists, Recreate it.
345
+ this.resetRemoteWorkspaceId(); // workspaceId would change if remote record is gone
346
+ await this.handleWorkspaceCreatedState(skipUploads);
347
+ return;
348
+ }
349
+ this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus;
350
+ if (this.workspaceState.workspaceId === undefined) {
351
+ this.workspaceState.workspaceId = metadata.workspaceId;
352
+ this.remoteWorkspaceIdResolver(this.workspaceState.workspaceId);
353
+ }
354
+ switch (metadata.workspaceStatus) {
355
+ case 'READY':
356
+ // Check if connection exists
357
+ const client = this.workspaceState.webSocketClient;
358
+ if (!client || !client.isConnected()) {
359
+ this.logging.log(`Workspace is ready but no connection exists or connection lost. Re-establishing connection...`);
360
+ await this.establishConnection(metadata);
505
361
  }
506
- }
507
- catch (error) {
508
- this.logging.error(`Error monitoring workspace ${workspace}: ${error}`);
509
- }
510
- }, this.CONTINUOUS_MONITOR_INTERVAL);
511
- this.monitorIntervals.set(workspace, intervalId);
362
+ break;
363
+ case 'PENDING':
364
+ // Schedule an initial connection when pending
365
+ await this.waitForInitialConnection();
366
+ break;
367
+ case 'CREATED':
368
+ // Workspace has no environment, Recreate it.
369
+ await this.handleWorkspaceCreatedState(skipUploads);
370
+ break;
371
+ default:
372
+ this.logging.warn(`Unknown workspace status: ${metadata.workspaceStatus}`);
373
+ }
374
+ }
375
+ async waitForRemoteWorkspaceId() {
376
+ // If workspaceId is already set, return it immediately
377
+ if (this.workspaceState.workspaceId) {
378
+ return this.workspaceState.workspaceId;
379
+ }
380
+ // Otherwise, wait for the promise to resolve or catch the rejection and retry
381
+ try {
382
+ return await this.remoteWorkspaceIdPromise;
383
+ }
384
+ catch (error) {
385
+ this.logging.log(`Waiting for a new remote workspaceId`);
386
+ return this.waitForRemoteWorkspaceId();
387
+ }
388
+ }
389
+ resetRemoteWorkspaceId() {
390
+ this.workspaceState.workspaceId = undefined;
391
+ // Store the old rejecter
392
+ const oldRejecter = this.remoteWorkspaceIdRejecter;
393
+ // Create new promise first
394
+ this.remoteWorkspaceIdPromise = new Promise((resolve, reject) => {
395
+ this.remoteWorkspaceIdResolver = resolve;
396
+ this.remoteWorkspaceIdRejecter = reject;
397
+ });
398
+ // Then reject the old promise if it exists
399
+ if (oldRejecter) {
400
+ oldRejecter(new Error('Remote workspaceId reset requested'));
401
+ }
512
402
  }
513
403
  async startOptOutMonitor() {
514
- const intervalId = setInterval(async () => {
515
- try {
516
- const { optOut } = await this.listWorkspaceMetadata();
517
- if (!optOut) {
518
- this.isOptedOut = false;
519
- this.logging.log('User opted back in, stopping opt-out monitor and re-initializing workspace');
520
- clearInterval(intervalId);
521
- // Process all workspace folders
522
- await this.processNewWorkspaceFolders(this.workspaceFolders);
404
+ if (this.optOutMonitorInterval === undefined) {
405
+ const intervalId = setInterval(async () => {
406
+ try {
407
+ const { optOut } = await this.listWorkspaceMetadata();
408
+ if (!optOut) {
409
+ this.isOptedOut = false;
410
+ this.logging.log('User opted back in, stopping opt-out monitor and re-initializing workspace');
411
+ clearInterval(intervalId);
412
+ this.optOutMonitorInterval = undefined;
413
+ await this.initializeWorkspaceStatusMonitor();
414
+ }
523
415
  }
524
- }
525
- catch (error) {
526
- this.logging.error(`Error in opt-out monitor: ${error}`);
527
- }
528
- }, this.CONTINUOUS_MONITOR_INTERVAL);
416
+ catch (error) {
417
+ this.logging.error(`Error in opt-out monitor: ${error}`);
418
+ }
419
+ }, this.CONTINUOUS_MONITOR_INTERVAL);
420
+ this.optOutMonitorInterval = intervalId;
421
+ }
529
422
  }
530
- /**
531
- * Handles the workspace creation flow when a remote workspace is in CREATED state.
532
- * Attempts to create the workspace and schedules a quick connection check on success.
533
- * If the initial creation fails with a retryable error, attempts one retry before
534
- * falling back to the regular polling cycle.
535
- *
536
- * The flow is:
537
- * 1. Attempt initial workspace creation
538
- * 2. On success: Schedule a quick check to establish connection
539
- * 3. On retryable error: Attempt one immediate retry
540
- * 4. On retry success: Schedule a quick check
541
- * 5. On retry failure: Wait for next regular polling cycle
542
- *
543
- * @param workspace - The workspace to re-create
544
- */
545
- async handleWorkspaceCreatedState(workspace) {
423
+ async handleWorkspaceCreatedState(skipUploads = false) {
424
+ this.logging.log(`No READY / PENDING remote workspace found, creating a new one`);
546
425
  // If remote state is CREATED, call create API to create a new workspace
547
- // snapshot the workspace for the new environment
548
- // TODO: this workspace root in the below snapshot function needs to be changes
549
- // after we consolidate workspaceFolder into one Workspace.
550
- const folder = this.getWorkspaceFolder(workspace);
551
- if (folder) {
552
- this.processRemoteWorkspaceRefresh([folder]);
553
- }
554
- const initialResult = await this.createNewWorkspace(workspace);
555
- if (folder) {
556
- this.snapshotWorkspace([folder]).catch(e => {
557
- this.logging.warn(`Error during snapshot workspace: ${e}`);
558
- });
426
+ if (this.workspaceState.webSocketClient) {
427
+ this.workspaceState.webSocketClient.destroyClient();
428
+ this.workspaceState.webSocketClient = undefined;
559
429
  }
560
- // If creation succeeds, schedule a single connection attempt to happen in 30 seconds
430
+ const initialResult = await this.createNewWorkspace();
431
+ // If creation succeeds, establish connection
561
432
  if (initialResult.response) {
562
- this.logging.log(`Workspace ${workspace} created successfully, scheduling quick check for connection`);
563
- this.scheduleQuickCheck(workspace);
433
+ this.logging.log(`Workspace [${this.workspaceIdentifier}] created successfully, establishing connection`);
434
+ await this.waitForInitialConnection();
435
+ if (!skipUploads) {
436
+ await this.syncSourceCodesToS3(this.workspaceFolders);
437
+ this.dependencyDiscoverer.reSyncDependenciesToS3(this.workspaceFolders).catch(e => {
438
+ this.logging.warn(`Error during re-syncing dependencies: ${e}`);
439
+ });
440
+ }
564
441
  return;
565
442
  }
566
443
  // If creation fails with a non-retryable error, don't do anything
@@ -568,84 +445,42 @@ class WorkspaceFolderManager {
568
445
  if (!initialResult.error?.retryable) {
569
446
  return;
570
447
  }
571
- this.logging.warn(`Retryable error for workspace ${workspace} creation: ${initialResult.error}. Attempting single retry...`);
572
- const retryResult = await this.createNewWorkspace(workspace);
448
+ this.logging.warn(`Retryable error for workspace creation: ${initialResult.error}. Attempting single retry...`);
449
+ const retryResult = await this.createNewWorkspace();
450
+ // If re-creation fails, wait for the next polling cycle
573
451
  if (retryResult.error) {
574
- this.logging.warn(`Retry failed for workspace ${workspace}: ${retryResult.error}. Will wait for next polling cycle`);
452
+ this.logging.warn(`Workspace creation retry failed: ${retryResult.error}. Will wait for the next polling cycle`);
575
453
  return;
576
454
  }
577
- this.logging.log(`Retry succeeded for workspace ${workspace}, scheduling quick check for connection`);
578
- this.scheduleQuickCheck(workspace);
579
- }
580
- /**
581
- * Schedules a one-time check after workspace creation to establish connection as soon as possible.
582
- * This avoids waiting for the regular 5-minute polling interval when we know the workspace
583
- * should be ready soon. Default check delay is 40 seconds after successful workspace creation.
584
- *
585
- * @param workspace - The workspace to check
586
- * @param delayMs - Optional delay in milliseconds before the check (defaults to 40 seconds)
587
- */
588
- scheduleQuickCheck(workspace, delayMs = this.INITIAL_CHECK_INTERVAL) {
589
- this.logging.log(`Scheduling quick check for workspace ${workspace} in ${delayMs}ms`);
590
- setTimeout(async () => {
591
- try {
592
- const workspaceState = this.workspaceMap.get(workspace);
593
- if (!workspaceState) {
594
- this.logging.log(`Workspace state not found for: ${workspace} during quick check`);
595
- return;
596
- }
597
- const { metadata, optOut } = await this.listWorkspaceMetadata(workspace);
598
- if (optOut) {
599
- this.logging.log(`User is opted out during quick check`);
600
- this.isOptedOut = true;
601
- await this.clearAllWorkspaceResources();
602
- await this.startOptOutMonitor();
603
- return;
604
- }
605
- if (!metadata) {
606
- this.logging.log(`No metadata available for workspace: ${workspace} during quick check`);
607
- return;
608
- }
609
- if (metadata.workspaceStatus === 'READY') {
610
- this.logging.log(`Quick check found workspace ${workspace} is ready, attempting connection`);
611
- await this.establishConnection(workspace, metadata);
612
- }
613
- else {
614
- this.logging.log(`Quick check found workspace ${workspace} state is ${metadata.workspaceStatus}`);
615
- }
616
- }
617
- catch (error) {
618
- this.logging.error(`Error during quick check for workspace ${workspace}: ${error}`);
619
- }
620
- }, delayMs);
621
- }
622
- stopMonitoring(workspace) {
623
- this.logging.log(`Stopping monitoring for workspace ${workspace}`);
624
- const intervalId = this.monitorIntervals.get(workspace);
625
- if (intervalId) {
626
- clearInterval(intervalId);
627
- this.monitorIntervals.delete(workspace);
455
+ this.logging.log(`Retry succeeded for workspace creation, establishing connection`);
456
+ await this.waitForInitialConnection();
457
+ if (!skipUploads) {
458
+ await this.syncSourceCodesToS3(this.workspaceFolders);
459
+ this.dependencyDiscoverer.reSyncDependenciesToS3(this.workspaceFolders).catch(e => {
460
+ this.logging.warn(`Error during re-syncing dependencies: ${e}`);
461
+ });
628
462
  }
629
463
  }
630
- async startWorkspaceStatusMonitor(workspace) {
631
- const success = await this.waitForInitialConnection(workspace);
632
- this.logging.log(`Initial connection ${success ? 'successful' : 'failed'} for ${workspace}, starting continuous monitor`);
633
- if (!success && this.isOptedOut) {
634
- // If initial connection fails due to opt out, do not start the continuous monitor
635
- // The opt-out monitor will already be started
636
- return;
464
+ stopContinuousMonitoring() {
465
+ this.logging.log(`Stopping monitoring for workspace [${this.workspaceIdentifier}]`);
466
+ if (this.continuousMonitorInterval) {
467
+ clearInterval(this.continuousMonitorInterval);
468
+ this.continuousMonitorInterval = undefined;
637
469
  }
638
- this.startContinuousMonitor(workspace);
639
470
  }
640
- // could this cause messages to be lost??????
641
- async processMessagesInQueue(workspaceRoot) {
642
- const workspaceDetails = this.workspaceMap.get(workspaceRoot);
643
- while (workspaceDetails?.messageQueue && workspaceDetails.messageQueue.length > 0) {
644
- const message = workspaceDetails.messageQueue.shift();
645
- await workspaceDetails.webSocketClient?.send(message).catch(error => {
646
- this.logging.error(`Error sending message: ${error}`);
647
- });
471
+ async createNewWorkspace() {
472
+ const createWorkspaceResult = await this.createWorkspace(this.workspaceIdentifier);
473
+ const workspaceDetails = createWorkspaceResult.response;
474
+ if (!workspaceDetails) {
475
+ this.logging.warn(`Failed to create remote workspace for [${this.workspaceIdentifier}]`);
476
+ return createWorkspaceResult;
477
+ }
478
+ this.workspaceState.remoteWorkspaceState = workspaceDetails.workspace.workspaceStatus;
479
+ if (this.workspaceState.workspaceId === undefined) {
480
+ this.workspaceState.workspaceId = workspaceDetails.workspace.workspaceId;
481
+ this.remoteWorkspaceIdResolver(this.workspaceState.workspaceId);
648
482
  }
483
+ return createWorkspaceResult;
649
484
  }
650
485
  /**
651
486
  * All the filesMetadata elements passed to the function belongs to the same workspace folder.
@@ -656,112 +491,40 @@ class WorkspaceFolderManager {
656
491
  if (filesMetadata.length == 0) {
657
492
  return;
658
493
  }
659
- const inMemoryQueueEvents = [];
660
494
  for (const fileMetadata of filesMetadata) {
661
495
  try {
662
496
  const s3Url = await this.uploadToS3(fileMetadata);
663
497
  if (!s3Url) {
664
- this.logging.warn(`Failed to get S3 URL for file in workspace: ${fileMetadata.workspaceFolder.name}`);
498
+ this.logging.warn(`Failed to get S3 URL for file in workspaceFolder: ${fileMetadata.workspaceFolder.name}`);
665
499
  continue;
666
500
  }
667
- this.logging.log(`Successfully uploaded to S3: workspace=${fileMetadata.workspaceFolder.name} language=${fileMetadata.language}`);
668
- const workspaceId = this.getWorkspaces().get(fileMetadata.workspaceFolder.uri)?.workspaceId;
669
- if (!workspaceId) {
670
- this.logging.warn(`No workspace ID found for URI: ${fileMetadata.workspaceFolder.uri}`);
671
- }
501
+ this.logging.log(`Successfully uploaded to S3: workspaceFolder=${fileMetadata.workspaceFolder.name} language=${fileMetadata.language}`);
672
502
  const event = JSON.stringify({
673
503
  method: 'workspace/didChangeWorkspaceFolders',
674
504
  params: {
675
505
  workspaceFoldersChangeEvent: {
676
506
  added: [
677
507
  {
678
- uri: '/',
508
+ uri: fileMetadata.workspaceFolder.uri,
679
509
  name: fileMetadata.workspaceFolder.name,
680
510
  },
681
511
  ],
682
512
  removed: [],
683
513
  },
684
514
  workspaceChangeMetadata: {
685
- workspaceId: workspaceId ?? '',
515
+ workspaceId: this.workspaceState.workspaceId,
686
516
  s3Path: (0, util_1.cleanUrl)(s3Url),
687
517
  programmingLanguage: fileMetadata.language,
688
518
  },
689
519
  },
690
520
  });
691
- // We add this event to the front of the queue here to prevent any race condition that might put events before the didChangeWorkspaceFolders event
692
- inMemoryQueueEvents.unshift(event);
521
+ this.workspaceState.messageQueue.push(event);
693
522
  this.logging.log(`Added didChangeWorkspaceFolders event to queue`);
694
523
  }
695
524
  catch (error) {
696
525
  this.logging.error(`Error processing file metadata:${error instanceof Error ? error.message : 'Unknown error'}, workspace=${fileMetadata.workspaceFolder.name}`);
697
526
  }
698
527
  }
699
- try {
700
- const workspaceDetails = this.getWorkspaces().get(filesMetadata[0].workspaceFolder.uri);
701
- if (!workspaceDetails) {
702
- this.logging.error(`No workspace details found for URI: ${filesMetadata[0].workspaceFolder.uri}`);
703
- return;
704
- }
705
- if (workspaceDetails.webSocketClient) {
706
- inMemoryQueueEvents.forEach((event, index) => {
707
- try {
708
- workspaceDetails.webSocketClient?.send(event).catch(error => {
709
- this.logging.error(`Error sending event: ${error instanceof Error ? error.message : 'Unknown error'}, eventIndex=${index}`);
710
- });
711
- this.logging.log(`Successfully sent event ${index + 1}/${inMemoryQueueEvents.length}`);
712
- }
713
- catch (error) {
714
- this.logging.error(`Failed to send event via WebSocket:${error instanceof Error ? error.message : 'Unknown error'}, eventIndex=${index}`);
715
- }
716
- });
717
- }
718
- else {
719
- if (workspaceDetails.messageQueue) {
720
- workspaceDetails.messageQueue.push(...inMemoryQueueEvents);
721
- this.logging.log(`Added ${inMemoryQueueEvents.length} events to message queue`);
722
- }
723
- else {
724
- this.logging.warn('No message queue available to store events');
725
- }
726
- }
727
- }
728
- catch (error) {
729
- this.logging.error(`Error in final processing: ${error instanceof Error ? error.message : 'Unknown error'}`);
730
- }
731
- this.logging.log(`Completed processing ${inMemoryQueueEvents.length} queued WebSocket events`);
732
- }
733
- async uploadWithTimeout(fileMetadataMap) {
734
- const keys = [...fileMetadataMap.keys()];
735
- const totalWorkspaces = keys.length;
736
- let workspacesWithS3UploadComplete = 0;
737
- for (const key of keys) {
738
- const workspaceDetails = this.getWorkspaces().get(key);
739
- if (!workspaceDetails) {
740
- continue;
741
- }
742
- if (workspaceDetails.workspaceId && workspaceDetails.requiresS3Upload) {
743
- this.logging.log(`Starting S3 upload for ${key}, workspace id: ${workspaceDetails.workspaceId}`);
744
- await this.uploadS3AndQueueEvents(fileMetadataMap.get(key) ?? []);
745
- workspaceDetails.requiresS3Upload = false;
746
- }
747
- // This if condition needs to be separate because workspacesWithS3UploadComplete variable is set to 0 every time this function is called
748
- // If this function is run once and uploads some of the workspace folders, we need to ensure we don't forget about already uploaded folders the next time the function is run
749
- if (workspaceDetails.workspaceId) {
750
- workspacesWithS3UploadComplete++;
751
- }
752
- }
753
- if (totalWorkspaces !== workspacesWithS3UploadComplete) {
754
- // Schedule next check if not all workspaces are complete
755
- // Notice that we don't await the uploadWithTimeout now, it is fire and forget at the moment
756
- setTimeout(() => this.uploadWithTimeout(fileMetadataMap), 3000);
757
- }
758
- else {
759
- this.logging.log(`All workspaces with S3 upload complete`);
760
- // Clean up source code zip files after S3 upload
761
- // Preserve dependencies because they might still be processing
762
- // LanguageDependencyHandler is responsible for deleting dependency zips
763
- this.artifactManager.cleanup(true);
764
- }
765
528
  }
766
529
  // TODO, this function is unused at the moment
767
530
  async deleteWorkspace(workspaceId) {