continue-custom/src
Chad Metcalf 311d5ee8b2
fix: prevent Bash tool from being presented in plan mode
Fix service initialization race condition where getAllTools() would return
all tools when ToolPermissionService wasn't ready, causing plan mode to
incorrectly include excluded tools like Bash.

The issue occurred in GitHub Actions where `cn -p` (plan mode) should exclude
Bash tool, but due to timing issues, Bash was being presented to the LLM and
then failing during execution with permission errors.

Changes:
- Fix getAllTools() to properly pass permissions to filterExcludedTools()
- Throw descriptive error when service not initialized instead of fallback
- Add comprehensive regression tests covering all modes and edge cases

Fixes automated PR review failures in GitHub Actions workflows.
2025-08-04 10:15:16 -07:00
..
__mocks__ refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
auth Add model persistence to authentication configuration 2025-07-27 21:16:37 -07:00
commands Reorder system commands for better UX 2025-08-03 21:55:03 -04:00
e2e Merge pull request #146 from continuedev/standardize-services-actual 2025-08-03 18:47:36 -07:00
hooks move services to context 2025-07-22 20:43:40 -07:00
permissions fix tool permissions bug 2025-08-03 19:19:46 -04:00
services fix tool permissions bug 2025-08-03 19:19:46 -04:00
telemetry feat: posthog telemetry: chat, sessionStart, and slash commands 2025-07-25 16:49:40 +07:00
test-helpers refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
tools merge: main 2025-08-04 08:26:37 -07:00
ui merge: main 2025-08-04 08:26:37 -07:00
util Merge pull request #146 from continuedev/standardize-services-actual 2025-08-03 18:47:36 -07:00
utils Update src/utils/modelCapability.ts 2025-07-29 16:17:47 -07:00
args.test.ts fix tool permissions bug 2025-08-02 20:12:35 -04:00
args.ts fix tool permissions bug 2025-08-02 20:12:35 -04:00
asciiArt.ts cn serve intro message and move version t rght 2025-07-23 09:53:49 -07:00
CLIPlatformClient.ts clean up CLIPlatform client 2025-07-15 22:20:27 -07:00
config.ts include models without roles 2025-07-28 10:39:44 -07:00
configLoader.ts refactor: make config loading logic more readable 2025-07-24 21:11:50 -07:00
continueSDK.ts feat: integrate SDK into CLI (#1) 2025-05-02 13:15:45 -07:00
env.ts Update src/env.ts 2025-07-20 21:52:01 -07:00
fileTools.ts copy over the CLI 2025-04-24 15:53:20 -07:00
freeTrialTransition.test.ts Refactor API key validation and add automatic local config switching 2025-07-31 10:25:10 -07:00
freeTrialTransition.ts Refactor API key validation and add automatic local config switching 2025-07-31 10:25:10 -07:00
index.ts Merge pull request #137 from continuedev/add-no-think-flag 2025-08-01 17:00:13 -07:00
logger.ts feat: suppress console.info in headless 2025-05-02 14:06:03 -07:00
logging.test.ts refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
logging.ts feat: suppress console.info in headless 2025-05-02 14:06:03 -07:00
mcp.ts logging 2025-07-19 12:26:14 -07:00
onboarding.ts Refactor API key validation and add automatic local config switching 2025-07-31 10:25:10 -07:00
session.test.ts fix tests for windows 2025-07-27 21:13:36 -07:00
session.ts fix: resume 2025-07-27 20:52:22 -07:00
shared-options.ts fixes 2025-07-31 11:24:16 -07:00
slashCommands.modes.test.ts refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
slashCommands.test.ts refactor: base service class + migrate to vitest 2025-08-02 19:17:46 -04:00
slashCommands.ts feat: plan mode and auto mode 2025-07-31 10:52:33 -07:00
streamChatResponse.getAllTools.test.ts fix: prevent Bash tool from being presented in plan mode 2025-08-04 10:15:16 -07:00
streamChatResponse.test.ts refactor: avoid double name property for tools. only use "name" 2025-08-03 18:43:33 -04:00
streamChatResponse.ts fix: prevent Bash tool from being presented in plan mode 2025-08-04 10:15:16 -07:00
systemMessage.test.ts Add headless mode support to system message construction 2025-07-29 22:39:57 -07:00
systemMessage.ts Add headless mode support to system message construction 2025-07-29 22:39:57 -07:00
version.ts add shared options 2025-07-26 19:13:53 -07:00