This repository was archived by the owner on May 20, 2026. It is now read-only.
add isSystemInitiated and relevant changes#4944
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “system-initiated” classification to chat requests so the extension can (a) mark requests that were triggered automatically by VS Code, (b) propagate that through prompt construction + fetch paths, and (c) emit distinct telemetry / interaction headers (for downstream billing/analytics differentiation).
Changes:
- Introduces
isSystemInitiatedon the (proposed) VS CodeChatRequestshape and propagates it into the agent prompt layer. - Adds
ISystemInitiatedRequestOptionsand threads it through networking/fetcher APIs to set a distinctX-Interaction-Type. - Emits
isSystemInitiatedin panel telemetry and adjusts “userInitiatedRequest” calculation to exclude system-initiated requests.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/networking/common/networking.ts | Extends request-kind options and maps system-initiated to conversation-system-initiated interaction header. |
| src/extension/vscode.proposed.chatParticipantPrivate.d.ts | Adds isSystemInitiated?: boolean to the proposed ChatRequest API docs. |
| src/extension/prompts/node/agent/agentPrompt.tsx | Plumbs isSystemInitiated into AgentUserMessage and skips wrapping/context for system-initiated prompts. |
| src/extension/prompt/node/defaultIntentRequestHandler.ts | Sets telemetry subtype + request kind options when the request is system-initiated. |
| src/extension/prompt/node/chatParticipantTelemetry.ts | Adds isSystemInitiated property to panel.request telemetry payload/GDPR schema. |
| src/extension/prompt/node/chatMLFetcher.ts | Extends requestKindOptions typing and maps system-initiated to interaction type for WebSocket fetch path. |
| src/extension/intents/node/toolCallingLoop.ts | Ensures userInitiatedRequest is false for system-initiated requests. |
roblourens
reviewed
Apr 2, 2026
roblourens
reviewed
Apr 2, 2026
dmitrivMS
previously approved these changes
Apr 2, 2026
dmitrivMS
previously approved these changes
Apr 2, 2026
ff4bf34 to
77463d7
Compare
dmitrivMS
previously approved these changes
Apr 2, 2026
mjbvz
previously approved these changes
Apr 2, 2026
roblourens
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.