dsh-github-copilot 0.4.0-alpha.113 → 0.4.0-alpha.115
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 +2 -2
- package/CHANGELOG.md +14 -0
- package/README.md +8 -8
- package/README.zh.md +8 -8
- package/deployment-baseline.json +10 -2
- package/docs/account-management-experience.md +13 -3
- package/docs/copilot-compaction.md +2 -2
- package/docs/manual-compaction-recovery.md +20 -6
- package/lib/client.js +47 -38
- package/lib/client.js.map +1 -1
- package/lib/index.js +15 -2
- package/lib/manual-compaction-recovery.js +39 -10
- package/lib/types/copilot-usage-card.d.ts +0 -1
- package/lib/types/manual-compaction-recovery.d.ts +16 -3
- package/lib/types/preview-route.d.ts +3 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -42,7 +42,7 @@ This repository owns eleven narrow surfaces:
|
|
|
42
42
|
7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, plus exact plugin-owned model exclusions enforced across its directory, Auto pools and direct admission, without maintaining model-ID routing rules or changing Core's catalog.
|
|
43
43
|
8. Optional, provider-scoped Chat presentation for completed empty reasoning disclosures; durable content and encrypted replay metadata remain Core-owned.
|
|
44
44
|
9. Compatibility-only policy restoration and request recovery for existing dedicated planner/executor Sessions. Model roles UI, settings writes and new dedicated roots are retired (#158); never reintroduce them or migrate histories implicitly.
|
|
45
|
-
10. Managed-route estimated input/output admission, optional exact-request pressure signalling through official compaction recovery, and supported low summary effort only when no effort is already resolved. See [compaction budgets](./docs/copilot-compaction.md). Preserve truthful capacities, requested output caps, native errors/replay and transaction ownership; no hidden history trimming, chunking,
|
|
45
|
+
10. Managed-route estimated input/output admission, optional exact-request pressure signalling through official compaction recovery, and supported low summary effort only when no effort is already resolved. See [compaction budgets](./docs/copilot-compaction.md). Preserve truthful capacities, requested output caps, native errors/replay and transaction ownership; no hidden history trimming, wire chunking, competing compaction service or automatic model switch. The separately selected, single-service [recovery engine](./docs/manual-compaction-recovery.md) defaults to automatic segmented recovery for known oversized summaries or one typed native capacity failure through the public subclass hook. Preserve `automaticRecovery: false`, native `auto: false`, scopes and custom engines; at most 16 physical calls including a failed first attempt, no recursive retry or 408/network/auth/quota fallback. Installation alone never selects or migrates an engine.
|
|
46
46
|
11. Optional account quota reads and a session-scoped composer usage control through public credentials, strict Remotes and additive slots. Keep account billing-cycle credits separate from context tokens and session cost. Missing, pooled, legacy and stale data must retain their real semantics; never infer credits from token estimates or account deltas. A separate plugin-owned historical context projection may diagnose failed-zero readings, never filter shared native usage, replace Core's meter, infer current occupancy/percentages or rewrite history. See [quota boundaries](./docs/copilot-usage.md).
|
|
47
47
|
|
|
48
48
|
## Approved multi-account ownership extension (#297)
|
|
@@ -293,7 +293,7 @@ cannot supply the native gateway binding or source method discovery. Test both
|
|
|
293
293
|
actual Client and Host gateways; a synthetic RPC success cannot prove Host
|
|
294
294
|
reachability. Preserve native Agent lookup and bounded store ownership (#254).
|
|
295
295
|
|
|
296
|
-
Automatic pressure and Auto recovery availability resolve the initiating Agent's bound preset through public `agentPresets.composedPreset()` / `serviceFor(agent, 'compaction')`. A bound preset without an engine must not borrow global recovery. Only non-preset Agents use their own `agent.ctx.get('compaction')`; never scan Core's private registry or cache an engine across preset replacement. Native transactions, cancellation
|
|
296
|
+
Automatic pressure and Auto recovery availability resolve the initiating Agent's bound preset through public `agentPresets.composedPreset()` / `serviceFor(agent, 'compaction')`. A bound preset without an engine must not borrow global recovery. Only non-preset Agents use their own `agent.ctx.get('compaction')`; never scan Core's private registry or cache an engine across preset replacement. Native transactions, cancellation and retry policy remain unchanged. The selected recovery subclass uses initiating-Agent account proof and public initiator scoping for automatic/manual summaries. Multi-call results stay unmarked; omit aggregate usage after a failed initial call. No automatic profile migration or full preset replacement.
|
|
297
297
|
|
|
298
298
|
Continuing-step pressure prevention uses public `agent/pre-step` before `step/start`, only with a committed managed header, no selection notice, and known `modelSelection.pending: null`. Capacity lookup is not request estimation. Use the native surface meter and one currently bound native transaction; preserve final converted hard admission and stream-pressure fallback. First-step/pending/unknown evidence delegates. Native compaction failures propagate before attempt admission. Never claim all missing turn Usage is repaired, filter native samples, invent zero usage or rewrite historical totals. Native turn-tail accounting groups events by recorded turn, not compaction replacement sequence range.
|
|
299
299
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.115 (prepared)
|
|
4
|
+
|
|
5
|
+
- Default automatic segmented recovery on in the explicitly selected compaction recovery engine (#330). Keep fitting summaries native; handle known oversized input or one typed summary context-limit failure inside the same Core transaction.
|
|
6
|
+
- Bound each recovery invocation to 16 physical calls including the first rejected attempt; preserve cancellation, balanced tool pairs, source/shrink checks, native retry ownership and output caps. Never escalate timeout/408/auth/quota/network failures or commit partial summaries.
|
|
7
|
+
- Preserve native `auto: false` and add `automaticRecovery: false` for automatic-segmentation opt-out. Bind summary capacity proof and dispatch to the initiating Agent's account; omit incomplete aggregate accounting after an initial failure.
|
|
8
|
+
- Document explicit same-scope engine migration and rollback without overriding custom engines, presets or live profiles. No Core changes, automatic installation or restart.
|
|
9
|
+
|
|
10
|
+
## 0.4.0-alpha.114 (prepared)
|
|
11
|
+
|
|
12
|
+
- Simplify the Chat account menu to configured accounts only. Move Follow global default into a separate checkbox and keep account addition in Models (#328).
|
|
13
|
+
- Freeze the current effective account when following is disabled; restore inheritance when enabled. Explicit account choices, including the current default, remain Session overrides.
|
|
14
|
+
- Preserve continuation consent, cancellation, revision-checked saving, running-turn ownership and quota isolation; restore focus after controls become enabled. Record the approved interactive mock and localized experience.
|
|
15
|
+
- No Core changes, automatic sends, installation or restart.
|
|
16
|
+
|
|
3
17
|
## 0.4.0-alpha.113 (prepared)
|
|
4
18
|
|
|
5
19
|
- Remove the continuation filter's whole-request 16 MiB refusal and recursive payload traversal. Large ordinary tool/image content is preserved; old encrypted reasoning is processed independently (#326).
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Visible Models and Credits resolve missing names for saved accounts without acti
|
|
|
23
23
|
|
|
24
24
|
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.
|
|
25
25
|
|
|
26
|
-
**Source candidate: `0.4.0-alpha.
|
|
26
|
+
**Source candidate: `0.4.0-alpha.115` (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.
|
|
27
27
|
|
|
28
28
|
## What you can do
|
|
29
29
|
|
|
@@ -63,10 +63,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
63
63
|
For a **standalone named profile**:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
66
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/dsh-github-copilot-0.4.0-alpha.115.tgz
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
69
|
+
For **Desktop**, its native package manager accepts `dsh-github-copilot@0.4.0-alpha.115` 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.
|
|
70
70
|
|
|
71
71
|
After an approved reload/restart:
|
|
72
72
|
|
|
@@ -133,7 +133,7 @@ Native context occupancy and Turn Usage remain Core-owned. The plugin forwards u
|
|
|
133
133
|
|
|
134
134
|
Owned timeout/replay errors preserve native usage before terminal failure restoration, including nonzero samples. A failed zero can still make the native ring show `0%`; this is not proof of an empty request. Retry-entry times describe backoff, not the failed request's duration. These accounting fixes do not cure supplier HTTP 408 or change retry policy.
|
|
135
135
|
|
|
136
|
-
Managed request admission preserves truthful input/output limits and native transactions. Automatic pressure uses the initiating Agent's actual bound compaction service; a preset without an engine cannot borrow global recovery.
|
|
136
|
+
Managed request admission preserves truthful input/output limits and native transactions. Automatic pressure uses the initiating Agent's actual bound compaction service; a preset without an engine cannot borrow global recovery. The separately selected [recovery engine](./docs/manual-compaction-recovery.md) defaults to automatic segmented fallback for oversized summaries or an explicit summary context-limit failure. Fitting summaries stay native; timeout/408/auth/quota failures do not trigger segmentation. Up to 16 calls may add time and charges; cancellation or incomplete recovery never commits a partial summary. `automaticRecovery: false` disables this fallback; native `auto: false` still disables automatic compaction. Installation alone does not select the engine: follow the explicit same-scope configuration migration, preserving preset/custom-engine ownership and existing policies.
|
|
137
137
|
|
|
138
138
|
For continuing steps with a committed managed route and no pending model change, known input pressure is reduced before Core opens the next model attempt. Successful native reduction avoids an unsampled local-pressure attempt that would make whole-turn Usage unavailable. First steps, pending selections, new fixed-prefix growth and final hard-budget refusals retain existing admission; this does not repair historical totals or invent missing usage.
|
|
139
139
|
|
|
@@ -176,7 +176,7 @@ Configuration is under `github-copilot`. Credentials, endpoint definitions and a
|
|
|
176
176
|
| 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. |
|
|
177
177
|
| Hosted search unavailable | Check account/protocol/probe diagnostics; a legacy override stays authoritative until explicitly reset |
|
|
178
178
|
|
|
179
|
-
The Credits account panel shows the current account and **Switch
|
|
179
|
+
The Credits account panel shows the current account and **Switch**. Its dropdown lists only configured accounts, marks the effective account and scrolls long lists internally. **Follow global default** is a separate checkbox: enabling it clears the Session override; disabling it fixes the current account. Choosing any account also fixes it, even if it is today's default. Both actions retain continuation confirmation and revision-checked saving. Account addition belongs only in Models, where one **Manage** disclosure contains account management and shared model preferences. Models retains Add in its dropdown footer without selecting the new account, plus guarded local removal and reauthorization. Neither surface has account search. Exact-ID exclusions are shared across accounts; availability is account-specific. See the [approved experience and interactive mock](./docs/account-management-experience.md).
|
|
180
180
|
|
|
181
181
|
[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.
|
|
182
182
|
|
|
@@ -220,14 +220,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
220
220
|
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.
|
|
221
221
|
|
|
222
222
|
```sh
|
|
223
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
224
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
223
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/dsh-github-copilot-0.4.0-alpha.115.tgz
|
|
224
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/SHA256SUMS
|
|
225
225
|
sha256sum --check SHA256SUMS
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
```powershell
|
|
229
229
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
230
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
230
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.115.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
231
231
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
232
232
|
```
|
|
233
233
|
|
package/README.zh.md
CHANGED
|
@@ -21,7 +21,7 @@ Models 和 Chat 共用不透明、随主题适配的账号下拉层;原生菜
|
|
|
21
21
|
|
|
22
22
|
添加账号时,设备授权链接、可选择的网址、一次性授权码、复制授权码和取消操作会同时显示。GitHub 授权完成后,会单独显示身份与可用模型验证阶段。添加账号不会更改全局默认;准备好后仍需显式执行现有的**切换**操作。技术诊断收在次级折叠区;账号/历史 turn 缺少身份时不会暴露不透明账号 ID,也不会根据当前设置推断历史身份。
|
|
23
23
|
|
|
24
|
-
**源码候选版本:`0.4.0-alpha.
|
|
24
|
+
**源码候选版本:`0.4.0-alpha.115`(尚未发布)。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。** 较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。下方带版本的命令适用于候选版本发布后,不代表对应资产已经存在。
|
|
25
25
|
|
|
26
26
|
## 你可以做什么
|
|
27
27
|
|
|
@@ -61,10 +61,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
61
61
|
**独立具名 profile**:
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
64
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/dsh-github-copilot-0.4.0-alpha.115.tgz
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.
|
|
67
|
+
**Desktop** 原生包管理器在发布后接受 `dsh-github-copilot@0.4.0-alpha.115`。官方 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 或删除配置。
|
|
68
68
|
|
|
69
69
|
经批准 reload/restart 后:
|
|
70
70
|
|
|
@@ -131,7 +131,7 @@ Copilot 搜索要求当前账号/协议证据及能力 proof。固定/fallba
|
|
|
131
131
|
|
|
132
132
|
插件恢复 timeout/replay 结构化错误前会保留原生 usage,包括非零采样。失败的零采样仍可能让原生圆环显示 `0%`,不代表请求上下文为空。重试条目的耗时表示退避等待,不是失败请求耗时;用量修复不等于解决供应方 HTTP 408,也不改变重试策略。
|
|
133
133
|
|
|
134
|
-
托管请求准入保留真实输入/输出上限和原生事务。自动压力使用发起 Agent 真正绑定的压缩服务;preset
|
|
134
|
+
托管请求准入保留真实输入/输出上限和原生事务。自动压力使用发起 Agent 真正绑定的压缩服务;preset 无引擎时不能借用全局恢复。另行选用的[恢复引擎](./docs/manual-compaction-recovery.md)默认对已超限摘要或明确的摘要上下文超限错误启用自动分段兜底。能一次完成的摘要仍走原生流程;超时/408/认证/额度错误不会触发分段。最多 16 次调用可能增加耗时和费用,取消或恢复未完成不会提交半成品摘要。`automaticRecovery: false` 仅关闭自动分段,原生 `auto: false` 仍关闭自动压缩。仅安装插件不会选用该引擎:需按文档显式替换同一作用域的引擎配置,保留 preset/自定义引擎所有权及原有策略。
|
|
135
135
|
|
|
136
136
|
同一轮后续步骤已有托管路由、且没有待切换模型时,已知输入压力会在 Core 开始下次模型尝试之前压缩。原生压缩成功可避免一次无 usage 样本的本地压力拒绝导致整轮 Usage 不可用。首次步骤、待切换模型、新增固定前缀膨胀与最终硬预算拒绝仍保留原有准入;不会修复历史总量或虚构缺失用量。
|
|
137
137
|
|
|
@@ -174,7 +174,7 @@ HTTP/SSE liveness 默认区分 5 分钟字节 idle 和有界的 10 分钟助手
|
|
|
174
174
|
| 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。 |
|
|
175
175
|
| Hosted search 不可用 | 检查账号/协议/probe 诊断;旧 override 保留至显式 reset |
|
|
176
176
|
|
|
177
|
-
Credits
|
|
177
|
+
Credits 账号面板显示当前账号和 **切换**,下拉菜单只列已有账号,为当前实际账号打勾,长列表内部滚动。**跟随全局默认**是独立复选框:开启时清除本会话指定,关闭时固定当前账号;手动选择账号也会固定,即使所选恰好是当前全局默认。两种操作均保持续聊确认和 revision 校验保存。添加账号只留在 Models,其 **管理** 展开账号管理与共享模型偏好,菜单底部添加账号但不自动选中,并保留重新授权与受保护的本地账号移除。两处都没有账号搜索框。按精确模型 ID 共享排除偏好,可用性仍按账号验证。参见[已确认体验与交互 mock](./docs/account-management-experience.md)。
|
|
178
178
|
|
|
179
179
|
[可见历史续聊模式](./docs/session-continuation.md)放在账号切换旁,不再常驻输入框上方。功能首次成功激活后创建的非继承 Session 默认开启;已有 Session、继承历史仍需明确授权。全局默认只影响新 Session,Session 开关跨账号及重启保留,直到关闭。关闭时切换到不同账号,提供持续开启、保持关闭或取消,不再提供仅下一轮模式。启用后的每个新 turn 省略旧加密推理及其内嵌摘要,同账号也适用;当前轮新推理、可见消息、工具记录和磁盘历史不变。授权不自动发送或重试,不解决额度或上下文超限。精确回放失败使用同一个持久策略,用户另行点击原生重试。当前 Core 没有公开 Models 直达 API,Chat 不展示不可用的管理入口;完整管理仍在设置 → 模型 → GitHub Copilot → 管理。
|
|
180
180
|
|
|
@@ -218,14 +218,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
218
218
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
219
219
|
|
|
220
220
|
```sh
|
|
221
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
222
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
221
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/dsh-github-copilot-0.4.0-alpha.115.tgz
|
|
222
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.115/SHA256SUMS
|
|
223
223
|
sha256sum --check SHA256SUMS
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
```powershell
|
|
227
227
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
228
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
228
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.115.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
229
229
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
230
230
|
```
|
|
231
231
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.0-alpha.
|
|
11
|
+
"version": "0.4.0-alpha.115"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -329,6 +329,9 @@
|
|
|
329
329
|
{"file": "tests/account-dropdown.spec.ts", "name": "backs translucent native menu tokens with opaque Canvas and uses a dark elevation shadow"},
|
|
330
330
|
{"file": "tests/copilot-account-identity-cache.spec.ts", "name": "retains inactive verified names after freshness expiry without reads or network in status"},
|
|
331
331
|
{"file": "tests/copilot-usage-card.spec.ts", "name": "settles quota before a slow identity renewal and uses nonforcing ensure on visible refresh cadence"},
|
|
332
|
+
{"file": "tests/copilot-usage-card.spec.ts", "name": "freezes the effective account when following is unchecked and restores following through the same CAS"},
|
|
333
|
+
{"file": "tests/copilot-usage-card.spec.ts", "name": "retains confirmed following when consent is cancelled and disables it during confirmation"},
|
|
334
|
+
{"file": "tests/copilot-usage-card.spec.ts", "name": "disables following when the Session selection cannot be read instead of treating it as a fixed account"},
|
|
332
335
|
{"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "never writes a captured A refresh into B after an external selection change"},
|
|
333
336
|
{"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "preserves uncertain commit ahead of missing-slot recovery"},
|
|
334
337
|
{"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "rechecks externally started canonical authorization before selector CAS"},
|
|
@@ -563,6 +566,8 @@
|
|
|
563
566
|
"evidenceScope": "synthetic-public-subclass-and-exact-tagged-source-no-live-inference",
|
|
564
567
|
"sourceMarkers": [
|
|
565
568
|
{"file": "src/manual-compaction-recovery.ts", "marker": "extends BasicCompactionEngine"},
|
|
569
|
+
{"file": "src/manual-compaction-recovery.ts", "marker": "automaticRecovery: z.boolean().default(true)"},
|
|
570
|
+
{"file": "src/manual-compaction-recovery.ts", "marker": "maxCalls: failedAttempt ? 15 : 16"},
|
|
566
571
|
{"file": "src/manual-compaction-recovery.ts", "marker": "COPILOT_MANUAL_RECOVERY_"},
|
|
567
572
|
{"file": "src/background-compaction.ts", "marker": "copilot-compact"},
|
|
568
573
|
{"file": "src/background-compaction.ts", "marker": "this.jobs.wait(jobId"},
|
|
@@ -575,7 +580,10 @@
|
|
|
575
580
|
{"file": "tests/manual-compaction-recovery.spec.ts", "name": "rejects unmatched tool calls before dispatch instead of splitting a call and result"},
|
|
576
581
|
{"file": "tests/background-compaction.spec.ts", "name": "acknowledges before completion and outlives a five-minute caller deadline"},
|
|
577
582
|
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "commits beyond the carrier deadline without a model wakeup and keeps status owner-scoped"},
|
|
578
|
-
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "recovers oversized manual history with one native transaction and honest multi-call audit"}
|
|
583
|
+
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "recovers oversized manual history with one native transaction and honest multi-call audit"},
|
|
584
|
+
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "defaults automatic oversized recovery on without a manual command, enabled=%s"},
|
|
585
|
+
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "escalates only a typed summary capacity failure once: %s"},
|
|
586
|
+
{"file": "tests/preview-route.spec.ts", "name": "binds explicit summary capacity proof to its Agent rather than the current default"}
|
|
579
587
|
]
|
|
580
588
|
},
|
|
581
589
|
{
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Copilot account management and continuation experience
|
|
2
2
|
|
|
3
3
|
Approved account switching reference: [dropdown mock](./mockups/copilot-account-dropdown.html).
|
|
4
|
+
The [Chat account selection mock](./mockups/copilot-chat-account-selection.html)
|
|
5
|
+
supersedes its Chat menu: only configured accounts appear in the list, with
|
|
6
|
+
following controlled separately.
|
|
4
7
|
The [complete continuation mock](./mockups/copilot-account-management.html) retains
|
|
5
8
|
the earlier search-form presentation as historical context; the dropdown replaces it.
|
|
6
9
|
Open the HTML locally; append `?scenario=off-switch` to start with continuation
|
|
@@ -12,11 +15,18 @@ It performs no network requests and persists no credentials or settings.
|
|
|
12
15
|
|
|
13
16
|
The Credits control opens a compact current-account summary and Switch button.
|
|
14
17
|
Do not render all saved accounts until Switch is opened. A compact anchored dropdown
|
|
15
|
-
marks the current
|
|
16
|
-
|
|
18
|
+
marks the effective current account and supports bounded internal scrolling.
|
|
19
|
+
List every configured account, not a hard-coded two-account limit. A separate
|
|
20
|
+
**Follow global default** checkbox clears the Session override when enabled;
|
|
21
|
+
disabling it freezes the currently effective account. Choosing any account,
|
|
22
|
+
including today's default, disables following and creates an explicit override.
|
|
23
|
+
Both paths use the same continuation confirmation, revision readback and CAS,
|
|
24
|
+
and remain disabled while selection is unknown, confirming or saving. Cancelled
|
|
25
|
+
confirmation retains the confirmed checkbox state; failed writes show uncertainty.
|
|
26
|
+
Add accounts only in Models, never in the Chat dropdown. Do not add an account search field or repeat Switch
|
|
17
27
|
buttons per row. Escape closes only the dropdown and restores its trigger; arrows,
|
|
18
28
|
Home and End navigate enabled options. Outside interaction dismisses the list.
|
|
19
|
-
Adding an account does not select it. Quota is account billing-cycle data, not
|
|
29
|
+
Adding an account in Models does not select it. Quota is account billing-cycle data, not
|
|
20
30
|
context occupancy or Session cost; missing and pooled data retain their semantics.
|
|
21
31
|
|
|
22
32
|
Selection applies to subsequent turns of the viewed Session. An active turn
|
|
@@ -56,7 +56,7 @@ Disabled auto recovery or zero retries are respected. Missing/mismatching option
|
|
|
56
56
|
|
|
57
57
|
On official `0.2.0-rc.2`, Desktop presets may isolate `compaction` inside a child group, invisible to both the global plugin context and a plain `agent.ctx.get('compaction')`. The plugin uses the public `agentPresets.composedPreset()` and `serviceFor(agent, 'compaction')` methods to resolve the initiating Agent's current preset engine. A bound preset with no engine remains unavailable; it never borrows another scope's policy. Only an Agent without a bound preset uses its own context lookup. The lookup is repeated rather than caching a replaced engine. Auto's recovery-availability diagnostic uses the same helper.
|
|
58
58
|
|
|
59
|
-
This fixes scope wiring, not a new automatic command: native pressure and `agent/request-error` still invoke the selected engine. Neither `/compact` nor `/copilot-compact` is called by this listener. If the
|
|
59
|
+
This fixes scope wiring, not a new automatic command: native pressure and `agent/request-error` still invoke the selected engine. Neither `/compact` nor `/copilot-compact` is called by this listener. If the recovery engine is selected, automatic segmentation defaults on for known oversized summary input or one exact native summary capacity failure, within the same native transaction. `automaticRecovery: false` restores its automatic single-summary path; native `auto: false` and retry bounds remain authoritative. Ordinary timeout/transport failures do not become context overflow.
|
|
60
60
|
|
|
61
61
|
## Summary purpose policy
|
|
62
62
|
|
|
@@ -102,7 +102,7 @@ On official `0.2.0-rc.2`, the stock summarizer uses an explicitly configured sum
|
|
|
102
102
|
|
|
103
103
|
Official configuration already supports a separate summary route and output cap. Selecting a suitable authorized route/cap is an explicit deployment choice, not an automatic fallback. Increasing the output cap consumes combined-context headroom; decreasing it can reproduce the observed incomplete-checkpoint failure.
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
A separately selected recovery engine for compressible already-oversized manual and automatic summaries is specified in [compaction recovery](./manual-compaction-recovery.md). The stock Basic engine and preventive request guard remain unchanged. Selection requires explicit same-scope configuration migration, not installation alone. The selected engine bounds segmentation to 16 physical calls including an initial capacity failure; no hidden wire interceptor, arbitrary-error fallback or recursive retry is used. The native summary event is unmarked when several real calls contributed to one checkpoint.
|
|
106
106
|
|
|
107
107
|
## Official-first evidence and retirement
|
|
108
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Oversized
|
|
1
|
+
# Oversized compaction recovery
|
|
2
2
|
|
|
3
|
-
Tracking: [#228](https://github.com/cloga/dsh-github-copilot/issues/228). Target: unchanged official DSH `0.2.0-rc.2` (`639ed015397290b3745d163aafe02ffee4aa3f84`). This document specifies a **separately selected** Host compaction engine; installing this plugin by itself does not replace a running Core engine.
|
|
3
|
+
Tracking: [#228](https://github.com/cloga/dsh-github-copilot/issues/228), [#330](https://github.com/cloga/dsh-github-copilot/issues/330). Target: unchanged official DSH `0.2.0-rc.2` (`639ed015397290b3745d163aafe02ffee4aa3f84`). This document specifies a **separately selected** Host compaction engine; installing this plugin by itself does not replace a running Core engine. Once selected, automatic segmented recovery defaults on. The historical package export and class name remain compatible.
|
|
4
4
|
|
|
5
5
|
## Requirements and failure boundary
|
|
6
6
|
|
|
@@ -10,11 +10,15 @@ Recovery must leave the original Session surface intact until a smaller *complet
|
|
|
10
10
|
|
|
11
11
|
## Composition and algorithm
|
|
12
12
|
|
|
13
|
-
`CopilotManualRecoveryCompactionEngine` is an opt-in alternative to **one** official `BasicCompactionEngine` registration. Operators selecting it must replace (not mount alongside) their existing basic compaction service in the same Host scope; the default plugin registration never changes the service. It subclasses the published engine
|
|
13
|
+
`CopilotManualRecoveryCompactionEngine` is an opt-in alternative to **one** official `BasicCompactionEngine` registration. Operators selecting it must replace (not mount alongside) their existing basic compaction service in the same Host scope; the default plugin registration never changes the service. It subclasses the published engine: Core still owns automatic triggering/retries, manual idle maintenance, a single bracketed durable transaction, balanced range selection, checkpoint framing, source-stability/shrink checks, cancellation, failure classification, flush, and optional native pruning. With an authenticated, current managed Copilot summary model, the same hook handles manual and automatic summaries. All other providers delegate unchanged. A pending model picker is not summary-route evidence: an explicit native summary target wins, then the latest committed header, then Agent options.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
`automaticRecovery` defaults to `true` in this engine's config. Set it to `false` to retain stock automatic single-summary behavior while keeping manual segmented recovery. Native `auto: false`, `maxOverflowRetries`, thresholds and model policies retain their meaning; no background command or second transaction is launched by automatic recovery. A fitting summary first uses the unchanged native single call. A known oversized input directly enters segmented recovery. Only an actual native `LlmError` with `CONTEXT_WINDOW_EXCEEDED` from that first single summary permits one fallback, with a conservative bound at most half its original serialized input size. The rejected request is never resubmitted unchanged, and a segment failure is never recursively retried. HTTP 408, timeout, auth, quota, network, cancellation, empty or truncated output do not authorize fallback.
|
|
16
16
|
|
|
17
|
-
The
|
|
17
|
+
The plugin's account service supplies a current descriptor and a revocable proof for the explicit initiating Agent, not another Session or today's global account. Each physical summary uses public initiator scoping; no credential discovery or Client credential reads are added. Account/selection changes revoke the proof. The summary budget uses `min(maxInputTokens, contextWindow - configuredOutputCap) - safetyTokens`; an additional 4096-token allowance covers Core's appended directive and estimation variance, and actual tool-history bytes are reserved separately. Each candidate request is conservatively bounded by serialized UTF-8 size including system, tools, prior intermediate checkpoint and current messages. Native managed-route admission remains the final authority. A segment that still exceeds that guard fails; it is never retried with a hidden wire rewrite.
|
|
18
|
+
|
|
19
|
+
The hook partitions the *original* span only at balanced boundaries, summarizes each part through `super.summarize`, and supplies the previous completed intermediate checkpoint as context for the next call. Thus the last completed summary contains all processed parts in chronological order. The engine allows at most 16 physical summary calls per hook invocation, including any initial capacity failure (the exported helper's hard maximum remains 32). Each carries the native cancellation signal and checks account proof before and after dispatch. The original surface is not modified between calls. Core checks for a smaller replacement and current source after the final result; any failure closes the native marker without a partial summary replacement. Native pruning that already committed remains Core-owned. Native automatic retry/rebuild resumes the task only after a valid durable reduction.
|
|
20
|
+
|
|
21
|
+
Segmented recovery can take longer and incur additional provider charges. A sanitized Host log announces entry and its call bound; the Client keeps native compaction progress and cancellation, not a fabricated per-segment progress bar. The native transaction result remains the success evidence.
|
|
18
22
|
|
|
19
23
|
## Background command for Desktop
|
|
20
24
|
|
|
@@ -34,7 +38,7 @@ Status and cancellation apply only to the invoking Agent's latest job. Duplicate
|
|
|
34
38
|
|
|
35
39
|
The plugin collects the job's native settlement with `jobs.wait`, so the ordinary job reporter does not wake the model or resume its Goal. It never calls followup or inject. Explicit cancellation, owner disposal and plugin/Host teardown cancel and drain the producer. Owner teardown can fail native maintenance before the job receives cancellation; that outcome remains failed rather than being relabeled successful or cancelled. Jobs are process-local: status does not survive a Host restart, and the plugin does not silently restart interrupted work. Durable Core compaction events remain the outcome evidence. Merely installing the main plugin does not select this engine or make this command available; missing commands/jobs services leave the background entry unavailable without changing ordinary compaction.
|
|
36
40
|
|
|
37
|
-
**Audit:** each physical call goes through Core's public `llm.stream` seam with its actual route/cap. The final native summary event is intentionally *unmarked* (`llmStreamCall` absent), not a fabricated claim of one call. It records summed provider-reported usage only when **every** underlying call supplied usage; optional counters are included only if present on every call. The native event format has no per-call array or durable per-call transcript in a single summary event; do not infer individual request accounting from that aggregate. This is a real observability limit of the unchanged public contract.
|
|
41
|
+
**Audit:** each physical call goes through Core's public `llm.stream` seam with its actual route/cap. The final native summary event is intentionally *unmarked* (`llmStreamCall` absent), not a fabricated claim of one call. It records summed provider-reported usage only when **every** underlying call supplied usage; optional counters are included only if present on every call. After a failed initial single call, aggregate usage is omitted because this hook cannot recover that call's complete accounting. The native event format has no per-call array or durable per-call transcript in a single summary event; do not infer individual request accounting from that aggregate. This is a real observability limit of the unchanged public contract.
|
|
38
42
|
|
|
39
43
|
This aggregate is not per-call attribution: it cannot reconstruct which intermediate request used which tokens, identify each physical response, or prove that native call-attribution consumers count every intermediate request. The plugin does not manufacture `llmStreamCall`, response IDs, or individual durable usage records to fill that gap. Reported aggregate provider usage and Core's native call-attribution/accounting are separate evidence layers.
|
|
40
44
|
|
|
@@ -59,6 +63,16 @@ Select the exported `dsh-github-copilot/manual-compaction-recovery` Host class *
|
|
|
59
63
|
|
|
60
64
|
Keep the existing BasicCompactionConfig, including any modelPolicies and actual maxTokens; configure a summary route deliberately if the last committed model cannot serve the summary. Do not enable two compaction services or modify a live profile without explicit approval. The normal plugin and all ordinary sessions remain usable without this replacement; the package export alone neither installs it nor changes an existing Session.
|
|
61
65
|
|
|
66
|
+
### Explicit configuration migration
|
|
67
|
+
|
|
68
|
+
1. With separately approved profile maintenance, inspect the effective Host composition and the initiating Agent's bound preset. Identify exactly one stock basic engine in the intended scope; an absent or custom engine is not a migration target.
|
|
69
|
+
2. In the owning configuration, replace only that row's `name` with `dsh-github-copilot/manual-compaction-recovery`. Preserve its id, group, isolation, disabled state and full config, including `auto: false`, retention, caps, retry limits and exact model policies. Keep the native compact command and tool-result pruner. Do not add a second row.
|
|
70
|
+
3. For a native preset, edit its owned `config.plugins` entry in the native preset editor, preserving the surrounding plugins. Do not replace the whole preset with a stock template. A global engine replacement does not change engines isolated in presets.
|
|
71
|
+
4. Review the resulting diff and reload only through approved normal Host/preset maintenance. Existing Agents may retain the older preset generation; verify their actual bound service rather than assuming a setting change moved them. Set `automaticRecovery: false` on the replacement to disable only automatic segmentation.
|
|
72
|
+
5. To roll back, restore that row's stock name and remove only the plugin-owned `automaticRecovery` key. Keep the original native config. Already committed native summaries are not reversed.
|
|
73
|
+
|
|
74
|
+
Do not try to change an existing plugin name with the bundle include patch's `name` field: on rc.2 it is a matching guard, not a replacement. Include patches also do not traverse arbitrary preset `config.plugins`. This release intentionally supplies no automatic live migration, full-preset overwrite, service interception or Core patch. Native isolated-preset fixtures verify the selected replacement, unchanged native config and the disabled/absent/no-retry cases; they are not live deployment receipts.
|
|
75
|
+
|
|
62
76
|
## Acceptance and retirement
|
|
63
77
|
|
|
64
78
|
Focused tests must exercise oversized balanced histories, native durable replacement and no replacement on cancellation, truncation, stale source or proof, irreducible units and bounded-call exhaustion. Verify the exact published Core source fixture, frozen install, full plugin gate and immutable package smoke before describing a deployable release. CI with synthetic transport proves no live Copilot availability. Retire this companion path only when official compaction safely handles independent prompt ceilings and multi-call/manual recovery with equivalent durable audit, lifecycle and transaction guarantees.
|
package/lib/client.js
CHANGED
|
@@ -8745,13 +8745,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8745
8745
|
}
|
|
8746
8746
|
//#endregion
|
|
8747
8747
|
//#region lib/types/copilot-accounts-card.js
|
|
8748
|
-
function CopilotAccountAdd(props) {
|
|
8749
|
-
return (0, react.createElement)(CopilotAccountControls, {
|
|
8750
|
-
...props,
|
|
8751
|
-
addOnly: true,
|
|
8752
|
-
expanded: true
|
|
8753
|
-
});
|
|
8754
|
-
}
|
|
8755
8748
|
/** Copy owned presentation fields before decoding traced Client values. */
|
|
8756
8749
|
function accountsViewFrom(value) {
|
|
8757
8750
|
const record = (input) => {
|
|
@@ -9396,6 +9389,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9396
9389
|
switchAccount: "Switch account",
|
|
9397
9390
|
followGlobal: "Follow global default",
|
|
9398
9391
|
sessionSpecified: "Session override",
|
|
9392
|
+
sessionAccount: "Session account",
|
|
9393
|
+
followHint: "Choosing an account fixes it for this Session. Enable following to use the global default again.",
|
|
9399
9394
|
switchScope: "Applies to this Session’s subsequent turns. Running turns and other Sessions are unchanged.",
|
|
9400
9395
|
accountSaveFailed: "Could not save the Session account. Refresh and try again.",
|
|
9401
9396
|
accountLoading: "Loading account selection…",
|
|
@@ -9445,6 +9440,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9445
9440
|
switchAccount: "切换账号",
|
|
9446
9441
|
followGlobal: "跟随全局默认",
|
|
9447
9442
|
sessionSpecified: "Session 已指定",
|
|
9443
|
+
sessionAccount: "本会话账号",
|
|
9444
|
+
followHint: "选择账号后固定用于本会话。重新开启跟随可恢复使用全局默认。",
|
|
9448
9445
|
switchScope: "用于本 Session 后续 turn,不影响正在运行的 turn 或其他 Session。",
|
|
9449
9446
|
accountSaveFailed: "无法保存 Session 账号,请刷新后重试。",
|
|
9450
9447
|
accountLoading: "正在读取账号选择…",
|
|
@@ -9520,6 +9517,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9520
9517
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
9521
9518
|
const [failed, setFailed] = (0, react.useState)(false);
|
|
9522
9519
|
const [open, setOpen] = (0, react.useState)(false);
|
|
9520
|
+
const [restoreAccountFocus, setRestoreAccountFocus] = (0, react.useState)();
|
|
9523
9521
|
const [position, setPosition] = (0, react.useState)({
|
|
9524
9522
|
left: 12,
|
|
9525
9523
|
bottom: 12
|
|
@@ -9528,6 +9526,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9528
9526
|
const panel = (0, react.useRef)(null);
|
|
9529
9527
|
const closeButton = (0, react.useRef)(null);
|
|
9530
9528
|
const switchButton = (0, react.useRef)(null);
|
|
9529
|
+
const followCheckbox = (0, react.useRef)(null);
|
|
9531
9530
|
const lifecycle = (0, react.useRef)({
|
|
9532
9531
|
active: false,
|
|
9533
9532
|
generation: 0,
|
|
@@ -9545,6 +9544,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9545
9544
|
owner.controller?.abort();
|
|
9546
9545
|
owner.controller = void 0;
|
|
9547
9546
|
setOpen(false);
|
|
9547
|
+
setRestoreAccountFocus(void 0);
|
|
9548
9548
|
setChoosingAccount(false);
|
|
9549
9549
|
if (restore) trigger.current?.focus();
|
|
9550
9550
|
}, []);
|
|
@@ -9662,7 +9662,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9662
9662
|
unsubscribe();
|
|
9663
9663
|
};
|
|
9664
9664
|
}, [load, props.remote]);
|
|
9665
|
-
const chooseAccount = async (accountId) => {
|
|
9665
|
+
const chooseAccount = async (accountId, focus = "switch") => {
|
|
9666
9666
|
const owner = lifecycle.current;
|
|
9667
9667
|
let revision = sessionAccount?.accounts.revision;
|
|
9668
9668
|
if (!owner.active || owner.save !== void 0 || props.sessionAccount === void 0 || revision === void 0) return;
|
|
@@ -9716,7 +9716,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9716
9716
|
owner.save = void 0;
|
|
9717
9717
|
setSavingAccount(false);
|
|
9718
9718
|
await load(false);
|
|
9719
|
-
if (owner.active && owner.generation === generation + 1)
|
|
9719
|
+
if (owner.active && owner.generation === generation + 1) setRestoreAccountFocus(focus);
|
|
9720
9720
|
} catch {
|
|
9721
9721
|
if (owner.active && owner.generation === generation) {
|
|
9722
9722
|
setAccountSaveFailed(true);
|
|
@@ -9734,6 +9734,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9734
9734
|
}
|
|
9735
9735
|
}
|
|
9736
9736
|
};
|
|
9737
|
+
(0, react.useLayoutEffect)(() => {
|
|
9738
|
+
if (!open || busy || savingAccount || restoreAccountFocus === void 0) return;
|
|
9739
|
+
if (restoreAccountFocus === "follow") followCheckbox.current?.focus();
|
|
9740
|
+
else switchButton.current?.focus();
|
|
9741
|
+
setRestoreAccountFocus(void 0);
|
|
9742
|
+
}, [
|
|
9743
|
+
open,
|
|
9744
|
+
busy,
|
|
9745
|
+
savingAccount,
|
|
9746
|
+
restoreAccountFocus
|
|
9747
|
+
]);
|
|
9737
9748
|
(0, react.useLayoutEffect)(() => {
|
|
9738
9749
|
if (!open) return;
|
|
9739
9750
|
panel.current?.showPopover?.();
|
|
@@ -9811,14 +9822,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9811
9822
|
...sessionAccount.accounts,
|
|
9812
9823
|
activeAccountId: sessionAccount.runningAccountId
|
|
9813
9824
|
});
|
|
9814
|
-
const accountOptions = open && choosingAccount && sessionAccount ? [{
|
|
9815
|
-
id: null,
|
|
9816
|
-
label: t.followGlobal,
|
|
9817
|
-
selected: sessionAccount.source === "global"
|
|
9818
|
-
}, ...sessionAccount.accounts.accounts.filter((account) => account.configured).map((account) => ({
|
|
9825
|
+
const accountOptions = open && choosingAccount && sessionAccount ? [...sessionAccount.accounts.accounts.filter((account) => account.configured).map((account) => ({
|
|
9819
9826
|
id: account.id,
|
|
9820
9827
|
label: account.identity ? `@${account.identity.login}` : account.id === "canonical" ? `${t.originalAuthorization} · ${t.identityUnknown}` : `${t.savedAuthorization}${numberedUnknownAccounts.has(account.id) ? ` ${numberedUnknownAccounts.get(account.id)}` : ""} · ${t.identityUnknown}`,
|
|
9821
|
-
selected: sessionAccount.
|
|
9828
|
+
selected: sessionAccount.accountId === account.id
|
|
9822
9829
|
}))] : [];
|
|
9823
9830
|
return (0, react.createElement)("span", { style: {
|
|
9824
9831
|
display: "inline-flex",
|
|
@@ -9906,7 +9913,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9906
9913
|
onClick: () => {
|
|
9907
9914
|
close(true);
|
|
9908
9915
|
}
|
|
9909
|
-
}, "×")), props.sessionAccount === void 0 ? null : (0, react.createElement)("div", { style: separator }, (0, react.createElement)("div", { style: row }, (0, react.createElement)("p", { style: muted },
|
|
9916
|
+
}, "×")), props.sessionAccount === void 0 ? null : (0, react.createElement)("div", { style: separator }, (0, react.createElement)("div", { style: row }, (0, react.createElement)("div", null, (0, react.createElement)("strong", null, t.sessionAccount), (0, react.createElement)("p", { style: muted }, currentIdentity)), (0, react.createElement)(AccountDropdown, {
|
|
9910
9917
|
triggerRef: switchButton,
|
|
9911
9918
|
triggerStyle: {
|
|
9912
9919
|
...button,
|
|
@@ -9921,16 +9928,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9921
9928
|
if (!next) collapseAccounts();
|
|
9922
9929
|
else setChoosingAccount(true);
|
|
9923
9930
|
},
|
|
9924
|
-
options: accountOptions
|
|
9925
|
-
...option,
|
|
9926
|
-
id: option.id ?? "follow-global"
|
|
9927
|
-
})),
|
|
9931
|
+
options: accountOptions,
|
|
9928
9932
|
onSelect: (accountId) => {
|
|
9929
|
-
chooseAccount(accountId
|
|
9933
|
+
chooseAccount(accountId);
|
|
9930
9934
|
},
|
|
9931
|
-
listAttribute: "data-copilot-account-options"
|
|
9932
|
-
|
|
9933
|
-
|
|
9935
|
+
listAttribute: "data-copilot-account-options"
|
|
9936
|
+
})), (0, react.createElement)("label", { style: {
|
|
9937
|
+
display: "flex",
|
|
9938
|
+
alignItems: "center",
|
|
9939
|
+
gap: 8
|
|
9940
|
+
} }, (0, react.createElement)("input", {
|
|
9941
|
+
ref: followCheckbox,
|
|
9942
|
+
type: "checkbox",
|
|
9943
|
+
"data-copilot-follow-global": "",
|
|
9944
|
+
checked: sessionAccount?.source === "global",
|
|
9945
|
+
disabled: sessionAccount === void 0 || sessionAccount.accounts.revision === void 0 || busy || savingAccount,
|
|
9946
|
+
"aria-describedby": `${id}-follow-hint`,
|
|
9947
|
+
onChange: (event) => {
|
|
9948
|
+
const accountId = event.currentTarget.checked ? null : sessionAccount?.accountId;
|
|
9949
|
+
if (accountId !== void 0) chooseAccount(accountId, "follow");
|
|
9950
|
+
}
|
|
9951
|
+
}), t.followGlobal), (0, react.createElement)("p", {
|
|
9952
|
+
id: `${id}-follow-hint`,
|
|
9953
|
+
style: muted
|
|
9954
|
+
}, t.followHint), (0, react.createElement)("p", { style: muted }, t.switchScope), sessionAccount?.runningAccountId === void 0 ? null : (0, react.createElement)("p", { style: muted }, `${t.runningAccount}: ${runningIdentity ?? t.identityUnknown} · ${t.nextAccount}: ${currentIdentity}`), savingAccount ? (0, react.createElement)("p", {
|
|
9934
9955
|
role: "status",
|
|
9935
9956
|
style: muted
|
|
9936
9957
|
}, confirmingAccount ? t.confirmingAccount : t.savingAccount) : null, sessionAccount?.accounts.diagnostic === void 0 ? null : (0, react.createElement)("code", { style: muted }, sessionAccount.accounts.diagnostic), accountFailed || accountSaveFailed ? (0, react.createElement)("p", {
|
|
@@ -10451,7 +10472,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10451
10472
|
if (!selection(next)) return void 0;
|
|
10452
10473
|
return next.provider === "github-copilot" || next.provider === "github-copilot-preview" ? next : void 0;
|
|
10453
10474
|
}
|
|
10454
|
-
function Surface$2({ runtime, remote, accountsRemote,
|
|
10475
|
+
function Surface$2({ runtime, remote, accountsRemote, sessionRemote, continuationRemote, locale, diagnostic }) {
|
|
10455
10476
|
const valid = runtime.useSession((session) => record$2(session) && session.sessionId === runtime.sessionId && session.removed === false && session.openState === "open");
|
|
10456
10477
|
const projection = runtime.useProjection("modelSelection");
|
|
10457
10478
|
const running = runtime.useSession((value) => !record$2(value) || value.running !== false);
|
|
@@ -10470,9 +10491,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10470
10491
|
changesAccount,
|
|
10471
10492
|
running
|
|
10472
10493
|
});
|
|
10473
|
-
const added = (0, react.useCallback)(() => {
|
|
10474
|
-
accountPresentationChanges.begin()();
|
|
10475
|
-
}, []);
|
|
10476
10494
|
const bound = (0, react.useMemo)(() => {
|
|
10477
10495
|
if (sessionRemote === void 0) return void 0;
|
|
10478
10496
|
const id = runtime.sessionId;
|
|
@@ -10527,12 +10545,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10527
10545
|
sessionAccount: current.provider === "github-copilot-preview" ? bound?.account : void 0,
|
|
10528
10546
|
locale: language,
|
|
10529
10547
|
continuation: current.provider === "github-copilot-preview" ? continuation.content : void 0,
|
|
10530
|
-
beforeAccountChange: current.provider === "github-copilot-preview" ? continuation.beforeAccountChange : void 0
|
|
10531
|
-
accountActions: current.provider === "github-copilot-preview" ? (0, react.createElement)(CopilotAccountAdd, {
|
|
10532
|
-
remote: addRemote,
|
|
10533
|
-
locale: language,
|
|
10534
|
-
onChanged: added
|
|
10535
|
-
}) : void 0
|
|
10548
|
+
beforeAccountChange: current.provider === "github-copilot-preview" ? continuation.beforeAccountChange : void 0
|
|
10536
10549
|
});
|
|
10537
10550
|
}
|
|
10538
10551
|
/** Public additive dock only; native composer, ContextMeter and other features stay owned by Core. */
|
|
@@ -10554,7 +10567,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10554
10567
|
let accountsRemote;
|
|
10555
10568
|
let sessionRemote;
|
|
10556
10569
|
let continuationRemote;
|
|
10557
|
-
let addRemote;
|
|
10558
10570
|
try {
|
|
10559
10571
|
const namespaces = ctx.remote;
|
|
10560
10572
|
const face = record$2(namespaces) ? namespaces.githubCopilotUsage : void 0;
|
|
@@ -10563,8 +10575,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10563
10575
|
const accounts = record$2(namespaces) ? namespaces.githubCopilotAccounts : void 0;
|
|
10564
10576
|
if (record$2(accounts) && typeof accounts.get === "function" && typeof accounts.refreshIdentity === "function" && typeof accounts.ensureIdentity === "function") accountsRemote = accounts;
|
|
10565
10577
|
else diagnostic("COPILOT_ACCOUNTS_REMOTE_UNAVAILABLE");
|
|
10566
|
-
if (record$2(accounts) && typeof accounts.get === "function" && typeof accounts.add === "function" && typeof accounts.cancel === "function") addRemote = accounts;
|
|
10567
|
-
else diagnostic("COPILOT_ACCOUNT_ADD_REMOTE_UNAVAILABLE");
|
|
10568
10578
|
const session = record$2(namespaces) ? namespaces.githubCopilotSessionAccount : void 0;
|
|
10569
10579
|
if (isSessionRemote(session)) sessionRemote = session;
|
|
10570
10580
|
else diagnostic("COPILOT_SESSION_ACCOUNTS_REMOTE_UNAVAILABLE");
|
|
@@ -10602,7 +10612,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10602
10612
|
runtime: props,
|
|
10603
10613
|
remote,
|
|
10604
10614
|
accountsRemote,
|
|
10605
|
-
addRemote,
|
|
10606
10615
|
sessionRemote,
|
|
10607
10616
|
continuationRemote,
|
|
10608
10617
|
locale,
|