dsh-better-ask-user 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +287 -148
- package/package.json +2 -2
- package/src/client/AskHistoryRow.module.css +9 -6
- package/src/client/AskHistoryRow.tsx +51 -23
- package/src/client/PlanReviewPanel.module.css +35 -54
- package/src/client/QuestionComposer.module.css +50 -82
- package/src/client/QuestionComposer.tsx +12 -15
- package/src/client/QuestionReplyView.module.css +18 -19
- package/src/client/QuestionWaitBar.module.css +30 -39
- package/src/client/QuestionWaitBar.tsx +2 -0
- package/src/client/index.ts +37 -1
- package/src/client/locales.ts +8 -2
- package/src/client/settings-locales.ts +37 -27
- package/src/client/settings.module.css +94 -91
- package/src/client/settings.tsx +142 -65
package/lib/client.js
CHANGED
|
@@ -25,6 +25,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
25
25
|
var index_exports = {};
|
|
26
26
|
__export(index_exports, {
|
|
27
27
|
PendingQuestion: () => PendingQuestion,
|
|
28
|
+
QuestionCards: () => QuestionCards,
|
|
28
29
|
SettingsEntry: () => SettingsEntry,
|
|
29
30
|
apply: () => apply,
|
|
30
31
|
inject: () => inject
|
|
@@ -501,7 +502,7 @@ var import_react = require("react");
|
|
|
501
502
|
var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
502
503
|
|
|
503
504
|
// src/client/AskHistoryRow.module.css
|
|
504
|
-
var css = "/* src/client/AskHistoryRow.module.css */\n.AskHistoryRow_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: #3388bb;\n --cfg-accent-text:
|
|
505
|
+
var css = "/* src/client/AskHistoryRow.module.css */\n.AskHistoryRow_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n min-width: 0;\n}\n.AskHistoryRow_row {\n appearance: none;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 32px;\n min-width: 0;\n padding: 4px 8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--cfg-muted);\n font: inherit;\n line-height: 20px;\n text-align: left;\n}\nbutton.AskHistoryRow_row {\n cursor: pointer;\n}\nbutton.AskHistoryRow_row:hover {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\nbutton.AskHistoryRow_row:active {\n background: color-mix(in srgb, var(--cfg-accent) 9%, transparent);\n}\nbutton.AskHistoryRow_row:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.AskHistoryRow_icon {\n display: inline-flex;\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n}\n.AskHistoryRow_icon svg {\n width: 14px;\n height: 14px;\n}\n.AskHistoryRow_summary {\n min-width: 0;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.AskHistoryRow_open {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: none;\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.AskHistoryRow_state {\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n}\n.AskHistoryRow_error {\n display: block;\n padding: 4px 8px 4px 30px;\n color: var(--dsw-alias-state-error-primary);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n@media (max-width: 640px) {\n .AskHistoryRow_row {\n min-height: 44px;\n align-items: flex-start;\n padding-block: 10px;\n }\n .AskHistoryRow_summary {\n white-space: normal;\n overflow-wrap: anywhere;\n }\n .AskHistoryRow_open {\n align-self: center;\n }\n}\n@media (pointer: coarse) {\n .AskHistoryRow_row {\n min-height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n button.AskHistoryRow_row {\n transition: none;\n }\n}\n[data-ds-dark-theme] .AskHistoryRow_frame {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n}\n";
|
|
505
506
|
var id = "dsh-better-ask-user/AskHistoryRow.module.css";
|
|
506
507
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]") === null) {
|
|
507
508
|
const tag = document.createElement("style");
|
|
@@ -516,6 +517,7 @@ var AskHistoryRow_default = {
|
|
|
516
517
|
icon: "AskHistoryRow_icon",
|
|
517
518
|
summary: "AskHistoryRow_summary",
|
|
518
519
|
open: "AskHistoryRow_open",
|
|
520
|
+
state: "AskHistoryRow_state",
|
|
519
521
|
error: "AskHistoryRow_error"
|
|
520
522
|
};
|
|
521
523
|
var css_modules_entry_default = AskHistoryRow_default;
|
|
@@ -577,36 +579,40 @@ function answerList(text) {
|
|
|
577
579
|
}
|
|
578
580
|
return answers;
|
|
579
581
|
}
|
|
580
|
-
function isPending(text) {
|
|
581
|
-
if (text === void 0) return false;
|
|
582
|
-
const parsed = parseJson(text);
|
|
583
|
-
return isRecord(parsed) && parsed.pending === true;
|
|
584
|
-
}
|
|
585
582
|
function AskHistoryRow({
|
|
586
583
|
callId,
|
|
587
584
|
block,
|
|
588
585
|
phase,
|
|
586
|
+
useProjection,
|
|
587
|
+
useQuestionPanelLive,
|
|
589
588
|
revealPanel,
|
|
590
589
|
reviewPanel,
|
|
591
590
|
t
|
|
592
591
|
}) {
|
|
593
592
|
const [failedAction, setFailedAction] = (0, import_react.useState)(null);
|
|
594
|
-
const argsRaw = "kind" in block ? block.call?.argsRaw ?? "" : block.argsRaw;
|
|
593
|
+
const argsRaw = "kind" in block ? block.call?.argsRaw ?? "" : "argsRaw" in block ? block.argsRaw : "";
|
|
595
594
|
const output = "kind" in block ? resultText(block.content) : void 0;
|
|
596
595
|
const questions = questionList(argsRaw);
|
|
597
|
-
const
|
|
598
|
-
const
|
|
596
|
+
const settled = useProjection("userQuestions", (view) => view?.settled.find((row) => row.callId === callId));
|
|
597
|
+
const answers = settled?.answers ?? answerList(output) ?? [];
|
|
598
|
+
const record = questions !== void 0 && phase === "result" ? { questions, answers } : void 0;
|
|
599
|
+
const live = useQuestionPanelLive(callId, (present) => present === true);
|
|
600
|
+
const errorCode = "kind" in block ? block.error?.code : void 0;
|
|
601
|
+
const status = live ? void 0 : errorCode === "ASK_ABORTED" || errorCode === "interrupted" ? t("history.interrupted") : errorCode === "ASK_CANCELLED" ? t("history.cancelled") : void 0;
|
|
599
602
|
const summary = questions?.[0]?.question.split("\n").find((line) => line.trim() !== "")?.trim() ?? t("history.title");
|
|
600
|
-
const
|
|
601
|
-
const
|
|
603
|
+
const action = live ? () => revealPanel(callId) : record === void 0 ? void 0 : () => reviewPanel(callId, record);
|
|
604
|
+
const review = !live && record !== void 0;
|
|
602
605
|
const actionKey = `${callId}-${review ? "review" : "open"}`;
|
|
606
|
+
const actionLabel = review ? t("history.review") : t("history.reopen");
|
|
607
|
+
const trailing = action === void 0 ? status === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: css_modules_entry_default.state, children: status }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: css_modules_entry_default.open, children: [
|
|
608
|
+
status !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: css_modules_entry_default.state, children: status }),
|
|
609
|
+
actionLabel,
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 14 })
|
|
611
|
+
] });
|
|
603
612
|
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
604
613
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: css_modules_entry_default.icon, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconQuestionOutlineRegular, {}) }),
|
|
605
614
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: css_modules_entry_default.summary, title: summary, children: summary }),
|
|
606
|
-
|
|
607
|
-
review ? t("history.review") : t("history.reopen"),
|
|
608
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { size: 14 })
|
|
609
|
-
] })
|
|
615
|
+
trailing
|
|
610
616
|
] });
|
|
611
617
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: css_modules_entry_default.frame, role: "group", "aria-label": t("history.title"), children: [
|
|
612
618
|
action === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: css_modules_entry_default.row, "data-question-history": callId, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -619,7 +625,7 @@ function AskHistoryRow({
|
|
|
619
625
|
onClick: () => {
|
|
620
626
|
setFailedAction(action() ? null : actionKey);
|
|
621
627
|
},
|
|
622
|
-
"aria-label": `${
|
|
628
|
+
"aria-label": `${actionLabel}${status === void 0 ? "" : ` \xB7 ${status}`} \xB7 ${summary}`,
|
|
623
629
|
children: content
|
|
624
630
|
}
|
|
625
631
|
),
|
|
@@ -657,7 +663,7 @@ var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primi
|
|
|
657
663
|
var import_react2 = require("react");
|
|
658
664
|
|
|
659
665
|
// src/client/QuestionWaitBar.module.css
|
|
660
|
-
var css2 =
|
|
666
|
+
var css2 = '/* src/client/QuestionWaitBar.module.css */\n.QuestionWaitBar_bar {\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-surface: var(--dsw-alias-bg-layer-2);\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n display: flex;\n align-items: center;\n flex-shrink: 0;\n gap: 8px;\n min-height: 32px;\n margin: 0 16px 10px;\n padding: 2px 4px 2px 8px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n}\n.QuestionWaitBar_clock {\n position: relative;\n display: grid;\n place-items: center;\n width: 24px;\n height: 24px;\n flex: none;\n}\n.QuestionWaitBar_ring {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n fill: none;\n stroke-width: 2;\n transform: rotate(-90deg);\n}\n.QuestionWaitBar_track {\n stroke: var(--cfg-line);\n}\n.QuestionWaitBar_remaining {\n stroke: var(--cfg-accent);\n}\n.QuestionWaitBar_clockHand {\n width: 8px;\n height: 9px;\n margin-top: -4px;\n margin-left: 5px;\n border-left: 1px solid var(--cfg-muted);\n border-bottom: 1px solid var(--cfg-muted);\n}\n.QuestionWaitBar_pause {\n width: 16px;\n height: 16px;\n color: var(--cfg-muted);\n}\n.QuestionWaitBar_status {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n flex: 1;\n gap: 0 8px;\n min-width: 0;\n}\n.QuestionWaitBar_status > * + *::before {\n content: "\\b7";\n margin-right: 8px;\n color: var(--cfg-muted);\n}\n.QuestionWaitBar_time {\n font-size: 12px;\n line-height: 20px;\n font-variant-numeric: tabular-nums;\n overflow-wrap: anywhere;\n}\n.QuestionWaitBar_bar[data-wait-state=counting] .QuestionWaitBar_time,\n.QuestionWaitBar_bar[data-wait-state=paused] .QuestionWaitBar_time {\n font-size: 13px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n.QuestionWaitBar_policy {\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 20px;\n}\n.QuestionWaitBar_takeTime {\n appearance: none;\n flex: none;\n margin-left: auto;\n min-height: 32px;\n padding: 0 8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--cfg-muted);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n.QuestionWaitBar_takeTime:hover:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.QuestionWaitBar_takeTime:active:not(:disabled) {\n background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);\n}\n.QuestionWaitBar_takeTime:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 2px;\n}\n.QuestionWaitBar_takeTime:disabled {\n opacity: .4;\n cursor: default;\n}\n@media (max-width: 720px) {\n .QuestionWaitBar_bar {\n gap: 8px;\n margin: 0 16px 10px;\n padding: 4px 8px;\n }\n .QuestionWaitBar_status {\n display: grid;\n gap: 2px;\n }\n .QuestionWaitBar_status > * + *::before {\n content: none;\n }\n .QuestionWaitBar_time {\n font-size: 16px;\n line-height: 24px;\n }\n .QuestionWaitBar_takeTime {\n min-height: 44px;\n }\n}\n@media (pointer: coarse) {\n .QuestionWaitBar_takeTime {\n min-height: 44px;\n }\n}\n[data-ds-dark-theme] .QuestionWaitBar_bar {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n}\n';
|
|
661
667
|
var id2 = "dsh-better-ask-user/QuestionWaitBar.module.css";
|
|
662
668
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id2) + "]") === null) {
|
|
663
669
|
const tag = document.createElement("style");
|
|
@@ -676,6 +682,7 @@ var QuestionWaitBar_default = {
|
|
|
676
682
|
pause: "QuestionWaitBar_pause",
|
|
677
683
|
status: "QuestionWaitBar_status",
|
|
678
684
|
time: "QuestionWaitBar_time",
|
|
685
|
+
policy: "QuestionWaitBar_policy",
|
|
679
686
|
takeTime: "QuestionWaitBar_takeTime"
|
|
680
687
|
};
|
|
681
688
|
var css_modules_entry_default2 = QuestionWaitBar_default;
|
|
@@ -701,13 +708,17 @@ function QuestionWaitBar({ card, t, busy, onTakeTime }) {
|
|
|
701
708
|
] }),
|
|
702
709
|
!running ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { className: css_modules_entry_default2.pause, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: continued ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 8 3 3 7-7" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 4v8M10 4v8" }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: css_modules_entry_default2.clockHand })
|
|
703
710
|
] }),
|
|
704
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: css_modules_entry_default2.status, role: held || continued ? "status" : void 0, "aria-atomic": "true", children: [
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: css_modules_entry_default2.time, "aria-label": status, children: held || continued ? status : `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}` }),
|
|
713
|
+
!held && !continued && !running && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: css_modules_entry_default2.policy, children: t("wait.pauseLabel") }),
|
|
714
|
+
!held && !continued && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: css_modules_entry_default2.policy, children: t(card.timeoutMode === "default" ? "wait.auto" : "wait.extend") })
|
|
715
|
+
] }),
|
|
705
716
|
!held && !continued && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: css_modules_entry_default2.takeTime, disabled: busy, onClick: onTakeTime, children: t("wait.takeTime") })
|
|
706
717
|
] });
|
|
707
718
|
}
|
|
708
719
|
|
|
709
720
|
// src/client/PlanReviewPanel.module.css
|
|
710
|
-
var css3 = "/* src/client/PlanReviewPanel.module.css */\n.PlanReviewPanel_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-
|
|
721
|
+
var css3 = "/* src/client/PlanReviewPanel.module.css */\n.PlanReviewPanel_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-surface: var(--dsw-alias-bg-layer-3);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n --cfg-danger: var(--dsw-alias-state-error-primary);\n --cfg-solid: var(--dsw-alias-button-primary-fill, #20709e);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #fff);\n display: flex;\n justify-content: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n padding: 6px calc(var(--dsh-composer-side-clearance, 0px) + 16px) calc(10px + env(safe-area-inset-bottom));\n}\n.PlanReviewPanel_card {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n max-width: var(--dsh-chat-content-width);\n max-height: min(75vh, 640px);\n max-height: min(75dvh, 640px);\n overflow: hidden;\n border: 1px solid var(--dsw-alias-border-l3);\n border-radius: 10px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n.PlanReviewPanel_card,\n.PlanReviewPanel_card * {\n box-sizing: border-box;\n}\n.PlanReviewPanel_strip {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n flex-wrap: wrap;\n gap: 8px;\n min-width: 0;\n padding: 6px 12px;\n border-bottom: 1px solid var(--cfg-line);\n}\n.PlanReviewPanel_panelLabel {\n color: var(--cfg-muted);\n font-size: 12px;\n font-weight: 500;\n line-height: 20px;\n}\n.PlanReviewPanel_previewActions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px;\n min-width: 0;\n margin-left: auto;\n}\n.PlanReviewPanel_summary {\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n padding: 10px 12px;\n}\n.PlanReviewPanel_documentHeading {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n.PlanReviewPanel_documentIcon {\n flex: none;\n width: 18px;\n height: 20px;\n color: var(--dsw-alias-label-tertiary);\n}\n.PlanReviewPanel_title,\n.PlanReviewPanel_description {\n min-width: 0;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n.PlanReviewPanel_title {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n}\n.PlanReviewPanel_description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n margin: 4px 0 0;\n color: var(--cfg-muted);\n font-size: inherit;\n line-height: 20px;\n}\n.PlanReviewPanel_footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n flex-wrap: wrap;\n gap: 8px 12px;\n padding: 8px 12px;\n border-top: 1px solid var(--cfg-line);\n}\n.PlanReviewPanel_feedback {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.PlanReviewPanel_feedback[data-error] {\n color: var(--cfg-danger);\n}\n.PlanReviewPanel_discuss,\n.PlanReviewPanel_primary,\n.PlanReviewPanel_decline {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 32px;\n padding: 0 10px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: transparent;\n color: var(--cfg-ink);\n box-shadow: none;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n}\n.PlanReviewPanel_discuss:hover:not(:disabled) {\n background: var(--cfg-hover);\n}\n.PlanReviewPanel_primary {\n border-color: transparent;\n background: var(--cfg-solid);\n color: var(--cfg-on-solid);\n}\n.PlanReviewPanel_primary:hover:not(:disabled) {\n background: var(--cfg-solid-hover);\n}\n.PlanReviewPanel_spinner {\n flex: none;\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: PlanReviewPanel_spin 800ms linear infinite;\n}\n@keyframes PlanReviewPanel_spin {\n to {\n transform: rotate(360deg);\n }\n}\n.PlanReviewPanel_feedback:empty {\n display: none;\n}\n.PlanReviewPanel_actions {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n.PlanReviewPanel_decline {\n min-height: 32px;\n padding: 0 10px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--cfg-muted);\n font: inherit;\n font-size: inherit;\n line-height: 20px;\n cursor: pointer;\n}\n.PlanReviewPanel_decline:hover:not(:disabled),\n.PlanReviewPanel_decline:active:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.PlanReviewPanel_discuss {\n gap: 6px;\n}\n.PlanReviewPanel_card button:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.PlanReviewPanel_card button:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.PlanReviewPanel_srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n padding: 0;\n border: 0;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n@media (max-width: 720px) {\n .PlanReviewPanel_card {\n max-height: calc(100vh - 160px);\n max-height: calc(100dvh - 160px);\n }\n .PlanReviewPanel_frame {\n padding-inline: 16px;\n }\n .PlanReviewPanel_card button {\n min-height: 44px;\n }\n .PlanReviewPanel_strip {\n padding: 6px 12px;\n }\n .PlanReviewPanel_summary {\n padding: 10px 12px;\n }\n .PlanReviewPanel_footer {\n padding: 8px 12px;\n }\n .PlanReviewPanel_feedback {\n flex: 1 1 100%;\n }\n}\n@media (max-width: 420px) {\n .PlanReviewPanel_actions {\n width: 100%;\n }\n .PlanReviewPanel_actions > button {\n flex: 1;\n }\n}\n@media (pointer: coarse) {\n .PlanReviewPanel_card button {\n min-height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .PlanReviewPanel_spinner {\n animation: none;\n }\n}\n[data-ds-dark-theme] .PlanReviewPanel_frame {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-solid: var(--dsw-alias-button-primary-fill, #4eb0e8);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #0e1014);\n}\n";
|
|
711
722
|
var id3 = "dsh-better-ask-user/PlanReviewPanel.module.css";
|
|
712
723
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id3) + "]") === null) {
|
|
713
724
|
const tag = document.createElement("style");
|
|
@@ -888,7 +899,7 @@ function PlanReviewPanel({ pending, review, t, renderSlot, useQuestionCard }) {
|
|
|
888
899
|
}
|
|
889
900
|
|
|
890
901
|
// src/client/QuestionComposer.module.css
|
|
891
|
-
var css4 = '/* src/client/QuestionComposer.module.css */\n.QuestionComposer_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-line-strong: var(--dsw-alias-border-l3);\n --cfg-surface: var(--dsw-alias-bg-layer-2);\n --cfg-sunken: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, var(--dsw-alias-bg-layer-1));\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: #3388bb;\n --cfg-accent-text: #14587f;\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n --cfg-danger: var(--dsw-alias-state-error-primary);\n --cfg-solid: #20709e;\n --cfg-solid-hover: #1c638d;\n --cfg-on-solid: #fff;\n display: flex;\n justify-content: center;\n padding: 6px calc(var(--dsh-composer-side-clearance) + 16px) calc(10px + env(safe-area-inset-bottom));\n}\n.QuestionComposer_card {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n max-width: var(--dsh-chat-content-width);\n max-height: min(75vh, 640px);\n max-height: min(75dvh, 640px);\n overflow: hidden;\n border: 1px solid var(--cfg-line);\n border-top-color: var(--cfg-accent);\n border-radius: 12px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n font-size: inherit;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n.QuestionComposer_card,\n.QuestionComposer_card * {\n box-sizing: border-box;\n}\n.QuestionComposer_cardMinimized {\n max-height: none;\n}\n.QuestionComposer_header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-shrink: 0;\n gap: 12px;\n padding: 12px 12px 8px 16px;\n}\n.QuestionComposer_headingBlock {\n flex: 1;\n min-width: 0;\n}\n.QuestionComposer_titleRow {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.QuestionComposer_title {\n flex: 1 1 auto;\n margin: 0;\n max-height: 24vh;\n max-height: 24dvh;\n overflow-y: auto;\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n}\n.QuestionComposer_headerChip,\n.QuestionComposer_statusChip {\n display: inline-flex;\n align-items: center;\n flex: none;\n height: 20px;\n max-width: 200px;\n padding: 0 7px;\n overflow: hidden;\n border: 1px solid var(--cfg-line);\n border-radius: 999px;\n background: var(--cfg-sunken);\n color: var(--cfg-muted);\n font-size: 11px;\n line-height: 18px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.QuestionComposer_statusChip {\n border-color: color-mix(in srgb, var(--cfg-accent) 30%, var(--cfg-line));\n background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);\n color: var(--cfg-accent-text);\n font-weight: 500;\n}\n.QuestionComposer_title,\n.QuestionComposer_headerChip,\n.QuestionComposer_statusChip,\n.QuestionComposer_optionLabel,\n.QuestionComposer_description,\n.QuestionComposer_detail {\n min-width: 0;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n.QuestionComposer_title > div,\n.QuestionComposer_headerChip > div,\n.QuestionComposer_statusChip > div,\n.QuestionComposer_optionLabel > div,\n.QuestionComposer_description > div {\n margin: 0;\n}\n.QuestionComposer_title > [data-markdown-variant=compact],\n.QuestionComposer_headerChip > [data-markdown-variant=compact],\n.QuestionComposer_optionLabel > [data-markdown-variant=compact],\n.QuestionComposer_title > [data-markdown-variant=compact] > p,\n.QuestionComposer_headerChip > [data-markdown-variant=compact] > p,\n.QuestionComposer_optionLabel > [data-markdown-variant=compact] > p {\n color: inherit;\n font: inherit;\n}\n.QuestionComposer_headerActions,\n.QuestionComposer_footerActions,\n.QuestionComposer_pager {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n gap: 4px;\n}\n.QuestionComposer_footerActions {\n margin-left: auto;\n gap: 8px;\n}\n.QuestionComposer_iconButton {\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--cfg-muted);\n cursor: pointer;\n}\n.QuestionComposer_iconButton:hover:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.QuestionComposer_card button:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.QuestionComposer_card button:disabled {\n cursor: default;\n}\n.QuestionComposer_iconButton:disabled,\n.QuestionComposer_footerActions > button:disabled,\n.QuestionComposer_card[aria-busy=true] .QuestionComposer_option {\n opacity: 0.4;\n}\n.QuestionComposer_iconButton:active:not(:disabled),\n.QuestionComposer_option:active:not(:disabled) {\n background: var(--cfg-hover);\n}\n.QuestionComposer_body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n}\n.QuestionComposer_detail {\n margin: 0 16px 8px;\n color: var(--cfg-muted);\n}\n.QuestionComposer_options {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0 8px 8px;\n}\n.QuestionComposer_option,\n.QuestionComposer_customRow {\n display: flex;\n align-items: flex-start;\n flex-shrink: 0;\n gap: 8px;\n width: 100%;\n min-height: 36px;\n padding: 7px 8px;\n border: 1px solid transparent;\n border-radius: 8px;\n transition: background-color 140ms ease, border-color 140ms ease;\n}\n.QuestionComposer_option {\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n font: inherit;\n}\n.QuestionComposer_option:hover:not(:disabled),\n.QuestionComposer_customRow:hover {\n background: var(--cfg-hover);\n}\n.QuestionComposer_optionSelected,\n.QuestionComposer_optionSelected:hover:not(:disabled),\n.QuestionComposer_customRowActive {\n border-color: var(--cfg-accent);\n background: color-mix(in srgb, var(--cfg-accent) 8%, transparent);\n}\n.QuestionComposer_radio,\n.QuestionComposer_checkbox,\n.QuestionComposer_customIcon {\n display: grid;\n place-items: center;\n flex: 0 0 20px;\n width: 20px;\n height: 20px;\n color: var(--cfg-muted);\n}\n.QuestionComposer_radio::before,\n.QuestionComposer_checkbox::before {\n content: "";\n box-sizing: border-box;\n grid-area: 1 / 1;\n width: 16px;\n height: 16px;\n border: 1px solid var(--dsw-alias-border-l4);\n}\n.QuestionComposer_radio::before {\n border-radius: 50%;\n}\n.QuestionComposer_radioChecked::before {\n border: 5px solid var(--cfg-accent);\n}\n.QuestionComposer_checkbox::before {\n border-radius: 4px;\n}\n.QuestionComposer_checkbox > svg {\n grid-area: 1 / 1;\n}\n.QuestionComposer_checkboxChecked {\n color: var(--cfg-accent);\n}\n.QuestionComposer_checkboxChecked::before {\n border-color: currentColor;\n background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);\n}\n.QuestionComposer_optionCopy {\n display: grid;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.QuestionComposer_optionLine {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 2px 6px;\n}\n.QuestionComposer_optionLabel {\n display: block;\n font-size: inherit;\n font-weight: 500;\n line-height: 20px;\n}\n.QuestionComposer_badge {\n display: inline-flex;\n align-items: center;\n height: 20px;\n padding: 0 6px;\n border: 1px solid color-mix(in srgb, var(--cfg-accent) 30%, var(--cfg-line));\n border-radius: 999px;\n background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);\n color: var(--cfg-accent-text);\n font-size: 11px;\n font-weight: 500;\n line-height: 18px;\n}\n.QuestionComposer_description {\n display: block;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n font-weight: 400;\n}\n.QuestionComposer_reviewNote {\n margin: 0;\n padding: 6px 8px;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 20px;\n}\n.QuestionComposer_customRow {\n margin-top: 8px;\n border-color: var(--cfg-line);\n background: var(--cfg-surface);\n}\n.QuestionComposer_customRow:has(.QuestionComposer_fieldInput:focus-visible),\n.QuestionComposer_customBlock:has(.QuestionComposer_fieldInput:focus-visible) {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.QuestionComposer_field {\n display: grid;\n min-width: 0;\n --dsh-answer-field-padding: 0;\n}\n.QuestionComposer_field > * {\n grid-area: 1 / 1;\n min-width: 0;\n padding: var(--dsh-answer-field-padding);\n font: inherit;\n font-size: inherit;\n line-height: 20px;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n.QuestionComposer_fieldMirror {\n box-sizing: content-box;\n max-height: 120px;\n overflow: hidden;\n visibility: hidden;\n}\n.QuestionComposer_fieldInput {\n resize: none;\n overflow-y: auto;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--cfg-ink);\n caret-color: var(--cfg-accent);\n}\n.QuestionComposer_fieldInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n.QuestionComposer_customInline {\n flex: 1;\n}\n.QuestionComposer_customBlock {\n min-height: 60px;\n flex-shrink: 0;\n margin: 0 8px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: var(--cfg-surface);\n --dsh-answer-field-padding: 8px 12px;\n}\n.QuestionComposer_footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n gap: 8px;\n padding: 8px 12px;\n border-top: 1px solid var(--cfg-line);\n}\n.QuestionComposer_progress {\n padding: 0 4px;\n color: var(--cfg-muted);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 20px;\n white-space: nowrap;\n}\n.QuestionComposer_feedback {\n flex: 1;\n min-width: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n text-align: right;\n}\n.QuestionComposer_feedback[data-error] {\n color: var(--cfg-danger);\n}\n.QuestionComposer_button,\n.QuestionComposer_primary {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 32px;\n padding: 0 12px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n box-shadow: none;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition:\n background-color 140ms ease,\n border-color 140ms ease,\n color 140ms ease;\n}\n.QuestionComposer_button:hover:not(:disabled) {\n background: var(--cfg-hover);\n}\n.QuestionComposer_primary {\n min-width: 128px;\n border-color: transparent;\n background: var(--cfg-solid);\n color: var(--cfg-on-solid);\n}\n.QuestionComposer_primary:hover:not(:disabled) {\n background: var(--cfg-solid-hover);\n}\n.QuestionComposer_button:active:not(:disabled),\n.QuestionComposer_primary:active:not(:disabled) {\n background: color-mix(in srgb, var(--cfg-accent) 12%, var(--cfg-surface));\n}\n.QuestionComposer_iconButton,\n.QuestionComposer_option {\n appearance: none;\n box-shadow: none;\n}\n.QuestionComposer_spinner {\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: QuestionComposer_spin 800ms linear infinite;\n}\n@keyframes QuestionComposer_spin {\n to {\n transform: rotate(360deg);\n }\n}\n.QuestionComposer_feedback:empty {\n display: none;\n}\n@media (max-width: 720px) {\n .QuestionComposer_card {\n max-height: calc(100vh - 160px);\n max-height: calc(100dvh - 160px);\n }\n .QuestionComposer_header {\n gap: 8px;\n padding: 10px 8px 8px 12px;\n }\n .QuestionComposer_field > * {\n font-size: 16px;\n line-height: 24px;\n }\n .QuestionComposer_fieldMirror {\n max-height: 144px;\n }\n .QuestionComposer_footer {\n flex-wrap: wrap;\n padding: 8px;\n }\n .QuestionComposer_feedback {\n flex: 1 1 100%;\n order: 1;\n text-align: left;\n }\n .QuestionComposer_footerActions {\n margin-left: auto;\n }\n}\n@media (max-width: 420px) {\n .QuestionComposer_header {\n flex-wrap: wrap;\n }\n .QuestionComposer_headingBlock {\n flex-basis: calc(100% - 104px);\n }\n .QuestionComposer_footerActions {\n flex: 1 1 100%;\n }\n .QuestionComposer_footerActions > button {\n flex: 1;\n }\n}\n@media (pointer: coarse) {\n .QuestionComposer_option,\n .QuestionComposer_customRow,\n .QuestionComposer_card button {\n min-height: 44px;\n }\n .QuestionComposer_iconButton {\n width: 44px;\n height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .QuestionComposer_spinner {\n animation: none;\n }\n .QuestionComposer_option,\n .QuestionComposer_customRow {\n transition: none;\n }\n}\n[data-ds-dark-theme] .QuestionComposer_frame {\n --cfg-accent: #4eb0e8;\n --cfg-accent-text: #6fc0ee;\n --cfg-solid: #4eb0e8;\n --cfg-solid-hover: #6fc0ee;\n --cfg-on-solid: #0e1014;\n}\n';
|
|
902
|
+
var css4 = '/* src/client/QuestionComposer.module.css */\n.QuestionComposer_frame {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-surface: var(--dsw-alias-bg-layer-3);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n --cfg-danger: var(--dsw-alias-state-error-primary);\n --cfg-solid: var(--dsw-alias-button-primary-fill, #20709e);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #fff);\n display: flex;\n justify-content: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n padding: 6px calc(var(--dsh-composer-side-clearance, 0px) + 16px) calc(10px + env(safe-area-inset-bottom));\n}\n.QuestionComposer_card {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n max-width: var(--dsh-chat-content-width);\n max-height: min(75vh, 640px);\n max-height: min(75dvh, 640px);\n overflow: hidden;\n border: 1px solid var(--dsw-alias-border-l3);\n border-radius: 10px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n font-size: inherit;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n.QuestionComposer_card,\n.QuestionComposer_card * {\n box-sizing: border-box;\n}\n.QuestionComposer_cardMinimized {\n max-height: none;\n}\n.QuestionComposer_header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-shrink: 0;\n gap: 12px;\n padding: 10px 12px 6px;\n}\n.QuestionComposer_headingBlock {\n flex: 1;\n min-width: 0;\n}\n.QuestionComposer_eyebrow {\n margin-bottom: 2px;\n color: var(--cfg-muted);\n font-size: 11px;\n line-height: 16px;\n}\n.QuestionComposer_title {\n margin: 0;\n max-height: 24vh;\n max-height: 24dvh;\n overflow-y: auto;\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n}\n.QuestionComposer_title,\n.QuestionComposer_eyebrow,\n.QuestionComposer_optionLabel,\n.QuestionComposer_description,\n.QuestionComposer_detail {\n min-width: 0;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n.QuestionComposer_title > div,\n.QuestionComposer_eyebrow > div,\n.QuestionComposer_optionLabel > div,\n.QuestionComposer_description > div {\n margin: 0;\n}\n.QuestionComposer_title > [data-markdown-variant=compact],\n.QuestionComposer_optionLabel > [data-markdown-variant=compact],\n.QuestionComposer_title > [data-markdown-variant=compact] > p,\n.QuestionComposer_optionLabel > [data-markdown-variant=compact] > p {\n color: inherit;\n font: inherit;\n}\n.QuestionComposer_headerActions,\n.QuestionComposer_footerActions,\n.QuestionComposer_pager {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n gap: 4px;\n}\n.QuestionComposer_footerActions {\n margin-left: auto;\n gap: 8px;\n}\n.QuestionComposer_iconButton {\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--cfg-muted);\n cursor: pointer;\n}\n.QuestionComposer_iconButton:hover:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.QuestionComposer_card button:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.QuestionComposer_card button:disabled {\n cursor: default;\n}\n.QuestionComposer_iconButton:disabled,\n.QuestionComposer_footerActions > button:disabled,\n.QuestionComposer_card[aria-busy=true] .QuestionComposer_option {\n opacity: 0.4;\n}\n.QuestionComposer_iconButton:active:not(:disabled),\n.QuestionComposer_option:active:not(:disabled) {\n background: var(--cfg-hover);\n}\n.QuestionComposer_body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n}\n.QuestionComposer_detail {\n margin: 0 16px 8px;\n color: var(--cfg-muted);\n}\n.QuestionComposer_options {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0 6px 6px;\n}\n.QuestionComposer_option,\n.QuestionComposer_customRow {\n display: flex;\n align-items: flex-start;\n flex-shrink: 0;\n gap: 8px;\n width: 100%;\n min-height: 32px;\n padding: 4px 8px;\n border: 1px solid transparent;\n border-radius: 8px;\n}\n.QuestionComposer_option {\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n font: inherit;\n}\n.QuestionComposer_option:hover:not(:disabled),\n.QuestionComposer_customRow:hover {\n background: var(--cfg-hover);\n}\n.QuestionComposer_optionSelected,\n.QuestionComposer_optionSelected:hover:not(:disabled),\n.QuestionComposer_customRowActive {\n border-color: var(--cfg-accent);\n background: color-mix(in srgb, var(--cfg-accent) 8%, transparent);\n}\n.QuestionComposer_radio,\n.QuestionComposer_checkbox,\n.QuestionComposer_customIcon {\n display: grid;\n place-items: center;\n flex: 0 0 20px;\n width: 20px;\n height: 20px;\n color: var(--cfg-muted);\n}\n.QuestionComposer_radio::before,\n.QuestionComposer_checkbox::before {\n content: "";\n box-sizing: border-box;\n grid-area: 1 / 1;\n width: 16px;\n height: 16px;\n border: 1px solid var(--dsw-alias-border-l4);\n}\n.QuestionComposer_radio::before {\n border-radius: 50%;\n}\n.QuestionComposer_radioChecked::before {\n border-color: var(--cfg-accent);\n}\n.QuestionComposer_radioChecked::after {\n content: "";\n grid-area: 1 / 1;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--cfg-accent);\n}\n.QuestionComposer_checkbox::before {\n border-radius: 4px;\n}\n.QuestionComposer_checkbox > svg {\n grid-area: 1 / 1;\n}\n.QuestionComposer_checkboxChecked {\n color: var(--cfg-accent);\n}\n.QuestionComposer_checkboxChecked::before {\n border-color: currentColor;\n background: color-mix(in srgb, var(--cfg-accent) 10%, transparent);\n}\n.QuestionComposer_optionCopy {\n display: grid;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.QuestionComposer_optionLine {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 2px 6px;\n}\n.QuestionComposer_optionLabel {\n display: block;\n font-size: inherit;\n font-weight: 500;\n line-height: 20px;\n}\n.QuestionComposer_badge {\n padding: 0 4px;\n border: 1px solid var(--cfg-line);\n border-radius: 4px;\n color: var(--cfg-muted);\n font-size: 11px;\n font-weight: 400;\n line-height: 16px;\n}\n.QuestionComposer_description {\n display: block;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n}\n.QuestionComposer_reviewStatus {\n margin: 0;\n padding: 0 16px 8px;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 20px;\n}\n.QuestionComposer_reviewNote {\n margin: 0;\n padding: 6px 8px;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 20px;\n}\n.QuestionComposer_customRow {\n margin-top: 8px;\n border-color: var(--cfg-line);\n background: var(--dsw-alias-bg-layer-1);\n}\n.QuestionComposer_customRow:has(.QuestionComposer_fieldInput:focus-visible),\n.QuestionComposer_customBlock:has(.QuestionComposer_fieldInput:focus-visible) {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -2px;\n}\n.QuestionComposer_field {\n display: grid;\n min-width: 0;\n --dsh-answer-field-padding: 0;\n}\n.QuestionComposer_field > * {\n grid-area: 1 / 1;\n min-width: 0;\n padding: var(--dsh-answer-field-padding);\n font: inherit;\n font-size: inherit;\n line-height: 20px;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n.QuestionComposer_fieldMirror {\n box-sizing: content-box;\n max-height: 120px;\n overflow: hidden;\n visibility: hidden;\n}\n.QuestionComposer_fieldInput {\n resize: none;\n overflow-y: auto;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--cfg-ink);\n caret-color: var(--cfg-accent);\n}\n.QuestionComposer_fieldInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n.QuestionComposer_customInline {\n flex: 1;\n}\n.QuestionComposer_customBlock {\n min-height: 60px;\n flex-shrink: 0;\n margin: 0 8px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n --dsh-answer-field-padding: 8px 12px;\n}\n.QuestionComposer_footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n gap: 8px;\n padding: 6px 12px;\n border-top: 1px solid var(--cfg-line);\n}\n.QuestionComposer_progress {\n padding: 0 4px;\n color: var(--cfg-muted);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n line-height: 20px;\n white-space: nowrap;\n}\n.QuestionComposer_feedback {\n flex: 1;\n min-width: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n text-align: right;\n}\n.QuestionComposer_feedback[data-error] {\n color: var(--cfg-danger);\n}\n.QuestionComposer_button,\n.QuestionComposer_primary {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-height: 32px;\n padding: 0 12px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n box-shadow: none;\n background: transparent;\n color: var(--cfg-ink);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n}\n.QuestionComposer_button:hover:not(:disabled) {\n background: var(--cfg-hover);\n}\n.QuestionComposer_primary {\n min-width: 128px;\n border-color: transparent;\n background: var(--cfg-solid);\n color: var(--cfg-on-solid);\n}\n.QuestionComposer_primary:hover:not(:disabled) {\n background: var(--cfg-solid-hover);\n}\n.QuestionComposer_iconButton,\n.QuestionComposer_option {\n appearance: none;\n box-shadow: none;\n}\n.QuestionComposer_spinner {\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: QuestionComposer_spin 800ms linear infinite;\n}\n@keyframes QuestionComposer_spin {\n to {\n transform: rotate(360deg);\n }\n}\n.QuestionComposer_feedback:empty {\n display: none;\n}\n@media (max-width: 720px) {\n .QuestionComposer_card {\n max-height: calc(100vh - 160px);\n max-height: calc(100dvh - 160px);\n }\n .QuestionComposer_frame {\n padding-inline: 16px;\n }\n .QuestionComposer_header {\n gap: 8px;\n padding: 12px 16px 8px;\n }\n .QuestionComposer_field > * {\n font-size: 16px;\n line-height: 24px;\n }\n .QuestionComposer_fieldMirror {\n max-height: 144px;\n }\n .QuestionComposer_option,\n .QuestionComposer_customRow,\n .QuestionComposer_card button {\n min-height: 44px;\n }\n .QuestionComposer_iconButton {\n width: 44px;\n height: 44px;\n }\n .QuestionComposer_footer {\n flex-wrap: wrap;\n padding: 8px 12px;\n }\n .QuestionComposer_feedback {\n flex: 1 1 100%;\n order: 1;\n text-align: left;\n }\n .QuestionComposer_footerActions {\n margin-left: auto;\n }\n}\n@media (max-width: 420px) {\n .QuestionComposer_header {\n flex-wrap: wrap;\n }\n .QuestionComposer_headingBlock {\n flex-basis: calc(100% - 104px);\n }\n .QuestionComposer_footerActions {\n flex: 1 1 100%;\n }\n .QuestionComposer_footerActions > button {\n flex: 1;\n }\n}\n@media (pointer: coarse) {\n .QuestionComposer_option,\n .QuestionComposer_customRow,\n .QuestionComposer_card button {\n min-height: 44px;\n }\n .QuestionComposer_iconButton {\n width: 44px;\n height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .QuestionComposer_spinner {\n animation: none;\n }\n .QuestionComposer_option,\n .QuestionComposer_customRow {\n transition: none;\n }\n}\n[data-ds-dark-theme] .QuestionComposer_frame {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-solid: var(--dsw-alias-button-primary-fill, #4eb0e8);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #0e1014);\n}\n';
|
|
892
903
|
var id4 = "dsh-better-ask-user/QuestionComposer.module.css";
|
|
893
904
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id4) + "]") === null) {
|
|
894
905
|
const tag = document.createElement("style");
|
|
@@ -903,10 +914,8 @@ var QuestionComposer_default = {
|
|
|
903
914
|
cardMinimized: "QuestionComposer_cardMinimized",
|
|
904
915
|
header: "QuestionComposer_header",
|
|
905
916
|
headingBlock: "QuestionComposer_headingBlock",
|
|
906
|
-
|
|
917
|
+
eyebrow: "QuestionComposer_eyebrow",
|
|
907
918
|
title: "QuestionComposer_title",
|
|
908
|
-
headerChip: "QuestionComposer_headerChip",
|
|
909
|
-
statusChip: "QuestionComposer_statusChip",
|
|
910
919
|
optionLabel: "QuestionComposer_optionLabel",
|
|
911
920
|
description: "QuestionComposer_description",
|
|
912
921
|
detail: "QuestionComposer_detail",
|
|
@@ -928,6 +937,7 @@ var QuestionComposer_default = {
|
|
|
928
937
|
optionCopy: "QuestionComposer_optionCopy",
|
|
929
938
|
optionLine: "QuestionComposer_optionLine",
|
|
930
939
|
badge: "QuestionComposer_badge",
|
|
940
|
+
reviewStatus: "QuestionComposer_reviewStatus",
|
|
931
941
|
reviewNote: "QuestionComposer_reviewNote",
|
|
932
942
|
fieldInput: "QuestionComposer_fieldInput",
|
|
933
943
|
customBlock: "QuestionComposer_customBlock",
|
|
@@ -1245,7 +1255,8 @@ function QuestionFlow({ pending, t, useStore, useQuestionCard, actions }) {
|
|
|
1245
1255
|
"aria-busy": busy !== null,
|
|
1246
1256
|
children: [
|
|
1247
1257
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: css_modules_entry_default4.header, children: [
|
|
1248
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: css_modules_entry_default4.headingBlock, children: [
|
|
1259
|
+
question.header !== void 0 && question.header.trim() !== question.question.trim() && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: css_modules_entry_default4.eyebrow, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.MarkdownText, { text: question.header, variant: "compact", labels: markdownLabels }) }),
|
|
1249
1260
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1250
1261
|
"div",
|
|
1251
1262
|
{
|
|
@@ -1255,10 +1266,8 @@ function QuestionFlow({ pending, t, useStore, useQuestionCard, actions }) {
|
|
|
1255
1266
|
"aria-level": 2,
|
|
1256
1267
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.MarkdownText, { text: question.question, variant: "compact", labels: markdownLabels })
|
|
1257
1268
|
}
|
|
1258
|
-
)
|
|
1259
|
-
|
|
1260
|
-
review !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: css_modules_entry_default4.statusChip, children: t("review.status") })
|
|
1261
|
-
] }) }),
|
|
1269
|
+
)
|
|
1270
|
+
] }),
|
|
1262
1271
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: css_modules_entry_default4.headerActions, children: [
|
|
1263
1272
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1264
1273
|
"button",
|
|
@@ -1290,6 +1299,7 @@ function QuestionFlow({ pending, t, useStore, useQuestionCard, actions }) {
|
|
|
1290
1299
|
] })
|
|
1291
1300
|
] }),
|
|
1292
1301
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(QuestionWaitBar, { card, t, busy: busy !== null, onTakeTime: takeTime }),
|
|
1302
|
+
review !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: css_modules_entry_default4.reviewStatus, children: review.length === 0 ? t("review.unanswered") : t("review.status") }),
|
|
1293
1303
|
!minimized && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1294
1304
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1295
1305
|
"div",
|
|
@@ -1568,7 +1578,7 @@ var import_react5 = require("react");
|
|
|
1568
1578
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1569
1579
|
|
|
1570
1580
|
// src/client/QuestionReplyView.module.css
|
|
1571
|
-
var css5 = "/* src/client/QuestionReplyView.module.css */\n.QuestionReplyView_row {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-
|
|
1581
|
+
var css5 = "/* src/client/QuestionReplyView.module.css */\n.QuestionReplyView_row {\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-surface: var(--dsw-alias-bg-layer-3);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n min-width: 0;\n padding: 4px 0;\n}\n.QuestionReplyView_bubble {\n max-width: 85%;\n min-width: 0;\n overflow: hidden;\n border: 1px solid var(--cfg-line);\n border-radius: 10px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n font-size: inherit;\n line-height: 1.5;\n text-align: left;\n overflow-wrap: anywhere;\n}\n.QuestionReplyView_toggle {\n appearance: none;\n display: block;\n width: 100%;\n padding: 8px 10px;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n text-align: left;\n}\n.QuestionReplyView_toggle:hover {\n background: var(--cfg-hover);\n}\n.QuestionReplyView_toggle:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: -3px;\n border-radius: 8px;\n}\n.QuestionReplyView_labelRow {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.QuestionReplyView_caret {\n display: inline-flex;\n flex: none;\n color: var(--cfg-muted);\n}\n.QuestionReplyView_caret svg {\n width: 12px;\n height: 12px;\n}\n.QuestionReplyView_label {\n color: var(--cfg-muted);\n font-size: 12px;\n font-weight: 500;\n}\n.QuestionReplyView_summary {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n overflow: hidden;\n margin-top: 4px;\n white-space: pre-wrap;\n}\n.QuestionReplyView_text {\n margin: 0;\n padding: 0 10px 10px;\n white-space: pre-wrap;\n}\n.QuestionReplyView_details {\n max-height: min(50vh, 400px);\n margin: 0;\n padding: 0 10px 10px;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-gutter: stable;\n}\n.QuestionReplyView_details > div {\n padding-top: 10px;\n border-top: 1px solid var(--cfg-line);\n}\n.QuestionReplyView_details > div + div {\n margin-top: 12px;\n}\n.QuestionReplyView_question {\n display: grid;\n gap: 4px;\n font-size: inherit;\n}\n.QuestionReplyView_questionText {\n font-weight: 500;\n}\n.QuestionReplyView_header,\n.QuestionReplyView_detail,\n.QuestionReplyView_options {\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.QuestionReplyView_detail {\n white-space: pre-wrap;\n}\n.QuestionReplyView_options {\n display: grid;\n gap: 4px;\n margin: 4px 0 0;\n padding: 0;\n list-style: none;\n}\n.QuestionReplyView_options li {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 6px;\n border-radius: 6px;\n}\n.QuestionReplyView_options li[data-selected] {\n color: var(--cfg-ink);\n background: color-mix(in srgb, var(--cfg-accent) 9%, transparent);\n}\n.QuestionReplyView_selection {\n display: grid;\n place-items: center;\n width: 16px;\n height: 18px;\n flex: none;\n color: var(--cfg-accent-text);\n}\n.QuestionReplyView_optionCopy {\n display: grid;\n min-width: 0;\n gap: 2px;\n}\n.QuestionReplyView_optionDescription {\n color: var(--cfg-muted);\n}\n.QuestionReplyView_answer {\n margin: 8px 0 0;\n white-space: pre-wrap;\n}\n.QuestionReplyView_answerLabel {\n margin-right: 4px;\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.QuestionReplyView_actions {\n display: flex;\n align-items: center;\n gap: 4px;\n padding-right: 2px;\n color: var(--dsw-alias-label-tertiary);\n}\n.QuestionReplyView_time {\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n}\n.QuestionReplyView_action {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.QuestionReplyView_action svg {\n width: 14px;\n height: 14px;\n}\n.QuestionReplyView_action:hover:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.QuestionReplyView_action:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 2px;\n}\n.QuestionReplyView_action:disabled {\n opacity: .4;\n cursor: default;\n}\n.QuestionReplyView_copyFeedback {\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.QuestionReplyView_copyFeedback[role=alert] {\n color: var(--dsw-alias-state-error-primary);\n}\n.QuestionReplyView_copyFeedback:empty {\n display: none;\n}\n.QuestionReplyView_spinner {\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: QuestionReplyView_spin 800ms linear infinite;\n}\n@keyframes QuestionReplyView_spin {\n to {\n transform: rotate(360deg);\n }\n}\n.QuestionReplyView_question,\n.QuestionReplyView_answer,\n.QuestionReplyView_text {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n@media (max-width: 640px) {\n .QuestionReplyView_bubble {\n max-width: 100%;\n }\n .QuestionReplyView_toggle {\n min-height: 44px;\n }\n .QuestionReplyView_action {\n width: 44px;\n height: 44px;\n }\n}\n@media (pointer: coarse) {\n .QuestionReplyView_toggle {\n min-height: 44px;\n }\n .QuestionReplyView_action {\n width: 44px;\n height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .QuestionReplyView_toggle {\n transition: none;\n }\n .QuestionReplyView_spinner {\n animation: none;\n }\n}\n[data-ds-dark-theme] .QuestionReplyView_row {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n}\n";
|
|
1572
1582
|
var id5 = "dsh-better-ask-user/QuestionReplyView.module.css";
|
|
1573
1583
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id5) + "]") === null) {
|
|
1574
1584
|
const tag = document.createElement("style");
|
|
@@ -1702,7 +1712,9 @@ var zh = {
|
|
|
1702
1712
|
"history.title": "\u95EE\u9898",
|
|
1703
1713
|
"history.review": "\u67E5\u770B",
|
|
1704
1714
|
"history.reopen": "\u6253\u5F00",
|
|
1705
|
-
"history.
|
|
1715
|
+
"history.interrupted": "\u5DF2\u4E2D\u65AD",
|
|
1716
|
+
"history.cancelled": "\u5DF2\u53D6\u6D88",
|
|
1717
|
+
"history.unavailable": "\u8FD9\u4E2A\u95EE\u9898\u5DF2\u7ED3\u675F\uFF0C\u65E0\u6CD5\u6253\u5F00\u3002",
|
|
1706
1718
|
"reply.copyFailed": "\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
1707
1719
|
"wait.takeTime": "\u6162\u6162\u56DE\u7B54",
|
|
1708
1720
|
"wait.countdown": "{seconds} \u79D2\u540E\u7EE7\u7EED\u5DE5\u4F5C",
|
|
@@ -1714,6 +1726,7 @@ var zh = {
|
|
|
1714
1726
|
"wait.auto": "\u5230\u70B9\u5C06\u81EA\u52A8\u9009\u62E9\u9ED8\u8BA4\u9879",
|
|
1715
1727
|
"wait.continued": "\u5DF2\u7EE7\u7EED\u5DE5\u4F5C\uFF0C\u4ECD\u53EF\u56DE\u7B54",
|
|
1716
1728
|
"review.status": "\u5DF2\u56DE\u7B54",
|
|
1729
|
+
"review.unanswered": "\u672A\u6536\u5230\u56DE\u7B54",
|
|
1717
1730
|
"review.skipped": "\u8FD9\u9053\u95EE\u9898\u5F53\u65F6\u88AB\u8DF3\u8FC7\u3002",
|
|
1718
1731
|
"reply.label": "\u95EE\u9898\u56DE\u590D",
|
|
1719
1732
|
"reply.open": "\u5C55\u5F00\u95EE\u9898\u8BE6\u60C5",
|
|
@@ -1744,7 +1757,9 @@ var en = {
|
|
|
1744
1757
|
"history.title": "Question",
|
|
1745
1758
|
"history.review": "Review",
|
|
1746
1759
|
"history.reopen": "Open",
|
|
1747
|
-
"history.
|
|
1760
|
+
"history.interrupted": "Interrupted",
|
|
1761
|
+
"history.cancelled": "Cancelled",
|
|
1762
|
+
"history.unavailable": "This question has ended and cannot be reopened.",
|
|
1748
1763
|
"reply.copyFailed": "Copy failed. Try again.",
|
|
1749
1764
|
"wait.takeTime": "Take time",
|
|
1750
1765
|
"wait.countdown": "Continuing in {seconds}s",
|
|
@@ -1756,6 +1771,7 @@ var en = {
|
|
|
1756
1771
|
"wait.auto": "Auto-selects defaults at timeout",
|
|
1757
1772
|
"wait.continued": "Work continued \u2014 you can still answer",
|
|
1758
1773
|
"review.status": "Answered",
|
|
1774
|
+
"review.unanswered": "No answer recorded",
|
|
1759
1775
|
"review.skipped": "This question was skipped.",
|
|
1760
1776
|
"reply.label": "Question reply",
|
|
1761
1777
|
"reply.open": "Open question details",
|
|
@@ -1785,27 +1801,32 @@ var import_react6 = require("react");
|
|
|
1785
1801
|
var settingsZh = {
|
|
1786
1802
|
summary: "\u7B49\u5F85\u4E0E\u8D85\u65F6",
|
|
1787
1803
|
title: "\u63D0\u95EE",
|
|
1788
|
-
|
|
1804
|
+
purpose: "\u8BBE\u7F6E\u7B49\u5F85\u56DE\u7B54\u7684\u65F6\u957F\uFF0C\u4EE5\u53CA\u5230\u671F\u540E\u5982\u4F55\u5904\u7406\u95EE\u9898\u3002",
|
|
1805
|
+
waitLabel: "\u7B49\u5F85\u56DE\u7B54",
|
|
1789
1806
|
durationLabel: "\u7B49\u5F85\u65F6\u957F\uFF08\u79D2\uFF09",
|
|
1807
|
+
presetLabel: "\u5FEB\u6377\u65F6\u957F",
|
|
1790
1808
|
timed: "\u5012\u8BA1\u65F6",
|
|
1791
1809
|
unlimited: "\u4E0D\u9650\u65F6",
|
|
1792
1810
|
seconds: "\u79D2",
|
|
1811
|
+
secondShort: "\u79D2",
|
|
1812
|
+
minuteShort: "\u5206",
|
|
1793
1813
|
waitHint: "\u8F93\u5165\u65F6\u91CD\u65B0\u8BA1\u65F6\u3002",
|
|
1794
|
-
unlimitedHint: "\u4E00\u76F4\u7B49\u5F85\u56DE\u7B54\uFF0C\
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1814
|
+
unlimitedHint: "\u4E00\u76F4\u7B49\u5F85\u56DE\u7B54\uFF0C\u4E0D\u89E6\u53D1\u8D85\u65F6\u64CD\u4F5C\u3002",
|
|
1815
|
+
timelineAsk: "\u63D0\u95EE\u53D1\u51FA",
|
|
1816
|
+
timelineWait: "\u7B49\u5F85",
|
|
1817
|
+
timelineEnd: "\u5230\u671F",
|
|
1818
|
+
timeoutTitle: "\u5230\u671F\u540E",
|
|
1819
|
+
goalBehaviorLabel: "\u76EE\u6807\u8FDB\u884C\u4E2D",
|
|
1820
|
+
native: "\u4FDD\u6301\u95EE\u9898\u5F00\u653E",
|
|
1821
|
+
default: "\u63D0\u4EA4\u9ED8\u8BA4\u7B54\u6848",
|
|
1822
|
+
nativeHint: "\u5230\u671F\u540E\u95EE\u9898\u4ECD\u53EF\u56DE\u7B54\uFF0C\u7EE7\u7EED\u72EC\u7ACB\u5DE5\u4F5C\uFF0C\u4E0D\u81EA\u52A8\u6279\u51C6\u3002",
|
|
1823
|
+
defaultHint: "\u4EC5\u5BF9\u6709\u9ED8\u8BA4\u7B54\u6848\u7684\u95EE\u9898\u751F\u6548\uFF1B\u81EA\u52A8\u9009\u62E9\u4F1A\u88AB\u6807\u8BB0\uFF1B\u6CA1\u6709\u9ED8\u8BA4\u7B54\u6848\u65F6\u4FDD\u6301\u5F00\u653E\u3002",
|
|
1824
|
+
goalExplain: "\u76EE\u6807\u8FD0\u884C\u65F6\u63D0\u95EE\u53EF\u80FD\u963B\u585E\u7EED\u8DD1\uFF1B\u8FD9\u91CC\u5355\u72EC\u8BBE\u7F6E\u5230\u671F\u884C\u4E3A\u3002",
|
|
1801
1825
|
discard: "\u653E\u5F03\u6539\u52A8",
|
|
1802
|
-
|
|
1803
|
-
defaultHint: "\u8D85\u65F6\u540E\u81EA\u52A8\u63D0\u4EA4\u9ED8\u8BA4\u7B54\u6848\u3002",
|
|
1804
|
-
timeoutDisabled: "\u4E0D\u9650\u65F6\u6A21\u5F0F\u4E0B\u4E0D\u89E6\u53D1\u8D85\u65F6\u884C\u4E3A\uFF0C\u4FDD\u7559\u4EE5\u4E0B\u6B21\u4F7F\u7528\u3002",
|
|
1805
|
-
readonly: "\u5F53\u524D\u914D\u7F6E\u4E3A\u53EA\u8BFB\u3002",
|
|
1826
|
+
readonly: "\u5F53\u524D\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",
|
|
1806
1827
|
loading: "\u6B63\u5728\u8BFB\u53D6\u8BBE\u7F6E\u2026",
|
|
1807
|
-
unavailable: "\u5F53\u524D\u8FDE\u63A5\u4E0B\
|
|
1808
|
-
waiting: "\u6B63\u5728\u7B49\u5F85\
|
|
1828
|
+
unavailable: "\u5F53\u524D\u8FDE\u63A5\u4E0B\u65E0\u6CD5\u4F7F\u7528\u8FD9\u4E9B\u8BBE\u7F6E\u3002",
|
|
1829
|
+
waiting: "\u6B63\u5728\u7B49\u5F85\u8BBE\u7F6E\u2026",
|
|
1809
1830
|
invalidWait: "\u7B49\u5F85\u65F6\u957F\u987B\u4E3A 1 \u5230 2147483 \u7684\u6574\u6570\u3002",
|
|
1810
1831
|
save: "\u4FDD\u5B58",
|
|
1811
1832
|
saving: "\u4FDD\u5B58\u4E2D\u2026",
|
|
@@ -1817,27 +1838,32 @@ var settingsZh = {
|
|
|
1817
1838
|
var settingsEn = {
|
|
1818
1839
|
summary: "Wait and timeout",
|
|
1819
1840
|
title: "Questions",
|
|
1820
|
-
|
|
1841
|
+
purpose: "Set how long questions wait and what happens when the wait ends.",
|
|
1842
|
+
waitLabel: "Wait for answers",
|
|
1821
1843
|
durationLabel: "Wait duration in seconds",
|
|
1844
|
+
presetLabel: "Presets",
|
|
1822
1845
|
timed: "Countdown",
|
|
1823
1846
|
unlimited: "Unlimited",
|
|
1824
1847
|
seconds: "sec",
|
|
1848
|
+
secondShort: "s",
|
|
1849
|
+
minuteShort: "m",
|
|
1825
1850
|
waitHint: "Typing restarts the countdown.",
|
|
1826
|
-
unlimitedHint: "Wait until answered
|
|
1851
|
+
unlimitedHint: "Wait until answered; no timeout action runs.",
|
|
1852
|
+
timelineAsk: "Question asked",
|
|
1853
|
+
timelineWait: "Wait",
|
|
1854
|
+
timelineEnd: "Timeout",
|
|
1827
1855
|
timeoutTitle: "At timeout",
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1856
|
+
goalBehaviorLabel: "Active goal",
|
|
1857
|
+
native: "Leave question open",
|
|
1858
|
+
default: "Submit defaults",
|
|
1859
|
+
nativeHint: "The question stays answerable after timeout; independent work continues. No automatic approval.",
|
|
1860
|
+
defaultHint: "Only questions with a default answer apply; automatic picks are marked. Without a default the question stays open.",
|
|
1861
|
+
goalExplain: "Questions during a goal can block resumption; set their timeout behavior separately here.",
|
|
1833
1862
|
discard: "Discard",
|
|
1834
|
-
|
|
1835
|
-
defaultHint: "Submits default answers when the countdown ends.",
|
|
1836
|
-
timeoutDisabled: "Timeout behavior is inactive while waiting without a limit. Your choices are kept.",
|
|
1837
|
-
readonly: "This configuration is read-only.",
|
|
1863
|
+
readonly: "These settings are read-only.",
|
|
1838
1864
|
loading: "Loading settings\u2026",
|
|
1839
|
-
unavailable: "
|
|
1840
|
-
waiting: "Waiting for
|
|
1865
|
+
unavailable: "These settings are unavailable on the current connection.",
|
|
1866
|
+
waiting: "Waiting for settings\u2026",
|
|
1841
1867
|
invalidWait: "Enter a whole number from 1 to 2147483 seconds.",
|
|
1842
1868
|
save: "Save",
|
|
1843
1869
|
saving: "Saving\u2026",
|
|
@@ -1848,7 +1874,7 @@ var settingsEn = {
|
|
|
1848
1874
|
};
|
|
1849
1875
|
|
|
1850
1876
|
// src/client/settings.module.css
|
|
1851
|
-
var css6 = "/* src/client/settings.module.css */\n.settings_cfg {\n --ui-accent: #3388bb;\n --ui-accent-solid: #20709e;\n --ui-accent-text: #14587f;\n --ui-accent-fg: #fff;\n --ui-accent-soft: color-mix(in srgb, var(--ui-accent) 10%, transparent);\n --ui-ink-1: var(--dsw-alias-label-primary, #0f1115);\n --ui-ink-2: var(--dsw-alias-label-secondary, #61666b);\n --ui-ink-3: color-mix(in srgb, var(--dsw-alias-label-tertiary, #81858c) 80%, var(--dsw-alias-label-primary, #0f1115));\n --ui-line-1: var(--dsw-alias-border-l1, #0000000a);\n --ui-line-2: var(--dsw-alias-border-l2, #0000001a);\n --ui-line-3: var(--dsw-alias-border-l3, #0000001f);\n --ui-canvas: var(--dsw-alias-bg-layer-1, #fff);\n --ui-raised: var(--dsw-alias-bg-layer-2, #fff);\n --ui-sunken: color-mix(in srgb, var(--ui-ink-1) 4%, var(--ui-canvas));\n --ui-hover: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, var(--ui-ink-1) 5%, transparent));\n --ui-danger: var(--dsw-alias-state-error-primary, #c8322b);\n --ui-radius-sm: 6px;\n --ui-radius-md: 8px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n max-width: 920px;\n margin: 0 auto;\n min-width: 0;\n color: var(--ui-ink-1);\n font: inherit;\n line-height: 20px;\n font-variant-numeric: tabular-nums;\n}\n.settings_cfg *,\n.settings_cfg {\n box-sizing: border-box;\n}\n.settings_pageHead {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n min-width: 0;\n}\n.settings_title {\n margin: 0;\n font-size: 20px;\n line-height: 28px;\n font-weight: 500;\n letter-spacing: -.01em;\n}\n.settings_badge {\n display: inline-flex;\n align-items: center;\n height: 20px;\n padding: 0 8px;\n border: 1px solid var(--ui-line-2);\n border-radius: 999px;\n background: var(--ui-raised);\n color: var(--ui-ink-3);\n font-size: 11px;\n line-height: 18px;\n white-space: nowrap;\n}\n.settings_group {\n display: flex;\n flex-direction: column;\n min-width: 0;\n border-top: 1px solid var(--ui-line-2);\n}\n.settings_row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n min-height: 44px;\n min-width: 0;\n padding: 10px 0;\n border-bottom: 1px solid var(--ui-line-1);\n}\n.settings_rowText {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n}\n.settings_rowTitle {\n color: var(--ui-ink-1);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n}\n.settings_rowDesc {\n color: var(--ui-ink-3);\n font-size: 12px;\n line-height: 18px;\n}\n.settings_control {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: none;\n min-width: 0;\n}\n.settings_choices {\n display: inline-flex;\n flex: none;\n gap: 2px;\n height: 32px;\n padding: 1px;\n border: 1px solid var(--ui-line-2);\n border-radius: var(--ui-radius-md);\n background: var(--ui-sunken);\n}\n.settings_choice {\n position: relative;\n display: inline-flex;\n min-width: 0;\n}\n.settings_choice input {\n appearance: none;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n}\n.settings_choice span {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 28px;\n padding: 0 12px;\n border-radius: var(--ui-radius-sm);\n color: var(--ui-ink-3);\n font-size: 13px;\n line-height: 20px;\n white-space: nowrap;\n transition:\n background-color 140ms ease,\n color 140ms ease,\n box-shadow 140ms ease;\n}\n.settings_choice:has(input:checked) span {\n background: var(--ui-raised);\n box-shadow: inset 0 0 0 1px var(--ui-line-2);\n color: var(--ui-accent-text);\n font-weight: 500;\n}\n.settings_choice:has(input:hover:not(:disabled):not(:checked)) span {\n background: var(--ui-hover);\n color: var(--ui-ink-1);\n}\n.settings_choice:has(input:focus-visible) span {\n outline: 2px solid var(--ui-accent);\n outline-offset: 2px;\n}\n.settings_choice:has(input:disabled) {\n opacity: .4;\n}\n.settings_choice input:disabled {\n cursor: not-allowed;\n}\n.settings_input {\n appearance: none;\n width: 76px;\n min-width: 0;\n height: 32px;\n padding: 0 8px;\n border: 1px solid var(--ui-line-2);\n border-radius: var(--ui-radius-md);\n background: var(--ui-raised);\n color: var(--ui-ink-1);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-variant-numeric: tabular-nums;\n transition: border-color 140ms ease, box-shadow 140ms ease;\n}\n.settings_input:hover:not(:disabled) {\n border-color: var(--ui-line-3);\n}\n.settings_input:focus-visible {\n outline: none;\n border-color: var(--ui-accent);\n box-shadow: 0 0 0 2px var(--ui-accent-soft);\n}\n.settings_input[aria-invalid=true] {\n border-color: var(--ui-danger);\n}\n.settings_input:disabled {\n opacity: .4;\n cursor: not-allowed;\n}\n.settings_duration {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n flex: none;\n}\n.settings_unit {\n color: var(--ui-ink-3);\n font-size: 12px;\n line-height: 18px;\n}\n.settings_srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.settings_fieldError {\n margin: 6px 0 0;\n color: var(--ui-danger);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.settings_sectionLabel {\n margin: 20px 0 0;\n padding-bottom: 6px;\n border-bottom: 1px solid var(--ui-line-2);\n color: var(--ui-ink-3);\n font-size: 12px;\n line-height: 18px;\n font-weight: 500;\n letter-spacing: .02em;\n}\n.settings_advanced {\n margin-top: 12px;\n border-top: 1px solid var(--ui-line-1);\n}\n.settings_advanced summary {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 32px;\n padding: 4px 0;\n color: var(--ui-ink-2);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n list-style: none;\n cursor: pointer;\n}\n.settings_advanced summary::-webkit-details-marker {\n display: none;\n}\n.settings_advanced summary:hover {\n color: var(--ui-ink-1);\n}\n.settings_advanced summary:focus-visible {\n outline: 2px solid var(--ui-accent);\n outline-offset: 2px;\n border-radius: 4px;\n}\n.settings_advancedValue {\n margin-left: auto;\n color: var(--ui-ink-3);\n font-size: 11px;\n line-height: 18px;\n font-weight: 400;\n white-space: nowrap;\n}\n.settings_chevron {\n width: 6px;\n height: 6px;\n margin: 0 4px 3px auto;\n border-right: 1px solid currentColor;\n border-bottom: 1px solid currentColor;\n transform: rotate(45deg);\n transition: transform 140ms ease;\n}\n.settings_advancedValue + .settings_chevron {\n margin-left: 0;\n}\n.settings_advanced[open] .settings_chevron {\n transform: rotate(225deg);\n margin-bottom: -3px;\n}\n.settings_status {\n margin: 0;\n color: var(--ui-ink-3);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.settings_footer {\n position: sticky;\n bottom: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n padding: 12px 0;\n border-top: 1px solid var(--ui-line-2);\n background: var(--ui-canvas);\n margin-top: auto;\n}\n.settings_footer .settings_status {\n flex: 1;\n min-width: 0;\n}\n.settings_button,\n.settings_primary {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n gap: 6px;\n height: 32px;\n padding: 0 12px;\n border: 1px solid var(--ui-line-2);\n border-radius: var(--ui-radius-md);\n background: var(--ui-raised);\n color: var(--ui-ink-1);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n transition:\n background-color 140ms ease,\n border-color 140ms ease,\n color 140ms ease;\n}\n.settings_button:hover:not(:disabled) {\n background: var(--ui-hover);\n}\n.settings_button:active:not(:disabled) {\n background: var(--ui-sunken);\n}\n.settings_primary {\n min-width: 96px;\n border-color: transparent;\n background: var(--ui-accent-solid);\n color: var(--ui-accent-fg);\n}\n.settings_primary:hover:not(:disabled) {\n background: color-mix(in srgb, var(--ui-accent-solid) 88%, black);\n}\n.settings_primary:active:not(:disabled) {\n background: color-mix(in srgb, var(--ui-accent-solid) 80%, black);\n}\n.settings_button:focus-visible,\n.settings_primary:focus-visible {\n outline: 2px solid var(--ui-accent);\n outline-offset: 2px;\n}\n.settings_button:disabled,\n.settings_primary:disabled {\n opacity: .4;\n cursor: not-allowed;\n}\n.settings_spinner {\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: settings_spin 800ms linear infinite;\n}\n@keyframes settings_spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (max-width: 640px) {\n .settings_title {\n font-size: 18px;\n line-height: 26px;\n }\n .settings_row {\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n }\n .settings_control {\n width: 100%;\n flex-wrap: wrap;\n }\n .settings_choice {\n flex: 1;\n }\n .settings_choice span {\n width: 100%;\n }\n .settings_footer {\n flex-wrap: wrap;\n }\n .settings_footer .settings_status {\n flex-basis: 100%;\n }\n .settings_advancedValue {\n max-width: 65%;\n text-align: right;\n white-space: normal;\n }\n}\n@media (pointer: coarse) {\n .settings_choices {\n height: auto;\n }\n .settings_choice span,\n .settings_input,\n .settings_button,\n .settings_primary {\n min-height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .settings_spinner {\n animation: none;\n }\n .settings_input,\n .settings_choice span,\n .settings_button,\n .settings_primary,\n .settings_chevron {\n transition: none;\n }\n}\n[data-ds-dark-theme] .settings_cfg {\n --ui-accent: #4eb0e8;\n --ui-accent-solid: #4eb0e8;\n --ui-accent-text: #6fc0ee;\n --ui-accent-fg: #0e1014;\n --ui-accent-soft: color-mix(in srgb, var(--ui-accent) 14%, transparent);\n}\n";
|
|
1877
|
+
var css6 = '/* src/client/settings.module.css */\n.settings_cfg {\n --cfg-accent: var(--dsw-alias-state-business-primary, #3388bb);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-solid: var(--dsw-alias-button-primary-fill, #20709e);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #fff);\n --cfg-ink: var(--dsw-alias-label-primary);\n --cfg-muted: var(--dsw-alias-label-secondary);\n --cfg-line: var(--dsw-alias-border-l2);\n --cfg-surface: var(--dsw-alias-bg-layer-1);\n --cfg-hover: var(--dsw-alias-interactive-bg-hover);\n --cfg-danger: var(--dsw-alias-state-error-primary);\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n max-width: 960px;\n margin: 0 auto;\n min-width: 0;\n color: var(--cfg-ink);\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n}\n.settings_cfg *,\n.settings_cfg {\n box-sizing: border-box;\n}\n.settings_pageHead {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 4px;\n min-width: 0;\n}\n.settings_title {\n flex: none;\n margin: 0;\n font-size: 20px;\n line-height: 28px;\n font-weight: 600;\n letter-spacing: -.01em;\n}\n.settings_purpose {\n flex: 0 0 auto;\n min-width: 0;\n margin: 0;\n color: var(--cfg-muted);\n font-size: 13px;\n line-height: 20px;\n}\n.settings_badge {\n flex: none;\n display: inline-flex;\n align-items: center;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.settings_note,\n.settings_status {\n margin: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n overflow-wrap: anywhere;\n}\n.settings_group {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.settings_section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 0;\n min-width: 0;\n}\n.settings_section:first-child {\n padding-top: 0;\n}\n.settings_section:last-child {\n padding-bottom: 0;\n}\n.settings_waitHead {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n min-width: 0;\n}\n.settings_sectionLabel {\n margin: 0;\n color: color-mix(in srgb, var(--dsw-alias-label-tertiary) 80%, var(--cfg-ink));\n font-size: 12px;\n line-height: 20px;\n font-weight: 500;\n}\n.settings_sectionNote {\n margin: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.settings_choices {\n display: inline-flex;\n flex: none;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: color-mix(in srgb, var(--cfg-ink) 4%, var(--cfg-surface));\n}\n.settings_choice {\n position: relative;\n display: inline-flex;\n min-width: 0;\n}\n.settings_choice input {\n appearance: none;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n}\n.settings_choice span {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 26px;\n padding: 0 10px;\n border: 1px solid transparent;\n border-radius: 6px;\n color: var(--cfg-muted);\n font-size: 12px;\n white-space: nowrap;\n}\n.settings_choice:has(input:checked) span {\n border-color: var(--cfg-line);\n background: var(--cfg-surface);\n color: var(--cfg-accent-text);\n font-weight: 500;\n}\n.settings_choice:has(input:hover:not(:disabled):not(:checked)) span {\n background: var(--cfg-hover);\n}\n.settings_choice:has(input:focus-visible) {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 2px;\n border-radius: 6px;\n}\n.settings_choice:has(input:disabled) {\n opacity: .4;\n}\n.settings_choice input:disabled {\n cursor: not-allowed;\n}\n.settings_waitControl {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px;\n min-width: 0;\n}\n.settings_duration {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n flex: none;\n}\n.settings_input {\n appearance: none;\n width: 132px;\n height: 32px;\n padding: 0 10px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: var(--cfg-surface);\n color: inherit;\n font: inherit;\n font-size: 16px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n.settings_input:hover:not(:disabled) {\n border-color: color-mix(in srgb, var(--cfg-line) 55%, var(--cfg-ink));\n}\n.settings_input[aria-invalid=true] {\n border-color: var(--cfg-danger);\n}\n.settings_input:focus-visible,\n.settings_chip:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 1px;\n}\n.settings_input:disabled {\n opacity: .4;\n cursor: not-allowed;\n}\n.settings_unit {\n color: var(--cfg-muted);\n font-size: 12px;\n}\n.settings_presets {\n display: inline-flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.settings_chip {\n appearance: none;\n height: 32px;\n padding: 0 10px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: transparent;\n color: var(--cfg-muted);\n font: inherit;\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n cursor: pointer;\n}\n.settings_chip:hover:not(:disabled) {\n background: var(--cfg-hover);\n color: var(--cfg-ink);\n}\n.settings_chip[aria-pressed=true] {\n border-color: var(--cfg-accent);\n background: color-mix(in srgb, var(--cfg-accent) 8%, transparent);\n color: var(--cfg-accent-text);\n font-weight: 500;\n}\n.settings_chip:disabled {\n opacity: .4;\n cursor: not-allowed;\n}\n.settings_timeline {\n display: flex;\n align-items: center;\n gap: 10px;\n min-width: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n}\n.settings_timelineNode {\n flex: none;\n white-space: nowrap;\n}\n.settings_timelineRail {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n min-width: 64px;\n height: 1px;\n background: var(--cfg-line);\n}\n.settings_timelineRail::after {\n content: "";\n position: absolute;\n right: 0;\n top: -3px;\n width: 6px;\n height: 6px;\n border-top: 1px solid var(--cfg-line);\n border-right: 1px solid var(--cfg-line);\n transform: rotate(45deg);\n}\n.settings_timeline[data-unlimited=true] .settings_timelineRail::after {\n display: none;\n}\n.settings_timelineChip {\n position: relative;\n z-index: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 24px;\n padding: 0 8px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: var(--cfg-surface);\n color: var(--cfg-ink);\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n.settings_timeline[data-unlimited=true] .settings_timelineChip {\n color: var(--cfg-muted);\n}\n.settings_fieldError {\n margin: 0;\n color: var(--cfg-danger);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.settings_cards {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n min-width: 0;\n}\n.settings_card {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-areas: "head head" "desc diagram";\n gap: 6px 12px;\n padding: 12px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: var(--cfg-surface);\n cursor: pointer;\n}\n.settings_card:hover {\n background: var(--cfg-hover);\n}\n.settings_card:has(input:checked),\n.settings_card:has(input:checked):hover {\n border-color: var(--cfg-accent);\n background: color-mix(in srgb, var(--cfg-accent) 6%, var(--cfg-surface));\n}\n.settings_card:has(input:focus-visible) {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 2px;\n}\n.settings_card:has(input:disabled) {\n opacity: .5;\n cursor: not-allowed;\n}\n.settings_cardInput {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n opacity: 0;\n pointer-events: none;\n}\n.settings_cardHead {\n grid-area: head;\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n.settings_cardName {\n min-width: 0;\n overflow-wrap: anywhere;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n}\n.settings_cardMark {\n flex: none;\n width: 16px;\n height: 16px;\n margin-left: auto;\n border: 1px solid var(--dsw-alias-border-l4, var(--cfg-line));\n border-radius: 50%;\n}\n.settings_cardMark::after {\n content: "";\n display: block;\n width: 8px;\n height: 8px;\n margin: 3px;\n border-radius: 50%;\n background: var(--cfg-accent);\n opacity: 0;\n}\n.settings_card:has(input:checked) .settings_cardMark {\n border-color: var(--cfg-accent);\n}\n.settings_card:has(input:checked) .settings_cardMark::after {\n opacity: 1;\n}\n.settings_cardDesc {\n grid-area: desc;\n min-width: 0;\n color: var(--cfg-muted);\n font-size: 12px;\n line-height: 18px;\n overflow-wrap: anywhere;\n}\n.settings_cardDiagram {\n grid-area: diagram;\n align-self: center;\n display: block;\n width: 104px;\n max-width: 100%;\n color: var(--cfg-muted);\n}\n.settings_cardDiagram svg {\n display: block;\n width: 100%;\n height: auto;\n}\n.settings_card:has(input:checked) .settings_cardDiagram {\n color: var(--cfg-accent);\n}\n.settings_footer {\n position: sticky;\n bottom: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n border-top: 1px solid var(--cfg-line);\n background: var(--dsw-alias-bg-layer-1);\n}\n.settings_footer .settings_status {\n flex: 1;\n min-width: 0;\n}\n.settings_button,\n.settings_primary {\n appearance: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n gap: 6px;\n height: 32px;\n padding: 0 12px;\n border: 1px solid var(--cfg-line);\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n}\n.settings_button:hover:not(:disabled) {\n background: var(--cfg-hover);\n}\n.settings_primary {\n min-width: 96px;\n border-color: transparent;\n background: var(--cfg-solid);\n color: var(--cfg-on-solid);\n}\n.settings_primary:hover:not(:disabled) {\n background: var(--cfg-solid-hover);\n}\n.settings_button:focus-visible,\n.settings_primary:focus-visible {\n outline: 2px solid var(--cfg-accent);\n outline-offset: 2px;\n}\n.settings_button:disabled,\n.settings_primary:disabled {\n opacity: .4;\n cursor: not-allowed;\n}\n.settings_button:active:not(:disabled),\n.settings_primary:active:not(:disabled) {\n transform: translateY(1px);\n}\n.settings_spinner {\n width: 12px;\n height: 12px;\n border: 1px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: settings_spin 800ms linear infinite;\n}\n@keyframes settings_spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (max-width: 640px) {\n .settings_waitHead {\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n }\n .settings_choices {\n width: 100%;\n }\n .settings_choice {\n flex: 1;\n }\n .settings_choice span {\n width: 100%;\n }\n .settings_waitControl {\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n }\n .settings_duration,\n .settings_presets {\n width: 100%;\n }\n .settings_input {\n flex: 1;\n width: auto;\n font-size: 16px;\n }\n .settings_cards {\n grid-template-columns: minmax(0, 1fr);\n }\n .settings_chip,\n .settings_input,\n .settings_button,\n .settings_primary,\n .settings_choice span {\n min-height: 44px;\n }\n .settings_section {\n padding: 12px 0;\n }\n .settings_footer {\n flex-wrap: wrap;\n }\n .settings_footer .settings_status {\n flex-basis: 100%;\n }\n}\n@media (pointer: coarse) {\n .settings_chip,\n .settings_input,\n .settings_button,\n .settings_primary,\n .settings_choice span {\n min-height: 44px;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .settings_spinner {\n animation: none;\n }\n .settings_button:active:not(:disabled),\n .settings_primary:active:not(:disabled) {\n transform: none;\n }\n}\n[data-ds-dark-theme] .settings_cfg {\n --cfg-accent: var(--dsw-alias-state-business-primary, #4eb0e8);\n --cfg-accent-text: color-mix(in srgb, var(--cfg-accent) 70%, var(--cfg-ink));\n --cfg-solid: var(--dsw-alias-button-primary-fill, #4eb0e8);\n --cfg-solid-hover: color-mix(in srgb, var(--cfg-solid) 88%, var(--cfg-on-solid));\n --cfg-on-solid: var(--dsw-alias-label-primary-foreground, #0e1014);\n}\n';
|
|
1852
1878
|
var id6 = "dsh-better-ask-user/settings.module.css";
|
|
1853
1879
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(id6) + "]") === null) {
|
|
1854
1880
|
const tag = document.createElement("style");
|
|
@@ -1861,25 +1887,36 @@ var settings_default = {
|
|
|
1861
1887
|
cfg: "settings_cfg",
|
|
1862
1888
|
pageHead: "settings_pageHead",
|
|
1863
1889
|
title: "settings_title",
|
|
1890
|
+
purpose: "settings_purpose",
|
|
1864
1891
|
badge: "settings_badge",
|
|
1892
|
+
note: "settings_note",
|
|
1893
|
+
status: "settings_status",
|
|
1865
1894
|
group: "settings_group",
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
control: "settings_control",
|
|
1895
|
+
section: "settings_section",
|
|
1896
|
+
waitHead: "settings_waitHead",
|
|
1897
|
+
sectionLabel: "settings_sectionLabel",
|
|
1898
|
+
sectionNote: "settings_sectionNote",
|
|
1871
1899
|
choices: "settings_choices",
|
|
1872
1900
|
choice: "settings_choice",
|
|
1873
|
-
|
|
1901
|
+
waitControl: "settings_waitControl",
|
|
1874
1902
|
duration: "settings_duration",
|
|
1903
|
+
input: "settings_input",
|
|
1904
|
+
chip: "settings_chip",
|
|
1875
1905
|
unit: "settings_unit",
|
|
1876
|
-
|
|
1906
|
+
presets: "settings_presets",
|
|
1907
|
+
timeline: "settings_timeline",
|
|
1908
|
+
timelineNode: "settings_timelineNode",
|
|
1909
|
+
timelineRail: "settings_timelineRail",
|
|
1910
|
+
timelineChip: "settings_timelineChip",
|
|
1877
1911
|
fieldError: "settings_fieldError",
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1912
|
+
cards: "settings_cards",
|
|
1913
|
+
card: "settings_card",
|
|
1914
|
+
cardInput: "settings_cardInput",
|
|
1915
|
+
cardHead: "settings_cardHead",
|
|
1916
|
+
cardName: "settings_cardName",
|
|
1917
|
+
cardMark: "settings_cardMark",
|
|
1918
|
+
cardDesc: "settings_cardDesc",
|
|
1919
|
+
cardDiagram: "settings_cardDiagram",
|
|
1883
1920
|
footer: "settings_footer",
|
|
1884
1921
|
button: "settings_button",
|
|
1885
1922
|
primary: "settings_primary",
|
|
@@ -1923,15 +1960,6 @@ function parseDraft(draft) {
|
|
|
1923
1960
|
if (seconds === void 0) return void 0;
|
|
1924
1961
|
return { questionTimeoutSeconds: seconds, timeoutBehavior: draft.timeoutBehavior, goalTimeoutBehavior: draft.goalTimeoutBehavior };
|
|
1925
1962
|
}
|
|
1926
|
-
function Row({ id: id7, label, hint, children }) {
|
|
1927
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.row, children: [
|
|
1928
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.rowText, children: [
|
|
1929
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.rowTitle, id: `${id7}-label`, children: label }),
|
|
1930
|
-
hint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.rowDesc, id: `${id7}-hint`, children: hint }) : null
|
|
1931
|
-
] }),
|
|
1932
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: css_modules_entry_default6.control, children })
|
|
1933
|
-
] });
|
|
1934
|
-
}
|
|
1935
1963
|
function Choices({ id: id7, value, options, disabled, describedBy, onChange }) {
|
|
1936
1964
|
const name = (0, import_react6.useId)();
|
|
1937
1965
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: css_modules_entry_default6.choices, id: id7, role: "radiogroup", "aria-labelledby": `${id7}-label`, "aria-disabled": disabled, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: css_modules_entry_default6.choice, children: [
|
|
@@ -1953,6 +1981,55 @@ function Choices({ id: id7, value, options, disabled, describedBy, onChange }) {
|
|
|
1953
1981
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: option.label })
|
|
1954
1982
|
] }, option.value)) });
|
|
1955
1983
|
}
|
|
1984
|
+
function ChoiceCards({ id: id7, value, options, disabled, describedBy, onChange }) {
|
|
1985
|
+
const name = (0, import_react6.useId)();
|
|
1986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: css_modules_entry_default6.cards, id: id7, role: "radiogroup", "aria-labelledby": `${id7}-label`, "aria-describedby": describedBy, "aria-disabled": disabled, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: css_modules_entry_default6.card, "data-choice": option.value, children: [
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1988
|
+
"input",
|
|
1989
|
+
{
|
|
1990
|
+
id: `${id7}-${option.value}`,
|
|
1991
|
+
className: css_modules_entry_default6.cardInput,
|
|
1992
|
+
type: "radio",
|
|
1993
|
+
name,
|
|
1994
|
+
value: option.value,
|
|
1995
|
+
checked: value === option.value,
|
|
1996
|
+
disabled,
|
|
1997
|
+
"aria-describedby": `${id7}-${option.value}-desc`,
|
|
1998
|
+
onChange: () => {
|
|
1999
|
+
onChange(option.value);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
),
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: css_modules_entry_default6.cardHead, children: [
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.cardName, children: option.label }),
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.cardMark, "aria-hidden": "true" })
|
|
2006
|
+
] }),
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.cardDesc, id: `${id7}-${option.value}-desc`, children: option.description }),
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.cardDiagram, "aria-hidden": "true", children: option.diagram })
|
|
2009
|
+
] }, option.value)) });
|
|
2010
|
+
}
|
|
2011
|
+
function OpenFlow() {
|
|
2012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { viewBox: "0 0 104 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "1", y: "5", width: "24", height: "14", rx: "3" }),
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 10h12M7 14h7", strokeWidth: "1" }),
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M27 12h14" }),
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "47", cy: "12", r: "4" }),
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M51 12h14" }),
|
|
2018
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m61 8 4 4-4 4" }),
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M71 7v10M78 7v10M85 7v10", strokeWidth: "1" })
|
|
2020
|
+
] });
|
|
2021
|
+
}
|
|
2022
|
+
function DefaultFlow() {
|
|
2023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { viewBox: "0 0 104 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
|
|
2024
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "1", y: "5", width: "24", height: "14", rx: "3" }),
|
|
2025
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 10h12M7 14h7", strokeWidth: "1" }),
|
|
2026
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M27 12h16" }),
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "49", cy: "12", r: "4" }),
|
|
2028
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M53 12h16" }),
|
|
2029
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "78", cy: "12", r: "7" }),
|
|
2030
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m75 12 2 2 4-4" })
|
|
2031
|
+
] });
|
|
2032
|
+
}
|
|
1956
2033
|
function SettingsPage({ form, t = fallbackT }) {
|
|
1957
2034
|
const state = form?.state;
|
|
1958
2035
|
const revision = state?.revision;
|
|
@@ -2012,93 +2089,120 @@ function SettingsPage({ form, t = fallbackT }) {
|
|
|
2012
2089
|
const invalid = parsed === void 0;
|
|
2013
2090
|
const unlimited = live.questionTimeoutSeconds === "-1";
|
|
2014
2091
|
const controlsDisabled = !writable || busy;
|
|
2015
|
-
const
|
|
2092
|
+
const seconds = parsed?.questionTimeoutSeconds;
|
|
2093
|
+
const waitAmount = unlimited ? "\u221E" : seconds === void 0 ? "\u2014" : `${t("timelineWait")} ${seconds} ${t("seconds")}`;
|
|
2094
|
+
const presets = [
|
|
2095
|
+
{ seconds: 30, label: `30${t("secondShort")}` },
|
|
2096
|
+
{ seconds: 120, label: `2${t("minuteShort")}` },
|
|
2097
|
+
{ seconds: 300, label: `5${t("minuteShort")}` },
|
|
2098
|
+
{ seconds: 600, label: `10${t("minuteShort")}` }
|
|
2099
|
+
];
|
|
2100
|
+
const behaviorCards = [
|
|
2101
|
+
{ value: "native", label: t("native"), description: t("nativeHint"), diagram: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(OpenFlow, {}) },
|
|
2102
|
+
{ value: "default", label: t("default"), description: t("defaultHint"), diagram: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DefaultFlow, {}) }
|
|
2103
|
+
];
|
|
2016
2104
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.cfg, "aria-busy": busy, "data-settings-dirty": dirty, "data-settings-busy": busy, children: [
|
|
2017
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: css_modules_entry_default6.pageHead, children: [
|
|
2018
2106
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: css_modules_entry_default6.title, id: "better-ask-user-title", children: t("title") }),
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: css_modules_entry_default6.purpose, children: t("purpose") }),
|
|
2019
2108
|
writable ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.badge, role: "status", children: t("readonly") })
|
|
2020
2109
|
] }),
|
|
2021
2110
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: css_modules_entry_default6.group, "aria-label": t("title"), children: [
|
|
2022
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
2023
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
2024
|
-
|
|
2025
|
-
{
|
|
2026
|
-
id: "better-ask-user-wait-mode",
|
|
2027
|
-
value: unlimited ? "unlimited" : "timed",
|
|
2028
|
-
options: [{ value: "timed", label: t("timed") }, { value: "unlimited", label: t("unlimited") }],
|
|
2029
|
-
disabled: controlsDisabled,
|
|
2030
|
-
describedBy: "better-ask-user-wait-hint",
|
|
2031
|
-
onChange: (value) => {
|
|
2032
|
-
const nextUnlimited = value === "unlimited";
|
|
2033
|
-
if (nextUnlimited && !invalid) setTimedSeconds(live.questionTimeoutSeconds);
|
|
2034
|
-
edit((current) => ({ ...current, questionTimeoutSeconds: nextUnlimited ? "-1" : timedSeconds }));
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
),
|
|
2038
|
-
unlimited ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: css_modules_entry_default6.duration, children: [
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.section, "data-ask-section": "wait", children: [
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.waitHead, children: [
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: css_modules_entry_default6.sectionLabel, id: "better-ask-user-wait-mode-label", children: t("waitLabel") }),
|
|
2039
2114
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2040
|
-
|
|
2115
|
+
Choices,
|
|
2041
2116
|
{
|
|
2042
|
-
id: "better-ask-user-wait",
|
|
2043
|
-
|
|
2044
|
-
"
|
|
2045
|
-
"aria-describedby": invalid ? "better-ask-user-error" : "better-ask-user-wait-hint",
|
|
2046
|
-
type: "text",
|
|
2047
|
-
inputMode: "numeric",
|
|
2048
|
-
"aria-invalid": invalid || void 0,
|
|
2049
|
-
value: live.questionTimeoutSeconds,
|
|
2117
|
+
id: "better-ask-user-wait-mode",
|
|
2118
|
+
value: unlimited ? "unlimited" : "timed",
|
|
2119
|
+
options: [{ value: "timed", label: t("timed") }, { value: "unlimited", label: t("unlimited") }],
|
|
2050
2120
|
disabled: controlsDisabled,
|
|
2051
|
-
|
|
2052
|
-
|
|
2121
|
+
describedBy: "better-ask-user-wait-hint",
|
|
2122
|
+
onChange: (value) => {
|
|
2123
|
+
const nextUnlimited = value === "unlimited";
|
|
2124
|
+
if (nextUnlimited && !invalid) setTimedSeconds(live.questionTimeoutSeconds);
|
|
2125
|
+
edit((current) => ({ ...current, questionTimeoutSeconds: nextUnlimited ? "-1" : timedSeconds }));
|
|
2053
2126
|
}
|
|
2054
2127
|
}
|
|
2055
|
-
)
|
|
2056
|
-
|
|
2057
|
-
|
|
2128
|
+
)
|
|
2129
|
+
] }),
|
|
2130
|
+
unlimited ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.waitControl, children: [
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: css_modules_entry_default6.duration, children: [
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2133
|
+
"input",
|
|
2134
|
+
{
|
|
2135
|
+
id: "better-ask-user-wait",
|
|
2136
|
+
className: css_modules_entry_default6.input,
|
|
2137
|
+
"aria-label": t("durationLabel"),
|
|
2138
|
+
"aria-describedby": invalid ? "better-ask-user-error" : "better-ask-user-wait-hint",
|
|
2139
|
+
type: "text",
|
|
2140
|
+
inputMode: "numeric",
|
|
2141
|
+
"aria-invalid": invalid || void 0,
|
|
2142
|
+
value: live.questionTimeoutSeconds,
|
|
2143
|
+
disabled: controlsDisabled,
|
|
2144
|
+
onChange: (event) => {
|
|
2145
|
+
edit((current) => ({ ...current, questionTimeoutSeconds: event.target.value }));
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
),
|
|
2149
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.unit, children: t("seconds") })
|
|
2150
|
+
] }),
|
|
2151
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: css_modules_entry_default6.presets, role: "group", "aria-label": t("presetLabel"), children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2152
|
+
"button",
|
|
2153
|
+
{
|
|
2154
|
+
type: "button",
|
|
2155
|
+
className: css_modules_entry_default6.chip,
|
|
2156
|
+
"data-preset": preset.seconds,
|
|
2157
|
+
"aria-pressed": seconds === preset.seconds,
|
|
2158
|
+
disabled: controlsDisabled,
|
|
2159
|
+
onClick: () => {
|
|
2160
|
+
edit((current) => ({ ...current, questionTimeoutSeconds: String(preset.seconds) }));
|
|
2161
|
+
},
|
|
2162
|
+
children: preset.label
|
|
2163
|
+
},
|
|
2164
|
+
preset.seconds
|
|
2165
|
+
)) })
|
|
2166
|
+
] }),
|
|
2167
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.timeline, "data-unlimited": unlimited, "aria-hidden": "true", children: [
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.timelineNode, children: t("timelineAsk") }),
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.timelineRail, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.timelineChip, children: waitAmount }) }),
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: css_modules_entry_default6.timelineNode, children: unlimited ? t("unlimited") : t("timelineEnd") })
|
|
2171
|
+
] }),
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: css_modules_entry_default6.sectionNote, id: "better-ask-user-wait-hint", children: t(unlimited ? "unlimitedHint" : "waitHint") }),
|
|
2173
|
+
invalid && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: css_modules_entry_default6.fieldError, id: "better-ask-user-error", role: "alert", children: t("invalidWait") })
|
|
2058
2174
|
] }),
|
|
2059
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Row, { id: "better-ask-user-behavior", label: t("behaviorLabel"), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2064
|
-
Choices,
|
|
2175
|
+
unlimited ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.section, "data-ask-section": "timeout", children: [
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: css_modules_entry_default6.sectionLabel, id: "better-ask-user-behavior-label", children: t("timeoutTitle") }),
|
|
2177
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2178
|
+
ChoiceCards,
|
|
2065
2179
|
{
|
|
2066
2180
|
id: "better-ask-user-behavior",
|
|
2067
2181
|
value: live.timeoutBehavior,
|
|
2068
|
-
options:
|
|
2182
|
+
options: behaviorCards,
|
|
2069
2183
|
disabled: controlsDisabled,
|
|
2070
|
-
describedBy: "better-ask-user-timeout-hint",
|
|
2071
2184
|
onChange: (value) => {
|
|
2072
2185
|
edit((current) => ({ ...current, timeoutBehavior: value }));
|
|
2073
2186
|
}
|
|
2074
2187
|
}
|
|
2075
|
-
)
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
id: "better-ask-user-goal-behavior",
|
|
2091
|
-
value: live.goalTimeoutBehavior,
|
|
2092
|
-
options: behaviors,
|
|
2093
|
-
disabled: controlsDisabled,
|
|
2094
|
-
describedBy: "better-ask-user-goal-hint",
|
|
2095
|
-
onChange: (value) => {
|
|
2096
|
-
edit((current) => ({ ...current, goalTimeoutBehavior: value }));
|
|
2097
|
-
}
|
|
2188
|
+
)
|
|
2189
|
+
] }),
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: css_modules_entry_default6.section, "data-ask-section": "goal", children: [
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: css_modules_entry_default6.sectionLabel, id: "better-ask-user-goal-behavior-label", children: t("goalBehaviorLabel") }),
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: css_modules_entry_default6.sectionNote, id: "better-ask-user-goal-hint", children: t("goalExplain") }),
|
|
2193
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2194
|
+
ChoiceCards,
|
|
2195
|
+
{
|
|
2196
|
+
id: "better-ask-user-goal-behavior",
|
|
2197
|
+
value: live.goalTimeoutBehavior,
|
|
2198
|
+
options: behaviorCards,
|
|
2199
|
+
disabled: controlsDisabled,
|
|
2200
|
+
describedBy: "better-ask-user-goal-hint",
|
|
2201
|
+
onChange: (value) => {
|
|
2202
|
+
edit((current) => ({ ...current, goalTimeoutBehavior: value }));
|
|
2098
2203
|
}
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
] })
|
|
2204
|
+
}
|
|
2205
|
+
)
|
|
2102
2206
|
] })
|
|
2103
2207
|
] }),
|
|
2104
2208
|
notice !== null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: notice.tone === "ok" ? css_modules_entry_default6.status : css_modules_entry_default6.fieldError, role: notice.tone === "error" ? "alert" : "status", children: notice.text }),
|
|
@@ -2143,6 +2247,8 @@ var QuestionCards = class {
|
|
|
2143
2247
|
this.publish = publish;
|
|
2144
2248
|
}
|
|
2145
2249
|
#cards = /* @__PURE__ */ new Map();
|
|
2250
|
+
#presenceSources = /* @__PURE__ */ new Map();
|
|
2251
|
+
#presenceListeners = /* @__PURE__ */ new Set();
|
|
2146
2252
|
byCallId(sessionId, callId) {
|
|
2147
2253
|
return this.#cards.get(PendingQuestion.keyOf(sessionId, callId));
|
|
2148
2254
|
}
|
|
@@ -2150,6 +2256,34 @@ var QuestionCards = class {
|
|
|
2150
2256
|
source(key) {
|
|
2151
2257
|
return this.#cards.get(key)?.pending;
|
|
2152
2258
|
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Observable existence of one tool call's card. The transcript row offers
|
|
2261
|
+
* reopening only while the registry still holds that card; a removed card
|
|
2262
|
+
* flips the snapshot so the stale affordance disappears with it.
|
|
2263
|
+
* @param sessionId - owning Session.
|
|
2264
|
+
* @param callId - tool call identity as the transcript row spells it.
|
|
2265
|
+
* @returns a stable source that notifies when the card is added or removed.
|
|
2266
|
+
*/
|
|
2267
|
+
presence(sessionId, callId) {
|
|
2268
|
+
const key = PendingQuestion.keyOf(sessionId, callId);
|
|
2269
|
+
let source = this.#presenceSources.get(key);
|
|
2270
|
+
if (source === void 0) {
|
|
2271
|
+
source = {
|
|
2272
|
+
getSnapshot: () => this.#cards.has(key),
|
|
2273
|
+
subscribe: (listener) => {
|
|
2274
|
+
this.#presenceListeners.add(listener);
|
|
2275
|
+
return () => {
|
|
2276
|
+
this.#presenceListeners.delete(listener);
|
|
2277
|
+
};
|
|
2278
|
+
}
|
|
2279
|
+
};
|
|
2280
|
+
this.#presenceSources.set(key, source);
|
|
2281
|
+
}
|
|
2282
|
+
return source;
|
|
2283
|
+
}
|
|
2284
|
+
#publishPresence() {
|
|
2285
|
+
for (const listener of [...this.#presenceListeners]) listener();
|
|
2286
|
+
}
|
|
2153
2287
|
values() {
|
|
2154
2288
|
return [...this.#cards.values()];
|
|
2155
2289
|
}
|
|
@@ -2192,6 +2326,7 @@ var QuestionCards = class {
|
|
|
2192
2326
|
remove: () => {
|
|
2193
2327
|
if (this.#cards.get(pending.key) !== card) return;
|
|
2194
2328
|
this.#cards.delete(pending.key);
|
|
2329
|
+
this.#publishPresence();
|
|
2195
2330
|
pending.close();
|
|
2196
2331
|
unpublish?.();
|
|
2197
2332
|
unpublish = void 0;
|
|
@@ -2206,6 +2341,7 @@ var QuestionCards = class {
|
|
|
2206
2341
|
};
|
|
2207
2342
|
pending.attachSeat({ hide: pending.review === void 0 ? card.hide : card.remove });
|
|
2208
2343
|
this.#cards.set(pending.key, card);
|
|
2344
|
+
this.#publishPresence();
|
|
2209
2345
|
return card;
|
|
2210
2346
|
}
|
|
2211
2347
|
/**
|
|
@@ -2437,7 +2573,10 @@ function apply(ctx) {
|
|
|
2437
2573
|
priority: -1,
|
|
2438
2574
|
inject: (sessionId) => ({
|
|
2439
2575
|
revealPanel: (callId) => ctx.get("userQuestionPanels")?.reveal(sessionId, callId) ?? false,
|
|
2440
|
-
reviewPanel: (callId, record) => ctx.get("userQuestionPanels")?.review(sessionId, callId, record) ?? false
|
|
2576
|
+
reviewPanel: (callId, record) => ctx.get("userQuestionPanels")?.review(sessionId, callId, record) ?? false,
|
|
2577
|
+
keyedHooks: {
|
|
2578
|
+
questionPanelLive: (callId) => cards.presence(sessionId, callId)
|
|
2579
|
+
}
|
|
2441
2580
|
})
|
|
2442
2581
|
}, AskHistoryRow));
|
|
2443
2582
|
ctx.slots.inject("conversation.composer", () => ctx.slots.register(
|