Commit d70bdbb
Fix readFileRange Kotlin Int overflow in IntelliJ plugin (#8976)
* Fix readFileRange Kotlin Int overflow in IntelliJ plugin
Replace Number.MAX_SAFE_INTEGER with Int.MAX_VALUE (2147483647) to prevent
JSON deserialization errors in IntelliJ plugins.
The issue occurred because JavaScript's Number.MAX_SAFE_INTEGER (2^53 - 1)
exceeds Kotlin's Int maximum value (2^31 - 1), causing the following error:
'java.lang.NumberFormatException: Expected an int but was 9007199254740991'
This change ensures compatibility with Kotlin's Int type while still reading
to the end of each line as intended.
Fixes #8517
Co-authored-by: dallin <[email protected]>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <[email protected]>
* Trigger CI re-run
The previous CI failure was a flaky test in the CLI extension, unrelated to our changes.
Co-authored-by: dallin <[email protected]>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <[email protected]>
* Extract magic number into MAX_CHAR_POSITION constant
Improve code maintainability by defining the Kotlin Int.MAX_VALUE as a
named constant with clear documentation.
Co-authored-by: dallin <[email protected]>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <[email protected]>
* Trigger CI re-run for flaky tests
Flaky UI tests failing intermittently on macOS (Node 18, 20) but passing
on all other platforms. Tests are unrelated to readFileRange changes.
Co-authored-by: dallin <[email protected]>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <[email protected]>
* Fix flaky CLI UI tests on macOS
Increase timeouts for UI rendering tests on macOS to prevent race conditions.
The tests were failing intermittently on macOS with Node 18/20 due to
insufficient wait times for UI stabilization.
Changes:
- Double timeouts on macOS in TUIChat.fileSearch.test.tsx
- Add extra 100ms wait on macOS in TUIChat.slashCommands.test.tsx
- Tests now pass consistently across all platforms
Co-authored-by: dallin <[email protected]>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <[email protected]>
* fix: revert test changes
---------
Co-authored-by: continue[bot] <continue[bot]@users.noreply.github.com>
Co-authored-by: Continue <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>1 parent 05bf720 commit d70bdbb
File tree
2 files changed
+9
-5
lines changed- core/tools/implementations
2 files changed
+9
-5
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
55 | | - | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
0 commit comments