Commit 734bd98
authored
fix(nep): truncate editor state (aws#7256)
## Problem
We introduced `editorState` in data instrumentation launch. The service
has a requirement of 40k character limit for the `text` field.
## Solution
Implement a check on text length. If the text length exceeds 40k
characters, section 20k max characters from the left and right side of
current cursor position, so the final text is always less than 40k.
validated prod endpoint inline working for files > 40k characters.
Example request id: `57bbbe65-fbe7-47fc-81c4-c65262f47ce8`
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent faeeb98 commit 734bd98
File tree
3 files changed
+26
-2
lines changed- packages
- amazonq/.changes/next-release
- core/src/codewhisperer
- models
- util
3 files changed
+26
-2
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
219 | 236 | | |
220 | 237 | | |
221 | 238 | | |
222 | 239 | | |
223 | 240 | | |
224 | 241 | | |
225 | | - | |
| 242 | + | |
226 | 243 | | |
227 | 244 | | |
228 | 245 | | |
| |||
0 commit comments