From 38e5df82eaabe697c09ccfa1d528f3986a5331e6 Mon Sep 17 00:00:00 2001 From: Yif <877193178@qq.com> Date: Tue, 24 Nov 2026 01:21:54 +0800 Subject: [PATCH] fix(client): place link opening before shortcuts --- packages/client/ui-chat/src/client/apply.ts | 2 +- packages/client/ui-settings-general/README.i18n.yaml | 4 ++-- packages/client/ui-settings-general/README.md | 2 +- packages/client/ui-settings-general/README.zh.md | 2 +- .../client/ui-settings-general/tests/groups.client.spec.tsx | 2 +- packages/client/ui-shortcuts/src/client/index.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/client/ui-chat/src/client/apply.ts b/packages/client/ui-chat/src/client/apply.ts index 3560abb5fd..9c068841e0 100644 --- a/packages/client/ui-chat/src/client/apply.ts +++ b/packages/client/ui-chat/src/client/apply.ts @@ -174,7 +174,7 @@ export function apply(ctx: Context): void { scope.slots.inject('settings.general.group.interaction.item', () => scope.slots.register({ name: 'settings.general.group.interaction.item', id: 'link-opening', - order: 20, + order: 10, locale: NS, inject: (): LinkOpeningRowInjected => ({ hooks: { linkOpening, browserAvailable }, diff --git a/packages/client/ui-settings-general/README.i18n.yaml b/packages/client/ui-settings-general/README.i18n.yaml index e2772fd9ad..98832f986e 100644 --- a/packages/client/ui-settings-general/README.i18n.yaml +++ b/packages/client/ui-settings-general/README.i18n.yaml @@ -18,8 +18,8 @@ en: 2b3320655142ffdf zh: 20dde077885f62aa /deepseek-ai-dsh-client-ui-settings-general/use-this-package/the-general-section: - en: be043ed07462aecb - zh: 860c966ac6e039ef + en: 0219deacad831a49 + zh: 61b49ce41e859e65 /deepseek-ai-dsh-client-ui-settings-general/use-this-package/opening-the-configuration-file: en: 597df68b5913e8d7 zh: bc9114f3e877679a diff --git a/packages/client/ui-settings-general/README.md b/packages/client/ui-settings-general/README.md index df14af6834..cc442ebaa9 100644 --- a/packages/client/ui-settings-general/README.md +++ b/packages/client/ui-settings-general/README.md @@ -64,7 +64,7 @@ Register into an existing group’s item slot to choose its location: | `data` | 50 | `settings.general.group.data.item` | | `updates` | 60 | `settings.general.group.updates.item` | -The default Preferences group retains language, appearance, fonts, and additive `settings.general.item` contributions. Chat experience contains Default session permission, the three work-details preferences (Work details, When to collapse work details, and Replies after collapse), Personalized recommendations, Show coding view, and performance/usage, in that order; Interaction contains busy-session sending, shortcuts, and link opening. Data management contains Session log preferences. The Permissions group remains an extension target with no built-in rows and stays hidden until a plugin supplies content. Item `id` and `order` apply within the chosen slot; no `groupId` option is needed. +The default Preferences group retains language, appearance, fonts, and additive `settings.general.item` contributions. Chat experience contains Default session permission, the three work-details preferences (Work details, When to collapse work details, and Replies after collapse), Personalized recommendations, Show coding view, and performance/usage, in that order; Interaction contains busy-session sending, link opening, and shortcuts. Data management contains Session log preferences. The Permissions group remains an extension target with no built-in rows and stays hidden until a plugin supplies content. Item `id` and `order` apply within the chosen slot; no `groupId` option is needed. A custom group declaration-merges its exact item key into `SlotMap`, registers its own component, and declares that item slot at runtime in `children`. The component renders the child outlet through `PropsRenderSlots`; the page supplies the surrounding header and card. Given `ctx` in your plugin’s `apply`, a namespace-bound `t`, and your module-level `AcmeRow` component, register: diff --git a/packages/client/ui-settings-general/README.zh.md b/packages/client/ui-settings-general/README.zh.md index 7908c66737..90e666607a 100644 --- a/packages/client/ui-settings-general/README.zh.md +++ b/packages/client/ui-settings-general/README.zh.md @@ -64,7 +64,7 @@ Web 与桌面端的通用设置底部显示当前发布版本,使用构建注 | `data` | 50 | `settings.general.group.data.item` | | `updates` | 60 | `settings.general.group.updates.item` | -默认「常规」分组保留语言、外观、字体,以及通过 `settings.general.item` 添加的贡献。「会话偏好」依次包含会话默认权限、工作步骤的三项偏好(工作步骤展示、工作步骤收起时机和收起后显示的回复)、个性化推荐、显示代码工作视图,以及性能与用量;「交互与快捷键」包含繁忙时发送、快捷键和链接打开方式。「数据管理」包含会话日志偏好。「权限」分组仍可供扩展注册,但没有内置设置行,在插件提供内容前保持隐藏。设置行的 `id` 与 `order` 仅作用于所选 slot;无需 `groupId` 选项。 +默认「常规」分组保留语言、外观、字体,以及通过 `settings.general.item` 添加的贡献。「会话偏好」依次包含会话默认权限、工作步骤的三项偏好(工作步骤展示、工作步骤收起时机和收起后显示的回复)、个性化推荐、显示代码工作视图,以及性能与用量;「交互与快捷键」包含繁忙时发送、链接打开方式和快捷键。「数据管理」包含会话日志偏好。「权限」分组仍可供扩展注册,但没有内置设置行,在插件提供内容前保持隐藏。设置行的 `id` 与 `order` 仅作用于所选 slot;无需 `groupId` 选项。 自定义分组通过声明合并把确切的设置行 key 加入 `SlotMap`,注册自己的组件,并在 `children` 中声明该设置行 slot 的运行时类型。组件通过 `PropsRenderSlots` 渲染子 outlet;页面提供外层标题和卡片。已有插件 `apply` 中的 `ctx`、绑定命名空间的 `t` 和模块级 `AcmeRow` 组件时,可这样注册: diff --git a/packages/client/ui-settings-general/tests/groups.client.spec.tsx b/packages/client/ui-settings-general/tests/groups.client.spec.tsx index c3f6dbe808..b2bc54a96d 100644 --- a/packages/client/ui-settings-general/tests/groups.client.spec.tsx +++ b/packages/client/ui-settings-general/tests/groups.client.spec.tsx @@ -124,7 +124,7 @@ it('assembles ordered localized groups, legacy and targeted rows, and restores c ]) expect(client.ctx.slots.entries('settings.general.group.interaction.item') .map(row => ({ id: row.options.id, order: row.options.order }))).toEqual([ - { id: 'composer-enter', order: 0 }, { id: 'shortcuts', order: 10 }, { id: 'link-opening', order: 20 }, + { id: 'composer-enter', order: 0 }, { id: 'link-opening', order: 10 }, { id: 'shortcuts', order: 20 }, ]) expect(groups.getSnapshot().map(row => row.id)) .toEqual(['permissions', 'general', 'custom', 'display', 'interaction', 'notifications', 'data', 'updates']) diff --git a/packages/client/ui-shortcuts/src/client/index.ts b/packages/client/ui-shortcuts/src/client/index.ts index ce76ed1e6a..f2675389eb 100644 --- a/packages/client/ui-shortcuts/src/client/index.ts +++ b/packages/client/ui-shortcuts/src/client/index.ts @@ -40,7 +40,7 @@ export function apply(ctx: Context): void { const injected = () => ({ platform: ctx.shortcuts.platform, runtime: ctx.shortcuts.runtime, edit, recording, describeBinding, hooks: { catalog: ctx.shortcuts.catalog, config: ctx.shortcuts.config, fixedCatalog: ctx.shortcuts.fixedCatalog } }) ctx.slots.inject('settings.general.group.interaction.item', () => ctx.slots.register({ - name: 'settings.general.group.interaction.item', id: 'shortcuts', order: 10, locale: 'shortcuts', store, + name: 'settings.general.group.interaction.item', id: 'shortcuts', order: 20, locale: 'shortcuts', store, inject: injected, }, ShortcutsRow)) ctx.slots.inject('shell.overlay', () => {