Commit graph

6661 commits

Author SHA1 Message Date
Roo Code
b1bd21426b fix: address PR review feedback
- Remove dead code (meaningless ternary) in ClineProvider.getHooksStateForWebview()
- Remove console spam in HookMatcher.expandGroupPatterns for non-group patterns
- Update test to match new behavior (no warning for unknown patterns)
2026-01-21 14:58:55 +00:00
Toray Altas
a70ff8de22 feat: add LifecycleHooks and enhance hook execution
Implement LifecycleHooks and ToolExecutionHooks with full test coverage. Refactor ClineProvider and webviewMessageHandler for new hook lifecycle. Update Task logic for hook integration. All tests pass.
2026-01-21 09:55:07 -05:00
Toray Altas
8ed81bcfa8 feat: add event-specific matchers for hooks
Introduce hook event categories and event-specific matcher semantics.

- Add helper APIs to validate matchers per event
- Warn/clear invalid matchers when loading or updating config
- Update Hooks settings UI with searchable event selector and
  matcher controls that adapt to the selected event
- Add tests for matcher validation and parsing
2026-01-18 20:47:46 -05:00
Toray Altas
c0d8507be2 i18n: add translations for hook triggered message 2026-01-18 03:34:51 -05:00
Toray Altas
05a7b3f446 These should not have been in the branch in the first place 2026-01-18 03:25:57 -05:00
Toray Altas
64c4fcb2af test: fix types test import extension 2026-01-18 02:38:26 -05:00
Toray Altas
6e443bf8d4 feat: show hook execution output in chat
Stream hook stdout/stderr into chat with terminal-style HookExecution blocks.\n\nAdds hookExecutionOutputStatus protocol and persisted hook_execution rows with truncated summaries.
2026-01-18 02:37:21 -05:00
Toray Altas
caa9fd509c fix: dedupe multi-event hooks in settings UI
Send hook-centric enabledHooks state to webview (one entry per id) and expose aggregated events[] for UI rendering. Adds regression test for ClineProvider hooks state shaping.
2026-01-18 00:31:20 -05:00
Toray Altas
7d0d714258 fix: preserve multi-event hooks and multi-group matchers
- Keep multiple events for same hook id when definitions match\n- Expand matcher groups when combined with | (e.g. read|edit)\n- Add regression tests for both cases
2026-01-17 23:46:20 -05:00
Toray Altas
d9509c639a feat(hooks): restructure yaml schema and enhance ui configuration (phase 2)
- Refactor YAML structure to be hook-centric (array-based) instead of event-keyed

- Remove version key from schema and code

- Add "Copy Hook" functionality to duplicate hooks

- Enhance Settings UI:

  - Add event tooltips with descriptions

  - Add editable hook ID field with validation

  - Add multi-line command editing

  - Add "Copy" button

- Update config loader to support both new and legacy formats (read-only compatibility)

- Update config writer to always emit new format

- Add comprehensive tests for migration, copy logic, and new UI components
2026-01-17 21:04:39 -05:00
Toray Altas
469d7feedd fix(hooks): align tests and handler typing for update flow
- Update hooksSetAllEnabled tests to match global hooksEnabled toggle behavior\n- Add IHookManager.updateHook to test mocks after interface change\n- Narrow hooksUpdateHook events to HookEventType via schema validation
2026-01-17 19:47:05 -05:00
Toray Altas
609ff88969 feat(hooks): enhance configuration UI with event checkboxes and tool group matchers
- Replace raw config display with interactive controls for Events, Matchers, and Timeout

- Add backend support for updating hook configurations via hooksUpdateHook message

- Implement atomic YAML/JSON writing with event migration logic (moving hooks between keys)

- Add multi-select checkboxes for lifecycle events (PreToolUse, PostToolUse, etc.)

- Add tool group matchers (read, edit, etc.) with custom pattern fallback

- Add timeout preset dropdown (15s - 60m)

- Add comprehensive tests for config writing and UI interaction
2026-01-17 19:34:44 -05:00
Toray Altas
ad3cd20fb5 Fix: Replace old verbose matcher syntax with tool group in example hook 2026-01-17 18:11:15 -05:00
Toray Altas
0f00dc7a46 feat(hooks): add tool group matchers for simplified hook configuration
- Add getToolsForGroup() helper to expand group names to tool lists
- Update HookMatcher to support group names like "edit", "read", "browser"
- Group names are case-insensitive and expand to all tools in the group
- Unknown group names log a warning but don't break the hook
- Add comprehensive tests for group expansion functionality

Supported groups: read, edit, browser, command, mcp, modes
2026-01-17 17:14:37 -05:00
Toray Altas
fe0e61f232 feat: promote hooks from experimental to permanent feature
Remove hooks from experimental flags and make it a core feature:
- Remove HOOKS from ExperimentId enum and experimentsSchema
- Initialize HookManager unconditionally in ClineProvider
- Remove experiment checks from webviewMessageHandler
- Always show Hooks tab in SettingsView
- Add dynamic initialization with file watchers (no restart required)
- Update translations to remove restart requirement text
- Add comprehensive tests for dynamic hook initialization

The master 'Enable Hooks' toggle in HooksSettings controls execution.
2026-01-17 16:10:24 -05:00
Toray Altas
2cac5639dc style: update hooks icon to FishingHook
Replace Pickaxe with FishingHook icon from lucide-react.
Upgrade lucide-react from 0.518.0 to 0.562.0 for FishingHook support.
2026-01-17 12:54:57 -05:00
Toray Altas
cd3ef8e4bf chore: add translations for hooks settings
Add hook-related UI strings to all 17 supported locales:
- de, es, fr, ca, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW

Includes translations for:
- hooks section (~50 keys)
- experimental.HOOKS feature toggle
2026-01-17 12:22:31 -05:00
Toray Altas
fe8f6ce718 feat: display hook ID in activity log
Add hook ID to each activity log entry for easier identification of which
hook was triggered. Styled with monospace font and link color.
2026-01-17 11:48:03 -05:00
Toray Altas
5f1237f212 fix: enforce master toggle for hooks execution
- Add hooksEnabled check to all ToolExecutionHooks methods
- Hooks do not execute when master toggle is off
- Update Task.ts to inject hooksEnabled getter
- Add hooksEnabled to GlobalSettings schema and ExtensionState
- UI hides hook list when master toggle is disabled
- Add comprehensive tests for toggle enforcement (15 tests)
2026-01-17 11:42:28 -05:00
Toray Altas
36ca0ccc27 feat: add Create New Hook button and fix UI styling
- Add 'Create New Hook' button above 'Open Global Folder' button
- Remove borders from hook items to match flat MCP styling
- Implement hooksCreateNew message handler to create example.yaml
- Fix YAML template indentation to use standard 2-space format
- Add translation strings for new UI elements
2026-01-17 11:13:08 -05:00
Toray Altas
f8bd3ba870 feat: enable continuous hooks configuration reload
Move the periodic hooks configuration reload from the HooksSettings component to the main App component. This ensures that hooks are reloaded every 5 seconds whenever the feature is enabled, regardless of which settings tab is currently active.
2026-01-17 10:43:22 -05:00
Toray Altas
ad1cbc206c fix: make initializeHookManager public to resolve TS error 2026-01-17 10:26:29 -05:00
Toray Altas
6ebe2dad0a feat: gate hooks behind experimental flag
Implement hooks experimental flag with conditional UI rendering and backend functionality gating.
Fix missing experimental settings translations for hooks feature.
Fix hook discovery issue by initializing HookManager when experiment is toggled on.
2026-01-17 10:22:46 -05:00
Toray Altas
08b41f2b9e feat: display hook execution in chat 2026-01-17 00:09:32 -05:00
Toray Altas
8bb5b61555 fix: improve hooks settings layout and UI 2026-01-16 23:20:23 -05:00
Toray Altas
a13fba4c88 feat: open hook config file from UI 2026-01-16 21:11:49 -05:00
Toray Altas
ff4d057f1e feat: enhance hooks UI with delete support and status indicators
- Add switch, status dot, and delete button to HooksSettings UI
- Implement backend support for hook deletion
- Add safeWriteText utility
- Update translation strings
- Add UI and backend tests for new functionality
2026-01-16 19:46:42 -05:00
Toray Altas
e079e6c7aa feat: improve hooks settings UI
Add open project/global folder buttons at bottom
Move reload to bottom
Add enable-all toggle (with new message type)
Convert hooks list to accordion + per-hook logs
2026-01-16 18:27:13 -05:00
Toray Altas
85f2bd64dc fix: clarify tool names for hooks matchers
Update Hooks UI to explicitly document that matchers use Roo Code internal tool IDs (e.g. write_to_file, execute_command) rather than display labels.
Add regression test ensuring display labels do not unintentionally match internal IDs.
2026-01-16 17:10:13 -05:00
Toray Altas
22eda99812 feat: implement Claude Code-style hooks system
Add lifecycle hooks for tool execution with 12 event types:
- PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest
- SessionStart, SessionEnd, Stop, SubagentStart, SubagentStop
- UserPromptSubmit, Notification, PreCompact

Core implementation:
- HookManager service with config loading, validation, and execution
- HookExecutor for shell command execution with timeout, stdin JSON, env vars
- HookConfigLoader with project/global/mode-specific precedence
- HookMatcher for pattern matching (exact, regex, glob)
- ToolExecutionHooks adapter for pipeline interception

Tool pipeline integration:
- PreToolUse hooks can block or modify tool input
- PostToolUse/PostToolUseFailure for non-blocking notifications
- PermissionRequest hooks before approval prompts

Webview UI:
- Hooks tab in Settings with enable/disable toggles
- Hook Activity log with real-time status updates
- Reload config and open folder actions

Includes comprehensive tests for all components.

Relates to: Claude Code hooks feature parity
2026-01-16 14:49:38 -05:00
T
f48ea389df
Feat/issue 5376 aggregate subtask costs (#10757) 2026-01-15 16:44:55 -05:00
Hannes Rudolph
f2b16d400d
fix: handle missing tool identity in OpenAI Native streams (#10719) 2026-01-15 11:42:34 -07:00
Matt Rubens
4ee494b08c
Release: v1.106.0 (#10749) 2026-01-15 01:44:14 -05:00
roomote[bot]
724571c7bd
feat: clarify Slack and Linear are Cloud Team only features (#10748)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-15 01:16:30 -05:00
github-actions[bot]
5183be22a4
Changeset version bump (#10747)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-15 00:44:59 -05:00
Matt Rubens
afc588b8d3
Release v3.41.0 (#10746) 2026-01-15 00:39:13 -05:00
Archimedes
dba76f51e7
fix(e2e): add alwaysAllow config for MCP time server tools (#10733) 2026-01-14 23:50:17 -05:00
Daniel
d7b7e17a21
fix(litellm): inject dummy thought signatures on ALL tool calls for Gemini (#10743) 2026-01-14 23:49:22 -05:00
Hannes Rudolph
4ebbca08b0
feat: add OpenAI Codex provider with OAuth subscription authentication (#10736)
Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-14 23:48:51 -05:00
Hannes Rudolph
739b91ec40
Clear terminal output buffers to prevent memory leaks (#7666) 2026-01-14 21:24:14 -07:00
Archimedes
dbf206f06b
feat(e2e): Enable E2E tests - 39 passing tests (#10720)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
2026-01-14 12:15:54 -08:00
Hannes Rudolph
b04597faa6
feat(providers): add gpt-5.2-codex model to openai-native provider (#10731) 2026-01-14 13:02:56 -07:00
Matt Rubens
4b17f985b4
Release: v1.105.0 (#10722) 2026-01-14 10:01:05 -05:00
github-actions[bot]
d689de34f8
Changeset version bump (#10714)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-14 00:00:52 -05:00
Matt Rubens
8fdd96be3c
Release v3.40.1 (#10713) 2026-01-13 23:55:39 -05:00
Hannes Rudolph
9b1c8500d9
feat(gemini): add allowedFunctionNames support to prevent mode switch errors (#10708)
Co-authored-by: Roo Code <roomote@roocode.com>
2026-01-13 23:49:57 -05:00
github-actions[bot]
d74bad9121
Changeset version bump (#10706)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2026-01-13 18:35:32 -05:00
Matt Rubens
fdc6104031
chore: add changeset for v3.40.0 (#10705) 2026-01-13 18:24:15 -05:00
Daniel
440924ad62
fix: clear approval buttons when API request starts (ROO-526) (#10702) 2026-01-13 18:15:04 -05:00
Bruno Bergher
83037104c6
ux: improve stop button visibility and streamline error handling (#10696)
* Restores the send button in the message edit mode

* Makes the stop button more prominent
2026-01-13 18:14:08 +00:00