@qilin-agent/desktop 3.1.6 → 3.1.8
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/README.i18n.yaml +15 -12
- package/README.md +18 -7
- package/README.zh.md +18 -7
- package/lib/command-manager-entry.js +4 -4
- package/lib/main.js +2510 -211
- package/lib/types/application-menu.d.ts +64 -0
- package/lib/types/file-actions.d.ts +8 -0
- package/lib/types/ipc.d.ts +4 -0
- package/lib/types/keyboard.d.ts +11 -1
- package/lib/types/locale.d.ts +47 -1
- package/lib/types/splash-window.d.ts +20 -0
- package/package.json +19 -16
package/README.i18n.yaml
CHANGED
|
@@ -12,14 +12,17 @@
|
|
|
12
12
|
en: 7bc8bf30de693222
|
|
13
13
|
zh: e85993d8852b6cab
|
|
14
14
|
/qilin-desktop-desktop/table-of-contents:
|
|
15
|
-
en:
|
|
16
|
-
zh:
|
|
15
|
+
en: 75cfb6ac828ae849
|
|
16
|
+
zh: 956aa41c12594155
|
|
17
17
|
/qilin-desktop-desktop/application-overview:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: dde584cce090e62b
|
|
19
|
+
zh: 10133e5fec8392de
|
|
20
|
+
/qilin-desktop-desktop/menus:
|
|
21
|
+
en: 3ee11667b076ead0
|
|
22
|
+
zh: f193d79c88948853
|
|
20
23
|
/qilin-desktop-desktop/terminal-command:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
24
|
+
en: 24390aa079a4a210
|
|
25
|
+
zh: 13779319413d18e1
|
|
23
26
|
/qilin-desktop-desktop/closing-the-window-and-quitting:
|
|
24
27
|
en: 892e4df9961ec303
|
|
25
28
|
zh: 2298945feab91889
|
|
@@ -30,8 +33,8 @@
|
|
|
30
33
|
en: 0b1c191c446edcca
|
|
31
34
|
zh: defe570f79ec7573
|
|
32
35
|
/qilin-desktop-desktop/bundled-command-runtime:
|
|
33
|
-
en:
|
|
34
|
-
zh:
|
|
36
|
+
en: 384b17393ef82824
|
|
37
|
+
zh: b1291a7ecb2f73d1
|
|
35
38
|
/qilin-desktop-desktop/installation-ownership:
|
|
36
39
|
en: ca8d961f3abb1f91
|
|
37
40
|
zh: 9d81e04a276b9961
|
|
@@ -48,14 +51,14 @@
|
|
|
48
51
|
en: 9f6ce48b48bf6075
|
|
49
52
|
zh: 1828761b747881aa
|
|
50
53
|
/qilin-desktop-desktop/develop/welcome-window-appearance:
|
|
51
|
-
en:
|
|
52
|
-
zh:
|
|
54
|
+
en: 707bec623821357a
|
|
55
|
+
zh: f51d61df82c5837b
|
|
53
56
|
/qilin-desktop-desktop/package:
|
|
54
57
|
en: d5e0c43a6c15954c
|
|
55
58
|
zh: 7c13c139bd787f65
|
|
56
59
|
/qilin-desktop-desktop/windows-installer-interface:
|
|
57
|
-
en:
|
|
58
|
-
zh:
|
|
60
|
+
en: c2a2b619256fa7c4
|
|
61
|
+
zh: 8740261e82e66d78
|
|
59
62
|
/qilin-desktop-desktop/updates:
|
|
60
63
|
en: 3a9cf6edb7ea4c89
|
|
61
64
|
zh: eb56c630cd22e36c
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Desktop runs the Harness workspace in a native application. This reference cover
|
|
|
15
15
|
- [Application overview](#application-overview)
|
|
16
16
|
- [Terminal command](#terminal-command)
|
|
17
17
|
- [Closing the window and quitting](#closing-the-window-and-quitting)
|
|
18
|
+
- [Menus](#menus)
|
|
18
19
|
- [Key technical decisions](#key-technical-decisions)
|
|
19
20
|
- [Bundled command runtime](#bundled-command-runtime)
|
|
20
21
|
- [Installation ownership](#installation-ownership)
|
|
@@ -36,8 +37,6 @@ The desktop application is an Electron shell around the complete qilin Web appli
|
|
|
36
37
|
|
|
37
38
|
Desktop binds `127.0.0.1`, the address Electron dials for the ready URL and the WebSocket credential filter. WebSocket streams use `ws:` or `wss:` according to the Host listener; credentials require matching authority and scheme.
|
|
38
39
|
|
|
39
|
-
The first application-menu command, **About QiLin Desktop**, opens Electron's native About panel with the application icon, product name, and installed release version. The menu follows the Desktop shell locale. On macOS, Hide, Hide Others, Show All, and Quit use localized labels; Hide and Quit include the QiLin Desktop product name. These commands retain their native actions and shortcuts. macOS reads the icon from its application bundle, so an unpackaged development launch displays Electron's icon; Windows receives the packaged PNG.
|
|
40
|
-
|
|
41
40
|
Desktop’s local native directory flow opens an Electron folder dialog attached to the application window, restoring, showing, and focusing that window first. Concurrent requests share one dialog; cancellation returns no path and failures remain retryable. Ordinary Web uses the Host chooser. Browse mode lists Host directories. On Linux without zenity or kdialog, automatic selection uses browse instead of the Electron dialog.
|
|
42
41
|
|
|
43
42
|
Desktop ships one pnpm distribution at `resources/runtime/primary-runtime/dependencies/pnpm`. Build-time production installation, the installed `qilin` CLI, Creator and the Web Plugin Manager execute its `bin/pnpm.mjs` with Electron Node mode; package operations do not require pnpm on PATH. The private Node launcher environment applies only to package operations. Agent workspace dependencies copy the same self-contained primary-runtime payload into the Harness home and execute pnpm with its standalone Node.
|
|
@@ -52,13 +51,25 @@ Desktop microphone access is restricted to audio requests from the primary `qili
|
|
|
52
51
|
|
|
53
52
|
Press F12 (Fn+F12 on media-key keyboards), Command+Option+I on macOS, or Ctrl+Shift+I on Windows to toggle DevTools for the focused application page, including in packaged builds. These native shortcuts use hidden application-menu items. Update overlays and packaged embedded browser guests disable DevTools.
|
|
54
53
|
|
|
54
|
+
<a id="menus"></a>
|
|
55
|
+
|
|
56
|
+
## Menus
|
|
57
|
+
|
|
58
|
+
The menu bar follows the Desktop shell locale and drives the same commands as the Web client. macOS and Linux render a native bar with Application, File, Edit, View, Window, and Help menus; Windows draws File, Edit, View, and Help inside the title bar, pops the same native menus from them, and keeps only the hidden developer shortcuts on its native menu.
|
|
59
|
+
|
|
60
|
+
File offers New Session, Search Sessions, Add Workspace, Settings outside macOS, Close Window, and Exit outside macOS. Edit keeps the native editing roles on macOS and Linux; on Windows the shell forwards the editor-owned undo, redo, cut, copy, paste, delete, and select-all keys, so the Web composer's own history applies. View toggles the left and right sidebars, adjusts page zoom, toggles full screen, and, in development builds, reloads the page, force-reloads it, and toggles developer tools. Help opens the project home and issue tracker, and outside macOS carries Check for Updates and About. The application menu keeps About, Settings, Check for Updates, Manage qilin Command, and the native Hide and Quit commands, and development builds add Reload Page and Restart App and Host.
|
|
61
|
+
|
|
62
|
+
About opens Electron's native About panel with the application icon, product name, and installed release version; macOS reads the icon from its application bundle, so an unpackaged development launch displays Electron's icon, while Windows receives the packaged PNG. Hide, Hide Others, Show All, and Quit use localized labels that name the QiLin Desktop product, and keep their native actions and shortcuts.
|
|
63
|
+
|
|
64
|
+
Renderer entries show the binding the user currently has and stay disabled until the Web client publishes its shortcut configuration. Each entry dispatches by command id through the same channel as a physical key, so a customized binding changes both the shown accelerator and the dispatched command. The menu rebuilds when a binding, the available command set, or the shell locale changes.
|
|
65
|
+
|
|
55
66
|
<a id="terminal-command"></a>
|
|
56
67
|
|
|
57
68
|
## Terminal command
|
|
58
69
|
|
|
59
70
|
The application menu's **Manage qilin Command…** entry, immediately below **Check for Updates…**, shows the current command and offers Install, Repair, and Remove. The command uses Desktop's installed runtime and the ordinary [qilin CLI](../cli/README.md), including when the Desktop application is closed. Open a new terminal after installation and run `qilin --version`.
|
|
60
71
|
|
|
61
|
-
On macOS, installation creates `/usr/local/bin/
|
|
72
|
+
On macOS, installation creates `/usr/local/bin/qilin` and requests administrator authentication when the directory requires it. Shell startup files are unchanged. On Windows, the management dialog registers the command in the current user's PATH. A pre-existing command requires confirmation before switching; repairing Desktop's own selected command does not repeat that confirmation. The macOS link preserves and restores the displaced launcher; Windows preserves other PATH entries, including entries that predate registration. A command with higher PATH precedence is reported with its location. After moving the application, use Repair on macOS or Install from the new location on Windows. Remove leaves unrelated installations intact.
|
|
62
73
|
|
|
63
74
|
Command registration is optional after installing Desktop. Use **Manage qilin Command… → Remove** before uninstalling Desktop to remove its CLI registration; the application uninstaller does not remove it. Finish CLI commands before updating or uninstalling Desktop. The CLI runtime version follows the installed Desktop release. See [bundled command runtime](#bundled-command-runtime) for Desktop plugin commands and runtime limitations.
|
|
64
75
|
|
|
@@ -128,7 +139,7 @@ Welcome loads the shared Toast palette and shadow tokens, with system typography
|
|
|
128
139
|
|
|
129
140
|
## Bundled command runtime
|
|
130
141
|
|
|
131
|
-
The installed `resources/runtime/cli/bin/
|
|
142
|
+
The installed `resources/runtime/cli/bin/qilin` shell script (`qilin.cmd` on Windows) runs the ordinary CLI dispatcher using Desktop's Electron executable and bundled pnpm. It works while Desktop is closed and retains the Electron runtime limitations. Ordinary profile, configuration, and plugin commands use the same implementation as npm qilin; the command does not open Desktop.
|
|
132
143
|
|
|
133
144
|
To manage Desktop's plugins, launch Desktop once to initialize its profile, fully quit the application, then run `qilin plugin --profile desktop add <package>`, `list`, or `remove <package>`. Reopen Desktop to use the changes. Package operations retain the shared profile write lock and compatibility checks. The installed command refuses an uninitialized Desktop profile instead of creating an ordinary CLI profile in its place.
|
|
134
145
|
|
|
@@ -222,7 +233,7 @@ The browser-login waiting page offers a copy-link action for the current pending
|
|
|
222
233
|
|
|
223
234
|
### Welcome window appearance
|
|
224
235
|
|
|
225
|
-
The welcome window follows system appearance with the
|
|
236
|
+
The welcome window follows system appearance with the product color pack's light and dark palettes, generated into `renderer/welcome-palette.generated.css` from the same pack the Web surface uses, and shows the 600 × 700 entry layout and the API-key form, with native window controls, a draggable title area, a local brand SVG, system sans-serif fallbacks, and locally bundled Montserrat Light for non-button text. The window uses macOS menu vibrancy or Windows acrylic with the onboarding window tint: 40% white in light mode and 50% rgb(24 25 28) in dark mode. The local React welcome entry bundles React and the shared `StateDot` loading indicator with its CSS; it uses the isolated preload without loading the main Web application. The entry, sign-in status and API-key pages share a fixed bottom action row; the back-to-sign-in link sits below it. Buttons share the platform motion timings, and Reduce Motion disables their transitions. The OS owns blur strength and outer corners. macOS Reduce Transparency suppresses translucency, and Increase Contrast forces that setting on. Save and continue writes to the development credential store; Set up later opens the real workspace without saving a key or completion flag. The generated project links the declared workspace dependency closure as well as pnpm’s hoisted packages, so unhoisted configured plugins remain resolvable. [The window note](../../.agents/notes/implemented/architecture/2026-09-25-desktop-and-account-alignment-boundaries.md) owns the material and onboarding decisions.
|
|
226
237
|
|
|
227
238
|
<a id="package"></a>
|
|
228
239
|
|
|
@@ -249,9 +260,9 @@ Use the dedicated guides for build and release operations. Shared Windows runner
|
|
|
249
260
|
|
|
250
261
|
## Windows installer interface
|
|
251
262
|
|
|
252
|
-
The Windows installer uses native NSIS pages with light and dark palettes, system shadows, an editable installation directory, and a finish page whose launch checkbox is selected by default. Installation is restricted to the current user. Clicking Install or pressing Enter validates the current path; drive roots remain invalid after normalization, including repeated trailing separators. New destinations must be empty, and nonempty destinations must be registered installations. Running executables at the affected installation path produce a native prompt and remain running; same-named applications in other directories do not block installation. Silent updates wait up to ten seconds for the affected application to exit, then stop with exit code 2 if it is still running.
|
|
263
|
+
The Windows installer uses native NSIS pages with light and dark palettes generated from the same product color pack (`installer/theme.generated.nsh`), system shadows, an editable installation directory, and a finish page whose launch checkbox is selected by default. Installation is restricted to the current user. Clicking Install or pressing Enter validates the current path; drive roots remain invalid after normalization, including repeated trailing separators. New destinations must be empty, and nonempty destinations must be registered installations. Running executables at the affected installation path produce a native prompt and remain running; same-named applications in other directories do not block installation. Silent updates wait up to ten seconds for the affected application to exit, then stop with exit code 2 if it is still running.
|
|
253
264
|
|
|
254
|
-
The theme follows Windows at startup; `/THEME=light`, `/THEME=dark`, and `/THEME=auto` select a palette explicitly. The window appears after its branded controls are ready. When the welcome page first appears, the installer moves above ordinary windows once and flashes its taskbar button if another window has focus; it does not remain always on top. Progress reads the pinned 7-Zip extractor’s percentage; directory promotion, registration, and cleanup retain bounded estimates. The weighted percentage does not predict remaining time. After NSIS reports success, the bar fills over 600 ms and displays 100% briefly before the finish page appears; the transition targets 750 ms. The finish page preserves the window position. Finish dismisses the installer before launching the installed executable; a launch failure restores the page for retry. Directory replacement and failure recovery follow the [installation checks](packaging/README.md#runtime-file-selection). First-launch profile preparation remains a separate Desktop operation.
|
|
265
|
+
The theme follows Windows at startup; `/THEME=light`, `/THEME=dark`, and `/THEME=auto` select a palette explicitly. `pnpm run gen-desktop-theme` writes both shell palettes from the pack, and `pnpm run verify-desktop-theme` rejects stale artifacts in the static gates. The window appears after its branded controls are ready. When the welcome page first appears, the installer moves above ordinary windows once and flashes its taskbar button if another window has focus; it does not remain always on top. Progress reads the pinned 7-Zip extractor’s percentage; directory promotion, registration, and cleanup retain bounded estimates. The weighted percentage does not predict remaining time. After NSIS reports success, the bar fills over 600 ms and displays 100% briefly before the finish page appears; the transition targets 750 ms. The finish page preserves the window position. Finish dismisses the installer before launching the installed executable; a launch failure restores the page for retry. Directory replacement and failure recovery follow the [installation checks](packaging/README.md#runtime-file-selection). First-launch profile preparation remains a separate Desktop operation.
|
|
255
266
|
|
|
256
267
|
Windows packaging compiles an x86 Win32/GDI+ helper with Visual C++ Build Tools and a Windows SDK; signed builds sign this helper through the configured Windows signer. The preparation hook leaves production dependency collection to electron-builder on every platform.
|
|
257
268
|
|
package/README.zh.md
CHANGED
|
@@ -15,6 +15,7 @@ Desktop 在原生应用中运行 Harness 工作区。本参考文档说明应用
|
|
|
15
15
|
- [应用概览](#application-overview)
|
|
16
16
|
- [终端命令](#terminal-command)
|
|
17
17
|
- [关闭窗口与退出](#closing-the-window-and-quitting)
|
|
18
|
+
- [菜单](#menus)
|
|
18
19
|
- [关键技术决策](#key-technical-decisions)
|
|
19
20
|
- [内置命令运行时](#bundled-command-runtime)
|
|
20
21
|
- [安装归属](#installation-ownership)
|
|
@@ -36,8 +37,6 @@ Desktop 在原生应用中运行 Harness 工作区。本参考文档说明应用
|
|
|
36
37
|
|
|
37
38
|
Desktop 绑定 `127.0.0.1`,即 Electron 为就绪 URL 与 WebSocket 凭据过滤器拨号的地址。WebSocket 流按 Host 监听器使用 `ws:` 或 `wss:`;附加凭据要求 authority 与 scheme 均匹配。
|
|
38
39
|
|
|
39
|
-
应用菜单第一项“**关于 QiLin Desktop**”打开 Electron 原生关于面板,展示应用图标、产品名称和当前安装的发布版本。菜单文案跟随桌面壳的语言。macOS 的隐藏、隐藏其他、显示全部和退出条目使用本地化文案,隐藏和退出条目包含 QiLin Desktop 产品名称。这些条目保留原生动作和快捷键。macOS 从应用包读取图标,因此未打包的开发启动会显示 Electron 图标;Windows 使用随包分发的 PNG。
|
|
40
|
-
|
|
41
40
|
Desktop 的本地原生目录流程打开绑定应用窗口的 Electron 文件夹对话框,并先恢复、显示和聚焦该窗口。并发请求共用一个对话框;取消不返回路径,失败后可以重试。普通 Web 使用 Host 选择器。浏览模式列出 Host 目录。Linux 缺少 zenity 或 kdialog 时,自动选择使用浏览模式,不使用 Electron 对话框。
|
|
42
41
|
|
|
43
42
|
Desktop 在 `resources/runtime/primary-runtime/dependencies/pnpm` 中携带一份 pnpm 分发包。构建时的生产依赖安装、安装版 `qilin` CLI、Creator 和 Web 插件管理器通过 Electron Node 模式执行其中的 `bin/pnpm.mjs`;包操作不要求 PATH 上存在 pnpm。私有 Node 启动器环境仅用于包操作。agent(智能体)的工作区依赖将同一份完整 primary-runtime 复制到 Harness 主目录,并使用其中的独立 Node 执行 pnpm。
|
|
@@ -52,13 +51,25 @@ Desktop Host 的 Platform API 请求与更新策略请求用相同的 Platform
|
|
|
52
51
|
|
|
53
52
|
按 F12(多媒体功能键键盘上为 Fn+F12)、macOS 的 Command+Option+I 或 Windows 的 Ctrl+Shift+I,可切换当前获得焦点的应用页面的 DevTools,打包版本同样支持。这些原生快捷键通过隐藏的应用菜单项注册。更新遮罩和打包版本的内嵌浏览器禁用 DevTools。
|
|
54
53
|
|
|
54
|
+
<a id="menus"></a>
|
|
55
|
+
|
|
56
|
+
## 菜单
|
|
57
|
+
|
|
58
|
+
菜单栏文案跟随桌面壳的语言,执行的动作与 Web 客户端一致。macOS 与 Linux 渲染原生菜单栏,含应用、文件、编辑、视图、窗口和帮助菜单;Windows 在标题栏内绘制文件、编辑、视图和帮助菜单,由它们弹出同一批原生菜单,其原生菜单只保留隐藏的开发者快捷键。
|
|
59
|
+
|
|
60
|
+
文件菜单提供新建会话、搜索会话、添加工作区、macOS 之外的设置、关闭窗口,以及 macOS 之外的退出。编辑菜单在 macOS 与 Linux 上使用原生编辑条目;Windows 由桌面壳转发编辑器自有的撤销、重做、剪切、复制、粘贴、删除和全选按键,因此生效的是 Web 输入框自己的历史。视图菜单切换左右侧栏、调整页面缩放、切换全屏,并在开发构建中提供刷新页面、强制重新加载和开发者工具。帮助菜单打开项目主页与问题反馈,在 macOS 之外还含检查更新与关于。应用菜单保留关于、设置、检查更新、管理 qilin 命令,以及原生的隐藏与退出条目;开发构建额外提供刷新页面和重启应用与 Host。
|
|
61
|
+
|
|
62
|
+
“关于”打开 Electron 原生关于面板,展示应用图标、产品名称和当前安装的发布版本;macOS 从应用包读取图标,因此未打包的开发启动显示 Electron 图标,Windows 使用随包分发的 PNG。隐藏、隐藏其他、显示全部和退出条目使用本地化文案并写出 QiLin Desktop 产品名称,同时保留原生动作与快捷键。
|
|
63
|
+
|
|
64
|
+
渲染进程条目显示用户当前的绑定,并在 Web 客户端发布快捷键配置前保持禁用。每个条目按命令 id 经与物理按键相同的通道派发,因此自定义绑定会同时改变显示的加速键与实际执行的命令。绑定、可用命令集合或桌面壳语言变化时,菜单重建。
|
|
65
|
+
|
|
55
66
|
<a id="terminal-command"></a>
|
|
56
67
|
|
|
57
68
|
## 终端命令
|
|
58
69
|
|
|
59
70
|
应用菜单中的**管理 qilin 命令…**位于**检查更新…**下方,显示当前命令,并提供安装、修复和移除操作。命令复用 Desktop 已安装的运行时和普通 [qilin CLI](../cli/README.zh.md),Desktop 应用关闭后也可以使用。安装后打开新终端,运行 `qilin --version`。
|
|
60
71
|
|
|
61
|
-
macOS 安装会创建 `/usr/local/bin/
|
|
72
|
+
macOS 安装会创建 `/usr/local/bin/qilin`;目录权限需要时,系统会请求管理员认证,不会修改 shell 启动文件。Windows 管理对话框将命令注册到当前用户的 PATH。切换已有命令前会要求确认;修复当前已选中的 Desktop 命令不会重复要求切换确认。macOS 链接会保留并恢复被替换的启动器;Windows 会保留其他 PATH 条目,包括注册前就已存在的条目。若其他命令的 PATH 优先级更高,对话框会显示其位置。移动应用后,macOS 使用“修复”,Windows 从新位置使用“安装”。“移除”不会改动无关安装。
|
|
62
73
|
|
|
63
74
|
命令注册是安装 Desktop 后的可选操作。卸载 Desktop 前,请通过**管理 qilin 命令… → 移除**删除其 CLI 注册;应用卸载程序不会移除该注册。更新或卸载 Desktop 前请结束 CLI 命令。CLI 运行时版本随已安装的 Desktop 版本变化。Desktop 插件命令与运行时限制见[内置命令运行时](#bundled-command-runtime)。
|
|
64
75
|
|
|
@@ -128,7 +139,7 @@ Welcome 加载共享 Toast 的配色和阴影变量,挂载在 body 下的通
|
|
|
128
139
|
|
|
129
140
|
## 内置命令运行时
|
|
130
141
|
|
|
131
|
-
安装后的 `resources/runtime/cli/bin/
|
|
142
|
+
安装后的 `resources/runtime/cli/bin/qilin` shell 脚本(Windows 为 `qilin.cmd`)使用 Desktop 的 Electron 可执行文件和内置 pnpm 运行普通 CLI 分派入口。Desktop 关闭时也可使用,并保留 Electron 运行时限制。普通 profile、配置和插件命令与 npm qilin 使用相同实现;该命令不会打开 Desktop。
|
|
132
143
|
|
|
133
144
|
管理 Desktop 插件前,先启动一次 Desktop 以初始化其 profile,完全退出应用,再运行 `qilin plugin --profile desktop add <package>`、`list` 或 `remove <package>`。重新打开 Desktop 后使用更改。包操作保留共享的 profile 写锁和兼容性检查。内置命令拒绝未初始化的 Desktop profile,不会在其位置创建普通 CLI profile。
|
|
134
145
|
|
|
@@ -222,7 +233,7 @@ Desktop 在 Host 启动后、打开工作区前检查模型 API Key 引用是否
|
|
|
222
233
|
|
|
223
234
|
### 欢迎窗口外观
|
|
224
235
|
|
|
225
|
-
|
|
236
|
+
欢迎窗口跟随系统外观,使用产品配色包的明暗两套调色——与 Web 表面同一份配色,由生成器写入 `renderer/welcome-palette.generated.css`——展示 600 × 700 的入口布局和 API Key 表单,包含原生窗口控件、可拖动标题区域、本地品牌 SVG、系统无衬线字体回退,以及非按钮文字使用的本地 Montserrat Light 字体。窗口使用 macOS menu vibrancy 或 Windows acrylic,叠加 onboarding 的窗口背景色:浅色模式为 40% 白色,深色模式为 50% rgb(24 25 28)。本地 React 欢迎入口将 React、公共 `StateDot` 加载指示器及其 CSS 一起打包;它通过隔离 preload 工作,不加载主 Web 应用。入口、登录状态和 API Key 页面共用固定的底部操作行;“返回登录”链接位于操作行下方。按钮共用平台的过渡时序,开启“减少动态效果”会禁用过渡。操作系统控制模糊强度和外部圆角。macOS 的“降低透明度”会抑制半透明效果,“增强对比度”会强制开启该设置。“保存并继续”写入开发环境的凭证存储;“稍后配置”打开真实工作区,不保存密钥或完成标记。生成的开发项目同时链接已声明的 workspace 依赖闭包和 pnpm 提升的包,因此未提升的配置插件仍能解析。[窗口记录](../../.agents/notes/implemented/architecture/2026-09-25-desktop-and-account-alignment-boundaries.zh.md)负责材质与引导决策。
|
|
226
237
|
|
|
227
238
|
<a id="package"></a>
|
|
228
239
|
|
|
@@ -249,9 +260,9 @@ Desktop 在 Host 启动后、打开工作区前检查模型 API Key 引用是否
|
|
|
249
260
|
|
|
250
261
|
## Windows 安装界面
|
|
251
262
|
|
|
252
|
-
Windows 安装程序使用原生 NSIS
|
|
263
|
+
Windows 安装程序使用原生 NSIS 页面,亮暗配色由同一份产品配色生成(`installer/theme.generated.nsh`),并提供系统阴影、可编辑的安装目录,以及默认勾选立即启动的完成页。安装仅面向当前用户。点击安装或按 Enter 均校验当前路径;路径规范化后仍拒绝磁盘根目录,包括带重复末尾分隔符的写法。新安装位置必须为空,非空位置必须是已登记的安装目录。受影响安装路径中的程序运行时显示系统提示,并保持应用运行;其他目录中的同名应用不阻止安装。静默更新最多等待受影响应用退出十秒,若仍在运行则以退出码 2 结束。
|
|
253
264
|
|
|
254
|
-
主题在启动时跟随 Windows;可用 `/THEME=light`、`/THEME=dark` 和 `/THEME=auto`
|
|
265
|
+
主题在启动时跟随 Windows;可用 `/THEME=light`、`/THEME=dark` 和 `/THEME=auto` 显式选择配色。`pnpm run gen-desktop-theme` 从配色包生成两个壳面调色,`pnpm run verify-desktop-theme` 在静态门禁中拒绝过期产物。窗口在品牌控件准备完成后显示。欢迎页首次出现时,安装窗口会一次性移到普通窗口前方;若焦点在其他窗口,任务栏按钮会闪烁提示,但安装窗口不会始终置顶。进度读取锁定版本的 7-Zip 解压器百分比;目录替换、注册和清理仍使用有界估算。加权百分比不代表剩余时间。NSIS 报告成功后,进度条用 600 毫秒补满并短暂显示 100%,再显示完成页;切换目标时长为 750 毫秒。完成页保留窗口位置。点击完成后,安装程序先隐藏窗口,再启动已安装的可执行文件;启动失败会恢复页面以供重试。目录替换和失败恢复遵循[安装检查](packaging/README.zh.md#runtime-file-selection)。首次启动的配置档案准备仍属于独立的 Desktop 操作。
|
|
255
266
|
|
|
256
267
|
Windows 打包使用 Visual C++ Build Tools 和 Windows SDK 编译 x86 Win32/GDI+ 辅助库;签名构建通过已配置的 Windows 签名器对该库签名。准备钩子在所有平台上均由 electron-builder 继续负责收集生产依赖。
|
|
257
268
|
|
|
@@ -302,7 +302,7 @@ async function readReceipt(options) {
|
|
|
302
302
|
if (record.backup !== void 0) {
|
|
303
303
|
if (typeof record.backup !== "object" || record.backup === null) throw new CommandInstallationError("EOWNERSHIP", "Invalid command backup record.");
|
|
304
304
|
const candidate = record.backup;
|
|
305
|
-
if (typeof candidate.name !== "string" || !/^\.
|
|
305
|
+
if (typeof candidate.name !== "string" || !/^\.qilin-command-backup-[a-f0-9-]{36}$/u.test(candidate.name) || typeof candidate.fingerprint !== "string" || !/^[a-f0-9]{64}$/u.test(candidate.fingerprint)) throw new CommandInstallationError("EOWNERSHIP", "Invalid command backup record.");
|
|
306
306
|
backup = {
|
|
307
307
|
name: candidate.name,
|
|
308
308
|
fingerprint: candidate.fingerprint
|
|
@@ -383,7 +383,7 @@ async function linkEntry(options, source, destination) {
|
|
|
383
383
|
async function withdraw(options, destination, expected) {
|
|
384
384
|
if (expected.kind === "missing") return void 0;
|
|
385
385
|
if (expected.kind === "unsupported") throw new CommandInstallationError("EUNSUPPORTED", "The command path is not a file or symbolic link.");
|
|
386
|
-
const path = join(dirname(destination), ".
|
|
386
|
+
const path = join(dirname(destination), ".qilin-command-backup-" + randomUUID());
|
|
387
387
|
await rename(destination, path);
|
|
388
388
|
if ((await readEntry(path)).fingerprint !== expected.fingerprint) {
|
|
389
389
|
try {
|
|
@@ -408,7 +408,7 @@ async function installFileCommand(options, expected) {
|
|
|
408
408
|
if (state.fingerprint !== expected) throw new CommandInstallationError("ESTALE", "The command changed after confirmation.");
|
|
409
409
|
if (!await available(options.launcher)) throw new CommandInstallationError("ENOENT", "The installed launcher is unavailable.");
|
|
410
410
|
const moved = await withdraw(options, options.destination, entry);
|
|
411
|
-
const pending = join(dirname(options.destination), ".
|
|
411
|
+
const pending = join(dirname(options.destination), ".qilin-command-new-" + randomUUID());
|
|
412
412
|
let created;
|
|
413
413
|
try {
|
|
414
414
|
await symlink(options.launcher, pending);
|
|
@@ -504,7 +504,7 @@ try {
|
|
|
504
504
|
if (operation !== "inspect" && !/^[a-f0-9]{64}$/u.test(fingerprint)) throw new CommandInstallationError("EINVAL", "Missing command confirmation.");
|
|
505
505
|
if (process.platform === "darwin") {
|
|
506
506
|
const options = {
|
|
507
|
-
destination: "/usr/local/bin/
|
|
507
|
+
destination: "/usr/local/bin/qilin",
|
|
508
508
|
launcher: join(resources, "runtime", "cli", "bin", "qilin"),
|
|
509
509
|
linkHelper: join(resources, "runtime", "cli", "link-entry")
|
|
510
510
|
};
|