@aws/lsp-codewhisperer 0.0.20 → 0.0.21
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 +7 -0
- package/out/language-server/codeWhispererService.js +1 -4
- package/out/language-server/codeWhispererService.js.map +1 -1
- package/out/language-server/utils.d.ts +1 -1
- package/out/language-server/utils.js +2 -2
- package/out/language-server/utils.js.map +1 -1
- package/package.json +2 -2
- package/out/client/sigv4/codewhisperer.d.ts +0 -4
- package/out/client/token/codewhisperer.d.ts +0 -14
- package/out/constants.d.ts +0 -2
- package/out/index.d.ts +0 -5
- package/out/language-server/auto-trigger/autoTrigger.d.ts +0 -38
- package/out/language-server/auto-trigger/autoTrigger.test.d.ts +0 -1
- package/out/language-server/chat/chatController.test.d.ts +0 -1
- package/out/language-server/chat/chatEventParser.d.ts +0 -39
- package/out/language-server/chat/chatEventParser.test.d.ts +0 -1
- package/out/language-server/chat/chatSessionManagementService.d.ts +0 -19
- package/out/language-server/chat/chatSessionManagementService.test.d.ts +0 -1
- package/out/language-server/chat/chatSessionService.d.ts +0 -14
- package/out/language-server/chat/chatSessionService.test.d.ts +0 -1
- package/out/language-server/chat/constants.d.ts +0 -2
- package/out/language-server/chat/contexts/documentContext.d.ts +0 -23
- package/out/language-server/chat/contexts/documentContext.test.d.ts +0 -1
- package/out/language-server/chat/contexts/triggerContext.d.ts +0 -17
- package/out/language-server/chat/contexts/triggerContexts.test.d.ts +0 -1
- package/out/language-server/chat/contexts/utils.d.ts +0 -10
- package/out/language-server/chat/contexts/utils.test.d.ts +0 -1
- package/out/language-server/chat/quickActions.d.ts +0 -12
- package/out/language-server/chat/telemetry/chatTelemetryController.d.ts +0 -61
- package/out/language-server/chat/telemetry/chatTelemetryController.test.d.ts +0 -1
- package/out/language-server/chat/telemetry/clientTelemetry.d.ts +0 -59
- package/out/language-server/chat/utils.d.ts +0 -6
- package/out/language-server/codeWhispererSecurityScanServer.d.ts +0 -3
- package/out/language-server/codeWhispererServer.d.ts +0 -6
- package/out/language-server/codeWhispererServer.test.d.ts +0 -1
- package/out/language-server/configuration/qConfigurationServer.d.ts +0 -4
- package/out/language-server/constants.d.ts +0 -4
- package/out/language-server/dependencyGraph/commonUtil.d.ts +0 -2
- package/out/language-server/dependencyGraph/csharpDependencyGraph.test.d.ts +0 -1
- package/out/language-server/dependencyGraph/dependencyGraphFactory.d.ts +0 -14
- package/out/language-server/languageDetection.d.ts +0 -19
- package/out/language-server/languageDetection.test.d.ts +0 -1
- package/out/language-server/mergeRightUtils.test.d.ts +0 -1
- package/out/language-server/models/constants.d.ts +0 -15
- package/out/language-server/models/model.d.ts +0 -16
- package/out/language-server/netTransform/metrics.d.ts +0 -17
- package/out/language-server/netTransform/models.d.ts +0 -94
- package/out/language-server/netTransform/tests/converter.test.d.ts +0 -1
- package/out/language-server/netTransform/tests/transformHandler.test.d.ts +0 -1
- package/out/language-server/netTransform/tests/validation.test.d.ts +0 -1
- package/out/language-server/proxy-server.d.ts +0 -6
- package/out/language-server/qChatServer.d.ts +0 -3
- package/out/language-server/qChatServer.test.d.ts +0 -1
- package/out/language-server/securityScan/securityScanHandler.test.d.ts +0 -1
- package/out/language-server/securityScan/types.d.ts +0 -64
- package/out/language-server/session/sessionManager.test.d.ts +0 -1
- package/out/language-server/telemetry/codeDiffTracker.test.d.ts +0 -1
- package/out/language-server/telemetry/codePercentage.d.ts +0 -19
- package/out/language-server/telemetry/codePercentage.test.d.ts +0 -1
- package/out/language-server/telemetry/metric.d.ts +0 -16
- package/out/language-server/telemetry/types.d.ts +0 -259
- package/out/language-server/telemetry/userTriggerDecision.test.d.ts +0 -1
- package/out/language-server/telemetry.test.d.ts +0 -1
- package/out/language-server/telemetryService.d.ts +0 -79
- package/out/language-server/telemetryService.test.d.ts +0 -1
- package/out/language-server/types.d.ts +0 -16
- package/out/language-server/utilities/filesystemUtilities.d.ts +0 -8
- package/out/language-server/utilities/filesystemUtilities.test.d.ts +0 -1
- package/out/language-server/utilities/pathUtils.test.d.ts +0 -1
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.d.ts +0 -13
- package/out/language-server/utilities/supplementalContextUtil/codeParsingUtil.test.d.ts +0 -5
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.d.ts +0 -18
- package/out/language-server/utilities/supplementalContextUtil/crossFileContextUtil.test.d.ts +0 -1
- package/out/language-server/utilities/supplementalContextUtil/rankBm25.d.ts +0 -32
- package/out/language-server/utilities/supplementalContextUtil/supplementalContextUtil.d.ts +0 -5
- package/out/language-server/utilities/supplementalContextUtil/supplementalContextUtil.test.d.ts +0 -1
- package/out/language-server/utilities/telemetryUtils.d.ts +0 -4
- package/out/language-server/utilities/telemetryUtils.test.d.ts +0 -1
- package/out/language-server/utilities/textUtils.d.ts +0 -1
- package/out/language-server/utilities/textUtils.test.d.ts +0 -1
- package/out/language-server/utils.test.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.21](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.20...lsp-codewhisperer/v0.0.21) (2025-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* convert makeProxyConfig to sync to allow proxy configs to be loa… ([#725](https://github.com/aws/language-servers/issues/725)) ([7ea8150](https://github.com/aws/language-servers/commit/7ea81505c4c69a0a3ba3b595a51fd40b9db14947))
|
|
9
|
+
|
|
3
10
|
## [0.0.20](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.19...lsp-codewhisperer/v0.0.20) (2025-01-15)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -15,10 +15,7 @@ class CodeWhispererServiceBase {
|
|
|
15
15
|
shareCodeWhispererContentWithAWS = false;
|
|
16
16
|
customizationArn;
|
|
17
17
|
constructor(workspace, codeWhispererRegion, codeWhispererEndpoint) {
|
|
18
|
-
;
|
|
19
|
-
(async () => {
|
|
20
|
-
this.proxyConfig = await (0, utils_1.makeProxyConfig)(workspace);
|
|
21
|
-
})();
|
|
18
|
+
this.proxyConfig = (0, utils_1.makeProxyConfig)(workspace);
|
|
22
19
|
this.codeWhispererRegion = codeWhispererRegion;
|
|
23
20
|
this.codeWhispererEndpoint = codeWhispererEndpoint;
|
|
24
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeWhispererService.js","sourceRoot":"","sources":["../../src/language-server/codeWhispererService.ts"],"names":[],"mappings":";;;AAMA,qCAA8F;AAE9F,+BAAmC;AACnC,iEAGsC;AACtC,iEAGsC;AA4BtC,mCAAyC;AAEzC,iIAAiI;AACjI,sGAAsG;AACtG,MAAsB,wBAAwB;IACvB,mBAAmB,CAAA;IACnB,qBAAqB,CAAA;IAC9B,WAAW,GAAyB,EAAE,CAAA;IACzC,gCAAgC,GAAG,KAAK,CAAA;IACxC,gBAAgB,CAAS;IAOhC,YAAY,SAAoB,EAAE,mBAA2B,EAAE,qBAA6B;QACxF,
|
|
1
|
+
{"version":3,"file":"codeWhispererService.js","sourceRoot":"","sources":["../../src/language-server/codeWhispererService.ts"],"names":[],"mappings":";;;AAMA,qCAA8F;AAE9F,+BAAmC;AACnC,iEAGsC;AACtC,iEAGsC;AA4BtC,mCAAyC;AAEzC,iIAAiI;AACjI,sGAAsG;AACtG,MAAsB,wBAAwB;IACvB,mBAAmB,CAAA;IACnB,qBAAqB,CAAA;IAC9B,WAAW,GAAyB,EAAE,CAAA;IACzC,gCAAgC,GAAG,KAAK,CAAA;IACxC,gBAAgB,CAAS;IAOhC,YAAY,SAAoB,EAAE,mBAA2B,EAAE,qBAA6B;QACxF,IAAI,CAAC,WAAW,GAAG,IAAA,uBAAe,EAAC,SAAS,CAAC,CAAA;QAC7C,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;QAC9C,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAA;IACtD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O,CAAC,CAAC,OAAO,EAAE,CAAA;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,2BAA2B,CAAC,OAAoE;QAClG,OAAO,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;IACrE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAA2D;QAChF,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;IAC5D,CAAC;CACJ;AA1JD,8DA0JC"}
|
|
@@ -16,4 +16,4 @@ export declare const flattenMetric: (obj: any, prefix?: string) => any;
|
|
|
16
16
|
export declare function getSsoConnectionType(credentialsProvider: CredentialsProvider): SsoConnectionType;
|
|
17
17
|
export declare function getUnmodifiedAcceptedTokens(origin: string, after: string): number;
|
|
18
18
|
export declare function getEndPositionForAcceptedSuggestion(content: string, startPosition: Position): Position;
|
|
19
|
-
export declare const makeProxyConfig: (workspace: Workspace) =>
|
|
19
|
+
export declare const makeProxyConfig: (workspace: Workspace) => ConfigurationOptions;
|
|
@@ -113,7 +113,7 @@ function getEndPositionForAcceptedSuggestion(content, startPosition) {
|
|
|
113
113
|
}
|
|
114
114
|
return endPosition;
|
|
115
115
|
}
|
|
116
|
-
const makeProxyConfig =
|
|
116
|
+
const makeProxyConfig = (workspace) => {
|
|
117
117
|
let additionalAwsConfig = {};
|
|
118
118
|
// short term solution to fix webworker bundling, broken due to this node.js specific logic in here
|
|
119
119
|
const isNodeJS = typeof process !== 'undefined' && process.release && process.release.name === 'node';
|
|
@@ -121,7 +121,7 @@ const makeProxyConfig = async (workspace) => {
|
|
|
121
121
|
if (proxyUrl) {
|
|
122
122
|
const certs = isNodeJS
|
|
123
123
|
? process.env.AWS_CA_BUNDLE
|
|
124
|
-
? [
|
|
124
|
+
? [workspace.fs.readFileSync(process.env.AWS_CA_BUNDLE)]
|
|
125
125
|
: undefined
|
|
126
126
|
: undefined;
|
|
127
127
|
const agent = new hpagent_1.HttpsProxyAgent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/language-server/utils.ts"],"names":[],"mappings":";;;AAeA,gCAMC;AAUD,4BAEC;AAED,8BAEC;AAED,8CAIC;AAED,8BAMC;AAED,0CAKC;AAED,gEAYC;AAsBD,oDAIC;AASD,kEAEC;AAED,kFAoBC;AA5HD,6DAA8C;AAG9C,2CAA8E;AAE9E,qCAAyC;AAGzC,SAAgB,UAAU,CAAC,KAAc;IACrC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,OAAO,KAAK,YAAY,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,OAAO,CAAI,KAAQ;IACxB,OAAO,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ,CAAA;AACjE,CAAC;AAED,SAAS,OAAO,CAAC,KAAY;IACzB,OAAQ,KAA4B,CAAC,IAAI,YAAY,IAAI,CAAA;AAC7D,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAA;AACtD,CAAC;AAED,SAAgB,SAAS,CAAC,KAAc;IACpC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAA;AAChD,CAAC;AAED,SAAgB,iBAAiB,CAAC,UAAsB;IACpD,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAA;IAE9F,OAAO,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC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gBACxD,CAAC,CAAC,SAAS;YACf,CAAC,CAAC,SAAS,CAAA;QACf,MAAM,KAAK,GAAG,IAAI,yBAAe,CAAC;YAC9B,KAAK,EAAE,QAAQ;YACf,EAAE,EAAE,KAAK;SACZ,CAAC,CAAA;QACF,mBAAmB,GAAG;YAClB,WAAW,EAAE;gBACT,KAAK,EAAE,KAAK;aACf;SACJ,CAAA;IACL,CAAC;IAED,OAAO,mBAAmB,CAAA;AAC9B,CAAC,CAAA;AAxBY,QAAA,eAAe,mBAwB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/lsp-codewhisperer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "CodeWhisperer Language Server",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@amzn/codewhisperer-streaming": "*",
|
|
31
31
|
"@aws-sdk/util-retry": "^3.374.0",
|
|
32
32
|
"@aws/chat-client-ui-types": "^0.1.0",
|
|
33
|
-
"@aws/language-server-runtimes": "^0.2.
|
|
33
|
+
"@aws/language-server-runtimes": "^0.2.31",
|
|
34
34
|
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
|
|
35
35
|
"@smithy/node-http-handler": "^2.5.0",
|
|
36
36
|
"adm-zip": "^0.5.10",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ServiceConfigurationOptions } from 'aws-sdk/lib/service';
|
|
2
|
-
import CodeWhispererClient = require('./codewhisperersigv4client');
|
|
3
|
-
export type CodeWhispererSigv4ClientConfigurationOptions = ServiceConfigurationOptions;
|
|
4
|
-
export declare function createCodeWhispererSigv4Client(options: ServiceConfigurationOptions): CodeWhispererClient;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AWSError } from 'aws-sdk';
|
|
2
|
-
import { ServiceConfigurationOptions } from 'aws-sdk/lib/service';
|
|
3
|
-
import CodeWhispererClient = require('./codewhispererbearertokenclient');
|
|
4
|
-
interface RequestExtras {
|
|
5
|
-
readonly service: AWS.Service;
|
|
6
|
-
readonly operation: string;
|
|
7
|
-
readonly params?: any;
|
|
8
|
-
}
|
|
9
|
-
type RequestListener = (request: AWS.Request<any, AWSError> & RequestExtras) => void;
|
|
10
|
-
export interface CodeWhispererTokenClientConfigurationOptions extends ServiceConfigurationOptions {
|
|
11
|
-
onRequestSetup?: RequestListener | RequestListener[];
|
|
12
|
-
}
|
|
13
|
-
export declare function createCodeWhispererTokenClient(options: CodeWhispererTokenClientConfigurationOptions): CodeWhispererClient;
|
|
14
|
-
export {};
|
package/out/constants.d.ts
DELETED
package/out/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './language-server/codeWhispererSecurityScanServer';
|
|
2
|
-
export * from './language-server/codeWhispererServer';
|
|
3
|
-
export * from './language-server/qChatServer';
|
|
4
|
-
export * from './language-server/proxy-server';
|
|
5
|
-
export * from './language-server/netTransformServer';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { FileContext } from '../codeWhispererService';
|
|
2
|
-
export type CodewhispererTriggerType = 'AutoTrigger' | 'OnDemand';
|
|
3
|
-
export type CodewhispererAutomatedTriggerType = 'SpecialCharacters' | 'Enter' | 'Classifier';
|
|
4
|
-
/**
|
|
5
|
-
* Determine the trigger type based on the file context. Currently supports special cases for Special Characters and Enter keys,
|
|
6
|
-
* as determined by the File Context. For regular typing or undetermined triggers, the Classifier trigger type is used.
|
|
7
|
-
*
|
|
8
|
-
* This is a helper function that can be used since in LSP we don't have the actual keypress events. So we don't know
|
|
9
|
-
* (exactly) whether a position was reached through for instance inserting a new line or backspacing the next line.
|
|
10
|
-
*
|
|
11
|
-
* @param fileContext The file with left and right context based on the invocation position
|
|
12
|
-
* @returns The TriggerType
|
|
13
|
-
*/
|
|
14
|
-
export declare const triggerType: (fileContext: FileContext) => CodewhispererAutomatedTriggerType;
|
|
15
|
-
/**
|
|
16
|
-
* Parameters to the auto trigger. Contains all information to make a decision.
|
|
17
|
-
*/
|
|
18
|
-
type AutoTriggerParams = {
|
|
19
|
-
fileContext: FileContext;
|
|
20
|
-
char: string;
|
|
21
|
-
triggerType: string;
|
|
22
|
-
os: string;
|
|
23
|
-
previousDecision: string;
|
|
24
|
-
ide: string;
|
|
25
|
-
lineNum: number;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Auto Trigger to determine whether a keystroke or edit should trigger a recommendation invocation.
|
|
29
|
-
* It uses information about the file, the position, the last entered character, the environment,
|
|
30
|
-
* and previous recommendation decisions from the user to determine whether a new recommendation
|
|
31
|
-
* should be shown. The auto-trigger is not stateful and does not keep track of past invocations.
|
|
32
|
-
*/
|
|
33
|
-
export declare const autoTrigger: ({ fileContext, char, triggerType, os, previousDecision, ide, lineNum, }: AutoTriggerParams) => {
|
|
34
|
-
shouldTrigger: boolean;
|
|
35
|
-
classifierResult: number;
|
|
36
|
-
classifierThreshold: number;
|
|
37
|
-
};
|
|
38
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ChatResponseStream, Reference, SupplementaryWebLink } from '@amzn/codewhisperer-streaming';
|
|
2
|
-
import { ChatItemAction, ChatResult, ReferenceTrackerInformation, SourceLink } from '@aws/language-server-runtimes/protocol';
|
|
3
|
-
import { Result } from '../types';
|
|
4
|
-
import { AddMessageEvent } from '../telemetry/types';
|
|
5
|
-
import { Metric } from '../telemetry/metric';
|
|
6
|
-
export type ChatResultWithMetadata = {
|
|
7
|
-
chatResult: ChatResult;
|
|
8
|
-
conversationId?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare class ChatEventParser implements ChatResult {
|
|
11
|
-
#private;
|
|
12
|
-
static readonly FOLLOW_UP_TEXT = "Suggested follow up questions:";
|
|
13
|
-
error?: string;
|
|
14
|
-
messageId?: string;
|
|
15
|
-
body?: string;
|
|
16
|
-
canBeVoted?: boolean;
|
|
17
|
-
relatedContent?: {
|
|
18
|
-
title?: string;
|
|
19
|
-
content: SourceLink[];
|
|
20
|
-
};
|
|
21
|
-
followUp?: {
|
|
22
|
-
text?: string;
|
|
23
|
-
options?: ChatItemAction[];
|
|
24
|
-
};
|
|
25
|
-
codeReference?: ReferenceTrackerInformation[];
|
|
26
|
-
conversationId?: string;
|
|
27
|
-
static getReferencedInformation(reference: Reference): string;
|
|
28
|
-
static mapRelatedData({ title, url, snippet }: SupplementaryWebLink): SourceLink;
|
|
29
|
-
static mapReferenceData(reference: Reference): ReferenceTrackerInformation;
|
|
30
|
-
constructor(messageId: string, metric: Metric<AddMessageEvent>);
|
|
31
|
-
get totalEvents(): {
|
|
32
|
-
followupPromptEvent: number;
|
|
33
|
-
supplementaryWebLinksEvent: number;
|
|
34
|
-
codeReferenceEvent: number;
|
|
35
|
-
assistantResponseEvent: number;
|
|
36
|
-
};
|
|
37
|
-
processPartialEvent(chatEvent: ChatResponseStream): Result<ChatResultWithMetadata, string>;
|
|
38
|
-
getResult(): Result<ChatResultWithMetadata, string>;
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CredentialsProvider } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import { Result } from '../types';
|
|
3
|
-
import { ChatSessionService, ChatSessionServiceConfig } from './chatSessionService';
|
|
4
|
-
export declare class ChatSessionManagementService {
|
|
5
|
-
#private;
|
|
6
|
-
static getInstance(): ChatSessionManagementService;
|
|
7
|
-
static reset(): void;
|
|
8
|
-
private constructor();
|
|
9
|
-
withConfig(clientConfig?: ChatSessionServiceConfig | (() => ChatSessionServiceConfig)): this;
|
|
10
|
-
withCredentialsProvider(credentialsProvider: CredentialsProvider): this;
|
|
11
|
-
withCodeWhispererRegion(codeWhispererRegion: string): this;
|
|
12
|
-
withCodeWhispererEndpoint(codeWhispererEndpoint: string): this;
|
|
13
|
-
setCustomUserAgent(customUserAgent: string): void;
|
|
14
|
-
hasSession(tabId: string): boolean;
|
|
15
|
-
createSession(tabId: string): Result<ChatSessionService, string>;
|
|
16
|
-
getSession(tabId: string): Result<ChatSessionService, string>;
|
|
17
|
-
deleteSession(tabId: string): Result<void, string>;
|
|
18
|
-
dispose(): void;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CodeWhispererStreamingClientConfig, SendMessageCommandInput, SendMessageCommandOutput } from '@amzn/codewhisperer-streaming';
|
|
2
|
-
import { CredentialsProvider } from '@aws/language-server-runtimes/server-interface';
|
|
3
|
-
export type ChatSessionServiceConfig = CodeWhispererStreamingClientConfig;
|
|
4
|
-
export declare class ChatSessionService {
|
|
5
|
-
#private;
|
|
6
|
-
shareCodeWhispererContentWithAWS: boolean;
|
|
7
|
-
get conversationId(): string | undefined;
|
|
8
|
-
set conversationId(value: string | undefined);
|
|
9
|
-
constructor(credentialsProvider: CredentialsProvider, codeWhispererRegion: string, codeWhispererEndpoint: string, config?: CodeWhispererStreamingClientConfig);
|
|
10
|
-
sendMessage(request: SendMessageCommandInput): Promise<SendMessageCommandOutput>;
|
|
11
|
-
clear(): void;
|
|
12
|
-
dispose(): void;
|
|
13
|
-
abortRequest(): void;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const HELP_MESSAGE = "I'm Amazon Q, a generative AI assistant. Learn more about me below. Your feedback will help me improve.\n\n\n### What I can do:\n\n\n- Answer questions about AWS\n\n\n- Answer questions about general programming concepts\n\n\n- Explain what a line of code or code function does\n\n\n- Write unit tests and code\n\n\n- Debug and fix code\n\n\n- Refactor code\n\n\n### What I don't do right now:\n\n\n- Answer questions in languages other than English\n\n\n- Remember conversations from your previous sessions\n\n\n- Have information about your AWS account or your specific AWS resources\n\n\n### Examples of questions I can answer:\n\n\n- When should I use ElastiCache?\n\n\n- How do I create an Application Load Balancer?\n\n\n- Explain selected code and ask clarifying questions about it.\n\n\n- What is the syntax of declaring a variable in TypeScript?\n\n\n### Special Commands\n\n\n- /clear - Clear the conversation.\n\n\n- /help - View chat topics and commands.\n\n\n### Things to note:\n\n\n- I may not always provide completely accurate or current information.\n\n\n- Provide feedback by choosing the like or dislike buttons that appear below answers.\n\n\n- When you use Amazon Q, AWS may, for service improvement purposes, store data about your usage and content. You can opt-out of sharing this data by following the steps in AI services opt-out policies. See <a href=\"https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/opt-out-IDE.html\">here</a>\n\n\n- Do not enter any confidential, sensitive, or personal information.\n\n\n*For additional help, visit the [Amazon Q User Guide](https://docs.aws.amazon.com/amazonq/latest/aws-builder-use-ug/getting-started.html).*";
|
|
2
|
-
export declare const DEFAULT_HELP_FOLLOW_UP_PROMPT = "How can Amazon Q help me?";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { EditorState, TextDocument as CwsprTextDocument } from '@amzn/codewhisperer-streaming';
|
|
2
|
-
import { CursorState } from '@aws/language-server-runtimes/server-interface';
|
|
3
|
-
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
4
|
-
import { Features } from '../../types';
|
|
5
|
-
export type DocumentContext = CwsprTextDocument & {
|
|
6
|
-
cursorState?: EditorState['cursorState'];
|
|
7
|
-
hasCodeSnippet: boolean;
|
|
8
|
-
totalEditorCharacters: number;
|
|
9
|
-
};
|
|
10
|
-
export interface DocumentContextExtractorConfig {
|
|
11
|
-
logger?: Features['logging'];
|
|
12
|
-
characterLimits?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare class DocumentContextExtractor {
|
|
15
|
-
#private;
|
|
16
|
-
private static readonly DEFAULT_CHARACTER_LIMIT;
|
|
17
|
-
constructor(config?: DocumentContextExtractorConfig);
|
|
18
|
-
/**
|
|
19
|
-
* From the given the cursor state, we want to give Q context up to the characters limit
|
|
20
|
-
* on both sides of the cursor.
|
|
21
|
-
*/
|
|
22
|
-
extractDocumentContext(document: TextDocument, cursorState: CursorState): Promise<DocumentContext>;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TriggerType } from '@aws/chat-client-ui-types';
|
|
2
|
-
import { SendMessageCommandInput, UserIntent } from '@amzn/codewhisperer-streaming';
|
|
3
|
-
import { ChatParams } from '@aws/language-server-runtimes/server-interface';
|
|
4
|
-
import { Features } from '../../types';
|
|
5
|
-
import { DocumentContext } from './documentContext';
|
|
6
|
-
export interface TriggerContext extends Partial<DocumentContext> {
|
|
7
|
-
userIntent?: UserIntent;
|
|
8
|
-
triggerType?: TriggerType;
|
|
9
|
-
}
|
|
10
|
-
export declare class QChatTriggerContext {
|
|
11
|
-
#private;
|
|
12
|
-
private static readonly DEFAULT_CURSOR_STATE;
|
|
13
|
-
constructor(workspace: Features['workspace'], logger: Features['logging']);
|
|
14
|
-
getNewTriggerContext(params: ChatParams): Promise<TriggerContext>;
|
|
15
|
-
getChatParamsFromTrigger(params: ChatParams, triggerContext: TriggerContext, customizationArn?: string): SendMessageCommandInput;
|
|
16
|
-
extractDocumentContext(input: Pick<ChatParams, 'cursorState' | 'textDocument'>): Promise<DocumentContext | undefined>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Range, TextDocument } from 'vscode-languageserver-textdocument';
|
|
2
|
-
/**
|
|
3
|
-
* Extend the cursor range on both ends up to charactersLimit for context (if applicable)
|
|
4
|
-
*/
|
|
5
|
-
export declare function getExtendedCodeBlockRange(document: TextDocument, originalRange: Range, charactersLimit: number): Range;
|
|
6
|
-
/**
|
|
7
|
-
* Since we are only sending over the code block, the selection that
|
|
8
|
-
* reflects the position in the entire document needs to be adjusted.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getSelectionWithinExtendedRange(selection: Range, extendedRange: Range): Range | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum QuickAction {
|
|
2
|
-
Clear = "/clear",
|
|
3
|
-
Help = "/help"
|
|
4
|
-
}
|
|
5
|
-
export declare const HELP_QUICK_ACTION: {
|
|
6
|
-
command: QuickAction;
|
|
7
|
-
description: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const CLEAR_QUICK_ACTION: {
|
|
10
|
-
command: QuickAction;
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { MetricEvent } from '@aws/language-server-runtimes/server-interface/telemetry';
|
|
2
|
-
import { TriggerType } from '@aws/chat-client-ui-types';
|
|
3
|
-
import { ChatTelemetryEventMap, ChatTelemetryEventName, CombinedConversationEvent, InteractWithMessageEvent } from '../../telemetry/types';
|
|
4
|
-
import { Features, KeysMatching } from '../../types';
|
|
5
|
-
import { InsertToCursorPositionParams } from './clientTelemetry';
|
|
6
|
-
import { UserIntent } from '@amzn/codewhisperer-streaming';
|
|
7
|
-
import { TriggerContext } from '../contexts/triggerContext';
|
|
8
|
-
import { AcceptedSuggestionEntry, CodeDiffTracker } from '../../telemetry/codeDiffTracker';
|
|
9
|
-
import { TelemetryService } from '../../telemetryService';
|
|
10
|
-
export declare const CONVERSATION_ID_METRIC_KEY = "cwsprChatConversationId";
|
|
11
|
-
export interface ChatMetricEvent<TName extends ChatTelemetryEventName, TData extends ChatTelemetryEventMap[TName] = ChatTelemetryEventMap[TName]> extends MetricEvent {
|
|
12
|
-
name: TName;
|
|
13
|
-
data: TData;
|
|
14
|
-
}
|
|
15
|
-
type ConversationMetricName = KeysMatching<ChatTelemetryEventMap, {
|
|
16
|
-
[CONVERSATION_ID_METRIC_KEY]: string;
|
|
17
|
-
}>;
|
|
18
|
-
interface MessageTrigger extends TriggerContext {
|
|
19
|
-
messageId?: string;
|
|
20
|
-
followUpActions?: Set<string>;
|
|
21
|
-
}
|
|
22
|
-
interface StartTrigger {
|
|
23
|
-
triggerType?: TriggerType;
|
|
24
|
-
hasUserSnippet?: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface ConversationTriggerInfo {
|
|
27
|
-
conversationId: string;
|
|
28
|
-
startTrigger?: StartTrigger;
|
|
29
|
-
lastMessageTrigger?: MessageTrigger;
|
|
30
|
-
}
|
|
31
|
-
interface AcceptedSuggestionChatEntry extends AcceptedSuggestionEntry {
|
|
32
|
-
conversationId: string;
|
|
33
|
-
messageId: string;
|
|
34
|
-
}
|
|
35
|
-
export declare class ChatTelemetryController {
|
|
36
|
-
#private;
|
|
37
|
-
constructor(features: Features, telemetryService: TelemetryService);
|
|
38
|
-
get activeTabId(): string | undefined;
|
|
39
|
-
set activeTabId(activeTabId: string | undefined);
|
|
40
|
-
getCurrentTrigger(tabId: string): TriggerType;
|
|
41
|
-
getConversationId(tabId?: string): string | undefined;
|
|
42
|
-
getCustomizationId(tabId: string, messageId: string): string;
|
|
43
|
-
removeConversation(tabId: string): void;
|
|
44
|
-
setConversationId(tabId: string, conversationId: string): void;
|
|
45
|
-
updateTriggerInfo(tabId: string, info: Partial<ConversationTriggerInfo>): void;
|
|
46
|
-
getLastMessageTrigger(tabId: string): MessageTrigger | undefined;
|
|
47
|
-
get codeDiffTracker(): CodeDiffTracker<AcceptedSuggestionChatEntry>;
|
|
48
|
-
emitModifyCodeMetric(entry: AcceptedSuggestionChatEntry, percentage: number): void;
|
|
49
|
-
emitChatMetric<TName extends ChatTelemetryEventName>(metric: ChatMetricEvent<TName, ChatTelemetryEventMap[TName]>): void;
|
|
50
|
-
emitConversationMetric<TName extends ConversationMetricName, TEvent extends ChatMetricEvent<TName, ChatTelemetryEventMap[TName]>>(metric: Omit<TEvent, 'data'> & {
|
|
51
|
-
data: Omit<TEvent['data'], typeof CONVERSATION_ID_METRIC_KEY | 'credentialStartUrl'>;
|
|
52
|
-
}, tabId?: string | undefined): void;
|
|
53
|
-
emitAddMessageMetric(tabId: string, metric: Partial<CombinedConversationEvent>): void;
|
|
54
|
-
emitStartConversationMetric(tabId: string, metric: Partial<CombinedConversationEvent>): void;
|
|
55
|
-
emitInteractWithMessageMetric(tabId: string, metric: Omit<InteractWithMessageEvent, 'cwsprChatConversationId'>): void;
|
|
56
|
-
emitMessageResponseError(tabId: string, metric: Partial<CombinedConversationEvent>): void;
|
|
57
|
-
enqueueCodeDiffEntry(params: Omit<InsertToCursorPositionParams, 'name'>): void;
|
|
58
|
-
dispose(): void;
|
|
59
|
-
}
|
|
60
|
-
export declare function convertToTelemetryUserIntent(userIntent?: UserIntent): "" | "explainCodeSelection" | "suggestAlternateImplementation" | "applyCommonBestPractices" | "improveCode" | "citeSources" | "explainLineByLine" | "showExamples";
|
|
61
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type * as ServerInterface from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import type * as ChatClientType from '@aws/chat-client-ui-types';
|
|
3
|
-
export declare enum ChatUIEventName {
|
|
4
|
-
EnterFocusChat = "enterFocus",
|
|
5
|
-
ExitFocusChat = "exitFocus",
|
|
6
|
-
AddMessage = "addMessage",
|
|
7
|
-
SendToPrompt = "sendToPrompt",
|
|
8
|
-
TabAdd = "tabAdd",
|
|
9
|
-
CopyToClipboard = "copyToClipboard",
|
|
10
|
-
InsertToCursorPosition = "insertToCursorPosition",
|
|
11
|
-
Vote = "vote",
|
|
12
|
-
LinkClick = "linkClick",
|
|
13
|
-
InfoLinkClick = "infoLinkClick",
|
|
14
|
-
SourceLinkClick = "sourceLinkClick"
|
|
15
|
-
}
|
|
16
|
-
export declare enum RelevancyVoteType {
|
|
17
|
-
UP = "upvote",
|
|
18
|
-
DOWN = "downvote"
|
|
19
|
-
}
|
|
20
|
-
export type VoteTelemetryParams = BaseClientTelemetryParams<ChatUIEventName.Vote> & {
|
|
21
|
-
vote: RelevancyVoteType;
|
|
22
|
-
messageId: string;
|
|
23
|
-
};
|
|
24
|
-
export type CopyCodeToClipboardParams = BaseClientTelemetryParams<ChatUIEventName.CopyToClipboard> & {
|
|
25
|
-
messageId: string;
|
|
26
|
-
code?: string;
|
|
27
|
-
type?: ServerInterface.CodeSelectionType;
|
|
28
|
-
referenceTrackerInformation?: ServerInterface.ReferenceTrackerInformation[];
|
|
29
|
-
codeBlockIndex?: number;
|
|
30
|
-
totalCodeBlocks?: number;
|
|
31
|
-
};
|
|
32
|
-
export interface BaseClientTelemetryParams<TName extends ChatUIEventName> {
|
|
33
|
-
name: TName;
|
|
34
|
-
tabId: string;
|
|
35
|
-
eventId?: string;
|
|
36
|
-
}
|
|
37
|
-
export type TabAddParams = BaseClientTelemetryParams<ChatUIEventName.TabAdd> & {
|
|
38
|
-
triggerType: ChatClientType.TriggerType;
|
|
39
|
-
};
|
|
40
|
-
export type AddMessageParams = {
|
|
41
|
-
triggerType: ChatClientType.TriggerType;
|
|
42
|
-
tabId: string;
|
|
43
|
-
name: ChatUIEventName.AddMessage;
|
|
44
|
-
};
|
|
45
|
-
export type SendToPromptParams = ChatClientType.SendToPromptParams & BaseClientTelemetryParams<ChatUIEventName.SendToPrompt> & {
|
|
46
|
-
messageId: string;
|
|
47
|
-
};
|
|
48
|
-
export type InfoLinkClickParams = ServerInterface.InfoLinkClickParams & BaseClientTelemetryParams<ChatUIEventName.InfoLinkClick> & {
|
|
49
|
-
messageId: string;
|
|
50
|
-
};
|
|
51
|
-
export type LinkClickParams = ServerInterface.LinkClickParams & BaseClientTelemetryParams<ChatUIEventName.LinkClick> & {
|
|
52
|
-
messageId: string;
|
|
53
|
-
};
|
|
54
|
-
export type SourceLinkClickParams = ServerInterface.SourceLinkClickParams & BaseClientTelemetryParams<ChatUIEventName.SourceLinkClick>;
|
|
55
|
-
export type InsertToCursorPositionParams = ServerInterface.InsertToCursorPositionParams & BaseClientTelemetryParams<ChatUIEventName.InsertToCursorPosition> & {
|
|
56
|
-
cursorState?: ServerInterface.CursorState[];
|
|
57
|
-
};
|
|
58
|
-
export type ClientTelemetryEvent = BaseClientTelemetryParams<ChatUIEventName.EnterFocusChat> | BaseClientTelemetryParams<ChatUIEventName.ExitFocusChat> | TabAddParams | AddMessageParams | SendToPromptParams | VoteTelemetryParams | CopyCodeToClipboardParams | InfoLinkClickParams | LinkClickParams | SourceLinkClickParams | InsertToCursorPositionParams;
|
|
59
|
-
export declare function isClientTelemetryEvent(event: unknown): event is ClientTelemetryEvent;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ChatResult } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
type AuthFollowUpType = 'full-auth' | 're-auth' | 'missing_scopes' | 'use-supported-auth';
|
|
3
|
-
export declare function getAuthFollowUpType(err: unknown): AuthFollowUpType | undefined;
|
|
4
|
-
export declare function createAuthFollowUpResult(authType: AuthFollowUpType): ChatResult;
|
|
5
|
-
export declare function getDefaultChatResponse(prompt?: string): ChatResult | undefined;
|
|
6
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CredentialsProvider, Server, Workspace } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import { CodeWhispererServiceToken } from './codeWhispererService';
|
|
3
|
-
export declare const SecurityScanServerToken: (service: (credentialsProvider: CredentialsProvider, workspace: Workspace, awsQRegion: string, awsQEndpointUrl: string) => CodeWhispererServiceToken) => Server;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CredentialsProvider, Server, Workspace } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import { CodeWhispererServiceBase } from './codeWhispererService';
|
|
3
|
-
export declare const CONTEXT_CHARACTERS_LIMIT = 10240;
|
|
4
|
-
export declare const CodewhispererServerFactory: (service: (credentials: CredentialsProvider, workspace: Workspace, awsQRegion: string, awsQEndpointUrl: string) => CodeWhispererServiceBase) => Server;
|
|
5
|
-
export declare const CodeWhispererServerIAM: Server;
|
|
6
|
-
export declare const CodeWhispererServerToken: Server;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CredentialsProvider, Server, Workspace } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import { CodeWhispererServiceToken } from '../codeWhispererService';
|
|
3
|
-
export declare const Q_CONFIGURATION_SECTION = "aws.q";
|
|
4
|
-
export declare const QConfigurationServerToken: (service: (credentials: CredentialsProvider, workspace: Workspace, awsQRegion: string, awsQEndpointUrl: string) => CodeWhispererServiceToken) => Server;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const MISSING_BEARER_TOKEN_ERROR = "credentialsProvider does not have bearer token credentials";
|
|
2
|
-
export declare const INVALID_TOKEN = "The bearer token included in the request is invalid.";
|
|
3
|
-
export declare const GENERIC_UNAUTHORIZED_ERROR = "User is not authorized to make this call";
|
|
4
|
-
export declare const BUILDER_ID_START_URL = "https://view.awsapps.com/start";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Logging, Workspace, TextDocument } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
import { CsharpDependencyGraph } from './csharpDependencyGraph';
|
|
3
|
-
declare const languageMap: {
|
|
4
|
-
readonly csharp: typeof CsharpDependencyGraph;
|
|
5
|
-
};
|
|
6
|
-
type LanguageMap = typeof languageMap;
|
|
7
|
-
type Keys = keyof LanguageMap;
|
|
8
|
-
type Tuples<T> = T extends Keys ? [T, InstanceType<LanguageMap[T]>] : never;
|
|
9
|
-
type ClassType<A extends Keys> = Extract<Tuples<Keys>, [A, any]>[1];
|
|
10
|
-
export declare class DependencyGraphFactory {
|
|
11
|
-
static getDependencyGraphFromFileExtensions<K extends Keys>(fileName: string): ClassType<K>;
|
|
12
|
-
static getDependencyGraph<K extends Keys>(document: TextDocument, workspace: Workspace, logging: Logging, workspaceFolderPath: string): ClassType<K>;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TextDocument } from '@aws/language-server-runtimes/server-interface';
|
|
2
|
-
export type CodewhispererLanguage = 'c' | 'cpp' | 'csharp' | 'dart' | 'go' | 'java' | 'javascript' | 'json' | 'jsx' | 'kotlin' | 'lua' | 'php' | 'plaintext' | 'powershell' | 'python' | 'r' | 'ruby' | 'rust' | 'scala' | 'shell' | 'sql' | 'swift' | 'systemverilog' | 'tf' | 'tsx' | 'typescript' | 'vue' | 'yaml' | 'systemVerilog';
|
|
3
|
-
type RuntimeLanguage = Exclude<CodewhispererLanguage, 'jsx' | 'tsx' | 'systemVerilog'> | 'systemverilog';
|
|
4
|
-
export declare const supportedSecurityScanLanguages: CodewhispererLanguage[];
|
|
5
|
-
export declare const languageByExtension: {
|
|
6
|
-
[key: string]: CodewhispererLanguage;
|
|
7
|
-
};
|
|
8
|
-
export declare const qLanguageIdByDocumentLanguageId: {
|
|
9
|
-
[key: string]: CodewhispererLanguage;
|
|
10
|
-
};
|
|
11
|
-
export declare const getSupportedLanguageId: (textDocument: TextDocument | undefined, supportedLanguageIds?: CodewhispererLanguage[]) => CodewhispererLanguage | undefined;
|
|
12
|
-
export declare const getLanguageId: (textDocument: TextDocument | undefined) => CodewhispererLanguage | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Normalize client side language id to service aware language id (service is not aware of jsx/tsx)
|
|
15
|
-
* Only used when invoking CodeWhisperer service API, for client usage please use normalizeLanguage
|
|
16
|
-
* Client side CodewhispererLanguage is a superset of NormalizedLanguageId
|
|
17
|
-
*/
|
|
18
|
-
export declare const getRuntimeLanguage: (language: CodewhispererLanguage) => RuntimeLanguage;
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare enum UserGroup {
|
|
2
|
-
Classifier = "Classifier",
|
|
3
|
-
CrossFile = "CrossFile",
|
|
4
|
-
Control = "Control",
|
|
5
|
-
RightContext = "RightContext"
|
|
6
|
-
}
|
|
7
|
-
export declare const supplemetalContextFetchingTimeoutMsg = "Amazon Q supplemental context fetching timeout";
|
|
8
|
-
export declare const crossFileContextConfig: {
|
|
9
|
-
numberOfChunkToFetch: number;
|
|
10
|
-
topK: number;
|
|
11
|
-
numberOfLinesEachChunk: number;
|
|
12
|
-
};
|
|
13
|
-
export declare const utgConfig: {
|
|
14
|
-
maxSegmentSize: number;
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type UtgStrategy = 'ByName' | 'ByContent';
|
|
2
|
-
export type CrossFileStrategy = 'OpenTabs_BM25';
|
|
3
|
-
export type SupplementalContextStrategy = CrossFileStrategy | UtgStrategy | 'Empty';
|
|
4
|
-
export interface CodeWhispererSupplementalContext {
|
|
5
|
-
isUtg: boolean;
|
|
6
|
-
isProcessTimeout: boolean;
|
|
7
|
-
supplementalContextItems: CodeWhispererSupplementalContextItem[];
|
|
8
|
-
contentsLength: number;
|
|
9
|
-
latency: number;
|
|
10
|
-
strategy: SupplementalContextStrategy;
|
|
11
|
-
}
|
|
12
|
-
export interface CodeWhispererSupplementalContextItem {
|
|
13
|
-
content: string;
|
|
14
|
-
filePath: string;
|
|
15
|
-
score?: number;
|
|
16
|
-
}
|