@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.
- package/CHANGELOG.md +49 -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 +335 -75
- 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/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 +2 -2
- package/out/language-server/agenticChat/tools/executeBash.js +4 -4
- package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.js +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.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/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 +2 -1
- 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 +40 -5
- package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
- package/out/language-server/inline-completion/session/sessionManager.d.ts +2 -0
- package/out/language-server/inline-completion/session/sessionManager.js +2 -0
- package/out/language-server/inline-completion/session/sessionManager.js.map +1 -1
- package/out/language-server/localProjectContext/localProjectContextServer.js +3 -4
- 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 +63 -82
- package/out/language-server/workspaceContext/workspaceContextServer.js.map +1 -1
- package/out/language-server/workspaceContext/workspaceFolderManager.d.ts +22 -50
- package/out/language-server/workspaceContext/workspaceFolderManager.js +259 -496
- package/out/language-server/workspaceContext/workspaceFolderManager.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 +6 -5
- 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,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
|
-
|
|
22
|
+
INITIAL_CONNECTION_TIMEOUT = 2 * 60 * 1000; // 2 minutes
|
|
17
23
|
CONTINUOUS_MONITOR_INTERVAL = 5 * 60 * 1000; // 5 minutes
|
|
18
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
//
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
179
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
|
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 (
|
|
332
|
-
const websocketConnectionState =
|
|
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
|
|
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
|
|
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.
|
|
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
|
-
}
|
|
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(
|
|
394
|
-
this.logging.log(`Waiting for initial connection to
|
|
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
|
-
|
|
400
|
-
|
|
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(
|
|
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.
|
|
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(
|
|
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
|
-
|
|
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;
|
|
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
|
|
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
|
-
|
|
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}`);
|
|
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
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
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
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
});
|
|
426
|
+
if (this.workspaceState.webSocketClient) {
|
|
427
|
+
this.workspaceState.webSocketClient.destroyClient();
|
|
428
|
+
this.workspaceState.webSocketClient = undefined;
|
|
559
429
|
}
|
|
560
|
-
|
|
430
|
+
const initialResult = await this.createNewWorkspace();
|
|
431
|
+
// If creation succeeds, establish connection
|
|
561
432
|
if (initialResult.response) {
|
|
562
|
-
this.logging.log(`Workspace ${
|
|
563
|
-
this.
|
|
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
|
|
572
|
-
const retryResult = await this.createNewWorkspace(
|
|
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(`
|
|
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
|
|
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);
|
|
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
|
-
|
|
631
|
-
|
|
632
|
-
this.
|
|
633
|
-
|
|
634
|
-
|
|
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
|
-
|
|
641
|
-
|
|
642
|
-
const workspaceDetails =
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
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
|
|
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:
|
|
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
|
-
|
|
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) {
|