* feat(cli): Add hooks_enabled support to CLI settings
- Add hooks_enabled field to Settings proto message (field 134)
- Add hooks_enabled parsing to CLI settings parser
- Enables users to toggle hooks via -s hooks_enabled=true/false flag
Fixes missing CLI support for hooks that was available in the VSCode extension
* feat(hooks): Enable hooks in the CLI
* Add include back in after resolving merge conflict
* feat(hooks): Changes as per human code review feedback.
---------
Co-authored-by: NightTrek <Daniels@dual4t.com>
* feat(cli): add active task check before entering follow mode
Add validation in FollowConversationUntilCompletion to check if a task
is currently running before entering follow mode. If no active task
exists, display a user-friendly message and exit gracefully instead of
waiting indefinitely.
Also includes minor whitespace formatting cleanup in related functions.
* Fix detached process conditions
* Fix detached process conditions
* Adding stealth
- Change `UpdateProviderPartial` persist flag from false to true in `applyModelChange`
- Add missing newline at end of state.proto file
This ensures that model changes are properly persisted to storage when users
update their provider configuration through the wizard.
Fixes issue where 'cline auth' command would lose all configuration due to process termination race condition.
Root cause: StateManager uses 500ms debounced persistence, but CLI process terminated before setTimeout callback could fire.
Solution: Implemented explicit flushPendingState() mechanism:
- Added StateManager.flushPendingState() method for immediate persistence
- Refactored to extract shared persistence logic (DRY)
- Added flushPendingState gRPC endpoint
- CLI now calls flush instead of using 5s sleep workaround
Results:
- Deterministic persistence (no race condition)
- Faster auth flow (~2s vs 7s)
- Cleaner, more maintainable code
* Renamed Nous proto config strings
* Revert "feat: migrate terminal execution mode default to background" (#7412)
This reverts commit 0b7393f50e.
---------
Co-authored-by: Ara <arafat.da.khan@gmail.com>
* feat: refactor APPLY_PATCH tool
Replace separate file creation and editing tools with unified APPLY_PATCH tool for the native-gpt-5 model variant. This consolidation simplifies file operations through a single patch-based interface.
Changes:
- Replace FILE_NEW and FILE_EDIT tools with APPLY_PATCH in config for gpt-5 with native tool calling
- Disable EDITING_FILES system prompt section (no longer needed)
- Remove EDITING_FILES section from base template
- Refactor ApplyPatchHandler with improved architecture:
- Extract patch parsing logic into PatchParser utility class
- Extract file operations into FileProviderOperations utility
- Extract path resolution into PathResolver utility
- Add comprehensive error handling with DiffError types
- Improve type safety with shared Patch types
- Add extensive test coverage for PatchParser including:
- Edge cases (empty files, large files, unicode)
- Error conditions (malformed patches, invalid operations)
- Complex scenarios (multiple chunks, context matching)
- Export PATCH_MARKERS and BASH_WRAPPERS for reusability
This refactoring improves maintainability, testability, and provides a more robust patch application system for the GPT-5 model variant when native tool calling is enabled.
* Add diagnostic to result
* Update unit tests
* add feedback
* typo
* captureToolUsage
* fix test
* fix test
* Update ClineMessage
* update diff editor on stream
* revert content partial stream
* Disable Apply patch and add native gpt snap shot
* Remove delete action and make preserveEscaping conditional
* Add delete function to diff provider
* Update UI for file deletion
* Feat:
* add hicap as provider option
* add new variable to handle hicapApiKey
* add variable to handle hicapModelId in Plan and Act mode
* get hicap available model from Hicap Endpoint
* create hicap provider (ui)
* hicap handler
* rebase main into this branch and fixing errors
* add changeset
* fix typo with hicap api key
* resolve comments from cline team on PR
* revert some delete console logs
* HicapModelPicker changed styled components for tailwind format, remove unnecessary hicapModelId migration, refreshHicapModel use setGlobalState function
* rebase main branch
* fix(cli): Fix config set overwriting all settings instead of merging
ENG-1115
This fix resolves the issue where 'cline config set' would overwrite all
settings instead of merging with existing values.
Changes:
1. CLI (cli/pkg/cli/config.go): Changed setCommand to use
UpdateSettingsPartial() instead of UpdateSettings()
2. Server (src/core/controller/state/updateSettingsCli.ts): Added defensive
checks for defaultTerminalProfile to prevent undefined errors
3. Added merge.go with proper settings merge logic
The fix follows git-style behavior where 'cline config set key=value'
merges with existing settings, preserving all other values.
Tested and verified:
- Setting max-requests to 999 works
- Setting edit-files-externally preserves max-requests
- Multiple successive config sets preserve all previous values
* fix: use optional proto bools to fix config set field overwrite
Root cause: Non-optional bool fields in AutoApprovalSettings proto were
transmitting zero values (false) even when not set by user, causing the
server-side merge to overwrite existing settings.
Solution: Made 'enabled' and 'enableNotifications' fields optional in proto,
matching the pattern used by AutoApprovalActions fields. This allows proper
server-side merge detection using 'field !== undefined' checks.
Changes:
- proto/cline/state.proto: Added optional keyword to two bool fields
- cli/pkg/cli/task/settings_parser.go: Use boolPtr() for optional fields
- cli/pkg/cli/task/manager.go: Fix UpdateTaskAutoApprovalAction to use boolPtr()
- Removed client-side merge logic (merge.go, UpdateSettingsPartial method)
- Simplified config.go to use UpdateSettings() directly
This approach is simpler and more maintainable than the previous client-side
merge solution, relying on the existing server-side merge logic that already
handles undefined values correctly.
* fix: Address celestial-vault feedback on proto optional fields
- Remove unnecessary error suppression in updateSettingsCli.ts
- Make max_requests optional in AutoApprovalSettings proto
- Update Go parser to use int32Ptr() for optional max_requests
- Remove hardcoded MaxRequests default in UpdateTaskAutoApprovalAction
This prevents the CLI from overwriting user-configured maxRequests values
and maintains consistency with other optional fields (enabled, enableNotifications).
* fix: Remove error suppression for missing terminal manager in updateSettingsCli
Addresses celestial-vault's feedback on ENG-1115 PR.
Previously, the check 'if (controller.task && controller.task.terminalManager)'
silently suppressed errors when a task existed but terminalManager was missing.
Now properly throws an error if task exists without terminalManager (error case),
while allowing terminal profile updates when no task is running (normal case).
wip:
wip:
wip:
fix: Adding oca auth state instead of using model id check
fix: Adding oca auth state instead of using model id check
chore: Undoing debug changes
* terminal shift enter support
* not needed
* detecting windows
* removing enhancedkeyboard
* removing enhanced keyboard
* ghostty
* proper ghostty support
* docs for posterity
* better logging
* removing md
* doctor command
* adding arguments for sync/async for doctor and keyboard setup - and moved keyboard setup to doctor command
* doctor help
* cleaning up logging and making things more explicit
* language and positioning
* standardizing color codes in plain mode
* wow even more hidden rendering - removed
* fixing stdin for restrictive shell environments
* terminal shift enter support
* not needed
* detecting windows
* removing enhancedkeyboard
* removing enhanced keyboard
* ghostty
* proper ghostty support
* docs for posterity
* better logging
* removing md
* doctor command
* adding arguments for sync/async for doctor and keyboard setup - and moved keyboard setup to doctor command
* doctor help
* cleaning up logging and making things more explicit
* language and positioning
* build: add npm package build script with telemetry injection
Add a new build script that automates the NPM package creation process with proper telemetry key injection. The script:
- Validates required environment variables (TELEMETRY_SERVICE_API_KEY, ERROR_SERVICE_API_KEY)
- Verifies Node.js can access environment variables
- Builds Go CLI binaries for all platforms
- Compiles standalone package with esbuild
- Verifies telemetry keys are properly injected into compiled code
- Provides colored output and detailed error messages
Added npm script `build:npm` to package.json for easy invocation.
This ensures consistent builds with telemetry properly configured for production deployments.
* feat(hostbridge): add telemetry settings support for CLI mode
Add GetTelemetrySettings and SubscribeToTelemetrySettings methods to EnvService to handle telemetry configuration in CLI mode.
- GetTelemetrySettings retrieves telemetry status from POSTHOG_TELEMETRY_ENABLED environment variable
- SubscribeToTelemetrySettings provides a stream for telemetry setting updates, sending initial state and keeping stream open
- In CLI mode, telemetry settings are static and determined by environment variable at startup
This enables proper telemetry control and monitoring in CLI environments.