* Support prompting the user to share an existing browser tab
* feedback
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
The rich execute strategy subscribed to onExit/onDisposed AFTER awaiting
xtermReadyPromise. If the pty had already exited before execute() was
entered, those emitters had already fired and been disposed, so
Event.toPromise() subscribed to a dead emitter and never resolved -
hanging the run-in-terminal tool until the agent's 60-minute outer
timeout (16 X_AGENT_STILL_RESPONDING failures observed in eval run
25073061392).
- Add synchronous up-front check for instance.isDisposed / exitCode in
both rich and basic strategies; resolve immediately with the captured
exit code rather than subscribing to a fired-and-disposed emitter.
- In the rich strategy, move the Promise.race lifecycle subscription
setup BEFORE 'await this._instance.xtermReadyPromise' so onExit /
onDisposed are wired synchronously at function entry, closing the
race window where the pty exits during xterm initialization.
- Add unit tests for both branches in rich and basic strategies.
Fixes#313248
Strip trailing newline on terminal paste in auto mode
Prevents clipboard-hijack scenarios from auto-executing pasted commands
when the shell does not support bracketed paste mode. Right-click /
Ctrl+V paste of a command followed by a newline previously executed
immediately; now the trailing newline is stripped so the user must press
Enter to run the command.
* telemetry: add workspaceChunkSearch.tryInit event for cold-init tracking
Adds telemetry to track duration and outcome of workspace chunk search
cold initialization (getPreferredType + service creation). Records
success, noEmbeddingType, alreadyInitialized, or error outcomes.
Not fired for fast paths (no auth, already initialized).
Related: microsoft/vscode#313070
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: type outcome as string literal union per review
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* handle steering the way the SDK wants it (via priority)
* pass along properties via the queued request (rather than setting them when we get the message) so that we can set them when the message is to be yielded to the SDK
* Tons of code simplification
There's still more simplification to do... but this is getting unwieldy so let's start here.
Co-authored-by: Copilot <copilot@github.com>
* sessions: add home button to customizations header to open welcome page
Add a home icon button to the 'Customizations' collapsible header in the
Agents sidebar. The button:
- Appears on hover of the header row (opacity transition)
- Opens the AI Customizations management editor and navigates to the
welcome/overview page via showWelcomePage()
- Supports keyboard (Enter/Space), click, and touch tap (iOS)
- Shows a tooltip via IHoverService: 'Open Customizations Overview'
- Does not interfere with the existing collapse/expand toggle
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: move customizations home button to leading position
Move the home button to the start of the header (before the toggle pill)
and make it always visible. This makes the entrypoint more discoverable
for new users since it's no longer hidden behind a hover state.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: align home icon with section icons below
Use matching padding (4px 8px) so the home icon's horizontal position
matches the agent/skill/instruction icons listed below the header.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: refine home icon alignment to match section rows
Remove font-size and explicit height overrides; instead mirror the
sidebar-action-button layout exactly (padding 4px 8px + gap 10px) so
the home icon naturally sizes and aligns with the section icons.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: align home icon and tighten color hierarchy in customizations header
- Drop the header button's left padding and set the home button's right
padding to 10px so 'Customizations' sits exactly 10px after the home
icon, matching the icon->label gap of the section rows below.
- Remove the home icon's opacity dim; use the strong agentsPanel
foreground so the home icon and 'Customizations' label render at the
same color weight.
- Apply --vscode-descriptionForeground to the section rows below the
header so they read as secondary content under the prominent header.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: bump home icon size to match bold header weight
Codicons are a single-weight font, so font-weight has no effect on
icons. Increase the home icon's font-size to 18px so its visual stroke
weight matches the bold 'Customizations' label.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: revert home icon size bump
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: replace home button with 'Manage customizations' footer link
Move the entrypoint to the customizations welcome page from a header
icon to a footer link below the section list. The footer:
- Sits inside the collapsible content (collapses with the section)
- Uses subtle descriptionForeground styling with a top border separator
- Includes a right-arrow that nudges on hover for affordance
- Supports click, touch tap (iOS), and keyboard (Enter/Space)
- Restores the original header layout (no padding/color hacks)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: add customizations overview header action
Replace the footer-style Customizations entrypoint with a dedicated header home action so the overview remains accessible in both expanded and collapsed states.
Add focused browser coverage for opening the welcome page without toggling collapse.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: align customizations overview action with counts
Nudge the Customizations header overview action left so it visually aligns with the per-section count column.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: simplify customizations overview editor check
Use the concrete AI Customizations management editor type instead of a structural showWelcomePage guard when opening the overview from the sidebar header action.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a child chat in a multi-chat group was removed, _refreshSessionCache
would first remove it from _sessionCache and invalidate grouping caches.
Then _refreshSessionCacheMultiChat would try to resolve the removed chat's
group ID, but since the caches were already rebuilt without the removed
chat, _getGroupIdForChat fell back to the chat's own ID instead of the
parent group's ID. This caused the child to be treated as a 'truly removed'
standalone session rather than a group membership change, so no 'changed'
event was fired for the parent group.
Fix: resolve group IDs for removed sessions BEFORE removing them from the
cache and invalidating grouping caches.
Fixes#311987
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous reverts only changed the spec to ^1.0.34, but the resolved entries in the lockfiles still pointed at 1.0.38 (with 1.0.38 tarballs and integrity hashes). Since ^1.0.34 satisfies 1.0.38, npm ci would still install the broken version. Pin to exact 1.0.34 in all three package.json files and regenerate the lockfiles.
When clicking X on a sub-session tab, deleteChat checks chatIds.length
before finding the specific chat by URI. If the grouping cache doesn't
include the forked chat (e.g. due to stale sessionParentId metadata),
_getChatIdsInGroup returns only the main chat. The chatIds.length <= 1
check then falls through to deleteSession, which shows 'delete this
session?' and deletes the entire session including the worktree.
Fix: find the specific chat by URI first. Only fall through to
deleteSession if the chat IS found in the group AND it's the last one.
Fixes#313148
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add compareBranch to TitleAndDescriptionProvider for enhanced PR context
* feat: enhance PR description to include escaped compare branch name
* Update extensions/copilot/src/extension/prompts/node/github/pullRequestDescriptionPrompt.tsx
Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>
* feat: update pull request user message to include escaped compare branch name
---------
Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>
- Wrap GenAiAttr.TOOL_DEFINITIONS / tools_available toolDefinitions in truncateForOTel to avoid exceeding the 64KB OTel attribute cap with large tool catalogs.
- Drop misleading tool_search variant from toToolDefinitions JSDoc; the implementation requires a name and emits type:'function', so OpenAI client-side tool_search entries are intentionally skipped.
* Allow write to /tmp when allow all commands in session
Co-authored-by: Copilot <copilot@github.com>
* add tests
* add support fror windows temp
* fix: handle backslash-separated Windows paths in temp dir check
---------
Co-authored-by: Copilot <copilot@github.com>
The live event mapper cleared _currentMarkdownPartId on tool_start but
not _currentReasoningPartId. Within a single chat turn, the Copilot SDK
emits multiple rounds of (reasoning -> message -> tool calls); every
later round's reasoning was appended onto the very first reasoning
ResponsePart, which sits before any ToolCall. On restore from
in-process state, all reasoning rendered bunched at the top.
Symmetric to the history-replay fix in #312559, which only covered the
cold-restore path through _buildTurnsFromMessages.
Tests added in agentEventMapper.test.ts covering both tool_start and
tool_complete as the trigger for a new reasoning round.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: fix skill names, descriptions, and prompt attachments
- Local AH skills now use frontmatter name/description from
findAgentSkills (was always 'SKILL' from filename).
- Remote AH skills now parse SKILL.md to populate description, and
emit the SKILL.md URI rather than the skill folder URI so prompt
decoration parsing works.
- Both AH chat session contributions now declare
supportsPromptAttachments: true.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: address Copilot review feedback
- Drop redundant basename(file.uri) fallback in local skill naming;
basename(dirname(...)) already always returns a string.
- Skip remote folder-style skills whose SKILL.md cannot be read,
rather than emitting a URI that downstream parseNew would fail on.
- Add coverage for skill metadata parsing, SKILL.md URI rewrite, and
the unreadable-skill skip behavior in the remote provider tests.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: fix existing bundle test for SKILL.md read requirement
The 'hides synthetic bundle but still expands its contents' test
mocked a folder-style skill but not its SKILL.md. With the recent
change that skips folder skills whose SKILL.md cannot be read, the
mock now needs to satisfy that read.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- toolCallingLoop emits tool definitions with parameters (tool inputSchema) on the agent span and tools_available event, per OTel GenAI semantic conventions (fixes#300318).
- chatMLFetcher and BYOK providers (anthropic, gemini) now also set gen_ai.tool.definitions on each chat {model} child span so trace viewers can render the tool catalog per LLM call (fixes#299934).
- toToolDefinitions normalizer extended to handle OpenAI Responses API, Anthropic input_schema, and VS Code inputSchema shapes.