Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { RejectedEditTracker } from '../tracker/rejectedEditTracker'
import { getErrorMessage, hasConnectionExpired } from '../../../shared/utils'
import { AmazonQError, AmazonQServiceConnectionExpiredError } from '../../../shared/amazonQServiceManager/errors'
import { DocumentChangedListener } from '../documentChangedListener'
import { EMPTY_RESULT, EDIT_DEBOUNCE_INTERVAL_MS } from '../contants/constants'
import { EMPTY_RESULT, EDIT_DEBOUNCE_INTERVAL_MS, CONTEXT_CHARACTERS_LIMIT } from '../contants/constants'
import { StreakTracker } from '../tracker/streakTracker'
import { processEditSuggestion } from '../utils/diffUtils'

Expand Down Expand Up @@ -256,7 +256,8 @@ export class EditCompletionHandler {
programmingLanguage: {
languageName: generateCompletionReq.fileContext?.programmingLanguage?.languageName,
},
text: textDocument.getText(),
// Naive truncation, maybe we need "10240" characters around current curosr position instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we aligned with service on this truncation?

text: textDocument.getText().substring(0, CONTEXT_CHARACTERS_LIMIT),
},
cursorState: {
position: {
Expand Down
Loading