mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-29 08:39:35 +08:00
fix(client): place link opening before shortcuts
This commit is contained in:
1 parent
39b877a981
commit
38e5df82ea
6 files changed
+7
-7
No files matched your search
@@ -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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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` 组件时,可这样注册:
|
||||
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user