Commit Graph

157283 Commits

Author SHA1 Message Date
Vikram Nitin 47091c9d55 Enabled only for execution subagent 2026-05-13 17:55:36 +00:00
Vikram Nitin 9cdcfc9cdd Merge remote-tracking branch 'upstream/main' into vikram/cache_timeout_fix 2026-05-13 17:38:44 +00:00
Vikram Nitin 24a3a84337 Typo in docstring 2026-05-13 17:35:47 +00:00
Matt Bierner b64b5fc20f Merge pull request #316147 from microsoft/dev/mjbvz/yeasty-armadillo
Add improved markdown front matter rendering
2026-05-13 10:34:53 -07:00
Vikram Nitin 9d3dfcf440 Make probe limit exp based 2026-05-13 17:34:33 +00:00
dependabot[bot] 7b65828ff2 Bump protobufjs from 7.5.5 to 7.5.8 in /extensions/copilot (#316074)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.5.5 to 7.5.8.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/protobufjs-v7.5.8/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.5.5...protobufjs-v7.5.8)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-version: 7.5.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 10:33:11 -07:00
Matt Bierner b1ab6f163f Merge pull request #316138 from microsoft/dev/mjbvz/unaware-quail
Enable output renderers for code blocks in chat
2026-05-13 10:23:21 -07:00
Vikram Nitin 5d07897532 Made it configurable 2026-05-13 17:17:31 +00:00
Logan Ramos 44ea3384e9 Fix missing separator (#316270) 2026-05-13 17:14:46 +00:00
Connor Peet bb200f48bb Merge pull request #316049 from CodeEditorLand/fix-protected-override-1
fix: restore protected modifier on relayCreationTimeoutMs in test helper
2026-05-13 10:01:54 -07:00
Megan Rogge 5060335843 Set COPILOT_AGENT env var in agent terminals (#316267)
Fixes #311734

Set COPILOT_AGENT=1 in agent terminal sessions so CLI tools can
detect they are running inside an AI agent and adapt their output
(e.g. JSON instead of ANSI, disable interactive prompts, skip
animations). This follows the same pattern as other agents
(CLAUDE_CODE, CURSOR_AGENT, etc.).

Co-authored-by: Megan Rogge <meganrogge@Megans-MacBook-Pro.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 17:01:44 +00:00
Vikram Nitin c57af3e676 Addressing Copilot suggestions 2026-05-13 16:47:32 +00:00
Vikram Nitin 1b8d772fb0 Removed artificial 2 min delay 2026-05-13 16:35:29 +00:00
vs-code-engineering[bot] 40fdd83c13 fix: correct off-by-one in PreferredExtensionsPagedModel page lookup (fixes #316033) (#316042)
The pages array excludes page 0 (pre-resolved via firstPage), so
accessing this.pages[pageIndex] is off by one — pageIndex 1 should
map to pages[0]. This caused 'Cannot read properties of undefined
(reading promise)' when resolving extensions on any page after the
first.

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 16:11:56 +00:00
Logan Ramos dc3fcfe476 Support model pinning (#316253)
* Support model pinning

* Cleanup some hardcoded auto logic
2026-05-13 12:11:27 -04:00
Anthony Kim e97a9582d6 Prevent alt-buffer hang in agent host terminals (#316177)
* Detect Agent Host alternate buffer commands

* wordings

* keep agent host shell held after early command result
2026-05-13 08:59:35 -07:00
Martin Aeschlimann fec57be824 AgentCustomizationItemProvider for both local and remote (#315272)
* AgentCustomizationItemProvider for both local and remote

* update

* Potential fix for pull request finding

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

* update

* only sync plugin & extension customizations

* fix tests

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-14 01:54:09 +10:00
Paul 3016c0cd7e Chat input notification fixes (#316105) 2026-05-13 08:51:51 -07:00
Bryan Chen d44e26a323 Merge pull request #316041 from microsoft/fix/config-null-guard-316034-fe1a3002d94d23e4
fix: guard against null in doRemoveFromValueTree (fixes #316034)
2026-05-13 08:48:07 -07:00
Alex Ross f30fb07627 Wait longer to get settings in _developer.getConfigurationInformation (#316249)
* Wait longer to get settings in `_developer.getConfigurationInformation`

* CCR feedback
2026-05-13 17:35:51 +02:00
Benjamin Christopher Simmonds b8363eb195 Merge pull request #316247 from microsoft/benibenj/lesser-hippopotamus
Fix window title in agent title bar status widget
2026-05-13 16:27:18 +02:00
Dmitry Guketlev 87241c452c Make appearedInsideViewport in InlineCompletionsModel reactive (#289944) (#289946)
Fixed #289944
2026-05-13 14:21:58 +00:00
Sandeep Somavarapu 1f66fd7bd5 sessions: improve AI readiness of skill and instruction files (#316239)
sessions: improve AI readiness of skill and instructions

- Restructure SKILL.md: remove duplicated content, add mandatory
  pre-change reads (coding guidelines, source-code-organization),
  add 'When to read' column to spec table, make valid-layers-check
  mandatory, add common pitfalls section
- Enhance sessions.instructions.md: add architecture overview,
  internal layer diagram, core services table, key development
  patterns (menus, context keys, observables), and learnings section
- Remove window isolation references (not applicable)
- Remove Development Recipes from skill (already in SESSIONS.md)
- Add explicit 'Before Making Any Changes' mandatory reads block
  to ensure coverage in all harnesses (not just VS Code Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 10:07:38 -04:00
Logan Ramos fcbd887589 Remove old telemetry pipeline (#316236) 2026-05-13 16:05:54 +02:00
BeniBenj 104aa07805 fix window title in agentTtitleBarStatusWidget 2026-05-13 16:04:47 +02:00
Benjamin Christopher Simmonds acd78abdd3 Merge pull request #316238 from microsoft/benibenj/technical-gazelle
Fix window controls in agents window
2026-05-13 15:28:24 +02:00
BeniBenj 40f8fa49a2 fix window controls in agents window 2026-05-13 15:10:27 +02:00
Sandeep Somavarapu d4a82f0b33 sessions: fix customization harness layer violation by using session types (#316231)
Replace the eslint-disabled import of LOCAL_SESSION_ENABLED_SETTING from
the providers layer with ISessionsManagementService.getAllSessionTypes().
The local harness is now registered when any provider offers a session
type with id 'local', and removed when it disappears.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 14:41:42 +02:00
Logan Ramos 22aa13fb9a Remove deprecated token fields (#316230) 2026-05-13 14:41:04 +02:00
Sandeep Somavarapu 5284fa1d91 sessions: use delegation for active session and force replace on session swap (#316229)
Replace the spread-based `IActiveSession` construction with an
`ActiveSession` class that delegates all `ISession` property accesses
to the underlying session object. This keeps the active session in sync
with live session state instead of holding a stale shallow copy.

When a session is replaced via `onDidReplaceSession`, pass
`force: true` to `setActiveSession` so the active session is always
fully rebuilt — even when the session ID remains the same.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 14:40:25 +02:00
Sandeep Somavarapu a3d955d72a sessions: move providers to contrib/providers with ESLint layer rules and docs (#316227)
- Move copilotChatSessions, remoteAgentHost, and agentHost providers from
  contrib/ into a new contrib/providers/ subfolder for clearer separation
- Add ESLint layer rule 'contrib/providers/*/~' (before 'contrib/*/~') so
  sibling contrib folders cannot import directly from providers
- Update all entry points (sessions.common.main.ts, sessions.desktop.main.ts,
  sessions.web.main.ts) to reference new provider paths
- Port all upstream changes from origin/main to the new provider locations
- Add contrib/providers entry to build/lib/i18n.resources.json
- Rewrite docs: README.md, LAYOUT.md, LAYERS.md, SESSIONS.md, SKILL.md,
  sessions.instructions.md; add source-code-organization, coding-guidelines,
  and writing-tests instruction files; remove stale SESSIONS_PROVIDER.md and
  AGENTS_CHAT_WIDGET.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 12:14:40 +00:00
Benjamin Christopher Simmonds ed6d7dd686 Merge pull request #316220 from microsoft/benibenj/geographical-wasp
Fix floating windows in agents window
2026-05-13 13:28:14 +02:00
BeniBenj f9c920cda2 Fixes for floating windows in agents window 2026-05-13 13:09:43 +02:00
Benjamin Christopher Simmonds a7a48c5075 Merge pull request #316212 from microsoft/benibenj/able-prawn
Fix getPartByDocument for multiple editor parts in the same window
2026-05-13 12:48:34 +02:00
BeniBenj 209ed63e1b fix getPartByDocument for multiple editor parts in same window with none active focus 2026-05-13 12:30:21 +02:00
Benjamin Christopher Simmonds 25a53e6293 Merge pull request #316201 from microsoft/benibenj/double-canid
Fix initial editor part size
2026-05-13 11:42:49 +02:00
BeniBenj 19b086ee82 initial editor part size fix 2026-05-13 10:41:48 +02:00
vs-code-engineering[bot] 0934903575 Merge pull request #315896 from microsoft/cherry-pick/315889
[cherry-pick] Dynamically manage local harness registration based on configuration changes
2026-05-13 10:05:35 +02:00
Don Jayamanne 360550ff79 feat: enhance session model handling with vendor resolution and fallback logic (#316184)
* feat: enhance session model handling with vendor resolution and fallback logic

* Potential fix for pull request finding

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-13 09:23:04 +02:00
Bhavya U f91303fbde Freeze customizations-index per conversation to stabilize system prompt cache (#316191)
* Freeze customizations-index per conversation to stabilize system prompt cache

Adds the experimental `github.copilot.chat.freezeCustomizationsIndex`
setting (advanced/experimental/onExp, default false). When on, the
bundled <instructions>/<skills>/<agents> listing in the system prompt is
snapshotted on the first turn and reused on every subsequent turn,
preventing per-turn churn (mode swap rewriting the active subagent in
<agents>, async experimentation flipping a when-gated skill in or out)
from invalidating the system prompt cache.

When the live listing drifts from the snapshot, the updated set is
appended to the latest user message inside AgentUserMessage's context
tag — kept inside the captured RenderedUserMessageMetadata so the
historical user message replays byte-identically on later turns. Drift
also fires with an empty value when the live variable disappears, so
the model gets a signal that previously-listed entries are gone.

Fixes #315408
Fixes #316182

* Potential fix for pull request finding

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-13 17:07:15 +10:00
Tyler James Leonhardt c5d2bfd674 Claude agent: add auto permission mode + non-streaming passthrough (#316128)
* Claude agent: add auto permission mode + non-streaming passthrough

- Adds 'auto' permission mode (model-classifier) to Claude sessions, gated
  by new setting github.copilot.chat.claudeAgent.allowAutoPermissions
  (default true).
- Threads allowAutoPermissions through ClaudeSessionOptionBuilder and the
  reactive options pipeline in ClaudeChatSessionContentProvider.
- ClaudeLanguageModelServer: defer response headers until upstream content-type
  is known and propagate the SDK's stream flag via requestOptions, so the
  classifier's non-streaming (application/json) calls used by 'auto' mode
  pass through correctly alongside the existing SSE path.

* add non-streaming passthrough response handling in ClaudeLanguageModelServer

* Claude auto mode: mark setting preview, link aka.ms, honor preview features policy

- Move github.copilot.chat.claudeAgent.allowAutoPermissions into the 'preview' config section and tag it with 'preview'.
- Description now links to https://aka.ms/vscode-claude-auto-mode.
- Auto mode is gated on copilotToken.isEditorPreviewFeaturesEnabled() in addition to the setting, so org-level preview-features policy disables it.

* Claude auto mode: default false, ExperimentBased + onExp tag

- Default off; flipped via experiment.
- Setting tagged with both 'preview' and 'onExp'.
- ConfigKey.ClaudeAgentAllowAutoPermissions is now ExperimentBased; option builder and content provider read it via getExperimentBasedConfig with the injected IExperimentationService.

* Claude auto mode: default to true in the agents window

* Revert "Claude auto mode: default to true in the agents window"

This reverts commit 9083b1c2fd.

* Sessions/Claude: add 'Auto' permission mode item to picker

* Sessions/Claude: gate Auto permission mode item on allowAutoPermissions setting

* Sessions/Claude: also gate Auto on chat entitlement preview features

* Sessions/Claude: use observableConfigValue for allowAutoPermissions

* Sessions/Claude: append Auto mode when enabled instead of filtering

* Sessions/Claude: stub IConfigurationService and IChatEntitlementService in picker tests

---------

Co-authored-by: bhavyaus <bhavyau@microsoft.com>
2026-05-13 17:07:05 +10:00
dileepyavan fd7f7ce0e1 Disabling readFile tool for experimentation for gpt-5.5 (#316188)
* Fix runInTerminal sandbox wording tests

* x

* Use terminal fallback for customization file reads
2026-05-13 06:12:57 +00:00
Bhavya U c305abcf52 Anthropic Messages API: add extended (1h) prompt cache TTL behind experiment (#316178)
Re-introduces `cache_control.ttl: "1h"` for the Anthropic Messages
API tools + system breakpoints, gated on the main agent conversation
where the 2x cache-write cost trades favourably against the longer
hit window. Previously reverted from the copilot-chat repo.

All four gates must hold:
- Model is a 1M-context Claude variant (`claude-opus-4-{6,7}-1m...`)
- Setting `github.copilot.chat.anthropic.promptCaching.extendedTtl` is
  on (ConfigType.ExperimentBased, default false, advanced/experimental/onExp)
- Location is `ChatLocation.Agent` (Panel/Editor/Terminal/Notebook/
  EditingSession/Other and both proxy locations are excluded)
- Request is not a subagent (typed via
  `interactionTypeOverride === 'conversation-subagent'`, the same
  source of truth as the `X-Interaction-Type` wire header)

When all gates pass:
- The `extended-cache-ttl-2025-04-11` beta header is added
- The last non-deferred tool and the last system block carry
  `cache_control: { type: 'ephemeral', ttl: '1h' }`. The two rolling
  message breakpoints keep the default 5m TTL, satisfying Anthropic's
  longer-TTLs-before-shorter ordering rule.

Tests: messagesApi.spec.ts now at 65 tests (was 59); adds dedicated
`modelSupportsExtendedCacheTtl` and `isExtendedCacheTtlEnabled`
suites covering every gate explicitly.
2026-05-13 04:27:58 +00:00
Dmitriy Vasyura efa9345248 CI: kill lingering Windows smoke-test processes before Publish Log Files (#316173)
After Windows smoke tests finish, Electron child processes (ptyHost,
sharedProcess, network-shared, etc.) can outlive the main process and
keep .build/logs/smoke-tests-electron/*/main.log and friends locked.
That makes the 1ES auto-injected 'Publish Log Files' output fail when
it tries to hash those files (~2 minutes later), failing the whole
Windows Electron Tests job even though all tests passed.

Add a defensive cleanup step right after PublishTestResults that
force-kills any process whose executable lives under the test build
directory, so the publish step has unlocked files to hash.

Refs flaky-test occurrence in build 438755 attempt #1.
2026-05-13 03:17:11 +00:00
Don Jayamanne a3c6210a10 fix: update setModelId to accept undefined and adjust related session handling (#316168) 2026-05-13 02:35:45 +00:00
Dmitriy Vasyura bddbcf2c25 Bump @vscode/gulp-electron to 1.41.3 (retry transient network errors) (#315558)
* build: bump @vscode/gulp-electron to 1.41.3

Brings in microsoft/vscode-gulp-electron#42 which adds retry-with-backoff
around transient network errors when downloading Electron, fixing build
breaks like getaddrinfo ENOTFOUND release-assets.githubusercontent.com.

NOTE: package-lock.json will be regenerated once 1.41.3 is published.
Do not merge until then.

* Sync package-lock.json with package.json after updating @vscode/gulp-electron to 1.41.3.
2026-05-12 19:33:35 -07:00
Paul d2ce9267f5 Update to chat status dashboard contributed sections (#315134) 2026-05-13 02:31:54 +00:00
Don Jayamanne 7e7b3b271f feat: add session history language model handling to ChatInputPart (#316167) 2026-05-12 19:31:33 -07:00
Megan Rogge 57fa97f9b6 Revert "run_in_terminal: promote sync command to background after idle output" (#316165)
Revert "run_in_terminal: promote sync command to background after idle output…"

This reverts commit c414bd93de.
2026-05-12 19:31:25 -07:00
Paul 6a0d8bcddd Update manage models heading detection (#316028) 2026-05-12 19:31:11 -07:00