File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed
packages/core/src/codewhispererChat/controllers/chat Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const customerMessageSizeLimit = 4_000
4040
4141export 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 )
Original file line number Diff line number Diff line change @@ -1053,11 +1053,6 @@ export class ChatController {
10531053 triggerPayload . message = triggerPayload . message . replace ( / @ w o r k s p a c e / , '' )
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 ) {
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments