@aws/lsp-codewhisperer 0.0.26 → 0.0.28
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 +33 -0
- package/README.md +59 -1
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/README.md +53 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +209 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +79 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/index.js +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers/package.json +68 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/README.md +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-cjs/index.js +295 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/auth.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/dns.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/endpoint.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/index.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/index.js +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/transfer.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/abort.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/auth.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/client.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/command.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/connection.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +49 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/dns.d.ts +85 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/encode.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/http.d.ts +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/index.d.ts +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/logger.d.ts +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/pagination.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/profile.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/request.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/response.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/retry.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/serde.d.ts +24 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/shapes.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/signature.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/stream.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/token.d.ts +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/transfer.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/abort.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/blob/blob-types.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/client.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/command.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/connection.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/dns.d.ts +19 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/encode.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts +24 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/extensions/index.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AnonymousIdentity.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/Identity.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +32 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +40 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/request.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/response.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/uri.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/ts3.4/waiter.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/uri.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/util.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-types/waiter.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/package.json +56 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/LICENSE +201 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts +16 -0
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts +6 -3
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts +16 -0
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts +6 -3
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/package.json +6 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/index.js +193 -76
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/node-http-handler.js +39 -15
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/node-http2-handler.js +9 -1
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/server.mock.js +9 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/write-request-body.js +13 -9
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/node-http-handler.d.ts +4 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -2
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +3 -0
- package/node_modules/{@smithy/node-http-handler/dist-types → @amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4}/set-socket-keep-alive.d.ts +7 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
- package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/package.json +10 -10
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-cjs/index.js +30 -8
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/httpRequest.js +13 -8
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +53 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +53 -0
- package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/package.json +6 -6
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/LICENSE +201 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/README.md +105 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +26 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +206 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigFilepath.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getCredentialsFilepath.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getHomeDir.js +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFromFile.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/getSsoSessionData.js +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/index.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +39 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSsoSessionData.js +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/mergeConfigFiles.js +14 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +52 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/parseKnownFiles.js +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/slurpFile.js +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigData.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getConfigFilepath.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getCredentialsFilepath.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getHomeDir.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts +44 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/getSsoSessionData.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/index.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +26 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/mergeConfigFiles.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseIni.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/slurpFile.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigData.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getConfigFilepath.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getCredentialsFilepath.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getHomeDir.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts +44 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSsoSessionData.d.ts +6 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/index.d.ts +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +26 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts +10 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/mergeConfigFiles.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseIni.d.ts +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts +5 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/package.json +72 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/CHANGELOG.md +274 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/README.md +466 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/rng-browser.js +25 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/stringify.js +44 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/v35.js +80 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/v4.js +43 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/package.json +135 -0
- package/node_modules/@amzn/codewhisperer-streaming/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/@smithy/types/dist-cjs/pagination.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/profile.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/response.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/retry.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/serde.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/shapes.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/signature.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/stream.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/transfer.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/uri.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/util.js +1 -0
- package/node_modules/@smithy/types/dist-cjs/waiter.js +1 -0
- package/node_modules/@smithy/types/dist-es/util.js +1 -0
- package/node_modules/@smithy/types/dist-es/waiter.js +1 -0
- package/out/client/sigv4/codewhisperer.d.ts +2 -1
- package/out/client/sigv4/codewhisperer.js +4 -4
- package/out/client/sigv4/codewhisperer.js.map +1 -1
- package/out/client/streamingClient/codewhispererStreamingClient.d.ts +3 -2
- package/out/client/streamingClient/codewhispererStreamingClient.js +4 -29
- package/out/client/streamingClient/codewhispererStreamingClient.js.map +1 -1
- package/out/client/token/bearer-token-service.json +1652 -98
- package/out/client/token/codewhisperer.d.ts +2 -1
- package/out/client/token/codewhisperer.js +4 -4
- package/out/client/token/codewhisperer.js.map +1 -1
- package/out/constants.d.ts +3 -0
- package/out/constants.js +4 -1
- package/out/constants.js.map +1 -1
- package/out/language-server/amazonQServiceManager/qDeveloperProfiles.d.ts +38 -0
- package/out/language-server/amazonQServiceManager/qDeveloperProfiles.js +85 -0
- package/out/language-server/amazonQServiceManager/qDeveloperProfiles.js.map +1 -0
- package/out/language-server/chat/chatController.d.ts +1 -1
- package/out/language-server/chat/chatController.js +2 -2
- package/out/language-server/chat/chatController.js.map +1 -1
- package/out/language-server/chat/chatSessionManagementService.d.ts +2 -1
- package/out/language-server/chat/chatSessionManagementService.js +12 -1
- package/out/language-server/chat/chatSessionManagementService.js.map +1 -1
- package/out/language-server/chat/chatSessionService.d.ts +2 -1
- package/out/language-server/chat/chatSessionService.js +4 -2
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/codeWhispererSecurityScanServer.d.ts +2 -1
- package/out/language-server/codeWhispererSecurityScanServer.js +2 -2
- package/out/language-server/codeWhispererSecurityScanServer.js.map +1 -1
- package/out/language-server/codeWhispererServer.d.ts +2 -2
- package/out/language-server/codeWhispererServer.js +12 -37
- package/out/language-server/codeWhispererServer.js.map +1 -1
- package/out/language-server/codeWhispererService.d.ts +7 -4
- package/out/language-server/codeWhispererService.js +17 -11
- package/out/language-server/codeWhispererService.js.map +1 -1
- package/out/language-server/configuration/qConfigurationServer.d.ts +20 -2
- package/out/language-server/configuration/qConfigurationServer.js +109 -8
- package/out/language-server/configuration/qConfigurationServer.js.map +1 -1
- package/out/language-server/dependencyGraph/commonUtil.d.ts +0 -1
- package/out/language-server/dependencyGraph/commonUtil.js +0 -11
- package/out/language-server/dependencyGraph/commonUtil.js.map +1 -1
- package/out/language-server/dependencyGraph/dependencyGraph.js +2 -2
- package/out/language-server/dependencyGraph/dependencyGraph.js.map +1 -1
- package/out/language-server/netTransform/transformHandler.d.ts +3 -2
- package/out/language-server/netTransform/transformHandler.js +7 -2
- package/out/language-server/netTransform/transformHandler.js.map +1 -1
- package/out/language-server/netTransformServer.d.ts +2 -1
- package/out/language-server/netTransformServer.js +4 -4
- package/out/language-server/netTransformServer.js.map +1 -1
- package/out/language-server/proxy-server.js +12 -39
- package/out/language-server/proxy-server.js.map +1 -1
- package/out/language-server/qChatServer.d.ts +2 -1
- package/out/language-server/qChatServer.js +3 -3
- package/out/language-server/qChatServer.js.map +1 -1
- package/out/language-server/telemetry/codeDiffTracker.js +15 -12
- package/out/language-server/telemetry/codeDiffTracker.js.map +1 -1
- package/out/language-server/telemetryService.d.ts +2 -2
- package/out/language-server/telemetryService.js +2 -2
- package/out/language-server/telemetryService.js.map +1 -1
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.js +2 -2
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.js.map +1 -1
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.js +17 -3
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.js.map +1 -1
- package/out/language-server/utils.d.ts +3 -3
- package/out/language-server/utils.js +5 -26
- package/out/language-server/utils.js.map +1 -1
- package/package.json +10 -10
- package/node_modules/@smithy/node-http-handler/README.md +0 -4
- package/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -8
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -6
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -14
- package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts +0 -13
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts +0 -13
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +0 -23
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +0 -23
- package/out/language-server/auto-trigger/autoTrigger.test.js +0 -82
- package/out/language-server/auto-trigger/autoTrigger.test.js.map +0 -1
- package/out/language-server/chat/chatController.test.js +0 -701
- package/out/language-server/chat/chatController.test.js.map +0 -1
- package/out/language-server/chat/chatEventParser.test.js +0 -239
- package/out/language-server/chat/chatEventParser.test.js.map +0 -1
- package/out/language-server/chat/chatSessionManagementService.test.js +0 -69
- package/out/language-server/chat/chatSessionManagementService.test.js.map +0 -1
- package/out/language-server/chat/chatSessionService.test.js +0 -79
- package/out/language-server/chat/chatSessionService.test.js.map +0 -1
- package/out/language-server/chat/contexts/documentContext.test.js +0 -117
- package/out/language-server/chat/contexts/documentContext.test.js.map +0 -1
- package/out/language-server/chat/contexts/triggerContexts.test.js +0 -81
- package/out/language-server/chat/contexts/triggerContexts.test.js.map +0 -1
- package/out/language-server/chat/contexts/utils.test.js +0 -72
- package/out/language-server/chat/contexts/utils.test.js.map +0 -1
- package/out/language-server/chat/telemetry/chatTelemetryController.test.js +0 -195
- package/out/language-server/chat/telemetry/chatTelemetryController.test.js.map +0 -1
- package/out/language-server/codeWhispererServer.test.js +0 -1377
- package/out/language-server/codeWhispererServer.test.js.map +0 -1
- package/out/language-server/dependencyGraph/csharpDependencyGraph.test.js +0 -483
- package/out/language-server/dependencyGraph/csharpDependencyGraph.test.js.map +0 -1
- package/out/language-server/dependencyGraph/gitIgnoreFilter.d.ts +0 -7
- package/out/language-server/dependencyGraph/gitIgnoreFilter.js +0 -39
- package/out/language-server/dependencyGraph/gitIgnoreFilter.js.map +0 -1
- package/out/language-server/languageDetection.test.js +0 -31
- package/out/language-server/languageDetection.test.js.map +0 -1
- package/out/language-server/mergeRightUtils.test.js +0 -53
- package/out/language-server/mergeRightUtils.test.js.map +0 -1
- package/out/language-server/netTransform/tests/converter.test.js +0 -108
- package/out/language-server/netTransform/tests/converter.test.js.map +0 -1
- package/out/language-server/netTransform/tests/transformHandler.test.js +0 -245
- package/out/language-server/netTransform/tests/transformHandler.test.js.map +0 -1
- package/out/language-server/netTransform/tests/validation.test.js +0 -84
- package/out/language-server/netTransform/tests/validation.test.js.map +0 -1
- package/out/language-server/qChatServer.test.js +0 -51
- package/out/language-server/qChatServer.test.js.map +0 -1
- package/out/language-server/securityScan/securityScanHandler.test.js +0 -171
- package/out/language-server/securityScan/securityScanHandler.test.js.map +0 -1
- package/out/language-server/session/sessionManager.test.js +0 -588
- package/out/language-server/session/sessionManager.test.js.map +0 -1
- package/out/language-server/telemetry/codeDiffTracker.test.js +0 -125
- package/out/language-server/telemetry/codeDiffTracker.test.js.map +0 -1
- package/out/language-server/telemetry/codePercentage.test.js +0 -214
- package/out/language-server/telemetry/codePercentage.test.js.map +0 -1
- package/out/language-server/telemetry/userTriggerDecision.test.js +0 -1348
- package/out/language-server/telemetry/userTriggerDecision.test.js.map +0 -1
- package/out/language-server/telemetry.test.js +0 -98
- package/out/language-server/telemetry.test.js.map +0 -1
- package/out/language-server/telemetryService.test.js +0 -764
- package/out/language-server/telemetryService.test.js.map +0 -1
- package/out/language-server/utilities/filesystemUtilities.d.ts +0 -8
- package/out/language-server/utilities/filesystemUtilities.js +0 -30
- package/out/language-server/utilities/filesystemUtilities.js.map +0 -1
- package/out/language-server/utilities/filesystemUtilities.test.js +0 -85
- package/out/language-server/utilities/filesystemUtilities.test.js.map +0 -1
- package/out/language-server/utilities/pathUtils.d.ts +0 -27
- package/out/language-server/utilities/pathUtils.js +0 -79
- package/out/language-server/utilities/pathUtils.js.map +0 -1
- package/out/language-server/utilities/pathUtils.test.js +0 -43
- package/out/language-server/utilities/pathUtils.test.js.map +0 -1
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.test.d.ts +0 -5
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.test.js +0 -49
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.test.js.map +0 -1
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.test.js +0 -157
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.test.js.map +0 -1
- package/out/language-server/utilities/supplementalContextUtil/supplementalContextUtil.test.js +0 -88
- package/out/language-server/utilities/supplementalContextUtil/supplementalContextUtil.test.js.map +0 -1
- package/out/language-server/utilities/telemetryUtils.test.js +0 -207
- package/out/language-server/utilities/telemetryUtils.test.js.map +0 -1
- package/out/language-server/utilities/textUtils.d.ts +0 -1
- package/out/language-server/utilities/textUtils.js +0 -12
- package/out/language-server/utilities/textUtils.js.map +0 -1
- package/out/language-server/utilities/textUtils.test.js +0 -21
- package/out/language-server/utilities/textUtils.test.js.map +0 -1
- package/out/language-server/utils.test.js +0 -152
- package/out/language-server/utils.test.js.map +0 -1
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers}/LICENSE +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/abort-controller → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types}/LICENSE +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/abort.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-es/httpHandler.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/blob/blob-types.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/checksum.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/client.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/command.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-es/types.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/connection.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/credentials.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/crypto.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/encode.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/eventStream.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/extensions/index.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/http.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/AnonymousIdentity.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/AwsCredentialIdentity.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/Identity.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/LoginIdentity.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/identity/TokenIdentity.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/logger.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/middleware.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/pagination.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/profile.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/request.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/response.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es}/retry.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/serde.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/shapes.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/signature.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/stream.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js → @amzn/codewhisperer-streaming/node_modules/@aws-sdk/types/dist-es/token.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/uri.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/util.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy → @amzn/codewhisperer-streaming/node_modules/@aws-sdk}/types/dist-es/waiter.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/README.md +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-cjs/index.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-es/AbortController.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-es/index.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-types/index.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/abort-controller/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/constants.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/get-transformed-headers.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/node-http-handler.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/node-http2-connection-manager.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/node-http2-connection-pool.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/node-http2-handler.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/readable.mock.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/server.mock.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/set-connection-timeout.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/set-socket-keep-alive.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/set-socket-timeout.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/stream-collector/collector.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/stream-collector/index.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-cjs/stream-collector/readable.mock.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/dist-cjs/write-request-body.js → @amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-cjs/timing.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/Field.js → @amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js} +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/constants.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/get-transformed-headers.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/index.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/node-http2-connection-pool.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/readable.mock.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/stream-collector/collector.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/constants.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/index.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/node-http2-handler.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/readable.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/server.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/stream-collector/index.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/server.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -0
- /package/node_modules/{@smithy → @amzn/codewhisperer-streaming/node_modules/@smithy}/node-http-handler/dist-types/write-request-body.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/LICENSE +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/README.md +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/Fields.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Field.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/Fields.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/protocol-http/dist-cjs/types.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/abort.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-cjs/types.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/Field.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/Fields.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/extensions/index.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/httpHandler.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/httpResponse.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/index.js +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-es/isValidHostname.js +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js → @amzn/codewhisperer-streaming/node_modules/@smithy/protocol-http/dist-es/types.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/Field.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/Fields.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/extensions/httpExtensionConfiguration.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/extensions/index.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/index.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/isValidHostname.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/Field.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/Fields.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/httpExtensionConfiguration.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/extensions/index.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpHandler.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpResponse.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/isValidHostname.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/ts3.4/types.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler → @amzn/codewhisperer-streaming}/node_modules/@smithy/protocol-http/dist-types/types.d.ts +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/checksum.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/client.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/command.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/crypto.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/encode.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/endpoint.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/eventStream.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/http.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/logger.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/middleware.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/pagination.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js} +0 -0
- /package/node_modules/{@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js → @amzn/codewhisperer-streaming/node_modules/@smithy/shared-ini-file-loader/dist-es/types.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/LICENSE +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/README.md +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/dist-cjs/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/dist-es/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/dist-types/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/querystring-builder → querystring-builder}/package.json +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/LICENSE +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/README.md +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/profile.js → types/dist-cjs/abort.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/HttpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/HttpAuthScheme.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/HttpAuthSchemeProvider.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/HttpSigner.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/IdentityProviderConfig.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/auth.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/auth/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/blob/blob-payload-input-types.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/response.js → types/dist-cjs/checksum.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/retry.js → types/dist-cjs/client.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/serde.js → types/dist-cjs/command.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/connection/config.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/connection/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/connection/manager.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/connection/pool.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/shapes.js → types/dist-cjs/crypto.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/downlevel-ts3.4/transform/type-transform.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/signature.js → types/dist-cjs/encode.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/stream.js → types/dist-cjs/endpoint.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/EndpointRuleObject.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/ErrorRuleObject.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/RuleSetObject.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/TreeRuleObject.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/endpoints/shared.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/transfer.js → types/dist-cjs/eventStream.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/extensions/checksum.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/extensions/defaultClientConfiguration.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/extensions/defaultExtensionConfiguration.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/extensions/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/extensions/retry.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/externals-check/browser-externals-check.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/http/httpHandlerInitialization.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/uri.js → types/dist-cjs/http.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/identity/apiKeyIdentity.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/identity/awsCredentialIdentity.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/identity/identity.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/identity/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/identity/tokenIdentity.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/util.js → types/dist-cjs/logger.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-cjs/waiter.js → types/dist-cjs/middleware.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/streaming-payload/streaming-blob-common-types.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/transform/client-method-transforms.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/transform/client-payload-blob-type-narrow.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/transform/exact.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/transform/no-undefined.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-cjs/transform/type-transform.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js → types/dist-es/abort.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/auth/HttpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js → types/dist-es/auth/HttpAuthScheme.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js → types/dist-es/auth/HttpAuthSchemeProvider.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js → types/dist-es/auth/HttpSigner.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js → types/dist-es/auth/IdentityProviderConfig.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/auth/auth.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/auth/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js → types/dist-es/blob/blob-payload-input-types.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/retry.js → types/dist-es/checksum.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js → types/dist-es/client.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js → types/dist-es/command.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js → types/dist-es/connection/config.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/connection/index.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js → types/dist-es/connection/manager.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js → types/dist-es/connection/pool.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js → types/dist-es/crypto.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es → types/dist-es/downlevel-ts3.4}/transform/type-transform.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js → types/dist-es/encode.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/endpoint.js +0 -0
- /package/{out/language-server/auto-trigger/autoTrigger.test.d.ts → node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js} +0 -0
- /package/{out/language-server/chat/chatController.test.d.ts → node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js} +0 -0
- /package/{out/language-server/chat/chatEventParser.test.d.ts → node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js} +0 -0
- /package/{out/language-server/chat/chatSessionManagementService.test.d.ts → node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/endpoints/index.js +0 -0
- /package/{out/language-server/chat/chatSessionService.test.d.ts → node_modules/@smithy/types/dist-es/endpoints/shared.js} +0 -0
- /package/{out/language-server/chat/contexts/documentContext.test.d.ts → node_modules/@smithy/types/dist-es/eventStream.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/extensions/checksum.js +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/extensions/defaultClientConfiguration.js +0 -0
- /package/{out/language-server/chat/contexts/triggerContexts.test.d.ts → node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/extensions/index.js +0 -0
- /package/{out/language-server/chat/contexts/utils.test.d.ts → node_modules/@smithy/types/dist-es/extensions/retry.js} +0 -0
- /package/{out/language-server/chat/telemetry/chatTelemetryController.test.d.ts → node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js} +0 -0
- /package/{out/language-server/codeWhispererServer.test.d.ts → node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/http.js +0 -0
- /package/{out/language-server/dependencyGraph/csharpDependencyGraph.test.d.ts → node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js} +0 -0
- /package/{out/language-server/languageDetection.test.d.ts → node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js} +0 -0
- /package/{out/language-server/mergeRightUtils.test.d.ts → node_modules/@smithy/types/dist-es/identity/identity.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/identity/index.js +0 -0
- /package/{out/language-server/netTransform/tests/converter.test.d.ts → node_modules/@smithy/types/dist-es/identity/tokenIdentity.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/index.js +0 -0
- /package/{out/language-server/netTransform/tests/transformHandler.test.d.ts → node_modules/@smithy/types/dist-es/logger.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/middleware.js +0 -0
- /package/{out/language-server/netTransform/tests/validation.test.d.ts → node_modules/@smithy/types/dist-es/pagination.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/profile.js +0 -0
- /package/{out/language-server/qChatServer.test.d.ts → node_modules/@smithy/types/dist-es/response.js} +0 -0
- /package/{out/language-server/securityScan/securityScanHandler.test.d.ts → node_modules/@smithy/types/dist-es/retry.js} +0 -0
- /package/{out/language-server/session/sessionManager.test.d.ts → node_modules/@smithy/types/dist-es/serde.js} +0 -0
- /package/{out/language-server/telemetry.test.d.ts → node_modules/@smithy/types/dist-es/shapes.js} +0 -0
- /package/{out/language-server/telemetry/codeDiffTracker.test.d.ts → node_modules/@smithy/types/dist-es/signature.js} +0 -0
- /package/{out/language-server/telemetry/codePercentage.test.d.ts → node_modules/@smithy/types/dist-es/stream.js} +0 -0
- /package/{out/language-server/telemetry/userTriggerDecision.test.d.ts → node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js} +0 -0
- /package/{out/language-server/telemetryService.test.d.ts → node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js} +0 -0
- /package/{out/language-server/utilities/filesystemUtilities.test.d.ts → node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-es/transfer.js +0 -0
- /package/{out/language-server/utilities/pathUtils.test.d.ts → node_modules/@smithy/types/dist-es/transform/client-method-transforms.js} +0 -0
- /package/{out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.test.d.ts → node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js} +0 -0
- /package/{out/language-server/utilities/supplementalContextUtil/supplementalContextUtil.test.d.ts → node_modules/@smithy/types/dist-es/transform/exact.js} +0 -0
- /package/{out/language-server/utilities/telemetryUtils.test.d.ts → node_modules/@smithy/types/dist-es/transform/no-undefined.js} +0 -0
- /package/{out/language-server/utilities/textUtils.test.d.ts → node_modules/@smithy/types/dist-es/transform/type-transform.js} +0 -0
- /package/{out/language-server/utils.test.d.ts → node_modules/@smithy/types/dist-es/uri.js} +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/abort.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/HttpApiKeyAuth.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/HttpAuthScheme.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/HttpAuthSchemeProvider.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/HttpSigner.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/IdentityProviderConfig.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/auth.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/auth/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/blob/blob-payload-input-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/checksum.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/client.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/command.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/connection/config.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/connection/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/connection/manager.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/connection/pool.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/crypto.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/encode.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoint.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/EndpointRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/ErrorRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/RuleSetObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/TreeRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/endpoints/shared.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/eventStream.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/extensions/checksum.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/extensions/defaultClientConfiguration.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/extensions/defaultExtensionConfiguration.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/extensions/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/extensions/retry.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/externals-check/browser-externals-check.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/http/httpHandlerInitialization.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/http.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/identity/apiKeyIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/identity/awsCredentialIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/identity/identity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/identity/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/identity/tokenIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/logger.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/middleware.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/pagination.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/profile.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/response.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/retry.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/serde.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/shapes.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/signature.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/stream.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/streaming-payload/streaming-blob-common-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transfer.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transform/client-method-transforms.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transform/client-payload-blob-type-narrow.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transform/exact.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transform/no-undefined.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/transform/type-transform.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/abort.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/HttpSigner.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/auth.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/auth/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/checksum.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/client.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/command.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/connection/config.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/connection/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/connection/manager.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/connection/pool.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/crypto.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/encode.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoint.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/endpoints/shared.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/eventStream.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/extensions/checksum.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/extensions/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/extensions/retry.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/http.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/identity/identity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/identity/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/identity/tokenIdentity.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/index.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/logger.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/middleware.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/pagination.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/profile.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/response.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/retry.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/serde.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/shapes.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/signature.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/stream.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transfer.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transform/client-method-transforms.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transform/exact.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transform/no-undefined.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/transform/type-transform.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/uri.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/util.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/ts3.4/waiter.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/uri.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/util.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/dist-types/waiter.d.ts +0 -0
- /package/node_modules/@smithy/{node-http-handler/node_modules/@smithy/types → types}/package.json +0 -0
|
@@ -1,1377 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const server_interface_1 = require("@aws/language-server-runtimes/server-interface");
|
|
4
|
-
const testing_1 = require("@aws/language-server-runtimes/testing");
|
|
5
|
-
const assert = require("assert");
|
|
6
|
-
const ts_sinon_1 = require("ts-sinon");
|
|
7
|
-
const codeWhispererServer_1 = require("./codeWhispererServer");
|
|
8
|
-
const codeWhispererService_1 = require("./codeWhispererService");
|
|
9
|
-
const sessionManager_1 = require("./session/sessionManager");
|
|
10
|
-
const testUtils_1 = require("./testUtils");
|
|
11
|
-
const codeDiffTracker_1 = require("./telemetry/codeDiffTracker");
|
|
12
|
-
const telemetryService_1 = require("./telemetryService");
|
|
13
|
-
describe('CodeWhisperer Server', () => {
|
|
14
|
-
const sandbox = ts_sinon_1.default.createSandbox();
|
|
15
|
-
let SESSION_IDS_LOG = [];
|
|
16
|
-
let sessionManager;
|
|
17
|
-
let sessionManagerSpy;
|
|
18
|
-
let generateSessionIdStub;
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
const StubSessionIdGenerator = () => {
|
|
21
|
-
const id = 'some-random-session-uuid-' + SESSION_IDS_LOG.length;
|
|
22
|
-
SESSION_IDS_LOG.push(id);
|
|
23
|
-
return id;
|
|
24
|
-
};
|
|
25
|
-
generateSessionIdStub = ts_sinon_1.default
|
|
26
|
-
.stub(sessionManager_1.CodeWhispererSession.prototype, 'generateSessionId')
|
|
27
|
-
.callsFake(StubSessionIdGenerator);
|
|
28
|
-
sessionManager = sessionManager_1.SessionManager.getInstance();
|
|
29
|
-
sessionManagerSpy = sandbox.spy(sessionManager);
|
|
30
|
-
});
|
|
31
|
-
afterEach(() => {
|
|
32
|
-
generateSessionIdStub.restore();
|
|
33
|
-
sessionManager_1.SessionManager.reset();
|
|
34
|
-
sandbox.restore();
|
|
35
|
-
SESSION_IDS_LOG = [];
|
|
36
|
-
});
|
|
37
|
-
describe('Recommendations', () => {
|
|
38
|
-
let features;
|
|
39
|
-
let server;
|
|
40
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
41
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
42
|
-
// for examples on how to mock just the SDK client
|
|
43
|
-
let service;
|
|
44
|
-
beforeEach(async () => {
|
|
45
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
46
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
47
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
48
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION,
|
|
49
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
50
|
-
}));
|
|
51
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
52
|
-
// Initialize the features, but don't start server yet
|
|
53
|
-
features = new testing_1.TestFeatures();
|
|
54
|
-
// Return no specific configuration for CodeWhisperer
|
|
55
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
56
|
-
// Start the server and open a document
|
|
57
|
-
await features.start(server);
|
|
58
|
-
features
|
|
59
|
-
.openDocument(testUtils_1.SOME_FILE)
|
|
60
|
-
.openDocument(testUtils_1.SOME_FILE_WITH_ALT_CASED_LANGUAGE_ID)
|
|
61
|
-
.openDocument(testUtils_1.SOME_UNSUPPORTED_FILE)
|
|
62
|
-
.openDocument(testUtils_1.SOME_FILE_WITH_EXTENSION)
|
|
63
|
-
.openDocument(testUtils_1.SOME_SINGLE_LINE_FILE);
|
|
64
|
-
});
|
|
65
|
-
afterEach(() => {
|
|
66
|
-
features.dispose();
|
|
67
|
-
});
|
|
68
|
-
it('should return recommendations', async () => {
|
|
69
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
70
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
71
|
-
position: { line: 0, character: 0 },
|
|
72
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
73
|
-
}, server_interface_1.CancellationToken.None);
|
|
74
|
-
// Check the completion result
|
|
75
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
76
|
-
const expectedGenerateSuggestionsRequest = {
|
|
77
|
-
fileContext: {
|
|
78
|
-
filename: testUtils_1.SOME_FILE.uri,
|
|
79
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
80
|
-
leftFileContent: '',
|
|
81
|
-
rightFileContent: testUtils_1.HELLO_WORLD_IN_CSHARP,
|
|
82
|
-
},
|
|
83
|
-
maxResults: 5,
|
|
84
|
-
};
|
|
85
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
86
|
-
});
|
|
87
|
-
it('should correctly get left and right context', async () => {
|
|
88
|
-
const cutOffLine = 2;
|
|
89
|
-
const lines = testUtils_1.HELLO_WORLD_IN_CSHARP.split('\n');
|
|
90
|
-
const firstTwoLines = lines.slice(0, cutOffLine).join('\n') + '\n';
|
|
91
|
-
const remainingLines = lines.slice(cutOffLine).join('\n');
|
|
92
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
93
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
94
|
-
position: { line: cutOffLine, character: 0 },
|
|
95
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
96
|
-
}, server_interface_1.CancellationToken.None);
|
|
97
|
-
// Check the completion result
|
|
98
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
99
|
-
const expectedGenerateSuggestionsRequest = {
|
|
100
|
-
fileContext: {
|
|
101
|
-
filename: testUtils_1.SOME_FILE.uri,
|
|
102
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
103
|
-
leftFileContent: firstTwoLines,
|
|
104
|
-
rightFileContent: remainingLines,
|
|
105
|
-
},
|
|
106
|
-
maxResults: 5,
|
|
107
|
-
};
|
|
108
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
109
|
-
});
|
|
110
|
-
it('should truncate left and right context', async () => {
|
|
111
|
-
const BIG_FILE_CONTENT = '123456789\n'.repeat(5000);
|
|
112
|
-
const BIG_FILE = server_interface_1.TextDocument.create('file:///big_file.cs', 'csharp', 1, BIG_FILE_CONTENT);
|
|
113
|
-
const cutOffLine = 2000;
|
|
114
|
-
features.openDocument(BIG_FILE);
|
|
115
|
-
await features.doInlineCompletionWithReferences({
|
|
116
|
-
textDocument: { uri: BIG_FILE.uri },
|
|
117
|
-
position: { line: cutOffLine, character: 1 },
|
|
118
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
119
|
-
}, server_interface_1.CancellationToken.None);
|
|
120
|
-
const leftContentChecker = (leftContent) => leftContent.length == codeWhispererServer_1.CONTEXT_CHARACTERS_LIMIT && leftContent.endsWith('\n1');
|
|
121
|
-
const rightContentChecker = (rightContent) => rightContent.length == codeWhispererServer_1.CONTEXT_CHARACTERS_LIMIT && rightContent.startsWith('234');
|
|
122
|
-
ts_sinon_1.default.assert.calledWith(service.generateSuggestions, ts_sinon_1.default.match.hasNested('fileContext.leftFileContent', ts_sinon_1.default.match(leftContentChecker)));
|
|
123
|
-
ts_sinon_1.default.assert.calledWith(service.generateSuggestions, ts_sinon_1.default.match.hasNested('fileContext.rightFileContent', ts_sinon_1.default.match(rightContentChecker)));
|
|
124
|
-
});
|
|
125
|
-
it('should return recommendations when using a different languageId casing', async () => {
|
|
126
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
127
|
-
textDocument: { uri: testUtils_1.SOME_FILE_WITH_ALT_CASED_LANGUAGE_ID.uri },
|
|
128
|
-
position: { line: 0, character: 0 },
|
|
129
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
130
|
-
}, server_interface_1.CancellationToken.None);
|
|
131
|
-
// Check the completion result
|
|
132
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
133
|
-
const expectedGenerateSuggestionsRequest = {
|
|
134
|
-
fileContext: {
|
|
135
|
-
filename: testUtils_1.SOME_FILE_WITH_ALT_CASED_LANGUAGE_ID.uri,
|
|
136
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
137
|
-
leftFileContent: '',
|
|
138
|
-
rightFileContent: testUtils_1.HELLO_WORLD_IN_CSHARP,
|
|
139
|
-
},
|
|
140
|
-
maxResults: 5,
|
|
141
|
-
};
|
|
142
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
143
|
-
});
|
|
144
|
-
it('should not return recommendations for a closed file', async () => {
|
|
145
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
146
|
-
textDocument: { uri: testUtils_1.SOME_CLOSED_FILE.uri },
|
|
147
|
-
position: { line: 0, character: 0 },
|
|
148
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
149
|
-
}, server_interface_1.CancellationToken.None);
|
|
150
|
-
// Check the completion result
|
|
151
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
152
|
-
// Check the service was not called
|
|
153
|
-
ts_sinon_1.default.assert.notCalled(service.generateSuggestions);
|
|
154
|
-
});
|
|
155
|
-
it('should not return recommendations for an unsupported file type', async () => {
|
|
156
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
157
|
-
textDocument: { uri: testUtils_1.SOME_UNSUPPORTED_FILE.uri },
|
|
158
|
-
position: { line: 0, character: 0 },
|
|
159
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
160
|
-
}, server_interface_1.CancellationToken.None);
|
|
161
|
-
// Check the completion result
|
|
162
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
163
|
-
// Check the service was not called
|
|
164
|
-
ts_sinon_1.default.assert.notCalled(service.generateSuggestions);
|
|
165
|
-
});
|
|
166
|
-
it('should return recommendations based on known extension', async () => {
|
|
167
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
168
|
-
textDocument: { uri: testUtils_1.SOME_FILE_WITH_EXTENSION.uri },
|
|
169
|
-
position: { line: 0, character: 0 },
|
|
170
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
171
|
-
}, server_interface_1.CancellationToken.None);
|
|
172
|
-
// Check the completion result
|
|
173
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
174
|
-
const expectedGenerateSuggestionsRequest = {
|
|
175
|
-
fileContext: {
|
|
176
|
-
filename: testUtils_1.SOME_FILE_WITH_EXTENSION.uri,
|
|
177
|
-
programmingLanguage: { languageName: 'cpp' },
|
|
178
|
-
leftFileContent: '',
|
|
179
|
-
rightFileContent: testUtils_1.HELLO_WORLD_IN_CSHARP,
|
|
180
|
-
},
|
|
181
|
-
maxResults: 5,
|
|
182
|
-
};
|
|
183
|
-
// Check the service was called with the right parameters
|
|
184
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
185
|
-
});
|
|
186
|
-
// Merge right tests
|
|
187
|
-
it('should not show recommendation when the recommendation is equal to right context', async () => {
|
|
188
|
-
// The suggestion returned by generateSuggestions will be equal to the contents of the file
|
|
189
|
-
const EXPECTED_SUGGESTION = [{ itemId: 'cwspr-item-id', content: testUtils_1.HELLO_WORLD_IN_CSHARP }];
|
|
190
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
191
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
192
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
193
|
-
}));
|
|
194
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
195
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
196
|
-
position: { line: 0, character: 0 },
|
|
197
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
198
|
-
}, server_interface_1.CancellationToken.None);
|
|
199
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
200
|
-
});
|
|
201
|
-
it('should only show the part of the recommendation that does not overlap with the right context in multiline', async () => {
|
|
202
|
-
const cutOffLine = 2;
|
|
203
|
-
const lines = testUtils_1.HELLO_WORLD_IN_CSHARP.split('\n');
|
|
204
|
-
// The recommendation will be the contents of hello world starting from line 3 (static void Main)
|
|
205
|
-
const recommendation = lines.slice(cutOffLine).join('\n');
|
|
206
|
-
// We delete the static void Main line from Hello World but keep the rest in the file
|
|
207
|
-
const deletedLine = lines.splice(cutOffLine, 1)[0];
|
|
208
|
-
const finalFileContent = lines.join('\n');
|
|
209
|
-
const MY_FILE = server_interface_1.TextDocument.create('file:///rightContext.cs', 'csharp', 1, finalFileContent);
|
|
210
|
-
features.openDocument(MY_FILE);
|
|
211
|
-
const EXPECTED_SUGGESTION = [{ itemId: 'cwspr-item-id', content: recommendation }];
|
|
212
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
213
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
214
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
215
|
-
}));
|
|
216
|
-
// Expected result is the deleted line + new line + 4 spaces
|
|
217
|
-
// Newline and the 4 spaces get lost when we do the `split` so we add them back to expected result
|
|
218
|
-
const EXPECTED_RESULT = {
|
|
219
|
-
sessionId: testUtils_1.EXPECTED_SESSION_ID,
|
|
220
|
-
items: [
|
|
221
|
-
{
|
|
222
|
-
itemId: EXPECTED_SUGGESTION[0].itemId,
|
|
223
|
-
insertText: deletedLine.concat('\n '),
|
|
224
|
-
range: undefined,
|
|
225
|
-
references: undefined,
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
};
|
|
229
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
230
|
-
textDocument: { uri: MY_FILE.uri },
|
|
231
|
-
position: { line: cutOffLine, character: 0 },
|
|
232
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
233
|
-
}, server_interface_1.CancellationToken.None);
|
|
234
|
-
assert.deepEqual(result, EXPECTED_RESULT);
|
|
235
|
-
const leftContext = lines.slice(0, cutOffLine).join('\n') + '\n';
|
|
236
|
-
const rightContext = lines.slice(cutOffLine).join('\n');
|
|
237
|
-
const expectedGenerateSuggestionsRequest = {
|
|
238
|
-
fileContext: {
|
|
239
|
-
filename: MY_FILE.uri,
|
|
240
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
241
|
-
leftFileContent: leftContext,
|
|
242
|
-
rightFileContent: rightContext,
|
|
243
|
-
},
|
|
244
|
-
maxResults: 5,
|
|
245
|
-
};
|
|
246
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
247
|
-
});
|
|
248
|
-
it('should convert windows newlines to UNIX newlines in request file contents', async () => {
|
|
249
|
-
const cutOffLine = 2;
|
|
250
|
-
const lines = testUtils_1.HELLO_WORLD_WITH_WINDOWS_ENDING.split('\r\n');
|
|
251
|
-
const MY_WINDOWS_FILE = server_interface_1.TextDocument.create('file:///rightContext.cs', 'csharp', 1, testUtils_1.HELLO_WORLD_WITH_WINDOWS_ENDING);
|
|
252
|
-
features.openDocument(MY_WINDOWS_FILE);
|
|
253
|
-
await features.doInlineCompletionWithReferences({
|
|
254
|
-
textDocument: { uri: MY_WINDOWS_FILE.uri },
|
|
255
|
-
position: { line: cutOffLine, character: 0 },
|
|
256
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
257
|
-
}, server_interface_1.CancellationToken.None);
|
|
258
|
-
const modifiedLeftContext = lines.slice(0, cutOffLine).join('\n') + '\n';
|
|
259
|
-
const modifiedRightContext = lines.slice(cutOffLine).join('\n');
|
|
260
|
-
const expectedGenerateSuggestionsRequest = {
|
|
261
|
-
fileContext: {
|
|
262
|
-
filename: MY_WINDOWS_FILE.uri,
|
|
263
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
264
|
-
leftFileContent: modifiedLeftContext,
|
|
265
|
-
rightFileContent: modifiedRightContext,
|
|
266
|
-
},
|
|
267
|
-
maxResults: 5,
|
|
268
|
-
};
|
|
269
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
270
|
-
});
|
|
271
|
-
it('should only show the part of the recommendation that does not overlap with the right context', async () => {
|
|
272
|
-
const EXPECTED_SUGGESTION = [{ itemId: 'cwspr-item-id', content: testUtils_1.HELLO_WORLD_LINE }];
|
|
273
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
274
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
275
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
276
|
-
}));
|
|
277
|
-
const EXPECTED_RESULT = {
|
|
278
|
-
sessionId: testUtils_1.EXPECTED_SESSION_ID,
|
|
279
|
-
items: [
|
|
280
|
-
{
|
|
281
|
-
itemId: EXPECTED_SUGGESTION[0].itemId,
|
|
282
|
-
insertText: testUtils_1.HELLO_WORLD_LINE.substring(0, testUtils_1.SINGLE_LINE_FILE_CUTOFF_INDEX),
|
|
283
|
-
range: undefined,
|
|
284
|
-
references: undefined,
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
};
|
|
288
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
289
|
-
textDocument: { uri: testUtils_1.SOME_SINGLE_LINE_FILE.uri },
|
|
290
|
-
position: { line: 0, character: 0 },
|
|
291
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
292
|
-
}, server_interface_1.CancellationToken.None);
|
|
293
|
-
assert.deepEqual(result, EXPECTED_RESULT);
|
|
294
|
-
});
|
|
295
|
-
it('should show full recommendation when the right context does not match recommendation ', async () => {
|
|
296
|
-
const EXPECTED_SUGGESTION = [{ itemId: 'cwspr-item-id', content: 'Something something' }];
|
|
297
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
298
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
299
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
300
|
-
}));
|
|
301
|
-
const EXPECTED_RESULT = {
|
|
302
|
-
sessionId: testUtils_1.EXPECTED_SESSION_ID,
|
|
303
|
-
items: [
|
|
304
|
-
{
|
|
305
|
-
itemId: EXPECTED_SUGGESTION[0].itemId,
|
|
306
|
-
insertText: EXPECTED_SUGGESTION[0].content,
|
|
307
|
-
range: undefined,
|
|
308
|
-
references: undefined,
|
|
309
|
-
},
|
|
310
|
-
],
|
|
311
|
-
};
|
|
312
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
313
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
314
|
-
position: { line: 0, character: 0 },
|
|
315
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
316
|
-
}, server_interface_1.CancellationToken.None);
|
|
317
|
-
assert.deepEqual(result, EXPECTED_RESULT);
|
|
318
|
-
});
|
|
319
|
-
it('should return empty recommendations list on failed request', async () => {
|
|
320
|
-
// Plant exception
|
|
321
|
-
service.generateSuggestions.returns(Promise.reject('UNEXPECTED EXCEPTION'));
|
|
322
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
323
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
324
|
-
position: { line: 0, character: 0 },
|
|
325
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
326
|
-
}, server_interface_1.CancellationToken.None);
|
|
327
|
-
// Check the completion result
|
|
328
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
329
|
-
});
|
|
330
|
-
describe('Supplemental Context', () => {
|
|
331
|
-
it('should send supplemental context when using token authentication', async () => {
|
|
332
|
-
const test_service = ts_sinon_1.default.createStubInstance(codeWhispererService_1.CodeWhispererServiceToken);
|
|
333
|
-
test_service.generateSuggestions.returns(Promise.resolve({
|
|
334
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION,
|
|
335
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
336
|
-
}));
|
|
337
|
-
const test_server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => test_service);
|
|
338
|
-
// Initialize the features, but don't start server yet
|
|
339
|
-
const test_features = new testing_1.TestFeatures();
|
|
340
|
-
// Return no specific configuration for CodeWhisperer
|
|
341
|
-
test_features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
342
|
-
// Start the server and open a document
|
|
343
|
-
await test_features.start(test_server);
|
|
344
|
-
// Open files supporting cross-file context
|
|
345
|
-
test_features
|
|
346
|
-
.openDocument(server_interface_1.TextDocument.create('file:///SampleFile.java', 'java', 1, 'sample-content'))
|
|
347
|
-
.openDocument(server_interface_1.TextDocument.create('file:///TargetFile.java', 'java', 1, ''));
|
|
348
|
-
await test_features.doInlineCompletionWithReferences({
|
|
349
|
-
textDocument: { uri: 'file:///TargetFile.java' },
|
|
350
|
-
position: server_interface_1.Position.create(0, 0),
|
|
351
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
352
|
-
}, server_interface_1.CancellationToken.None);
|
|
353
|
-
const expectedGenerateSuggestionsRequest = {
|
|
354
|
-
fileContext: {
|
|
355
|
-
filename: 'file:///TargetFile.java',
|
|
356
|
-
programmingLanguage: { languageName: 'java' },
|
|
357
|
-
leftFileContent: '',
|
|
358
|
-
rightFileContent: '',
|
|
359
|
-
},
|
|
360
|
-
maxResults: 5,
|
|
361
|
-
supplementalContexts: [
|
|
362
|
-
{ content: 'sample-content', filePath: '/SampleFile.java' },
|
|
363
|
-
{ content: 'sample-content', filePath: '/SampleFile.java' },
|
|
364
|
-
],
|
|
365
|
-
};
|
|
366
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(test_service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
367
|
-
test_features.dispose();
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
// TODO: mock http request and verify the headers are passed
|
|
371
|
-
// or spawn an http server and pass it as an endpoint to the sdk client,
|
|
372
|
-
// mock responses and verify that correct headers are receieved on the server side.
|
|
373
|
-
// Currently the suite just checks whether the boolean is passed to codeWhispererService
|
|
374
|
-
describe('Opting out of sending data to CodeWhisperer', () => {
|
|
375
|
-
it('should send opt-out header when the setting is disabled', async () => {
|
|
376
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ shareCodeWhispererContentWithAWS: false }));
|
|
377
|
-
await features.start(server);
|
|
378
|
-
assert(service.shareCodeWhispererContentWithAWS === false);
|
|
379
|
-
});
|
|
380
|
-
it('should not send opt-out header when the setting is enabled after startup', async () => {
|
|
381
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ shareCodeWhispererContentWithAWS: false }));
|
|
382
|
-
await features.start(server);
|
|
383
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ shareCodeWhispererContentWithAWS: true }));
|
|
384
|
-
// Invoke event twice to ensure LSP Router propagates didChangeConfiguration notification and allows time for it to take effect in tests
|
|
385
|
-
await features.openDocument(testUtils_1.SOME_FILE).doChangeConfiguration();
|
|
386
|
-
await features.openDocument(testUtils_1.SOME_FILE).doChangeConfiguration();
|
|
387
|
-
assert(service.shareCodeWhispererContentWithAWS === true);
|
|
388
|
-
});
|
|
389
|
-
it('should send opt-out header if no settings are specificed', async () => {
|
|
390
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
391
|
-
await features.start(server);
|
|
392
|
-
assert(service.shareCodeWhispererContentWithAWS === false);
|
|
393
|
-
});
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
describe('Recommendations With References', () => {
|
|
397
|
-
let features;
|
|
398
|
-
let server;
|
|
399
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
400
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
401
|
-
// for examples on how to mock just the SDK client
|
|
402
|
-
let service;
|
|
403
|
-
beforeEach(() => {
|
|
404
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
405
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
406
|
-
service.customizationArn = undefined;
|
|
407
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
408
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION_LIST,
|
|
409
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
410
|
-
}));
|
|
411
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
412
|
-
// Initialize the features, but don't start server yet
|
|
413
|
-
features = new testing_1.TestFeatures();
|
|
414
|
-
});
|
|
415
|
-
afterEach(() => {
|
|
416
|
-
features.dispose();
|
|
417
|
-
});
|
|
418
|
-
it('should return all recommendations if no settings are specificed', async () => {
|
|
419
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
420
|
-
await features.start(server);
|
|
421
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
422
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
423
|
-
position: { line: 0, character: 0 },
|
|
424
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
425
|
-
}, server_interface_1.CancellationToken.None);
|
|
426
|
-
// Check the completion result
|
|
427
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITHOUT_REFERENCES);
|
|
428
|
-
});
|
|
429
|
-
it('should filter recommendations with references if GetConfiguration is not handled by the client', async () => {
|
|
430
|
-
features.lsp.workspace.getConfiguration.returns(Promise.reject(new Error('GetConfiguration failed')));
|
|
431
|
-
await features.start(server);
|
|
432
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
433
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
434
|
-
position: { line: 0, character: 0 },
|
|
435
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
436
|
-
}, server_interface_1.CancellationToken.None);
|
|
437
|
-
// Check the completion result
|
|
438
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITHOUT_REFERENCES);
|
|
439
|
-
});
|
|
440
|
-
it('should return all recommendations if settings are true', async () => {
|
|
441
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
442
|
-
await features.start(server);
|
|
443
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
444
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
445
|
-
position: { line: 0, character: 0 },
|
|
446
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
447
|
-
}, server_interface_1.CancellationToken.None);
|
|
448
|
-
// Check the completion result
|
|
449
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITH_REFERENCES);
|
|
450
|
-
});
|
|
451
|
-
it('should filter recommendations with references if no code references are allowed by settings', async () => {
|
|
452
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: false }));
|
|
453
|
-
await features.start(server);
|
|
454
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
455
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
456
|
-
position: { line: 0, character: 0 },
|
|
457
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
458
|
-
}, server_interface_1.CancellationToken.None);
|
|
459
|
-
// Check the completion result
|
|
460
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITHOUT_REFERENCES);
|
|
461
|
-
});
|
|
462
|
-
it('should filter recommendations with references if code references are disabled after startup', async () => {
|
|
463
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
464
|
-
await features.start(server);
|
|
465
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: false }));
|
|
466
|
-
const afterConfigChange = await features.openDocument(testUtils_1.SOME_FILE).doChangeConfiguration();
|
|
467
|
-
const result = await afterConfigChange.doInlineCompletionWithReferences({
|
|
468
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
469
|
-
position: { line: 0, character: 0 },
|
|
470
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
471
|
-
}, server_interface_1.CancellationToken.None);
|
|
472
|
-
// Check the completion result
|
|
473
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITHOUT_REFERENCES);
|
|
474
|
-
});
|
|
475
|
-
it('should filter recommendations with references if code references are enabled after startup', async () => {
|
|
476
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: false }));
|
|
477
|
-
await features.start(server);
|
|
478
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
479
|
-
const afterConfigChange = await features.openDocument(testUtils_1.SOME_FILE).doChangeConfiguration();
|
|
480
|
-
const result = await afterConfigChange.doInlineCompletionWithReferences({
|
|
481
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
482
|
-
position: { line: 0, character: 0 },
|
|
483
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
484
|
-
}, server_interface_1.CancellationToken.None);
|
|
485
|
-
// Check the completion result
|
|
486
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT_WITH_REFERENCES);
|
|
487
|
-
});
|
|
488
|
-
it('should not show references when the right context is equal to suggestion', async () => {
|
|
489
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
490
|
-
await features.start(server);
|
|
491
|
-
const EXPECTED_SUGGESTION = [{ itemId: 'cwspr-item-id', content: testUtils_1.HELLO_WORLD_IN_CSHARP }];
|
|
492
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
493
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
494
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
495
|
-
}));
|
|
496
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
497
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
498
|
-
position: { line: 0, character: 0 },
|
|
499
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
500
|
-
}, server_interface_1.CancellationToken.None);
|
|
501
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
502
|
-
});
|
|
503
|
-
it('should show references and update range when there is partial overlap on right context', async () => {
|
|
504
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
505
|
-
await features.start(server);
|
|
506
|
-
const cutOffLine = 2;
|
|
507
|
-
const lines = testUtils_1.HELLO_WORLD_IN_CSHARP.split('\n');
|
|
508
|
-
// The recommendation will be the contents of hello world starting from line 3 (static void Main)
|
|
509
|
-
const recommendation = lines.slice(cutOffLine).join('\n');
|
|
510
|
-
// We delete the static void Main line from Hello World but keep the rest in the file
|
|
511
|
-
const deletedLine = lines.splice(cutOffLine, 1)[0];
|
|
512
|
-
const finalFileContent = lines.join('\n');
|
|
513
|
-
const MY_FILE = server_interface_1.TextDocument.create('file:///rightContext.cs', 'csharp', 1, finalFileContent);
|
|
514
|
-
features.openDocument(MY_FILE);
|
|
515
|
-
const EXPECTED_REFERENCE_WITH_LONG_RANGE = {
|
|
516
|
-
...testUtils_1.EXPECTED_REFERENCE,
|
|
517
|
-
recommendationContentSpan: { start: 0, end: testUtils_1.HELLO_WORLD_IN_CSHARP.length },
|
|
518
|
-
};
|
|
519
|
-
const EXPECTED_SUGGESTION = [
|
|
520
|
-
{ itemId: 'cwspr-item-id', content: recommendation, references: [EXPECTED_REFERENCE_WITH_LONG_RANGE] },
|
|
521
|
-
];
|
|
522
|
-
const insertText = deletedLine.concat('\n ');
|
|
523
|
-
const EXPECTED_RESULT = {
|
|
524
|
-
sessionId: testUtils_1.EXPECTED_SESSION_ID,
|
|
525
|
-
items: [
|
|
526
|
-
{
|
|
527
|
-
itemId: EXPECTED_SUGGESTION[0].itemId,
|
|
528
|
-
insertText: insertText,
|
|
529
|
-
range: undefined,
|
|
530
|
-
references: [
|
|
531
|
-
{
|
|
532
|
-
licenseName: EXPECTED_REFERENCE_WITH_LONG_RANGE.licenseName,
|
|
533
|
-
referenceName: EXPECTED_REFERENCE_WITH_LONG_RANGE.repository,
|
|
534
|
-
referenceUrl: EXPECTED_REFERENCE_WITH_LONG_RANGE.url,
|
|
535
|
-
position: {
|
|
536
|
-
startCharacter: EXPECTED_REFERENCE_WITH_LONG_RANGE.recommendationContentSpan?.start,
|
|
537
|
-
endCharacter: insertText.length - 1,
|
|
538
|
-
},
|
|
539
|
-
},
|
|
540
|
-
],
|
|
541
|
-
},
|
|
542
|
-
],
|
|
543
|
-
};
|
|
544
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
545
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
546
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
547
|
-
}));
|
|
548
|
-
const result = await features.openDocument(MY_FILE).doInlineCompletionWithReferences({
|
|
549
|
-
textDocument: { uri: MY_FILE.uri },
|
|
550
|
-
position: { line: cutOffLine, character: 0 },
|
|
551
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
552
|
-
}, server_interface_1.CancellationToken.None);
|
|
553
|
-
assert.deepEqual(result, EXPECTED_RESULT);
|
|
554
|
-
});
|
|
555
|
-
it('should discard reference if it references trimmed content after right-context merge', async () => {
|
|
556
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: true }));
|
|
557
|
-
await features.start(server);
|
|
558
|
-
const cutOffLine = 2;
|
|
559
|
-
const lines = testUtils_1.HELLO_WORLD_IN_CSHARP.split('\n');
|
|
560
|
-
// The recommendation will be the contents of hello world starting from line 3 (static void Main)
|
|
561
|
-
const recommendation = lines.slice(cutOffLine).join('\n');
|
|
562
|
-
// We delete the static void Main line from Hello World but keep the rest in the file
|
|
563
|
-
const deletedLine = lines.splice(cutOffLine, 1)[0];
|
|
564
|
-
const finalFileContent = lines.join('\n');
|
|
565
|
-
const MY_FILE = server_interface_1.TextDocument.create('file:///rightContext.cs', 'csharp', 1, finalFileContent);
|
|
566
|
-
features.openDocument(MY_FILE);
|
|
567
|
-
const insertText = deletedLine.concat('\n ');
|
|
568
|
-
// reference range covers portion of string that will be removed
|
|
569
|
-
const EXPECTED_REFERENCE_WITH_OUTER_RANGE = {
|
|
570
|
-
...testUtils_1.EXPECTED_REFERENCE,
|
|
571
|
-
recommendationContentSpan: { start: insertText.length, end: recommendation.length },
|
|
572
|
-
};
|
|
573
|
-
const EXPECTED_SUGGESTION = [
|
|
574
|
-
{ itemId: 'cwspr-item-id', content: recommendation, references: [EXPECTED_REFERENCE_WITH_OUTER_RANGE] },
|
|
575
|
-
];
|
|
576
|
-
const EXPECTED_RESULT = {
|
|
577
|
-
sessionId: testUtils_1.EXPECTED_SESSION_ID,
|
|
578
|
-
items: [
|
|
579
|
-
{
|
|
580
|
-
itemId: EXPECTED_SUGGESTION[0].itemId,
|
|
581
|
-
insertText: insertText,
|
|
582
|
-
range: undefined,
|
|
583
|
-
references: undefined,
|
|
584
|
-
},
|
|
585
|
-
],
|
|
586
|
-
};
|
|
587
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
588
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
589
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
590
|
-
}));
|
|
591
|
-
const result = await features.openDocument(MY_FILE).doInlineCompletionWithReferences({
|
|
592
|
-
textDocument: { uri: MY_FILE.uri },
|
|
593
|
-
position: { line: cutOffLine, character: 0 },
|
|
594
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
595
|
-
}, server_interface_1.CancellationToken.None);
|
|
596
|
-
assert.deepEqual(result, EXPECTED_RESULT);
|
|
597
|
-
});
|
|
598
|
-
describe('With session management', () => {
|
|
599
|
-
it('should close session if code references are disabled and all suggestions had references', async () => {
|
|
600
|
-
const EXPECTED_SUGGESTION_WITH_REFERENCES = [
|
|
601
|
-
{
|
|
602
|
-
itemId: 'cwspr-item-id-1',
|
|
603
|
-
content: 'recommendation with reference',
|
|
604
|
-
references: [testUtils_1.EXPECTED_REFERENCE],
|
|
605
|
-
},
|
|
606
|
-
];
|
|
607
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
608
|
-
suggestions: EXPECTED_SUGGESTION_WITH_REFERENCES,
|
|
609
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
610
|
-
}));
|
|
611
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({ includeSuggestionsWithCodeReferences: false }));
|
|
612
|
-
await features.start(server);
|
|
613
|
-
const result = await features.openDocument(testUtils_1.SOME_FILE).doInlineCompletionWithReferences({
|
|
614
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
615
|
-
position: { line: 0, character: 0 },
|
|
616
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
617
|
-
}, server_interface_1.CancellationToken.None);
|
|
618
|
-
// Check the completion result
|
|
619
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
620
|
-
// There is no active session
|
|
621
|
-
assert.equal(sessionManager.getActiveSession(), undefined);
|
|
622
|
-
assert.equal(sessionManagerSpy.createSession.callCount, 1);
|
|
623
|
-
assert.equal(sessionManagerSpy.closeSession.callCount, 1);
|
|
624
|
-
});
|
|
625
|
-
});
|
|
626
|
-
});
|
|
627
|
-
describe('With auto-triggers', async () => {
|
|
628
|
-
const AUTO_TRIGGER_POSITION = { line: 2, character: 21 };
|
|
629
|
-
const LEFT_FILE_CONTEXT = testUtils_1.HELLO_WORLD_IN_CSHARP.substring(0, 40);
|
|
630
|
-
const RIGHT_FILE_CONTEXT = testUtils_1.HELLO_WORLD_IN_CSHARP.substring(40);
|
|
631
|
-
let features;
|
|
632
|
-
let server;
|
|
633
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
634
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
635
|
-
// for examples on how to mock just the SDK client
|
|
636
|
-
let service;
|
|
637
|
-
beforeEach(async () => {
|
|
638
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
639
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
640
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
641
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION,
|
|
642
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
643
|
-
}));
|
|
644
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
645
|
-
// Initialize the features, but don't start server yet
|
|
646
|
-
features = new testing_1.TestFeatures();
|
|
647
|
-
// Return no specific configuration for CodeWhisperer
|
|
648
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
649
|
-
// Start the server and open a document
|
|
650
|
-
await features.start(server);
|
|
651
|
-
features.openDocument(testUtils_1.SOME_FILE);
|
|
652
|
-
});
|
|
653
|
-
afterEach(() => {
|
|
654
|
-
features.dispose();
|
|
655
|
-
});
|
|
656
|
-
it('should return recommendations even on a below-threshold auto-trigger position when special characters are present', async () => {
|
|
657
|
-
const SOME_FILE = server_interface_1.TextDocument.create('file:///test.cs', 'csharp', 1, testUtils_1.SPECIAL_CHARACTER_HELLO_WORLD);
|
|
658
|
-
features.openDocument(SOME_FILE);
|
|
659
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
660
|
-
textDocument: { uri: SOME_FILE.uri },
|
|
661
|
-
position: { line: 0, character: 1 },
|
|
662
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
663
|
-
}, server_interface_1.CancellationToken.None);
|
|
664
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
665
|
-
const expectedGenerateSuggestionsRequest = {
|
|
666
|
-
fileContext: {
|
|
667
|
-
filename: SOME_FILE.uri,
|
|
668
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
669
|
-
leftFileContent: testUtils_1.SPECIAL_CHARACTER_HELLO_WORLD.substring(0, 1),
|
|
670
|
-
rightFileContent: testUtils_1.SPECIAL_CHARACTER_HELLO_WORLD.substring(1, testUtils_1.SPECIAL_CHARACTER_HELLO_WORLD.length),
|
|
671
|
-
},
|
|
672
|
-
maxResults: 1,
|
|
673
|
-
};
|
|
674
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
675
|
-
});
|
|
676
|
-
it('should return recommendations on an above-threshold auto-trigger position', async () => {
|
|
677
|
-
// Similar to test from above, this test case also depends on file contents not starting with a new line
|
|
678
|
-
const HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE = testUtils_1.HELLO_WORLD_IN_CSHARP.trimStart();
|
|
679
|
-
const SOME_FILE = server_interface_1.TextDocument.create('file:///test.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE);
|
|
680
|
-
features.openDocument(SOME_FILE);
|
|
681
|
-
const LEFT_FILE_CONTEXT = HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE.substring(0, 40);
|
|
682
|
-
const RIGHT_FILE_CONTEXT = HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE.substring(40);
|
|
683
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
684
|
-
textDocument: { uri: SOME_FILE.uri },
|
|
685
|
-
position: AUTO_TRIGGER_POSITION,
|
|
686
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
687
|
-
}, server_interface_1.CancellationToken.None);
|
|
688
|
-
// Check the completion result
|
|
689
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
690
|
-
const expectedGenerateSuggestionsRequest = {
|
|
691
|
-
fileContext: {
|
|
692
|
-
filename: SOME_FILE.uri,
|
|
693
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
694
|
-
leftFileContent: LEFT_FILE_CONTEXT,
|
|
695
|
-
rightFileContent: RIGHT_FILE_CONTEXT,
|
|
696
|
-
},
|
|
697
|
-
maxResults: 1,
|
|
698
|
-
};
|
|
699
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(service.generateSuggestions, expectedGenerateSuggestionsRequest);
|
|
700
|
-
});
|
|
701
|
-
it('shoud not return recommendations on a below-threshold auto-trigger position', async () => {
|
|
702
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
703
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
704
|
-
position: { line: 0, character: 0 },
|
|
705
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
706
|
-
}, server_interface_1.CancellationToken.None);
|
|
707
|
-
// Check the completion result
|
|
708
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
709
|
-
});
|
|
710
|
-
});
|
|
711
|
-
describe('Log Inline Completion Session Results', () => {
|
|
712
|
-
const requestContext = {
|
|
713
|
-
maxResults: 5,
|
|
714
|
-
fileContext: {
|
|
715
|
-
filename: 'SomeFile',
|
|
716
|
-
programmingLanguage: { languageName: 'csharp' },
|
|
717
|
-
leftFileContent: 'LeftFileContent',
|
|
718
|
-
rightFileContent: 'RightFileContent',
|
|
719
|
-
},
|
|
720
|
-
};
|
|
721
|
-
const sessionData = {
|
|
722
|
-
document: server_interface_1.TextDocument.create('file:///rightContext.cs', 'csharp', 1, testUtils_1.HELLO_WORLD_IN_CSHARP),
|
|
723
|
-
startPosition: { line: 0, character: 0 },
|
|
724
|
-
triggerType: 'OnDemand',
|
|
725
|
-
language: 'csharp',
|
|
726
|
-
requestContext: requestContext,
|
|
727
|
-
};
|
|
728
|
-
const sessionResultData = {
|
|
729
|
-
sessionId: 'some-random-session-uuid-0',
|
|
730
|
-
completionSessionResult: {
|
|
731
|
-
'cwspr-item-id': {
|
|
732
|
-
seen: true,
|
|
733
|
-
accepted: false,
|
|
734
|
-
discarded: false,
|
|
735
|
-
},
|
|
736
|
-
},
|
|
737
|
-
firstCompletionDisplayLatency: 50,
|
|
738
|
-
totalSessionDisplayTime: 1000,
|
|
739
|
-
};
|
|
740
|
-
let features;
|
|
741
|
-
let server;
|
|
742
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
743
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
744
|
-
// for examples on how to mock just the SDK client
|
|
745
|
-
let service;
|
|
746
|
-
beforeEach(async () => {
|
|
747
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
748
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
749
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
750
|
-
// Initialize the features, but don't start server yet
|
|
751
|
-
features = new testing_1.TestFeatures();
|
|
752
|
-
// Start the server and open a document
|
|
753
|
-
await features.start(server);
|
|
754
|
-
features.openDocument(testUtils_1.SOME_FILE);
|
|
755
|
-
});
|
|
756
|
-
afterEach(() => {
|
|
757
|
-
features.dispose();
|
|
758
|
-
});
|
|
759
|
-
it('should deactivate current session when session result for current session is sent', async () => {
|
|
760
|
-
const manager = sessionManager_1.SessionManager.getInstance();
|
|
761
|
-
const session = manager.createSession(sessionData);
|
|
762
|
-
manager.activateSession(session);
|
|
763
|
-
assert.equal(session.state, 'ACTIVE');
|
|
764
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
765
|
-
assert.equal(session.state, 'CLOSED');
|
|
766
|
-
});
|
|
767
|
-
it('should not close current session when session result for different session is sent', async () => {
|
|
768
|
-
const manager = sessionManager_1.SessionManager.getInstance();
|
|
769
|
-
const session = manager.createSession(sessionData);
|
|
770
|
-
manager.activateSession(session);
|
|
771
|
-
const session2 = manager.createSession(sessionData);
|
|
772
|
-
manager.activateSession(session2);
|
|
773
|
-
assert.equal(session.state, 'CLOSED');
|
|
774
|
-
assert.equal(session2.state, 'ACTIVE');
|
|
775
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
776
|
-
assert.equal(session2.state, 'ACTIVE');
|
|
777
|
-
});
|
|
778
|
-
it('should store session result data', async () => {
|
|
779
|
-
const manager = sessionManager_1.SessionManager.getInstance();
|
|
780
|
-
const session = manager.createSession(sessionData);
|
|
781
|
-
manager.activateSession(session);
|
|
782
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
783
|
-
assert.equal(session.completionSessionResult, sessionResultData.completionSessionResult);
|
|
784
|
-
assert.equal(session.firstCompletionDisplayLatency, sessionResultData.firstCompletionDisplayLatency);
|
|
785
|
-
assert.equal(session.totalSessionDisplayTime, sessionResultData.totalSessionDisplayTime);
|
|
786
|
-
});
|
|
787
|
-
it('should store session result data with only completion state provided', async () => {
|
|
788
|
-
const sessionResultData = {
|
|
789
|
-
sessionId: 'some-random-session-uuid-0',
|
|
790
|
-
completionSessionResult: {
|
|
791
|
-
'cwspr-item-id': {
|
|
792
|
-
seen: true,
|
|
793
|
-
accepted: false,
|
|
794
|
-
discarded: false,
|
|
795
|
-
},
|
|
796
|
-
},
|
|
797
|
-
};
|
|
798
|
-
const manager = sessionManager_1.SessionManager.getInstance();
|
|
799
|
-
const session = manager.createSession(sessionData);
|
|
800
|
-
manager.activateSession(session);
|
|
801
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
802
|
-
assert.equal(session.completionSessionResult, sessionResultData.completionSessionResult);
|
|
803
|
-
assert.equal(session.firstCompletionDisplayLatency, undefined);
|
|
804
|
-
assert.equal(session.totalSessionDisplayTime, undefined);
|
|
805
|
-
});
|
|
806
|
-
});
|
|
807
|
-
describe('Telemetry', () => {
|
|
808
|
-
const EXPECTED_RESPONSE_CONTEXT = {
|
|
809
|
-
requestId: 'cwspr-request-id',
|
|
810
|
-
codewhispererSessionId: 'cwspr-session-id',
|
|
811
|
-
};
|
|
812
|
-
const sessionResultData = {
|
|
813
|
-
sessionId: 'some-random-session-uuid-0',
|
|
814
|
-
completionSessionResult: {
|
|
815
|
-
'cwspr-item-id': {
|
|
816
|
-
seen: true,
|
|
817
|
-
accepted: false,
|
|
818
|
-
discarded: false,
|
|
819
|
-
},
|
|
820
|
-
},
|
|
821
|
-
firstCompletionDisplayLatency: 50,
|
|
822
|
-
totalSessionDisplayTime: 1000,
|
|
823
|
-
};
|
|
824
|
-
let features;
|
|
825
|
-
let server;
|
|
826
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
827
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
828
|
-
// for examples on how to mock just the SDK client
|
|
829
|
-
let service;
|
|
830
|
-
let clock;
|
|
831
|
-
beforeEach(async () => {
|
|
832
|
-
clock = ts_sinon_1.default.useFakeTimers({
|
|
833
|
-
now: 1483228800000,
|
|
834
|
-
});
|
|
835
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
836
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
837
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
838
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION,
|
|
839
|
-
responseContext: EXPECTED_RESPONSE_CONTEXT,
|
|
840
|
-
}));
|
|
841
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
842
|
-
// Initialize the features, but don't start server yet
|
|
843
|
-
features = new testing_1.TestFeatures();
|
|
844
|
-
// Return no specific configuration for CodeWhisperer
|
|
845
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
846
|
-
// Start the server and open a document
|
|
847
|
-
await features.start(server);
|
|
848
|
-
features.openDocument(testUtils_1.SOME_FILE);
|
|
849
|
-
});
|
|
850
|
-
afterEach(async () => {
|
|
851
|
-
clock.restore();
|
|
852
|
-
features.dispose();
|
|
853
|
-
});
|
|
854
|
-
it('should emit Success ServiceInvocation telemetry on successful response', async () => {
|
|
855
|
-
await features.doInlineCompletionWithReferences({
|
|
856
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
857
|
-
position: { line: 0, character: 0 },
|
|
858
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
859
|
-
}, server_interface_1.CancellationToken.None);
|
|
860
|
-
const expectedServiceInvocationMetric = {
|
|
861
|
-
name: 'codewhisperer_serviceInvocation',
|
|
862
|
-
result: 'Succeeded',
|
|
863
|
-
data: {
|
|
864
|
-
codewhispererRequestId: 'cwspr-request-id',
|
|
865
|
-
codewhispererSessionId: 'cwspr-session-id',
|
|
866
|
-
codewhispererLastSuggestionIndex: 0,
|
|
867
|
-
codewhispererCompletionType: 'Line',
|
|
868
|
-
codewhispererTriggerType: 'OnDemand',
|
|
869
|
-
codewhispererAutomatedTriggerType: undefined,
|
|
870
|
-
duration: 0,
|
|
871
|
-
codewhispererLineNumber: 0,
|
|
872
|
-
codewhispererCursorOffset: 0,
|
|
873
|
-
codewhispererLanguage: 'csharp',
|
|
874
|
-
credentialStartUrl: undefined,
|
|
875
|
-
codewhispererSupplementalContextTimeout: undefined,
|
|
876
|
-
codewhispererSupplementalContextIsUtg: undefined,
|
|
877
|
-
codewhispererSupplementalContextLatency: undefined,
|
|
878
|
-
codewhispererSupplementalContextLength: undefined,
|
|
879
|
-
codewhispererCustomizationArn: undefined,
|
|
880
|
-
},
|
|
881
|
-
};
|
|
882
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric);
|
|
883
|
-
});
|
|
884
|
-
it('should emit Success ServiceInvocation telemetry on successful response with completionType block when first suggestion has new lines', async () => {
|
|
885
|
-
const recommendation = ['multi', 'line', ' suggestion'].join('\n');
|
|
886
|
-
const EXPECTED_SUGGESTIONS = [
|
|
887
|
-
{ itemId: 'cwspr-item-id-1', content: recommendation },
|
|
888
|
-
{ itemId: 'cwspr-item-id-2', content: recommendation },
|
|
889
|
-
{ itemId: 'cwspr-item-id-3', content: recommendation },
|
|
890
|
-
];
|
|
891
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
892
|
-
suggestions: EXPECTED_SUGGESTIONS,
|
|
893
|
-
responseContext: EXPECTED_RESPONSE_CONTEXT,
|
|
894
|
-
}));
|
|
895
|
-
await features.doInlineCompletionWithReferences({
|
|
896
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
897
|
-
position: { line: 0, character: 0 },
|
|
898
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
899
|
-
}, server_interface_1.CancellationToken.None);
|
|
900
|
-
const expectedServiceInvocationMetric = {
|
|
901
|
-
name: 'codewhisperer_serviceInvocation',
|
|
902
|
-
result: 'Succeeded',
|
|
903
|
-
data: {
|
|
904
|
-
codewhispererRequestId: 'cwspr-request-id',
|
|
905
|
-
codewhispererSessionId: 'cwspr-session-id',
|
|
906
|
-
codewhispererLastSuggestionIndex: 2,
|
|
907
|
-
codewhispererCompletionType: 'Block',
|
|
908
|
-
codewhispererTriggerType: 'OnDemand',
|
|
909
|
-
codewhispererAutomatedTriggerType: undefined,
|
|
910
|
-
duration: 0,
|
|
911
|
-
codewhispererLineNumber: 0,
|
|
912
|
-
codewhispererCursorOffset: 0,
|
|
913
|
-
codewhispererLanguage: 'csharp',
|
|
914
|
-
credentialStartUrl: undefined,
|
|
915
|
-
codewhispererSupplementalContextTimeout: undefined,
|
|
916
|
-
codewhispererSupplementalContextIsUtg: undefined,
|
|
917
|
-
codewhispererSupplementalContextLatency: undefined,
|
|
918
|
-
codewhispererSupplementalContextLength: undefined,
|
|
919
|
-
codewhispererCustomizationArn: undefined,
|
|
920
|
-
},
|
|
921
|
-
};
|
|
922
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric);
|
|
923
|
-
});
|
|
924
|
-
it('should emit Failure ServiceInvocation telemetry on failed response', async () => {
|
|
925
|
-
const error = new Error('UNEXPECTED EXCEPTION');
|
|
926
|
-
error.name = 'TestError';
|
|
927
|
-
service.generateSuggestions.returns(Promise.reject(error));
|
|
928
|
-
await features.doInlineCompletionWithReferences({
|
|
929
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
930
|
-
position: { line: 0, character: 0 },
|
|
931
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
932
|
-
}, server_interface_1.CancellationToken.None);
|
|
933
|
-
const expectedServiceInvocationMetric = {
|
|
934
|
-
name: 'codewhisperer_serviceInvocation',
|
|
935
|
-
result: 'Failed',
|
|
936
|
-
data: {
|
|
937
|
-
codewhispererRequestId: undefined,
|
|
938
|
-
codewhispererSessionId: undefined,
|
|
939
|
-
codewhispererLastSuggestionIndex: -1,
|
|
940
|
-
codewhispererTriggerType: 'OnDemand',
|
|
941
|
-
codewhispererAutomatedTriggerType: undefined,
|
|
942
|
-
reason: 'CodeWhisperer Invocation Exception: TestError',
|
|
943
|
-
duration: 0,
|
|
944
|
-
codewhispererLineNumber: 0,
|
|
945
|
-
codewhispererCursorOffset: 0,
|
|
946
|
-
codewhispererLanguage: 'csharp',
|
|
947
|
-
credentialStartUrl: undefined,
|
|
948
|
-
codewhispererSupplementalContextTimeout: undefined,
|
|
949
|
-
codewhispererSupplementalContextIsUtg: undefined,
|
|
950
|
-
codewhispererSupplementalContextLatency: undefined,
|
|
951
|
-
codewhispererSupplementalContextLength: undefined,
|
|
952
|
-
codewhispererCustomizationArn: undefined,
|
|
953
|
-
},
|
|
954
|
-
errorData: {
|
|
955
|
-
reason: 'TestError',
|
|
956
|
-
errorCode: undefined,
|
|
957
|
-
httpStatusCode: undefined,
|
|
958
|
-
},
|
|
959
|
-
};
|
|
960
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric);
|
|
961
|
-
});
|
|
962
|
-
it('should emit error with UnknownError reason if error name is not present', async () => {
|
|
963
|
-
service.generateSuggestions.returns(Promise.reject('UNEXPECTED EXCEPTION'));
|
|
964
|
-
await features.doInlineCompletionWithReferences({
|
|
965
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
966
|
-
position: { line: 0, character: 0 },
|
|
967
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
968
|
-
}, server_interface_1.CancellationToken.None);
|
|
969
|
-
const expectedServiceInvocationMetric = {
|
|
970
|
-
name: 'codewhisperer_serviceInvocation',
|
|
971
|
-
result: 'Failed',
|
|
972
|
-
data: {
|
|
973
|
-
codewhispererRequestId: undefined,
|
|
974
|
-
codewhispererSessionId: undefined,
|
|
975
|
-
codewhispererLastSuggestionIndex: -1,
|
|
976
|
-
codewhispererTriggerType: 'OnDemand',
|
|
977
|
-
codewhispererAutomatedTriggerType: undefined,
|
|
978
|
-
reason: 'CodeWhisperer Invocation Exception: UnknownError',
|
|
979
|
-
duration: 0,
|
|
980
|
-
codewhispererLineNumber: 0,
|
|
981
|
-
codewhispererCursorOffset: 0,
|
|
982
|
-
codewhispererLanguage: 'csharp',
|
|
983
|
-
credentialStartUrl: undefined,
|
|
984
|
-
codewhispererSupplementalContextTimeout: undefined,
|
|
985
|
-
codewhispererSupplementalContextIsUtg: undefined,
|
|
986
|
-
codewhispererSupplementalContextLatency: undefined,
|
|
987
|
-
codewhispererSupplementalContextLength: undefined,
|
|
988
|
-
codewhispererCustomizationArn: undefined,
|
|
989
|
-
},
|
|
990
|
-
errorData: {
|
|
991
|
-
reason: 'UnknownError',
|
|
992
|
-
errorCode: undefined,
|
|
993
|
-
httpStatusCode: undefined,
|
|
994
|
-
},
|
|
995
|
-
};
|
|
996
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric);
|
|
997
|
-
});
|
|
998
|
-
it('should emit Failure ServiceInvocation telemetry with request metadata on failed response with AWSError error type', async () => {
|
|
999
|
-
const error = new Error('Fake Error');
|
|
1000
|
-
error.name = 'TestAWSError';
|
|
1001
|
-
error.code = 'TestErrorStatusCode';
|
|
1002
|
-
error.statusCode = 500;
|
|
1003
|
-
error.time = new Date();
|
|
1004
|
-
error.requestId = 'failed-request-id';
|
|
1005
|
-
service.generateSuggestions.callsFake(_request => {
|
|
1006
|
-
clock.tick(1000);
|
|
1007
|
-
return Promise.reject(error);
|
|
1008
|
-
});
|
|
1009
|
-
const getCompletionsPromise = features.doInlineCompletionWithReferences({
|
|
1010
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1011
|
-
position: { line: 0, character: 0 },
|
|
1012
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1013
|
-
}, server_interface_1.CancellationToken.None);
|
|
1014
|
-
await getCompletionsPromise;
|
|
1015
|
-
const expectedServiceInvocationMetric = {
|
|
1016
|
-
name: 'codewhisperer_serviceInvocation',
|
|
1017
|
-
result: 'Failed',
|
|
1018
|
-
data: {
|
|
1019
|
-
codewhispererRequestId: 'failed-request-id',
|
|
1020
|
-
codewhispererSessionId: undefined,
|
|
1021
|
-
codewhispererLastSuggestionIndex: -1,
|
|
1022
|
-
codewhispererTriggerType: 'OnDemand',
|
|
1023
|
-
codewhispererAutomatedTriggerType: undefined,
|
|
1024
|
-
reason: 'CodeWhisperer Invocation Exception: TestAWSError',
|
|
1025
|
-
duration: 1000,
|
|
1026
|
-
codewhispererLineNumber: 0,
|
|
1027
|
-
codewhispererCursorOffset: 0,
|
|
1028
|
-
codewhispererLanguage: 'csharp',
|
|
1029
|
-
credentialStartUrl: undefined,
|
|
1030
|
-
codewhispererSupplementalContextTimeout: undefined,
|
|
1031
|
-
codewhispererSupplementalContextIsUtg: undefined,
|
|
1032
|
-
codewhispererSupplementalContextLatency: undefined,
|
|
1033
|
-
codewhispererSupplementalContextLength: undefined,
|
|
1034
|
-
codewhispererCustomizationArn: undefined,
|
|
1035
|
-
},
|
|
1036
|
-
errorData: {
|
|
1037
|
-
reason: 'TestAWSError',
|
|
1038
|
-
errorCode: 'TestErrorStatusCode',
|
|
1039
|
-
httpStatusCode: 500,
|
|
1040
|
-
},
|
|
1041
|
-
};
|
|
1042
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric);
|
|
1043
|
-
});
|
|
1044
|
-
it('should emit Perceived Latency metric when session result is received', async () => {
|
|
1045
|
-
await features.doInlineCompletionWithReferences({
|
|
1046
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1047
|
-
position: { line: 0, character: 0 },
|
|
1048
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1049
|
-
}, server_interface_1.CancellationToken.None);
|
|
1050
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
1051
|
-
const expectedPerceivedLatencyMetric = {
|
|
1052
|
-
name: 'codewhisperer_perceivedLatency',
|
|
1053
|
-
data: {
|
|
1054
|
-
codewhispererRequestId: EXPECTED_RESPONSE_CONTEXT.requestId,
|
|
1055
|
-
codewhispererSessionId: EXPECTED_RESPONSE_CONTEXT.codewhispererSessionId,
|
|
1056
|
-
codewhispererCompletionType: 'Line',
|
|
1057
|
-
codewhispererTriggerType: 'OnDemand',
|
|
1058
|
-
duration: 50,
|
|
1059
|
-
codewhispererLanguage: 'csharp',
|
|
1060
|
-
credentialStartUrl: undefined,
|
|
1061
|
-
},
|
|
1062
|
-
};
|
|
1063
|
-
ts_sinon_1.default.assert.calledWithExactly(features.telemetry.emitMetric, expectedPerceivedLatencyMetric);
|
|
1064
|
-
});
|
|
1065
|
-
it('should not emit Perceived Latency metric when firstCompletionDisplayLatency is absent', async () => {
|
|
1066
|
-
const sessionResultDataWithoutLatency = {
|
|
1067
|
-
...sessionResultData,
|
|
1068
|
-
firstCompletionDisplayLatency: undefined,
|
|
1069
|
-
};
|
|
1070
|
-
await features.doInlineCompletionWithReferences({
|
|
1071
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1072
|
-
position: { line: 0, character: 0 },
|
|
1073
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1074
|
-
}, server_interface_1.CancellationToken.None);
|
|
1075
|
-
await features.doLogInlineCompletionSessionResults(sessionResultDataWithoutLatency);
|
|
1076
|
-
ts_sinon_1.default.assert.neverCalledWith(features.telemetry.emitMetric, ts_sinon_1.default.match.has('name', 'codewhisperer_perceivedLatency'));
|
|
1077
|
-
});
|
|
1078
|
-
describe('Connection metadata credentialStartUrl field', () => {
|
|
1079
|
-
it('should attach credentialStartUrl field if available in credentialsProvider', async () => {
|
|
1080
|
-
features.credentialsProvider.getConnectionMetadata.returns({
|
|
1081
|
-
sso: {
|
|
1082
|
-
startUrl: 'http://teststarturl',
|
|
1083
|
-
},
|
|
1084
|
-
});
|
|
1085
|
-
await features.doInlineCompletionWithReferences({
|
|
1086
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1087
|
-
position: { line: 0, character: 0 },
|
|
1088
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1089
|
-
}, server_interface_1.CancellationToken.None);
|
|
1090
|
-
assert.equal(features.telemetry.emitMetric.getCall(0).args[0].data.credentialStartUrl, 'http://teststarturl');
|
|
1091
|
-
});
|
|
1092
|
-
it('should send empty credentialStartUrl field if not available in credentialsProvider', async () => {
|
|
1093
|
-
features.credentialsProvider.getConnectionMetadata.returns(undefined);
|
|
1094
|
-
await features.doInlineCompletionWithReferences({
|
|
1095
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1096
|
-
position: { line: 0, character: 0 },
|
|
1097
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1098
|
-
}, server_interface_1.CancellationToken.None);
|
|
1099
|
-
assert.equal(features.telemetry.emitMetric.getCall(0).args[0].data.credentialStartUrl, undefined);
|
|
1100
|
-
});
|
|
1101
|
-
});
|
|
1102
|
-
describe('Emit UserModification event with CodeDiffTracker', () => {
|
|
1103
|
-
let codeDiffTrackerSpy;
|
|
1104
|
-
let telemetryServiceSpy;
|
|
1105
|
-
afterEach(() => {
|
|
1106
|
-
ts_sinon_1.default.restore();
|
|
1107
|
-
});
|
|
1108
|
-
it('should enqueue a code diff entry when session results are returned with accepted completion', async () => {
|
|
1109
|
-
const sessionResultData = {
|
|
1110
|
-
sessionId: 'some-random-session-uuid-0',
|
|
1111
|
-
completionSessionResult: {
|
|
1112
|
-
'cwspr-item-id': {
|
|
1113
|
-
seen: true,
|
|
1114
|
-
accepted: true,
|
|
1115
|
-
discarded: false,
|
|
1116
|
-
},
|
|
1117
|
-
},
|
|
1118
|
-
};
|
|
1119
|
-
codeDiffTrackerSpy = ts_sinon_1.default.spy(codeDiffTracker_1.CodeDiffTracker.prototype, 'enqueue');
|
|
1120
|
-
await features.doInlineCompletionWithReferences({
|
|
1121
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1122
|
-
position: { line: 0, character: 0 },
|
|
1123
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1124
|
-
}, server_interface_1.CancellationToken.None);
|
|
1125
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
1126
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(codeDiffTrackerSpy, {
|
|
1127
|
-
sessionId: 'cwspr-session-id',
|
|
1128
|
-
requestId: 'cwspr-request-id',
|
|
1129
|
-
fileUrl: 'file:///test.cs',
|
|
1130
|
-
languageId: 'csharp',
|
|
1131
|
-
time: 1483228800000,
|
|
1132
|
-
originalString: 'recommendation',
|
|
1133
|
-
startPosition: { line: 0, character: 0 },
|
|
1134
|
-
endPosition: { line: 0, character: 14 },
|
|
1135
|
-
customizationArn: undefined,
|
|
1136
|
-
});
|
|
1137
|
-
});
|
|
1138
|
-
it('should emit telemetryService.emitUserModificationEvent on schedule by CodeDiffTracker', async () => {
|
|
1139
|
-
const startTime = new Date();
|
|
1140
|
-
const sessionResultData = {
|
|
1141
|
-
sessionId: 'some-random-session-uuid-0',
|
|
1142
|
-
completionSessionResult: {
|
|
1143
|
-
'cwspr-item-id': {
|
|
1144
|
-
seen: true,
|
|
1145
|
-
accepted: true,
|
|
1146
|
-
discarded: false,
|
|
1147
|
-
},
|
|
1148
|
-
},
|
|
1149
|
-
};
|
|
1150
|
-
telemetryServiceSpy = ts_sinon_1.default.spy(telemetryService_1.TelemetryService.prototype, 'emitUserModificationEvent');
|
|
1151
|
-
await features.doInlineCompletionWithReferences({
|
|
1152
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1153
|
-
position: { line: 0, character: 0 },
|
|
1154
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1155
|
-
}, server_interface_1.CancellationToken.None);
|
|
1156
|
-
await features.doLogInlineCompletionSessionResults(sessionResultData);
|
|
1157
|
-
await clock.tickAsync(5 * 60 * 1000 + 30);
|
|
1158
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(telemetryServiceSpy, {
|
|
1159
|
-
sessionId: 'cwspr-session-id',
|
|
1160
|
-
requestId: 'cwspr-request-id',
|
|
1161
|
-
languageId: 'csharp',
|
|
1162
|
-
customizationArn: undefined,
|
|
1163
|
-
timestamp: new Date(startTime.getTime() + 5 * 60 * 1000),
|
|
1164
|
-
acceptedCharacterCount: 14,
|
|
1165
|
-
modificationPercentage: 0.9285714285714286,
|
|
1166
|
-
unmodifiedAcceptedCharacterCount: 1,
|
|
1167
|
-
});
|
|
1168
|
-
});
|
|
1169
|
-
});
|
|
1170
|
-
});
|
|
1171
|
-
describe('Recommendations session management', () => {
|
|
1172
|
-
const AUTO_TRIGGER_POSITION = { line: 2, character: 21 };
|
|
1173
|
-
let features;
|
|
1174
|
-
let server;
|
|
1175
|
-
// TODO move more of the service code out of the stub and into the testable realm
|
|
1176
|
-
// See: https://aws.amazon.com/blogs/developer/mocking-modular-aws-sdk-for-javascript-v3-in-unit-tests/
|
|
1177
|
-
// for examples on how to mock just the SDK client
|
|
1178
|
-
let service;
|
|
1179
|
-
let clock;
|
|
1180
|
-
beforeEach(async () => {
|
|
1181
|
-
clock = ts_sinon_1.default.useFakeTimers({
|
|
1182
|
-
now: 1483228800000,
|
|
1183
|
-
});
|
|
1184
|
-
// Set up the server with a mock service, returning predefined recommendations
|
|
1185
|
-
service = (0, ts_sinon_1.stubInterface)();
|
|
1186
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
1187
|
-
suggestions: testUtils_1.EXPECTED_SUGGESTION,
|
|
1188
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
1189
|
-
}));
|
|
1190
|
-
server = (0, codeWhispererServer_1.CodewhispererServerFactory)(_auth => service);
|
|
1191
|
-
// Initialize the features, but don't start server yet
|
|
1192
|
-
features = new testing_1.TestFeatures();
|
|
1193
|
-
// Return no specific configuration for CodeWhisperer
|
|
1194
|
-
features.lsp.workspace.getConfiguration.returns(Promise.resolve({}));
|
|
1195
|
-
// Start the server and open a document
|
|
1196
|
-
await features.start(server);
|
|
1197
|
-
features.openDocument(testUtils_1.SOME_FILE).openDocument(testUtils_1.SOME_FILE_WITH_ALT_CASED_LANGUAGE_ID);
|
|
1198
|
-
});
|
|
1199
|
-
afterEach(() => {
|
|
1200
|
-
clock.restore();
|
|
1201
|
-
features.dispose();
|
|
1202
|
-
});
|
|
1203
|
-
it('should cache new session on new request when no session exists', async () => {
|
|
1204
|
-
let activeSession = sessionManager.getCurrentSession();
|
|
1205
|
-
assert.equal(activeSession, undefined);
|
|
1206
|
-
await features.doInlineCompletionWithReferences({
|
|
1207
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1208
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1209
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1210
|
-
}, server_interface_1.CancellationToken.None);
|
|
1211
|
-
// Get session after call is done
|
|
1212
|
-
activeSession = sessionManager.getCurrentSession();
|
|
1213
|
-
const expectedSessionData = {
|
|
1214
|
-
id: SESSION_IDS_LOG[0],
|
|
1215
|
-
state: 'ACTIVE',
|
|
1216
|
-
suggestions: [{ itemId: 'cwspr-item-id', content: 'recommendation', insertText: 'recommendation' }],
|
|
1217
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
1218
|
-
codewhispererSessionId: testUtils_1.EXPECTED_RESPONSE_CONTEXT.codewhispererSessionId,
|
|
1219
|
-
timeToFirstRecommendation: 0,
|
|
1220
|
-
};
|
|
1221
|
-
assert(activeSession);
|
|
1222
|
-
ts_sinon_1.default.assert.match({
|
|
1223
|
-
id: activeSession.id,
|
|
1224
|
-
state: activeSession.state,
|
|
1225
|
-
suggestions: activeSession.suggestions,
|
|
1226
|
-
responseContext: activeSession.responseContext,
|
|
1227
|
-
codewhispererSessionId: activeSession.codewhispererSessionId,
|
|
1228
|
-
timeToFirstRecommendation: activeSession.timeToFirstRecommendation,
|
|
1229
|
-
}, expectedSessionData);
|
|
1230
|
-
});
|
|
1231
|
-
it('should discard inflight session on new request when cached session is in REQUESTING state on subsequent requests', async () => {
|
|
1232
|
-
const getCompletionsResponses = await Promise.all([
|
|
1233
|
-
features.doInlineCompletionWithReferences({
|
|
1234
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1235
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1236
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1237
|
-
}, server_interface_1.CancellationToken.None),
|
|
1238
|
-
features.doInlineCompletionWithReferences({
|
|
1239
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1240
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1241
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1242
|
-
}, server_interface_1.CancellationToken.None),
|
|
1243
|
-
features.doInlineCompletionWithReferences({
|
|
1244
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1245
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1246
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1247
|
-
}, server_interface_1.CancellationToken.None),
|
|
1248
|
-
]);
|
|
1249
|
-
// 3 requests were processed by server, but only first should return results
|
|
1250
|
-
const EXPECTED_COMPLETION_RESPONSES = [
|
|
1251
|
-
{ sessionId: '', items: [] },
|
|
1252
|
-
{ sessionId: '', items: [] },
|
|
1253
|
-
{ sessionId: SESSION_IDS_LOG[2], items: testUtils_1.EXPECTED_RESULT.items }, // Last session wins
|
|
1254
|
-
];
|
|
1255
|
-
// Only last request must return completion items
|
|
1256
|
-
assert.deepEqual(getCompletionsResponses, EXPECTED_COMPLETION_RESPONSES);
|
|
1257
|
-
assert.equal(sessionManagerSpy.createSession.callCount, 3);
|
|
1258
|
-
// Get session after call is done
|
|
1259
|
-
const activeSession = sessionManager.getCurrentSession();
|
|
1260
|
-
// 3 sessions were created
|
|
1261
|
-
assert.equal(SESSION_IDS_LOG.length, 3);
|
|
1262
|
-
// Last session is ACTIVE stored in manager correctly
|
|
1263
|
-
const expectedSessionData = {
|
|
1264
|
-
id: SESSION_IDS_LOG[2],
|
|
1265
|
-
state: 'ACTIVE',
|
|
1266
|
-
suggestions: [{ itemId: 'cwspr-item-id', content: 'recommendation', insertText: 'recommendation' }],
|
|
1267
|
-
};
|
|
1268
|
-
assert(activeSession);
|
|
1269
|
-
ts_sinon_1.default.assert.match({
|
|
1270
|
-
id: activeSession.id,
|
|
1271
|
-
state: activeSession.state,
|
|
1272
|
-
suggestions: activeSession.suggestions,
|
|
1273
|
-
}, expectedSessionData);
|
|
1274
|
-
});
|
|
1275
|
-
it('should record all sessions that were created in session log', async () => {
|
|
1276
|
-
// Start 3 session, 2 will be cancelled inflight
|
|
1277
|
-
await Promise.all([
|
|
1278
|
-
features.doInlineCompletionWithReferences({
|
|
1279
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1280
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1281
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1282
|
-
}, server_interface_1.CancellationToken.None),
|
|
1283
|
-
features.doInlineCompletionWithReferences({
|
|
1284
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1285
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1286
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1287
|
-
}, server_interface_1.CancellationToken.None),
|
|
1288
|
-
features.doInlineCompletionWithReferences({
|
|
1289
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1290
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1291
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1292
|
-
}, server_interface_1.CancellationToken.None),
|
|
1293
|
-
]);
|
|
1294
|
-
// Get session after call is done
|
|
1295
|
-
const firstActiveSession = sessionManager.getCurrentSession();
|
|
1296
|
-
// Do another request, which will close last ACTIVE session
|
|
1297
|
-
await features.doInlineCompletionWithReferences({
|
|
1298
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1299
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1300
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1301
|
-
}, server_interface_1.CancellationToken.None);
|
|
1302
|
-
assert.equal(sessionManagerSpy.createSession.callCount, 4);
|
|
1303
|
-
assert.equal(sessionManager.getSessionsLog().length, 4);
|
|
1304
|
-
const latestSession = sessionManager.getCurrentSession();
|
|
1305
|
-
assert.equal(latestSession, sessionManager.getActiveSession());
|
|
1306
|
-
assert.equal(latestSession, sessionManager.getCurrentSession());
|
|
1307
|
-
// All sessions
|
|
1308
|
-
assert.equal(firstActiveSession?.id, 'some-random-session-uuid-2');
|
|
1309
|
-
});
|
|
1310
|
-
it('should close new session on new request when service returns empty list', async () => {
|
|
1311
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
1312
|
-
suggestions: [],
|
|
1313
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
1314
|
-
}));
|
|
1315
|
-
const activeSession = sessionManager.getCurrentSession();
|
|
1316
|
-
assert.equal(activeSession, undefined);
|
|
1317
|
-
await features.doInlineCompletionWithReferences({
|
|
1318
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1319
|
-
position: AUTO_TRIGGER_POSITION,
|
|
1320
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Automatic },
|
|
1321
|
-
}, server_interface_1.CancellationToken.None);
|
|
1322
|
-
// Get session after call is done
|
|
1323
|
-
const currentSession = sessionManager.getCurrentSession();
|
|
1324
|
-
assert(currentSession);
|
|
1325
|
-
assert.equal(currentSession?.state, 'CLOSED');
|
|
1326
|
-
ts_sinon_1.default.assert.calledOnceWithExactly(sessionManagerSpy.closeSession, currentSession);
|
|
1327
|
-
});
|
|
1328
|
-
it('Manual completion invocation should close previous session', async () => {
|
|
1329
|
-
const TRIGGER_KIND = server_interface_1.InlineCompletionTriggerKind.Invoked;
|
|
1330
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
1331
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1332
|
-
position: { line: 0, character: 0 },
|
|
1333
|
-
// Manual trigger kind
|
|
1334
|
-
context: { triggerKind: TRIGGER_KIND },
|
|
1335
|
-
}, server_interface_1.CancellationToken.None);
|
|
1336
|
-
assert.deepEqual(result, testUtils_1.EXPECTED_RESULT);
|
|
1337
|
-
const firstSession = sessionManager.getActiveSession();
|
|
1338
|
-
// There is ACTIVE session
|
|
1339
|
-
assert(firstSession);
|
|
1340
|
-
assert.equal(sessionManager.getCurrentSession(), firstSession);
|
|
1341
|
-
assert.equal(firstSession.state, 'ACTIVE');
|
|
1342
|
-
const secondResult = await features.doInlineCompletionWithReferences({
|
|
1343
|
-
textDocument: { uri: testUtils_1.SOME_FILE.uri },
|
|
1344
|
-
position: { line: 0, character: 0 },
|
|
1345
|
-
context: { triggerKind: TRIGGER_KIND },
|
|
1346
|
-
}, server_interface_1.CancellationToken.None);
|
|
1347
|
-
assert.deepEqual(secondResult, { ...testUtils_1.EXPECTED_RESULT, sessionId: SESSION_IDS_LOG[1] });
|
|
1348
|
-
ts_sinon_1.default.assert.called(sessionManagerSpy.closeCurrentSession);
|
|
1349
|
-
});
|
|
1350
|
-
it('should discard inflight session if merge right recommendations resulted in list of empty strings', async () => {
|
|
1351
|
-
// The suggestion returned by generateSuggestions will be equal to the contents of the file
|
|
1352
|
-
// This test fails when the file starts with a new line, probably due to the way we handle right context merge
|
|
1353
|
-
// So let's use hello world without the newline in the beginning
|
|
1354
|
-
const HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE = testUtils_1.HELLO_WORLD_IN_CSHARP.trimStart();
|
|
1355
|
-
const SOME_FILE = server_interface_1.TextDocument.create('file:///test.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE);
|
|
1356
|
-
features.openDocument(SOME_FILE);
|
|
1357
|
-
const EXPECTED_SUGGESTION = [
|
|
1358
|
-
{ itemId: 'cwspr-item-id', content: HELLO_WORLD_IN_CSHARP_WITHOUT_NEWLINE },
|
|
1359
|
-
];
|
|
1360
|
-
service.generateSuggestions.returns(Promise.resolve({
|
|
1361
|
-
suggestions: EXPECTED_SUGGESTION,
|
|
1362
|
-
responseContext: testUtils_1.EXPECTED_RESPONSE_CONTEXT,
|
|
1363
|
-
}));
|
|
1364
|
-
const result = await features.doInlineCompletionWithReferences({
|
|
1365
|
-
textDocument: { uri: SOME_FILE.uri },
|
|
1366
|
-
position: { line: 0, character: 0 },
|
|
1367
|
-
context: { triggerKind: server_interface_1.InlineCompletionTriggerKind.Invoked },
|
|
1368
|
-
}, server_interface_1.CancellationToken.None);
|
|
1369
|
-
assert.deepEqual(result, testUtils_1.EMPTY_RESULT);
|
|
1370
|
-
const session = sessionManager.getCurrentSession();
|
|
1371
|
-
assert(session);
|
|
1372
|
-
assert(session.state, 'CLOSED');
|
|
1373
|
-
ts_sinon_1.default.assert.calledOnce(sessionManagerSpy.closeSession);
|
|
1374
|
-
});
|
|
1375
|
-
});
|
|
1376
|
-
});
|
|
1377
|
-
//# sourceMappingURL=codeWhispererServer.test.js.map
|