@eddyskywalker/dsh-chatgpt-subscription 1.3.1 → 1.4.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 +15 -10
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +2 -1
- package/lib/index.js +36 -6
- 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/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/progress-updates.d.ts.map +1 -1
- package/lib/types/compat.d.ts +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/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/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
|
@@ -36751,6 +36751,8 @@ window.__ModuleLoader__.load({
|
|
|
36751
36751
|
copyUpdate: "复制这条进展",
|
|
36752
36752
|
copied: "已复制",
|
|
36753
36753
|
rowPending: "进展更新",
|
|
36754
|
+
/** 顾问反馈在进展面板里的固定标题;正文语言由顾问输出语言档位决定。 */
|
|
36755
|
+
advisorFeedback: "顾问反馈",
|
|
36754
36756
|
rowRunning: "进行中",
|
|
36755
36757
|
rowDone: "已汇报",
|
|
36756
36758
|
rowError: "未发出",
|
|
@@ -36841,6 +36843,7 @@ window.__ModuleLoader__.load({
|
|
|
36841
36843
|
copyUpdate: "Copy this update",
|
|
36842
36844
|
copied: "Copied",
|
|
36843
36845
|
rowPending: "Progress update",
|
|
36846
|
+
advisorFeedback: "Advisor feedback",
|
|
36844
36847
|
rowRunning: "Reporting",
|
|
36845
36848
|
rowDone: "Reported",
|
|
36846
36849
|
rowError: "Not reported",
|
|
@@ -38546,6 +38549,7 @@ window.__ModuleLoader__.load({
|
|
|
38546
38549
|
copyUpdate: "Копировать это обновление",
|
|
38547
38550
|
copied: "Скопировано",
|
|
38548
38551
|
rowPending: "Ход работы",
|
|
38552
|
+
advisorFeedback: "Отзыв советника",
|
|
38549
38553
|
rowRunning: "Сообщает",
|
|
38550
38554
|
rowDone: "Сообщено",
|
|
38551
38555
|
rowError: "Не отправлено",
|
|
@@ -71547,7 +71551,8 @@ window.__ModuleLoader__.load({
|
|
|
71547
71551
|
return interpolate$1(t === void 0 ? zh$4[key] ?? key : t(key), params);
|
|
71548
71552
|
};
|
|
71549
71553
|
}
|
|
71550
|
-
function titleOf(update) {
|
|
71554
|
+
function titleOf(update, t) {
|
|
71555
|
+
if (update.kind === "advisor") return t === void 0 ? zh$4.advisorFeedback : t("advisorFeedback");
|
|
71551
71556
|
if (update.title !== void 0 && update.title.trim() !== "") return update.title;
|
|
71552
71557
|
return update.message.split("\n").find((line) => line.trim() !== "") ?? "";
|
|
71553
71558
|
}
|
|
@@ -71927,7 +71932,7 @@ window.__ModuleLoader__.load({
|
|
|
71927
71932
|
marginRight: "7px"
|
|
71928
71933
|
},
|
|
71929
71934
|
children: clockOf(item.at)
|
|
71930
|
-
}), titleOf(item)]
|
|
71935
|
+
}), titleOf(item, t)]
|
|
71931
71936
|
}, item.id))
|
|
71932
71937
|
})]
|
|
71933
71938
|
}, start))
|
|
@@ -71935,8 +71940,8 @@ window.__ModuleLoader__.load({
|
|
|
71935
71940
|
]
|
|
71936
71941
|
});
|
|
71937
71942
|
}
|
|
71938
|
-
function updateMarkdown(update) {
|
|
71939
|
-
return `### ${titleOf(update)}\n\n${update.message}\n\n— ${dateTimeOf(update.at)}`;
|
|
71943
|
+
function updateMarkdown(update, t) {
|
|
71944
|
+
return `### ${titleOf(update, t)}\n\n${update.message}\n\n— ${dateTimeOf(update.at)}`;
|
|
71940
71945
|
}
|
|
71941
71946
|
async function copyText(text) {
|
|
71942
71947
|
try {
|
|
@@ -71949,9 +71954,9 @@ window.__ModuleLoader__.load({
|
|
|
71949
71954
|
}
|
|
71950
71955
|
return false;
|
|
71951
71956
|
}
|
|
71952
|
-
function exportUpdates(updates) {
|
|
71957
|
+
function exportUpdates(updates, t) {
|
|
71953
71958
|
try {
|
|
71954
|
-
const blob = new Blob([updates.map(updateMarkdown).join("\n\n---\n\n")], { type: "text/markdown;charset=utf-8" });
|
|
71959
|
+
const blob = new Blob([updates.map((update) => updateMarkdown(update, t)).join("\n\n---\n\n")], { type: "text/markdown;charset=utf-8" });
|
|
71955
71960
|
const url = URL.createObjectURL(blob);
|
|
71956
71961
|
const anchor = document.createElement("a");
|
|
71957
71962
|
anchor.href = url;
|
|
@@ -72068,7 +72073,7 @@ window.__ModuleLoader__.load({
|
|
|
72068
72073
|
lineHeight: 1.55,
|
|
72069
72074
|
overflowWrap: "anywhere"
|
|
72070
72075
|
},
|
|
72071
|
-
children: latest === void 0 ? t("progressEmptyHint") : titleOf(latest)
|
|
72076
|
+
children: latest === void 0 ? t("progressEmptyHint") : titleOf(latest, t)
|
|
72072
72077
|
}),
|
|
72073
72078
|
tasks.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
72074
72079
|
style: {
|
|
@@ -72218,7 +72223,7 @@ window.__ModuleLoader__.load({
|
|
|
72218
72223
|
part: "export-updates",
|
|
72219
72224
|
label: t("exportMarkdown"),
|
|
72220
72225
|
onClick: () => {
|
|
72221
|
-
exportUpdates(filtered);
|
|
72226
|
+
exportUpdates(filtered, t);
|
|
72222
72227
|
},
|
|
72223
72228
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "download" })
|
|
72224
72229
|
})
|
|
@@ -72358,7 +72363,7 @@ window.__ModuleLoader__.load({
|
|
|
72358
72363
|
lineHeight: 1.5,
|
|
72359
72364
|
overflowWrap: "anywhere"
|
|
72360
72365
|
},
|
|
72361
|
-
children: titleOf(update)
|
|
72366
|
+
children: titleOf(update, t)
|
|
72362
72367
|
}),
|
|
72363
72368
|
latestRow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
72364
72369
|
"data-dsh-part": "update-badge",
|
|
@@ -72386,7 +72391,7 @@ window.__ModuleLoader__.load({
|
|
|
72386
72391
|
"aria-label": t("copyUpdate"),
|
|
72387
72392
|
title: t("copyUpdate"),
|
|
72388
72393
|
onClick: () => {
|
|
72389
|
-
copyText(updateMarkdown(update)).then((ok) => {
|
|
72394
|
+
copyText(updateMarkdown(update, t)).then((ok) => {
|
|
72390
72395
|
if (!ok) return;
|
|
72391
72396
|
setCopiedId(update.id);
|
|
72392
72397
|
setTimeout(() => {
|