@deepseek-ai/dsh-client-ui-chat 0.1.7-alpha.2 → 0.1.7-rc.2
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.i18n.yaml +51 -5
- package/README.md +10 -6
- package/README.zh.md +10 -6
- package/lib/client.js +395 -101
- package/lib/index.js +15 -8
- package/lib/types/chat-settings.d.ts +10 -8
- package/lib/types/client/chat/AssistantMarkdown.d.ts +6 -3
- package/lib/types/client/chat/QuotaNoticeHost.d.ts +7 -0
- package/lib/types/client/contract/chat-visibility.d.ts +1 -0
- package/lib/types/client/contract/process-groups.d.ts +3 -1
- package/lib/types/client/contract/slots.d.ts +54 -1
- package/lib/types/client/contract/snapshot.d.ts +1 -1
- package/lib/types/client/conversation-nodes/message.d.ts +3 -1
- package/lib/types/client/conversation-nodes/tool.d.ts +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locale.d.ts +72 -2
- package/lib/types/client/presentation-policy.d.ts +2 -2
- package/lib/types/client/transcript-view.d.ts +2 -2
- package/lib/types/index.d.ts +3 -3
- package/package.json +36 -36
package/lib/client.js
CHANGED
|
@@ -76,6 +76,18 @@ window.__ModuleLoader__.load({
|
|
|
76
76
|
return path.startsWith("/") || isWindowsStylePath(path);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
+
* Resolve a Workspace-relative path into the Host-facing spelling used by path operations.
|
|
80
|
+
* @param cwd - Session Workspace root, when known.
|
|
81
|
+
* @param path - Absolute or Workspace-relative path.
|
|
82
|
+
* @returns an absolute path when a Workspace root is available, otherwise the original path.
|
|
83
|
+
*/
|
|
84
|
+
function resolveWorkspacePath(cwd, path) {
|
|
85
|
+
if (isAbsoluteWorkspacePath(path)) return path;
|
|
86
|
+
if (cwd === void 0 || cwd === "") return path;
|
|
87
|
+
const separator = isWindowsStylePath(cwd) && cwd.includes("\\") ? "\\" : "/";
|
|
88
|
+
return `${cwd.replace(/[/\\]+$/, "")}${separator}${path.replace(/^[/\\]+/, "")}`;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
79
91
|
* The address for a path as a caller holds it: a relative path, or an absolute
|
|
80
92
|
* path inside the Session's workspace, becomes a `session`-scoped address; an
|
|
81
93
|
* absolute path outside it, or one whose workspace root is unknown, keeps its
|
|
@@ -93,6 +105,16 @@ window.__ModuleLoader__.load({
|
|
|
93
105
|
if (root !== "" && normalized.startsWith(`${root}/`)) return sessionFileAddress(sessionId, normalized.slice(root.length + 1));
|
|
94
106
|
return sessionFileAddress(sessionId, normalized);
|
|
95
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Address a decoded absolute file path through the authenticated file route.
|
|
110
|
+
* @param base - HTTP(S) application base, including its deployment prefix, or `dsh-app://app/`.
|
|
111
|
+
* @param path - Native file path; URL escapes in authored Markdown must already be decoded.
|
|
112
|
+
* @returns File URL, or undefined for unsupported transports and non-absolute paths.
|
|
113
|
+
*/
|
|
114
|
+
function fileMediaUrl(base, path) {
|
|
115
|
+
if (!/^https?:/u.test(base) && !base.startsWith("dsh-app://app/") || !isAbsoluteWorkspacePath(path) || /^[/\\]{2}/u.test(path) || /[\u0000-\u001f\u007f]/u.test(path)) return void 0;
|
|
116
|
+
return new URL(`api/file?path=${encodeURIComponent(path)}`, base).href;
|
|
117
|
+
}
|
|
96
118
|
//#endregion
|
|
97
119
|
//#region lib/types/client/contract/snapshot.js
|
|
98
120
|
const EMPTY_LIST$1 = [];
|
|
@@ -161,7 +183,7 @@ window.__ModuleLoader__.load({
|
|
|
161
183
|
return useChat((snapshot) => {
|
|
162
184
|
for (const node of snapshot.nodes.values()) {
|
|
163
185
|
const root = node.kind === "tool-call" ? node.data.root : void 0;
|
|
164
|
-
if (root !== void 0 && root.callId === callId && !("kind" in root)) return commandOf(root);
|
|
186
|
+
if (root !== void 0 && root.callId === callId && !("kind" in root) && root.phase === "start") return commandOf(root);
|
|
165
187
|
}
|
|
166
188
|
}) ?? null;
|
|
167
189
|
}
|
|
@@ -189,7 +211,7 @@ window.__ModuleLoader__.load({
|
|
|
189
211
|
}
|
|
190
212
|
//#endregion
|
|
191
213
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/MessageItem.module.css.mjs
|
|
192
|
-
const css$17 = ".Sixlwa_userRow{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.Sixlwa_userStack{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%);flex-direction:column;align-items:flex-end;gap:8px;display:flex}.Sixlwa_bubble{background:var(--dsw-specific-bubble);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;
|
|
214
|
+
const css$17 = ".Sixlwa_userRow{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.Sixlwa_userStack{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%);flex-direction:column;align-items:flex-end;gap:8px;display:flex}.Sixlwa_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}.Sixlwa_referenceSummary{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(18px + var(--dsh-content-font-delta-secondary,0px))}.Sixlwa_contextRow{padding:2px 0}.Sixlwa_compactionRow{--dsh-compaction-header-height:calc(24px + var(--dsh-content-font-delta,0px));padding:2px 0}.Sixlwa_compactionButton{width:100%;height:var(--dsh-compaction-header-height);border-radius:var(--dsw-radius-sm);min-width:0;color:inherit;font:inherit;text-align:left;background:0 0;border:none;align-items:center;padding:0;display:flex}.Sixlwa_compactionRow:has(.Sixlwa_compactionBody) .Sixlwa_compactionButton{z-index:7;background:var(--dsw-alias-bg-base);border-radius:0;position:sticky;top:0}.Sixlwa_compactionBody :has(>[data-code-block-banner]){top:var(--dsh-compaction-header-height)}.Sixlwa_compactionRow:has(.Sixlwa_compactionBody) .Sixlwa_compactionButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.Sixlwa_compactionButton:not(:disabled){cursor:pointer}.Sixlwa_compactionButton:not(:disabled):hover{background:var(--dsw-alias-interactive-bg-hover)}.Sixlwa_compactionLeading{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-secondary);flex:none;place-items:center;margin-right:6px;display:inline-grid}.Sixlwa_compactionLeading svg{width:calc(14px + var(--dsh-content-font-delta,0px));height:calc(14px + var(--dsh-content-font-delta,0px))}.Sixlwa_compactionContextIcon,.Sixlwa_compactionDisclosureIcon{grid-area:1/1;justify-content:center;align-items:center;display:inline-flex}.Sixlwa_compactionDisclosureIcon,.Sixlwa_compactionButton:not(:disabled):hover .Sixlwa_compactionContextIcon,.Sixlwa_compactionButton:not(:disabled):focus-visible .Sixlwa_compactionContextIcon{opacity:0}.Sixlwa_compactionButton:not(:disabled):hover .Sixlwa_compactionDisclosureIcon,.Sixlwa_compactionButton:not(:disabled):focus-visible .Sixlwa_compactionDisclosureIcon{opacity:1}.Sixlwa_compactionTitle{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary-dimmed);flex:none}.Sixlwa_compactionSep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.Sixlwa_compactionSummary{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:auto;overflow:hidden}.Sixlwa_compactionBody{padding:4px 0 4px calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px))}.Sixlwa_retryRow{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta-secondary,0px))}.Sixlwa_retrySummary{border-radius:var(--dsw-radius-sm);width:fit-content;color:inherit;cursor:pointer;user-select:none;align-items:center;gap:7px;padding:2px 0;list-style:none;display:inline-flex}.Sixlwa_retrySummary::-webkit-details-marker{display:none}.Sixlwa_retrySummary:after{content:\"\";opacity:.8;border-bottom:1.5px solid;border-right:1.5px solid;width:6px;height:6px;transition:transform .12s;transform:rotate(-45deg)}.Sixlwa_retrySummary:hover{color:var(--dsw-alias-label-secondary)}.Sixlwa_retrySummary:focus-visible{outline:1.5px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.Sixlwa_retryText{color:inherit}.Sixlwa_retryRow[data-active] .Sixlwa_retryText{background:linear-gradient(90deg, var(--dsw-alias-label-tertiary) 0%, var(--dsw-alias-label-tertiary) 40%, var(--dsw-alias-label-secondary) 50%, var(--dsw-alias-label-tertiary) 60%, var(--dsw-alias-label-tertiary) 100%);color:#0000;background-position:100%;background-size:200% 100%;background-clip:text;animation:1.6s ease-in-out infinite Sixlwa_retry-shimmer}.Sixlwa_retryRow[open] .Sixlwa_retrySummary:after{transform:rotate(45deg)}.Sixlwa_retryDetails{overflow-wrap:anywhere;font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(18px + var(--dsh-content-font-delta-secondary,0px));gap:2px;margin-top:3px;padding-left:14px;display:grid}.Sixlwa_retryDetailLabel{color:var(--dsw-alias-label-secondary)}.Sixlwa_turnErrorRow{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(20px + var(--dsh-content-font-delta-secondary,0px));grid-template-columns:10px minmax(0,1fr) auto;align-items:start;gap:8px;padding:2px 0;display:grid}.Sixlwa_turnErrorDot{margin-top:5px}.Sixlwa_turnErrorCopy{overflow-wrap:anywhere;min-width:0}.Sixlwa_turnErrorTitle{color:var(--dsw-alias-state-error-primary);margin-right:6px;font-weight:600}.Sixlwa_turnErrorMessage{color:var(--dsw-alias-label-secondary)}.Sixlwa_turnErrorCode{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-markdown-code-block-small)}.Sixlwa_maxTokensTitle{color:var(--dsw-alias-state-warn-primary);margin-right:6px;font-weight:600}@keyframes Sixlwa_retry-shimmer{0%{background-position:100%}to{background-position:0}}@media (prefers-reduced-motion:reduce){.Sixlwa_retryRow[data-active] .Sixlwa_retryText{color:inherit;background:0 0;animation:none}}.Sixlwa_attachmentRow{flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:100%;display:flex}.Sixlwa_fileCard{border:.5px solid var(--dsw-alias-border-l2,#0000001f);border-radius:var(--dsw-radius-xl);background:var(--dsw-specific-input-major,transparent);box-sizing:border-box;flex:0 0 240px;align-items:center;gap:10px;width:240px;min-height:64px;padding:8px 12px;display:inline-flex}.Sixlwa_fileIcon{flex:none;width:28px;height:28px}.Sixlwa_fileContent{flex-direction:column;flex:1;min-width:0;display:flex}.Sixlwa_fileName{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:22px;overflow:hidden}.Sixlwa_fileMeta{white-space:nowrap;text-overflow:ellipsis;color:var(--dsw-alias-label-tertiary,#00000073);font-size:12px;line-height:15px;overflow:hidden}";
|
|
193
215
|
const tagId$17 = "@deepseek-ai/dsh-client-ui-chat/MessageItem.module.css";
|
|
194
216
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$17) + "]") === null) {
|
|
195
217
|
const tag = document.createElement("style");
|
|
@@ -854,7 +876,7 @@ window.__ModuleLoader__.load({
|
|
|
854
876
|
}
|
|
855
877
|
//#endregion
|
|
856
878
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/ContextInjectionRow.module.css.mjs
|
|
857
|
-
const css$15 = ".XrJvXW_root{min-width:0}.XrJvXW_root[data-open]{padding-bottom:4px}.XrJvXW_chevron{color:var(--dsw-alias-label-secondary)}.XrJvXW_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.XrJvXW_source{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:none;overflow:hidden}.XrJvXW_summary{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:auto;overflow:hidden}.XrJvXW_body{box-sizing:border-box;width:calc(100% - 22px - var(--dsh-content-font-delta,0px));max-height:141px;margin:4px 0 0 calc(22px + var(--dsh-content-font-delta,0px));background:var(--dsw-alias-markdown-code-block);color:var(--dsw-alias-label-tertiary);font:400 11px/16px var(--ds-font-family-code);border:none;
|
|
879
|
+
const css$15 = ".XrJvXW_root{min-width:0}.XrJvXW_root[data-open]{padding-bottom:4px}.XrJvXW_chevron{color:var(--dsw-alias-label-secondary)}.XrJvXW_sep{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.XrJvXW_source{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:none;overflow:hidden}.XrJvXW_summary{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:auto;overflow:hidden}.XrJvXW_body{box-sizing:border-box;width:calc(100% - 22px - var(--dsh-content-font-delta,0px));max-height:141px;margin:4px 0 0 calc(22px + var(--dsh-content-font-delta,0px));border-radius:var(--dsw-radius-md);background:var(--dsw-alias-markdown-code-block);color:var(--dsw-alias-label-tertiary);font:400 11px/16px var(--ds-font-family-code);border:none;padding:10px 16px 12px 12px;overflow:auto}.XrJvXW_toolChanges{white-space:nowrap}";
|
|
858
880
|
const tagId$15 = "@deepseek-ai/dsh-client-ui-chat/ContextInjectionRow.module.css";
|
|
859
881
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$15) + "]") === null) {
|
|
860
882
|
const tag = document.createElement("style");
|
|
@@ -869,7 +891,8 @@ window.__ModuleLoader__.load({
|
|
|
869
891
|
"root": "XrJvXW_root",
|
|
870
892
|
"sep": "XrJvXW_sep",
|
|
871
893
|
"source": "XrJvXW_source",
|
|
872
|
-
"summary": "XrJvXW_summary"
|
|
894
|
+
"summary": "XrJvXW_summary",
|
|
895
|
+
"toolChanges": "XrJvXW_toolChanges"
|
|
873
896
|
};
|
|
874
897
|
//#endregion
|
|
875
898
|
//#region lib/types/client/chat/ContextInjectionRow.js
|
|
@@ -891,15 +914,29 @@ window.__ModuleLoader__.load({
|
|
|
891
914
|
source,
|
|
892
915
|
t
|
|
893
916
|
});
|
|
917
|
+
const toolBlocks = content.length > 0 && content.every((block) => block.type === "tool-addition" || block.type === "tool-removal") ? content : void 0;
|
|
918
|
+
const added = toolBlocks?.flatMap((block) => block.type === "tool-addition" ? [block.toolName] : []) ?? [];
|
|
919
|
+
const removed = toolBlocks?.flatMap((block) => block.type === "tool-removal" ? [block.toolName] : []) ?? [];
|
|
920
|
+
const single = toolBlocks?.length === 1 ? toolBlocks[0] : void 0;
|
|
921
|
+
const toolSummary = toolBlocks === void 0 || single !== void 0 ? null : added.length > 0 && removed.length > 0 ? t("message.toolsChanged", {
|
|
922
|
+
added: added.length,
|
|
923
|
+
removed: removed.length
|
|
924
|
+
}) : added.length > 0 ? t("message.toolsAddedCount", { count: added.length }) : t("message.toolsRemovedCount", { count: removed.length });
|
|
894
925
|
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
895
926
|
className: ContextInjectionRow_module_css_default.root,
|
|
896
|
-
icon: producer.role === "recall" ? (0, react_jsx_runtime.jsx)("span", {
|
|
927
|
+
icon: toolBlocks !== void 0 ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBrowseOutlineRegular, { size: 14 }) : producer.role === "recall" ? (0, react_jsx_runtime.jsx)("span", {
|
|
897
928
|
"data-context-recall-icon": true,
|
|
898
929
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.ReferenceIconRegular, { kind: "session" })
|
|
899
930
|
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconContextInjectionOutlineRegular, { size: 14 }),
|
|
900
931
|
chevronClassName: ContextInjectionRow_module_css_default.chevron,
|
|
901
|
-
title: t(producer.role === "recall" ? "message.contextRecall" : "message.contextInjection"),
|
|
902
|
-
collapsedContent:
|
|
932
|
+
title: single !== void 0 ? t(single.type === "tool-addition" ? "message.toolAdded" : "message.toolRemoved", { name: single.toolName }) : t(toolBlocks !== void 0 ? "message.toolsUpdated" : producer.role === "recall" ? "message.contextRecall" : "message.contextInjection"),
|
|
933
|
+
collapsedContent: toolSummary !== null ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
934
|
+
className: ContextInjectionRow_module_css_default.sep,
|
|
935
|
+
"aria-hidden": true
|
|
936
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
937
|
+
className: ContextInjectionRow_module_css_default.summary,
|
|
938
|
+
children: toolSummary
|
|
939
|
+
})] }) : toolBlocks !== void 0 || producer.label === null ? void 0 : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
903
940
|
(0, react_jsx_runtime.jsx)("span", {
|
|
904
941
|
className: ContextInjectionRow_module_css_default.sep,
|
|
905
942
|
"aria-hidden": true
|
|
@@ -919,8 +956,8 @@ window.__ModuleLoader__.load({
|
|
|
919
956
|
})] })
|
|
920
957
|
] }),
|
|
921
958
|
keepContentWhenOpen: true,
|
|
922
|
-
open,
|
|
923
|
-
expandable:
|
|
959
|
+
open: open && single === void 0,
|
|
960
|
+
expandable: single === void 0,
|
|
924
961
|
expandOnRowClick: true,
|
|
925
962
|
onToggle: () => {
|
|
926
963
|
setOpen((value) => !value);
|
|
@@ -929,7 +966,10 @@ window.__ModuleLoader__.load({
|
|
|
929
966
|
className: ContextInjectionRow_module_css_default.body,
|
|
930
967
|
"data-context-injection-body": true,
|
|
931
968
|
"data-context-form": rendered ?? void 0,
|
|
932
|
-
children: body
|
|
969
|
+
children: toolBlocks === void 0 ? body : (0, react_jsx_runtime.jsxs)("div", {
|
|
970
|
+
className: ContextInjectionRow_module_css_default.toolChanges,
|
|
971
|
+
children: [added.length > 0 && (0, react_jsx_runtime.jsx)("div", { children: t("message.toolsAdded", { names: added.join(", ") }) }), removed.length > 0 && (0, react_jsx_runtime.jsx)("div", { children: t("message.toolsRemoved", { names: removed.join(", ") }) })]
|
|
972
|
+
})
|
|
933
973
|
})
|
|
934
974
|
});
|
|
935
975
|
}
|
|
@@ -1060,7 +1100,7 @@ window.__ModuleLoader__.load({
|
|
|
1060
1100
|
}
|
|
1061
1101
|
//#endregion
|
|
1062
1102
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css.mjs
|
|
1063
|
-
const css$14 = ".xzv4MW_actions{height:calc(28px + var(--dsh-content-font-delta,0px));align-items:center;gap:8px;display:flex}.xzv4MW_timeStart{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);white-space:nowrap;padding-right:12px}.xzv4MW_timeEnd{font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:inherit;white-space:nowrap}.xzv4MW_endInfo{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin-left:8px;display:inline-flex}@media (hover:hover){[data-actions-reveal=hover] .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])) .xzv4MW_actions{opacity:0;transition:opacity 80ms}[data-actions-reveal=hover]:hover .xzv4MW_actions,[data-actions-reveal=hover]:focus-within .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):hover .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):focus-within .xzv4MW_actions{opacity:1}}.xzv4MW_action{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;
|
|
1103
|
+
const css$14 = ".xzv4MW_actions{height:calc(28px + var(--dsh-content-font-delta,0px));align-items:center;gap:8px;display:flex}.xzv4MW_timeStart{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);white-space:nowrap;padding-right:12px}.xzv4MW_timeEnd{font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:inherit;white-space:nowrap}.xzv4MW_endInfo{min-width:0;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin-left:8px;display:inline-flex}@media (hover:hover){[data-actions-reveal=hover] .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])) .xzv4MW_actions{opacity:0;transition:opacity 80ms}[data-actions-reveal=hover]:hover .xzv4MW_actions,[data-actions-reveal=hover]:focus-within .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):hover .xzv4MW_actions,:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering]):has(~:is([data-chat-flow-kind=user],[data-chat-flow-kind=steering])):focus-within .xzv4MW_actions{opacity:1}}.xzv4MW_action{width:calc(28px + var(--dsh-content-font-delta,0px));height:calc(28px + var(--dsh-content-font-delta,0px));border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:6px;display:inline-flex}.xzv4MW_action svg{width:calc(15px + var(--dsh-content-font-delta,0px));height:calc(15px + var(--dsh-content-font-delta,0px))}.xzv4MW_actions[data-clock=end] .xzv4MW_action svg{width:calc(17px + var(--dsh-content-font-delta,0px));height:calc(17px + var(--dsh-content-font-delta,0px))}.xzv4MW_action:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.xzv4MW_action[data-unavailable]{cursor:default;opacity:.4}.xzv4MW_action[data-unavailable]:hover{color:var(--dsw-alias-label-tertiary);background:0 0}.xzv4MW_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
|
|
1064
1104
|
const tagId$14 = "@deepseek-ai/dsh-client-ui-chat/MessageIconActions.module.css";
|
|
1065
1105
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$14) + "]") === null) {
|
|
1066
1106
|
const tag = document.createElement("style");
|
|
@@ -1187,6 +1227,9 @@ window.__ModuleLoader__.load({
|
|
|
1187
1227
|
return Math.max(1, Math.ceil(milliseconds / 1e3));
|
|
1188
1228
|
}
|
|
1189
1229
|
function failureMessage(message, code, t) {
|
|
1230
|
+
if (code === "ACCOUNT_SIGNED_OUT") return t("message.failure.accountSignedOut");
|
|
1231
|
+
if (code === "ACCOUNT_SIGN_IN_REQUIRED") return t("message.failure.accountSignInRequired");
|
|
1232
|
+
if (code === "QUOTA" || code === "ACCOUNT_QUOTA") return t("message.failure.quota");
|
|
1190
1233
|
return code === "AUTH" ? t("message.failure.auth") : message;
|
|
1191
1234
|
}
|
|
1192
1235
|
function ModelRetryItem({ node, active, t }) {
|
|
@@ -1259,7 +1302,7 @@ window.__ModuleLoader__.load({
|
|
|
1259
1302
|
className: MessageItem_module_css_default.turnErrorCopy,
|
|
1260
1303
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
1261
1304
|
className: MessageItem_module_css_default.turnErrorTitle,
|
|
1262
|
-
children: t("message.turnError")
|
|
1305
|
+
children: node.code === "ACCOUNT_SIGNED_OUT" ? t("message.accountStopped") : t("message.turnError")
|
|
1263
1306
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
1264
1307
|
className: MessageItem_module_css_default.turnErrorMessage,
|
|
1265
1308
|
children: failureMessage(node.message, node.code, t)
|
|
@@ -1584,7 +1627,7 @@ window.__ModuleLoader__.load({
|
|
|
1584
1627
|
}
|
|
1585
1628
|
//#endregion
|
|
1586
1629
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/ChatView.module.css.mjs
|
|
1587
|
-
const css$13 = ".EvIC1a_frame{flex-direction:column;flex:auto;min-height:0;display:flex;position:relative;container-type:inline-size}.EvIC1a_root{flex-direction:column;flex:auto;min-height:0;display:flex;position:relative;overflow:visible clip}.EvIC1a_scroll{min-height:0;padding:16px calc(var(--dsh-composer-side-clearance) + 16px);flex:auto;overflow-y:auto;container-type:inline-size}.EvIC1a_root[data-chat-following-tail] .EvIC1a_scroll,[data-conversation-scroll]:has(.EvIC1a_root[data-chat-following-tail]){overflow-anchor:none}[data-conversation-scroll] .EvIC1a_frame,[data-conversation-scroll] .EvIC1a_root{flex:none;height:auto;min-height:auto}[data-conversation-scroll] .EvIC1a_scroll{flex:none;min-height:auto;overflow:visible}.EvIC1a_column{max-width:var(--dsh-chat-content-width);flex-direction:column;width:100%;margin:0 auto;display:flex}.EvIC1a_column>:not([hidden]):not(.EvIC1a_flowItem:empty)~:not([hidden]):not(.EvIC1a_flowItem:empty){margin-top:var(--dsh-chat-flow-gap,16px)}.EvIC1a_flowItem{min-width:0}.EvIC1a_flowItem[data-turn-process-answer]{--dsh-chat-flow-gap:8px}.EvIC1a_flowItem:empty{height:0}.EvIC1a_callRow{border-radius:
|
|
1630
|
+
const css$13 = ".EvIC1a_frame{flex-direction:column;flex:auto;min-height:0;display:flex;position:relative;container-type:inline-size}.EvIC1a_root{flex-direction:column;flex:auto;min-height:0;display:flex;position:relative;overflow:visible clip}.EvIC1a_scroll{min-height:0;padding:16px calc(var(--dsh-composer-side-clearance) + 16px);flex:auto;overflow-y:auto;container-type:inline-size}.EvIC1a_root[data-chat-following-tail] .EvIC1a_scroll,[data-conversation-scroll]:has(.EvIC1a_root[data-chat-following-tail]){overflow-anchor:none}[data-conversation-scroll] .EvIC1a_frame,[data-conversation-scroll] .EvIC1a_root{flex:none;height:auto;min-height:auto}[data-conversation-scroll] .EvIC1a_scroll{flex:none;min-height:auto;overflow:visible}.EvIC1a_column{max-width:var(--dsh-chat-content-width);flex-direction:column;width:100%;margin:0 auto;display:flex}.EvIC1a_column>:not([hidden]):not(.EvIC1a_flowItem:empty)~:not([hidden]):not(.EvIC1a_flowItem:empty){margin-top:var(--dsh-chat-flow-gap,16px)}.EvIC1a_flowItem{min-width:0}.EvIC1a_flowItem[data-turn-process-answer]{--dsh-chat-flow-gap:8px}.EvIC1a_flowItem:empty{height:0}.EvIC1a_callRow{border-radius:var(--dsw-radius-sm)}.EvIC1a_hint{color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(18px + var(--dsh-content-font-delta-secondary,0px))}.EvIC1a_openError{color:var(--dsw-alias-state-error-primary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(18px + var(--dsh-content-font-delta-secondary,0px))}.EvIC1a_older{justify-content:center;display:flex}.EvIC1a_older button{border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover-solid);cursor:pointer;border:none;padding:4px 12px;font-size:12px}.EvIC1a_older button:disabled{cursor:default;opacity:.6}.EvIC1a_toBottomSlot{z-index:8;height:0;padding-right:max(calc(var(--dsh-composer-side-clearance) + 16px), calc((100% - var(--dsh-chat-content-width)) / 2));pointer-events:none;justify-content:flex-end;display:flex;position:absolute;bottom:16px;left:0;right:0}[data-conversation-scroll] .EvIC1a_toBottomSlot{bottom:calc(var(--dsh-composer-height,152px) + 16px);position:sticky}.EvIC1a_toBottom{--dsw-elevation-stroke-color:var(--dsw-alias-border-l3);corner-shape:round;width:34px;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-button-floating-fill);box-shadow:var(--dsw-elevation-panel);cursor:pointer;pointer-events:auto;border:0;border-radius:100px;justify-content:center;align-items:center;margin-top:-34px;padding:0;display:flex}.EvIC1a_toBottom:hover{background:var(--dsw-alias-button-floating-hover)}.EvIC1a_modalAction{min-width:72px}";
|
|
1588
1631
|
const tagId$13 = "@deepseek-ai/dsh-client-ui-chat/ChatView.module.css";
|
|
1589
1632
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]") === null) {
|
|
1590
1633
|
const tag = document.createElement("style");
|
|
@@ -1661,7 +1704,7 @@ window.__ModuleLoader__.load({
|
|
|
1661
1704
|
processPresentation?.hasExternalProcess,
|
|
1662
1705
|
setOpen
|
|
1663
1706
|
]);
|
|
1664
|
-
const controllerInactive = routedNode?.kind === "turn-process" && !foldable;
|
|
1707
|
+
const controllerInactive = routedNode?.kind === "turn-process" && foldCompleted && !foldable;
|
|
1665
1708
|
const compactAnswer = processAnswer && foldable && processPresentation.compactAnswer && !processOpen;
|
|
1666
1709
|
const processHidden = controllerInactive || foldable && processMember && !processOpen;
|
|
1667
1710
|
const wrapperRef = useSearchableHidden(processHidden, (0, react.useCallback)(() => {
|
|
@@ -2143,8 +2186,10 @@ window.__ModuleLoader__.load({
|
|
|
2143
2186
|
const PROCESS_ICONS = {
|
|
2144
2187
|
thinking: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconThinkOutlineRegular, {}),
|
|
2145
2188
|
read: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBrowseOutlineRegular, { size: 14 }),
|
|
2189
|
+
readImage: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBrowseOutlineRegular, { size: 14 }),
|
|
2146
2190
|
search: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 14 }),
|
|
2147
2191
|
edit: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 14 }),
|
|
2192
|
+
write: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEditOutlineRegular, { size: 14 }),
|
|
2148
2193
|
commands: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconApiOutlineRegular, {}),
|
|
2149
2194
|
code: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCodeOutlineRegular, { size: 14 }),
|
|
2150
2195
|
webSearch: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGlobeOutlineRegular, {}),
|
|
@@ -2155,7 +2200,7 @@ window.__ModuleLoader__.load({
|
|
|
2155
2200
|
tools: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSparkleRegular, { size: 14 })
|
|
2156
2201
|
};
|
|
2157
2202
|
function sameLiveProcessTitle(left, right) {
|
|
2158
|
-
return left.activity === right.activity && left.detail === right.detail;
|
|
2203
|
+
return left.activity === right.activity && left.detail === right.detail && left.preparing === right.preparing;
|
|
2159
2204
|
}
|
|
2160
2205
|
function useStableLiveProcessTitle(desired, active) {
|
|
2161
2206
|
const [displayed, setDisplayed] = (0, react.useState)(desired);
|
|
@@ -2183,7 +2228,8 @@ window.__ModuleLoader__.load({
|
|
|
2183
2228
|
}, [
|
|
2184
2229
|
active,
|
|
2185
2230
|
desired.activity,
|
|
2186
|
-
desired.detail
|
|
2231
|
+
desired.detail,
|
|
2232
|
+
desired.preparing
|
|
2187
2233
|
]);
|
|
2188
2234
|
return active ? displayed : desired;
|
|
2189
2235
|
}
|
|
@@ -2200,10 +2246,11 @@ window.__ModuleLoader__.load({
|
|
|
2200
2246
|
const detailed = usePresentation((policy) => data?.closed === false && policy.liveProcessDetail);
|
|
2201
2247
|
const live = useStableLiveProcessTitle({
|
|
2202
2248
|
activity: data?.summary.running ?? "thinking",
|
|
2203
|
-
detail: data?.summary.runningDetail ?? ""
|
|
2249
|
+
detail: data?.summary.runningDetail ?? "",
|
|
2250
|
+
preparing: data?.summary.preparing === true
|
|
2204
2251
|
}, data !== void 0 && !data.closed);
|
|
2205
2252
|
if (data === void 0) return null;
|
|
2206
|
-
const label = data.closed ? processTitle(data.summary, t) : t(`message.stepProcess.${live.activity}`);
|
|
2253
|
+
const label = data.closed ? processTitle(data.summary, t) : live.preparing ? t(`message.stepProcess.prepare.${live.activity === "thinking" ? "tools" : live.activity}`) : t(`message.stepProcess.${live.activity}`);
|
|
2207
2254
|
const detail = detailed && !data.closed ? live.detail : "";
|
|
2208
2255
|
const title = detail === "" ? label : `${label}${t("message.turnProcess.separator")}${detail}`;
|
|
2209
2256
|
const activity = data.closed ? data.summary.counts[0]?.kind ?? "thinking" : live.activity;
|
|
@@ -2249,7 +2296,7 @@ window.__ModuleLoader__.load({
|
|
|
2249
2296
|
const location = node?.location;
|
|
2250
2297
|
return location?.kind === "turn" || location?.kind === "step" ? location.turn : void 0;
|
|
2251
2298
|
});
|
|
2252
|
-
const grouped = props.usePresentation((policy) =>
|
|
2299
|
+
const grouped = props.usePresentation((policy) => policy.stepGrouping === "collapsed" || policy.stepGrouping === "history" && turnLocation?.status !== "open");
|
|
2253
2300
|
const reason = turnLocation?.end?.data.reason.kind;
|
|
2254
2301
|
const alwaysOpen = presentation?.turnClosed === false || presentation?.hasInterleavedInput === true || reason === "aborted" || reason === "error";
|
|
2255
2302
|
const spec = presentation?.spec;
|
|
@@ -3514,7 +3561,7 @@ window.__ModuleLoader__.load({
|
|
|
3514
3561
|
}
|
|
3515
3562
|
//#endregion
|
|
3516
3563
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/TurnNavigator.module.css.mjs
|
|
3517
|
-
const css$11 = ".eGxaPq_slot{z-index:7;height:0;padding-inline:calc(var(--dsh-composer-side-clearance) + 16px);pointer-events:none;position:absolute;top:0;left:0;right:0;container-type:inline-size}[data-conversation-scroll] .eGxaPq_slot{position:sticky}.eGxaPq_frame{--turn-rail-band:calc(var(--dsh-conversation-viewport-height,100dvh) - var(--dsh-composer-height,152px));--turn-preview-height:100px;top:calc(var(--turn-rail-band) / 2);width:28px;max-height:min(max(0px, calc(var(--turn-rail-band) - 64px)), 420px);contain:layout;cursor:pointer;pointer-events:auto;position:absolute;right:12px;transform:translateY(-50%)}.eGxaPq_scroller{max-height:inherit;overscroll-behavior:contain;scrollbar-width:none;position:relative;overflow-y:auto}.eGxaPq_scroller::-webkit-scrollbar{display:none}.eGxaPq_fadeTop{mask-image:linear-gradient(#0000 0,#000 24px 100%)}.eGxaPq_fadeBottom{mask-image:linear-gradient(#000 0 calc(100% - 24px),#0000 100%)}.eGxaPq_fadeTop.eGxaPq_fadeBottom{mask-image:linear-gradient(#0000 0,#000 24px calc(100% - 24px),#0000 100%)}.eGxaPq_marks{position:relative}.eGxaPq_mark{cursor:pointer;background:0 0;border:0;border-radius:8px;height:10px;padding:0;position:absolute;top:0;left:0;right:0}.eGxaPq_mark:before{background:var(--dsw-alias-border-l4);content:\"\";transform-origin:100%;border-radius:2px;width:20px;height:2px;transition:transform .14s,background-color .14s;position:absolute;top:50%;right:0;transform:translateY(-50%)scaleX(.6)}.eGxaPq_markUnloaded:before{opacity:.6;transform:translateY(-50%)scaleX(.4)}.eGxaPq_markPreview:before{background:var(--dsw-alias-label-tertiary);transform:translateY(-50%)scaleX(.9)}.eGxaPq_markBusy:before{animation:1s ease-in-out infinite eGxaPq_dsh-turn-mark-busy}.eGxaPq_markActive:before{background:var(--dsw-alias-label-primary);transform:translateY(-50%)scaleX(1)}.eGxaPq_mark:focus-visible:before{background:var(--dsw-alias-state-business-primary);transform:translateY(-50%)scaleX(1)}.eGxaPq_mark:focus-visible{outline:none}.eGxaPq_mark:focus-visible:after{border-radius:inherit;outline:1px solid var(--dsw-alias-state-business-primary);outline-offset
|
|
3564
|
+
const css$11 = ".eGxaPq_slot{z-index:7;height:0;padding-inline:calc(var(--dsh-composer-side-clearance) + 16px);pointer-events:none;position:absolute;top:0;left:0;right:0;container-type:inline-size}[data-conversation-scroll] .eGxaPq_slot{position:sticky}.eGxaPq_frame{--turn-rail-band:calc(var(--dsh-conversation-viewport-height,100dvh) - var(--dsh-composer-height,152px));--turn-preview-height:100px;top:calc(var(--turn-rail-band) / 2);width:28px;max-height:min(max(0px, calc(var(--turn-rail-band) - 64px)), 420px);contain:layout;cursor:pointer;pointer-events:auto;position:absolute;right:12px;transform:translateY(-50%)}.eGxaPq_scroller{max-height:inherit;overscroll-behavior:contain;scrollbar-width:none;position:relative;overflow-y:auto}.eGxaPq_scroller::-webkit-scrollbar{display:none}.eGxaPq_fadeTop{mask-image:linear-gradient(#0000 0,#000 24px 100%)}.eGxaPq_fadeBottom{mask-image:linear-gradient(#000 0 calc(100% - 24px),#0000 100%)}.eGxaPq_fadeTop.eGxaPq_fadeBottom{mask-image:linear-gradient(#0000 0,#000 24px calc(100% - 24px),#0000 100%)}.eGxaPq_marks{position:relative}.eGxaPq_mark{cursor:pointer;background:0 0;border:0;border-radius:8px;height:10px;padding:0;position:absolute;top:0;left:0;right:0}.eGxaPq_mark:before{background:var(--dsw-alias-border-l4);content:\"\";transform-origin:100%;border-radius:2px;width:20px;height:2px;transition:transform .14s,background-color .14s;position:absolute;top:50%;right:0;transform:translateY(-50%)scaleX(.6)}.eGxaPq_markUnloaded:before{opacity:.6;transform:translateY(-50%)scaleX(.4)}.eGxaPq_markPreview:before{background:var(--dsw-alias-label-tertiary);transform:translateY(-50%)scaleX(.9)}.eGxaPq_markBusy:before{animation:1s ease-in-out infinite eGxaPq_dsh-turn-mark-busy}.eGxaPq_markActive:before{background:var(--dsw-alias-label-primary);transform:translateY(-50%)scaleX(1)}.eGxaPq_mark:focus-visible:before{background:var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));transform:translateY(-50%)scaleX(1)}.eGxaPq_mark:focus-visible{outline:none}.eGxaPq_mark:focus-visible:after{border-radius:inherit;outline:1px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-1px;content:\"\";width:20px;position:absolute;inset:0 0 0 auto}.eGxaPq_preview{top:clamp(0px, calc(var(--turn-preview-center) - var(--turn-preview-height) / 2), calc(100% - var(--turn-preview-height)));box-sizing:border-box;width:min(300px,100cqw - 120px);max-height:var(--turn-preview-height);border-radius:var(--dsw-radius-lg);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);box-shadow:var(--dsw-elevation-panel);pointer-events:none;border:0;padding:10px 12px;transition:top .14s cubic-bezier(.2,.8,.2,1);animation:.12s ease-out eGxaPq_dsh-turn-preview-enter;position:absolute;right:calc(100% + 10px);overflow:hidden}.eGxaPq_previewPrompt,.eGxaPq_previewResponse{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.eGxaPq_previewPrompt{font:var(--dsw-font-xs-strong-13);-webkit-line-clamp:1}.eGxaPq_previewResponse{color:var(--dsw-alias-label-caption);font:var(--dsw-font-xxs-12);-webkit-line-clamp:3;margin-top:4px}@keyframes eGxaPq_dsh-turn-preview-enter{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes eGxaPq_dsh-turn-mark-busy{0%,to{opacity:1}50%{opacity:.35}}@container (width<=900px){.eGxaPq_frame{display:none}}@media (prefers-reduced-motion:reduce){.eGxaPq_frame,.eGxaPq_scroller,.eGxaPq_mark:before,.eGxaPq_markBusy:before,.eGxaPq_preview{scroll-behavior:auto;transition:none;animation:none}}";
|
|
3518
3565
|
const tagId$11 = "@deepseek-ai/dsh-client-ui-chat/TurnNavigator.module.css";
|
|
3519
3566
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$11) + "]") === null) {
|
|
3520
3567
|
const tag = document.createElement("style");
|
|
@@ -5006,6 +5053,16 @@ window.__ModuleLoader__.load({
|
|
|
5006
5053
|
const railItems = (0, react.useMemo)(() => mergeTurnRailItems(turnNavigationItems, turnOutline), [turnNavigationItems, turnOutline]);
|
|
5007
5054
|
const inbox = useProjection("inbox");
|
|
5008
5055
|
const cwd = useSessions((s) => s.byId[sessionId]?.cwd);
|
|
5056
|
+
const fileImages = (0, react.useMemo)(() => ({
|
|
5057
|
+
resolve: (path) => fileMediaUrl(document.baseURI, resolveWorkspacePath(cwd, path)),
|
|
5058
|
+
labels: {
|
|
5059
|
+
open: t("image.open"),
|
|
5060
|
+
loading: t("image.loading"),
|
|
5061
|
+
failed: t("image.failed"),
|
|
5062
|
+
dialog: t("image.dialog"),
|
|
5063
|
+
close: t("image.close")
|
|
5064
|
+
}
|
|
5065
|
+
}), [cwd, t]);
|
|
5009
5066
|
const running = useSession((s) => s.running);
|
|
5010
5067
|
const openState = useSession((s) => s.openState);
|
|
5011
5068
|
const openError = useSession((s) => s.openError);
|
|
@@ -5131,6 +5188,7 @@ window.__ModuleLoader__.load({
|
|
|
5131
5188
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownDelegateProvider, {
|
|
5132
5189
|
openExternalLink,
|
|
5133
5190
|
openFile: requestOpenFile,
|
|
5191
|
+
fileImages,
|
|
5134
5192
|
children: (0, react_jsx_runtime.jsx)(ChatNodeList, {
|
|
5135
5193
|
entries,
|
|
5136
5194
|
pendingInputs,
|
|
@@ -5211,25 +5269,42 @@ window.__ModuleLoader__.load({
|
|
|
5211
5269
|
const zh = {
|
|
5212
5270
|
"message.stepProcess.thinking": "正在分析请求",
|
|
5213
5271
|
"message.stepProcess.read": "正在读取文件",
|
|
5272
|
+
"message.stepProcess.readImage": "正在读取图片",
|
|
5273
|
+
"message.stepProcess.write": "正在写入文件",
|
|
5214
5274
|
"message.stepProcess.search": "正在搜索代码",
|
|
5215
5275
|
"message.stepProcess.edit": "正在编辑文件",
|
|
5216
5276
|
"message.stepProcess.commands": "正在运行命令",
|
|
5217
5277
|
"message.stepProcess.code": "正在运行代码",
|
|
5218
5278
|
"message.stepProcess.webSearch": "正在搜索网页",
|
|
5219
5279
|
"message.stepProcess.webFetch": "正在访问网页",
|
|
5220
|
-
"message.stepProcess.subagents": "
|
|
5280
|
+
"message.stepProcess.subagents": "正在协调子智能体",
|
|
5221
5281
|
"message.stepProcess.plan": "正在更新计划",
|
|
5222
5282
|
"message.stepProcess.questions": "等待你的操作",
|
|
5223
5283
|
"message.stepProcess.tools": "正在调用工具",
|
|
5284
|
+
"message.stepProcess.prepare.read": "准备读取文件",
|
|
5285
|
+
"message.stepProcess.prepare.readImage": "准备读取图片",
|
|
5286
|
+
"message.stepProcess.prepare.write": "准备写入文件",
|
|
5287
|
+
"message.stepProcess.prepare.search": "准备搜索代码",
|
|
5288
|
+
"message.stepProcess.prepare.edit": "准备编辑文件",
|
|
5289
|
+
"message.stepProcess.prepare.commands": "准备运行命令",
|
|
5290
|
+
"message.stepProcess.prepare.code": "准备运行代码",
|
|
5291
|
+
"message.stepProcess.prepare.webSearch": "准备搜索网页",
|
|
5292
|
+
"message.stepProcess.prepare.webFetch": "准备访问网页",
|
|
5293
|
+
"message.stepProcess.prepare.subagents": "准备协调子智能体",
|
|
5294
|
+
"message.stepProcess.prepare.plan": "准备更新计划",
|
|
5295
|
+
"message.stepProcess.prepare.questions": "准备提问",
|
|
5296
|
+
"message.stepProcess.prepare.tools": "准备调用工具",
|
|
5224
5297
|
"message.stepProcess.done.thinking": "已完成分析",
|
|
5225
5298
|
"message.stepProcess.done.read": "已读取文件",
|
|
5299
|
+
"message.stepProcess.done.readImage": "已读取图片",
|
|
5300
|
+
"message.stepProcess.done.write": "已写入文件",
|
|
5226
5301
|
"message.stepProcess.done.search": "已搜索代码",
|
|
5227
5302
|
"message.stepProcess.done.edit": "修改了文件",
|
|
5228
5303
|
"message.stepProcess.done.commands": "执行了命令",
|
|
5229
5304
|
"message.stepProcess.done.code": "运行了代码",
|
|
5230
5305
|
"message.stepProcess.done.webSearch": "已搜索网页",
|
|
5231
5306
|
"message.stepProcess.done.webFetch": "已访问网页",
|
|
5232
|
-
"message.stepProcess.done.subagents": "
|
|
5307
|
+
"message.stepProcess.done.subagents": "已协调子智能体",
|
|
5233
5308
|
"message.stepProcess.done.plan": "更新了计划",
|
|
5234
5309
|
"message.stepProcess.done.questions": "向用户提出了问题",
|
|
5235
5310
|
"message.stepProcess.done.tools": "已调用工具",
|
|
@@ -5253,6 +5328,11 @@ window.__ModuleLoader__.load({
|
|
|
5253
5328
|
"message.turnProcess.took": "用时 {duration}",
|
|
5254
5329
|
"message.turnProcess.failed": "处理失败",
|
|
5255
5330
|
"view.chat": "对话",
|
|
5331
|
+
"image.open": "查看大图",
|
|
5332
|
+
"image.loading": "加载图片…",
|
|
5333
|
+
"image.failed": "图片无法预览",
|
|
5334
|
+
"image.dialog": "图片预览",
|
|
5335
|
+
"image.close": "关闭图片预览",
|
|
5256
5336
|
"number.groupSeparator": ",",
|
|
5257
5337
|
"duration.compactSeconds": "{seconds}秒",
|
|
5258
5338
|
"duration.compactMinutes": "{minutes}分{seconds}秒",
|
|
@@ -5282,16 +5362,25 @@ window.__ModuleLoader__.load({
|
|
|
5282
5362
|
"settings.links.description": "对话中网页链接的打开位置",
|
|
5283
5363
|
"settings.links.sidebar": "应用内侧边栏",
|
|
5284
5364
|
"settings.links.newTab": "默认浏览器",
|
|
5285
|
-
"settings.transcript.title": "
|
|
5286
|
-
"settings.transcript.description": "
|
|
5365
|
+
"settings.transcript.title": "工作步骤展示",
|
|
5366
|
+
"settings.transcript.description": "选择希望看到多少工具调用细节",
|
|
5287
5367
|
"settings.transcript.compact": "简洁",
|
|
5368
|
+
"settings.transcript.standard": "标准",
|
|
5288
5369
|
"settings.transcript.detailed": "详细",
|
|
5289
|
-
"settings.transcript.
|
|
5370
|
+
"settings.transcript.verbose": "完全展开",
|
|
5290
5371
|
"fileOpen.title": "无法打开文件",
|
|
5291
5372
|
"fileOpen.unknown": "无法打开此文件",
|
|
5292
5373
|
"message.extraBlock": "附加内容块",
|
|
5293
5374
|
"message.systemPrompt": "系统提示词",
|
|
5294
5375
|
"message.systemPromptUpdate": "系统提示词更新",
|
|
5376
|
+
"message.toolAdded": "已添加工具:{name}",
|
|
5377
|
+
"message.toolRemoved": "已移除工具:{name}",
|
|
5378
|
+
"message.toolsAdded": "新增:{names}",
|
|
5379
|
+
"message.toolsAddedCount": "新增 {count} 个",
|
|
5380
|
+
"message.toolsChanged": "新增 {added} 个,移除 {removed} 个",
|
|
5381
|
+
"message.toolsRemoved": "移除:{names}",
|
|
5382
|
+
"message.toolsRemovedCount": "移除 {count} 个",
|
|
5383
|
+
"message.toolsUpdated": "工具已更新",
|
|
5295
5384
|
"message.contextInjection": "上下文注入",
|
|
5296
5385
|
"message.contextRecall": "跨会话召回",
|
|
5297
5386
|
"message.referenceSummary": "引用会话 · {labels}",
|
|
@@ -5334,6 +5423,10 @@ window.__ModuleLoader__.load({
|
|
|
5334
5423
|
"message.retry.delay": "重试延迟:",
|
|
5335
5424
|
"message.retry.failure": "失败原因:",
|
|
5336
5425
|
"message.failure.auth": "API 密钥无效",
|
|
5426
|
+
"message.accountStopped": "任务已停止",
|
|
5427
|
+
"message.failure.accountSignedOut": "任务已因退出 DeepSeek 登录而停止。",
|
|
5428
|
+
"message.failure.accountSignInRequired": "请先登录 DeepSeek,并确认请求地址支持账号认证。",
|
|
5429
|
+
"message.failure.quota": "当前请求的额度已用尽",
|
|
5337
5430
|
"message.turnError": "本轮运行失败",
|
|
5338
5431
|
"message.maxTokens": "已达到输出 token 上限",
|
|
5339
5432
|
"message.maxTokens.hint": "回答被截断,已有输出保留在对话中。发送“继续”可让模型接着输出。",
|
|
@@ -5365,6 +5458,8 @@ window.__ModuleLoader__.load({
|
|
|
5365
5458
|
const en = {
|
|
5366
5459
|
"message.stepProcess.thinking": "Analyzing the request",
|
|
5367
5460
|
"message.stepProcess.read": "Reading files",
|
|
5461
|
+
"message.stepProcess.readImage": "Reading images",
|
|
5462
|
+
"message.stepProcess.write": "Writing files",
|
|
5368
5463
|
"message.stepProcess.search": "Searching code",
|
|
5369
5464
|
"message.stepProcess.edit": "Editing files",
|
|
5370
5465
|
"message.stepProcess.commands": "Running commands",
|
|
@@ -5375,8 +5470,23 @@ window.__ModuleLoader__.load({
|
|
|
5375
5470
|
"message.stepProcess.plan": "Updating the plan",
|
|
5376
5471
|
"message.stepProcess.questions": "Waiting for your action",
|
|
5377
5472
|
"message.stepProcess.tools": "Calling tools",
|
|
5473
|
+
"message.stepProcess.prepare.read": "Preparing to read files",
|
|
5474
|
+
"message.stepProcess.prepare.readImage": "Preparing to read images",
|
|
5475
|
+
"message.stepProcess.prepare.write": "Preparing to write files",
|
|
5476
|
+
"message.stepProcess.prepare.search": "Preparing to search code",
|
|
5477
|
+
"message.stepProcess.prepare.edit": "Preparing to edit files",
|
|
5478
|
+
"message.stepProcess.prepare.commands": "Preparing to run commands",
|
|
5479
|
+
"message.stepProcess.prepare.code": "Preparing to run code",
|
|
5480
|
+
"message.stepProcess.prepare.webSearch": "Preparing to search the web",
|
|
5481
|
+
"message.stepProcess.prepare.webFetch": "Preparing to visit web pages",
|
|
5482
|
+
"message.stepProcess.prepare.subagents": "Preparing to coordinate subagents",
|
|
5483
|
+
"message.stepProcess.prepare.plan": "Preparing to update the plan",
|
|
5484
|
+
"message.stepProcess.prepare.questions": "Preparing questions",
|
|
5485
|
+
"message.stepProcess.prepare.tools": "Preparing tool calls",
|
|
5378
5486
|
"message.stepProcess.done.thinking": "Analysis completed",
|
|
5379
5487
|
"message.stepProcess.done.read": "Read files",
|
|
5488
|
+
"message.stepProcess.done.readImage": "Read images",
|
|
5489
|
+
"message.stepProcess.done.write": "Wrote files",
|
|
5380
5490
|
"message.stepProcess.done.search": "Searched code",
|
|
5381
5491
|
"message.stepProcess.done.edit": "Edited files",
|
|
5382
5492
|
"message.stepProcess.done.commands": "Ran commands",
|
|
@@ -5407,6 +5517,11 @@ window.__ModuleLoader__.load({
|
|
|
5407
5517
|
"message.turnProcess.took": "Took {duration}",
|
|
5408
5518
|
"message.turnProcess.failed": "Failed",
|
|
5409
5519
|
"view.chat": "Chat",
|
|
5520
|
+
"image.open": "View full image",
|
|
5521
|
+
"image.loading": "Loading image…",
|
|
5522
|
+
"image.failed": "Image preview unavailable",
|
|
5523
|
+
"image.dialog": "Image preview",
|
|
5524
|
+
"image.close": "Close image preview",
|
|
5410
5525
|
"number.groupSeparator": ",",
|
|
5411
5526
|
"duration.compactSeconds": "{seconds}s",
|
|
5412
5527
|
"duration.compactMinutes": "{minutes}m{seconds}s",
|
|
@@ -5437,15 +5552,24 @@ window.__ModuleLoader__.load({
|
|
|
5437
5552
|
"settings.links.sidebar": "In-App Sidebar",
|
|
5438
5553
|
"settings.links.newTab": "Default Browser",
|
|
5439
5554
|
"settings.transcript.title": "Work details",
|
|
5440
|
-
"settings.transcript.description": "
|
|
5555
|
+
"settings.transcript.description": "Choose how much detail to show for tool calls",
|
|
5441
5556
|
"settings.transcript.compact": "Compact",
|
|
5557
|
+
"settings.transcript.standard": "Standard",
|
|
5442
5558
|
"settings.transcript.detailed": "Detailed",
|
|
5443
|
-
"settings.transcript.
|
|
5559
|
+
"settings.transcript.verbose": "Verbose",
|
|
5444
5560
|
"fileOpen.title": "Couldn’t open file",
|
|
5445
5561
|
"fileOpen.unknown": "Couldn’t open this file",
|
|
5446
5562
|
"message.extraBlock": "Extra content block",
|
|
5447
5563
|
"message.systemPrompt": "System prompt",
|
|
5448
5564
|
"message.systemPromptUpdate": "System prompt update",
|
|
5565
|
+
"message.toolAdded": "Tool added: {name}",
|
|
5566
|
+
"message.toolRemoved": "Tool removed: {name}",
|
|
5567
|
+
"message.toolsAdded": "Added: {names}",
|
|
5568
|
+
"message.toolsAddedCount": "{count} added",
|
|
5569
|
+
"message.toolsChanged": "{added} added, {removed} removed",
|
|
5570
|
+
"message.toolsRemoved": "Removed: {names}",
|
|
5571
|
+
"message.toolsRemovedCount": "{count} removed",
|
|
5572
|
+
"message.toolsUpdated": "Tools updated",
|
|
5449
5573
|
"message.contextInjection": "Context injection",
|
|
5450
5574
|
"message.contextRecall": "Session recall",
|
|
5451
5575
|
"message.referenceSummary": "Referenced session · {labels}",
|
|
@@ -5488,6 +5612,10 @@ window.__ModuleLoader__.load({
|
|
|
5488
5612
|
"message.retry.delay": "Retry delay: ",
|
|
5489
5613
|
"message.retry.failure": "Failure reason: ",
|
|
5490
5614
|
"message.failure.auth": "API key is invalid",
|
|
5615
|
+
"message.accountStopped": "Task stopped",
|
|
5616
|
+
"message.failure.accountSignedOut": "Stopped because you signed out of DeepSeek.",
|
|
5617
|
+
"message.failure.accountSignInRequired": "Sign in to DeepSeek and ensure the request destination supports account authentication.",
|
|
5618
|
+
"message.failure.quota": "Request quota exhausted.",
|
|
5491
5619
|
"message.turnError": "This turn failed",
|
|
5492
5620
|
"message.maxTokens": "Output token limit reached",
|
|
5493
5621
|
"message.maxTokens.hint": "The reply was cut off; earlier output is preserved in the conversation. Send \"continue\" to let the model resume.",
|
|
@@ -5645,7 +5773,7 @@ window.__ModuleLoader__.load({
|
|
|
5645
5773
|
});
|
|
5646
5774
|
//#endregion
|
|
5647
5775
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/AssistantMarkdown.module.css.mjs
|
|
5648
|
-
const css$8 = ".hWmORq_root{font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);flex-direction:column;display:flex}.hWmORq_body{flex-direction:column;gap:16px;display:flex}.hWmORq_body .md-table-wide{--dsh-table-spare:max(0px, calc((100cqw - var(--dsh-chat-content-width)) / 2));--dsh-table-lead:calc(var(--dsh-table-spare) + min(var(--dsh-chat-content-width), 100cqw) - 100%);box-sizing:border-box;width:calc(100% + var(--dsh-table-lead) + var(--dsh-table-spare));max-width:none;margin-left:calc(-1 * var(--dsh-table-lead));padding-left:var(--dsh-table-lead)}.hWmORq_body .md-table-wide>table{z-index:1;position:relative}.hWmORq_body>[data-turn-process-inline][hidden]{margin-bottom:-16px}.hWmORq_stopped{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary);
|
|
5776
|
+
const css$8 = ".hWmORq_root{font-size:var(--dsh-content-font-size,14px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);flex-direction:column;display:flex}.hWmORq_body{flex-direction:column;gap:16px;display:flex}.hWmORq_body .md-table-wide{--dsh-table-spare:max(0px, calc((100cqw - var(--dsh-chat-content-width)) / 2));--dsh-table-lead:calc(var(--dsh-table-spare) + min(var(--dsh-chat-content-width), 100cqw) - 100%);box-sizing:border-box;width:calc(100% + var(--dsh-table-lead) + var(--dsh-table-spare));max-width:none;margin-left:calc(-1 * var(--dsh-table-lead));padding-left:var(--dsh-table-lead)}.hWmORq_body .md-table-wide>table{z-index:1;position:relative}.hWmORq_body>[data-turn-process-inline][hidden]{margin-bottom:-16px}.hWmORq_stopped{border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary);align-self:flex-start;padding:0 6px;font-size:11px;line-height:18px}.hWmORq_actions{margin-top:16px;margin-left:-6px}";
|
|
5649
5777
|
const tagId$8 = "@deepseek-ai/dsh-client-ui-chat/AssistantMarkdown.module.css";
|
|
5650
5778
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]") === null) {
|
|
5651
5779
|
const tag = document.createElement("style");
|
|
@@ -5663,16 +5791,23 @@ window.__ModuleLoader__.load({
|
|
|
5663
5791
|
//#endregion
|
|
5664
5792
|
//#region lib/types/client/chat/AssistantMarkdown.js
|
|
5665
5793
|
/**
|
|
5666
|
-
*
|
|
5794
|
+
* Standalone fallback for image destinations (query/fragment suffixes are ignored).
|
|
5795
|
+
* Chat fileImages resolves decoded file references against cwd; pathImages also
|
|
5796
|
+
* serves this component outside that provider and accepts legacy image URL suffixes.
|
|
5797
|
+
* Resolve an authored absolute image path against the document's file API.
|
|
5667
5798
|
* @param base - canonical `document.baseURI` at render time.
|
|
5668
|
-
* @param value - authored
|
|
5669
|
-
* @returns an absolute
|
|
5799
|
+
* @param value - authored Markdown destination; URL escapes are decoded once.
|
|
5800
|
+
* @returns an absolute Web or Desktop file-API URL, or undefined for unsupported
|
|
5670
5801
|
* protocols and non-local paths.
|
|
5671
5802
|
*/
|
|
5672
5803
|
function localPathMediaUrl(base, value) {
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5804
|
+
let path;
|
|
5805
|
+
try {
|
|
5806
|
+
path = decodeURIComponent(value.split(/[?#]/u)[0] ?? "");
|
|
5807
|
+
} catch {
|
|
5808
|
+
return;
|
|
5809
|
+
}
|
|
5810
|
+
return fileMediaUrl(base, path);
|
|
5676
5811
|
}
|
|
5677
5812
|
/** Reasoning block as the Think variant summary row (figma 39:28304). */
|
|
5678
5813
|
const AssistantMarkdown = (0, react.memo)(function AssistantMarkdown({ blocks, streaming, interrupted, renderMessageImages, groupPart, useDisclosure, reasoningHidden = false, usePresentation, revealProcess, mentions, t }) {
|
|
@@ -5796,7 +5931,7 @@ window.__ModuleLoader__.load({
|
|
|
5796
5931
|
});
|
|
5797
5932
|
//#endregion
|
|
5798
5933
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/GenericCommandCard.module.css.mjs
|
|
5799
|
-
const css$7 = "._5OnbHa_root{flex-direction:column;display:flex}._5OnbHa_leading{flex-shrink:0}._5OnbHa_chevron{color:var(--dsw-alias-label-secondary)}._5OnbHa_title{font-weight:400;transition:color .1s}._5OnbHa_separator{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}._5OnbHa_summary{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:auto;transition:color .1s;overflow:hidden}._5OnbHa_row:hover ._5OnbHa_title,._5OnbHa_row:hover ._5OnbHa_summary:not([data-error]){color:var(--dsw-alias-label-primary)}._5OnbHa_summary[data-error],._5OnbHa_body[data-error]{color:var(--dsw-alias-state-error-primary)}._5OnbHa_body{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);max-height:260px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code-block-small);white-space:pre-wrap;
|
|
5934
|
+
const css$7 = "._5OnbHa_root{flex-direction:column;display:flex}._5OnbHa_leading{flex-shrink:0}._5OnbHa_chevron{color:var(--dsw-alias-label-secondary)}._5OnbHa_title{font-weight:400;transition:color .1s}._5OnbHa_separator{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}._5OnbHa_summary{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:auto;transition:color .1s;overflow:hidden}._5OnbHa_row:hover ._5OnbHa_title,._5OnbHa_row:hover ._5OnbHa_summary:not([data-error]){color:var(--dsw-alias-label-primary)}._5OnbHa_summary[data-error],._5OnbHa_body[data-error]{color:var(--dsw-alias-state-error-primary)}._5OnbHa_body{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);max-height:260px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code-block-small);white-space:pre-wrap;margin:4px 0 4px 4px;padding:12px 16px;overflow:auto}";
|
|
5800
5935
|
const tagId$7 = "@deepseek-ai/dsh-client-ui-chat/GenericCommandCard.module.css";
|
|
5801
5936
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]") === null) {
|
|
5802
5937
|
const tag = document.createElement("style");
|
|
@@ -6011,10 +6146,10 @@ window.__ModuleLoader__.load({
|
|
|
6011
6146
|
/** Turn-level process disclosure controller. */
|
|
6012
6147
|
const TurnProcessNodeView = (0, react.memo)(function TurnProcessNodeView({ node, turnProcess, t }) {
|
|
6013
6148
|
if (turnProcess === void 0) throw new Error("turn-process node requires Turn process owner state");
|
|
6014
|
-
const open = turnProcess.open;
|
|
6149
|
+
const open = !turnProcess.foldable || turnProcess.open;
|
|
6015
6150
|
const turn = node.location.kind === "turn" || node.location.kind === "step" ? node.location.turn : void 0;
|
|
6016
6151
|
const [now, setNow] = (0, react.useState)(Date.now);
|
|
6017
|
-
const ticking =
|
|
6152
|
+
const ticking = turn?.status === "open" && turn.start !== void 0;
|
|
6018
6153
|
(0, react.useEffect)(() => {
|
|
6019
6154
|
if (!ticking) return;
|
|
6020
6155
|
setNow(Date.now());
|
|
@@ -6025,11 +6160,11 @@ window.__ModuleLoader__.load({
|
|
|
6025
6160
|
clearInterval(timer);
|
|
6026
6161
|
};
|
|
6027
6162
|
}, [ticking]);
|
|
6028
|
-
if (
|
|
6029
|
-
const canCollapse = turnProcess.hasContent && !turnProcessAlwaysOpen(node);
|
|
6030
|
-
const running = turn
|
|
6031
|
-
const reason = turn
|
|
6032
|
-
const elapsedMs = turn
|
|
6163
|
+
if (turn?.start === void 0 && turn?.status !== "closed") return null;
|
|
6164
|
+
const canCollapse = turnProcess.foldable && turnProcess.hasContent && !turnProcessAlwaysOpen(node);
|
|
6165
|
+
const running = turn.status === "open";
|
|
6166
|
+
const reason = turn.end?.data.reason.kind;
|
|
6167
|
+
const elapsedMs = turn.start === void 0 ? void 0 : Math.max(1e3, (turn.end?.time ?? now) - turn.start.time);
|
|
6033
6168
|
const duration = elapsedMs === void 0 ? void 0 : running ? formatLiveRunDuration(elapsedMs, t) : formatRunDuration(elapsedMs, t);
|
|
6034
6169
|
const label = running ? duration === void 0 ? t("chat.deepDiving") : t("message.turnProcess.deepDivingFor", { duration }) : reason === "aborted" ? t("message.stopped") : reason === "error" ? t("message.turnProcess.failed") : duration === void 0 ? t("message.turnProcess.worked") : t("message.turnProcess.took", { duration });
|
|
6035
6170
|
const announcement = running ? t("chat.deepDiving") : reason === "aborted" ? t("message.stopped") : reason === "error" ? t("message.turnProcess.failed") : t("message.turnProcess.worked");
|
|
@@ -6196,7 +6331,7 @@ window.__ModuleLoader__.load({
|
|
|
6196
6331
|
}
|
|
6197
6332
|
//#endregion
|
|
6198
6333
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/TurnUsagePanel.module.css.mjs
|
|
6199
|
-
const css$5 = ".Q51KRG_root{min-width:0;display:inline-flex}.Q51KRG_root+.Q51KRG_root{margin-left:-6px}.Q51KRG_trigger{min-width:0;height:calc(28px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);font-variant-numeric:tabular-nums;line-height:calc(24px + var(--dsh-content-font-delta,0px));white-space:nowrap;cursor:pointer;background:0 0;border:none;
|
|
6334
|
+
const css$5 = ".Q51KRG_root{min-width:0;display:inline-flex}.Q51KRG_root+.Q51KRG_root{margin-left:-6px}.Q51KRG_trigger{min-width:0;height:calc(28px + var(--dsh-content-font-delta,0px));border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);font-variant-numeric:tabular-nums;line-height:calc(24px + var(--dsh-content-font-delta,0px));white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:6px 8px;display:inline-flex}.Q51KRG_label{text-overflow:ellipsis;min-width:0;overflow:hidden}.Q51KRG_trigger svg{width:calc(15px + var(--dsh-content-font-delta,0px));height:calc(15px + var(--dsh-content-font-delta,0px));flex:none}.Q51KRG_trigger:hover,.Q51KRG_trigger[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary)}@media (width<=480px){.Q51KRG_trigger{width:calc(28px + var(--dsh-content-font-delta,0px));justify-content:center;padding:6px}.Q51KRG_trigger .Q51KRG_label{display:none}.Q51KRG_root+.Q51KRG_root{margin-left:0}}";
|
|
6200
6335
|
const tagId$5 = "@deepseek-ai/dsh-client-ui-chat/TurnUsagePanel.module.css";
|
|
6201
6336
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
6202
6337
|
const tag = document.createElement("style");
|
|
@@ -6212,7 +6347,7 @@ window.__ModuleLoader__.load({
|
|
|
6212
6347
|
};
|
|
6213
6348
|
//#endregion
|
|
6214
6349
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/stat-dialog.module.css.mjs
|
|
6215
|
-
const css$4 = ".bRhRbq_panel{z-index:1100;box-sizing:border-box;background:var(--dsw-specific-menu);width:max-content;min-width:min(300px,100vw - 24px);max-width:min(440px,100vw - 24px);backdrop-filter:var(--dsw-menu-backdrop-filter);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-secondary);cursor:default;border:0;
|
|
6350
|
+
const css$4 = ".bRhRbq_panel{z-index:1100;box-sizing:border-box;border-radius:var(--dsw-radius-lg);background:var(--dsw-specific-menu);width:max-content;min-width:min(300px,100vw - 24px);max-width:min(440px,100vw - 24px);backdrop-filter:var(--dsw-menu-backdrop-filter);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-secondary);cursor:default;border:0;padding:16px;font-size:12px;line-height:18px;position:fixed}.bRhRbq_title{color:var(--dsw-alias-label-primary);justify-content:space-between;gap:16px;margin-bottom:8px;font-weight:500;display:flex}.bRhRbq_titleRule{border-top:.5px solid var(--dsw-alias-border-l2);margin-bottom:10px}.bRhRbq_titleValue{font-variant-numeric:tabular-nums}.bRhRbq_titleLabel{align-items:center;gap:6px;min-width:0;display:inline-flex}.bRhRbq_titleLabel svg{flex:none;width:14px;height:14px}.bRhRbq_details{color:var(--dsw-alias-label-tertiary);grid-template-columns:minmax(76px,auto) minmax(0,1fr);gap:6px 16px;margin:0;display:grid}.bRhRbq_details dt,.bRhRbq_details dd{min-width:0;margin:0}.bRhRbq_details dd{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;text-align:right}.bRhRbq_details .bRhRbq_route{overflow-wrap:anywhere}.bRhRbq_reasoning{color:var(--dsw-alias-label-tertiary);white-space:nowrap}";
|
|
6216
6351
|
const tagId$4 = "@deepseek-ai/dsh-client-ui-chat/stat-dialog.module.css";
|
|
6217
6352
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
6218
6353
|
const tag = document.createElement("style");
|
|
@@ -6470,7 +6605,7 @@ window.__ModuleLoader__.load({
|
|
|
6470
6605
|
}
|
|
6471
6606
|
//#endregion
|
|
6472
6607
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/TurnTriggerNodeView.module.css.mjs
|
|
6473
|
-
const css$2 = ".oz9t_a_root{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);
|
|
6608
|
+
const css$2 = ".oz9t_a_root{border:.5px solid var(--dsw-alias-border-l1);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-markdown-code-block);min-width:0;transition:background-color .1s}.oz9t_a_root:hover{background:var(--dsw-alias-interactive-bg-hover)}.oz9t_a_header{width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:12px 16px;display:flex}.oz9t_a_icon{color:var(--dsw-alias-label-tertiary);flex:none;display:inline-flex}.oz9t_a_title{font:var(--dsw-font-xs-13);flex:none}.oz9t_a_time{color:var(--dsw-alias-label-caption);font:var(--dsw-font-xxs-12);flex:none;margin-left:auto}.oz9t_a_chevron,.oz9t_a_openChevron{color:var(--dsw-alias-label-tertiary);flex:none}.oz9t_a_openChevron{transform:rotate(180deg)}.oz9t_a_body{padding:0 16px 12px 40px}.oz9t_a_explanation{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);margin:8px 0}.oz9t_a_content{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;font:var(--dsw-font-xxs-12);overflow:auto}@media (prefers-reduced-motion:reduce){.oz9t_a_root{transition:none}}";
|
|
6474
6609
|
const tagId$2 = "@deepseek-ai/dsh-client-ui-chat/TurnTriggerNodeView.module.css";
|
|
6475
6610
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
6476
6611
|
const tag = document.createElement("style");
|
|
@@ -6687,7 +6822,7 @@ window.__ModuleLoader__.load({
|
|
|
6687
6822
|
}
|
|
6688
6823
|
//#endregion
|
|
6689
6824
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/chat/StatsPills.module.css.mjs
|
|
6690
|
-
const css$1 = ".bOPqQW_root{box-sizing:border-box;min-width:0;max-width:100%;font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);line-height:calc(20px + var(--dsh-content-font-delta-secondary,0px));justify-content:center;gap:12px;display:flex}.bOPqQW_anchor{min-width:0;display:inline-flex}.bOPqQW_pill{box-sizing:border-box;max-width:100%;color:var(--dsw-alias-label-tertiary);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;white-space:nowrap;background:0 0;border:none;border-radius:
|
|
6825
|
+
const css$1 = ".bOPqQW_root{box-sizing:border-box;min-width:0;max-width:100%;font-size:calc(var(--dsh-content-font-size-secondary,13px) - 1px);line-height:calc(20px + var(--dsh-content-font-delta-secondary,0px));justify-content:center;gap:12px;display:flex}.bOPqQW_anchor{min-width:0;display:inline-flex}.bOPqQW_pill{box-sizing:border-box;corner-shape:round;max-width:100%;color:var(--dsw-alias-label-tertiary);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;white-space:nowrap;background:0 0;border:none;border-radius:999px;align-items:center;gap:6px;padding:1px 8px;display:inline-flex}.bOPqQW_pill svg{flex:none;width:14px;height:14px}button.bOPqQW_pill{cursor:pointer}button.bOPqQW_pill:hover,button.bOPqQW_pill[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.bOPqQW_label{text-overflow:ellipsis;min-width:0;overflow:hidden}.bOPqQW_sep{color:var(--dsw-alias-separator-primary);margin:0 6px}";
|
|
6691
6826
|
const tagId$1 = "@deepseek-ai/dsh-client-ui-chat/StatsPills.module.css";
|
|
6692
6827
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
6693
6828
|
const tag = document.createElement("style");
|
|
@@ -7397,7 +7532,7 @@ window.__ModuleLoader__.load({
|
|
|
7397
7532
|
const blocks = settled?.blocks ?? compactBlocks(state.blocks);
|
|
7398
7533
|
const visible = settled === void 0 ? state.visibleBlocks > 0 : hasVisibleContent(blocks);
|
|
7399
7534
|
const status = settled?.interrupted === true ? "interrupted" : settled === void 0 ? "running" : "settled";
|
|
7400
|
-
const anchorSeq = settled?.seq
|
|
7535
|
+
const anchorSeq = (settled?.interrupted === true ? settled.seq : state.firstVisibleSeq ?? settled?.seq) ?? context.matches[0]?.event.seq ?? 0;
|
|
7401
7536
|
const time = settled?.time ?? state.firstVisibleTime ?? context.matches[0]?.event.time ?? 0;
|
|
7402
7537
|
return {
|
|
7403
7538
|
anchorSeq,
|
|
@@ -7476,7 +7611,7 @@ window.__ModuleLoader__.load({
|
|
|
7476
7611
|
const settled = data.finalNode;
|
|
7477
7612
|
const visible = settled === void 0 ? state.visibleBlocks > 0 : hasVisibleContent(data.blocks);
|
|
7478
7613
|
if (settled === void 0 && !visible && current == null) return null;
|
|
7479
|
-
return chatNode(context, "assistant-step", settled?.seq
|
|
7614
|
+
return chatNode(context, "assistant-step", (settled?.interrupted === true ? settled.seq : state.firstVisibleSeq ?? settled?.seq) ?? context.matches[0]?.event.seq ?? 0, data, { visibility: settled?.interrupted === true || visible ? "visible" : "hidden" });
|
|
7480
7615
|
}
|
|
7481
7616
|
};
|
|
7482
7617
|
/**
|
|
@@ -7508,11 +7643,12 @@ window.__ModuleLoader__.load({
|
|
|
7508
7643
|
//#region lib/types/client/contract/chat-visibility.js
|
|
7509
7644
|
/**
|
|
7510
7645
|
* Exclude system prompts, ordinary Context, and permission commands from visible Chat rows.
|
|
7646
|
+
* Context containing tool changes retains its notice row.
|
|
7511
7647
|
* @param node - projected Chat node.
|
|
7512
7648
|
* @returns whether the node contributes a visible Chat row.
|
|
7513
7649
|
*/
|
|
7514
7650
|
function isVisibleChatNode(node) {
|
|
7515
|
-
return node.visibility === "visible" && node.kind !== "system-prompt" && node.kind !== "context" && !(node.kind === "command" && node.data.name === "permission");
|
|
7651
|
+
return node.visibility === "visible" && node.kind !== "system-prompt" && (node.kind !== "context" || node.data.content.some((block) => block.type === "tool-addition" || block.type === "tool-removal")) && !(node.kind === "command" && node.data.name === "permission");
|
|
7516
7652
|
}
|
|
7517
7653
|
//#endregion
|
|
7518
7654
|
//#region lib/types/client/conversation-nodes/turn-navigation.js
|
|
@@ -9043,6 +9179,18 @@ window.__ModuleLoader__.load({
|
|
|
9043
9179
|
if (event.type !== "user/message" || !isReplacementSurfaceEvent(event)) return false;
|
|
9044
9180
|
return event.data.source.kind === "compact-checkpoint";
|
|
9045
9181
|
}
|
|
9182
|
+
/** Context presentation shared by user-role injections and developer messages. */
|
|
9183
|
+
function contextMessage(event, message) {
|
|
9184
|
+
return {
|
|
9185
|
+
kind: "context",
|
|
9186
|
+
seq: event.seq,
|
|
9187
|
+
time: event.time,
|
|
9188
|
+
content: message.content,
|
|
9189
|
+
source: message.source,
|
|
9190
|
+
producer: contextProducer(message.source),
|
|
9191
|
+
form: contextForm(message.source)
|
|
9192
|
+
};
|
|
9193
|
+
}
|
|
9046
9194
|
/** User, steering, and injected-context message classification Definition. */
|
|
9047
9195
|
const messageDefinition = {
|
|
9048
9196
|
kind: "input-message",
|
|
@@ -9052,12 +9200,11 @@ window.__ModuleLoader__.load({
|
|
|
9052
9200
|
id: String(event.data.id),
|
|
9053
9201
|
role: "start"
|
|
9054
9202
|
} : null;
|
|
9055
|
-
if (event.type === "developer/message") throw new Error("Chat developer messages are not supported yet");
|
|
9056
9203
|
return null;
|
|
9057
9204
|
},
|
|
9058
9205
|
start: (_context, match, reader) => {
|
|
9059
|
-
if (match.event.type !== "user/message") throw new Error("input-message start requires user/message");
|
|
9060
9206
|
const event = match.event;
|
|
9207
|
+
if (event.type !== "user/message") throw new Error("input-message start requires user/message");
|
|
9061
9208
|
if (event.data.source.kind !== "user") {
|
|
9062
9209
|
const nextTurn = reader.previous("inbox-next-turn")?.state;
|
|
9063
9210
|
const nextStep = reader.previous("inbox-next-step")?.state;
|
|
@@ -9065,14 +9212,8 @@ window.__ModuleLoader__.load({
|
|
|
9065
9212
|
const turnStart = location.kind === "step" ? location.turn.start?.seq : void 0;
|
|
9066
9213
|
const idleSteer = location.kind === "step" && location.step.step === 1 && turnStart !== void 0 && (nextStep?.claimSeq ?? -1) > turnStart && (nextTurn?.claimSeq ?? -1) < turnStart && nextStep?.claimedHuman === false && nextStep.currentClaimed.has(String(event.data.id));
|
|
9067
9214
|
return {
|
|
9068
|
-
|
|
9069
|
-
waking: nextTurn?.currentClaimed.has(String(event.data.id)) === true || idleSteer
|
|
9070
|
-
seq: event.seq,
|
|
9071
|
-
time: event.time,
|
|
9072
|
-
content: event.data.content,
|
|
9073
|
-
source: event.data.source,
|
|
9074
|
-
producer: contextProducer(event.data.source),
|
|
9075
|
-
form: contextForm(event.data.source)
|
|
9215
|
+
...contextMessage(event, event.data),
|
|
9216
|
+
waking: nextTurn?.currentClaimed.has(String(event.data.id)) === true || idleSteer
|
|
9076
9217
|
};
|
|
9077
9218
|
}
|
|
9078
9219
|
return reader.previous("inbox-next-step")?.state.currentClaimed.has(String(event.data.id)) === true ? {
|
|
@@ -9096,12 +9237,27 @@ window.__ModuleLoader__.load({
|
|
|
9096
9237
|
return chatNode(context, context.state.kind === "context" && context.start?.event.type === "user/message" && context.state.waking === true ? "turn-trigger" : context.state.kind, context.state.seq, context.state);
|
|
9097
9238
|
}
|
|
9098
9239
|
};
|
|
9240
|
+
/** Developer history uses the input-message lifecycle and context presentation. */
|
|
9241
|
+
const developerMessageDefinition = {
|
|
9242
|
+
...messageDefinition,
|
|
9243
|
+
kind: "developer-message",
|
|
9244
|
+
match: (event) => event.type === "developer/message" ? {
|
|
9245
|
+
id: String(event.data.message.id),
|
|
9246
|
+
role: "start"
|
|
9247
|
+
} : null,
|
|
9248
|
+
start: (_context, match) => {
|
|
9249
|
+
const event = match.event;
|
|
9250
|
+
if (event.type !== "developer/message") throw new Error("developer-message start requires developer/message");
|
|
9251
|
+
return contextMessage(event, event.data.message);
|
|
9252
|
+
}
|
|
9253
|
+
};
|
|
9099
9254
|
/**
|
|
9100
|
-
* Register
|
|
9255
|
+
* Register user, steering, injected-context, and developer message contributions.
|
|
9101
9256
|
* @param ctx - owning UI Conversation context.
|
|
9102
9257
|
*/
|
|
9103
9258
|
function registerMessageConversationNode(ctx) {
|
|
9104
9259
|
ctx.uiConversation.events.register(messageDefinition);
|
|
9260
|
+
ctx.uiConversation.events.register(developerMessageDefinition);
|
|
9105
9261
|
}
|
|
9106
9262
|
//#endregion
|
|
9107
9263
|
//#region lib/types/client/conversation-nodes/request-prompt.js
|
|
@@ -9137,6 +9293,7 @@ window.__ModuleLoader__.load({
|
|
|
9137
9293
|
role: "start"
|
|
9138
9294
|
} : null,
|
|
9139
9295
|
start: (_context, match, reader) => {
|
|
9296
|
+
if (match.event.type === "assistant/live-chunk") throw new Error("system-message requires a durable event");
|
|
9140
9297
|
return inspect(reader.previous("system-message")?.state, match.event);
|
|
9141
9298
|
},
|
|
9142
9299
|
update: (context) => context.state,
|
|
@@ -9301,8 +9458,23 @@ window.__ModuleLoader__.load({
|
|
|
9301
9458
|
return JSON.stringify(value);
|
|
9302
9459
|
}
|
|
9303
9460
|
function rootCall(match) {
|
|
9461
|
+
const event = match.event;
|
|
9462
|
+
if (event.type === "assistant/live-chunk") {
|
|
9463
|
+
const chunk = event.data.chunk;
|
|
9464
|
+
if (chunk.type !== "tool-call-delta" || !chunk.name) throw new Error("tool preparation requires a named call delta");
|
|
9465
|
+
return {
|
|
9466
|
+
phase: "preparing",
|
|
9467
|
+
callId: String(chunk.id),
|
|
9468
|
+
name: chunk.name,
|
|
9469
|
+
turn: event.data.turn,
|
|
9470
|
+
step: event.data.step,
|
|
9471
|
+
time: event.time,
|
|
9472
|
+
subCalls: []
|
|
9473
|
+
};
|
|
9474
|
+
}
|
|
9304
9475
|
if (match.event.type !== "tool/call") throw new Error("tool-call start requires tool/call");
|
|
9305
9476
|
return {
|
|
9477
|
+
phase: "start",
|
|
9306
9478
|
callId: String(match.event.data.callId),
|
|
9307
9479
|
name: match.event.data.name,
|
|
9308
9480
|
argsRaw: match.event.data.arguments,
|
|
@@ -9334,6 +9506,7 @@ window.__ModuleLoader__.load({
|
|
|
9334
9506
|
}
|
|
9335
9507
|
function childCall(match, data) {
|
|
9336
9508
|
return {
|
|
9509
|
+
phase: "start",
|
|
9337
9510
|
callId: data.subCallId,
|
|
9338
9511
|
parentCallId: data.parentCallId,
|
|
9339
9512
|
name: data.name,
|
|
@@ -9429,6 +9602,7 @@ window.__ModuleLoader__.load({
|
|
|
9429
9602
|
};
|
|
9430
9603
|
}
|
|
9431
9604
|
function projectBlock(block, state, interruptedAt, visited = /* @__PURE__ */ new Set(), depth = 1) {
|
|
9605
|
+
if (!("kind" in block) && block.phase === "preparing") return block;
|
|
9432
9606
|
if (visited.has(block.callId) || depth > MAX_DEPTH) return {
|
|
9433
9607
|
...block,
|
|
9434
9608
|
subCalls: []
|
|
@@ -9490,11 +9664,18 @@ window.__ModuleLoader__.load({
|
|
|
9490
9664
|
for (const candidate of context.matches) state = updateDispatch(state, candidate);
|
|
9491
9665
|
return state;
|
|
9492
9666
|
}
|
|
9493
|
-
/** Root Tool
|
|
9667
|
+
/** Root Tool preparation, dispatch, result, and nested PTC calls. */
|
|
9494
9668
|
const toolDefinition = {
|
|
9495
9669
|
kind: "tool-call",
|
|
9496
9670
|
target: "chat",
|
|
9497
9671
|
match: (event) => {
|
|
9672
|
+
if (event.type === "assistant/live-chunk") {
|
|
9673
|
+
const chunk = event.data.chunk;
|
|
9674
|
+
return chunk.type === "tool-call-delta" && chunk.name ? {
|
|
9675
|
+
id: String(chunk.id),
|
|
9676
|
+
role: "start"
|
|
9677
|
+
} : null;
|
|
9678
|
+
}
|
|
9498
9679
|
if (event.type === "tool/call") return {
|
|
9499
9680
|
id: String(event.data.callId),
|
|
9500
9681
|
role: "start"
|
|
@@ -9518,8 +9699,13 @@ window.__ModuleLoader__.load({
|
|
|
9518
9699
|
parents: /* @__PURE__ */ new Map()
|
|
9519
9700
|
}),
|
|
9520
9701
|
update: (context, match) => {
|
|
9702
|
+
if (match.event.type === "tool/call") return {
|
|
9703
|
+
...context.state,
|
|
9704
|
+
root: rootCall(match)
|
|
9705
|
+
};
|
|
9521
9706
|
if (match.event.type === "tool/result") {
|
|
9522
|
-
const
|
|
9707
|
+
const root = context.state.root;
|
|
9708
|
+
const result = rootResult(match, !("kind" in root) && root.phase === "start" ? root : void 0);
|
|
9523
9709
|
return result === void 0 ? context.state : {
|
|
9524
9710
|
...context.state,
|
|
9525
9711
|
root: result
|
|
@@ -9527,11 +9713,25 @@ window.__ModuleLoader__.load({
|
|
|
9527
9713
|
}
|
|
9528
9714
|
return updateDispatch(context.state, match);
|
|
9529
9715
|
},
|
|
9716
|
+
publication: (match) => match.event.type === "assistant/live-chunk" ? "animation-frame" : "immediate",
|
|
9530
9717
|
buildViewNode: (context) => {
|
|
9718
|
+
const current = context.current.get("chat");
|
|
9531
9719
|
const state = context.state ?? fallbackState$2(context);
|
|
9532
|
-
if (state === void 0) return null
|
|
9533
|
-
|
|
9534
|
-
|
|
9720
|
+
if (state === void 0) return current == null ? null : current.visibility === "hidden" ? current : {
|
|
9721
|
+
...current,
|
|
9722
|
+
visibility: "hidden"
|
|
9723
|
+
};
|
|
9724
|
+
const interruptedAt = interruption(context);
|
|
9725
|
+
const projected = projectBlock(state.root, state, interruptedAt);
|
|
9726
|
+
const anchor = context.start?.event.seq ?? ("kind" in state.root ? state.root.seq : context.matches[0]?.event.seq ?? 0);
|
|
9727
|
+
const visibility = !("kind" in projected) && projected.phase === "preparing" && interruptedAt !== void 0 ? "hidden" : "visible";
|
|
9728
|
+
const location = contextLocation(context);
|
|
9729
|
+
const data = current?.data.root === projected ? current.data : { root: projected };
|
|
9730
|
+
if (current?.data === data && current.anchorSeq === anchor && current.visibility === visibility && current.location === location) return current;
|
|
9731
|
+
return chatNode(context, "tool-call", anchor, data, {
|
|
9732
|
+
visibility,
|
|
9733
|
+
location
|
|
9734
|
+
});
|
|
9535
9735
|
}
|
|
9536
9736
|
};
|
|
9537
9737
|
/**
|
|
@@ -9549,8 +9749,13 @@ window.__ModuleLoader__.load({
|
|
|
9549
9749
|
return location.turn.steps.at(-1)?.step ?? 0;
|
|
9550
9750
|
}
|
|
9551
9751
|
function failureFrom(match) {
|
|
9552
|
-
if (match.event.type !== "turn/end"
|
|
9553
|
-
const
|
|
9752
|
+
if (match.event.type !== "turn/end") return void 0;
|
|
9753
|
+
const reason = match.event.data.reason;
|
|
9754
|
+
const failure = reason.kind === "error" ? reason.error : reason.kind === "aborted" && reason.reason.kind === "hook" && reason.reason.reason === "deepseek-account/signed-out" ? {
|
|
9755
|
+
message: "Stopped because you signed out of DeepSeek.",
|
|
9756
|
+
code: "ACCOUNT_SIGNED_OUT"
|
|
9757
|
+
} : void 0;
|
|
9758
|
+
if (failure === void 0) return void 0;
|
|
9554
9759
|
const display = displayFailure(failure);
|
|
9555
9760
|
return {
|
|
9556
9761
|
seq: match.event.seq,
|
|
@@ -9582,7 +9787,7 @@ window.__ModuleLoader__.load({
|
|
|
9582
9787
|
id: String(event.data.turn),
|
|
9583
9788
|
role: "start"
|
|
9584
9789
|
};
|
|
9585
|
-
if (event.type === "turn/end" && event.data.reason.kind === "error") return {
|
|
9790
|
+
if (event.type === "turn/end" && (event.data.reason.kind === "error" || event.data.reason.kind === "aborted" && event.data.reason.reason.kind === "hook" && event.data.reason.reason.reason === "deepseek-account/signed-out")) return {
|
|
9586
9791
|
id: String(event.data.turn),
|
|
9587
9792
|
role: "update"
|
|
9588
9793
|
};
|
|
@@ -10219,19 +10424,11 @@ window.__ModuleLoader__.load({
|
|
|
10219
10424
|
//#endregion
|
|
10220
10425
|
//#region lib/types/client/conversation-nodes/process-activity.js
|
|
10221
10426
|
function activity(name) {
|
|
10222
|
-
if (
|
|
10223
|
-
|
|
10224
|
-
"read_image",
|
|
10225
|
-
"list_mcp_resources",
|
|
10226
|
-
"list_mcp_resource_templates",
|
|
10227
|
-
"read_mcp_resource"
|
|
10228
|
-
].includes(name)) return "read";
|
|
10427
|
+
if (name === "read") return "read";
|
|
10428
|
+
if (name === "read_image") return "readImage";
|
|
10229
10429
|
if (name === "grep" || name === "glob" || name.endsWith("_inspect")) return "search";
|
|
10230
|
-
if (
|
|
10231
|
-
|
|
10232
|
-
"edit",
|
|
10233
|
-
"apply_patch"
|
|
10234
|
-
].includes(name)) return "edit";
|
|
10430
|
+
if (name === "write") return "write";
|
|
10431
|
+
if (name === "edit" || name === "apply_patch") return "edit";
|
|
10235
10432
|
if ([
|
|
10236
10433
|
"bash",
|
|
10237
10434
|
"pwsh",
|
|
@@ -10333,6 +10530,7 @@ window.__ModuleLoader__.load({
|
|
|
10333
10530
|
let running;
|
|
10334
10531
|
let runningDetail = "";
|
|
10335
10532
|
let runningTime = -Infinity;
|
|
10533
|
+
let preparing;
|
|
10336
10534
|
const visit = (tool) => {
|
|
10337
10535
|
if (seen.has(tool.callId)) return;
|
|
10338
10536
|
seen.add(tool.callId);
|
|
@@ -10341,7 +10539,8 @@ window.__ModuleLoader__.load({
|
|
|
10341
10539
|
const kind = activity(call.name);
|
|
10342
10540
|
if (isRunningTool(tool) && tool.time >= runningTime) {
|
|
10343
10541
|
running = kind;
|
|
10344
|
-
|
|
10542
|
+
preparing = tool.phase === "preparing";
|
|
10543
|
+
runningDetail = tool.phase === "preparing" ? kind === "tools" ? tool.name : "" : liveToolDetail(tool.name, tool.argsRaw);
|
|
10345
10544
|
runningTime = tool.time;
|
|
10346
10545
|
}
|
|
10347
10546
|
counts.set(kind, (counts.get(kind) ?? 0) + 1);
|
|
@@ -10356,7 +10555,8 @@ window.__ModuleLoader__.load({
|
|
|
10356
10555
|
count
|
|
10357
10556
|
})).sort((a, b) => b.count - a.count),
|
|
10358
10557
|
running,
|
|
10359
|
-
runningDetail
|
|
10558
|
+
runningDetail,
|
|
10559
|
+
...preparing ? { preparing: true } : {}
|
|
10360
10560
|
};
|
|
10361
10561
|
}
|
|
10362
10562
|
//#endregion
|
|
@@ -10382,7 +10582,7 @@ window.__ModuleLoader__.load({
|
|
|
10382
10582
|
return node.kind === "assistant-step" && hasAssistantReplyContent(node.data.blocks);
|
|
10383
10583
|
}
|
|
10384
10584
|
function sameSummary(left, right) {
|
|
10385
|
-
return left.running === right.running && left.runningDetail === right.runningDetail && left.counts.length === right.counts.length && left.counts.every((value, index) => value.kind === right.counts[index]?.kind && value.count === right.counts[index].count);
|
|
10585
|
+
return left.running === right.running && left.runningDetail === right.runningDetail && left.preparing === right.preparing && left.counts.length === right.counts.length && left.counts.every((value, index) => value.kind === right.counts[index]?.kind && value.count === right.counts[index].count);
|
|
10386
10586
|
}
|
|
10387
10587
|
function sameMembers(left, right) {
|
|
10388
10588
|
return left.length === right.length && left.every((value, index) => value.key === right[index]?.key && value.groupPart === right[index].groupPart);
|
|
@@ -10427,7 +10627,7 @@ window.__ModuleLoader__.load({
|
|
|
10427
10627
|
const previous = this.snapshot.data;
|
|
10428
10628
|
const activity = unchanged && previous.closed === closed ? previous.summary : processActivity(nodes);
|
|
10429
10629
|
const summary = closed ? {
|
|
10430
|
-
|
|
10630
|
+
counts: activity.counts,
|
|
10431
10631
|
running: void 0,
|
|
10432
10632
|
runningDetail: ""
|
|
10433
10633
|
} : activity;
|
|
@@ -10709,6 +10909,32 @@ window.__ModuleLoader__.load({
|
|
|
10709
10909
|
ctx.uiConversation.groups.register(processGroupDefinition);
|
|
10710
10910
|
}
|
|
10711
10911
|
//#endregion
|
|
10912
|
+
//#region lib/types/client/chat/QuotaNoticeHost.js
|
|
10913
|
+
/**
|
|
10914
|
+
* The frame-wide `shell.overlay` host for quota notices. It holds the one live
|
|
10915
|
+
* notice for the whole app, so leaving the Chat panel does not drop it. A
|
|
10916
|
+
* `shell.quota-notice` entry may replace the generic Toast for codes it claims.
|
|
10917
|
+
*/
|
|
10918
|
+
/**
|
|
10919
|
+
* @param props - the live notice, its dismissal, the chain outlet, and the locale seat.
|
|
10920
|
+
* @returns the notice on display, or null while none is live.
|
|
10921
|
+
*/
|
|
10922
|
+
function QuotaNoticeHost({ useNotice, dismissNotice, keepNoticeOpen, renderSlotChain, t }) {
|
|
10923
|
+
const notice = useNotice((current) => current);
|
|
10924
|
+
if (notice === null) return null;
|
|
10925
|
+
const owner = {
|
|
10926
|
+
code: notice.code,
|
|
10927
|
+
message: t("message.failure.quota"),
|
|
10928
|
+
dismiss: dismissNotice,
|
|
10929
|
+
keepOpen: keepNoticeOpen
|
|
10930
|
+
};
|
|
10931
|
+
return (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderSlotChain("shell.quota-notice", owner, { fallback: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Toast, {
|
|
10932
|
+
text: owner.message,
|
|
10933
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, { size: 18 }),
|
|
10934
|
+
onDone: dismissNotice
|
|
10935
|
+
}) }) }, `quota-notice-${String(notice.seq)}`);
|
|
10936
|
+
}
|
|
10937
|
+
//#endregion
|
|
10712
10938
|
//#region ../../../vendor/cosmokit/lib/index.js
|
|
10713
10939
|
/** Return true when a value is `null` or `undefined`. */
|
|
10714
10940
|
function isNullable(value) {
|
|
@@ -11605,18 +11831,25 @@ window.__ModuleLoader__.load({
|
|
|
11605
11831
|
/** Work-details presentation modes a user can choose. */
|
|
11606
11832
|
const TRANSCRIPT_VIEW_MODES = [
|
|
11607
11833
|
"compact",
|
|
11834
|
+
"standard",
|
|
11608
11835
|
"detailed",
|
|
11609
|
-
"
|
|
11836
|
+
"verbose"
|
|
11610
11837
|
];
|
|
11611
11838
|
/**
|
|
11612
|
-
* Saved value from the two-mode generation of this setting. Read as `
|
|
11839
|
+
* Saved value from the two-mode generation of this setting. Read as `standard`;
|
|
11613
11840
|
* never offered as a choice and never written back.
|
|
11614
11841
|
*/
|
|
11615
11842
|
const LEGACY_TRANSCRIPT_VIEW_MODE = "normal";
|
|
11616
|
-
/**
|
|
11617
|
-
const
|
|
11618
|
-
/**
|
|
11619
|
-
const
|
|
11843
|
+
/** Saved `expanded` values read as `detailed`, without being offered or written back. */
|
|
11844
|
+
const LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE = "expanded";
|
|
11845
|
+
/** Every value the durable field accepts: current modes plus legacy saved values. */
|
|
11846
|
+
const TRANSCRIPT_VIEW_SETTING_VALUES = [
|
|
11847
|
+
...TRANSCRIPT_VIEW_MODES,
|
|
11848
|
+
LEGACY_TRANSCRIPT_VIEW_MODE,
|
|
11849
|
+
LEGACY_EXPANDED_TRANSCRIPT_VIEW_MODE
|
|
11850
|
+
];
|
|
11851
|
+
/** Standard process summaries for users without an explicit preference. */
|
|
11852
|
+
const DEFAULT_TRANSCRIPT_VIEW_MODE = "standard";
|
|
11620
11853
|
/** Performance and usage detail levels accepted by user settings. */
|
|
11621
11854
|
const PERFORMANCE_USAGE_MODES = ["compact", "detailed"];
|
|
11622
11855
|
/** Preserve detailed accounting for users without an explicit preference. */
|
|
@@ -11625,12 +11858,12 @@ window.__ModuleLoader__.load({
|
|
|
11625
11858
|
const ChatSettingsFields = {
|
|
11626
11859
|
linkOpening: Schema.union(["sidebar", "new-tab"]).default("sidebar"),
|
|
11627
11860
|
performanceUsage: Schema.union([...PERFORMANCE_USAGE_MODES]).default(DEFAULT_PERFORMANCE_USAGE),
|
|
11628
|
-
[TRANSCRIPT_VIEW_FIELD]: Schema.union([...TRANSCRIPT_VIEW_SETTING_VALUES]).default(DEFAULT_TRANSCRIPT_VIEW_MODE)
|
|
11861
|
+
[TRANSCRIPT_VIEW_FIELD]: Schema.union([...TRANSCRIPT_VIEW_SETTING_VALUES]).default(DEFAULT_TRANSCRIPT_VIEW_MODE).loose()
|
|
11629
11862
|
};
|
|
11630
11863
|
Schema.object(ChatSettingsFields);
|
|
11631
11864
|
//#endregion
|
|
11632
11865
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-chat/src/client/settings/PreferenceRow.module.css.mjs
|
|
11633
|
-
const css = "._2XZxNq_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}._2XZxNq_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}._2XZxNq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._2XZxNq_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}._2XZxNq_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;
|
|
11866
|
+
const css = "._2XZxNq_row{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}._2XZxNq_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}._2XZxNq_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._2XZxNq_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}._2XZxNq_selector{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}._2XZxNq_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}._2XZxNq_chevron{flex:none}";
|
|
11634
11867
|
const tagId = "@deepseek-ai/dsh-client-ui-chat/PreferenceRow.module.css";
|
|
11635
11868
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
11636
11869
|
const tag = document.createElement("style");
|
|
@@ -11704,8 +11937,9 @@ window.__ModuleLoader__.load({
|
|
|
11704
11937
|
//#region lib/types/client/settings/TranscriptViewRow.js
|
|
11705
11938
|
const LABELS = {
|
|
11706
11939
|
compact: "settings.transcript.compact",
|
|
11940
|
+
standard: "settings.transcript.standard",
|
|
11707
11941
|
detailed: "settings.transcript.detailed",
|
|
11708
|
-
|
|
11942
|
+
verbose: "settings.transcript.verbose"
|
|
11709
11943
|
};
|
|
11710
11944
|
/**
|
|
11711
11945
|
* Render the work-details mode selector.
|
|
@@ -11735,7 +11969,7 @@ window.__ModuleLoader__.load({
|
|
|
11735
11969
|
var TranscriptViewPolicy = class {
|
|
11736
11970
|
host;
|
|
11737
11971
|
unsubscribe;
|
|
11738
|
-
/** Reactive current mode; defaults to
|
|
11972
|
+
/** Reactive current mode; defaults to Standard before Host settings arrive. */
|
|
11739
11973
|
mode = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(DEFAULT_TRANSCRIPT_VIEW_MODE);
|
|
11740
11974
|
/**
|
|
11741
11975
|
* @param host - durable Chat settings scope.
|
|
@@ -11753,7 +11987,7 @@ window.__ModuleLoader__.load({
|
|
|
11753
11987
|
}
|
|
11754
11988
|
/**
|
|
11755
11989
|
* Publish and persist one explicit user choice.
|
|
11756
|
-
* @param mode - Compact, Detailed, or
|
|
11990
|
+
* @param mode - Compact, Standard, Detailed, or Verbose work details.
|
|
11757
11991
|
*/
|
|
11758
11992
|
setMode(mode) {
|
|
11759
11993
|
if (this.mode.getSnapshot() === mode) return;
|
|
@@ -11764,7 +11998,8 @@ window.__ModuleLoader__.load({
|
|
|
11764
11998
|
adopt() {
|
|
11765
11999
|
const section = this.host.getSnapshot().value;
|
|
11766
12000
|
if (section === void 0) return;
|
|
11767
|
-
const
|
|
12001
|
+
const saved = section.transcriptView;
|
|
12002
|
+
const mode = saved === "normal" ? "standard" : saved === "expanded" ? "detailed" : saved;
|
|
11768
12003
|
if (this.mode.getSnapshot() !== mode) this.mode.set(mode);
|
|
11769
12004
|
}
|
|
11770
12005
|
};
|
|
@@ -11783,19 +12018,26 @@ window.__ModuleLoader__.load({
|
|
|
11783
12018
|
liveProcessDetail: false,
|
|
11784
12019
|
settledReasoningPreview: false
|
|
11785
12020
|
},
|
|
11786
|
-
|
|
11787
|
-
mode: "
|
|
12021
|
+
standard: {
|
|
12022
|
+
mode: "standard",
|
|
11788
12023
|
foldCompletedTurns: true,
|
|
11789
12024
|
stepGrouping: "collapsed",
|
|
11790
12025
|
liveProcessDetail: true,
|
|
11791
12026
|
settledReasoningPreview: true
|
|
11792
12027
|
},
|
|
11793
|
-
|
|
11794
|
-
mode: "
|
|
12028
|
+
detailed: {
|
|
12029
|
+
mode: "detailed",
|
|
11795
12030
|
foldCompletedTurns: true,
|
|
11796
|
-
stepGrouping: "
|
|
12031
|
+
stepGrouping: "history",
|
|
11797
12032
|
liveProcessDetail: true,
|
|
11798
12033
|
settledReasoningPreview: true
|
|
12034
|
+
},
|
|
12035
|
+
verbose: {
|
|
12036
|
+
mode: "verbose",
|
|
12037
|
+
foldCompletedTurns: false,
|
|
12038
|
+
stepGrouping: "none",
|
|
12039
|
+
liveProcessDetail: false,
|
|
12040
|
+
settledReasoningPreview: true
|
|
11799
12041
|
}
|
|
11800
12042
|
};
|
|
11801
12043
|
/**
|
|
@@ -11943,10 +12185,38 @@ window.__ModuleLoader__.load({
|
|
|
11943
12185
|
* @param ctx - Client root context.
|
|
11944
12186
|
*/
|
|
11945
12187
|
function apply(ctx) {
|
|
12188
|
+
const quotaNotice = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)(null);
|
|
12189
|
+
let quotaNoticeSeq = 0;
|
|
12190
|
+
const quotaNoticeHolds = /* @__PURE__ */ new Set();
|
|
11946
12191
|
const chatSources = /* @__PURE__ */ new WeakMap();
|
|
12192
|
+
const quotaSubscriptions = /* @__PURE__ */ new Set();
|
|
12193
|
+
ctx.effect(() => async () => {
|
|
12194
|
+
await Promise.all([...quotaSubscriptions].map((dispose) => dispose()));
|
|
12195
|
+
}, "ui-chat: live quota notices");
|
|
11947
12196
|
const chatSource = (binding) => {
|
|
11948
12197
|
let source = chatSources.get(binding);
|
|
11949
12198
|
if (source === void 0) {
|
|
12199
|
+
const dispose = binding.ctx.effect(() => {
|
|
12200
|
+
const stop = binding.eventSource.subscribe(() => {
|
|
12201
|
+
const { change } = binding.eventSource.getSnapshot();
|
|
12202
|
+
if (change.kind !== "append") return;
|
|
12203
|
+
for (const { event } of change.entries) {
|
|
12204
|
+
if (event.type !== "turn/end" || event.data.reason.kind !== "error") continue;
|
|
12205
|
+
const { code } = event.data.reason.error;
|
|
12206
|
+
if (quotaNoticeHolds.size > 0 || code !== "QUOTA" && code !== "ACCOUNT_QUOTA") continue;
|
|
12207
|
+
quotaNotice.set({
|
|
12208
|
+
code,
|
|
12209
|
+
seq: ++quotaNoticeSeq
|
|
12210
|
+
});
|
|
12211
|
+
}
|
|
12212
|
+
});
|
|
12213
|
+
return () => {
|
|
12214
|
+
stop();
|
|
12215
|
+
chatSources.delete(binding);
|
|
12216
|
+
quotaSubscriptions.delete(dispose);
|
|
12217
|
+
};
|
|
12218
|
+
}, "ui-chat: Provider binding quota notices");
|
|
12219
|
+
quotaSubscriptions.add(dispose);
|
|
11950
12220
|
const target = ctx.uiConversation.binding(binding).target("chat");
|
|
11951
12221
|
source = {
|
|
11952
12222
|
getSnapshot: () => target.getSnapshot() ?? EMPTY_CHAT_SNAPSHOT,
|
|
@@ -12104,6 +12374,30 @@ window.__ModuleLoader__.load({
|
|
|
12104
12374
|
}
|
|
12105
12375
|
}, ChatView);
|
|
12106
12376
|
});
|
|
12377
|
+
ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
12378
|
+
name: "shell.overlay",
|
|
12379
|
+
id: "chat.quota-notice",
|
|
12380
|
+
locale: NS,
|
|
12381
|
+
children: { "shell.quota-notice": {
|
|
12382
|
+
kind: "chain",
|
|
12383
|
+
scope: "root"
|
|
12384
|
+
} },
|
|
12385
|
+
inject: () => ({
|
|
12386
|
+
hooks: { notice: quotaNotice },
|
|
12387
|
+
dismissNotice: () => {
|
|
12388
|
+
quotaNoticeHolds.clear();
|
|
12389
|
+
quotaNotice.set(null);
|
|
12390
|
+
},
|
|
12391
|
+
keepNoticeOpen: () => {
|
|
12392
|
+
if (quotaNotice.getSnapshot() === null) return () => {};
|
|
12393
|
+
const token = Symbol("ui-chat quota notice hold");
|
|
12394
|
+
quotaNoticeHolds.add(token);
|
|
12395
|
+
return () => {
|
|
12396
|
+
quotaNoticeHolds.delete(token);
|
|
12397
|
+
};
|
|
12398
|
+
}
|
|
12399
|
+
})
|
|
12400
|
+
}, QuotaNoticeHost));
|
|
12107
12401
|
ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
|
|
12108
12402
|
name: "conversation.composer.dock",
|
|
12109
12403
|
id: "stats",
|