-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I believe this is a bug. I'll try to join the Continue Discord for questions
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS:
- Continue version:
- IDE version:
- Model:
- config:
OR link to agent in Continue hub:Description
I found that when using the read_file_range tool, the IntelliJ series of plugins throws an exception:
Error handling message of type readRangeInFile: com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 9007199254740991 at line 1 column 153 path $.range.end.character
The issue occurs because:
In core/tools/implementations/readFileRange.ts, Number.MAX_SAFE_INTEGER is used as the default value
In extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/types.kt, the Position class defines character as Int
Root Cause: JavaScript's Number.MAX_SAFE_INTEGER (2^53 - 1 = 9,007,199,254,740,991) exceeds Kotlin's Int maximum value (2^31 - 1 = 2,147,483,647), causing a deserialization error when the IntelliJ plugin attempts to parse the JSON.
Proposed Solution: Replace Number.MAX_SAFE_INTEGER with Number.MAX_VALUE or use a smaller value that's compatible with Kotlin's Int type (e.g., 2147483647 or Math.pow(2, 31) - 1).
To reproduce
No response
Log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status