dsh-github-copilot 0.4.0-alpha.109 → 0.4.0-alpha.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -49,11 +49,13 @@ This repository owns eleven narrow surfaces:
49
49
 
50
50
  Identity presentation uses additive `ensureIdentity` Remotes, including explicit-Agent Session lookup. Keep `get` metadata-only; visible surfaces may ensure on their sixty-second cadence. Fresh ten-minute cache avoids requests, same-account consumers join a bounded flight, and failures cool down thirty seconds unless explicitly refreshed. Credential notifications revoke pending work even when token bytes are unchanged; no late cache publication. Quota may settle independently only with account-coherent metadata. Presentation cache never replaces fresh identity validation for switch, reauthorization or duplicate checks. Preserve strict sanitized diagnostics and Session/turn ownership (#309).
51
51
 
52
+ Account display names survive freshness expiry in bounded Host memory, never credential invalidation or failed verification. Visible account lists may ensure missing configured names without activating accounts; no disk name cache, credential copying or identity-based authorization. Turn admission captures the first verified name for the frozen account. A missing name may be filled by one existing nonforcing account-bound lookup only during that exact active, uncancelled turn/signal; never after turn/end/disposal. Evidence still requires actual native delivery and never reconstructs completed history (#322).
53
+
52
54
  The user approved independently authorized account records in the existing DSH credentials service. The canonical `llm-pi-ai/github-copilot` record remains unchanged as the compatibility account. Additional plugin-owned `github-copilot/account-<opaque-id>` records must be written directly by official pi-ai OAuth through public account-bound stores; never copy/move grants, refill the canonical record, introduce a separate credential storage service, patch Core, or implement another wire/catalog. Native `Models.getAuth()` and DSH `modifyRecord()` remain the refresh and serialization owners.
53
55
 
54
56
  Settings store only the opaque global account selector and explicit `sessionAccounts` rows. Missing/invalid selectors or records fail explicitly, without another-account fallback. Models manages reauthorization/removal and the global default; Credits may select an already authorized account for this Session's subsequent turns, restore global inheritance or run add-only authorization without selecting it (#305/#318). An explicit choice equal to the default remains explicit. Freeze account ownership before Auto assessment and request admission, holding mutation fences until native `turn/end`/disposal; later Session/default changes never redirect running steps, retries or search. Account-local credentials, metadata, quota, proof cancellation and native adapter composition must remain isolated. Keep one public adapter/controller registration, with no second wire/catalog or Core changes. Reauthorization/removal of a pinned record stays blocked; global-default selection may continue independently.
55
57
 
56
- Account selection shows the current account and searchable Switch, never a flat unbounded account list. One Models Manage disclosure contains account management and cross-account exact-ID model preferences. Continuation settings belong beside account controls. Persist the initial default-on epoch and later global changes with path-level CAS; only unseeded Sessions born after a known epoch inherit it, never retroactively enroll existing/unknown/forked histories. Persistent Session overrides and bounded turn/signal filtering remain separate from Host-lifetime next-turn authorization. Explicit-off account changes require persistent/next-turn/off/cancel choices, then fresh account revision readback before CAS. No automatic send/retry, history writes, private Settings navigation or inferred encrypted account origin. The approved synthetic mock and current navigation limit are documented in [account management](./docs/account-management-experience.md).
58
+ Account selection shows the current account and a compact Switch dropdown with no account search, never a flat unbounded account list. Mark the current choice, scroll long lists internally and place Add at the bottom. Saved-account reauthorization/removal remains in a separate management disclosure. One Models Manage disclosure contains account management and cross-account exact-ID model preferences. Continuation settings belong beside account controls. Persist the initial default-on epoch and later global changes with path-level CAS; only unseeded Sessions born after a known epoch inherit it, never retroactively enroll existing/unknown/forked histories. Normal Client continuation uses only the persistent Session policy; no next-turn-only or temporary-recovery duration choices. Explicit-off account changes require persistent-enable/keep-off/cancel choices, then fresh account revision readback before CAS. Exact replay failures offer loss-disclosed persistent Enable/Cancel when off, diagnostics without repeated authorization when on. Missing policy evidence fails explicitly, never a temporary authorization fallback. Retain old next-turn/recovery strict Remote contracts and Host admission for compatibility; failure-evidence expiry does not disable the persistent policy. No automatic send/retry, history writes, private Settings navigation or inferred encrypted account origin. The approved synthetic mock and current navigation limit are documented in [account management](./docs/account-management-experience.md).
57
59
 
58
60
  Use hidden volatile `sessionAccounts` with path-level SettingsForms CAS, readback and restart evidence. Session account Remotes use explicit viewed IDs, native Agent lookup and strict codecs, never automatic Client scope. Credits uses that Session's account for identity/quota, rejecting mismatched or late results. Historical Account is an additive assistant-actions disclosure beside native Usage, captured only after a real ordinary native chunk; bounded Host-lifetime evidence becomes unknown after restart/eviction and is never reconstructed from today's settings. No new durable events, history/default/model/Usage writes, automatic account fallback, replay deletion or message retry. See [the requirements and acceptance gates](./docs/copilot-accounts.md).
59
61
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.111 (prepared)
4
+
5
+ - Retain verified saved-account display names beyond the ten-minute revalidation interval in bounded Host memory. Models and Session Credits resolve missing inactive account names without switching accounts; credential changes, removal and failed verification still invalidate names (#322).
6
+ - Capture identity for the frozen admitted account and non-blockingly ensure missing identity once per active turn. Preserve the first verified name, require native delivery for execution evidence, and reject late/aborted/completed-turn enrichment. Refresh the account footer at native completion.
7
+ - Keep existing strict Remote descriptors, credential ownership, model-access validation, history and Usage unchanged. No persistent name store, Core changes, live installation or restart.
8
+
9
+ ## 0.4.0-alpha.110 (prepared)
10
+
11
+ - Replace searchable account-switch forms with one compact anchored dropdown in Models and Chat: current-choice checkmark, bounded internal scrolling and Add account footer (#320).
12
+ - Separate saved-account reauthorization/removal from switching. Preserve global confirmation, explicit-off continuation consent, fresh revision readback, cancellation and admitted-turn ownership; selecting never sends or retries.
13
+ - Record the approved dropdown mock and keyboard/mobile behavior. No Core changes, credential migration, live installation or restart.
14
+ - Unify normal continuation and failure guidance around the persistent Session policy. Remove duration radios and next-turn-only actions; when off, disclose loss and offer Enable/Cancel, when on, show diagnostics without repeated authorization. Existing temporary recovery contracts remain compatibility-only; their evidence expiry does not expire the persistent policy.
15
+ - Omit the nonfunctional Chat management entry and unavailable-navigation paragraph when no public Models navigation callback exists; keep full management in Models.
16
+
3
17
  ## 0.4.0-alpha.109 (prepared)
4
18
 
5
19
  - Record the approved synthetic account-management mock and unify current-account/Switch interactions in Chat and Models. Search bounded account lists, add without selecting, and retain guarded full management inside one Models Manage disclosure with shared exact-ID model preferences (#318).
package/README.md CHANGED
@@ -15,11 +15,11 @@ Inside **Credits**, choose a saved account for this Session's subsequent turns o
15
15
  restore **Follow global default**. Running turns retain their original account.
16
16
  Identity display accepts GitHub Enterprise Managed User names, including their underscore-separated enterprise suffixes.
17
17
 
18
- Visible Models and Credits renew expired identity without forcing fresh reads on every mount: ten-minute identity cache, shared per-account requests and a thirty-second failure cooldown. Explicit refresh retries immediately; quota can settle while identity renews. Unknown or revoked identity is never shown as current, and Session account isolation is unchanged. See [account lifecycle](./docs/copilot-accounts.md).
18
+ Visible Models and Credits resolve missing names for saved accounts without activating them. Verified names remain cached for the Host lifetime, including inactive accounts; the ten-minute freshness interval governs revalidation, not name display. Credential changes, removal and failed identity verification invalidate names. Shared per-account requests and a thirty-second failure cooldown remain; explicit refresh retries immediately. Names do not prove authorization or model access. See [account lifecycle](./docs/copilot-accounts.md).
19
19
 
20
20
  Adding an account now keeps the device-authorization link, selectable URL, one-time code, Copy code action and Cancel together while authorization is pending. After GitHub authorizes, identity and model verification are shown as a separate phase. Adding never changes the global default; use the existing explicit **Switch** action when ready. Technical diagnostics are secondary, and account/turn identity fallbacks never expose opaque account IDs or infer historical identity from today's settings.
21
21
 
22
- **Source candidate: `0.4.0-alpha.109` (unreleased). Supported host: official DSH / Windows Desktop `0.2.0-rc.2`.** Earlier DSH pins are historical evidence, not supported installation targets. Publication, profile installation and the version loaded by a running Host are separate states. The versioned commands below are for this candidate after publication, not evidence that its assets exist.
22
+ **Source candidate: `0.4.0-alpha.111` (unreleased). Supported host: official DSH / Windows Desktop `0.2.0-rc.2`.** Earlier DSH pins are historical evidence, not supported installation targets. Publication, profile installation and the version loaded by a running Host are separate states. The versioned commands below are for this candidate after publication, not evidence that its assets exist.
23
23
 
24
24
  ## What you can do
25
25
 
@@ -59,10 +59,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
59
59
  For a **standalone named profile**:
60
60
 
61
61
  ```sh
62
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/dsh-github-copilot-0.4.0-alpha.109.tgz
62
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/dsh-github-copilot-0.4.0-alpha.111.tgz
63
63
  ```
64
64
 
65
- For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.109` after publication. Official rc.2's **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
65
+ For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.111` after publication. Official rc.2's **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
66
66
 
67
67
  After an approved reload/restart:
68
68
 
@@ -74,7 +74,7 @@ Sign-out requires an explicit action and removes only the active account's autho
74
74
 
75
75
  In **Manage → GitHub accounts**, adding an account never replaces the global default. During device authorization, the card keeps the verification link and selectable URL, one-time code, **Copy authorization code**, and **Cancel adding account** together. Once authorization succeeds, the card separately verifies identity and available models; a completed addition is still not a default switch. Diagnostic codes remain in a collapsed technical-details disclosure. **Refresh account information** renews identity only; it does not complete or cancel authorization. A confirmed switch changes future inherited turns, not running turns or explicit Session overrides. **Credits → Switch account** persists a choice only for this Session's subsequent turns; **Follow global default** clears it. Explicitly choosing today's default still remains a Session override. Native-route or incomplete evidence blocks account switching. The new account may not offer your selected model, and old encrypted replay may be account-bound: no automatic model substitution or history removal occurs. **Reauthorize** renews the same saved identity; **Remove** deletes only an inactive saved authorization and cannot mutate a running turn's pinned account. Missing/revoked accounts never fall back.
76
76
 
77
- Completed managed turns show **Account** beside native Usage. It records the request account, not billing or subagent totals. A GitHub login is shown only if captured for that turn; otherwise identity is unavailable, never reconstructed from current settings. Evidence is bounded to the Host lifetime; restart, cold history or missing delivery displays unknown, never reconstructed from the current picker/default. Credits labels an unidentified original or saved authorization without displaying opaque account IDs.
77
+ Completed managed turns show **Account** beside native Usage. It records the request account, not billing or subagent totals. A verified name is frozen at admission; if missing, an existing bounded non-forcing lookup for that exact account runs without delaying model delivery and can fill identity only while the same turn remains active. No account evidence exists before native delivery. Missing identity remains unavailable; completed history is never backfilled from current settings. Evidence is bounded to the Host lifetime; restart, cold history or missing delivery displays unknown. Credits labels an unidentified original or saved authorization without displaying opaque account IDs.
78
78
 
79
79
  Account eligibility reads official rc.2 SettingsForms values, without requiring the retired settings `get()` API. Missing or malformed configuration remains incomplete evidence; upgrading does not bypass native-route or activity restrictions.
80
80
 
@@ -169,12 +169,12 @@ Configuration is under `github-copilot`. Credentials, endpoint definitions and a
169
169
  | Selection unknown/unavailable | Distinguish lost evidence from read failure; Retry only rereads |
170
170
  | Missing/cancelled Turn Usage | Read [usage limitations](./docs/copilot-usage.md); do not infer zero billing |
171
171
  | History fails on `github-copilot/auto-model-decision` | Use [detached, check-first recovery](./docs/automatic-model-routing.md#recovering-affected-histories); never replace live history without stopped writers and approval |
172
- | AUTH, Responses replay-scope or TLS failure | Review [request diagnostics](./docs/model-compatibility-acceptance.md#authentication-replay-and-request-diagnostics) and [usage TLS boundaries](./docs/copilot-usage.md#account-data-boundary). After an exact scope rejection, **Replay recovery** appears automatically when the session's turn ends or the session opens. Review the loss of matching old encrypted items and their summaries, then authorize **Next matching turn only** (default choice) or **Continue in this session**. Both expire within one hour of the evidence and require the same validation state. Recovery itself stays off until confirmed; use native Send/Retry separately. It never rewrites history or retries automatically, and is not a 408 fix. Never reset credentials or disable TLS as an automatic repair. |
172
+ | AUTH, Responses replay-scope or TLS failure | Review [request diagnostics](./docs/model-compatibility-acceptance.md#authentication-replay-and-request-diagnostics) and [usage TLS boundaries](./docs/copilot-usage.md#account-data-boundary). After an exact scope rejection, **Replay recovery** shows the same persistent Session continuation policy: when off, disclose loss and offer **Enable visible-history continuation** or Cancel; when already on, show diagnostic guidance without repeated authorization. No duration or next-turn-only choice. Evidence expiry does not disable the policy. Use native Retry separately; no automatic send/retry or history rewrite, and not a 408 fix. Never reset credentials or disable TLS as an automatic repair. |
173
173
  | Hosted search unavailable | Check account/protocol/probe diagnostics; a legacy override stays authoritative until explicitly reset |
174
174
 
175
- The Credits account panel shows the current account and **Switch**; Models has one **Manage** disclosure for account management and shared model preferences. Search saved accounts, add without selecting, and confirm guarded local removal in Models. Exact-ID exclusions are shared across accounts; availability is account-specific. See the [approved experience and interactive mock](./docs/account-management-experience.md).
175
+ The Credits account panel shows the current account and **Switch**; Models has one **Manage** disclosure for account management and shared model preferences. Both use a compact dropdown without account search: the current choice is checked, long lists scroll internally, and Add sits at the bottom without selecting the new account. Models retains guarded local removal and reauthorization in a separate management disclosure. Exact-ID exclusions are shared across accounts; availability is account-specific. See the [approved experience and interactive mock](./docs/account-management-experience.md).
176
176
 
177
- [Visible-history continuation](./docs/session-continuation.md) is configured beside account switching, not permanently above the composer. New unseeded Sessions default on after the feature's first successful activation; existing Sessions and inherited histories remain off unless explicitly authorized. Global defaults affect new Sessions only; Session on/off overrides persist. With continuation off, a different-account switch offers persistent enable, next-turn-only, keep off or cancel. Each new enabled turn omits prior encrypted reasoning and embedded summaries, even on the same account; current-turn reasoning, visible messages, tools and disk history remain unchanged. Authorization never auto-sends/retries and is not a quota/context cure. Next-turn-only consent is lost on Host restart. Exact replay failures expose authorization guidance and require a separate native retry. The pinned Core lacks a public Models deep link; Chat gives manual navigation instructions.
177
+ [Visible-history continuation](./docs/session-continuation.md) is configured beside account switching, not permanently above the composer. New unseeded Sessions default on after the feature's first successful activation; existing Sessions and inherited histories remain off unless explicitly authorized. Global defaults affect new Sessions only; Session on/off overrides persist across accounts/restarts until disabled. With continuation off, a different-account switch offers persistent enable, keep off or cancel, without a one-turn mode. Each new enabled turn omits prior encrypted reasoning and embedded summaries, even on the same account; current-turn reasoning, visible messages, tools and disk history remain unchanged. Authorization never auto-sends/retries and is not a quota/context cure. Exact replay failures expose the same policy and require a separate native retry. The pinned Core lacks a public Models deep link; Chat omits the nonfunctional management entry. Full management remains in Settings → Models → GitHub Copilot → Manage.
178
178
 
179
179
  Context evidence and Replay recovery use compact, centered notices bounded by the native composer width. Model/item counts and status refresh live in collapsed technical details; loss consent remains explicit. The context notice explains that native 0% does not establish an empty context; native statistics stay unchanged. Switching accounts does not make old encrypted reasoning portable. The concise scope error points to explicit recovery or a new conversation; bounded, sanitized dispatch counts stay in Host diagnostics, not the main error. **Authorized** means permission is ready, not that a message was sent or recovery succeeded.
180
180
 
@@ -216,14 +216,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
216
216
  GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.
217
217
 
218
218
  ```sh
219
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/dsh-github-copilot-0.4.0-alpha.109.tgz
220
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/SHA256SUMS
219
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/dsh-github-copilot-0.4.0-alpha.111.tgz
220
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/SHA256SUMS
221
221
  sha256sum --check SHA256SUMS
222
222
  ```
223
223
 
224
224
  ```powershell
225
225
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
226
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.109.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
226
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.111.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
227
227
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
228
228
  ```
229
229
 
package/README.zh.md CHANGED
@@ -13,11 +13,11 @@
13
13
  在 Credits 内选择本 Session 后续 turn 的账号,或恢复跟随全局默认;正在运行的 turn 保持原账号。
14
14
  身份展示支持 GitHub 企业托管账号,包括带下划线企业后缀的用户名。
15
15
 
16
- 可见的 Models 和 Credits 会续期已过期身份,不会在每次挂载时强制请求:身份缓存十分钟,同账号共享请求,失败冷却三十秒。显式刷新可立即重试;额度可先于身份续期完成展示。未知或已撤销身份不会作为当前用户名展示,Session 账号隔离保持不变。参见[账号生命周期](./docs/copilot-accounts.md)。
16
+ 可见的 Models 和 Credits 会补齐已保存账号缺失的名称,不需要先激活账号。已验证名称在 Host 生命周期内缓存,未激活账号也会保留;十分钟是重新验证的间隔,不是名字的显示期限。凭据变更、账号移除及身份验证失败会使名称失效。同账号共享请求、失败冷却三十秒,显式刷新可立即重试。名称不能证明授权有效或模型可用。参见[账号生命周期](./docs/copilot-accounts.md)。
17
17
 
18
18
  添加账号时,设备授权链接、可选择的网址、一次性授权码、复制授权码和取消操作会同时显示。GitHub 授权完成后,会单独显示身份与可用模型验证阶段。添加账号不会更改全局默认;准备好后仍需显式执行现有的**切换**操作。技术诊断收在次级折叠区;账号/历史 turn 缺少身份时不会暴露不透明账号 ID,也不会根据当前设置推断历史身份。
19
19
 
20
- **源码候选版本:`0.4.0-alpha.109`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
20
+ **源码候选版本:`0.4.0-alpha.111`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
21
21
 
22
22
  ## 你可以做什么
23
23
 
@@ -57,10 +57,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
57
57
  **独立具名 profile**:
58
58
 
59
59
  ```sh
60
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/dsh-github-copilot-0.4.0-alpha.109.tgz
60
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/dsh-github-copilot-0.4.0-alpha.111.tgz
61
61
  ```
62
62
 
63
- **Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.109`。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
63
+ **Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.111`。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
64
64
 
65
65
  经批准 reload/restart 后:
66
66
 
@@ -72,7 +72,7 @@ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/release
72
72
 
73
73
  在 **Manage → GitHub accounts**添加账号不会替换全局默认。设备授权期间,卡片会同时保留验证链接、可选择的网址、一次性授权码、**复制授权码**和**取消添加账号**。GitHub 授权成功后,卡片会单独验证身份和可用模型;完成添加仍不会切换默认账号。诊断码位于折叠的技术详情中。**刷新账号信息**只更新身份,不会完成或取消授权。确认切换只影响后续跟随默认的 turn,不影响正在运行的 turn 或 Session 已指定账号。**Credits → 切换账号**只为本 Session 后续 turn 保存选择;**跟随全局默认**清除该选择。即使显式选中的账号恰好等于全局默认,也仍是 Session 覆盖。原生路由尚存或证据不完整时会阻止账号切换。新账号可能没有已选模型,旧加密 replay 也可能绑定原账号;不会自动替换模型或删除历史。**Reauthorize**仅更新同一已存身份的授权;**Remove**仅删除非全局活动授权,正在运行 turn 锁定的授权不能修改。账号缺失/失效不会自动回退到其它账号。
74
74
 
75
- 已完成的托管 turn 在原生 Usage 旁显示 **Account**,记录实际请求账号,不是计费归因或子 Agent 汇总。只有该 turn 捕获了 GitHub 登录名时才显示;否则身份不可用,不从当前设置反推。证据仅在 Host 生命周期内有界保留;重启、冷历史或没有原生流返回时显示未知,不从当前选择或全局默认反推历史。Credits 对身份未知的原始/已保存授权显示可读标签,不显示不透明账号 ID。
75
+ 已完成的托管 turn 在原生 Usage 旁显示 **Account**,记录实际请求账号,不是计费归因或子 Agent 汇总。准入时冻结已验证名称;缺失时针对本轮固定账号执行现有的有界、非强制查询,不阻塞模型输出,只能在同一 turn 仍运行时补齐身份。没有原生流返回就没有账号执行证据。未查到的身份仍显示不可用;不会根据当前设置补写已完成历史。证据仅在 Host 生命周期内有界保留,重启及冷历史显示未知。Credits 对身份未知的原始/已保存授权显示可读标签,不显示不透明账号 ID。
76
76
 
77
77
  切换资格通过官方 rc.2 SettingsForms 的配置值读取,不再依赖已退役的 Settings `get()` API。缺失或无效配置仍视为证据不完整;升级不会绕过原生路由或运行中工作的限制。
78
78
 
@@ -167,12 +167,12 @@ HTTP/SSE liveness 默认区分 5 分钟字节 idle 和有界的 10 分钟助手
167
167
  | 选模未知/不可读 | 区分记录丢失与读取失败;Retry 只重读 |
168
168
  | 缺失/取消后的 Turn Usage | 查看[用量限制](./docs/copilot-usage.md),不推断零计费 |
169
169
  | 历史加载报 `github-copilot/auto-model-decision` | 使用[独立副本、先检查的恢复](./docs/automatic-model-routing.md#recovering-affected-histories);未经批准且未停写不得替换实际历史 |
170
- | AUTH、Responses replay scope 或 TLS 错误 | 查看[请求诊断](./docs/model-compatibility-acceptance.md#authentication-replay-and-request-diagnostics)及[额度 TLS 边界](./docs/copilot-usage.md#account-data-boundary)。精确 scope 拒绝后,**回放恢复**会在当前轮结束或打开会话时自动提示。查看旧加密项及项内摘要的损失后,可选择**仅下一轮使用恢复**(默认选项)或**在本会话内继续使用**;两者都要求验证状态不变,最长不超过证据产生后一小时。恢复默认关闭,确认授权也不发送消息,需另行使用原生发送或重试。不改磁盘历史,也不是 408 修复。不自动重置凭据或关闭 TLS。 |
170
+ | AUTH、Responses replay scope 或 TLS 错误 | 查看[请求诊断](./docs/model-compatibility-acceptance.md#authentication-replay-and-request-diagnostics)及[额度 TLS 边界](./docs/copilot-usage.md#account-data-boundary)。精确 scope 拒绝后,**回放恢复**使用同一个持久 Session 降级续聊策略:关闭时说明损失并提供**开启降级续聊**/取消,已开启时只显示诊断,不重复授权。不再选择授权范围或仅下一轮;失败证据过期不会关闭策略。需另行使用原生重试,不自动发送/重试、不改磁盘历史,也不是 408 修复。不自动重置凭据或关闭 TLS。 |
171
171
  | Hosted search 不可用 | 检查账号/协议/probe 诊断;旧 override 保留至显式 reset |
172
172
 
173
- Credits 账号面板只显示当前账号和 **切换**;Models 用一个 **管理** 展开账号管理与共享模型偏好。支持搜索账号、添加但不自动选中,在 Models 确认受保护的本地账号移除。按精确模型 ID 共享排除偏好,可用性仍按账号验证。参见[已确认体验与交互 mock](./docs/account-management-experience.md)。
173
+ Credits 账号面板只显示当前账号和 **切换**;Models 用一个 **管理** 展开账号管理与共享模型偏好。两处统一使用无账号搜索框的紧凑 dropdown:当前项打勾,长列表内部滚动,底部添加账号但不自动选中。Models 的独立管理 disclosure 保留重新授权与受保护的本地账号移除。按精确模型 ID 共享排除偏好,可用性仍按账号验证。参见[已确认体验与交互 mock](./docs/account-management-experience.md)。
174
174
 
175
- [可见历史续聊模式](./docs/session-continuation.md)放在账号切换旁,不再常驻输入框上方。功能首次成功激活后创建的非继承 Session 默认开启;已有 Session、继承历史仍需明确授权。全局默认只影响新 Session,Session 开关覆盖跨重启保留。关闭时切换到不同账号,提供持续开启、仅下一轮、保持关闭或取消。启用后的每个新 turn 省略旧加密推理及其内嵌摘要,同账号也适用;当前轮新推理、可见消息、工具记录和磁盘历史不变。授权不自动发送或重试,不解决额度或上下文超限;仅下一轮授权在 Host 重启后失效。精确回放失败提供授权引导,用户另行点击原生重试。当前 Core 没有公开 Models 直达 API,Chat 提供手动导航路径。
175
+ [可见历史续聊模式](./docs/session-continuation.md)放在账号切换旁,不再常驻输入框上方。功能首次成功激活后创建的非继承 Session 默认开启;已有 Session、继承历史仍需明确授权。全局默认只影响新 Session,Session 开关跨账号及重启保留,直到关闭。关闭时切换到不同账号,提供持续开启、保持关闭或取消,不再提供仅下一轮模式。启用后的每个新 turn 省略旧加密推理及其内嵌摘要,同账号也适用;当前轮新推理、可见消息、工具记录和磁盘历史不变。授权不自动发送或重试,不解决额度或上下文超限。精确回放失败使用同一个持久策略,用户另行点击原生重试。当前 Core 没有公开 Models 直达 API,Chat 不展示不可用的管理入口;完整管理仍在设置 → 模型 → GitHub Copilot → 管理。
176
176
 
177
177
  上下文证据与回放恢复以紧凑、居中提示显示在输入框上方,宽度遵循原生输入框。模型、项数和状态刷新收进默认折叠的技术详情;有损恢复仍需明确确认。上下文提示直接说明原生 0% 不代表上下文为空,原生统计不变。切换账号不会让旧加密推理自动变得可跨账号使用。简短 scope 错误指向显式恢复或新会话;有界、脱敏的请求结构计数留在 Host 诊断中,不挤占主错误。**已授权**只表示授权已准备好,不表示消息已发送或恢复已成功。
178
178
 
@@ -214,14 +214,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
214
214
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
215
215
 
216
216
  ```sh
217
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/dsh-github-copilot-0.4.0-alpha.109.tgz
218
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.109/SHA256SUMS
217
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/dsh-github-copilot-0.4.0-alpha.111.tgz
218
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.111/SHA256SUMS
219
219
  sha256sum --check SHA256SUMS
220
220
  ```
221
221
 
222
222
  ```powershell
223
223
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
224
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.109.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
224
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.111.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
225
225
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
226
226
  ```
227
227
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.109"
11
+ "version": "0.4.0-alpha.111"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -304,6 +304,7 @@
304
304
  "tests": [
305
305
  {"file": "tests/session-accounts.spec.ts", "name": "freezes each turn across preference changes, steps and retries"},
306
306
  {"file": "tests/session-accounts-host.spec.ts", "name": "holds account mutation fencing through abort until the actual turn boundary"},
307
+ {"file": "tests/session-accounts-host.spec.ts", "name": "ignores identity completion after the turn ends"},
307
308
  {"file": "tests/copilot-usage-card.spec.ts", "name": "switches only subsequent Session turns inside Credits and can restore inheritance"},
308
309
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds Session account choices and historical reads through native Client and %s Host gateways"},
309
310
  {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent native credentials and SettingsForms CAS across profile restart without cross-account OAuth writes"}
@@ -324,6 +325,8 @@
324
325
  ],
325
326
  "tests": [
326
327
  {"file": "tests/copilot-identity-refresh.spec.ts", "name": "renews expired identity once for account %s without changing metadata-only reads"},
328
+ {"file": "tests/copilot-account-identity-cache.spec.ts", "name": "hydrates saved inactive names without activating them, then reuses them"},
329
+ {"file": "tests/copilot-account-identity-cache.spec.ts", "name": "retains inactive verified names after freshness expiry without reads or network in status"},
327
330
  {"file": "tests/copilot-usage-card.spec.ts", "name": "settles quota before a slow identity renewal and uses nonforcing ensure on visible refresh cadence"},
328
331
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "never writes a captured A refresh into B after an external selection change"},
329
332
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "preserves uncertain commit ahead of missing-slot recovery"},
@@ -756,10 +759,15 @@
756
759
  {"file": "src/session-continuation-host.ts", "marker": "COPILOT_CONTINUATION_TURN_BOUNDARY_UNAVAILABLE"},
757
760
  {"file": "src/session-continuation-remote.ts", "marker": "authorizeNext"},
758
761
  {"file": "src/copilot-usage-ui.ts", "marker": "useSessionContinuationSwitch"},
762
+ {"file": "src/account-dropdown.ts", "marker": "data-copilot-dropdown-option"},
763
+ {"file": "docs/mockups/copilot-account-dropdown.html", "marker": "Approved Dropdown Mock"},
759
764
  {"file": "docs/account-management-experience.md", "marker": "All accounts, quota"}
760
765
  ],
761
766
  "tests": [
767
+ {"file": "tests/account-dropdown.spec.ts", "name": "supports arrows, Home, End and Escape without closing the containing Chat panel"},
762
768
  {"file": "tests/session-continuation.spec.ts", "name": "continues A-B-B-A by omitting pre-turn reasoning while retaining new tool-loop reasoning"},
769
+ {"file": "tests/replay-recovery-ui.spec.ts", "name": "enables only persistent Session continuation after loss disclosure, without legacy authorization or sending"},
770
+ {"file": "tests/replay-recovery-ui.spec.ts", "name": "does not reauthorize an already enabled policy or change it when failure evidence expires"},
763
771
  {"file": "tests/session-continuation.spec.ts", "name": "does not replay baseline ciphertext after its ID or embedded summary changes"},
764
772
  {"file": "tests/session-continuation-host.spec.ts", "name": "captures birth-time defaults and consumes one-turn consent"},
765
773
  {"file": "tests/session-continuation-ui.spec.ts", "name": "requires off-switch choice: %s"},
@@ -778,14 +786,15 @@
778
786
  {"file": "src/replay-recovery-host.ts", "marker": "COPILOT_REPLAY_RECOVERY_TURN_ACTIVE"},
779
787
  {"file": "src/replay-recovery-remote.ts", "marker": "githubCopilotReplayRecovery.setEnabled"},
780
788
  {"file": "src/replay-recovery-remote.ts", "marker": "githubCopilotReplayRecovery.authorize"},
781
- {"file": "src/replay-recovery-ui.ts", "marker": "Accept loss and authorize"}
789
+ {"file": "src/replay-recovery-ui.ts", "marker": "recovery: true"},
790
+ {"file": "src/session-continuation-ui.ts", "marker": "Enable visible-history continuation"}
782
791
  ],
783
792
  "tests": [
784
793
  {"file": "tests/replay-recovery.spec.ts", "name": "keeps default replay and requires a revision-bound confirmation"},
785
794
  {"file": "tests/replay-recovery.spec.ts", "name": "preserves source, fresh reasoning, tools, other models and other owners"},
786
795
  {"file": "tests/replay-recovery-host.spec.ts", "name": "requires the native initiating session and signal, rejects active-turn writes and revokes late requests"},
787
796
  {"file": "tests/replay-recovery.spec.ts", "name": "admits only the next matching native turn, including its steps and retries"},
788
- {"file": "tests/replay-recovery-ui.spec.ts", "name": "automatically shows evidence but requires explicit %s consent, without sending"},
797
+ {"file": "tests/replay-recovery-ui.spec.ts", "name": "enables only persistent Session continuation after loss disclosure, without legacy authorization or sending"},
789
798
  {"file": "tests/replay-recovery-ui.spec.ts", "name": "is absent normally, reads on settled turns without polling and resets dismissal only for new evidence"},
790
799
  {"file": "tests/preview-route.spec.ts", "name": "offers exact failed replay only to its initiating session and recovers after explicit confirmation"},
791
800
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds explicit replay recovery through native Client and %s Host gateways"}
@@ -1,6 +1,8 @@
1
1
  # Copilot account management and continuation experience
2
2
 
3
- Approved interaction reference: [standalone mock](./mockups/copilot-account-management.html).
3
+ Approved account switching reference: [dropdown mock](./mockups/copilot-account-dropdown.html).
4
+ The [complete continuation mock](./mockups/copilot-account-management.html) retains
5
+ the earlier search-form presentation as historical context; the dropdown replaces it.
4
6
  Open the HTML locally; append `?scenario=off-switch` to start with continuation
5
7
  disabled and an account switch awaiting confirmation. All accounts, quota,
6
8
  authorization, messages and model availability in this mock are synthetic.
@@ -9,8 +11,11 @@ It performs no network requests and persists no credentials or settings.
9
11
  ## Chat: quick selection, not a second settings page
10
12
 
11
13
  The Credits control opens a compact current-account summary and Switch button.
12
- Do not render all saved accounts until Switch is opened. The selector supports
13
- search, bounded scrolling, following the global account and adding an account.
14
+ Do not render all saved accounts until Switch is opened. A compact anchored dropdown
15
+ marks the current choice, supports bounded internal scrolling, following the global
16
+ account and adding an account. Do not add an account search field or repeat Switch
17
+ buttons per row. Escape closes only the dropdown and restores its trigger; arrows,
18
+ Home and End navigate enabled options. Outside interaction dismisses the list.
14
19
  Adding an account does not select it. Quota is account billing-cycle data, not
15
20
  context occupancy or Session cost; missing and pooled data retain their semantics.
16
21
 
@@ -19,12 +24,13 @@ keeps its admitted account and policy. Save failures retain their real uncertain
19
24
  and never imply that a change succeeded. Session explicit choices do not change
20
25
  other Sessions or the global default.
21
26
 
22
- The same panel includes a collapsible continuation policy and a single
23
- "Manage accounts and models" entry. Full management belongs in Models.
27
+ The same panel includes a collapsible continuation policy. Full management belongs
28
+ in Models; show a "Manage accounts and models" entry only with a working public
29
+ navigation callback. Do not show a disabled link or unavailable-navigation paragraph.
24
30
  Opening and closing Settings must not discard the composer draft or change the
25
31
  selected Session. Direct navigation and automatic expansion depend on published
26
- navigation APIs; absent support requires a named diagnostic and truthful manual
27
- navigation instructions, not parent DOM manipulation.
32
+ navigation APIs; absent support leaves navigation to ordinary Settings, never
33
+ parent DOM manipulation or a nonfunctional entry.
28
34
 
29
35
  ## Models: one Manage disclosure, two responsibilities
30
36
 
@@ -32,7 +38,7 @@ The existing native Settings layout and provider controls remain. The collapsed
32
38
  Copilot contribution shows current default identity, model status, cache age and
33
39
  one Manage button. Manage expands:
34
40
 
35
- - Account management: current default account, Switch/search/add, identity
41
+ - Account management: current default account, Switch dropdown/add, identity
36
42
  refresh, reauthorization, guarded removal, and new-Session continuation default.
37
43
  - Model preferences: cross-account shared exclusions, model search and filters,
38
44
  account-specific availability, discovery diagnostics and model refresh.
@@ -42,6 +48,11 @@ authorization, not GitHub-side access, conversations or shared model preferences
42
48
  Preserve existing canonical/default/in-use removal guards; do not silently choose
43
49
  another account.
44
50
 
51
+ Keep saved-account reauthorization/removal in a separate collapsed management
52
+ disclosure, not in the switching menu. The dropdown remains an account choice,
53
+ not another settings page. Global switching retains its explicit confirmation;
54
+ Chat retains the continuation confirmation when the current policy is off.
55
+
45
56
  Model preferences are shared by exact model ID. Availability and capability
46
57
  evidence remain account-specific. Missing models retain saved preferences;
47
58
  returning models reuse them without becoming selected. Newly discovered models
@@ -67,13 +78,15 @@ or oversized context and does not guarantee supplier acceptance.
67
78
 
68
79
  When continuation is off and the user switches accounts, stop before saving the
69
80
  selection and disclose the potential replay risk. Offer persistent enable and
70
- switch, next-turn-only enable and switch, keep off and switch, or cancel.
81
+ switch, keep off and switch, or cancel. Do not offer next-turn-only authorization.
71
82
  Account differences alone do not prove supplier rejection. Never guess encrypted
72
83
  item origin or silently filter history.
73
84
 
74
85
  After an exact supplier replay rejection, retain the native failed turn and
75
- surface persistent enable or next-turn-only authorization plus full management
76
- navigation. Authorization never sends or retries. The user explicitly retries
86
+ surface the same persistent Session policy: when off, disclose loss and offer
87
+ Enable/Cancel; when on, show diagnostic guidance without repeated authorization.
88
+ Do not show duration radios or unavailable Models navigation. Failure-evidence
89
+ expiry does not disable the persistent policy. Authorization never sends or retries. The user explicitly retries
77
90
  the task through the native mechanism. Mock assistant answers are demonstrations,
78
91
  not evidence of real cross-account success. Do not fabricate durable messages,
79
92
  errors, replay or assistant content to imitate the mock.
@@ -82,7 +95,7 @@ errors, replay or assistant content to imitate the mock.
82
95
 
83
96
  Use native theme tokens for surfaces, text, borders, focus and errors. Native
84
97
  select popup options must remain readable in dark and light themes; do not inherit
85
- light popup backgrounds with dark-theme white text. Search and long account lists
98
+ light popup backgrounds with dark-theme white text. Dropdowns and long account lists
86
99
  must remain keyboard-operable, bounded and usable on narrow viewports. Explicit
87
100
  loading, unknown, stale, failed-save and cancellation states are required.
88
101
 
@@ -14,7 +14,7 @@ publication, installation and loaded runtime state are separate evidence.
14
14
  profile. Models retains the global default. Sessions without an override
15
15
  inherit that default at each new turn; explicit Session choices take priority.
16
16
  - Models manages reauthorization/removal and the global default; Credits supports
17
- add-only authorization without selection. Its searchable account selector
17
+ add-only authorization without selection. Its compact no-search dropdown
18
18
  applies to this Session's subsequent turns. No standalone
19
19
  composer selector, one-turn override or DSH application identity replacement.
20
20
  - Persist OAuth grants through the existing DSH credentials service. Use
@@ -219,8 +219,9 @@ cannot be named `remove`: official rc.2 reserves that inherited service name
219
219
  and rejects the entire Client contribution.
220
220
 
221
221
  Credits shows the Session's next-turn account and quota under the existing title.
222
- Its **Switch** disclosure searches saved authorizations and offers **Follow global
223
- default** plus add-only authorization. Reauthorization, removal and global
222
+ Its **Switch** dropdown marks the current choice, scrolls long lists internally
223
+ and offers **Follow global default** plus add-only authorization at the bottom.
224
+ Reauthorization, removal and global
224
225
  selection remain in Models. Changing
225
226
  the preference while a turn runs leaves that turn's old account pinned; the
226
227
  popover identifies it separately. Other Sessions are unchanged. Unknown identity
@@ -228,14 +229,19 @@ is unavailable, not a stale username presented as current.
228
229
 
229
230
  One Models **Manage** groups account management and shared exact-ID model
230
231
  preferences. The Credits account panel contains continuation policy; when off,
231
- an account change pauses for explicit persistent/next-turn/off/cancel consent.
232
+ an account change pauses for explicit persistent-enable/keep-off/cancel consent.
232
233
  See [the approved experience and mock](./account-management-experience.md).
233
234
 
234
235
  Completed managed turns have a compact **Account** disclosure alongside native
235
236
  Usage/selection actions through the public assistant-actions slot. This is
236
237
  request-account evidence, not billing attribution or a subagent account rollup.
237
- It captures an optional cached identity on the first real ordinary native chunk,
238
- not discovery, preparation or auxiliary Auto assessment. Host memory retains at
238
+ It freezes a verified cached identity at admission. Missing identity starts one
239
+ nonforcing, bounded lookup for the exact admitted account without delaying model
240
+ delivery. A successful lookup may fill missing identity only while that same
241
+ turn/signal remains active and uncancelled, retaining the first verified name.
242
+ Account execution evidence is still created only on the first real ordinary
243
+ native chunk, not discovery, preparation or auxiliary Auto assessment. Late
244
+ lookups never backfill completed turns. Host memory retains at
239
245
  most 64 Sessions and 128 turns per Session. Restart, cold history, eviction or a
240
246
  request with no native delivery is unknown. Failed reads are distinct from
241
247
  unknown evidence; Retry rereads the same turn without inference. Official rc.2
@@ -263,7 +269,15 @@ same-account in-flight work and observes a thirty-second failure cooldown;
263
269
  explicit **Refresh account information** bypasses cooldown but joins active
264
270
  work. There is no render-driven request loop or background polling after
265
271
  unmount. Credential changes revoke identity and pending work; cancelled or
266
- expired identity is never shown as current. Session ensure retains explicit
272
+ unverified identity is never shown as current. Verified display names remain in
273
+ the bounded Host cache beyond the ten-minute revalidation interval; freshness
274
+ expiry alone never replaces an inactive account name with unknown. Names are
275
+ display metadata, not authorization/model-access proof, and are not persisted
276
+ across Host restarts. Models and Session Credits ensure missing configured
277
+ account names through the same per-account lookup without activating those
278
+ accounts. Membership limits bound the parallel lookups and each retains its
279
+ timeout/single flight/cooldown. Credential invalidation and failed verification
280
+ still clear names. Session ensure retains explicit
267
281
  Agent lookup and rechecks account selection before returning.
268
282
 
269
283
  Quota settles independently of identity renewal only after account-coherent
@@ -0,0 +1,71 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <meta charset="utf-8">
4
+ <meta name="viewport" content="width=device-width,initial-scale=1">
5
+ <title>账号切换 · Approved Dropdown Mock</title>
6
+ <style>
7
+ :root{color-scheme:dark;--bg:#202020;--panel:#2b2b2b;--popup:#333;--line:#505050;--text:#f2f2f2;--muted:#c0c0c0;--hover:#414141}
8
+ *{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 system-ui,"Segoe UI",sans-serif;padding:28px}
9
+ button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;background:transparent;border:1px solid var(--line);border-radius:8px;padding:8px 14px}button:hover{background:var(--hover)}button:focus-visible,summary:focus-visible,textarea:focus-visible{outline:2px solid #aacfff;outline-offset:3px}
10
+ button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}h1{font-size:18px;margin:0}h2{font-size:16px;margin:0 0 12px}p{color:var(--muted);margin:8px 0}small{color:var(--muted);font-size:12px}
11
+ .preview{max-width:840px;margin:auto}.preview-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}.tabs{display:flex;gap:6px}.tabs button[aria-pressed=true]{background:var(--hover)}
12
+ .provider{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:22px}.provider-head,.account-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.provider-head strong{font-size:19px}.provider-head small{margin-left:10px}.manage{border-top:1px solid var(--line);margin-top:20px;padding-top:22px}
13
+ .account-row{position:relative;margin:16px 0}.identity strong{font-size:17px;display:block}.identity small{display:block;margin-top:2px}.switch{white-space:nowrap}.caret{font-size:11px;margin-left:9px}.account-menu{position:absolute;right:0;top:calc(100% + 8px);width:min(300px,100%);z-index:5;background:var(--popup);border:1px solid #666;border-radius:10px;box-shadow:0 10px 28px #0006;padding:5px}
14
+ .options{max-height:228px;overflow:auto;overscroll-behavior:contain}.option{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:0;padding:10px;border-radius:5px;min-height:46px}.check{width:18px;flex-shrink:0;color:#c7ddff}.option .name{flex:1;min-width:0;overflow-wrap:anywhere}.option small{display:block}.add{border-top:1px solid var(--line);margin-top:5px;padding-top:5px}.add button{width:100%;text-align:left;border:0}.account-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.quiet{border:0;color:var(--muted);padding-left:0;padding-right:8px}.danger{color:#ffb8b8}
15
+ details{margin-top:18px}summary{cursor:pointer}label{display:flex;align-items:center;gap:9px;margin:12px 0}input{accent-color:#c7ddff}.preferences{border-top:1px solid var(--line);margin-top:24px;padding-top:22px}.model{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.model button{font-size:12px;padding:5px 10px}.caption{margin-top:20px;font-size:12px}.status{min-height:22px;font-size:12px;color:#c7ddff;margin-top:12px}
16
+ .chat{min-height:490px;display:flex;flex-direction:column}.messages{flex:1;padding:20px 0}.message{max-width:75%;padding:12px 16px;background:var(--panel);border-radius:12px;margin-bottom:20px}.message.user{margin-left:auto;background:#373737}.composer{border:1px solid var(--line);border-radius:12px;padding:14px}.composer textarea{width:100%;min-height:60px;resize:vertical;border:0;background:none;outline-offset:0}.toolbar{display:flex;justify-content:space-between;color:var(--muted)}.credits{display:flex;justify-content:flex-end;margin-top:8px}.chat-panel{width:min(410px,100%);margin:10px 0 0 auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px}.chat-panel .account-row{margin-top:0}.chat-panel .account-menu{top:auto;bottom:calc(100% + 8px)}
17
+ dialog{width:min(420px,calc(100% - 32px));background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:24px}dialog::backdrop{background:#0008}.dialog-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
18
+ @media(max-width:520px){body{padding:16px}.preview-head{align-items:flex-start;flex-direction:column}.provider{padding:16px}.provider-head{align-items:flex-start}.provider-head small{display:block;margin:4px 0 0}.message{max-width:90%}.account-actions{gap:4px}.chat{min-height:450px}}
19
+ </style>
20
+ <div class="preview">
21
+ <header class="preview-head"><div><h1>账号切换 · 简化版</h1><small>交互 Mock · 全部为虚构数据,不操作真实账号</small></div><nav class="tabs" aria-label="预览页面"><button id="models-tab" aria-pressed="true">Models</button><button id="chat-tab" aria-pressed="false">Chat</button></nav></header>
22
+ <section id="models" class="provider">
23
+ <div class="provider-head"><div><strong>GitHub Copilot</strong><small>Signed in · 19 models</small></div><button id="manage-button" aria-expanded="true">Manage</button></div>
24
+ <div class="manage" id="manage">
25
+ <h2>账号管理</h2><p>选择全局默认账号。已有 Session 的显式选择不变。</p>
26
+ <div class="account-row"><div class="identity"><strong id="global-name">@demo-personal</strong><small>全局默认账号</small></div><button class="switch" id="models-switch" aria-expanded="false" aria-controls="models-menu">切换<span class="caret">▾</span></button>
27
+ <div id="models-menu" class="account-menu" hidden><div class="options" aria-label="全局默认账号"></div><div class="add"><button data-add>+ 添加账号</button></div></div></div>
28
+ <div class="account-actions"><button data-action="刷新账号信息">刷新账号信息</button><button data-action="重新授权">重新授权</button><button class="quiet danger" id="remove">删除账号</button></div>
29
+ <details><summary>新 Session 续聊默认</summary><label><input type="checkbox" checked>默认开启有损续聊</label><p><small>新轮次省略旧加密推理及其内嵌摘要;可见消息、工具记录和磁盘历史不变。仅影响新 Session,不自动发送或重试。</small></p></details>
30
+ <section class="preferences"><h2>模型偏好</h2><p><small>偏好跨账号共享;可用性按当前账号验证。</small></p><div class="model"><span>GPT-6.1 Sol <small>· 可用</small></span><button data-model>排除</button></div><div class="model"><span>Claude Sonnet <small>· 可用</small></span><button data-model>排除</button></div><div class="model"><span>Gemini Pro <small>· 当前账号不可用</small></span><button data-model>排除</button></div></section>
31
+ </div>
32
+ </section>
33
+ <section id="chat" class="chat" hidden>
34
+ <div class="messages"><div class="message user">继续完善账号切换的交互。</div><div class="message">保留当前账号,点击「切换」后用一个紧凑下拉菜单选择,不再展开搜索表单。</div></div>
35
+ <div class="composer"><textarea aria-label="模拟消息" placeholder="输入消息…(仅模拟)"></textarea><div class="toolbar"><span>+ Full access ▾</span><span>Auto ▾ ↑</span></div></div>
36
+ <div class="credits"><button id="credits">Credits · <span id="credits-name">@demo-personal</span> ▾</button></div>
37
+ <div class="chat-panel" id="chat-panel">
38
+ <div class="account-row"><div class="identity"><strong id="session-name">@demo-personal</strong><small>本 Session 账号</small></div><button class="switch" id="chat-switch" aria-expanded="false" aria-controls="chat-menu">切换<span class="caret">▾</span></button>
39
+ <div id="chat-menu" class="account-menu" hidden><div class="options" aria-label="本 Session 账号"></div><div class="add"><button data-add>+ 添加账号</button></div></div></div>
40
+ <details><summary>本 Session 有损续聊 · 开启</summary><label><input id="session-policy" type="checkbox" checked>持续开启</label><p><small>每轮省略旧加密推理及内嵌摘要;可见历史不变。不自动发送或重试。</small></p></details>
41
+ <button class="quiet" id="simulate-rejection">模拟旧推理被拒绝</button>
42
+ </div>
43
+ </section>
44
+ <p id="status" class="status" role="status" aria-live="polite"></p>
45
+ <footer class="caption">点击「切换」查看菜单。无搜索框,无逐账号 Switch 按钮;当前账号打勾,长列表内部滚动。<button class="quiet" id="many">模拟 24 个账号</button></footer>
46
+ </div>
47
+ <dialog id="dialog"><h2 id="dialog-title"></h2><p id="dialog-copy"></p><div id="dialog-actions" class="dialog-actions"></div></dialog>
48
+ <script>
49
+ const $=id=>document.getElementById(id);
50
+ let accounts=['@demo-personal','@demo-work','@demo-backup'],globalAccount=accounts[0],sessionAccount=accounts[0],lastTrigger;
51
+ function notice(text){$('status').textContent=text}
52
+ function closeMenus(){for(const scope of ['models','chat']){$(scope+'-menu').hidden=true;$(scope+'-switch').setAttribute('aria-expanded','false')}}
53
+ function dialog(title,copy,actions){closeMenus();$('dialog-title').textContent=title;$('dialog-copy').textContent=copy;$('dialog-actions').replaceChildren();for(const [label,action] of actions){const b=document.createElement('button');b.textContent=label;b.onclick=()=>{$('dialog').close();action?.()};$('dialog-actions').append(b)}$('dialog').showModal()}
54
+ $('simulate-rejection').onclick=()=>dialog('旧推理回放被拒绝',$('session-policy').checked?'本 Session 已开启降级续聊,请另行使用原生重试。如果仍被拒绝,请查看技术诊断或新建会话;不重复授权或自动重试。':'降级续聊省略旧加密推理及内嵌摘要,保留可见消息、工具记录和磁盘历史;可能损失隐含细节。开启后在本 Session 持续生效,跨账号和重启保留,直到关闭。不会自动重试。',$('session-policy').checked?[['关闭提示']]:[['开启降级续聊',()=>{$('session-policy').checked=true;render();notice('模拟:持久策略已开启,请另行点击原生重试。没有发送消息。')}],['取消']]);
55
+ function render(){for(const scope of ['models','chat']){const list=$(scope+'-menu').querySelector('.options'),current=scope==='models'?globalAccount:sessionAccount;list.replaceChildren();for(const account of accounts){const b=document.createElement('button');b.className='option';b.setAttribute('aria-pressed',String(account===current));const check=document.createElement('span');check.className='check';check.textContent=account===current?'✓':'';check.setAttribute('aria-hidden','true');const name=document.createElement('span');name.className='name';name.textContent=account;b.append(check,name);if(account===current){const tag=document.createElement('small');tag.textContent='当前';b.append(tag)}b.onclick=()=>{if(scope==='chat'&&!$('session-policy').checked&&account!==current){dialog('切换账号前确认','有损续聊会省略旧加密推理及其内嵌摘要。可见消息、工具记录和磁盘历史不变。授权不会自动发送或重试。',[['开启并切换',()=>{$('session-policy').checked=true;choose(scope,account)}],['保持关闭并切换',()=>choose(scope,account)],['取消']])}else choose(scope,account)};list.append(b)}}$('global-name').textContent=globalAccount;$('session-name').textContent=sessionAccount;$('credits-name').textContent=sessionAccount;$('session-policy').closest('details').querySelector('summary').textContent='本 Session 有损续聊 · '+($('session-policy').checked?'开启':'关闭')}
56
+ function choose(scope,account){if(scope==='models')globalAccount=account;else sessionAccount=account;closeMenus();render();notice('模拟:'+(scope==='models'?'全局默认':'本 Session')+'已切换至 '+account+';没有发送消息。');lastTrigger?.focus()}
57
+ for(const scope of ['models','chat'])$(scope+'-switch').onclick=()=>{const open=$(scope+'-menu').hidden;closeMenus();lastTrigger=$(scope+'-switch');$(scope+'-menu').hidden=!open;lastTrigger.setAttribute('aria-expanded',String(open));if(open)$(scope+'-menu').querySelector('.option').focus()};
58
+ document.addEventListener('click',e=>{if(!e.target.closest('.account-row'))closeMenus()});
59
+ document.addEventListener('keydown',e=>{const menu=e.target.closest('.account-menu');if(e.key==='Escape'){closeMenus();lastTrigger?.focus()}if(menu&&['ArrowDown','ArrowUp','Home','End'].includes(e.key)){const buttons=Array.from(menu.querySelectorAll('button'));let index=buttons.indexOf(document.activeElement);index=e.key==='Home'?0:e.key==='End'?buttons.length-1:(index+(e.key==='ArrowDown'?1:-1)+buttons.length)%buttons.length;buttons[index].focus();e.preventDefault()}});
60
+ for(const page of ['models','chat'])$(page+'-tab').onclick=()=>{closeMenus();for(const p of ['models','chat']){$(p).hidden=p!==page;$(p+'-tab').setAttribute('aria-pressed',String(p===page))}notice('')};
61
+ $('manage-button').onclick=()=>{$('manage').hidden=!$('manage').hidden;$('manage-button').setAttribute('aria-expanded',String(!$('manage').hidden))};
62
+ $('credits').onclick=()=>{$('chat-panel').hidden=!$('chat-panel').hidden;closeMenus()};
63
+ $('session-policy').onchange=render;
64
+ $('many').onclick=()=>{accounts=accounts.slice(0,3);for(let n=4;n<=24;n++)accounts.push('@demo-account-'+n);render();notice('已模拟 24 个账号。打开菜单后在内部滚动。')};
65
+ document.querySelectorAll('[data-add]').forEach(b=>b.onclick=()=>dialog('添加账号','正式功能将进入 GitHub 授权。这里仅模拟添加,不访问网络,也不会自动切换账号。',[['模拟授权完成',()=>{accounts.push('@demo-new-'+accounts.length);render();notice('已添加模拟账号,当前账号不变。')}],['取消']]));
66
+ document.querySelectorAll('[data-action]').forEach(b=>b.onclick=()=>notice('模拟:'+b.dataset.action+',未执行网络请求。'));
67
+ document.querySelectorAll('[data-model]').forEach(b=>b.onclick=()=>{b.textContent=b.textContent==='排除'?'恢复':'排除';notice('仅修改模拟偏好。')});
68
+ $('remove').onclick=()=>dialog('删除 '+globalAccount+'?','当前全局默认账号不能直接删除。请先切换至其他账号;这里不会删除真实账号或凭据。',[['知道了']]);
69
+ render();
70
+ </script>
71
+ </html>
@@ -114,18 +114,19 @@ text and controls. They stack above the composer rather than squeezing into
114
114
  its non-wrapping statistics row. Native meters, statistics and parent DOM stay
115
115
  unchanged; authorization itself still sends no message.
116
116
 
117
- Choose **Review recovery options**, then **Next matching turn only** (the
118
- default choice) or **Continue in this session**, and **Accept loss and authorize**.
119
- This does not send a message or retry the failed request. Use the native Send or
120
- Retry control separately; the plugin adds no competing sender. Complete native
121
- replay remains the default until explicit consent.
122
-
123
- Next-turn consent is admitted on the next bound, matching-model native request
124
- and covers all steps and native retries of that turn, not just one HTTP attempt.
125
- It is consumed at that turn's `turn/end`, including cancelled/failed turns.
126
- Other models, purposes and unbound requests cannot consume it. Session consent
127
- survives turn endings but shares the same bounded evidence/proof lifetime.
128
- Controls are disabled during a native turn; Host checks remain authoritative.
117
+ The normal Client offers one persistent Session policy. When off, the notice
118
+ explains the loss and offers **Enable visible-history continuation** or Cancel.
119
+ Enabling writes the same revision-checked Session policy used by account controls;
120
+ it persists across accounts/restarts until disabled, without an hourly consent.
121
+ When already on, show status and diagnostic guidance, not another authorization.
122
+ Use native Retry separately. Missing or failed policy reads have an explicit
123
+ diagnostic and Retry read, never a guessed off state or legacy authorization
124
+ fallback. No authorization duration radios or next-turn-only actions are shown.
125
+ Controls are disabled during a native turn.
126
+
127
+ The following temporary recovery mechanism and strict Remotes remain for
128
+ compatibility, not new normal UI authorization. Their one-hour evidence/proof
129
+ lifetime is not the lifetime of the persistent Session policy:
129
130
 
130
131
  This is lossy recovery, not a supplier-scope repair. Only complete normalized
131
132
  encrypted reasoning items whose entire serialized fingerprints match that