Commit Graph

148279 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
cca463e9f1 Initial plan 2026-03-06 01:01:24 +00:00
copilot-swe-agent[bot]
4743e19d32 fix: use vscode codicon as theme icon for Release Notes tab
Co-authored-by: mjbvz <12821956+mjbvz@users.noreply.github.com>
2026-03-06 00:47:05 +00:00
copilot-swe-agent[bot]
1775c2e2c9 Initial plan 2026-03-06 00:40:51 +00:00
Osvaldo Ortega
1df31f9b57 scenarios update 2026-03-05 16:39:27 -08:00
Connor Peet
ea3dfdd3ae mcp: fix sampling model selection to exclude CLI models (#299635)
mcp: fix default model selection to exclude CLI models

- Changes _findMatchingModel to use a new _getDefaultModels helper instead
  of filtering for models with ChatAgentLocation.Chat default location
- The new _getDefaultModels method filters for free models (no multiplier
  numeric or target chat session type), preventing CLI-only models from
  being selected as defaults by default
- Also removes unused ChatAgentLocation import

Fixes #299336

(Commit message generated by Copilot)
2026-03-05 16:35:24 -08:00
Osvaldo Ortega
b3d3885114 Add E2E test scenarios for chat functionality and session navigation 2026-03-05 16:26:52 -08:00
Osvaldo Ortega
b8a0a3b270 Use natural language assertion for change count
The agent will interpret 'Verify a change count appears in the
session list' by finding +N/-N text in the snapshot during generate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 16:26:37 -08:00
Justin Chen
868871202b fix terminal autopilot + some description language (#299562)
* fix terminal autopilot + some description language

* fix ci

* use last focused widget:

* autoreply in autopilot

* better wording around task complete tool + auto reply for ask questions
2026-03-05 16:19:22 -08:00
Osvaldo Ortega
ae5f23c794 Rename compiled/ to generated/ for clarity
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 16:07:31 -08:00
Osvaldo Ortega
10235dfc91 Add 5 E2E test scenarios for Sessions dogfooding
1. Chat response — send message, verify mock response appears
2. File changes — send 'build' message, verify change count in sidebar
3. Session in sidebar — send message, verify it shows in session list
4. Local/Cloud toggle — switch modes, verify UI updates
5. Session navigation — create two sessions, navigate back, verify history

Removes old scenarios that no longer match the mock setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 16:05:10 -08:00
Matt Bierner
d6cd758cb9 Merge pull request #299631 from mjbvz/dev/mjbvz/left-cricket
Use older zip.js
2026-03-05 16:04:29 -08:00
Osvaldo Ortega
0fa3bb5f54 Provide detailed file changes with URIs in session items
Instead of just counts, provide IChatSessionFileChange objects with
actual file URIs so the Changes view can display individual files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 16:00:08 -08:00
Osvaldo Ortega
80102b6bda Add mock file changes driven by message keywords
Messages with 'build/create' emit 3 file edits (build.ts, config.ts,
package.json). Messages with 'fix/bug' emit 1 edit (utils.ts).
Messages with 'explain' emit no changes.

File edits are streamed as IChatProgress textEdit items. Session items
include changes count (files/insertions/deletions).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:52:13 -08:00
Osvaldo Ortega
f85211c921 Store in-memory session history for re-opening sessions
Conversations are stored per session URI in a Map. When a session
is re-opened, provideChatSessionContent returns the stored history
so previous messages are visible. Not persisted across reloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:39:55 -08:00
Osvaldo Ortega
4bf39b4af3 Track sessions from agent invoke, not requestHandler
The requestHandler wasn't being called (agent invoke takes precedence).
Move session tracking to the agent's invoke callback so the session
list updates after each chat response.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:35:19 -08:00
Osvaldo Ortega
6a7b8f196f Add in-memory session list via IChatSessionItemController
After each chat response, the session is added to an in-memory list
and the item controller fires onDidChangeChatSessionItems so the
sidebar session list updates. Sessions are not persisted across reloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:32:54 -08:00
Osvaldo Ortega
81482f5316 Fix response spinner by setting isCompleteObs after requestHandler
The spinner kept spinning because the response was never marked
complete. The mock session now sets isCompleteObs to true after
streaming the response, which triggers response.complete().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 15:28:34 -08:00
Logan Ramos
8d20dd5210 Fix model swap (#299621) 2026-03-05 23:25:42 +00:00
Megan Rogge
b24b147db4 ensure slash command usage is tracked and causes tip to hide (#299596)
fixes #299443
2026-03-05 15:23:53 -08:00
eli-w-king
8a6956e503 steer uses up arrow (same as send default) 2026-03-05 14:58:50 -08:00
Matt Bierner
7165ef63e3 Use older zip.js 2026-03-05 14:47:37 -08:00
Osvaldo Ortega
df3421fa17 Register mock chat session content provider for copilotcli scheme
The 'Can not find provider' error was because no extension registered
a content provider for the copilotcli:// URI scheme. Now the
MockChatAgentContribution registers providers for both 'copilotcli'
and 'copilot-cloud-agent' schemes with a requestHandler that returns
canned responses.

Also removes chat participant from mock extension to avoid conflict
with the workbench contribution's agent registration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:32:29 -08:00
Osvaldo Ortega
989a7e0afc Fix IChatProgress import path (chatService/chatService.ts)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:20:08 -08:00
Osvaldo Ortega
31350b81b4 Add mock chat agent and folder pre-seeding via workbench contribution
MockChatAgentContribution registers dynamic agents for 'copilotcli',
'copilot', and 'copilot-cloud-agent' IDs with canned responses.
Also pre-seeds agentSessions.lastPickedFolder storage key.

Uses registerWorkbenchContribution2 pattern so the mock agent is
registered by the DI system with proper service injection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:18:53 -08:00
Osvaldo Ortega
6012003733 Move TS test files to src/vs/sessions/test/
The test/e2e/ directory was too deep for TypeScript to resolve imports
back to src/vs/. Move to test/ (one level up) where imports work.

E2E runner scripts (.cjs) and scenarios stay in test/e2e/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:03:51 -08:00
Osvaldo Ortega
02d5d0ed10 Move test files to src/vs/sessions/test/e2e/
Keeps all E2E test code (mocks, runners, scenarios, extensions) in one
place, separate from production Sessions code. Updates import paths,
server path, and ESLint config.

Note: ESLint import-patterns warnings remain because the relative
imports from test/e2e/ depth don't match the restriction glob syntax.
This is cosmetic — the imports are valid TypeScript.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 13:58:54 -08:00
Megan Rogge
2252c1911d fix close button positioning (#299611)
fixes #299579
2026-03-05 21:57:33 +00:00
Matt Bierner
31a7e36b49 Merge pull request #299526 from mjbvz/dev/mjbvz/apparent-trout
Temporarily restore webpack ext builds
2026-03-05 13:57:12 -08:00
copilot-swe-agent[bot]
002eadd84c fix: correct deprecated TypeScript format.enable setting name in tooltip
Co-authored-by: mjbvz <12821956+mjbvz@users.noreply.github.com>
2026-03-05 21:52:35 +00:00
copilot-swe-agent[bot]
655fe3f4c1 Initial plan 2026-03-05 21:47:28 +00:00
Megan Rogge
a5876c850f fix some issues with tips, remove some (#299608) 2026-03-05 13:44:14 -08:00
Matt Bierner
e1116427ee Restore old package-lock exact version 2026-03-05 13:28:32 -08:00
Matt Bierner
356e210df9 Merge branch 'main' into dev/mjbvz/apparent-trout 2026-03-05 13:08:07 -08:00
Osvaldo Ortega
e6e0ccf371 Mock IDefaultAccountService to hide Sign In button
The Sign In button in the sidebar uses IDefaultAccountService, not
IChatEntitlementService. Mock it to return a fake signed-in account.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 12:49:45 -08:00
Osvaldo Ortega
e75510278a Remove unused Emitter import
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 12:04:08 -08:00
Osvaldo Ortega
4d61c82ede Add Approach 2: Service overrides for E2E mock testing
New files:
- web.test.ts: TestSessionsBrowserMain with MockChatEntitlementService
- web.test.factory.ts: Factory using TestSessionsBrowserMain
- sessions.web.test.internal.ts: Test entry point

Server uses test entry point when --mock, which injects a mock
IChatEntitlementService returning ChatEntitlement.Free with
installed=true, so Sessions thinks the user is signed in.

Also adds ESLint import patterns for sessions web entry points.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:57:48 -08:00
Osvaldo Ortega
7fc071c83b Use mock-fs:// scheme instead of github-remote-file://
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:46:28 -08:00
Osvaldo Ortega
4b72d7e678 Open mock workspace folder when --mock is used
Pre-sets the workspace to github-remote-file://mock-repo/ so the
Sessions UI starts with a folder already open, backed by the mock
file system provider from the E2E extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:44:57 -08:00
Osvaldo Ortega
f3a4923c94 Fix mock extension engines.vscode version to ^1.100.0
The web extension scanner rejects '*' as not specific enough.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:41:06 -08:00
Osvaldo Ortega
fafc62f5ac Add mock web extension for E2E testing
New extension at extensions/sessions-e2e-mock/ provides:
- Mock GitHub auth provider (fake token, skips sign-in)
- Mock chat participant (canned responses based on input keywords)
- Mock file system for github-remote-file:// (in-memory files)

Server loads the extension when --mock flag is passed. The generate
and test runners both use --mock automatically.

New npm scripts:
- serve:mock — opens Sessions in browser with mocks loaded

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:34:34 -08:00
Osvaldo Ortega
c677691c87 Add --skip-welcome flag to web server and serve script
The serve script now opens with ?skip-sessions-welcome to bypass
the sign-in overlay during manual testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:16:31 -08:00
Raymond Zhao
b290036d24 chore: test gif transfer (#299560) 2026-03-05 19:15:11 +00:00
Osvaldo Ortega
17a5f769e8 commands updates 2026-03-05 11:07:21 -08:00
Osvaldo Ortega
b8932e4a4e Add missing path import in generate.cjs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:05:13 -08:00
Osvaldo Ortega
d48c405b44 Move .commands.json into scenarios/compiled/ subfolder
Keeps scenario markdown separate from generated command files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:02:31 -08:00
Megan Rogge
412a817d88 fix chat question height (#299557)
fix #299556
2026-03-05 18:59:56 +00:00
Osvaldo Ortega
5ea9b21035 Add E2E scenarios for repository picker and cloud target actions 2026-03-05 10:56:10 -08:00
Osvaldo Ortega
84d2b3a4c6 Fix quoted argument parsing in generate and test runners
Pass command strings directly to runPlaywrightCli() which already
handles quote-aware splitting, instead of naive whitespace split
that breaks 'type "build the project"' into 4 args.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:56:01 -08:00
Kyle Cutler
daf369a0ea Validate URLs in open browser tool (#299555) 2026-03-05 18:55:26 +00:00
Osvaldo Ortega
adbd8ca072 Replace regex-based runner with compile-and-replay architecture
New approach:
- generate.cjs: Uses Copilot CLI to compile .scenario.md files into
  .commands.json by feeding each step + accessibility snapshot to the LLM.
  The agent returns exact playwright-cli commands (e.g. 'click e143').
- test.cjs: Replays .commands.json deterministically. No LLM calls, no
  regex matching, no icon stripping. Just sequential playwright-cli commands.
- common.cjs: Shared helpers (server, playwright-cli wrapper, parser).

Workflow: npm run generate (slow, LLM) → npm test (fast, deterministic).
The .commands.json files are committed to git so tests are reproducible.

Removes all old infrastructure: run.cjs, actionMap.ts, scenarioParser.ts,
sessionApp.ts, scenarios.spec.ts, mock extension, tsconfig, old scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 10:49:15 -08:00