fix(ui-settings-plugins): place Subagent after Agent loop
This commit is contained in:
parent
d5787b1847
commit
cbacceca4b
5 changed files with 14 additions and 14 deletions
|
|
@ -24,10 +24,6 @@
|
||||||
- tab "插件列表"
|
- tab "插件列表"
|
||||||
- tabpanel "插件配置":
|
- tabpanel "插件配置":
|
||||||
- list:
|
- list:
|
||||||
- listitem:
|
|
||||||
- 'button "展开设置: Subagent"':
|
|
||||||
- text: Subagent 控制 Agent 为 Subagent 选择模型的权限。
|
|
||||||
- img
|
|
||||||
- listitem:
|
- listitem:
|
||||||
- 'button "展开设置: 终端"':
|
- 'button "展开设置: 终端"':
|
||||||
- text: 终端 限制 agent 运行的每一条命令。
|
- text: 终端 限制 agent 运行的每一条命令。
|
||||||
|
|
@ -36,6 +32,10 @@
|
||||||
- 'button "展开设置: Agent 循环"':
|
- 'button "展开设置: Agent 循环"':
|
||||||
- text: Agent 循环 Agent 如何派发工具调用。
|
- text: Agent 循环 Agent 如何派发工具调用。
|
||||||
- img
|
- img
|
||||||
|
- listitem:
|
||||||
|
- 'button "展开设置: Subagent"':
|
||||||
|
- text: Subagent 控制 Agent 为 Subagent 选择模型的权限。
|
||||||
|
- img
|
||||||
- listitem:
|
- listitem:
|
||||||
- 'button "展开设置: 网页搜索"':
|
- 'button "展开设置: 网页搜索"':
|
||||||
- text: 网页搜索 DeepSeek 搜索提供方。
|
- text: 网页搜索 DeepSeek 搜索提供方。
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ describe('web e2e: plugin configuration section', () => {
|
||||||
onTestFailed(() => saveFailureShot(page, 'web-e2e-plugin-config-cards'))
|
onTestFailed(() => saveFailureShot(page, 'web-e2e-plugin-config-cards'))
|
||||||
const dialog = await openPlugins()
|
const dialog = await openPlugins()
|
||||||
|
|
||||||
// Every card the shipped web composition exposes: subagent selection, the
|
// Every card the shipped web composition exposes: the shell executor, the
|
||||||
// shell executor, the agent loop, and the DeepSeek search provider.
|
// agent loop, subagent selection, and the DeepSeek search provider.
|
||||||
await dialog.getByText('Subagent', { exact: true }).waitFor({ timeout: 10_000 })
|
await dialog.getByText('Subagent', { exact: true }).waitFor({ timeout: 10_000 })
|
||||||
expect(await dialog.getByRole('button', { name: '展开设置: Subagent' }).count()).toBe(1)
|
expect(await dialog.getByRole('button', { name: '展开设置: Subagent' }).count()).toBe(1)
|
||||||
await dialog.getByText('终端', { exact: true }).waitFor({ timeout: 10_000 })
|
await dialog.getByText('终端', { exact: true }).waitFor({ timeout: 10_000 })
|
||||||
|
|
|
||||||
|
|
@ -165,12 +165,6 @@ export function apply(ctx: ClientContext): void {
|
||||||
}, ConfigurablePluginsTab))
|
}, ConfigurablePluginsTab))
|
||||||
|
|
||||||
ctx.slots.inject('settings.plugin.item', function* () {
|
ctx.slots.inject('settings.plugin.item', function* () {
|
||||||
yield ctx.slots.register({
|
|
||||||
name: 'settings.plugin.item',
|
|
||||||
key: SUBAGENT_MODEL_SELECTION_NS,
|
|
||||||
locale: NS,
|
|
||||||
inject: () => subagentModelSelection.inject(),
|
|
||||||
}, SubagentModelSelectionCard)
|
|
||||||
yield ctx.slots.register({
|
yield ctx.slots.register({
|
||||||
name: 'settings.plugin.item',
|
name: 'settings.plugin.item',
|
||||||
key: SHELL_NS,
|
key: SHELL_NS,
|
||||||
|
|
@ -183,6 +177,12 @@ export function apply(ctx: ClientContext): void {
|
||||||
locale: NS,
|
locale: NS,
|
||||||
inject: () => agentLoop.inject(),
|
inject: () => agentLoop.inject(),
|
||||||
}, AgentLoopCard)
|
}, AgentLoopCard)
|
||||||
|
yield ctx.slots.register({
|
||||||
|
name: 'settings.plugin.item',
|
||||||
|
key: SUBAGENT_MODEL_SELECTION_NS,
|
||||||
|
locale: NS,
|
||||||
|
inject: () => subagentModelSelection.inject(),
|
||||||
|
}, SubagentModelSelectionCard)
|
||||||
yield ctx.slots.register({
|
yield ctx.slots.register({
|
||||||
name: 'settings.plugin.item',
|
name: 'settings.plugin.item',
|
||||||
key: WEB_SEARCH_NS,
|
key: WEB_SEARCH_NS,
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ describe('ui-settings-plugins apply', () => {
|
||||||
await ctx.plugin({ inject: [...inject], apply }).await()
|
await ctx.plugin({ inject: [...inject], apply }).await()
|
||||||
|
|
||||||
expect(slots.entries('settings.plugin.item').map(entry => entry.options.key))
|
expect(slots.entries('settings.plugin.item').map(entry => entry.options.key))
|
||||||
.toEqual(['subagent-model-selection', 'shell', 'agent-loop', 'web-search-deepseek'])
|
.toEqual(['shell', 'agent-loop', 'subagent-model-selection', 'web-search-deepseek'])
|
||||||
})
|
})
|
||||||
|
|
||||||
it('dispatches the served namespaces its cards claim, and no others', async () => {
|
it('dispatches the served namespaces its cards claim, and no others', async () => {
|
||||||
|
|
|
||||||
|
|
@ -1715,9 +1715,9 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
|
||||||
slotInject: '',
|
slotInject: '',
|
||||||
declaredBy: 'an entry in \'settings.plugins.tab\' (client-ui-settings-plugins), so it exists while that entry is mounted',
|
declaredBy: 'an entry in \'settings.plugins.tab\' (client-ui-settings-plugins), so it exists while that entry is mounted',
|
||||||
occupants: [
|
occupants: [
|
||||||
'client-ui-settings-plugins SubagentModelSelectionCard',
|
|
||||||
'client-ui-settings-plugins BashCard',
|
'client-ui-settings-plugins BashCard',
|
||||||
'client-ui-settings-plugins AgentLoopCard',
|
'client-ui-settings-plugins AgentLoopCard',
|
||||||
|
'client-ui-settings-plugins SubagentModelSelectionCard',
|
||||||
'client-ui-settings-plugins WebSearchCard',
|
'client-ui-settings-plugins WebSearchCard',
|
||||||
],
|
],
|
||||||
replaceRisk: 'none',
|
replaceRisk: 'none',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue