This file is read by AI assistants working on the session-dashboard extension.
After making any change to extension.mjs, the assistant must include in its reply:
- The current dashboard port (from
~/.copilot/session-dashboard-port) - Whether the running process is up-to-date relative to the file mtime (so the user knows if a restart is needed)
- The URL to the relevant page (e.g.,
http://127.0.0.1:<port>/todos)
PowerShell snippet to gather this on Windows:
$port = Get-Content $HOME\.copilot\session-dashboard-port
$conn = Get-NetTCPConnection -LocalPort $port -EA SilentlyContinue | ? State -eq Listen | Select -First 1
$p = if ($conn) { Get-Process -Id $conn.OwningProcess -EA SilentlyContinue }
$fileMtime = (Get-Item $HOME\.copilot\extensions\session-dashboard\extension.mjs).LastWriteTime
"Port: $port; PID: $($conn.OwningProcess); proc started: $($p.StartTime); file modified: $fileMtime"Format the answer like:
Dashboard: http://127.0.0.1: — process started , file last modified . Restart required: YES/NO.
The port file changes every time the dashboard restarts, so always re-read it; don't reuse a stale value from earlier in the conversation.
The dashboard does NOT hot-reload extension.mjs. Any code change requires the user to restart the host Copilot CLI session. Always remind the user to restart, and note the port will change.
These models are typically accessible via https://api.githubcopilot.com/chat/completions with gh auth token. Availability varies by account/subscription — verify with a quick request before relying on a new model:
gpt-4.1— fast (~1s), reliable, supportsresponse_format: json_objectgpt-4o-mini— fast (~1.5s), supports JSON modeclaude-haiku-4.5— fast (~1.5s)claude-sonnet-4.6— slower, can timeout on large outputs
Default model for the todos parser: gpt-4.1. Fallback chain: gpt-4.1 → gpt-4o-mini → claude-haiku-4.5 → claude-sonnet-4.6.
Some models may be inaccessible per-account (HTTP 403 / 400). If a model fails consistently with not accessible via /chat/completions or similar, drop it from the chain rather than retrying.
All branches the dashboard creates are prefixed with the resolved USER_ALIAS. Resolution order (first non-empty wins):
COPILOT_DASHBOARD_USER_ALIASenvironment variableuserAliasfield in~/.copilot/session-dashboard-config.json- Local part of
git config --global user.email - Literal
"user"
New tabs are launched with ${COPILOT_CMD} --resume=<id>. COPILOT_CMD resolves from (in order):
COPILOT_DASHBOARD_CLI_COMMANDenv varcopilotCommandfield in~/.copilot/session-dashboard-config.json- Literal
"copilot"
Do not hard-code agency copilot or any internal wrapper — that breaks external users.
~/.copilot/session-dashboard-port— current dashboard HTTP port~/.copilot/session-dashboard-notes.json— per-session notes~/.copilot/session-dashboard-todos.json— todos data~/.copilot/session-dashboard-config.json— optional user config (userAlias,repoScanDirs)~/.copilot/saved-workspace.json— auto-saved workspace state~/.copilot/activity/reports/— weekly/monthly report JSON
Modern type names (use these, NOT the old assistant_response etc.):
assistant.turn_end— counted as a turntool.execution_start— counted as a tool callsession.task_complete— counted as a completionsession.error— counted as an error