@aws/lsp-codewhisperer 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +220 -0
- package/README.md +18 -1
- package/node_modules/@amzn/amazon-q-developer-streaming-client/LICENSE +201 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/README.md +864 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/QDeveloperStreaming.js +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/QDeveloperStreamingClient.js +49 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/auth/httpAuthSchemeProvider.js +50 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/GenerateCodeFromCommandsCommand.js +26 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/SendMessageCommand.js +26 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/index.js +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoints.js +211 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/extensionConfiguration.js +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/index.js +10 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/QDeveloperStreamingServiceException.js +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/index.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/models_0.js +1051 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/protocols/Aws_json1_0.js +597 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.browser.js +40 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.js +48 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.native.js +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.shared.js +32 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeExtensions.js +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/QDeveloperStreaming.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/QDeveloperStreamingClient.js +45 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/auth/httpAuthSchemeProvider.js +44 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/GenerateCodeFromCommandsCommand.js +22 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/SendMessageCommand.js +22 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/index.js +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoints.js +207 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/index.js +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/QDeveloperStreamingServiceException.js +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/index.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/models_0.js +963 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/protocols/Aws_json1_0.js +590 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.browser.js +35 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.js +43 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.native.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.shared.js +28 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeExtensions.js +21 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/QDeveloperStreaming.d.ts +23 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/QDeveloperStreamingClient.d.ts +196 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/GenerateCodeFromCommandsCommand.d.ts +102 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/SendMessageCommand.d.ts +796 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/index.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoints.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/extensionConfiguration.d.ts +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/index.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/QDeveloperStreamingServiceException.d.ts +14 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/index.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/models_0.d.ts +2985 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/protocols/Aws_json1_0.d.ts +20 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.browser.d.ts +47 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.d.ts +47 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.native.d.ts +46 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeExtensions.d.ts +17 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/README.md +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-cjs/index.js +294 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/auth.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/checksum.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/client.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/command.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/connection.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/credentials.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/crypto.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/dns.js +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/encode.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/endpoint.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/eventStream.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/extensions/index.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/feature-ids.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/http.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/Identity.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/identity/index.js +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/index.js +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/logger.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/middleware.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/pagination.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/profile.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/request.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/response.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/retry.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/serde.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/shapes.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/signature.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/stream.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/token.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/transfer.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/uri.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/util.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/waiter.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/abort.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/auth.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/client.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/command.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/connection.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +50 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/dns.d.ts +85 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/encode.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +59 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/http.d.ts +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +47 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts +18 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/index.d.ts +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/logger.d.ts +22 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/pagination.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/profile.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/request.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/response.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/retry.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/serde.d.ts +24 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/shapes.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/signature.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/stream.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/token.d.ts +17 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/transfer.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts +19 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts +24 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +54 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts +17 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +47 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts +14 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/uri.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/util.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-types/waiter.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/package.json +56 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/LICENSE +201 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/README.md +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/index.js +84 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/AbortController.js +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js +20 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-es/index.js +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts +21 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/index.d.ts +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts +21 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts +9 -0
- package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller}/package.json +21 -31
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/index.js +806 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +209 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +86 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +167 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +19 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +88 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +24 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +19 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +56 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +62 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +46 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +62 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +3 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +3 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +6 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/package.json +67 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/CHANGELOG.md +274 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/README.md +466 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/rng-browser.js +25 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/stringify.js +44 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v35.js +80 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v4.js +43 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/package.json +135 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/package.json +88 -0
- package/node_modules/@amzn/codewhisperer-streaming/README.md +121 -1
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/CodeWhispererStreamingClient.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/endpoints.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/models/models_0.js +266 -42
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +205 -3
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.browser.js +1 -1
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/runtimeConfig.js +8 -6
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/CodeWhispererStreamingClient.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/endpoints.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/models/models_0.js +241 -33
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +207 -5
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.browser.js +2 -2
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/runtimeConfig.js +9 -7
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreamingClient.d.ts +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/ExportResultArchiveCommand.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +168 -8
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +169 -8
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +168 -8
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +874 -221
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.browser.d.ts +6 -1
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.d.ts +3 -1
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/runtimeConfig.native.d.ts +3 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +25 -17
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +12 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +3 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +6 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +6 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +3 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +4 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +8 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +6 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +5 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/package.json +11 -12
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-cjs/index.js +0 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/feature-ids.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +59 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +47 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/index.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +54 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +21 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/dist-cjs/index.js +8 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/package.json +6 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-cjs/index.js +41 -39
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +2 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +3 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +2 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +6 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +6 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +1 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +1 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/package.json +10 -10
- package/node_modules/@amzn/codewhisperer-streaming/package.json +42 -42
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +1 -0
- package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-cjs/index.js +8 -30
- package/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-cjs/types.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-es/httpHandler.js +1 -0
- package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/httpRequest.js +8 -13
- package/node_modules/@smithy/protocol-http/dist-es/types.js +1 -0
- package/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +23 -0
- package/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +23 -0
- package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/package.json +6 -6
- package/out/client/sigv4/codewhisperer.d.ts +2 -2
- package/out/client/sigv4/codewhisperer.js +4 -3
- package/out/client/sigv4/codewhisperer.js.map +1 -1
- package/out/client/streamingClient/codewhispererStreamingClient.d.ts +3 -3
- package/out/client/streamingClient/codewhispererStreamingClient.js +4 -3
- package/out/client/streamingClient/codewhispererStreamingClient.js.map +1 -1
- package/out/client/token/codewhisperer.d.ts +2 -2
- package/out/client/token/codewhisperer.js +4 -3
- package/out/client/token/codewhisperer.js.map +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.js +4 -1
- package/out/index.js.map +1 -1
- package/out/language-server/agenticChat/agenticChatController.d.ts +35 -4
- package/out/language-server/agenticChat/agenticChatController.js +1337 -91
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/agenticChatEventParser.d.ts +52 -0
- package/out/language-server/agenticChat/agenticChatEventParser.js +186 -0
- package/out/language-server/agenticChat/agenticChatEventParser.js.map +1 -0
- package/out/language-server/agenticChat/agenticChatResultStream.d.ts +83 -0
- package/out/language-server/agenticChat/agenticChatResultStream.js +176 -0
- package/out/language-server/agenticChat/agenticChatResultStream.js.map +1 -0
- package/out/language-server/agenticChat/constants.d.ts +4 -0
- package/out/language-server/agenticChat/constants.js +8 -0
- package/out/language-server/agenticChat/constants.js.map +1 -0
- package/out/language-server/agenticChat/context/addtionalContextProvider.d.ts +14 -0
- package/out/language-server/agenticChat/context/addtionalContextProvider.js +191 -0
- package/out/language-server/agenticChat/context/addtionalContextProvider.js.map +1 -0
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.d.ts +54 -0
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.js +246 -0
- package/out/language-server/agenticChat/context/agenticChatTriggerContext.js.map +1 -0
- package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +20 -0
- package/out/language-server/agenticChat/context/contextCommandsProvider.js +206 -0
- package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -0
- package/out/language-server/agenticChat/context/contextUtils.d.ts +27 -0
- package/out/language-server/agenticChat/context/contextUtils.js +44 -0
- package/out/language-server/agenticChat/context/contextUtils.js.map +1 -0
- package/out/language-server/agenticChat/errors.d.ts +10 -0
- package/out/language-server/agenticChat/errors.js +42 -0
- package/out/language-server/agenticChat/errors.js.map +1 -0
- package/out/language-server/agenticChat/qAgenticChatServer.js +42 -15
- package/out/language-server/agenticChat/qAgenticChatServer.js.map +1 -1
- package/out/language-server/agenticChat/tabBarController.d.ts +55 -0
- package/out/language-server/agenticChat/tabBarController.js +216 -0
- package/out/language-server/agenticChat/tabBarController.js.map +1 -0
- package/out/language-server/agenticChat/textFormatting.d.ts +4 -0
- package/out/language-server/agenticChat/textFormatting.js +28 -0
- package/out/language-server/agenticChat/textFormatting.js.map +1 -0
- package/out/language-server/agenticChat/tools/chatDb/chatDb.d.ts +89 -0
- package/out/language-server/agenticChat/tools/chatDb/chatDb.js +561 -0
- package/out/language-server/agenticChat/tools/chatDb/chatDb.js.map +1 -0
- package/out/language-server/agenticChat/tools/chatDb/util.d.ts +74 -0
- package/out/language-server/agenticChat/tools/chatDb/util.js +255 -0
- package/out/language-server/agenticChat/tools/chatDb/util.js.map +1 -0
- package/out/language-server/agenticChat/tools/codeSearch.d.ts +43 -0
- package/out/language-server/agenticChat/tools/codeSearch.js +168 -0
- package/out/language-server/agenticChat/tools/codeSearch.js.map +1 -0
- package/out/language-server/agenticChat/tools/executeBash.d.ts +70 -0
- package/out/language-server/agenticChat/tools/executeBash.js +463 -0
- package/out/language-server/agenticChat/tools/executeBash.js.map +1 -0
- package/out/language-server/agenticChat/tools/fileSearch.d.ts +45 -0
- package/out/language-server/agenticChat/tools/fileSearch.js +115 -0
- package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -0
- package/out/language-server/agenticChat/tools/fsRead.d.ts +13 -9
- package/out/language-server/agenticChat/tools/fsRead.js +68 -22
- package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.d.ts +21 -12
- package/out/language-server/agenticChat/tools/fsWrite.js +127 -44
- package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.d.ts +36 -0
- package/out/language-server/agenticChat/tools/listDirectory.js +110 -0
- package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -0
- package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.d.ts +100 -0
- package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.js +140 -0
- package/out/language-server/agenticChat/tools/lspApplyWorkspaceEdit.js.map +1 -0
- package/out/language-server/agenticChat/tools/lspGetDocuments.d.ts +24 -0
- package/out/language-server/agenticChat/tools/lspGetDocuments.js +45 -0
- package/out/language-server/agenticChat/tools/lspGetDocuments.js.map +1 -0
- package/out/language-server/agenticChat/tools/lspReadDocumentContents.d.ts +37 -0
- package/out/language-server/agenticChat/tools/lspReadDocumentContents.js +116 -0
- package/out/language-server/agenticChat/tools/lspReadDocumentContents.js.map +1 -0
- package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +21 -0
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js +106 -0
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTool.d.ts +21 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTool.js +54 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTool.js.map +1 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTypes.d.ts +28 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTypes.js +7 -0
- package/out/language-server/agenticChat/tools/mcp/mcpTypes.js.map +1 -0
- package/out/language-server/agenticChat/tools/mcp/mcpUtils.d.ts +7 -0
- package/out/language-server/agenticChat/tools/mcp/mcpUtils.js +78 -0
- package/out/language-server/agenticChat/tools/mcp/mcpUtils.js.map +1 -0
- package/out/language-server/agenticChat/tools/toolServer.d.ts +3 -0
- package/out/language-server/agenticChat/tools/toolServer.js +62 -6
- package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolShared.d.ts +48 -5
- package/out/language-server/agenticChat/tools/toolShared.js +109 -2
- package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
- package/out/language-server/chat/chatController.d.ts +7 -4
- package/out/language-server/chat/chatController.js +13 -18
- package/out/language-server/chat/chatController.js.map +1 -1
- package/out/language-server/chat/chatEventParser.d.ts +3 -1
- package/out/language-server/chat/chatEventParser.js.map +1 -1
- package/out/language-server/chat/chatSessionManagementService.d.ts +2 -2
- package/out/language-server/chat/chatSessionManagementService.js +4 -4
- package/out/language-server/chat/chatSessionManagementService.js.map +1 -1
- package/out/language-server/chat/chatSessionService.d.ts +36 -3
- package/out/language-server/chat/chatSessionService.js +88 -5
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/chat/constants.d.ts +3 -0
- package/out/language-server/chat/constants.js +17 -1
- package/out/language-server/chat/constants.js.map +1 -1
- package/out/language-server/chat/contexts/documentContext.d.ts +2 -1
- package/out/language-server/chat/contexts/documentContext.js +2 -0
- package/out/language-server/chat/contexts/documentContext.js.map +1 -1
- package/out/language-server/chat/contexts/triggerContext.d.ts +7 -3
- package/out/language-server/chat/contexts/triggerContext.js +39 -2
- package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
- package/out/language-server/chat/qChatServer.d.ts +4 -1
- package/out/language-server/chat/qChatServer.js +17 -17
- package/out/language-server/chat/qChatServer.js.map +1 -1
- package/out/language-server/chat/quickActions.d.ts +2 -0
- package/out/language-server/chat/quickActions.js +2 -0
- package/out/language-server/chat/quickActions.js.map +1 -1
- package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +5 -3
- package/out/language-server/chat/telemetry/chatTelemetryController.js +50 -4
- package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
- package/out/language-server/chat/tools/relevantTextDocuments.d.ts +3 -0
- package/out/language-server/chat/tools/relevantTextDocuments.js +42 -0
- package/out/language-server/chat/tools/relevantTextDocuments.js.map +1 -0
- package/out/language-server/chat/utils.js +18 -3
- package/out/language-server/chat/utils.js.map +1 -1
- package/out/language-server/configuration/qConfigurationServer.d.ts +2 -3
- package/out/language-server/configuration/qConfigurationServer.js +27 -20
- package/out/language-server/configuration/qConfigurationServer.js.map +1 -1
- package/out/language-server/inline-completion/auto-trigger/coefficients.json +4 -1
- package/out/language-server/inline-completion/codeWhispererServer.d.ts +2 -3
- package/out/language-server/inline-completion/codeWhispererServer.js +29 -30
- package/out/language-server/inline-completion/codeWhispererServer.js.map +1 -1
- package/out/language-server/localProjectContext/localProjectContextServer.d.ts +2 -0
- package/out/language-server/localProjectContext/localProjectContextServer.js +130 -0
- package/out/language-server/localProjectContext/localProjectContextServer.js.map +1 -0
- package/out/language-server/netTransform/artifactManager.js +12 -4
- package/out/language-server/netTransform/artifactManager.js.map +1 -1
- package/out/language-server/netTransform/metrics.d.ts +2 -0
- package/out/language-server/netTransform/metrics.js +26 -1
- package/out/language-server/netTransform/metrics.js.map +1 -1
- package/out/language-server/netTransform/models.d.ts +2 -0
- package/out/language-server/netTransform/models.js.map +1 -1
- package/out/language-server/netTransform/netTransformServer.d.ts +2 -4
- package/out/language-server/netTransform/netTransformServer.js +21 -16
- package/out/language-server/netTransform/netTransformServer.js.map +1 -1
- package/out/language-server/netTransform/tests/mockData.js +1 -0
- package/out/language-server/netTransform/tests/mockData.js.map +1 -1
- package/out/language-server/netTransform/transformHandler.d.ts +6 -5
- package/out/language-server/netTransform/transformHandler.js +35 -12
- package/out/language-server/netTransform/transformHandler.js.map +1 -1
- package/out/language-server/securityScan/codeWhispererSecurityScanServer.js +10 -11
- package/out/language-server/securityScan/codeWhispererSecurityScanServer.js.map +1 -1
- package/out/language-server/securityScan/types.d.ts +2 -1
- package/out/shared/amazonQServer.d.ts +5 -0
- package/out/shared/amazonQServer.js +53 -0
- package/out/shared/amazonQServer.js.map +1 -0
- package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.d.ts +19 -0
- package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.js +61 -0
- package/out/shared/amazonQServiceManager/AmazonQIAMServiceManager.js.map +1 -0
- package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.d.ts +14 -28
- package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js +78 -99
- package/out/shared/amazonQServiceManager/AmazonQTokenServiceManager.js.map +1 -1
- package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.d.ts +72 -5
- package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.js +116 -0
- package/out/shared/amazonQServiceManager/BaseAmazonQServiceManager.js.map +1 -1
- package/out/shared/amazonQServiceManager/configurationUtils.d.ts +13 -1
- package/out/shared/amazonQServiceManager/configurationUtils.js +41 -22
- package/out/shared/amazonQServiceManager/configurationUtils.js.map +1 -1
- package/out/shared/amazonQServiceManager/errors.d.ts +9 -0
- package/out/shared/amazonQServiceManager/errors.js +22 -1
- package/out/shared/amazonQServiceManager/errors.js.map +1 -1
- package/out/shared/amazonQServiceManager/qDeveloperProfiles.d.ts +2 -1
- package/out/shared/amazonQServiceManager/qDeveloperProfiles.js +26 -3
- package/out/shared/amazonQServiceManager/qDeveloperProfiles.js.map +1 -1
- package/out/shared/amazonQServiceManager/testUtils.d.ts +48 -0
- package/out/shared/amazonQServiceManager/testUtils.js +112 -0
- package/out/shared/amazonQServiceManager/testUtils.js.map +1 -0
- package/out/shared/codeWhispererService.d.ts +3 -3
- package/out/shared/codeWhispererService.js +4 -4
- package/out/shared/codeWhispererService.js.map +1 -1
- package/out/shared/constants.d.ts +10 -0
- package/out/shared/constants.js +12 -1
- package/out/shared/constants.js.map +1 -1
- package/out/shared/localProjectContextController.d.ts +56 -0
- package/out/shared/localProjectContextController.js +371 -0
- package/out/shared/localProjectContextController.js.map +1 -0
- package/out/shared/models/constants.d.ts +5 -0
- package/out/shared/models/constants.js +6 -1
- package/out/shared/models/constants.js.map +1 -1
- package/out/shared/models/model.d.ts +2 -1
- package/out/shared/proxy-server.d.ts +4 -2
- package/out/shared/proxy-server.js +11 -10
- package/out/shared/proxy-server.js.map +1 -1
- package/out/shared/streamingClientService.d.ts +23 -7
- package/out/shared/streamingClientService.js +56 -9
- package/out/shared/streamingClientService.js.map +1 -1
- package/out/shared/supplementalContextUtil/crossFileContextUtil.d.ts +4 -1
- package/out/shared/supplementalContextUtil/crossFileContextUtil.js +73 -17
- package/out/shared/supplementalContextUtil/crossFileContextUtil.js.map +1 -1
- package/out/shared/supplementalContextUtil/supplementalContextUtil.d.ts +8 -0
- package/out/shared/supplementalContextUtil/supplementalContextUtil.js +63 -2
- package/out/shared/supplementalContextUtil/supplementalContextUtil.js.map +1 -1
- package/out/shared/telemetry/telemetryService.d.ts +16 -2
- package/out/shared/telemetry/telemetryService.js +25 -2
- package/out/shared/telemetry/telemetryService.js.map +1 -1
- package/out/shared/telemetry/types.d.ts +37 -2
- package/out/shared/telemetry/types.js +2 -0
- package/out/shared/telemetry/types.js.map +1 -1
- package/out/shared/telemetryUtils.d.ts +1 -0
- package/out/shared/telemetryUtils.js +5 -3
- package/out/shared/telemetryUtils.js.map +1 -1
- package/out/shared/testUtils.d.ts +2 -1
- package/out/shared/testUtils.js +10 -1
- package/out/shared/testUtils.js.map +1 -1
- package/out/shared/utils.d.ts +30 -0
- package/out/shared/utils.js +184 -0
- package/out/shared/utils.js.map +1 -1
- package/package.json +21 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +0 -53
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +0 -53
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/README.md +0 -105
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +0 -26
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +0 -12
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +0 -12
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +0 -206
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +0 -13
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +0 -18
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js +0 -4
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js +0 -4
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js +0 -22
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js +0 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js +0 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +0 -39
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js +0 -9
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js +0 -14
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +0 -52
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js +0 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js +0 -9
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts +0 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts +0 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts +0 -4
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts +0 -44
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts +0 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +0 -26
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts +0 -10
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts +0 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts +0 -15
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts +0 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts +0 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts +0 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts +0 -4
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts +0 -44
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts +0 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts +0 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +0 -26
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts +0 -10
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts +0 -7
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts +0 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts +0 -15
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts +0 -5
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts +0 -13
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts +0 -13
- package/out/shared/amazonQServiceManager/factories.d.ts +0 -15
- package/out/shared/amazonQServiceManager/factories.js +0 -47
- package/out/shared/amazonQServiceManager/factories.js.map +0 -1
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/httpHandler.js → amazon-q-developer-streaming-client/dist-es/extensionConfiguration.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types}/LICENSE +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/types.js → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/abort.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js → amazon-q-developer-streaming-client/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Field.js → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Fields.js → amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/constants.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/types.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/extensions → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector}/index.js +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/timing.js} +0 -0
- /package/node_modules/@amzn/{codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js → amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js} +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/LICENSE +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/README.md +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js → @smithy/protocol-http/dist-cjs/Field.js} +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js → @smithy/protocol-http/dist-cjs/Fields.js} +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js → @smithy/protocol-http/dist-cjs/httpHandler.js} +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/Field.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/Fields.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/extensions/index.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/httpResponse.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/index.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-es/isValidHostname.js +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/Field.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/Fields.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/extensions/index.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/httpHandler.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/httpResponse.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/index.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/isValidHostname.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/Field.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/Fields.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/extensions/index.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/httpHandler.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/httpResponse.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/isValidHostname.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/ts3.4/types.d.ts +0 -0
- /package/node_modules/{@amzn/codewhisperer-streaming/node_modules/@smithy → @smithy}/protocol-http/dist-types/types.d.ts +0 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatDatabase = exports.EMPTY_CONVERSATION_LIST_ID = void 0;
|
|
4
|
+
/*!
|
|
5
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
const Loki = require("lokijs");
|
|
9
|
+
const util_1 = require("./util");
|
|
10
|
+
const crypto = require("crypto");
|
|
11
|
+
const path = require("path");
|
|
12
|
+
const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
|
|
13
|
+
const path_1 = require("@aws/lsp-core/out/util/path");
|
|
14
|
+
exports.EMPTY_CONVERSATION_LIST_ID = 'empty';
|
|
15
|
+
// Maximum number of characters to keep in history
|
|
16
|
+
const MaxConversationHistoryCharacters = 600_000;
|
|
17
|
+
// Maximum number of messages to keep in history
|
|
18
|
+
const MaxConversationHistoryMessages = 250;
|
|
19
|
+
/**
|
|
20
|
+
* A singleton database class that manages chat history persistence using LokiJS.
|
|
21
|
+
* This class handles storage and retrieval of chat conversations, messages, and tab states
|
|
22
|
+
* for the Amazon Q VS Code extension.
|
|
23
|
+
*
|
|
24
|
+
* The database is stored in the user's home directory under .aws/amazonq/history
|
|
25
|
+
* with a unique filename based on the workspace identifier.
|
|
26
|
+
*
|
|
27
|
+
* Ported from https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/shared/db/chatDb/chatDb.ts
|
|
28
|
+
*/
|
|
29
|
+
class ChatDatabase {
|
|
30
|
+
static #instance = undefined;
|
|
31
|
+
#db;
|
|
32
|
+
/**
|
|
33
|
+
* Keep track of which open tabs have a corresponding history entry. Maps tabIds to historyIds
|
|
34
|
+
*/
|
|
35
|
+
#historyIdMapping = new Map();
|
|
36
|
+
#dbDirectory;
|
|
37
|
+
#features;
|
|
38
|
+
#initialized = false;
|
|
39
|
+
constructor(features) {
|
|
40
|
+
this.#features = features;
|
|
41
|
+
this.#dbDirectory = path.join(features.runtime.platform === 'browser'
|
|
42
|
+
? features.workspace.fs.getServerDataDirPath('amazonq-chat')
|
|
43
|
+
: (0, path_1.getUserHomeDir)(), '.aws/amazonq/history');
|
|
44
|
+
const workspaceId = this.getWorkspaceIdentifier();
|
|
45
|
+
const dbName = `chat-history-${workspaceId}.json`;
|
|
46
|
+
this.#features.logging.log(`Initializing database at ${this.#dbDirectory}/${dbName}`);
|
|
47
|
+
this.#db = new Loki(dbName, {
|
|
48
|
+
adapter: new util_1.FileSystemAdapter(features.workspace, this.#dbDirectory),
|
|
49
|
+
autosave: true,
|
|
50
|
+
autoload: true,
|
|
51
|
+
autoloadCallback: () => this.databaseInitialize(),
|
|
52
|
+
autosaveInterval: 1000,
|
|
53
|
+
persistenceMethod: 'fs',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
static getInstance(features) {
|
|
57
|
+
if (!ChatDatabase.#instance) {
|
|
58
|
+
ChatDatabase.#instance = new ChatDatabase(features);
|
|
59
|
+
}
|
|
60
|
+
return ChatDatabase.#instance;
|
|
61
|
+
}
|
|
62
|
+
close() {
|
|
63
|
+
this.#db.close();
|
|
64
|
+
ChatDatabase.#instance = undefined;
|
|
65
|
+
}
|
|
66
|
+
setHistoryIdMapping(tabId, historyId) {
|
|
67
|
+
this.#features.logging.log(`Setting historyIdMapping: tabId=${tabId}, historyId=${historyId}`);
|
|
68
|
+
this.#historyIdMapping.set(tabId, historyId);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Generates an identifier for the open workspace folder(s).
|
|
72
|
+
*/
|
|
73
|
+
getWorkspaceIdentifier() {
|
|
74
|
+
let clientParams = this.#features.lsp.getClientInitializeParams();
|
|
75
|
+
let workspaceFolderPaths = clientParams?.workspaceFolders?.map(({ uri }) => new URL(uri).pathname);
|
|
76
|
+
// Case 1: Multi-root workspace (unsaved)
|
|
77
|
+
if (workspaceFolderPaths && workspaceFolderPaths.length > 1) {
|
|
78
|
+
// Create hash from all folder paths combined
|
|
79
|
+
const pathsString = workspaceFolderPaths
|
|
80
|
+
.sort() // Sort to ensure consistent hash regardless of folder order
|
|
81
|
+
.join('|');
|
|
82
|
+
return crypto.createHash('md5').update(pathsString).digest('hex');
|
|
83
|
+
}
|
|
84
|
+
// Case 2: Single folder workspace
|
|
85
|
+
if (workspaceFolderPaths && workspaceFolderPaths[0]) {
|
|
86
|
+
return crypto.createHash('md5').update(workspaceFolderPaths[0]).digest('hex');
|
|
87
|
+
}
|
|
88
|
+
// Case 3: No workspace open
|
|
89
|
+
return 'no-workspace';
|
|
90
|
+
}
|
|
91
|
+
async databaseInitialize() {
|
|
92
|
+
let entries = this.#db.getCollection(util_1.TabCollection);
|
|
93
|
+
if (entries === null) {
|
|
94
|
+
this.#features.logging.log(`Creating new collection`);
|
|
95
|
+
entries = this.#db.addCollection(util_1.TabCollection, {
|
|
96
|
+
unique: ['historyId'],
|
|
97
|
+
indices: ['updatedAt', 'isOpen'],
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
this.#initialized = true;
|
|
101
|
+
}
|
|
102
|
+
getOpenTabs() {
|
|
103
|
+
if (this.#initialized) {
|
|
104
|
+
const collection = this.#db.getCollection(util_1.TabCollection);
|
|
105
|
+
return collection.find({ isOpen: true });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
getTab(historyId) {
|
|
109
|
+
if (this.#initialized) {
|
|
110
|
+
const collection = this.#db.getCollection(util_1.TabCollection);
|
|
111
|
+
return collection.findOne({ historyId });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// If conversation is open, return its tabId, else return undefined
|
|
115
|
+
getOpenTabId(historyId) {
|
|
116
|
+
const selectedTab = this.getTab(historyId);
|
|
117
|
+
if (selectedTab?.isOpen) {
|
|
118
|
+
for (const [tabId, id] of this.#historyIdMapping) {
|
|
119
|
+
if (id === historyId) {
|
|
120
|
+
return tabId;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Delete a conversation from history when /clear command is sent on an open tab
|
|
128
|
+
*/
|
|
129
|
+
clearTab(tabId) {
|
|
130
|
+
if (this.#initialized) {
|
|
131
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
132
|
+
const historyId = this.#historyIdMapping.get(tabId);
|
|
133
|
+
if (historyId) {
|
|
134
|
+
this.#features.logging.log(`Removed conversation from history with tabId=${tabId}, historyId=${historyId}`);
|
|
135
|
+
tabCollection.findAndRemove({ historyId });
|
|
136
|
+
}
|
|
137
|
+
this.#historyIdMapping.delete(tabId);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
updateTabOpenState(tabId, isOpen) {
|
|
141
|
+
if (this.#initialized) {
|
|
142
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
143
|
+
const historyId = this.#historyIdMapping.get(tabId);
|
|
144
|
+
if (historyId) {
|
|
145
|
+
this.#features.logging.log(`Updating tab open state: historyId=${historyId}, isOpen=${isOpen}`);
|
|
146
|
+
tabCollection.findAndUpdate({ historyId }, (tab) => {
|
|
147
|
+
tab.isOpen = isOpen;
|
|
148
|
+
return tab;
|
|
149
|
+
});
|
|
150
|
+
if (!isOpen) {
|
|
151
|
+
this.#historyIdMapping.delete(tabId);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Searches messages across all conversations and tabs based on a given filter.
|
|
158
|
+
* This function performs the following operations:
|
|
159
|
+
* - If no filter is provided, it returns the entire conversation history
|
|
160
|
+
* - Searches for the filter term (case-insensitive) in all message bodies
|
|
161
|
+
* - Filters tabs that contain matching messages
|
|
162
|
+
* - Groups the filtered results by date
|
|
163
|
+
* - If no results are found, returns a single group with a "No matches found" message
|
|
164
|
+
**/
|
|
165
|
+
searchMessages(filter) {
|
|
166
|
+
let searchResults = [];
|
|
167
|
+
if (this.#initialized) {
|
|
168
|
+
if (!filter) {
|
|
169
|
+
this.#features.logging.log(`Empty search filter, returning all history`);
|
|
170
|
+
return this.getHistory();
|
|
171
|
+
}
|
|
172
|
+
this.#features.logging.log(`Searching for ${filter}`);
|
|
173
|
+
const searchTermLower = filter.toLowerCase();
|
|
174
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
175
|
+
const tabs = tabCollection.find();
|
|
176
|
+
const filteredTabs = tabs.filter((tab) => {
|
|
177
|
+
return tab.conversations.some((conversation) => {
|
|
178
|
+
return conversation.messages.some((message) => {
|
|
179
|
+
return message.body?.toLowerCase().includes(searchTermLower);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
this.#features.logging.log(`Found ${filteredTabs.length} tabs with matching messages`);
|
|
184
|
+
searchResults = (0, util_1.groupTabsByDate)(filteredTabs);
|
|
185
|
+
}
|
|
186
|
+
if (searchResults.length === 0) {
|
|
187
|
+
this.#features.logging.log(`No matches found`);
|
|
188
|
+
searchResults = [{ items: [{ id: exports.EMPTY_CONVERSATION_LIST_ID, description: 'No matches found' }] }];
|
|
189
|
+
}
|
|
190
|
+
return searchResults;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get messages for specified tabId
|
|
194
|
+
* @param tabId The ID of the tab to get messages from
|
|
195
|
+
* @param numMessages Optional number of most recent messages to return. If not provided, returns all messages.
|
|
196
|
+
*/
|
|
197
|
+
getMessages(tabId, numMessages) {
|
|
198
|
+
if (this.#initialized) {
|
|
199
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
200
|
+
const historyId = this.#historyIdMapping.get(tabId);
|
|
201
|
+
this.#features.logging.log(`Getting messages for tabId=${tabId}, historyId=${historyId}, numMessages=${numMessages}`);
|
|
202
|
+
const tabData = historyId ? tabCollection.findOne({ historyId }) : undefined;
|
|
203
|
+
if (tabData) {
|
|
204
|
+
const allMessages = tabData.conversations.flatMap((conversation) => conversation.messages.map(msg => (0, util_1.messageToStreamingMessage)(msg)));
|
|
205
|
+
if (numMessages !== undefined) {
|
|
206
|
+
return allMessages.slice(-numMessages);
|
|
207
|
+
}
|
|
208
|
+
return allMessages;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return [];
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Get all conversations for the current workspace, grouped by last updated time
|
|
215
|
+
*/
|
|
216
|
+
getHistory() {
|
|
217
|
+
if (this.#initialized) {
|
|
218
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
219
|
+
const tabs = tabCollection.find();
|
|
220
|
+
let groupedTabs = (0, util_1.groupTabsByDate)(tabs);
|
|
221
|
+
this.#features.logging.log(`Found ${tabs.length} conversations from history`);
|
|
222
|
+
if (groupedTabs.length === 0) {
|
|
223
|
+
return [{ items: [{ id: exports.EMPTY_CONVERSATION_LIST_ID, description: 'No chat history found' }] }];
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
return groupedTabs;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return [];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Deletes a conversation from history
|
|
233
|
+
*/
|
|
234
|
+
deleteHistory(historyId) {
|
|
235
|
+
if (this.#initialized) {
|
|
236
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
237
|
+
tabCollection.findAndRemove({ historyId });
|
|
238
|
+
this.#features.logging.log(`Removed conversation from history with historyId=${historyId}`);
|
|
239
|
+
const tabId = this.getOpenTabId(historyId);
|
|
240
|
+
if (tabId) {
|
|
241
|
+
this.#historyIdMapping.delete(tabId);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Adds a message to a conversation within a specified tab.
|
|
247
|
+
*
|
|
248
|
+
* This method manages chat messages in the following way:
|
|
249
|
+
* - Creates a new history ID if none exists for the tab
|
|
250
|
+
* - Updates existing conversation or creates new one
|
|
251
|
+
* - Updates tab title with last user prompt added to conversation
|
|
252
|
+
* - Updates tab's last updated time
|
|
253
|
+
*/
|
|
254
|
+
addMessage(tabId, tabType, conversationId, message) {
|
|
255
|
+
if (this.#initialized) {
|
|
256
|
+
const clientType = this.#features.lsp.getClientInitializeParams()?.clientInfo?.name || 'unknown';
|
|
257
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
258
|
+
this.#features.logging.log(`Adding message to history: tabId=${tabId}, tabType=${tabType}, conversationId=${conversationId}`);
|
|
259
|
+
let historyId = this.#historyIdMapping.get(tabId);
|
|
260
|
+
if (!historyId) {
|
|
261
|
+
historyId = crypto.randomUUID();
|
|
262
|
+
this.#features.logging.log(`Creating new historyId=${historyId} for tabId=${tabId}`);
|
|
263
|
+
this.setHistoryIdMapping(tabId, historyId);
|
|
264
|
+
}
|
|
265
|
+
const tabData = historyId ? tabCollection.findOne({ historyId }) : undefined;
|
|
266
|
+
const tabTitle = (message.type === 'prompt' && message.body.trim().length > 0 ? message.body : tabData?.title) ||
|
|
267
|
+
'Amazon Q Chat';
|
|
268
|
+
message = this.formatChatHistoryMessage(message);
|
|
269
|
+
if (tabData) {
|
|
270
|
+
this.#features.logging.log(`Updating existing tab with historyId=${historyId}`);
|
|
271
|
+
tabData.conversations = (0, util_1.updateOrCreateConversation)(tabData.conversations, conversationId, message, clientType);
|
|
272
|
+
tabData.updatedAt = new Date();
|
|
273
|
+
tabData.title = tabTitle;
|
|
274
|
+
tabCollection.update(tabData);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
this.#features.logging.log(`Creating new tab with historyId=${historyId}`);
|
|
278
|
+
tabCollection.insert({
|
|
279
|
+
historyId,
|
|
280
|
+
updatedAt: new Date(),
|
|
281
|
+
isOpen: true,
|
|
282
|
+
tabType: tabType,
|
|
283
|
+
title: tabTitle,
|
|
284
|
+
conversations: [{ conversationId, clientType, messages: [message] }],
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
formatChatHistoryMessage(message) {
|
|
290
|
+
if (message.type === 'prompt') {
|
|
291
|
+
const hasToolResults = message.userInputMessageContext?.toolResults;
|
|
292
|
+
return {
|
|
293
|
+
...message,
|
|
294
|
+
userInputMessageContext: {
|
|
295
|
+
// keep falcon context when inputMessage is not a toolResult message
|
|
296
|
+
editorState: hasToolResults ? undefined : message.userInputMessageContext?.editorState,
|
|
297
|
+
additionalContext: hasToolResults ? undefined : message.userInputMessageContext?.additionalContext,
|
|
298
|
+
// Only keep toolResults in history
|
|
299
|
+
toolResults: message.userInputMessageContext?.toolResults,
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
return message;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Fixes the history to maintain the following invariants:
|
|
307
|
+
* 1. The history contains at most MaxConversationHistoryMessages messages. Oldest messages are dropped.
|
|
308
|
+
* 2. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped.
|
|
309
|
+
* 3. The first message is from the user. Oldest messages are dropped if needed.
|
|
310
|
+
* 4. The last message is from the assistant. The last message is dropped if it is from the user.
|
|
311
|
+
* 5. If the last message is from the assistant and it contains tool uses, and a next user
|
|
312
|
+
* message is set without tool results, then the user message will have cancelled tool results.
|
|
313
|
+
*/
|
|
314
|
+
fixHistory(tabId, newUserMessage, conversationId) {
|
|
315
|
+
if (!this.#initialized) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const historyId = this.#historyIdMapping.get(tabId);
|
|
319
|
+
this.#features.logging.info(`Fixing history: tabId=${tabId}, historyId=${historyId || 'undefined'}`);
|
|
320
|
+
if (!historyId) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
const tabCollection = this.#db.getCollection(util_1.TabCollection);
|
|
324
|
+
const tabData = tabCollection.findOne({ historyId });
|
|
325
|
+
if (!tabData) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
let allMessages = tabData.conversations.flatMap((conversation) => conversation.messages);
|
|
329
|
+
this.#features.logging.info(`Found ${allMessages.length} messages in conversation`);
|
|
330
|
+
// Make sure we don't exceed MaxConversationHistoryMessages
|
|
331
|
+
allMessages = this.trimHistoryToMaxLength(allMessages);
|
|
332
|
+
// Drop empty assistant partial if it’s the last message
|
|
333
|
+
this.handleEmptyAssistantMessage(allMessages);
|
|
334
|
+
// Make sure max characters ≤ MaxConversationHistoryCharacters - newUserMessageCharacterCount
|
|
335
|
+
allMessages = this.trimMessagesToMaxLength(allMessages, newUserMessage);
|
|
336
|
+
// Ensure messages in history a valid for server side checks
|
|
337
|
+
this.ensureValidMessageSequence(allMessages);
|
|
338
|
+
// If the last message is from the assistant and it contains tool uses, and a next user message is set without tool results, then the user message will have cancelled tool results.
|
|
339
|
+
this.handleToolUses(allMessages, newUserMessage);
|
|
340
|
+
const clientType = this.#features.lsp.getClientInitializeParams()?.clientInfo?.name || 'unknown';
|
|
341
|
+
tabData.conversations = [
|
|
342
|
+
{
|
|
343
|
+
conversationId: conversationId,
|
|
344
|
+
clientType: clientType,
|
|
345
|
+
messages: allMessages,
|
|
346
|
+
},
|
|
347
|
+
];
|
|
348
|
+
tabData.updatedAt = new Date();
|
|
349
|
+
tabCollection.update(tabData);
|
|
350
|
+
this.#features.logging.info(`Updated tab data in collection`);
|
|
351
|
+
}
|
|
352
|
+
trimHistoryToMaxLength(messages) {
|
|
353
|
+
while (messages.length > MaxConversationHistoryMessages) {
|
|
354
|
+
// Find the next valid user message to start from
|
|
355
|
+
const indexToTrim = this.findIndexToTrim(messages);
|
|
356
|
+
if (indexToTrim !== undefined && indexToTrim > 0) {
|
|
357
|
+
this.#features.logging.debug(`Removing the first ${indexToTrim} elements to maintain valid history length`);
|
|
358
|
+
messages.splice(0, indexToTrim);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
this.#features.logging.debug('Could not find a valid point to trim, reset history to reduce history size');
|
|
362
|
+
return [];
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return messages;
|
|
366
|
+
}
|
|
367
|
+
findIndexToTrim(allMessages) {
|
|
368
|
+
for (let i = 2; i < allMessages.length; i++) {
|
|
369
|
+
const message = allMessages[i];
|
|
370
|
+
if (message.type === 'prompt' && this.isValidUserMessageWithoutToolResults(message)) {
|
|
371
|
+
return i;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return undefined;
|
|
375
|
+
}
|
|
376
|
+
isValidUserMessageWithoutToolResults(message) {
|
|
377
|
+
const ctx = message.userInputMessageContext;
|
|
378
|
+
return !!ctx && (!ctx.toolResults || ctx.toolResults.length === 0) && message.body !== '';
|
|
379
|
+
}
|
|
380
|
+
handleEmptyAssistantMessage(messages) {
|
|
381
|
+
if (messages.length === 0) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
const lastMsg = messages[messages.length - 1];
|
|
385
|
+
if (lastMsg.type === 'answer' &&
|
|
386
|
+
(!lastMsg.body || lastMsg.body.trim().length === 0) &&
|
|
387
|
+
(!lastMsg.toolUses || lastMsg.toolUses.length === 0)) {
|
|
388
|
+
this.#features.logging.debug('Last message is empty partial assistant. Removed last assistant message and user message');
|
|
389
|
+
messages.splice(-2);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
trimMessagesToMaxLength(messages, newUserMessage) {
|
|
393
|
+
let totalCharacters = this.calculateHistoryCharacterCount(messages);
|
|
394
|
+
this.#features.logging.debug(`Current history characters: ${totalCharacters}`);
|
|
395
|
+
const currentUserInputCharacterCount = this.calculateCurrentMessageCharacterCount((0, util_1.chatMessageToMessage)(newUserMessage));
|
|
396
|
+
this.#features.logging.debug(`Current user message characters: ${currentUserInputCharacterCount}`);
|
|
397
|
+
const maxHistoryCharacterSize = Math.max(0, MaxConversationHistoryCharacters - currentUserInputCharacterCount);
|
|
398
|
+
while (totalCharacters > maxHistoryCharacterSize && messages.length > 2) {
|
|
399
|
+
// Find the next valid user message to start from
|
|
400
|
+
const indexToTrim = this.findIndexToTrim(messages);
|
|
401
|
+
if (indexToTrim !== undefined && indexToTrim > 0) {
|
|
402
|
+
this.#features.logging.debug(`Removing the first ${indexToTrim} elements in the history due to character count limit`);
|
|
403
|
+
messages.splice(0, indexToTrim);
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
this.#features.logging.debug('Could not find a valid point to trim, reset history to reduce character count');
|
|
407
|
+
return [];
|
|
408
|
+
}
|
|
409
|
+
totalCharacters = this.calculateHistoryCharacterCount(messages);
|
|
410
|
+
this.#features.logging.debug(`Current history characters: ${totalCharacters}`);
|
|
411
|
+
}
|
|
412
|
+
return messages;
|
|
413
|
+
}
|
|
414
|
+
calculateHistoryCharacterCount(allMessages) {
|
|
415
|
+
let count = 0;
|
|
416
|
+
for (const message of allMessages) {
|
|
417
|
+
// Count characters of all message text
|
|
418
|
+
count += message.body.length;
|
|
419
|
+
// Count characters in tool uses
|
|
420
|
+
if (message.toolUses) {
|
|
421
|
+
try {
|
|
422
|
+
for (const toolUse of message.toolUses) {
|
|
423
|
+
count += JSON.stringify(toolUse).length;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
catch (e) {
|
|
427
|
+
this.#features.logging.error(`Error counting toolUses: ${String(e)}`);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
// Count characters in tool results
|
|
431
|
+
if (message.userInputMessageContext?.toolResults) {
|
|
432
|
+
try {
|
|
433
|
+
for (const toolResul of message.userInputMessageContext.toolResults) {
|
|
434
|
+
count += JSON.stringify(toolResul).length;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
catch (e) {
|
|
438
|
+
this.#features.logging.error(`Error counting toolResults: ${String(e)}`);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (message.userInputMessageContext?.editorState) {
|
|
442
|
+
try {
|
|
443
|
+
count += JSON.stringify(message.userInputMessageContext?.editorState).length;
|
|
444
|
+
}
|
|
445
|
+
catch (e) {
|
|
446
|
+
this.#features.logging.error(`Error counting editorState: ${String(e)}`);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (message.userInputMessageContext?.additionalContext) {
|
|
450
|
+
try {
|
|
451
|
+
count += JSON.stringify(message.userInputMessageContext?.additionalContext).length;
|
|
452
|
+
}
|
|
453
|
+
catch (e) {
|
|
454
|
+
this.#features.logging.error(`Error counting additionalContext: ${String(e)}`);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return count;
|
|
459
|
+
}
|
|
460
|
+
calculateCurrentMessageCharacterCount(message) {
|
|
461
|
+
let count = 0;
|
|
462
|
+
// Count characters of message text
|
|
463
|
+
count += message.body.length;
|
|
464
|
+
// Count characters in tool uses
|
|
465
|
+
if (message.toolUses) {
|
|
466
|
+
try {
|
|
467
|
+
for (const toolUse of message.toolUses) {
|
|
468
|
+
count += JSON.stringify(toolUse).length;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
catch (e) {
|
|
472
|
+
this.#features.logging.error(`Error counting toolUses: ${String(e)}`);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
// Count characters in tool results
|
|
476
|
+
if (message.userInputMessageContext?.toolResults) {
|
|
477
|
+
try {
|
|
478
|
+
for (const toolResul of message.userInputMessageContext.toolResults) {
|
|
479
|
+
count += JSON.stringify(toolResul).length;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
catch (e) {
|
|
483
|
+
this.#features.logging.error(`Error counting toolResults: ${String(e)}`);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
// Count characters in tool spec for the current user message
|
|
487
|
+
if (message.userInputMessageContext?.tools) {
|
|
488
|
+
try {
|
|
489
|
+
for (const toolSpec of message.userInputMessageContext.tools) {
|
|
490
|
+
count += JSON.stringify(toolSpec).length;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
catch (e) {
|
|
494
|
+
this.#features.logging.error(`Error counting tool spec length: ${String(e)}`);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (message.userInputMessageContext?.additionalContext) {
|
|
498
|
+
try {
|
|
499
|
+
for (const addtionalContext of message.userInputMessageContext.additionalContext) {
|
|
500
|
+
count += JSON.stringify(addtionalContext).length;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
catch (e) {
|
|
504
|
+
this.#features.logging.error(`Error counting addtionalContext length: ${String(e)}`);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
if (message.userInputMessageContext?.editorState) {
|
|
508
|
+
try {
|
|
509
|
+
count += JSON.stringify(message.userInputMessageContext?.editorState).length;
|
|
510
|
+
}
|
|
511
|
+
catch (e) {
|
|
512
|
+
this.#features.logging.error(`Error counting editorState length: ${String(e)}`);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
return count;
|
|
516
|
+
}
|
|
517
|
+
ensureValidMessageSequence(messages) {
|
|
518
|
+
// Make sure the first stored message is from the user (type === 'prompt'), else drop
|
|
519
|
+
while (messages.length > 0 && messages[0].type === 'answer') {
|
|
520
|
+
messages.shift();
|
|
521
|
+
this.#features.logging.debug('Dropped first message since it is not from user');
|
|
522
|
+
}
|
|
523
|
+
// Make sure the last stored message is from the assistant (type === 'answer'), else drop
|
|
524
|
+
if (messages.length > 0 && messages[messages.length - 1].type === 'prompt') {
|
|
525
|
+
messages.pop();
|
|
526
|
+
this.#features.logging.debug('Dropped trailing user message');
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
handleToolUses(messages, newUserMessage) {
|
|
530
|
+
if (messages.length === 0) {
|
|
531
|
+
if (newUserMessage.userInputMessage?.userInputMessageContext?.toolResults) {
|
|
532
|
+
this.#features.logging.debug('No history message found, but new user message has tool results.');
|
|
533
|
+
newUserMessage.userInputMessage.userInputMessageContext.toolResults = undefined;
|
|
534
|
+
// tool results are empty, so content must not be empty
|
|
535
|
+
newUserMessage.userInputMessage.content = 'Conversation history was too large, so it was cleared.';
|
|
536
|
+
}
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
const lastMsg = messages[messages.length - 1];
|
|
540
|
+
if (lastMsg.toolUses && lastMsg.toolUses.length > 0) {
|
|
541
|
+
const toolResults = newUserMessage.userInputMessage?.userInputMessageContext?.toolResults;
|
|
542
|
+
if (!toolResults || toolResults.length === 0) {
|
|
543
|
+
this.#features.logging.debug(`No tools results in last user message following a tool use message from assisstant, marking as canceled`);
|
|
544
|
+
if (newUserMessage.userInputMessage?.userInputMessageContext) {
|
|
545
|
+
newUserMessage.userInputMessage.userInputMessageContext.toolResults = lastMsg.toolUses.map(toolUse => ({
|
|
546
|
+
toolUseId: toolUse.toolUseId,
|
|
547
|
+
content: [
|
|
548
|
+
{
|
|
549
|
+
type: 'Text',
|
|
550
|
+
text: 'Tool use was cancelled by the user',
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
status: codewhisperer_streaming_1.ToolResultStatus.ERROR,
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
exports.ChatDatabase = ChatDatabase;
|
|
561
|
+
//# sourceMappingURL=chatDb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatDb.js","sourceRoot":"","sources":["../../../../../src/language-server/agenticChat/tools/chatDb/chatDb.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+BAA8B;AAC9B,iCAWe;AACf,iCAAgC;AAChC,6BAA4B;AAG5B,2EAA6E;AAE7E,sDAA4D;AAE/C,QAAA,0BAA0B,GAAG,OAAO,CAAA;AACjD,kDAAkD;AAClD,MAAM,gCAAgC,GAAG,OAAO,CAAA;AAChD,gDAAgD;AAChD,MAAM,8BAA8B,GAAG,GAAG,CAAA;AAE1C;;;;;;;;;GASG;AAEH,MAAa,YAAY;IACrB,MAAM,CAAC,SAAS,GAA6B,SAAS,CAAA;IACtD,GAAG,CAAM;IACT;;OAEG;IACH,iBAAiB,GAAwB,IAAI,GAAG,EAAE,CAAA;IAClD,YAAY,CAAQ;IACpB,SAAS,CAAU;IACnB,YAAY,GAAY,KAAK,CAAA;IAE7B,YAAY,QAAkB;QAC1B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CACzB,QAAQ,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS;YACnC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC;YAC5D,CAAC,CAAC,IAAA,qBAAc,GAAE,EACtB,sBAAsB,CACzB,CAAA;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAA;QACjD,MAAM,MAAM,GAAG,gBAAgB,WAAW,OAAO,CAAA;QAEjD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,CAAC,YAAY,IAAI,MAAM,EAAE,CAAC,CAAA;QAErF,IAAI,CAAC,GAAG,GAAG,IAAI,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AAG,SAAS,CAAA;gBAC/E,uDAAuD;gBACvD,cAAc,CAAC,gBAAgB,CAAC,OAAO,GAAG,wDAAwD,CAAA;YACtG,CAAC;YACD,OAAM;QACV,CAAC;QAED,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC7C,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClD,MAAM,WAAW,GAAG,cAAc,CAAC,gBAAgB,EAAE,uBAAuB,EAAE,WAAW,CAAA;YACzF,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CACxB,yGAAyG,CAC5G,CAAA;gBACD,IAAI,cAAc,CAAC,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;oBAC3D,cAAc,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CACtF,OAAO,CAAC,EAAE,CAAC,CAAC;wBACR,SAAS,EAAE,OAAO,CAAC,SAAS;wBAC5B,OAAO,EAAE;4BACL;gCACI,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,oCAAoC;6BAC7C;yBACJ;wBACD,MAAM,EAAE,0CAAgB,CAAC,KAAK;qBACjC,CAAC,CACL,CAAA;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;;AA5lBL,oCA6lBC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ChatMessage, ConversationItemGroup, ReferenceTrackerInformation } from '@aws/language-server-runtimes/server-interface';
|
|
6
|
+
import { ChatMessage as StreamingMessage, Origin, UserInputMessageContext, UserIntent, ToolUse } from '@amzn/codewhisperer-streaming';
|
|
7
|
+
import { Workspace } from '@aws/language-server-runtimes/server-interface';
|
|
8
|
+
export declare const TabCollection = "tabs";
|
|
9
|
+
export declare const historyPath: string;
|
|
10
|
+
declare const TabTypes: readonly ["cwc", "featuredev", "gumby", "review", "testgen", "doc", "agentWalkthrough", "welcome", "unknown"];
|
|
11
|
+
export type TabType = (typeof TabTypes)[number];
|
|
12
|
+
/**
|
|
13
|
+
* Represents one entry in chat history list.
|
|
14
|
+
*/
|
|
15
|
+
export type Tab = {
|
|
16
|
+
historyId: string;
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
tabType: TabType;
|
|
20
|
+
title: string;
|
|
21
|
+
conversations: Conversation[];
|
|
22
|
+
};
|
|
23
|
+
export type Conversation = {
|
|
24
|
+
conversationId: string;
|
|
25
|
+
clientType: string;
|
|
26
|
+
messages: Message[];
|
|
27
|
+
};
|
|
28
|
+
export type Message = {
|
|
29
|
+
body: string;
|
|
30
|
+
type: ChatMessage['type'];
|
|
31
|
+
codeReference?: ReferenceTrackerInformation[];
|
|
32
|
+
relatedContent?: ChatMessage['relatedContent'];
|
|
33
|
+
messageId?: string;
|
|
34
|
+
userIntent?: UserIntent;
|
|
35
|
+
origin?: Origin;
|
|
36
|
+
userInputMessageContext?: UserInputMessageContext;
|
|
37
|
+
toolUses?: ToolUse[];
|
|
38
|
+
shouldDisplayMessage?: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Converts Message to codewhisperer-streaming ChatMessage
|
|
42
|
+
*/
|
|
43
|
+
export declare function messageToStreamingMessage(msg: Message): StreamingMessage;
|
|
44
|
+
/**
|
|
45
|
+
* Converts Message to LSP Protocol ChatMessage
|
|
46
|
+
*/
|
|
47
|
+
export declare function messageToChatMessage(msg: Message): ChatMessage[];
|
|
48
|
+
/**
|
|
49
|
+
* Converts codewhisperer-streaming ChatMessage to Message
|
|
50
|
+
*/
|
|
51
|
+
export declare function chatMessageToMessage(chatMessage: StreamingMessage): Message;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* This adapter implements the LokiPersistenceAdapter interface for file system operations using web-compatible shared fs utils.
|
|
55
|
+
* It provides methods for loading, saving, and deleting databases, as well as ensuring
|
|
56
|
+
* the existence of the directory.
|
|
57
|
+
*
|
|
58
|
+
* Error Handling:
|
|
59
|
+
* - All methods use try-catch blocks to to prevent breaking the application
|
|
60
|
+
* - In case of errors, the callback functions are used to communicate the error state
|
|
61
|
+
* without throwing exceptions.
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
export declare class FileSystemAdapter implements LokiPersistenceAdapter {
|
|
65
|
+
#private;
|
|
66
|
+
constructor(workspace: Workspace, directory: string);
|
|
67
|
+
ensureDirectory(): Promise<void>;
|
|
68
|
+
loadDatabase(dbname: string, callback: (data: string | undefined | Error) => void): Promise<void>;
|
|
69
|
+
saveDatabase(dbname: string, dbstring: string, callback: (err: Error | undefined) => void): Promise<void>;
|
|
70
|
+
deleteDatabase(dbname: string, callback: (err: Error | undefined) => void): Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
export declare function updateOrCreateConversation(conversations: Conversation[], conversationId: string, newMessage: Message, clientType: string): Conversation[];
|
|
73
|
+
export declare function groupTabsByDate(tabs: Tab[]): ConversationItemGroup[];
|
|
74
|
+
export {};
|