Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .agents/skills/launch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The clone is **slim**: workspace storage, browser caches, file history, cached V

> The launcher always sets `files.simpleDialog.enable: true` in the launched profile's `User/settings.json`. This is required for automation: VS Code's native OS file dialogs cannot be driven via `@playwright/cli` over CDP and are completely unreachable over SSH on headless macOS. The simple (quick-input) dialog can be navigated with `press` and clipboard paste. The override is per-launch and only affects throwaway profiles.

> When launching a regular editor window from an agent session, first call `get_current_session` and pass its `title` as `--session-title`. The launcher writes that title into the throwaway profile's `window.title` setting so each editor window can be mapped back to its originating session. This never modifies the source profile. Do not combine `--session-title` with `--agents`: `window.title` is read-only in the Agents window.
> Before launching from an agent session, call `get_current_session` and pass its `title` as `--session-title`. For a regular editor window, the launcher writes that title into the throwaway profile's `window.title` setting. For an Agents window, it passes the title to the Command Center. This never modifies the source profile.

> For unattended automation, pass `--disable-workspace-trust` so a trust dialog cannot block the flow or extension-host startup. The override is process-scoped and does not modify the source profile. Only use it with content you trust.

Expand All @@ -49,7 +49,7 @@ The launcher script lives next to this SKILL.md at `scripts/launch.sh` (macOS/Li
# LAUNCH=<dir-of-this-SKILL.md>/scripts/launch.sh
SESSION_TITLE=<title-from-get_current_session>
"$LAUNCH" --session-title "$SESSION_TITLE" # default: workbench
"$LAUNCH" --agents # Agents window (no custom title)
"$LAUNCH" --agents --session-title "$SESSION_TITLE"
"$LAUNCH" -- <workspace-path> # forward extra args to code.sh
"$LAUNCH" --source-user-data-dir <path> # pick a specific authed profile
"$LAUNCH" --repo <vscode-repo-root> # if not run from the repo
Expand All @@ -66,7 +66,7 @@ $skillDir = '<dir-of-this-SKILL.md>'
$launch = Join-Path $skillDir 'scripts\launch.ps1'
$sessionTitle = '<title-from-get_current_session>'
& $launch --session-title $sessionTitle # default: workbench
& $launch --agents # Agents window (no custom title)
& $launch --agents --session-title $sessionTitle
& $launch -- --use-mock-keychain # forward extra args to code.bat
& $launch --source-user-data-dir C:\path\to\profile
& $launch --repo C:\path\to\vscode
Expand Down
16 changes: 10 additions & 6 deletions .agents/skills/launch/scripts/launch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ for ($index = 0; $index -lt $cliArgs.Count; $index++) {
}
}

if ($agents -and -not [string]::IsNullOrWhiteSpace($sessionTitle)) {
Exit-Usage '--session-title is only supported for regular editor windows; window.title is read-only in the Agents window.'
}

try {
$launchStopwatch = [Diagnostics.Stopwatch]::StartNew()
if ([string]::IsNullOrWhiteSpace($repo)) {
Expand Down Expand Up @@ -491,19 +487,27 @@ try {
$settingsFile = Join-Path $destinationUdd 'User\settings.json'
$sourceSettingsFile = Join-Path $sourceUserDataDir 'User\settings.json'
$settingsScript = Join-Path $PSScriptRoot 'updateSettings.ts'
& $node $settingsScript $settingsFile $sessionTitle $sourceSettingsFile
$settingsSessionTitle = if ($agents) { '' } else { $sessionTitle }
& $node $settingsScript $settingsFile $settingsSessionTitle $sourceSettingsFile
if ($LASTEXITCODE -ne 0) {
throw "Failed to update launch settings in $settingsFile"
}
Write-LaunchError "[launch.ps1] ensured files.simpleDialog.enable=true in $settingsFile"
if (-not [string]::IsNullOrWhiteSpace($sessionTitle)) {
Write-LaunchError "[launch.ps1] set window.title for session: $sessionTitle"
if ($agents) {
Write-LaunchError "[launch.ps1] set Agents command center title for session: $sessionTitle"
} else {
Write-LaunchError "[launch.ps1] set window.title for session: $sessionTitle"
}
}
$profileReadyMs = $launchStopwatch.ElapsedMilliseconds

$launchArgs = [System.Collections.Generic.List[string]]::new()
if ($agents) {
$launchArgs.Add('--agents')
if (-not [string]::IsNullOrWhiteSpace($sessionTitle)) {
$launchArgs.Add("--session-title=$sessionTitle")
}
}
$launchArgs.Add("--user-data-dir=$destinationUdd")
$launchArgs.Add("--extensions-dir=$extensionsDir")
Expand Down
20 changes: 13 additions & 7 deletions .agents/skills/launch/scripts/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ while [[ $# -gt 0 ]]; do
esac
done

if [[ "$AGENTS" == "1" && -n "$SESSION_TITLE" ]]; then
echo "--session-title is only supported for regular editor windows; window.title is read-only in the Agents window." >&2
exit 2
fi

monotonic_ms() {
node -e 'process.stdout.write(String(process.hrtime.bigint() / 1_000_000n))'
}
Expand Down Expand Up @@ -183,13 +178,21 @@ SETTINGS_FILE="$DEST_UDD/User/settings.json"
SOURCE_SETTINGS_FILE="$SOURCE_UDD/User/settings.json"
mkdir -p "$(dirname "$SETTINGS_FILE")"
SETTINGS_SCRIPT="$(cd "$(dirname "$0")" && pwd)/updateSettings.ts"
if ! node "$SETTINGS_SCRIPT" "$SETTINGS_FILE" "$SESSION_TITLE" "$SOURCE_SETTINGS_FILE"; then
SETTINGS_SESSION_TITLE="$SESSION_TITLE"
if [[ "$AGENTS" == "1" ]]; then
SETTINGS_SESSION_TITLE=""
fi
if ! node "$SETTINGS_SCRIPT" "$SETTINGS_FILE" "$SETTINGS_SESSION_TITLE" "$SOURCE_SETTINGS_FILE"; then
echo "[launch.sh] failed to update launch settings in $SETTINGS_FILE" >&2
exit 1
fi
echo "[launch.sh] ensured files.simpleDialog.enable=true in $SETTINGS_FILE" >&2
if [[ -n "$SESSION_TITLE" ]]; then
echo "[launch.sh] set window.title for session: $SESSION_TITLE" >&2
if [[ "$AGENTS" == "1" ]]; then
echo "[launch.sh] set Agents command center title for session: $SESSION_TITLE" >&2
else
echo "[launch.sh] set window.title for session: $SESSION_TITLE" >&2
fi
fi
PROFILE_READY_MS=$(monotonic_ms)

Expand Down Expand Up @@ -217,6 +220,9 @@ if [[ "$DISABLE_WORKSPACE_TRUST" == "1" ]]; then
fi
if [[ "$AGENTS" == "1" ]]; then
ARGS=("--agents" "${ARGS[@]}")
if [[ -n "$SESSION_TITLE" ]]; then
ARGS+=("--session-title=$SESSION_TITLE")
fi
fi
if (( ${#EXTRA_ARGS[@]} )); then
ARGS+=("${EXTRA_ARGS[@]}")
Expand Down
60 changes: 0 additions & 60 deletions .github/prompts/fix-error.prompt.md

This file was deleted.

99 changes: 0 additions & 99 deletions .github/skills/fix-errors/SKILL.md

This file was deleted.

Loading
Loading