@240xu/dsh-websearch 2.13.6 → 2.13.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/README.md +1 -1
- package/lib/client.js +9 -2
- package/lib/provider.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -40,6 +40,10 @@ window.__ModuleLoader__.load({
|
|
|
40
40
|
};
|
|
41
41
|
/** Boolean settings staged as "true"/"false" strings by the selects. */
|
|
42
42
|
const BOOLEAN_FIELDS = ["rerank", "safeSearch", "resultTelemetry", "resultHeader", "cacheEnabled"];
|
|
43
|
+
// resolveOptions forces these under official; a draft left behind would
|
|
44
|
+
// be saved while having no runtime effect, and could block Save with an
|
|
45
|
+
// invalid value the disabled control cannot correct.
|
|
46
|
+
const OFFICIAL_IGNORED_FIELDS = ["numResults", "rerank", "resultTelemetry", "resultHeader"];
|
|
43
47
|
// split metered, opt-in backends out of the
|
|
44
48
|
// "keyless / ready to use" group. They work without a key but are rate
|
|
45
49
|
// limited and default OFF, so a separate section with an explicit hint
|
|
@@ -503,6 +507,9 @@ window.__ModuleLoader__.load({
|
|
|
503
507
|
}
|
|
504
508
|
this.savedAt = 0;
|
|
505
509
|
this.staged.set(field, { text });
|
|
510
|
+
if (field === "intervention" && String(text) === "official") {
|
|
511
|
+
for (const ignored of OFFICIAL_IGNORED_FIELDS) this.staged.delete(ignored);
|
|
512
|
+
}
|
|
506
513
|
this.republish();
|
|
507
514
|
}
|
|
508
515
|
/** Drop a staged field edit; the stored value is untouched. */
|
|
@@ -958,7 +965,7 @@ window.__ModuleLoader__.load({
|
|
|
958
965
|
const hasDraft = (f) => state.stagedText(f) !== undefined;
|
|
959
966
|
// A gate only locks untouched fields; a field with a pending edit
|
|
960
967
|
// stays editable so the user can correct or discard it.
|
|
961
|
-
const officialLocked = (f) => official && !hasDraft(f);
|
|
968
|
+
const officialLocked = (f) => official && !hasDraft(f); // drafts are dropped on switching to official
|
|
962
969
|
const ttlLocked = !cacheOn && !hasDraft("cacheTtl");
|
|
963
970
|
const recencyOptions = [
|
|
964
971
|
{ value: "any", label: t("recencyAny") },
|
|
@@ -1137,7 +1144,7 @@ window.__ModuleLoader__.load({
|
|
|
1137
1144
|
const hasDraft = (f) => state.stagedText(f) !== undefined;
|
|
1138
1145
|
// A gate only locks untouched fields; a field with a pending edit
|
|
1139
1146
|
// stays editable so the user can correct or discard it.
|
|
1140
|
-
const officialLocked = (f) => official && !hasDraft(f);
|
|
1147
|
+
const officialLocked = (f) => official && !hasDraft(f); // drafts are dropped on switching to official
|
|
1141
1148
|
const ttlLocked = !cacheOn && !hasDraft("cacheTtl");
|
|
1142
1149
|
|
|
1143
1150
|
return react_jsx_runtime.jsxs("div", { className: "wsc-card", children: [
|
package/lib/provider.js
CHANGED
|
@@ -697,6 +697,10 @@ export function createUnifiedSearchProvider({ ctx, resolveOptions, backends, cac
|
|
|
697
697
|
perVariant.push({ query: variantQuery, ordered, mergedContent: fold.mergedContent });
|
|
698
698
|
}
|
|
699
699
|
|
|
700
|
+
if (variantsRun === 0) {
|
|
701
|
+
recordHistory(history, request?.query, 0, 0, candidates.length);
|
|
702
|
+
throw new WebError("unified search: search budget exhausted before any backend could run", "WEB_PROVIDER_ERROR");
|
|
703
|
+
}
|
|
700
704
|
const variantsSkipped = variants.length - variantsRun;
|
|
701
705
|
const facetNote = useMulti && variantsSkipped > 0
|
|
702
706
|
? ` · multiQuery: ${variantsSkipped}/${variants.length} facets not run (search budget)`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@240xu/dsh-websearch",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.8",
|
|
4
4
|
"description": "Unified web search provider for DeepSeek Harness (ctx.web): 13 backends — Exa + Parallel + DDG + SearXNG (keyless), DeepSeek + Anthropic + OpenAI + Brave + Tavily + Serper + Mojeek (key-gated via Settings credentials), Firecrawl + TinyFish (metered keyless, opt-in). Registers provider id \"unified\" for zero-config web_search. 统一网页搜索聚合:13 后端并发扇出、去重合并。See CHANGELOG.md for version history.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|