dsh-github-copilot 0.4.0-alpha.50 → 0.4.0-alpha.52
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 +10 -0
- package/README.md +8 -8
- package/README.zh.md +10 -10
- package/deployment-baseline.json +6 -3
- package/docs/automatic-model-routing.md +2 -2
- package/docs/session-search-routing.md +2 -2
- package/lib/client.js +48 -24
- package/lib/client.js.map +1 -1
- package/lib/index.js +25 -26
- package/lib/types/auto-model-presentation.d.ts +2 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -57,7 +57,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
|
|
|
57
57
|
- `src/authorization-controller.ts`: sign-in/status/sign-out and route mutation.
|
|
58
58
|
- `src/copilot-grant.ts`, `src/copilot-auth.ts`: strict grant normalization and narrow pi-ai `CredentialStore` adapter over `llm-pi-ai/github-copilot`.
|
|
59
59
|
- `src/client.ts`: `settings.models.provider-card` account UI, a `plugins.bundle.config` search page (routing and independently saved hosted-search options) with Models/footer/section routing fallback, and independently managed optional Chat integration.
|
|
60
|
-
- `src/web-search-routing-config.ts`, `src/web-search-routing-card.ts`: plugin-owned cross-provider live routing settings and the plugin-detail control surface.
|
|
60
|
+
- `src/web-search-routing-config.ts`, `src/web-search-routing-card.ts`: plugin-owned cross-provider live routing settings and the plugin-detail control surface. Routing is stored directly under the existing `github-copilot` settings namespace at `searchRouting`, mutating both leaves via nested paths `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']` in one CAS call; legacy separate routing namespaces are read as fallback only. Revisions coordinate between routing and legacy `searchModel` resets so subsequent edits do not false-conflict. The Models fallback retains routing only.
|
|
61
61
|
- `src/reasoning-presentation.ts`: guarded native Chat delegation and historical Copilot provenance; filters temporary view props only, never messages, signatures, replay indexes or usage.
|
|
62
62
|
- `src/remote.ts`: Typert Remote contribution. Never add credential payloads here.
|
|
63
63
|
- `src/copilot-usage-host.ts`, `src/copilot-usage-remote.ts`, `src/copilot-usage-card.ts`, `src/copilot-usage-ui.ts`: bounded Host quota snapshots, an independent strict namespace and reversible composer presentation. No real account fetches in tests, private Client store/DOM injection, new credential owner or general model wire.
|
|
@@ -97,7 +97,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
|
|
|
97
97
|
## Session and migration ownership (V3, alpha.8, #99)
|
|
98
98
|
|
|
99
99
|
- One global Host account supplies many models; selected/history-backed Sessions retain independent model context. Auto-mode native search derives from the captured initiating Session's effective request-header/config or explicit `GenerateOptions`, never another Session or future global default C. Fixed/fallback Copilot search uses the explicit provider-owned `searchModel` override when nonempty, otherwise bounded automatic account-owned Responses selection; it never borrows the Chat model, another Session's selection or the global chat default. `Agent.options` is the activation seed, not selected Session-model evidence; `installModelSelection` overrides request/assembly; Core records the effective `Session.requestHeader().config` before tools. Without proven request context, traditional search is unavailable. A newly selected pending model must not reuse the old request header as current prompt guidance. Per-owner plan caches prevent different-model A/B reuse/cancellation; metadata remains shared.
|
|
100
|
-
- The ordinary Web search card selects only the primary and fallback providers and saves both routing leaves in one namespace
|
|
100
|
+
- The ordinary Web search card selects only the primary and fallback providers and saves both routing leaves in one CAS mutation in the existing `github-copilot` namespace at `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']`. It must not depend on Copilot model discovery, account credentials or a model selection to save routing. Capture traced Settings/routing Remote faces once per UI registration so parent renders do not reset drafts. Preserve a legacy nonempty `searchModel` override; display it read-only and reset it only through an explicit, separate narrow CAS setting `searchModel: ''`, never as a routing-save side effect. Because routing and `searchModel` share the `github-copilot` namespace and revision, successful mutation of either updates the other's expected revision to avoid false CAS conflicts while preserving unsaved drafts. Saving settings does not prove hosted-search capability.
|
|
101
101
|
- Cold Chat picker and `/model` `listModels()` ensure the shared managed source without Settings first. Actual cold managed search non-forcing ensures metadata before deriving facts; existing 24h maximum TTL, cooldown, credential, allowlist and capability/probe gates remain.
|
|
102
102
|
- Without `agents.currentInitiator`, traditional hosted search is unavailable with a named diagnostic; explicit marked `GenerateOptions` can still bind guarded inline requests, uncached if necessary. Credential notification during initial lazy discovery cannot distinguish own rotation from external account change via public status: fail closed with `WEB_PROVIDER_UNAVAILABLE` before probe/wire; a later user/driver request may retry, never automatically.
|
|
103
103
|
- The new native Copilot draft warning says Save adds another real group, not a second account. Public additive APIs cannot veto Add or disable Save; this is warning-only, not enforced single-route registration. Core Edit/Delete remain. Alpha.7 screenshots illustrate timestamps, not alpha.8 migration/search proof.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.52 (prepared)
|
|
4
|
+
|
|
5
|
+
- Place Copilot Auto model attribution after the settled turn clock on the same footer row, and reveal it only on hover or keyboard focus, matching usage and time chrome.
|
|
6
|
+
|
|
7
|
+
## 0.4.0-alpha.51 (prepared)
|
|
8
|
+
|
|
9
|
+
- Fix web search routing settings save by reading and writing `searchRouting` under the existing `github-copilot` settings namespace, avoiding the unexported `installSection` limitation in official `@deepseek-ai/dsh-settings@0.2.0-rc.2` (#195).
|
|
10
|
+
- Coordinate CAS revisions between web search routing and legacy `searchModel` resets within the shared `github-copilot` namespace while preserving unsaved drafts.
|
|
11
|
+
- Remove fake separate namespace and `installSection` mocks from synthetic test fixtures and align contracts.
|
|
12
|
+
|
|
3
13
|
## 0.4.0-alpha.50 (prepared)
|
|
4
14
|
|
|
5
15
|
- Add a visible restart banner in `WebSearchRoutingCard` when the routed search service composition is unready, guiding users to cold-restart Desktop (#196).
|
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ The candidate manifest treats `@deepseek-ai/dsh-authorization` and `@deepseek-ai
|
|
|
53
53
|
|
|
54
54
|
The built Client intentionally requests React from DSH's browser `ModuleLoader` singleton. React is not a Desktop Host shared package and must not be installed as a required Node profile peer. Alpha.22 declares `dsh.client.external: [\"react\"]`, removes the root React peer, and retains React only as a development dependency. Packed verification now audits every required peer and Client external, confirms the real built Client requests exactly React from the loader, and preserves authorization/schemastery as required Host peers. This fixes the packaged Desktop startup error `requires missing react@^18.2.0` without enabling peer auto-install, bundling another React copy, or weakening Desktop graph validation. Actual packaged Electron loading remains a downstream acceptance gate.
|
|
55
55
|
|
|
56
|
-
Alpha.24 fixed the Web search card's missing traced Remote dependency. At that time it lived in **Settings → Models** (`settings.models.footer`, list/root), with an old-Core Web search section fallback. It now prefers the plugin's detail page; the
|
|
56
|
+
Alpha.24 fixed the Web search card's missing traced Remote dependency. At that time it lived in **Settings → Models** (`settings.models.footer`, list/root), with an old-Core Web search section fallback. It now prefers the plugin's detail page; search routing is stored under the existing `github-copilot` namespace via nested paths without requiring a separate section registration, and without affecting account controls or search safety guards. Actual packaged Desktop acceptance is still a separate gate.
|
|
57
57
|
|
|
58
58
|
### Alpha.25 official-first DSH 0.1.6-alpha.2 adaptation
|
|
59
59
|
|
|
@@ -85,7 +85,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
85
85
|
|
|
86
86
|
## Install and sign in
|
|
87
87
|
|
|
88
|
-
The commands below target the package version `0.4.0-alpha.
|
|
88
|
+
The commands below target the package version `0.4.0-alpha.52`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
|
|
89
89
|
|
|
90
90
|
Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
|
|
91
91
|
|
|
@@ -98,10 +98,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
98
98
|
For a standalone named profile only, the supported CLI command is:
|
|
99
99
|
|
|
100
100
|
```sh
|
|
101
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
101
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/dsh-github-copilot-0.4.0-alpha.52.tgz
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
104
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.52` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
|
|
105
105
|
|
|
106
106
|
Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
|
|
107
107
|
|
|
@@ -169,7 +169,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
169
169
|
5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
|
|
170
170
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
171
171
|
|
|
172
|
-
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
172
|
+
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.52`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
|
|
173
173
|
|
|
174
174
|
**Desktop package-update and Web-lifecycle boundaries:** the native manager's `restart-required` result for an in-place installed-package upgrade is authoritative and distinct from plugin-bundle removal/re-add behavior. Any plugin upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) cannot rebind active consumers via hot reload; Desktop must be fully exited and cold-restarted to take effect. A pinned public Loader characterization records that, with the exact bundle IDs and an active provider, staged first-add can leave global `ctx.web` and an active consumer unavailable even after the routed row is enabled. A separate complete cold-loaded Web-routing composition works initially but loses global `ctx.web` and its consumer on removal and remains unavailable after re-add/reconciliation. An earlier temporary harness used alias IDs and no active provider, so its successful final add was not equivalent to the exact bundle fixture. These are synthetic Loader observations, not native Desktop manager coverage or proof of restart recovery. Do not use bundle removal/re-add as a hot-upgrade workaround; follow the manager's upgrade result and separately authorized restart requirements. See [the rc.2 lifecycle characterization and bounded public-API finding](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md).
|
|
175
175
|
|
|
@@ -440,8 +440,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
440
440
|
`package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
|
|
441
441
|
|
|
442
442
|
```sh
|
|
443
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
444
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
443
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/dsh-github-copilot-0.4.0-alpha.52.tgz
|
|
444
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/SHA256SUMS
|
|
445
445
|
sha256sum --check SHA256SUMS
|
|
446
446
|
```
|
|
447
447
|
|
|
@@ -449,7 +449,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
449
449
|
|
|
450
450
|
```powershell
|
|
451
451
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
452
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
452
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.52.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
453
453
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
454
454
|
```
|
|
455
455
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
一个聚焦 GitHub Copilot 登录、通用账号模型发现、Copilot 专用 Tool 兼容与供应方托管搜索的 DSH companion。插件根据供应方返回的端点和能力元数据组装模型,复用公开的 `@deepseek-ai/dsh-llm-pi-ai` adapter 与 pi-ai SDK,不另写一套通用传输/序列化器,也不维护需要逐个添加新模型 ID 的静态目录。
|
|
11
11
|
|
|
12
|
-
> 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.
|
|
12
|
+
> 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.52`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
|
|
13
13
|
|
|
14
14
|
Alpha.24 修复了 Web search 卡片缺少精确 Remote 依赖声明的问题。当时卡片位于 **设置 → 模型**(`settings.models.footer`,list/root),旧 Core 回退到独立 Web search section。现在优先显示在插件详情页;搜索子 Fiber 仍独立等待 routing namespace,不影响账号控件和既有搜索安全检查;实际打包 Desktop 验收仍是独立关卡。
|
|
15
15
|
|
|
@@ -100,10 +100,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
100
100
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
101
101
|
|
|
102
102
|
```sh
|
|
103
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
103
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/dsh-github-copilot-0.4.0-alpha.52.tgz
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
106
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.52`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
107
107
|
|
|
108
108
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
109
109
|
|
|
@@ -171,7 +171,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
171
171
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
172
172
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
173
173
|
|
|
174
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
174
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.52`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
175
175
|
|
|
176
176
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。任何包含服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的插件升级均无法通过热重载重新绑定活动组件与 consumer,必须退出应用并冷重启 Desktop 才能完全生效。pinned public Loader characterization 记录了:使用 bundle 的精确 ID 且 provider 已激活时,分阶段首次添加可能在 routed row 启用后仍令全局 `ctx.web` 和 consumer 不可用;另一独立序列从完整冷加载且正常工作的 Web-routing composition 开始,移除后全局 `ctx.web` 与 consumer 不可用,重加/重试 reconciliation 仍未恢复。较早的临时 harness 使用别名 ID 且没有 active provider,因此其最终添加成功并不等同于精确 bundle fixture。这些都是合成 Loader 观察,不是原生 Desktop manager 覆盖,也不证明重启后恢复。不要用移除/重加 bundle 作为热升级绕行;遵循 manager 的升级结果及另行批准的重启要求。详见 [rc.2 生命周期 characterization 与有限的 public API 结论](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md)。
|
|
177
177
|
|
|
@@ -281,17 +281,17 @@ Grant 写入或复用前,Host normalizer 只会把 pi-ai 文档化的 `type`
|
|
|
281
281
|
|
|
282
282
|
新版 bundle 通过插件自有的 web 服务外观层分流,将原官方服务及完整配置保留在命名作用域中,不修改 Core 或会话预设。原生 `web_search` 保留参数校验、查询/来源数量限制、执行中间件、超时和结果展示;有可靠发起会话上下文的直接 `ctx.web.search` 调用也使用相同分流规则。
|
|
283
283
|
|
|
284
|
-
在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config
|
|
284
|
+
在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config`(按包名索引)设置跨后端搜索路由;搜索路由直接保存在 `github-copilot` 命名空间的 `searchRouting` 路径下,通过嵌套路径一次完成修订号校验写入,无需额外注册第二设置命名空间;同一页面还可展开 Copilot 托管搜索选项(开关、路由白名单、引用、工具过滤、能力证明、超时及旧兜底),两项操作分别保存并协同更新版本号。若 bundle slot 不可用,路由卡片回退到 **设置 → 模型**;若 Models footer 也不可用,则回退到 **设置 → Web search**;高级选项仍可通过原设置分区修改。同一时间只注册一处路由卡片,离开详情页会丢弃未保存的草稿。账号登录、状态及模型刷新仍在 **设置 → 模型**。仅打开新页面不会迁移或改写已有设置,卸载本插件后恢复原 web 服务。
|
|
285
285
|
|
|
286
286
|
**Search provider** 主选择器提供 **Auto — follow Chat** 和通过路由外观层实际注册的搜索 Provider;**Fallback provider**(兜底后端)使用同一目录,额外提供 **None — no fallback**。选择项代表搜索后端,不代表单个模型:即使多个账号模型可以执行搜索,Copilot 仍然只有一个搜索后端。普通配置只需选择这两个 Provider,不再要求另选搜索模型。
|
|
287
287
|
|
|
288
|
-
- `
|
|
288
|
+
- `searchRouting.searchProvider: auto` 跟随发起 Chat 的 Provider。本插件自有 Copilot 别名保留既有 owner 和模型能力检查;其他 Chat Provider 的原始 ID 必须精确匹配已注册的搜索 Provider ID,不猜名字、后缀或模型家族。这是路由约定,不承诺独立注册的后端一定使用相同模型或账号。
|
|
289
289
|
- 将 `searchProvider` 设为具体 ID,就固定主搜索后端,不再随 Chat 改变。
|
|
290
290
|
- `defaultSearchProvider` 仅在无匹配主后端或主搜索失败时作最终兜底,最多尝试一次;与主后端相同时不重试,成功但结果为空也不触发兜底。`none` 仅关闭兜底,不关闭主搜索。
|
|
291
291
|
- 显式选择 Copilot 或将它作为兜底时,内部按模型 ID 排序,从当前账号路由事实中最多考虑三个符合条件的 Responses 候选。默认要求能力 probe 成功后才发送一次用户的最终查询;元数据本身不是能力证明,最终查询失败也不会跨模型重放。内部选择不改变 Chat 或全局默认模型。其他后端自行管理模型配置(若有)。
|
|
292
292
|
- 已保存的非空 `github-copilot.searchModel` 仍具有优先权;覆盖值无效时不会静默换成其他模型。只读详情提供独立、显式的恢复自动选择操作(`searchModel: ''`);保存 Provider 路由绝不修改该覆盖值。
|
|
293
293
|
|
|
294
|
-
旧 `searchMode: auto/fixed` 配置继续兼容读取,不自动写入。旧 fixed 保留原 default 作为主后端;fixed 加 `none` 继续禁用。用户明确保存后,通过一次带修订号校验的 mutation
|
|
294
|
+
旧 `searchMode: auto/fixed` 配置继续兼容读取,不自动写入。旧 fixed 保留原 default 作为主后端;fixed 加 `none` 继续禁用。用户明确保存后,通过一次带修订号校验的 mutation 在已有的 `github-copilot` 命名空间中同时写入嵌套路径 `searchRouting.searchProvider` 与 `searchRouting.defaultSearchProvider`,不依赖模型发现或账号凭证,并协同维护修订号以避免与独立重置覆盖值发生虚假冲突。稳定的 Remote 引用避免外层页面重渲染重置草稿。发生修订冲突时,应重新加载已保存配置并重新应用所需选择;拒绝或未确认的响应不会被报告为成功。保存只证明配置持久化,不证明真实搜索能力。界面会说明保存将采用选中的最终兜底并可能产生 API 费用;旧的 `github-copilot.searchFallback: none` 失败兜底付费限制保留到明确保存新选择为止。已保存但未注册的 ID 保持显示为不可用,不静默替换。
|
|
295
295
|
|
|
296
296
|
`github-copilot.routeWebSearch: false` 仍委托原始 web 服务。其余情况下,取消、卸载及捕获的账号证明失效都不能触发兜底。通用注册后端必须遵守取消信号,但公开接口没有提供其内部鉴权后、网络发送前的检查钩子;历史 Copilot/DeepSeek 直调路径保留更强的自有发送前保护。两条路径都不会用 Copilot 登录替其他 Provider 提供凭据。
|
|
297
297
|
|
|
@@ -451,8 +451,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
451
451
|
`package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
452
452
|
|
|
453
453
|
```sh
|
|
454
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
455
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
454
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/dsh-github-copilot-0.4.0-alpha.52.tgz
|
|
455
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.52/SHA256SUMS
|
|
456
456
|
sha256sum --check SHA256SUMS
|
|
457
457
|
```
|
|
458
458
|
|
|
@@ -460,7 +460,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
460
460
|
|
|
461
461
|
```powershell
|
|
462
462
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
463
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
463
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.52.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
464
464
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
465
465
|
```
|
|
466
466
|
|
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.52"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -393,10 +393,11 @@
|
|
|
393
393
|
{"file": "tests/web-search-routing-card.spec.ts", "name": "resets a legacy override only through an explicit separate action"},
|
|
394
394
|
{"file": "tests/web-search-routing-card.spec.ts", "name": "explains a real Remote settings-conflict without exposing its raw details"},
|
|
395
395
|
{"file": "tests/client-search-inject.spec.ts", "name": "keeps real mounted drafts and pending saves through parent rerenders (bundle=%s)"},
|
|
396
|
+
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "published SettingsForms exposes descriptor/mutation APIs without installSection, and module lacks installSettingsSection"},
|
|
396
397
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "real pinned Client namespace lookups require stable capture across render calls"},
|
|
397
|
-
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "
|
|
398
|
+
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "search routing saves both leaves in github-copilot namespace using nested paths"},
|
|
398
399
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "stale routing revisions fail CAS and preserve the last successful settings"},
|
|
399
|
-
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "hidden legacy searchModel
|
|
400
|
+
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "hidden legacy searchModel and searchRouting share namespace revision and coordinate CAS"},
|
|
400
401
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "pinned generated Client mutate codecs accept routing ops and a flat namespace revision"},
|
|
401
402
|
{"file": "tests/inline/apply.spec.ts", "name": "automatically resolves account-owned Responses candidates for %s without a search model"},
|
|
402
403
|
{"file": "tests/inline/apply.spec.ts", "name": "bounds automatic proof to three eligible candidates in deterministic id order"},
|
|
@@ -989,6 +990,7 @@
|
|
|
989
990
|
{"file": "src/preview-route.ts", "marker": "GITHUB_COPILOT_AUTO_MODEL_ID"},
|
|
990
991
|
{"file": "src/auto-model-host.ts", "marker": "github-copilot/auto-model-decision"},
|
|
991
992
|
{"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.turnTail"},
|
|
993
|
+
{"file": "src/auto-model-presentation.ts", "marker": "data-time-hover-root"},
|
|
992
994
|
{"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
|
|
993
995
|
],
|
|
994
996
|
"tests": [
|
|
@@ -997,6 +999,7 @@
|
|
|
997
999
|
{"file": "tests/auto-model-host.spec.ts", "name": "resolves after downstream model selection and freezes one decision per turn"},
|
|
998
1000
|
{"file": "tests/auto-model-host.spec.ts", "name": "replaces Core virtual-Auto switch guidance with the resolved real route"},
|
|
999
1001
|
{"file": "tests/auto-model-presentation.spec.ts", "name": "folds a durable decision into turn-scoped credential-free attribution"},
|
|
1002
|
+
{"file": "tests/auto-model-presentation.spec.ts", "name": "places Auto attribution after the settled clock and reveals it only on hover"},
|
|
1000
1003
|
{"file": "tests/preview-route.spec.ts", "name": "publishes Auto as a virtual picker entry but refuses unresolved adapter dispatch"},
|
|
1001
1004
|
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "shrinks durable history and rebuilds the switched model request without sending the oversized original"}
|
|
1002
1005
|
]
|
|
@@ -91,10 +91,10 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
|
|
|
91
91
|
|
|
92
92
|
Core already places route and usage details at the end of a completed turn. The MVP follows that interaction pattern rather than adding provider/model tags above the answer.
|
|
93
93
|
|
|
94
|
-
For a completed Auto response, the
|
|
94
|
+
For a completed Auto response, the attribution sits on the same footer row as Core's usage and clock, after the end time. It stays hidden until the message is hovered or focused, matching that chrome. It is not a separate line above the answer.
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
|
-
Auto · <actual model> ?
|
|
97
|
+
[actions] [usage] [time] Auto · <actual model> ?
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
The `?` opens a compact explanation using normalized facts such as:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Requested behavior
|
|
4
4
|
|
|
5
|
-
Issue #135 separates the primary search provider from the final fallback. `
|
|
5
|
+
Issue #135 separates the primary search provider from the final fallback. `searchRouting.searchProvider` is `auto` or an exact registered search-provider ID; `defaultSearchProvider` is an independent ID or `none`. Auto follows the initiating Chat provider, never the global default. Copilot's owned aliases retain their existing account/model checks; other Chat IDs must exactly match an observed search registration, without name/suffix/model-family inference. This is a provider-level convention, not a promise of the same execution model or account across independent registries. GPT, Gemini and Grok models do not each become a separate Copilot search provider. Issue #148 makes ordinary settings provider-only: explicit/fallback Copilot resolves account-owned Responses candidates internally unless a nonempty legacy `github-copilot.searchModel` override is present. Issue #195 roots search routing under the existing `github-copilot` settings namespace at nested paths `searchRouting.searchProvider` and `searchRouting.defaultSearchProvider`, avoiding the unexported `installSection` limitation and preserving independent provider saves.
|
|
6
6
|
|
|
7
7
|
All implementation belongs to this plugin. No Core source, deployed Core artifact, prototype, private registry, credential copy or global chat-model choice is modified. The original official WebRuntime configuration, including its selected search/fetch providers, is preserved. The routed facade mirrors public search-provider registrations so exact-id selection works for official and community providers without reading Core's private registry.
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ Fallback notices remain inside canonical `WebSearchResult.content`, so Core resu
|
|
|
28
28
|
|
|
29
29
|
Legacy direct callers without the facade capture seam keep the historical `src/search-routing.ts` Copilot/DeepSeek path only for legacy policy. Its `src/deepseek-search-fallback.ts` constructs the unchanged public official adapter and retains its safe URL validation, exact option snapshot, credential ownership and post-auth/pre-fetch guard. The new catalog-based path instead calls the actual registered backend; an identical ID does not authorize replacing it with that factory. Generic `search()` exposes no internal authentication/pre-network hook, so do not claim the stronger legacy guard for arbitrary third-party implementations.
|
|
30
30
|
|
|
31
|
-
`src/search-routing-policy.ts` normalizes settings without writes: a new explicit `searchProvider` wins; old auto remains Auto; old fixed preserves its default as primary; old fixed plus `none` stays disabled. Unknown saved IDs remain visible and fail closed at dispatch. Until an explicit UI save adopts the new fallback choice, legacy `searchFallback: none` preserves its failure-spending restriction. The ordinary save commits both primary and fallback leaves together in one CAS mutation
|
|
31
|
+
`src/search-routing-policy.ts` normalizes settings without writes: a new explicit `searchProvider` wins; old auto remains Auto; old fixed preserves its default as primary; old fixed plus `none` stays disabled. Unknown saved IDs remain visible and fail closed at dispatch. Until an explicit UI save adopts the new fallback choice, legacy `searchFallback: none` preserves its failure-spending restriction. The ordinary save commits both primary and fallback leaves together in one CAS mutation in the existing `github-copilot` namespace at nested paths `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']`. It neither requires account credentials nor performs account-status/model-discovery RPC or capability probe. A nonempty legacy `searchModel` remains authoritative and visible read-only; only the separate explicit reset sets `searchModel: ''` with the shared namespace revision, coordinating local revisions after either mutation to prevent false CAS conflicts while preserving unsaved drafts. A failed reset must not prevent an unrelated routing save. Missing namespaces, read-only deployments, stale revisions and uncertain responses must remain visible without exposing raw provider errors. `routeWebSearch: false`, the master enable switch, Copilot allowlists and capability proof keep their existing responsibilities.
|
|
32
32
|
|
|
33
33
|
## Search directory and settings UI
|
|
34
34
|
|
package/lib/client.js
CHANGED
|
@@ -6066,6 +6066,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6066
6066
|
return missingSource;
|
|
6067
6067
|
}
|
|
6068
6068
|
}
|
|
6069
|
+
/** Inline footer chrome: after the settled clock, hidden until the message is hovered. */
|
|
6070
|
+
const AUTO_ATTRIBUTION_STYLE = [
|
|
6071
|
+
"[data-turn-tail]:has(> [data-copilot-auto-attribution]){flex-direction:row;flex-wrap:wrap;align-items:center;gap:0 8px}",
|
|
6072
|
+
"[data-turn-tail]>[data-copilot-auto-attribution]{order:1;display:inline-flex;align-items:center;gap:6px;margin:0;padding-left:4px;color:var(--dsw-alias-label-tertiary,var(--text-muted,#667085));font-size:14px;line-height:24px;white-space:nowrap}",
|
|
6073
|
+
"@media (hover:hover){[data-time-hover-root]>[data-copilot-auto-attribution]{opacity:0;transition:opacity 80ms ease}",
|
|
6074
|
+
"[data-time-hover-root]:hover>[data-copilot-auto-attribution],[data-time-hover-root]:focus-within>[data-copilot-auto-attribution]{opacity:1}}"
|
|
6075
|
+
].join("");
|
|
6076
|
+
const AUTO_ATTRIBUTION_STYLE_ID = "dsh-copilot-auto-attribution-style";
|
|
6077
|
+
function ensureAttributionStyle() {
|
|
6078
|
+
if (typeof document === "undefined" || document.getElementById(AUTO_ATTRIBUTION_STYLE_ID)) return;
|
|
6079
|
+
const style = document.createElement("style");
|
|
6080
|
+
style.id = AUTO_ATTRIBUTION_STYLE_ID;
|
|
6081
|
+
style.textContent = AUTO_ATTRIBUTION_STYLE;
|
|
6082
|
+
document.head.appendChild(style);
|
|
6083
|
+
}
|
|
6069
6084
|
function reasonText(value) {
|
|
6070
6085
|
return `${value.reason === "short-text-turn" ? "Short text turn" : value.reason === "large-structured-turn" ? "Large structured turn" : value.reason === "image-capability" ? "Image-capable model required" : "Standard turn"}; ${value.preference ?? "balance"} capacity preference; selected from ${value.candidateCount} eligible account model${value.candidateCount === 1 ? "" : "s"}.`;
|
|
6071
6086
|
}
|
|
@@ -6073,18 +6088,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6073
6088
|
const source = sourceOf(props);
|
|
6074
6089
|
const value = react.useSyncExternalStore(source.subscribe, source.getSnapshot, source.getSnapshot);
|
|
6075
6090
|
const [open, setOpen] = react.useState(false);
|
|
6091
|
+
react.useEffect(ensureAttributionStyle, []);
|
|
6076
6092
|
if (!record$2(value) || typeof value.model !== "string" || typeof value.provider !== "string" || !sequence(value.candidateCount)) return null;
|
|
6077
6093
|
const parsed = value;
|
|
6078
|
-
return react.createElement("span", {
|
|
6079
|
-
"data-copilot-auto-attribution": "",
|
|
6080
|
-
style: {
|
|
6081
|
-
display: "inline-flex",
|
|
6082
|
-
alignItems: "center",
|
|
6083
|
-
gap: 6,
|
|
6084
|
-
color: "var(--text-muted, #667085)",
|
|
6085
|
-
fontSize: 12
|
|
6086
|
-
}
|
|
6087
|
-
}, react.createElement("span", null, `Auto${parsed.preference === void 0 || parsed.preference === "balance" ? "" : ` (${parsed.preference})`} · ${parsed.model}`), react.createElement("button", {
|
|
6094
|
+
return react.createElement("span", { "data-copilot-auto-attribution": "" }, react.createElement("span", null, `Auto${parsed.preference === void 0 || parsed.preference === "balance" ? "" : ` (${parsed.preference})`} · ${parsed.model}`), react.createElement("button", {
|
|
6088
6095
|
type: "button",
|
|
6089
6096
|
"aria-label": "Why this model",
|
|
6090
6097
|
"aria-expanded": open,
|
|
@@ -6505,8 +6512,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6505
6512
|
const [draft, setDraft] = (0, react.useState)({
|
|
6506
6513
|
primary: "auto",
|
|
6507
6514
|
provider: DEEPSEEK_SEARCH_PROVIDER,
|
|
6508
|
-
legacy: true
|
|
6509
|
-
routingNamespace: WEB_SEARCH_ROUTING_SETTINGS_NAMESPACE
|
|
6515
|
+
legacy: true
|
|
6510
6516
|
});
|
|
6511
6517
|
const [override, setOverride] = (0, react.useState)({ model: "" });
|
|
6512
6518
|
const [providers, setProviders] = (0, react.useState)([]);
|
|
@@ -6542,24 +6548,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6542
6548
|
return;
|
|
6543
6549
|
}
|
|
6544
6550
|
const copilot = result.value.namespaces.find((entry) => entry.ns === GITHUB_COPILOT_SETTINGS_NAMESPACE);
|
|
6545
|
-
const
|
|
6551
|
+
const legacyRouting = result.value.namespaces.find((entry) => entry.ns === WEB_SEARCH_ROUTING_SETTINGS_NAMESPACE);
|
|
6546
6552
|
const copilotValue = record$1(copilot?.value);
|
|
6547
|
-
const
|
|
6553
|
+
const copilotRoutingValue = record$1(copilotValue.searchRouting);
|
|
6554
|
+
const legacyRoutingValue = record$1(legacyRouting?.value);
|
|
6555
|
+
const routingValue = Object.keys(copilotRoutingValue).length > 0 ? copilotRoutingValue : legacyRoutingValue;
|
|
6548
6556
|
const normalized = normalizeWebSearchRouting({
|
|
6549
6557
|
searchProvider: typeof routingValue.searchProvider === "string" ? routingValue.searchProvider : void 0,
|
|
6550
6558
|
searchMode: routingValue.searchMode === "fixed" ? "fixed" : "auto",
|
|
6551
6559
|
defaultSearchProvider: typeof routingValue.defaultSearchProvider === "string" ? routingValue.defaultSearchProvider : void 0
|
|
6552
6560
|
});
|
|
6561
|
+
const copilotRevision = revisionOf(copilot?.revision);
|
|
6553
6562
|
setDraft({
|
|
6554
6563
|
primary: normalized.primaryProvider,
|
|
6555
6564
|
provider: normalized.defaultProvider,
|
|
6556
6565
|
legacy: normalized.legacy,
|
|
6557
|
-
routingRevision:
|
|
6558
|
-
routingNamespace: WEB_SEARCH_ROUTING_SETTINGS_NAMESPACE
|
|
6566
|
+
routingRevision: copilotRevision
|
|
6559
6567
|
});
|
|
6560
6568
|
setOverride({
|
|
6561
6569
|
model: typeof copilotValue.searchModel === "string" ? copilotValue.searchModel.trim() : "",
|
|
6562
|
-
revision:
|
|
6570
|
+
revision: copilotRevision
|
|
6563
6571
|
});
|
|
6564
6572
|
const parsed = catalog?.ok ? SearchProviderCatalogSchema.safeParse(catalog.value) : void 0;
|
|
6565
6573
|
const ids = parsed?.success ? parsed.data.providers.map((entry) => entry.id) : [];
|
|
@@ -6573,7 +6581,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6573
6581
|
setProviders(ids.toSorted());
|
|
6574
6582
|
setCatalogReady(true);
|
|
6575
6583
|
setWritable(result.value.writable === true);
|
|
6576
|
-
if (!
|
|
6584
|
+
if (!copilot || copilotRevision === void 0) setMessage("Web search routing settings are unavailable. Reload after the routing namespace is registered.");
|
|
6577
6585
|
else if (!result.value.writable) setMessage("Search settings are read-only in this deployment.");
|
|
6578
6586
|
} catch {
|
|
6579
6587
|
if (current()) setMessage("Could not load search settings. Reload settings to retry.");
|
|
@@ -6613,13 +6621,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6613
6621
|
setSaving("routing");
|
|
6614
6622
|
setMessage("");
|
|
6615
6623
|
try {
|
|
6616
|
-
const result = await props.settings.mutate(
|
|
6624
|
+
const result = await props.settings.mutate(GITHUB_COPILOT_SETTINGS_NAMESPACE, [{
|
|
6617
6625
|
op: "set",
|
|
6618
|
-
path: ["searchProvider"],
|
|
6626
|
+
path: ["searchRouting", "searchProvider"],
|
|
6619
6627
|
value: primary
|
|
6620
6628
|
}, {
|
|
6621
6629
|
op: "set",
|
|
6622
|
-
path: ["defaultSearchProvider"],
|
|
6630
|
+
path: ["searchRouting", "defaultSearchProvider"],
|
|
6623
6631
|
value: provider
|
|
6624
6632
|
}], draft.routingRevision);
|
|
6625
6633
|
if (!current()) return;
|
|
@@ -6628,6 +6636,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6628
6636
|
return;
|
|
6629
6637
|
}
|
|
6630
6638
|
const revision = revisionOf(result.value.revision);
|
|
6639
|
+
if (revision === void 0) {
|
|
6640
|
+
setDraft((value) => current() ? {
|
|
6641
|
+
...value,
|
|
6642
|
+
routingRevision: void 0
|
|
6643
|
+
} : value);
|
|
6644
|
+
setMessage("Save returned no revision. Reload settings before editing again.");
|
|
6645
|
+
return;
|
|
6646
|
+
}
|
|
6631
6647
|
setDraft((value) => current() ? {
|
|
6632
6648
|
...value,
|
|
6633
6649
|
primary,
|
|
@@ -6635,7 +6651,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6635
6651
|
routingRevision: revision,
|
|
6636
6652
|
legacy: false
|
|
6637
6653
|
} : value);
|
|
6638
|
-
|
|
6654
|
+
setOverride((value) => current() ? {
|
|
6655
|
+
...value,
|
|
6656
|
+
revision
|
|
6657
|
+
} : value);
|
|
6658
|
+
setMessage("Saved. New searches use this routing. Search availability is checked when you search.");
|
|
6639
6659
|
} catch (error) {
|
|
6640
6660
|
if (current()) setMessage(saveFailure(error));
|
|
6641
6661
|
} finally {
|
|
@@ -6671,10 +6691,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6671
6691
|
}
|
|
6672
6692
|
const revision = revisionOf(result.value.revision);
|
|
6673
6693
|
if (revision === void 0) {
|
|
6674
|
-
setOverride((value) => ({
|
|
6694
|
+
setOverride((value) => current() ? {
|
|
6675
6695
|
...value,
|
|
6676
6696
|
revision: void 0
|
|
6677
|
-
})
|
|
6697
|
+
} : value);
|
|
6678
6698
|
setMessage("Save returned no revision. Reload settings before editing again.");
|
|
6679
6699
|
return;
|
|
6680
6700
|
}
|
|
@@ -6682,6 +6702,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6682
6702
|
model: "",
|
|
6683
6703
|
revision
|
|
6684
6704
|
});
|
|
6705
|
+
setDraft((value) => current() ? {
|
|
6706
|
+
...value,
|
|
6707
|
+
routingRevision: revision
|
|
6708
|
+
} : value);
|
|
6685
6709
|
setMessage("Copilot model selection is now automatic. Unsaved provider choices have not been applied.");
|
|
6686
6710
|
} catch (error) {
|
|
6687
6711
|
if (current()) setMessage(saveFailure(error));
|