Files
deepseek-harness/apps/web/tests/fixtures/plugins/fixture-settings-section/client.js
T
TurtleandLegGasai 81aef2ec2d feat(client): show plugin settings on the Plugins page
Plugin settings pages registered through `settings.section` stay in the
Settings dialog. The Plugins page also shows such a page on the bundle row,
or bundle, whose package registered it when that row or bundle has no
configuration of its own. Both surfaces render the page through the new
`settings.section.view` Factory, which declares `settings.section`; the slot
runtime records the registering package on each entry.

Settings replaces the Built-in plugins section with a Plugins entry that
opens the Plugins page. The two packages behind that section are removed,
and the page-local client sync notice moves to the Plugins page.

Co-authored-by: LegGasai <[email protected]>
2026-11-13 16:06:36 +08:00

17 lines
652 B
JavaScript

/** Test package registering its own settings page into `settings.section`. */
window.__ModuleLoader__.load({
id: '@fixture/settings-section',
factory(require) {
const React = require('react')
return {
inject: ['slots'],
apply(ctx) {
ctx.slots.inject('settings.section', () => ctx.slots.register({
name: 'settings.section', id: 'fixture-settings-section', label: 'Fixture settings',
}, () => React.createElement('section', { 'data-fixture-settings-section': '', 'aria-label': 'Fixture settings' },
React.createElement('p', null, 'Settings content from the fixture'))))
},
}
},
})