@eddyskywalker/dsh-chatgpt-subscription 1.3.1 → 1.5.0
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/advisor-contracts-BG7iEfUc.js +8 -0
- package/lib/client.js +23 -13
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +72 -7
- package/lib/index.js +260 -114
- package/lib/{preset-sync-RBsYhDY3.js → preset-sync-DspdQkYN.js} +1 -8
- package/lib/{progress-updates-jiHnSAmz.js → progress-updates-ART24-8J.js} +81 -4
- package/lib/progress-updates.js +1 -1
- package/lib/{tool-result-pruner-CuKHwU2R.js → tool-result-pruner-Duw9-Gwo.js} +381 -127
- package/lib/tool-result-pruner.js +1 -1
- package/lib/types/client/features/progress-updates/contracts.d.ts +2 -0
- package/lib/types/client/features/progress-updates/contracts.d.ts.map +1 -1
- package/lib/types/client/features/progress-updates/dashboard.d.ts.map +1 -1
- package/lib/types/client/features/progress-updates/locales.d.ts +8 -2
- package/lib/types/client/features/progress-updates/locales.d.ts.map +1 -1
- package/lib/types/client/locales-ru/grok.d.ts.map +1 -1
- package/lib/types/client/locales-ru/progress-updates.d.ts.map +1 -1
- package/lib/types/client/providers/grok/locales.d.ts +3 -1
- package/lib/types/client/providers/grok/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/model-facts-data.d.ts +4 -0
- package/lib/types/host/common/model-facts-data.d.ts.map +1 -0
- package/lib/types/host/common/model-facts.d.ts +41 -0
- package/lib/types/host/common/model-facts.d.ts.map +1 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
- package/lib/types/host/providers/glm-coding-plan/model-catalog.d.ts +9 -11
- package/lib/types/host/providers/glm-coding-plan/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/grok/model-catalog.d.ts +5 -1
- package/lib/types/host/providers/grok/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/minimax-code/model-catalog.d.ts +17 -11
- package/lib/types/host/providers/minimax-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/mapper.d.ts +0 -25
- package/lib/types/host/providers/qoder/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/step-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/workbuddy/model-catalog.d.ts.map +1 -1
- package/lib/types/host/runtime/advisor/index.d.ts +4 -1
- package/lib/types/host/runtime/advisor/index.d.ts.map +1 -1
- package/lib/types/host/runtime/advisor/prompt.d.ts +14 -0
- package/lib/types/host/runtime/advisor/prompt.d.ts.map +1 -1
- package/lib/types/host/runtime/advisor/request.d.ts +3 -0
- package/lib/types/host/runtime/advisor/request.d.ts.map +1 -1
- package/lib/types/host/runtime/codemode/transport.d.ts +4 -3
- package/lib/types/host/runtime/codemode/transport.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/discipline.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts +2 -2
- package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/match.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts +4 -0
- package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/identity.d.ts +6 -0
- package/lib/types/host/runtime/open-models/identity.d.ts.map +1 -0
- package/lib/types/host/runtime/open-models/index.d.ts +4 -5
- package/lib/types/host/runtime/open-models/index.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/profiles.d.ts +10 -22
- package/lib/types/host/runtime/open-models/profiles.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/state-anchor.d.ts.map +1 -1
- package/lib/types/host/runtime/progress-updates/projection.d.ts +6 -1
- package/lib/types/host/runtime/progress-updates/projection.d.ts.map +1 -1
- package/lib/types/host/runtime/progress-updates/store.d.ts +2 -0
- package/lib/types/host/runtime/progress-updates/store.d.ts.map +1 -1
- package/lib/types/shared/grok-contracts.d.ts +1 -1
- package/lib/types/shared/grok-contracts.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/shared/advisor-contracts.ts
|
|
2
|
+
/** Public Advisor contracts shared by Host and Web; never include credentials or transcript content. */
|
|
3
|
+
const CONSULT_ADVISOR_TOOL_NAME = "consult_advisor";
|
|
4
|
+
const ADVISOR_STATE_PATH = "/advisor/state";
|
|
5
|
+
/** 顾问工具的时限:吃满 PTC 的 600 秒上限,给请求留出收尾余量。 */
|
|
6
|
+
const ADVISOR_TOOL_TIMEOUT_MS = 6e5;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ADVISOR_TOOL_TIMEOUT_MS as n, CONSULT_ADVISOR_TOOL_NAME as r, ADVISOR_STATE_PATH as t };
|
package/lib/client.js
CHANGED
|
@@ -33761,10 +33761,11 @@ window.__ModuleLoader__.load({
|
|
|
33761
33761
|
const GROK_REASONING_EFFORTS = [
|
|
33762
33762
|
"low",
|
|
33763
33763
|
"medium",
|
|
33764
|
-
"high"
|
|
33764
|
+
"high",
|
|
33765
|
+
"xhigh"
|
|
33765
33766
|
];
|
|
33766
33767
|
function isGrokReasoningEffort(value) {
|
|
33767
|
-
return value === "low" || value === "medium" || value === "high";
|
|
33768
|
+
return value === "low" || value === "medium" || value === "high" || value === "xhigh";
|
|
33768
33769
|
}
|
|
33769
33770
|
//#endregion
|
|
33770
33771
|
//#region src/client/providers/grok/locales.ts
|
|
@@ -33827,6 +33828,7 @@ window.__ModuleLoader__.load({
|
|
|
33827
33828
|
effortLow: "低",
|
|
33828
33829
|
effortMedium: "中",
|
|
33829
33830
|
effortHigh: "高",
|
|
33831
|
+
effortXhigh: "极高",
|
|
33830
33832
|
contextSection: "上下文窗口",
|
|
33831
33833
|
contextHint: "各模型的上下文窗口可按需覆盖;留空表示使用目录默认值。",
|
|
33832
33834
|
contextEmpty: "先勾选模型,再调整上下文窗口。",
|
|
@@ -33924,6 +33926,7 @@ window.__ModuleLoader__.load({
|
|
|
33924
33926
|
effortLow: "Low",
|
|
33925
33927
|
effortMedium: "Medium",
|
|
33926
33928
|
effortHigh: "High",
|
|
33929
|
+
effortXhigh: "Extra high",
|
|
33927
33930
|
contextSection: "Context window",
|
|
33928
33931
|
contextHint: "Each model's context window can be overridden; empty keeps the catalog default.",
|
|
33929
33932
|
contextEmpty: "Check a model first, then adjust its context window.",
|
|
@@ -34299,7 +34302,8 @@ window.__ModuleLoader__.load({
|
|
|
34299
34302
|
const EFFORT_KEYS = {
|
|
34300
34303
|
low: "effortLow",
|
|
34301
34304
|
medium: "effortMedium",
|
|
34302
|
-
high: "effortHigh"
|
|
34305
|
+
high: "effortHigh",
|
|
34306
|
+
xhigh: "effortXhigh"
|
|
34303
34307
|
};
|
|
34304
34308
|
function more(title, lines) {
|
|
34305
34309
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
@@ -36751,6 +36755,8 @@ window.__ModuleLoader__.load({
|
|
|
36751
36755
|
copyUpdate: "复制这条进展",
|
|
36752
36756
|
copied: "已复制",
|
|
36753
36757
|
rowPending: "进展更新",
|
|
36758
|
+
/** 顾问反馈在进展面板里的固定标题;正文语言由顾问输出语言档位决定。 */
|
|
36759
|
+
advisorFeedback: "顾问反馈",
|
|
36754
36760
|
rowRunning: "进行中",
|
|
36755
36761
|
rowDone: "已汇报",
|
|
36756
36762
|
rowError: "未发出",
|
|
@@ -36841,6 +36847,7 @@ window.__ModuleLoader__.load({
|
|
|
36841
36847
|
copyUpdate: "Copy this update",
|
|
36842
36848
|
copied: "Copied",
|
|
36843
36849
|
rowPending: "Progress update",
|
|
36850
|
+
advisorFeedback: "Advisor feedback",
|
|
36844
36851
|
rowRunning: "Reporting",
|
|
36845
36852
|
rowDone: "Reported",
|
|
36846
36853
|
rowError: "Not reported",
|
|
@@ -38546,6 +38553,7 @@ window.__ModuleLoader__.load({
|
|
|
38546
38553
|
copyUpdate: "Копировать это обновление",
|
|
38547
38554
|
copied: "Скопировано",
|
|
38548
38555
|
rowPending: "Ход работы",
|
|
38556
|
+
advisorFeedback: "Отзыв советника",
|
|
38549
38557
|
rowRunning: "Сообщает",
|
|
38550
38558
|
rowDone: "Сообщено",
|
|
38551
38559
|
rowError: "Не отправлено",
|
|
@@ -40032,6 +40040,7 @@ window.__ModuleLoader__.load({
|
|
|
40032
40040
|
effortLow: "Низкий",
|
|
40033
40041
|
effortMedium: "Средний",
|
|
40034
40042
|
effortHigh: "Высокий",
|
|
40043
|
+
effortXhigh: "Очень высокий",
|
|
40035
40044
|
contextSection: "Контекстное окно",
|
|
40036
40045
|
contextHint: "Окно каждой модели можно переопределить; пустое поле использует значение каталога.",
|
|
40037
40046
|
contextEmpty: "Сначала отметьте модель, затем настройте контекст.",
|
|
@@ -71547,7 +71556,8 @@ window.__ModuleLoader__.load({
|
|
|
71547
71556
|
return interpolate$1(t === void 0 ? zh$4[key] ?? key : t(key), params);
|
|
71548
71557
|
};
|
|
71549
71558
|
}
|
|
71550
|
-
function titleOf(update) {
|
|
71559
|
+
function titleOf(update, t) {
|
|
71560
|
+
if (update.kind === "advisor") return t === void 0 ? zh$4.advisorFeedback : t("advisorFeedback");
|
|
71551
71561
|
if (update.title !== void 0 && update.title.trim() !== "") return update.title;
|
|
71552
71562
|
return update.message.split("\n").find((line) => line.trim() !== "") ?? "";
|
|
71553
71563
|
}
|
|
@@ -71927,7 +71937,7 @@ window.__ModuleLoader__.load({
|
|
|
71927
71937
|
marginRight: "7px"
|
|
71928
71938
|
},
|
|
71929
71939
|
children: clockOf(item.at)
|
|
71930
|
-
}), titleOf(item)]
|
|
71940
|
+
}), titleOf(item, t)]
|
|
71931
71941
|
}, item.id))
|
|
71932
71942
|
})]
|
|
71933
71943
|
}, start))
|
|
@@ -71935,8 +71945,8 @@ window.__ModuleLoader__.load({
|
|
|
71935
71945
|
]
|
|
71936
71946
|
});
|
|
71937
71947
|
}
|
|
71938
|
-
function updateMarkdown(update) {
|
|
71939
|
-
return `### ${titleOf(update)}\n\n${update.message}\n\n— ${dateTimeOf(update.at)}`;
|
|
71948
|
+
function updateMarkdown(update, t) {
|
|
71949
|
+
return `### ${titleOf(update, t)}\n\n${update.message}\n\n— ${dateTimeOf(update.at)}`;
|
|
71940
71950
|
}
|
|
71941
71951
|
async function copyText(text) {
|
|
71942
71952
|
try {
|
|
@@ -71949,9 +71959,9 @@ window.__ModuleLoader__.load({
|
|
|
71949
71959
|
}
|
|
71950
71960
|
return false;
|
|
71951
71961
|
}
|
|
71952
|
-
function exportUpdates(updates) {
|
|
71962
|
+
function exportUpdates(updates, t) {
|
|
71953
71963
|
try {
|
|
71954
|
-
const blob = new Blob([updates.map(updateMarkdown).join("\n\n---\n\n")], { type: "text/markdown;charset=utf-8" });
|
|
71964
|
+
const blob = new Blob([updates.map((update) => updateMarkdown(update, t)).join("\n\n---\n\n")], { type: "text/markdown;charset=utf-8" });
|
|
71955
71965
|
const url = URL.createObjectURL(blob);
|
|
71956
71966
|
const anchor = document.createElement("a");
|
|
71957
71967
|
anchor.href = url;
|
|
@@ -72068,7 +72078,7 @@ window.__ModuleLoader__.load({
|
|
|
72068
72078
|
lineHeight: 1.55,
|
|
72069
72079
|
overflowWrap: "anywhere"
|
|
72070
72080
|
},
|
|
72071
|
-
children: latest === void 0 ? t("progressEmptyHint") : titleOf(latest)
|
|
72081
|
+
children: latest === void 0 ? t("progressEmptyHint") : titleOf(latest, t)
|
|
72072
72082
|
}),
|
|
72073
72083
|
tasks.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
72074
72084
|
style: {
|
|
@@ -72218,7 +72228,7 @@ window.__ModuleLoader__.load({
|
|
|
72218
72228
|
part: "export-updates",
|
|
72219
72229
|
label: t("exportMarkdown"),
|
|
72220
72230
|
onClick: () => {
|
|
72221
|
-
exportUpdates(filtered);
|
|
72231
|
+
exportUpdates(filtered, t);
|
|
72222
72232
|
},
|
|
72223
72233
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "download" })
|
|
72224
72234
|
})
|
|
@@ -72358,7 +72368,7 @@ window.__ModuleLoader__.load({
|
|
|
72358
72368
|
lineHeight: 1.5,
|
|
72359
72369
|
overflowWrap: "anywhere"
|
|
72360
72370
|
},
|
|
72361
|
-
children: titleOf(update)
|
|
72371
|
+
children: titleOf(update, t)
|
|
72362
72372
|
}),
|
|
72363
72373
|
latestRow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
72364
72374
|
"data-dsh-part": "update-badge",
|
|
@@ -72386,7 +72396,7 @@ window.__ModuleLoader__.load({
|
|
|
72386
72396
|
"aria-label": t("copyUpdate"),
|
|
72387
72397
|
title: t("copyUpdate"),
|
|
72388
72398
|
onClick: () => {
|
|
72389
|
-
copyText(updateMarkdown(update)).then((ok) => {
|
|
72399
|
+
copyText(updateMarkdown(update, t)).then((ok) => {
|
|
72390
72400
|
if (!ok) return;
|
|
72391
72401
|
setCopiedId(update.id);
|
|
72392
72402
|
setTimeout(() => {
|