continue-custom/core/tools/implementations
continue[bot] d70bdbbf28
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 <dallin@continue.dev>
Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>

* Trigger CI re-run

The previous CI failure was a flaky test in the CLI extension, unrelated to our changes.

Co-authored-by: dallin <dallin@continue.dev>
Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>

* 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 <dallin@continue.dev>
Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>

* 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 <dallin@continue.dev>
Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>

* 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 <dallin@continue.dev>
Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>

* fix: revert test changes

---------

Co-authored-by: continue[bot] <continue[bot]@users.noreply.github.com>
Co-authored-by: Continue <noreply@continue.dev>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2025-12-05 12:13:39 -08:00
..
codebaseTool.ts feat: more thorough tool arg checking utils with tests 2025-07-21 15:31:52 +02:00
createNewFile.ts use specific ConitnueError for tool calls 2025-10-14 14:55:00 -07:00
createRuleBlock.test.ts update tests and remove debugger 2025-07-02 16:06:18 -07:00
createRuleBlock.ts feat: more thorough tool arg checking utils with tests 2025-07-21 15:31:52 +02:00
fetchUrlContent.ts fix: grep escaped chars and empty results (#7323) 2025-08-25 07:20:26 -07:00
fetchUrlContent.vitest.ts Update fetchUrlContent.vitest.ts 2025-10-17 10:18:30 -07:00
globSearch.ts fix: grep escaped chars and empty results (#7323) 2025-08-25 07:20:26 -07:00
grepSearch.ts prettier 2025-10-14 15:48:35 -07:00
index.ts fix type errors 2024-11-22 22:08:58 -08:00
lsTool.ts Merge main branch and resolve conflicts 2025-10-16 16:00:29 -07:00
lsTool.vitest.ts fix tests 2025-10-17 11:21:55 -07:00
readCurrentlyOpenFile.ts fix: install core dependencies for cli 2025-08-21 15:43:35 -07:00
readFile.ts Merge main branch and resolve conflicts 2025-10-16 16:00:29 -07:00
readFileLimit.ts use specific ConitnueError for tool calls 2025-10-14 14:55:00 -07:00
readFileRange.integration.vitest.ts Fix readFileRange Kotlin Int overflow in IntelliJ plugin (#8976) 2025-12-05 12:13:39 -08:00
readFileRange.ts Fix readFileRange Kotlin Int overflow in IntelliJ plugin (#8976) 2025-12-05 12:13:39 -08:00
readFileRange.vitest.ts fix: 🎨 Prettier and Linting 2025-08-27 22:27:15 -07:00
requestRule.ts prettier 2025-10-14 15:48:35 -07:00
runTerminalCommand.ts fix: unify cwd and add missing case 2025-11-27 02:29:13 -08:00
runTerminalCommand.vitest.ts fix: terminal cwd tests 2025-11-24 15:12:20 -08:00
searchWeb.ts fix: grep escaped chars and empty results (#7323) 2025-08-25 07:20:26 -07:00
searchWeb.vitest.ts fix: grep escaped chars and empty results (#7323) 2025-08-25 07:20:26 -07:00
viewDiff.ts feat: empty diff tool result message 2025-09-10 19:26:50 -07:00
viewDiff.vitest.ts fix: grep escaped chars and empty results (#7323) 2025-08-25 07:20:26 -07:00
viewRepoMap.ts switch repo map tool to show signatures 2025-02-04 17:26:56 -08:00
viewSubdirectory.ts update subdirectory logic 2025-10-17 10:25:37 -07:00
viewSubdirectory.vitest.ts fix tests 2025-10-17 11:21:55 -07:00