@moguiyu/dsh-tavily 0.2.7 → 0.2.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/lib/client.js +37 -5
- package/package.json +5 -3
- package/src/client.js +37 -5
package/lib/client.js
CHANGED
|
@@ -78,7 +78,7 @@ window.__ModuleLoader__.load({
|
|
|
78
78
|
)
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
function
|
|
81
|
+
function TavilySettingsCard() {
|
|
82
82
|
const [enabled, setEnabled] = react.useState(null)
|
|
83
83
|
const [expanded, setExpanded] = react.useState(false)
|
|
84
84
|
const [server, setServer] = react.useState(null)
|
|
@@ -438,13 +438,45 @@ window.__ModuleLoader__.load({
|
|
|
438
438
|
)
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
// The card the host renders. 0.1.6-alpha.2 asks a bundle-config entry for
|
|
442
|
+
// `view: 'page'` only; the legacy keyed settings slot passes no view at all.
|
|
443
|
+
function TavilyCard(props) {
|
|
444
|
+
if (props && props.view === 'summary') return react.createElement(TavilySummary, null)
|
|
445
|
+
return react.createElement(TavilySettingsCard, null)
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// One-liner for the summary view. Deliberately static and cheap: the page
|
|
449
|
+
// draws the title, the icon, and the crumb itself, and never asks this entry
|
|
450
|
+
// for anything but `page`.
|
|
451
|
+
function TavilySummary() {
|
|
452
|
+
return react.createElement('p', { style: { margin: 0, fontSize: 12, color: 'var(--dsw-alias-label-tertiary)' } },
|
|
453
|
+
'Rotating Tavily API keys for the advanced search tools. The built-in web_search keeps its native provider and is never replaced.'
|
|
454
|
+
)
|
|
455
|
+
}
|
|
456
|
+
|
|
441
457
|
function apply(ctx) {
|
|
458
|
+
// 0.1.6-alpha.2 moved plugin configuration off the Settings page and
|
|
459
|
+
// replaced the keyed `settings.plugin.item` slot with the Plugins page's
|
|
460
|
+
// `plugins.*` family (`dsh-client-ui-plugin-manager` declares it).
|
|
461
|
+
// `slots.inject` fires only for a slot the host actually declares, so
|
|
462
|
+
// injecting both IS the feature detection: exactly one mounts per harness
|
|
463
|
+
// line, and neither throws on the other. Keep both -- dropping the retired
|
|
464
|
+
// name silently removes the card from rc.7 through 0.1.6-alpha.1, and
|
|
465
|
+
// dropping the new one silently removes it from 0.1.6-alpha.2 onward.
|
|
466
|
+
ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({
|
|
467
|
+
name: 'plugins.bundle.config',
|
|
468
|
+
// Keyed by the bundle's package name. The Plugins page renders this on
|
|
469
|
+
// the @moguiyu/dsh-tavily bundle page, between its description and rows.
|
|
470
|
+
key: '@moguiyu/dsh-tavily',
|
|
471
|
+
id: '@moguiyu/dsh-tavily'
|
|
472
|
+
}, TavilyCard))
|
|
473
|
+
|
|
442
474
|
ctx.slots.inject('settings.plugin.item', () => ctx.slots.register({
|
|
443
475
|
name: 'settings.plugin.item',
|
|
444
|
-
// rc.7
|
|
445
|
-
//
|
|
446
|
-
//
|
|
447
|
-
//
|
|
476
|
+
// rc.7 through 0.1.6-alpha.1: keyed by the settings namespace the Host
|
|
477
|
+
// serves (`tavily-search`); the Plugins configuration tab dispatches it
|
|
478
|
+
// when the namespace is present. The id/order/label props keep rc.6
|
|
479
|
+
// list-slot deployments rendering the card as well.
|
|
448
480
|
key: 'tavily-search',
|
|
449
481
|
id: 'tavily-search',
|
|
450
482
|
order: 30,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moguiyu/dsh-tavily",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Opt-in advanced Tavily model tools for DeepSeek Harness with the Tavily Search settings card (rc.7/rc.8 and the 0.1.2-0.1.6 plugin management lines). The built-in web_search is never replaced.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -36,14 +36,16 @@
|
|
|
36
36
|
"0.1.5-alpha.2": "compatible",
|
|
37
37
|
"0.1.5-rc.1": "compatible",
|
|
38
38
|
"0.1.5-rc.2": "compatible",
|
|
39
|
-
"0.1.6-alpha.1": "compatible"
|
|
39
|
+
"0.1.6-alpha.1": "compatible",
|
|
40
|
+
"0.1.6-alpha.2": "compatible"
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
"client": {
|
|
43
44
|
"platform": "web",
|
|
44
45
|
"inject": [
|
|
45
46
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
46
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins"
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager"
|
|
47
49
|
]
|
|
48
50
|
}
|
|
49
51
|
},
|
package/src/client.js
CHANGED
|
@@ -83,7 +83,7 @@ export function factory(require) {
|
|
|
83
83
|
)
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function
|
|
86
|
+
function TavilySettingsCard() {
|
|
87
87
|
const [enabled, setEnabled] = react.useState(null)
|
|
88
88
|
const [expanded, setExpanded] = react.useState(false)
|
|
89
89
|
const [server, setServer] = react.useState(null)
|
|
@@ -443,13 +443,45 @@ export function factory(require) {
|
|
|
443
443
|
)
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
+
// The card the host renders. 0.1.6-alpha.2 asks a bundle-config entry for
|
|
447
|
+
// `view: 'page'` only; the legacy keyed settings slot passes no view at all.
|
|
448
|
+
function TavilyCard(props) {
|
|
449
|
+
if (props && props.view === 'summary') return react.createElement(TavilySummary, null)
|
|
450
|
+
return react.createElement(TavilySettingsCard, null)
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// One-liner for the summary view. Deliberately static and cheap: the page
|
|
454
|
+
// draws the title, the icon, and the crumb itself, and never asks this entry
|
|
455
|
+
// for anything but `page`.
|
|
456
|
+
function TavilySummary() {
|
|
457
|
+
return react.createElement('p', { style: { margin: 0, fontSize: 12, color: 'var(--dsw-alias-label-tertiary)' } },
|
|
458
|
+
'Rotating Tavily API keys for the advanced search tools. The built-in web_search keeps its native provider and is never replaced.'
|
|
459
|
+
)
|
|
460
|
+
}
|
|
461
|
+
|
|
446
462
|
function apply(ctx) {
|
|
463
|
+
// 0.1.6-alpha.2 moved plugin configuration off the Settings page and
|
|
464
|
+
// replaced the keyed `settings.plugin.item` slot with the Plugins page's
|
|
465
|
+
// `plugins.*` family (`dsh-client-ui-plugin-manager` declares it).
|
|
466
|
+
// `slots.inject` fires only for a slot the host actually declares, so
|
|
467
|
+
// injecting both IS the feature detection: exactly one mounts per harness
|
|
468
|
+
// line, and neither throws on the other. Keep both -- dropping the retired
|
|
469
|
+
// name silently removes the card from rc.7 through 0.1.6-alpha.1, and
|
|
470
|
+
// dropping the new one silently removes it from 0.1.6-alpha.2 onward.
|
|
471
|
+
ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({
|
|
472
|
+
name: 'plugins.bundle.config',
|
|
473
|
+
// Keyed by the bundle's package name. The Plugins page renders this on
|
|
474
|
+
// the @moguiyu/dsh-tavily bundle page, between its description and rows.
|
|
475
|
+
key: '@moguiyu/dsh-tavily',
|
|
476
|
+
id: '@moguiyu/dsh-tavily'
|
|
477
|
+
}, TavilyCard))
|
|
478
|
+
|
|
447
479
|
ctx.slots.inject('settings.plugin.item', () => ctx.slots.register({
|
|
448
480
|
name: 'settings.plugin.item',
|
|
449
|
-
// rc.7
|
|
450
|
-
//
|
|
451
|
-
//
|
|
452
|
-
//
|
|
481
|
+
// rc.7 through 0.1.6-alpha.1: keyed by the settings namespace the Host
|
|
482
|
+
// serves (`tavily-search`); the Plugins configuration tab dispatches it
|
|
483
|
+
// when the namespace is present. The id/order/label props keep rc.6
|
|
484
|
+
// list-slot deployments rendering the card as well.
|
|
453
485
|
key: 'tavily-search',
|
|
454
486
|
id: 'tavily-search',
|
|
455
487
|
order: 30,
|