Skip to content

Agent Debug Panel: Map hook events to right category#307260

Closed
vijayupadya wants to merge 1 commit into
mainfrom
digital-donkey
Closed

Agent Debug Panel: Map hook events to right category#307260
vijayupadya wants to merge 1 commit into
mainfrom
digital-donkey

Conversation

@vijayupadya
Copy link
Copy Markdown
Contributor

Map hook events to right category

Copilot AI review requested due to automatic review settings April 1, 2026 21:18
@vijayupadya vijayupadya marked this pull request as ready for review April 1, 2026 21:19
Copy link
Copy Markdown
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

Updates the Agent Debug Logs filtering logic to treat "hook" debug entries as part of the “Chat Customization” (prompt discovery) filter group.

Changes:

  • Adds a kind === 'hook' branch in ChatDebugFilterState.isKindVisible(...) that maps hook entries to the prompt discovery visibility toggle.

Comment on lines 56 to 60
return true;
}
return this.filterKindPromptDiscovery;
case 'hook': return this.filterKindPromptDiscovery;
case 'subagentInvocation': return this.filterKindSubagent;
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

isKindVisible now special-cases kind === 'hook', but the debug event stream consumed by the Logs/Flow views is IChatDebugEvent, whose kind union currently does not include 'hook' (see src/vs/workbench/contrib/chat/common/chatDebugService.ts). I also couldn't find any call sites passing 'hook' into isKindVisible, so this branch looks unreachable and likely won't change filtering behavior.

If hook-related entries are currently emitted as generic events, consider keying off category (similar to the existing category === 'discovery' handling) or adjusting the producer/type model so hook entries actually arrive with kind: 'hook' and are handled consistently across the debug UI.

See below for a potential fix:

				// the prompt discovery pipeline (category === 'discovery')
				// and hook-related entries (category === 'hook'). Other
				// generic events (e.g. from external providers) are always
				// visible and are not affected by this toggle.
				if (category === 'discovery' || category === 'hook') {
					return this.filterKindPromptDiscovery;
				}
				return true;

Copilot uses AI. Check for mistakes.
@vijayupadya vijayupadya marked this pull request as draft April 1, 2026 21:28
@vijayupadya vijayupadya closed this Apr 1, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants