Skip to content

Commit e508788

Browse files
LiGaCuJiatong Li
authored andcommitted
feat(amazonq): add fileUri to FileContext (aws#1399)
Co-authored-by: Jiatong Li <jiatonli@amazon.com>
1 parent b238189 commit e508788

File tree

6 files changed

+107
-74
lines changed

6 files changed

+107
-74
lines changed

server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* DO NOT EDIT BY HAND.
55
*/
66

7-
import {Request} from 'aws-sdk/lib/request';
8-
import {Response} from 'aws-sdk/lib/response';
9-
import {AWSError} from 'aws-sdk/lib/error';
10-
import {Service} from 'aws-sdk/lib/service';
11-
import {ServiceConfigurationOptions} from 'aws-sdk/lib/service';
12-
import {ConfigBase as Config} from 'aws-sdk/lib/config-base';
7+
import { Request } from 'aws-sdk/lib/request';
8+
import { Response } from 'aws-sdk/lib/response';
9+
import { AWSError } from 'aws-sdk/lib/error';
10+
import { Service } from 'aws-sdk/lib/service';
11+
import { ServiceConfigurationOptions } from 'aws-sdk/lib/service';
12+
import { ConfigBase as Config } from 'aws-sdk/lib/config-base';
1313
interface Blob {}
1414
declare class CodeWhispererSigV4Client extends Service {
1515
/**
@@ -131,11 +131,11 @@ declare class CodeWhispererSigV4Client extends Service {
131131
updateProfile(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UpdateProfileResponse) => void): Request<CodeWhispererSigV4Client.Types.UpdateProfileResponse, AWSError>;
132132
}
133133
declare namespace CodeWhispererSigV4Client {
134-
export type ArtifactMap = {[key: string]: UploadId};
135-
export type ArtifactType = "SourceCode"|"BuiltJars"|string;
134+
export type ArtifactMap = { [key: string]: UploadId };
135+
export type ArtifactType = "SourceCode" | "BuiltJars" | string;
136136
export type Base64EncodedPaginationToken = string;
137-
export type CodeScanFindingsSchema = "codescan/findings/1.0"|string;
138-
export type CodeScanStatus = "Completed"|"Pending"|"Failed"|string;
137+
export type CodeScanFindingsSchema = "codescan/findings/1.0" | string;
138+
export type CodeScanStatus = "Completed" | "Pending" | "Failed" | string;
139139
export interface CreateCodeScanRequest {
140140
artifacts: ArtifactMap;
141141
programmingLanguage: ProgrammingLanguage;
@@ -178,8 +178,10 @@ declare namespace CodeWhispererSigV4Client {
178178
leftFileContent: FileContextLeftFileContentString;
179179
rightFileContent: FileContextRightFileContentString;
180180
filename: FileContextFilenameString;
181+
fileUri?: FileContextFileUriString;
181182
programmingLanguage: ProgrammingLanguage;
182183
}
184+
export type FileContextFileUriString = string;
183185
export type FileContextFilenameString = string;
184186
export type FileContextLeftFileContentString = string;
185187
export type FileContextRightFileContentString = string;
@@ -290,7 +292,7 @@ declare namespace CodeWhispererSigV4Client {
290292
}
291293
export type RecommendationContentString = string;
292294
export type RecommendationsList = Recommendation[];
293-
export type RecommendationsWithReferencesPreference = "BLOCK"|"ALLOW"|string;
295+
export type RecommendationsWithReferencesPreference = "BLOCK" | "ALLOW" | string;
294296
export interface Reference {
295297
licenseName?: ReferenceLicenseNameString;
296298
repository?: ReferenceRepositoryString;
@@ -353,7 +355,7 @@ declare namespace CodeWhispererSigV4Client {
353355
/**
354356
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
355357
*/
356-
export type apiVersion = "2022-06-15"|"latest"|string;
358+
export type apiVersion = "2022-06-15" | "latest" | string;
357359
export interface ClientApiVersions {
358360
/**
359361
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
@@ -368,4 +370,3 @@ declare namespace CodeWhispererSigV4Client {
368370
}
369371
export = CodeWhispererSigV4Client;
370372

371-

server/aws-lsp-codewhisperer/src/client/sigv4/service.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,19 @@
612612
"filename": {
613613
"shape": "FileContextFilenameString"
614614
},
615+
"fileUri": {
616+
"shape": "FileContextFileUriString"
617+
},
615618
"programmingLanguage": {
616619
"shape": "ProgrammingLanguage"
617620
}
618621
}
619622
},
623+
"FileContextFileUriString": {
624+
"type": "string",
625+
"max": 1024,
626+
"min": 1
627+
},
620628
"FileContextFilenameString": {
621629
"type": "string",
622630
"max": 1024,

server/aws-lsp-codewhisperer/src/client/token/bearer-token-service.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,11 +2223,20 @@
22232223
"filename": {
22242224
"shape": "FileContextFilenameString"
22252225
},
2226+
"fileUri": {
2227+
"shape": "FileContextFileUriString"
2228+
},
22262229
"programmingLanguage": {
22272230
"shape": "ProgrammingLanguage"
22282231
}
22292232
}
22302233
},
2234+
"FileContextFileUriString": {
2235+
"type": "string",
2236+
"max": 1024,
2237+
"min": 1,
2238+
"sensitive": true
2239+
},
22312240
"FileContextFilenameString": {
22322241
"type": "string",
22332242
"max": 1024,

0 commit comments

Comments
 (0)