dsh-theone 0.3.21 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -19
- package/README.zh.md +44 -19
- package/dist/client-locales.d.ts +33 -0
- package/dist/client-locales.js +66 -0
- package/dist/client.js +407 -41
- package/dist/feedback.d.ts +113 -0
- package/dist/feedback.js +146 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +124 -0
- package/dist/store.d.ts +2 -0
- package/dist/store.js +5 -0
- package/package.json +21 -3
package/dist/client.js
CHANGED
|
@@ -203,6 +203,9 @@ var zh = {
|
|
|
203
203
|
"settings.help.gatewayKey": "\u533A\u5206\u4E0D\u540C\u7684\u4E3B\u804A\u5929\u5165\u53E3\u72B6\u6001\uFF08\u5F53\u524D\u8BDD\u9898\u3001\u8DEF\u7531\u8BB0\u5F55\u3001\u8BBE\u7F6E\uFF09\u3002\u6539\u52A8\u76F8\u5F53\u4E8E\u6362\u4E00\u4E2A\u65B0\u7684\u5165\u53E3\uFF0C\u56E0\u6B64\u53EA\u80FD\u7528\u73AF\u5883\u53D8\u91CF THEONE_GATEWAY_KEY \u4FEE\u6539\uFF0C\u901A\u5E38\u4FDD\u7559 default\u3002",
|
|
204
204
|
"catalog.title": "\u8BDD\u9898\u5DE5\u4F5C\u533A",
|
|
205
205
|
"catalog.subtitle": "\u76F8\u5173\u7684\u4E8B\u60C5\u653E\u5728\u4E00\u8D77\uFF0C\u968F\u65F6\u56DE\u5230\u4E3B\u804A\u5929\u7EE7\u7EED\u3002",
|
|
206
|
+
"catalog.figTopics": "\u8BDD\u9898",
|
|
207
|
+
"catalog.figGroups": "\u5DE5\u4F5C\u533A",
|
|
208
|
+
"catalog.figKept": "\u6CA1\u88AB\u66F4\u6B63",
|
|
206
209
|
"catalog.refresh": "\u6574\u7406\u5386\u53F2",
|
|
207
210
|
"link.label": "\u5173\u8054\uFF1A",
|
|
208
211
|
"link.none": "\u6682\u65E0\u5173\u8054\u8BDD\u9898",
|
|
@@ -236,6 +239,7 @@ var zh = {
|
|
|
236
239
|
"catalog.unassignedSummary": "\u8FD9\u4E9B\u8BDD\u9898\u8FD8\u5728\u7B49\u5F85\u81EA\u52A8\u5F52\u7C7B\u3002",
|
|
237
240
|
"topic.opening": "\u6B63\u5728\u6253\u5F00\u2026",
|
|
238
241
|
"topic.continue": "\u7EE7\u7EED\u804A\u5929",
|
|
242
|
+
"topic.continueHidden": "\u8FD9\u4E2A\u8BDD\u9898\u7684\u539F\u4F1A\u8BDD\u5DF2\u4E0D\u5728\uFF08\u5DF2\u5220\u9664\u6216\u5DF2\u5F52\u6863\uFF09\uFF0C\u6CA1\u6709\u53EF\u4EE5\u63A5\u7740\u804A\u7684\u5185\u5BB9\u3002\u53D6\u6D88\u5F52\u6863\u540E\u5373\u53EF\u7EE7\u7EED\u3002",
|
|
239
243
|
"topic.source": "\u67E5\u770B\u539F\u4F1A\u8BDD",
|
|
240
244
|
"topic.state": "\u8FDB\u5C55\uFF1A",
|
|
241
245
|
"topic.constraints": "\u7EA6\u675F\uFF1A",
|
|
@@ -281,6 +285,35 @@ var zh = {
|
|
|
281
285
|
"routes.error": "\u5206\u7C7B\u51FA\u9519\uFF1A{code}",
|
|
282
286
|
"routes.rules": "\u89C4\u5219\u5224\u65AD",
|
|
283
287
|
"routes.removed": "\uFF08\u5DF2\u5220\u9664\u7684\u8BDD\u9898\uFF09",
|
|
288
|
+
"routes.report": "\u62A5\u544A\u95EE\u9898",
|
|
289
|
+
"feedback.open": "\u53CD\u9988\u95EE\u9898",
|
|
290
|
+
"feedback.title": "\u53CD\u9988\u95EE\u9898",
|
|
291
|
+
"feedback.titleMessage": "\u62A5\u544A\u8FD9\u6761\u56DE\u590D\u7684\u95EE\u9898",
|
|
292
|
+
"feedback.intro": "\u8BF4\u8BF4\u53D1\u751F\u4E86\u4EC0\u4E48\u3002\u4E0B\u9762\u80FD\u770B\u5230\u8981\u53D1\u51FA\u7684\u5168\u90E8\u5185\u5BB9\uFF0C\u70B9\u300C\u53D1\u9001\u300D\u4E4B\u524D\u4EC0\u4E48\u90FD\u4E0D\u4F1A\u53D1\u51FA\u3002",
|
|
293
|
+
"feedback.description": "\u53D1\u751F\u4E86\u4EC0\u4E48\uFF1F\u6BD4\u5982\uFF1A\u56DE\u590D\u91CC\u51FA\u73B0\u4E71\u7801\u3001\u5206\u9519\u4E86\u8BDD\u9898\u3001\u67D0\u4E2A\u6309\u94AE\u6CA1\u53CD\u5E94",
|
|
294
|
+
"feedback.contact": "\u8054\u7CFB\u65B9\u5F0F\uFF08\u9009\u586B\uFF09\uFF1A\u90AE\u7BB1\u3001QQ \u6216\u5FAE\u4FE1\uFF0C\u65B9\u4FBF\u4F5C\u8005\u56DE\u590D\u4F60",
|
|
295
|
+
"feedback.includeReply": "\u9644\u4E0A\u8FD9\u6761\u6D88\u606F\u548C\u56DE\u590D\u7684\u539F\u6587\uFF08\u6392\u67E5\u4E71\u7801\u8FD9\u7C7B\u95EE\u9898\u65F6\u9700\u8981\uFF09",
|
|
296
|
+
"feedback.preview": "\u8981\u53D1\u9001\u7684\u5185\u5BB9",
|
|
297
|
+
"feedback.privacy": "\u53D1\u9001\u5230 feedback.yulid.org\uFF0C\u53EA\u7528\u4E8E\u6392\u67E5\u95EE\u9898\uFF0C\u7531 TheOne \u4F5C\u8005\u4FDD\u5B58 90 \u5929\u540E\u81EA\u52A8\u5220\u9664\u3002\u9ED8\u8BA4\u53EA\u542B\u7248\u672C\u3001\u8BBE\u7F6E\u548C\u8DEF\u7531\u7684\u9519\u8BEF\u7801\u4E0E\u8017\u65F6\uFF0C\u4E0D\u542B\u804A\u5929\u5185\u5BB9\u3002",
|
|
298
|
+
"feedback.loading": "\u6B63\u5728\u6574\u7406\u8BCA\u65AD\u4FE1\u606F\u2026",
|
|
299
|
+
"feedback.loadError": "\u8BCA\u65AD\u4FE1\u606F\u6CA1\u6709\u6574\u7406\u51FA\u6765\uFF0C\u4F60\u4ECD\u7136\u53EF\u4EE5\u5199\u4E0B\u95EE\u9898\uFF0C\u590D\u5236\u540E\u53D1\u90AE\u4EF6\u5230 {email}\u3002",
|
|
300
|
+
"feedback.send": "\u53D1\u9001",
|
|
301
|
+
"feedback.sending": "\u6B63\u5728\u53D1\u9001\u2026",
|
|
302
|
+
"feedback.copy": "\u590D\u5236\u5185\u5BB9",
|
|
303
|
+
"feedback.copied": "\u5DF2\u590D\u5236",
|
|
304
|
+
"feedback.email": "\u53D1\u90AE\u4EF6",
|
|
305
|
+
"feedback.cancel": "\u53D6\u6D88",
|
|
306
|
+
"feedback.close": "\u5173\u95ED",
|
|
307
|
+
"feedback.sent": "\u5DF2\u53D1\u9001\uFF0C\u7F16\u53F7 {id}\u3002\u5728\u8BC4\u8BBA\u6216\u90AE\u4EF6\u91CC\u63D0\u5230\u8FD9\u4E2A\u7F16\u53F7\uFF0C\u4F5C\u8005\u5C31\u80FD\u627E\u5230\u5B83\u3002\u8C22\u8C22\uFF01",
|
|
308
|
+
"feedback.fallback": "\u4E5F\u53EF\u4EE5\u70B9\u300C\u590D\u5236\u5185\u5BB9\u300D\uFF0C\u53D1\u90AE\u4EF6\u5230 {email}\u3002",
|
|
309
|
+
"feedback.error.UNREACHABLE": "\u8FDE\u4E0D\u4E0A\u53CD\u9988\u670D\u52A1\u5668\u3002",
|
|
310
|
+
"feedback.error.RATE_LIMITED": "\u53D1\u9001\u5F97\u592A\u9891\u7E41\u4E86\uFF0C\u8BF7\u4E00\u5C0F\u65F6\u540E\u518D\u8BD5\u3002",
|
|
311
|
+
"feedback.error.REJECTED": "\u53CD\u9988\u670D\u52A1\u5668\u6CA1\u6709\u63A5\u6536\u8FD9\u4EFD\u62A5\u544A\u3002",
|
|
312
|
+
"feedback.error.SERVER_ERROR": "\u53CD\u9988\u670D\u52A1\u5668\u6682\u65F6\u51FA\u4E86\u95EE\u9898\u3002",
|
|
313
|
+
"feedback.error.DESCRIPTION_REQUIRED": "\u5148\u5199\u4E00\u53E5\u53D1\u751F\u4E86\u4EC0\u4E48\u3002",
|
|
314
|
+
"feedback.error.TOO_LARGE": "\u5185\u5BB9\u592A\u957F\u4E86\uFF0C\u8BF7\u7F29\u77ED\u63CF\u8FF0\uFF0C\u6216\u53BB\u6389\u56DE\u590D\u539F\u6587\u3002",
|
|
315
|
+
"feedback.error.DIRECT_OFF": "\u8FD9\u4E2A DSH \u5173\u95ED\u4E86\u76F4\u63A5\u53D1\u9001\u3002",
|
|
316
|
+
"feedback.error.other": "\u6CA1\u6709\u53D1\u9001\u6210\u529F\u3002",
|
|
284
317
|
"route.reason.steering": "\u56DE\u590D\u4E2D\u8865\u5145",
|
|
285
318
|
"route.reason.short-continuation": "\u63A5\u7740\u8BF4",
|
|
286
319
|
"route.reason.attachment-only": "\u53EA\u6709\u9644\u4EF6",
|
|
@@ -420,6 +453,9 @@ var en = {
|
|
|
420
453
|
"settings.help.gatewayKey": "Separates main-chat entry state (current topic, routing records, settings). Changing it amounts to a new entry, so it can only be set through THEONE_GATEWAY_KEY; usually leave it as default.",
|
|
421
454
|
"catalog.title": "Topic workspaces",
|
|
422
455
|
"catalog.subtitle": "Keep related topics together and pick up the conversation in main chat.",
|
|
456
|
+
"catalog.figTopics": "Topics",
|
|
457
|
+
"catalog.figGroups": "Workspaces",
|
|
458
|
+
"catalog.figKept": "Kept as routed",
|
|
423
459
|
"catalog.refresh": "Organize history",
|
|
424
460
|
"link.label": "Related:",
|
|
425
461
|
"link.none": "No related topics",
|
|
@@ -453,6 +489,7 @@ var en = {
|
|
|
453
489
|
"catalog.unassignedSummary": "These topics are waiting to be grouped.",
|
|
454
490
|
"topic.opening": "Opening\u2026",
|
|
455
491
|
"topic.continue": "Continue chatting",
|
|
492
|
+
"topic.continueHidden": "This topic\u2019s conversations are gone (deleted or archived), so there is nothing to continue. Unarchive them to pick it up again.",
|
|
456
493
|
"topic.source": "View original chat",
|
|
457
494
|
"topic.state": "Progress:",
|
|
458
495
|
"topic.constraints": "Constraints:",
|
|
@@ -498,6 +535,35 @@ var en = {
|
|
|
498
535
|
"routes.error": "Classifier error: {code}",
|
|
499
536
|
"routes.rules": "rules",
|
|
500
537
|
"routes.removed": "(deleted topic)",
|
|
538
|
+
"routes.report": "Report a problem",
|
|
539
|
+
"feedback.open": "Report a problem",
|
|
540
|
+
"feedback.title": "Report a problem",
|
|
541
|
+
"feedback.titleMessage": "Report a problem with this reply",
|
|
542
|
+
"feedback.intro": "Tell us what happened. Everything that would be sent is shown below; nothing leaves this computer until you press Send.",
|
|
543
|
+
"feedback.description": "What happened? For example: garbled text in a reply, the wrong topic, a button that does nothing",
|
|
544
|
+
"feedback.contact": "Contact (optional): email or any handle, so the author can reply",
|
|
545
|
+
"feedback.includeReply": "Include this message and its reply as text (needed for problems like garbled replies)",
|
|
546
|
+
"feedback.preview": "What will be sent",
|
|
547
|
+
"feedback.privacy": "Sent to feedback.yulid.org, used only to look into the problem, and deleted by TheOne's author after 90 days. By default it holds versions, settings and routing error codes and timings, no chat content.",
|
|
548
|
+
"feedback.loading": "Gathering diagnostics\u2026",
|
|
549
|
+
"feedback.loadError": "Diagnostics could not be gathered. You can still describe the problem, copy it and email {email}.",
|
|
550
|
+
"feedback.send": "Send",
|
|
551
|
+
"feedback.sending": "Sending\u2026",
|
|
552
|
+
"feedback.copy": "Copy",
|
|
553
|
+
"feedback.copied": "Copied",
|
|
554
|
+
"feedback.email": "Email",
|
|
555
|
+
"feedback.cancel": "Cancel",
|
|
556
|
+
"feedback.close": "Close",
|
|
557
|
+
"feedback.sent": "Sent as {id}. Mention this id in a comment or email and the author can find it. Thank you!",
|
|
558
|
+
"feedback.fallback": "You can also press Copy and email {email}.",
|
|
559
|
+
"feedback.error.UNREACHABLE": "The feedback server cannot be reached.",
|
|
560
|
+
"feedback.error.RATE_LIMITED": "Too many reports in a short time; try again in an hour.",
|
|
561
|
+
"feedback.error.REJECTED": "The feedback server did not accept this report.",
|
|
562
|
+
"feedback.error.SERVER_ERROR": "The feedback server has a problem right now.",
|
|
563
|
+
"feedback.error.DESCRIPTION_REQUIRED": "Say in a sentence what happened first.",
|
|
564
|
+
"feedback.error.TOO_LARGE": "Too long; shorten the description or leave out the reply text.",
|
|
565
|
+
"feedback.error.DIRECT_OFF": "Sending directly is turned off in this DSH.",
|
|
566
|
+
"feedback.error.other": "The report was not sent.",
|
|
501
567
|
"route.reason.steering": "Added during a reply",
|
|
502
568
|
"route.reason.short-continuation": "Continuation",
|
|
503
569
|
"route.reason.attachment-only": "Attachment only",
|
|
@@ -554,6 +620,7 @@ function apply(ctx) {
|
|
|
554
620
|
await ctx.sessions.using(target, { source: "controllerOperation", signal: lifetime.signal }, async (reference) => {
|
|
555
621
|
await reference.ready;
|
|
556
622
|
lifetime.signal.throwIfAborted();
|
|
623
|
+
await fetch("/api/theone/gateway/hold", { method: "POST", signal: lifetime.signal }).catch(() => void 0);
|
|
557
624
|
const selected = await ctx.modelDirectories.directoryFor(target).select({ provider: "theone", model: "gateway" });
|
|
558
625
|
if (!selected.ok) throw selected.error;
|
|
559
626
|
const renamed = await reference.binding.session.rename(t("gateway.title"));
|
|
@@ -699,6 +766,160 @@ function apply(ctx) {
|
|
|
699
766
|
document.body.append(backdrop);
|
|
700
767
|
(allow ?? footer.querySelector("button"))?.focus();
|
|
701
768
|
}
|
|
769
|
+
function openFeedbackDialog(messageId) {
|
|
770
|
+
if (document.querySelector(".theone-dialog-backdrop")) return;
|
|
771
|
+
const backdrop = document.createElement("div");
|
|
772
|
+
backdrop.className = "theone-dialog-backdrop";
|
|
773
|
+
backdrop.setAttribute("translate", "no");
|
|
774
|
+
const card = document.createElement("div");
|
|
775
|
+
card.className = "theone-dialog theone-feedback";
|
|
776
|
+
card.setAttribute("role", "dialog");
|
|
777
|
+
card.setAttribute("aria-modal", "true");
|
|
778
|
+
const title = document.createElement("h2");
|
|
779
|
+
title.id = "theone-feedback-title";
|
|
780
|
+
title.textContent = t(messageId ? "feedback.titleMessage" : "feedback.title");
|
|
781
|
+
card.setAttribute("aria-labelledby", title.id);
|
|
782
|
+
const intro = document.createElement("p");
|
|
783
|
+
intro.textContent = t("feedback.intro");
|
|
784
|
+
const description = document.createElement("textarea");
|
|
785
|
+
description.maxLength = 4e3;
|
|
786
|
+
description.rows = 4;
|
|
787
|
+
description.placeholder = t("feedback.description");
|
|
788
|
+
description.setAttribute("aria-label", t("feedback.description"));
|
|
789
|
+
const contact = document.createElement("input");
|
|
790
|
+
contact.maxLength = 200;
|
|
791
|
+
contact.placeholder = t("feedback.contact");
|
|
792
|
+
contact.setAttribute("aria-label", t("feedback.contact"));
|
|
793
|
+
const include = document.createElement("input");
|
|
794
|
+
include.type = "checkbox";
|
|
795
|
+
const includeLabel = document.createElement("label");
|
|
796
|
+
includeLabel.className = "theone-feedback-check";
|
|
797
|
+
includeLabel.append(include, " ", t("feedback.includeReply"));
|
|
798
|
+
const preview = document.createElement("details");
|
|
799
|
+
preview.className = "theone-feedback-preview";
|
|
800
|
+
const summary = document.createElement("summary");
|
|
801
|
+
summary.textContent = t("feedback.preview");
|
|
802
|
+
const pre = document.createElement("pre");
|
|
803
|
+
preview.append(summary, pre);
|
|
804
|
+
const privacy = document.createElement("p");
|
|
805
|
+
privacy.className = "theone-dialog-note";
|
|
806
|
+
privacy.textContent = t("feedback.privacy");
|
|
807
|
+
const status = document.createElement("p");
|
|
808
|
+
status.className = "theone-dialog-note";
|
|
809
|
+
status.setAttribute("role", "status");
|
|
810
|
+
status.textContent = t("feedback.loading");
|
|
811
|
+
const footer = document.createElement("div");
|
|
812
|
+
footer.className = "theone-dialog-actions";
|
|
813
|
+
const button = (text2, primary, act) => {
|
|
814
|
+
const element = document.createElement("button");
|
|
815
|
+
element.type = "button";
|
|
816
|
+
element.textContent = text2;
|
|
817
|
+
if (primary) element.className = "theone-dialog-primary";
|
|
818
|
+
element.addEventListener("click", act);
|
|
819
|
+
footer.append(element);
|
|
820
|
+
return element;
|
|
821
|
+
};
|
|
822
|
+
let draft;
|
|
823
|
+
let email = "theone@yulid.org";
|
|
824
|
+
let direct = false;
|
|
825
|
+
let sentId;
|
|
826
|
+
let sending = false;
|
|
827
|
+
const language = () => localeSnapshot().active.startsWith("zh") ? "zh" : "en";
|
|
828
|
+
const report = () => ({ description: description.value.trim(), ...contact.value.trim() ? { contact: contact.value.trim() } : {}, lang: language(), ...draft ?? {} });
|
|
829
|
+
const render = () => {
|
|
830
|
+
pre.textContent = JSON.stringify(report(), null, 2);
|
|
831
|
+
send.disabled = sending || !!sentId || !direct || !draft || !description.value.trim();
|
|
832
|
+
send.textContent = t(sending ? "feedback.sending" : "feedback.send");
|
|
833
|
+
};
|
|
834
|
+
const load = async () => {
|
|
835
|
+
status.textContent = t("feedback.loading");
|
|
836
|
+
draft = void 0;
|
|
837
|
+
render();
|
|
838
|
+
try {
|
|
839
|
+
const response = await fetch("/api/theone/feedback", {
|
|
840
|
+
method: "POST",
|
|
841
|
+
headers: { "content-type": "application/json" },
|
|
842
|
+
signal: lifetime.signal,
|
|
843
|
+
body: JSON.stringify({ action: "draft", ...messageId ? { messageId, includeReply: include.checked } : {} })
|
|
844
|
+
});
|
|
845
|
+
const body = await response.json();
|
|
846
|
+
if (!response.ok || !body.draft) throw new Error("draft");
|
|
847
|
+
draft = body.draft;
|
|
848
|
+
email = body.email ?? email;
|
|
849
|
+
direct = body.direct === true;
|
|
850
|
+
status.textContent = direct ? "" : t("feedback.fallback", { email });
|
|
851
|
+
} catch {
|
|
852
|
+
status.textContent = t("feedback.loadError", { email });
|
|
853
|
+
}
|
|
854
|
+
render();
|
|
855
|
+
};
|
|
856
|
+
const close = () => {
|
|
857
|
+
backdrop.remove();
|
|
858
|
+
document.removeEventListener("keydown", keydown, true);
|
|
859
|
+
};
|
|
860
|
+
const keydown = (event) => {
|
|
861
|
+
if (event.key === "Escape") {
|
|
862
|
+
event.preventDefault();
|
|
863
|
+
close();
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
const text = () => sentId ? sentId : JSON.stringify(report(), null, 2);
|
|
867
|
+
button(t("feedback.cancel"), false, close);
|
|
868
|
+
const copy = button(t("feedback.copy"), false, () => {
|
|
869
|
+
void navigator.clipboard?.writeText(text()).then(() => {
|
|
870
|
+
copy.textContent = t("feedback.copied");
|
|
871
|
+
setTimeout(() => {
|
|
872
|
+
copy.textContent = t("feedback.copy");
|
|
873
|
+
}, 2e3);
|
|
874
|
+
}, () => {
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
button(t("feedback.email"), false, () => {
|
|
878
|
+
const subject = `TheOne ${String(draft?.version ?? "")} ${description.value.trim().split("\n")[0].slice(0, 40)}`.trim();
|
|
879
|
+
window.open(`mailto:${email}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(text().slice(0, 1800))}`, "_self");
|
|
880
|
+
});
|
|
881
|
+
const send = button(t("feedback.send"), true, () => {
|
|
882
|
+
if (send.disabled) return;
|
|
883
|
+
sending = true;
|
|
884
|
+
render();
|
|
885
|
+
void (async () => {
|
|
886
|
+
try {
|
|
887
|
+
const response = await fetch("/api/theone/feedback", {
|
|
888
|
+
method: "POST",
|
|
889
|
+
headers: { "content-type": "application/json" },
|
|
890
|
+
signal: lifetime.signal,
|
|
891
|
+
body: JSON.stringify({ action: "send", draft, description: description.value, contact: contact.value, lang: language() })
|
|
892
|
+
});
|
|
893
|
+
const body = await response.json().catch(() => ({}));
|
|
894
|
+
if (!response.ok || !body.id) throw new Error(body.error ?? "other");
|
|
895
|
+
sentId = body.id;
|
|
896
|
+
status.textContent = t("feedback.sent", { id: body.id });
|
|
897
|
+
description.disabled = contact.disabled = include.disabled = true;
|
|
898
|
+
} catch (error) {
|
|
899
|
+
const code = error instanceof Error ? error.message : "";
|
|
900
|
+
const known = ["UNREACHABLE", "RATE_LIMITED", "REJECTED", "SERVER_ERROR", "DESCRIPTION_REQUIRED", "TOO_LARGE", "DIRECT_OFF"].includes(code);
|
|
901
|
+
status.textContent = `${t(known ? `feedback.error.${code}` : "feedback.error.other")} ${t("feedback.fallback", { email })}`;
|
|
902
|
+
} finally {
|
|
903
|
+
sending = false;
|
|
904
|
+
render();
|
|
905
|
+
}
|
|
906
|
+
})();
|
|
907
|
+
});
|
|
908
|
+
description.addEventListener("input", render);
|
|
909
|
+
contact.addEventListener("input", render);
|
|
910
|
+
include.addEventListener("change", () => {
|
|
911
|
+
void load();
|
|
912
|
+
});
|
|
913
|
+
card.append(title, intro, description, contact, ...messageId ? [includeLabel] : [], preview, privacy, status, footer);
|
|
914
|
+
backdrop.append(card);
|
|
915
|
+
backdrop.addEventListener("pointerdown", (event) => {
|
|
916
|
+
if (event.target === backdrop && !description.value.trim()) close();
|
|
917
|
+
});
|
|
918
|
+
document.addEventListener("keydown", keydown, true);
|
|
919
|
+
document.body.append(backdrop);
|
|
920
|
+
description.focus();
|
|
921
|
+
void load();
|
|
922
|
+
}
|
|
702
923
|
const ICONS = {
|
|
703
924
|
download: ["M12 4v11", "M7 10l5 5 5-5", "M5 20h14"],
|
|
704
925
|
restart: ["M20 12a8 8 0 1 1-2.34-5.66L20 8.5", "M20 4v4.5h-4.5"],
|
|
@@ -732,9 +953,9 @@ function apply(ctx) {
|
|
|
732
953
|
const status = (0, import_react.useSyncExternalStore)(subscribeUpdate, () => update);
|
|
733
954
|
const waiting = !!status?.waiting && !status.available && !status.state;
|
|
734
955
|
if (!status || !status.available && !status.state && !waiting) return null;
|
|
735
|
-
const
|
|
956
|
+
const label2 = waiting ? t2("update.waiting") : status.state === "installing" ? t2("update.installing") : status.state === "reloading" ? t2("update.reloading") : status.state === "restart" ? t2("update.restart") : status.state === "failed" ? t2("update.failed") : t2("update.available");
|
|
736
957
|
const hint = waiting ? t2("update.waitingHint", { latest: status.waiting.version }) : status.error === "GATEWAY_BUSY" ? t2("update.busy") : status.state === "reloading" ? t2("update.reloadingHint") : status.state === "restart" ? t2("update.restartHint") : status.state === "failed" ? status.error === "OTHER_RELEASE_AGE" ? t2("update.otherAge", { names: status.detail ?? "" }) : status.error === "MINIMUM_RELEASE_AGE" ? status.exempt ? t2("update.ageStill", { detail: status.detail ?? "" }) : t2("update.tooNew") : status.error === "NETWORK" ? t2("update.network") : t2("update.failedHint", { error: status.detail ?? status.error ?? "" }) : status.installable ? t2("update.hint", { current: status.current, latest: status.latest ?? "" }) : t2("update.manualHint", { current: status.current, latest: status.latest ?? "" });
|
|
737
|
-
const title = `${
|
|
958
|
+
const title = `${label2} \xB7 ${hint}`;
|
|
738
959
|
const act = (event) => {
|
|
739
960
|
event.preventDefault();
|
|
740
961
|
event.stopPropagation();
|
|
@@ -950,7 +1171,7 @@ function apply(ctx) {
|
|
|
950
1171
|
const pinned = settings?.values.workerProvider && settings.values.workerModel ? { provider: settings.values.workerProvider, model: settings.values.workerModel } : null;
|
|
951
1172
|
const nameOf = (provider, model) => settings?.models.find((item) => item.provider === provider && item.id === model)?.name ?? model;
|
|
952
1173
|
const effective = settings?.model ? nameOf(settings.model.provider, settings.model.model) : void 0;
|
|
953
|
-
const
|
|
1174
|
+
const label2 = pinned ? nameOf(pinned.provider, pinned.model) : effective ?? t2("bg.follow");
|
|
954
1175
|
const choose = async (choice) => {
|
|
955
1176
|
closeMenu.current?.();
|
|
956
1177
|
setSaving(true);
|
|
@@ -1075,7 +1296,7 @@ function apply(ctx) {
|
|
|
1075
1296
|
window.addEventListener("blur", close);
|
|
1076
1297
|
(search ?? rows().find((row) => row.getAttribute("aria-checked") === "true") ?? rows()[0])?.focus();
|
|
1077
1298
|
};
|
|
1078
|
-
const title = failed ? t2("bg.error") : t2(pinned ? "bg.hint" : "bg.hintFollow", { model:
|
|
1299
|
+
const title = failed ? t2("bg.error") : t2(pinned ? "bg.hint" : "bg.hintFollow", { model: label2 });
|
|
1079
1300
|
return (0, import_react.createElement)(
|
|
1080
1301
|
"button",
|
|
1081
1302
|
{
|
|
@@ -1095,7 +1316,7 @@ function apply(ctx) {
|
|
|
1095
1316
|
}
|
|
1096
1317
|
},
|
|
1097
1318
|
(0, import_react.createElement)("span", { className: "theone-bg-caption", "aria-hidden": true }, icon("layers", 15)),
|
|
1098
|
-
(0, import_react.createElement)("span", { className: "theone-bg-text" },
|
|
1319
|
+
(0, import_react.createElement)("span", { className: "theone-bg-text" }, label2),
|
|
1099
1320
|
(0, import_react.createElement)("span", { className: "theone-bg-chevron", "aria-hidden": true }, saving ? "\u2026" : icon("chevron", 12))
|
|
1100
1321
|
);
|
|
1101
1322
|
}
|
|
@@ -1495,7 +1716,7 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1495
1716
|
}, []);
|
|
1496
1717
|
const own = new Set(topic.sourceSessionIds);
|
|
1497
1718
|
const edited = title.trim() !== topic.title || summary.trim() !== topic.summary || rules.trim() !== constraints;
|
|
1498
|
-
const field = (
|
|
1719
|
+
const field = (label2, control) => (0, import_react.createElement)("label", { className: "theone-manage-field" }, (0, import_react.createElement)("span", null, t2(label2)), control);
|
|
1499
1720
|
return (0, import_react.createElement)(
|
|
1500
1721
|
"div",
|
|
1501
1722
|
{ className: "theone-manage" },
|
|
@@ -1595,6 +1816,7 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1595
1816
|
)
|
|
1596
1817
|
);
|
|
1597
1818
|
}
|
|
1819
|
+
const label = (text) => text.replace(/\s*[::]\s*$/, "");
|
|
1598
1820
|
function RouteList({ routes, stats, contexts, post, busy }) {
|
|
1599
1821
|
const t2 = useText();
|
|
1600
1822
|
const titleOf = (id) => contexts.find((context) => context.id === id)?.title ?? t2("routes.removed");
|
|
@@ -1626,17 +1848,18 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1626
1848
|
return (0, import_react.createElement)(
|
|
1627
1849
|
"li",
|
|
1628
1850
|
{ key: route.messageId },
|
|
1851
|
+
(0, import_react.createElement)("time", null, new Date(route.at).toLocaleTimeString(localeSnapshot().active, { hour: "2-digit", minute: "2-digit" })),
|
|
1852
|
+
(0, import_react.createElement)("q", null, route.excerpt || "\u2026"),
|
|
1629
1853
|
(0, import_react.createElement)(
|
|
1630
1854
|
"div",
|
|
1631
|
-
{ className: "theone-route-
|
|
1632
|
-
(0, import_react.createElement)("
|
|
1633
|
-
(0, import_react.createElement)("
|
|
1855
|
+
{ className: "theone-route-target" },
|
|
1856
|
+
(0, import_react.createElement)("strong", null, route.decision.action === "CLARIFY" ? t2("routes.clarify") : `\u2192 ${titleOf(target)}`),
|
|
1857
|
+
(0, import_react.createElement)("small", null, details)
|
|
1634
1858
|
),
|
|
1635
1859
|
(0, import_react.createElement)(
|
|
1636
1860
|
"div",
|
|
1637
|
-
{ className: "theone-route-
|
|
1638
|
-
(0, import_react.createElement)("
|
|
1639
|
-
(0, import_react.createElement)("small", null, details),
|
|
1861
|
+
{ className: "theone-route-actions" },
|
|
1862
|
+
(0, import_react.createElement)("button", { type: "button", className: "theone-quiet", onClick: () => openFeedbackDialog(route.messageId) }, t2("routes.report")),
|
|
1640
1863
|
route.correctedTo ? (0, import_react.createElement)("span", { className: "theone-route-fixed" }, t2("routes.corrected", { title: titleOf(route.correctedTo) })) : (0, import_react.createElement)(
|
|
1641
1864
|
"select",
|
|
1642
1865
|
{
|
|
@@ -1781,6 +2004,10 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1781
2004
|
if (!linkage || linkage.scope === "off") return null;
|
|
1782
2005
|
const own = linkage.topics[id];
|
|
1783
2006
|
if (!own) return null;
|
|
2007
|
+
if (managing !== id) return own.related.length || own.private ? [
|
|
2008
|
+
(0, import_react.createElement)("dt", { key: "dt" }, label(t2("link.label"))),
|
|
2009
|
+
(0, import_react.createElement)("dd", { key: "dd" }, own.related.map((topic) => topic.title).join(" \xB7 "), own.private ? (0, import_react.createElement)("span", { className: "theone-tag" }, t2("link.private")) : null)
|
|
2010
|
+
] : null;
|
|
1784
2011
|
const related = new Set(own.related.map((topic) => topic.id));
|
|
1785
2012
|
const others = snapshot.contexts.filter((context) => context.id !== id && !related.has(context.id));
|
|
1786
2013
|
return (0, import_react.createElement)(
|
|
@@ -1845,26 +2072,48 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1845
2072
|
const assigned = new Set(snapshot?.groups.flatMap((group) => group.contextIds) ?? []);
|
|
1846
2073
|
const groups = [...snapshot?.groups ?? [], ...snapshot?.contexts.some((c) => !assigned.has(c.id)) ? [{ id: "pending", title: t2("catalog.unassigned"), summary: t2("catalog.unassignedSummary"), contextIds: snapshot.contexts.filter((c) => !assigned.has(c.id)).map((c) => c.id) }] : []];
|
|
1847
2074
|
const status = snapshot?.status;
|
|
2075
|
+
const kept = routeStats?.total ? Math.round(100 * (routeStats.total - routeStats.corrected) / routeStats.total) : void 0;
|
|
2076
|
+
const figure = (value, name) => (0, import_react.createElement)("div", { key: name }, (0, import_react.createElement)("dd", null, value), (0, import_react.createElement)("dt", null, name));
|
|
1848
2077
|
return (0, import_react.createElement)(
|
|
1849
2078
|
"section",
|
|
1850
2079
|
{ className: "theone-catalog", translate: "no" },
|
|
1851
2080
|
(0, import_react.createElement)(
|
|
1852
2081
|
"header",
|
|
1853
2082
|
{ className: "theone-catalog-header" },
|
|
1854
|
-
(0, import_react.createElement)(
|
|
2083
|
+
(0, import_react.createElement)(
|
|
2084
|
+
"div",
|
|
2085
|
+
{ className: "theone-catalog-heading" },
|
|
2086
|
+
(0, import_react.createElement)("p", { className: "theone-overline" }, "TheOne"),
|
|
2087
|
+
(0, import_react.createElement)("h1", null, t2("catalog.title")),
|
|
2088
|
+
(0, import_react.createElement)("p", { className: "theone-catalog-lede" }, t2("catalog.subtitle"))
|
|
2089
|
+
),
|
|
2090
|
+
snapshot ? (0, import_react.createElement)(
|
|
2091
|
+
"dl",
|
|
2092
|
+
{ className: "theone-figures" },
|
|
2093
|
+
figure(snapshot.contexts.length, t2("catalog.figTopics")),
|
|
2094
|
+
figure(snapshot.groups.length, t2("catalog.figGroups")),
|
|
2095
|
+
kept !== void 0 ? figure(`${kept}%`, t2("catalog.figKept")) : null
|
|
2096
|
+
) : null
|
|
2097
|
+
),
|
|
2098
|
+
(0, import_react.createElement)(
|
|
2099
|
+
"div",
|
|
2100
|
+
{ className: "theone-toolbar" },
|
|
2101
|
+
(0, import_react.createElement)("p", { className: "theone-catalog-status", role: "status" }, snapshot ? status?.running ? t2("catalog.indexing") : status?.pending ? t2("catalog.pending", { count: status.pending, sessionSuffix: status.pending === 1 ? "" : "s" }) : t2("catalog.updated") : t2("catalog.reading")),
|
|
1855
2102
|
(0, import_react.createElement)(
|
|
1856
2103
|
"div",
|
|
1857
2104
|
{ className: "theone-catalog-tools" },
|
|
1858
|
-
(0, import_react.createElement)("button", { type: "button", disabled: !!busy, onClick: () => setCreating((open) => !open) }, t2("manage.create")),
|
|
2105
|
+
(0, import_react.createElement)("button", { type: "button", className: "theone-primary", disabled: !!busy, onClick: () => setCreating((open) => !open) }, t2("manage.create")),
|
|
2106
|
+
(0, import_react.createElement)("button", { type: "button", onClick: refresh, disabled: !!busy || status?.running }, t2("catalog.refresh")),
|
|
1859
2107
|
snapshot?.linkage && snapshot.linkage.scope !== "off" ? (0, import_react.createElement)("button", {
|
|
1860
2108
|
type: "button",
|
|
2109
|
+
className: "theone-quiet",
|
|
1861
2110
|
disabled: !!busy,
|
|
1862
2111
|
title: t2("link.clearLearnedHint"),
|
|
1863
2112
|
onClick: () => {
|
|
1864
2113
|
void editLinks({ action: "clearLearned" });
|
|
1865
2114
|
}
|
|
1866
2115
|
}, t2("link.clearLearned")) : null,
|
|
1867
|
-
(0, import_react.createElement)("button", { type: "button",
|
|
2116
|
+
(0, import_react.createElement)("button", { type: "button", className: "theone-quiet", onClick: () => openFeedbackDialog() }, t2("feedback.open"))
|
|
1868
2117
|
)
|
|
1869
2118
|
),
|
|
1870
2119
|
creating ? (0, import_react.createElement)(
|
|
@@ -1874,57 +2123,83 @@ ${body}` }, (0, import_react.createElement)("strong", null, title), " ", body),
|
|
|
1874
2123
|
void post("/api/theone/topics", { action: "create", title: newTitle });
|
|
1875
2124
|
} },
|
|
1876
2125
|
(0, import_react.createElement)("input", { value: newTitle, maxLength: 80, autoFocus: true, placeholder: t2("manage.title"), disabled: !!busy, onChange: (event) => setNewTitle(event.target.value) }),
|
|
1877
|
-
(0, import_react.createElement)("button", { type: "submit", disabled: !!busy || !newTitle.trim() }, t2("manage.createButton")),
|
|
1878
|
-
(0, import_react.createElement)("button", { type: "button", onClick: () => {
|
|
2126
|
+
(0, import_react.createElement)("button", { type: "submit", className: "theone-primary", disabled: !!busy || !newTitle.trim() }, t2("manage.createButton")),
|
|
2127
|
+
(0, import_react.createElement)("button", { type: "button", className: "theone-quiet", onClick: () => {
|
|
1879
2128
|
setCreating(false);
|
|
1880
2129
|
setNewTitle("");
|
|
1881
2130
|
} }, t2("manage.cancel"))
|
|
1882
2131
|
) : null,
|
|
1883
|
-
snapshot?.linkage?.scope === "off" ? (0, import_react.createElement)("p", { className: "theone-catalog-
|
|
1884
|
-
(0, import_react.createElement)("p", { className: "theone-catalog-status", role: "status" }, snapshot ? t2("catalog.counts", { topics: snapshot.contexts.length, groups: snapshot.groups.length, topicSuffix: snapshot.contexts.length === 1 ? "" : "s", groupSuffix: snapshot.groups.length === 1 ? "" : "s" }) + " \xB7 " + (status?.running ? t2("catalog.indexing") : status?.pending ? t2("catalog.pending", { count: status.pending, sessionSuffix: status.pending === 1 ? "" : "s" }) : t2("catalog.updated")) : t2("catalog.reading")),
|
|
2132
|
+
snapshot?.linkage?.scope === "off" ? (0, import_react.createElement)("p", { className: "theone-catalog-note" }, t2("link.off")) : null,
|
|
1885
2133
|
status?.failed ? (0, import_react.createElement)("p", { className: "theone-catalog-warning" }, t2("catalog.failed", { count: status.failed, sessionSuffix: status.failed === 1 ? "" : "s" })) : null,
|
|
1886
2134
|
status?.searchUnavailable ? (0, import_react.createElement)("p", { className: "theone-catalog-warning" }, t2("catalog.searchUnavailable")) : null,
|
|
1887
2135
|
error ? (0, import_react.createElement)("p", { role: "alert", className: "theone-catalog-warning" }, t2(error)) : null,
|
|
1888
2136
|
snapshot ? (0, import_react.createElement)(RouteList, { routes, stats: routeStats, contexts: snapshot.contexts, post, busy: !!busy }) : null,
|
|
1889
2137
|
snapshot && !snapshot.contexts.length ? (0, import_react.createElement)("p", { className: "theone-catalog-empty" }, t2(status?.running ? "catalog.emptyIndexing" : "catalog.empty")) : null,
|
|
1890
|
-
(0, import_react.createElement)("div", { className: "theone-catalog-groups" }, ...groups.map((group) => (0, import_react.createElement)(
|
|
2138
|
+
(0, import_react.createElement)("div", { className: "theone-catalog-groups" }, ...groups.map((group, index) => (0, import_react.createElement)(
|
|
1891
2139
|
"section",
|
|
1892
2140
|
{ key: group.id, className: "theone-topic-group" },
|
|
1893
|
-
(0, import_react.createElement)(
|
|
1894
|
-
|
|
1895
|
-
|
|
2141
|
+
(0, import_react.createElement)(
|
|
2142
|
+
"header",
|
|
2143
|
+
{ className: "theone-group-head" },
|
|
2144
|
+
(0, import_react.createElement)("span", { className: "theone-group-index" }, String(index + 1).padStart(2, "0")),
|
|
2145
|
+
(0, import_react.createElement)("h2", null, group.title, (0, import_react.createElement)("span", null, group.contextIds.length)),
|
|
2146
|
+
group.summary ? (0, import_react.createElement)("p", { className: "theone-group-summary" }, group.summary) : null
|
|
2147
|
+
),
|
|
2148
|
+
(0, import_react.createElement)("ol", { className: "theone-topic-list" }, ...group.contextIds.flatMap((id) => {
|
|
1896
2149
|
const topic = snapshot?.contexts.find((c) => c.id === id);
|
|
1897
2150
|
if (!topic) return [];
|
|
1898
2151
|
const constraints = snapshot?.linkage?.topics[id]?.constraints ?? "";
|
|
2152
|
+
const open = managing === id;
|
|
2153
|
+
const links = linkRow(id);
|
|
1899
2154
|
return [(0, import_react.createElement)(
|
|
1900
|
-
"
|
|
1901
|
-
{ key: id, className:
|
|
1902
|
-
(0, import_react.createElement)(
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
2155
|
+
"li",
|
|
2156
|
+
{ key: id, className: `theone-topic-card${open ? " theone-open" : ""}${topic.hidden ? " theone-hidden" : ""}` },
|
|
2157
|
+
(0, import_react.createElement)(
|
|
2158
|
+
"div",
|
|
2159
|
+
{ className: "theone-topic-main" },
|
|
2160
|
+
(0, import_react.createElement)("h3", null, topic.title),
|
|
2161
|
+
topic.summary && topic.summary.trim() !== topic.title.trim() ? (0, import_react.createElement)("p", { className: "theone-topic-summary" }, topic.summary) : null,
|
|
2162
|
+
topic.hidden ? (0, import_react.createElement)("p", { className: "theone-topic-warning" }, t2(topic.hidden === "archived" ? "topic.hiddenArchived" : "topic.hiddenOrphaned")) : null,
|
|
2163
|
+
topic.lastState || constraints || links && !open ? (0, import_react.createElement)(
|
|
2164
|
+
"dl",
|
|
2165
|
+
{ className: "theone-topic-meta" },
|
|
2166
|
+
topic.lastState ? [(0, import_react.createElement)("dt", { key: "s" }, label(t2("topic.state"))), (0, import_react.createElement)("dd", { key: "sv" }, topic.lastState)] : null,
|
|
2167
|
+
constraints ? [(0, import_react.createElement)("dt", { key: "c" }, label(t2("topic.constraints"))), (0, import_react.createElement)("dd", { key: "cv" }, constraints)] : null,
|
|
2168
|
+
open ? null : links
|
|
2169
|
+
) : null
|
|
2170
|
+
),
|
|
1908
2171
|
(0, import_react.createElement)(
|
|
1909
2172
|
"div",
|
|
1910
2173
|
{ className: "theone-topic-actions" },
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
2174
|
+
// A hidden topic has nothing left to continue: its conversations are gone or archived.
|
|
2175
|
+
(0, import_react.createElement)("button", {
|
|
2176
|
+
type: "button",
|
|
2177
|
+
className: "theone-continue",
|
|
2178
|
+
disabled: !!busy || !!topic.hidden,
|
|
2179
|
+
title: topic.hidden ? t2("topic.continueHidden") : void 0,
|
|
2180
|
+
onClick: () => {
|
|
2181
|
+
void continueTopic(id);
|
|
2182
|
+
}
|
|
2183
|
+
}, t2(busy === id ? "topic.opening" : "topic.continue"), (0, import_react.createElement)("span", { "aria-hidden": true }, " \u2192")),
|
|
2184
|
+
(0, import_react.createElement)("button", { type: "button", className: "theone-quiet", "aria-expanded": open, onClick: () => setManaging((current) => current === id ? void 0 : id) }, t2(open ? "manage.close" : "manage.open")),
|
|
2185
|
+
...(topic.hidden === "orphaned" ? [] : topic.sourceSessionIds).slice(0, 3).map((sessionId, i) => (0, import_react.createElement)("button", {
|
|
1916
2186
|
key: sessionId,
|
|
1917
2187
|
type: "button",
|
|
1918
|
-
className: "theone-
|
|
2188
|
+
className: "theone-quiet",
|
|
1919
2189
|
onClick: () => {
|
|
1920
2190
|
ctx.layout.beginNavigation();
|
|
1921
2191
|
ctx.uiWorkspace.openSession(sessionId);
|
|
1922
2192
|
}
|
|
1923
2193
|
}, t2("topic.source") + (topic.sourceSessionIds.length > 1 ? " " + (i + 1) : "")))
|
|
1924
2194
|
),
|
|
1925
|
-
|
|
2195
|
+
open ? (0, import_react.createElement)(
|
|
2196
|
+
"div",
|
|
2197
|
+
{ className: "theone-topic-edit" },
|
|
2198
|
+
links,
|
|
2199
|
+
(0, import_react.createElement)(TopicManager, { key: `${id}:${topic.title}:${topic.summary}:${constraints}`, topic, constraints, groups: snapshot.groups, contexts: snapshot.contexts, post, busy: !!busy })
|
|
2200
|
+
) : null
|
|
1926
2201
|
)];
|
|
1927
|
-
})
|
|
2202
|
+
}))
|
|
1928
2203
|
)))
|
|
1929
2204
|
);
|
|
1930
2205
|
}
|
|
@@ -2004,6 +2279,12 @@ button:has(.theone-nav[data-wide=true])>span:has(.theone-nav){flex:1;min-width:0
|
|
|
2004
2279
|
.theone-dialog-actions .theone-dialog-primary:hover{background:#4a7fc0}
|
|
2005
2280
|
.theone-dialog-actions button:focus-visible{outline:2px solid #4a7fc0;outline-offset:2px}
|
|
2006
2281
|
.theone-dialog .theone-dialog-body{white-space:pre-wrap;color:var(--dsw-alias-label-primary,#e8e8ea)}
|
|
2282
|
+
.theone-feedback{width:min(560px,100%);max-height:calc(100vh - 32px);overflow:auto}
|
|
2283
|
+
.theone-feedback textarea,.theone-feedback input:not([type=checkbox]){display:block;width:100%;box-sizing:border-box;margin:0 0 10px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2,#ffffff1f);border-radius:9px;background:transparent;color:inherit;font:inherit;resize:vertical}
|
|
2284
|
+
.theone-feedback .theone-feedback-check{display:block;margin:0 0 10px;font-size:13px;color:var(--dsw-alias-label-secondary,#a0a0a6)}
|
|
2285
|
+
.theone-feedback-preview{margin:0 0 10px;font-size:13px}
|
|
2286
|
+
.theone-feedback-preview summary{cursor:pointer;color:var(--dsw-alias-label-secondary,#a0a0a6)}
|
|
2287
|
+
.theone-feedback-preview pre{max-height:220px;overflow:auto;margin:6px 0 0;padding:8px 10px;border-radius:9px;background:#0000001f;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
|
|
2007
2288
|
.theone-notice{display:flex;align-items:center;gap:8px;margin:6px 4px 0;padding:6px 8px 6px 10px;border:1px solid var(--dsw-alias-border-l2,#ffffff1f);border-radius:10px;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary,#a0a0a6);min-width:0}
|
|
2008
2289
|
.theone-notice-tag{flex:none;display:inline-flex;padding:3px;border-radius:6px;background:#3b6fb033;color:#7fa9dd}
|
|
2009
2290
|
.theone-notice-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -2027,8 +2308,93 @@ button:has(.theone-nav[data-wide=true])>span:has(.theone-nav){flex:1;min-width:0
|
|
|
2027
2308
|
`;
|
|
2028
2309
|
var catalogCss = `
|
|
2029
2310
|
button:has(.theone-catalog-entry)>span:not(:has(.theone-catalog-entry)){display:none}
|
|
2030
|
-
.theone-catalog{
|
|
2031
|
-
|
|
2311
|
+
.theone-catalog{--t-fg:var(--dsw-alias-label-primary,#18181b);--t-muted:var(--dsw-alias-label-secondary,#6b6b72);--t-rule:var(--dsw-alias-border-l2,#18181b1f);--t-accent:#b4531c;--t-warn:#c2410c;--t-field:#18181b0a;
|
|
2312
|
+
container-type:inline-size;box-sizing:border-box;height:100%;overflow:auto;padding:48px 56px 96px;color:var(--t-fg);font-feature-settings:"tnum" 1}
|
|
2313
|
+
[data-ds-dark-theme] .theone-catalog{--t-accent:#8cc2ef;--t-warn:#fb923c;--t-field:#ffffff0d}
|
|
2314
|
+
.theone-catalog>*{max-width:1120px;margin-left:auto;margin-right:auto}
|
|
2315
|
+
.theone-catalog button{font:inherit;font-size:13px;line-height:1.4;color:inherit;background:transparent;border:1px solid var(--t-rule);border-radius:6px;padding:6px 12px;cursor:pointer;white-space:nowrap}
|
|
2316
|
+
.theone-catalog button:hover:not(:disabled){border-color:var(--t-fg)}
|
|
2317
|
+
.theone-catalog button:disabled{opacity:.4;cursor:default}
|
|
2318
|
+
.theone-catalog button:focus-visible{outline:2px solid var(--t-accent);outline-offset:2px}
|
|
2319
|
+
.theone-catalog .theone-primary{background:var(--t-fg);border-color:var(--t-fg);color:var(--dsw-alias-bg-primary,#fff)}
|
|
2320
|
+
[data-ds-dark-theme] .theone-catalog .theone-primary{color:#111}
|
|
2321
|
+
.theone-catalog .theone-quiet{border-color:transparent;color:var(--t-muted);padding-left:6px;padding-right:6px}
|
|
2322
|
+
.theone-catalog .theone-quiet:hover:not(:disabled){border-color:transparent;color:var(--t-fg);text-decoration:underline;text-underline-offset:3px}
|
|
2323
|
+
.theone-catalog .theone-continue{border-color:transparent;color:var(--t-accent);font-weight:600;padding-left:0;padding-right:6px}
|
|
2324
|
+
.theone-catalog .theone-continue:hover:not(:disabled){border-color:transparent;text-decoration:underline;text-underline-offset:3px}
|
|
2325
|
+
.theone-catalog-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px 48px;padding-bottom:28px;border-bottom:2px solid var(--t-fg)}
|
|
2326
|
+
.theone-overline{margin:0 0 14px;font-size:12px;font-weight:600;letter-spacing:.06em;color:var(--t-accent)}
|
|
2327
|
+
.theone-catalog h1{margin:0;font-size:44px;line-height:1.05;font-weight:700;letter-spacing:-.02em}
|
|
2328
|
+
.theone-catalog-lede{margin:14px 0 0;max-width:34em;font-size:15px;line-height:1.6;color:var(--t-muted)}
|
|
2329
|
+
.theone-figures{display:flex;gap:40px;margin:0}
|
|
2330
|
+
.theone-figures>div{display:flex;flex-direction:column-reverse;gap:6px;min-width:64px}
|
|
2331
|
+
.theone-figures dd{margin:0;font-size:40px;line-height:1;font-weight:600;letter-spacing:-.02em}
|
|
2332
|
+
.theone-figures dt{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--t-muted)}
|
|
2333
|
+
.theone-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;padding:14px 0 40px}
|
|
2334
|
+
.theone-catalog-status{margin:0;font-size:13px;color:var(--t-muted)}
|
|
2335
|
+
.theone-catalog-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
|
|
2336
|
+
.theone-catalog-note,.theone-catalog-empty{color:var(--t-muted);font-size:14px;line-height:1.7}
|
|
2337
|
+
.theone-catalog-empty{padding:48px 0}
|
|
2338
|
+
.theone-catalog-warning{margin:0 0 24px;padding:10px 0 10px 14px;border-left:2px solid var(--t-warn);font-size:13px;line-height:1.6}
|
|
2339
|
+
.theone-catalog-entry{display:flex;align-items:center;gap:10px;font-size:14px}
|
|
2340
|
+
.theone-routes{margin-bottom:56px;border-top:1px solid var(--t-rule);border-bottom:1px solid var(--t-rule)}
|
|
2341
|
+
.theone-routes summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:14px 0;cursor:pointer;font-size:13px;font-weight:600;letter-spacing:.04em;list-style:none}
|
|
2342
|
+
.theone-routes summary::-webkit-details-marker{display:none}
|
|
2343
|
+
.theone-routes summary::before{content:"+";display:inline-block;width:14px;color:var(--t-muted);font-weight:400}
|
|
2344
|
+
.theone-routes[open] summary::before{content:"\u2212"}
|
|
2345
|
+
.theone-routes summary>span{color:var(--t-muted);font-weight:400}
|
|
2346
|
+
.theone-route-stats{font-weight:400;color:var(--t-muted);font-size:12px}
|
|
2347
|
+
.theone-routes .theone-manage-hint{margin:0 0 12px 26px;max-width:46em}
|
|
2348
|
+
.theone-routes ol{list-style:none;margin:0;padding:0 0 8px}
|
|
2349
|
+
.theone-routes li{display:grid;grid-template-columns:52px minmax(0,1.3fr) minmax(0,1fr) auto;gap:4px 20px;align-items:baseline;padding:10px 0;border-top:1px solid var(--t-rule);font-size:13px}
|
|
2350
|
+
.theone-routes time{color:var(--t-muted)}
|
|
2351
|
+
.theone-routes q{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;quotes:none}
|
|
2352
|
+
.theone-route-target{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
2353
|
+
.theone-route-target strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
2354
|
+
.theone-route-target small{color:var(--t-muted);font-size:12px}
|
|
2355
|
+
.theone-route-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}
|
|
2356
|
+
.theone-route-fixed{color:var(--t-muted);font-size:12px}
|
|
2357
|
+
.theone-routes select{width:auto;max-width:150px;padding-top:4px;padding-bottom:4px;font-size:12px}
|
|
2358
|
+
.theone-catalog-groups{display:flex;flex-direction:column;gap:56px}
|
|
2359
|
+
.theone-topic-group{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:0 40px;border-top:2px solid var(--t-fg);padding-top:16px}
|
|
2360
|
+
.theone-group-head{position:sticky;top:0;align-self:start}
|
|
2361
|
+
.theone-group-index{display:block;margin-bottom:10px;font-size:13px;font-weight:600;color:var(--t-accent)}
|
|
2362
|
+
.theone-topic-group h2{margin:0;font-size:22px;line-height:1.2;font-weight:700;letter-spacing:-.01em}
|
|
2363
|
+
.theone-topic-group h2 span{margin-left:8px;font-size:13px;font-weight:400;color:var(--t-muted)}
|
|
2364
|
+
.theone-group-summary{margin:10px 0 0;font-size:13px;line-height:1.6;color:var(--t-muted)}
|
|
2365
|
+
.theone-topic-list{list-style:none;margin:0;padding:0}
|
|
2366
|
+
.theone-topic-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 32px;padding:18px 0 20px;border-top:1px solid var(--t-rule)}
|
|
2367
|
+
.theone-topic-card:first-child{border-top:0;padding-top:4px}
|
|
2368
|
+
.theone-topic-card.theone-hidden .theone-topic-main{opacity:.6}
|
|
2369
|
+
.theone-topic-card h3{margin:0;font-size:16px;line-height:1.4;font-weight:600}
|
|
2370
|
+
.theone-topic-summary{margin:6px 0 0;max-width:42em;font-size:14px;line-height:1.6;color:var(--t-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
|
2371
|
+
.theone-topic-meta{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 16px;margin:14px 0 0;max-width:46em;font-size:13px;line-height:1.55}
|
|
2372
|
+
.theone-topic-meta dt{color:var(--t-muted);font-size:12px;white-space:nowrap}
|
|
2373
|
+
.theone-topic-meta dd{margin:0}
|
|
2374
|
+
.theone-tag{display:inline-block;margin-left:8px;padding:0 6px;border:1px solid var(--t-rule);border-radius:4px;font-size:11px;color:var(--t-muted)}
|
|
2375
|
+
.theone-topic-warning{margin:10px 0 0;padding-left:12px;border-left:2px solid var(--t-warn);font-size:12px;line-height:1.6}
|
|
2376
|
+
.theone-topic-actions{display:flex;flex-direction:column;align-items:flex-end;gap:0}.theone-topic-actions button{padding-top:3px;padding-bottom:3px}
|
|
2377
|
+
.theone-topic-edit{grid-column:1/-1;margin-top:12px;padding:4px 0 4px 20px;border-left:2px solid var(--t-accent)}
|
|
2378
|
+
.theone-topic-links{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0 0 16px;font-size:13px}
|
|
2379
|
+
.theone-links-label,.theone-links-empty{color:var(--t-muted)}
|
|
2380
|
+
.theone-link-chip{display:inline-flex;align-items:center;gap:2px;padding:2px 2px 2px 10px;border:1px solid var(--t-rule);border-radius:4px}
|
|
2381
|
+
.theone-catalog .theone-link-chip button{border:0;padding:0 6px;font-size:14px;line-height:1;color:var(--t-muted)}
|
|
2382
|
+
.theone-link-private{display:inline-flex;align-items:center;gap:6px;color:var(--t-muted);cursor:pointer}
|
|
2383
|
+
.theone-catalog input:not([type=checkbox]),.theone-catalog textarea,.theone-catalog select{font:inherit;font-size:13px;color:inherit;background:var(--t-field);border:1px solid transparent;border-bottom-color:var(--t-rule);border-radius:4px 4px 0 0;padding:7px 10px;box-sizing:border-box;min-width:0}
|
|
2384
|
+
.theone-catalog input:not([type=checkbox]):focus,.theone-catalog textarea:focus,.theone-catalog select:focus{outline:none;border-bottom-color:var(--t-accent)}
|
|
2385
|
+
.theone-manage{display:flex;flex-direction:column;gap:14px;font-size:13px}
|
|
2386
|
+
.theone-create{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 40px;padding:16px 0;border-top:1px solid var(--t-rule);border-bottom:1px solid var(--t-rule)}
|
|
2387
|
+
.theone-create input{flex:1;min-width:200px}
|
|
2388
|
+
.theone-manage-field{display:flex;flex-direction:column;gap:6px}
|
|
2389
|
+
.theone-manage-field>span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--t-muted)}
|
|
2390
|
+
.theone-manage textarea{resize:vertical;width:100%}
|
|
2391
|
+
.theone-manage-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
|
|
2392
|
+
.theone-manage-row select,.theone-manage-row input{flex:1;min-width:160px}
|
|
2393
|
+
.theone-manage-hint{margin:0;font-size:12px;line-height:1.6;color:var(--t-muted)}
|
|
2394
|
+
.theone-catalog .theone-danger{color:var(--t-warn);border-color:var(--t-warn)}
|
|
2395
|
+
@container (max-width:860px){.theone-topic-group{grid-template-columns:1fr}.theone-group-head{position:static;margin-bottom:20px}.theone-catalog-header{grid-template-columns:1fr}.theone-figures{gap:32px}}
|
|
2396
|
+
@container (max-width:640px){.theone-catalog h1{font-size:32px}.theone-figures dd{font-size:30px}.theone-topic-card{grid-template-columns:1fr}.theone-topic-actions{flex-direction:row;flex-wrap:wrap;align-items:center}.theone-routes li{grid-template-columns:44px minmax(0,1fr)}.theone-route-target,.theone-route-actions{grid-column:2}.theone-route-actions{justify-content:flex-start}}
|
|
2397
|
+
@media(max-width:640px){.theone-catalog{padding:28px 16px 64px}}
|
|
2032
2398
|
`;
|
|
2033
2399
|
var composerCss = `
|
|
2034
2400
|
.theone-bg{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 10px;border:0;border-radius:10px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;white-space:nowrap;cursor:pointer;max-width:220px}
|