Skip to content

Commit 27d93ac

Browse files
committed
lint
1 parent 4b07b5c commit 27d93ac

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

packages/core/src/codewhispererChat/controllers/chat/chatRequest/converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const customerMessageSizeLimit = 4_000
4040

4141
export function triggerPayloadToChatRequest(triggerPayload: TriggerPayload): { conversationState: ConversationState } {
4242
// Flexible truncation logic
43-
let remainingPayloadSize = 100_000
43+
const remainingPayloadSize = 100_000
4444

4545
// Type A context: Preserving user input as much as possible
4646
const userInputTruncationInfo = preserveContexts(triggerPayload, remainingPayloadSize, ChatContextType.UserInput)

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,11 +1053,6 @@ export class ChatController {
10531053
triggerPayload.message = triggerPayload.message.replace(/@workspace/, '')
10541054
if (CodeWhispererSettings.instance.isLocalIndexEnabled()) {
10551055
const start = performance.now()
1056-
// for (const additionalContent of triggerPayload.additionalContents || []) {
1057-
// if (additionalContent.innerContext) {
1058-
// remainingContextLength -= additionalContent.innerContext.length
1059-
// }
1060-
// }
10611056
triggerPayload.relevantTextDocuments = []
10621057
const relevantTextDocuments = await LspController.instance.query(triggerPayload.message)
10631058
for (const relevantDocument of relevantTextDocuments) {

packages/core/src/codewhispererChat/controllers/chat/telemetryHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ export class CWCTelemetryHelper {
529529
credentialStartUrl: AuthUtil.instance.startUrl,
530530
codewhispererCustomizationArn: triggerPayload.customization.arn,
531531
cwsprChatHasProjectContext: hasProjectLevelContext,
532-
cwsprChatHasContextList: triggerPayload.documentReferences && triggerPayload.documentReferences?.length > 0,
532+
cwsprChatHasContextList: triggerPayload.documentReferences && triggerPayload.documentReferences.length > 0,
533533
cwsprChatFolderContextCount: contextCounts.folderContextCount,
534534
cwsprChatFileContextCount: contextCounts.fileContextCount,
535535
cwsprChatFileContextLength: triggerPayload.additionalContextLengths?.fileContextLength ?? 0,

0 commit comments

Comments
 (0)