Commit graph

68 commits

Author SHA1 Message Date
KJ7LNW
c58b9638c5
fix: eliminate XSS vulnerability in CodeBlock component (#5157)
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-27 10:20:59 -04:00
KJ7LNW
8455909809
fix: use safeWriteJson for all JSON file writes with race condition fix (#4733)
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-25 16:05:02 -04:00
Matt Rubens
da8b09e655
Sharing improvements (#5082)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: cte <cestreich@gmail.com>
2025-06-24 16:36:32 -04:00
renovate[bot]
86ce767688
fix(deps): update dependency serialize-error to v12 (#4832)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-20 23:15:19 -04:00
renovate[bot]
d049634263
fix(deps): update dependency tailwind-merge to v3 (#4834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-20 23:14:57 -04:00
renovate[bot]
15d5af6919
fix(deps): update dependency pretty-bytes to v7 (#4806)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-20 23:14:01 -04:00
renovate[bot]
5238a515df
chore(deps): update dependency globals to v16.2.0 (#4943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-20 23:13:28 -04:00
Brad Davis
37ed013157
fix context length for lmstudio and ollama (#2462) (#4314)
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-20 22:53:04 -04:00
Hannes Rudolph
85d73af334
feat: add LaTeX math equation rendering in chat window (#4258) (#4786)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-20 15:45:18 -04:00
renovate[bot]
fba89d9c53
fix(deps): update dependency puppeteer-chromium-resolver to v24 (#4812)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 00:53:46 -07:00
renovate[bot]
385fa1fa92
chore(deps): update dependency knip to v5.61.2 (#4831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 00:53:02 -07:00
renovate[bot]
b0f55fde53
fix(deps): update dependency posthog-node to v5 (#4805)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 00:52:40 -07:00
renovate[bot]
5c7cae0c48
fix(deps): update dependency lucide-react to ^0.518.0 (#4820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 00:52:01 -07:00
Matt Rubens
ff1b150955
Fix a couple security vulnerabilities for dependabot (#4844) 2025-06-18 12:45:57 -04:00
renovate[bot]
347a29233b
chore(deps): update dependency lint-staged to v16.1.2 (#4804)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:37:52 -07:00
renovate[bot]
a8b9f4ab17
chore(deps): update dependency knip to v5.61.1 (#4606)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:37:30 -07:00
renovate[bot]
b909643684
fix(deps): update dependency openai to v5 (#4650)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:36:23 -07:00
renovate[bot]
60bbf6d258
fix(deps): update radix-ui-primitives monorepo (#4708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:34:39 -07:00
renovate[bot]
a68fa6589c
fix(deps): update dependency pkce-challenge to v5 (#4653)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:34:16 -07:00
renovate[bot]
8d61bfb16f
fix(deps): update dependency lucide-react to ^0.516.0 (#4612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 15:33:47 -07:00
Chris Estreich
44f3a8418b
Convert all webview-ui tests: jest -> vitest (#4771) 2025-06-17 15:29:17 -07:00
Christiaan Arnoldus
bbbff7344b
feat(tools): Support for Excel (.xlsx) files (#4668) 2025-06-17 14:12:33 -04:00
Chris Estreich
62c3914034
Farewell jest (#4607)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-16 21:39:45 -07:00
Chris Estreich
28a16c9ee7
Force tar-fs >=2.1.3 (#4629) 2025-06-12 23:27:41 -07:00
renovate[bot]
6449f8a51a
chore(deps): update dependency @dotenvx/dotenvx to v1.44.2 (#4533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 23:24:08 -04:00
Chris Estreich
ab01fb3bdb
Move to Postgres for evals on roocode.com (#4520) 2025-06-11 14:17:53 -07:00
Chris Estreich
c03869bf1e
Remove Storybook + unused components (#4517) 2025-06-10 14:29:39 -07:00
renovate[bot]
243a07e98c
chore(deps): update dependency knip to v5.60.2 (#4515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 14:19:26 -07:00
renovate[bot]
7f36b4ab0a
chore(deps): update eslint monorepo to v9.28.0 (#4516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 14:19:18 -07:00
renovate[bot]
31710c2c79
chore(deps): update dependency @types/node to v18.19.111 (#4513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:59:20 -07:00
renovate[bot]
5236d45ec8
fix(deps): update dependency drizzle-zod to ^0.8.0 (#4181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:52:33 -07:00
renovate[bot]
639cace3f7
fix(deps): update dependency fast-xml-parser to v5 (#4358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: cte <cestreich@gmail.com>
2025-06-10 13:51:12 -07:00
renovate[bot]
6d399d8d2e
fix(deps): update dependency drizzle-orm to ^0.44.0 (#4178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:47:50 -07:00
renovate[bot]
12982f1bc5
fix(deps): update dependency i18next to v25 (#4359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:47:42 -07:00
renovate[bot]
385b5429a7
chore(deps): update storybook monorepo to v9 (major) (#4353)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:47:24 -07:00
renovate[bot]
cca80b23d7
fix(deps): update dependency @google/genai to v1 (#4354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 13:47:17 -07:00
Matt Rubens
8d2eeda4ad
Revert "fix: use safeWriteJson for all JSON file writes" (#4471)
Revert "fix: use safeWriteJson for all JSON file writes (#3772)"

This reverts commit 1be30fc8c2.
2025-06-09 13:53:17 -04:00
KJ7LNW
1be30fc8c2
fix: use safeWriteJson for all JSON file writes (#3772)
* feat: Add safeWriteJson utility for atomic file operations

Implements a robust JSON file writing utility that:
- Prevents concurrent writes to the same file using in-memory locks
- Ensures atomic operations with temporary file and backup strategies
- Handles error cases with proper rollback mechanisms
- Cleans up temporary files even when operations fail
- Provides comprehensive test coverage for success and failure scenarios

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* fix: use safeWriteJson for all JSON file writes

This change refactors all direct JSON file writes to use the safeWriteJson
utility, which implements atomic file writes to prevent data corruption
during write operations.

- Modified safeWriteJson to accept optional replacer and space arguments
- Updated tests to verify correct behavior with the new implementation

Fixes: #722
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: Implement inter-process file locking for safeWriteJson

Replaces the previous in-memory lock in `safeWriteJson` with
`proper-lockfile` to provide robust, cross-process advisory file
locking. This enhances safety when multiple processes might attempt
concurrent writes to the same JSON file.

Key changes:
- Added `proper-lockfile` and `@types/proper-lockfile` dependencies.
- `safeWriteJson` now uses `proper-lockfile.lock()` with configured
  retries, staleness checks (31s), and lock update intervals (10s).
- An `onCompromised` handler is included to manage scenarios where
  the lock state is unexpectedly altered.
- Logging and comments within `safeWriteJson` have been refined for
  clarity, ensuring error logs include backtraces.
- The test suite `safeWriteJson.test.ts` has been significantly
  updated to:
    - Use real timers (`jest.useRealTimers()`).
    - Employ a more comprehensive mock for `fs/promises`.
    - Correctly manage file pre-existence for various scenarios.
    - Simulate lock contention by mocking `proper-lockfile.lock()`
      using `jest.doMock` and a dynamic require for the SUT.
    - Verify lock release by checking for the absence of the `.lock`
      file.

All tests are passing with these changes.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: implement streaming JSON write in safeWriteJson

Refactor safeWriteJson to use stream-json for memory-efficient JSON serialization:
- Replace in-memory string creation with streaming pipeline
- Add Disassembler and Stringer from stream-json library
- Extract streaming logic to a dedicated helper function
- Add proper-lockfile and stream-json dependencies

This implementation reduces memory usage when writing large JSON objects.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* fix: improve safeWriteJson locking mechanism

- Use file path itself for locking instead of separate lock file
- Improve error handling and clarity of code
- Enhance cleanup of temporary files

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* test: fix safeWriteJson test failures

- Ensure test file exists before locking
- Add proper mocking for fs.createWriteStream
- Fix test assertions to match expected behavior
- Improve test comments to follow project guidelines

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* test: update tests to work with safeWriteJson

Updated tests to work with safeWriteJson instead of direct fs.writeFile calls:

- Updated importExport.test.ts to expect safeWriteJson calls instead of fs.writeFile
- Fixed McpHub.test.ts by properly mocking fs/promises module:
  - Moved jest.mock() to the top of the file before any imports
  - Added mock implementations for all fs functions used by safeWriteJson
  - Updated the test setup to work with the mocked fs module

All tests now pass successfully.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: replace JSON.stringify with safeWriteJson for file operations

Replace all non-test instances of JSON.stringify used for writing to JSON files with safeWriteJson to ensure safer file operations with proper locking, error handling, and atomic writes.

- Updated src/services/mcp/McpHub.ts
- Updated src/services/code-index/cache-manager.ts
- Updated src/api/providers/fetchers/modelEndpointCache.ts
- Updated src/api/providers/fetchers/modelCache.ts
- Updated tests to match the new implementation

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* docs: add rules for using safeWriteJson

Add concise rules for using safeWriteJson instead of JSON.stringify with file operations to ensure atomic writes and prevent data corruption.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2025-06-08 07:17:20 -07:00
Chris Estreich
cb5b9c3718
Improve Docker setup for evals (#4327) 2025-06-05 12:16:36 -07:00
renovate[bot]
fe26c05dc9
fix(deps): update dependency lucide-react to ^0.513.0 (#4345)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 16:56:35 -04:00
renovate[bot]
f5d263e171
chore(deps): update dependency knip to v5.60.0 (#4344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 16:56:01 -04:00
renovate[bot]
af74d44ada
chore(deps): update dependency @types/node to v18.19.110 (#4309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 09:33:36 -07:00
renovate[bot]
9183f7bf61
chore(deps): update dependency drizzle-kit to ^0.31.0 (#4303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 16:14:02 -07:00
renovate[bot]
935a7c935b
chore(deps): update dependency @types/jest to v29 (#4184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 15:50:48 -07:00
renovate[bot]
65cf8951f3
chore(deps): update dependency lint-staged to v16 (#4192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 15:50:29 -07:00
renovate[bot]
d1c8f834a6
chore(deps): update eslint monorepo to v9.28.0 (#4175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 15:50:08 -07:00
renovate[bot]
0e39d32135
chore(deps): update dependency ovsx to v0.10.4 (#4280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 15:49:28 -07:00
renovate[bot]
fac9a69271
chore(deps): update dependency knip to v5.59.1 (#4172)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 15:48:30 -07:00
Chris Estreich
01eef2be99
Bring back #4128 (#4292) 2025-06-03 14:03:19 -07:00
Chris Estreich
d87f890556
Move evals into pnpm workspace, switch from SQLite to Postgres (#4278) 2025-06-03 01:38:08 -07:00