@dsh-agentic-roleplay/core 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icon.svg +13 -0
- package/lib/{authoring-tools-C6Hzy8jU.js → authoring-tools-C9cmcUbD.js} +424 -31
- package/lib/authoring.js +6 -6
- package/lib/{child-C8r8AFpm.js → child-C9nPIy9j.js} +7 -3
- package/lib/client.js +2196 -728
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +1 -1
- package/lib/doctor.js +2 -2
- package/lib/helper.js +8 -1
- package/lib/{hooks-BuQ61nvQ.js → hooks-BpLN_hhT.js} +180 -153
- package/lib/images.js +1 -1
- package/lib/index.js +456 -61
- package/lib/{lorebook-author-tools-B6_Jj8oe.js → lorebook-author-tools-Cg7QQemi.js} +4 -4
- package/lib/lorebook-authoring.js +4 -4
- package/lib/orchestration.js +65 -15
- package/lib/{pack-jail-OZSgU85i.js → pack-jail-D5j5mIq6.js} +12 -8
- package/lib/{packs-B88bxt8E.js → packs-Cc05FrId.js} +2 -2
- package/lib/{presenter-agent-D-WNs626.js → presenter-agent-UKbKYXMO.js} +3 -3
- package/lib/{preset-DNuqvMan.js → preset-Be4lz6vB.js} +4 -4
- package/lib/{preset-author-tools-CDwavcTb.js → preset-author-tools-C3s0iSfv.js} +5 -5
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-9_MNxwaw.js → presets-Cl9sU3Qs.js} +52 -10
- package/lib/{reflection-BvM0w1R4.js → reflection-I9z-PvFK.js} +8 -6
- package/lib/{turn-guard-Ygdww1Wt.js → turn-guard-B9pGCeir.js} +3 -3
- package/package.json +4 -2
- package/prompts/en/checks/decide-opening.md +7 -1
- package/prompts/en/roleplay/record-keeper.md +2 -1
- package/prompts/zh/checks/decide-opening.md +7 -1
- package/prompts/zh/roleplay/record-keeper.md +2 -1
package/lib/client.js
CHANGED
|
@@ -24,16 +24,16 @@ window.__ModuleLoader__.load({
|
|
|
24
24
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUsersOutlineRegular, { size });
|
|
25
25
|
}
|
|
26
26
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/page-tabs/PageTabs.module.css.mjs
|
|
27
|
-
const css$
|
|
28
|
-
const key$
|
|
29
|
-
let tag$
|
|
30
|
-
if (tag$
|
|
31
|
-
tag$
|
|
32
|
-
tag$
|
|
33
|
-
tag$
|
|
34
|
-
document.head.appendChild(tag$
|
|
35
|
-
}
|
|
36
|
-
tag$
|
|
27
|
+
const css$40 = ".rp_LrKukW_tabs{scrollbar-width:none;gap:24px;margin-bottom:-1px;display:flex;overflow-x:auto}.rp_LrKukW_tabs::-webkit-scrollbar{display:none}.rp_LrKukW_tab{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:0;margin:0;padding:8px 0;font-size:13px;line-height:20px;box-shadow:inset 0 -2px #0000}.rp_LrKukW_tab:hover{color:var(--dsw-alias-label-primary)}.rp_LrKukW_tab[aria-selected=true]{color:var(--dsw-alias-state-business-primary);font-weight:500;box-shadow:inset 0 -2px}.rp_LrKukW_tab:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}";
|
|
28
|
+
const key$40 = "src/client/widgets/page-tabs/PageTabs.module.css";
|
|
29
|
+
let tag$40 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$40) + "]");
|
|
30
|
+
if (tag$40 === null) {
|
|
31
|
+
tag$40 = document.createElement("style");
|
|
32
|
+
tag$40.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
33
|
+
tag$40.dataset.pluginCss = key$40;
|
|
34
|
+
document.head.appendChild(tag$40);
|
|
35
|
+
}
|
|
36
|
+
tag$40.textContent = css$40;
|
|
37
37
|
var PageTabs_module_css_default = {
|
|
38
38
|
"tabs": "rp_LrKukW_tabs",
|
|
39
39
|
"tab": "rp_LrKukW_tab"
|
|
@@ -78,21 +78,21 @@ window.__ModuleLoader__.load({
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/RoleplayPanel.module.css.mjs
|
|
81
|
-
const css$
|
|
82
|
-
const key$
|
|
83
|
-
let tag$
|
|
84
|
-
if (tag$
|
|
85
|
-
tag$
|
|
86
|
-
tag$
|
|
87
|
-
tag$
|
|
88
|
-
document.head.appendChild(tag$
|
|
81
|
+
const css$39 = ".rp_ua5gBa_panel{min-height:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;display:flex}.rp_ua5gBa_header{border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;padding:12px 24px 0}.rp_ua5gBa_title{margin:0 0 4px;font-size:14px;font-weight:500;line-height:22px}.rp_ua5gBa_body{flex-direction:column;flex:1 1 0;min-height:0;padding:12px 24px 16px;display:flex}@media (width<=640px){.rp_ua5gBa_header,.rp_ua5gBa_body{padding-inline:16px}}";
|
|
82
|
+
const key$39 = "src/client/panel/RoleplayPanel.module.css";
|
|
83
|
+
let tag$39 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$39) + "]");
|
|
84
|
+
if (tag$39 === null) {
|
|
85
|
+
tag$39 = document.createElement("style");
|
|
86
|
+
tag$39.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
87
|
+
tag$39.dataset.pluginCss = key$39;
|
|
88
|
+
document.head.appendChild(tag$39);
|
|
89
89
|
}
|
|
90
|
-
tag$
|
|
90
|
+
tag$39.textContent = css$39;
|
|
91
91
|
var RoleplayPanel_module_css_default = {
|
|
92
|
-
"header": "rp_ua5gBa_header",
|
|
93
|
-
"title": "rp_ua5gBa_title",
|
|
94
92
|
"body": "rp_ua5gBa_body",
|
|
95
|
-
"
|
|
93
|
+
"title": "rp_ua5gBa_title",
|
|
94
|
+
"panel": "rp_ua5gBa_panel",
|
|
95
|
+
"header": "rp_ua5gBa_header"
|
|
96
96
|
};
|
|
97
97
|
// src/client/panel/RoleplayPanel.tsx
|
|
98
98
|
/** Header, page navigation and the selected page. */
|
|
@@ -137,7 +137,7 @@ window.__ModuleLoader__.load({
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
// src/client/panel/locales.ts
|
|
140
|
-
const dictionaries$
|
|
140
|
+
const dictionaries$27 = {
|
|
141
141
|
en: {
|
|
142
142
|
label: "Role Play",
|
|
143
143
|
heading: "DSH Agentic Role Play",
|
|
@@ -195,11 +195,11 @@ window.__ModuleLoader__.load({
|
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
// src/client/panel/index.ts
|
|
198
|
-
const NAMESPACE$
|
|
198
|
+
const NAMESPACE$17 = "roleplay.panel";
|
|
199
199
|
/** Adds the Role Play entry to the sidebar and the main panel it opens. */
|
|
200
200
|
function registerPanel(ctx) {
|
|
201
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
202
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
201
|
+
const t = ctx.locale.bind(NAMESPACE$17);
|
|
202
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$17, dictionaries$27), "roleplay: panel dictionaries");
|
|
203
203
|
const pages = createPagesSource(ctx);
|
|
204
204
|
ctx.effect(() => pages.start(), "roleplay: page list");
|
|
205
205
|
const handle = createPanelStore();
|
|
@@ -211,7 +211,7 @@ window.__ModuleLoader__.load({
|
|
|
211
211
|
ctx.slots.inject("main", () => ctx.slots.register({
|
|
212
212
|
name: "main",
|
|
213
213
|
key: PANEL_ID,
|
|
214
|
-
locale: NAMESPACE$
|
|
214
|
+
locale: NAMESPACE$17,
|
|
215
215
|
store,
|
|
216
216
|
inject: () => ({ hooks: { pages: pages.store } }),
|
|
217
217
|
children: { "roleplay.page": {
|
|
@@ -224,7 +224,7 @@ window.__ModuleLoader__.load({
|
|
|
224
224
|
id: PANEL_ID,
|
|
225
225
|
order: 5,
|
|
226
226
|
label: () => t("label"),
|
|
227
|
-
locale: NAMESPACE$
|
|
227
|
+
locale: NAMESPACE$17
|
|
228
228
|
}, PanelIcon));
|
|
229
229
|
}
|
|
230
230
|
// src/client/chat/open-chat.ts
|
|
@@ -314,6 +314,16 @@ window.__ModuleLoader__.load({
|
|
|
314
314
|
source,
|
|
315
315
|
id
|
|
316
316
|
})}`;
|
|
317
|
+
/** The resource a page address of a configured catalogue's site names, or nothing when the address is not such a page. */
|
|
318
|
+
async function resolveLink(url) {
|
|
319
|
+
const { link } = await answer$3(await fetch(`${API_PREFIX}/catalogue/link`, {
|
|
320
|
+
method: "POST",
|
|
321
|
+
credentials: "same-origin",
|
|
322
|
+
headers: { "content-type": "application/json" },
|
|
323
|
+
body: JSON.stringify({ url })
|
|
324
|
+
}));
|
|
325
|
+
return link ?? void 0;
|
|
326
|
+
}
|
|
317
327
|
async function install(request) {
|
|
318
328
|
return await answer$3(await fetch(`${API_PREFIX}/catalogue/install`, {
|
|
319
329
|
method: "POST",
|
|
@@ -355,7 +365,7 @@ window.__ModuleLoader__.load({
|
|
|
355
365
|
return `${trimCharacters(baseUrl.trim(), "/", "end")}/versions/${encodeURIComponent(versionId)}/download`;
|
|
356
366
|
}
|
|
357
367
|
// src/client/pages/catalogue/catalogue-controller.ts
|
|
358
|
-
const messageOf$
|
|
368
|
+
const messageOf$15 = (error) => error instanceof Error ? error.message : String(error);
|
|
359
369
|
/** The configured catalogues as the host sees them, read again whenever the settings change. */
|
|
360
370
|
var CatalogueController = class {
|
|
361
371
|
openChat;
|
|
@@ -396,7 +406,7 @@ window.__ModuleLoader__.load({
|
|
|
396
406
|
} catch (error) {
|
|
397
407
|
if (this.abort.signal.aborted) return;
|
|
398
408
|
this.store.update((draft) => {
|
|
399
|
-
draft.error = messageOf$
|
|
409
|
+
draft.error = messageOf$15(error);
|
|
400
410
|
if (draft.status === "loading") draft.status = "failed";
|
|
401
411
|
});
|
|
402
412
|
}
|
|
@@ -406,52 +416,52 @@ window.__ModuleLoader__.load({
|
|
|
406
416
|
}
|
|
407
417
|
};
|
|
408
418
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-card/ImportCard.module.css.mjs
|
|
409
|
-
const css$
|
|
410
|
-
const key$
|
|
411
|
-
let tag$
|
|
412
|
-
if (tag$
|
|
413
|
-
tag$
|
|
414
|
-
tag$
|
|
415
|
-
tag$
|
|
416
|
-
document.head.appendChild(tag$
|
|
419
|
+
const css$38 = ".rp_5cvtma_page{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_5cvtma_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_5cvtma_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_5cvtma_space{flex:auto}.rp_5cvtma_error{color:var(--dsw-alias-state-error-primary);margin:0;padding:8px 16px;font-size:12px}.rp_5cvtma_body{box-sizing:border-box;flex-direction:column;flex:1 1 0;gap:20px;min-height:0;padding:20px 24px 40px;display:flex;overflow-y:auto}.rp_5cvtma_body>*{flex:none;width:100%;max-width:860px}.rp_5cvtma_top{align-items:flex-start;gap:20px;display:flex}.rp_5cvtma_picture{object-fit:cover;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex:0 0 120px;width:120px;height:160px}.rp_5cvtma_noPicture{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;font-size:12px;display:flex}.rp_5cvtma_about{flex-direction:column;flex:1 1 0;gap:8px;min-width:0;display:flex}.rp_5cvtma_label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:4px;font-size:12px;display:flex}.rp_5cvtma_tags{flex-wrap:wrap;gap:6px;display:flex}.rp_5cvtma_note{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_5cvtma_section{flex-direction:column;gap:8px;display:flex}.rp_5cvtma_heading{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_5cvtma_row{align-items:center;gap:8px;display:flex}.rp_5cvtma_field,.rp_5cvtma_entry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg)}.rp_5cvtma_fieldHead,.rp_5cvtma_entryHead{box-sizing:border-box;width:100%;font:inherit;text-align:left;color:inherit;background:0 0;border:0;align-items:center;gap:8px;padding:8px 10px;display:flex}.rp_5cvtma_fieldHead{cursor:pointer}.rp_5cvtma_fieldTitle,.rp_5cvtma_entryTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px}.rp_5cvtma_entryTitle{font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0;font-size:13px}.rp_5cvtma_fieldMeta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5cvtma_field .rp_5cvtma_note,.rp_5cvtma_entry .rp_5cvtma_note{padding:0 10px 6px}.rp_5cvtma_text{white-space:pre-wrap;word-break:break-word;max-height:320px;font:inherit;color:var(--dsw-alias-label-secondary);border-top:.5px solid var(--dsw-alias-border-l4);margin:0;padding:8px 10px 10px;font-size:12px;line-height:18px;overflow:auto}.rp_5cvtma_entryOff .rp_5cvtma_entryTitle{color:var(--dsw-alias-label-tertiary);text-decoration:line-through}.rp_5cvtma_choice{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}@media (width<=640px){.rp_5cvtma_body{padding-inline:16px}.rp_5cvtma_top{flex-direction:column}.rp_5cvtma_picture{width:96px;height:128px}.rp_5cvtma_row{flex-wrap:wrap}}.rp_5cvtma_choice input{margin-top:3px}.rp_5cvtma_choiceText{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_5cvtma_preview{white-space:pre-wrap;word-break:break-word;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}";
|
|
420
|
+
const key$38 = "src/client/widgets/import-card/ImportCard.module.css";
|
|
421
|
+
let tag$38 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$38) + "]");
|
|
422
|
+
if (tag$38 === null) {
|
|
423
|
+
tag$38 = document.createElement("style");
|
|
424
|
+
tag$38.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
425
|
+
tag$38.dataset.pluginCss = key$38;
|
|
426
|
+
document.head.appendChild(tag$38);
|
|
417
427
|
}
|
|
418
|
-
tag$
|
|
428
|
+
tag$38.textContent = css$38;
|
|
419
429
|
var ImportCard_module_css_default = {
|
|
420
|
-
"
|
|
430
|
+
"header": "rp_5cvtma_header",
|
|
431
|
+
"error": "rp_5cvtma_error",
|
|
432
|
+
"noPicture": "rp_5cvtma_noPicture",
|
|
433
|
+
"page": "rp_5cvtma_page",
|
|
434
|
+
"space": "rp_5cvtma_space",
|
|
421
435
|
"label": "rp_5cvtma_label",
|
|
422
|
-
"
|
|
436
|
+
"heading": "rp_5cvtma_heading",
|
|
437
|
+
"field": "rp_5cvtma_field",
|
|
438
|
+
"row": "rp_5cvtma_row",
|
|
423
439
|
"entryTitle": "rp_5cvtma_entryTitle",
|
|
424
|
-
"
|
|
440
|
+
"section": "rp_5cvtma_section",
|
|
425
441
|
"text": "rp_5cvtma_text",
|
|
442
|
+
"body": "rp_5cvtma_body",
|
|
443
|
+
"picture": "rp_5cvtma_picture",
|
|
444
|
+
"tags": "rp_5cvtma_tags",
|
|
445
|
+
"top": "rp_5cvtma_top",
|
|
446
|
+
"fieldHead": "rp_5cvtma_fieldHead",
|
|
447
|
+
"entryHead": "rp_5cvtma_entryHead",
|
|
448
|
+
"entryOff": "rp_5cvtma_entryOff",
|
|
426
449
|
"choice": "rp_5cvtma_choice",
|
|
427
|
-
"note": "rp_5cvtma_note",
|
|
428
|
-
"section": "rp_5cvtma_section",
|
|
429
450
|
"choiceText": "rp_5cvtma_choiceText",
|
|
430
451
|
"preview": "rp_5cvtma_preview",
|
|
431
|
-
"
|
|
432
|
-
"tags": "rp_5cvtma_tags",
|
|
433
|
-
"top": "rp_5cvtma_top",
|
|
452
|
+
"note": "rp_5cvtma_note",
|
|
434
453
|
"fieldMeta": "rp_5cvtma_fieldMeta",
|
|
435
|
-
"
|
|
436
|
-
"body": "rp_5cvtma_body",
|
|
437
|
-
"field": "rp_5cvtma_field",
|
|
438
|
-
"row": "rp_5cvtma_row",
|
|
454
|
+
"about": "rp_5cvtma_about",
|
|
439
455
|
"entry": "rp_5cvtma_entry",
|
|
440
|
-
"
|
|
441
|
-
"
|
|
442
|
-
"title": "rp_5cvtma_title",
|
|
443
|
-
"header": "rp_5cvtma_header",
|
|
444
|
-
"space": "rp_5cvtma_space",
|
|
445
|
-
"error": "rp_5cvtma_error",
|
|
446
|
-
"heading": "rp_5cvtma_heading",
|
|
447
|
-
"fieldHead": "rp_5cvtma_fieldHead"
|
|
456
|
+
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
457
|
+
"title": "rp_5cvtma_title"
|
|
448
458
|
};
|
|
449
459
|
// src/client/widgets/import-card/ImportCard.tsx
|
|
450
460
|
const pictureUrl = (id) => `${API_PREFIX}/worlds/import/picture?id=${encodeURIComponent(id)}`;
|
|
451
461
|
/** What the person is offered first: updating the world of that name nobody changed, otherwise a new world. */
|
|
452
462
|
const defaultTarget = (targets) => targets?.find((target) => target.sameName && target.edited === "no")?.worldId;
|
|
453
463
|
const editedNote = (target, t) => target.edited === "no" ? t("ic_targetClean") : target.edited === "yes" ? t("ic_targetEdited", { files: target.changes.join(", ") }) : t("ic_targetUnknown");
|
|
454
|
-
const same$
|
|
464
|
+
const same$2 = (a, b) => a.kind === b.kind && (a.kind !== "alternate" || b.kind === "alternate" && a.index === b.index);
|
|
455
465
|
function Text({ label, text, t, note }) {
|
|
456
466
|
const [open, setOpen] = (0, react.useState)(false);
|
|
457
467
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -804,7 +814,7 @@ window.__ModuleLoader__.load({
|
|
|
804
814
|
type: "radio",
|
|
805
815
|
name: "opening",
|
|
806
816
|
"aria-label": greeting.label,
|
|
807
|
-
checked: same$
|
|
817
|
+
checked: same$2(opening, greeting.choice),
|
|
808
818
|
onChange: () => {
|
|
809
819
|
setOpening(greeting.choice);
|
|
810
820
|
}
|
|
@@ -922,53 +932,53 @@ window.__ModuleLoader__.load({
|
|
|
922
932
|
});
|
|
923
933
|
}
|
|
924
934
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/catalogue/CataloguePage.module.css.mjs
|
|
925
|
-
const css$
|
|
926
|
-
const key$
|
|
927
|
-
let tag$
|
|
928
|
-
if (tag$
|
|
929
|
-
tag$
|
|
930
|
-
tag$
|
|
931
|
-
tag$
|
|
932
|
-
document.head.appendChild(tag$
|
|
935
|
+
const css$37 = ".rp_qK1u-G_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_qK1u-G_toolbar{flex-wrap:wrap;flex:none;align-items:center;gap:8px;min-height:32px;display:flex}.rp_qK1u-G_spacer{flex:auto}.rp_qK1u-G_select,.rp_qK1u-G_search{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_qK1u-G_search{min-width:200px}.rp_qK1u-G_select:focus-visible,.rp_qK1u-G_search:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_qK1u-G_status{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.rp_qK1u-G_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_qK1u-G_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_qK1u-G_grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_qK1u-G_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);min-width:0;font:inherit;text-align:left;color:inherit;background:var(--dsw-alias-settings-card-fill);cursor:pointer;flex-direction:column;padding:0;transition:border-color .12s;display:flex;overflow:hidden}.rp_qK1u-G_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_qK1u-G_card:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_qK1u-G_cover{aspect-ratio:4/3;background:var(--dsw-alias-bg-layer-3)}.rp_qK1u-G_image{object-fit:cover;width:100%;height:100%;display:block}.rp_qK1u-G_placeholder{color:#ffffffd9;background:linear-gradient(145deg, hsl(var(--rp-hue) 38% 46%), hsl(calc(var(--rp-hue) + 35) 38% 32%));user-select:none;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:500;display:flex}.rp_qK1u-G_body{flex-direction:column;gap:4px;padding:8px 10px 10px;display:flex}.rp_qK1u-G_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_qK1u-G_meta{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_qK1u-G_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_qK1u-G_more{justify-content:center;padding:12px 0;display:flex}.rp_qK1u-G_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_qK1u-G_form{flex-direction:column;gap:8px;display:flex}.rp_qK1u-G_field{flex-direction:column;gap:4px;display:flex}.rp_qK1u-G_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_qK1u-G_detail{flex-direction:column;gap:8px;font-size:13px;display:flex}.rp_qK1u-G_description{white-space:pre-wrap;max-height:240px;color:var(--dsw-alias-label-secondary);margin:0;overflow-y:auto}.rp_qK1u-G_success{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_qK1u-G_kinds{border-bottom:1px solid var(--dsw-alias-border-l2);flex:none;gap:16px;display:flex}.rp_qK1u-G_kind{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;margin-bottom:-1px;padding:4px 0 6px;font-size:13px}.rp_qK1u-G_kind[aria-selected=true]{border-bottom-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary);font-weight:500}.rp_qK1u-G_kind:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.rp_qK1u-G_updates{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;flex:none;align-items:center;gap:4px 8px;margin:0;padding:0;font-size:12px;list-style:none;display:flex}.rp_qK1u-G_update{border:.5px solid var(--dsw-alias-state-business-primary);border-radius:var(--dsw-radius-sm);font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;padding:2px 8px}.rp_qK1u-G_warning{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-secondary);flex-direction:column;gap:8px;padding:8px 12px;font-size:12px;display:flex}.rp_qK1u-G_warning p{margin:0}.rp_qK1u-G_changes{font-family:var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-tertiary);margin:0;padding-left:16px;font-size:12px}.rp_qK1u-G_actions{flex-wrap:wrap;gap:8px;display:flex}";
|
|
936
|
+
const key$37 = "src/client/pages/catalogue/CataloguePage.module.css";
|
|
937
|
+
let tag$37 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$37) + "]");
|
|
938
|
+
if (tag$37 === null) {
|
|
939
|
+
tag$37 = document.createElement("style");
|
|
940
|
+
tag$37.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
941
|
+
tag$37.dataset.pluginCss = key$37;
|
|
942
|
+
document.head.appendChild(tag$37);
|
|
933
943
|
}
|
|
934
|
-
tag$
|
|
944
|
+
tag$37.textContent = css$37;
|
|
935
945
|
var CataloguePage_module_css_default = {
|
|
946
|
+
"notice": "rp_qK1u-G_notice",
|
|
947
|
+
"body": "rp_qK1u-G_body",
|
|
948
|
+
"grid": "rp_qK1u-G_grid",
|
|
949
|
+
"description": "rp_qK1u-G_description",
|
|
950
|
+
"card": "rp_qK1u-G_card",
|
|
951
|
+
"viewport": "rp_qK1u-G_viewport",
|
|
952
|
+
"message": "rp_qK1u-G_message",
|
|
953
|
+
"toolbar": "rp_qK1u-G_toolbar",
|
|
954
|
+
"meta": "rp_qK1u-G_meta",
|
|
955
|
+
"tags": "rp_qK1u-G_tags",
|
|
956
|
+
"kind": "rp_qK1u-G_kind",
|
|
936
957
|
"field": "rp_qK1u-G_field",
|
|
937
|
-
"
|
|
938
|
-
"search": "rp_qK1u-G_search",
|
|
939
|
-
"name": "rp_qK1u-G_name",
|
|
940
|
-
"detail": "rp_qK1u-G_detail",
|
|
958
|
+
"kinds": "rp_qK1u-G_kinds",
|
|
941
959
|
"select": "rp_qK1u-G_select",
|
|
942
|
-
"
|
|
943
|
-
"update": "rp_qK1u-G_update",
|
|
960
|
+
"actions": "rp_qK1u-G_actions",
|
|
944
961
|
"form": "rp_qK1u-G_form",
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"kind": "rp_qK1u-G_kind",
|
|
962
|
+
"detail": "rp_qK1u-G_detail",
|
|
963
|
+
"spacer": "rp_qK1u-G_spacer",
|
|
948
964
|
"success": "rp_qK1u-G_success",
|
|
949
|
-
"
|
|
950
|
-
"warning": "rp_qK1u-G_warning",
|
|
951
|
-
"viewport": "rp_qK1u-G_viewport",
|
|
965
|
+
"search": "rp_qK1u-G_search",
|
|
952
966
|
"cover": "rp_qK1u-G_cover",
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"updates": "rp_qK1u-G_updates",
|
|
956
|
-
"grid": "rp_qK1u-G_grid",
|
|
957
|
-
"toolbar": "rp_qK1u-G_toolbar",
|
|
958
|
-
"meta": "rp_qK1u-G_meta",
|
|
959
|
-
"description": "rp_qK1u-G_description",
|
|
967
|
+
"more": "rp_qK1u-G_more",
|
|
968
|
+
"placeholder": "rp_qK1u-G_placeholder",
|
|
960
969
|
"status": "rp_qK1u-G_status",
|
|
961
|
-
"
|
|
962
|
-
"message": "rp_qK1u-G_message",
|
|
963
|
-
"kinds": "rp_qK1u-G_kinds",
|
|
970
|
+
"label": "rp_qK1u-G_label",
|
|
964
971
|
"image": "rp_qK1u-G_image",
|
|
965
|
-
"
|
|
972
|
+
"updates": "rp_qK1u-G_updates",
|
|
966
973
|
"page": "rp_qK1u-G_page",
|
|
967
|
-
"
|
|
974
|
+
"warning": "rp_qK1u-G_warning",
|
|
975
|
+
"name": "rp_qK1u-G_name",
|
|
976
|
+
"update": "rp_qK1u-G_update",
|
|
977
|
+
"changes": "rp_qK1u-G_changes"
|
|
968
978
|
};
|
|
969
979
|
// src/client/pages/catalogue/ImportUrlDialog.tsx
|
|
970
|
-
/** Installs a world from the address of its archive; an address on a configured catalogue's site is asked for with that catalogue's key. */
|
|
971
|
-
function ImportUrlDialog({ t, onClose, onInstalled }) {
|
|
980
|
+
/** Installs a world from the address of its archive, or opens the resource a page address of a configured catalogue names; an address on a configured catalogue's site is asked for with that catalogue's key. */
|
|
981
|
+
function ImportUrlDialog({ t, onClose, onInstalled, onLink }) {
|
|
972
982
|
const formId = (0, react.useId)();
|
|
973
983
|
const [address, setAddress] = (0, react.useState)("");
|
|
974
984
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
@@ -977,7 +987,12 @@ window.__ModuleLoader__.load({
|
|
|
977
987
|
if (address.trim() === "" || busy) return;
|
|
978
988
|
setBusy(true);
|
|
979
989
|
setError(void 0);
|
|
980
|
-
|
|
990
|
+
resolveLink(address.trim()).then(async (link) => {
|
|
991
|
+
if (link !== void 0) {
|
|
992
|
+
onLink(link);
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
const result = await install({ url: address.trim() });
|
|
981
996
|
onInstalled(result.world.name, result.packs);
|
|
982
997
|
}, (failure) => {
|
|
983
998
|
setBusy(false);
|
|
@@ -1031,7 +1046,7 @@ window.__ModuleLoader__.load({
|
|
|
1031
1046
|
});
|
|
1032
1047
|
}
|
|
1033
1048
|
// src/client/import-selection-api.ts
|
|
1034
|
-
async function reply$
|
|
1049
|
+
async function reply$5(response) {
|
|
1035
1050
|
if (!response.ok) {
|
|
1036
1051
|
const body = await response.json().catch(() => void 0);
|
|
1037
1052
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
@@ -1047,7 +1062,7 @@ window.__ModuleLoader__.load({
|
|
|
1047
1062
|
});
|
|
1048
1063
|
/** Sends a preset or lorebook file to the host to be read: the answer is what it offers to import. */
|
|
1049
1064
|
async function stageFile(kind, file, signal) {
|
|
1050
|
-
return await reply$
|
|
1065
|
+
return await reply$5(await fetch(`${API_PREFIX}/import/stage?kind=${kind}`, {
|
|
1051
1066
|
method: "POST",
|
|
1052
1067
|
credentials: "same-origin",
|
|
1053
1068
|
headers: {
|
|
@@ -1060,7 +1075,7 @@ window.__ModuleLoader__.load({
|
|
|
1060
1075
|
}
|
|
1061
1076
|
/** The same for a release of a catalogue, which the host downloads. */
|
|
1062
1077
|
async function stageRelease(kind, source, versionId, signal) {
|
|
1063
|
-
return await reply$
|
|
1078
|
+
return await reply$5(await fetch(`${API_PREFIX}/catalogue/stage`, post$1({
|
|
1064
1079
|
source,
|
|
1065
1080
|
versionId,
|
|
1066
1081
|
kind
|
|
@@ -1068,20 +1083,20 @@ window.__ModuleLoader__.load({
|
|
|
1068
1083
|
}
|
|
1069
1084
|
/** Imports a staged preset into a new library preset, named `name`, or after `title` when there is no name; its authoring chat turns the chosen prompts into the preset's own. */
|
|
1070
1085
|
async function importStagedPreset(choice, extra, signal) {
|
|
1071
|
-
return await reply$
|
|
1086
|
+
return await reply$5(await fetch(`${API_PREFIX}/presets/import/staged`, post$1({
|
|
1072
1087
|
...choice,
|
|
1073
1088
|
...extra
|
|
1074
1089
|
}, signal)));
|
|
1075
1090
|
}
|
|
1076
1091
|
async function importStagedLorebook(choice, extra, signal) {
|
|
1077
|
-
return await reply$
|
|
1092
|
+
return await reply$5(await fetch(`${API_PREFIX}/lorebooks/import/staged`, post$1({
|
|
1078
1093
|
...choice,
|
|
1079
1094
|
...extra
|
|
1080
1095
|
}, signal)));
|
|
1081
1096
|
}
|
|
1082
1097
|
/** Imports a staged preset into a world, whose authoring chat turns the chosen prompts into the world's prose prompts. */
|
|
1083
1098
|
async function importStagedToWorld(worldId, choice, language) {
|
|
1084
|
-
return await reply$
|
|
1099
|
+
return await reply$5(await fetch(`${API_PREFIX}/worlds/import/preset/staged`, post$1({
|
|
1085
1100
|
...choice,
|
|
1086
1101
|
worldId,
|
|
1087
1102
|
language
|
|
@@ -1089,21 +1104,21 @@ window.__ModuleLoader__.load({
|
|
|
1089
1104
|
}
|
|
1090
1105
|
/** Imports the chosen entries of a staged lorebook as they are, with no assistant; the answer names the new lorebook. */
|
|
1091
1106
|
async function importVerbatimLorebook(choice, extra, signal) {
|
|
1092
|
-
return await reply$
|
|
1107
|
+
return await reply$5(await fetch(`${API_PREFIX}/lorebooks/import/verbatim`, post$1({
|
|
1093
1108
|
...choice,
|
|
1094
1109
|
...extra
|
|
1095
1110
|
}, signal)));
|
|
1096
1111
|
}
|
|
1097
1112
|
/** Imports the chosen prompts of a staged preset as they are, with no assistant; the answer names the new preset. */
|
|
1098
1113
|
async function importVerbatimPreset(choice, extra, signal) {
|
|
1099
|
-
return await reply$
|
|
1114
|
+
return await reply$5(await fetch(`${API_PREFIX}/presets/import/verbatim`, post$1({
|
|
1100
1115
|
...choice,
|
|
1101
1116
|
...extra
|
|
1102
1117
|
}, signal)));
|
|
1103
1118
|
}
|
|
1104
1119
|
/** Puts the chosen prompts of a staged preset into a world as its narration style, word for word, with no assistant. */
|
|
1105
1120
|
async function importVerbatimToWorld(worldId, choice, signal) {
|
|
1106
|
-
return await reply$
|
|
1121
|
+
return await reply$5(await fetch(`${API_PREFIX}/worlds/import/preset/verbatim`, post$1({
|
|
1107
1122
|
...choice,
|
|
1108
1123
|
worldId
|
|
1109
1124
|
}, signal)));
|
|
@@ -1152,33 +1167,33 @@ window.__ModuleLoader__.load({
|
|
|
1152
1167
|
};
|
|
1153
1168
|
const SAMPLING_KEYS = Object.keys(SAMPLING_RANGES);
|
|
1154
1169
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-selection/ImportSelection.module.css.mjs
|
|
1155
|
-
const css$
|
|
1156
|
-
const key$
|
|
1157
|
-
let tag$
|
|
1158
|
-
if (tag$
|
|
1159
|
-
tag$
|
|
1160
|
-
tag$
|
|
1161
|
-
tag$
|
|
1162
|
-
document.head.appendChild(tag$
|
|
1170
|
+
const css$36 = ".rp_Jx0l4q_body{flex-direction:column;gap:12px;min-width:min(640px,100%);max-height:calc(100vh - 220px);display:flex;overflow-y:auto}.rp_Jx0l4q_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_Jx0l4q_bar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Jx0l4q_count{color:var(--dsw-alias-label-tertiary);margin-right:auto;font-size:12px}.rp_Jx0l4q_list{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;max-height:max(120px,min(420px,100vh - 560px));margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.rp_Jx0l4q_row{border-bottom:.5px solid var(--dsw-alias-border-l3);gap:8px;padding:6px 8px;display:flex}.rp_Jx0l4q_row:last-child{border-bottom:0}.rp_Jx0l4q_row[data-usable=false]{opacity:.55}.rp_Jx0l4q_text{min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;gap:2px;font-size:13px;display:flex}.rp_Jx0l4q_meta{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px}.rp_Jx0l4q_note{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Jx0l4q_full{max-height:200px;font:12px/18px var(--dsw-font-mono,monospace);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--dsw-alias-bg-layer-1);border-radius:var(--dsw-radius-sm);margin:4px 0 0;padding:6px 8px;overflow:auto}.rp_Jx0l4q_sampling{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;gap:4px;padding:8px;display:flex}.rp_Jx0l4q_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Jx0l4q_extra{display:block}";
|
|
1171
|
+
const key$36 = "src/client/widgets/import-selection/ImportSelection.module.css";
|
|
1172
|
+
let tag$36 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$36) + "]");
|
|
1173
|
+
if (tag$36 === null) {
|
|
1174
|
+
tag$36 = document.createElement("style");
|
|
1175
|
+
tag$36.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
1176
|
+
tag$36.dataset.pluginCss = key$36;
|
|
1177
|
+
document.head.appendChild(tag$36);
|
|
1163
1178
|
}
|
|
1164
|
-
tag$
|
|
1179
|
+
tag$36.textContent = css$36;
|
|
1165
1180
|
var ImportSelection_module_css_default = {
|
|
1166
|
-
"meta": "rp_Jx0l4q_meta",
|
|
1167
1181
|
"body": "rp_Jx0l4q_body",
|
|
1168
|
-
"full": "rp_Jx0l4q_full",
|
|
1169
1182
|
"note": "rp_Jx0l4q_note",
|
|
1183
|
+
"full": "rp_Jx0l4q_full",
|
|
1184
|
+
"text": "rp_Jx0l4q_text",
|
|
1170
1185
|
"sampling": "rp_Jx0l4q_sampling",
|
|
1171
|
-
"help": "rp_Jx0l4q_help",
|
|
1172
1186
|
"list": "rp_Jx0l4q_list",
|
|
1187
|
+
"help": "rp_Jx0l4q_help",
|
|
1173
1188
|
"error": "rp_Jx0l4q_error",
|
|
1174
|
-
"extra": "rp_Jx0l4q_extra",
|
|
1175
|
-
"text": "rp_Jx0l4q_text",
|
|
1176
1189
|
"row": "rp_Jx0l4q_row",
|
|
1190
|
+
"count": "rp_Jx0l4q_count",
|
|
1191
|
+
"meta": "rp_Jx0l4q_meta",
|
|
1177
1192
|
"bar": "rp_Jx0l4q_bar",
|
|
1178
|
-
"
|
|
1193
|
+
"extra": "rp_Jx0l4q_extra"
|
|
1179
1194
|
};
|
|
1180
1195
|
// src/client/widgets/import-selection/ImportSelection.tsx
|
|
1181
|
-
const messageOf$
|
|
1196
|
+
const messageOf$14 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
1182
1197
|
/**
|
|
1183
1198
|
* The choice of what an imported preset or lorebook brings: every item the file offers, each ticked or not, and the file's sampling. Only the ticked items reach the conversion.
|
|
1184
1199
|
* What the caller needs besides the choice (a name for the new library entry) goes in as `children`.
|
|
@@ -1211,7 +1226,7 @@ window.__ModuleLoader__.load({
|
|
|
1211
1226
|
knownBy
|
|
1212
1227
|
}).then(onClose, (problem) => {
|
|
1213
1228
|
setBusy(false);
|
|
1214
|
-
setFailure(messageOf$
|
|
1229
|
+
setFailure(messageOf$14(problem));
|
|
1215
1230
|
});
|
|
1216
1231
|
};
|
|
1217
1232
|
const ignored = [["regexScripts", preview.ignored?.regexScripts], ["scripts", preview.ignored?.scripts]].flatMap(([key, count]) => typeof count === "number" && count > 0 ? [t(`is_ignored_${key}`, { count: String(count) })] : []);
|
|
@@ -1411,7 +1426,7 @@ window.__ModuleLoader__.load({
|
|
|
1411
1426
|
const date = new Date(iso);
|
|
1412
1427
|
return Number.isNaN(date.getTime()) ? iso : date.toLocaleDateString();
|
|
1413
1428
|
};
|
|
1414
|
-
const messageOf$
|
|
1429
|
+
const messageOf$13 = (problem) => problem instanceof Error ? problem.message : String(problem);
|
|
1415
1430
|
/** One entry of a catalogue: what it says about itself, its releases, and installing, updating or converting one of them. */
|
|
1416
1431
|
function WorldDialog({ t, source, id, name, kind, onClose, onChanged, openChat, onReview }) {
|
|
1417
1432
|
const [detail, setDetail] = (0, react.useState)();
|
|
@@ -1428,7 +1443,7 @@ window.__ModuleLoader__.load({
|
|
|
1428
1443
|
setDetail(loaded);
|
|
1429
1444
|
setVersionId(loaded.versions[0]?.id ?? "");
|
|
1430
1445
|
}, (problem) => {
|
|
1431
|
-
if (!abort.signal.aborted) setError(messageOf$
|
|
1446
|
+
if (!abort.signal.aborted) setError(messageOf$13(problem));
|
|
1432
1447
|
});
|
|
1433
1448
|
return () => {
|
|
1434
1449
|
abort.abort();
|
|
@@ -1465,7 +1480,7 @@ window.__ModuleLoader__.load({
|
|
|
1465
1480
|
}, (problem) => {
|
|
1466
1481
|
setBusy(void 0);
|
|
1467
1482
|
if (problem instanceof InstallConflict && problem.reason !== "exists") setConflict(problem);
|
|
1468
|
-
else setFailure(t("installFailed", { message: messageOf$
|
|
1483
|
+
else setFailure(t("installFailed", { message: messageOf$13(problem) }));
|
|
1469
1484
|
});
|
|
1470
1485
|
};
|
|
1471
1486
|
const runConvert = () => {
|
|
@@ -1481,7 +1496,7 @@ window.__ModuleLoader__.load({
|
|
|
1481
1496
|
});
|
|
1482
1497
|
}, (problem) => {
|
|
1483
1498
|
setBusy(void 0);
|
|
1484
|
-
setFailure(t("convertFailed", { message: messageOf$
|
|
1499
|
+
setFailure(t("convertFailed", { message: messageOf$13(problem) }));
|
|
1485
1500
|
});
|
|
1486
1501
|
};
|
|
1487
1502
|
const stage = (kind) => {
|
|
@@ -1493,7 +1508,7 @@ window.__ModuleLoader__.load({
|
|
|
1493
1508
|
setSelecting(preview);
|
|
1494
1509
|
}, (problem) => {
|
|
1495
1510
|
setBusy(void 0);
|
|
1496
|
-
setFailure(t(kind === "preset" ? "importPresetFailed" : "importLorebookFailed", { message: messageOf$
|
|
1511
|
+
setFailure(t(kind === "preset" ? "importPresetFailed" : "importLorebookFailed", { message: messageOf$13(problem) }));
|
|
1497
1512
|
});
|
|
1498
1513
|
};
|
|
1499
1514
|
const runPreset = () => {
|
|
@@ -1740,6 +1755,7 @@ window.__ModuleLoader__.load({
|
|
|
1740
1755
|
const source = usable.find((candidate) => candidate.name === selected) ?? usable[0];
|
|
1741
1756
|
const [search, setSearch] = (0, react.useState)("");
|
|
1742
1757
|
const [applied, setApplied] = (0, react.useState)("");
|
|
1758
|
+
const [tag, setTag] = (0, react.useState)("");
|
|
1743
1759
|
const [sort, setSort] = (0, react.useState)("recent");
|
|
1744
1760
|
const [page, setPage] = (0, react.useState)();
|
|
1745
1761
|
const [loading, setLoading] = (0, react.useState)(false);
|
|
@@ -1835,6 +1851,8 @@ window.__ModuleLoader__.load({
|
|
|
1835
1851
|
setMore(false);
|
|
1836
1852
|
});
|
|
1837
1853
|
};
|
|
1854
|
+
const tags = [...new Set((page?.items ?? []).flatMap((entry) => entry.tags))].sort((a, b) => a.localeCompare(b));
|
|
1855
|
+
const shown = (page?.items ?? []).filter((entry) => tag === "" || entry.tags.includes(tag));
|
|
1838
1856
|
const problems = state.sources.filter((entry) => entry.problem !== void 0);
|
|
1839
1857
|
if (reviewing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1840
1858
|
className: CataloguePage_module_css_default.page,
|
|
@@ -1915,6 +1933,21 @@ window.__ModuleLoader__.load({
|
|
|
1915
1933
|
children: t("sortPopular")
|
|
1916
1934
|
})]
|
|
1917
1935
|
}),
|
|
1936
|
+
tags.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1937
|
+
className: CataloguePage_module_css_default.select,
|
|
1938
|
+
value: tag,
|
|
1939
|
+
"aria-label": t("tagFilter"),
|
|
1940
|
+
onChange: (event) => {
|
|
1941
|
+
setTag(event.target.value);
|
|
1942
|
+
},
|
|
1943
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1944
|
+
value: "",
|
|
1945
|
+
children: t("tagAny")
|
|
1946
|
+
}), tags.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1947
|
+
value: entry,
|
|
1948
|
+
children: entry
|
|
1949
|
+
}, entry))]
|
|
1950
|
+
}),
|
|
1918
1951
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: CataloguePage_module_css_default.spacer }),
|
|
1919
1952
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1920
1953
|
variant: "outline",
|
|
@@ -1954,6 +1987,7 @@ window.__ModuleLoader__.load({
|
|
|
1954
1987
|
onClick: () => {
|
|
1955
1988
|
setKind(entry);
|
|
1956
1989
|
setPage(void 0);
|
|
1990
|
+
setTag("");
|
|
1957
1991
|
},
|
|
1958
1992
|
children: entry === "world" ? t("kindWorlds") : entry === "card" ? t("kindCards") : entry === "preset" ? t("kindPresets") : t("kindLorebooks")
|
|
1959
1993
|
}, entry))
|
|
@@ -2035,9 +2069,15 @@ window.__ModuleLoader__.load({
|
|
|
2035
2069
|
}) : page.items.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2036
2070
|
className: CataloguePage_module_css_default.message,
|
|
2037
2071
|
children: applied === "" ? kind === "card" ? t("emptyCards") : kind === "preset" ? t("emptyPresets") : kind === "lorebook" ? t("emptyLorebooks") : t("empty") : t("emptySearch", { search: applied })
|
|
2072
|
+
}) : shown.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2073
|
+
className: CataloguePage_module_css_default.message,
|
|
2074
|
+
children: t("emptyTag", {
|
|
2075
|
+
count: page.items.length,
|
|
2076
|
+
tag
|
|
2077
|
+
})
|
|
2038
2078
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
2039
2079
|
className: CataloguePage_module_css_default.grid,
|
|
2040
|
-
children:
|
|
2080
|
+
children: shown.map((world) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2041
2081
|
type: "button",
|
|
2042
2082
|
className: CataloguePage_module_css_default.card,
|
|
2043
2083
|
"data-testid": "roleplay-catalogue-card",
|
|
@@ -2120,6 +2160,16 @@ window.__ModuleLoader__.load({
|
|
|
2120
2160
|
onClose: () => {
|
|
2121
2161
|
setImporting(false);
|
|
2122
2162
|
},
|
|
2163
|
+
onLink: (link) => {
|
|
2164
|
+
setImporting(false);
|
|
2165
|
+
setSelected(link.source);
|
|
2166
|
+
setKind(link.kind);
|
|
2167
|
+
setOpened({
|
|
2168
|
+
id: link.id,
|
|
2169
|
+
name: link.name,
|
|
2170
|
+
kind: link.kind
|
|
2171
|
+
});
|
|
2172
|
+
},
|
|
2123
2173
|
onInstalled: (name, packs) => {
|
|
2124
2174
|
setImporting(false);
|
|
2125
2175
|
setNotice(`${t("installed", { name })}${packs.length > 0 ? ` ${t("packsNotice", { packs: packs.join(", ") })}` : ""}`);
|
|
@@ -2141,7 +2191,7 @@ window.__ModuleLoader__.load({
|
|
|
2141
2191
|
return Object.fromEntries(Object.keys(dictionaries).map((locale) => [locale, Object.fromEntries(Object.entries(dictionaries[locale]).map(([key, value]) => [`${prefix}${key}`, value]))]));
|
|
2142
2192
|
}
|
|
2143
2193
|
// src/client/widgets/import-card/locales.ts
|
|
2144
|
-
const dictionaries$
|
|
2194
|
+
const dictionaries$26 = {
|
|
2145
2195
|
en: {
|
|
2146
2196
|
ic_title: "Import a character card",
|
|
2147
2197
|
ic_updateTitle: "Update a world from a newer card",
|
|
@@ -2246,7 +2296,7 @@ window.__ModuleLoader__.load({
|
|
|
2246
2296
|
}
|
|
2247
2297
|
};
|
|
2248
2298
|
// src/client/widgets/import-selection/locales.ts
|
|
2249
|
-
const dictionaries$
|
|
2299
|
+
const dictionaries$25 = {
|
|
2250
2300
|
en: {
|
|
2251
2301
|
is_title_preset: "Choose what to import from {name}",
|
|
2252
2302
|
is_title_lorebook: "Choose what to import from {name}",
|
|
@@ -2330,7 +2380,7 @@ window.__ModuleLoader__.load({
|
|
|
2330
2380
|
is_failed: "无法导入:{message}"
|
|
2331
2381
|
}
|
|
2332
2382
|
};
|
|
2333
|
-
const dictionaries$
|
|
2383
|
+
const dictionaries$24 = withDictionaries(withDictionaries({
|
|
2334
2384
|
en: {
|
|
2335
2385
|
nav: "Catalogue",
|
|
2336
2386
|
loading: "Loading worlds…",
|
|
@@ -2343,6 +2393,9 @@ window.__ModuleLoader__.load({
|
|
|
2343
2393
|
searchPlaceholder: "Search worlds",
|
|
2344
2394
|
sortRecent: "Newest",
|
|
2345
2395
|
sortPopular: "Popular",
|
|
2396
|
+
tagAny: "Any tag",
|
|
2397
|
+
tagFilter: "Tag",
|
|
2398
|
+
emptyTag: "None of the {count} loaded entries has the tag “{tag}”: load more, or choose another tag.",
|
|
2346
2399
|
refresh: "Refresh",
|
|
2347
2400
|
refreshing: "Refreshing…",
|
|
2348
2401
|
importUrl: "Import from address",
|
|
@@ -2370,7 +2423,7 @@ window.__ModuleLoader__.load({
|
|
|
2370
2423
|
packsNotice: "It came with interface packs ({packs}). A pack runs its own scripts in a sandbox when you play; look at them first if you do not know the author.",
|
|
2371
2424
|
size: "{size}",
|
|
2372
2425
|
importTitle: "Import a world from an address",
|
|
2373
|
-
importHelp: "Paste the address of a world archive (a ZIP). If it belongs to a catalogue you added, that catalogue's API key is used; otherwise it is fetched as it is, and it fails if the address needs a sign-in.",
|
|
2426
|
+
importHelp: "Paste the address of a world archive (a ZIP), or of a world, card, preset or lorebook page of a catalogue you added (the address you see in the browser). If it belongs to a catalogue you added, that catalogue's API key is used; otherwise it is fetched as it is, and it fails if the address needs a sign-in.",
|
|
2374
2427
|
importAddress: "Address",
|
|
2375
2428
|
importAddressPlaceholder: "https://catalogue.example/api/versions/…/download",
|
|
2376
2429
|
importSubmit: "Import",
|
|
@@ -2436,6 +2489,9 @@ window.__ModuleLoader__.load({
|
|
|
2436
2489
|
searchPlaceholder: "搜索世界",
|
|
2437
2490
|
sortRecent: "最新",
|
|
2438
2491
|
sortPopular: "热门",
|
|
2492
|
+
tagAny: "任意标签",
|
|
2493
|
+
tagFilter: "标签",
|
|
2494
|
+
emptyTag: "已加载的 {count} 项里没有带“{tag}”标签的:请加载更多,或换一个标签。",
|
|
2439
2495
|
refresh: "刷新",
|
|
2440
2496
|
refreshing: "刷新中…",
|
|
2441
2497
|
importUrl: "从地址导入",
|
|
@@ -2463,7 +2519,7 @@ window.__ModuleLoader__.load({
|
|
|
2463
2519
|
packsNotice: "它带有界面包({packs})。游玩时界面包会在沙盒中运行自己的脚本;如果你不了解作者,请先查看。",
|
|
2464
2520
|
size: "{size}",
|
|
2465
2521
|
importTitle: "从地址导入世界",
|
|
2466
|
-
importHelp: "粘贴世界压缩包(ZIP
|
|
2522
|
+
importHelp: "粘贴世界压缩包(ZIP)的地址,或你添加的目录中某个世界、角色卡、预设或世界书页面的地址(浏览器里看到的那个)。如果它属于你添加的目录,会使用该目录的 API 密钥;否则按原样获取,地址需要登录时会失败。",
|
|
2467
2523
|
importAddress: "地址",
|
|
2468
2524
|
importAddressPlaceholder: "https://catalogue.example/api/versions/…/download",
|
|
2469
2525
|
importSubmit: "导入",
|
|
@@ -2517,13 +2573,13 @@ window.__ModuleLoader__.load({
|
|
|
2517
2573
|
convertNotStarted: "世界“{name}”已创建,但转换没有开始:{failure}。请打开它的创作对话,自己发送导入消息。",
|
|
2518
2574
|
openChat: "打开对话"
|
|
2519
2575
|
}
|
|
2520
|
-
}, dictionaries$
|
|
2576
|
+
}, dictionaries$25), dictionaries$26);
|
|
2521
2577
|
// src/client/pages/catalogue/index.ts
|
|
2522
|
-
const NAMESPACE$
|
|
2578
|
+
const NAMESPACE$16 = "roleplay.catalogue";
|
|
2523
2579
|
/** Adds the Catalogue page to the Role Play panel: worlds of the catalogues set up in the settings. */
|
|
2524
2580
|
function registerCataloguePage(ctx) {
|
|
2525
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
2526
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
2581
|
+
const t = ctx.locale.bind(NAMESPACE$16);
|
|
2582
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$16, dictionaries$24), "roleplay: catalogue dictionaries");
|
|
2527
2583
|
const catalogue = new CatalogueController(createChatOpener(ctx));
|
|
2528
2584
|
ctx.effect(() => () => {
|
|
2529
2585
|
catalogue.dispose();
|
|
@@ -2545,7 +2601,7 @@ window.__ModuleLoader__.load({
|
|
|
2545
2601
|
id: "catalogue",
|
|
2546
2602
|
order: 3,
|
|
2547
2603
|
label: () => t("nav"),
|
|
2548
|
-
locale: NAMESPACE$
|
|
2604
|
+
locale: NAMESPACE$16,
|
|
2549
2605
|
inject: () => catalogue.inject()
|
|
2550
2606
|
}, CataloguePage));
|
|
2551
2607
|
}
|
|
@@ -2604,7 +2660,7 @@ window.__ModuleLoader__.load({
|
|
|
2604
2660
|
return (await response.json()).added;
|
|
2605
2661
|
}
|
|
2606
2662
|
// src/client/pages/avatars/avatars-controller.ts
|
|
2607
|
-
const messageOf$
|
|
2663
|
+
const messageOf$12 = (error) => error instanceof Error ? error.message : String(error);
|
|
2608
2664
|
/** Reads the player avatars from the host and makes and removes them. */
|
|
2609
2665
|
var AvatarsController = class {
|
|
2610
2666
|
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
@@ -2651,7 +2707,7 @@ window.__ModuleLoader__.load({
|
|
|
2651
2707
|
} catch (error) {
|
|
2652
2708
|
if (this.abort.signal.aborted) return;
|
|
2653
2709
|
this.store.update((draft) => {
|
|
2654
|
-
draft.error = messageOf$
|
|
2710
|
+
draft.error = messageOf$12(error);
|
|
2655
2711
|
if (draft.avatars === void 0) draft.status = "failed";
|
|
2656
2712
|
});
|
|
2657
2713
|
} finally {
|
|
@@ -3052,51 +3108,57 @@ window.__ModuleLoader__.load({
|
|
|
3052
3108
|
}
|
|
3053
3109
|
const isDirty = (character, draft) => Object.keys(editOf$1(character, draft)).length > 0;
|
|
3054
3110
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/CharactersPanel.module.css.mjs
|
|
3055
|
-
const css$
|
|
3056
|
-
const key$
|
|
3057
|
-
let tag$
|
|
3058
|
-
if (tag$
|
|
3059
|
-
tag$
|
|
3060
|
-
tag$
|
|
3061
|
-
tag$
|
|
3062
|
-
document.head.appendChild(tag$
|
|
3111
|
+
const css$35 = ".rp_5ZMIxq_panel{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_5ZMIxq_tabs{border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;gap:4px;padding:0 24px;display:flex;overflow-x:auto}.rp_5ZMIxq_tab{font:inherit;white-space:nowrap;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;flex:none;margin-bottom:-1px;padding:12px 10px 10px;font-size:13px;line-height:20px}.rp_5ZMIxq_tabOn{color:var(--dsw-alias-state-business-primary);border-bottom-color:var(--dsw-alias-state-business-primary);font-weight:500}.rp_5ZMIxq_body{flex:1 1 0;min-height:0;overflow-y:auto}.rp_5ZMIxq_sheet{box-sizing:border-box;flex-direction:column;gap:20px;max-width:760px;padding:24px 24px 240px;display:flex}.rp_5ZMIxq_head{align-items:flex-start;gap:20px;display:flex}.rp_5ZMIxq_portrait{aspect-ratio:3/4;object-fit:cover;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:150px;height:auto;display:block}.rp_5ZMIxq_portraitBox{border-radius:var(--dsw-radius-lg);width:150px;height:200px;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;flex:0 0 150px;padding:0;display:block;position:relative}.rp_5ZMIxq_portraitBox:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.rp_5ZMIxq_portraitBox:disabled{cursor:not-allowed}.rp_5ZMIxq_portraitAction{box-sizing:border-box;border-radius:0 0 var(--dsw-radius-lg) var(--dsw-radius-lg);color:#fff;text-align:center;opacity:0;background:#0000009e;padding:7px 6px;font-size:12px;line-height:16px;transition:opacity .12s;position:absolute;bottom:1px;left:1px;right:1px}.rp_5ZMIxq_portraitBox:hover .rp_5ZMIxq_portraitAction,.rp_5ZMIxq_portraitBox:focus-visible .rp_5ZMIxq_portraitAction,.rp_5ZMIxq_portraitBox:disabled .rp_5ZMIxq_portraitAction{opacity:1}.rp_5ZMIxq_portraitError,.rp_5ZMIxq_portraitHint{margin:12px 24px 0;font-size:12px}.rp_5ZMIxq_portraitError{color:var(--dsw-alias-state-danger-primary)}.rp_5ZMIxq_portraitHint{color:var(--dsw-alias-label-secondary)}.rp_5ZMIxq_placeholder{box-sizing:border-box;color:var(--dsw-alias-label-secondary);flex-direction:column;justify-content:center;align-items:center;gap:8px;display:flex}.rp_5ZMIxq_initial{opacity:.6;font-size:48px;font-weight:500;line-height:1}.rp_5ZMIxq_missing{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5ZMIxq_meta{flex-direction:column;flex:1 1 0;gap:10px;min-width:0;display:flex}.rp_5ZMIxq_section{border-top:.5px solid var(--dsw-alias-border-l4);flex-direction:column;gap:6px;padding-top:16px;display:flex}.rp_5ZMIxq_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:13px;font-weight:500;line-height:20px}.rp_5ZMIxq_question{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex-direction:column;gap:14px;min-width:0;margin:4px 0 0;padding:14px;display:flex}.rp_5ZMIxq_questionTitle,.rp_5ZMIxq_optionTitle{color:var(--dsw-alias-label-secondary);padding:0 4px;font-size:12px;font-weight:500}.rp_5ZMIxq_optionFields{border:0;border-top:.5px solid var(--dsw-alias-border-l4);min-width:0;margin:2px 0 0;padding:14px 0 0}.rp_5ZMIxq_optionFields>.rp_5ZMIxq_optionTitle{padding:0}.rp_5ZMIxq_questionActions,.rp_5ZMIxq_itemActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_5ZMIxq_questionActions{justify-content:space-between}.rp_5ZMIxq_itemActions{justify-content:flex-end;margin-top:8px}.rp_5ZMIxq_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:0 24px;font-size:13px}.rp_5ZMIxq_section .rp_5ZMIxq_empty{padding:0}.rp_5ZMIxq_tabsSpace{flex:auto}.rp_5ZMIxq_voiceInline{min-width:220px;color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;display:flex}.rp_5ZMIxq_bar{border-bottom:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-2);flex:none;justify-content:flex-end;align-items:center;gap:8px;padding:6px 24px;display:flex}.rp_5ZMIxq_barText{color:var(--dsw-alias-label-secondary);margin-right:auto;font-size:12px}.rp_5ZMIxq_nameInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:var(--dsw-alias-label-primary);font:inherit;padding:4px 8px;font-size:14px;line-height:22px}.rp_5ZMIxq_row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_5ZMIxq_grid{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px 12px;display:grid}.rp_5ZMIxq_field{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_5ZMIxq_wide{grid-column:1/-1}.rp_5ZMIxq_label,.rp_5ZMIxq_help{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5ZMIxq_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.rp_5ZMIxq_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:inherit;font:inherit;padding:4px 8px;font-size:13px}.rp_5ZMIxq_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:96px;color:inherit;font:inherit;resize:vertical;padding:6px 8px;font-size:13px;line-height:20px}.rp_5ZMIxq_goal{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);flex-direction:column;gap:8px;padding:10px;display:flex}.rp_5ZMIxq_row>.rp_5ZMIxq_select{width:auto;min-width:110px}.rp_5ZMIxq_select:focus-visible,.rp_5ZMIxq_area:focus-visible,.rp_5ZMIxq_nameInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}@media (width<=640px){.rp_5ZMIxq_sheet{padding-inline:16px}.rp_5ZMIxq_head{flex-direction:column}.rp_5ZMIxq_portraitBox,.rp_5ZMIxq_portrait{width:120px}.rp_5ZMIxq_portraitBox{flex-basis:120px;height:160px}.rp_5ZMIxq_bar{flex-wrap:wrap;padding-inline:16px}.rp_5ZMIxq_voiceInline{width:100%;min-width:0}}";
|
|
3112
|
+
const key$35 = "src/client/world-editor/CharactersPanel.module.css";
|
|
3113
|
+
let tag$35 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$35) + "]");
|
|
3114
|
+
if (tag$35 === null) {
|
|
3115
|
+
tag$35 = document.createElement("style");
|
|
3116
|
+
tag$35.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
3117
|
+
tag$35.dataset.pluginCss = key$35;
|
|
3118
|
+
document.head.appendChild(tag$35);
|
|
3063
3119
|
}
|
|
3064
|
-
tag$
|
|
3120
|
+
tag$35.textContent = css$35;
|
|
3065
3121
|
var CharactersPanel_module_css_default = {
|
|
3066
|
-
"help": "rp_5ZMIxq_help",
|
|
3067
|
-
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
3068
|
-
"tabs": "rp_5ZMIxq_tabs",
|
|
3069
3122
|
"placeholder": "rp_5ZMIxq_placeholder",
|
|
3070
|
-
"
|
|
3071
|
-
"wide": "rp_5ZMIxq_wide",
|
|
3072
|
-
"field": "rp_5ZMIxq_field",
|
|
3123
|
+
"grid": "rp_5ZMIxq_grid",
|
|
3073
3124
|
"goal": "rp_5ZMIxq_goal",
|
|
3074
|
-
"
|
|
3075
|
-
"
|
|
3125
|
+
"initial": "rp_5ZMIxq_initial",
|
|
3126
|
+
"head": "rp_5ZMIxq_head",
|
|
3127
|
+
"questionTitle": "rp_5ZMIxq_questionTitle",
|
|
3128
|
+
"barText": "rp_5ZMIxq_barText",
|
|
3076
3129
|
"sheet": "rp_5ZMIxq_sheet",
|
|
3077
|
-
"
|
|
3078
|
-
"grid": "rp_5ZMIxq_grid",
|
|
3079
|
-
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
3080
|
-
"row": "rp_5ZMIxq_row",
|
|
3130
|
+
"questionActions": "rp_5ZMIxq_questionActions",
|
|
3081
3131
|
"panel": "rp_5ZMIxq_panel",
|
|
3082
|
-
"bar": "rp_5ZMIxq_bar",
|
|
3083
|
-
"barText": "rp_5ZMIxq_barText",
|
|
3084
|
-
"head": "rp_5ZMIxq_head",
|
|
3085
|
-
"missing": "rp_5ZMIxq_missing",
|
|
3086
3132
|
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
3087
|
-
"
|
|
3088
|
-
"
|
|
3089
|
-
"
|
|
3090
|
-
"
|
|
3133
|
+
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
3134
|
+
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
3135
|
+
"tabs": "rp_5ZMIxq_tabs",
|
|
3136
|
+
"help": "rp_5ZMIxq_help",
|
|
3091
3137
|
"select": "rp_5ZMIxq_select",
|
|
3092
|
-
"
|
|
3093
|
-
"
|
|
3094
|
-
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
3138
|
+
"missing": "rp_5ZMIxq_missing",
|
|
3139
|
+
"itemActions": "rp_5ZMIxq_itemActions",
|
|
3095
3140
|
"body": "rp_5ZMIxq_body",
|
|
3141
|
+
"tab": "rp_5ZMIxq_tab",
|
|
3096
3142
|
"empty": "rp_5ZMIxq_empty",
|
|
3143
|
+
"label": "rp_5ZMIxq_label",
|
|
3144
|
+
"area": "rp_5ZMIxq_area",
|
|
3097
3145
|
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
3146
|
+
"portraitError": "rp_5ZMIxq_portraitError",
|
|
3147
|
+
"bar": "rp_5ZMIxq_bar",
|
|
3098
3148
|
"portrait": "rp_5ZMIxq_portrait",
|
|
3099
|
-
"
|
|
3149
|
+
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
3150
|
+
"meta": "rp_5ZMIxq_meta",
|
|
3151
|
+
"wide": "rp_5ZMIxq_wide",
|
|
3152
|
+
"error": "rp_5ZMIxq_error",
|
|
3153
|
+
"optionTitle": "rp_5ZMIxq_optionTitle",
|
|
3154
|
+
"optionFields": "rp_5ZMIxq_optionFields",
|
|
3155
|
+
"tabOn": "rp_5ZMIxq_tabOn",
|
|
3156
|
+
"field": "rp_5ZMIxq_field",
|
|
3157
|
+
"question": "rp_5ZMIxq_question",
|
|
3158
|
+
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
3159
|
+
"nameInput": "rp_5ZMIxq_nameInput",
|
|
3160
|
+
"row": "rp_5ZMIxq_row",
|
|
3161
|
+
"section": "rp_5ZMIxq_section"
|
|
3100
3162
|
};
|
|
3101
3163
|
// src/client/world-editor/EditorTabs.tsx
|
|
3102
3164
|
/** Adds expected arrow, Home and End navigation to an existing editor tab strip. */
|
|
@@ -4804,50 +4866,50 @@ window.__ModuleLoader__.load({
|
|
|
4804
4866
|
});
|
|
4805
4867
|
}
|
|
4806
4868
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/RelationsPanel.module.css.mjs
|
|
4807
|
-
const css$
|
|
4808
|
-
const key$
|
|
4809
|
-
let tag$
|
|
4810
|
-
if (tag$
|
|
4811
|
-
tag$
|
|
4812
|
-
tag$
|
|
4813
|
-
tag$
|
|
4814
|
-
document.head.appendChild(tag$
|
|
4869
|
+
const css$34 = ".rp_7pEHTW_panel{flex-direction:column;flex:1 1 0;min-height:0;display:flex;position:relative}.rp_7pEHTW_toolbar{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;align-items:center;gap:4px;padding:8px 16px;display:flex}.rp_7pEHTW_filter{border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:4px 10px}.rp_7pEHTW_filterOn{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_filter:focus-visible,.rp_7pEHTW_edge:focus-visible,.rp_7pEHTW_graphEdge:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:-2px}.rp_7pEHTW_space{flex:1}.rp_7pEHTW_perspective{color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;display:flex}.rp_7pEHTW_perspective select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);max-width:180px;min-height:32px;color:inherit;padding:4px 8px}.rp_7pEHTW_workspace{flex:1 1 0;grid-template-columns:minmax(220px,34%) minmax(320px,1fr);min-height:0;display:grid}.rp_7pEHTW_list{border-right:.5px solid var(--dsw-alias-border-l3);overflow-y:auto}.rp_7pEHTW_edge{border:0;border-bottom:.5px solid var(--dsw-alias-border-l4);width:100%;min-height:48px;color:inherit;text-align:left;cursor:pointer;background:0 0;flex-direction:column;gap:2px;padding:8px 16px;display:flex}.rp_7pEHTW_edgeOn{background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_edgeTitle{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.rp_7pEHTW_edgeKind{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_7pEHTW_empty{color:var(--dsw-alias-label-tertiary);padding:20px}.rp_7pEHTW_inspector{min-width:0;padding:24px 24px 240px;overflow-y:auto}.rp_7pEHTW_head h2{margin:0 0 8px;font-size:16px}.rp_7pEHTW_entities{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:6px;display:flex}.rp_7pEHTW_notice{color:var(--dsw-alias-label-secondary);margin:24px 0}.rp_7pEHTW_form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px;display:grid}.rp_7pEHTW_form label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:5px;font-size:12px;display:flex}.rp_7pEHTW_form select,.rp_7pEHTW_form textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:inherit;font:inherit;padding:6px 8px}.rp_7pEHTW_form textarea{resize:vertical;min-height:96px}.rp_7pEHTW_form select:focus-visible,.rp_7pEHTW_form textarea:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_7pEHTW_wide{grid-column:1/-1}.rp_7pEHTW_metrics{grid-column:1/-1;grid-template-columns:repeat(4,minmax(90px,1fr));gap:10px;display:grid}.rp_7pEHTW_check{align-self:end;align-items:center;min-height:32px;flex-direction:row!important}.rp_7pEHTW_actions{border-top:.5px solid var(--dsw-alias-border-l4);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;margin-top:28px;padding-top:12px;display:flex}.rp_7pEHTW_status{color:var(--dsw-alias-label-secondary);margin-right:auto}.rp_7pEHTW_error{color:var(--dsw-alias-state-error-primary);margin-right:auto}.rp_7pEHTW_graph{background:radial-gradient(circle, var(--dsw-alias-bg-layer-2), transparent 70%);flex:1 1 0;min-height:360px;position:relative;overflow:hidden}.rp_7pEHTW_graph svg{width:100%;height:100%;min-height:520px}.rp_7pEHTW_graphEdge{cursor:pointer;stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_graphEdge:hover,.rp_7pEHTW_graphEdgeOn{stroke:var(--dsw-alias-state-business-primary);stroke-width:4px}.rp_7pEHTW_node circle{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_node_character circle{fill:color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_location circle{fill:color-mix(in srgb, #4a9 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_item circle{fill:color-mix(in srgb, #c90 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_faction circle{fill:color-mix(in srgb, #96c 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node text{fill:var(--dsw-alias-label-primary);pointer-events:none;font-size:12px}.rp_7pEHTW_graphInspector{box-sizing:border-box;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-1);width:min(480px,100% - 40px);max-height:62%;box-shadow:var(--dsw-elevation-panel);border:0;padding:18px;position:absolute;bottom:20px;right:20px;overflow-y:auto}@media (width<=760px){.rp_7pEHTW_workspace{grid-template-columns:1fr}.rp_7pEHTW_list{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l3);max-height:220px}.rp_7pEHTW_inspector{padding-inline:16px}.rp_7pEHTW_form{grid-template-columns:1fr}.rp_7pEHTW_wide,.rp_7pEHTW_metrics{grid-column:1}.rp_7pEHTW_metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rp_7pEHTW_graphInspector{width:calc(100% - 24px);bottom:12px;right:12px}}@media (pointer:coarse){.rp_7pEHTW_filter{min-height:44px}}";
|
|
4870
|
+
const key$34 = "src/client/world-editor/RelationsPanel.module.css";
|
|
4871
|
+
let tag$34 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$34) + "]");
|
|
4872
|
+
if (tag$34 === null) {
|
|
4873
|
+
tag$34 = document.createElement("style");
|
|
4874
|
+
tag$34.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
4875
|
+
tag$34.dataset.pluginCss = key$34;
|
|
4876
|
+
document.head.appendChild(tag$34);
|
|
4815
4877
|
}
|
|
4816
|
-
tag$
|
|
4878
|
+
tag$34.textContent = css$34;
|
|
4817
4879
|
var RelationsPanel_module_css_default = {
|
|
4818
|
-
"toolbar": "rp_7pEHTW_toolbar",
|
|
4819
4880
|
"filter": "rp_7pEHTW_filter",
|
|
4881
|
+
"toolbar": "rp_7pEHTW_toolbar",
|
|
4882
|
+
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4883
|
+
"form": "rp_7pEHTW_form",
|
|
4884
|
+
"perspective": "rp_7pEHTW_perspective",
|
|
4885
|
+
"check": "rp_7pEHTW_check",
|
|
4820
4886
|
"status": "rp_7pEHTW_status",
|
|
4821
|
-
"
|
|
4887
|
+
"list": "rp_7pEHTW_list",
|
|
4822
4888
|
"panel": "rp_7pEHTW_panel",
|
|
4823
|
-
"
|
|
4824
|
-
"
|
|
4889
|
+
"graphEdge": "rp_7pEHTW_graphEdge",
|
|
4890
|
+
"notice": "rp_7pEHTW_notice",
|
|
4825
4891
|
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
4826
|
-
"
|
|
4827
|
-
"list": "rp_7pEHTW_list",
|
|
4828
|
-
"perspective": "rp_7pEHTW_perspective",
|
|
4829
|
-
"head": "rp_7pEHTW_head",
|
|
4830
|
-
"empty": "rp_7pEHTW_empty",
|
|
4831
|
-
"graph": "rp_7pEHTW_graph",
|
|
4832
|
-
"form": "rp_7pEHTW_form",
|
|
4833
|
-
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4834
|
-
"actions": "rp_7pEHTW_actions",
|
|
4835
|
-
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4836
|
-
"space": "rp_7pEHTW_space",
|
|
4837
|
-
"edge": "rp_7pEHTW_edge",
|
|
4838
|
-
"metrics": "rp_7pEHTW_metrics",
|
|
4839
|
-
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4892
|
+
"node_item": "rp_7pEHTW_node_item",
|
|
4840
4893
|
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
4841
4894
|
"wide": "rp_7pEHTW_wide",
|
|
4842
|
-
"
|
|
4895
|
+
"node_location": "rp_7pEHTW_node_location",
|
|
4896
|
+
"filterOn": "rp_7pEHTW_filterOn",
|
|
4843
4897
|
"workspace": "rp_7pEHTW_workspace",
|
|
4898
|
+
"head": "rp_7pEHTW_head",
|
|
4844
4899
|
"inspector": "rp_7pEHTW_inspector",
|
|
4845
|
-
"
|
|
4846
|
-
"
|
|
4847
|
-
"
|
|
4848
|
-
"
|
|
4900
|
+
"actions": "rp_7pEHTW_actions",
|
|
4901
|
+
"node": "rp_7pEHTW_node",
|
|
4902
|
+
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4903
|
+
"metrics": "rp_7pEHTW_metrics",
|
|
4904
|
+
"graph": "rp_7pEHTW_graph",
|
|
4905
|
+
"node_character": "rp_7pEHTW_node_character",
|
|
4906
|
+
"edge": "rp_7pEHTW_edge",
|
|
4849
4907
|
"entities": "rp_7pEHTW_entities",
|
|
4850
|
-
"
|
|
4908
|
+
"empty": "rp_7pEHTW_empty",
|
|
4909
|
+
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4910
|
+
"node_faction": "rp_7pEHTW_node_faction",
|
|
4911
|
+
"space": "rp_7pEHTW_space",
|
|
4912
|
+
"error": "rp_7pEHTW_error"
|
|
4851
4913
|
};
|
|
4852
4914
|
// src/client/world-editor/RelationsPanel.tsx
|
|
4853
4915
|
const title = (relation) => `${relation.from.name} → ${relation.to.name}`;
|
|
@@ -6205,23 +6267,23 @@ window.__ModuleLoader__.load({
|
|
|
6205
6267
|
}
|
|
6206
6268
|
};
|
|
6207
6269
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pack-frame/PackFrame.module.css.mjs
|
|
6208
|
-
const css$
|
|
6209
|
-
const key$
|
|
6210
|
-
let tag$
|
|
6211
|
-
if (tag$
|
|
6212
|
-
tag$
|
|
6213
|
-
tag$
|
|
6214
|
-
tag$
|
|
6215
|
-
document.head.appendChild(tag$
|
|
6270
|
+
const css$33 = ".rp_h_sbFq_frame{background:0 0;border:0;width:100%;display:block}.rp_h_sbFq_fill{height:100%;min-height:0}.rp_h_sbFq_message{color:var(--dsw-alias-label-secondary);margin:0;padding:16px 24px;font-size:13px;line-height:20px}.rp_h_sbFq_problems{color:var(--dsw-alias-label-tertiary);margin:8px 0 0;padding-left:18px;font-size:12px}.rp_h_sbFq_hud{box-sizing:border-box;width:min(800px,100%);margin:0 auto 8px;padding:0 16px}.rp_h_sbFq_tab{flex-direction:column;flex:1 1 0;width:100%;min-height:0;display:flex}";
|
|
6271
|
+
const key$33 = "src/client/widgets/pack-frame/PackFrame.module.css";
|
|
6272
|
+
let tag$33 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$33) + "]");
|
|
6273
|
+
if (tag$33 === null) {
|
|
6274
|
+
tag$33 = document.createElement("style");
|
|
6275
|
+
tag$33.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6276
|
+
tag$33.dataset.pluginCss = key$33;
|
|
6277
|
+
document.head.appendChild(tag$33);
|
|
6216
6278
|
}
|
|
6217
|
-
tag$
|
|
6279
|
+
tag$33.textContent = css$33;
|
|
6218
6280
|
var PackFrame_module_css_default = {
|
|
6219
|
-
"frame": "rp_h_sbFq_frame",
|
|
6220
|
-
"tab": "rp_h_sbFq_tab",
|
|
6221
6281
|
"hud": "rp_h_sbFq_hud",
|
|
6222
|
-
"fill": "rp_h_sbFq_fill",
|
|
6223
6282
|
"problems": "rp_h_sbFq_problems",
|
|
6224
|
-
"
|
|
6283
|
+
"tab": "rp_h_sbFq_tab",
|
|
6284
|
+
"fill": "rp_h_sbFq_fill",
|
|
6285
|
+
"message": "rp_h_sbFq_message",
|
|
6286
|
+
"frame": "rp_h_sbFq_frame"
|
|
6225
6287
|
};
|
|
6226
6288
|
// src/client/widgets/pack-frame/theme.ts
|
|
6227
6289
|
/** The colours of DSH a surface is given, so that it looks right in light and dark. */
|
|
@@ -6434,7 +6496,7 @@ window.__ModuleLoader__.load({
|
|
|
6434
6496
|
const saveInfo = async (world, edit, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/info?${query(world)}`, init("PUT", signal, edit)));
|
|
6435
6497
|
const loadPrompts = async (world, language, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/prompts?${query(world, language)}`, init("GET", signal)));
|
|
6436
6498
|
const loadPrompt = async (world, language, prompt, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/prompts/item?${query(world, language, prompt)}`, init("GET", signal)));
|
|
6437
|
-
const savePrompt = async (world, language, prompt, text, signal) => {
|
|
6499
|
+
const savePrompt$1 = async (world, language, prompt, text, signal) => {
|
|
6438
6500
|
await read$2(await fetch(`${API_PREFIX}/worlds/prompts/item?${query(world, language, prompt)}`, init("PUT", signal, { text })));
|
|
6439
6501
|
};
|
|
6440
6502
|
const removePrompt = async (world, language, prompt, signal) => {
|
|
@@ -6469,24 +6531,24 @@ window.__ModuleLoader__.load({
|
|
|
6469
6531
|
const removePackFile = async (world, pack, path, signal) => (await read$2(await fetch(`${API_PREFIX}/worlds/interface/file?${packQuery(world, pack, path)}`, init("DELETE", signal)))).problems;
|
|
6470
6532
|
const createPack = async (world, pack, name, signal) => (await read$2(await fetch(`${API_PREFIX}/worlds/interface/pack?${packQuery(world, pack)}`, init("POST", signal, { name })))).problems;
|
|
6471
6533
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/PacksPanel.module.css.mjs
|
|
6472
|
-
const css$
|
|
6473
|
-
const key$
|
|
6474
|
-
let tag$
|
|
6475
|
-
if (tag$
|
|
6476
|
-
tag$
|
|
6477
|
-
tag$
|
|
6478
|
-
tag$
|
|
6479
|
-
document.head.appendChild(tag$
|
|
6534
|
+
const css$32 = ".rp_FLaP7q_controls{flex-wrap:wrap;align-items:center;gap:8px 16px;margin:8px 0;display:flex}.rp_FLaP7q_group{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;font-size:12px;display:inline-flex}.rp_FLaP7q_stage{border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);max-width:100%;overflow:hidden}.rp_FLaP7q_stageTall{height:420px}.rp_FLaP7q_log{color:var(--dsw-alias-label-secondary);margin:4px 0 0;padding-left:16px;font-size:12px}.rp_FLaP7q_files{columns:2 220px;margin:4px 0 0;padding-left:16px;font-size:12px}.rp_FLaP7q_note{color:var(--dsw-alias-label-tertiary);font-size:12px}";
|
|
6535
|
+
const key$32 = "src/client/world-editor/PacksPanel.module.css";
|
|
6536
|
+
let tag$32 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$32) + "]");
|
|
6537
|
+
if (tag$32 === null) {
|
|
6538
|
+
tag$32 = document.createElement("style");
|
|
6539
|
+
tag$32.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6540
|
+
tag$32.dataset.pluginCss = key$32;
|
|
6541
|
+
document.head.appendChild(tag$32);
|
|
6480
6542
|
}
|
|
6481
|
-
tag$
|
|
6543
|
+
tag$32.textContent = css$32;
|
|
6482
6544
|
var PacksPanel_module_css_default = {
|
|
6483
6545
|
"stage": "rp_FLaP7q_stage",
|
|
6484
|
-
"group": "rp_FLaP7q_group",
|
|
6485
|
-
"controls": "rp_FLaP7q_controls",
|
|
6486
6546
|
"log": "rp_FLaP7q_log",
|
|
6547
|
+
"group": "rp_FLaP7q_group",
|
|
6487
6548
|
"stageTall": "rp_FLaP7q_stageTall",
|
|
6488
6549
|
"files": "rp_FLaP7q_files",
|
|
6489
|
-
"note": "rp_FLaP7q_note"
|
|
6550
|
+
"note": "rp_FLaP7q_note",
|
|
6551
|
+
"controls": "rp_FLaP7q_controls"
|
|
6490
6552
|
};
|
|
6491
6553
|
// src/client/world-editor/PacksPanel.tsx
|
|
6492
6554
|
const WIDTHS = {
|
|
@@ -7379,7 +7441,7 @@ window.__ModuleLoader__.load({
|
|
|
7379
7441
|
});
|
|
7380
7442
|
}
|
|
7381
7443
|
// src/client/lorebooks-api.ts
|
|
7382
|
-
async function reply$
|
|
7444
|
+
async function reply$4(response) {
|
|
7383
7445
|
if (!response.ok) {
|
|
7384
7446
|
const body = await response.json().catch(() => void 0);
|
|
7385
7447
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
@@ -7394,38 +7456,38 @@ window.__ModuleLoader__.load({
|
|
|
7394
7456
|
});
|
|
7395
7457
|
const named = (name) => `name=${encodeURIComponent(name)}`;
|
|
7396
7458
|
async function listLorebooks(signal) {
|
|
7397
|
-
return await reply$
|
|
7459
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks`, {
|
|
7398
7460
|
credentials: "same-origin",
|
|
7399
7461
|
signal
|
|
7400
7462
|
}));
|
|
7401
7463
|
}
|
|
7402
7464
|
async function readLorebook(name, signal) {
|
|
7403
|
-
return await reply$
|
|
7465
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/item?${named(name)}`, {
|
|
7404
7466
|
credentials: "same-origin",
|
|
7405
7467
|
signal
|
|
7406
7468
|
}));
|
|
7407
7469
|
}
|
|
7408
7470
|
async function createLorebook(request, signal) {
|
|
7409
|
-
return await reply$
|
|
7471
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks`, {
|
|
7410
7472
|
...json$2("POST", request),
|
|
7411
7473
|
signal
|
|
7412
7474
|
}));
|
|
7413
7475
|
}
|
|
7414
7476
|
async function updateLorebookInfo(name, change, signal) {
|
|
7415
|
-
return await reply$
|
|
7477
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/item?${named(name)}`, {
|
|
7416
7478
|
...json$2("PUT", change),
|
|
7417
7479
|
signal
|
|
7418
7480
|
}));
|
|
7419
7481
|
}
|
|
7420
7482
|
async function writeLorebookEntry(name, entry, signal) {
|
|
7421
7483
|
const { id, ...rest } = entry;
|
|
7422
|
-
return await reply$
|
|
7484
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/entry?${named(name)}&id=${encodeURIComponent(id)}`, {
|
|
7423
7485
|
...json$2("PUT", rest),
|
|
7424
7486
|
signal
|
|
7425
7487
|
}));
|
|
7426
7488
|
}
|
|
7427
7489
|
async function removeLorebookEntry(name, id, signal) {
|
|
7428
|
-
return await reply$
|
|
7490
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/entry?${named(name)}&id=${encodeURIComponent(id)}`, {
|
|
7429
7491
|
method: "DELETE",
|
|
7430
7492
|
credentials: "same-origin",
|
|
7431
7493
|
signal
|
|
@@ -7437,37 +7499,37 @@ window.__ModuleLoader__.load({
|
|
|
7437
7499
|
credentials: "same-origin",
|
|
7438
7500
|
signal
|
|
7439
7501
|
});
|
|
7440
|
-
if (!response.ok) await reply$
|
|
7502
|
+
if (!response.ok) await reply$4(response);
|
|
7441
7503
|
}
|
|
7442
7504
|
/** Opens the authoring chat of a lorebook. */
|
|
7443
7505
|
async function authorLorebook(name, language, signal) {
|
|
7444
|
-
return await reply$
|
|
7506
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/authoring?${named(name)}`, {
|
|
7445
7507
|
...json$2("POST", { language }),
|
|
7446
7508
|
signal
|
|
7447
7509
|
}));
|
|
7448
7510
|
}
|
|
7449
7511
|
async function loadStoryLorebooks(session, signal) {
|
|
7450
|
-
return await reply$
|
|
7512
|
+
return await reply$4(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}`, {
|
|
7451
7513
|
credentials: "same-origin",
|
|
7452
7514
|
signal
|
|
7453
7515
|
}));
|
|
7454
7516
|
}
|
|
7455
7517
|
/** Copies a library lorebook into the chat's story; the notes say what could not be carried over. */
|
|
7456
7518
|
async function addStoryLorebook(session, name, signal) {
|
|
7457
|
-
return await reply$
|
|
7519
|
+
return await reply$4(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}`, {
|
|
7458
7520
|
...json$2("POST", { name }),
|
|
7459
7521
|
signal
|
|
7460
7522
|
}));
|
|
7461
7523
|
}
|
|
7462
7524
|
async function removeStoryLorebook(session, name, signal) {
|
|
7463
|
-
return await reply$
|
|
7525
|
+
return await reply$4(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}&${named(name)}`, {
|
|
7464
7526
|
method: "DELETE",
|
|
7465
7527
|
credentials: "same-origin",
|
|
7466
7528
|
signal
|
|
7467
7529
|
}));
|
|
7468
7530
|
}
|
|
7469
7531
|
// src/client/presets-api.ts
|
|
7470
|
-
async function reply$
|
|
7532
|
+
async function reply$3(response) {
|
|
7471
7533
|
if (!response.ok) {
|
|
7472
7534
|
const body = await response.json().catch(() => void 0);
|
|
7473
7535
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
@@ -7481,75 +7543,75 @@ window.__ModuleLoader__.load({
|
|
|
7481
7543
|
body: JSON.stringify(body)
|
|
7482
7544
|
});
|
|
7483
7545
|
async function listPresets(signal) {
|
|
7484
|
-
return await reply$
|
|
7546
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets`, {
|
|
7485
7547
|
credentials: "same-origin",
|
|
7486
7548
|
signal
|
|
7487
7549
|
}));
|
|
7488
7550
|
}
|
|
7489
7551
|
/** Makes a preset of the prose prompts a world carries. */
|
|
7490
7552
|
async function savePresetFromWorld(request, signal) {
|
|
7491
|
-
return await reply$
|
|
7553
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets`, {
|
|
7492
7554
|
...json$1("POST", request),
|
|
7493
7555
|
signal
|
|
7494
7556
|
}));
|
|
7495
7557
|
}
|
|
7496
7558
|
async function loadPresetStatus(session, signal) {
|
|
7497
|
-
return await reply$
|
|
7559
|
+
return await reply$3(await fetch(`${API_PREFIX}/sessions/preset?id=${encodeURIComponent(session)}`, {
|
|
7498
7560
|
credentials: "same-origin",
|
|
7499
7561
|
signal
|
|
7500
7562
|
}));
|
|
7501
7563
|
}
|
|
7502
7564
|
/** Puts a preset into the chat's story, or takes its preset out when no name is given. */
|
|
7503
7565
|
async function applyPreset(session, name, signal) {
|
|
7504
|
-
return await reply$
|
|
7566
|
+
return await reply$3(await fetch(`${API_PREFIX}/sessions/preset?id=${encodeURIComponent(session)}`, {
|
|
7505
7567
|
...json$1("POST", name === void 0 ? {} : { name }),
|
|
7506
7568
|
signal
|
|
7507
7569
|
}));
|
|
7508
7570
|
}
|
|
7509
7571
|
const empty = async (response) => {
|
|
7510
|
-
if (!response.ok) await reply$
|
|
7572
|
+
if (!response.ok) await reply$3(response);
|
|
7511
7573
|
};
|
|
7512
7574
|
async function readPreset(name, signal) {
|
|
7513
|
-
return await reply$
|
|
7575
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/item?name=${encodeURIComponent(name)}`, {
|
|
7514
7576
|
credentials: "same-origin",
|
|
7515
7577
|
signal
|
|
7516
7578
|
}));
|
|
7517
7579
|
}
|
|
7518
7580
|
/** Makes a preset holding the shipped prose prompts, as a starting point to edit. */
|
|
7519
7581
|
async function createPreset(request, signal) {
|
|
7520
|
-
return await reply$
|
|
7582
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets`, {
|
|
7521
7583
|
...json$1("POST", request),
|
|
7522
7584
|
signal
|
|
7523
7585
|
}));
|
|
7524
7586
|
}
|
|
7525
7587
|
async function updatePresetInfo(name, change, signal) {
|
|
7526
|
-
return await reply$
|
|
7588
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/item?name=${encodeURIComponent(name)}`, {
|
|
7527
7589
|
...json$1("PUT", change),
|
|
7528
7590
|
signal
|
|
7529
7591
|
}));
|
|
7530
7592
|
}
|
|
7531
7593
|
/** The prompts with rules of the game that the preset could take over from the shipped ones. */
|
|
7532
7594
|
async function listRulesPrompts(name, language, signal) {
|
|
7533
|
-
return await reply$
|
|
7595
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/prompts?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}`, {
|
|
7534
7596
|
credentials: "same-origin",
|
|
7535
7597
|
signal
|
|
7536
7598
|
}));
|
|
7537
7599
|
}
|
|
7538
7600
|
/** A prompt as a story with the preset gets it: the preset's own, else the shipped one. */
|
|
7539
7601
|
async function readPresetPrompt(name, language, id, signal) {
|
|
7540
|
-
return (await reply$
|
|
7602
|
+
return (await reply$3(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7541
7603
|
credentials: "same-origin",
|
|
7542
7604
|
signal
|
|
7543
7605
|
}))).text;
|
|
7544
7606
|
}
|
|
7545
7607
|
async function writePresetPrompt(name, language, id, text, signal) {
|
|
7546
|
-
return await reply$
|
|
7608
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7547
7609
|
...json$1("PUT", { text }),
|
|
7548
7610
|
signal
|
|
7549
7611
|
}));
|
|
7550
7612
|
}
|
|
7551
7613
|
async function removePresetPrompt(name, language, id, signal) {
|
|
7552
|
-
return await reply$
|
|
7614
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7553
7615
|
method: "DELETE",
|
|
7554
7616
|
credentials: "same-origin",
|
|
7555
7617
|
signal
|
|
@@ -7564,29 +7626,29 @@ window.__ModuleLoader__.load({
|
|
|
7564
7626
|
}
|
|
7565
7627
|
/** Opens the authoring chat of a preset. */
|
|
7566
7628
|
async function authorPreset(name, language, signal) {
|
|
7567
|
-
return await reply$
|
|
7629
|
+
return await reply$3(await fetch(`${API_PREFIX}/presets/authoring?name=${encodeURIComponent(name)}`, {
|
|
7568
7630
|
...json$1("POST", { language }),
|
|
7569
7631
|
signal
|
|
7570
7632
|
}));
|
|
7571
7633
|
}
|
|
7572
7634
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/sampling-fields/SamplingFields.module.css.mjs
|
|
7573
|
-
const css$
|
|
7574
|
-
const key$
|
|
7575
|
-
let tag$
|
|
7576
|
-
if (tag$
|
|
7577
|
-
tag$
|
|
7578
|
-
tag$
|
|
7579
|
-
tag$
|
|
7580
|
-
document.head.appendChild(tag$
|
|
7635
|
+
const css$31 = ".rp_9vxYSG_root{flex-direction:column;gap:8px;display:flex}.rp_9vxYSG_grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px 12px;display:grid}.rp_9vxYSG_field{flex-direction:column;gap:4px;display:flex}.rp_9vxYSG_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9vxYSG_input{font:inherit;border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:inherit;background:0 0;min-width:0;padding:4px 8px;font-size:13px}.rp_9vxYSG_input:disabled{opacity:.6}.rp_9vxYSG_help{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}";
|
|
7636
|
+
const key$31 = "src/client/widgets/sampling-fields/SamplingFields.module.css";
|
|
7637
|
+
let tag$31 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$31) + "]");
|
|
7638
|
+
if (tag$31 === null) {
|
|
7639
|
+
tag$31 = document.createElement("style");
|
|
7640
|
+
tag$31.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
7641
|
+
tag$31.dataset.pluginCss = key$31;
|
|
7642
|
+
document.head.appendChild(tag$31);
|
|
7581
7643
|
}
|
|
7582
|
-
tag$
|
|
7644
|
+
tag$31.textContent = css$31;
|
|
7583
7645
|
var SamplingFields_module_css_default = {
|
|
7646
|
+
"field": "rp_9vxYSG_field",
|
|
7584
7647
|
"root": "rp_9vxYSG_root",
|
|
7585
|
-
"
|
|
7648
|
+
"help": "rp_9vxYSG_help",
|
|
7586
7649
|
"grid": "rp_9vxYSG_grid",
|
|
7587
|
-
"
|
|
7588
|
-
"label": "rp_9vxYSG_label"
|
|
7589
|
-
"help": "rp_9vxYSG_help"
|
|
7650
|
+
"input": "rp_9vxYSG_input",
|
|
7651
|
+
"label": "rp_9vxYSG_label"
|
|
7590
7652
|
};
|
|
7591
7653
|
// src/client/widgets/sampling-fields/SamplingFields.tsx
|
|
7592
7654
|
const samplingTexts = (sampling) => Object.fromEntries(SAMPLING_KEYS.map((key) => [key, sampling[key]?.toString() ?? ""]));
|
|
@@ -7633,6 +7695,341 @@ window.__ModuleLoader__.load({
|
|
|
7633
7695
|
})]
|
|
7634
7696
|
});
|
|
7635
7697
|
}
|
|
7698
|
+
// src/client/world-editor/questions-draft.ts
|
|
7699
|
+
const draftOfQuestions = (questions) => questions.map((question) => ({
|
|
7700
|
+
id: question.id,
|
|
7701
|
+
text: question.text,
|
|
7702
|
+
options: question.options.map((option) => ({
|
|
7703
|
+
id: option.id,
|
|
7704
|
+
label: option.label,
|
|
7705
|
+
description: option.description ?? "",
|
|
7706
|
+
rules: (option.effect.rules ?? []).join("\n"),
|
|
7707
|
+
opening: option.effect.opening === void 0 ? "" : String(option.effect.opening),
|
|
7708
|
+
startingTime: option.effect.startingTime ?? "",
|
|
7709
|
+
clockMode: option.effect.clockMode ?? "",
|
|
7710
|
+
kept: {
|
|
7711
|
+
...option.effect.tools === void 0 ? {} : { tools: option.effect.tools },
|
|
7712
|
+
...option.effect.plots === void 0 ? {} : { plots: option.effect.plots }
|
|
7713
|
+
}
|
|
7714
|
+
}))
|
|
7715
|
+
}));
|
|
7716
|
+
/** The questions the drafts stand for; an answer with no id or label is left out, as is a question with no text. */
|
|
7717
|
+
const questionsOfDraft = (drafts) => drafts.filter((question) => question.id.trim() !== "" && question.text.trim() !== "").map((question) => ({
|
|
7718
|
+
id: question.id.trim(),
|
|
7719
|
+
text: question.text.trim(),
|
|
7720
|
+
options: question.options.filter((option) => option.id.trim() !== "" && option.label.trim() !== "").map((option) => {
|
|
7721
|
+
const rules = option.rules.split("\n").map((rule) => rule.trim()).filter((rule) => rule !== "");
|
|
7722
|
+
const effect = {
|
|
7723
|
+
...rules.length === 0 ? {} : { rules },
|
|
7724
|
+
...option.opening === "" ? {} : { opening: Number(option.opening) },
|
|
7725
|
+
...option.startingTime.trim() === "" ? {} : { startingTime: option.startingTime.trim() },
|
|
7726
|
+
...option.clockMode === "" ? {} : { clockMode: option.clockMode },
|
|
7727
|
+
...option.kept
|
|
7728
|
+
};
|
|
7729
|
+
return {
|
|
7730
|
+
id: option.id.trim(),
|
|
7731
|
+
label: option.label.trim(),
|
|
7732
|
+
...option.description.trim() === "" ? {} : { description: option.description.trim() },
|
|
7733
|
+
effect
|
|
7734
|
+
};
|
|
7735
|
+
})
|
|
7736
|
+
}));
|
|
7737
|
+
const newQuestion = () => ({
|
|
7738
|
+
id: "",
|
|
7739
|
+
text: "",
|
|
7740
|
+
options: [newOption(), newOption()]
|
|
7741
|
+
});
|
|
7742
|
+
const newOption = () => ({
|
|
7743
|
+
id: "",
|
|
7744
|
+
label: "",
|
|
7745
|
+
description: "",
|
|
7746
|
+
rules: "",
|
|
7747
|
+
opening: "",
|
|
7748
|
+
startingTime: "",
|
|
7749
|
+
clockMode: "",
|
|
7750
|
+
kept: {}
|
|
7751
|
+
});
|
|
7752
|
+
// src/client/world-editor/QuestionsEditor.tsx
|
|
7753
|
+
/** The questions a world asks before a story starts, and what each answer changes. */
|
|
7754
|
+
function QuestionsEditor({ t, questions, openings, onChange }) {
|
|
7755
|
+
const setQuestion = (at, next) => {
|
|
7756
|
+
onChange(questions.map((question, index) => index === at ? next : question));
|
|
7757
|
+
};
|
|
7758
|
+
const setOption = (at, option, next) => {
|
|
7759
|
+
setQuestion(at, {
|
|
7760
|
+
...questions[at],
|
|
7761
|
+
options: questions[at].options.map((entry, index) => index === option ? next : entry)
|
|
7762
|
+
});
|
|
7763
|
+
};
|
|
7764
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
7765
|
+
className: CharactersPanel_module_css_default.section,
|
|
7766
|
+
"data-testid": "roleplay-start-questions",
|
|
7767
|
+
children: [
|
|
7768
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
7769
|
+
className: CharactersPanel_module_css_default.sectionTitle,
|
|
7770
|
+
children: t("sq_title")
|
|
7771
|
+
}),
|
|
7772
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7773
|
+
className: CharactersPanel_module_css_default.help,
|
|
7774
|
+
children: t("sq_help")
|
|
7775
|
+
}),
|
|
7776
|
+
questions.map((question, at) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
7777
|
+
className: CharactersPanel_module_css_default.question,
|
|
7778
|
+
"data-testid": "roleplay-start-question",
|
|
7779
|
+
children: [
|
|
7780
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("legend", {
|
|
7781
|
+
className: CharactersPanel_module_css_default.questionTitle,
|
|
7782
|
+
children: [
|
|
7783
|
+
t("sq_questionText"),
|
|
7784
|
+
" ",
|
|
7785
|
+
at + 1
|
|
7786
|
+
]
|
|
7787
|
+
}),
|
|
7788
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7789
|
+
className: CharactersPanel_module_css_default.grid,
|
|
7790
|
+
children: [
|
|
7791
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7792
|
+
className: CharactersPanel_module_css_default.field,
|
|
7793
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7794
|
+
className: CharactersPanel_module_css_default.label,
|
|
7795
|
+
children: t("sq_questionId")
|
|
7796
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7797
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7798
|
+
value: question.id,
|
|
7799
|
+
onChange: (event) => {
|
|
7800
|
+
setQuestion(at, {
|
|
7801
|
+
...question,
|
|
7802
|
+
id: event.target.value
|
|
7803
|
+
});
|
|
7804
|
+
}
|
|
7805
|
+
})]
|
|
7806
|
+
}),
|
|
7807
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7808
|
+
className: `${CharactersPanel_module_css_default.field} ${CharactersPanel_module_css_default.wide}`,
|
|
7809
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7810
|
+
className: CharactersPanel_module_css_default.label,
|
|
7811
|
+
children: t("sq_questionText")
|
|
7812
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7813
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7814
|
+
value: question.text,
|
|
7815
|
+
onChange: (event) => {
|
|
7816
|
+
setQuestion(at, {
|
|
7817
|
+
...question,
|
|
7818
|
+
text: event.target.value
|
|
7819
|
+
});
|
|
7820
|
+
}
|
|
7821
|
+
})]
|
|
7822
|
+
}),
|
|
7823
|
+
question.options.map((option, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
7824
|
+
className: `${CharactersPanel_module_css_default.optionFields} ${CharactersPanel_module_css_default.wide}`,
|
|
7825
|
+
children: [
|
|
7826
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("legend", {
|
|
7827
|
+
className: CharactersPanel_module_css_default.optionTitle,
|
|
7828
|
+
children: [
|
|
7829
|
+
t("sq_answerLabel"),
|
|
7830
|
+
" ",
|
|
7831
|
+
index + 1
|
|
7832
|
+
]
|
|
7833
|
+
}),
|
|
7834
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7835
|
+
className: CharactersPanel_module_css_default.grid,
|
|
7836
|
+
children: [
|
|
7837
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7838
|
+
className: CharactersPanel_module_css_default.field,
|
|
7839
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7840
|
+
className: CharactersPanel_module_css_default.label,
|
|
7841
|
+
children: t("sq_answerId")
|
|
7842
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7843
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7844
|
+
value: option.id,
|
|
7845
|
+
onChange: (event) => {
|
|
7846
|
+
setOption(at, index, {
|
|
7847
|
+
...option,
|
|
7848
|
+
id: event.target.value
|
|
7849
|
+
});
|
|
7850
|
+
}
|
|
7851
|
+
})]
|
|
7852
|
+
}),
|
|
7853
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7854
|
+
className: CharactersPanel_module_css_default.field,
|
|
7855
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7856
|
+
className: CharactersPanel_module_css_default.label,
|
|
7857
|
+
children: t("sq_answerLabel")
|
|
7858
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7859
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7860
|
+
value: option.label,
|
|
7861
|
+
onChange: (event) => {
|
|
7862
|
+
setOption(at, index, {
|
|
7863
|
+
...option,
|
|
7864
|
+
label: event.target.value
|
|
7865
|
+
});
|
|
7866
|
+
}
|
|
7867
|
+
})]
|
|
7868
|
+
}),
|
|
7869
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7870
|
+
className: `${CharactersPanel_module_css_default.field} ${CharactersPanel_module_css_default.wide}`,
|
|
7871
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7872
|
+
className: CharactersPanel_module_css_default.label,
|
|
7873
|
+
children: t("sq_answerDescription")
|
|
7874
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7875
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7876
|
+
value: option.description,
|
|
7877
|
+
onChange: (event) => {
|
|
7878
|
+
setOption(at, index, {
|
|
7879
|
+
...option,
|
|
7880
|
+
description: event.target.value
|
|
7881
|
+
});
|
|
7882
|
+
}
|
|
7883
|
+
})]
|
|
7884
|
+
}),
|
|
7885
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7886
|
+
className: `${CharactersPanel_module_css_default.field} ${CharactersPanel_module_css_default.wide}`,
|
|
7887
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7888
|
+
className: CharactersPanel_module_css_default.label,
|
|
7889
|
+
children: t("sq_rules")
|
|
7890
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
7891
|
+
className: CharactersPanel_module_css_default.area,
|
|
7892
|
+
rows: 2,
|
|
7893
|
+
value: option.rules,
|
|
7894
|
+
onChange: (event) => {
|
|
7895
|
+
setOption(at, index, {
|
|
7896
|
+
...option,
|
|
7897
|
+
rules: event.target.value
|
|
7898
|
+
});
|
|
7899
|
+
}
|
|
7900
|
+
})]
|
|
7901
|
+
}),
|
|
7902
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7903
|
+
className: CharactersPanel_module_css_default.field,
|
|
7904
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7905
|
+
className: CharactersPanel_module_css_default.label,
|
|
7906
|
+
children: t("sq_opening")
|
|
7907
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
7908
|
+
className: CharactersPanel_module_css_default.select,
|
|
7909
|
+
value: option.opening,
|
|
7910
|
+
onChange: (event) => {
|
|
7911
|
+
setOption(at, index, {
|
|
7912
|
+
...option,
|
|
7913
|
+
opening: event.target.value
|
|
7914
|
+
});
|
|
7915
|
+
},
|
|
7916
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
7917
|
+
value: "",
|
|
7918
|
+
children: t("sq_openingNone")
|
|
7919
|
+
}), openings.map((opening, position) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
7920
|
+
value: String(position),
|
|
7921
|
+
children: opening.title === "" ? String(position + 1) : opening.title
|
|
7922
|
+
}, position))]
|
|
7923
|
+
})]
|
|
7924
|
+
}),
|
|
7925
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7926
|
+
className: CharactersPanel_module_css_default.field,
|
|
7927
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7928
|
+
className: CharactersPanel_module_css_default.label,
|
|
7929
|
+
children: t("sq_startingTime")
|
|
7930
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
7931
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
7932
|
+
value: option.startingTime,
|
|
7933
|
+
placeholder: "1912-04-14T23:40:00",
|
|
7934
|
+
onChange: (event) => {
|
|
7935
|
+
setOption(at, index, {
|
|
7936
|
+
...option,
|
|
7937
|
+
startingTime: event.target.value
|
|
7938
|
+
});
|
|
7939
|
+
}
|
|
7940
|
+
})]
|
|
7941
|
+
}),
|
|
7942
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
7943
|
+
className: CharactersPanel_module_css_default.field,
|
|
7944
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7945
|
+
className: CharactersPanel_module_css_default.label,
|
|
7946
|
+
children: t("sq_clock")
|
|
7947
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
7948
|
+
className: CharactersPanel_module_css_default.select,
|
|
7949
|
+
value: option.clockMode,
|
|
7950
|
+
onChange: (event) => {
|
|
7951
|
+
setOption(at, index, {
|
|
7952
|
+
...option,
|
|
7953
|
+
clockMode: event.target.value
|
|
7954
|
+
});
|
|
7955
|
+
},
|
|
7956
|
+
children: [
|
|
7957
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
7958
|
+
value: "",
|
|
7959
|
+
children: t("sq_clockNone")
|
|
7960
|
+
}),
|
|
7961
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
7962
|
+
value: "simulated",
|
|
7963
|
+
children: t("sq_clockSimulated")
|
|
7964
|
+
}),
|
|
7965
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
7966
|
+
value: "real",
|
|
7967
|
+
children: t("sq_clockReal")
|
|
7968
|
+
})
|
|
7969
|
+
]
|
|
7970
|
+
})]
|
|
7971
|
+
}),
|
|
7972
|
+
(option.kept.tools !== void 0 || option.kept.plots !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7973
|
+
className: CharactersPanel_module_css_default.help,
|
|
7974
|
+
children: t("sq_keptElsewhere")
|
|
7975
|
+
})
|
|
7976
|
+
]
|
|
7977
|
+
}),
|
|
7978
|
+
question.options.length > 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7979
|
+
className: CharactersPanel_module_css_default.itemActions,
|
|
7980
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7981
|
+
variant: "ghost",
|
|
7982
|
+
size: "sm",
|
|
7983
|
+
onClick: () => {
|
|
7984
|
+
setQuestion(at, {
|
|
7985
|
+
...question,
|
|
7986
|
+
options: question.options.filter((_, position) => position !== index)
|
|
7987
|
+
});
|
|
7988
|
+
},
|
|
7989
|
+
children: t("sq_removeAnswer")
|
|
7990
|
+
})
|
|
7991
|
+
})
|
|
7992
|
+
]
|
|
7993
|
+
}, index))
|
|
7994
|
+
]
|
|
7995
|
+
}),
|
|
7996
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7997
|
+
className: CharactersPanel_module_css_default.questionActions,
|
|
7998
|
+
children: [question.options.length < 8 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7999
|
+
variant: "outline",
|
|
8000
|
+
size: "sm",
|
|
8001
|
+
onClick: () => {
|
|
8002
|
+
setQuestion(at, {
|
|
8003
|
+
...question,
|
|
8004
|
+
options: [...question.options, newOption()]
|
|
8005
|
+
});
|
|
8006
|
+
},
|
|
8007
|
+
children: t("sq_addAnswer")
|
|
8008
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8009
|
+
variant: "ghost",
|
|
8010
|
+
size: "sm",
|
|
8011
|
+
onClick: () => {
|
|
8012
|
+
onChange(questions.filter((_, index) => index !== at));
|
|
8013
|
+
},
|
|
8014
|
+
children: t("sq_removeQuestion")
|
|
8015
|
+
})]
|
|
8016
|
+
})
|
|
8017
|
+
]
|
|
8018
|
+
}, at)),
|
|
8019
|
+
questions.length < 8 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8020
|
+
className: CharactersPanel_module_css_default.itemActions,
|
|
8021
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8022
|
+
variant: "outline",
|
|
8023
|
+
size: "sm",
|
|
8024
|
+
onClick: () => {
|
|
8025
|
+
onChange([...questions, newQuestion()]);
|
|
8026
|
+
},
|
|
8027
|
+
children: t("sq_addQuestion")
|
|
8028
|
+
})
|
|
8029
|
+
})
|
|
8030
|
+
]
|
|
8031
|
+
});
|
|
8032
|
+
}
|
|
7636
8033
|
// src/client/world-editor/InfoPanel.tsx
|
|
7637
8034
|
const draftOf$4 = (info) => ({
|
|
7638
8035
|
name: info.name,
|
|
@@ -7648,7 +8045,8 @@ window.__ModuleLoader__.load({
|
|
|
7648
8045
|
preset: info.preset,
|
|
7649
8046
|
lorebooks: info.lorebooks,
|
|
7650
8047
|
sampling: samplingTexts(info.sampling),
|
|
7651
|
-
alternates: info.alternateOpenings
|
|
8048
|
+
alternates: info.alternateOpenings,
|
|
8049
|
+
questions: draftOfQuestions(info.startQuestions)
|
|
7652
8050
|
});
|
|
7653
8051
|
const lines = (value) => value.split("\n").map((line) => line.trim()).filter((line) => line !== "");
|
|
7654
8052
|
const words = (value) => value.split(/[,,]/).map((tag) => tag.trim()).filter((tag) => tag !== "");
|
|
@@ -7676,6 +8074,7 @@ window.__ModuleLoader__.load({
|
|
|
7676
8074
|
...(entry.character ?? "") === "" ? {} : { character: entry.character }
|
|
7677
8075
|
})).filter((entry) => entry.text !== "");
|
|
7678
8076
|
if (JSON.stringify(cleaned(draft.alternates)) !== JSON.stringify(cleaned(saved.alternates))) edit["alternateOpenings"] = cleaned(draft.alternates);
|
|
8077
|
+
if (JSON.stringify(questionsOfDraft(draft.questions)) !== JSON.stringify(questionsOfDraft(saved.questions))) edit["startQuestions"] = questionsOfDraft(draft.questions);
|
|
7679
8078
|
return edit;
|
|
7680
8079
|
}
|
|
7681
8080
|
/** What the world says about itself: its name, description, tags, rules, opening, author and the start of its story clock. */
|
|
@@ -7947,6 +8346,18 @@ window.__ModuleLoader__.load({
|
|
|
7947
8346
|
})
|
|
7948
8347
|
]
|
|
7949
8348
|
}),
|
|
8349
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(QuestionsEditor, {
|
|
8350
|
+
t,
|
|
8351
|
+
questions: draft.questions,
|
|
8352
|
+
openings: draft.alternates,
|
|
8353
|
+
onChange: (questions) => {
|
|
8354
|
+
setDraft({
|
|
8355
|
+
...draft,
|
|
8356
|
+
questions
|
|
8357
|
+
});
|
|
8358
|
+
setStatus({ state: "idle" });
|
|
8359
|
+
}
|
|
8360
|
+
}),
|
|
7950
8361
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
7951
8362
|
className: CharactersPanel_module_css_default.section,
|
|
7952
8363
|
children: [
|
|
@@ -8057,7 +8468,7 @@ window.__ModuleLoader__.load({
|
|
|
8057
8468
|
});
|
|
8058
8469
|
}
|
|
8059
8470
|
// src/client/world-editor/PromptsPanel.tsx
|
|
8060
|
-
const messageOf$
|
|
8471
|
+
const messageOf$11 = (error) => error instanceof Error ? error.message : String(error);
|
|
8061
8472
|
/** The prompts the models are given: the world can carry its own version of each, which replaces the shipped one in the sessions it starts. */
|
|
8062
8473
|
function PromptsPanel({ t, worldId, language, actions }) {
|
|
8063
8474
|
const [tag, setTag] = (0, react.useState)(language);
|
|
@@ -8070,7 +8481,7 @@ window.__ModuleLoader__.load({
|
|
|
8070
8481
|
loadPrompts(worldId, tag, new AbortController().signal).then(setEntries, (failure) => {
|
|
8071
8482
|
setStatus({
|
|
8072
8483
|
state: "failed",
|
|
8073
|
-
message: messageOf$
|
|
8484
|
+
message: messageOf$11(failure)
|
|
8074
8485
|
});
|
|
8075
8486
|
});
|
|
8076
8487
|
}, [worldId, tag]);
|
|
@@ -8090,7 +8501,7 @@ window.__ModuleLoader__.load({
|
|
|
8090
8501
|
}, (failure) => {
|
|
8091
8502
|
if (!abort.signal.aborted) setStatus({
|
|
8092
8503
|
state: "failed",
|
|
8093
|
-
message: messageOf$
|
|
8504
|
+
message: messageOf$11(failure)
|
|
8094
8505
|
});
|
|
8095
8506
|
});
|
|
8096
8507
|
return () => {
|
|
@@ -8117,7 +8528,7 @@ window.__ModuleLoader__.load({
|
|
|
8117
8528
|
}, (failure) => {
|
|
8118
8529
|
setMade({
|
|
8119
8530
|
state: "failed",
|
|
8120
|
-
message: t("presetSaveFailed", { message: messageOf$
|
|
8531
|
+
message: t("presetSaveFailed", { message: messageOf$11(failure) })
|
|
8121
8532
|
});
|
|
8122
8533
|
});
|
|
8123
8534
|
};
|
|
@@ -8131,7 +8542,7 @@ window.__ModuleLoader__.load({
|
|
|
8131
8542
|
}, (failure) => {
|
|
8132
8543
|
setStatus({
|
|
8133
8544
|
state: "failed",
|
|
8134
|
-
message: messageOf$
|
|
8545
|
+
message: messageOf$11(failure)
|
|
8135
8546
|
});
|
|
8136
8547
|
});
|
|
8137
8548
|
};
|
|
@@ -8247,7 +8658,7 @@ window.__ModuleLoader__.load({
|
|
|
8247
8658
|
size: "sm",
|
|
8248
8659
|
disabled: !dirty || draft.trim() === "" || status.state === "saving",
|
|
8249
8660
|
onClick: () => {
|
|
8250
|
-
write(savePrompt(worldId, tag, open, draft, new AbortController().signal), reload);
|
|
8661
|
+
write(savePrompt$1(worldId, tag, open, draft, new AbortController().signal), reload);
|
|
8251
8662
|
},
|
|
8252
8663
|
children: status.state === "saving" ? t("saving") : t("save")
|
|
8253
8664
|
}),
|
|
@@ -8305,7 +8716,7 @@ window.__ModuleLoader__.load({
|
|
|
8305
8716
|
activity: "",
|
|
8306
8717
|
interruptible: true
|
|
8307
8718
|
};
|
|
8308
|
-
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
8719
|
+
const same$1 = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
8309
8720
|
/** The day each character lives: windows of the day with what it does, where and on which days, and whether it would drop it. */
|
|
8310
8721
|
function RoutinesPanel({ t, worldId, actions }) {
|
|
8311
8722
|
const [world, setWorld] = (0, react.useState)();
|
|
@@ -8335,7 +8746,7 @@ window.__ModuleLoader__.load({
|
|
|
8335
8746
|
children: t("routinesNoCharacters")
|
|
8336
8747
|
});
|
|
8337
8748
|
const draft = drafts[character.key] ?? character.routine;
|
|
8338
|
-
const dirty = !same(draft, character.routine);
|
|
8749
|
+
const dirty = !same$1(draft, character.routine);
|
|
8339
8750
|
const change = (windows) => {
|
|
8340
8751
|
setDrafts({
|
|
8341
8752
|
...drafts,
|
|
@@ -8984,28 +9395,28 @@ window.__ModuleLoader__.load({
|
|
|
8984
9395
|
return next;
|
|
8985
9396
|
}
|
|
8986
9397
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/tool-switches/ToolSwitches.module.css.mjs
|
|
8987
|
-
const css$
|
|
8988
|
-
const key$
|
|
8989
|
-
let tag$
|
|
8990
|
-
if (tag$
|
|
8991
|
-
tag$
|
|
8992
|
-
tag$
|
|
8993
|
-
tag$
|
|
8994
|
-
document.head.appendChild(tag$
|
|
9398
|
+
const css$30 = ".rp_CjoFLq_root{flex-direction:column;gap:12px;display:flex}.rp_CjoFLq_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_CjoFLq_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_CjoFLq_agent{border-top:1px solid var(--dsw-alias-border-l3);flex-direction:column;gap:6px;padding:8px 0;display:flex}.rp_CjoFLq_agentName{font-size:14px;font-weight:500}.rp_CjoFLq_hint{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_CjoFLq_tool{cursor:pointer;align-items:flex-start;gap:8px;font-size:13px;display:flex}.rp_CjoFLq_tool input{margin-top:3px}.rp_CjoFLq_toolText{flex-direction:column;display:flex}.rp_CjoFLq_default{color:var(--dsw-alias-label-tertiary);margin-left:6px;font-size:12px}.rp_CjoFLq_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.rp_CjoFLq_external{flex-direction:column;gap:6px;margin-top:4px;display:flex}.rp_CjoFLq_external>summary{cursor:pointer}";
|
|
9399
|
+
const key$30 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
|
|
9400
|
+
let tag$30 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$30) + "]");
|
|
9401
|
+
if (tag$30 === null) {
|
|
9402
|
+
tag$30 = document.createElement("style");
|
|
9403
|
+
tag$30.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9404
|
+
tag$30.dataset.pluginCss = key$30;
|
|
9405
|
+
document.head.appendChild(tag$30);
|
|
8995
9406
|
}
|
|
8996
|
-
tag$
|
|
9407
|
+
tag$30.textContent = css$30;
|
|
8997
9408
|
var ToolSwitches_module_css_default = {
|
|
8998
9409
|
"help": "rp_CjoFLq_help",
|
|
8999
|
-
"agent": "rp_CjoFLq_agent",
|
|
9000
|
-
"default": "rp_CjoFLq_default",
|
|
9001
|
-
"agentName": "rp_CjoFLq_agentName",
|
|
9002
|
-
"toolText": "rp_CjoFLq_toolText",
|
|
9003
9410
|
"root": "rp_CjoFLq_root",
|
|
9411
|
+
"tool": "rp_CjoFLq_tool",
|
|
9412
|
+
"toolText": "rp_CjoFLq_toolText",
|
|
9004
9413
|
"error": "rp_CjoFLq_error",
|
|
9414
|
+
"agentName": "rp_CjoFLq_agentName",
|
|
9005
9415
|
"external": "rp_CjoFLq_external",
|
|
9006
9416
|
"hint": "rp_CjoFLq_hint",
|
|
9007
|
-
"
|
|
9008
|
-
"
|
|
9417
|
+
"agent": "rp_CjoFLq_agent",
|
|
9418
|
+
"default": "rp_CjoFLq_default",
|
|
9419
|
+
"title": "rp_CjoFLq_title"
|
|
9009
9420
|
};
|
|
9010
9421
|
// src/client/widgets/tool-switches/ToolSwitches.tsx
|
|
9011
9422
|
/**
|
|
@@ -9997,51 +10408,51 @@ window.__ModuleLoader__.load({
|
|
|
9997
10408
|
}
|
|
9998
10409
|
const imageUrl = (target, image) => `${route(target, "/file")}&path=${encodeURIComponent(image.path)}&v=${encodeURIComponent(image.createdAt)}`;
|
|
9999
10410
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/gallery-view/GalleryView.module.css.mjs
|
|
10000
|
-
const css$
|
|
10001
|
-
const key$
|
|
10002
|
-
let tag$
|
|
10003
|
-
if (tag$
|
|
10004
|
-
tag$
|
|
10005
|
-
tag$
|
|
10006
|
-
tag$
|
|
10007
|
-
document.head.appendChild(tag$
|
|
10411
|
+
const css$29 = ".rp_9pSHmG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_9pSHmG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.rp_9pSHmG_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_9pSHmG_select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_9pSHmG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_9pSHmG_cell{min-width:0}.rp_9pSHmG_thumb{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);width:100%;font:inherit;text-align:left;color:inherit;cursor:pointer;flex-direction:column;padding:0;display:flex;overflow:hidden}.rp_9pSHmG_open{cursor:zoom-in;background:0 0;border:0;padding:0;display:block}.rp_9pSHmG_thumb:hover{border-color:var(--dsw-alias-border-l4)}.rp_9pSHmG_image{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-layer-3);width:100%;display:block}.rp_9pSHmG_caption{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);padding:6px 8px;font-size:12px;overflow:hidden}.rp_9pSHmG_detail{flex-direction:column;gap:12px;width:min(640px,100%);max-height:70vh;display:flex;overflow-y:auto}.rp_9pSHmG_large{border-radius:var(--dsw-radius-lg);object-fit:contain;max-width:100%;max-height:32vh;margin:0 auto;display:block}.rp_9pSHmG_facts{grid-template-columns:max-content 1fr;gap:6px 12px;margin:0;font-size:12px;line-height:18px;display:grid}.rp_9pSHmG_facts dt{color:var(--dsw-alias-label-tertiary)}.rp_9pSHmG_facts dd{min-width:0;color:var(--dsw-alias-label-primary);margin:0}.rp_9pSHmG_pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow-y:auto}.rp_9pSHmG_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_9pSHmG_note{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_9pSHmG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_9pSHmG_status,.rp_9pSHmG_statusError{color:var(--dsw-alias-label-tertiary);padding:0 8px 6px;font-size:12px;line-height:16px}.rp_9pSHmG_statusError{color:var(--dsw-alias-state-error-primary)}.rp_9pSHmG_reusable{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;padding:0 8px 6px;font-size:12px;display:flex}.rp_9pSHmG_reusable input{accent-color:var(--dsw-alias-state-business-primary);margin:0}.rp_9pSHmG_editButton{font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;border:0;align-self:flex-start;margin:0 8px 4px;padding:0;font-size:12px}.rp_9pSHmG_edit{flex-direction:column;gap:12px;width:min(480px,100%);display:flex}.rp_9pSHmG_editField{flex-direction:column;gap:4px;display:flex}.rp_9pSHmG_editLabel{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_9pSHmG_editHelp{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_editArea,.rp_9pSHmG_editInput{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}.rp_9pSHmG_editArea{resize:vertical;min-height:96px}.rp_9pSHmG_editArea:focus-visible,.rp_9pSHmG_editInput:focus-visible,.rp_9pSHmG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}@media (width<=640px){.rp_9pSHmG_page{padding-inline:16px}.rp_9pSHmG_toolbar{align-items:flex-start}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(136px,1fr))}}";
|
|
10412
|
+
const key$29 = "src/client/widgets/gallery-view/GalleryView.module.css";
|
|
10413
|
+
let tag$29 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$29) + "]");
|
|
10414
|
+
if (tag$29 === null) {
|
|
10415
|
+
tag$29 = document.createElement("style");
|
|
10416
|
+
tag$29.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10417
|
+
tag$29.dataset.pluginCss = key$29;
|
|
10418
|
+
document.head.appendChild(tag$29);
|
|
10008
10419
|
}
|
|
10009
|
-
tag$
|
|
10420
|
+
tag$29.textContent = css$29;
|
|
10010
10421
|
var GalleryView_module_css_default = {
|
|
10422
|
+
"caption": "rp_9pSHmG_caption",
|
|
10423
|
+
"editButton": "rp_9pSHmG_editButton",
|
|
10424
|
+
"large": "rp_9pSHmG_large",
|
|
10425
|
+
"actions": "rp_9pSHmG_actions",
|
|
10011
10426
|
"detail": "rp_9pSHmG_detail",
|
|
10012
|
-
"
|
|
10013
|
-
"
|
|
10427
|
+
"editLabel": "rp_9pSHmG_editLabel",
|
|
10428
|
+
"editField": "rp_9pSHmG_editField",
|
|
10014
10429
|
"grid": "rp_9pSHmG_grid",
|
|
10015
|
-
"
|
|
10016
|
-
"tags": "rp_9pSHmG_tags",
|
|
10017
|
-
"note": "rp_9pSHmG_note",
|
|
10018
|
-
"status": "rp_9pSHmG_status",
|
|
10430
|
+
"toolbar": "rp_9pSHmG_toolbar",
|
|
10019
10431
|
"page": "rp_9pSHmG_page",
|
|
10432
|
+
"status": "rp_9pSHmG_status",
|
|
10020
10433
|
"cell": "rp_9pSHmG_cell",
|
|
10021
|
-
"pre": "rp_9pSHmG_pre",
|
|
10022
|
-
"editLabel": "rp_9pSHmG_editLabel",
|
|
10023
|
-
"facts": "rp_9pSHmG_facts",
|
|
10024
|
-
"editHelp": "rp_9pSHmG_editHelp",
|
|
10025
|
-
"large": "rp_9pSHmG_large",
|
|
10026
|
-
"caption": "rp_9pSHmG_caption",
|
|
10027
|
-
"toolbar": "rp_9pSHmG_toolbar",
|
|
10028
|
-
"editInput": "rp_9pSHmG_editInput",
|
|
10029
|
-
"message": "rp_9pSHmG_message",
|
|
10030
|
-
"select": "rp_9pSHmG_select",
|
|
10031
|
-
"actions": "rp_9pSHmG_actions",
|
|
10032
10434
|
"statusError": "rp_9pSHmG_statusError",
|
|
10033
10435
|
"thumb": "rp_9pSHmG_thumb",
|
|
10034
|
-
"
|
|
10035
|
-
"editButton": "rp_9pSHmG_editButton",
|
|
10036
|
-
"reusable": "rp_9pSHmG_reusable",
|
|
10436
|
+
"editHelp": "rp_9pSHmG_editHelp",
|
|
10037
10437
|
"image": "rp_9pSHmG_image",
|
|
10438
|
+
"pre": "rp_9pSHmG_pre",
|
|
10439
|
+
"reusable": "rp_9pSHmG_reusable",
|
|
10440
|
+
"message": "rp_9pSHmG_message",
|
|
10441
|
+
"count": "rp_9pSHmG_count",
|
|
10442
|
+
"editInput": "rp_9pSHmG_editInput",
|
|
10443
|
+
"error": "rp_9pSHmG_error",
|
|
10444
|
+
"facts": "rp_9pSHmG_facts",
|
|
10038
10445
|
"editArea": "rp_9pSHmG_editArea",
|
|
10039
|
-
"
|
|
10446
|
+
"open": "rp_9pSHmG_open",
|
|
10447
|
+
"edit": "rp_9pSHmG_edit",
|
|
10448
|
+
"select": "rp_9pSHmG_select",
|
|
10449
|
+
"tags": "rp_9pSHmG_tags",
|
|
10450
|
+
"note": "rp_9pSHmG_note"
|
|
10040
10451
|
};
|
|
10041
10452
|
// src/client/widgets/gallery-view/GalleryView.tsx
|
|
10042
10453
|
/** How often the list is read again while pictures are waiting to be described. */
|
|
10043
10454
|
const POLL_MS$3 = 3e3;
|
|
10044
|
-
const messageOf$
|
|
10455
|
+
const messageOf$10 = (error) => error instanceof Error ? error.message : String(error);
|
|
10045
10456
|
function EditDialog({ t, image, onSave, onClose }) {
|
|
10046
10457
|
const [description, setDescription] = (0, react.useState)(image.description ?? "");
|
|
10047
10458
|
const [tags, setTags] = (0, react.useState)(image.tags.join(", "));
|
|
@@ -10055,7 +10466,7 @@ window.__ModuleLoader__.load({
|
|
|
10055
10466
|
tags: tags.split(/[,,]/).map((tag) => tag.trim()).filter((tag) => tag !== "")
|
|
10056
10467
|
}).then(onClose, (failure) => {
|
|
10057
10468
|
setBusy(false);
|
|
10058
|
-
setError(messageOf$
|
|
10469
|
+
setError(messageOf$10(failure));
|
|
10059
10470
|
});
|
|
10060
10471
|
};
|
|
10061
10472
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -10142,7 +10553,7 @@ window.__ModuleLoader__.load({
|
|
|
10142
10553
|
if (!signal.aborted) {
|
|
10143
10554
|
setLoad({
|
|
10144
10555
|
status: "failed",
|
|
10145
|
-
message: messageOf$
|
|
10556
|
+
message: messageOf$10(failure)
|
|
10146
10557
|
});
|
|
10147
10558
|
setRefreshing(false);
|
|
10148
10559
|
}
|
|
@@ -10189,7 +10600,7 @@ window.__ModuleLoader__.load({
|
|
|
10189
10600
|
} catch (failure) {
|
|
10190
10601
|
setNotice(t("uploadFailed", {
|
|
10191
10602
|
name: file.name,
|
|
10192
|
-
message: messageOf$
|
|
10603
|
+
message: messageOf$10(failure)
|
|
10193
10604
|
}));
|
|
10194
10605
|
}
|
|
10195
10606
|
setUploading(false);
|
|
@@ -10206,7 +10617,7 @@ window.__ModuleLoader__.load({
|
|
|
10206
10617
|
};
|
|
10207
10618
|
const mark = (image, reusable) => {
|
|
10208
10619
|
updateImage(target, image.path, { reusable }, new AbortController().signal).then(replace, (failure) => {
|
|
10209
|
-
setNotice(t("updateFailed", { message: messageOf$
|
|
10620
|
+
setNotice(t("updateFailed", { message: messageOf$10(failure) }));
|
|
10210
10621
|
});
|
|
10211
10622
|
};
|
|
10212
10623
|
const { images, failures } = load.contents;
|
|
@@ -10364,23 +10775,23 @@ window.__ModuleLoader__.load({
|
|
|
10364
10775
|
});
|
|
10365
10776
|
}
|
|
10366
10777
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/WorldEditor.module.css.mjs
|
|
10367
|
-
const css$
|
|
10368
|
-
const key$
|
|
10369
|
-
let tag$
|
|
10370
|
-
if (tag$
|
|
10371
|
-
tag$
|
|
10372
|
-
tag$
|
|
10373
|
-
tag$
|
|
10374
|
-
document.head.appendChild(tag$
|
|
10778
|
+
const css$28 = ".rp__swA3a_view{flex:1 1 0;width:100%;min-height:0;display:flex}.rp__swA3a_message{color:var(--dsw-alias-label-secondary);margin:0;padding:24px;font-size:13px}.rp__swA3a_warning{color:var(--dsw-alias-label-primary);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);margin:0 0 12px;padding:8px 12px;font-size:13px}.rp__swA3a_drawer{box-sizing:border-box;border-right:.5px solid var(--dsw-alias-border-l3);flex-direction:column;flex:0 0 168px;gap:2px;padding:16px 8px;display:flex}.rp__swA3a_drawerItem{border-radius:var(--dsw-radius-md);width:100%;font:inherit;text-align:left;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:6px 12px;font-size:13px;line-height:20px;display:block}@media (width<=720px){.rp__swA3a_view{flex-direction:column}.rp__swA3a_drawer{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l3);flex-direction:row;flex:none;width:100%;padding:8px;overflow-x:auto}.rp__swA3a_drawerItem{white-space:nowrap;flex:none;width:auto}}.rp__swA3a_drawerItem:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.rp__swA3a_drawerItemOn{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-2);font-weight:500}.rp__swA3a_content{flex-direction:column;flex:1 1 0;min-width:0;min-height:0;display:flex}";
|
|
10779
|
+
const key$28 = "src/client/world-editor/WorldEditor.module.css";
|
|
10780
|
+
let tag$28 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$28) + "]");
|
|
10781
|
+
if (tag$28 === null) {
|
|
10782
|
+
tag$28 = document.createElement("style");
|
|
10783
|
+
tag$28.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10784
|
+
tag$28.dataset.pluginCss = key$28;
|
|
10785
|
+
document.head.appendChild(tag$28);
|
|
10375
10786
|
}
|
|
10376
|
-
tag$
|
|
10787
|
+
tag$28.textContent = css$28;
|
|
10377
10788
|
var WorldEditor_module_css_default = {
|
|
10378
|
-
"view": "rp__swA3a_view",
|
|
10379
|
-
"warning": "rp__swA3a_warning",
|
|
10380
10789
|
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
10790
|
+
"content": "rp__swA3a_content",
|
|
10381
10791
|
"message": "rp__swA3a_message",
|
|
10792
|
+
"warning": "rp__swA3a_warning",
|
|
10793
|
+
"view": "rp__swA3a_view",
|
|
10382
10794
|
"drawer": "rp__swA3a_drawer",
|
|
10383
|
-
"content": "rp__swA3a_content",
|
|
10384
10795
|
"drawerItem": "rp__swA3a_drawerItem"
|
|
10385
10796
|
};
|
|
10386
10797
|
// src/client/world-editor/WorldEditor.tsx
|
|
@@ -10764,38 +11175,38 @@ window.__ModuleLoader__.load({
|
|
|
10764
11175
|
});
|
|
10765
11176
|
}
|
|
10766
11177
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/avatars/AvatarsPage.module.css.mjs
|
|
10767
|
-
const css$
|
|
10768
|
-
const key$
|
|
10769
|
-
let tag$
|
|
10770
|
-
if (tag$
|
|
10771
|
-
tag$
|
|
10772
|
-
tag$
|
|
10773
|
-
tag$
|
|
10774
|
-
document.head.appendChild(tag$
|
|
11178
|
+
const css$27 = ".rp_pQOzEG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_pQOzEG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_pQOzEG_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_pQOzEG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_pQOzEG_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_pQOzEG_grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_pQOzEG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);align-items:center;gap:4px;min-width:0;padding-right:8px;display:flex}.rp_pQOzEG_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_pQOzEG_open{min-width:0;font:inherit;text-align:left;color:inherit;cursor:pointer;background:0 0;border:0;flex:auto;align-items:center;gap:12px;padding:10px 0 10px 10px;display:flex}.rp_pQOzEG_open:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_pQOzEG_portrait,.rp_pQOzEG_placeholder{border-radius:var(--dsw-radius-lg);object-fit:cover;flex:none;width:48px;height:48px}.rp_pQOzEG_placeholder{color:var(--dsw-alias-label-secondary);justify-content:center;align-items:center;font-size:20px;font-weight:500;display:flex}.rp_pQOzEG_text{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_pQOzEG_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_pQOzEG_summary{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_pQOzEG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_pQOzEG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_pQOzEG_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_pQOzEG_editTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_pQOzEG_editBody{flex:1 1 0;min-height:0;display:flex}.rp_pQOzEG_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_pQOzEG_field{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_pQOzEG_label{color:var(--dsw-alias-label-secondary);font-size:12px}@media (width<=640px){.rp_pQOzEG_toolbar{align-items:flex-start}.rp_pQOzEG_count{padding-top:6px}.rp_pQOzEG_grid{grid-template-columns:1fr}.rp_pQOzEG_form{min-width:0}}";
|
|
11179
|
+
const key$27 = "src/client/pages/avatars/AvatarsPage.module.css";
|
|
11180
|
+
let tag$27 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$27) + "]");
|
|
11181
|
+
if (tag$27 === null) {
|
|
11182
|
+
tag$27 = document.createElement("style");
|
|
11183
|
+
tag$27.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
11184
|
+
tag$27.dataset.pluginCss = key$27;
|
|
11185
|
+
document.head.appendChild(tag$27);
|
|
10775
11186
|
}
|
|
10776
|
-
tag$
|
|
11187
|
+
tag$27.textContent = css$27;
|
|
10777
11188
|
var AvatarsPage_module_css_default = {
|
|
10778
|
-
"
|
|
10779
|
-
"
|
|
11189
|
+
"form": "rp_pQOzEG_form",
|
|
11190
|
+
"toolbar": "rp_pQOzEG_toolbar",
|
|
11191
|
+
"card": "rp_pQOzEG_card",
|
|
10780
11192
|
"open": "rp_pQOzEG_open",
|
|
10781
|
-
"actions": "rp_pQOzEG_actions",
|
|
10782
|
-
"grid": "rp_pQOzEG_grid",
|
|
10783
|
-
"placeholder": "rp_pQOzEG_placeholder",
|
|
10784
11193
|
"error": "rp_pQOzEG_error",
|
|
10785
|
-
"
|
|
10786
|
-
"
|
|
10787
|
-
"
|
|
11194
|
+
"text": "rp_pQOzEG_text",
|
|
11195
|
+
"editHeader": "rp_pQOzEG_editHeader",
|
|
11196
|
+
"viewport": "rp_pQOzEG_viewport",
|
|
11197
|
+
"editTitle": "rp_pQOzEG_editTitle",
|
|
11198
|
+
"field": "rp_pQOzEG_field",
|
|
10788
11199
|
"label": "rp_pQOzEG_label",
|
|
11200
|
+
"page": "rp_pQOzEG_page",
|
|
11201
|
+
"summary": "rp_pQOzEG_summary",
|
|
10789
11202
|
"message": "rp_pQOzEG_message",
|
|
10790
11203
|
"name": "rp_pQOzEG_name",
|
|
10791
|
-
"
|
|
10792
|
-
"
|
|
10793
|
-
"
|
|
10794
|
-
"
|
|
10795
|
-
"
|
|
10796
|
-
"
|
|
10797
|
-
"editHeader": "rp_pQOzEG_editHeader",
|
|
10798
|
-
"form": "rp_pQOzEG_form"
|
|
11204
|
+
"portrait": "rp_pQOzEG_portrait",
|
|
11205
|
+
"grid": "rp_pQOzEG_grid",
|
|
11206
|
+
"count": "rp_pQOzEG_count",
|
|
11207
|
+
"actions": "rp_pQOzEG_actions",
|
|
11208
|
+
"editBody": "rp_pQOzEG_editBody",
|
|
11209
|
+
"placeholder": "rp_pQOzEG_placeholder"
|
|
10799
11210
|
};
|
|
10800
11211
|
// src/client/pages/avatars/AvatarsPage.tsx
|
|
10801
11212
|
const hueOf$2 = (name) => Array.from(name).reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 360, 0);
|
|
@@ -11063,7 +11474,7 @@ window.__ModuleLoader__.load({
|
|
|
11063
11474
|
});
|
|
11064
11475
|
}
|
|
11065
11476
|
// src/client/widgets/sampling-fields/locales.ts
|
|
11066
|
-
const dictionaries$
|
|
11477
|
+
const dictionaries$23 = {
|
|
11067
11478
|
en: {
|
|
11068
11479
|
sf_master: "Narrator temperature (0 to 2)",
|
|
11069
11480
|
sf_characters: "Characters temperature (0 to 2)",
|
|
@@ -11088,7 +11499,7 @@ window.__ModuleLoader__.load({
|
|
|
11088
11499
|
}
|
|
11089
11500
|
};
|
|
11090
11501
|
// src/client/widgets/tool-switches/locales.ts
|
|
11091
|
-
const dictionaries$
|
|
11502
|
+
const dictionaries$22 = {
|
|
11092
11503
|
en: {
|
|
11093
11504
|
sw_title: "Tools",
|
|
11094
11505
|
sw_help: "Which optional tools each kind of agent may use. A choice applies to every agent of that kind, not to one character. Tools this version does not know are left as they are and not shown.",
|
|
@@ -11167,7 +11578,7 @@ window.__ModuleLoader__.load({
|
|
|
11167
11578
|
}
|
|
11168
11579
|
};
|
|
11169
11580
|
// src/client/widgets/gallery-view/locales.ts
|
|
11170
|
-
const dictionaries$
|
|
11581
|
+
const dictionaries$21 = {
|
|
11171
11582
|
en: {
|
|
11172
11583
|
tab: "Gallery",
|
|
11173
11584
|
notRoleplay: "This chat is not a roleplay session, so it has no gallery.",
|
|
@@ -11249,7 +11660,7 @@ window.__ModuleLoader__.load({
|
|
|
11249
11660
|
back: "返回"
|
|
11250
11661
|
}
|
|
11251
11662
|
};
|
|
11252
|
-
const dictionaries$
|
|
11663
|
+
const dictionaries$16 = withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries({
|
|
11253
11664
|
en: {
|
|
11254
11665
|
language: "en",
|
|
11255
11666
|
sectionInfo: "About",
|
|
@@ -11846,7 +12257,7 @@ window.__ModuleLoader__.load({
|
|
|
11846
12257
|
relationCancel: "取消",
|
|
11847
12258
|
relationCreate: "创建"
|
|
11848
12259
|
}
|
|
11849
|
-
}, prefixed(dictionaries$
|
|
12260
|
+
}, prefixed(dictionaries$21, "gallery_")), prefixed({
|
|
11850
12261
|
en: {
|
|
11851
12262
|
title: "Triggers",
|
|
11852
12263
|
help: "What the world does by itself when something comes true. They are read from triggers.json; ask the authoring assistant to make or change them, or edit the file.",
|
|
@@ -12080,7 +12491,52 @@ window.__ModuleLoader__.load({
|
|
|
12080
12491
|
logOpen: "请求打开:{surface}",
|
|
12081
12492
|
noSurfaces: "这个界面包没有可预览的界面位置。"
|
|
12082
12493
|
}
|
|
12083
|
-
}, "pk_")),
|
|
12494
|
+
}, "pk_")), prefixed({
|
|
12495
|
+
en: {
|
|
12496
|
+
title: "Questions before the story",
|
|
12497
|
+
help: "The start dialog asks these and applies the chosen answer: extra rules, an alternate opening, a starting time, the clock, tool switches and a plot's starting state. What the player picks in the dialog itself wins over an answer. Between 2 and 8 answers each.",
|
|
12498
|
+
addQuestion: "Add a question",
|
|
12499
|
+
removeQuestion: "Remove the question",
|
|
12500
|
+
questionId: "Id",
|
|
12501
|
+
questionText: "Question",
|
|
12502
|
+
addAnswer: "Add an answer",
|
|
12503
|
+
removeAnswer: "Remove",
|
|
12504
|
+
answerId: "Id",
|
|
12505
|
+
answerLabel: "Answer",
|
|
12506
|
+
answerDescription: "Explanation",
|
|
12507
|
+
rules: "Rules it adds (one per line)",
|
|
12508
|
+
opening: "Opening",
|
|
12509
|
+
openingNone: "No change",
|
|
12510
|
+
startingTime: "Starting time",
|
|
12511
|
+
clock: "Clock",
|
|
12512
|
+
clockNone: "No change",
|
|
12513
|
+
clockSimulated: "Simulated",
|
|
12514
|
+
clockReal: "Real time",
|
|
12515
|
+
keptElsewhere: "Also sets tool switches or plots, which are kept as written in the file."
|
|
12516
|
+
},
|
|
12517
|
+
zh: {
|
|
12518
|
+
title: "开始前的提问",
|
|
12519
|
+
help: "开始对话框会询问这些问题,并应用所选的回答:额外规则、备选开场、起始时间、时钟、工具开关和剧情线的起始状态。玩家在对话框里直接选的内容优先于回答。每个问题 2 到 8 个回答。",
|
|
12520
|
+
addQuestion: "添加问题",
|
|
12521
|
+
removeQuestion: "移除问题",
|
|
12522
|
+
questionId: "标识",
|
|
12523
|
+
questionText: "问题",
|
|
12524
|
+
addAnswer: "添加回答",
|
|
12525
|
+
removeAnswer: "移除",
|
|
12526
|
+
answerId: "标识",
|
|
12527
|
+
answerLabel: "回答",
|
|
12528
|
+
answerDescription: "说明",
|
|
12529
|
+
rules: "添加的规则(每行一条)",
|
|
12530
|
+
opening: "开场",
|
|
12531
|
+
openingNone: "不改变",
|
|
12532
|
+
startingTime: "起始时间",
|
|
12533
|
+
clock: "时钟",
|
|
12534
|
+
clockNone: "不改变",
|
|
12535
|
+
clockSimulated: "模拟",
|
|
12536
|
+
clockReal: "真实时间",
|
|
12537
|
+
keptElsewhere: "还设置了工具开关或剧情线,按文件中所写保留。"
|
|
12538
|
+
}
|
|
12539
|
+
}, "sq_")), dictionaries$22), prefixed({
|
|
12084
12540
|
en: {
|
|
12085
12541
|
help: "How uncertain attempts are settled. The game master rolls one of these checks and is told which band the roll fell in, so no number is ever made up. Each check says when it is used, the dice it rolls and what each result means; the bands together should cover every value the dice can give.",
|
|
12086
12542
|
none: "This world has no checks. Its game master can still roll plain dice for things that have none.",
|
|
@@ -12153,8 +12609,8 @@ window.__ModuleLoader__.load({
|
|
|
12153
12609
|
resultFailed: "失败",
|
|
12154
12610
|
bandCritical: "关键"
|
|
12155
12611
|
}
|
|
12156
|
-
}, "dice_")), dictionaries$
|
|
12157
|
-
const dictionaries$
|
|
12612
|
+
}, "dice_")), dictionaries$23);
|
|
12613
|
+
const dictionaries$15 = withDictionaries({
|
|
12158
12614
|
en: {
|
|
12159
12615
|
nav: "Avatars",
|
|
12160
12616
|
avatarsLoading: "Loading avatars…",
|
|
@@ -12207,13 +12663,13 @@ window.__ModuleLoader__.load({
|
|
|
12207
12663
|
avatarDeleteFailed: "无法删除角色形象:{message}",
|
|
12208
12664
|
avatarEdit: "编辑"
|
|
12209
12665
|
}
|
|
12210
|
-
}, dictionaries$
|
|
12666
|
+
}, dictionaries$16);
|
|
12211
12667
|
// src/client/pages/avatars/index.ts
|
|
12212
|
-
const NAMESPACE$
|
|
12668
|
+
const NAMESPACE$15 = "roleplay.avatars";
|
|
12213
12669
|
/** Adds the Avatars page to the Role Play panel: characters to play in any world. */
|
|
12214
12670
|
function registerAvatarsPage(ctx) {
|
|
12215
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
12216
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
12671
|
+
const t = ctx.locale.bind(NAMESPACE$15);
|
|
12672
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$15, dictionaries$15), "roleplay: avatars dictionaries");
|
|
12217
12673
|
const avatars = new AvatarsController();
|
|
12218
12674
|
ctx.effect(() => () => {
|
|
12219
12675
|
avatars.dispose();
|
|
@@ -12223,56 +12679,56 @@ window.__ModuleLoader__.load({
|
|
|
12223
12679
|
id: "avatars",
|
|
12224
12680
|
order: 5,
|
|
12225
12681
|
label: () => t("nav"),
|
|
12226
|
-
locale: NAMESPACE$
|
|
12682
|
+
locale: NAMESPACE$15,
|
|
12227
12683
|
inject: () => avatars.inject()
|
|
12228
12684
|
}, AvatarsPage));
|
|
12229
12685
|
}
|
|
12230
12686
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/lorebooks/LorebooksPage.module.css.mjs
|
|
12231
|
-
const css$
|
|
12232
|
-
const key$
|
|
12233
|
-
let tag$
|
|
12234
|
-
if (tag$
|
|
12235
|
-
tag$
|
|
12236
|
-
tag$
|
|
12237
|
-
tag$
|
|
12238
|
-
document.head.appendChild(tag$
|
|
12687
|
+
const css$26 = ".rp_VV-Eha_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_VV-Eha_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_VV-Eha_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_VV-Eha_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_VV-Eha_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_VV-Eha_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_VV-Eha_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_VV-Eha_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_VV-Eha_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_VV-Eha_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_VV-Eha_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_VV-Eha_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_VV-Eha_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_VV-Eha_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_VV-Eha_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_VV-Eha_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_VV-Eha_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_VV-Eha_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_VV-Eha_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_VV-Eha_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_VV-Eha_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_VV-Eha_row{flex-wrap:wrap;gap:12px;display:flex}.rp_VV-Eha_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_VV-Eha_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_VV-Eha_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_VV-Eha_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_VV-Eha_grid{grid-template-columns:1fr}.rp_VV-Eha_form{min-width:0}.rp_VV-Eha_editBody{padding:16px}}.rp_VV-Eha_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:4px 6px;font-size:13px}.rp_VV-Eha_entryArea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:200px;font:inherit;color:var(--dsw-alias-label-primary);resize:vertical;padding:8px;font-size:13px;line-height:20px}";
|
|
12688
|
+
const key$26 = "src/client/pages/lorebooks/LorebooksPage.module.css";
|
|
12689
|
+
let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
|
|
12690
|
+
if (tag$26 === null) {
|
|
12691
|
+
tag$26 = document.createElement("style");
|
|
12692
|
+
tag$26.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
12693
|
+
tag$26.dataset.pluginCss = key$26;
|
|
12694
|
+
document.head.appendChild(tag$26);
|
|
12239
12695
|
}
|
|
12240
|
-
tag$
|
|
12696
|
+
tag$26.textContent = css$26;
|
|
12241
12697
|
var LorebooksPage_module_css_default = {
|
|
12242
|
-
"
|
|
12698
|
+
"head": "rp_VV-Eha_head",
|
|
12699
|
+
"cardActions": "rp_VV-Eha_cardActions",
|
|
12700
|
+
"card": "rp_VV-Eha_card",
|
|
12701
|
+
"row": "rp_VV-Eha_row",
|
|
12702
|
+
"input": "rp_VV-Eha_input",
|
|
12703
|
+
"grid": "rp_VV-Eha_grid",
|
|
12704
|
+
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12705
|
+
"field": "rp_VV-Eha_field",
|
|
12706
|
+
"name": "rp_VV-Eha_name",
|
|
12707
|
+
"warning": "rp_VV-Eha_warning",
|
|
12708
|
+
"ok": "rp_VV-Eha_ok",
|
|
12709
|
+
"help": "rp_VV-Eha_help",
|
|
12710
|
+
"area": "rp_VV-Eha_area",
|
|
12243
12711
|
"meta": "rp_VV-Eha_meta",
|
|
12244
|
-
"
|
|
12245
|
-
"entryArea": "rp_VV-Eha_entryArea",
|
|
12712
|
+
"toolbar": "rp_VV-Eha_toolbar",
|
|
12246
12713
|
"message": "rp_VV-Eha_message",
|
|
12247
12714
|
"form": "rp_VV-Eha_form",
|
|
12715
|
+
"editBody": "rp_VV-Eha_editBody",
|
|
12716
|
+
"editHeader": "rp_VV-Eha_editHeader",
|
|
12717
|
+
"label": "rp_VV-Eha_label",
|
|
12718
|
+
"section": "rp_VV-Eha_section",
|
|
12719
|
+
"actions": "rp_VV-Eha_actions",
|
|
12248
12720
|
"title": "rp_VV-Eha_title",
|
|
12721
|
+
"editTitle": "rp_VV-Eha_editTitle",
|
|
12722
|
+
"entryArea": "rp_VV-Eha_entryArea",
|
|
12723
|
+
"error": "rp_VV-Eha_error",
|
|
12249
12724
|
"select": "rp_VV-Eha_select",
|
|
12250
12725
|
"count": "rp_VV-Eha_count",
|
|
12251
|
-
"field": "rp_VV-Eha_field",
|
|
12252
|
-
"editTitle": "rp_VV-Eha_editTitle",
|
|
12253
|
-
"name": "rp_VV-Eha_name",
|
|
12254
|
-
"area": "rp_VV-Eha_area",
|
|
12255
|
-
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12256
|
-
"card": "rp_VV-Eha_card",
|
|
12257
|
-
"head": "rp_VV-Eha_head",
|
|
12258
12726
|
"description": "rp_VV-Eha_description",
|
|
12259
|
-
"input": "rp_VV-Eha_input",
|
|
12260
|
-
"grid": "rp_VV-Eha_grid",
|
|
12261
|
-
"section": "rp_VV-Eha_section",
|
|
12262
|
-
"help": "rp_VV-Eha_help",
|
|
12263
|
-
"row": "rp_VV-Eha_row",
|
|
12264
|
-
"cardActions": "rp_VV-Eha_cardActions",
|
|
12265
|
-
"viewport": "rp_VV-Eha_viewport",
|
|
12266
|
-
"toolbar": "rp_VV-Eha_toolbar",
|
|
12267
12727
|
"page": "rp_VV-Eha_page",
|
|
12268
|
-
"
|
|
12269
|
-
"editBody": "rp_VV-Eha_editBody",
|
|
12270
|
-
"error": "rp_VV-Eha_error",
|
|
12271
|
-
"ok": "rp_VV-Eha_ok",
|
|
12272
|
-
"warning": "rp_VV-Eha_warning"
|
|
12728
|
+
"viewport": "rp_VV-Eha_viewport"
|
|
12273
12729
|
};
|
|
12274
12730
|
// src/client/pages/lorebooks/LorebookEditor.tsx
|
|
12275
|
-
const messageOf$
|
|
12731
|
+
const messageOf$9 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
12276
12732
|
const KINDS$1 = [
|
|
12277
12733
|
"history",
|
|
12278
12734
|
"culture",
|
|
@@ -12342,7 +12798,7 @@ window.__ModuleLoader__.load({
|
|
|
12342
12798
|
readLorebook(name, abort.signal).then((value) => {
|
|
12343
12799
|
accept(value);
|
|
12344
12800
|
}, (problem) => {
|
|
12345
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
12801
|
+
if (!abort.signal.aborted) setFailure(messageOf$9(problem));
|
|
12346
12802
|
});
|
|
12347
12803
|
return () => {
|
|
12348
12804
|
abort.abort();
|
|
@@ -12370,7 +12826,7 @@ window.__ModuleLoader__.load({
|
|
|
12370
12826
|
}, (problem) => {
|
|
12371
12827
|
setInfoStatus({
|
|
12372
12828
|
state: "failed",
|
|
12373
|
-
message: messageOf$
|
|
12829
|
+
message: messageOf$9(problem)
|
|
12374
12830
|
});
|
|
12375
12831
|
});
|
|
12376
12832
|
};
|
|
@@ -12380,7 +12836,7 @@ window.__ModuleLoader__.load({
|
|
|
12380
12836
|
}, (problem) => {
|
|
12381
12837
|
setEntryStatus({
|
|
12382
12838
|
state: "failed",
|
|
12383
|
-
message: messageOf$
|
|
12839
|
+
message: messageOf$9(problem)
|
|
12384
12840
|
});
|
|
12385
12841
|
});
|
|
12386
12842
|
};
|
|
@@ -12393,7 +12849,7 @@ window.__ModuleLoader__.load({
|
|
|
12393
12849
|
}, (problem) => {
|
|
12394
12850
|
setEntryStatus({
|
|
12395
12851
|
state: "failed",
|
|
12396
|
-
message: messageOf$
|
|
12852
|
+
message: messageOf$9(problem)
|
|
12397
12853
|
});
|
|
12398
12854
|
});
|
|
12399
12855
|
};
|
|
@@ -12405,7 +12861,7 @@ window.__ModuleLoader__.load({
|
|
|
12405
12861
|
}, (problem) => {
|
|
12406
12862
|
setEntryStatus({
|
|
12407
12863
|
state: "failed",
|
|
12408
|
-
message: messageOf$
|
|
12864
|
+
message: messageOf$9(problem)
|
|
12409
12865
|
});
|
|
12410
12866
|
});
|
|
12411
12867
|
};
|
|
@@ -12665,7 +13121,7 @@ window.__ModuleLoader__.load({
|
|
|
12665
13121
|
}
|
|
12666
13122
|
// src/client/pages/lorebooks/LorebooksPage.tsx
|
|
12667
13123
|
const NAME$1 = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
12668
|
-
const messageOf$
|
|
13124
|
+
const messageOf$8 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
12669
13125
|
const nameFromFile$1 = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
|
|
12670
13126
|
function NameDialog$1({ t, submit, onClose }) {
|
|
12671
13127
|
const formId = (0, react.useId)();
|
|
@@ -12680,7 +13136,7 @@ window.__ModuleLoader__.load({
|
|
|
12680
13136
|
setError(void 0);
|
|
12681
13137
|
submit(name, title.trim(), description.trim()).then(onClose, (failure) => {
|
|
12682
13138
|
setBusy(false);
|
|
12683
|
-
setError(messageOf$
|
|
13139
|
+
setError(messageOf$8(failure));
|
|
12684
13140
|
});
|
|
12685
13141
|
};
|
|
12686
13142
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -12773,7 +13229,7 @@ window.__ModuleLoader__.load({
|
|
|
12773
13229
|
setError(void 0);
|
|
12774
13230
|
remove(book.name).then(onClose, (failure) => {
|
|
12775
13231
|
setBusy(false);
|
|
12776
|
-
setError(messageOf$
|
|
13232
|
+
setError(messageOf$8(failure));
|
|
12777
13233
|
});
|
|
12778
13234
|
};
|
|
12779
13235
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -12817,7 +13273,7 @@ window.__ModuleLoader__.load({
|
|
|
12817
13273
|
const open = (name) => {
|
|
12818
13274
|
setNotice(void 0);
|
|
12819
13275
|
author(name).catch((failure) => {
|
|
12820
|
-
setNotice(t("authorFailed", { message: messageOf$
|
|
13276
|
+
setNotice(t("authorFailed", { message: messageOf$8(failure) }));
|
|
12821
13277
|
});
|
|
12822
13278
|
};
|
|
12823
13279
|
const choose = (file) => {
|
|
@@ -12830,7 +13286,7 @@ window.__ModuleLoader__.load({
|
|
|
12830
13286
|
setStaged(preview);
|
|
12831
13287
|
}, (failure) => {
|
|
12832
13288
|
setStaging(false);
|
|
12833
|
-
setNotice(t("importFailed", { message: messageOf$
|
|
13289
|
+
setNotice(t("importFailed", { message: messageOf$8(failure) }));
|
|
12834
13290
|
});
|
|
12835
13291
|
};
|
|
12836
13292
|
if (editing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LorebookEditor, {
|
|
@@ -13038,7 +13494,7 @@ window.__ModuleLoader__.load({
|
|
|
13038
13494
|
]
|
|
13039
13495
|
});
|
|
13040
13496
|
}
|
|
13041
|
-
const dictionaries$
|
|
13497
|
+
const dictionaries$14 = withDictionaries({
|
|
13042
13498
|
en: {
|
|
13043
13499
|
nav: "Lorebooks",
|
|
13044
13500
|
language: "en",
|
|
@@ -13185,9 +13641,9 @@ window.__ModuleLoader__.load({
|
|
|
13185
13641
|
kind_legend: "传说",
|
|
13186
13642
|
kind_other: "其他"
|
|
13187
13643
|
}
|
|
13188
|
-
}, dictionaries$
|
|
13644
|
+
}, dictionaries$25);
|
|
13189
13645
|
// src/client/pages/lorebooks/lorebooks-controller.ts
|
|
13190
|
-
const messageOf$
|
|
13646
|
+
const messageOf$7 = (error) => error instanceof Error ? error.message : String(error);
|
|
13191
13647
|
/** Reads the lorebook library from the host and makes, removes and opens its lorebooks. */
|
|
13192
13648
|
var LorebooksController = class {
|
|
13193
13649
|
openChat;
|
|
@@ -13267,7 +13723,7 @@ window.__ModuleLoader__.load({
|
|
|
13267
13723
|
} catch (error) {
|
|
13268
13724
|
if (this.abort.signal.aborted) return;
|
|
13269
13725
|
this.store.update((draft) => {
|
|
13270
|
-
draft.error = messageOf$
|
|
13726
|
+
draft.error = messageOf$7(error);
|
|
13271
13727
|
if (draft.books === void 0) draft.status = "failed";
|
|
13272
13728
|
});
|
|
13273
13729
|
} finally {
|
|
@@ -13278,11 +13734,11 @@ window.__ModuleLoader__.load({
|
|
|
13278
13734
|
}
|
|
13279
13735
|
};
|
|
13280
13736
|
// src/client/pages/lorebooks/index.ts
|
|
13281
|
-
const NAMESPACE$
|
|
13737
|
+
const NAMESPACE$14 = "roleplay.lorebooks";
|
|
13282
13738
|
/** Adds the Lorebooks page to the Role Play panel: reusable background knowledge that stories start with. */
|
|
13283
13739
|
function registerLorebooksPage(ctx) {
|
|
13284
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
13285
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
13740
|
+
const t = ctx.locale.bind(NAMESPACE$14);
|
|
13741
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$14, dictionaries$14), "roleplay: lorebooks dictionaries");
|
|
13286
13742
|
const lorebooks = new LorebooksController(createChatOpener(ctx), () => t("language"));
|
|
13287
13743
|
ctx.effect(() => () => {
|
|
13288
13744
|
lorebooks.dispose();
|
|
@@ -13292,54 +13748,54 @@ window.__ModuleLoader__.load({
|
|
|
13292
13748
|
id: "lorebooks",
|
|
13293
13749
|
order: 8,
|
|
13294
13750
|
label: () => t("nav"),
|
|
13295
|
-
locale: NAMESPACE$
|
|
13751
|
+
locale: NAMESPACE$14,
|
|
13296
13752
|
inject: () => lorebooks.inject()
|
|
13297
13753
|
}, LorebooksPage));
|
|
13298
13754
|
}
|
|
13299
13755
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/presets/PresetsPage.module.css.mjs
|
|
13300
|
-
const css$
|
|
13301
|
-
const key$
|
|
13302
|
-
let tag$
|
|
13303
|
-
if (tag$
|
|
13304
|
-
tag$
|
|
13305
|
-
tag$
|
|
13306
|
-
tag$
|
|
13307
|
-
document.head.appendChild(tag$
|
|
13756
|
+
const css$25 = ".rp_ZK89ba_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_ZK89ba_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_ZK89ba_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_ZK89ba_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_ZK89ba_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_ZK89ba_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_ZK89ba_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_ZK89ba_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_ZK89ba_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_ZK89ba_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_ZK89ba_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_ZK89ba_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_ZK89ba_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_ZK89ba_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_ZK89ba_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_ZK89ba_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_ZK89ba_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_ZK89ba_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_ZK89ba_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_ZK89ba_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_ZK89ba_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_ZK89ba_row{flex-wrap:wrap;gap:12px;display:flex}.rp_ZK89ba_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_ZK89ba_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_ZK89ba_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_ZK89ba_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_ZK89ba_grid{grid-template-columns:1fr}.rp_ZK89ba_form{min-width:0}.rp_ZK89ba_editBody{padding:16px}}";
|
|
13757
|
+
const key$25 = "src/client/pages/presets/PresetsPage.module.css";
|
|
13758
|
+
let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
|
|
13759
|
+
if (tag$25 === null) {
|
|
13760
|
+
tag$25 = document.createElement("style");
|
|
13761
|
+
tag$25.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
13762
|
+
tag$25.dataset.pluginCss = key$25;
|
|
13763
|
+
document.head.appendChild(tag$25);
|
|
13308
13764
|
}
|
|
13309
|
-
tag$
|
|
13765
|
+
tag$25.textContent = css$25;
|
|
13310
13766
|
var PresetsPage_module_css_default = {
|
|
13311
|
-
"
|
|
13312
|
-
"
|
|
13313
|
-
"
|
|
13767
|
+
"ok": "rp_ZK89ba_ok",
|
|
13768
|
+
"meta": "rp_ZK89ba_meta",
|
|
13769
|
+
"toolbar": "rp_ZK89ba_toolbar",
|
|
13770
|
+
"viewport": "rp_ZK89ba_viewport",
|
|
13314
13771
|
"section": "rp_ZK89ba_section",
|
|
13315
|
-
"
|
|
13316
|
-
"grid": "rp_ZK89ba_grid",
|
|
13317
|
-
"editTitle": "rp_ZK89ba_editTitle",
|
|
13318
|
-
"row": "rp_ZK89ba_row",
|
|
13772
|
+
"page": "rp_ZK89ba_page",
|
|
13319
13773
|
"message": "rp_ZK89ba_message",
|
|
13774
|
+
"row": "rp_ZK89ba_row",
|
|
13320
13775
|
"field": "rp_ZK89ba_field",
|
|
13776
|
+
"editHeader": "rp_ZK89ba_editHeader",
|
|
13777
|
+
"warning": "rp_ZK89ba_warning",
|
|
13778
|
+
"form": "rp_ZK89ba_form",
|
|
13321
13779
|
"actions": "rp_ZK89ba_actions",
|
|
13322
|
-
"
|
|
13323
|
-
"
|
|
13780
|
+
"error": "rp_ZK89ba_error",
|
|
13781
|
+
"help": "rp_ZK89ba_help",
|
|
13782
|
+
"count": "rp_ZK89ba_count",
|
|
13783
|
+
"title": "rp_ZK89ba_title",
|
|
13324
13784
|
"cardActions": "rp_ZK89ba_cardActions",
|
|
13325
|
-
"
|
|
13785
|
+
"card": "rp_ZK89ba_card",
|
|
13786
|
+
"name": "rp_ZK89ba_name",
|
|
13326
13787
|
"label": "rp_ZK89ba_label",
|
|
13327
13788
|
"area": "rp_ZK89ba_area",
|
|
13328
|
-
"
|
|
13789
|
+
"input": "rp_ZK89ba_input",
|
|
13329
13790
|
"description": "rp_ZK89ba_description",
|
|
13330
|
-
"
|
|
13331
|
-
"name": "rp_ZK89ba_name",
|
|
13332
|
-
"count": "rp_ZK89ba_count",
|
|
13333
|
-
"toolbar": "rp_ZK89ba_toolbar",
|
|
13334
|
-
"head": "rp_ZK89ba_head",
|
|
13335
|
-
"help": "rp_ZK89ba_help",
|
|
13791
|
+
"grid": "rp_ZK89ba_grid",
|
|
13336
13792
|
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13793
|
+
"head": "rp_ZK89ba_head",
|
|
13337
13794
|
"editBody": "rp_ZK89ba_editBody",
|
|
13338
|
-
"
|
|
13339
|
-
"ok": "rp_ZK89ba_ok"
|
|
13795
|
+
"editTitle": "rp_ZK89ba_editTitle"
|
|
13340
13796
|
};
|
|
13341
13797
|
// src/client/pages/presets/PresetEditor.tsx
|
|
13342
|
-
const messageOf$
|
|
13798
|
+
const messageOf$6 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
13343
13799
|
const PROMPT_IDS = [
|
|
13344
13800
|
"roleplay/persona",
|
|
13345
13801
|
"roleplay/style",
|
|
@@ -13382,7 +13838,7 @@ window.__ModuleLoader__.load({
|
|
|
13382
13838
|
readPreset(name, abort.signal).then((value) => {
|
|
13383
13839
|
accept(value);
|
|
13384
13840
|
}, (problem) => {
|
|
13385
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
13841
|
+
if (!abort.signal.aborted) setFailure(messageOf$6(problem));
|
|
13386
13842
|
});
|
|
13387
13843
|
return () => {
|
|
13388
13844
|
abort.abort();
|
|
@@ -13393,7 +13849,7 @@ window.__ModuleLoader__.load({
|
|
|
13393
13849
|
Promise.all(PROMPT_LANGUAGES.map(async (language) => (await listRulesPrompts(name, language, abort.signal)).map((id) => `${language}/${id}`))).then((lists) => {
|
|
13394
13850
|
setRulesOffered(lists.flat());
|
|
13395
13851
|
}, (problem) => {
|
|
13396
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
13852
|
+
if (!abort.signal.aborted) setFailure(messageOf$6(problem));
|
|
13397
13853
|
});
|
|
13398
13854
|
return () => {
|
|
13399
13855
|
abort.abort();
|
|
@@ -13429,7 +13885,7 @@ window.__ModuleLoader__.load({
|
|
|
13429
13885
|
}, (problem) => {
|
|
13430
13886
|
setInfoStatus({
|
|
13431
13887
|
state: "failed",
|
|
13432
|
-
message: messageOf$
|
|
13888
|
+
message: messageOf$6(problem)
|
|
13433
13889
|
});
|
|
13434
13890
|
});
|
|
13435
13891
|
};
|
|
@@ -13451,7 +13907,7 @@ window.__ModuleLoader__.load({
|
|
|
13451
13907
|
}, (problem) => {
|
|
13452
13908
|
setPromptStatus({
|
|
13453
13909
|
state: "failed",
|
|
13454
|
-
message: messageOf$
|
|
13910
|
+
message: messageOf$6(problem)
|
|
13455
13911
|
});
|
|
13456
13912
|
});
|
|
13457
13913
|
};
|
|
@@ -13474,7 +13930,7 @@ window.__ModuleLoader__.load({
|
|
|
13474
13930
|
}, (problem) => {
|
|
13475
13931
|
setPromptStatus({
|
|
13476
13932
|
state: "failed",
|
|
13477
|
-
message: messageOf$
|
|
13933
|
+
message: messageOf$6(problem)
|
|
13478
13934
|
});
|
|
13479
13935
|
});
|
|
13480
13936
|
};
|
|
@@ -13706,7 +14162,7 @@ window.__ModuleLoader__.load({
|
|
|
13706
14162
|
}, (problem) => {
|
|
13707
14163
|
setPromptStatus({
|
|
13708
14164
|
state: "failed",
|
|
13709
|
-
message: messageOf$
|
|
14165
|
+
message: messageOf$6(problem)
|
|
13710
14166
|
});
|
|
13711
14167
|
});
|
|
13712
14168
|
},
|
|
@@ -13756,7 +14212,7 @@ window.__ModuleLoader__.load({
|
|
|
13756
14212
|
}
|
|
13757
14213
|
// src/client/pages/presets/PresetsPage.tsx
|
|
13758
14214
|
const NAME = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
13759
|
-
const messageOf$
|
|
14215
|
+
const messageOf$5 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
13760
14216
|
const nameFromFile = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
|
|
13761
14217
|
function NameDialog({ t, submit, onClose }) {
|
|
13762
14218
|
const formId = (0, react.useId)();
|
|
@@ -13771,7 +14227,7 @@ window.__ModuleLoader__.load({
|
|
|
13771
14227
|
setError(void 0);
|
|
13772
14228
|
submit(name, title.trim(), description.trim()).then(onClose, (failure) => {
|
|
13773
14229
|
setBusy(false);
|
|
13774
|
-
setError(messageOf$
|
|
14230
|
+
setError(messageOf$5(failure));
|
|
13775
14231
|
});
|
|
13776
14232
|
};
|
|
13777
14233
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -13864,7 +14320,7 @@ window.__ModuleLoader__.load({
|
|
|
13864
14320
|
setError(void 0);
|
|
13865
14321
|
remove(preset.name).then(onClose, (failure) => {
|
|
13866
14322
|
setBusy(false);
|
|
13867
|
-
setError(messageOf$
|
|
14323
|
+
setError(messageOf$5(failure));
|
|
13868
14324
|
});
|
|
13869
14325
|
};
|
|
13870
14326
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -13908,7 +14364,7 @@ window.__ModuleLoader__.load({
|
|
|
13908
14364
|
const open = (name) => {
|
|
13909
14365
|
setNotice(void 0);
|
|
13910
14366
|
author(name).catch((failure) => {
|
|
13911
|
-
setNotice(t("authorFailed", { message: messageOf$
|
|
14367
|
+
setNotice(t("authorFailed", { message: messageOf$5(failure) }));
|
|
13912
14368
|
});
|
|
13913
14369
|
};
|
|
13914
14370
|
const choose = (file) => {
|
|
@@ -13921,7 +14377,7 @@ window.__ModuleLoader__.load({
|
|
|
13921
14377
|
setStaged(preview);
|
|
13922
14378
|
}, (failure) => {
|
|
13923
14379
|
setStaging(false);
|
|
13924
|
-
setNotice(t("importFailed", { message: messageOf$
|
|
14380
|
+
setNotice(t("importFailed", { message: messageOf$5(failure) }));
|
|
13925
14381
|
});
|
|
13926
14382
|
};
|
|
13927
14383
|
if (editing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PresetEditor, {
|
|
@@ -14132,7 +14588,7 @@ window.__ModuleLoader__.load({
|
|
|
14132
14588
|
]
|
|
14133
14589
|
});
|
|
14134
14590
|
}
|
|
14135
|
-
const dictionaries$
|
|
14591
|
+
const dictionaries$13 = withDictionaries(withDictionaries({
|
|
14136
14592
|
en: {
|
|
14137
14593
|
nav: "Presets",
|
|
14138
14594
|
language: "en",
|
|
@@ -14257,9 +14713,9 @@ window.__ModuleLoader__.load({
|
|
|
14257
14713
|
"prompt_roleplay/style": "叙述文风",
|
|
14258
14714
|
"prompt_roleplay/character-style": "角色风格"
|
|
14259
14715
|
}
|
|
14260
|
-
}, dictionaries$
|
|
14716
|
+
}, dictionaries$23), dictionaries$25);
|
|
14261
14717
|
// src/client/pages/presets/presets-controller.ts
|
|
14262
|
-
const messageOf$
|
|
14718
|
+
const messageOf$4 = (error) => error instanceof Error ? error.message : String(error);
|
|
14263
14719
|
/** Reads the preset library from the host and makes, removes and opens its presets. */
|
|
14264
14720
|
var PresetsController = class {
|
|
14265
14721
|
openChat;
|
|
@@ -14297,23 +14753,638 @@ window.__ModuleLoader__.load({
|
|
|
14297
14753
|
await importVerbatimPreset(choice, { name }, this.abort.signal);
|
|
14298
14754
|
await this.read(true);
|
|
14299
14755
|
},
|
|
14300
|
-
importStaged: async (choice, name) => {
|
|
14301
|
-
const opened = await importStagedPreset(choice, {
|
|
14302
|
-
name,
|
|
14303
|
-
language: this.language()
|
|
14304
|
-
}, this.abort.signal);
|
|
14305
|
-
await this.read(true);
|
|
14306
|
-
this.openChat(opened.chatSessionId);
|
|
14307
|
-
return {
|
|
14308
|
-
started: opened.started,
|
|
14309
|
-
...opened.failure === void 0 ? {} : { failure: opened.failure }
|
|
14310
|
-
};
|
|
14756
|
+
importStaged: async (choice, name) => {
|
|
14757
|
+
const opened = await importStagedPreset(choice, {
|
|
14758
|
+
name,
|
|
14759
|
+
language: this.language()
|
|
14760
|
+
}, this.abort.signal);
|
|
14761
|
+
await this.read(true);
|
|
14762
|
+
this.openChat(opened.chatSessionId);
|
|
14763
|
+
return {
|
|
14764
|
+
started: opened.started,
|
|
14765
|
+
...opened.failure === void 0 ? {} : { failure: opened.failure }
|
|
14766
|
+
};
|
|
14767
|
+
}
|
|
14768
|
+
};
|
|
14769
|
+
constructor(openChat, language) {
|
|
14770
|
+
this.openChat = openChat;
|
|
14771
|
+
this.language = language;
|
|
14772
|
+
}
|
|
14773
|
+
inject() {
|
|
14774
|
+
return this.face;
|
|
14775
|
+
}
|
|
14776
|
+
dispose() {
|
|
14777
|
+
this.abort.abort();
|
|
14778
|
+
}
|
|
14779
|
+
async read(refreshing) {
|
|
14780
|
+
this.store.update((draft) => {
|
|
14781
|
+
if (refreshing) draft.refreshing = true;
|
|
14782
|
+
else draft.status = "loading";
|
|
14783
|
+
});
|
|
14784
|
+
try {
|
|
14785
|
+
const presets = await listPresets(this.abort.signal);
|
|
14786
|
+
this.store.update((draft) => {
|
|
14787
|
+
draft.status = "ready";
|
|
14788
|
+
draft.presets = presets;
|
|
14789
|
+
delete draft.error;
|
|
14790
|
+
});
|
|
14791
|
+
} catch (error) {
|
|
14792
|
+
if (this.abort.signal.aborted) return;
|
|
14793
|
+
this.store.update((draft) => {
|
|
14794
|
+
draft.error = messageOf$4(error);
|
|
14795
|
+
if (draft.presets === void 0) draft.status = "failed";
|
|
14796
|
+
});
|
|
14797
|
+
} finally {
|
|
14798
|
+
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
14799
|
+
draft.refreshing = false;
|
|
14800
|
+
});
|
|
14801
|
+
}
|
|
14802
|
+
}
|
|
14803
|
+
};
|
|
14804
|
+
// src/client/pages/presets/index.ts
|
|
14805
|
+
const NAMESPACE$13 = "roleplay.presets";
|
|
14806
|
+
/** Adds the Presets page to the Role Play panel: reusable writing instructions for stories. */
|
|
14807
|
+
function registerPresetsPage(ctx) {
|
|
14808
|
+
const t = ctx.locale.bind(NAMESPACE$13);
|
|
14809
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$13, dictionaries$13), "roleplay: presets dictionaries");
|
|
14810
|
+
const presets = new PresetsController(createChatOpener(ctx), () => t("language"));
|
|
14811
|
+
ctx.effect(() => () => {
|
|
14812
|
+
presets.dispose();
|
|
14813
|
+
}, "roleplay: presets requests");
|
|
14814
|
+
ctx.slots.inject("roleplay.page", () => ctx.slots.register({
|
|
14815
|
+
name: "roleplay.page",
|
|
14816
|
+
id: "presets",
|
|
14817
|
+
order: 7,
|
|
14818
|
+
label: () => t("nav"),
|
|
14819
|
+
locale: NAMESPACE$13,
|
|
14820
|
+
inject: () => presets.inject()
|
|
14821
|
+
}, PresetsPage));
|
|
14822
|
+
}
|
|
14823
|
+
// src/client/prompts-api.ts
|
|
14824
|
+
async function reply$2(response) {
|
|
14825
|
+
if (!response.ok) {
|
|
14826
|
+
const body = await response.json().catch(() => void 0);
|
|
14827
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
14828
|
+
}
|
|
14829
|
+
return await response.json();
|
|
14830
|
+
}
|
|
14831
|
+
const address$1 = (id, language, suffix = "") => `${API_PREFIX}/prompts/item${suffix}?id=${encodeURIComponent(id)}&language=${encodeURIComponent(language)}`;
|
|
14832
|
+
async function listPrompts(signal) {
|
|
14833
|
+
return await reply$2(await fetch(`${API_PREFIX}/prompts`, {
|
|
14834
|
+
credentials: "same-origin",
|
|
14835
|
+
signal
|
|
14836
|
+
}));
|
|
14837
|
+
}
|
|
14838
|
+
async function readPrompt(id, language, signal) {
|
|
14839
|
+
return await reply$2(await fetch(address$1(id, language), {
|
|
14840
|
+
credentials: "same-origin",
|
|
14841
|
+
signal
|
|
14842
|
+
}));
|
|
14843
|
+
}
|
|
14844
|
+
async function savePrompt(id, language, text, signal) {
|
|
14845
|
+
return await reply$2(await fetch(address$1(id, language), {
|
|
14846
|
+
method: "PUT",
|
|
14847
|
+
credentials: "same-origin",
|
|
14848
|
+
headers: { "content-type": "application/json" },
|
|
14849
|
+
body: JSON.stringify({ text }),
|
|
14850
|
+
signal
|
|
14851
|
+
}));
|
|
14852
|
+
}
|
|
14853
|
+
/** Replaces the file with the shipped text; the host keeps the old file in the trash. */
|
|
14854
|
+
async function resetPrompt(id, language, signal) {
|
|
14855
|
+
return await reply$2(await fetch(address$1(id, language, "/reset"), {
|
|
14856
|
+
method: "POST",
|
|
14857
|
+
credentials: "same-origin",
|
|
14858
|
+
signal
|
|
14859
|
+
}));
|
|
14860
|
+
}
|
|
14861
|
+
// src/client/pages/prompts/prompt-diff.ts
|
|
14862
|
+
const linesOf = (text) => text.replace(/\r\n/g, "\n").trimEnd().split("\n");
|
|
14863
|
+
/** A plain comparison by whole lines, enough to see what a shipped text says that an edited one does not; blank lines never count. */
|
|
14864
|
+
function compareLines(shipped, current) {
|
|
14865
|
+
const mine = new Set(linesOf(current).map((line) => line.trim()).filter((line) => line !== ""));
|
|
14866
|
+
const theirs = new Set(linesOf(shipped).map((line) => line.trim()).filter((line) => line !== ""));
|
|
14867
|
+
return {
|
|
14868
|
+
shipped: linesOf(shipped).map((text) => ({
|
|
14869
|
+
text,
|
|
14870
|
+
missing: text.trim() !== "" && !mine.has(text.trim())
|
|
14871
|
+
})),
|
|
14872
|
+
extra: linesOf(current).filter((line) => line.trim() !== "" && !theirs.has(line.trim())).length
|
|
14873
|
+
};
|
|
14874
|
+
}
|
|
14875
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/prompts/PromptsPage.module.css.mjs
|
|
14876
|
+
const css$24 = ".rp_DLg_5G_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_DLg_5G_toolbar{flex-wrap:wrap;flex:none;align-items:center;gap:12px;min-height:28px;display:flex}.rp_DLg_5G_toolbar select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);max-width:100%;min-height:30px;color:var(--dsw-alias-label-primary);font:inherit;font-size:12px}.rp_DLg_5G_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_DLg_5G_spacer{flex:auto}.rp_DLg_5G_check{color:var(--dsw-alias-label-secondary);align-items:center;gap:6px;font-size:12px;display:inline-flex}.rp_DLg_5G_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}.rp_DLg_5G_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_DLg_5G_group{color:var(--dsw-alias-label-tertiary);margin:12px 0 4px;font-size:12px;font-weight:500}.rp_DLg_5G_list{margin:0;padding:0;list-style:none}.rp_DLg_5G_row{border:none;border-bottom:.5px solid var(--dsw-alias-border-l3);width:100%;font:inherit;text-align:left;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;align-items:center;gap:8px;padding:6px 4px;font-size:13px;display:flex}.rp_DLg_5G_row:hover{color:var(--dsw-alias-state-business-primary)}.rp_DLg_5G_row:focus-visible{border-radius:var(--dsw-radius-sm);outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px;position:relative}.rp_DLg_5G_rowName{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.rp_DLg_5G_rowLanguage{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_DLg_5G_sign{text-align:center;min-width:14px;color:var(--dsw-alias-state-business-primary);font-size:13px;font-weight:500}.rp_DLg_5G_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_DLg_5G_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_DLg_5G_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_DLg_5G_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_DLg_5G_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_DLg_5G_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_DLg_5G_editBody{flex-direction:column;flex:1 1 0;gap:12px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_DLg_5G_panes{grid-template-columns:1fr 1fr;align-items:start;gap:16px;display:grid}.rp_DLg_5G_pane{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_DLg_5G_label{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:500}.rp_DLg_5G_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:clamp(260px,52vh,560px);font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_DLg_5G_area:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.rp_DLg_5G_shipped{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);min-height:clamp(260px,52vh,560px);font:13px/20px var(--dsw-font-mono,monospace);white-space:pre-wrap;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary);margin:0;padding:8px;overflow-x:auto}.rp_DLg_5G_line{min-height:20px;display:block}.rp_DLg_5G_missing{background:var(--dsw-alias-state-business-bg,#648cff24);color:var(--dsw-alias-label-primary)}.rp_DLg_5G_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}@media (width<=900px){.rp_DLg_5G_panes{grid-template-columns:1fr}.rp_DLg_5G_editBody{padding:16px}}@media (width<=520px){.rp_DLg_5G_toolbar{align-items:stretch}.rp_DLg_5G_toolbar select{flex:140px}.rp_DLg_5G_spacer{display:none}.rp_DLg_5G_editHeader{flex-wrap:wrap;padding-inline:12px}.rp_DLg_5G_editTitle{overflow-wrap:anywhere}}";
|
|
14877
|
+
const key$24 = "src/client/pages/prompts/PromptsPage.module.css";
|
|
14878
|
+
let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
|
|
14879
|
+
if (tag$24 === null) {
|
|
14880
|
+
tag$24 = document.createElement("style");
|
|
14881
|
+
tag$24.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14882
|
+
tag$24.dataset.pluginCss = key$24;
|
|
14883
|
+
document.head.appendChild(tag$24);
|
|
14884
|
+
}
|
|
14885
|
+
tag$24.textContent = css$24;
|
|
14886
|
+
var PromptsPage_module_css_default = {
|
|
14887
|
+
"label": "rp_DLg_5G_label",
|
|
14888
|
+
"missing": "rp_DLg_5G_missing",
|
|
14889
|
+
"page": "rp_DLg_5G_page",
|
|
14890
|
+
"toolbar": "rp_DLg_5G_toolbar",
|
|
14891
|
+
"message": "rp_DLg_5G_message",
|
|
14892
|
+
"rowName": "rp_DLg_5G_rowName",
|
|
14893
|
+
"check": "rp_DLg_5G_check",
|
|
14894
|
+
"error": "rp_DLg_5G_error",
|
|
14895
|
+
"ok": "rp_DLg_5G_ok",
|
|
14896
|
+
"panes": "rp_DLg_5G_panes",
|
|
14897
|
+
"actions": "rp_DLg_5G_actions",
|
|
14898
|
+
"editBody": "rp_DLg_5G_editBody",
|
|
14899
|
+
"viewport": "rp_DLg_5G_viewport",
|
|
14900
|
+
"editHeader": "rp_DLg_5G_editHeader",
|
|
14901
|
+
"line": "rp_DLg_5G_line",
|
|
14902
|
+
"pane": "rp_DLg_5G_pane",
|
|
14903
|
+
"spacer": "rp_DLg_5G_spacer",
|
|
14904
|
+
"area": "rp_DLg_5G_area",
|
|
14905
|
+
"count": "rp_DLg_5G_count",
|
|
14906
|
+
"row": "rp_DLg_5G_row",
|
|
14907
|
+
"help": "rp_DLg_5G_help",
|
|
14908
|
+
"list": "rp_DLg_5G_list",
|
|
14909
|
+
"rowLanguage": "rp_DLg_5G_rowLanguage",
|
|
14910
|
+
"warning": "rp_DLg_5G_warning",
|
|
14911
|
+
"editTitle": "rp_DLg_5G_editTitle",
|
|
14912
|
+
"shipped": "rp_DLg_5G_shipped",
|
|
14913
|
+
"group": "rp_DLg_5G_group",
|
|
14914
|
+
"sign": "rp_DLg_5G_sign"
|
|
14915
|
+
};
|
|
14916
|
+
// src/client/pages/prompts/PromptEditor.tsx
|
|
14917
|
+
const messageOf$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
14918
|
+
const PROSE = [
|
|
14919
|
+
"roleplay/persona",
|
|
14920
|
+
"roleplay/style",
|
|
14921
|
+
"roleplay/character-style"
|
|
14922
|
+
];
|
|
14923
|
+
const same = (a, b) => a.replace(/\r\n/g, "\n").trimEnd() === b.replace(/\r\n/g, "\n").trimEnd();
|
|
14924
|
+
/** One prompt: the person's file beside the text this version ships, which can be read to bring something new into the file, or replace it after a confirmation. */
|
|
14925
|
+
function PromptEditor({ t, id, language, onBack }) {
|
|
14926
|
+
const [loaded, setLoaded] = (0, react.useState)();
|
|
14927
|
+
const [failure, setFailure] = (0, react.useState)();
|
|
14928
|
+
const [text, setText] = (0, react.useState)("");
|
|
14929
|
+
const [status, setStatus] = (0, react.useState)({ state: "idle" });
|
|
14930
|
+
const [confirming, setConfirming] = (0, react.useState)(false);
|
|
14931
|
+
const accept = (detail) => {
|
|
14932
|
+
setLoaded(detail);
|
|
14933
|
+
setText(detail.current);
|
|
14934
|
+
};
|
|
14935
|
+
(0, react.useEffect)(() => {
|
|
14936
|
+
const abort = new AbortController();
|
|
14937
|
+
readPrompt(id, language, abort.signal).then(accept, (problem) => {
|
|
14938
|
+
if (!abort.signal.aborted) setFailure(messageOf$3(problem));
|
|
14939
|
+
});
|
|
14940
|
+
return () => {
|
|
14941
|
+
abort.abort();
|
|
14942
|
+
};
|
|
14943
|
+
}, [id, language]);
|
|
14944
|
+
const comparison = (0, react.useMemo)(() => loaded === void 0 ? void 0 : compareLines(loaded.shipped, text), [loaded, text]);
|
|
14945
|
+
if (loaded === void 0 || comparison === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14946
|
+
className: PromptsPage_module_css_default.message,
|
|
14947
|
+
role: failure === void 0 ? void 0 : "alert",
|
|
14948
|
+
children: failure === void 0 ? t("loading") : t("loadFailed", { message: failure })
|
|
14949
|
+
});
|
|
14950
|
+
const dirty = !same(text, loaded.current);
|
|
14951
|
+
const identical = same(text, loaded.shipped);
|
|
14952
|
+
const save = () => {
|
|
14953
|
+
setStatus({ state: "saving" });
|
|
14954
|
+
savePrompt(id, language, text, new AbortController().signal).then(() => {
|
|
14955
|
+
setLoaded({
|
|
14956
|
+
...loaded,
|
|
14957
|
+
current: text,
|
|
14958
|
+
state: identical ? "default" : "different"
|
|
14959
|
+
});
|
|
14960
|
+
setStatus({ state: "saved" });
|
|
14961
|
+
}, (problem) => {
|
|
14962
|
+
setStatus({
|
|
14963
|
+
state: "failed",
|
|
14964
|
+
message: messageOf$3(problem)
|
|
14965
|
+
});
|
|
14966
|
+
});
|
|
14967
|
+
};
|
|
14968
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14969
|
+
className: PromptsPage_module_css_default.page,
|
|
14970
|
+
"data-testid": "roleplay-prompt-editor",
|
|
14971
|
+
children: [
|
|
14972
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14973
|
+
className: PromptsPage_module_css_default.editHeader,
|
|
14974
|
+
children: [
|
|
14975
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
14976
|
+
variant: "ghost",
|
|
14977
|
+
size: "sm",
|
|
14978
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, {}),
|
|
14979
|
+
onClick: onBack,
|
|
14980
|
+
children: t("back")
|
|
14981
|
+
}),
|
|
14982
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
14983
|
+
className: PromptsPage_module_css_default.editTitle,
|
|
14984
|
+
children: [
|
|
14985
|
+
id,
|
|
14986
|
+
" · ",
|
|
14987
|
+
language,
|
|
14988
|
+
loaded.state === "different" ? ` ${t("different")}` : ""
|
|
14989
|
+
]
|
|
14990
|
+
}),
|
|
14991
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
14992
|
+
className: PromptsPage_module_css_default.warning,
|
|
14993
|
+
children: t("unsaved")
|
|
14994
|
+
})
|
|
14995
|
+
]
|
|
14996
|
+
}),
|
|
14997
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14998
|
+
className: PromptsPage_module_css_default.editBody,
|
|
14999
|
+
children: [
|
|
15000
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15001
|
+
className: PromptsPage_module_css_default.help,
|
|
15002
|
+
children: loaded.variables.length === 0 ? t("noVariables") : t("variables", { list: loaded.variables.map((name) => `\${${name}}`).join(", ") })
|
|
15003
|
+
}),
|
|
15004
|
+
!PROSE.includes(id) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15005
|
+
className: PromptsPage_module_css_default.warning,
|
|
15006
|
+
role: "note",
|
|
15007
|
+
children: t("rulesWarning")
|
|
15008
|
+
}),
|
|
15009
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15010
|
+
className: PromptsPage_module_css_default.help,
|
|
15011
|
+
children: identical ? t("sameAsShipped") : t("comparison", {
|
|
15012
|
+
missing: comparison.shipped.filter((line) => line.missing).length,
|
|
15013
|
+
extra: comparison.extra
|
|
15014
|
+
})
|
|
15015
|
+
}),
|
|
15016
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15017
|
+
className: PromptsPage_module_css_default.panes,
|
|
15018
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15019
|
+
className: PromptsPage_module_css_default.pane,
|
|
15020
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15021
|
+
className: PromptsPage_module_css_default.label,
|
|
15022
|
+
children: t("yours")
|
|
15023
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
15024
|
+
className: PromptsPage_module_css_default.area,
|
|
15025
|
+
value: text,
|
|
15026
|
+
"aria-label": t("yours"),
|
|
15027
|
+
"data-testid": "roleplay-prompt-text",
|
|
15028
|
+
onChange: (event) => {
|
|
15029
|
+
setText(event.target.value);
|
|
15030
|
+
setStatus({ state: "idle" });
|
|
15031
|
+
}
|
|
15032
|
+
})]
|
|
15033
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15034
|
+
className: PromptsPage_module_css_default.pane,
|
|
15035
|
+
children: [
|
|
15036
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15037
|
+
className: PromptsPage_module_css_default.label,
|
|
15038
|
+
children: t("shippedText")
|
|
15039
|
+
}),
|
|
15040
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
15041
|
+
className: PromptsPage_module_css_default.shipped,
|
|
15042
|
+
"aria-label": t("shippedText"),
|
|
15043
|
+
"data-testid": "roleplay-prompt-shipped",
|
|
15044
|
+
children: comparison.shipped.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15045
|
+
className: line.missing ? `${PromptsPage_module_css_default.line} ${PromptsPage_module_css_default.missing}` : PromptsPage_module_css_default.line,
|
|
15046
|
+
children: line.text
|
|
15047
|
+
}, index))
|
|
15048
|
+
}),
|
|
15049
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15050
|
+
className: PromptsPage_module_css_default.help,
|
|
15051
|
+
children: t("shippedHelp")
|
|
15052
|
+
})
|
|
15053
|
+
]
|
|
15054
|
+
})]
|
|
15055
|
+
}),
|
|
15056
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15057
|
+
className: PromptsPage_module_css_default.actions,
|
|
15058
|
+
children: [
|
|
15059
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15060
|
+
variant: "primary",
|
|
15061
|
+
size: "sm",
|
|
15062
|
+
disabled: !dirty || status.state === "saving" || text.trim() === "",
|
|
15063
|
+
onClick: save,
|
|
15064
|
+
children: status.state === "saving" ? t("saving") : t("save")
|
|
15065
|
+
}),
|
|
15066
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15067
|
+
variant: "ghost",
|
|
15068
|
+
size: "sm",
|
|
15069
|
+
disabled: !dirty,
|
|
15070
|
+
onClick: () => {
|
|
15071
|
+
setText(loaded.current);
|
|
15072
|
+
setStatus({ state: "idle" });
|
|
15073
|
+
},
|
|
15074
|
+
children: t("undo")
|
|
15075
|
+
}),
|
|
15076
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15077
|
+
variant: "outline",
|
|
15078
|
+
size: "sm",
|
|
15079
|
+
disabled: same(loaded.current, loaded.shipped),
|
|
15080
|
+
onClick: () => {
|
|
15081
|
+
setConfirming(true);
|
|
15082
|
+
},
|
|
15083
|
+
children: t("replace")
|
|
15084
|
+
}),
|
|
15085
|
+
status.state === "saved" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15086
|
+
className: PromptsPage_module_css_default.ok,
|
|
15087
|
+
role: "status",
|
|
15088
|
+
children: t("saved")
|
|
15089
|
+
}),
|
|
15090
|
+
status.state === "failed" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15091
|
+
className: PromptsPage_module_css_default.error,
|
|
15092
|
+
role: "alert",
|
|
15093
|
+
children: t("saveFailed", { message: status.message ?? "" })
|
|
15094
|
+
})
|
|
15095
|
+
]
|
|
15096
|
+
})
|
|
15097
|
+
]
|
|
15098
|
+
}),
|
|
15099
|
+
confirming && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReplaceDialog, {
|
|
15100
|
+
t,
|
|
15101
|
+
id,
|
|
15102
|
+
language,
|
|
15103
|
+
onClose: () => {
|
|
15104
|
+
setConfirming(false);
|
|
15105
|
+
},
|
|
15106
|
+
onReplaced: () => {
|
|
15107
|
+
setConfirming(false);
|
|
15108
|
+
setLoaded({
|
|
15109
|
+
...loaded,
|
|
15110
|
+
current: loaded.shipped,
|
|
15111
|
+
state: "default"
|
|
15112
|
+
});
|
|
15113
|
+
setText(loaded.shipped);
|
|
15114
|
+
setStatus({ state: "idle" });
|
|
15115
|
+
}
|
|
15116
|
+
})
|
|
15117
|
+
]
|
|
15118
|
+
});
|
|
15119
|
+
}
|
|
15120
|
+
function ReplaceDialog({ t, id, language, onClose, onReplaced }) {
|
|
15121
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
15122
|
+
const [error, setError] = (0, react.useState)();
|
|
15123
|
+
const confirm = () => {
|
|
15124
|
+
setBusy(true);
|
|
15125
|
+
setError(void 0);
|
|
15126
|
+
resetPrompt(id, language, new AbortController().signal).then(onReplaced, (problem) => {
|
|
15127
|
+
setBusy(false);
|
|
15128
|
+
setError(messageOf$3(problem));
|
|
15129
|
+
});
|
|
15130
|
+
};
|
|
15131
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
15132
|
+
open: true,
|
|
15133
|
+
onClose,
|
|
15134
|
+
title: t("replaceTitle"),
|
|
15135
|
+
description: t("replaceHelp", {
|
|
15136
|
+
name: id,
|
|
15137
|
+
language
|
|
15138
|
+
}),
|
|
15139
|
+
closeLabel: t("close"),
|
|
15140
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15141
|
+
variant: "ghost",
|
|
15142
|
+
disabled: busy,
|
|
15143
|
+
onClick: onClose,
|
|
15144
|
+
children: t("cancel")
|
|
15145
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15146
|
+
variant: "primary",
|
|
15147
|
+
disabled: busy,
|
|
15148
|
+
"data-testid": "roleplay-prompt-replace",
|
|
15149
|
+
onClick: confirm,
|
|
15150
|
+
children: busy ? t("replacing") : t("replace")
|
|
15151
|
+
})] }),
|
|
15152
|
+
children: error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15153
|
+
className: PromptsPage_module_css_default.error,
|
|
15154
|
+
role: "alert",
|
|
15155
|
+
children: t("replaceFailed", { message: error })
|
|
15156
|
+
})
|
|
15157
|
+
});
|
|
15158
|
+
}
|
|
15159
|
+
// src/client/pages/prompts/PromptsPage.tsx
|
|
15160
|
+
const groupOf = (id) => id.includes("/") ? id.slice(0, id.indexOf("/")) : "";
|
|
15161
|
+
const nameOf = (id) => id.includes("/") ? id.slice(id.indexOf("/") + 1) : id;
|
|
15162
|
+
/** The prompts of the roleplay root: the instructions the models are given, with a sign on the ones that differ from what this version ships. */
|
|
15163
|
+
function PromptsPage({ t, usePrompts, load, refresh }) {
|
|
15164
|
+
const state = usePrompts((snapshot) => snapshot);
|
|
15165
|
+
const [editing, setEditing] = (0, react.useState)();
|
|
15166
|
+
const [onlyDifferent, setOnlyDifferent] = (0, react.useState)(false);
|
|
15167
|
+
const [language, setLanguage] = (0, react.useState)("");
|
|
15168
|
+
(0, react.useEffect)(() => {
|
|
15169
|
+
load();
|
|
15170
|
+
}, [load]);
|
|
15171
|
+
if (editing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromptEditor, {
|
|
15172
|
+
t,
|
|
15173
|
+
id: editing.id,
|
|
15174
|
+
language: editing.language,
|
|
15175
|
+
onBack: () => {
|
|
15176
|
+
setEditing(void 0);
|
|
15177
|
+
refresh();
|
|
15178
|
+
}
|
|
15179
|
+
});
|
|
15180
|
+
const entries = state.entries ?? [];
|
|
15181
|
+
const languages = [...new Set(entries.map((entry) => entry.language))].sort((a, b) => a.localeCompare(b));
|
|
15182
|
+
const shown = entries.filter((entry) => (language === "" || entry.language === language) && (!onlyDifferent || entry.state === "different"));
|
|
15183
|
+
const groups = [...new Set(shown.map((entry) => groupOf(entry.id)))];
|
|
15184
|
+
const failedWithoutData = state.status === "failed" && state.entries === void 0;
|
|
15185
|
+
const row = (entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
15186
|
+
type: "button",
|
|
15187
|
+
className: PromptsPage_module_css_default.row,
|
|
15188
|
+
"data-testid": "roleplay-prompt-row",
|
|
15189
|
+
onClick: () => {
|
|
15190
|
+
setEditing({
|
|
15191
|
+
id: entry.id,
|
|
15192
|
+
language: entry.language
|
|
15193
|
+
});
|
|
15194
|
+
},
|
|
15195
|
+
children: [
|
|
15196
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15197
|
+
className: PromptsPage_module_css_default.rowName,
|
|
15198
|
+
children: nameOf(entry.id)
|
|
15199
|
+
}),
|
|
15200
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15201
|
+
className: PromptsPage_module_css_default.rowLanguage,
|
|
15202
|
+
children: entry.language
|
|
15203
|
+
}),
|
|
15204
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15205
|
+
className: PromptsPage_module_css_default.sign,
|
|
15206
|
+
title: entry.state === "different" ? t("differentHint") : void 0,
|
|
15207
|
+
"aria-label": entry.state === "different" ? t("differentHint") : void 0,
|
|
15208
|
+
children: entry.state === "different" ? t("different") : ""
|
|
15209
|
+
})
|
|
15210
|
+
]
|
|
15211
|
+
}) }, `${entry.language}/${entry.id}`);
|
|
15212
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15213
|
+
className: PromptsPage_module_css_default.page,
|
|
15214
|
+
"data-testid": "roleplay-prompts-page",
|
|
15215
|
+
children: [
|
|
15216
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15217
|
+
className: PromptsPage_module_css_default.toolbar,
|
|
15218
|
+
children: [
|
|
15219
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15220
|
+
className: PromptsPage_module_css_default.count,
|
|
15221
|
+
children: state.entries === void 0 ? "" : t(shown.length === 1 ? "countOne" : "countOther", { count: shown.length })
|
|
15222
|
+
}),
|
|
15223
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
15224
|
+
"aria-label": t("language"),
|
|
15225
|
+
value: language,
|
|
15226
|
+
onChange: (event) => {
|
|
15227
|
+
setLanguage(event.target.value);
|
|
15228
|
+
},
|
|
15229
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
15230
|
+
value: "",
|
|
15231
|
+
children: t("allLanguages")
|
|
15232
|
+
}), languages.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
15233
|
+
value: entry,
|
|
15234
|
+
children: entry
|
|
15235
|
+
}, entry))]
|
|
15236
|
+
}),
|
|
15237
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
15238
|
+
className: PromptsPage_module_css_default.check,
|
|
15239
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
15240
|
+
type: "checkbox",
|
|
15241
|
+
checked: onlyDifferent,
|
|
15242
|
+
onChange: (event) => {
|
|
15243
|
+
setOnlyDifferent(event.target.checked);
|
|
15244
|
+
}
|
|
15245
|
+
}), t("differentOnly")]
|
|
15246
|
+
}),
|
|
15247
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: PromptsPage_module_css_default.spacer }),
|
|
15248
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15249
|
+
variant: "outline",
|
|
15250
|
+
size: "sm",
|
|
15251
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}),
|
|
15252
|
+
disabled: state.refreshing || state.status === "loading",
|
|
15253
|
+
"aria-busy": state.refreshing,
|
|
15254
|
+
onClick: refresh,
|
|
15255
|
+
children: state.refreshing ? t("refreshing") : t("refresh")
|
|
15256
|
+
})
|
|
15257
|
+
]
|
|
15258
|
+
}),
|
|
15259
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15260
|
+
className: PromptsPage_module_css_default.help,
|
|
15261
|
+
children: t("help")
|
|
15262
|
+
}),
|
|
15263
|
+
state.error !== void 0 && !failedWithoutData && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15264
|
+
className: PromptsPage_module_css_default.error,
|
|
15265
|
+
role: "alert",
|
|
15266
|
+
children: t("loadFailed", { message: state.error })
|
|
15267
|
+
}),
|
|
15268
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15269
|
+
className: PromptsPage_module_css_default.viewport,
|
|
15270
|
+
children: state.status === "idle" || state.status === "loading" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15271
|
+
className: PromptsPage_module_css_default.message,
|
|
15272
|
+
children: t("loading")
|
|
15273
|
+
}) : failedWithoutData ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15274
|
+
className: PromptsPage_module_css_default.error,
|
|
15275
|
+
role: "alert",
|
|
15276
|
+
children: t("loadFailed", { message: state.error ?? "" })
|
|
15277
|
+
}) : shown.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15278
|
+
className: PromptsPage_module_css_default.message,
|
|
15279
|
+
children: t("empty")
|
|
15280
|
+
}) : groups.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
15281
|
+
className: PromptsPage_module_css_default.group,
|
|
15282
|
+
children: group
|
|
15283
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
15284
|
+
className: PromptsPage_module_css_default.list,
|
|
15285
|
+
children: shown.filter((entry) => groupOf(entry.id) === group).map(row)
|
|
15286
|
+
})] }, group))
|
|
15287
|
+
})
|
|
15288
|
+
]
|
|
15289
|
+
});
|
|
15290
|
+
}
|
|
15291
|
+
// src/client/pages/prompts/locales.ts
|
|
15292
|
+
const dictionaries$12 = {
|
|
15293
|
+
en: {
|
|
15294
|
+
nav: "Prompts",
|
|
15295
|
+
loading: "Loading…",
|
|
15296
|
+
loadFailed: "Could not load the prompts: {message}",
|
|
15297
|
+
refresh: "Refresh",
|
|
15298
|
+
refreshing: "Refreshing…",
|
|
15299
|
+
back: "Back",
|
|
15300
|
+
cancel: "Cancel",
|
|
15301
|
+
close: "Close",
|
|
15302
|
+
empty: "No prompts match.",
|
|
15303
|
+
countOne: "1 prompt",
|
|
15304
|
+
countOther: "{count} prompts",
|
|
15305
|
+
help: "The instructions the models are given. The files are in your roleplay root and are never replaced by an update. A prompt marked with ≠ differs from the one this version ships: you may have edited it, or the shipped text may have changed since it was copied.",
|
|
15306
|
+
differentOnly: "Only those that differ",
|
|
15307
|
+
allLanguages: "All languages",
|
|
15308
|
+
language: "Language",
|
|
15309
|
+
different: "≠",
|
|
15310
|
+
differentHint: "Differs from the shipped text: edited by you, or the shipped text has changed since.",
|
|
15311
|
+
yours: "Your file",
|
|
15312
|
+
shippedText: "Shipped with this version",
|
|
15313
|
+
shippedHelp: "Lines the shipped text has that yours does not are highlighted. Read it to bring a new rule into your own text, or replace your file with it.",
|
|
15314
|
+
variables: "It is given {list}. Use only these.",
|
|
15315
|
+
noVariables: "It is given no variables.",
|
|
15316
|
+
save: "Save",
|
|
15317
|
+
saving: "Saving…",
|
|
15318
|
+
saved: "Saved. It applies from the next request.",
|
|
15319
|
+
saveFailed: "Could not save: {message}",
|
|
15320
|
+
undo: "Discard my changes",
|
|
15321
|
+
replace: "Replace with the shipped text",
|
|
15322
|
+
replaceTitle: "Replace your file?",
|
|
15323
|
+
replaceHelp: "Your file {name} ({language}) is replaced by the text this version ships. Your current file is kept in the trash folder of your roleplay root.",
|
|
15324
|
+
replacing: "Replacing…",
|
|
15325
|
+
replaceFailed: "Could not replace it: {message}",
|
|
15326
|
+
sameAsShipped: "Your file is the same as the shipped text.",
|
|
15327
|
+
comparison: "{missing} shipped line(s) are not in your text; {extra} line(s) of yours are not in the shipped one.",
|
|
15328
|
+
rulesWarning: "This prompt carries rules of how the story is run. A change affects every story that uses the root prompts.",
|
|
15329
|
+
unsaved: "Unsaved changes"
|
|
15330
|
+
},
|
|
15331
|
+
zh: {
|
|
15332
|
+
nav: "提示词",
|
|
15333
|
+
loading: "正在加载…",
|
|
15334
|
+
loadFailed: "无法加载提示词:{message}",
|
|
15335
|
+
refresh: "刷新",
|
|
15336
|
+
refreshing: "正在刷新…",
|
|
15337
|
+
back: "返回",
|
|
15338
|
+
cancel: "取消",
|
|
15339
|
+
close: "关闭",
|
|
15340
|
+
empty: "没有符合的提示词。",
|
|
15341
|
+
countOne: "1 条提示词",
|
|
15342
|
+
countOther: "{count} 条提示词",
|
|
15343
|
+
help: "交给模型的指令。文件在你的角色扮演根目录中,更新不会替换它们。标有 ≠ 的提示词与本版本自带的不同:可能是你改过,也可能是自带文本在复制之后有了变化。",
|
|
15344
|
+
differentOnly: "只看不同的",
|
|
15345
|
+
allLanguages: "所有语言",
|
|
15346
|
+
language: "语言",
|
|
15347
|
+
different: "≠",
|
|
15348
|
+
differentHint: "与自带文本不同:可能是你改过,也可能是自带文本之后有了变化。",
|
|
15349
|
+
yours: "你的文件",
|
|
15350
|
+
shippedText: "本版本自带",
|
|
15351
|
+
shippedHelp: "自带文本中有、而你的文本里没有的行会高亮显示。可以对照着把新规则加进你自己的文本,也可以直接用它替换你的文件。",
|
|
15352
|
+
variables: "它会收到 {list},只能使用这些。",
|
|
15353
|
+
noVariables: "它不会收到任何变量。",
|
|
15354
|
+
save: "保存",
|
|
15355
|
+
saving: "正在保存…",
|
|
15356
|
+
saved: "已保存,从下一次请求起生效。",
|
|
15357
|
+
saveFailed: "无法保存:{message}",
|
|
15358
|
+
undo: "放弃我的修改",
|
|
15359
|
+
replace: "用自带文本替换",
|
|
15360
|
+
replaceTitle: "替换你的文件?",
|
|
15361
|
+
replaceHelp: "你的文件 {name}({language})会被本版本自带的文本替换。你当前的文件会保留在角色扮演根目录的回收文件夹中。",
|
|
15362
|
+
replacing: "正在替换…",
|
|
15363
|
+
replaceFailed: "无法替换:{message}",
|
|
15364
|
+
sameAsShipped: "你的文件与自带文本相同。",
|
|
15365
|
+
comparison: "自带文本中有 {missing} 行不在你的文本里;你的文本中有 {extra} 行不在自带文本里。",
|
|
15366
|
+
rulesWarning: "这条提示词包含故事如何运行的规则。修改会影响所有使用根目录提示词的故事。",
|
|
15367
|
+
unsaved: "有未保存的修改"
|
|
15368
|
+
}
|
|
15369
|
+
};
|
|
15370
|
+
// src/client/pages/prompts/prompts-controller.ts
|
|
15371
|
+
const messageOf$2 = (error) => error instanceof Error ? error.message : String(error);
|
|
15372
|
+
/** Reads which prompt files of the root differ from the shipped ones. */
|
|
15373
|
+
var PromptsController = class {
|
|
15374
|
+
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
15375
|
+
status: "idle",
|
|
15376
|
+
refreshing: false
|
|
15377
|
+
});
|
|
15378
|
+
abort = new AbortController();
|
|
15379
|
+
face = {
|
|
15380
|
+
hooks: { prompts: this.store },
|
|
15381
|
+
load: () => {
|
|
15382
|
+
if (this.store.getSnapshot().status === "idle") this.read(false);
|
|
15383
|
+
},
|
|
15384
|
+
refresh: () => {
|
|
15385
|
+
this.read(true);
|
|
14311
15386
|
}
|
|
14312
15387
|
};
|
|
14313
|
-
constructor(openChat, language) {
|
|
14314
|
-
this.openChat = openChat;
|
|
14315
|
-
this.language = language;
|
|
14316
|
-
}
|
|
14317
15388
|
inject() {
|
|
14318
15389
|
return this.face;
|
|
14319
15390
|
}
|
|
@@ -14326,17 +15397,17 @@ window.__ModuleLoader__.load({
|
|
|
14326
15397
|
else draft.status = "loading";
|
|
14327
15398
|
});
|
|
14328
15399
|
try {
|
|
14329
|
-
const
|
|
15400
|
+
const entries = await listPrompts(this.abort.signal);
|
|
14330
15401
|
this.store.update((draft) => {
|
|
14331
15402
|
draft.status = "ready";
|
|
14332
|
-
draft.
|
|
15403
|
+
draft.entries = entries;
|
|
14333
15404
|
delete draft.error;
|
|
14334
15405
|
});
|
|
14335
15406
|
} catch (error) {
|
|
14336
15407
|
if (this.abort.signal.aborted) return;
|
|
14337
15408
|
this.store.update((draft) => {
|
|
14338
15409
|
draft.error = messageOf$2(error);
|
|
14339
|
-
if (draft.
|
|
15410
|
+
if (draft.entries === void 0) draft.status = "failed";
|
|
14340
15411
|
});
|
|
14341
15412
|
} finally {
|
|
14342
15413
|
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
@@ -14345,24 +15416,24 @@ window.__ModuleLoader__.load({
|
|
|
14345
15416
|
}
|
|
14346
15417
|
}
|
|
14347
15418
|
};
|
|
14348
|
-
// src/client/pages/
|
|
14349
|
-
const NAMESPACE$12 = "roleplay.
|
|
14350
|
-
/** Adds the
|
|
14351
|
-
function
|
|
15419
|
+
// src/client/pages/prompts/index.ts
|
|
15420
|
+
const NAMESPACE$12 = "roleplay.prompts";
|
|
15421
|
+
/** Adds the Prompts page to the Role Play panel: the instructions the models are given, to read and edit. */
|
|
15422
|
+
function registerPromptsPage(ctx) {
|
|
14352
15423
|
const t = ctx.locale.bind(NAMESPACE$12);
|
|
14353
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$12, dictionaries$12), "roleplay:
|
|
14354
|
-
const
|
|
15424
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$12, dictionaries$12), "roleplay: prompts dictionaries");
|
|
15425
|
+
const prompts = new PromptsController();
|
|
14355
15426
|
ctx.effect(() => () => {
|
|
14356
|
-
|
|
14357
|
-
}, "roleplay:
|
|
15427
|
+
prompts.dispose();
|
|
15428
|
+
}, "roleplay: prompts requests");
|
|
14358
15429
|
ctx.slots.inject("roleplay.page", () => ctx.slots.register({
|
|
14359
15430
|
name: "roleplay.page",
|
|
14360
|
-
id: "
|
|
14361
|
-
order:
|
|
15431
|
+
id: "prompts",
|
|
15432
|
+
order: 9,
|
|
14362
15433
|
label: () => t("nav"),
|
|
14363
15434
|
locale: NAMESPACE$12,
|
|
14364
|
-
inject: () =>
|
|
14365
|
-
},
|
|
15435
|
+
inject: () => prompts.inject()
|
|
15436
|
+
}, PromptsPage));
|
|
14366
15437
|
}
|
|
14367
15438
|
/** Page by what fits on screen, but never below the minimum page. */
|
|
14368
15439
|
function pagingFor(fit) {
|
|
@@ -14394,8 +15465,8 @@ window.__ModuleLoader__.load({
|
|
|
14394
15465
|
}
|
|
14395
15466
|
tag$23.textContent = css$23;
|
|
14396
15467
|
var Pager_module_css_default = {
|
|
14397
|
-
"
|
|
14398
|
-
"
|
|
15468
|
+
"pager": "rp_KBAD0W_pager",
|
|
15469
|
+
"position": "rp_KBAD0W_position"
|
|
14399
15470
|
};
|
|
14400
15471
|
// src/client/widgets/pager/Pager.tsx
|
|
14401
15472
|
/** Previous and next buttons around the current position; the owner supplies every label. */
|
|
@@ -14464,11 +15535,11 @@ window.__ModuleLoader__.load({
|
|
|
14464
15535
|
}
|
|
14465
15536
|
tag$21.textContent = css$21;
|
|
14466
15537
|
var DeleteSessionDialog_module_css_default = {
|
|
14467
|
-
"body": "rp_FifHrW_body",
|
|
14468
|
-
"question": "rp_FifHrW_question",
|
|
14469
|
-
"warning": "rp_FifHrW_warning",
|
|
14470
15538
|
"choice": "rp_FifHrW_choice",
|
|
14471
|
-
"
|
|
15539
|
+
"warning": "rp_FifHrW_warning",
|
|
15540
|
+
"error": "rp_FifHrW_error",
|
|
15541
|
+
"body": "rp_FifHrW_body",
|
|
15542
|
+
"question": "rp_FifHrW_question"
|
|
14472
15543
|
};
|
|
14473
15544
|
// src/client/pages/sessions/DeleteSessionDialog.tsx
|
|
14474
15545
|
/** Asks for confirmation before a session and everything saved with it is removed. */
|
|
@@ -14992,28 +16063,28 @@ window.__ModuleLoader__.load({
|
|
|
14992
16063
|
}
|
|
14993
16064
|
tag$20.textContent = css$20;
|
|
14994
16065
|
var SessionsPage_module_css_default = {
|
|
16066
|
+
"timeColumn": "rp_24z4eW_timeColumn",
|
|
16067
|
+
"count": "rp_24z4eW_count",
|
|
16068
|
+
"spin": "rp_24z4eW_spin",
|
|
16069
|
+
"table": "rp_24z4eW_table",
|
|
16070
|
+
"archived": "rp_24z4eW_archived",
|
|
16071
|
+
"badge": "rp_24z4eW_badge",
|
|
16072
|
+
"page": "rp_24z4eW_page",
|
|
14995
16073
|
"fits": "rp_24z4eW_fits",
|
|
14996
|
-
"
|
|
16074
|
+
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
16075
|
+
"secondary": "rp_24z4eW_secondary",
|
|
16076
|
+
"notice": "rp_24z4eW_notice",
|
|
16077
|
+
"scrolls": "rp_24z4eW_scrolls",
|
|
14997
16078
|
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14998
|
-
"
|
|
16079
|
+
"name": "rp_24z4eW_name",
|
|
14999
16080
|
"message": "rp_24z4eW_message",
|
|
15000
|
-
"
|
|
16081
|
+
"spinning": "rp_24z4eW_spinning",
|
|
15001
16082
|
"viewport": "rp_24z4eW_viewport",
|
|
15002
|
-
"
|
|
15003
|
-
"spin": "rp_24z4eW_spin",
|
|
16083
|
+
"nameColumn": "rp_24z4eW_nameColumn",
|
|
15004
16084
|
"worldColumn": "rp_24z4eW_worldColumn",
|
|
15005
|
-
"timeColumn": "rp_24z4eW_timeColumn",
|
|
15006
|
-
"scrolls": "rp_24z4eW_scrolls",
|
|
15007
|
-
"count": "rp_24z4eW_count",
|
|
15008
|
-
"name": "rp_24z4eW_name",
|
|
15009
|
-
"actions": "rp_24z4eW_actions",
|
|
15010
16085
|
"number": "rp_24z4eW_number",
|
|
15011
|
-
"
|
|
15012
|
-
"
|
|
15013
|
-
"badge": "rp_24z4eW_badge",
|
|
15014
|
-
"notice": "rp_24z4eW_notice",
|
|
15015
|
-
"table": "rp_24z4eW_table",
|
|
15016
|
-
"toolbar": "rp_24z4eW_toolbar"
|
|
16086
|
+
"toolbar": "rp_24z4eW_toolbar",
|
|
16087
|
+
"actions": "rp_24z4eW_actions"
|
|
15017
16088
|
};
|
|
15018
16089
|
// src/client/pages/sessions/SessionsPage.tsx
|
|
15019
16090
|
/** The sessions as a table, one page at a time, the most recently played first. */
|
|
@@ -15434,29 +16505,29 @@ window.__ModuleLoader__.load({
|
|
|
15434
16505
|
}
|
|
15435
16506
|
tag$19.textContent = css$19;
|
|
15436
16507
|
var SyncPage_module_css_default = {
|
|
15437
|
-
"
|
|
16508
|
+
"page": "rp_Gk-byG_page",
|
|
16509
|
+
"caption": "rp_Gk-byG_caption",
|
|
16510
|
+
"viewport": "rp_Gk-byG_viewport",
|
|
16511
|
+
"unit": "rp_Gk-byG_unit",
|
|
16512
|
+
"conflict": "rp_Gk-byG_conflict",
|
|
16513
|
+
"failed": "rp_Gk-byG_failed",
|
|
16514
|
+
"detail": "rp_Gk-byG_detail",
|
|
16515
|
+
"meta": "rp_Gk-byG_meta",
|
|
16516
|
+
"confirmation": "rp_Gk-byG_confirmation",
|
|
16517
|
+
"actions": "rp_Gk-byG_actions",
|
|
15438
16518
|
"syncedColumn": "rp_Gk-byG_syncedColumn",
|
|
15439
|
-
"
|
|
15440
|
-
"
|
|
16519
|
+
"actionsColumn": "rp_Gk-byG_actionsColumn",
|
|
16520
|
+
"unitColumn": "rp_Gk-byG_unitColumn",
|
|
15441
16521
|
"choices": "rp_Gk-byG_choices",
|
|
15442
|
-
"
|
|
15443
|
-
"
|
|
16522
|
+
"error": "rp_Gk-byG_error",
|
|
16523
|
+
"kindColumn": "rp_Gk-byG_kindColumn",
|
|
15444
16524
|
"stateColumn": "rp_Gk-byG_stateColumn",
|
|
15445
|
-
"
|
|
15446
|
-
"
|
|
16525
|
+
"actionHeading": "rp_Gk-byG_actionHeading",
|
|
16526
|
+
"problem": "rp_Gk-byG_problem",
|
|
16527
|
+
"table": "rp_Gk-byG_table",
|
|
15447
16528
|
"detailsColumn": "rp_Gk-byG_detailsColumn",
|
|
15448
16529
|
"message": "rp_Gk-byG_message",
|
|
15449
|
-
"
|
|
15450
|
-
"kindColumn": "rp_Gk-byG_kindColumn",
|
|
15451
|
-
"unit": "rp_Gk-byG_unit",
|
|
15452
|
-
"actions": "rp_Gk-byG_actions",
|
|
15453
|
-
"viewport": "rp_Gk-byG_viewport",
|
|
15454
|
-
"unitColumn": "rp_Gk-byG_unitColumn",
|
|
15455
|
-
"toolbar": "rp_Gk-byG_toolbar",
|
|
15456
|
-
"actionsColumn": "rp_Gk-byG_actionsColumn",
|
|
15457
|
-
"conflict": "rp_Gk-byG_conflict",
|
|
15458
|
-
"failed": "rp_Gk-byG_failed",
|
|
15459
|
-
"detail": "rp_Gk-byG_detail"
|
|
16530
|
+
"toolbar": "rp_Gk-byG_toolbar"
|
|
15460
16531
|
};
|
|
15461
16532
|
// src/client/pages/sync/SyncPage.tsx
|
|
15462
16533
|
const when = (iso, never, locale) => iso === void 0 ? never : new Date(iso).toLocaleString(locale);
|
|
@@ -15971,14 +17042,14 @@ window.__ModuleLoader__.load({
|
|
|
15971
17042
|
var WorldCard_module_css_default = {
|
|
15972
17043
|
"tag": "rp_Bvxx5q_tag",
|
|
15973
17044
|
"info": "rp_Bvxx5q_info",
|
|
15974
|
-
"
|
|
15975
|
-
"openButton": "rp_Bvxx5q_openButton",
|
|
15976
|
-
"image": "rp_Bvxx5q_image",
|
|
17045
|
+
"placeholder": "rp_Bvxx5q_placeholder",
|
|
15977
17046
|
"card": "rp_Bvxx5q_card",
|
|
15978
|
-
"
|
|
17047
|
+
"name": "rp_Bvxx5q_name",
|
|
15979
17048
|
"cover": "rp_Bvxx5q_cover",
|
|
15980
|
-
"
|
|
15981
|
-
"
|
|
17049
|
+
"tags": "rp_Bvxx5q_tags",
|
|
17050
|
+
"image": "rp_Bvxx5q_image",
|
|
17051
|
+
"openButton": "rp_Bvxx5q_openButton",
|
|
17052
|
+
"play": "rp_Bvxx5q_play"
|
|
15982
17053
|
};
|
|
15983
17054
|
// src/client/widgets/world-card/WorldCard.tsx
|
|
15984
17055
|
/** Stable hue per name, so a world without a cover keeps the same colour. */
|
|
@@ -16116,18 +17187,18 @@ window.__ModuleLoader__.load({
|
|
|
16116
17187
|
}
|
|
16117
17188
|
tag$16.textContent = css$16;
|
|
16118
17189
|
var StartSessionDialog_module_css_default = {
|
|
16119
|
-
"
|
|
17190
|
+
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
16120
17191
|
"form": "rp_AnbLKG_form",
|
|
16121
|
-
"message": "rp_AnbLKG_message",
|
|
16122
|
-
"field": "rp_AnbLKG_field",
|
|
16123
17192
|
"optionText": "rp_AnbLKG_optionText",
|
|
16124
|
-
"
|
|
17193
|
+
"optionName": "rp_AnbLKG_optionName",
|
|
17194
|
+
"field": "rp_AnbLKG_field",
|
|
17195
|
+
"message": "rp_AnbLKG_message",
|
|
16125
17196
|
"advanced": "rp_AnbLKG_advanced",
|
|
16126
|
-
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
16127
17197
|
"option": "rp_AnbLKG_option",
|
|
16128
|
-
"
|
|
16129
|
-
"
|
|
16130
|
-
"optionSummary": "rp_AnbLKG_optionSummary"
|
|
17198
|
+
"error": "rp_AnbLKG_error",
|
|
17199
|
+
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
17200
|
+
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
17201
|
+
"label": "rp_AnbLKG_label"
|
|
16131
17202
|
};
|
|
16132
17203
|
// src/client/pages/worlds/AddAvatarsDialog.tsx
|
|
16133
17204
|
/** Asks which avatars become characters of a world's own files. */
|
|
@@ -17299,14 +18370,14 @@ window.__ModuleLoader__.load({
|
|
|
17299
18370
|
}
|
|
17300
18371
|
tag$15.textContent = css$15;
|
|
17301
18372
|
var SettingsFields_module_css_default = {
|
|
17302
|
-
"label": "rp_Rhi3yq_label",
|
|
17303
|
-
"help": "rp_Rhi3yq_help",
|
|
17304
|
-
"row": "rp_Rhi3yq_row",
|
|
17305
|
-
"groupTitle": "rp_Rhi3yq_groupTitle",
|
|
17306
18373
|
"error": "rp_Rhi3yq_error",
|
|
18374
|
+
"group": "rp_Rhi3yq_group",
|
|
17307
18375
|
"field": "rp_Rhi3yq_field",
|
|
18376
|
+
"help": "rp_Rhi3yq_help",
|
|
17308
18377
|
"area": "rp_Rhi3yq_area",
|
|
17309
|
-
"
|
|
18378
|
+
"groupTitle": "rp_Rhi3yq_groupTitle",
|
|
18379
|
+
"label": "rp_Rhi3yq_label",
|
|
18380
|
+
"row": "rp_Rhi3yq_row"
|
|
17310
18381
|
};
|
|
17311
18382
|
// src/client/settings-form/SettingsFields.tsx
|
|
17312
18383
|
/** The settings of a chat as editable fields: one control with its explanation under each. */
|
|
@@ -17503,6 +18574,15 @@ window.__ModuleLoader__.load({
|
|
|
17503
18574
|
body: file
|
|
17504
18575
|
}));
|
|
17505
18576
|
}
|
|
18577
|
+
/** Has the host fetch a card from a web address and read it; the answer is what it holds. */
|
|
18578
|
+
async function fetchCard(url) {
|
|
18579
|
+
return await answer$1(await fetch(`${API_PREFIX}/worlds/import/card/url`, {
|
|
18580
|
+
method: "POST",
|
|
18581
|
+
credentials: "same-origin",
|
|
18582
|
+
headers: { "content-type": "application/json" },
|
|
18583
|
+
body: JSON.stringify({ url })
|
|
18584
|
+
}));
|
|
18585
|
+
}
|
|
17506
18586
|
async function startImport(id, choices, language, update) {
|
|
17507
18587
|
return await answer$1(await fetch(`${API_PREFIX}/worlds/import/start?id=${encodeURIComponent(id)}`, {
|
|
17508
18588
|
method: "POST",
|
|
@@ -17598,10 +18678,10 @@ window.__ModuleLoader__.load({
|
|
|
17598
18678
|
}
|
|
17599
18679
|
tag$14.textContent = css$14;
|
|
17600
18680
|
var TranslateBanner_module_css_default = {
|
|
17601
|
-
"banner": "rp_Lx8vJa_banner",
|
|
17602
18681
|
"bannerActions": "rp_Lx8vJa_bannerActions",
|
|
18682
|
+
"text": "rp_Lx8vJa_text",
|
|
17603
18683
|
"error": "rp_Lx8vJa_error",
|
|
17604
|
-
"
|
|
18684
|
+
"banner": "rp_Lx8vJa_banner"
|
|
17605
18685
|
};
|
|
17606
18686
|
// src/client/pages/worlds/TranslateBanner.tsx
|
|
17607
18687
|
const languageName = (t, language) => language === "zh" ? t("languageChinese") : t("languageEnglish");
|
|
@@ -17667,6 +18747,7 @@ window.__ModuleLoader__.load({
|
|
|
17667
18747
|
const [name, setName] = (0, react.useState)(dialog.worldName);
|
|
17668
18748
|
const [opening, setOpening] = (0, react.useState)("");
|
|
17669
18749
|
const [startTime, setStartTime] = (0, react.useState)("");
|
|
18750
|
+
const [answers, setAnswers] = (0, react.useState)({});
|
|
17670
18751
|
const [preset, setPreset] = (0, react.useState)("");
|
|
17671
18752
|
const [books, setBooks] = (0, react.useState)();
|
|
17672
18753
|
const chosenBooks = books ?? new Set(dialog.suggestedLorebooks);
|
|
@@ -17729,6 +18810,7 @@ window.__ModuleLoader__.load({
|
|
|
17729
18810
|
...selected.startsWith("avatar:") ? { playerAvatar: selected.slice(7) } : { playerCharacterId: selected },
|
|
17730
18811
|
avatars: bringing.map((avatar) => avatar.key),
|
|
17731
18812
|
...!openingValid ? {} : { opening: Number(opening) },
|
|
18813
|
+
...Object.keys(answers).length === 0 ? {} : { answers },
|
|
17732
18814
|
...preset === "" ? {} : { preset },
|
|
17733
18815
|
...books === void 0 ? {} : { lorebooks: [...books] },
|
|
17734
18816
|
...startTime.trim() === "" || shown["clock.mode"] === "real" ? {} : { startingTime: startTime.trim() },
|
|
@@ -17802,6 +18884,42 @@ window.__ModuleLoader__.load({
|
|
|
17802
18884
|
}, player.value))
|
|
17803
18885
|
]
|
|
17804
18886
|
}),
|
|
18887
|
+
dialog.status === "ready" && dialog.questions.map((question) => {
|
|
18888
|
+
const picked = question.options.find((option) => option.id === answers[question.id]);
|
|
18889
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
18890
|
+
className: StartSessionDialog_module_css_default.field,
|
|
18891
|
+
children: [
|
|
18892
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18893
|
+
className: StartSessionDialog_module_css_default.label,
|
|
18894
|
+
children: question.text
|
|
18895
|
+
}),
|
|
18896
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
18897
|
+
value: picked?.id ?? "",
|
|
18898
|
+
disabled: dialog.submitting,
|
|
18899
|
+
onChange: (event) => {
|
|
18900
|
+
const { value } = event.target;
|
|
18901
|
+
setAnswers((now) => {
|
|
18902
|
+
const next = { ...now };
|
|
18903
|
+
if (value === "") delete next[question.id];
|
|
18904
|
+
else next[question.id] = value;
|
|
18905
|
+
return next;
|
|
18906
|
+
});
|
|
18907
|
+
},
|
|
18908
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
18909
|
+
value: "",
|
|
18910
|
+
children: t("startQuestionNone")
|
|
18911
|
+
}), question.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
18912
|
+
value: option.id,
|
|
18913
|
+
children: option.label
|
|
18914
|
+
}, option.id))]
|
|
18915
|
+
}),
|
|
18916
|
+
picked?.description !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18917
|
+
className: StartSessionDialog_module_css_default.optionSummary,
|
|
18918
|
+
children: picked.description
|
|
18919
|
+
})
|
|
18920
|
+
]
|
|
18921
|
+
}, question.id);
|
|
18922
|
+
}),
|
|
17805
18923
|
dialog.status === "ready" && dialog.openings.some((entry) => entry.character === void 0 || entry.character === selected) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
17806
18924
|
className: StartSessionDialog_module_css_default.field,
|
|
17807
18925
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -18185,26 +19303,26 @@ window.__ModuleLoader__.load({
|
|
|
18185
19303
|
}
|
|
18186
19304
|
tag$13.textContent = css$13;
|
|
18187
19305
|
var WorldsPage_module_css_default = {
|
|
18188
|
-
"
|
|
18189
|
-
"count": "rp_FHUyRq_count",
|
|
18190
|
-
"info": "rp_FHUyRq_info",
|
|
19306
|
+
"page": "rp_FHUyRq_page",
|
|
18191
19307
|
"message": "rp_FHUyRq_message",
|
|
18192
|
-
"
|
|
18193
|
-
"
|
|
19308
|
+
"toolbar": "rp_FHUyRq_toolbar",
|
|
19309
|
+
"grid": "rp_FHUyRq_grid",
|
|
18194
19310
|
"editBody": "rp_FHUyRq_editBody",
|
|
19311
|
+
"starters": "rp_FHUyRq_starters",
|
|
19312
|
+
"scrolls": "rp_FHUyRq_scrolls",
|
|
19313
|
+
"count": "rp_FHUyRq_count",
|
|
19314
|
+
"notice": "rp_FHUyRq_notice",
|
|
18195
19315
|
"editHeader": "rp_FHUyRq_editHeader",
|
|
19316
|
+
"editTitle": "rp_FHUyRq_editTitle",
|
|
19317
|
+
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
19318
|
+
"spinning": "rp_FHUyRq_spinning",
|
|
18196
19319
|
"spin": "rp_FHUyRq_spin",
|
|
18197
|
-
"scrolls": "rp_FHUyRq_scrolls",
|
|
18198
|
-
"viewport": "rp_FHUyRq_viewport",
|
|
18199
19320
|
"cell": "rp_FHUyRq_cell",
|
|
18200
|
-
"
|
|
18201
|
-
"
|
|
18202
|
-
"notice": "rp_FHUyRq_notice",
|
|
18203
|
-
"page": "rp_FHUyRq_page",
|
|
19321
|
+
"editActions": "rp_FHUyRq_editActions",
|
|
19322
|
+
"starter": "rp_FHUyRq_starter",
|
|
18204
19323
|
"fits": "rp_FHUyRq_fits",
|
|
18205
|
-
"
|
|
18206
|
-
"
|
|
18207
|
-
"toolbar": "rp_FHUyRq_toolbar"
|
|
19324
|
+
"viewport": "rp_FHUyRq_viewport",
|
|
19325
|
+
"info": "rp_FHUyRq_info"
|
|
18208
19326
|
};
|
|
18209
19327
|
// src/client/pages/worlds/StarterWorlds.tsx
|
|
18210
19328
|
/** The worlds that ship with the plugin and are not yet the person's, offered where the list of worlds is empty. */
|
|
@@ -18358,6 +19476,69 @@ window.__ModuleLoader__.load({
|
|
|
18358
19476
|
children: failure
|
|
18359
19477
|
})] });
|
|
18360
19478
|
}
|
|
19479
|
+
// src/client/pages/worlds/CardUrlDialog.tsx
|
|
19480
|
+
/** Reads a character card from a web address: the host fetches it, checks that it is a PNG or JSON card and offers what it holds, as an upload does. */
|
|
19481
|
+
function CardUrlDialog({ t, onRead, onClose }) {
|
|
19482
|
+
const formId = (0, react.useId)();
|
|
19483
|
+
const [address, setAddress] = (0, react.useState)("");
|
|
19484
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
19485
|
+
const [error, setError] = (0, react.useState)();
|
|
19486
|
+
const submit = () => {
|
|
19487
|
+
if (address.trim() === "" || busy) return;
|
|
19488
|
+
setBusy(true);
|
|
19489
|
+
setError(void 0);
|
|
19490
|
+
fetchCard(address.trim()).then(onRead, (failure) => {
|
|
19491
|
+
setBusy(false);
|
|
19492
|
+
setError(failure instanceof Error ? failure.message : String(failure));
|
|
19493
|
+
});
|
|
19494
|
+
};
|
|
19495
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
19496
|
+
open: true,
|
|
19497
|
+
onClose,
|
|
19498
|
+
title: t("cardUrlTitle"),
|
|
19499
|
+
description: t("cardUrlHelp"),
|
|
19500
|
+
closeLabel: t("close"),
|
|
19501
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
19502
|
+
variant: "ghost",
|
|
19503
|
+
disabled: busy,
|
|
19504
|
+
onClick: onClose,
|
|
19505
|
+
children: t("cancel")
|
|
19506
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
19507
|
+
variant: "primary",
|
|
19508
|
+
type: "submit",
|
|
19509
|
+
form: formId,
|
|
19510
|
+
disabled: busy || address.trim() === "",
|
|
19511
|
+
children: busy ? t("cardUrlReading") : t("cardUrlSubmit")
|
|
19512
|
+
})] }),
|
|
19513
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
|
|
19514
|
+
id: formId,
|
|
19515
|
+
className: StartSessionDialog_module_css_default.form,
|
|
19516
|
+
onSubmit: (event) => {
|
|
19517
|
+
event.preventDefault();
|
|
19518
|
+
submit();
|
|
19519
|
+
},
|
|
19520
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
19521
|
+
className: StartSessionDialog_module_css_default.field,
|
|
19522
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19523
|
+
className: StartSessionDialog_module_css_default.label,
|
|
19524
|
+
children: t("cardUrlAddress")
|
|
19525
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
19526
|
+
value: address,
|
|
19527
|
+
placeholder: t("cardUrlPlaceholder"),
|
|
19528
|
+
"data-modal-autofocus": true,
|
|
19529
|
+
"data-testid": "roleplay-card-url",
|
|
19530
|
+
onChange: (event) => {
|
|
19531
|
+
setAddress(event.target.value);
|
|
19532
|
+
}
|
|
19533
|
+
})]
|
|
19534
|
+
}), error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19535
|
+
className: StartSessionDialog_module_css_default.error,
|
|
19536
|
+
role: "alert",
|
|
19537
|
+
children: t("importUploadFailed", { message: error })
|
|
19538
|
+
})]
|
|
19539
|
+
})
|
|
19540
|
+
});
|
|
19541
|
+
}
|
|
18361
19542
|
// src/client/pages/worlds/playtest-api.ts
|
|
18362
19543
|
const address = (worldId) => `${API_PREFIX}/worlds/playtest?id=${encodeURIComponent(worldId)}`;
|
|
18363
19544
|
async function playtestStatus(worldId, signal) {
|
|
@@ -18380,11 +19561,17 @@ window.__ModuleLoader__.load({
|
|
|
18380
19561
|
credentials: "same-origin"
|
|
18381
19562
|
}));
|
|
18382
19563
|
}
|
|
18383
|
-
async function
|
|
18384
|
-
|
|
19564
|
+
async function playtestChoices(worldId, signal) {
|
|
19565
|
+
const payload = await answer$1(await fetch(`${API_PREFIX}/worlds/characters?id=${encodeURIComponent(worldId)}`, {
|
|
18385
19566
|
credentials: "same-origin",
|
|
18386
19567
|
...signal === void 0 ? {} : { signal }
|
|
18387
|
-
}))
|
|
19568
|
+
}));
|
|
19569
|
+
return {
|
|
19570
|
+
players: payload.characters.filter((character) => character.role === "playable"),
|
|
19571
|
+
openings: payload.openings,
|
|
19572
|
+
startingTime: payload.startingTime,
|
|
19573
|
+
timeZone: payload.timeZone
|
|
19574
|
+
};
|
|
18388
19575
|
}
|
|
18389
19576
|
// src/client/pages/worlds/PlaytestDialog.tsx
|
|
18390
19577
|
const POLL_MS$2 = 2e3;
|
|
@@ -18448,6 +19635,30 @@ window.__ModuleLoader__.load({
|
|
|
18448
19635
|
finding.message
|
|
18449
19636
|
]
|
|
18450
19637
|
}, index)),
|
|
19638
|
+
report.refused.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19639
|
+
className: StartSessionDialog_module_css_default.message,
|
|
19640
|
+
children: t("pt_refused", { count: report.refused.length })
|
|
19641
|
+
}),
|
|
19642
|
+
report.missing.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19643
|
+
className: StartSessionDialog_module_css_default.message,
|
|
19644
|
+
children: t("pt_missing", { count: report.missing.length })
|
|
19645
|
+
}),
|
|
19646
|
+
report.missing.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19647
|
+
className: StartSessionDialog_module_css_default.message,
|
|
19648
|
+
children: t("pt_missingLookup", {
|
|
19649
|
+
turn: entry.turn,
|
|
19650
|
+
character: entry.character,
|
|
19651
|
+
about: entry.about
|
|
19652
|
+
})
|
|
19653
|
+
}, `m${index}`)),
|
|
19654
|
+
report.refused.map((call, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19655
|
+
className: StartSessionDialog_module_css_default.message,
|
|
19656
|
+
children: t("pt_refusedCall", {
|
|
19657
|
+
turn: call.turn,
|
|
19658
|
+
tool: call.tool,
|
|
19659
|
+
note: call.note
|
|
19660
|
+
})
|
|
19661
|
+
}, index)),
|
|
18451
19662
|
report.problems.map((problem, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
18452
19663
|
className: StartSessionDialog_module_css_default.error,
|
|
18453
19664
|
children: problem
|
|
@@ -18463,15 +19674,19 @@ window.__ModuleLoader__.load({
|
|
|
18463
19674
|
const [reading, setReading] = (0, react.useState)({ state: "idle" });
|
|
18464
19675
|
const [players, setPlayers] = (0, react.useState)();
|
|
18465
19676
|
const [player, setPlayer] = (0, react.useState)("");
|
|
19677
|
+
const [choices, setChoices] = (0, react.useState)();
|
|
19678
|
+
const [opening, setOpening] = (0, react.useState)("");
|
|
19679
|
+
const [startTime, setStartTime] = (0, react.useState)("");
|
|
18466
19680
|
const [turns, setTurns] = (0, react.useState)(String(DEFAULT_TURNS));
|
|
18467
19681
|
const [error, setError] = (0, react.useState)();
|
|
18468
19682
|
const running = reading.state === "running";
|
|
18469
19683
|
(0, react.useEffect)(() => {
|
|
18470
19684
|
const abort = new AbortController();
|
|
18471
19685
|
playtestStatus(worldId, abort.signal).then(setReading, () => void 0);
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
19686
|
+
playtestChoices(worldId, abort.signal).then((found) => {
|
|
19687
|
+
setChoices(found);
|
|
19688
|
+
setPlayers(found.players);
|
|
19689
|
+
setPlayer(found.players[0]?.id ?? "");
|
|
18475
19690
|
}, (failure) => {
|
|
18476
19691
|
if (!abort.signal.aborted) setError(failure instanceof Error ? failure.message : String(failure));
|
|
18477
19692
|
});
|
|
@@ -18490,11 +19705,15 @@ window.__ModuleLoader__.load({
|
|
|
18490
19705
|
}, [running, worldId]);
|
|
18491
19706
|
const count = Number(turns);
|
|
18492
19707
|
const valid = Number.isInteger(count) && count >= 1 && count <= 10;
|
|
19708
|
+
const chosenOpening = opening === "" ? void 0 : choices?.openings[Number(opening)];
|
|
19709
|
+
const openingValid = chosenOpening !== void 0 && (chosenOpening.character === void 0 || chosenOpening.character === player);
|
|
18493
19710
|
const begin = () => {
|
|
18494
19711
|
setError(void 0);
|
|
18495
19712
|
startPlaytest(worldId, {
|
|
18496
19713
|
turns: count,
|
|
18497
19714
|
...player === "" ? {} : { playerCharacterId: player },
|
|
19715
|
+
...!openingValid ? {} : { opening: Number(opening) },
|
|
19716
|
+
...startTime.trim() === "" ? {} : { startingTime: startTime.trim() },
|
|
18498
19717
|
language: t("language")
|
|
18499
19718
|
}).then(setReading, (failure) => {
|
|
18500
19719
|
setError(failure instanceof Error ? failure.message : String(failure));
|
|
@@ -18554,6 +19773,36 @@ window.__ModuleLoader__.load({
|
|
|
18554
19773
|
}, entry.id))
|
|
18555
19774
|
})]
|
|
18556
19775
|
}),
|
|
19776
|
+
choices?.openings.some((entry) => entry.character === void 0 || entry.character === player) === true && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
19777
|
+
className: StartSessionDialog_module_css_default.field,
|
|
19778
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("startOpening") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
19779
|
+
value: openingValid ? opening : "",
|
|
19780
|
+
onChange: (event) => {
|
|
19781
|
+
setOpening(event.target.value);
|
|
19782
|
+
},
|
|
19783
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
19784
|
+
value: "",
|
|
19785
|
+
children: t("startOpeningDefault")
|
|
19786
|
+
}), choices.openings.flatMap((entry, index) => entry.character === void 0 || entry.character === player ? [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
19787
|
+
value: String(index),
|
|
19788
|
+
children: entry.title
|
|
19789
|
+
}, index)] : [])]
|
|
19790
|
+
})]
|
|
19791
|
+
}),
|
|
19792
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
19793
|
+
className: StartSessionDialog_module_css_default.field,
|
|
19794
|
+
children: [
|
|
19795
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("startTime") }),
|
|
19796
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
19797
|
+
value: startTime,
|
|
19798
|
+
placeholder: choices?.startingTime === "" || choices === void 0 ? "YYYY-MM-DDTHH:MM:SS" : choices.startingTime,
|
|
19799
|
+
onChange: (event) => {
|
|
19800
|
+
setStartTime(event.target.value);
|
|
19801
|
+
}
|
|
19802
|
+
}),
|
|
19803
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("startTimeHelp", { zone: choices?.timeZone ?? "" }) })
|
|
19804
|
+
]
|
|
19805
|
+
}),
|
|
18557
19806
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
18558
19807
|
className: StartSessionDialog_module_css_default.field,
|
|
18559
19808
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("pt_turns") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
@@ -18660,6 +19909,7 @@ window.__ModuleLoader__.load({
|
|
|
18660
19909
|
const [addingAvatars, setAddingAvatars] = (0, react.useState)(false);
|
|
18661
19910
|
const [editorVersion, setEditorVersion] = (0, react.useState)(0);
|
|
18662
19911
|
const [importing, setImporting] = (0, react.useState)();
|
|
19912
|
+
const [addressing, setAddressing] = (0, react.useState)(false);
|
|
18663
19913
|
const [updating, setUpdating] = (0, react.useState)();
|
|
18664
19914
|
const [cardStatus, setCardStatus] = (0, react.useState)();
|
|
18665
19915
|
const [reverting, setReverting] = (0, react.useState)(false);
|
|
@@ -18994,9 +20244,19 @@ window.__ModuleLoader__.load({
|
|
|
18994
20244
|
size: "sm",
|
|
18995
20245
|
disabled: uploading,
|
|
18996
20246
|
onClick: () => {
|
|
18997
|
-
picker.current?.click();
|
|
20247
|
+
picker.current?.click();
|
|
20248
|
+
},
|
|
20249
|
+
children: uploading ? t("importUploading") : t("importCard")
|
|
20250
|
+
}),
|
|
20251
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20252
|
+
variant: "outline",
|
|
20253
|
+
size: "sm",
|
|
20254
|
+
disabled: uploading,
|
|
20255
|
+
"data-testid": "roleplay-import-card-url",
|
|
20256
|
+
onClick: () => {
|
|
20257
|
+
setAddressing(true);
|
|
18998
20258
|
},
|
|
18999
|
-
children:
|
|
20259
|
+
children: t("importCardUrl")
|
|
19000
20260
|
}),
|
|
19001
20261
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
19002
20262
|
ref: picker,
|
|
@@ -19099,6 +20359,18 @@ window.__ModuleLoader__.load({
|
|
|
19099
20359
|
onStart: startSession,
|
|
19100
20360
|
onClose: closeStartDialog
|
|
19101
20361
|
}, state.dialog.worldId),
|
|
20362
|
+
addressing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardUrlDialog, {
|
|
20363
|
+
t,
|
|
20364
|
+
onClose: () => {
|
|
20365
|
+
setAddressing(false);
|
|
20366
|
+
},
|
|
20367
|
+
onRead: (preview) => {
|
|
20368
|
+
setAddressing(false);
|
|
20369
|
+
setImportNotice(void 0);
|
|
20370
|
+
setImportDone(void 0);
|
|
20371
|
+
setImporting(preview);
|
|
20372
|
+
}
|
|
20373
|
+
}),
|
|
19102
20374
|
creating && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CreateWorldDialog, {
|
|
19103
20375
|
t,
|
|
19104
20376
|
onClose: () => {
|
|
@@ -19573,6 +20845,13 @@ window.__ModuleLoader__.load({
|
|
|
19573
20845
|
openWorld: "Edit {name}",
|
|
19574
20846
|
worldMissing: "This world is no longer there.",
|
|
19575
20847
|
importCard: "Import card",
|
|
20848
|
+
importCardUrl: "Import card from address",
|
|
20849
|
+
cardUrlTitle: "Import a card from an address",
|
|
20850
|
+
cardUrlHelp: "Paste the address of a character card: a PNG picture with the card in it, or a JSON file. The address is asked first what it holds and refused if it says something else; the file is then read by its content, not by its name. A page of a catalogue you added works too, with that catalogue's API key.",
|
|
20851
|
+
cardUrlAddress: "Address",
|
|
20852
|
+
cardUrlPlaceholder: "https://example.com/card.png",
|
|
20853
|
+
cardUrlSubmit: "Read the card",
|
|
20854
|
+
cardUrlReading: "Fetching…",
|
|
19576
20855
|
importUploading: "Reading the card…",
|
|
19577
20856
|
importUploadFailed: "Could not read the card: {message}",
|
|
19578
20857
|
importTags: "Tags",
|
|
@@ -19599,6 +20878,7 @@ window.__ModuleLoader__.load({
|
|
|
19599
20878
|
startPresetHelp: "A preset sets how the story is written. Presets are kept in the presets folder of your roleplay folder.",
|
|
19600
20879
|
startOpening: "Opening",
|
|
19601
20880
|
startOpeningDefault: "The world's own opening",
|
|
20881
|
+
startQuestionNone: "No preference",
|
|
19602
20882
|
startTime: "Story starts at",
|
|
19603
20883
|
startTimeHelp: "Local time in {zone}, like 1912-04-14T23:40:00. Leave empty for the world's own start. Not used when the story follows the real clock.",
|
|
19604
20884
|
loadingCharacters: "Loading characters…",
|
|
@@ -19665,6 +20945,10 @@ window.__ModuleLoader__.load({
|
|
|
19665
20945
|
pt_findings: "The world's own checks found {count}:",
|
|
19666
20946
|
pt_none: "none",
|
|
19667
20947
|
pt_nothing: "(nothing)",
|
|
20948
|
+
pt_refused: "The game master was refused {count} time(s), where the story or the world did not allow or hold what it tried:",
|
|
20949
|
+
pt_refusedCall: "Turn {turn}, {tool}: {note}",
|
|
20950
|
+
pt_missing: "Characters looked for {count} thing(s) the world has nothing on:",
|
|
20951
|
+
pt_missingLookup: "Turn {turn}, {character} looked for “{about}”",
|
|
19668
20952
|
authorWorld: "Author with AI",
|
|
19669
20953
|
openingAuthor: "Opening…",
|
|
19670
20954
|
authorWorldFailed: "Could not open the authoring chat: {message}",
|
|
@@ -19708,6 +20992,13 @@ window.__ModuleLoader__.load({
|
|
|
19708
20992
|
openWorld: "编辑{name}",
|
|
19709
20993
|
worldMissing: "这个世界已经不存在了。",
|
|
19710
20994
|
importCard: "导入角色卡",
|
|
20995
|
+
importCardUrl: "从地址导入角色卡",
|
|
20996
|
+
cardUrlTitle: "从地址导入角色卡",
|
|
20997
|
+
cardUrlHelp: "粘贴角色卡的地址:内含角色卡的 PNG 图片,或 JSON 文件。会先询问该地址的内容类型,不是 PNG 或 JSON 就拒绝;随后按文件内容(而不是文件名)读取。你添加过的目录的页面地址也可以,并使用该目录的 API 密钥。",
|
|
20998
|
+
cardUrlAddress: "地址",
|
|
20999
|
+
cardUrlPlaceholder: "https://example.com/card.png",
|
|
21000
|
+
cardUrlSubmit: "读取角色卡",
|
|
21001
|
+
cardUrlReading: "正在获取…",
|
|
19711
21002
|
importUploading: "正在读取角色卡…",
|
|
19712
21003
|
importUploadFailed: "无法读取角色卡:{message}",
|
|
19713
21004
|
importTags: "标签",
|
|
@@ -19734,6 +21025,7 @@ window.__ModuleLoader__.load({
|
|
|
19734
21025
|
startPresetHelp: "预设决定故事的写法。预设保存在角色扮演文件夹的 presets 文件夹中。",
|
|
19735
21026
|
startOpening: "开场",
|
|
19736
21027
|
startOpeningDefault: "世界自带的开场",
|
|
21028
|
+
startQuestionNone: "不选择",
|
|
19737
21029
|
startTime: "故事开始于",
|
|
19738
21030
|
startTimeHelp: "{zone} 的本地时间,例如 1912-04-14T23:40:00。留空则使用世界自带的开始时间。故事跟随真实时钟时不适用。",
|
|
19739
21031
|
loadingCharacters: "正在加载角色…",
|
|
@@ -19800,6 +21092,10 @@ window.__ModuleLoader__.load({
|
|
|
19800
21092
|
pt_findings: "世界自带的检查发现了 {count} 项:",
|
|
19801
21093
|
pt_none: "无",
|
|
19802
21094
|
pt_nothing: "(无)",
|
|
21095
|
+
pt_refused: "游戏主持人被拒绝了 {count} 次,原因是故事或世界不允许、或没有它所尝试的内容:",
|
|
21096
|
+
pt_refusedCall: "第 {turn} 回合,{tool}:{note}",
|
|
21097
|
+
pt_missing: "角色查找了 {count} 样世界里没有记录的内容:",
|
|
21098
|
+
pt_missingLookup: "第 {turn} 回合,{character} 查找了“{about}”",
|
|
19803
21099
|
authorWorld: "使用 AI 编辑",
|
|
19804
21100
|
openingAuthor: "正在打开…",
|
|
19805
21101
|
authorWorldFailed: "无法打开世界编辑对话:{message}",
|
|
@@ -19823,7 +21119,7 @@ window.__ModuleLoader__.load({
|
|
|
19823
21119
|
startAvatars: "带上角色形象",
|
|
19824
21120
|
startAvatarsHelp: "勾选要带进这个存档的角色形象,它们会成为存档中的角色,你也可以扮演它们。世界本身不会改变。"
|
|
19825
21121
|
}
|
|
19826
|
-
}, dictionaries$9), dictionaries$
|
|
21122
|
+
}, dictionaries$9), dictionaries$16), dictionaries$25), dictionaries$26);
|
|
19827
21123
|
// src/client/pages/worlds/worlds-controller.ts
|
|
19828
21124
|
async function request$1(path, init, signal) {
|
|
19829
21125
|
const response = await fetch(`${API_PREFIX}${path}`, {
|
|
@@ -19945,6 +21241,7 @@ window.__ModuleLoader__.load({
|
|
|
19945
21241
|
characters: [],
|
|
19946
21242
|
avatars: [],
|
|
19947
21243
|
openings: [],
|
|
21244
|
+
questions: [],
|
|
19948
21245
|
startingTime: "",
|
|
19949
21246
|
timeZone: "",
|
|
19950
21247
|
presets: [],
|
|
@@ -19955,7 +21252,7 @@ window.__ModuleLoader__.load({
|
|
|
19955
21252
|
};
|
|
19956
21253
|
});
|
|
19957
21254
|
try {
|
|
19958
|
-
const [{ characters, openings, startingTime, timeZone, preset, lorebooks: suggested }, avatars, presets, books] = await Promise.all([
|
|
21255
|
+
const [{ characters, openings, questions, startingTime, timeZone, preset, lorebooks: suggested }, avatars, presets, books] = await Promise.all([
|
|
19959
21256
|
request$1(`/worlds/characters?id=${encodeURIComponent(worldId)}`, {}, this.abort.signal),
|
|
19960
21257
|
listAvatars(this.abort.signal).catch(() => []),
|
|
19961
21258
|
request$1("/presets", {}, this.abort.signal).catch(() => []),
|
|
@@ -19966,6 +21263,7 @@ window.__ModuleLoader__.load({
|
|
|
19966
21263
|
dialog.characters = characters;
|
|
19967
21264
|
dialog.avatars = avatars;
|
|
19968
21265
|
dialog.openings = openings;
|
|
21266
|
+
dialog.questions = questions ?? [];
|
|
19969
21267
|
dialog.startingTime = startingTime;
|
|
19970
21268
|
dialog.timeZone = timeZone;
|
|
19971
21269
|
dialog.presets = presets;
|
|
@@ -20007,6 +21305,7 @@ window.__ModuleLoader__.load({
|
|
|
20007
21305
|
...options.playerCharacterId === void 0 ? {} : { playerCharacterId: options.playerCharacterId },
|
|
20008
21306
|
...options.playerAvatar === void 0 ? {} : { playerAvatar: options.playerAvatar },
|
|
20009
21307
|
...options.avatars.length === 0 ? {} : { avatars: options.avatars },
|
|
21308
|
+
...options.answers === void 0 || Object.keys(options.answers).length === 0 ? {} : { answers: options.answers },
|
|
20010
21309
|
...options.opening === void 0 ? {} : { opening: options.opening },
|
|
20011
21310
|
...options.startingTime === void 0 ? {} : { startingTime: options.startingTime },
|
|
20012
21311
|
...options.preset === void 0 ? {} : { preset: options.preset },
|
|
@@ -20193,9 +21492,9 @@ window.__ModuleLoader__.load({
|
|
|
20193
21492
|
tag$12.textContent = css$12;
|
|
20194
21493
|
var BranchDialog_module_css_default = {
|
|
20195
21494
|
"error": "rp_Dy1TaW_error",
|
|
21495
|
+
"label": "rp_Dy1TaW_label",
|
|
20196
21496
|
"form": "rp_Dy1TaW_form",
|
|
20197
|
-
"field": "rp_Dy1TaW_field"
|
|
20198
|
-
"label": "rp_Dy1TaW_label"
|
|
21497
|
+
"field": "rp_Dy1TaW_field"
|
|
20199
21498
|
};
|
|
20200
21499
|
// src/client/branch/BranchDialog.tsx
|
|
20201
21500
|
/** Asks for the name of a session that was just branched off another. */
|
|
@@ -20313,10 +21612,10 @@ window.__ModuleLoader__.load({
|
|
|
20313
21612
|
}
|
|
20314
21613
|
tag$11.textContent = css$11;
|
|
20315
21614
|
var SidebarGuideEntry_module_css_default = {
|
|
20316
|
-
"entry": "rp_Okaj1q_entry",
|
|
20317
|
-
"main": "rp_Okaj1q_main",
|
|
20318
21615
|
"title": "rp_Okaj1q_title",
|
|
21616
|
+
"main": "rp_Okaj1q_main",
|
|
20319
21617
|
"icon": "rp_Okaj1q_icon",
|
|
21618
|
+
"entry": "rp_Okaj1q_entry",
|
|
20320
21619
|
"description": "rp_Okaj1q_description",
|
|
20321
21620
|
"text": "rp_Okaj1q_text"
|
|
20322
21621
|
};
|
|
@@ -20365,9 +21664,9 @@ window.__ModuleLoader__.load({
|
|
|
20365
21664
|
}
|
|
20366
21665
|
tag$10.textContent = css$10;
|
|
20367
21666
|
var GalleryTab_module_css_default = {
|
|
21667
|
+
"page": "rp_W688Pa_page",
|
|
20368
21668
|
"bar": "rp_W688Pa_bar",
|
|
20369
|
-
"message": "rp_W688Pa_message"
|
|
20370
|
-
"page": "rp_W688Pa_page"
|
|
21669
|
+
"message": "rp_W688Pa_message"
|
|
20371
21670
|
};
|
|
20372
21671
|
// src/client/gallery/GalleryTab.tsx
|
|
20373
21672
|
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
@@ -20421,7 +21720,7 @@ window.__ModuleLoader__.load({
|
|
|
20421
21720
|
/** The gallery: a page of the right sidebar, so the pictures can be browsed while the story is read. */
|
|
20422
21721
|
function registerGallery(ctx) {
|
|
20423
21722
|
const t = ctx.locale.bind(NAMESPACE$7);
|
|
20424
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$7, dictionaries$
|
|
21723
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$7, dictionaries$21), "roleplay: gallery dictionaries");
|
|
20425
21724
|
ctx.inject(["sidebarRight", "sidebarRightTabs"], (right) => {
|
|
20426
21725
|
right.effect(() => right.sidebarRightTabs.register({
|
|
20427
21726
|
id: GALLERY_ID,
|
|
@@ -20756,17 +22055,17 @@ window.__ModuleLoader__.load({
|
|
|
20756
22055
|
}
|
|
20757
22056
|
tag$9.textContent = css$9;
|
|
20758
22057
|
var SidebarPage_module_css_default = {
|
|
20759
|
-
"
|
|
20760
|
-
"name": "rp_Ptco8a_name",
|
|
20761
|
-
"main": "rp_Ptco8a_main",
|
|
22058
|
+
"bar": "rp_Ptco8a_bar",
|
|
20762
22059
|
"content": "rp_Ptco8a_content",
|
|
20763
|
-
"icon": "rp_Ptco8a_icon",
|
|
20764
|
-
"entry": "rp_Ptco8a_entry",
|
|
20765
|
-
"title": "rp_Ptco8a_title",
|
|
20766
22060
|
"page": "rp_Ptco8a_page",
|
|
22061
|
+
"main": "rp_Ptco8a_main",
|
|
22062
|
+
"entry": "rp_Ptco8a_entry",
|
|
22063
|
+
"icon": "rp_Ptco8a_icon",
|
|
20767
22064
|
"text": "rp_Ptco8a_text",
|
|
22065
|
+
"title": "rp_Ptco8a_title",
|
|
20768
22066
|
"description": "rp_Ptco8a_description",
|
|
20769
|
-
"
|
|
22067
|
+
"message": "rp_Ptco8a_message",
|
|
22068
|
+
"name": "rp_Ptco8a_name"
|
|
20770
22069
|
};
|
|
20771
22070
|
// src/client/interface/SidebarPage.tsx
|
|
20772
22071
|
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
@@ -21106,24 +22405,24 @@ window.__ModuleLoader__.load({
|
|
|
21106
22405
|
}
|
|
21107
22406
|
tag$8.textContent = css$8;
|
|
21108
22407
|
var RecallTab_module_css_default = {
|
|
21109
|
-
"list": "rp_jl9CIq_list",
|
|
21110
|
-
"heading": "rp_jl9CIq_heading",
|
|
21111
22408
|
"bar": "rp_jl9CIq_bar",
|
|
21112
|
-
"actions": "rp_jl9CIq_actions",
|
|
21113
|
-
"form": "rp_jl9CIq_form",
|
|
21114
|
-
"meta": "rp_jl9CIq_meta",
|
|
21115
22409
|
"label": "rp_jl9CIq_label",
|
|
22410
|
+
"place": "rp_jl9CIq_place",
|
|
21116
22411
|
"area": "rp_jl9CIq_area",
|
|
22412
|
+
"name": "rp_jl9CIq_name",
|
|
22413
|
+
"note": "rp_jl9CIq_note",
|
|
22414
|
+
"page": "rp_jl9CIq_page",
|
|
22415
|
+
"form": "rp_jl9CIq_form",
|
|
21117
22416
|
"hint": "rp_jl9CIq_hint",
|
|
22417
|
+
"body": "rp_jl9CIq_body",
|
|
21118
22418
|
"field": "rp_jl9CIq_field",
|
|
21119
|
-
"place": "rp_jl9CIq_place",
|
|
21120
|
-
"item": "rp_jl9CIq_item",
|
|
21121
22419
|
"person": "rp_jl9CIq_person",
|
|
21122
|
-
"
|
|
21123
|
-
"
|
|
21124
|
-
"
|
|
21125
|
-
"
|
|
21126
|
-
"
|
|
22420
|
+
"item": "rp_jl9CIq_item",
|
|
22421
|
+
"heading": "rp_jl9CIq_heading",
|
|
22422
|
+
"list": "rp_jl9CIq_list",
|
|
22423
|
+
"meta": "rp_jl9CIq_meta",
|
|
22424
|
+
"actions": "rp_jl9CIq_actions",
|
|
22425
|
+
"error": "rp_jl9CIq_error"
|
|
21127
22426
|
};
|
|
21128
22427
|
// src/client/recall/RecallTab.tsx
|
|
21129
22428
|
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
@@ -21401,6 +22700,17 @@ window.__ModuleLoader__.load({
|
|
|
21401
22700
|
likely: "likely",
|
|
21402
22701
|
sure: "sure",
|
|
21403
22702
|
deadline: "by {when}",
|
|
22703
|
+
relations: "Relations",
|
|
22704
|
+
relationsHint: "The people you have met, with what each is to you. A dashed line is someone you are with but do not know yet.",
|
|
22705
|
+
you: "You",
|
|
22706
|
+
quests: "Quests",
|
|
22707
|
+
questsHint: "What you have promised, arranged or been told of that is not finished. What the story keeps to itself is not here.",
|
|
22708
|
+
noQuests: "Nothing yet. A promise you make, an appointment or a task you are told of appears here.",
|
|
22709
|
+
questPromise: "promise",
|
|
22710
|
+
questStory: "told",
|
|
22711
|
+
questSettled: "settled, turn {turn}",
|
|
22712
|
+
questSpan: "{from} to {to}",
|
|
22713
|
+
questWith: "With {list}",
|
|
21404
22714
|
map: "Map",
|
|
21405
22715
|
mapHint: "Places you know, set out by how many ways they are from where you are. A dashed line is a way that is closed.",
|
|
21406
22716
|
journal: "Journal",
|
|
@@ -21460,6 +22770,17 @@ window.__ModuleLoader__.load({
|
|
|
21460
22770
|
likely: "多半",
|
|
21461
22771
|
sure: "确信",
|
|
21462
22772
|
deadline: "期限:{when}",
|
|
22773
|
+
relations: "关系",
|
|
22774
|
+
relationsHint: "你遇见过的人,以及各自与你的关系。虚线表示同在一处但你还不认识的人。",
|
|
22775
|
+
you: "你",
|
|
22776
|
+
quests: "任务",
|
|
22777
|
+
questsHint: "你许下的承诺、约好的事和别人告诉你的、还没有了结的事。故事自己保密的内容不在这里。",
|
|
22778
|
+
noQuests: "暂时没有。你许下的承诺、约定或被告知的任务会出现在这里。",
|
|
22779
|
+
questPromise: "承诺",
|
|
22780
|
+
questStory: "听说",
|
|
22781
|
+
questSettled: "已了结,第 {turn} 回合",
|
|
22782
|
+
questSpan: "{from} 至 {to}",
|
|
22783
|
+
questWith: "同行:{list}",
|
|
21463
22784
|
map: "地图",
|
|
21464
22785
|
mapHint: "你知道的地方,按离你所在之处有几步路排列。虚线表示已关闭的路。",
|
|
21465
22786
|
journal: "日志",
|
|
@@ -21497,10 +22818,10 @@ window.__ModuleLoader__.load({
|
|
|
21497
22818
|
}
|
|
21498
22819
|
tag$7.textContent = css$7;
|
|
21499
22820
|
var ReferenceTab_module_css_default = {
|
|
21500
|
-
"nav": "rp_7BGO2a_nav",
|
|
21501
22821
|
"body": "rp_7BGO2a_body",
|
|
21502
|
-
"bar": "rp_7BGO2a_bar",
|
|
21503
22822
|
"page": "rp_7BGO2a_page",
|
|
22823
|
+
"bar": "rp_7BGO2a_bar",
|
|
22824
|
+
"nav": "rp_7BGO2a_nav",
|
|
21504
22825
|
"message": "rp_7BGO2a_message"
|
|
21505
22826
|
};
|
|
21506
22827
|
// src/client/reference/ReferenceTab.tsx
|
|
@@ -21610,7 +22931,7 @@ window.__ModuleLoader__.load({
|
|
|
21610
22931
|
return await response.json();
|
|
21611
22932
|
}
|
|
21612
22933
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/reference/sections/Page.module.css.mjs
|
|
21613
|
-
const css$6 = ".rp_bG1sCa_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:24px 0;font-size:13px;line-height:20px}.rp_bG1sCa_list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.rp_bG1sCa_entry{border-bottom:.5px solid var(--dsw-alias-border-l3);padding:10px 0}.rp_bG1sCa_entry:last-child{border-bottom:none}.rp_bG1sCa_head{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.rp_bG1sCa_name{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_bG1sCa_tag{color:var(--dsw-alias-state-business-primary);font-size:12px}.rp_bG1sCa_sub{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_bG1sCa_text{color:var(--dsw-alias-label-secondary);margin:4px 0 0;font-size:13px;line-height:20px}.rp_bG1sCa_meta{color:var(--dsw-alias-label-tertiary);margin:4px 0 0;font-size:12px;line-height:18px}.rp_bG1sCa_block{margin-top:16px}.rp_bG1sCa_heading{color:var(--dsw-alias-label-tertiary);margin:0 0 4px;font-size:12px;font-weight:500}.rp_bG1sCa_title{color:var(--dsw-alias-label-primary);font-size:16px;font-weight:500;line-height:24px}.rp_bG1sCa_link{font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;padding:0;font-size:14px;font-weight:500}.rp_bG1sCa_link:hover{color:var(--dsw-alias-state-business-primary)}.rp_bG1sCa_opened{border-left:.5px solid var(--dsw-alias-border-l3);margin-top:8px;padding:4px 0 4px 12px}.rp_bG1sCa_map{padding:8px 0;overflow-x:auto}.rp_bG1sCa_way{stroke:var(--dsw-alias-border-l4);stroke-width:1px}.rp_bG1sCa_closedWay{stroke:var(--dsw-alias-border-l4);stroke-width:1px;stroke-dasharray:3 3}.rp_bG1sCa_place{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l4);stroke-width:.5px}.rp_bG1sCa_here{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-state-business-primary);stroke-width:1.5px}.rp_bG1sCa_placeName{fill:var(--dsw-alias-label-primary);font-size:12px}.rp_bG1sCa_journal{flex-direction:column;gap:6px;height:100%;display:flex}.rp_bG1sCa_notes{box-sizing:border-box;width:100%;min-height:220px;font:inherit;resize:vertical;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex:none;padding:8px;font-size:13px;line-height:20px}";
|
|
22934
|
+
const css$6 = ".rp_bG1sCa_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:24px 0;font-size:13px;line-height:20px}.rp_bG1sCa_list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.rp_bG1sCa_entry{border-bottom:.5px solid var(--dsw-alias-border-l3);padding:10px 0}.rp_bG1sCa_entry:last-child{border-bottom:none}.rp_bG1sCa_head{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.rp_bG1sCa_name{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_bG1sCa_tag{color:var(--dsw-alias-state-business-primary);font-size:12px}.rp_bG1sCa_sub{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_bG1sCa_text{color:var(--dsw-alias-label-secondary);margin:4px 0 0;font-size:13px;line-height:20px}.rp_bG1sCa_meta{color:var(--dsw-alias-label-tertiary);margin:4px 0 0;font-size:12px;line-height:18px}.rp_bG1sCa_block{margin-top:16px}.rp_bG1sCa_heading{color:var(--dsw-alias-label-tertiary);margin:0 0 4px;font-size:12px;font-weight:500}.rp_bG1sCa_title{color:var(--dsw-alias-label-primary);font-size:16px;font-weight:500;line-height:24px}.rp_bG1sCa_link{font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;padding:0;font-size:14px;font-weight:500}.rp_bG1sCa_link:hover{color:var(--dsw-alias-state-business-primary)}.rp_bG1sCa_link:focus-visible{border-radius:var(--dsw-radius-sm);outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.rp_bG1sCa_opened{border-left:.5px solid var(--dsw-alias-border-l3);margin-top:8px;padding:4px 0 4px 12px}.rp_bG1sCa_map{padding:8px 0;overflow-x:auto}.rp_bG1sCa_way{stroke:var(--dsw-alias-border-l4);stroke-width:1px}.rp_bG1sCa_closedWay{stroke:var(--dsw-alias-border-l4);stroke-width:1px;stroke-dasharray:3 3}.rp_bG1sCa_place{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l4);stroke-width:.5px}.rp_bG1sCa_here{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-state-business-primary);stroke-width:1.5px}.rp_bG1sCa_placeName{fill:var(--dsw-alias-label-primary);font-size:12px}.rp_bG1sCa_journal{flex-direction:column;gap:6px;height:100%;display:flex}.rp_bG1sCa_notes{box-sizing:border-box;width:100%;min-height:220px;font:inherit;resize:vertical;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex:none;padding:8px;font-size:13px;line-height:20px}";
|
|
21614
22935
|
const key$6 = "src/client/reference/sections/Page.module.css";
|
|
21615
22936
|
let tag$6 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$6) + "]");
|
|
21616
22937
|
if (tag$6 === null) {
|
|
@@ -21621,28 +22942,28 @@ window.__ModuleLoader__.load({
|
|
|
21621
22942
|
}
|
|
21622
22943
|
tag$6.textContent = css$6;
|
|
21623
22944
|
var Page_module_css_default = {
|
|
21624
|
-
"heading": "rp_bG1sCa_heading",
|
|
21625
|
-
"block": "rp_bG1sCa_block",
|
|
21626
22945
|
"head": "rp_bG1sCa_head",
|
|
21627
|
-
"placeName": "rp_bG1sCa_placeName",
|
|
21628
|
-
"meta": "rp_bG1sCa_meta",
|
|
21629
|
-
"entry": "rp_bG1sCa_entry",
|
|
21630
|
-
"opened": "rp_bG1sCa_opened",
|
|
21631
|
-
"message": "rp_bG1sCa_message",
|
|
21632
|
-
"closedWay": "rp_bG1sCa_closedWay",
|
|
21633
|
-
"journal": "rp_bG1sCa_journal",
|
|
21634
|
-
"map": "rp_bG1sCa_map",
|
|
21635
|
-
"notes": "rp_bG1sCa_notes",
|
|
21636
|
-
"title": "rp_bG1sCa_title",
|
|
21637
|
-
"way": "rp_bG1sCa_way",
|
|
21638
22946
|
"list": "rp_bG1sCa_list",
|
|
21639
|
-
"
|
|
22947
|
+
"journal": "rp_bG1sCa_journal",
|
|
21640
22948
|
"sub": "rp_bG1sCa_sub",
|
|
21641
22949
|
"text": "rp_bG1sCa_text",
|
|
21642
|
-
"
|
|
22950
|
+
"block": "rp_bG1sCa_block",
|
|
21643
22951
|
"here": "rp_bG1sCa_here",
|
|
22952
|
+
"tag": "rp_bG1sCa_tag",
|
|
22953
|
+
"link": "rp_bG1sCa_link",
|
|
22954
|
+
"message": "rp_bG1sCa_message",
|
|
22955
|
+
"heading": "rp_bG1sCa_heading",
|
|
22956
|
+
"opened": "rp_bG1sCa_opened",
|
|
22957
|
+
"meta": "rp_bG1sCa_meta",
|
|
21644
22958
|
"place": "rp_bG1sCa_place",
|
|
21645
|
-
"
|
|
22959
|
+
"name": "rp_bG1sCa_name",
|
|
22960
|
+
"title": "rp_bG1sCa_title",
|
|
22961
|
+
"closedWay": "rp_bG1sCa_closedWay",
|
|
22962
|
+
"way": "rp_bG1sCa_way",
|
|
22963
|
+
"map": "rp_bG1sCa_map",
|
|
22964
|
+
"placeName": "rp_bG1sCa_placeName",
|
|
22965
|
+
"notes": "rp_bG1sCa_notes",
|
|
22966
|
+
"entry": "rp_bG1sCa_entry"
|
|
21646
22967
|
};
|
|
21647
22968
|
// src/client/reference/sections/Journal.tsx
|
|
21648
22969
|
/** How long typing pauses before the notes are saved. */
|
|
@@ -21809,6 +23130,29 @@ window.__ModuleLoader__.load({
|
|
|
21809
23130
|
}
|
|
21810
23131
|
return out;
|
|
21811
23132
|
}
|
|
23133
|
+
const RING = 210;
|
|
23134
|
+
const MARGIN = 16;
|
|
23135
|
+
/** The people the player's character has met on a ring around the character, nearest the top first in the order given; the ring widens when many are met. */
|
|
23136
|
+
function layoutRelations(keys) {
|
|
23137
|
+
const radius = Math.max(RING, Math.ceil(keys.length * 132 / (2 * Math.PI)));
|
|
23138
|
+
const centre = {
|
|
23139
|
+
x: MARGIN + radius + 60,
|
|
23140
|
+
y: MARGIN + radius + 13
|
|
23141
|
+
};
|
|
23142
|
+
return {
|
|
23143
|
+
nodes: keys.map((key, index) => {
|
|
23144
|
+
const angle = -Math.PI / 2 + 2 * Math.PI * index / Math.max(1, keys.length);
|
|
23145
|
+
return {
|
|
23146
|
+
key,
|
|
23147
|
+
x: Math.round(centre.x + radius * Math.cos(angle)),
|
|
23148
|
+
y: Math.round(centre.y + radius * Math.sin(angle))
|
|
23149
|
+
};
|
|
23150
|
+
}),
|
|
23151
|
+
centre,
|
|
23152
|
+
width: Math.round(centre.x * 2),
|
|
23153
|
+
height: Math.round(centre.y * 2)
|
|
23154
|
+
};
|
|
23155
|
+
}
|
|
21812
23156
|
// src/client/reference/use-reference.ts
|
|
21813
23157
|
/** How often a page on screen reads again: the story moves with every turn. */
|
|
21814
23158
|
const REFRESH_MS = 8e3;
|
|
@@ -21880,6 +23224,94 @@ window.__ModuleLoader__.load({
|
|
|
21880
23224
|
children: empty
|
|
21881
23225
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children(reading.entries) });
|
|
21882
23226
|
}
|
|
23227
|
+
// src/client/reference/sections/Relations.tsx
|
|
23228
|
+
/** The people the player's character has met around the character, each line naming what they are to each other. */
|
|
23229
|
+
function RelationsPage({ t, sessionId, visible }) {
|
|
23230
|
+
const { reading } = useReference(sessionId, "people", visible);
|
|
23231
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
23232
|
+
reading,
|
|
23233
|
+
className: Page_module_css_default.message ?? "",
|
|
23234
|
+
loading: t("loading"),
|
|
23235
|
+
failed: (message) => t("failed", { message }),
|
|
23236
|
+
empty: t("noPeople"),
|
|
23237
|
+
children: (people) => {
|
|
23238
|
+
const layout = layoutRelations(people.map((person) => person.key));
|
|
23239
|
+
const at = new Map(layout.nodes.map((node) => [node.key, node]));
|
|
23240
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23241
|
+
className: Page_module_css_default.map,
|
|
23242
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
23243
|
+
width: layout.width,
|
|
23244
|
+
height: layout.height,
|
|
23245
|
+
role: "img",
|
|
23246
|
+
"aria-label": t("relations"),
|
|
23247
|
+
children: [
|
|
23248
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("desc", { children: people.map((person) => `${person.name}${person.label === void 0 ? "" : `: ${person.label}`}`).join("; ") }),
|
|
23249
|
+
people.map((person) => {
|
|
23250
|
+
const node = at.get(person.key);
|
|
23251
|
+
if (node === void 0) return null;
|
|
23252
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
|
|
23253
|
+
className: person.label === void 0 ? Page_module_css_default.closedWay : Page_module_css_default.way,
|
|
23254
|
+
x1: layout.centre.x,
|
|
23255
|
+
y1: layout.centre.y,
|
|
23256
|
+
x2: node.x,
|
|
23257
|
+
y2: node.y
|
|
23258
|
+
}), person.label !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
23259
|
+
className: Page_module_css_default.meta,
|
|
23260
|
+
x: (layout.centre.x + node.x) / 2,
|
|
23261
|
+
y: (layout.centre.y + node.y) / 2 - 4,
|
|
23262
|
+
textAnchor: "middle",
|
|
23263
|
+
children: fitLabel(person.label)
|
|
23264
|
+
})] }, person.key);
|
|
23265
|
+
}),
|
|
23266
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
23267
|
+
transform: `translate(${layout.centre.x - 60} ${layout.centre.y - 13})`,
|
|
23268
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
23269
|
+
className: Page_module_css_default.here,
|
|
23270
|
+
width: 120,
|
|
23271
|
+
height: 26,
|
|
23272
|
+
rx: 6
|
|
23273
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
23274
|
+
className: Page_module_css_default.placeName,
|
|
23275
|
+
x: 60,
|
|
23276
|
+
y: 13,
|
|
23277
|
+
textAnchor: "middle",
|
|
23278
|
+
dominantBaseline: "central",
|
|
23279
|
+
children: t("you")
|
|
23280
|
+
})]
|
|
23281
|
+
}),
|
|
23282
|
+
people.map((person) => {
|
|
23283
|
+
const node = at.get(person.key);
|
|
23284
|
+
if (node === void 0) return null;
|
|
23285
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
23286
|
+
transform: `translate(${node.x - 60} ${node.y - 13})`,
|
|
23287
|
+
children: [
|
|
23288
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", { children: person.name }),
|
|
23289
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
23290
|
+
className: Page_module_css_default.place,
|
|
23291
|
+
width: 120,
|
|
23292
|
+
height: 26,
|
|
23293
|
+
rx: 6
|
|
23294
|
+
}),
|
|
23295
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
23296
|
+
className: Page_module_css_default.placeName,
|
|
23297
|
+
x: 60,
|
|
23298
|
+
y: 13,
|
|
23299
|
+
textAnchor: "middle",
|
|
23300
|
+
dominantBaseline: "central",
|
|
23301
|
+
children: fitLabel(person.name)
|
|
23302
|
+
})
|
|
23303
|
+
]
|
|
23304
|
+
}, `n${person.key}`);
|
|
23305
|
+
})
|
|
23306
|
+
]
|
|
23307
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23308
|
+
className: Page_module_css_default.meta,
|
|
23309
|
+
children: t("relationsHint")
|
|
23310
|
+
})]
|
|
23311
|
+
});
|
|
23312
|
+
}
|
|
23313
|
+
});
|
|
23314
|
+
}
|
|
21883
23315
|
// src/client/reference/sections/Map.tsx
|
|
21884
23316
|
/** The places the player's character knows, set out from where they are by how many ways away each is. */
|
|
21885
23317
|
function MapPage({ t, sessionId, visible }) {
|
|
@@ -22083,6 +23515,60 @@ window.__ModuleLoader__.load({
|
|
|
22083
23515
|
})
|
|
22084
23516
|
});
|
|
22085
23517
|
}
|
|
23518
|
+
/** What the player's character has been told of or taken on: promises and appointments first, then what the story has told them of. */
|
|
23519
|
+
function QuestsPage({ t, sessionId, visible }) {
|
|
23520
|
+
const { reading } = useReference(sessionId, "quests", visible);
|
|
23521
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
23522
|
+
reading,
|
|
23523
|
+
className: Page_module_css_default.message ?? "",
|
|
23524
|
+
loading: t("loading"),
|
|
23525
|
+
failed: (message) => t("failed", { message }),
|
|
23526
|
+
empty: t("noQuests"),
|
|
23527
|
+
children: (quests) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23528
|
+
className: Page_module_css_default.meta,
|
|
23529
|
+
children: t("questsHint")
|
|
23530
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
23531
|
+
className: Page_module_css_default.list,
|
|
23532
|
+
children: quests.map((quest, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
23533
|
+
className: Page_module_css_default.entry,
|
|
23534
|
+
children: [
|
|
23535
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23536
|
+
className: Page_module_css_default.head,
|
|
23537
|
+
children: [
|
|
23538
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
23539
|
+
className: Page_module_css_default.name,
|
|
23540
|
+
children: quest.text
|
|
23541
|
+
}),
|
|
23542
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
23543
|
+
className: Page_module_css_default.sub,
|
|
23544
|
+
children: quest.kind === "commitment" ? t("questPromise") : t("questStory")
|
|
23545
|
+
}),
|
|
23546
|
+
quest.status === "resolved" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
23547
|
+
className: Page_module_css_default.sub,
|
|
23548
|
+
children: t("questSettled", { turn: quest.resolvedTurn ?? quest.turn })
|
|
23549
|
+
})
|
|
23550
|
+
]
|
|
23551
|
+
}),
|
|
23552
|
+
quest.when !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
23553
|
+
className: Page_module_css_default.meta,
|
|
23554
|
+
children: [quest.until === void 0 ? quest.when : t("questSpan", {
|
|
23555
|
+
from: quest.when,
|
|
23556
|
+
to: quest.until
|
|
23557
|
+
}), quest.place === void 0 ? "" : ` · ${quest.place}`]
|
|
23558
|
+
}),
|
|
23559
|
+
quest.with !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23560
|
+
className: Page_module_css_default.meta,
|
|
23561
|
+
children: t("questWith", { list: quest.with.join(", ") })
|
|
23562
|
+
}),
|
|
23563
|
+
quest.note !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23564
|
+
className: Page_module_css_default.text,
|
|
23565
|
+
children: quest.note
|
|
23566
|
+
})
|
|
23567
|
+
]
|
|
23568
|
+
}, `${quest.kind}-${index}-${quest.text}`))
|
|
23569
|
+
})] })
|
|
23570
|
+
});
|
|
23571
|
+
}
|
|
22086
23572
|
function Block({ title, children }) {
|
|
22087
23573
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
22088
23574
|
className: Page_module_css_default.block,
|
|
@@ -22344,6 +23830,18 @@ window.__ModuleLoader__.load({
|
|
|
22344
23830
|
label: "people",
|
|
22345
23831
|
component: PeoplePage
|
|
22346
23832
|
},
|
|
23833
|
+
{
|
|
23834
|
+
id: "relations",
|
|
23835
|
+
order: 12,
|
|
23836
|
+
label: "relations",
|
|
23837
|
+
component: RelationsPage
|
|
23838
|
+
},
|
|
23839
|
+
{
|
|
23840
|
+
id: "quests",
|
|
23841
|
+
order: 15,
|
|
23842
|
+
label: "quests",
|
|
23843
|
+
component: QuestsPage
|
|
23844
|
+
},
|
|
22347
23845
|
{
|
|
22348
23846
|
id: "places",
|
|
22349
23847
|
order: 20,
|
|
@@ -22481,7 +23979,7 @@ window.__ModuleLoader__.load({
|
|
|
22481
23979
|
/** Adds the World tab beside Chat: the state of the story, by the part of the world. */
|
|
22482
23980
|
function registerWorld(ctx) {
|
|
22483
23981
|
const t = ctx.locale.bind(NAMESPACE$3);
|
|
22484
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$
|
|
23982
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$16), "roleplay: world dictionaries");
|
|
22485
23983
|
ctx.inject(["uiConversation"], (scope) => {
|
|
22486
23984
|
scope.uiConversation.views.register(worldTarget);
|
|
22487
23985
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -22505,28 +24003,28 @@ window.__ModuleLoader__.load({
|
|
|
22505
24003
|
}
|
|
22506
24004
|
tag$5.textContent = css$5;
|
|
22507
24005
|
var ChatSettingsView_module_css_default = {
|
|
22508
|
-
"pre": "rp_wLpbxW_pre",
|
|
22509
|
-
"table": "rp_wLpbxW_table",
|
|
22510
|
-
"view": "rp_wLpbxW_view",
|
|
22511
|
-
"link": "rp_wLpbxW_link",
|
|
22512
24006
|
"error": "rp_wLpbxW_error",
|
|
22513
|
-
"
|
|
22514
|
-
"
|
|
22515
|
-
"saved": "rp_wLpbxW_saved",
|
|
24007
|
+
"activityBody": "rp_wLpbxW_activityBody",
|
|
24008
|
+
"label": "rp_wLpbxW_label",
|
|
22516
24009
|
"reasons": "rp_wLpbxW_reasons",
|
|
22517
|
-
"
|
|
24010
|
+
"select": "rp_wLpbxW_select",
|
|
22518
24011
|
"title": "rp_wLpbxW_title",
|
|
22519
|
-
"
|
|
22520
|
-
"
|
|
22521
|
-
"activityBody": "rp_wLpbxW_activityBody",
|
|
24012
|
+
"link": "rp_wLpbxW_link",
|
|
24013
|
+
"message": "rp_wLpbxW_message",
|
|
22522
24014
|
"tableViewport": "rp_wLpbxW_tableViewport",
|
|
22523
|
-
"
|
|
24015
|
+
"help": "rp_wLpbxW_help",
|
|
24016
|
+
"activity": "rp_wLpbxW_activity",
|
|
22524
24017
|
"list": "rp_wLpbxW_list",
|
|
24018
|
+
"view": "rp_wLpbxW_view",
|
|
24019
|
+
"notice": "rp_wLpbxW_notice",
|
|
24020
|
+
"saved": "rp_wLpbxW_saved",
|
|
24021
|
+
"pre": "rp_wLpbxW_pre",
|
|
24022
|
+
"run": "rp_wLpbxW_run",
|
|
24023
|
+
"table": "rp_wLpbxW_table",
|
|
24024
|
+
"actions": "rp_wLpbxW_actions",
|
|
22525
24025
|
"row": "rp_wLpbxW_row",
|
|
22526
|
-
"
|
|
22527
|
-
"
|
|
22528
|
-
"help": "rp_wLpbxW_help",
|
|
22529
|
-
"message": "rp_wLpbxW_message"
|
|
24026
|
+
"description": "rp_wLpbxW_description",
|
|
24027
|
+
"field": "rp_wLpbxW_field"
|
|
22530
24028
|
};
|
|
22531
24029
|
// src/client/chat-settings/settings-api.ts
|
|
22532
24030
|
/** The chat is not a roleplay session, so it has no settings. */
|
|
@@ -24897,7 +26395,7 @@ window.__ModuleLoader__.load({
|
|
|
24897
26395
|
saved: "已保存。",
|
|
24898
26396
|
saveFailed: "无法保存设置:{message}"
|
|
24899
26397
|
}
|
|
24900
|
-
}, dictionaries$9), dictionaries$
|
|
26398
|
+
}, dictionaries$9), dictionaries$22), dictionaries$3);
|
|
24901
26399
|
// src/client/chat-settings/index.ts
|
|
24902
26400
|
const NAMESPACE$2 = "roleplay.chatSettings";
|
|
24903
26401
|
const VIEW_ID = "roleplay-settings";
|
|
@@ -24939,15 +26437,15 @@ window.__ModuleLoader__.load({
|
|
|
24939
26437
|
tag$4.textContent = css$4;
|
|
24940
26438
|
var CatalogueSettings_module_css_default = {
|
|
24941
26439
|
"title": "rp_KPhXDa_title",
|
|
24942
|
-
"section": "rp_KPhXDa_section",
|
|
24943
|
-
"problem": "rp_KPhXDa_problem",
|
|
24944
26440
|
"hint": "rp_KPhXDa_hint",
|
|
24945
|
-
"
|
|
24946
|
-
"
|
|
24947
|
-
"row": "rp_KPhXDa_row",
|
|
26441
|
+
"actions": "rp_KPhXDa_actions",
|
|
26442
|
+
"problem": "rp_KPhXDa_problem",
|
|
24948
26443
|
"keyHint": "rp_KPhXDa_keyHint",
|
|
24949
26444
|
"field": "rp_KPhXDa_field",
|
|
24950
|
-
"
|
|
26445
|
+
"row": "rp_KPhXDa_row",
|
|
26446
|
+
"label": "rp_KPhXDa_label",
|
|
26447
|
+
"section": "rp_KPhXDa_section",
|
|
26448
|
+
"keyArea": "rp_KPhXDa_keyArea"
|
|
24951
26449
|
};
|
|
24952
26450
|
// src/client/settings/AuthoringToolSettings.tsx
|
|
24953
26451
|
const boardOf = (text) => {
|
|
@@ -25179,18 +26677,18 @@ window.__ModuleLoader__.load({
|
|
|
25179
26677
|
}
|
|
25180
26678
|
tag$3.textContent = css$3;
|
|
25181
26679
|
var AssistantSettings_module_css_default = {
|
|
26680
|
+
"head": "rp_ZwzM4q_head",
|
|
26681
|
+
"fieldHint": "rp_ZwzM4q_fieldHint",
|
|
26682
|
+
"badges": "rp_ZwzM4q_badges",
|
|
25182
26683
|
"label": "rp_ZwzM4q_label",
|
|
25183
26684
|
"invalid": "rp_ZwzM4q_invalid",
|
|
25184
|
-
"field": "rp_ZwzM4q_field",
|
|
25185
|
-
"section": "rp_ZwzM4q_section",
|
|
25186
|
-
"select": "rp_ZwzM4q_select",
|
|
25187
|
-
"head": "rp_ZwzM4q_head",
|
|
25188
26685
|
"title": "rp_ZwzM4q_title",
|
|
25189
|
-
"fieldHint": "rp_ZwzM4q_fieldHint",
|
|
25190
|
-
"hint": "rp_ZwzM4q_hint",
|
|
25191
26686
|
"fields": "rp_ZwzM4q_fields",
|
|
25192
|
-
"
|
|
25193
|
-
"
|
|
26687
|
+
"reset": "rp_ZwzM4q_reset",
|
|
26688
|
+
"select": "rp_ZwzM4q_select",
|
|
26689
|
+
"section": "rp_ZwzM4q_section",
|
|
26690
|
+
"hint": "rp_ZwzM4q_hint",
|
|
26691
|
+
"field": "rp_ZwzM4q_field"
|
|
25194
26692
|
};
|
|
25195
26693
|
// src/client/settings/AssistantSettings.tsx
|
|
25196
26694
|
function ChoiceField({ t, spec, state, disabled, onEdit, onReset }) {
|
|
@@ -25336,8 +26834,7 @@ window.__ModuleLoader__.load({
|
|
|
25336
26834
|
return {
|
|
25337
26835
|
name: typeof row["name"] === "string" ? row["name"] : "",
|
|
25338
26836
|
baseUrl: typeof row["baseUrl"] === "string" ? row["baseUrl"] : "",
|
|
25339
|
-
apiKeyRef: typeof row["apiKeyRef"] === "string" ? row["apiKeyRef"] : ""
|
|
25340
|
-
apiKey: typeof row["apiKey"] === "string" ? row["apiKey"] : ""
|
|
26837
|
+
apiKeyRef: typeof row["apiKeyRef"] === "string" ? row["apiKeyRef"] : ""
|
|
25341
26838
|
};
|
|
25342
26839
|
};
|
|
25343
26840
|
/** The rows a draft text holds; the draft is only ever written by this form. */
|
|
@@ -25378,8 +26875,7 @@ window.__ModuleLoader__.load({
|
|
|
25378
26875
|
value: rows.map((row) => ({
|
|
25379
26876
|
name: row.name.trim(),
|
|
25380
26877
|
baseUrl: row.baseUrl.trim(),
|
|
25381
|
-
apiKeyRef: row.apiKeyRef.trim()
|
|
25382
|
-
...row.apiKey.trim() === "" ? {} : { apiKey: row.apiKey.trim() }
|
|
26878
|
+
apiKeyRef: row.apiKeyRef.trim()
|
|
25383
26879
|
}))
|
|
25384
26880
|
};
|
|
25385
26881
|
}
|
|
@@ -25429,21 +26925,19 @@ window.__ModuleLoader__.load({
|
|
|
25429
26925
|
abort.abort();
|
|
25430
26926
|
};
|
|
25431
26927
|
}, [ref]);
|
|
25432
|
-
const keep = (next
|
|
26928
|
+
const keep = (next) => {
|
|
25433
26929
|
if (ref === void 0) return;
|
|
25434
26930
|
setBusy(true);
|
|
25435
26931
|
storeKey(ref, next, new AbortController().signal).then((done) => {
|
|
25436
26932
|
setStatus(done);
|
|
25437
26933
|
setValue("");
|
|
25438
26934
|
setFailure(void 0);
|
|
25439
|
-
then?.();
|
|
25440
26935
|
}, (error) => {
|
|
25441
26936
|
setFailure(message$1(error));
|
|
25442
26937
|
}).finally(() => {
|
|
25443
26938
|
setBusy(false);
|
|
25444
26939
|
});
|
|
25445
26940
|
};
|
|
25446
|
-
const legacy = row.apiKey.trim();
|
|
25447
26941
|
const shown = status === void 0 ? t("catalogueKeyChecking") : status.configured ? `${t("catalogueKeySet")} (${status.source ?? "?"})` : t("catalogueKeyUnset");
|
|
25448
26942
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
25449
26943
|
className: CatalogueSettings_module_css_default.keyArea,
|
|
@@ -25509,28 +27003,6 @@ window.__ModuleLoader__.load({
|
|
|
25509
27003
|
status?.writable === false ? ` · ${t("catalogueKeyReadOnly")}` : ""
|
|
25510
27004
|
]
|
|
25511
27005
|
}),
|
|
25512
|
-
legacy !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
25513
|
-
className: CatalogueSettings_module_css_default.problem,
|
|
25514
|
-
role: "note",
|
|
25515
|
-
children: [
|
|
25516
|
-
t("catalogueKeyLegacy"),
|
|
25517
|
-
" ",
|
|
25518
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
25519
|
-
variant: "outline",
|
|
25520
|
-
size: "sm",
|
|
25521
|
-
disabled: disabled || busy || ref === void 0 || status?.writable === false,
|
|
25522
|
-
onClick: () => {
|
|
25523
|
-
keep(legacy, () => {
|
|
25524
|
-
onChange({
|
|
25525
|
-
apiKey: "",
|
|
25526
|
-
apiKeyRef: ref ?? ""
|
|
25527
|
-
});
|
|
25528
|
-
});
|
|
25529
|
-
},
|
|
25530
|
-
children: t("catalogueKeyMove")
|
|
25531
|
-
})
|
|
25532
|
-
]
|
|
25533
|
-
}),
|
|
25534
27006
|
failure !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
25535
27007
|
className: CatalogueSettings_module_css_default.problem,
|
|
25536
27008
|
role: "alert",
|
|
@@ -25642,8 +27114,7 @@ window.__ModuleLoader__.load({
|
|
|
25642
27114
|
change([...rows, {
|
|
25643
27115
|
name: "",
|
|
25644
27116
|
baseUrl: "",
|
|
25645
|
-
apiKeyRef: ""
|
|
25646
|
-
apiKey: ""
|
|
27117
|
+
apiKeyRef: ""
|
|
25647
27118
|
}]);
|
|
25648
27119
|
},
|
|
25649
27120
|
children: t("catalogueAdd")
|
|
@@ -25988,8 +27459,6 @@ window.__ModuleLoader__.load({
|
|
|
25988
27459
|
catalogueKeyReadOnly: "its source cannot be written, so it cannot be changed here",
|
|
25989
27460
|
catalogueKeyStore: "Store key",
|
|
25990
27461
|
catalogueKeyClear: "Remove key",
|
|
25991
|
-
catalogueKeyLegacy: "An earlier version saved a key as text in this profile's configuration. It is still used until you move it into the credential store; saving the settings after that removes the text.",
|
|
25992
|
-
catalogueKeyMove: "Move it to the credential store",
|
|
25993
27462
|
authoringTools: "Tools for the authoring assistants",
|
|
25994
27463
|
authoringToolsHint: "Tools that other plugins registered for everyone (a web search, an MCP server, files) which an assistant may use, for example to look up a setting you name. An assistant has none that is not ticked here, whatever else this profile registers. A tool you tick runs without asking you each time, so tick only the ones you are comfortable letting it use. The session doctor never has any.",
|
|
25995
27464
|
authoringToolsNone: "No other plugin has registered tools for everyone. A tool added to one assistant's own preset is not listed here.",
|
|
@@ -26086,8 +27555,6 @@ window.__ModuleLoader__.load({
|
|
|
26086
27555
|
catalogueKeyReadOnly: "其来源不可写入,无法在此更改",
|
|
26087
27556
|
catalogueKeyStore: "存入密钥",
|
|
26088
27557
|
catalogueKeyClear: "删除密钥",
|
|
26089
|
-
catalogueKeyLegacy: "旧版本把密钥以文本形式保存在本配置中。在你把它移入凭据存储之前仍会继续使用;之后保存设置会删除这段文本。",
|
|
26090
|
-
catalogueKeyMove: "移入凭据存储",
|
|
26091
27558
|
authoringTools: "创作助手的工具",
|
|
26092
27559
|
authoringToolsHint: "其他插件为所有人注册的工具(网络搜索、MCP 服务器、文件等),创作助手可以使用,例如查询你提到的某个设定。没有在这里勾选的工具,助手一律没有,无论这个配置档还注册了什么。你勾选的工具会直接运行,不会每次都征求你的同意,所以只勾选你放心让它使用的工具。会话医生永远没有任何工具。",
|
|
26093
27560
|
authoringToolsNone: "没有其他插件为所有人注册工具。加在某个助手自己的预设中的工具不会列在这里。",
|
|
@@ -26467,28 +27934,28 @@ window.__ModuleLoader__.load({
|
|
|
26467
27934
|
}
|
|
26468
27935
|
tag$2.textContent = css$2;
|
|
26469
27936
|
var NarrationView_module_css_default = {
|
|
27937
|
+
"preview": "rp_NFPimG_preview",
|
|
27938
|
+
"oocNote": "rp_NFPimG_oocNote",
|
|
27939
|
+
"playLine": "rp_NFPimG_playLine",
|
|
27940
|
+
"avatar": "rp_NFPimG_avatar",
|
|
27941
|
+
"playAll": "rp_NFPimG_playAll",
|
|
26470
27942
|
"words": "rp_NFPimG_words",
|
|
26471
|
-
"name": "rp_NFPimG_name",
|
|
26472
|
-
"speech": "rp_NFPimG_speech",
|
|
26473
|
-
"sceneImage": "rp_NFPimG_sceneImage",
|
|
26474
|
-
"imageButton": "rp_NFPimG_imageButton",
|
|
26475
|
-
"imageStatus": "rp_NFPimG_imageStatus",
|
|
26476
|
-
"line": "rp_NFPimG_line",
|
|
26477
|
-
"images": "rp_NFPimG_images",
|
|
26478
|
-
"imageError": "rp_NFPimG_imageError",
|
|
26479
27943
|
"oocLabel": "rp_NFPimG_oocLabel",
|
|
26480
|
-
"
|
|
26481
|
-
"
|
|
27944
|
+
"oocRefused": "rp_NFPimG_oocRefused",
|
|
27945
|
+
"diceList": "rp_NFPimG_diceList",
|
|
26482
27946
|
"note": "rp_NFPimG_note",
|
|
26483
|
-
"playAll": "rp_NFPimG_playAll",
|
|
26484
|
-
"playLine": "rp_NFPimG_playLine",
|
|
26485
27947
|
"dice": "rp_NFPimG_dice",
|
|
26486
|
-
"
|
|
27948
|
+
"images": "rp_NFPimG_images",
|
|
26487
27949
|
"diceSummary": "rp_NFPimG_diceSummary",
|
|
26488
|
-
"
|
|
26489
|
-
"
|
|
26490
|
-
"
|
|
26491
|
-
"output": "rp_NFPimG_output"
|
|
27950
|
+
"narration": "rp_NFPimG_narration",
|
|
27951
|
+
"imageButton": "rp_NFPimG_imageButton",
|
|
27952
|
+
"speech": "rp_NFPimG_speech",
|
|
27953
|
+
"output": "rp_NFPimG_output",
|
|
27954
|
+
"imageStatus": "rp_NFPimG_imageStatus",
|
|
27955
|
+
"name": "rp_NFPimG_name",
|
|
27956
|
+
"sceneImage": "rp_NFPimG_sceneImage",
|
|
27957
|
+
"imageError": "rp_NFPimG_imageError",
|
|
27958
|
+
"line": "rp_NFPimG_line"
|
|
26492
27959
|
};
|
|
26493
27960
|
// src/client/transcript/PreviewNode.tsx
|
|
26494
27961
|
/**
|
|
@@ -26748,9 +28215,9 @@ window.__ModuleLoader__.load({
|
|
|
26748
28215
|
}
|
|
26749
28216
|
tag$1.textContent = css$1;
|
|
26750
28217
|
var SuggestionsDock_module_css_default = {
|
|
26751
|
-
"lines": "rp_rWH4DG_lines",
|
|
26752
|
-
"label": "rp_rWH4DG_label",
|
|
26753
28218
|
"dock": "rp_rWH4DG_dock",
|
|
28219
|
+
"label": "rp_rWH4DG_label",
|
|
28220
|
+
"lines": "rp_rWH4DG_lines",
|
|
26754
28221
|
"card": "rp_rWH4DG_card",
|
|
26755
28222
|
"chip": "rp_rWH4DG_chip"
|
|
26756
28223
|
};
|
|
@@ -26870,16 +28337,16 @@ window.__ModuleLoader__.load({
|
|
|
26870
28337
|
}
|
|
26871
28338
|
tag.textContent = css;
|
|
26872
28339
|
var TurnsDock_module_css_default = {
|
|
26873
|
-
"select": "rp_f4YLlq_select",
|
|
26874
28340
|
"comparisonHead": "rp_f4YLlq_comparisonHead",
|
|
26875
|
-
"error": "rp_f4YLlq_error",
|
|
26876
|
-
"dock": "rp_f4YLlq_dock",
|
|
26877
|
-
"group": "rp_f4YLlq_group",
|
|
26878
|
-
"comparison": "rp_f4YLlq_comparison",
|
|
26879
|
-
"button": "rp_f4YLlq_button",
|
|
26880
28341
|
"comparisonLine": "rp_f4YLlq_comparisonLine",
|
|
26881
28342
|
"comparisonSubject": "rp_f4YLlq_comparisonSubject",
|
|
26882
|
-
"
|
|
28343
|
+
"button": "rp_f4YLlq_button",
|
|
28344
|
+
"count": "rp_f4YLlq_count",
|
|
28345
|
+
"select": "rp_f4YLlq_select",
|
|
28346
|
+
"group": "rp_f4YLlq_group",
|
|
28347
|
+
"dock": "rp_f4YLlq_dock",
|
|
28348
|
+
"error": "rp_f4YLlq_error",
|
|
28349
|
+
"comparison": "rp_f4YLlq_comparison"
|
|
26883
28350
|
};
|
|
26884
28351
|
// src/client/transcript/withdrawn.ts
|
|
26885
28352
|
/** The rows of the transcript that belong to turns the story is not at, by the key DSH gives each row. */
|
|
@@ -27452,6 +28919,7 @@ window.__ModuleLoader__.load({
|
|
|
27452
28919
|
registerAvatarsPage(ctx);
|
|
27453
28920
|
registerPresetsPage(ctx);
|
|
27454
28921
|
registerLorebooksPage(ctx);
|
|
28922
|
+
registerPromptsPage(ctx);
|
|
27455
28923
|
registerCataloguePage(ctx);
|
|
27456
28924
|
registerSessionsPage(ctx);
|
|
27457
28925
|
registerSyncPage(ctx);
|