dsh-web-search-enhanced 0.1.5 → 0.1.6
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/CHANGELOG.md +14 -0
- package/README.md +9 -7
- package/docs/configuration.zh-CN.md +3 -3
- package/docs/design-v2.converged.zh-CN.md +2 -2
- package/docs/migration.zh-CN.md +10 -6
- package/docs/upstream-0.2.0-rc.2-assessment.zh-CN.md +37 -0
- package/docs/v2-implementation.zh-CN.md +4 -4
- package/lib/client.js +36 -5
- package/lib/client.js.map +1 -1
- package/lib/index.js +54 -3
- package/lib/types/client/locales.d.ts +1 -0
- package/lib/types/client/search-selector.css.d.ts +1 -1
- package/lib/types/dsh/bridge.d.ts +1 -0
- package/package.json +55 -54
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.6] - 2026-09-30
|
|
8
|
+
|
|
9
|
+
### DSH 0.2.0-rc.2 兼容性
|
|
10
|
+
|
|
11
|
+
- 最低宿主版本提升至 `0.2.0-rc.2`;所有 DSH peer 依赖下限改为 `^0.2.0-rc.2`,直接开发依赖固定到 rc.2,同步更新锁文件和预发布白名单。
|
|
12
|
+
- Zod 最低版本保持与上游一致的 `^4.4.3`,开发依赖树统一锁定 `4.4.3`,增加跨包 schema 类型一致性和发行包契约检查,避免依赖漂移被误判为 API 破坏。Cordis / Schemastery 的上游版本未变。
|
|
13
|
+
- 增加 pi-ai 新 DeepSeek Flash ID 的跟随模型回归,验证被移除的目录 ID 不会被自动改名,显式私有路由保持原模型 ID。新增 [rc.2 影响评估](docs/upstream-0.2.0-rc.2-assessment.zh-CN.md)。
|
|
14
|
+
- 配置 version 2、会话 Storage Domain version 1 保持不变,无需新增迁移;升级指南明确先卸载旧插件再安装,并重载服务端、刷新 Web 页面。CI 和发布均显式使用冻结锁文件。
|
|
15
|
+
|
|
16
|
+
### 会话搜索选择器
|
|
17
|
+
|
|
18
|
+
- 新增“关闭”选项,按会话禁用 `web_search`;恢复连接后重新启用,不影响 `web_fetch`。
|
|
19
|
+
- 对齐宿主输入区模型选择器的响应式边界,保留关闭搜索、连接选择和实时性控制的既有回归测试。
|
|
20
|
+
|
|
7
21
|
## [0.1.5] - 2026-09-29
|
|
8
22
|
|
|
9
23
|
### DSH 0.2.0-rc.1 兼容性
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://github.com/Yurzi/dsh-web-search-enhanced/releases)
|
|
12
12
|
[](LICENSE)
|
|
13
|
-
[](package.json)
|
|
14
14
|
[](package.json)
|
|
15
15
|
|
|
16
16
|
[🚀 快速上手](#-快速上手) · [✨ 核心特性](#-核心特性) · [🔍 搜索引擎推荐](#-选哪种搜索服务) · [⚙️ 进阶配置](#️-进阶配置与个人-key) · [❓ 常见问题](#-常见问题-faq) · [📖 详细文档](#-想了解更多)
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
|
|
61
61
|
### 环境要求
|
|
62
62
|
|
|
63
|
-
- **DeepSeek Harness**:≥ `0.2.0-rc.
|
|
63
|
+
- **DeepSeek Harness**:≥ `0.2.0-rc.2`
|
|
64
64
|
- **Node.js**:`^22.19.0 || >=24.0.0`
|
|
65
65
|
|
|
66
|
-
本版将 DSH 基线提升到 0.2.0-rc.
|
|
66
|
+
本版将 DSH 基线提升到 0.2.0-rc.2,保留动态配置、插件设置页和会话 projection 架构,无需新的配置或存储迁移。跟随模型仍要求 API Key;使用 pi-ai 内置 DeepSeek 目录时,请重新选择 `deepseek-flash` 并检查旧模型 overrides,本插件不会自动改名。详见[0.2.0-rc.2 影响评估](docs/upstream-0.2.0-rc.2-assessment.zh-CN.md)。升级前请备份 profile 和旧设置。
|
|
67
67
|
|
|
68
68
|
### 步骤 1:安装插件
|
|
69
69
|
|
|
70
70
|
**方式 A:通过 GitHub Release 离线包安装(推荐)**
|
|
71
71
|
|
|
72
|
-
当前版本为 **0.1.
|
|
72
|
+
当前版本为 **0.1.6**,最低支持 **DSH 0.2.0-rc.2**。发布后可从 [Releases](https://github.com/Yurzi/dsh-web-search-enhanced/releases) 下载对应版本安装包及 SHA256 校验文件;也可执行 `pnpm install --frozen-lockfile && pnpm run check && pnpm pack` 自行构建。使用绝对路径安装:
|
|
73
73
|
|
|
74
74
|
```sh
|
|
75
|
-
dsh plugin --profile web add /path/to/dsh-web-search-enhanced-0.1.
|
|
75
|
+
dsh plugin --profile web add /path/to/dsh-web-search-enhanced-0.1.6.tgz
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
**方式 B:通过 npm 在线安装**
|
|
@@ -80,9 +80,11 @@ dsh plugin --profile web add /path/to/dsh-web-search-enhanced-0.1.5.tgz
|
|
|
80
80
|
该版本发布到 npm 后,也可直接安装:
|
|
81
81
|
|
|
82
82
|
```sh
|
|
83
|
-
dsh plugin --profile web add dsh-web-search-enhanced@0.1.
|
|
83
|
+
dsh plugin --profile web add dsh-web-search-enhanced@0.1.6
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
已安装旧版时,DSH rc.2 不支持直接自动升级:先备份配置和存储,再通过插件管理器移除旧版并安装 0.1.6,核对 profile 补丁与会话选择。Desktop profile 需先启动过一次桌面端。完整步骤见[升级指南](docs/migration.zh-CN.md)。
|
|
87
|
+
|
|
86
88
|
### 步骤 2:生效与刷新
|
|
87
89
|
|
|
88
90
|
1. 重载插件或重启 DSH 服务端。
|
|
@@ -200,7 +202,7 @@ _注:实时抓取可能会稍微增加检索耗时与额度消耗;对于不
|
|
|
200
202
|
| 文档 | 适合谁读 | 主要内容 |
|
|
201
203
|
| :------------------------------------------------------- | :------------------ | :---------------------------------------------------------------- |
|
|
202
204
|
| 📘 **[配置指南](docs/configuration.zh-CN.md)** | 所有用户 / 进阶用户 | 完整参数列表、凭据机制、高级 options 白名单、自定义端点与排错字典 |
|
|
203
|
-
| 📙 **[升级指南](docs/migration.zh-CN.md)** | 从旧版升级的老用户 | 0.2.0-rc.
|
|
205
|
+
| 📙 **[升级指南](docs/migration.zh-CN.md)** | 从旧版升级的老用户 | 0.2.0-rc.2 宿主适配、旧版导入指引、升级踩坑预防 |
|
|
204
206
|
| 📗 **[架构设计说明](docs/design-v2.converged.zh-CN.md)** | 开发者 / 架构爱好者 | 会话状态隔离、请求快照机制、多适配器与安全性设计 |
|
|
205
207
|
| 🛠️ **[开发与验证文档](docs/v2-implementation.zh-CN.md)** | 插件二次开发者 | 本地构建、单元测试、浏览器环境验证与打包发布 |
|
|
206
208
|
| 📝 **[更新日志](CHANGELOG.md)** | 所有人 | 版本演进记录与历史变更 |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# 0.1.
|
|
1
|
+
# 0.1.6 配置参考
|
|
2
2
|
|
|
3
|
-
本指南面向安装版插件。包版本为 **0.1.
|
|
3
|
+
本指南面向安装版插件。包版本为 **0.1.6**,配置格式的 `version` 为 **2**;两者不是同一版本号。快速开始见 [README](../README.md),旧版用户先读[升级指南](migration.zh-CN.md)。
|
|
4
4
|
|
|
5
5
|
## 配置入口与作用范围
|
|
6
6
|
|
|
7
7
|
在 DSH 设置的 Web Search Enhanced 卡片管理搜索连接、凭据引用与新会话默认值,在已有会话输入区选择搜索连接和内容实时性。搜索连接独立于对话模型。设置按宿主 ConfigForms / ConfigForm 保存 profile 稀疏覆盖,不复制整个内置目录;恢复继承设置、删除用户连接覆盖均不删除 Credentials。继承层中的连接在移除用户覆盖后仍可能存在。
|
|
8
8
|
|
|
9
|
-
以下 YAML 均为 DSH 0.2.0-rc.
|
|
9
|
+
以下 YAML 均为 DSH 0.2.0-rc.2 的 profile patch 条目,`id: web-search-enhanced` 是安装补丁的固定条目 ID,字段置于 `config` 下。旧 `settings.yaml` 由宿主导入后不再作为实时配置源;优先使用插件管理器中的配置页,避免覆盖其他插件设置。专属客户端配置页绑定默认条目 ID,不支持任意改名或多个搜索插件实例。
|
|
10
10
|
|
|
11
11
|
```yaml
|
|
12
12
|
- id: web-search-enhanced
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 0.1.
|
|
1
|
+
# 0.1.6 当前架构与实现边界
|
|
2
2
|
|
|
3
3
|
本文描述已存在的源码契约,不是未来设计提案或历史验收记录。为避免外部链接失效,保留原文件名。用户配置见[配置参考](configuration.zh-CN.md),验证方法见[开发验证指南](v2-implementation.zh-CN.md)。
|
|
4
4
|
|
|
@@ -46,7 +46,7 @@ tools/execute 的 exec.agent → 私有 AsyncLocalStorage → enhanced-search
|
|
|
46
46
|
|
|
47
47
|
## 3. 配置和秘密分离
|
|
48
48
|
|
|
49
|
-
当前设置格式为 version 2,包版本为 0.1.
|
|
49
|
+
当前设置格式为 version 2,包版本为 0.1.6。内置目录只做默认值;用户保存差异,不把目录整表复制到用户层。四种结构化内置连接默认 keyless,访问方式为显式选择,不根据已保存 Key 猜测。自定义连接只允许支持的 adapter 或固定模型协议;新 endpoint 需要信任确认。
|
|
50
50
|
|
|
51
51
|
内置结构化连接不能重定向地址或改变 adapter。自定义结构化连接只能使用个人 Key;固定模型总是需要显式信任。校验拒绝任意 headers/body、缓存参数、秘密字段等不受支持的 options。禁用连接也参与配置校验。
|
|
52
52
|
|
package/docs/migration.zh-CN.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# 升级到 0.1.
|
|
1
|
+
# 升级到 0.1.6 / DSH 0.2.0-rc.2
|
|
2
2
|
|
|
3
|
-
0.1.
|
|
3
|
+
0.1.6 将最低宿主版本提高为 **0.2.0-rc.2**,沿用 0.1.3 已完成的 Loader 动态配置、profile-backed SettingsForms、ConfigForms 客户端、惰性 Typert codec 和新版 PTC 适配。从 0.1.3 / 0.1.4 / 0.1.5 升级不需要新的配置或存储迁移;详见 [0.2.0-rc.2 影响评估](upstream-0.2.0-rc.2-assessment.zh-CN.md)。旧版已采用的**会话级搜索连接**保持不变:包版本 0.1.6、设置格式 version 2、会话 Storage Domain version 1 是三个不同概念。完整参数见[配置参考](configuration.zh-CN.md)。
|
|
4
4
|
|
|
5
5
|
## 1. 升级前准备
|
|
6
6
|
|
|
7
|
-
- 确认 DSH 满足 `>=0.2.0-rc.
|
|
7
|
+
- 确认 DSH 满足 `>=0.2.0-rc.2`,Node 满足 `^22.19.0 || >=24.0.0`。实现基线是 0.2.0-rc.2 契约,不代表对所有未来宿主版本均完成验证。
|
|
8
8
|
- 备份当前插件版本、Web profile / 插件配置和 DSH 持久存储。凭据使用宿主安全备份方式,不复制到公开 Issue 或仓库。
|
|
9
9
|
- 记录旧 `modelMode`、协议、模型、endpoint、凭据引用,以及希望保留的会话选择。
|
|
10
10
|
- 推荐升级前先将明文 `apiKey` 移到 DSH Credentials 并从配置来源删除。兼容导入仅允许旧格式短暂携带 Key:先验证转换结果,再写 Credentials,最后 CAS 替换 profile 配置。V2 配置仍拒绝明文 Key;已有不同值的同名凭据不会被自动覆盖。
|
|
@@ -12,16 +12,20 @@
|
|
|
12
12
|
|
|
13
13
|
## 2. 安装发行包
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
DSH rc.2 对已安装插件不支持直接自动升级。先完成备份、停止相关任务,通过插件管理器卸载旧插件(CLI 使用 `dsh plugin --profile web remove dsh-web-search-enhanced`),再安装下述固定版本;卸载可能改变 profile 补丁,安装后核对原设置、凭据引用和会话选择,不要清空持久存储。使用 `--profile desktop` 时须先启动过一次 Desktop 初始化 profile,并完全退出 Desktop 后执行 CLI。
|
|
16
|
+
|
|
17
|
+
若跟随 pi-ai 内置 DeepSeek 目录,升级宿主后重新选择 `deepseek-flash`,检查旧 `deepseek-v4-flash` / `deepseek-v4-flash-vision-exp` 及其 overrides、默认模型和子代理设置。只针对这条目录路由,不机械替换私有端点的 ID;本插件不会改写用户模型配置。
|
|
18
|
+
|
|
19
|
+
从当前源码运行 `pnpm install --frozen-lockfile && pnpm run check && pnpm pack`,或使用 [Releases](https://github.com/Yurzi/dsh-web-search-enhanced/releases) 中实际发布的 0.1.6 构建包。使用绝对路径交给 DSH 插件管理器:
|
|
16
20
|
|
|
17
21
|
```sh
|
|
18
|
-
dsh plugin --profile web add /absolute/path/to/dsh-web-search-enhanced-0.1.
|
|
22
|
+
dsh plugin --profile web add /absolute/path/to/dsh-web-search-enhanced-0.1.6.tgz
|
|
19
23
|
```
|
|
20
24
|
|
|
21
25
|
若该版本已在 npm 发布,也可安装固定版本:
|
|
22
26
|
|
|
23
27
|
```sh
|
|
24
|
-
dsh plugin --profile web add dsh-web-search-enhanced@0.1.
|
|
28
|
+
dsh plugin --profile web add dsh-web-search-enhanced@0.1.6
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
发布附件中的构建 tgz 与 GitHub 自动生成的 Source code archive 不同:后者是源码,不能假定含 `lib/` 构建产物。npm 可用性须以 registry 实际发布结果为准,GitHub 标签 / Release 存在不代表 npm 已完成。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# DSH 0.2.0-rc.2 插件适配评估
|
|
2
|
+
|
|
3
|
+
## 版本与范围
|
|
4
|
+
|
|
5
|
+
本次对照上游标签 `dsh-v0.2.0-rc.1` 与 `dsh-v0.2.0-rc.2`(提交 `639ed015397290b3745d163aafe02ffee4aa3f84`),结合两份升级评估核查 Web Search Enhanced。插件发布版本为 **0.1.6**,最低宿主 **0.2.0-rc.2**。
|
|
6
|
+
|
|
7
|
+
- engines.dsh:`>=0.2.0-rc.2`;全部 DSH peer:`^0.2.0-rc.2`;直接开发依赖精确固定 rc.2。
|
|
8
|
+
- 更新 pnpm 锁文件与仅针对审阅版本的预发布白名单。开发安装统一 Zod **4.4.3**,运行依赖下限继续为 `^4.4.3`,与上游 rc.2 锁文件一致;不以类型断言规避跨包 schema 类型冲突。
|
|
9
|
+
- Cordis **4.0.4**、Include **1.0.9**、Loader **1.0.5**、Schemastery **3.18.4** 在上游未变,不盲目升级。Node 下限保持 `^22.19.0 || >=24.0.0`。
|
|
10
|
+
- pnpm overrides 只控制本仓库开发/CI 依赖树,不会强制修改已安装宿主的其他插件依赖。部署应整套对齐 DSH 包,不混装 rc.1 和 rc.2。
|
|
11
|
+
|
|
12
|
+
## API 与行为结论
|
|
13
|
+
|
|
14
|
+
| 上游变化 | 本插件影响 / 处理 |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Tools、Web、Settings、LLM 核心实现 | 两标签间只有包版本变化;沿用 Provider、动态配置、会话 projection 与冻结请求快照。 |
|
|
17
|
+
| pi-ai 0.87.1 模型目录 | 内置 DeepSeek 目录使用 deepseek-flash,旧 deepseek-v4-flash / deepseek-v4-flash-vision-exp 被移除。跟随目录模式要求当前 ID;回归验证缺失 ID 不自动重写,显式私有路由保留原 ID。 |
|
|
18
|
+
| ui-commands 模糊搜索、分组、PopupState 必填字段 | 本插件不手工构造 PopupState,也不替换内置弹窗;现有会话搜索选择器无需新增 props。 |
|
|
19
|
+
| TypertGateway.hasLiveClient() | 不实现自定义 Gateway;集成测试使用 rc.2 原生 Gateway,避免旧实现混装。 |
|
|
20
|
+
| timed ask_user_question 与迟到回答 | 不提供问答替代 UI/answerer,不把 pending 当授权;无需改变搜索业务。 |
|
|
21
|
+
| 定时消息 framing | 本插件不创建提醒或向其嵌入外部搜索结果;无需修改。 |
|
|
22
|
+
| OpenInAppAction、侧栏、Client inspect、Shell/ACL | 不调用这些变化接口或脚本,不受直接影响。 |
|
|
23
|
+
| 插件升级和 Desktop profile | 已安装插件先卸载再安装;Desktop 先启动一次初始化 profile,并完全退出后执行 CLI。 |
|
|
24
|
+
|
|
25
|
+
**不自动改写模型配置。** 上游 pi-ai 内置目录的 ID 变化不是所有 Provider 的全局改名。用户需检查默认模型、会话模型、modelOverrides 和子代理配置;私有端点应显式声明实际模型。能聊天不代表搜索连接可用:跟随模式仍需要 API Key 引用,不自动透传 OAuth/账号认证。
|
|
26
|
+
|
|
27
|
+
## 配置与部署
|
|
28
|
+
|
|
29
|
+
设置格式仍为 version 2,会话 Storage Domain 仍为 version 1;从 0.1.3–0.1.5 无需新增迁移。不重写宿主 Session 日志,不清空已有凭据或会话搜索选择。备份后先移除旧插件,再安装固定版本,审阅 profile 补丁,重载服务端并刷新 Web 页面。详见[升级指南](migration.zh-CN.md)。
|
|
30
|
+
|
|
31
|
+
## 验证范围
|
|
32
|
+
|
|
33
|
+
发布检查使用冻结锁文件,执行 TypeScript Host/Client 类型检查、两端构建、完整 Vitest 测试与真实 tarball 契约校验。新增断言覆盖全部锁定 DSH 包版本、跨包 Zod 解析一致性和 Flash ID 边界;既有集成测试覆盖原生/PTC 请求、Gateway/SessionController、搜索关闭/恢复、设置持久化、fork 与会话隔离。
|
|
34
|
+
|
|
35
|
+
本次本地执行 `pnpm install --frozen-lockfile && pnpm run check` 退出 0:类型检查、两端构建、21 个测试文件 / 336 项测试和真实安装包契约全部通过。测试使用模拟网络及目录 fixture,不宣称已运行真实 pi-ai 模型或供应商请求。
|
|
36
|
+
|
|
37
|
+
这些验证不代表升级了用户正在运行的 DSH 实例,也不等于对真实供应商联网、付费认证或 Desktop 原生环境完成验收。上游报告中的 Fetch/Undici 问题属于其他插件,本插件不新增 Undici 依赖。
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# 0.1.
|
|
1
|
+
# 0.1.6 开发与验证指南
|
|
2
2
|
|
|
3
3
|
本文件保留原路径以避免断链,内容改为可重复的开发、验证与交付方法。架构见[当前架构](design-v2.converged.zh-CN.md),用户使用见[配置参考](configuration.zh-CN.md),版本升级见[升级指南](migration.zh-CN.md)。测试存在、测试通过、供应商在线可用、运行实例完成部署是四种不同结论,不能互相替代。
|
|
4
4
|
|
|
5
5
|
## 环境与开发入口
|
|
6
6
|
|
|
7
7
|
- Node.js:`^22.19.0 || >=24.0.0`;pnpm:按 packageManager 使用 `11.7.0`。
|
|
8
|
-
- DSH:包要求 `>=0.2.0-rc.
|
|
9
|
-
- 当前开发主线为 `main`,旧版代码线为 `legacy/v0.0.x`。包版本 `0.1.
|
|
8
|
+
- DSH:包要求 `>=0.2.0-rc.2`,源码以 0.2.0-rc.2 服务契约为基线。依赖声明与锁文件是构建依据,不修改宿主安装的依赖来让测试通过。
|
|
9
|
+
- 当前开发主线为 `main`,旧版代码线为 `legacy/v0.0.x`。包版本 `0.1.6` 与 settings schema 的 `version: 2` 不同。
|
|
10
10
|
|
|
11
11
|
在仓库根执行:
|
|
12
12
|
|
|
@@ -101,7 +101,7 @@ preview-ui 写 `.dsh-smoke-home/settings-preview.html`,不会启动第二个 D
|
|
|
101
101
|
|
|
102
102
|
1. 对最终待发提交运行 check 和所需浏览器 / 网络验证,记录版本与退出状态。
|
|
103
103
|
2. 使用 `pnpm pack` 生成构建包;检查包版本、入口、声明、patch、README 与 docs 完整性。GitHub 自动 Source code archive 不是含 lib 的发行 tgz。
|
|
104
|
-
3. 用户可用 `dsh plugin --profile web add /absolute/path/to/dsh-web-search-enhanced-0.1.
|
|
104
|
+
3. 用户可用 `dsh plugin --profile web add /absolute/path/to/dsh-web-search-enhanced-0.1.6.tgz` 安装 Release 构建附件。
|
|
105
105
|
4. Git 操作、远端分支调整、标签、Release 和 npm 发布分别需要授权与结果核验;不要把本地构建当作已发布。主线为 main,旧代码保留 legacy/v0.0.x,不需要把历史文档反复改成当前成功记录。
|
|
106
106
|
5. 标签触发发布流程后,单独确认 workflow 和 npm registry 的版本 / 包内容,再宣称 npm 可安装。
|
|
107
107
|
|
package/lib/client.js
CHANGED
|
@@ -6217,7 +6217,7 @@ window.__ModuleLoader__.load({
|
|
|
6217
6217
|
const selectorCss = `
|
|
6218
6218
|
/* Match DSH ModelSelect trigger/menu metrics and semantic theme tokens. */
|
|
6219
6219
|
.v2s-selector { display:inline-flex; align-items:center; flex:none; min-width:0; font:inherit; }
|
|
6220
|
-
.v2s-search-trigger { display:flex; align-items:center; gap:4px; min-width:0; max-width:min(
|
|
6220
|
+
.v2s-search-trigger { display:flex; align-items:center; gap:4px; min-width:0; max-width:220px; max-width:min(360px,45cqw); height:28px; padding:0 4px 0 8px; border:none; border-radius:24px; outline:none; background:transparent; color:var(--dsw-alias-label-secondary); font:inherit; font-size:13px; font-weight:500; line-height:20px; cursor:pointer; white-space:nowrap; }
|
|
6221
6221
|
.v2s-search-trigger:hover,.v2s-search-trigger[aria-expanded=true] { background:var(--dsw-alias-interactive-bg-hover); }
|
|
6222
6222
|
.v2s-search-trigger:focus-visible { box-shadow:0 0 0 2px var(--dsw-alias-border-l3); }
|
|
6223
6223
|
.v2s-search-trigger svg { flex:none; }
|
|
@@ -6230,8 +6230,19 @@ window.__ModuleLoader__.load({
|
|
|
6230
6230
|
.v2s-search-busy { animation:v2s-search-pulse 1s ease-in-out infinite alternate; }
|
|
6231
6231
|
@keyframes v2s-search-pulse { to { opacity:.35; } }
|
|
6232
6232
|
@media(prefers-reduced-motion:reduce) { .v2s-search-busy { animation:none; } .v2s-search-chevron { transition:none; } }
|
|
6233
|
+
/* Match DSH conversation.input.model content-driven collapse via row variables on desktop. */
|
|
6234
|
+
.v2s-search-label,.v2s-search-mode { display:var(--dsh-composer-model-text-display,block); }
|
|
6235
|
+
:where([data-model-compact]) .v2s-search-label,:where([data-model-compact]) .v2s-search-mode { display:none; }
|
|
6236
|
+
/* Responsive auto-scaling for narrow containers and mobile viewports. */
|
|
6233
6237
|
@container(width<=420px) { .v2s-search-mode { display:none; } }
|
|
6234
6238
|
@container(width<=360px) { .v2s-search-label { display:none; } }
|
|
6239
|
+
@media (max-width:420px) { .v2s-search-mode { display:none; } }
|
|
6240
|
+
@media (max-width:360px) { .v2s-search-label { display:none; } }
|
|
6241
|
+
/* Auto-scaling adaptation under dsh-mobile grid layout. */
|
|
6242
|
+
:where([data-dsh-mobile-composer-row]) .v2s-selector,:where([data-dsh-mobile-composer-trailing]) .v2s-selector { flex:0 1 auto; min-width:0; max-width:min(100%,180px); }
|
|
6243
|
+
:where([data-dsh-mobile-composer-row]) .v2s-search-trigger,:where([data-dsh-mobile-composer-trailing]) .v2s-search-trigger { min-width:0; max-width:100%; }
|
|
6244
|
+
:where([data-dsh-mobile-composer-row]) .v2s-search-mode,:where([data-dsh-mobile-composer-trailing]) .v2s-search-mode { display:none; }
|
|
6245
|
+
:where([data-dsh-mobile-composer-row]) .v2s-search-label,:where([data-dsh-mobile-composer-trailing]) .v2s-search-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
6235
6246
|
.v2s-search-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
|
|
6236
6247
|
.v2s-selector-panel { position:fixed; inset:auto; margin:0; box-sizing:border-box; max-width:calc(100vw - 32px); padding:3px; overflow:auto; overscroll-behavior:contain; border:0; border-radius:16px; background:var(--dsw-specific-menu); backdrop-filter:var(--dsw-menu-backdrop-filter); color:var(--dsw-alias-label-primary); --dsw-elevation-stroke-color:var(--dsw-alias-border-l1); box-shadow:var(--dsw-elevation-prominent); --dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2); --dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2); font-family:inherit; font-size:13px; line-height:20px; }
|
|
6237
6248
|
.v2s-selector-panel:not(:popover-open) { display:none; }
|
|
@@ -6425,7 +6436,7 @@ window.__ModuleLoader__.load({
|
|
|
6425
6436
|
const [open, setOpen] = (0, react.useState)(false);
|
|
6426
6437
|
const selected = value?.selection.connectionId;
|
|
6427
6438
|
const current = connections.find((c) => c.id === selected);
|
|
6428
|
-
const label = !value ? t("search") : current?.id === "builtin:session-model" ? t("followModel") : current?.label ?? (selected ? t("connectionUnavailable") : t("selectSearch"));
|
|
6439
|
+
const label = !value ? t("search") : selected === null ? t("searchOff") : current?.id === "builtin:session-model" ? t("followModel") : current?.label ?? (selected ? t("connectionUnavailable") : t("selectSearch"));
|
|
6429
6440
|
(0, react.useEffect)(() => {
|
|
6430
6441
|
const node = panel.current;
|
|
6431
6442
|
if (!node) return;
|
|
@@ -6472,7 +6483,7 @@ window.__ModuleLoader__.load({
|
|
|
6472
6483
|
"aria-expanded": open,
|
|
6473
6484
|
"aria-controls": id,
|
|
6474
6485
|
"data-state": error ? "error" : pending ? "saving" : notice ? "saved" : "ready",
|
|
6475
|
-
title: error || (pending ? t("saving") : notice || t("searchConnection") + (current?.label ?? t("notSelected"))),
|
|
6486
|
+
title: error || (pending ? t("saving") : notice || (selected === null ? t("searchConnection") + t("searchOff") : t("searchConnection") + (current?.label ?? t("notSelected")))),
|
|
6476
6487
|
onClick: toggle,
|
|
6477
6488
|
children: [
|
|
6478
6489
|
(0, react_jsx_runtime.jsxs)("svg", {
|
|
@@ -6494,7 +6505,7 @@ window.__ModuleLoader__.load({
|
|
|
6494
6505
|
className: "v2s-search-label",
|
|
6495
6506
|
children: label
|
|
6496
6507
|
}),
|
|
6497
|
-
value ? (0, react_jsx_runtime.jsx)("span", {
|
|
6508
|
+
value && selected !== null ? (0, react_jsx_runtime.jsx)("span", {
|
|
6498
6509
|
className: "v2s-search-mode",
|
|
6499
6510
|
children: t(value.freshness === "auto" ? "freshnessAuto" : value.freshness === "fresh" ? "freshnessFreshShort" : "freshnessRealtimeShort")
|
|
6500
6511
|
}) : null,
|
|
@@ -6552,6 +6563,24 @@ window.__ModuleLoader__.load({
|
|
|
6552
6563
|
items[event.key === "Home" ? 0 : event.key === "End" ? items.length - 1 : (index + (event.key === "ArrowUp" ? -1 : 1) + items.length) % items.length]?.focus();
|
|
6553
6564
|
},
|
|
6554
6565
|
children: [
|
|
6566
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
6567
|
+
role: "group",
|
|
6568
|
+
"aria-label": t("searchOff"),
|
|
6569
|
+
children: (0, react_jsx_runtime.jsxs)("button", {
|
|
6570
|
+
type: "button",
|
|
6571
|
+
className: "v2s-search-option",
|
|
6572
|
+
disabled: !value || pending,
|
|
6573
|
+
"aria-pressed": selected === null,
|
|
6574
|
+
onClick: () => {
|
|
6575
|
+
if (selected !== null) onSelect(null);
|
|
6576
|
+
},
|
|
6577
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: t("searchOff") }), (0, react_jsx_runtime.jsx)("span", {
|
|
6578
|
+
className: "v2s-search-option-check",
|
|
6579
|
+
"aria-hidden": "true",
|
|
6580
|
+
children: selected === null ? "✓" : ""
|
|
6581
|
+
})]
|
|
6582
|
+
})
|
|
6583
|
+
}),
|
|
6555
6584
|
["model", "structured"].filter((kind) => connections.some((c) => c.kind === kind && c.configured)).map((kind) => (0, react_jsx_runtime.jsxs)("div", {
|
|
6556
6585
|
role: "group",
|
|
6557
6586
|
"aria-label": t(kind === "model" ? "modelSearch" : "searchServices"),
|
|
@@ -6589,7 +6618,7 @@ window.__ModuleLoader__.load({
|
|
|
6589
6618
|
].map((mode) => (0, react_jsx_runtime.jsx)("button", {
|
|
6590
6619
|
type: "button",
|
|
6591
6620
|
"aria-pressed": value?.freshness === mode,
|
|
6592
|
-
disabled: !value || pending,
|
|
6621
|
+
disabled: !value || pending || selected === null,
|
|
6593
6622
|
onClick: () => {
|
|
6594
6623
|
if (value?.freshness !== mode) onFreshness(mode);
|
|
6595
6624
|
},
|
|
@@ -12444,6 +12473,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12444
12473
|
followModel: "Follow model",
|
|
12445
12474
|
connectionUnavailable: "Connection unavailable",
|
|
12446
12475
|
selectSearch: "Select search",
|
|
12476
|
+
searchOff: "Off",
|
|
12447
12477
|
searchConnection: "Search connection: ",
|
|
12448
12478
|
notSelected: "Not selected",
|
|
12449
12479
|
sessionSearchSettings: "Current session search settings",
|
|
@@ -12527,6 +12557,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12527
12557
|
followModel: "跟随模型",
|
|
12528
12558
|
connectionUnavailable: "连接失效",
|
|
12529
12559
|
selectSearch: "选择搜索",
|
|
12560
|
+
searchOff: "关闭",
|
|
12530
12561
|
searchConnection: "搜索连接:",
|
|
12531
12562
|
notSelected: "未选择",
|
|
12532
12563
|
sessionSearchSettings: "当前会话搜索设置",
|