@240xu/dsh-websearch 2.0.5 → 2.0.6
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 +19 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -25,6 +25,8 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
{ id: "openai", keyEnv: "OPENAI_API_KEY", label: "OpenAI" },
|
|
26
26
|
];
|
|
27
27
|
const GLOBAL_FIELDS = ["numResults", "concurrency", "backendTimeoutMs"];
|
|
28
|
+
const KEYLESS = BACKENDS.filter((b) => !b.keyEnv);
|
|
29
|
+
const KEYED = BACKENDS.filter((b) => b.keyEnv);
|
|
28
30
|
|
|
29
31
|
/** Where the user goes to get/rotate each key. */
|
|
30
32
|
const KEY_URLS = {
|
|
@@ -39,6 +41,8 @@ window.__ModuleLoader__.load({
|
|
|
39
41
|
|
|
40
42
|
const zh = {
|
|
41
43
|
nav: "搜索",
|
|
44
|
+
groupFree: "免密钥(开箱即用)",
|
|
45
|
+
groupKeyed: "需要 API Key",
|
|
42
46
|
statusEnabled: "已启用后端",
|
|
43
47
|
statusKeys: "已配置密钥",
|
|
44
48
|
keyMissing: "缺密钥",
|
|
@@ -64,6 +68,8 @@ window.__ModuleLoader__.load({
|
|
|
64
68
|
};
|
|
65
69
|
const en = {
|
|
66
70
|
nav: "Web Search",
|
|
71
|
+
groupFree: "Keyless (ready to use)",
|
|
72
|
+
groupKeyed: "Requires API key",
|
|
67
73
|
statusEnabled: "Backends enabled",
|
|
68
74
|
statusKeys: "Keys configured",
|
|
69
75
|
keyMissing: "key missing",
|
|
@@ -288,12 +294,21 @@ window.__ModuleLoader__.load({
|
|
|
288
294
|
react_jsx_runtime.jsxs("span", { children: [props.t("statusKeys"), ": ", react_jsx_runtime.jsx("b", { children: keysReady + "/" + keyedBackends.length })] }),
|
|
289
295
|
] }),
|
|
290
296
|
react_jsx_runtime.jsx("p", { style: { margin: 0, fontSize: 12, opacity: .65 }, children: props.t("description") }),
|
|
291
|
-
react_jsx_runtime.jsx("
|
|
292
|
-
react_jsx_runtime.jsx("div", { className: "wsc-toggles", children:
|
|
297
|
+
react_jsx_runtime.jsx("h5", { className: "wsc-sectionTitle", children: props.t("groupFree") }),
|
|
298
|
+
react_jsx_runtime.jsx("div", { className: "wsc-toggles", children: KEYLESS.map((b) =>
|
|
293
299
|
react_jsx_runtime.jsx(ToggleRow, {
|
|
294
300
|
backend: b,
|
|
295
301
|
value: state.value[toggleField(b.id)],
|
|
296
|
-
keyConfigured:
|
|
302
|
+
keyConfigured: true,
|
|
303
|
+
onChange: (checked) => card.setToggle(b.id, checked),
|
|
304
|
+
}, b.id)
|
|
305
|
+
) }),
|
|
306
|
+
react_jsx_runtime.jsx("h5", { className: "wsc-sectionTitle", children: props.t("groupKeyed") }),
|
|
307
|
+
react_jsx_runtime.jsx("div", { className: "wsc-toggles", children: KEYED.map((b) =>
|
|
308
|
+
react_jsx_runtime.jsx(ToggleRow, {
|
|
309
|
+
backend: b,
|
|
310
|
+
value: state.value[toggleField(b.id)],
|
|
311
|
+
keyConfigured: !!state.keyState[b.keyEnv]?.configured,
|
|
297
312
|
onChange: (checked) => card.setToggle(b.id, checked),
|
|
298
313
|
}, b.id)
|
|
299
314
|
) }),
|
|
@@ -359,7 +374,7 @@ window.__ModuleLoader__.load({
|
|
|
359
374
|
name: "settings.section",
|
|
360
375
|
id: "websearch",
|
|
361
376
|
order: 16,
|
|
362
|
-
label: () =>
|
|
377
|
+
label: () => ctx.locale.bind(NS)("nav"),
|
|
363
378
|
locale: NS,
|
|
364
379
|
inject: () => controller.inject(),
|
|
365
380
|
}, UnifiedSearchSection));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@240xu/dsh-websearch",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Unified web search provider for DeepSeek Harness (ctx.web): 11 backends — Exa + Parallel + DDG + SearXNG (keyless), DeepSeek + Anthropic + OpenAI + Brave + Tavily + Serper + Mojeek (key-gated via Settings credentials). Registers provider id \"unified\" for zero-config web_search tool.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|