Local fork of continuedev/continue for auto-approve and full-access mode experiments
Find a file
Chad Metcalf 5c4f210496
fix: eliminate EventEmitter memory leak warnings in ModeService
Fix MaxListenersExceededWarning that occurred during test runs when
multiple test files added 'modeChanged' listeners to the ModeService
singleton, causing the total to exceed the default limit of 10.

Root cause:
- ModeService is a singleton shared across all tests and UI components
- Multiple test files (ModeService.test.ts, ModeIndicator.test.tsx) and
  UI components add event listeners to the same instance
- Tests running in parallel/sequence accumulate listeners beyond default limit

Solution:
- Increase maxListeners from 10 to 100 in ModeService constructor
- This accommodates legitimate multiple subscribers while still catching
  actual memory leaks (>100 listeners would indicate a real problem)

Impact:
- Memory cost: ~800 bytes maximum (8 bytes per listener * 100)
- Performance cost: Negligible (no impact until listeners are actually added)
- Real-world usage: Typically 5-15 listeners in production
- Test scenarios: Can reach 50+ due to parallel test execution

Fixes test output warnings while maintaining leak detection capability.
2025-08-04 10:23:21 -07:00
.continue rename to agent in a few places 2025-07-19 20:56:52 -07:00
.github/workflows Merge pull request #146 from continuedev/standardize-services-actual 2025-08-03 18:47:36 -07:00
.vscode fix: remote url no port 2025-07-21 15:26:18 -07:00
media zoom in on gif 2025-07-29 15:48:36 -07:00
spec more notes 2025-08-01 12:47:46 -07:00
src fix: eliminate EventEmitter memory leak warnings in ModeService 2025-08-04 10:23:21 -07:00
.env.example feat: integrate SDK into CLI (#1) 2025-05-02 13:15:45 -07:00
.gitignore chore: ignore notes.md 2025-07-13 21:00:34 -07:00
.npmignore fix: update npmignore 2025-07-20 11:33:51 -07:00
.nvmrc .nvmrc 2025-04-25 20:44:10 -07:00
.releaserc.json Merge pull request #70 from continuedev/onboarding-more 2025-07-19 17:31:35 -07:00
AGENTS.md fix: streaming tests, built in tool flag 2025-07-30 13:58:40 -07:00
CHANGELOG.md chore(release): 1.4.2 [skip ci] 2025-07-17 09:03:00 +00:00
demo.md cap 2025-07-20 22:16:49 -07:00
example-permissions.yaml feat: permissions.yaml 2025-07-27 13:24:29 -07:00
jest.config.mjs fix lint errors 2025-07-31 11:00:46 -07:00
jest.resolver.cjs more test fixes 2025-07-22 18:57:46 -07:00
jest.resolver.js more test fixes 2025-07-22 18:57:46 -07:00
jest.setup.ts refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
LICENSE chore: update README and add cn alias, remove test files, add LICENSE 2025-07-14 01:12:14 -07:00
package-lock.json refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
package.json fix: add description 2025-08-03 21:57:15 -04:00
README.md revert README.md 2025-07-31 13:09:25 -07:00
REFACTOR_PLAN.md refactor next step 2025-07-22 13:45:46 -07:00
tsconfig.build.json fixes 2025-07-31 11:24:16 -07:00
tsconfig.json refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
vitest.config.ts address feedback 2025-08-02 19:36:56 -04:00
vitest.setup.ts refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00

Continue CLI

The Continue CLI (cn) is a customizable command line coding agent.

Continue CLI Demo

Installation

npm i -g @continuedev/cli

Usage

cn

Headless Mode

cn -p "Generate a conventional commit name for the current git changes."

Session Management

The CLI automatically saves your chat history for each terminal session. You can resume where you left off:

# Resume the last session in this terminal
cn --resume

Command Line Options

  • -p: Run in headless mode (no TUI)
  • --config <path>: Specify agent configuration path
  • --resume: Resume the last session for this terminal
  • <prompt>: Optional prompt to start with