Skip to content

Feature: Support Hooks#294281

Merged
sbatten merged 35 commits intorelease/1.109from
feature/hooks-on-1.109
Feb 11, 2026
Merged

Feature: Support Hooks#294281
sbatten merged 35 commits intorelease/1.109from
feature/hooks-on-1.109

Conversation

@pwang347
Copy link
Copy Markdown
Member

pwang347 and others added 30 commits February 10, 2026 12:07
…292763)

* Restructure hook execution to always go through the renderer process
Add output channel

* cleanup

* Fixes
* preToolUse hook supporting "deny"

* Fix tests

* Simplify tests

* Fix test
* Add common output hook types, reorganize a bit more

* test fixes
* Make explicit chat hook "internal" vs "external" types

* Renames

* Avoid types re-export

* Move to hooks/

* This
* Flesh out preToolUse hook

* Cleanup

* cleanups

* Cleanup
* Add onDidExecuteHook event to HooksExecutionService

* Fix MockHooksExecutionService to include onDidExecuteHook event

* Extend Disposable instead of using DisposableStore

* Fire onDidExecuteHook event even when no hooks are registered

* Fixes
* Improve tests

* Handle multiple post/preToolUse hooks more correctly
* hooks streaming first pass

* Update src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update styling

* modify api shape

* address some comments + do not render for now

* new icons + no more continue

* make sure we render right, some comments addressed

* uncomment that stuffs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Support PreCompact hook

* add this
* Add /hooks slash command

* await

* Build fix
* update

* updates

* Update src/vs/workbench/contrib/chat/browser/promptSyntax/hookActions.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update handling

* PR

* test

* fix test

* cleanup

* nit

* cleanup

* clean

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Move PreToolUse to extension

* Migrate PostToolUse
roblourens and others added 2 commits February 10, 2026 17:40
* Refactor hook execution

* Fix compilation: add IExtHostHooks import, remove unused IHookResult, inline ChatRequestHooks type

* Move hooks property to chatHooks proposal, sync DTS

* cleanup

* Remove dead hook execution code: proxy, RPC, output channel, progress events

All hook execution now happens in the extension via NodeHookExecutor.
HooksExecutionService is now a pure registry (registerHooks/getHooksForSession).

Removed:
- executeHook, setProxy, onDidHookProgress from service
- IHooksExecutionProxy, IHookProgressEvent, HookAbortError, formatHookErrorMessage
- hooksCommandTypes.ts, hooksTypes.ts (dead type files)
- mainThreadHooks proxy setup
- extHostHooksNode., extHostHooksWorker.
- ExtHostHooksShape. protocol
- IExtHostHooks DI registrations
- ChatHooksProgressContribution
- All associated test files

* Remove HooksExecutionService entirely

The service was only a registry for session hooks, but hooks are already
passed directly on the chat request DTO. The registerHooks/getHooksForSession
pattern was redundant.

* Restore modelName support in chatSubagentContentPart that was accidentally removed during merge

* Revert unrelated tabIndex change on chatSubagentContentPart

* Remove empty hooks ext host infrastructure

Delete IExtHostHooks, NodeExtHostHooks, WorkerExtHostHooks,
MainThreadHooks, ExtHostHooksShape, MainThreadHooksShape -
all were empty stubs after hook execution moved to extension.

* Remove mainThreadHooks import from extensionHost.contribution

* Fix DTS comments: env and timeoutSec are values, not implementation promises
pwang347 and others added 2 commits February 11, 2026 08:51
@pwang347 pwang347 added the candidate Issue identified as probable candidate for fixing in the next release label Feb 11, 2026
@pwang347 pwang347 added this to the January 2026 Chat Recovery 3 milestone Feb 11, 2026
@pwang347 pwang347 marked this pull request as ready for review February 11, 2026 17:32
@sbatten sbatten merged commit ab17acd into release/1.109 Feb 11, 2026
18 checks passed
@sbatten sbatten deleted the feature/hooks-on-1.109 branch February 11, 2026 18:37
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

candidate Issue identified as probable candidate for fixing in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants