@aws/lsp-codewhisperer 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/node_modules/@amzn/codewhisperer-streaming/README.md +56 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/LICENSE +201 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/README.md +115 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort-handler.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/abort.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/auth.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/auth/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/checksum.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/client.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/command.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/config.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/manager.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/connection/pool.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/crypto.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/encode.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoint.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/eventStream.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/extensions/retry.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/feature-ids.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/http.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/identity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/index.js +144 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/logger.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/middleware.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/pagination.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/profile.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/response.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/retry.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/schema.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/sentinels.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/schema/traits.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/serde.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/shapes.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/signature.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/stream.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transfer.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/exact.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/mutable.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/uri.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/util.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-cjs/waiter.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/abort.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/auth/index.js +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/checksum.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/client.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/command.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/crypto.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/encode.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/index.js +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/http.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/index.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/index.js +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/logger.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/middleware.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/pagination.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/profile.js +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/response.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/retry.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/serde.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/shapes.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/signature.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/stream.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transfer.js +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/uri.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/util.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-es/waiter.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/abort.d.ts +50 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/auth.d.ts +57 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/auth/index.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/command.d.ts +25 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/config.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +25 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +121 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/http.d.ts +112 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/index.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/middleware.d.ts +534 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/retry.d.ts +133 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/schema.d.ts +263 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/shapes.d.ts +82 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/signature.d.ts +155 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transfer.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +77 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +34 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +50 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +57 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +63 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +25 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +60 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +121 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +112 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +534 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +133 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +278 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +82 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +155 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +32 -0
- 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
- 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
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +81 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types/package.json +60 -0
- package/node_modules/@amzn/codewhisperer-streaming/package.json +1 -1
- package/out/client/sigv4/service.json +8 -0
- package/out/client/token/bearer-token-service.json +20 -0
- package/out/language-server/agenticChat/agenticChatController.d.ts +9 -3
- package/out/language-server/agenticChat/agenticChatController.js +379 -85
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/agenticChatResultStream.d.ts +9 -0
- package/out/language-server/agenticChat/agenticChatResultStream.js +41 -1
- package/out/language-server/agenticChat/agenticChatResultStream.js.map +1 -1
- package/out/language-server/agenticChat/constants.d.ts +0 -1
- package/out/language-server/agenticChat/constants.js +1 -2
- package/out/language-server/agenticChat/constants.js.map +1 -1
- package/out/language-server/agenticChat/context/addtionalContextProvider.d.ts +2 -3
- package/out/language-server/agenticChat/context/addtionalContextProvider.js +3 -5
- package/out/language-server/agenticChat/context/addtionalContextProvider.js.map +1 -1
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.d.ts +1 -0
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.js +15 -2
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.js.map +1 -1
- package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +1 -1
- package/out/language-server/agenticChat/context/contextCommandsProvider.js +8 -24
- package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -1
- package/out/language-server/agenticChat/errors.d.ts +2 -1
- package/out/language-server/agenticChat/errors.js +11 -1
- package/out/language-server/agenticChat/errors.js.map +1 -1
- package/out/language-server/agenticChat/tabBarController.d.ts +10 -1
- package/out/language-server/agenticChat/tabBarController.js +54 -27
- package/out/language-server/agenticChat/tabBarController.js.map +1 -1
- package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +8 -9
- package/out/language-server/agenticChat/tools/chatDb/chatDb.js +58 -124
- package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -1
- package/out/language-server/agenticChat/tools/codeSearch.js +1 -1
- package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -1
- package/out/language-server/agenticChat/tools/executeBash.d.ts +10 -2
- package/out/language-server/agenticChat/tools/executeBash.js +80 -21
- package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
- package/out/language-server/agenticChat/tools/{fileSearch.d.ts → fuzzySearch.d.ts} +17 -11
- package/out/language-server/agenticChat/tools/{fileSearch.js → fuzzySearch.js} +53 -55
- package/out/language-server/agenticChat/tools/fuzzySearch.js.map +1 -0
- package/out/language-server/agenticChat/tools/grepSearch.d.ts +74 -0
- package/out/language-server/agenticChat/tools/grepSearch.js +254 -0
- package/out/language-server/agenticChat/tools/grepSearch.js.map +1 -0
- package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolServer.js +14 -5
- package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolShared.d.ts +1 -1
- package/out/language-server/agenticChat/tools/toolShared.js +2 -2
- package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
- package/out/language-server/chat/chatController.d.ts +1 -1
- package/out/language-server/chat/chatController.js.map +1 -1
- package/out/language-server/chat/chatSessionService.d.ts +13 -0
- package/out/language-server/chat/chatSessionService.js +28 -4
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/chat/contexts/triggerContext.js +1 -0
- package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
- package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -4
- package/out/language-server/chat/telemetry/chatTelemetryController.js +29 -5
- package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
- package/out/language-server/inline-completion/codePercentage.js +1 -0
- package/out/language-server/inline-completion/codePercentage.js.map +1 -1
- package/out/language-server/inline-completion/codeWhispererServer.d.ts +1 -0
- package/out/language-server/inline-completion/codeWhispererServer.js +55 -19
- package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
- package/out/language-server/inline-completion/session/sessionManager.d.ts +5 -1
- package/out/language-server/inline-completion/session/sessionManager.js +4 -0
- package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
- package/out/language-server/localProjectContext/localProjectContextServer.js +8 -8
- package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -1
- package/out/language-server/workspaceContext/artifactManager.d.ts +1 -1
- package/out/language-server/workspaceContext/artifactManager.js +55 -22
- package/out/language-server/workspaceContext/artifactManager.js.map +1 -1
- package/out/language-server/workspaceContext/client.d.ts +1 -2
- package/out/language-server/workspaceContext/client.js +8 -16
- package/out/language-server/workspaceContext/client.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.d.ts +2 -0
- package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js +11 -1
- package/out/language-server/workspaceContext/dependency/dependencyDiscoverer.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.d.ts +17 -0
- package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js +75 -0
- package/out/language-server/workspaceContext/dependency/dependencyHandler/DependencyWatcher.js.map +1 -0
- package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js +9 -9
- package/out/language-server/workspaceContext/dependency/dependencyHandler/JSTSDependencyHandler.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js +9 -9
- package/out/language-server/workspaceContext/dependency/dependencyHandler/JavaDependencyHandler.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.d.ts +7 -5
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js +21 -15
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandler.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.d.ts +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js +4 -4
- package/out/language-server/workspaceContext/dependency/dependencyHandler/LanguageDependencyHandlerFactory.js.map +1 -1
- package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js +38 -29
- package/out/language-server/workspaceContext/dependency/dependencyHandler/PythonDependencyHandler.js.map +1 -1
- package/out/language-server/workspaceContext/javaManager.js +1 -1
- package/out/language-server/workspaceContext/javaManager.js.map +1 -1
- package/out/language-server/workspaceContext/util.d.ts +1 -0
- package/out/language-server/workspaceContext/util.js +12 -6
- package/out/language-server/workspaceContext/util.js.map +1 -1
- package/out/language-server/workspaceContext/workspaceContextServer.js +266 -236
- package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
- package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +21 -50
- package/out/language-server/workspaceContext/workspaceFolderManager.js +254 -496
- package/out/language-server/workspaceContext/workspaceFolderManager.js.map +1 -1
- package/out/shared/languageDetection.d.ts +1 -1
- package/out/shared/languageDetection.js +4 -0
- package/out/shared/languageDetection.js.map +1 -1
- package/out/shared/localProjectContextController.d.ts +5 -3
- package/out/shared/localProjectContextController.js +47 -21
- package/out/shared/localProjectContextController.js.map +1 -1
- package/out/shared/telemetry/telemetryService.d.ts +10 -1
- package/out/shared/telemetry/telemetryService.js +36 -7
- package/out/shared/telemetry/telemetryService.js.map +1 -1
- package/out/shared/telemetry/types.d.ts +39 -0
- package/out/shared/telemetry/types.js +1 -0
- package/out/shared/telemetry/types.js.map +1 -1
- package/package.json +8 -6
- package/out/language-server/agenticChat/tools/fileSearch.js.map +0 -1
- package/out/shared/initializeUtils.d.ts +0 -3
- package/out/shared/initializeUtils.js +0 -32
- package/out/shared/initializeUtils.js.map +0 -1
|
@@ -3,43 +3,51 @@ 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;
|
|
13
18
|
workspaceFolders;
|
|
14
19
|
credentialsProvider;
|
|
15
20
|
INITIAL_CHECK_INTERVAL = 40 * 1000; // 40 seconds
|
|
16
|
-
|
|
21
|
+
INITIAL_CONNECTION_TIMEOUT = 2 * 60 * 1000; // 2 minutes
|
|
17
22
|
CONTINUOUS_MONITOR_INTERVAL = 5 * 60 * 1000; // 5 minutes
|
|
18
|
-
|
|
23
|
+
MESSAGE_PUBLISH_INTERVAL = 100; // 100 milliseconds
|
|
24
|
+
continuousMonitorInterval;
|
|
25
|
+
optOutMonitorInterval;
|
|
26
|
+
messageQueueConsumerInterval;
|
|
19
27
|
isOptedOut = false;
|
|
20
|
-
static createInstance(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider) {
|
|
28
|
+
static createInstance(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier) {
|
|
21
29
|
if (!this.instance) {
|
|
22
|
-
this.instance = new WorkspaceFolderManager(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider);
|
|
30
|
+
this.instance = new WorkspaceFolderManager(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier);
|
|
23
31
|
}
|
|
24
32
|
return this.instance;
|
|
25
33
|
}
|
|
26
34
|
static getInstance() {
|
|
27
35
|
return this.instance;
|
|
28
36
|
}
|
|
29
|
-
constructor(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider) {
|
|
37
|
+
constructor(serviceManager, logging, artifactManager, dependencyDiscoverer, workspaceFolders, credentialsProvider, workspaceIdentifier) {
|
|
30
38
|
this.serviceManager = serviceManager;
|
|
31
39
|
this.logging = logging;
|
|
32
40
|
this.artifactManager = artifactManager;
|
|
33
41
|
this.dependencyDiscoverer = dependencyDiscoverer;
|
|
34
|
-
this.workspaceMap = new Map();
|
|
35
42
|
this.workspaceFolders = workspaceFolders;
|
|
36
43
|
this.credentialsProvider = credentialsProvider;
|
|
44
|
+
this.workspaceIdentifier = workspaceIdentifier;
|
|
37
45
|
this.dependencyDiscoverer.dependencyHandlerRegistry.forEach(handler => {
|
|
38
|
-
handler.onDependencyChange(async (workspaceFolder, zips) => {
|
|
46
|
+
handler.onDependencyChange(async (workspaceFolder, zips, addWSFolderPathInS3) => {
|
|
39
47
|
try {
|
|
40
48
|
this.logging.log(`Dependency change detected in ${workspaceFolder.uri}`);
|
|
41
49
|
// Process the dependencies
|
|
42
|
-
await this.handleDependencyChanges(zips);
|
|
50
|
+
await this.handleDependencyChanges(zips, addWSFolderPathInS3);
|
|
43
51
|
// Clean up only after successful processing
|
|
44
52
|
await handler.cleanupZipFiles(zips);
|
|
45
53
|
}
|
|
@@ -48,6 +56,27 @@ class WorkspaceFolderManager {
|
|
|
48
56
|
}
|
|
49
57
|
});
|
|
50
58
|
});
|
|
59
|
+
this.remoteWorkspaceIdPromise = new Promise(resolve => {
|
|
60
|
+
this.remoteWorkspaceIdResolver = resolve;
|
|
61
|
+
});
|
|
62
|
+
this.workspaceState = {
|
|
63
|
+
remoteWorkspaceState: 'CREATION_PENDING',
|
|
64
|
+
messageQueue: [],
|
|
65
|
+
};
|
|
66
|
+
this.messageQueueConsumerInterval = setInterval(() => {
|
|
67
|
+
if (this.workspaceState.webSocketClient && this.workspaceState.webSocketClient.isConnected()) {
|
|
68
|
+
const message = this.workspaceState.messageQueue[0];
|
|
69
|
+
if (message) {
|
|
70
|
+
try {
|
|
71
|
+
this.workspaceState.webSocketClient.send(message);
|
|
72
|
+
this.workspaceState.messageQueue.shift();
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
this.logging.error(`Error sending message: ${error}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, this.MESSAGE_PUBLISH_INTERVAL);
|
|
51
80
|
}
|
|
52
81
|
/**
|
|
53
82
|
* The function is used to track the latest state of workspace folders.
|
|
@@ -57,42 +86,15 @@ class WorkspaceFolderManager {
|
|
|
57
86
|
updateWorkspaceFolders(workspaceFolders) {
|
|
58
87
|
this.workspaceFolders = workspaceFolders;
|
|
59
88
|
}
|
|
60
|
-
|
|
61
|
-
return this.
|
|
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;
|
|
89
|
+
getWorkspaceFolder(fileUri, workspaceFolders) {
|
|
90
|
+
return (0, util_1.findWorkspaceRootFolder)(fileUri, workspaceFolders ?? this.workspaceFolders);
|
|
92
91
|
}
|
|
93
92
|
getOptOutStatus() {
|
|
94
93
|
return this.isOptedOut;
|
|
95
94
|
}
|
|
95
|
+
getWorkspaceState() {
|
|
96
|
+
return this.workspaceState;
|
|
97
|
+
}
|
|
96
98
|
async processNewWorkspaceFolders(folders) {
|
|
97
99
|
// Check if user is opted in before trying to process any files
|
|
98
100
|
const { optOut } = await this.listWorkspaceMetadata();
|
|
@@ -103,47 +105,32 @@ class WorkspaceFolderManager {
|
|
|
103
105
|
await this.startOptOutMonitor();
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
// Snapshot the workspace
|
|
113
|
-
this.snapshotWorkspace(folders).catch(e => {
|
|
114
|
-
this.logging.warn(`Error during snapshot workspace: ${e}`);
|
|
108
|
+
// Wait for remote workspace id
|
|
109
|
+
await this.waitForRemoteWorkspaceId();
|
|
110
|
+
// Sync workspace source codes
|
|
111
|
+
await this.syncSourceCodesToS3(folders).catch(e => {
|
|
112
|
+
this.logging.warn(`Error during syncing workspace source codes: ${e}`);
|
|
115
113
|
});
|
|
116
|
-
|
|
117
|
-
async snapshotWorkspace(folders) {
|
|
118
|
-
let sourceCodeMetadata = [];
|
|
119
|
-
sourceCodeMetadata = await this.artifactManager.addWorkspaceFolders(folders);
|
|
120
|
-
// Kick off dependency discovery but don't wait
|
|
114
|
+
// Kick off dependency discovery but don't wait
|
|
121
115
|
this.dependencyDiscoverer.searchDependencies(folders).catch(e => {
|
|
122
116
|
this.logging.warn(`Error during dependency discovery: ${e}`);
|
|
123
117
|
});
|
|
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
118
|
}
|
|
141
|
-
async
|
|
119
|
+
async syncSourceCodesToS3(folders) {
|
|
120
|
+
let sourceCodeMetadata = [];
|
|
121
|
+
sourceCodeMetadata = await this.artifactManager.addWorkspaceFolders(folders);
|
|
122
|
+
await this.uploadS3AndQueueEvents(sourceCodeMetadata);
|
|
123
|
+
this.artifactManager.cleanup(true, folders);
|
|
124
|
+
}
|
|
125
|
+
async uploadToS3(fileMetadata, addWSFolderPathInS3 = true) {
|
|
142
126
|
let relativePath = fileMetadata.relativePath.replace(fileMetadata.workspaceFolder.name, '');
|
|
143
127
|
relativePath = relativePath.startsWith('/') ? relativePath.slice(1) : relativePath;
|
|
144
|
-
|
|
128
|
+
if (addWSFolderPathInS3) {
|
|
129
|
+
relativePath = path.join(vscode_uri_1.URI.parse(fileMetadata.workspaceFolder.uri).path.slice(1), relativePath);
|
|
130
|
+
}
|
|
131
|
+
const workspaceId = this.workspaceState.workspaceId;
|
|
145
132
|
if (!workspaceId) {
|
|
146
|
-
this.logging.warn(`Workspace ID is not found
|
|
133
|
+
this.logging.warn(`Workspace ID is not found, skipping S3 upload`);
|
|
147
134
|
return;
|
|
148
135
|
}
|
|
149
136
|
let s3Url;
|
|
@@ -175,13 +162,9 @@ class WorkspaceFolderManager {
|
|
|
175
162
|
return s3Url;
|
|
176
163
|
}
|
|
177
164
|
async clearAllWorkspaceResources() {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
for (const { webSocketClient } of this.workspaceMap.values()) {
|
|
182
|
-
webSocketClient?.destroyClient();
|
|
183
|
-
}
|
|
184
|
-
this.workspaceMap.clear();
|
|
165
|
+
this.stopContinuousMonitoring();
|
|
166
|
+
this.resetRemoteWorkspaceId();
|
|
167
|
+
this.workspaceState.webSocketClient?.destroyClient();
|
|
185
168
|
this.artifactManager.cleanup();
|
|
186
169
|
this.dependencyDiscoverer.dispose();
|
|
187
170
|
}
|
|
@@ -191,84 +174,40 @@ class WorkspaceFolderManager {
|
|
|
191
174
|
* @param workspaceFolder
|
|
192
175
|
*/
|
|
193
176
|
async processWorkspaceFoldersDeletion(workspaceFolders) {
|
|
177
|
+
const workspaceId = await this.waitForRemoteWorkspaceId();
|
|
194
178
|
for (const folder of workspaceFolders) {
|
|
195
|
-
const workspaceDetails = this.workspaceMap.get(folder.uri);
|
|
196
|
-
const websocketClient = workspaceDetails?.webSocketClient;
|
|
197
179
|
const languagesMap = this.artifactManager.getLanguagesForWorkspaceFolder(folder);
|
|
198
180
|
const programmingLanguages = languagesMap ? Array.from(languagesMap.keys()) : [];
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
name: folder.name,
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
},
|
|
215
|
-
workspaceChangeMetadata: {
|
|
216
|
-
workspaceId: this.getWorkspaces().get(folder.uri)?.workspaceId ?? '',
|
|
217
|
-
programmingLanguage: language,
|
|
218
|
-
},
|
|
181
|
+
for (const language of programmingLanguages) {
|
|
182
|
+
const message = JSON.stringify({
|
|
183
|
+
method: 'workspace/didChangeWorkspaceFolders',
|
|
184
|
+
params: {
|
|
185
|
+
workspaceFoldersChangeEvent: {
|
|
186
|
+
added: [],
|
|
187
|
+
removed: [
|
|
188
|
+
{
|
|
189
|
+
uri: folder.uri,
|
|
190
|
+
name: folder.name,
|
|
191
|
+
},
|
|
192
|
+
],
|
|
219
193
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
194
|
+
workspaceChangeMetadata: {
|
|
195
|
+
workspaceId: workspaceId,
|
|
196
|
+
programmingLanguage: language,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
this.workspaceState.messageQueue.push(message);
|
|
226
201
|
}
|
|
227
|
-
this.removeWorkspaceEntry(folder.uri);
|
|
228
202
|
this.dependencyDiscoverer.disposeWorkspaceFolder(folder);
|
|
229
|
-
this.stopMonitoring(folder.uri);
|
|
230
203
|
}
|
|
231
204
|
await this.artifactManager.removeWorkspaceFolders(workspaceFolders);
|
|
232
205
|
}
|
|
233
|
-
|
|
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) {
|
|
206
|
+
async handleDependencyChanges(zips, addWSFolderPathInS3) {
|
|
268
207
|
this.logging.log(`Processing ${zips.length} dependency changes`);
|
|
269
208
|
for (const zip of zips) {
|
|
270
209
|
try {
|
|
271
|
-
const s3Url = await this.uploadToS3(zip);
|
|
210
|
+
const s3Url = await this.uploadToS3(zip, addWSFolderPathInS3);
|
|
272
211
|
if (!s3Url) {
|
|
273
212
|
continue;
|
|
274
213
|
}
|
|
@@ -280,46 +219,20 @@ class WorkspaceFolderManager {
|
|
|
280
219
|
}
|
|
281
220
|
}
|
|
282
221
|
notifyDependencyChange(fileMetadata, s3Url) {
|
|
283
|
-
const workspaceDetails = this.getWorkspaces().get(fileMetadata.workspaceFolder.uri);
|
|
284
|
-
if (!workspaceDetails) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
222
|
const message = JSON.stringify({
|
|
288
223
|
method: 'didChangeDependencyPaths',
|
|
289
224
|
params: {
|
|
290
225
|
event: { paths: [] },
|
|
291
226
|
workspaceChangeMetadata: {
|
|
292
|
-
workspaceId:
|
|
227
|
+
workspaceId: this.workspaceState.workspaceId,
|
|
293
228
|
s3Path: (0, util_1.cleanUrl)(s3Url),
|
|
294
229
|
programmingLanguage: fileMetadata.language,
|
|
295
230
|
},
|
|
296
231
|
},
|
|
297
232
|
});
|
|
298
|
-
|
|
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
|
-
}
|
|
307
|
-
}
|
|
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;
|
|
233
|
+
this.workspaceState.messageQueue.push(message);
|
|
320
234
|
}
|
|
321
|
-
async establishConnection(
|
|
322
|
-
const existingState = this.workspaceMap.get(workspace);
|
|
235
|
+
async establishConnection(existingMetadata) {
|
|
323
236
|
if (!existingMetadata.environmentId) {
|
|
324
237
|
throw new Error('No environment ID found for ready workspace');
|
|
325
238
|
}
|
|
@@ -328,81 +241,53 @@ class WorkspaceFolderManager {
|
|
|
328
241
|
}
|
|
329
242
|
const websocketUrl = existingMetadata.environmentAddress;
|
|
330
243
|
this.logging.log(`Establishing connection to ${websocketUrl}`);
|
|
331
|
-
if (
|
|
332
|
-
const websocketConnectionState =
|
|
244
|
+
if (this.workspaceState.webSocketClient) {
|
|
245
|
+
const websocketConnectionState = this.workspaceState.webSocketClient.getWebsocketReadyState();
|
|
333
246
|
if (websocketConnectionState === 'OPEN') {
|
|
334
|
-
this.logging.log(`Active connection already exists
|
|
247
|
+
this.logging.log(`Active websocket connection already exists.}`);
|
|
335
248
|
return;
|
|
336
249
|
}
|
|
337
250
|
// If the client exists but isn't connected, it might be in the process of connecting
|
|
338
251
|
if (websocketConnectionState === 'CONNECTING') {
|
|
339
|
-
this.logging.log(`Connection attempt already in progress
|
|
252
|
+
this.logging.log(`Connection attempt already in progress.`);
|
|
340
253
|
return;
|
|
341
254
|
}
|
|
342
255
|
}
|
|
343
256
|
const webSocketClient = new client_1.WebSocketClient(websocketUrl, this.logging, this.credentialsProvider);
|
|
344
|
-
this.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.
|
|
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
|
-
}
|
|
257
|
+
this.workspaceState.remoteWorkspaceState = 'CONNECTED';
|
|
258
|
+
this.workspaceState.webSocketClient = webSocketClient;
|
|
259
|
+
}
|
|
260
|
+
async initializeWorkspaceStatusMonitor() {
|
|
261
|
+
this.logging.log(`Initializing workspace status check for workspace [${this.workspaceIdentifier}]`);
|
|
262
|
+
// Perform a one-time checkRemoteWorkspaceStatusAndReact first
|
|
263
|
+
// Pass skipUploads as true since it would be handled by processNewWorkspaceFolders
|
|
264
|
+
await this.checkRemoteWorkspaceStatusAndReact(true);
|
|
265
|
+
// Set up continuous monitoring which periodically invokes checkRemoteWorkspaceStatusAndReact
|
|
266
|
+
if (!this.isOptedOut) {
|
|
267
|
+
this.logging.log(`Starting continuous monitor for workspace [${this.workspaceIdentifier}]`);
|
|
268
|
+
const intervalId = setInterval(async () => {
|
|
269
|
+
try {
|
|
270
|
+
await this.checkRemoteWorkspaceStatusAndReact();
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
this.logging.error(`Error monitoring workspace status: ${error}`);
|
|
274
|
+
}
|
|
275
|
+
}, this.CONTINUOUS_MONITOR_INTERVAL);
|
|
276
|
+
this.continuousMonitorInterval = intervalId;
|
|
388
277
|
}
|
|
389
|
-
this.startWorkspaceStatusMonitor(workspace).catch(error => {
|
|
390
|
-
this.logging.error(`Error starting workspace monitor for ${workspace}: ${error}`);
|
|
391
|
-
});
|
|
392
278
|
}
|
|
393
|
-
async waitForInitialConnection(
|
|
394
|
-
this.logging.log(`Waiting for initial connection to
|
|
279
|
+
async waitForInitialConnection() {
|
|
280
|
+
this.logging.log(`Waiting for initial connection to remote workspace`);
|
|
395
281
|
return new Promise(resolve => {
|
|
396
282
|
const startTime = Date.now();
|
|
397
283
|
const intervalId = setInterval(async () => {
|
|
398
284
|
try {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
this.logging.log(`Workspace ${workspace} no longer exists, stopping monitors for workspace`);
|
|
285
|
+
if (Date.now() - startTime >= this.INITIAL_CONNECTION_TIMEOUT) {
|
|
286
|
+
this.logging.warn(`Initial connection timeout.`);
|
|
402
287
|
clearInterval(intervalId);
|
|
403
288
|
return resolve(false);
|
|
404
289
|
}
|
|
405
|
-
const { metadata, optOut } = await this.listWorkspaceMetadata(
|
|
290
|
+
const { metadata, optOut } = await this.listWorkspaceMetadata(this.workspaceIdentifier);
|
|
406
291
|
if (optOut) {
|
|
407
292
|
this.logging.log(`User opted out during initial connection`);
|
|
408
293
|
this.isOptedOut = true;
|
|
@@ -414,15 +299,12 @@ class WorkspaceFolderManager {
|
|
|
414
299
|
// Continue polling by exiting only this iteration
|
|
415
300
|
return;
|
|
416
301
|
}
|
|
417
|
-
this.
|
|
418
|
-
...workspaceState,
|
|
419
|
-
remoteWorkspaceState: metadata.workspaceStatus,
|
|
420
|
-
});
|
|
302
|
+
this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus;
|
|
421
303
|
switch (metadata.workspaceStatus) {
|
|
422
304
|
case 'READY':
|
|
423
|
-
const client = workspaceState.webSocketClient;
|
|
305
|
+
const client = this.workspaceState.webSocketClient;
|
|
424
306
|
if (!client || !client.isConnected()) {
|
|
425
|
-
await this.establishConnection(
|
|
307
|
+
await this.establishConnection(metadata);
|
|
426
308
|
}
|
|
427
309
|
clearInterval(intervalId);
|
|
428
310
|
return resolve(true);
|
|
@@ -430,137 +312,127 @@ class WorkspaceFolderManager {
|
|
|
430
312
|
// Continue polling
|
|
431
313
|
break;
|
|
432
314
|
case 'CREATED':
|
|
433
|
-
|
|
434
|
-
|
|
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;
|
|
315
|
+
clearInterval(intervalId);
|
|
316
|
+
return resolve(false);
|
|
440
317
|
default:
|
|
441
318
|
this.logging.warn(`Unknown workspace status: ${metadata.workspaceStatus}`);
|
|
442
319
|
clearInterval(intervalId);
|
|
443
320
|
return resolve(false);
|
|
444
321
|
}
|
|
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
322
|
}
|
|
451
323
|
catch (error) {
|
|
452
|
-
this.logging.error(`Error during
|
|
324
|
+
this.logging.error(`Error during initializing connection for workspace [${this.workspaceIdentifier}]: ${error}`);
|
|
453
325
|
clearInterval(intervalId);
|
|
454
326
|
return resolve(false);
|
|
455
327
|
}
|
|
456
328
|
}, this.INITIAL_CHECK_INTERVAL);
|
|
457
329
|
});
|
|
458
330
|
}
|
|
459
|
-
|
|
460
|
-
this.logging.log(`
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
this.
|
|
484
|
-
|
|
485
|
-
|
|
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}`);
|
|
331
|
+
async checkRemoteWorkspaceStatusAndReact(skipUploads = false) {
|
|
332
|
+
this.logging.log(`Checking remote workspace status for workspace [${this.workspaceIdentifier}]`);
|
|
333
|
+
const { metadata, optOut } = await this.listWorkspaceMetadata(this.workspaceIdentifier);
|
|
334
|
+
if (optOut) {
|
|
335
|
+
this.logging.log('User opted out, clearing all resources and starting opt-out monitor');
|
|
336
|
+
this.isOptedOut = true;
|
|
337
|
+
await this.clearAllWorkspaceResources();
|
|
338
|
+
await this.startOptOutMonitor();
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
if (!metadata) {
|
|
342
|
+
// Workspace no longer exists, Recreate it.
|
|
343
|
+
this.resetRemoteWorkspaceId(); // workspaceId would change if remote record is gone
|
|
344
|
+
await this.handleWorkspaceCreatedState(skipUploads);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus;
|
|
348
|
+
if (this.workspaceState.workspaceId === undefined) {
|
|
349
|
+
this.workspaceState.workspaceId = metadata.workspaceId;
|
|
350
|
+
this.remoteWorkspaceIdResolver(this.workspaceState.workspaceId);
|
|
351
|
+
}
|
|
352
|
+
switch (metadata.workspaceStatus) {
|
|
353
|
+
case 'READY':
|
|
354
|
+
// Check if connection exists
|
|
355
|
+
const client = this.workspaceState.webSocketClient;
|
|
356
|
+
if (!client || !client.isConnected()) {
|
|
357
|
+
this.logging.log(`Workspace is ready but no connection exists or connection lost. Re-establishing connection...`);
|
|
358
|
+
await this.establishConnection(metadata);
|
|
505
359
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
360
|
+
break;
|
|
361
|
+
case 'PENDING':
|
|
362
|
+
// Schedule an initial connection when pending
|
|
363
|
+
await this.waitForInitialConnection();
|
|
364
|
+
break;
|
|
365
|
+
case 'CREATED':
|
|
366
|
+
// Workspace has no environment, Recreate it.
|
|
367
|
+
await this.handleWorkspaceCreatedState(skipUploads);
|
|
368
|
+
break;
|
|
369
|
+
default:
|
|
370
|
+
this.logging.warn(`Unknown workspace status: ${metadata.workspaceStatus}`);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
async waitForRemoteWorkspaceId() {
|
|
374
|
+
// If workspaceId is already set, return it immediately
|
|
375
|
+
if (this.workspaceState.workspaceId) {
|
|
376
|
+
return this.workspaceState.workspaceId;
|
|
377
|
+
}
|
|
378
|
+
// Otherwise, wait for the promise to resolve
|
|
379
|
+
let waitedWorkspaceId = undefined;
|
|
380
|
+
while (!waitedWorkspaceId) {
|
|
381
|
+
waitedWorkspaceId = await this.remoteWorkspaceIdPromise;
|
|
382
|
+
}
|
|
383
|
+
return waitedWorkspaceId;
|
|
384
|
+
}
|
|
385
|
+
resetRemoteWorkspaceId() {
|
|
386
|
+
this.workspaceState.workspaceId = undefined;
|
|
387
|
+
// Store the old resolver
|
|
388
|
+
const oldResolver = this.remoteWorkspaceIdResolver;
|
|
389
|
+
// Create new promise first
|
|
390
|
+
this.remoteWorkspaceIdPromise = new Promise(resolve => {
|
|
391
|
+
this.remoteWorkspaceIdResolver = resolve;
|
|
392
|
+
});
|
|
393
|
+
// Reset the old promise
|
|
394
|
+
if (oldResolver) {
|
|
395
|
+
oldResolver('');
|
|
396
|
+
}
|
|
512
397
|
}
|
|
513
398
|
async startOptOutMonitor() {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
399
|
+
if (this.optOutMonitorInterval === undefined) {
|
|
400
|
+
const intervalId = setInterval(async () => {
|
|
401
|
+
try {
|
|
402
|
+
const { optOut } = await this.listWorkspaceMetadata();
|
|
403
|
+
if (!optOut) {
|
|
404
|
+
this.isOptedOut = false;
|
|
405
|
+
this.logging.log('User opted back in, stopping opt-out monitor and re-initializing workspace');
|
|
406
|
+
clearInterval(intervalId);
|
|
407
|
+
this.optOutMonitorInterval = undefined;
|
|
408
|
+
await this.initializeWorkspaceStatusMonitor();
|
|
409
|
+
}
|
|
523
410
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
|
|
411
|
+
catch (error) {
|
|
412
|
+
this.logging.error(`Error in opt-out monitor: ${error}`);
|
|
413
|
+
}
|
|
414
|
+
}, this.CONTINUOUS_MONITOR_INTERVAL);
|
|
415
|
+
this.optOutMonitorInterval = intervalId;
|
|
416
|
+
}
|
|
529
417
|
}
|
|
530
|
-
|
|
531
|
-
|
|
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) {
|
|
418
|
+
async handleWorkspaceCreatedState(skipUploads = false) {
|
|
419
|
+
this.logging.log(`No READY / PENDING remote workspace found, creating a new one`);
|
|
546
420
|
// If remote state is CREATED, call create API to create a new workspace
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
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
|
-
});
|
|
421
|
+
if (this.workspaceState.webSocketClient) {
|
|
422
|
+
this.workspaceState.webSocketClient.destroyClient();
|
|
423
|
+
this.workspaceState.webSocketClient = undefined;
|
|
559
424
|
}
|
|
560
|
-
|
|
425
|
+
const initialResult = await this.createNewWorkspace();
|
|
426
|
+
// If creation succeeds, establish connection
|
|
561
427
|
if (initialResult.response) {
|
|
562
|
-
this.logging.log(`Workspace ${
|
|
563
|
-
this.
|
|
428
|
+
this.logging.log(`Workspace [${this.workspaceIdentifier}] created successfully, establishing connection`);
|
|
429
|
+
await this.waitForInitialConnection();
|
|
430
|
+
if (!skipUploads) {
|
|
431
|
+
await this.syncSourceCodesToS3(this.workspaceFolders);
|
|
432
|
+
this.dependencyDiscoverer.reSyncDependenciesToS3(this.workspaceFolders).catch(e => {
|
|
433
|
+
this.logging.warn(`Error during re-syncing dependencies: ${e}`);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
564
436
|
return;
|
|
565
437
|
}
|
|
566
438
|
// If creation fails with a non-retryable error, don't do anything
|
|
@@ -568,84 +440,42 @@ class WorkspaceFolderManager {
|
|
|
568
440
|
if (!initialResult.error?.retryable) {
|
|
569
441
|
return;
|
|
570
442
|
}
|
|
571
|
-
this.logging.warn(`Retryable error for workspace
|
|
572
|
-
const retryResult = await this.createNewWorkspace(
|
|
443
|
+
this.logging.warn(`Retryable error for workspace creation: ${initialResult.error}. Attempting single retry...`);
|
|
444
|
+
const retryResult = await this.createNewWorkspace();
|
|
445
|
+
// If re-creation fails, wait for the next polling cycle
|
|
573
446
|
if (retryResult.error) {
|
|
574
|
-
this.logging.warn(`
|
|
447
|
+
this.logging.warn(`Workspace creation retry failed: ${retryResult.error}. Will wait for the next polling cycle`);
|
|
575
448
|
return;
|
|
576
449
|
}
|
|
577
|
-
this.logging.log(`Retry succeeded for workspace
|
|
578
|
-
this.
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
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);
|
|
450
|
+
this.logging.log(`Retry succeeded for workspace creation, establishing connection`);
|
|
451
|
+
await this.waitForInitialConnection();
|
|
452
|
+
if (!skipUploads) {
|
|
453
|
+
await this.syncSourceCodesToS3(this.workspaceFolders);
|
|
454
|
+
this.dependencyDiscoverer.reSyncDependenciesToS3(this.workspaceFolders).catch(e => {
|
|
455
|
+
this.logging.warn(`Error during re-syncing dependencies: ${e}`);
|
|
456
|
+
});
|
|
628
457
|
}
|
|
629
458
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
this.
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
// The opt-out monitor will already be started
|
|
636
|
-
return;
|
|
459
|
+
stopContinuousMonitoring() {
|
|
460
|
+
this.logging.log(`Stopping monitoring for workspace [${this.workspaceIdentifier}]`);
|
|
461
|
+
if (this.continuousMonitorInterval) {
|
|
462
|
+
clearInterval(this.continuousMonitorInterval);
|
|
463
|
+
this.continuousMonitorInterval = undefined;
|
|
637
464
|
}
|
|
638
|
-
this.startContinuousMonitor(workspace);
|
|
639
465
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
const workspaceDetails =
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
466
|
+
async createNewWorkspace() {
|
|
467
|
+
const createWorkspaceResult = await this.createWorkspace(this.workspaceIdentifier);
|
|
468
|
+
const workspaceDetails = createWorkspaceResult.response;
|
|
469
|
+
if (!workspaceDetails) {
|
|
470
|
+
this.logging.warn(`Failed to create remote workspace for [${this.workspaceIdentifier}]`);
|
|
471
|
+
return createWorkspaceResult;
|
|
472
|
+
}
|
|
473
|
+
this.workspaceState.remoteWorkspaceState = workspaceDetails.workspace.workspaceStatus;
|
|
474
|
+
if (this.workspaceState.workspaceId === undefined) {
|
|
475
|
+
this.workspaceState.workspaceId = workspaceDetails.workspace.workspaceId;
|
|
476
|
+
this.remoteWorkspaceIdResolver(this.workspaceState.workspaceId);
|
|
648
477
|
}
|
|
478
|
+
return createWorkspaceResult;
|
|
649
479
|
}
|
|
650
480
|
/**
|
|
651
481
|
* All the filesMetadata elements passed to the function belongs to the same workspace folder.
|
|
@@ -656,112 +486,40 @@ class WorkspaceFolderManager {
|
|
|
656
486
|
if (filesMetadata.length == 0) {
|
|
657
487
|
return;
|
|
658
488
|
}
|
|
659
|
-
const inMemoryQueueEvents = [];
|
|
660
489
|
for (const fileMetadata of filesMetadata) {
|
|
661
490
|
try {
|
|
662
491
|
const s3Url = await this.uploadToS3(fileMetadata);
|
|
663
492
|
if (!s3Url) {
|
|
664
|
-
this.logging.warn(`Failed to get S3 URL for file in
|
|
493
|
+
this.logging.warn(`Failed to get S3 URL for file in workspaceFolder: ${fileMetadata.workspaceFolder.name}`);
|
|
665
494
|
continue;
|
|
666
495
|
}
|
|
667
|
-
this.logging.log(`Successfully uploaded to S3:
|
|
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
|
-
}
|
|
496
|
+
this.logging.log(`Successfully uploaded to S3: workspaceFolder=${fileMetadata.workspaceFolder.name} language=${fileMetadata.language}`);
|
|
672
497
|
const event = JSON.stringify({
|
|
673
498
|
method: 'workspace/didChangeWorkspaceFolders',
|
|
674
499
|
params: {
|
|
675
500
|
workspaceFoldersChangeEvent: {
|
|
676
501
|
added: [
|
|
677
502
|
{
|
|
678
|
-
uri:
|
|
503
|
+
uri: fileMetadata.workspaceFolder.uri,
|
|
679
504
|
name: fileMetadata.workspaceFolder.name,
|
|
680
505
|
},
|
|
681
506
|
],
|
|
682
507
|
removed: [],
|
|
683
508
|
},
|
|
684
509
|
workspaceChangeMetadata: {
|
|
685
|
-
workspaceId: workspaceId
|
|
510
|
+
workspaceId: this.workspaceState.workspaceId,
|
|
686
511
|
s3Path: (0, util_1.cleanUrl)(s3Url),
|
|
687
512
|
programmingLanguage: fileMetadata.language,
|
|
688
513
|
},
|
|
689
514
|
},
|
|
690
515
|
});
|
|
691
|
-
|
|
692
|
-
inMemoryQueueEvents.unshift(event);
|
|
516
|
+
this.workspaceState.messageQueue.push(event);
|
|
693
517
|
this.logging.log(`Added didChangeWorkspaceFolders event to queue`);
|
|
694
518
|
}
|
|
695
519
|
catch (error) {
|
|
696
520
|
this.logging.error(`Error processing file metadata:${error instanceof Error ? error.message : 'Unknown error'}, workspace=${fileMetadata.workspaceFolder.name}`);
|
|
697
521
|
}
|
|
698
522
|
}
|
|
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
523
|
}
|
|
766
524
|
// TODO, this function is unused at the moment
|
|
767
525
|
async deleteWorkspace(workspaceId) {
|