[mirror] microsoft/vscode#307879 Git - warn that changes will be LOST when force deleting worktree#1096
Open
austindyoung wants to merge 3257 commits intomainfrom
Open
[mirror] microsoft/vscode#307879 Git - warn that changes will be LOST when force deleting worktree#1096austindyoung wants to merge 3257 commits intomainfrom
austindyoung wants to merge 3257 commits intomainfrom
Conversation
Replace the temporary chat.defaultMode experiment with a proper configuration setting chat.newSession.defaultMode whose default is driven by TAS treatment chatDefaultNewSessionMode. - Add DefaultNewSessionMode to ChatConfiguration enum - Register setting dynamically via ChatAgentSettingContribution following the registerMaxRequestsSetting pattern - Rewrite _setEmptyModelState to sync read the config setting with case-insensitive custom mode name matching - Remove unused validateChatMode, isChatMode, and getDefaultModeExperimentStorageKey - Remove IWorkbenchAssignmentService from ChatInputPart (moved to ChatAgentSettingContribution) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Sessions: Update naming (fix microsoft#306461) * .
* Update distro commit to 1992012c * Update distro commit to 084798d4 --------- Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
* Link to browser editors in tool calls * a11y, feedback
* Show browser tab icons in editor quick access pickers * feedback
…crosoft#306940) share auto approval logic bw runInTerminal and
* promptService: cache IHookDiscoveryInfo * Update src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Paul <paul_wang347@hotmail.com>
* Sessions - move more code into the view model * Hide the path in the tree
…06953) * Sessions: Add Copilot status indicator to sidebar footer Add a Copilot status button to the AccountWidget in the sessions app sidebar footer. The button shows the current Copilot status icon and opens a ChatStatusDashboard hover popup on click. - Add per-section disable options to ChatStatusDashboard to control which sections render (disableInlineSuggestionsSettings, disableModelSelection, disableProviderOptions, disableCompletionsSnooze, disableContributions) - Copilot status button is hidden when the update button is visible - Status icon updates based on entitlement, sessions, and quota state - Scoped CSS overrides for dashboard popup in sessions context Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Copilot status button accessibility and disposable leak - Set aria-label on the Copilot status button so screen readers announce the current status tooltip - Track dashboard DisposableStore via MutableDisposable registered on the widget, ensuring cleanup on widget disposal or re-click Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove native tooltip from Copilot status button Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add readable element labels in browser tool calls * feedback * detail * browser
This enables restore/undo checkpoint for agent host sessions. It also does some initial work for forking although this is not yet fully implemented. The copilot SDK does not actually support these yet, so to do these we shut down the session, rewrite copilot SDK's disk storage, and start it back up again. It actually works. We'll need to make sure it works when we upgrade the SDK, but I don't expect it to break terribly, as the Copilot SDK folks must already be backwards-compatible to arbitrary old SDK versions that exist on the user's device, and we'd essentially just be an 'old SDK' with some dependency on internals. Of course that should all be swapped out when they eventually add proper support for it. I just flagged the specific scheme of agent host sessions thus far while developing, but will clean up prior to merging.
…zations agenthost: customization syncing data flow
* feat: hide hardcoded CLI/Claude harnesses when providerApi is enabled When `chat.customizations.providerApi.enabled` is true, the browser harness service now only registers the Local (VS Code) harness statically. All additional harnesses are expected to come from extensions via the provider API rather than the hardcoded built-ins. - CustomizationHarnessService reads the providerApi setting at construction time and only includes CLI/Claude harnesses when the setting is off - Simplify _getAllHarnesses(): external harnesses no longer shadow static ones with the same id (the overlap case can't happen when providerApi is on and only Local is registered) - Simplify registerExternalHarness dispose: drop the 'restored static harness' fallback guard — always fall back to first available harness - Remove tests that verified the now-deleted external-overrides-static behaviour * fix: extension menu contributions now evaluated for the hooks section buildCreateActions() had an early 'return actions' for the hooks code path that exited before the extension menu contribution check. This meant extensions contributing to chat/customizations/create with a 'aiCustomizationManagementSection == hooks' when-clause were silently ignored. Move the AICustomizationManagementCreateMenuId evaluation (and its 'if (extensionCreateActions.length > 0) return extensionCreateActions' short-circuit) to immediately after the commandId override check and before the hooks-specific block, so extension-contributed actions take precedence for all section types including hooks.
* Add merge script for extension configuration policies from distro Adds build/lib/policies/mergeExtensionPolicies.ts which fetches the distro's product.json (at the commit pinned in package.json) and merges extensionConfigurationPolicy entries into policyData.jsonc. The --export-policy-data step only captures policies from the OSS configuration registry. Extension policies (e.g., Copilot settings) are defined in vscode-distro's product.json and are not available in the OSS dev build. This merge script bridges that gap. Workflow: ./scripts/code.sh --export-policy-data && node build/lib/policies/mergeExtensionPolicies.ts Also updates: - policyExport integration test to run the merge step - add-policy skill documentation with extension policy lifecycle * Simplify extension policy format: drop localization block from distro - mergeExtensionPolicies.ts now reads only description/category from the distro and synthesizes localization key/value pairs internally - Integration test gracefully skips merge step when distro is unavailable - Updated SKILL.md to document the simplified distro format * docs: use gh auth token in policy export command * Handle old distro format missing description/category fields * docs: add troubleshooting section for merge step in policy skill * Require description and category fields in extension policy entries * Add extension configuration policies to policyData.jsonc * Address PR feedback: fix disclaimer, log targetPath, strip GITHUB_TOKEN from test * fix: revert extension policies from policyData.jsonc, remove console.log from test Extension policies should only be added after the distro PR merges. Test runner disallows console output in tests. * Add mock distro test for mergeExtensionPolicies, remove merge from export test - mergeExtensionPolicies.ts: add DISTRO_PRODUCT_JSON env var to override the distro path (for testing without private repo access) - New test: creates a mock product.json, runs the merge script, verifies policies are added correctly and idempotently - Export test: no longer runs the merge step (avoids needing distro access or GITHUB_TOKEN in CI) * Update distro and regenerate policyData.jsonc with extension policies * Fix CI: add extension policy fixture for export test The export test now runs mergeExtensionPolicies using a checked-in fixture file instead of requiring distro access or GITHUB_TOKEN. When extension policies change in the distro, regenerate both policyData.jsonc and the fixture file. * Integrate extension policy merge into --export-policy-data - Removed mergeExtensionPolicies.ts — no separate CLI tool needed - --export-policy-data now reads build/lib/policies/extensionPolicies.json and merges extension policies into the output automatically - Single command workflow: ./scripts/code.sh --export-policy-data - Simplified test — no merge step, no GITHUB_TOKEN, no distro access - Updated SKILL.md to document the simplified workflow * Dynamic distro reading: --export-policy-data fetches from distro directly - policyExport.contribution.ts reads distro product.json dynamically: 1. DISTRO_PRODUCT_JSON env var (for testing) 2. .build/distro/mixin/stable/product.json (local checkout) 3. GitHub API with GITHUB_TOKEN (remote fetch) - New scripts/export-policy-data.sh wrapper: sets up GITHUB_TOKEN via gh CLI and runs the export - Deleted build/lib/policies/extensionPolicies.json (no static copy) - Test uses DISTRO_PRODUCT_JSON with a fixture file - Uses sandbox process.env and VSBuffer (renderer-safe) * Replace bash wrapper with cross-platform TS script - New build/lib/policies/exportPolicyData.ts: handles transpilation, GITHUB_TOKEN setup via gh CLI, and runs --export-policy-data - Added 'npm run export-policy-data' script to package.json - Removed scripts/export-policy-data.sh - Updated SKILL.md and test error message * Use OAuth device flow for GitHub token acquisition exportPolicyData.ts now acquires tokens via: 1. GITHUB_TOKEN env var (if set) 2. gh CLI (fast, non-interactive) 3. GitHub OAuth device flow (interactive, no dependencies) Based on vscode-copilot-chat's getToken.mts pattern. * Fix error messages to reference npm run export-policy-data * Fix disclaimer to reference npm run export-policy-data, clean up stale refs * Clarify test fixture is static and not expected to track distro changes * Add inline comment in test clarifying fixture is static * SKILL.md: add step to update distro commit hash in package.json * Remove inline comment per PR feedback * Remove local .build/distro/ fallback path per PR feedback
…oft#306950) * Added setting and command to control post-update info tooltip * PR feedback, enable passing markdown to the test command
…eference-error Fix null crash in task schema fixReferences
) * chat: add startup telemetry for live chat model counts After reviving sessions with pending edits at startup, log telemetry with the number of live chat models, how many are open in widgets, how many are background-only, and how many are kept alive solely because they have unaccepted edits. - Expose whenSessionsRevived promise on IChatService - Add browser-layer contribution that awaits revival + uses IChatWidgetService to classify models without hard-coded strings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * address review: error handling, void fire-and-forget, referenceCount check - Wrap reviveSessionsWithEdits with .catch() to avoid unhandled rejection - Mark logTelemetry() as void fire-and-forget - Check referenceCount === 1 for modelsKeptAliveOnlyForEdits Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove chat.statusWidget.anonymous setting
…ions (microsoft#307677) * agentHost: archive and store archive state for remote agent host sessions * stub IStorageService in remote agent host sessions provider tests
* agentPlugins: clone locally when in a remote The git extension runs on the remote side, so it's not suitable to use to clone. This just does it directly. I would kind of like to just take this path in all cases since I previously had to add some internal commands in the git extension. But for now going into next release this only affects the remote case which was previously broken. Closes microsoft#298701 * cleanup * comments
* Sessions: preserve cancelled session content in list When a session is stopped before the agent commits a worktree, keep it in the sessions list with Completed status instead of removing it. This lets the user review whatever content the agent produced before cancellation. - Use CancellationError in _waitForCommittedSession to distinguish cancellation from unexpected failures - On CancellationError in _sendFirstChat/_sendSubsequentChat, set Completed status and fire a changed event instead of removing - Add tests for committed-then-stopped and cancelled-before-commit flows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: defer CancellationError until timeout, remove unused variable - Move isCanceled check from the early-exit path to after the 5s safety timeout so a late commit event (user stops after worktree was initiated but before IPC finishes) is not missed. - Remove unused changes variable in committed-session test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Sessions - move state computation to the view model * Remove debug message * Add back the missing context key
* sessions: disable branch picker in folder mode Keep the new chat branch picker visible when isolation switches to Folder, but disable it until Worktree is selected again. Also add regression coverage for the folder/worktree toggle and keep the disabled picker cursor consistent on hover. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: remove branch picker hover cursor tweak Keep the branch picker behavior change, but drop the extra disabled hover cursor styling so the PR only contains the intended picker visibility/disabled-state update. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Append repository detail metadata, or fall back to the worktree folder name, in the sessions titlebar widget so active titles render as 'Title · repo (branch/worktree)'. Also update the sessions layout spec to document the new title format. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Lower the sessions sidebar resize floor from 270px to 170px and keep the layout specification in sync with the final sessions app behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Some old bad logic here caught up to us
…oggles the checkbox (microsoft#298074) * Initial plan * Fix clicking on settings link in bool setting toggles the checkbox When a settings link is clicked in the description of a bool setting, the MOUSE_DOWN handler was checking if `e.target.tagName === 'a'` to avoid toggling the checkbox. However, settings links rendered by the markdown renderer contain an SVG icon inside the `<a>` tag. Clicking on the SVG makes `e.target` the SVG element (not the `<a>`), causing the check to fail and incorrectly toggling the checkbox. Fix by using `targetElement.closest('a')` which traverses up the DOM tree to detect clicks within any ancestor `<a>` element. Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * Fix type safety of e.target cast in bool setting MOUSE_DOWN handler Use `instanceof Element` guard instead of casting to HTMLElement, since clicks can originate from SVGElement/SVGPathElement. Also guard against null before calling closest('a'). Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/102850fa-98da-4c19-b23a-414cbe95323b --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
…imizations (microsoft#307715) * Agent Debug Panel: pagination, incremental filtering, and service optimizations * update * feedback update
Remember last browser URL before disposal
Co-authored-by: Copilot <copilot@github.com>
* agentHost: Enable local agent host in sessions app Co-authored-by: Copilot <copilot@github.com> * comments Co-authored-by: Copilot <copilot@github.com> --------- Co-authored-by: Copilot <copilot@github.com>
From microsoft#304603 since it leads to not rendering parallel edits from Copilot CLI correctly Co-authored-by: Copilot <copilot@github.com>
…icrosoft#307736) Co-authored-by: Copilot <copilot@github.com>
* sessions: use generic sign out confirmation copy (microsoft#307465) Allow the shared account sign-out action to accept dialog copy overrides so the Agents app can show a generic confirmation instead of listing extension usage. Adds a focused test for the override path while preserving the default workbench confirmation behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: scope sign out confirmation to Agents app (microsoft#307465) Keep the Agents-specific sign-out confirmation flow inside the sessions account menu instead of extending the shared authentication sign-out action. This restores the core workbench auth dialog behavior and limits the copy change to the sessions app surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Ignore file-like domain suffixes in terminal sandbox * Handle file-like suffixes for URL and SSH domains
…oft#307783) * Clarify sandbox-first guidance for terminal tool * Refine terminal sandbox schema wording
* Initial refactoring * More cleanup * Even more cleanup * Pull request feedback
Make the force-delete confirmation for a worktree with modified or untracked files explicit about data loss, matching the existing 'IRREVERSIBLE / FOREVER LOST' language used for discard changes. Fixes microsoft#286100
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automated mirror PR for DriftFence counterfactual telemetry.
Source PR: microsoft#307879
Source URL: microsoft#307879
Mirror branch: driftfence/mirror/pr-307879/latest
This PR is maintained by automation for telemetry and review links.