Skip to content

Support transcript_path on hooks#293567

Merged
roblourens merged 1 commit intomainfrom
roblou/essential-tuna
Feb 7, 2026
Merged

Support transcript_path on hooks#293567
roblourens merged 1 commit intomainfrom
roblou/essential-tuna

Conversation

@roblourens
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 7, 2026 00:25
@roblourens roblourens enabled auto-merge (squash) February 7, 2026 00:25
@roblourens roblourens self-assigned this Feb 7, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds hook-related context propagation in the chat workbench, primarily to support passing a transcript_path into hook command stdin, and to expose whether hooks are enabled on a chat request for extensions using the proposed private participant API.

Changes:

  • Add hasHooksEnabled to chat request objects (internal + proposed chatParticipantPrivate API) and populate it when building agent requests.
  • Extend hook execution to remember a per-session transcript path and include it as transcript_path in subsequent hook inputs.
  • Update hook stdin JSON serialization to convert URI-like values to filesystem paths.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts Adds hasHooksEnabled to the proposed ChatRequest type.
src/vs/workbench/contrib/chat/common/participants/chatAgents.ts Extends internal request shape with hasHooksEnabled.
src/vs/workbench/contrib/chat/common/hooks/hooksExecutionService.ts Stores transcript path per session and injects transcript_path into hook inputs; adds URI JSON replacer for logging.
src/vs/workbench/contrib/chat/common/hooks/hooksCommandTypes.ts Extends hook input type to include transcript_path and changes cwd typing.
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts Computes hasHooksEnabled from collected hooks and attaches to agent request.
src/vs/workbench/api/node/extHostHooksNode.ts Serializes hook input with a replacer that converts UriComponents to fsPath before writing to stdin.
src/vs/workbench/api/common/extHostTypeConverters.ts Plumbs hasHooksEnabled to the extension API surface with proposed-API gating.
Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/common/hooks/hooksExecutionService.ts:332

  • New behavior caches a session transcript path from the first hook input and forwards it to subsequent hook executions. There are already unit tests for HooksExecutionService; please add coverage to verify (1) transcript path extraction from input and (2) that transcript_path is included in later hook inputs when not explicitly passed again.
			// Extract and store transcript_path from input when present (e.g. SessionStart)
			const inputTranscriptPath = this._extractTranscriptPath(options?.input);
			if (inputTranscriptPath) {
				this._sessionTranscriptPaths.set(sessionKey, inputTranscriptPath);
			}

@roblourens roblourens merged commit d20d8cb into main Feb 7, 2026
23 of 24 checks passed
@roblourens roblourens deleted the roblou/essential-tuna branch February 7, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants