@dsh-agentic-roleplay/core 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{authoring-tools-BGzzW6O5.js → authoring-tools-BWjEr_lF.js} +3 -3
- package/lib/authoring.js +5 -5
- package/lib/client.js +1797 -860
- package/lib/client.js.map +1 -1
- package/lib/doctor.js +1 -1
- package/lib/{hooks-BLperIIB.js → hooks-DufjUf1p.js} +10 -2
- package/lib/index.js +1292 -97
- package/lib/{lorebook-author-tools-C-cFiE6E.js → lorebook-author-tools-v-PM8Kbs.js} +10 -5
- package/lib/lorebook-authoring.js +3 -3
- package/lib/orchestration.js +6 -4
- package/lib/{pack-jail-BKFmbYP8.js → pack-jail--Ij90LeY.js} +12 -7
- package/lib/{packs-ZTG7fWut.js → packs-DWKnL4YX.js} +2 -2
- package/lib/{preset-CJLW8Mp0.js → preset-CDNyJhfU.js} +2 -2
- package/lib/{preset-author-tools-1RstgEZs.js → preset-author-tools-D7Azdlaq.js} +14 -8
- package/lib/preset-authoring.js +4 -4
- package/lib/{presets-DcPCnn8O.js → presets-D11bxWX0.js} +2 -2
- package/lib/{reflection-6qfOC5OT.js → reflection-CRCWK2E1.js} +5 -5
- package/package.json +29 -29
package/lib/client.js
CHANGED
|
@@ -26,19 +26,19 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/PageTabs.module.css.mjs
|
|
29
|
-
const css$
|
|
30
|
-
const key$
|
|
31
|
-
let tag$
|
|
32
|
-
if (tag$
|
|
33
|
-
tag$
|
|
34
|
-
tag$
|
|
35
|
-
tag$
|
|
36
|
-
document.head.appendChild(tag$
|
|
37
|
-
}
|
|
38
|
-
tag$
|
|
29
|
+
const css$33 = ".rp_Poldga_tabs{scrollbar-width:none;gap:24px;margin-bottom:-1px;display:flex;overflow-x:auto}.rp_Poldga_tabs::-webkit-scrollbar{display:none}.rp_Poldga_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_Poldga_tab:hover{color:var(--dsw-alias-label-primary)}.rp_Poldga_tab[aria-selected=true]{color:var(--dsw-alias-state-business-primary);font-weight:500;box-shadow:inset 0 -2px}.rp_Poldga_tab:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}";
|
|
30
|
+
const key$33 = "src/client/panel/PageTabs.module.css";
|
|
31
|
+
let tag$33 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$33) + "]");
|
|
32
|
+
if (tag$33 === null) {
|
|
33
|
+
tag$33 = document.createElement("style");
|
|
34
|
+
tag$33.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
35
|
+
tag$33.dataset.pluginCss = key$33;
|
|
36
|
+
document.head.appendChild(tag$33);
|
|
37
|
+
}
|
|
38
|
+
tag$33.textContent = css$33;
|
|
39
39
|
var PageTabs_module_css_default = {
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"tabs": "rp_Poldga_tabs",
|
|
41
|
+
"tab": "rp_Poldga_tab"
|
|
42
42
|
};
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/client/panel/PageTabs.tsx
|
|
@@ -82,21 +82,21 @@ window.__ModuleLoader__.load({
|
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/RoleplayPanel.module.css.mjs
|
|
85
|
-
const css$
|
|
86
|
-
const key$
|
|
87
|
-
let tag$
|
|
88
|
-
if (tag$
|
|
89
|
-
tag$
|
|
90
|
-
tag$
|
|
91
|
-
tag$
|
|
92
|
-
document.head.appendChild(tag$
|
|
85
|
+
const css$32 = ".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}}";
|
|
86
|
+
const key$32 = "src/client/panel/RoleplayPanel.module.css";
|
|
87
|
+
let tag$32 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$32) + "]");
|
|
88
|
+
if (tag$32 === null) {
|
|
89
|
+
tag$32 = document.createElement("style");
|
|
90
|
+
tag$32.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
91
|
+
tag$32.dataset.pluginCss = key$32;
|
|
92
|
+
document.head.appendChild(tag$32);
|
|
93
93
|
}
|
|
94
|
-
tag$
|
|
94
|
+
tag$32.textContent = css$32;
|
|
95
95
|
var RoleplayPanel_module_css_default = {
|
|
96
|
-
"body": "rp_ua5gBa_body",
|
|
97
|
-
"panel": "rp_ua5gBa_panel",
|
|
98
96
|
"header": "rp_ua5gBa_header",
|
|
99
|
-
"
|
|
97
|
+
"body": "rp_ua5gBa_body",
|
|
98
|
+
"title": "rp_ua5gBa_title",
|
|
99
|
+
"panel": "rp_ua5gBa_panel"
|
|
100
100
|
};
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region src/client/panel/RoleplayPanel.tsx
|
|
@@ -143,7 +143,7 @@ window.__ModuleLoader__.load({
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/client/panel/locales.ts
|
|
146
|
-
const dictionaries$
|
|
146
|
+
const dictionaries$22 = {
|
|
147
147
|
en: {
|
|
148
148
|
label: "Role Play",
|
|
149
149
|
heading: "DSH Agentic Role Play",
|
|
@@ -200,11 +200,11 @@ window.__ModuleLoader__.load({
|
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/client/panel/index.ts
|
|
203
|
-
const NAMESPACE$
|
|
203
|
+
const NAMESPACE$14 = "roleplay.panel";
|
|
204
204
|
/** Adds the Role Play entry to the sidebar and the main panel it opens. */
|
|
205
205
|
function registerPanel(ctx) {
|
|
206
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
207
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
206
|
+
const t = ctx.locale.bind(NAMESPACE$14);
|
|
207
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$14, dictionaries$22), "roleplay: panel dictionaries");
|
|
208
208
|
const pages = createPagesSource(ctx);
|
|
209
209
|
ctx.effect(() => pages.start(), "roleplay: page list");
|
|
210
210
|
const handle = createPanelStore();
|
|
@@ -216,7 +216,7 @@ window.__ModuleLoader__.load({
|
|
|
216
216
|
ctx.slots.inject("main", () => ctx.slots.register({
|
|
217
217
|
name: "main",
|
|
218
218
|
key: PANEL_ID,
|
|
219
|
-
locale: NAMESPACE$
|
|
219
|
+
locale: NAMESPACE$14,
|
|
220
220
|
store,
|
|
221
221
|
inject: () => ({ hooks: { pages: pages.store } }),
|
|
222
222
|
children: { "roleplay.page": {
|
|
@@ -229,7 +229,7 @@ window.__ModuleLoader__.load({
|
|
|
229
229
|
id: PANEL_ID,
|
|
230
230
|
order: 5,
|
|
231
231
|
label: () => t("label"),
|
|
232
|
-
locale: NAMESPACE$
|
|
232
|
+
locale: NAMESPACE$14
|
|
233
233
|
}, PanelIcon));
|
|
234
234
|
}
|
|
235
235
|
//#endregion
|
|
@@ -366,7 +366,7 @@ window.__ModuleLoader__.load({
|
|
|
366
366
|
}
|
|
367
367
|
//#endregion
|
|
368
368
|
//#region src/client/pages/catalogue/catalogue-controller.ts
|
|
369
|
-
const messageOf$
|
|
369
|
+
const messageOf$13 = (error) => error instanceof Error ? error.message : String(error);
|
|
370
370
|
/** The configured catalogues as the host sees them, read again whenever the settings change. */
|
|
371
371
|
var CatalogueController = class {
|
|
372
372
|
openChat;
|
|
@@ -407,7 +407,7 @@ window.__ModuleLoader__.load({
|
|
|
407
407
|
} catch (error) {
|
|
408
408
|
if (this.abort.signal.aborted) return;
|
|
409
409
|
this.store.update((draft) => {
|
|
410
|
-
draft.error = messageOf$
|
|
410
|
+
draft.error = messageOf$13(error);
|
|
411
411
|
if (draft.status === "loading") draft.status = "failed";
|
|
412
412
|
});
|
|
413
413
|
}
|
|
@@ -418,45 +418,45 @@ window.__ModuleLoader__.load({
|
|
|
418
418
|
};
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region \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
|
|
421
|
-
const css$
|
|
422
|
-
const key$
|
|
423
|
-
let tag$
|
|
424
|
-
if (tag$
|
|
425
|
-
tag$
|
|
426
|
-
tag$
|
|
427
|
-
tag$
|
|
428
|
-
document.head.appendChild(tag$
|
|
421
|
+
const css$31 = ".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}";
|
|
422
|
+
const key$31 = "src/client/widgets/import-card/ImportCard.module.css";
|
|
423
|
+
let tag$31 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$31) + "]");
|
|
424
|
+
if (tag$31 === null) {
|
|
425
|
+
tag$31 = document.createElement("style");
|
|
426
|
+
tag$31.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
427
|
+
tag$31.dataset.pluginCss = key$31;
|
|
428
|
+
document.head.appendChild(tag$31);
|
|
429
429
|
}
|
|
430
|
-
tag$
|
|
430
|
+
tag$31.textContent = css$31;
|
|
431
431
|
var ImportCard_module_css_default = {
|
|
432
|
+
"space": "rp_5cvtma_space",
|
|
433
|
+
"label": "rp_5cvtma_label",
|
|
434
|
+
"fieldMeta": "rp_5cvtma_fieldMeta",
|
|
432
435
|
"title": "rp_5cvtma_title",
|
|
433
436
|
"error": "rp_5cvtma_error",
|
|
434
|
-
"
|
|
435
|
-
"
|
|
436
|
-
"
|
|
437
|
+
"body": "rp_5cvtma_body",
|
|
438
|
+
"section": "rp_5cvtma_section",
|
|
439
|
+
"page": "rp_5cvtma_page",
|
|
437
440
|
"field": "rp_5cvtma_field",
|
|
438
|
-
"row": "rp_5cvtma_row",
|
|
439
|
-
"tags": "rp_5cvtma_tags",
|
|
440
|
-
"about": "rp_5cvtma_about",
|
|
441
|
-
"fieldMeta": "rp_5cvtma_fieldMeta",
|
|
442
|
-
"entryTitle": "rp_5cvtma_entryTitle",
|
|
443
|
-
"text": "rp_5cvtma_text",
|
|
444
|
-
"noPicture": "rp_5cvtma_noPicture",
|
|
445
|
-
"header": "rp_5cvtma_header",
|
|
446
441
|
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
447
|
-
"
|
|
448
|
-
"
|
|
442
|
+
"noPicture": "rp_5cvtma_noPicture",
|
|
443
|
+
"tags": "rp_5cvtma_tags",
|
|
449
444
|
"fieldHead": "rp_5cvtma_fieldHead",
|
|
450
|
-
"
|
|
451
|
-
"
|
|
445
|
+
"preview": "rp_5cvtma_preview",
|
|
446
|
+
"note": "rp_5cvtma_note",
|
|
452
447
|
"entry": "rp_5cvtma_entry",
|
|
448
|
+
"row": "rp_5cvtma_row",
|
|
453
449
|
"entryHead": "rp_5cvtma_entryHead",
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
"page": "rp_5cvtma_page",
|
|
450
|
+
"picture": "rp_5cvtma_picture",
|
|
451
|
+
"text": "rp_5cvtma_text",
|
|
457
452
|
"choice": "rp_5cvtma_choice",
|
|
458
|
-
"
|
|
459
|
-
"
|
|
453
|
+
"entryOff": "rp_5cvtma_entryOff",
|
|
454
|
+
"choiceText": "rp_5cvtma_choiceText",
|
|
455
|
+
"top": "rp_5cvtma_top",
|
|
456
|
+
"about": "rp_5cvtma_about",
|
|
457
|
+
"header": "rp_5cvtma_header",
|
|
458
|
+
"heading": "rp_5cvtma_heading",
|
|
459
|
+
"entryTitle": "rp_5cvtma_entryTitle"
|
|
460
460
|
};
|
|
461
461
|
//#endregion
|
|
462
462
|
//#region src/client/widgets/import-card/ImportCard.tsx
|
|
@@ -804,49 +804,49 @@ window.__ModuleLoader__.load({
|
|
|
804
804
|
}
|
|
805
805
|
//#endregion
|
|
806
806
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/catalogue/CataloguePage.module.css.mjs
|
|
807
|
-
const css$
|
|
808
|
-
const key$
|
|
809
|
-
let tag$
|
|
810
|
-
if (tag$
|
|
811
|
-
tag$
|
|
812
|
-
tag$
|
|
813
|
-
tag$
|
|
814
|
-
document.head.appendChild(tag$
|
|
807
|
+
const css$30 = ".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}";
|
|
808
|
+
const key$30 = "src/client/pages/catalogue/CataloguePage.module.css";
|
|
809
|
+
let tag$30 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$30) + "]");
|
|
810
|
+
if (tag$30 === null) {
|
|
811
|
+
tag$30 = document.createElement("style");
|
|
812
|
+
tag$30.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
813
|
+
tag$30.dataset.pluginCss = key$30;
|
|
814
|
+
document.head.appendChild(tag$30);
|
|
815
815
|
}
|
|
816
|
-
tag$
|
|
816
|
+
tag$30.textContent = css$30;
|
|
817
817
|
var CataloguePage_module_css_default = {
|
|
818
|
-
"notice": "rp_qK1u-G_notice",
|
|
819
|
-
"field": "rp_qK1u-G_field",
|
|
820
|
-
"message": "rp_qK1u-G_message",
|
|
821
|
-
"name": "rp_qK1u-G_name",
|
|
822
|
-
"update": "rp_qK1u-G_update",
|
|
823
|
-
"kinds": "rp_qK1u-G_kinds",
|
|
824
|
-
"warning": "rp_qK1u-G_warning",
|
|
825
|
-
"actions": "rp_qK1u-G_actions",
|
|
826
|
-
"image": "rp_qK1u-G_image",
|
|
827
|
-
"toolbar": "rp_qK1u-G_toolbar",
|
|
828
|
-
"meta": "rp_qK1u-G_meta",
|
|
829
|
-
"status": "rp_qK1u-G_status",
|
|
830
818
|
"tags": "rp_qK1u-G_tags",
|
|
819
|
+
"detail": "rp_qK1u-G_detail",
|
|
820
|
+
"body": "rp_qK1u-G_body",
|
|
821
|
+
"update": "rp_qK1u-G_update",
|
|
831
822
|
"grid": "rp_qK1u-G_grid",
|
|
823
|
+
"description": "rp_qK1u-G_description",
|
|
824
|
+
"name": "rp_qK1u-G_name",
|
|
825
|
+
"notice": "rp_qK1u-G_notice",
|
|
832
826
|
"updates": "rp_qK1u-G_updates",
|
|
827
|
+
"message": "rp_qK1u-G_message",
|
|
833
828
|
"select": "rp_qK1u-G_select",
|
|
829
|
+
"form": "rp_qK1u-G_form",
|
|
830
|
+
"card": "rp_qK1u-G_card",
|
|
831
|
+
"more": "rp_qK1u-G_more",
|
|
832
|
+
"meta": "rp_qK1u-G_meta",
|
|
833
|
+
"search": "rp_qK1u-G_search",
|
|
834
|
+
"actions": "rp_qK1u-G_actions",
|
|
835
|
+
"label": "rp_qK1u-G_label",
|
|
834
836
|
"viewport": "rp_qK1u-G_viewport",
|
|
835
|
-
"cover": "rp_qK1u-G_cover",
|
|
836
|
-
"detail": "rp_qK1u-G_detail",
|
|
837
837
|
"success": "rp_qK1u-G_success",
|
|
838
|
-
"
|
|
839
|
-
"page": "rp_qK1u-G_page",
|
|
840
|
-
"more": "rp_qK1u-G_more",
|
|
841
|
-
"placeholder": "rp_qK1u-G_placeholder",
|
|
842
|
-
"card": "rp_qK1u-G_card",
|
|
843
|
-
"body": "rp_qK1u-G_body",
|
|
838
|
+
"status": "rp_qK1u-G_status",
|
|
844
839
|
"kind": "rp_qK1u-G_kind",
|
|
845
840
|
"changes": "rp_qK1u-G_changes",
|
|
846
|
-
"
|
|
841
|
+
"field": "rp_qK1u-G_field",
|
|
842
|
+
"page": "rp_qK1u-G_page",
|
|
843
|
+
"placeholder": "rp_qK1u-G_placeholder",
|
|
844
|
+
"warning": "rp_qK1u-G_warning",
|
|
847
845
|
"spacer": "rp_qK1u-G_spacer",
|
|
848
|
-
"
|
|
849
|
-
"
|
|
846
|
+
"kinds": "rp_qK1u-G_kinds",
|
|
847
|
+
"toolbar": "rp_qK1u-G_toolbar",
|
|
848
|
+
"cover": "rp_qK1u-G_cover",
|
|
849
|
+
"image": "rp_qK1u-G_image"
|
|
850
850
|
};
|
|
851
851
|
//#endregion
|
|
852
852
|
//#region src/client/pages/catalogue/ImportUrlDialog.tsx
|
|
@@ -915,7 +915,7 @@ window.__ModuleLoader__.load({
|
|
|
915
915
|
}
|
|
916
916
|
//#endregion
|
|
917
917
|
//#region src/client/import-selection-api.ts
|
|
918
|
-
async function reply$
|
|
918
|
+
async function reply$4(response) {
|
|
919
919
|
if (!response.ok) {
|
|
920
920
|
const body = await response.json().catch(() => void 0);
|
|
921
921
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
@@ -931,7 +931,7 @@ window.__ModuleLoader__.load({
|
|
|
931
931
|
});
|
|
932
932
|
/** Sends a preset or lorebook file to the host to be read: the answer is what it offers to import. */
|
|
933
933
|
async function stageFile(kind, file, signal) {
|
|
934
|
-
return await reply$
|
|
934
|
+
return await reply$4(await fetch(`${API_PREFIX}/import/stage?kind=${kind}`, {
|
|
935
935
|
method: "POST",
|
|
936
936
|
credentials: "same-origin",
|
|
937
937
|
headers: {
|
|
@@ -944,7 +944,7 @@ window.__ModuleLoader__.load({
|
|
|
944
944
|
}
|
|
945
945
|
/** The same for a release of a catalogue, which the host downloads. */
|
|
946
946
|
async function stageRelease(kind, source, versionId, signal) {
|
|
947
|
-
return await reply$
|
|
947
|
+
return await reply$4(await fetch(`${API_PREFIX}/catalogue/stage`, post$1({
|
|
948
948
|
source,
|
|
949
949
|
versionId,
|
|
950
950
|
kind
|
|
@@ -952,20 +952,20 @@ window.__ModuleLoader__.load({
|
|
|
952
952
|
}
|
|
953
953
|
/** 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. */
|
|
954
954
|
async function importStagedPreset(choice, extra, signal) {
|
|
955
|
-
return await reply$
|
|
955
|
+
return await reply$4(await fetch(`${API_PREFIX}/presets/import/staged`, post$1({
|
|
956
956
|
...choice,
|
|
957
957
|
...extra
|
|
958
958
|
}, signal)));
|
|
959
959
|
}
|
|
960
960
|
async function importStagedLorebook(choice, extra, signal) {
|
|
961
|
-
return await reply$
|
|
961
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/import/staged`, post$1({
|
|
962
962
|
...choice,
|
|
963
963
|
...extra
|
|
964
964
|
}, signal)));
|
|
965
965
|
}
|
|
966
966
|
/** Imports a staged preset into a world, whose authoring chat turns the chosen prompts into the world's prose prompts. */
|
|
967
967
|
async function importStagedToWorld(worldId, choice, language) {
|
|
968
|
-
return await reply$
|
|
968
|
+
return await reply$4(await fetch(`${API_PREFIX}/worlds/import/preset/staged`, post$1({
|
|
969
969
|
...choice,
|
|
970
970
|
worldId,
|
|
971
971
|
language
|
|
@@ -973,21 +973,21 @@ window.__ModuleLoader__.load({
|
|
|
973
973
|
}
|
|
974
974
|
/** Imports the chosen entries of a staged lorebook as they are, with no assistant; the answer names the new lorebook. */
|
|
975
975
|
async function importVerbatimLorebook(choice, extra, signal) {
|
|
976
|
-
return await reply$
|
|
976
|
+
return await reply$4(await fetch(`${API_PREFIX}/lorebooks/import/verbatim`, post$1({
|
|
977
977
|
...choice,
|
|
978
978
|
...extra
|
|
979
979
|
}, signal)));
|
|
980
980
|
}
|
|
981
981
|
/** Imports the chosen prompts of a staged preset as they are, with no assistant; the answer names the new preset. */
|
|
982
982
|
async function importVerbatimPreset(choice, extra, signal) {
|
|
983
|
-
return await reply$
|
|
983
|
+
return await reply$4(await fetch(`${API_PREFIX}/presets/import/verbatim`, post$1({
|
|
984
984
|
...choice,
|
|
985
985
|
...extra
|
|
986
986
|
}, signal)));
|
|
987
987
|
}
|
|
988
988
|
/** Puts the chosen prompts of a staged preset into a world as its narration style, word for word, with no assistant. */
|
|
989
989
|
async function importVerbatimToWorld(worldId, choice, signal) {
|
|
990
|
-
return await reply$
|
|
990
|
+
return await reply$4(await fetch(`${API_PREFIX}/worlds/import/preset/verbatim`, post$1({
|
|
991
991
|
...choice,
|
|
992
992
|
worldId
|
|
993
993
|
}, signal)));
|
|
@@ -1038,34 +1038,34 @@ window.__ModuleLoader__.load({
|
|
|
1038
1038
|
const SAMPLING_KEYS = Object.keys(SAMPLING_RANGES);
|
|
1039
1039
|
//#endregion
|
|
1040
1040
|
//#region \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
|
|
1041
|
-
const css$
|
|
1042
|
-
const key$
|
|
1043
|
-
let tag$
|
|
1044
|
-
if (tag$
|
|
1045
|
-
tag$
|
|
1046
|
-
tag$
|
|
1047
|
-
tag$
|
|
1048
|
-
document.head.appendChild(tag$
|
|
1041
|
+
const css$29 = ".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}";
|
|
1042
|
+
const key$29 = "src/client/widgets/import-selection/ImportSelection.module.css";
|
|
1043
|
+
let tag$29 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$29) + "]");
|
|
1044
|
+
if (tag$29 === null) {
|
|
1045
|
+
tag$29 = document.createElement("style");
|
|
1046
|
+
tag$29.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
1047
|
+
tag$29.dataset.pluginCss = key$29;
|
|
1048
|
+
document.head.appendChild(tag$29);
|
|
1049
1049
|
}
|
|
1050
|
-
tag$
|
|
1050
|
+
tag$29.textContent = css$29;
|
|
1051
1051
|
var ImportSelection_module_css_default = {
|
|
1052
|
-
"meta": "rp_Jx0l4q_meta",
|
|
1053
|
-
"help": "rp_Jx0l4q_help",
|
|
1054
|
-
"extra": "rp_Jx0l4q_extra",
|
|
1055
|
-
"bar": "rp_Jx0l4q_bar",
|
|
1056
1052
|
"list": "rp_Jx0l4q_list",
|
|
1053
|
+
"bar": "rp_Jx0l4q_bar",
|
|
1054
|
+
"row": "rp_Jx0l4q_row",
|
|
1055
|
+
"error": "rp_Jx0l4q_error",
|
|
1056
|
+
"extra": "rp_Jx0l4q_extra",
|
|
1057
1057
|
"full": "rp_Jx0l4q_full",
|
|
1058
|
-
"
|
|
1059
|
-
"note": "rp_Jx0l4q_note",
|
|
1060
|
-
"body": "rp_Jx0l4q_body",
|
|
1061
|
-
"sampling": "rp_Jx0l4q_sampling",
|
|
1058
|
+
"help": "rp_Jx0l4q_help",
|
|
1062
1059
|
"text": "rp_Jx0l4q_text",
|
|
1063
|
-
"
|
|
1064
|
-
"
|
|
1060
|
+
"sampling": "rp_Jx0l4q_sampling",
|
|
1061
|
+
"body": "rp_Jx0l4q_body",
|
|
1062
|
+
"note": "rp_Jx0l4q_note",
|
|
1063
|
+
"count": "rp_Jx0l4q_count",
|
|
1064
|
+
"meta": "rp_Jx0l4q_meta"
|
|
1065
1065
|
};
|
|
1066
1066
|
//#endregion
|
|
1067
1067
|
//#region src/client/widgets/import-selection/ImportSelection.tsx
|
|
1068
|
-
const messageOf$
|
|
1068
|
+
const messageOf$12 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
1069
1069
|
/**
|
|
1070
1070
|
* 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.
|
|
1071
1071
|
* What the caller needs besides the choice (a name for the new library entry) goes in as `children`.
|
|
@@ -1098,7 +1098,7 @@ window.__ModuleLoader__.load({
|
|
|
1098
1098
|
knownBy
|
|
1099
1099
|
}).then(onClose, (problem) => {
|
|
1100
1100
|
setBusy(false);
|
|
1101
|
-
setFailure(messageOf$
|
|
1101
|
+
setFailure(messageOf$12(problem));
|
|
1102
1102
|
});
|
|
1103
1103
|
};
|
|
1104
1104
|
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) })] : []);
|
|
@@ -1299,7 +1299,7 @@ window.__ModuleLoader__.load({
|
|
|
1299
1299
|
const date = new Date(iso);
|
|
1300
1300
|
return Number.isNaN(date.getTime()) ? iso : date.toLocaleDateString();
|
|
1301
1301
|
};
|
|
1302
|
-
const messageOf$
|
|
1302
|
+
const messageOf$11 = (problem) => problem instanceof Error ? problem.message : String(problem);
|
|
1303
1303
|
/** One entry of a catalogue: what it says about itself, its releases, and installing, updating or converting one of them. */
|
|
1304
1304
|
function WorldDialog({ t, source, id, name, kind, onClose, onChanged, openChat, onReview }) {
|
|
1305
1305
|
const [detail, setDetail] = (0, react.useState)();
|
|
@@ -1316,7 +1316,7 @@ window.__ModuleLoader__.load({
|
|
|
1316
1316
|
setDetail(loaded);
|
|
1317
1317
|
setVersionId(loaded.versions[0]?.id ?? "");
|
|
1318
1318
|
}, (problem) => {
|
|
1319
|
-
if (!abort.signal.aborted) setError(messageOf$
|
|
1319
|
+
if (!abort.signal.aborted) setError(messageOf$11(problem));
|
|
1320
1320
|
});
|
|
1321
1321
|
return () => {
|
|
1322
1322
|
abort.abort();
|
|
@@ -1353,7 +1353,7 @@ window.__ModuleLoader__.load({
|
|
|
1353
1353
|
}, (problem) => {
|
|
1354
1354
|
setBusy(void 0);
|
|
1355
1355
|
if (problem instanceof InstallConflict && problem.reason !== "exists") setConflict(problem);
|
|
1356
|
-
else setFailure(t("installFailed", { message: messageOf$
|
|
1356
|
+
else setFailure(t("installFailed", { message: messageOf$11(problem) }));
|
|
1357
1357
|
});
|
|
1358
1358
|
};
|
|
1359
1359
|
const runConvert = () => {
|
|
@@ -1369,7 +1369,7 @@ window.__ModuleLoader__.load({
|
|
|
1369
1369
|
});
|
|
1370
1370
|
}, (problem) => {
|
|
1371
1371
|
setBusy(void 0);
|
|
1372
|
-
setFailure(t("convertFailed", { message: messageOf$
|
|
1372
|
+
setFailure(t("convertFailed", { message: messageOf$11(problem) }));
|
|
1373
1373
|
});
|
|
1374
1374
|
};
|
|
1375
1375
|
const stage = (kind) => {
|
|
@@ -1381,7 +1381,7 @@ window.__ModuleLoader__.load({
|
|
|
1381
1381
|
setSelecting(preview);
|
|
1382
1382
|
}, (problem) => {
|
|
1383
1383
|
setBusy(void 0);
|
|
1384
|
-
setFailure(t(kind === "preset" ? "importPresetFailed" : "importLorebookFailed", { message: messageOf$
|
|
1384
|
+
setFailure(t(kind === "preset" ? "importPresetFailed" : "importLorebookFailed", { message: messageOf$11(problem) }));
|
|
1385
1385
|
});
|
|
1386
1386
|
};
|
|
1387
1387
|
const runPreset = () => {
|
|
@@ -2031,7 +2031,7 @@ window.__ModuleLoader__.load({
|
|
|
2031
2031
|
}
|
|
2032
2032
|
//#endregion
|
|
2033
2033
|
//#region src/client/widgets/import-card/locales.ts
|
|
2034
|
-
const dictionaries$
|
|
2034
|
+
const dictionaries$21 = {
|
|
2035
2035
|
en: {
|
|
2036
2036
|
ic_title: "Import a character card",
|
|
2037
2037
|
ic_source: "A {spec} card{converted}.",
|
|
@@ -2103,7 +2103,7 @@ window.__ModuleLoader__.load({
|
|
|
2103
2103
|
};
|
|
2104
2104
|
//#endregion
|
|
2105
2105
|
//#region src/client/widgets/import-selection/locales.ts
|
|
2106
|
-
const dictionaries$
|
|
2106
|
+
const dictionaries$20 = {
|
|
2107
2107
|
en: {
|
|
2108
2108
|
is_title_preset: "Choose what to import from {name}",
|
|
2109
2109
|
is_title_lorebook: "Choose what to import from {name}",
|
|
@@ -2187,7 +2187,7 @@ window.__ModuleLoader__.load({
|
|
|
2187
2187
|
is_failed: "无法导入:{message}"
|
|
2188
2188
|
}
|
|
2189
2189
|
};
|
|
2190
|
-
const dictionaries$
|
|
2190
|
+
const dictionaries$19 = withDictionaries(withDictionaries({
|
|
2191
2191
|
en: {
|
|
2192
2192
|
nav: "Catalogue",
|
|
2193
2193
|
loading: "Loading worlds…",
|
|
@@ -2374,14 +2374,14 @@ window.__ModuleLoader__.load({
|
|
|
2374
2374
|
convertNotStarted: "世界“{name}”已创建,但转换没有开始:{failure}。请打开它的创作对话,自己发送导入消息。",
|
|
2375
2375
|
openChat: "打开对话"
|
|
2376
2376
|
}
|
|
2377
|
-
}, dictionaries$
|
|
2377
|
+
}, dictionaries$20), dictionaries$21);
|
|
2378
2378
|
//#endregion
|
|
2379
2379
|
//#region src/client/pages/catalogue/index.ts
|
|
2380
|
-
const NAMESPACE$
|
|
2380
|
+
const NAMESPACE$13 = "roleplay.catalogue";
|
|
2381
2381
|
/** Adds the Catalogue page to the Role Play panel: worlds of the catalogues set up in the settings. */
|
|
2382
2382
|
function registerCataloguePage(ctx) {
|
|
2383
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
2384
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
2383
|
+
const t = ctx.locale.bind(NAMESPACE$13);
|
|
2384
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$13, dictionaries$19), "roleplay: catalogue dictionaries");
|
|
2385
2385
|
const catalogue = new CatalogueController(createChatOpener(ctx));
|
|
2386
2386
|
ctx.effect(() => () => {
|
|
2387
2387
|
catalogue.dispose();
|
|
@@ -2403,7 +2403,7 @@ window.__ModuleLoader__.load({
|
|
|
2403
2403
|
id: "catalogue",
|
|
2404
2404
|
order: 3,
|
|
2405
2405
|
label: () => t("nav"),
|
|
2406
|
-
locale: NAMESPACE$
|
|
2406
|
+
locale: NAMESPACE$13,
|
|
2407
2407
|
inject: () => catalogue.inject()
|
|
2408
2408
|
}, CataloguePage));
|
|
2409
2409
|
}
|
|
@@ -2465,7 +2465,7 @@ window.__ModuleLoader__.load({
|
|
|
2465
2465
|
}
|
|
2466
2466
|
//#endregion
|
|
2467
2467
|
//#region src/client/pages/avatars/avatars-controller.ts
|
|
2468
|
-
const messageOf$
|
|
2468
|
+
const messageOf$10 = (error) => error instanceof Error ? error.message : String(error);
|
|
2469
2469
|
/** Reads the player avatars from the host and makes and removes them. */
|
|
2470
2470
|
var AvatarsController = class {
|
|
2471
2471
|
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
@@ -2512,7 +2512,7 @@ window.__ModuleLoader__.load({
|
|
|
2512
2512
|
} catch (error) {
|
|
2513
2513
|
if (this.abort.signal.aborted) return;
|
|
2514
2514
|
this.store.update((draft) => {
|
|
2515
|
-
draft.error = messageOf$
|
|
2515
|
+
draft.error = messageOf$10(error);
|
|
2516
2516
|
if (draft.avatars === void 0) draft.status = "failed";
|
|
2517
2517
|
});
|
|
2518
2518
|
} finally {
|
|
@@ -2922,51 +2922,51 @@ window.__ModuleLoader__.load({
|
|
|
2922
2922
|
const isDirty = (character, draft) => Object.keys(editOf$1(character, draft)).length > 0;
|
|
2923
2923
|
//#endregion
|
|
2924
2924
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/CharactersPanel.module.css.mjs
|
|
2925
|
-
const css$
|
|
2926
|
-
const key$
|
|
2927
|
-
let tag$
|
|
2928
|
-
if (tag$
|
|
2929
|
-
tag$
|
|
2930
|
-
tag$
|
|
2931
|
-
tag$
|
|
2932
|
-
document.head.appendChild(tag$
|
|
2925
|
+
const css$28 = ".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_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}}";
|
|
2926
|
+
const key$28 = "src/client/world-editor/CharactersPanel.module.css";
|
|
2927
|
+
let tag$28 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$28) + "]");
|
|
2928
|
+
if (tag$28 === null) {
|
|
2929
|
+
tag$28 = document.createElement("style");
|
|
2930
|
+
tag$28.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
2931
|
+
tag$28.dataset.pluginCss = key$28;
|
|
2932
|
+
document.head.appendChild(tag$28);
|
|
2933
2933
|
}
|
|
2934
|
-
tag$
|
|
2934
|
+
tag$28.textContent = css$28;
|
|
2935
2935
|
var CharactersPanel_module_css_default = {
|
|
2936
|
-
"
|
|
2936
|
+
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
2937
2937
|
"tabs": "rp_5ZMIxq_tabs",
|
|
2938
|
-
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
2939
|
-
"portraitError": "rp_5ZMIxq_portraitError",
|
|
2940
2938
|
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
2941
|
-
"
|
|
2942
|
-
"grid": "rp_5ZMIxq_grid",
|
|
2943
|
-
"section": "rp_5ZMIxq_section",
|
|
2944
|
-
"panel": "rp_5ZMIxq_panel",
|
|
2945
|
-
"goal": "rp_5ZMIxq_goal",
|
|
2946
|
-
"error": "rp_5ZMIxq_error",
|
|
2947
|
-
"sheet": "rp_5ZMIxq_sheet",
|
|
2948
|
-
"empty": "rp_5ZMIxq_empty",
|
|
2939
|
+
"barText": "rp_5ZMIxq_barText",
|
|
2949
2940
|
"tab": "rp_5ZMIxq_tab",
|
|
2950
2941
|
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
2951
|
-
"
|
|
2942
|
+
"goal": "rp_5ZMIxq_goal",
|
|
2943
|
+
"body": "rp_5ZMIxq_body",
|
|
2944
|
+
"portraitError": "rp_5ZMIxq_portraitError",
|
|
2945
|
+
"bar": "rp_5ZMIxq_bar",
|
|
2946
|
+
"wide": "rp_5ZMIxq_wide",
|
|
2947
|
+
"panel": "rp_5ZMIxq_panel",
|
|
2948
|
+
"nameInput": "rp_5ZMIxq_nameInput",
|
|
2949
|
+
"placeholder": "rp_5ZMIxq_placeholder",
|
|
2950
|
+
"error": "rp_5ZMIxq_error",
|
|
2951
|
+
"area": "rp_5ZMIxq_area",
|
|
2952
|
+
"grid": "rp_5ZMIxq_grid",
|
|
2952
2953
|
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
2954
|
+
"help": "rp_5ZMIxq_help",
|
|
2955
|
+
"head": "rp_5ZMIxq_head",
|
|
2956
|
+
"initial": "rp_5ZMIxq_initial",
|
|
2957
|
+
"empty": "rp_5ZMIxq_empty",
|
|
2958
|
+
"section": "rp_5ZMIxq_section",
|
|
2959
|
+
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
2953
2960
|
"select": "rp_5ZMIxq_select",
|
|
2954
|
-
"
|
|
2955
|
-
"bar": "rp_5ZMIxq_bar",
|
|
2956
|
-
"portrait": "rp_5ZMIxq_portrait",
|
|
2961
|
+
"meta": "rp_5ZMIxq_meta",
|
|
2957
2962
|
"field": "rp_5ZMIxq_field",
|
|
2958
|
-
"
|
|
2959
|
-
"
|
|
2960
|
-
"body": "rp_5ZMIxq_body",
|
|
2961
|
-
"placeholder": "rp_5ZMIxq_placeholder",
|
|
2963
|
+
"sheet": "rp_5ZMIxq_sheet",
|
|
2964
|
+
"row": "rp_5ZMIxq_row",
|
|
2962
2965
|
"tabOn": "rp_5ZMIxq_tabOn",
|
|
2966
|
+
"portrait": "rp_5ZMIxq_portrait",
|
|
2963
2967
|
"missing": "rp_5ZMIxq_missing",
|
|
2964
2968
|
"label": "rp_5ZMIxq_label",
|
|
2965
|
-
"
|
|
2966
|
-
"area": "rp_5ZMIxq_area",
|
|
2967
|
-
"meta": "rp_5ZMIxq_meta",
|
|
2968
|
-
"barText": "rp_5ZMIxq_barText",
|
|
2969
|
-
"wide": "rp_5ZMIxq_wide"
|
|
2969
|
+
"voiceInline": "rp_5ZMIxq_voiceInline"
|
|
2970
2970
|
};
|
|
2971
2971
|
//#endregion
|
|
2972
2972
|
//#region src/client/world-editor/EditorTabs.tsx
|
|
@@ -4680,50 +4680,50 @@ window.__ModuleLoader__.load({
|
|
|
4680
4680
|
}
|
|
4681
4681
|
//#endregion
|
|
4682
4682
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/RelationsPanel.module.css.mjs
|
|
4683
|
-
const css$
|
|
4684
|
-
const key$
|
|
4685
|
-
let tag$
|
|
4686
|
-
if (tag$
|
|
4687
|
-
tag$
|
|
4688
|
-
tag$
|
|
4689
|
-
tag$
|
|
4690
|
-
document.head.appendChild(tag$
|
|
4683
|
+
const css$27 = ".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}}";
|
|
4684
|
+
const key$27 = "src/client/world-editor/RelationsPanel.module.css";
|
|
4685
|
+
let tag$27 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$27) + "]");
|
|
4686
|
+
if (tag$27 === null) {
|
|
4687
|
+
tag$27 = document.createElement("style");
|
|
4688
|
+
tag$27.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
4689
|
+
tag$27.dataset.pluginCss = key$27;
|
|
4690
|
+
document.head.appendChild(tag$27);
|
|
4691
4691
|
}
|
|
4692
|
-
tag$
|
|
4692
|
+
tag$27.textContent = css$27;
|
|
4693
4693
|
var RelationsPanel_module_css_default = {
|
|
4694
|
-
"
|
|
4695
|
-
"status": "rp_7pEHTW_status",
|
|
4696
|
-
"node_character": "rp_7pEHTW_node_character",
|
|
4697
|
-
"actions": "rp_7pEHTW_actions",
|
|
4694
|
+
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4698
4695
|
"empty": "rp_7pEHTW_empty",
|
|
4699
|
-
"
|
|
4696
|
+
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4697
|
+
"node_faction": "rp_7pEHTW_node_faction",
|
|
4698
|
+
"node_character": "rp_7pEHTW_node_character",
|
|
4699
|
+
"error": "rp_7pEHTW_error",
|
|
4700
|
+
"status": "rp_7pEHTW_status",
|
|
4701
|
+
"node_location": "rp_7pEHTW_node_location",
|
|
4700
4702
|
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
4703
|
+
"perspective": "rp_7pEHTW_perspective",
|
|
4704
|
+
"actions": "rp_7pEHTW_actions",
|
|
4705
|
+
"metrics": "rp_7pEHTW_metrics",
|
|
4706
|
+
"graph": "rp_7pEHTW_graph",
|
|
4707
|
+
"head": "rp_7pEHTW_head",
|
|
4708
|
+
"notice": "rp_7pEHTW_notice",
|
|
4709
|
+
"toolbar": "rp_7pEHTW_toolbar",
|
|
4701
4710
|
"wide": "rp_7pEHTW_wide",
|
|
4702
|
-
"inspector": "rp_7pEHTW_inspector",
|
|
4703
|
-
"node_item": "rp_7pEHTW_node_item",
|
|
4704
4711
|
"entities": "rp_7pEHTW_entities",
|
|
4705
|
-
"
|
|
4706
|
-
"
|
|
4707
|
-
"
|
|
4708
|
-
"head": "rp_7pEHTW_head",
|
|
4709
|
-
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4710
|
-
"form": "rp_7pEHTW_form",
|
|
4711
|
-
"edge": "rp_7pEHTW_edge",
|
|
4712
|
-
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4712
|
+
"node_item": "rp_7pEHTW_node_item",
|
|
4713
|
+
"graphEdge": "rp_7pEHTW_graphEdge",
|
|
4714
|
+
"check": "rp_7pEHTW_check",
|
|
4713
4715
|
"node": "rp_7pEHTW_node",
|
|
4714
|
-
"perspective": "rp_7pEHTW_perspective",
|
|
4715
4716
|
"workspace": "rp_7pEHTW_workspace",
|
|
4716
|
-
"notice": "rp_7pEHTW_notice",
|
|
4717
|
-
"node_faction": "rp_7pEHTW_node_faction",
|
|
4718
|
-
"graphEdge": "rp_7pEHTW_graphEdge",
|
|
4719
|
-
"node_location": "rp_7pEHTW_node_location",
|
|
4720
4717
|
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4721
|
-
"
|
|
4722
|
-
"
|
|
4718
|
+
"edge": "rp_7pEHTW_edge",
|
|
4719
|
+
"filterOn": "rp_7pEHTW_filterOn",
|
|
4723
4720
|
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
4721
|
+
"space": "rp_7pEHTW_space",
|
|
4722
|
+
"inspector": "rp_7pEHTW_inspector",
|
|
4724
4723
|
"list": "rp_7pEHTW_list",
|
|
4725
|
-
"
|
|
4726
|
-
"panel": "rp_7pEHTW_panel"
|
|
4724
|
+
"form": "rp_7pEHTW_form",
|
|
4725
|
+
"panel": "rp_7pEHTW_panel",
|
|
4726
|
+
"filter": "rp_7pEHTW_filter"
|
|
4727
4727
|
};
|
|
4728
4728
|
//#endregion
|
|
4729
4729
|
//#region src/client/world-editor/RelationsPanel.tsx
|
|
@@ -5992,7 +5992,7 @@ window.__ModuleLoader__.load({
|
|
|
5992
5992
|
const { min, max } = STRIP_HEIGHTS[surface];
|
|
5993
5993
|
return Math.min(max, Math.max(min, Math.round(height)));
|
|
5994
5994
|
}
|
|
5995
|
-
const text$
|
|
5995
|
+
const text$2 = (params, name) => {
|
|
5996
5996
|
const value = params[name];
|
|
5997
5997
|
if (typeof value !== "string") throw new Error(`${name} must be text`);
|
|
5998
5998
|
return value;
|
|
@@ -6022,7 +6022,7 @@ window.__ModuleLoader__.load({
|
|
|
6022
6022
|
if (!this.env.actions.includes(action)) throw new Error(`the pack did not ask for "${action}" in its pack.json actions`);
|
|
6023
6023
|
}
|
|
6024
6024
|
words(params) {
|
|
6025
|
-
const words = text$
|
|
6025
|
+
const words = text$2(params, "text").trim();
|
|
6026
6026
|
if (words === "") throw new Error("there are no words");
|
|
6027
6027
|
if (words.length > 2e3) throw new Error(`words are at most ${MAX_WORDS} characters`);
|
|
6028
6028
|
return words;
|
|
@@ -6068,12 +6068,12 @@ window.__ModuleLoader__.load({
|
|
|
6068
6068
|
await this.env.open(surface);
|
|
6069
6069
|
return null;
|
|
6070
6070
|
}
|
|
6071
|
-
case "storage.get": return await this.env.storage("get", text$
|
|
6071
|
+
case "storage.get": return await this.env.storage("get", text$2(params, "key"));
|
|
6072
6072
|
case "storage.set":
|
|
6073
|
-
await this.env.storage("set", text$
|
|
6073
|
+
await this.env.storage("set", text$2(params, "key"), params["value"]);
|
|
6074
6074
|
return null;
|
|
6075
6075
|
case "storage.remove":
|
|
6076
|
-
await this.env.storage("remove", text$
|
|
6076
|
+
await this.env.storage("remove", text$2(params, "key"));
|
|
6077
6077
|
return null;
|
|
6078
6078
|
case "history": {
|
|
6079
6079
|
const asked = params["limit"];
|
|
@@ -6087,23 +6087,23 @@ window.__ModuleLoader__.load({
|
|
|
6087
6087
|
};
|
|
6088
6088
|
//#endregion
|
|
6089
6089
|
//#region \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
|
|
6090
|
-
const css$
|
|
6091
|
-
const key$
|
|
6092
|
-
let tag$
|
|
6093
|
-
if (tag$
|
|
6094
|
-
tag$
|
|
6095
|
-
tag$
|
|
6096
|
-
tag$
|
|
6097
|
-
document.head.appendChild(tag$
|
|
6090
|
+
const css$26 = ".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}";
|
|
6091
|
+
const key$26 = "src/client/widgets/pack-frame/PackFrame.module.css";
|
|
6092
|
+
let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
|
|
6093
|
+
if (tag$26 === null) {
|
|
6094
|
+
tag$26 = document.createElement("style");
|
|
6095
|
+
tag$26.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6096
|
+
tag$26.dataset.pluginCss = key$26;
|
|
6097
|
+
document.head.appendChild(tag$26);
|
|
6098
6098
|
}
|
|
6099
|
-
tag$
|
|
6099
|
+
tag$26.textContent = css$26;
|
|
6100
6100
|
var PackFrame_module_css_default = {
|
|
6101
6101
|
"frame": "rp_h_sbFq_frame",
|
|
6102
|
-
"tab": "rp_h_sbFq_tab",
|
|
6103
6102
|
"hud": "rp_h_sbFq_hud",
|
|
6103
|
+
"tab": "rp_h_sbFq_tab",
|
|
6104
6104
|
"fill": "rp_h_sbFq_fill",
|
|
6105
|
-
"
|
|
6106
|
-
"
|
|
6105
|
+
"problems": "rp_h_sbFq_problems",
|
|
6106
|
+
"message": "rp_h_sbFq_message"
|
|
6107
6107
|
};
|
|
6108
6108
|
//#endregion
|
|
6109
6109
|
//#region src/client/widgets/pack-frame/theme.ts
|
|
@@ -6355,24 +6355,24 @@ window.__ModuleLoader__.load({
|
|
|
6355
6355
|
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;
|
|
6356
6356
|
//#endregion
|
|
6357
6357
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/PacksPanel.module.css.mjs
|
|
6358
|
-
const css$
|
|
6359
|
-
const key$
|
|
6360
|
-
let tag$
|
|
6361
|
-
if (tag$
|
|
6362
|
-
tag$
|
|
6363
|
-
tag$
|
|
6364
|
-
tag$
|
|
6365
|
-
document.head.appendChild(tag$
|
|
6358
|
+
const css$25 = ".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}";
|
|
6359
|
+
const key$25 = "src/client/world-editor/PacksPanel.module.css";
|
|
6360
|
+
let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
|
|
6361
|
+
if (tag$25 === null) {
|
|
6362
|
+
tag$25 = document.createElement("style");
|
|
6363
|
+
tag$25.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6364
|
+
tag$25.dataset.pluginCss = key$25;
|
|
6365
|
+
document.head.appendChild(tag$25);
|
|
6366
6366
|
}
|
|
6367
|
-
tag$
|
|
6367
|
+
tag$25.textContent = css$25;
|
|
6368
6368
|
var PacksPanel_module_css_default = {
|
|
6369
|
-
"files": "rp_FLaP7q_files",
|
|
6370
6369
|
"note": "rp_FLaP7q_note",
|
|
6370
|
+
"log": "rp_FLaP7q_log",
|
|
6371
6371
|
"stage": "rp_FLaP7q_stage",
|
|
6372
|
+
"files": "rp_FLaP7q_files",
|
|
6372
6373
|
"group": "rp_FLaP7q_group",
|
|
6373
6374
|
"controls": "rp_FLaP7q_controls",
|
|
6374
|
-
"stageTall": "rp_FLaP7q_stageTall"
|
|
6375
|
-
"log": "rp_FLaP7q_log"
|
|
6375
|
+
"stageTall": "rp_FLaP7q_stageTall"
|
|
6376
6376
|
};
|
|
6377
6377
|
//#endregion
|
|
6378
6378
|
//#region src/client/world-editor/PacksPanel.tsx
|
|
@@ -7269,14 +7269,14 @@ window.__ModuleLoader__.load({
|
|
|
7269
7269
|
}
|
|
7270
7270
|
//#endregion
|
|
7271
7271
|
//#region src/client/lorebooks-api.ts
|
|
7272
|
-
async function reply$
|
|
7272
|
+
async function reply$3(response) {
|
|
7273
7273
|
if (!response.ok) {
|
|
7274
7274
|
const body = await response.json().catch(() => void 0);
|
|
7275
7275
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
7276
7276
|
}
|
|
7277
7277
|
return await response.json();
|
|
7278
7278
|
}
|
|
7279
|
-
const json$
|
|
7279
|
+
const json$2 = (method, body) => ({
|
|
7280
7280
|
method,
|
|
7281
7281
|
credentials: "same-origin",
|
|
7282
7282
|
headers: { "content-type": "application/json" },
|
|
@@ -7284,38 +7284,38 @@ window.__ModuleLoader__.load({
|
|
|
7284
7284
|
});
|
|
7285
7285
|
const named = (name) => `name=${encodeURIComponent(name)}`;
|
|
7286
7286
|
async function listLorebooks(signal) {
|
|
7287
|
-
return await reply$
|
|
7287
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks`, {
|
|
7288
7288
|
credentials: "same-origin",
|
|
7289
7289
|
signal
|
|
7290
7290
|
}));
|
|
7291
7291
|
}
|
|
7292
7292
|
async function readLorebook(name, signal) {
|
|
7293
|
-
return await reply$
|
|
7293
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks/item?${named(name)}`, {
|
|
7294
7294
|
credentials: "same-origin",
|
|
7295
7295
|
signal
|
|
7296
7296
|
}));
|
|
7297
7297
|
}
|
|
7298
7298
|
async function createLorebook(request, signal) {
|
|
7299
|
-
return await reply$
|
|
7300
|
-
...json$
|
|
7299
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks`, {
|
|
7300
|
+
...json$2("POST", request),
|
|
7301
7301
|
signal
|
|
7302
7302
|
}));
|
|
7303
7303
|
}
|
|
7304
7304
|
async function updateLorebookInfo(name, change, signal) {
|
|
7305
|
-
return await reply$
|
|
7306
|
-
...json$
|
|
7305
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks/item?${named(name)}`, {
|
|
7306
|
+
...json$2("PUT", change),
|
|
7307
7307
|
signal
|
|
7308
7308
|
}));
|
|
7309
7309
|
}
|
|
7310
7310
|
async function writeLorebookEntry(name, entry, signal) {
|
|
7311
7311
|
const { id, ...rest } = entry;
|
|
7312
|
-
return await reply$
|
|
7313
|
-
...json$
|
|
7312
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks/entry?${named(name)}&id=${encodeURIComponent(id)}`, {
|
|
7313
|
+
...json$2("PUT", rest),
|
|
7314
7314
|
signal
|
|
7315
7315
|
}));
|
|
7316
7316
|
}
|
|
7317
7317
|
async function removeLorebookEntry(name, id, signal) {
|
|
7318
|
-
return await reply$
|
|
7318
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks/entry?${named(name)}&id=${encodeURIComponent(id)}`, {
|
|
7319
7319
|
method: "DELETE",
|
|
7320
7320
|
credentials: "same-origin",
|
|
7321
7321
|
signal
|
|
@@ -7327,30 +7327,30 @@ window.__ModuleLoader__.load({
|
|
|
7327
7327
|
credentials: "same-origin",
|
|
7328
7328
|
signal
|
|
7329
7329
|
});
|
|
7330
|
-
if (!response.ok) await reply$
|
|
7330
|
+
if (!response.ok) await reply$3(response);
|
|
7331
7331
|
}
|
|
7332
7332
|
/** Opens the authoring chat of a lorebook. */
|
|
7333
7333
|
async function authorLorebook(name, language, signal) {
|
|
7334
|
-
return await reply$
|
|
7335
|
-
...json$
|
|
7334
|
+
return await reply$3(await fetch(`${API_PREFIX}/lorebooks/authoring?${named(name)}`, {
|
|
7335
|
+
...json$2("POST", { language }),
|
|
7336
7336
|
signal
|
|
7337
7337
|
}));
|
|
7338
7338
|
}
|
|
7339
7339
|
async function loadStoryLorebooks(session, signal) {
|
|
7340
|
-
return await reply$
|
|
7340
|
+
return await reply$3(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}`, {
|
|
7341
7341
|
credentials: "same-origin",
|
|
7342
7342
|
signal
|
|
7343
7343
|
}));
|
|
7344
7344
|
}
|
|
7345
7345
|
/** Copies a library lorebook into the chat's story; the notes say what could not be carried over. */
|
|
7346
7346
|
async function addStoryLorebook(session, name, signal) {
|
|
7347
|
-
return await reply$
|
|
7348
|
-
...json$
|
|
7347
|
+
return await reply$3(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}`, {
|
|
7348
|
+
...json$2("POST", { name }),
|
|
7349
7349
|
signal
|
|
7350
7350
|
}));
|
|
7351
7351
|
}
|
|
7352
7352
|
async function removeStoryLorebook(session, name, signal) {
|
|
7353
|
-
return await reply$
|
|
7353
|
+
return await reply$3(await fetch(`${API_PREFIX}/sessions/lorebooks?id=${encodeURIComponent(session)}&${named(name)}`, {
|
|
7354
7354
|
method: "DELETE",
|
|
7355
7355
|
credentials: "same-origin",
|
|
7356
7356
|
signal
|
|
@@ -7358,89 +7358,89 @@ window.__ModuleLoader__.load({
|
|
|
7358
7358
|
}
|
|
7359
7359
|
//#endregion
|
|
7360
7360
|
//#region src/client/presets-api.ts
|
|
7361
|
-
async function reply$
|
|
7361
|
+
async function reply$2(response) {
|
|
7362
7362
|
if (!response.ok) {
|
|
7363
7363
|
const body = await response.json().catch(() => void 0);
|
|
7364
7364
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
7365
7365
|
}
|
|
7366
7366
|
return await response.json();
|
|
7367
7367
|
}
|
|
7368
|
-
const json = (method, body) => ({
|
|
7368
|
+
const json$1 = (method, body) => ({
|
|
7369
7369
|
method,
|
|
7370
7370
|
credentials: "same-origin",
|
|
7371
7371
|
headers: { "content-type": "application/json" },
|
|
7372
7372
|
body: JSON.stringify(body)
|
|
7373
7373
|
});
|
|
7374
7374
|
async function listPresets(signal) {
|
|
7375
|
-
return await reply$
|
|
7375
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets`, {
|
|
7376
7376
|
credentials: "same-origin",
|
|
7377
7377
|
signal
|
|
7378
7378
|
}));
|
|
7379
7379
|
}
|
|
7380
7380
|
/** Makes a preset of the prose prompts a world carries. */
|
|
7381
7381
|
async function savePresetFromWorld(request, signal) {
|
|
7382
|
-
return await reply$
|
|
7383
|
-
...json("POST", request),
|
|
7382
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets`, {
|
|
7383
|
+
...json$1("POST", request),
|
|
7384
7384
|
signal
|
|
7385
7385
|
}));
|
|
7386
7386
|
}
|
|
7387
7387
|
async function loadPresetStatus(session, signal) {
|
|
7388
|
-
return await reply$
|
|
7388
|
+
return await reply$2(await fetch(`${API_PREFIX}/sessions/preset?id=${encodeURIComponent(session)}`, {
|
|
7389
7389
|
credentials: "same-origin",
|
|
7390
7390
|
signal
|
|
7391
7391
|
}));
|
|
7392
7392
|
}
|
|
7393
7393
|
/** Puts a preset into the chat's story, or takes its preset out when no name is given. */
|
|
7394
7394
|
async function applyPreset(session, name, signal) {
|
|
7395
|
-
return await reply$
|
|
7396
|
-
...json("POST", name === void 0 ? {} : { name }),
|
|
7395
|
+
return await reply$2(await fetch(`${API_PREFIX}/sessions/preset?id=${encodeURIComponent(session)}`, {
|
|
7396
|
+
...json$1("POST", name === void 0 ? {} : { name }),
|
|
7397
7397
|
signal
|
|
7398
7398
|
}));
|
|
7399
7399
|
}
|
|
7400
7400
|
const empty = async (response) => {
|
|
7401
|
-
if (!response.ok) await reply$
|
|
7401
|
+
if (!response.ok) await reply$2(response);
|
|
7402
7402
|
};
|
|
7403
7403
|
async function readPreset(name, signal) {
|
|
7404
|
-
return await reply$
|
|
7404
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/item?name=${encodeURIComponent(name)}`, {
|
|
7405
7405
|
credentials: "same-origin",
|
|
7406
7406
|
signal
|
|
7407
7407
|
}));
|
|
7408
7408
|
}
|
|
7409
7409
|
/** Makes a preset holding the shipped prose prompts, as a starting point to edit. */
|
|
7410
7410
|
async function createPreset(request, signal) {
|
|
7411
|
-
return await reply$
|
|
7412
|
-
...json("POST", request),
|
|
7411
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets`, {
|
|
7412
|
+
...json$1("POST", request),
|
|
7413
7413
|
signal
|
|
7414
7414
|
}));
|
|
7415
7415
|
}
|
|
7416
7416
|
async function updatePresetInfo(name, change, signal) {
|
|
7417
|
-
return await reply$
|
|
7418
|
-
...json("PUT", change),
|
|
7417
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/item?name=${encodeURIComponent(name)}`, {
|
|
7418
|
+
...json$1("PUT", change),
|
|
7419
7419
|
signal
|
|
7420
7420
|
}));
|
|
7421
7421
|
}
|
|
7422
7422
|
/** The prompts with rules of the game that the preset could take over from the shipped ones. */
|
|
7423
7423
|
async function listRulesPrompts(name, language, signal) {
|
|
7424
|
-
return await reply$
|
|
7424
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/prompts?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}`, {
|
|
7425
7425
|
credentials: "same-origin",
|
|
7426
7426
|
signal
|
|
7427
7427
|
}));
|
|
7428
7428
|
}
|
|
7429
7429
|
/** A prompt as a story with the preset gets it: the preset's own, else the shipped one. */
|
|
7430
7430
|
async function readPresetPrompt(name, language, id, signal) {
|
|
7431
|
-
return (await reply$
|
|
7431
|
+
return (await reply$2(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7432
7432
|
credentials: "same-origin",
|
|
7433
7433
|
signal
|
|
7434
7434
|
}))).text;
|
|
7435
7435
|
}
|
|
7436
7436
|
async function writePresetPrompt(name, language, id, text, signal) {
|
|
7437
|
-
return await reply$
|
|
7438
|
-
...json("PUT", { text }),
|
|
7437
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7438
|
+
...json$1("PUT", { text }),
|
|
7439
7439
|
signal
|
|
7440
7440
|
}));
|
|
7441
7441
|
}
|
|
7442
7442
|
async function removePresetPrompt(name, language, id, signal) {
|
|
7443
|
-
return await reply$
|
|
7443
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/prompt?name=${encodeURIComponent(name)}&language=${encodeURIComponent(language)}&id=${encodeURIComponent(id)}`, {
|
|
7444
7444
|
method: "DELETE",
|
|
7445
7445
|
credentials: "same-origin",
|
|
7446
7446
|
signal
|
|
@@ -7455,30 +7455,30 @@ window.__ModuleLoader__.load({
|
|
|
7455
7455
|
}
|
|
7456
7456
|
/** Opens the authoring chat of a preset. */
|
|
7457
7457
|
async function authorPreset(name, language, signal) {
|
|
7458
|
-
return await reply$
|
|
7459
|
-
...json("POST", { language }),
|
|
7458
|
+
return await reply$2(await fetch(`${API_PREFIX}/presets/authoring?name=${encodeURIComponent(name)}`, {
|
|
7459
|
+
...json$1("POST", { language }),
|
|
7460
7460
|
signal
|
|
7461
7461
|
}));
|
|
7462
7462
|
}
|
|
7463
7463
|
//#endregion
|
|
7464
7464
|
//#region \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
|
|
7465
|
-
const css$
|
|
7466
|
-
const key$
|
|
7467
|
-
let tag$
|
|
7468
|
-
if (tag$
|
|
7469
|
-
tag$
|
|
7470
|
-
tag$
|
|
7471
|
-
tag$
|
|
7472
|
-
document.head.appendChild(tag$
|
|
7465
|
+
const css$24 = ".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}";
|
|
7466
|
+
const key$24 = "src/client/widgets/sampling-fields/SamplingFields.module.css";
|
|
7467
|
+
let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
|
|
7468
|
+
if (tag$24 === null) {
|
|
7469
|
+
tag$24 = document.createElement("style");
|
|
7470
|
+
tag$24.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
7471
|
+
tag$24.dataset.pluginCss = key$24;
|
|
7472
|
+
document.head.appendChild(tag$24);
|
|
7473
7473
|
}
|
|
7474
|
-
tag$
|
|
7474
|
+
tag$24.textContent = css$24;
|
|
7475
7475
|
var SamplingFields_module_css_default = {
|
|
7476
|
-
"field": "rp_9vxYSG_field",
|
|
7477
|
-
"help": "rp_9vxYSG_help",
|
|
7478
|
-
"input": "rp_9vxYSG_input",
|
|
7479
7476
|
"root": "rp_9vxYSG_root",
|
|
7477
|
+
"label": "rp_9vxYSG_label",
|
|
7478
|
+
"input": "rp_9vxYSG_input",
|
|
7480
7479
|
"grid": "rp_9vxYSG_grid",
|
|
7481
|
-
"
|
|
7480
|
+
"help": "rp_9vxYSG_help",
|
|
7481
|
+
"field": "rp_9vxYSG_field"
|
|
7482
7482
|
};
|
|
7483
7483
|
//#endregion
|
|
7484
7484
|
//#region src/client/widgets/sampling-fields/SamplingFields.tsx
|
|
@@ -7952,7 +7952,7 @@ window.__ModuleLoader__.load({
|
|
|
7952
7952
|
}
|
|
7953
7953
|
//#endregion
|
|
7954
7954
|
//#region src/client/world-editor/PromptsPanel.tsx
|
|
7955
|
-
const messageOf$
|
|
7955
|
+
const messageOf$9 = (error) => error instanceof Error ? error.message : String(error);
|
|
7956
7956
|
/** 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. */
|
|
7957
7957
|
function PromptsPanel({ t, worldId, language, actions }) {
|
|
7958
7958
|
const [tag, setTag] = (0, react.useState)(language);
|
|
@@ -7965,7 +7965,7 @@ window.__ModuleLoader__.load({
|
|
|
7965
7965
|
loadPrompts(worldId, tag, new AbortController().signal).then(setEntries, (failure) => {
|
|
7966
7966
|
setStatus({
|
|
7967
7967
|
state: "failed",
|
|
7968
|
-
message: messageOf$
|
|
7968
|
+
message: messageOf$9(failure)
|
|
7969
7969
|
});
|
|
7970
7970
|
});
|
|
7971
7971
|
}, [worldId, tag]);
|
|
@@ -7985,7 +7985,7 @@ window.__ModuleLoader__.load({
|
|
|
7985
7985
|
}, (failure) => {
|
|
7986
7986
|
if (!abort.signal.aborted) setStatus({
|
|
7987
7987
|
state: "failed",
|
|
7988
|
-
message: messageOf$
|
|
7988
|
+
message: messageOf$9(failure)
|
|
7989
7989
|
});
|
|
7990
7990
|
});
|
|
7991
7991
|
return () => {
|
|
@@ -8012,7 +8012,7 @@ window.__ModuleLoader__.load({
|
|
|
8012
8012
|
}, (failure) => {
|
|
8013
8013
|
setMade({
|
|
8014
8014
|
state: "failed",
|
|
8015
|
-
message: t("presetSaveFailed", { message: messageOf$
|
|
8015
|
+
message: t("presetSaveFailed", { message: messageOf$9(failure) })
|
|
8016
8016
|
});
|
|
8017
8017
|
});
|
|
8018
8018
|
};
|
|
@@ -8026,7 +8026,7 @@ window.__ModuleLoader__.load({
|
|
|
8026
8026
|
}, (failure) => {
|
|
8027
8027
|
setStatus({
|
|
8028
8028
|
state: "failed",
|
|
8029
|
-
message: messageOf$
|
|
8029
|
+
message: messageOf$9(failure)
|
|
8030
8030
|
});
|
|
8031
8031
|
});
|
|
8032
8032
|
};
|
|
@@ -8884,28 +8884,28 @@ window.__ModuleLoader__.load({
|
|
|
8884
8884
|
}
|
|
8885
8885
|
//#endregion
|
|
8886
8886
|
//#region \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
|
|
8887
|
-
const css$
|
|
8888
|
-
const key$
|
|
8889
|
-
let tag$
|
|
8890
|
-
if (tag$
|
|
8891
|
-
tag$
|
|
8892
|
-
tag$
|
|
8893
|
-
tag$
|
|
8894
|
-
document.head.appendChild(tag$
|
|
8887
|
+
const css$23 = ".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}";
|
|
8888
|
+
const key$23 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
|
|
8889
|
+
let tag$23 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$23) + "]");
|
|
8890
|
+
if (tag$23 === null) {
|
|
8891
|
+
tag$23 = document.createElement("style");
|
|
8892
|
+
tag$23.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8893
|
+
tag$23.dataset.pluginCss = key$23;
|
|
8894
|
+
document.head.appendChild(tag$23);
|
|
8895
8895
|
}
|
|
8896
|
-
tag$
|
|
8896
|
+
tag$23.textContent = css$23;
|
|
8897
8897
|
var ToolSwitches_module_css_default = {
|
|
8898
|
-
"title": "rp_CjoFLq_title",
|
|
8899
|
-
"agentName": "rp_CjoFLq_agentName",
|
|
8900
8898
|
"error": "rp_CjoFLq_error",
|
|
8901
|
-
"
|
|
8899
|
+
"external": "rp_CjoFLq_external",
|
|
8900
|
+
"agentName": "rp_CjoFLq_agentName",
|
|
8902
8901
|
"help": "rp_CjoFLq_help",
|
|
8903
|
-
"
|
|
8904
|
-
"root": "rp_CjoFLq_root",
|
|
8902
|
+
"hint": "rp_CjoFLq_hint",
|
|
8905
8903
|
"toolText": "rp_CjoFLq_toolText",
|
|
8904
|
+
"agent": "rp_CjoFLq_agent",
|
|
8906
8905
|
"default": "rp_CjoFLq_default",
|
|
8907
|
-
"
|
|
8908
|
-
"
|
|
8906
|
+
"tool": "rp_CjoFLq_tool",
|
|
8907
|
+
"root": "rp_CjoFLq_root",
|
|
8908
|
+
"title": "rp_CjoFLq_title"
|
|
8909
8909
|
};
|
|
8910
8910
|
//#endregion
|
|
8911
8911
|
//#region src/client/widgets/tool-switches/ToolSwitches.tsx
|
|
@@ -9905,52 +9905,52 @@ window.__ModuleLoader__.load({
|
|
|
9905
9905
|
const imageUrl = (target, image) => `${route(target, "/file")}&path=${encodeURIComponent(image.path)}&v=${encodeURIComponent(image.createdAt)}`;
|
|
9906
9906
|
//#endregion
|
|
9907
9907
|
//#region \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
|
|
9908
|
-
const css$
|
|
9909
|
-
const key$
|
|
9910
|
-
let tag$
|
|
9911
|
-
if (tag$
|
|
9912
|
-
tag$
|
|
9913
|
-
tag$
|
|
9914
|
-
tag$
|
|
9915
|
-
document.head.appendChild(tag$
|
|
9908
|
+
const css$22 = ".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))}}";
|
|
9909
|
+
const key$22 = "src/client/widgets/gallery-view/GalleryView.module.css";
|
|
9910
|
+
let tag$22 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$22) + "]");
|
|
9911
|
+
if (tag$22 === null) {
|
|
9912
|
+
tag$22 = document.createElement("style");
|
|
9913
|
+
tag$22.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9914
|
+
tag$22.dataset.pluginCss = key$22;
|
|
9915
|
+
document.head.appendChild(tag$22);
|
|
9916
9916
|
}
|
|
9917
|
-
tag$
|
|
9917
|
+
tag$22.textContent = css$22;
|
|
9918
9918
|
var GalleryView_module_css_default = {
|
|
9919
|
-
"actions": "rp_9pSHmG_actions",
|
|
9920
|
-
"page": "rp_9pSHmG_page",
|
|
9921
9919
|
"open": "rp_9pSHmG_open",
|
|
9922
|
-
"
|
|
9920
|
+
"thumb": "rp_9pSHmG_thumb",
|
|
9923
9921
|
"message": "rp_9pSHmG_message",
|
|
9924
|
-
"error": "rp_9pSHmG_error",
|
|
9925
|
-
"editHelp": "rp_9pSHmG_editHelp",
|
|
9926
|
-
"count": "rp_9pSHmG_count",
|
|
9927
9922
|
"toolbar": "rp_9pSHmG_toolbar",
|
|
9928
|
-
"
|
|
9929
|
-
"
|
|
9930
|
-
"status": "rp_9pSHmG_status",
|
|
9931
|
-
"cell": "rp_9pSHmG_cell",
|
|
9932
|
-
"editButton": "rp_9pSHmG_editButton",
|
|
9933
|
-
"image": "rp_9pSHmG_image",
|
|
9934
|
-
"edit": "rp_9pSHmG_edit",
|
|
9935
|
-
"large": "rp_9pSHmG_large",
|
|
9936
|
-
"note": "rp_9pSHmG_note",
|
|
9937
|
-
"thumb": "rp_9pSHmG_thumb",
|
|
9923
|
+
"page": "rp_9pSHmG_page",
|
|
9924
|
+
"select": "rp_9pSHmG_select",
|
|
9938
9925
|
"caption": "rp_9pSHmG_caption",
|
|
9939
9926
|
"statusError": "rp_9pSHmG_statusError",
|
|
9940
|
-
"
|
|
9927
|
+
"editHelp": "rp_9pSHmG_editHelp",
|
|
9928
|
+
"error": "rp_9pSHmG_error",
|
|
9929
|
+
"facts": "rp_9pSHmG_facts",
|
|
9930
|
+
"pre": "rp_9pSHmG_pre",
|
|
9931
|
+
"edit": "rp_9pSHmG_edit",
|
|
9941
9932
|
"editLabel": "rp_9pSHmG_editLabel",
|
|
9942
|
-
"
|
|
9933
|
+
"cell": "rp_9pSHmG_cell",
|
|
9934
|
+
"grid": "rp_9pSHmG_grid",
|
|
9935
|
+
"note": "rp_9pSHmG_note",
|
|
9936
|
+
"editField": "rp_9pSHmG_editField",
|
|
9937
|
+
"image": "rp_9pSHmG_image",
|
|
9943
9938
|
"editArea": "rp_9pSHmG_editArea",
|
|
9944
|
-
"
|
|
9939
|
+
"count": "rp_9pSHmG_count",
|
|
9940
|
+
"tags": "rp_9pSHmG_tags",
|
|
9941
|
+
"actions": "rp_9pSHmG_actions",
|
|
9942
|
+
"editInput": "rp_9pSHmG_editInput",
|
|
9943
|
+
"detail": "rp_9pSHmG_detail",
|
|
9944
|
+
"status": "rp_9pSHmG_status",
|
|
9945
9945
|
"reusable": "rp_9pSHmG_reusable",
|
|
9946
|
-
"
|
|
9947
|
-
"
|
|
9946
|
+
"large": "rp_9pSHmG_large",
|
|
9947
|
+
"editButton": "rp_9pSHmG_editButton"
|
|
9948
9948
|
};
|
|
9949
9949
|
//#endregion
|
|
9950
9950
|
//#region src/client/widgets/gallery-view/GalleryView.tsx
|
|
9951
9951
|
/** How often the list is read again while pictures are waiting to be described. */
|
|
9952
9952
|
const POLL_MS$2 = 3e3;
|
|
9953
|
-
const messageOf$
|
|
9953
|
+
const messageOf$8 = (error) => error instanceof Error ? error.message : String(error);
|
|
9954
9954
|
function EditDialog({ t, image, onSave, onClose }) {
|
|
9955
9955
|
const [description, setDescription] = (0, react.useState)(image.description ?? "");
|
|
9956
9956
|
const [tags, setTags] = (0, react.useState)(image.tags.join(", "));
|
|
@@ -9964,7 +9964,7 @@ window.__ModuleLoader__.load({
|
|
|
9964
9964
|
tags: tags.split(/[,,]/).map((tag) => tag.trim()).filter((tag) => tag !== "")
|
|
9965
9965
|
}).then(onClose, (failure) => {
|
|
9966
9966
|
setBusy(false);
|
|
9967
|
-
setError(messageOf$
|
|
9967
|
+
setError(messageOf$8(failure));
|
|
9968
9968
|
});
|
|
9969
9969
|
};
|
|
9970
9970
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -10051,7 +10051,7 @@ window.__ModuleLoader__.load({
|
|
|
10051
10051
|
if (!signal.aborted) {
|
|
10052
10052
|
setLoad({
|
|
10053
10053
|
status: "failed",
|
|
10054
|
-
message: messageOf$
|
|
10054
|
+
message: messageOf$8(failure)
|
|
10055
10055
|
});
|
|
10056
10056
|
setRefreshing(false);
|
|
10057
10057
|
}
|
|
@@ -10098,7 +10098,7 @@ window.__ModuleLoader__.load({
|
|
|
10098
10098
|
} catch (failure) {
|
|
10099
10099
|
setNotice(t("uploadFailed", {
|
|
10100
10100
|
name: file.name,
|
|
10101
|
-
message: messageOf$
|
|
10101
|
+
message: messageOf$8(failure)
|
|
10102
10102
|
}));
|
|
10103
10103
|
}
|
|
10104
10104
|
setUploading(false);
|
|
@@ -10115,7 +10115,7 @@ window.__ModuleLoader__.load({
|
|
|
10115
10115
|
};
|
|
10116
10116
|
const mark = (image, reusable) => {
|
|
10117
10117
|
updateImage(target, image.path, { reusable }, new AbortController().signal).then(replace, (failure) => {
|
|
10118
|
-
setNotice(t("updateFailed", { message: messageOf$
|
|
10118
|
+
setNotice(t("updateFailed", { message: messageOf$8(failure) }));
|
|
10119
10119
|
});
|
|
10120
10120
|
};
|
|
10121
10121
|
const { images, failures } = load.contents;
|
|
@@ -10274,24 +10274,24 @@ window.__ModuleLoader__.load({
|
|
|
10274
10274
|
}
|
|
10275
10275
|
//#endregion
|
|
10276
10276
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/WorldEditor.module.css.mjs
|
|
10277
|
-
const css$
|
|
10278
|
-
const key$
|
|
10279
|
-
let tag$
|
|
10280
|
-
if (tag$
|
|
10281
|
-
tag$
|
|
10282
|
-
tag$
|
|
10283
|
-
tag$
|
|
10284
|
-
document.head.appendChild(tag$
|
|
10277
|
+
const css$21 = ".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}";
|
|
10278
|
+
const key$21 = "src/client/world-editor/WorldEditor.module.css";
|
|
10279
|
+
let tag$21 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$21) + "]");
|
|
10280
|
+
if (tag$21 === null) {
|
|
10281
|
+
tag$21 = document.createElement("style");
|
|
10282
|
+
tag$21.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10283
|
+
tag$21.dataset.pluginCss = key$21;
|
|
10284
|
+
document.head.appendChild(tag$21);
|
|
10285
10285
|
}
|
|
10286
|
-
tag$
|
|
10286
|
+
tag$21.textContent = css$21;
|
|
10287
10287
|
var WorldEditor_module_css_default = {
|
|
10288
|
-
"view": "rp__swA3a_view",
|
|
10289
|
-
"message": "rp__swA3a_message",
|
|
10290
10288
|
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
10291
10289
|
"drawer": "rp__swA3a_drawer",
|
|
10292
|
-
"warning": "rp__swA3a_warning",
|
|
10293
10290
|
"drawerItem": "rp__swA3a_drawerItem",
|
|
10294
|
-
"
|
|
10291
|
+
"message": "rp__swA3a_message",
|
|
10292
|
+
"content": "rp__swA3a_content",
|
|
10293
|
+
"view": "rp__swA3a_view",
|
|
10294
|
+
"warning": "rp__swA3a_warning"
|
|
10295
10295
|
};
|
|
10296
10296
|
//#endregion
|
|
10297
10297
|
//#region src/client/world-editor/WorldEditor.tsx
|
|
@@ -10676,38 +10676,38 @@ window.__ModuleLoader__.load({
|
|
|
10676
10676
|
}
|
|
10677
10677
|
//#endregion
|
|
10678
10678
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/avatars/AvatarsPage.module.css.mjs
|
|
10679
|
-
const css$
|
|
10680
|
-
const key$
|
|
10681
|
-
let tag$
|
|
10682
|
-
if (tag$
|
|
10683
|
-
tag$
|
|
10684
|
-
tag$
|
|
10685
|
-
tag$
|
|
10686
|
-
document.head.appendChild(tag$
|
|
10679
|
+
const css$20 = ".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}}";
|
|
10680
|
+
const key$20 = "src/client/pages/avatars/AvatarsPage.module.css";
|
|
10681
|
+
let tag$20 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$20) + "]");
|
|
10682
|
+
if (tag$20 === null) {
|
|
10683
|
+
tag$20 = document.createElement("style");
|
|
10684
|
+
tag$20.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10685
|
+
tag$20.dataset.pluginCss = key$20;
|
|
10686
|
+
document.head.appendChild(tag$20);
|
|
10687
10687
|
}
|
|
10688
|
-
tag$
|
|
10688
|
+
tag$20.textContent = css$20;
|
|
10689
10689
|
var AvatarsPage_module_css_default = {
|
|
10690
|
-
"
|
|
10690
|
+
"count": "rp_pQOzEG_count",
|
|
10691
|
+
"editHeader": "rp_pQOzEG_editHeader",
|
|
10692
|
+
"viewport": "rp_pQOzEG_viewport",
|
|
10691
10693
|
"label": "rp_pQOzEG_label",
|
|
10694
|
+
"error": "rp_pQOzEG_error",
|
|
10695
|
+
"editBody": "rp_pQOzEG_editBody",
|
|
10696
|
+
"form": "rp_pQOzEG_form",
|
|
10697
|
+
"summary": "rp_pQOzEG_summary",
|
|
10698
|
+
"message": "rp_pQOzEG_message",
|
|
10699
|
+
"name": "rp_pQOzEG_name",
|
|
10692
10700
|
"field": "rp_pQOzEG_field",
|
|
10701
|
+
"grid": "rp_pQOzEG_grid",
|
|
10702
|
+
"editTitle": "rp_pQOzEG_editTitle",
|
|
10703
|
+
"placeholder": "rp_pQOzEG_placeholder",
|
|
10693
10704
|
"open": "rp_pQOzEG_open",
|
|
10694
|
-
"text": "rp_pQOzEG_text",
|
|
10695
|
-
"summary": "rp_pQOzEG_summary",
|
|
10696
10705
|
"page": "rp_pQOzEG_page",
|
|
10697
|
-
"
|
|
10706
|
+
"actions": "rp_pQOzEG_actions",
|
|
10698
10707
|
"card": "rp_pQOzEG_card",
|
|
10699
|
-
"
|
|
10708
|
+
"text": "rp_pQOzEG_text",
|
|
10700
10709
|
"portrait": "rp_pQOzEG_portrait",
|
|
10701
|
-
"
|
|
10702
|
-
"editTitle": "rp_pQOzEG_editTitle",
|
|
10703
|
-
"name": "rp_pQOzEG_name",
|
|
10704
|
-
"editBody": "rp_pQOzEG_editBody",
|
|
10705
|
-
"actions": "rp_pQOzEG_actions",
|
|
10706
|
-
"message": "rp_pQOzEG_message",
|
|
10707
|
-
"form": "rp_pQOzEG_form",
|
|
10708
|
-
"editHeader": "rp_pQOzEG_editHeader",
|
|
10709
|
-
"grid": "rp_pQOzEG_grid",
|
|
10710
|
-
"error": "rp_pQOzEG_error"
|
|
10710
|
+
"toolbar": "rp_pQOzEG_toolbar"
|
|
10711
10711
|
};
|
|
10712
10712
|
//#endregion
|
|
10713
10713
|
//#region src/client/pages/avatars/AvatarsPage.tsx
|
|
@@ -10977,7 +10977,7 @@ window.__ModuleLoader__.load({
|
|
|
10977
10977
|
}
|
|
10978
10978
|
//#endregion
|
|
10979
10979
|
//#region src/client/widgets/sampling-fields/locales.ts
|
|
10980
|
-
const dictionaries$
|
|
10980
|
+
const dictionaries$18 = {
|
|
10981
10981
|
en: {
|
|
10982
10982
|
sf_master: "Narrator temperature (0 to 2)",
|
|
10983
10983
|
sf_characters: "Characters temperature (0 to 2)",
|
|
@@ -11003,7 +11003,7 @@ window.__ModuleLoader__.load({
|
|
|
11003
11003
|
};
|
|
11004
11004
|
//#endregion
|
|
11005
11005
|
//#region src/client/widgets/tool-switches/locales.ts
|
|
11006
|
-
const dictionaries$
|
|
11006
|
+
const dictionaries$17 = {
|
|
11007
11007
|
en: {
|
|
11008
11008
|
sw_title: "Tools",
|
|
11009
11009
|
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.",
|
|
@@ -11083,7 +11083,7 @@ window.__ModuleLoader__.load({
|
|
|
11083
11083
|
};
|
|
11084
11084
|
//#endregion
|
|
11085
11085
|
//#region src/client/widgets/gallery-view/locales.ts
|
|
11086
|
-
const dictionaries$
|
|
11086
|
+
const dictionaries$16 = {
|
|
11087
11087
|
en: {
|
|
11088
11088
|
tab: "Gallery",
|
|
11089
11089
|
notRoleplay: "This chat is not a roleplay session, so it has no gallery.",
|
|
@@ -11161,7 +11161,7 @@ window.__ModuleLoader__.load({
|
|
|
11161
11161
|
cancel: "取消"
|
|
11162
11162
|
}
|
|
11163
11163
|
};
|
|
11164
|
-
const dictionaries$
|
|
11164
|
+
const dictionaries$12 = withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries({
|
|
11165
11165
|
en: {
|
|
11166
11166
|
language: "en",
|
|
11167
11167
|
sectionInfo: "About",
|
|
@@ -11758,7 +11758,7 @@ window.__ModuleLoader__.load({
|
|
|
11758
11758
|
relationCancel: "取消",
|
|
11759
11759
|
relationCreate: "创建"
|
|
11760
11760
|
}
|
|
11761
|
-
}, prefixed(dictionaries$
|
|
11761
|
+
}, prefixed(dictionaries$16, "gallery_")), prefixed({
|
|
11762
11762
|
en: {
|
|
11763
11763
|
title: "Triggers",
|
|
11764
11764
|
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.",
|
|
@@ -11992,7 +11992,7 @@ window.__ModuleLoader__.load({
|
|
|
11992
11992
|
logOpen: "请求打开:{surface}",
|
|
11993
11993
|
noSurfaces: "这个界面包没有可预览的界面位置。"
|
|
11994
11994
|
}
|
|
11995
|
-
}, "pk_")), dictionaries$
|
|
11995
|
+
}, "pk_")), dictionaries$17), prefixed({
|
|
11996
11996
|
en: {
|
|
11997
11997
|
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.",
|
|
11998
11998
|
none: "This world has no checks. Its game master can still roll plain dice for things that have none.",
|
|
@@ -12065,8 +12065,8 @@ window.__ModuleLoader__.load({
|
|
|
12065
12065
|
resultFailed: "失败",
|
|
12066
12066
|
bandCritical: "关键"
|
|
12067
12067
|
}
|
|
12068
|
-
}, "dice_")), dictionaries$
|
|
12069
|
-
const dictionaries$
|
|
12068
|
+
}, "dice_")), dictionaries$18);
|
|
12069
|
+
const dictionaries$11 = withDictionaries({
|
|
12070
12070
|
en: {
|
|
12071
12071
|
nav: "Avatars",
|
|
12072
12072
|
avatarsLoading: "Loading avatars…",
|
|
@@ -12119,14 +12119,14 @@ window.__ModuleLoader__.load({
|
|
|
12119
12119
|
avatarDeleteFailed: "无法删除角色形象:{message}",
|
|
12120
12120
|
avatarEdit: "编辑"
|
|
12121
12121
|
}
|
|
12122
|
-
}, dictionaries$
|
|
12122
|
+
}, dictionaries$12);
|
|
12123
12123
|
//#endregion
|
|
12124
12124
|
//#region src/client/pages/avatars/index.ts
|
|
12125
|
-
const NAMESPACE$
|
|
12125
|
+
const NAMESPACE$12 = "roleplay.avatars";
|
|
12126
12126
|
/** Adds the Avatars page to the Role Play panel: characters to play in any world. */
|
|
12127
12127
|
function registerAvatarsPage(ctx) {
|
|
12128
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
12129
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
12128
|
+
const t = ctx.locale.bind(NAMESPACE$12);
|
|
12129
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$12, dictionaries$11), "roleplay: avatars dictionaries");
|
|
12130
12130
|
const avatars = new AvatarsController();
|
|
12131
12131
|
ctx.effect(() => () => {
|
|
12132
12132
|
avatars.dispose();
|
|
@@ -12136,58 +12136,58 @@ window.__ModuleLoader__.load({
|
|
|
12136
12136
|
id: "avatars",
|
|
12137
12137
|
order: 5,
|
|
12138
12138
|
label: () => t("nav"),
|
|
12139
|
-
locale: NAMESPACE$
|
|
12139
|
+
locale: NAMESPACE$12,
|
|
12140
12140
|
inject: () => avatars.inject()
|
|
12141
12141
|
}, AvatarsPage));
|
|
12142
12142
|
}
|
|
12143
12143
|
//#endregion
|
|
12144
12144
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/lorebooks/LorebooksPage.module.css.mjs
|
|
12145
|
-
const css$
|
|
12146
|
-
const key$
|
|
12147
|
-
let tag$
|
|
12148
|
-
if (tag$
|
|
12149
|
-
tag$
|
|
12150
|
-
tag$
|
|
12151
|
-
tag$
|
|
12152
|
-
document.head.appendChild(tag$
|
|
12153
|
-
}
|
|
12154
|
-
tag$
|
|
12145
|
+
const css$19 = ".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}";
|
|
12146
|
+
const key$19 = "src/client/pages/lorebooks/LorebooksPage.module.css";
|
|
12147
|
+
let tag$19 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$19) + "]");
|
|
12148
|
+
if (tag$19 === null) {
|
|
12149
|
+
tag$19 = document.createElement("style");
|
|
12150
|
+
tag$19.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
12151
|
+
tag$19.dataset.pluginCss = key$19;
|
|
12152
|
+
document.head.appendChild(tag$19);
|
|
12153
|
+
}
|
|
12154
|
+
tag$19.textContent = css$19;
|
|
12155
12155
|
var LorebooksPage_module_css_default = {
|
|
12156
|
-
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12157
12156
|
"row": "rp_VV-Eha_row",
|
|
12158
|
-
"select": "rp_VV-Eha_select",
|
|
12159
12157
|
"count": "rp_VV-Eha_count",
|
|
12160
|
-
"
|
|
12161
|
-
"area": "rp_VV-Eha_area",
|
|
12162
|
-
"editTitle": "rp_VV-Eha_editTitle",
|
|
12163
|
-
"message": "rp_VV-Eha_message",
|
|
12164
|
-
"meta": "rp_VV-Eha_meta",
|
|
12158
|
+
"cardActions": "rp_VV-Eha_cardActions",
|
|
12165
12159
|
"error": "rp_VV-Eha_error",
|
|
12166
|
-
"
|
|
12167
|
-
"label": "rp_VV-Eha_label",
|
|
12168
|
-
"entryArea": "rp_VV-Eha_entryArea",
|
|
12169
|
-
"form": "rp_VV-Eha_form",
|
|
12160
|
+
"help": "rp_VV-Eha_help",
|
|
12170
12161
|
"title": "rp_VV-Eha_title",
|
|
12162
|
+
"section": "rp_VV-Eha_section",
|
|
12163
|
+
"form": "rp_VV-Eha_form",
|
|
12164
|
+
"area": "rp_VV-Eha_area",
|
|
12165
|
+
"page": "rp_VV-Eha_page",
|
|
12166
|
+
"actions": "rp_VV-Eha_actions",
|
|
12171
12167
|
"description": "rp_VV-Eha_description",
|
|
12168
|
+
"meta": "rp_VV-Eha_meta",
|
|
12169
|
+
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12170
|
+
"warning": "rp_VV-Eha_warning",
|
|
12171
|
+
"entryArea": "rp_VV-Eha_entryArea",
|
|
12172
|
+
"card": "rp_VV-Eha_card",
|
|
12173
|
+
"ok": "rp_VV-Eha_ok",
|
|
12174
|
+
"editTitle": "rp_VV-Eha_editTitle",
|
|
12172
12175
|
"field": "rp_VV-Eha_field",
|
|
12173
|
-
"
|
|
12174
|
-
"
|
|
12175
|
-
"page": "rp_VV-Eha_page",
|
|
12176
|
-
"cardActions": "rp_VV-Eha_cardActions",
|
|
12176
|
+
"label": "rp_VV-Eha_label",
|
|
12177
|
+
"head": "rp_VV-Eha_head",
|
|
12177
12178
|
"editHeader": "rp_VV-Eha_editHeader",
|
|
12178
|
-
"ok": "rp_VV-Eha_ok",
|
|
12179
12179
|
"input": "rp_VV-Eha_input",
|
|
12180
|
-
"name": "rp_VV-Eha_name",
|
|
12181
|
-
"section": "rp_VV-Eha_section",
|
|
12182
12180
|
"grid": "rp_VV-Eha_grid",
|
|
12183
|
-
"
|
|
12184
|
-
"
|
|
12185
|
-
"
|
|
12186
|
-
"viewport": "rp_VV-Eha_viewport"
|
|
12181
|
+
"message": "rp_VV-Eha_message",
|
|
12182
|
+
"name": "rp_VV-Eha_name",
|
|
12183
|
+
"editBody": "rp_VV-Eha_editBody",
|
|
12184
|
+
"viewport": "rp_VV-Eha_viewport",
|
|
12185
|
+
"toolbar": "rp_VV-Eha_toolbar",
|
|
12186
|
+
"select": "rp_VV-Eha_select"
|
|
12187
12187
|
};
|
|
12188
12188
|
//#endregion
|
|
12189
12189
|
//#region src/client/pages/lorebooks/LorebookEditor.tsx
|
|
12190
|
-
const messageOf$
|
|
12190
|
+
const messageOf$7 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
12191
12191
|
const KINDS = [
|
|
12192
12192
|
"history",
|
|
12193
12193
|
"culture",
|
|
@@ -12257,7 +12257,7 @@ window.__ModuleLoader__.load({
|
|
|
12257
12257
|
readLorebook(name, abort.signal).then((value) => {
|
|
12258
12258
|
accept(value);
|
|
12259
12259
|
}, (problem) => {
|
|
12260
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
12260
|
+
if (!abort.signal.aborted) setFailure(messageOf$7(problem));
|
|
12261
12261
|
});
|
|
12262
12262
|
return () => {
|
|
12263
12263
|
abort.abort();
|
|
@@ -12285,7 +12285,7 @@ window.__ModuleLoader__.load({
|
|
|
12285
12285
|
}, (problem) => {
|
|
12286
12286
|
setInfoStatus({
|
|
12287
12287
|
state: "failed",
|
|
12288
|
-
message: messageOf$
|
|
12288
|
+
message: messageOf$7(problem)
|
|
12289
12289
|
});
|
|
12290
12290
|
});
|
|
12291
12291
|
};
|
|
@@ -12295,7 +12295,7 @@ window.__ModuleLoader__.load({
|
|
|
12295
12295
|
}, (problem) => {
|
|
12296
12296
|
setEntryStatus({
|
|
12297
12297
|
state: "failed",
|
|
12298
|
-
message: messageOf$
|
|
12298
|
+
message: messageOf$7(problem)
|
|
12299
12299
|
});
|
|
12300
12300
|
});
|
|
12301
12301
|
};
|
|
@@ -12308,7 +12308,7 @@ window.__ModuleLoader__.load({
|
|
|
12308
12308
|
}, (problem) => {
|
|
12309
12309
|
setEntryStatus({
|
|
12310
12310
|
state: "failed",
|
|
12311
|
-
message: messageOf$
|
|
12311
|
+
message: messageOf$7(problem)
|
|
12312
12312
|
});
|
|
12313
12313
|
});
|
|
12314
12314
|
};
|
|
@@ -12320,7 +12320,7 @@ window.__ModuleLoader__.load({
|
|
|
12320
12320
|
}, (problem) => {
|
|
12321
12321
|
setEntryStatus({
|
|
12322
12322
|
state: "failed",
|
|
12323
|
-
message: messageOf$
|
|
12323
|
+
message: messageOf$7(problem)
|
|
12324
12324
|
});
|
|
12325
12325
|
});
|
|
12326
12326
|
};
|
|
@@ -12581,7 +12581,7 @@ window.__ModuleLoader__.load({
|
|
|
12581
12581
|
//#endregion
|
|
12582
12582
|
//#region src/client/pages/lorebooks/LorebooksPage.tsx
|
|
12583
12583
|
const NAME$1 = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
12584
|
-
const messageOf$
|
|
12584
|
+
const messageOf$6 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
12585
12585
|
const nameFromFile$1 = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
|
|
12586
12586
|
function NameDialog$1({ t, submit, onClose }) {
|
|
12587
12587
|
const formId = (0, react.useId)();
|
|
@@ -12596,7 +12596,7 @@ window.__ModuleLoader__.load({
|
|
|
12596
12596
|
setError(void 0);
|
|
12597
12597
|
submit(name, title.trim(), description.trim()).then(onClose, (failure) => {
|
|
12598
12598
|
setBusy(false);
|
|
12599
|
-
setError(messageOf$
|
|
12599
|
+
setError(messageOf$6(failure));
|
|
12600
12600
|
});
|
|
12601
12601
|
};
|
|
12602
12602
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -12689,7 +12689,7 @@ window.__ModuleLoader__.load({
|
|
|
12689
12689
|
setError(void 0);
|
|
12690
12690
|
remove(book.name).then(onClose, (failure) => {
|
|
12691
12691
|
setBusy(false);
|
|
12692
|
-
setError(messageOf$
|
|
12692
|
+
setError(messageOf$6(failure));
|
|
12693
12693
|
});
|
|
12694
12694
|
};
|
|
12695
12695
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -12733,7 +12733,7 @@ window.__ModuleLoader__.load({
|
|
|
12733
12733
|
const open = (name) => {
|
|
12734
12734
|
setNotice(void 0);
|
|
12735
12735
|
author(name).catch((failure) => {
|
|
12736
|
-
setNotice(t("authorFailed", { message: messageOf$
|
|
12736
|
+
setNotice(t("authorFailed", { message: messageOf$6(failure) }));
|
|
12737
12737
|
});
|
|
12738
12738
|
};
|
|
12739
12739
|
const choose = (file) => {
|
|
@@ -12746,7 +12746,7 @@ window.__ModuleLoader__.load({
|
|
|
12746
12746
|
setStaged(preview);
|
|
12747
12747
|
}, (failure) => {
|
|
12748
12748
|
setStaging(false);
|
|
12749
|
-
setNotice(t("importFailed", { message: messageOf$
|
|
12749
|
+
setNotice(t("importFailed", { message: messageOf$6(failure) }));
|
|
12750
12750
|
});
|
|
12751
12751
|
};
|
|
12752
12752
|
if (editing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LorebookEditor, {
|
|
@@ -12954,7 +12954,7 @@ window.__ModuleLoader__.load({
|
|
|
12954
12954
|
]
|
|
12955
12955
|
});
|
|
12956
12956
|
}
|
|
12957
|
-
const dictionaries$
|
|
12957
|
+
const dictionaries$10 = withDictionaries({
|
|
12958
12958
|
en: {
|
|
12959
12959
|
nav: "Lorebooks",
|
|
12960
12960
|
language: "en",
|
|
@@ -13101,10 +13101,10 @@ window.__ModuleLoader__.load({
|
|
|
13101
13101
|
kind_legend: "传说",
|
|
13102
13102
|
kind_other: "其他"
|
|
13103
13103
|
}
|
|
13104
|
-
}, dictionaries$
|
|
13104
|
+
}, dictionaries$20);
|
|
13105
13105
|
//#endregion
|
|
13106
13106
|
//#region src/client/pages/lorebooks/lorebooks-controller.ts
|
|
13107
|
-
const messageOf$
|
|
13107
|
+
const messageOf$5 = (error) => error instanceof Error ? error.message : String(error);
|
|
13108
13108
|
/** Reads the lorebook library from the host and makes, removes and opens its lorebooks. */
|
|
13109
13109
|
var LorebooksController = class {
|
|
13110
13110
|
openChat;
|
|
@@ -13184,7 +13184,7 @@ window.__ModuleLoader__.load({
|
|
|
13184
13184
|
} catch (error) {
|
|
13185
13185
|
if (this.abort.signal.aborted) return;
|
|
13186
13186
|
this.store.update((draft) => {
|
|
13187
|
-
draft.error = messageOf$
|
|
13187
|
+
draft.error = messageOf$5(error);
|
|
13188
13188
|
if (draft.books === void 0) draft.status = "failed";
|
|
13189
13189
|
});
|
|
13190
13190
|
} finally {
|
|
@@ -13196,11 +13196,11 @@ window.__ModuleLoader__.load({
|
|
|
13196
13196
|
};
|
|
13197
13197
|
//#endregion
|
|
13198
13198
|
//#region src/client/pages/lorebooks/index.ts
|
|
13199
|
-
const NAMESPACE$
|
|
13199
|
+
const NAMESPACE$11 = "roleplay.lorebooks";
|
|
13200
13200
|
/** Adds the Lorebooks page to the Role Play panel: reusable background knowledge that stories start with. */
|
|
13201
13201
|
function registerLorebooksPage(ctx) {
|
|
13202
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
13203
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
13202
|
+
const t = ctx.locale.bind(NAMESPACE$11);
|
|
13203
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$11, dictionaries$10), "roleplay: lorebooks dictionaries");
|
|
13204
13204
|
const lorebooks = new LorebooksController(createChatOpener(ctx), () => t("language"));
|
|
13205
13205
|
ctx.effect(() => () => {
|
|
13206
13206
|
lorebooks.dispose();
|
|
@@ -13210,56 +13210,56 @@ window.__ModuleLoader__.load({
|
|
|
13210
13210
|
id: "lorebooks",
|
|
13211
13211
|
order: 8,
|
|
13212
13212
|
label: () => t("nav"),
|
|
13213
|
-
locale: NAMESPACE$
|
|
13213
|
+
locale: NAMESPACE$11,
|
|
13214
13214
|
inject: () => lorebooks.inject()
|
|
13215
13215
|
}, LorebooksPage));
|
|
13216
13216
|
}
|
|
13217
13217
|
//#endregion
|
|
13218
13218
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/presets/PresetsPage.module.css.mjs
|
|
13219
|
-
const css$
|
|
13220
|
-
const key$
|
|
13221
|
-
let tag$
|
|
13222
|
-
if (tag$
|
|
13223
|
-
tag$
|
|
13224
|
-
tag$
|
|
13225
|
-
tag$
|
|
13226
|
-
document.head.appendChild(tag$
|
|
13219
|
+
const css$18 = ".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}}";
|
|
13220
|
+
const key$18 = "src/client/pages/presets/PresetsPage.module.css";
|
|
13221
|
+
let tag$18 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$18) + "]");
|
|
13222
|
+
if (tag$18 === null) {
|
|
13223
|
+
tag$18 = document.createElement("style");
|
|
13224
|
+
tag$18.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
13225
|
+
tag$18.dataset.pluginCss = key$18;
|
|
13226
|
+
document.head.appendChild(tag$18);
|
|
13227
13227
|
}
|
|
13228
|
-
tag$
|
|
13228
|
+
tag$18.textContent = css$18;
|
|
13229
13229
|
var PresetsPage_module_css_default = {
|
|
13230
|
-
"
|
|
13231
|
-
"
|
|
13232
|
-
"editHeader": "rp_ZK89ba_editHeader",
|
|
13233
|
-
"message": "rp_ZK89ba_message",
|
|
13234
|
-
"editTitle": "rp_ZK89ba_editTitle",
|
|
13230
|
+
"viewport": "rp_ZK89ba_viewport",
|
|
13231
|
+
"help": "rp_ZK89ba_help",
|
|
13235
13232
|
"label": "rp_ZK89ba_label",
|
|
13236
|
-
"head": "rp_ZK89ba_head",
|
|
13237
13233
|
"card": "rp_ZK89ba_card",
|
|
13238
|
-
"
|
|
13239
|
-
"
|
|
13234
|
+
"head": "rp_ZK89ba_head",
|
|
13235
|
+
"warning": "rp_ZK89ba_warning",
|
|
13240
13236
|
"actions": "rp_ZK89ba_actions",
|
|
13241
|
-
"
|
|
13237
|
+
"field": "rp_ZK89ba_field",
|
|
13238
|
+
"editHeader": "rp_ZK89ba_editHeader",
|
|
13239
|
+
"description": "rp_ZK89ba_description",
|
|
13240
|
+
"editBody": "rp_ZK89ba_editBody",
|
|
13241
|
+
"section": "rp_ZK89ba_section",
|
|
13242
|
+
"grid": "rp_ZK89ba_grid",
|
|
13243
|
+
"cardActions": "rp_ZK89ba_cardActions",
|
|
13244
|
+
"count": "rp_ZK89ba_count",
|
|
13245
|
+
"input": "rp_ZK89ba_input",
|
|
13242
13246
|
"form": "rp_ZK89ba_form",
|
|
13247
|
+
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13243
13248
|
"page": "rp_ZK89ba_page",
|
|
13244
|
-
"grid": "rp_ZK89ba_grid",
|
|
13245
|
-
"ok": "rp_ZK89ba_ok",
|
|
13246
|
-
"error": "rp_ZK89ba_error",
|
|
13247
13249
|
"toolbar": "rp_ZK89ba_toolbar",
|
|
13248
|
-
"
|
|
13249
|
-
"help": "rp_ZK89ba_help",
|
|
13250
|
+
"area": "rp_ZK89ba_area",
|
|
13250
13251
|
"row": "rp_ZK89ba_row",
|
|
13251
|
-
"
|
|
13252
|
-
"section": "rp_ZK89ba_section",
|
|
13253
|
-
"meta": "rp_ZK89ba_meta",
|
|
13254
|
-
"description": "rp_ZK89ba_description",
|
|
13255
|
-
"field": "rp_ZK89ba_field",
|
|
13252
|
+
"ok": "rp_ZK89ba_ok",
|
|
13256
13253
|
"title": "rp_ZK89ba_title",
|
|
13257
|
-
"
|
|
13258
|
-
"
|
|
13254
|
+
"meta": "rp_ZK89ba_meta",
|
|
13255
|
+
"name": "rp_ZK89ba_name",
|
|
13256
|
+
"message": "rp_ZK89ba_message",
|
|
13257
|
+
"error": "rp_ZK89ba_error",
|
|
13258
|
+
"editTitle": "rp_ZK89ba_editTitle"
|
|
13259
13259
|
};
|
|
13260
13260
|
//#endregion
|
|
13261
13261
|
//#region src/client/pages/presets/PresetEditor.tsx
|
|
13262
|
-
const messageOf$
|
|
13262
|
+
const messageOf$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
13263
13263
|
const PROMPT_IDS = [
|
|
13264
13264
|
"roleplay/persona",
|
|
13265
13265
|
"roleplay/style",
|
|
@@ -13302,7 +13302,7 @@ window.__ModuleLoader__.load({
|
|
|
13302
13302
|
readPreset(name, abort.signal).then((value) => {
|
|
13303
13303
|
accept(value);
|
|
13304
13304
|
}, (problem) => {
|
|
13305
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
13305
|
+
if (!abort.signal.aborted) setFailure(messageOf$4(problem));
|
|
13306
13306
|
});
|
|
13307
13307
|
return () => {
|
|
13308
13308
|
abort.abort();
|
|
@@ -13313,7 +13313,7 @@ window.__ModuleLoader__.load({
|
|
|
13313
13313
|
Promise.all(PROMPT_LANGUAGES.map(async (language) => (await listRulesPrompts(name, language, abort.signal)).map((id) => `${language}/${id}`))).then((lists) => {
|
|
13314
13314
|
setRulesOffered(lists.flat());
|
|
13315
13315
|
}, (problem) => {
|
|
13316
|
-
if (!abort.signal.aborted) setFailure(messageOf$
|
|
13316
|
+
if (!abort.signal.aborted) setFailure(messageOf$4(problem));
|
|
13317
13317
|
});
|
|
13318
13318
|
return () => {
|
|
13319
13319
|
abort.abort();
|
|
@@ -13349,7 +13349,7 @@ window.__ModuleLoader__.load({
|
|
|
13349
13349
|
}, (problem) => {
|
|
13350
13350
|
setInfoStatus({
|
|
13351
13351
|
state: "failed",
|
|
13352
|
-
message: messageOf$
|
|
13352
|
+
message: messageOf$4(problem)
|
|
13353
13353
|
});
|
|
13354
13354
|
});
|
|
13355
13355
|
};
|
|
@@ -13371,7 +13371,7 @@ window.__ModuleLoader__.load({
|
|
|
13371
13371
|
}, (problem) => {
|
|
13372
13372
|
setPromptStatus({
|
|
13373
13373
|
state: "failed",
|
|
13374
|
-
message: messageOf$
|
|
13374
|
+
message: messageOf$4(problem)
|
|
13375
13375
|
});
|
|
13376
13376
|
});
|
|
13377
13377
|
};
|
|
@@ -13394,7 +13394,7 @@ window.__ModuleLoader__.load({
|
|
|
13394
13394
|
}, (problem) => {
|
|
13395
13395
|
setPromptStatus({
|
|
13396
13396
|
state: "failed",
|
|
13397
|
-
message: messageOf$
|
|
13397
|
+
message: messageOf$4(problem)
|
|
13398
13398
|
});
|
|
13399
13399
|
});
|
|
13400
13400
|
};
|
|
@@ -13626,7 +13626,7 @@ window.__ModuleLoader__.load({
|
|
|
13626
13626
|
}, (problem) => {
|
|
13627
13627
|
setPromptStatus({
|
|
13628
13628
|
state: "failed",
|
|
13629
|
-
message: messageOf$
|
|
13629
|
+
message: messageOf$4(problem)
|
|
13630
13630
|
});
|
|
13631
13631
|
});
|
|
13632
13632
|
},
|
|
@@ -13677,7 +13677,7 @@ window.__ModuleLoader__.load({
|
|
|
13677
13677
|
//#endregion
|
|
13678
13678
|
//#region src/client/pages/presets/PresetsPage.tsx
|
|
13679
13679
|
const NAME = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
13680
|
-
const messageOf$
|
|
13680
|
+
const messageOf$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
13681
13681
|
const nameFromFile = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
|
|
13682
13682
|
function NameDialog({ t, submit, onClose }) {
|
|
13683
13683
|
const formId = (0, react.useId)();
|
|
@@ -13692,7 +13692,7 @@ window.__ModuleLoader__.load({
|
|
|
13692
13692
|
setError(void 0);
|
|
13693
13693
|
submit(name, title.trim(), description.trim()).then(onClose, (failure) => {
|
|
13694
13694
|
setBusy(false);
|
|
13695
|
-
setError(messageOf$
|
|
13695
|
+
setError(messageOf$3(failure));
|
|
13696
13696
|
});
|
|
13697
13697
|
};
|
|
13698
13698
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -13785,7 +13785,7 @@ window.__ModuleLoader__.load({
|
|
|
13785
13785
|
setError(void 0);
|
|
13786
13786
|
remove(preset.name).then(onClose, (failure) => {
|
|
13787
13787
|
setBusy(false);
|
|
13788
|
-
setError(messageOf$
|
|
13788
|
+
setError(messageOf$3(failure));
|
|
13789
13789
|
});
|
|
13790
13790
|
};
|
|
13791
13791
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
@@ -13829,7 +13829,7 @@ window.__ModuleLoader__.load({
|
|
|
13829
13829
|
const open = (name) => {
|
|
13830
13830
|
setNotice(void 0);
|
|
13831
13831
|
author(name).catch((failure) => {
|
|
13832
|
-
setNotice(t("authorFailed", { message: messageOf$
|
|
13832
|
+
setNotice(t("authorFailed", { message: messageOf$3(failure) }));
|
|
13833
13833
|
});
|
|
13834
13834
|
};
|
|
13835
13835
|
const choose = (file) => {
|
|
@@ -13842,7 +13842,7 @@ window.__ModuleLoader__.load({
|
|
|
13842
13842
|
setStaged(preview);
|
|
13843
13843
|
}, (failure) => {
|
|
13844
13844
|
setStaging(false);
|
|
13845
|
-
setNotice(t("importFailed", { message: messageOf$
|
|
13845
|
+
setNotice(t("importFailed", { message: messageOf$3(failure) }));
|
|
13846
13846
|
});
|
|
13847
13847
|
};
|
|
13848
13848
|
if (editing !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PresetEditor, {
|
|
@@ -14053,7 +14053,7 @@ window.__ModuleLoader__.load({
|
|
|
14053
14053
|
]
|
|
14054
14054
|
});
|
|
14055
14055
|
}
|
|
14056
|
-
const dictionaries$
|
|
14056
|
+
const dictionaries$9 = withDictionaries(withDictionaries({
|
|
14057
14057
|
en: {
|
|
14058
14058
|
nav: "Presets",
|
|
14059
14059
|
language: "en",
|
|
@@ -14178,10 +14178,10 @@ window.__ModuleLoader__.load({
|
|
|
14178
14178
|
"prompt_roleplay/style": "叙述文风",
|
|
14179
14179
|
"prompt_roleplay/character-style": "角色风格"
|
|
14180
14180
|
}
|
|
14181
|
-
}, dictionaries$
|
|
14181
|
+
}, dictionaries$18), dictionaries$20);
|
|
14182
14182
|
//#endregion
|
|
14183
14183
|
//#region src/client/pages/presets/presets-controller.ts
|
|
14184
|
-
const messageOf$
|
|
14184
|
+
const messageOf$2 = (error) => error instanceof Error ? error.message : String(error);
|
|
14185
14185
|
/** Reads the preset library from the host and makes, removes and opens its presets. */
|
|
14186
14186
|
var PresetsController = class {
|
|
14187
14187
|
openChat;
|
|
@@ -14257,7 +14257,7 @@ window.__ModuleLoader__.load({
|
|
|
14257
14257
|
} catch (error) {
|
|
14258
14258
|
if (this.abort.signal.aborted) return;
|
|
14259
14259
|
this.store.update((draft) => {
|
|
14260
|
-
draft.error = messageOf$
|
|
14260
|
+
draft.error = messageOf$2(error);
|
|
14261
14261
|
if (draft.presets === void 0) draft.status = "failed";
|
|
14262
14262
|
});
|
|
14263
14263
|
} finally {
|
|
@@ -14269,11 +14269,11 @@ window.__ModuleLoader__.load({
|
|
|
14269
14269
|
};
|
|
14270
14270
|
//#endregion
|
|
14271
14271
|
//#region src/client/pages/presets/index.ts
|
|
14272
|
-
const NAMESPACE$
|
|
14272
|
+
const NAMESPACE$10 = "roleplay.presets";
|
|
14273
14273
|
/** Adds the Presets page to the Role Play panel: reusable writing instructions for stories. */
|
|
14274
14274
|
function registerPresetsPage(ctx) {
|
|
14275
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
14276
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
14275
|
+
const t = ctx.locale.bind(NAMESPACE$10);
|
|
14276
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$10, dictionaries$9), "roleplay: presets dictionaries");
|
|
14277
14277
|
const presets = new PresetsController(createChatOpener(ctx), () => t("language"));
|
|
14278
14278
|
ctx.effect(() => () => {
|
|
14279
14279
|
presets.dispose();
|
|
@@ -14283,7 +14283,7 @@ window.__ModuleLoader__.load({
|
|
|
14283
14283
|
id: "presets",
|
|
14284
14284
|
order: 7,
|
|
14285
14285
|
label: () => t("nav"),
|
|
14286
|
-
locale: NAMESPACE$
|
|
14286
|
+
locale: NAMESPACE$10,
|
|
14287
14287
|
inject: () => presets.inject()
|
|
14288
14288
|
}, PresetsPage));
|
|
14289
14289
|
}
|
|
@@ -14307,19 +14307,19 @@ window.__ModuleLoader__.load({
|
|
|
14307
14307
|
}
|
|
14308
14308
|
//#endregion
|
|
14309
14309
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pager/Pager.module.css.mjs
|
|
14310
|
-
const css$
|
|
14311
|
-
const key$
|
|
14312
|
-
let tag$
|
|
14313
|
-
if (tag$
|
|
14314
|
-
tag$
|
|
14315
|
-
tag$
|
|
14316
|
-
tag$
|
|
14317
|
-
document.head.appendChild(tag$
|
|
14310
|
+
const css$17 = ".rp_KBAD0W_pager{flex:none;justify-content:center;align-items:center;gap:8px;display:flex}.rp_KBAD0W_position{text-align:center;min-width:120px;color:var(--dsw-alias-label-tertiary);font-size:12px}";
|
|
14311
|
+
const key$17 = "src/client/widgets/pager/Pager.module.css";
|
|
14312
|
+
let tag$17 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$17) + "]");
|
|
14313
|
+
if (tag$17 === null) {
|
|
14314
|
+
tag$17 = document.createElement("style");
|
|
14315
|
+
tag$17.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14316
|
+
tag$17.dataset.pluginCss = key$17;
|
|
14317
|
+
document.head.appendChild(tag$17);
|
|
14318
14318
|
}
|
|
14319
|
-
tag$
|
|
14319
|
+
tag$17.textContent = css$17;
|
|
14320
14320
|
var Pager_module_css_default = {
|
|
14321
|
-
"
|
|
14322
|
-
"
|
|
14321
|
+
"position": "rp_KBAD0W_position",
|
|
14322
|
+
"pager": "rp_KBAD0W_pager"
|
|
14323
14323
|
};
|
|
14324
14324
|
//#endregion
|
|
14325
14325
|
//#region src/client/widgets/pager/Pager.tsx
|
|
@@ -14354,16 +14354,16 @@ window.__ModuleLoader__.load({
|
|
|
14354
14354
|
}
|
|
14355
14355
|
//#endregion
|
|
14356
14356
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/problem-list/ProblemList.module.css.mjs
|
|
14357
|
-
const css$
|
|
14358
|
-
const key$
|
|
14359
|
-
let tag$
|
|
14360
|
-
if (tag$
|
|
14361
|
-
tag$
|
|
14362
|
-
tag$
|
|
14363
|
-
tag$
|
|
14364
|
-
document.head.appendChild(tag$
|
|
14357
|
+
const css$16 = ".rp_LZh3Iq_problems{color:var(--dsw-alias-state-warn-primary);flex:none;font-size:12px}.rp_LZh3Iq_problems summary{cursor:pointer}.rp_LZh3Iq_problems ul{color:var(--dsw-alias-label-secondary);margin:8px 0 0;padding-left:20px}.rp_LZh3Iq_problems code{font-family:var(--dsw-font-mono);color:var(--dsw-alias-label-primary)}";
|
|
14358
|
+
const key$16 = "src/client/widgets/problem-list/ProblemList.module.css";
|
|
14359
|
+
let tag$16 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$16) + "]");
|
|
14360
|
+
if (tag$16 === null) {
|
|
14361
|
+
tag$16 = document.createElement("style");
|
|
14362
|
+
tag$16.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14363
|
+
tag$16.dataset.pluginCss = key$16;
|
|
14364
|
+
document.head.appendChild(tag$16);
|
|
14365
14365
|
}
|
|
14366
|
-
tag$
|
|
14366
|
+
tag$16.textContent = css$16;
|
|
14367
14367
|
var ProblemList_module_css_default = { "problems": "rp_LZh3Iq_problems" };
|
|
14368
14368
|
//#endregion
|
|
14369
14369
|
//#region src/client/widgets/problem-list/ProblemList.tsx
|
|
@@ -14381,26 +14381,27 @@ window.__ModuleLoader__.load({
|
|
|
14381
14381
|
}
|
|
14382
14382
|
//#endregion
|
|
14383
14383
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/DeleteSessionDialog.module.css.mjs
|
|
14384
|
-
const css$
|
|
14385
|
-
const key$
|
|
14386
|
-
let tag$
|
|
14387
|
-
if (tag$
|
|
14388
|
-
tag$
|
|
14389
|
-
tag$
|
|
14390
|
-
tag$
|
|
14391
|
-
document.head.appendChild(tag$
|
|
14384
|
+
const css$15 = ".rp_FifHrW_body{flex-direction:column;gap:8px;min-width:min(380px,100%);display:flex}.rp_FifHrW_body p{margin:0}.rp_FifHrW_question{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_FifHrW_warning{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.rp_FifHrW_choice{color:var(--dsw-alias-label-primary);border:0;flex-direction:column;gap:4px;margin:4px 0 0;padding:0;font-size:13px;line-height:20px;display:flex}.rp_FifHrW_choice legend{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;padding:0;font-size:12px}.rp_FifHrW_error{color:var(--dsw-alias-state-error-primary);font-size:12px}";
|
|
14385
|
+
const key$15 = "src/client/pages/sessions/DeleteSessionDialog.module.css";
|
|
14386
|
+
let tag$15 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$15) + "]");
|
|
14387
|
+
if (tag$15 === null) {
|
|
14388
|
+
tag$15 = document.createElement("style");
|
|
14389
|
+
tag$15.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14390
|
+
tag$15.dataset.pluginCss = key$15;
|
|
14391
|
+
document.head.appendChild(tag$15);
|
|
14392
14392
|
}
|
|
14393
|
-
tag$
|
|
14393
|
+
tag$15.textContent = css$15;
|
|
14394
14394
|
var DeleteSessionDialog_module_css_default = {
|
|
14395
|
-
"
|
|
14395
|
+
"body": "rp_FifHrW_body",
|
|
14396
|
+
"choice": "rp_FifHrW_choice",
|
|
14396
14397
|
"question": "rp_FifHrW_question",
|
|
14397
|
-
"
|
|
14398
|
-
"
|
|
14398
|
+
"error": "rp_FifHrW_error",
|
|
14399
|
+
"warning": "rp_FifHrW_warning"
|
|
14399
14400
|
};
|
|
14400
14401
|
//#endregion
|
|
14401
14402
|
//#region src/client/pages/sessions/DeleteSessionDialog.tsx
|
|
14402
14403
|
/** Asks for confirmation before a session and everything saved with it is removed. */
|
|
14403
|
-
function DeleteSessionDialog({ t, removal, onConfirm, onCancel }) {
|
|
14404
|
+
function DeleteSessionDialog({ t, removal, onConfirm, onCancel, onEverywhere }) {
|
|
14404
14405
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
14405
14406
|
open: true,
|
|
14406
14407
|
onClose: onCancel,
|
|
@@ -14429,6 +14430,37 @@ window.__ModuleLoader__.load({
|
|
|
14429
14430
|
className: DeleteSessionDialog_module_css_default.warning,
|
|
14430
14431
|
children: t("deleteWarning")
|
|
14431
14432
|
}),
|
|
14433
|
+
removal.sync === true && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
14434
|
+
className: DeleteSessionDialog_module_css_default.choice,
|
|
14435
|
+
disabled: removal.deleting,
|
|
14436
|
+
children: [
|
|
14437
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("deleteScope") }),
|
|
14438
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [
|
|
14439
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
14440
|
+
type: "radio",
|
|
14441
|
+
name: "roleplay-delete-scope",
|
|
14442
|
+
checked: removal.everywhere !== true,
|
|
14443
|
+
onChange: () => {
|
|
14444
|
+
onEverywhere(false);
|
|
14445
|
+
}
|
|
14446
|
+
}),
|
|
14447
|
+
" ",
|
|
14448
|
+
t("deleteHere")
|
|
14449
|
+
] }),
|
|
14450
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [
|
|
14451
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
14452
|
+
type: "radio",
|
|
14453
|
+
name: "roleplay-delete-scope",
|
|
14454
|
+
checked: removal.everywhere === true,
|
|
14455
|
+
onChange: () => {
|
|
14456
|
+
onEverywhere(true);
|
|
14457
|
+
}
|
|
14458
|
+
}),
|
|
14459
|
+
" ",
|
|
14460
|
+
t("deleteEverywhere")
|
|
14461
|
+
] })
|
|
14462
|
+
]
|
|
14463
|
+
}),
|
|
14432
14464
|
removal.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14433
14465
|
className: DeleteSessionDialog_module_css_default.error,
|
|
14434
14466
|
role: "alert",
|
|
@@ -14491,44 +14523,44 @@ window.__ModuleLoader__.load({
|
|
|
14491
14523
|
}
|
|
14492
14524
|
//#endregion
|
|
14493
14525
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/SessionsPage.module.css.mjs
|
|
14494
|
-
const css$
|
|
14495
|
-
const key$
|
|
14496
|
-
let tag$
|
|
14497
|
-
if (tag$
|
|
14498
|
-
tag$
|
|
14499
|
-
tag$
|
|
14500
|
-
tag$
|
|
14501
|
-
document.head.appendChild(tag$
|
|
14526
|
+
const css$14 = ".rp_24z4eW_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_24z4eW_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_24z4eW_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_24z4eW_spinning{animation:.9s linear infinite rp_24z4eW_spin}@keyframes rp_24z4eW_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_24z4eW_spinning{animation:none}}.rp_24z4eW_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_24z4eW_viewport{--rp-row-height:40px;--rp-header-height:32px;flex:1 1 0;min-height:0;overflow-x:auto}.rp_24z4eW_scrolls{overflow-y:auto}.rp_24z4eW_fits{overflow-y:hidden}.rp_24z4eW_table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:720px}.rp_24z4eW_actionsColumn{width:104px}.rp_24z4eW_nameColumn{width:30%}.rp_24z4eW_worldColumn{width:26%}.rp_24z4eW_timeColumn{width:16%}.rp_24z4eW_turnsColumn{width:10%}.rp_24z4eW_table th{height:var(--rp-header-height);border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);text-align:left;color:var(--dsw-alias-label-tertiary);padding:0 12px;font-size:12px;font-weight:400;position:sticky;top:0}.rp_24z4eW_table td{height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;padding:0 12px;font-size:13px;overflow:hidden}.rp_24z4eW_name{color:var(--dsw-alias-label-primary);font-weight:500}.rp_24z4eW_secondary{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_24z4eW_table .rp_24z4eW_number{text-align:right}.rp_24z4eW_table .rp_24z4eW_actions{text-align:center;white-space:nowrap;padding:0 8px}.rp_24z4eW_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_24z4eW_archived td{opacity:.6}.rp_24z4eW_badge{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);margin-left:6px;padding:0 6px;font-size:12px}@media (width<=640px){.rp_24z4eW_viewport{--rp-row-height:196px;--rp-header-height:0px;overflow-x:hidden}.rp_24z4eW_table,.rp_24z4eW_table tbody,.rp_24z4eW_table tr,.rp_24z4eW_table td{width:100%;display:block}.rp_24z4eW_table{min-width:0}.rp_24z4eW_table colgroup,.rp_24z4eW_table thead{display:none}.rp_24z4eW_table tr{box-sizing:border-box;min-height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l2);padding:10px 12px}.rp_24z4eW_table td{box-sizing:border-box;text-align:start;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;border:0;grid-template-columns:minmax(88px,34%) minmax(0,1fr);align-items:baseline;height:auto;min-height:24px;padding:2px 0;display:grid;overflow:visible}.rp_24z4eW_table td:before{content:attr(data-label);color:var(--dsw-alias-label-tertiary);padding-inline-end:10px;font-size:12px;font-weight:400}.rp_24z4eW_table .rp_24z4eW_number{text-align:start}.rp_24z4eW_table .rp_24z4eW_actions{justify-content:flex-end;min-height:36px;padding-top:4px;display:flex}.rp_24z4eW_table .rp_24z4eW_actions:before{margin-inline-end:auto}}";
|
|
14527
|
+
const key$14 = "src/client/pages/sessions/SessionsPage.module.css";
|
|
14528
|
+
let tag$14 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$14) + "]");
|
|
14529
|
+
if (tag$14 === null) {
|
|
14530
|
+
tag$14 = document.createElement("style");
|
|
14531
|
+
tag$14.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14532
|
+
tag$14.dataset.pluginCss = key$14;
|
|
14533
|
+
document.head.appendChild(tag$14);
|
|
14502
14534
|
}
|
|
14503
|
-
tag$
|
|
14535
|
+
tag$14.textContent = css$14;
|
|
14504
14536
|
var SessionsPage_module_css_default = {
|
|
14537
|
+
"secondary": "rp_24z4eW_secondary",
|
|
14505
14538
|
"page": "rp_24z4eW_page",
|
|
14539
|
+
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14506
14540
|
"spinning": "rp_24z4eW_spinning",
|
|
14507
|
-
"
|
|
14541
|
+
"toolbar": "rp_24z4eW_toolbar",
|
|
14542
|
+
"name": "rp_24z4eW_name",
|
|
14543
|
+
"actions": "rp_24z4eW_actions",
|
|
14508
14544
|
"badge": "rp_24z4eW_badge",
|
|
14509
|
-
"
|
|
14510
|
-
"
|
|
14511
|
-
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
14512
|
-
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14545
|
+
"fits": "rp_24z4eW_fits",
|
|
14546
|
+
"notice": "rp_24z4eW_notice",
|
|
14513
14547
|
"number": "rp_24z4eW_number",
|
|
14514
|
-
"viewport": "rp_24z4eW_viewport",
|
|
14515
14548
|
"message": "rp_24z4eW_message",
|
|
14549
|
+
"worldColumn": "rp_24z4eW_worldColumn",
|
|
14516
14550
|
"count": "rp_24z4eW_count",
|
|
14517
|
-
"
|
|
14518
|
-
"
|
|
14551
|
+
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
14552
|
+
"nameColumn": "rp_24z4eW_nameColumn",
|
|
14553
|
+
"viewport": "rp_24z4eW_viewport",
|
|
14519
14554
|
"archived": "rp_24z4eW_archived",
|
|
14520
|
-
"
|
|
14521
|
-
"name": "rp_24z4eW_name",
|
|
14522
|
-
"actions": "rp_24z4eW_actions",
|
|
14555
|
+
"table": "rp_24z4eW_table",
|
|
14523
14556
|
"spin": "rp_24z4eW_spin",
|
|
14524
|
-
"
|
|
14525
|
-
"
|
|
14526
|
-
"secondary": "rp_24z4eW_secondary"
|
|
14557
|
+
"timeColumn": "rp_24z4eW_timeColumn",
|
|
14558
|
+
"scrolls": "rp_24z4eW_scrolls"
|
|
14527
14559
|
};
|
|
14528
14560
|
//#endregion
|
|
14529
14561
|
//#region src/client/pages/sessions/SessionsPage.tsx
|
|
14530
14562
|
/** The sessions as a table, one page at a time, the most recently played first. */
|
|
14531
|
-
function SessionsPage({ t, useRoleplaySessions, load, refresh, open, archive, restore, askRemoval, cancelRemoval, confirmRemoval }) {
|
|
14563
|
+
function SessionsPage({ t, useRoleplaySessions, load, refresh, open, archive, restore, askRemoval, cancelRemoval, confirmRemoval, setEverywhere }) {
|
|
14532
14564
|
const state = useRoleplaySessions((snapshot) => snapshot);
|
|
14533
14565
|
const viewport = (0, react.useRef)(null);
|
|
14534
14566
|
const { pageSize, scrolls } = pagingFor(useRowFit(viewport));
|
|
@@ -14739,14 +14771,15 @@ window.__ModuleLoader__.load({
|
|
|
14739
14771
|
t,
|
|
14740
14772
|
removal: state.removal,
|
|
14741
14773
|
onConfirm: confirmRemoval,
|
|
14742
|
-
onCancel: cancelRemoval
|
|
14774
|
+
onCancel: cancelRemoval,
|
|
14775
|
+
onEverywhere: setEverywhere
|
|
14743
14776
|
}, state.removal.id)
|
|
14744
14777
|
]
|
|
14745
14778
|
});
|
|
14746
14779
|
}
|
|
14747
14780
|
//#endregion
|
|
14748
14781
|
//#region src/client/pages/sessions/locales.ts
|
|
14749
|
-
const dictionaries$
|
|
14782
|
+
const dictionaries$8 = {
|
|
14750
14783
|
en: {
|
|
14751
14784
|
nav: "Sessions",
|
|
14752
14785
|
loading: "Loading sessions…",
|
|
@@ -14777,6 +14810,9 @@ window.__ModuleLoader__.load({
|
|
|
14777
14810
|
deleteQuestion: "Delete the session \"{name}\"?",
|
|
14778
14811
|
deleteWarning: "Its characters, state and everything else saved with it are removed permanently.",
|
|
14779
14812
|
deleteConfirm: "Delete",
|
|
14813
|
+
deleteScope: "Where to delete it",
|
|
14814
|
+
deleteHere: "Delete it on this device only. It stays on the remote and is not synced back until you restore it on the Sync page.",
|
|
14815
|
+
deleteEverywhere: "Delete it on the remote too. Every device that syncs deletes its copy.",
|
|
14780
14816
|
deleting: "Deleting…",
|
|
14781
14817
|
deleteFailed: "Could not delete the session: {message}",
|
|
14782
14818
|
cancel: "Cancel",
|
|
@@ -14785,246 +14821,839 @@ window.__ModuleLoader__.load({
|
|
|
14785
14821
|
dateLocale: "en-GB"
|
|
14786
14822
|
},
|
|
14787
14823
|
zh: {
|
|
14788
|
-
nav: "存档",
|
|
14789
|
-
loading: "正在加载存档…",
|
|
14790
|
-
loadFailed: "无法加载存档:{message}",
|
|
14791
|
-
empty: "还没有存档。请在世界卡上点击开始。",
|
|
14792
|
-
countOne: "{count} 个存档",
|
|
14793
|
-
countOther: "{count} 个存档",
|
|
14824
|
+
nav: "存档",
|
|
14825
|
+
loading: "正在加载存档…",
|
|
14826
|
+
loadFailed: "无法加载存档:{message}",
|
|
14827
|
+
empty: "还没有存档。请在世界卡上点击开始。",
|
|
14828
|
+
countOne: "{count} 个存档",
|
|
14829
|
+
countOther: "{count} 个存档",
|
|
14830
|
+
refresh: "刷新",
|
|
14831
|
+
refreshing: "刷新中…",
|
|
14832
|
+
previousPage: "上一页",
|
|
14833
|
+
nextPage: "下一页",
|
|
14834
|
+
pageOf: "第 {page} 页,共 {pages} 页",
|
|
14835
|
+
problems: "{count} 个存档无法读取",
|
|
14836
|
+
columnName: "名称",
|
|
14837
|
+
columnWorld: "世界卡",
|
|
14838
|
+
columnCreated: "创建时间",
|
|
14839
|
+
columnLastPlayed: "上次游玩",
|
|
14840
|
+
columnTurns: "回合数",
|
|
14841
|
+
columnActions: "操作",
|
|
14842
|
+
archive: "归档存档",
|
|
14843
|
+
restore: "恢复存档",
|
|
14844
|
+
archived: "已归档",
|
|
14845
|
+
moveFailed: "无法归档或恢复该存档:{message}",
|
|
14846
|
+
open: "打开对话",
|
|
14847
|
+
openFailed: "无法打开对话:{message}",
|
|
14848
|
+
delete: "删除存档",
|
|
14849
|
+
deleteTitle: "删除存档",
|
|
14850
|
+
deleteQuestion: "删除存档“{name}”?",
|
|
14851
|
+
deleteWarning: "存档中的角色、状态及所有已保存的内容将被永久删除。",
|
|
14852
|
+
deleteConfirm: "删除",
|
|
14853
|
+
deleteScope: "删除范围",
|
|
14854
|
+
deleteHere: "只在本机删除。远端仍保留,在“同步”页恢复之前不会同步回来。",
|
|
14855
|
+
deleteEverywhere: "同时从远端删除。其他设备下次同步时也会删除它们的副本。",
|
|
14856
|
+
deleting: "正在删除…",
|
|
14857
|
+
deleteFailed: "无法删除存档:{message}",
|
|
14858
|
+
cancel: "取消",
|
|
14859
|
+
close: "关闭",
|
|
14860
|
+
neverPlayed: "从未",
|
|
14861
|
+
dateLocale: "zh-CN"
|
|
14862
|
+
}
|
|
14863
|
+
};
|
|
14864
|
+
//#endregion
|
|
14865
|
+
//#region src/shared/sync.ts
|
|
14866
|
+
const DEFAULT_SYNC = {
|
|
14867
|
+
remote: "",
|
|
14868
|
+
rclone: "",
|
|
14869
|
+
configFile: "",
|
|
14870
|
+
passwordRef: "",
|
|
14871
|
+
intervalMinutes: 0
|
|
14872
|
+
};
|
|
14873
|
+
const SYNC_PASSWORD_REF = "ROLEPLAY_SYNC_RCLONE_CONFIG_PASS";
|
|
14874
|
+
const SYNC_CHANGED = "roleplay-sync-changed";
|
|
14875
|
+
//#endregion
|
|
14876
|
+
//#region src/client/sync-api.ts
|
|
14877
|
+
async function reply$1(response) {
|
|
14878
|
+
if (!response.ok) {
|
|
14879
|
+
const body = await response.json().catch(() => void 0);
|
|
14880
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
14881
|
+
}
|
|
14882
|
+
return await response.json();
|
|
14883
|
+
}
|
|
14884
|
+
const json = (method, body) => ({
|
|
14885
|
+
method,
|
|
14886
|
+
credentials: "same-origin",
|
|
14887
|
+
headers: { "content-type": "application/json" },
|
|
14888
|
+
body: JSON.stringify(body)
|
|
14889
|
+
});
|
|
14890
|
+
async function loadSyncStatus(signal) {
|
|
14891
|
+
return await reply$1(await fetch(`${API_PREFIX}/sync/status`, {
|
|
14892
|
+
credentials: "same-origin",
|
|
14893
|
+
signal
|
|
14894
|
+
}));
|
|
14895
|
+
}
|
|
14896
|
+
/** Syncs every unit, or only the named ones; resolves when the run is over. */
|
|
14897
|
+
async function runSync(units, signal) {
|
|
14898
|
+
return await reply$1(await fetch(`${API_PREFIX}/sync/run`, {
|
|
14899
|
+
...json("POST", units === void 0 ? {} : { units }),
|
|
14900
|
+
signal
|
|
14901
|
+
}));
|
|
14902
|
+
}
|
|
14903
|
+
async function resolveSync(unit, side, signal) {
|
|
14904
|
+
return await reply$1(await fetch(`${API_PREFIX}/sync/resolve`, {
|
|
14905
|
+
...json("POST", {
|
|
14906
|
+
unit,
|
|
14907
|
+
side
|
|
14908
|
+
}),
|
|
14909
|
+
signal
|
|
14910
|
+
}));
|
|
14911
|
+
}
|
|
14912
|
+
/** Stops syncing a unit that was deleted here; the remote's copy stays and is not brought back until `restoreSync`. */
|
|
14913
|
+
async function forgetSync(unit, signal) {
|
|
14914
|
+
await reply$1(await fetch(`${API_PREFIX}/sync/forget`, {
|
|
14915
|
+
...json("POST", { unit }),
|
|
14916
|
+
signal
|
|
14917
|
+
}));
|
|
14918
|
+
}
|
|
14919
|
+
/** Lets a unit that was forgotten sync again, which brings the remote's copy back on the next run. */
|
|
14920
|
+
async function restoreSync(unit, signal) {
|
|
14921
|
+
await reply$1(await fetch(`${API_PREFIX}/sync/restore`, {
|
|
14922
|
+
...json("POST", { unit }),
|
|
14923
|
+
signal
|
|
14924
|
+
}));
|
|
14925
|
+
}
|
|
14926
|
+
async function describePassword(reference, signal) {
|
|
14927
|
+
return await reply$1(await fetch(`${API_PREFIX}/sync/password?ref=${encodeURIComponent(reference)}`, {
|
|
14928
|
+
credentials: "same-origin",
|
|
14929
|
+
signal
|
|
14930
|
+
}));
|
|
14931
|
+
}
|
|
14932
|
+
/** Stores the password of the rclone configuration file, or removes it when the value is empty; the value is never sent back. */
|
|
14933
|
+
async function storePassword(reference, value, signal) {
|
|
14934
|
+
const status = await reply$1(await fetch(`${API_PREFIX}/sync/password`, {
|
|
14935
|
+
...json("PUT", {
|
|
14936
|
+
ref: reference,
|
|
14937
|
+
value
|
|
14938
|
+
}),
|
|
14939
|
+
signal
|
|
14940
|
+
}));
|
|
14941
|
+
globalThis.dispatchEvent(new Event(SYNC_CHANGED));
|
|
14942
|
+
return status;
|
|
14943
|
+
}
|
|
14944
|
+
//#endregion
|
|
14945
|
+
//#region src/client/pages/sessions/sessions-controller.ts
|
|
14946
|
+
/** Reads the sessions list from the host. */
|
|
14947
|
+
var SessionsController = class {
|
|
14948
|
+
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
14949
|
+
status: "idle",
|
|
14950
|
+
refreshing: false
|
|
14951
|
+
});
|
|
14952
|
+
abort = new AbortController();
|
|
14953
|
+
openChat;
|
|
14954
|
+
face = {
|
|
14955
|
+
hooks: { roleplaySessions: this.store },
|
|
14956
|
+
load: () => {
|
|
14957
|
+
this.read(false);
|
|
14958
|
+
},
|
|
14959
|
+
refresh: () => {
|
|
14960
|
+
this.read(true);
|
|
14961
|
+
},
|
|
14962
|
+
open: (id) => {
|
|
14963
|
+
this.open(id);
|
|
14964
|
+
},
|
|
14965
|
+
archive: (id) => {
|
|
14966
|
+
this.move(id, "archive");
|
|
14967
|
+
},
|
|
14968
|
+
restore: (id) => {
|
|
14969
|
+
this.move(id, "restore");
|
|
14970
|
+
},
|
|
14971
|
+
askRemoval: (id, name) => {
|
|
14972
|
+
this.store.update((draft) => {
|
|
14973
|
+
draft.removal = {
|
|
14974
|
+
id,
|
|
14975
|
+
name,
|
|
14976
|
+
deleting: false
|
|
14977
|
+
};
|
|
14978
|
+
});
|
|
14979
|
+
this.offerSync(id);
|
|
14980
|
+
},
|
|
14981
|
+
setEverywhere: (everywhere) => {
|
|
14982
|
+
this.store.update((draft) => {
|
|
14983
|
+
if (draft.removal !== void 0) draft.removal.everywhere = everywhere;
|
|
14984
|
+
});
|
|
14985
|
+
},
|
|
14986
|
+
cancelRemoval: () => {
|
|
14987
|
+
this.cancelRemoval();
|
|
14988
|
+
},
|
|
14989
|
+
confirmRemoval: () => {
|
|
14990
|
+
this.confirmRemoval();
|
|
14991
|
+
}
|
|
14992
|
+
};
|
|
14993
|
+
constructor(openChat) {
|
|
14994
|
+
this.openChat = openChat;
|
|
14995
|
+
}
|
|
14996
|
+
inject() {
|
|
14997
|
+
return this.face;
|
|
14998
|
+
}
|
|
14999
|
+
dispose() {
|
|
15000
|
+
this.abort.abort();
|
|
15001
|
+
}
|
|
15002
|
+
/** Ask the host for the session's chat, creating it when it does not exist, then show it. */
|
|
15003
|
+
async open(id) {
|
|
15004
|
+
if (this.store.getSnapshot().opening !== void 0) return;
|
|
15005
|
+
this.store.update((draft) => {
|
|
15006
|
+
draft.opening = id;
|
|
15007
|
+
delete draft.openError;
|
|
15008
|
+
});
|
|
15009
|
+
try {
|
|
15010
|
+
const response = await fetch(`${API_PREFIX}/sessions/open?id=${encodeURIComponent(id)}`, {
|
|
15011
|
+
method: "POST",
|
|
15012
|
+
credentials: "same-origin",
|
|
15013
|
+
signal: this.abort.signal
|
|
15014
|
+
});
|
|
15015
|
+
if (!response.ok) {
|
|
15016
|
+
const body = await response.json().catch(() => void 0);
|
|
15017
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
15018
|
+
}
|
|
15019
|
+
this.openChat((await response.json()).chatSessionId);
|
|
15020
|
+
} catch (error) {
|
|
15021
|
+
if (this.abort.signal.aborted) return;
|
|
15022
|
+
this.store.update((draft) => {
|
|
15023
|
+
draft.openError = error instanceof Error ? error.message : String(error);
|
|
15024
|
+
});
|
|
15025
|
+
} finally {
|
|
15026
|
+
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
15027
|
+
delete draft.opening;
|
|
15028
|
+
});
|
|
15029
|
+
}
|
|
15030
|
+
}
|
|
15031
|
+
/** Puts a session away, or brings it back; the list is read again, so that it shows what the host holds. */
|
|
15032
|
+
async move(id, action) {
|
|
15033
|
+
if (this.store.getSnapshot().moving !== void 0) return;
|
|
15034
|
+
this.store.update((draft) => {
|
|
15035
|
+
draft.moving = id;
|
|
15036
|
+
delete draft.moveError;
|
|
15037
|
+
});
|
|
15038
|
+
try {
|
|
15039
|
+
const response = await fetch(`${API_PREFIX}/sessions/${action}?id=${encodeURIComponent(id)}`, {
|
|
15040
|
+
method: "POST",
|
|
15041
|
+
credentials: "same-origin",
|
|
15042
|
+
signal: this.abort.signal
|
|
15043
|
+
});
|
|
15044
|
+
if (!response.ok) {
|
|
15045
|
+
const body = await response.json().catch(() => void 0);
|
|
15046
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
15047
|
+
}
|
|
15048
|
+
await this.read(true);
|
|
15049
|
+
} catch (error) {
|
|
15050
|
+
if (this.abort.signal.aborted) return;
|
|
15051
|
+
this.store.update((draft) => {
|
|
15052
|
+
draft.moveError = error instanceof Error ? error.message : String(error);
|
|
15053
|
+
});
|
|
15054
|
+
} finally {
|
|
15055
|
+
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
15056
|
+
delete draft.moving;
|
|
15057
|
+
});
|
|
15058
|
+
}
|
|
15059
|
+
}
|
|
15060
|
+
/** Only when sync works is there a remote to delete from; if its state cannot be read the dialog offers no remote deletion, and the delete itself reports its own failures. */
|
|
15061
|
+
async offerSync(id) {
|
|
15062
|
+
try {
|
|
15063
|
+
if ((await loadSyncStatus(this.abort.signal)).problem === void 0) this.store.update((draft) => {
|
|
15064
|
+
if (draft.removal?.id === id) draft.removal.sync = true;
|
|
15065
|
+
});
|
|
15066
|
+
} catch {
|
|
15067
|
+
return;
|
|
15068
|
+
}
|
|
15069
|
+
}
|
|
15070
|
+
cancelRemoval() {
|
|
15071
|
+
if (this.store.getSnapshot().removal?.deleting === true) return;
|
|
15072
|
+
this.store.update((draft) => {
|
|
15073
|
+
delete draft.removal;
|
|
15074
|
+
});
|
|
15075
|
+
}
|
|
15076
|
+
/** The dialog stays open, with the reason, when the host refuses. */
|
|
15077
|
+
async confirmRemoval() {
|
|
15078
|
+
const removal = this.store.getSnapshot().removal;
|
|
15079
|
+
if (removal === void 0 || removal.deleting) return;
|
|
15080
|
+
this.store.update((draft) => {
|
|
15081
|
+
if (draft.removal !== void 0) {
|
|
15082
|
+
draft.removal.deleting = true;
|
|
15083
|
+
delete draft.removal.error;
|
|
15084
|
+
}
|
|
15085
|
+
});
|
|
15086
|
+
try {
|
|
15087
|
+
const response = await fetch(`${API_PREFIX}/sessions/item?id=${encodeURIComponent(removal.id)}${removal.everywhere === true ? "&everywhere=true" : ""}`, {
|
|
15088
|
+
method: "DELETE",
|
|
15089
|
+
credentials: "same-origin",
|
|
15090
|
+
signal: this.abort.signal
|
|
15091
|
+
});
|
|
15092
|
+
if (!response.ok && response.status !== 404) {
|
|
15093
|
+
const body = await response.json().catch(() => void 0);
|
|
15094
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
15095
|
+
}
|
|
15096
|
+
this.store.update((draft) => {
|
|
15097
|
+
delete draft.removal;
|
|
15098
|
+
});
|
|
15099
|
+
await this.read(true);
|
|
15100
|
+
} catch (error) {
|
|
15101
|
+
if (this.abort.signal.aborted) return;
|
|
15102
|
+
this.store.update((draft) => {
|
|
15103
|
+
if (draft.removal === void 0) return;
|
|
15104
|
+
draft.removal.deleting = false;
|
|
15105
|
+
draft.removal.error = error instanceof Error ? error.message : String(error);
|
|
15106
|
+
});
|
|
15107
|
+
}
|
|
15108
|
+
}
|
|
15109
|
+
async read(refreshing) {
|
|
15110
|
+
const state = this.store.getSnapshot();
|
|
15111
|
+
if (state.refreshing || refreshing && state.status === "loading") return;
|
|
15112
|
+
this.store.update((draft) => {
|
|
15113
|
+
if (refreshing) draft.refreshing = true;
|
|
15114
|
+
else if (draft.payload === void 0) draft.status = "loading";
|
|
15115
|
+
});
|
|
15116
|
+
try {
|
|
15117
|
+
const response = await fetch(`${API_PREFIX}/sessions`, {
|
|
15118
|
+
credentials: "same-origin",
|
|
15119
|
+
signal: this.abort.signal
|
|
15120
|
+
});
|
|
15121
|
+
if (!response.ok) {
|
|
15122
|
+
const body = await response.json().catch(() => void 0);
|
|
15123
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
15124
|
+
}
|
|
15125
|
+
const payload = await response.json();
|
|
15126
|
+
this.store.update((draft) => {
|
|
15127
|
+
draft.status = "ready";
|
|
15128
|
+
draft.payload = payload;
|
|
15129
|
+
delete draft.error;
|
|
15130
|
+
});
|
|
15131
|
+
} catch (error) {
|
|
15132
|
+
if (this.abort.signal.aborted) return;
|
|
15133
|
+
this.store.update((draft) => {
|
|
15134
|
+
draft.error = error instanceof Error ? error.message : String(error);
|
|
15135
|
+
if (draft.payload === void 0) draft.status = "failed";
|
|
15136
|
+
});
|
|
15137
|
+
} finally {
|
|
15138
|
+
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
15139
|
+
draft.refreshing = false;
|
|
15140
|
+
});
|
|
15141
|
+
}
|
|
15142
|
+
}
|
|
15143
|
+
};
|
|
15144
|
+
//#endregion
|
|
15145
|
+
//#region src/client/pages/sessions/index.ts
|
|
15146
|
+
const NAMESPACE$9 = "roleplay.sessions";
|
|
15147
|
+
/** Adds the Sessions page to the Role Play panel. */
|
|
15148
|
+
function registerSessionsPage(ctx) {
|
|
15149
|
+
const t = ctx.locale.bind(NAMESPACE$9);
|
|
15150
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$9, dictionaries$8), "roleplay: sessions dictionaries");
|
|
15151
|
+
const sessions = new SessionsController(createChatOpener(ctx));
|
|
15152
|
+
ctx.effect(() => () => {
|
|
15153
|
+
sessions.dispose();
|
|
15154
|
+
}, "roleplay: sessions requests");
|
|
15155
|
+
ctx.slots.inject("roleplay.page", () => ctx.slots.register({
|
|
15156
|
+
name: "roleplay.page",
|
|
15157
|
+
id: "sessions",
|
|
15158
|
+
order: 10,
|
|
15159
|
+
label: () => t("nav"),
|
|
15160
|
+
locale: NAMESPACE$9,
|
|
15161
|
+
inject: () => sessions.inject()
|
|
15162
|
+
}, SessionsPage));
|
|
15163
|
+
}
|
|
15164
|
+
//#endregion
|
|
15165
|
+
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sync/SyncPage.module.css.mjs
|
|
15166
|
+
const css$13 = ".rp_Gk-byG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_Gk-byG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_Gk-byG_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_Gk-byG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Gk-byG_viewport{flex:1 1 0;min-height:0;overflow:auto}.rp_Gk-byG_table{border-collapse:collapse;width:100%;font-size:13px}.rp_Gk-byG_table th{text-align:left;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);border-bottom:.5px solid var(--dsw-alias-border-l3);padding:6px 8px;font-size:12px;font-weight:400;position:sticky;top:0}.rp_Gk-byG_table td{vertical-align:top;border-bottom:.5px solid var(--dsw-alias-border-l4);color:var(--dsw-alias-label-primary);padding:6px 8px}.rp_Gk-byG_unit{font-family:var(--dsw-font-mono,monospace);word-break:break-all;font-size:12px}.rp_Gk-byG_conflict{color:var(--dsw-alias-state-warn-primary,var(--dsw-alias-state-error-primary))}.rp_Gk-byG_failed{color:var(--dsw-alias-state-error-primary)}.rp_Gk-byG_detail{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:6px;margin:0;font-size:12px;display:flex}.rp_Gk-byG_choices{flex-wrap:wrap;gap:4px;display:flex}.rp_Gk-byG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_Gk-byG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Gk-byG_problem{color:var(--dsw-alias-state-warn-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_Gk-byG_confirmation{max-width:60ch;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0}";
|
|
15167
|
+
const key$13 = "src/client/pages/sync/SyncPage.module.css";
|
|
15168
|
+
let tag$13 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$13) + "]");
|
|
15169
|
+
if (tag$13 === null) {
|
|
15170
|
+
tag$13 = document.createElement("style");
|
|
15171
|
+
tag$13.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15172
|
+
tag$13.dataset.pluginCss = key$13;
|
|
15173
|
+
document.head.appendChild(tag$13);
|
|
15174
|
+
}
|
|
15175
|
+
tag$13.textContent = css$13;
|
|
15176
|
+
var SyncPage_module_css_default = {
|
|
15177
|
+
"viewport": "rp_Gk-byG_viewport",
|
|
15178
|
+
"problem": "rp_Gk-byG_problem",
|
|
15179
|
+
"meta": "rp_Gk-byG_meta",
|
|
15180
|
+
"table": "rp_Gk-byG_table",
|
|
15181
|
+
"actions": "rp_Gk-byG_actions",
|
|
15182
|
+
"page": "rp_Gk-byG_page",
|
|
15183
|
+
"unit": "rp_Gk-byG_unit",
|
|
15184
|
+
"detail": "rp_Gk-byG_detail",
|
|
15185
|
+
"confirmation": "rp_Gk-byG_confirmation",
|
|
15186
|
+
"error": "rp_Gk-byG_error",
|
|
15187
|
+
"conflict": "rp_Gk-byG_conflict",
|
|
15188
|
+
"failed": "rp_Gk-byG_failed",
|
|
15189
|
+
"toolbar": "rp_Gk-byG_toolbar",
|
|
15190
|
+
"choices": "rp_Gk-byG_choices",
|
|
15191
|
+
"message": "rp_Gk-byG_message"
|
|
15192
|
+
};
|
|
15193
|
+
//#endregion
|
|
15194
|
+
//#region src/client/pages/sync/SyncPage.tsx
|
|
15195
|
+
const when = (iso, never, locale) => iso === void 0 ? never : new Date(iso).toLocaleString(locale);
|
|
15196
|
+
function Details({ t, unit, working, face, confirmDeletion }) {
|
|
15197
|
+
if (unit.state === "ignored") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
15198
|
+
className: SyncPage_module_css_default.detail,
|
|
15199
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("ignoredDetail") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15200
|
+
className: SyncPage_module_css_default.choices,
|
|
15201
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15202
|
+
size: "sm",
|
|
15203
|
+
variant: "outline",
|
|
15204
|
+
disabled: working,
|
|
15205
|
+
onClick: () => {
|
|
15206
|
+
face.restore(unit.id);
|
|
15207
|
+
},
|
|
15208
|
+
children: t("restore")
|
|
15209
|
+
})
|
|
15210
|
+
})]
|
|
15211
|
+
});
|
|
15212
|
+
if (unit.state !== "conflict") return unit.message === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15213
|
+
className: unit.state === "failed" ? SyncPage_module_css_default.failed : void 0,
|
|
15214
|
+
children: unit.message
|
|
15215
|
+
});
|
|
15216
|
+
if (unit.removal === "removed") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
15217
|
+
className: SyncPage_module_css_default.detail,
|
|
15218
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15219
|
+
className: SyncPage_module_css_default.conflict,
|
|
15220
|
+
children: t("removedDetail")
|
|
15221
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
15222
|
+
className: SyncPage_module_css_default.choices,
|
|
15223
|
+
children: [
|
|
15224
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15225
|
+
size: "sm",
|
|
15226
|
+
variant: "outline",
|
|
15227
|
+
disabled: working,
|
|
15228
|
+
onClick: () => {
|
|
15229
|
+
confirmDeletion({
|
|
15230
|
+
unit: unit.id,
|
|
15231
|
+
side: "local",
|
|
15232
|
+
scope: "everywhere"
|
|
15233
|
+
});
|
|
15234
|
+
},
|
|
15235
|
+
children: t("deleteEverywhere")
|
|
15236
|
+
}),
|
|
15237
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15238
|
+
size: "sm",
|
|
15239
|
+
variant: "outline",
|
|
15240
|
+
disabled: working,
|
|
15241
|
+
onClick: () => {
|
|
15242
|
+
face.forget(unit.id);
|
|
15243
|
+
},
|
|
15244
|
+
children: t("keepOnRemote")
|
|
15245
|
+
}),
|
|
15246
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15247
|
+
size: "sm",
|
|
15248
|
+
variant: "outline",
|
|
15249
|
+
disabled: working,
|
|
15250
|
+
onClick: () => {
|
|
15251
|
+
face.resolve(unit.id, "remote");
|
|
15252
|
+
},
|
|
15253
|
+
children: t("getBack")
|
|
15254
|
+
})
|
|
15255
|
+
]
|
|
15256
|
+
})]
|
|
15257
|
+
});
|
|
15258
|
+
if (unit.removal === "deleted") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
15259
|
+
className: SyncPage_module_css_default.detail,
|
|
15260
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15261
|
+
className: SyncPage_module_css_default.conflict,
|
|
15262
|
+
children: t("deletedDetail")
|
|
15263
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
15264
|
+
className: SyncPage_module_css_default.choices,
|
|
15265
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15266
|
+
size: "sm",
|
|
15267
|
+
variant: "outline",
|
|
15268
|
+
disabled: working,
|
|
15269
|
+
onClick: () => {
|
|
15270
|
+
face.resolve(unit.id, "local");
|
|
15271
|
+
},
|
|
15272
|
+
children: t("keepMine")
|
|
15273
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15274
|
+
size: "sm",
|
|
15275
|
+
variant: "outline",
|
|
15276
|
+
disabled: working,
|
|
15277
|
+
onClick: () => {
|
|
15278
|
+
confirmDeletion({
|
|
15279
|
+
unit: unit.id,
|
|
15280
|
+
side: "remote",
|
|
15281
|
+
scope: "here"
|
|
15282
|
+
});
|
|
15283
|
+
},
|
|
15284
|
+
children: t("deleteHere")
|
|
15285
|
+
})]
|
|
15286
|
+
})]
|
|
15287
|
+
});
|
|
15288
|
+
const files = unit.conflicts ?? [];
|
|
15289
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
15290
|
+
className: SyncPage_module_css_default.detail,
|
|
15291
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15292
|
+
className: SyncPage_module_css_default.conflict,
|
|
15293
|
+
children: files.length === 0 ? t("conflictWhole") : t("conflictFiles", { files: files.join(", ") })
|
|
15294
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
15295
|
+
className: SyncPage_module_css_default.choices,
|
|
15296
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15297
|
+
size: "sm",
|
|
15298
|
+
variant: "outline",
|
|
15299
|
+
disabled: working,
|
|
15300
|
+
onClick: () => {
|
|
15301
|
+
face.resolve(unit.id, "local");
|
|
15302
|
+
},
|
|
15303
|
+
children: t("keepLocal")
|
|
15304
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15305
|
+
size: "sm",
|
|
15306
|
+
variant: "outline",
|
|
15307
|
+
disabled: working,
|
|
15308
|
+
onClick: () => {
|
|
15309
|
+
face.resolve(unit.id, "remote");
|
|
15310
|
+
},
|
|
15311
|
+
children: t("keepRemote")
|
|
15312
|
+
})]
|
|
15313
|
+
})]
|
|
15314
|
+
});
|
|
15315
|
+
}
|
|
15316
|
+
/** The units that sync, their state, a button to sync now, and the choices a conflict waits for. */
|
|
15317
|
+
function SyncPage(props) {
|
|
15318
|
+
const { t, load, refresh, run, resolve, forget, restore } = props;
|
|
15319
|
+
const state = props.useSync((snapshot) => snapshot);
|
|
15320
|
+
const [deletion, setDeletion] = (0, react.useState)();
|
|
15321
|
+
(0, react.useEffect)(() => {
|
|
15322
|
+
load();
|
|
15323
|
+
}, [load]);
|
|
15324
|
+
const status = state.sync;
|
|
15325
|
+
const busy = state.working || status?.running === true;
|
|
15326
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15327
|
+
className: SyncPage_module_css_default.page,
|
|
15328
|
+
"data-testid": "roleplay-sync-page",
|
|
15329
|
+
children: [
|
|
15330
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15331
|
+
className: SyncPage_module_css_default.toolbar,
|
|
15332
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15333
|
+
className: SyncPage_module_css_default.meta,
|
|
15334
|
+
children: t("lastRun", { when: when(status?.lastRun, t("never"), t("dateLocale")) })
|
|
15335
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
15336
|
+
className: SyncPage_module_css_default.actions,
|
|
15337
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15338
|
+
size: "sm",
|
|
15339
|
+
variant: "ghost",
|
|
15340
|
+
disabled: busy,
|
|
15341
|
+
onClick: refresh,
|
|
15342
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}), t("refresh")]
|
|
15343
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15344
|
+
size: "sm",
|
|
15345
|
+
variant: "primary",
|
|
15346
|
+
disabled: busy || status?.problem !== void 0,
|
|
15347
|
+
onClick: () => {
|
|
15348
|
+
run();
|
|
15349
|
+
},
|
|
15350
|
+
children: busy ? t("running") : t("run")
|
|
15351
|
+
})]
|
|
15352
|
+
})]
|
|
15353
|
+
}),
|
|
15354
|
+
status?.problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15355
|
+
className: SyncPage_module_css_default.problem,
|
|
15356
|
+
role: "note",
|
|
15357
|
+
children: t("problem", { message: status.problem })
|
|
15358
|
+
}),
|
|
15359
|
+
state.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15360
|
+
className: SyncPage_module_css_default.error,
|
|
15361
|
+
role: "alert",
|
|
15362
|
+
children: state.status === "failed" ? t("loadFailed", { message: state.error }) : t("failed", { message: state.error })
|
|
15363
|
+
}),
|
|
15364
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15365
|
+
className: SyncPage_module_css_default.viewport,
|
|
15366
|
+
children: [
|
|
15367
|
+
state.status === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15368
|
+
className: SyncPage_module_css_default.message,
|
|
15369
|
+
children: t("loading")
|
|
15370
|
+
}),
|
|
15371
|
+
status !== void 0 && status.units.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15372
|
+
className: SyncPage_module_css_default.message,
|
|
15373
|
+
children: t("empty")
|
|
15374
|
+
}),
|
|
15375
|
+
status !== void 0 && status.units.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
|
|
15376
|
+
className: SyncPage_module_css_default.table,
|
|
15377
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
15378
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("unit") }),
|
|
15379
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("kind") }),
|
|
15380
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("state") }),
|
|
15381
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("synced") }),
|
|
15382
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("details") }),
|
|
15383
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {})
|
|
15384
|
+
] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: status.units.map((unit) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
15385
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
15386
|
+
className: SyncPage_module_css_default.unit,
|
|
15387
|
+
children: unit.id
|
|
15388
|
+
}),
|
|
15389
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: t(`kind_${unit.kind}`) }),
|
|
15390
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: t(`state_${unit.state}`) }),
|
|
15391
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: when(unit.at, t("never"), t("dateLocale")) }),
|
|
15392
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Details, {
|
|
15393
|
+
t,
|
|
15394
|
+
unit,
|
|
15395
|
+
working: busy,
|
|
15396
|
+
face: {
|
|
15397
|
+
resolve,
|
|
15398
|
+
forget,
|
|
15399
|
+
restore
|
|
15400
|
+
},
|
|
15401
|
+
confirmDeletion: setDeletion
|
|
15402
|
+
}) }),
|
|
15403
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15404
|
+
size: "sm",
|
|
15405
|
+
variant: "ghost",
|
|
15406
|
+
disabled: busy || status.problem !== void 0 || unit.state === "conflict" || unit.state === "ignored",
|
|
15407
|
+
onClick: () => {
|
|
15408
|
+
run(unit.id);
|
|
15409
|
+
},
|
|
15410
|
+
children: t("runOne")
|
|
15411
|
+
}) })
|
|
15412
|
+
] }, unit.id)) })]
|
|
15413
|
+
})
|
|
15414
|
+
]
|
|
15415
|
+
}),
|
|
15416
|
+
deletion !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
15417
|
+
open: true,
|
|
15418
|
+
onClose: () => {
|
|
15419
|
+
setDeletion(void 0);
|
|
15420
|
+
},
|
|
15421
|
+
title: t(deletion.scope === "everywhere" ? "confirmEverywhereTitle" : "confirmHereTitle"),
|
|
15422
|
+
closeLabel: t("close"),
|
|
15423
|
+
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, {
|
|
15424
|
+
variant: "ghost",
|
|
15425
|
+
"data-modal-autofocus": true,
|
|
15426
|
+
disabled: busy,
|
|
15427
|
+
onClick: () => {
|
|
15428
|
+
setDeletion(void 0);
|
|
15429
|
+
},
|
|
15430
|
+
children: t("cancel")
|
|
15431
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
15432
|
+
variant: "primary",
|
|
15433
|
+
disabled: busy,
|
|
15434
|
+
onClick: () => {
|
|
15435
|
+
resolve(deletion.unit, deletion.side);
|
|
15436
|
+
setDeletion(void 0);
|
|
15437
|
+
},
|
|
15438
|
+
children: deletion.scope === "everywhere" ? t("deleteEverywhere") : t("deleteHere")
|
|
15439
|
+
})] }),
|
|
15440
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15441
|
+
className: SyncPage_module_css_default.confirmation,
|
|
15442
|
+
children: t(deletion.scope === "everywhere" ? "confirmEverywhere" : "confirmHere", { unit: deletion.unit })
|
|
15443
|
+
})
|
|
15444
|
+
})
|
|
15445
|
+
]
|
|
15446
|
+
});
|
|
15447
|
+
}
|
|
15448
|
+
//#endregion
|
|
15449
|
+
//#region src/client/pages/sync/locales.ts
|
|
15450
|
+
const dictionaries$7 = {
|
|
15451
|
+
en: {
|
|
15452
|
+
nav: "Sync",
|
|
15453
|
+
loading: "Reading the sync state…",
|
|
15454
|
+
loadFailed: "Could not read the sync state: {message}",
|
|
15455
|
+
refresh: "Refresh",
|
|
15456
|
+
run: "Sync now",
|
|
15457
|
+
running: "Syncing…",
|
|
15458
|
+
runOne: "Sync",
|
|
15459
|
+
never: "never",
|
|
15460
|
+
lastRun: "Last run: {when}",
|
|
15461
|
+
dateLocale: "en-GB",
|
|
15462
|
+
empty: "Nothing to sync yet. Worlds, sessions and the shared folders (prompts, presets, lorebooks, avatars, interface packs) appear here once there are some.",
|
|
15463
|
+
problem: "Sync cannot run: {message}. Set it up in Settings, under Role Play.",
|
|
15464
|
+
failed: "The last action failed: {message}",
|
|
15465
|
+
unit: "Unit",
|
|
15466
|
+
kind: "Kind",
|
|
15467
|
+
state: "State",
|
|
15468
|
+
synced: "Last synced",
|
|
15469
|
+
details: "Details",
|
|
15470
|
+
kind_world: "World",
|
|
15471
|
+
kind_session: "Session",
|
|
15472
|
+
kind_shared: "Shared folder",
|
|
15473
|
+
state_synced: "In step",
|
|
15474
|
+
state_changed: "Changed here",
|
|
15475
|
+
state_new: "Not synced yet",
|
|
15476
|
+
state_conflict: "Needs a choice",
|
|
15477
|
+
state_busy: "Syncing",
|
|
15478
|
+
state_failed: "Failed",
|
|
15479
|
+
state_ignored: "Kept on the remote",
|
|
15480
|
+
conflictWhole: "Both sides changed this. Keep one: the other is replaced.",
|
|
15481
|
+
conflictFiles: "Both sides changed these files, so both copies were kept side by side: {files}. Choose which copy to keep.",
|
|
15482
|
+
keepLocal: "Keep this device's",
|
|
15483
|
+
keepRemote: "Keep the remote's",
|
|
15484
|
+
ignoredDetail: "Deleted here only. The remote still has it and it is not synced back.",
|
|
15485
|
+
restore: "Sync it again",
|
|
15486
|
+
removedDetail: "This was removed on this device, and the remote still has it. Delete it everywhere, keep it on the remote and stop syncing it here, or get it back.",
|
|
15487
|
+
deleteEverywhere: "Delete everywhere",
|
|
15488
|
+
keepOnRemote: "Keep on the remote",
|
|
15489
|
+
getBack: "Get it back",
|
|
15490
|
+
deletedDetail: "Another device deleted this, but it was changed here since, so it was not removed. Keep this copy and sync it again, or delete it here too.",
|
|
15491
|
+
keepMine: "Keep this copy",
|
|
15492
|
+
deleteHere: "Delete it here too",
|
|
15493
|
+
confirmEverywhereTitle: "Delete synced content everywhere?",
|
|
15494
|
+
confirmEverywhere: "Delete \"{unit}\" from this device and the remote? Other devices will delete their copies when they next sync.",
|
|
15495
|
+
confirmHereTitle: "Delete this device's copy?",
|
|
15496
|
+
confirmHere: "Delete \"{unit}\" from this device too? This matches the deletion already recorded on the remote.",
|
|
15497
|
+
cancel: "Cancel",
|
|
15498
|
+
close: "Close"
|
|
15499
|
+
},
|
|
15500
|
+
zh: {
|
|
15501
|
+
nav: "同步",
|
|
15502
|
+
loading: "正在读取同步状态…",
|
|
15503
|
+
loadFailed: "无法读取同步状态:{message}",
|
|
14794
15504
|
refresh: "刷新",
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
|
|
14814
|
-
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
15505
|
+
run: "立即同步",
|
|
15506
|
+
running: "同步中…",
|
|
15507
|
+
runOne: "同步",
|
|
15508
|
+
never: "从未",
|
|
15509
|
+
lastRun: "上次运行:{when}",
|
|
15510
|
+
dateLocale: "zh-CN",
|
|
15511
|
+
empty: "还没有可同步的内容。世界、会话和共享文件夹(提示词、预设、世界书、头像、界面包)一旦有内容就会出现在这里。",
|
|
15512
|
+
problem: "无法同步:{message}。请在“设置”的“角色扮演”中配置。",
|
|
15513
|
+
failed: "上一次操作失败:{message}",
|
|
15514
|
+
unit: "单元",
|
|
15515
|
+
kind: "类型",
|
|
15516
|
+
state: "状态",
|
|
15517
|
+
synced: "上次同步",
|
|
15518
|
+
details: "详情",
|
|
15519
|
+
kind_world: "世界",
|
|
15520
|
+
kind_session: "会话",
|
|
15521
|
+
kind_shared: "共享文件夹",
|
|
15522
|
+
state_synced: "已一致",
|
|
15523
|
+
state_changed: "本机已改动",
|
|
15524
|
+
state_new: "尚未同步",
|
|
15525
|
+
state_conflict: "需要选择",
|
|
15526
|
+
state_busy: "同步中",
|
|
15527
|
+
state_failed: "失败",
|
|
15528
|
+
state_ignored: "仅保留在远端",
|
|
15529
|
+
conflictWhole: "两边都改动了它。请保留其中一份,另一份会被替换。",
|
|
15530
|
+
conflictFiles: "两边都改动了这些文件,所以两份都保留了下来:{files}。请选择保留哪一份。",
|
|
15531
|
+
keepLocal: "保留本机的",
|
|
15532
|
+
keepRemote: "保留远端的",
|
|
15533
|
+
ignoredDetail: "只在本机删除了。远端仍有它,且不会同步回来。",
|
|
15534
|
+
restore: "重新同步",
|
|
15535
|
+
removedDetail: "它在本机被移除了,远端仍有它。可以在所有设备上删除,也可以保留在远端并停止在本机同步,或把它取回来。",
|
|
15536
|
+
deleteEverywhere: "在所有设备上删除",
|
|
15537
|
+
keepOnRemote: "保留在远端",
|
|
15538
|
+
getBack: "取回",
|
|
15539
|
+
deletedDetail: "另一台设备删除了它,但本机之后又改动过,所以没有移除。可以保留这一份并重新同步,也可以在本机一并删除。",
|
|
15540
|
+
keepMine: "保留这一份",
|
|
15541
|
+
deleteHere: "在本机一并删除",
|
|
15542
|
+
confirmEverywhereTitle: "在所有设备上删除同步内容?",
|
|
15543
|
+
confirmEverywhere: "要从本机和远端删除“{unit}”吗?其他设备下次同步时也会删除各自的副本。",
|
|
15544
|
+
confirmHereTitle: "删除本机副本?",
|
|
15545
|
+
confirmHere: "也要从本机删除“{unit}”吗?这会与远端已经记录的删除保持一致。",
|
|
14819
15546
|
cancel: "取消",
|
|
14820
|
-
close: "关闭"
|
|
14821
|
-
neverPlayed: "从未",
|
|
14822
|
-
dateLocale: "zh-CN"
|
|
15547
|
+
close: "关闭"
|
|
14823
15548
|
}
|
|
14824
15549
|
};
|
|
14825
15550
|
//#endregion
|
|
14826
|
-
//#region src/client/pages/
|
|
14827
|
-
|
|
14828
|
-
|
|
15551
|
+
//#region src/client/pages/sync/sync-controller.ts
|
|
15552
|
+
const messageOf$1 = (error) => error instanceof Error ? error.message : String(error);
|
|
15553
|
+
/** Reads what the sync knows of each unit and starts runs and choices; while one runs the page keeps reading. */
|
|
15554
|
+
var SyncController = class {
|
|
14829
15555
|
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
14830
15556
|
status: "idle",
|
|
14831
|
-
|
|
15557
|
+
working: false
|
|
14832
15558
|
});
|
|
14833
15559
|
abort = new AbortController();
|
|
14834
|
-
|
|
15560
|
+
timer;
|
|
14835
15561
|
face = {
|
|
14836
|
-
hooks: {
|
|
15562
|
+
hooks: { sync: this.store },
|
|
14837
15563
|
load: () => {
|
|
14838
|
-
this.read(
|
|
15564
|
+
if (this.store.getSnapshot().status === "idle") this.read(true);
|
|
14839
15565
|
},
|
|
14840
15566
|
refresh: () => {
|
|
14841
|
-
this.read(
|
|
14842
|
-
},
|
|
14843
|
-
open: (id) => {
|
|
14844
|
-
this.open(id);
|
|
14845
|
-
},
|
|
14846
|
-
archive: (id) => {
|
|
14847
|
-
this.move(id, "archive");
|
|
15567
|
+
this.read(false);
|
|
14848
15568
|
},
|
|
14849
|
-
|
|
14850
|
-
this.
|
|
15569
|
+
run: (unit) => {
|
|
15570
|
+
this.work(() => runSync(unit === void 0 ? void 0 : [unit], this.abort.signal));
|
|
14851
15571
|
},
|
|
14852
|
-
|
|
14853
|
-
this.
|
|
14854
|
-
draft.removal = {
|
|
14855
|
-
id,
|
|
14856
|
-
name,
|
|
14857
|
-
deleting: false
|
|
14858
|
-
};
|
|
14859
|
-
});
|
|
15572
|
+
resolve: (unit, side) => {
|
|
15573
|
+
this.work(() => resolveSync(unit, side, this.abort.signal));
|
|
14860
15574
|
},
|
|
14861
|
-
|
|
14862
|
-
this.
|
|
15575
|
+
forget: (unit) => {
|
|
15576
|
+
this.work(() => forgetSync(unit, this.abort.signal));
|
|
14863
15577
|
},
|
|
14864
|
-
|
|
14865
|
-
this.
|
|
15578
|
+
restore: (unit) => {
|
|
15579
|
+
this.work(() => restoreSync(unit, this.abort.signal));
|
|
14866
15580
|
}
|
|
14867
15581
|
};
|
|
14868
|
-
constructor(openChat) {
|
|
14869
|
-
this.openChat = openChat;
|
|
14870
|
-
}
|
|
14871
15582
|
inject() {
|
|
14872
15583
|
return this.face;
|
|
14873
15584
|
}
|
|
14874
15585
|
dispose() {
|
|
14875
15586
|
this.abort.abort();
|
|
15587
|
+
this.stopPolling();
|
|
14876
15588
|
}
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
if (this.store.getSnapshot().opening !== void 0) return;
|
|
15589
|
+
async work(action) {
|
|
15590
|
+
if (this.store.getSnapshot().working) return;
|
|
14880
15591
|
this.store.update((draft) => {
|
|
14881
|
-
draft.
|
|
14882
|
-
delete draft.
|
|
15592
|
+
draft.working = true;
|
|
15593
|
+
delete draft.error;
|
|
14883
15594
|
});
|
|
15595
|
+
this.timer ??= setInterval(() => {
|
|
15596
|
+
this.read(false);
|
|
15597
|
+
}, 2e3);
|
|
14884
15598
|
try {
|
|
14885
|
-
|
|
14886
|
-
method: "POST",
|
|
14887
|
-
credentials: "same-origin",
|
|
14888
|
-
signal: this.abort.signal
|
|
14889
|
-
});
|
|
14890
|
-
if (!response.ok) {
|
|
14891
|
-
const body = await response.json().catch(() => void 0);
|
|
14892
|
-
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
14893
|
-
}
|
|
14894
|
-
this.openChat((await response.json()).chatSessionId);
|
|
15599
|
+
await action();
|
|
14895
15600
|
} catch (error) {
|
|
14896
15601
|
if (this.abort.signal.aborted) return;
|
|
14897
15602
|
this.store.update((draft) => {
|
|
14898
|
-
draft.
|
|
15603
|
+
draft.error = messageOf$1(error);
|
|
14899
15604
|
});
|
|
14900
15605
|
} finally {
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
async move(id, action) {
|
|
14908
|
-
if (this.store.getSnapshot().moving !== void 0) return;
|
|
14909
|
-
this.store.update((draft) => {
|
|
14910
|
-
draft.moving = id;
|
|
14911
|
-
delete draft.moveError;
|
|
14912
|
-
});
|
|
14913
|
-
try {
|
|
14914
|
-
const response = await fetch(`${API_PREFIX}/sessions/${action}?id=${encodeURIComponent(id)}`, {
|
|
14915
|
-
method: "POST",
|
|
14916
|
-
credentials: "same-origin",
|
|
14917
|
-
signal: this.abort.signal
|
|
14918
|
-
});
|
|
14919
|
-
if (!response.ok) {
|
|
14920
|
-
const body = await response.json().catch(() => void 0);
|
|
14921
|
-
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
15606
|
+
this.stopPolling();
|
|
15607
|
+
if (!this.abort.signal.aborted) {
|
|
15608
|
+
this.store.update((draft) => {
|
|
15609
|
+
draft.working = false;
|
|
15610
|
+
});
|
|
15611
|
+
await this.read(false);
|
|
14922
15612
|
}
|
|
14923
|
-
await this.read(true);
|
|
14924
|
-
} catch (error) {
|
|
14925
|
-
if (this.abort.signal.aborted) return;
|
|
14926
|
-
this.store.update((draft) => {
|
|
14927
|
-
draft.moveError = error instanceof Error ? error.message : String(error);
|
|
14928
|
-
});
|
|
14929
|
-
} finally {
|
|
14930
|
-
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
14931
|
-
delete draft.moving;
|
|
14932
|
-
});
|
|
14933
15613
|
}
|
|
14934
15614
|
}
|
|
14935
|
-
|
|
14936
|
-
if (this.
|
|
14937
|
-
this.
|
|
14938
|
-
delete draft.removal;
|
|
14939
|
-
});
|
|
14940
|
-
}
|
|
14941
|
-
/** The dialog stays open, with the reason, when the host refuses. */
|
|
14942
|
-
async confirmRemoval() {
|
|
14943
|
-
const removal = this.store.getSnapshot().removal;
|
|
14944
|
-
if (removal === void 0 || removal.deleting) return;
|
|
14945
|
-
this.store.update((draft) => {
|
|
14946
|
-
if (draft.removal !== void 0) {
|
|
14947
|
-
draft.removal.deleting = true;
|
|
14948
|
-
delete draft.removal.error;
|
|
14949
|
-
}
|
|
14950
|
-
});
|
|
14951
|
-
try {
|
|
14952
|
-
const response = await fetch(`${API_PREFIX}/sessions/item?id=${encodeURIComponent(removal.id)}`, {
|
|
14953
|
-
method: "DELETE",
|
|
14954
|
-
credentials: "same-origin",
|
|
14955
|
-
signal: this.abort.signal
|
|
14956
|
-
});
|
|
14957
|
-
if (!response.ok && response.status !== 404) {
|
|
14958
|
-
const body = await response.json().catch(() => void 0);
|
|
14959
|
-
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
14960
|
-
}
|
|
14961
|
-
this.store.update((draft) => {
|
|
14962
|
-
delete draft.removal;
|
|
14963
|
-
});
|
|
14964
|
-
await this.read(true);
|
|
14965
|
-
} catch (error) {
|
|
14966
|
-
if (this.abort.signal.aborted) return;
|
|
14967
|
-
this.store.update((draft) => {
|
|
14968
|
-
if (draft.removal === void 0) return;
|
|
14969
|
-
draft.removal.deleting = false;
|
|
14970
|
-
draft.removal.error = error instanceof Error ? error.message : String(error);
|
|
14971
|
-
});
|
|
14972
|
-
}
|
|
15615
|
+
stopPolling() {
|
|
15616
|
+
if (this.timer !== void 0) clearInterval(this.timer);
|
|
15617
|
+
this.timer = void 0;
|
|
14973
15618
|
}
|
|
14974
|
-
async read(
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
this.store.update((draft) => {
|
|
14978
|
-
if (refreshing) draft.refreshing = true;
|
|
14979
|
-
else if (draft.payload === void 0) draft.status = "loading";
|
|
15619
|
+
async read(first) {
|
|
15620
|
+
if (first) this.store.update((draft) => {
|
|
15621
|
+
draft.status = "loading";
|
|
14980
15622
|
});
|
|
14981
15623
|
try {
|
|
14982
|
-
const
|
|
14983
|
-
credentials: "same-origin",
|
|
14984
|
-
signal: this.abort.signal
|
|
14985
|
-
});
|
|
14986
|
-
if (!response.ok) {
|
|
14987
|
-
const body = await response.json().catch(() => void 0);
|
|
14988
|
-
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
14989
|
-
}
|
|
14990
|
-
const payload = await response.json();
|
|
15624
|
+
const sync = await loadSyncStatus(this.abort.signal);
|
|
14991
15625
|
this.store.update((draft) => {
|
|
14992
15626
|
draft.status = "ready";
|
|
14993
|
-
draft.
|
|
14994
|
-
delete draft.error;
|
|
15627
|
+
draft.sync = sync;
|
|
14995
15628
|
});
|
|
14996
15629
|
} catch (error) {
|
|
14997
15630
|
if (this.abort.signal.aborted) return;
|
|
14998
15631
|
this.store.update((draft) => {
|
|
14999
|
-
draft.error =
|
|
15000
|
-
if (draft.
|
|
15001
|
-
});
|
|
15002
|
-
} finally {
|
|
15003
|
-
if (!this.abort.signal.aborted) this.store.update((draft) => {
|
|
15004
|
-
draft.refreshing = false;
|
|
15632
|
+
draft.error = messageOf$1(error);
|
|
15633
|
+
if (draft.sync === void 0) draft.status = "failed";
|
|
15005
15634
|
});
|
|
15006
15635
|
}
|
|
15007
15636
|
}
|
|
15008
15637
|
};
|
|
15009
15638
|
//#endregion
|
|
15010
|
-
//#region src/client/pages/
|
|
15011
|
-
const NAMESPACE$8 = "roleplay.
|
|
15012
|
-
/** Adds the
|
|
15013
|
-
function
|
|
15639
|
+
//#region src/client/pages/sync/index.ts
|
|
15640
|
+
const NAMESPACE$8 = "roleplay.sync";
|
|
15641
|
+
/** Adds the Sync page to the Role Play panel: what is in step with the remote and what needs a choice. */
|
|
15642
|
+
function registerSyncPage(ctx) {
|
|
15014
15643
|
const t = ctx.locale.bind(NAMESPACE$8);
|
|
15015
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$8, dictionaries$7), "roleplay:
|
|
15016
|
-
const
|
|
15644
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$8, dictionaries$7), "roleplay: sync dictionaries");
|
|
15645
|
+
const sync = new SyncController();
|
|
15017
15646
|
ctx.effect(() => () => {
|
|
15018
|
-
|
|
15019
|
-
}, "roleplay:
|
|
15647
|
+
sync.dispose();
|
|
15648
|
+
}, "roleplay: sync requests");
|
|
15020
15649
|
ctx.slots.inject("roleplay.page", () => ctx.slots.register({
|
|
15021
15650
|
name: "roleplay.page",
|
|
15022
|
-
id: "
|
|
15023
|
-
order:
|
|
15651
|
+
id: "sync",
|
|
15652
|
+
order: 12,
|
|
15024
15653
|
label: () => t("nav"),
|
|
15025
15654
|
locale: NAMESPACE$8,
|
|
15026
|
-
inject: () =>
|
|
15027
|
-
},
|
|
15655
|
+
inject: () => sync.inject()
|
|
15656
|
+
}, SyncPage));
|
|
15028
15657
|
}
|
|
15029
15658
|
//#endregion
|
|
15030
15659
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/world-card/WorldCard.module.css.mjs
|
|
@@ -15039,16 +15668,16 @@ window.__ModuleLoader__.load({
|
|
|
15039
15668
|
}
|
|
15040
15669
|
tag$12.textContent = css$12;
|
|
15041
15670
|
var WorldCard_module_css_default = {
|
|
15042
|
-
"
|
|
15043
|
-
"image": "rp_Bvxx5q_image",
|
|
15671
|
+
"info": "rp_Bvxx5q_info",
|
|
15044
15672
|
"play": "rp_Bvxx5q_play",
|
|
15045
|
-
"
|
|
15046
|
-
"name": "rp_Bvxx5q_name",
|
|
15673
|
+
"tags": "rp_Bvxx5q_tags",
|
|
15047
15674
|
"tag": "rp_Bvxx5q_tag",
|
|
15048
|
-
"
|
|
15675
|
+
"image": "rp_Bvxx5q_image",
|
|
15676
|
+
"openButton": "rp_Bvxx5q_openButton",
|
|
15677
|
+
"name": "rp_Bvxx5q_name",
|
|
15049
15678
|
"card": "rp_Bvxx5q_card",
|
|
15050
|
-
"
|
|
15051
|
-
"
|
|
15679
|
+
"cover": "rp_Bvxx5q_cover",
|
|
15680
|
+
"placeholder": "rp_Bvxx5q_placeholder"
|
|
15052
15681
|
};
|
|
15053
15682
|
//#endregion
|
|
15054
15683
|
//#region src/client/widgets/world-card/WorldCard.tsx
|
|
@@ -15142,10 +15771,10 @@ window.__ModuleLoader__.load({
|
|
|
15142
15771
|
}
|
|
15143
15772
|
tag$11.textContent = css$11;
|
|
15144
15773
|
var AvatarChoices_module_css_default = {
|
|
15145
|
-
"
|
|
15774
|
+
"summary": "rp_YCstOG_summary",
|
|
15146
15775
|
"option": "rp_YCstOG_option",
|
|
15147
15776
|
"text": "rp_YCstOG_text",
|
|
15148
|
-
"
|
|
15777
|
+
"name": "rp_YCstOG_name"
|
|
15149
15778
|
};
|
|
15150
15779
|
//#endregion
|
|
15151
15780
|
//#region src/client/widgets/avatar-choices/AvatarChoices.tsx
|
|
@@ -15185,18 +15814,18 @@ window.__ModuleLoader__.load({
|
|
|
15185
15814
|
}
|
|
15186
15815
|
tag$10.textContent = css$10;
|
|
15187
15816
|
var StartSessionDialog_module_css_default = {
|
|
15188
|
-
"option": "rp_AnbLKG_option",
|
|
15189
|
-
"field": "rp_AnbLKG_field",
|
|
15190
|
-
"error": "rp_AnbLKG_error",
|
|
15191
|
-
"form": "rp_AnbLKG_form",
|
|
15192
|
-
"advanced": "rp_AnbLKG_advanced",
|
|
15193
|
-
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15194
|
-
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
15195
|
-
"optionText": "rp_AnbLKG_optionText",
|
|
15196
15817
|
"optionName": "rp_AnbLKG_optionName",
|
|
15818
|
+
"error": "rp_AnbLKG_error",
|
|
15819
|
+
"option": "rp_AnbLKG_option",
|
|
15197
15820
|
"message": "rp_AnbLKG_message",
|
|
15821
|
+
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
15822
|
+
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15823
|
+
"label": "rp_AnbLKG_label",
|
|
15824
|
+
"form": "rp_AnbLKG_form",
|
|
15198
15825
|
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
15199
|
-
"
|
|
15826
|
+
"field": "rp_AnbLKG_field",
|
|
15827
|
+
"advanced": "rp_AnbLKG_advanced",
|
|
15828
|
+
"optionText": "rp_AnbLKG_optionText"
|
|
15200
15829
|
};
|
|
15201
15830
|
//#endregion
|
|
15202
15831
|
//#region src/client/pages/worlds/AddAvatarsDialog.tsx
|
|
@@ -15344,7 +15973,7 @@ window.__ModuleLoader__.load({
|
|
|
15344
15973
|
options,
|
|
15345
15974
|
fallback
|
|
15346
15975
|
});
|
|
15347
|
-
const text = (max, fallback) => ({
|
|
15976
|
+
const text$1 = (max, fallback) => ({
|
|
15348
15977
|
kind: "text",
|
|
15349
15978
|
max,
|
|
15350
15979
|
fallback
|
|
@@ -15380,7 +16009,7 @@ window.__ModuleLoader__.load({
|
|
|
15380
16009
|
},
|
|
15381
16010
|
clock: {
|
|
15382
16011
|
mode: choice(CLOCK_MODES, "simulated"),
|
|
15383
|
-
timeZone: text(64, ""),
|
|
16012
|
+
timeZone: text$1(64, ""),
|
|
15384
16013
|
roundSeconds: integer(0, 3600, 30),
|
|
15385
16014
|
maxSkipDays: integer(1, 3650, 30)
|
|
15386
16015
|
},
|
|
@@ -15410,8 +16039,8 @@ window.__ModuleLoader__.load({
|
|
|
15410
16039
|
shortMaxTokens: integer(256, 64e3, 2e3),
|
|
15411
16040
|
headroom: ratio(1, 10, 2)
|
|
15412
16041
|
},
|
|
15413
|
-
prompts: { language: text(8, "en") },
|
|
15414
|
-
reasoning: { children: text(40, "") },
|
|
16042
|
+
prompts: { language: text$1(8, "en") },
|
|
16043
|
+
reasoning: { children: text$1(40, "") },
|
|
15415
16044
|
factions: {
|
|
15416
16045
|
perTurn: integer(0, 3, 1),
|
|
15417
16046
|
everyDays: integer(1, 365, 3)
|
|
@@ -15426,11 +16055,11 @@ window.__ModuleLoader__.load({
|
|
|
15426
16055
|
minNew: integer(1, 50, 4)
|
|
15427
16056
|
},
|
|
15428
16057
|
models: {
|
|
15429
|
-
characters: text(200, ""),
|
|
15430
|
-
background: text(200, ""),
|
|
15431
|
-
records: text(200, ""),
|
|
15432
|
-
suggestions: text(200, ""),
|
|
15433
|
-
authoring: text(200, "")
|
|
16058
|
+
characters: text$1(200, ""),
|
|
16059
|
+
background: text$1(200, ""),
|
|
16060
|
+
records: text$1(200, ""),
|
|
16061
|
+
suggestions: text$1(200, ""),
|
|
16062
|
+
authoring: text$1(200, "")
|
|
15434
16063
|
},
|
|
15435
16064
|
triggers: {
|
|
15436
16065
|
enabled: flag(true),
|
|
@@ -15449,9 +16078,9 @@ window.__ModuleLoader__.load({
|
|
|
15449
16078
|
gateThreshold: ratio(.1, .95, .5),
|
|
15450
16079
|
confidence: ratio(0, 1, .7)
|
|
15451
16080
|
},
|
|
15452
|
-
interface: { pack: text(60, "") },
|
|
16081
|
+
interface: { pack: text$1(60, "") },
|
|
15453
16082
|
rewind: { keepSnapshots: integer(0, 500, 30) },
|
|
15454
|
-
rules: { own: text(MAX_OWN_RULES, "") },
|
|
16083
|
+
rules: { own: text$1(MAX_OWN_RULES, "") },
|
|
15455
16084
|
preview: { enabled: flag(true) },
|
|
15456
16085
|
suggestions: { count: integer(0, 5, 3) },
|
|
15457
16086
|
images: {
|
|
@@ -15468,8 +16097,8 @@ window.__ModuleLoader__.load({
|
|
|
15468
16097
|
reuse: flag(true),
|
|
15469
16098
|
highRes: flag(false),
|
|
15470
16099
|
interpret: flag(true),
|
|
15471
|
-
interpreterModel: text(200, ""),
|
|
15472
|
-
captioner: text(200, "")
|
|
16100
|
+
interpreterModel: text$1(200, ""),
|
|
16101
|
+
captioner: text$1(200, "")
|
|
15473
16102
|
},
|
|
15474
16103
|
dice: { visibility: choice(["hidden", "card"], "card") },
|
|
15475
16104
|
tools: switchboard(),
|
|
@@ -16243,7 +16872,7 @@ window.__ModuleLoader__.load({
|
|
|
16243
16872
|
return next;
|
|
16244
16873
|
}
|
|
16245
16874
|
//#endregion
|
|
16246
|
-
//#region ../../node_modules/.pnpm/@dsh-ai-providers+core@0.5.0_@deepseek-ai+cordis@4.0.5_@deepseek-ai+dsh-llm@0.2.1-rc.
|
|
16875
|
+
//#region ../../node_modules/.pnpm/@dsh-ai-providers+core@0.5.0_@deepseek-ai+cordis@4.0.5_@deepseek-ai+dsh-llm@0.2.1-rc.3_@deepseek-ai+cordis@4.0.5_/node_modules/@dsh-ai-providers/core/lib/index.js
|
|
16247
16876
|
/**
|
|
16248
16877
|
* The browser API of the main plugin, which the UI of the main plugin and of every vendor plugin
|
|
16249
16878
|
* uses. Paths are relative to the prefix, and the browser calls them with relative URLs so that a
|
|
@@ -16305,14 +16934,14 @@ window.__ModuleLoader__.load({
|
|
|
16305
16934
|
}
|
|
16306
16935
|
tag$9.textContent = css$9;
|
|
16307
16936
|
var SettingsFields_module_css_default = {
|
|
16937
|
+
"label": "rp_Rhi3yq_label",
|
|
16308
16938
|
"help": "rp_Rhi3yq_help",
|
|
16309
16939
|
"row": "rp_Rhi3yq_row",
|
|
16310
|
-
"
|
|
16311
|
-
"field": "rp_Rhi3yq_field",
|
|
16940
|
+
"area": "rp_Rhi3yq_area",
|
|
16312
16941
|
"error": "rp_Rhi3yq_error",
|
|
16942
|
+
"field": "rp_Rhi3yq_field",
|
|
16313
16943
|
"group": "rp_Rhi3yq_group",
|
|
16314
|
-
"
|
|
16315
|
-
"area": "rp_Rhi3yq_area"
|
|
16944
|
+
"groupTitle": "rp_Rhi3yq_groupTitle"
|
|
16316
16945
|
};
|
|
16317
16946
|
//#endregion
|
|
16318
16947
|
//#region src/client/settings-form/SettingsFields.tsx
|
|
@@ -16566,9 +17195,9 @@ window.__ModuleLoader__.load({
|
|
|
16566
17195
|
}
|
|
16567
17196
|
tag$8.textContent = css$8;
|
|
16568
17197
|
var TranslateBanner_module_css_default = {
|
|
16569
|
-
"
|
|
17198
|
+
"text": "rp_Lx8vJa_text",
|
|
16570
17199
|
"banner": "rp_Lx8vJa_banner",
|
|
16571
|
-
"
|
|
17200
|
+
"error": "rp_Lx8vJa_error"
|
|
16572
17201
|
};
|
|
16573
17202
|
//#endregion
|
|
16574
17203
|
//#region src/client/pages/worlds/TranslateBanner.tsx
|
|
@@ -17159,25 +17788,25 @@ window.__ModuleLoader__.load({
|
|
|
17159
17788
|
}
|
|
17160
17789
|
tag$7.textContent = css$7;
|
|
17161
17790
|
var WorldsPage_module_css_default = {
|
|
17791
|
+
"notice": "rp_FHUyRq_notice",
|
|
17792
|
+
"editBody": "rp_FHUyRq_editBody",
|
|
17793
|
+
"count": "rp_FHUyRq_count",
|
|
17162
17794
|
"scrolls": "rp_FHUyRq_scrolls",
|
|
17163
|
-
"fits": "rp_FHUyRq_fits",
|
|
17164
17795
|
"toolbar": "rp_FHUyRq_toolbar",
|
|
17165
|
-
"
|
|
17166
|
-
"
|
|
17167
|
-
"count": "rp_FHUyRq_count",
|
|
17168
|
-
"editBody": "rp_FHUyRq_editBody",
|
|
17169
|
-
"message": "rp_FHUyRq_message",
|
|
17170
|
-
"editTitle": "rp_FHUyRq_editTitle",
|
|
17171
|
-
"notice": "rp_FHUyRq_notice",
|
|
17172
|
-
"editHeader": "rp_FHUyRq_editHeader",
|
|
17796
|
+
"viewport": "rp_FHUyRq_viewport",
|
|
17797
|
+
"page": "rp_FHUyRq_page",
|
|
17173
17798
|
"spin": "rp_FHUyRq_spin",
|
|
17174
17799
|
"cell": "rp_FHUyRq_cell",
|
|
17175
|
-
"
|
|
17176
|
-
"
|
|
17177
|
-
"
|
|
17800
|
+
"editHeader": "rp_FHUyRq_editHeader",
|
|
17801
|
+
"starters": "rp_FHUyRq_starters",
|
|
17802
|
+
"fits": "rp_FHUyRq_fits",
|
|
17803
|
+
"message": "rp_FHUyRq_message",
|
|
17178
17804
|
"spinning": "rp_FHUyRq_spinning",
|
|
17179
|
-
"
|
|
17180
|
-
"
|
|
17805
|
+
"editTitle": "rp_FHUyRq_editTitle",
|
|
17806
|
+
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
17807
|
+
"authorButton": "rp_FHUyRq_authorButton",
|
|
17808
|
+
"starter": "rp_FHUyRq_starter",
|
|
17809
|
+
"grid": "rp_FHUyRq_grid"
|
|
17181
17810
|
};
|
|
17182
17811
|
//#endregion
|
|
17183
17812
|
//#region src/client/pages/worlds/StarterWorlds.tsx
|
|
@@ -18153,7 +18782,7 @@ window.__ModuleLoader__.load({
|
|
|
18153
18782
|
startAvatars: "带上角色形象",
|
|
18154
18783
|
startAvatarsHelp: "勾选要带进这个存档的角色形象,它们会成为存档中的角色,你也可以扮演它们。世界本身不会改变。"
|
|
18155
18784
|
}
|
|
18156
|
-
}, dictionaries$6), dictionaries$
|
|
18785
|
+
}, dictionaries$6), dictionaries$12), dictionaries$20), dictionaries$21);
|
|
18157
18786
|
//#endregion
|
|
18158
18787
|
//#region src/client/pages/worlds/worlds-controller.ts
|
|
18159
18788
|
async function request$1(path, init, signal) {
|
|
@@ -18528,9 +19157,9 @@ window.__ModuleLoader__.load({
|
|
|
18528
19157
|
tag$6.textContent = css$6;
|
|
18529
19158
|
var BranchDialog_module_css_default = {
|
|
18530
19159
|
"label": "rp_Dy1TaW_label",
|
|
18531
|
-
"
|
|
19160
|
+
"error": "rp_Dy1TaW_error",
|
|
18532
19161
|
"field": "rp_Dy1TaW_field",
|
|
18533
|
-
"
|
|
19162
|
+
"form": "rp_Dy1TaW_form"
|
|
18534
19163
|
};
|
|
18535
19164
|
//#endregion
|
|
18536
19165
|
//#region src/client/branch/BranchDialog.tsx
|
|
@@ -18673,7 +19302,7 @@ window.__ModuleLoader__.load({
|
|
|
18673
19302
|
/** Adds the Gallery tab beside Chat and World: every image of the session in a grid. */
|
|
18674
19303
|
function registerGallery(ctx) {
|
|
18675
19304
|
const t = ctx.locale.bind(NAMESPACE$5);
|
|
18676
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$
|
|
19305
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$16), "roleplay: gallery dictionaries");
|
|
18677
19306
|
ctx.inject(["uiConversation"], (scope) => {
|
|
18678
19307
|
scope.uiConversation.views.register(galleryTarget);
|
|
18679
19308
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -19000,16 +19629,16 @@ window.__ModuleLoader__.load({
|
|
|
19000
19629
|
tag$5.textContent = css$5;
|
|
19001
19630
|
var SidebarPage_module_css_default = {
|
|
19002
19631
|
"text": "rp_Ptco8a_text",
|
|
19003
|
-
"main": "rp_Ptco8a_main",
|
|
19004
|
-
"name": "rp_Ptco8a_name",
|
|
19005
|
-
"description": "rp_Ptco8a_description",
|
|
19006
|
-
"content": "rp_Ptco8a_content",
|
|
19007
|
-
"icon": "rp_Ptco8a_icon",
|
|
19008
|
-
"message": "rp_Ptco8a_message",
|
|
19009
19632
|
"entry": "rp_Ptco8a_entry",
|
|
19633
|
+
"description": "rp_Ptco8a_description",
|
|
19634
|
+
"name": "rp_Ptco8a_name",
|
|
19635
|
+
"main": "rp_Ptco8a_main",
|
|
19010
19636
|
"bar": "rp_Ptco8a_bar",
|
|
19011
|
-
"
|
|
19012
|
-
"
|
|
19637
|
+
"content": "rp_Ptco8a_content",
|
|
19638
|
+
"message": "rp_Ptco8a_message",
|
|
19639
|
+
"icon": "rp_Ptco8a_icon",
|
|
19640
|
+
"page": "rp_Ptco8a_page",
|
|
19641
|
+
"title": "rp_Ptco8a_title"
|
|
19013
19642
|
};
|
|
19014
19643
|
//#endregion
|
|
19015
19644
|
//#region src/client/interface/SidebarPage.tsx
|
|
@@ -19312,7 +19941,7 @@ window.__ModuleLoader__.load({
|
|
|
19312
19941
|
/** Adds the World tab beside Chat: the state of the story, by the part of the world. */
|
|
19313
19942
|
function registerWorld(ctx) {
|
|
19314
19943
|
const t = ctx.locale.bind(NAMESPACE$3);
|
|
19315
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$
|
|
19944
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$12), "roleplay: world dictionaries");
|
|
19316
19945
|
ctx.inject(["uiConversation"], (scope) => {
|
|
19317
19946
|
scope.uiConversation.views.register(worldTarget);
|
|
19318
19947
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -19337,28 +19966,28 @@ window.__ModuleLoader__.load({
|
|
|
19337
19966
|
}
|
|
19338
19967
|
tag$4.textContent = css$4;
|
|
19339
19968
|
var ChatSettingsView_module_css_default = {
|
|
19340
|
-
"
|
|
19341
|
-
"title": "rp_wLpbxW_title",
|
|
19342
|
-
"field": "rp_wLpbxW_field",
|
|
19343
|
-
"help": "rp_wLpbxW_help",
|
|
19344
|
-
"notice": "rp_wLpbxW_notice",
|
|
19345
|
-
"label": "rp_wLpbxW_label",
|
|
19346
|
-
"activity": "rp_wLpbxW_activity",
|
|
19347
|
-
"message": "rp_wLpbxW_message",
|
|
19348
|
-
"description": "rp_wLpbxW_description",
|
|
19969
|
+
"view": "rp_wLpbxW_view",
|
|
19349
19970
|
"tableViewport": "rp_wLpbxW_tableViewport",
|
|
19350
|
-
"
|
|
19351
|
-
"
|
|
19352
|
-
"activityBody": "rp_wLpbxW_activityBody",
|
|
19353
|
-
"row": "rp_wLpbxW_row",
|
|
19971
|
+
"link": "rp_wLpbxW_link",
|
|
19972
|
+
"select": "rp_wLpbxW_select",
|
|
19354
19973
|
"saved": "rp_wLpbxW_saved",
|
|
19355
|
-
"
|
|
19974
|
+
"activityBody": "rp_wLpbxW_activityBody",
|
|
19975
|
+
"message": "rp_wLpbxW_message",
|
|
19976
|
+
"error": "rp_wLpbxW_error",
|
|
19977
|
+
"actions": "rp_wLpbxW_actions",
|
|
19356
19978
|
"reasons": "rp_wLpbxW_reasons",
|
|
19979
|
+
"label": "rp_wLpbxW_label",
|
|
19980
|
+
"row": "rp_wLpbxW_row",
|
|
19981
|
+
"title": "rp_wLpbxW_title",
|
|
19982
|
+
"description": "rp_wLpbxW_description",
|
|
19983
|
+
"notice": "rp_wLpbxW_notice",
|
|
19984
|
+
"activity": "rp_wLpbxW_activity",
|
|
19985
|
+
"pre": "rp_wLpbxW_pre",
|
|
19357
19986
|
"list": "rp_wLpbxW_list",
|
|
19358
|
-
"
|
|
19359
|
-
"
|
|
19360
|
-
"
|
|
19361
|
-
"
|
|
19987
|
+
"field": "rp_wLpbxW_field",
|
|
19988
|
+
"run": "rp_wLpbxW_run",
|
|
19989
|
+
"help": "rp_wLpbxW_help",
|
|
19990
|
+
"table": "rp_wLpbxW_table"
|
|
19362
19991
|
};
|
|
19363
19992
|
//#endregion
|
|
19364
19993
|
//#region src/client/chat-settings/settings-api.ts
|
|
@@ -19664,7 +20293,7 @@ window.__ModuleLoader__.load({
|
|
|
19664
20293
|
}
|
|
19665
20294
|
//#endregion
|
|
19666
20295
|
//#region src/client/chat-settings/InterfaceSection.tsx
|
|
19667
|
-
const message$
|
|
20296
|
+
const message$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19668
20297
|
/**
|
|
19669
20298
|
* The interface pack of the story: which one is in use or why none is, a choice of the packs the story could use (kept
|
|
19670
20299
|
* with the other settings, so it is saved with them), and, when the world's packs are not what the story copied, a way
|
|
@@ -19682,7 +20311,7 @@ window.__ModuleLoader__.load({
|
|
|
19682
20311
|
setStatus(next);
|
|
19683
20312
|
setFailure(void 0);
|
|
19684
20313
|
}, (error) => {
|
|
19685
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20314
|
+
if (!abort.signal.aborted) setFailure(message$4(error));
|
|
19686
20315
|
});
|
|
19687
20316
|
return () => {
|
|
19688
20317
|
abort.abort();
|
|
@@ -19703,7 +20332,7 @@ window.__ModuleLoader__.load({
|
|
|
19703
20332
|
setVersion((number) => number + 1);
|
|
19704
20333
|
}, (error) => {
|
|
19705
20334
|
setReport(void 0);
|
|
19706
|
-
setFailure(t("packSyncFailed", { message: message$
|
|
20335
|
+
setFailure(t("packSyncFailed", { message: message$4(error) }));
|
|
19707
20336
|
});
|
|
19708
20337
|
};
|
|
19709
20338
|
if (status === void 0) return failure === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -19818,7 +20447,7 @@ window.__ModuleLoader__.load({
|
|
|
19818
20447
|
}
|
|
19819
20448
|
//#endregion
|
|
19820
20449
|
//#region src/client/chat-settings/LorebookSection.tsx
|
|
19821
|
-
const message$
|
|
20450
|
+
const message$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19822
20451
|
/** The lorebooks the story holds, with a way to add one from the library or take one out. */
|
|
19823
20452
|
function LorebookSection({ t, session, disabled }) {
|
|
19824
20453
|
const [status, setStatus] = (0, react.useState)();
|
|
@@ -19833,7 +20462,7 @@ window.__ModuleLoader__.load({
|
|
|
19833
20462
|
setStatus(next);
|
|
19834
20463
|
setFailure(void 0);
|
|
19835
20464
|
}, (error) => {
|
|
19836
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20465
|
+
if (!abort.signal.aborted) setFailure(message$3(error));
|
|
19837
20466
|
});
|
|
19838
20467
|
return () => {
|
|
19839
20468
|
abort.abort();
|
|
@@ -19849,7 +20478,7 @@ window.__ModuleLoader__.load({
|
|
|
19849
20478
|
const refused = (error) => {
|
|
19850
20479
|
setReport([]);
|
|
19851
20480
|
setLeaving(void 0);
|
|
19852
|
-
setFailure(t("lorebookFailed", { message: message$
|
|
20481
|
+
setFailure(t("lorebookFailed", { message: message$3(error) }));
|
|
19853
20482
|
};
|
|
19854
20483
|
const add = () => {
|
|
19855
20484
|
addStoryLorebook(session, choice, new AbortController().signal).then((added) => {
|
|
@@ -19952,7 +20581,7 @@ window.__ModuleLoader__.load({
|
|
|
19952
20581
|
}
|
|
19953
20582
|
//#endregion
|
|
19954
20583
|
//#region src/client/chat-settings/PresetSection.tsx
|
|
19955
|
-
const message$
|
|
20584
|
+
const message$2 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19956
20585
|
/** The writing preset the story's prompts came from, whether it still matches the library, and a way to switch or take it out. */
|
|
19957
20586
|
function PresetSection({ t, session, disabled }) {
|
|
19958
20587
|
const [status, setStatus] = (0, react.useState)();
|
|
@@ -19967,7 +20596,7 @@ window.__ModuleLoader__.load({
|
|
|
19967
20596
|
setStatus(next);
|
|
19968
20597
|
setFailure(void 0);
|
|
19969
20598
|
}, (error) => {
|
|
19970
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20599
|
+
if (!abort.signal.aborted) setFailure(message$2(error));
|
|
19971
20600
|
});
|
|
19972
20601
|
return () => {
|
|
19973
20602
|
abort.abort();
|
|
@@ -19982,7 +20611,7 @@ window.__ModuleLoader__.load({
|
|
|
19982
20611
|
setVersion((number) => number + 1);
|
|
19983
20612
|
}, (error) => {
|
|
19984
20613
|
setReport(void 0);
|
|
19985
|
-
setFailure(t("presetFailed", { message: message$
|
|
20614
|
+
setFailure(t("presetFailed", { message: message$2(error) }));
|
|
19986
20615
|
});
|
|
19987
20616
|
};
|
|
19988
20617
|
if (status === void 0) return failure === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -21066,7 +21695,7 @@ window.__ModuleLoader__.load({
|
|
|
21066
21695
|
saved: "已保存。",
|
|
21067
21696
|
saveFailed: "无法保存设置:{message}"
|
|
21068
21697
|
}
|
|
21069
|
-
}, dictionaries$6), dictionaries$
|
|
21698
|
+
}, dictionaries$6), dictionaries$17);
|
|
21070
21699
|
//#endregion
|
|
21071
21700
|
//#region src/client/chat-settings/index.ts
|
|
21072
21701
|
const NAMESPACE$2 = "roleplay.chatSettings";
|
|
@@ -21098,7 +21727,7 @@ window.__ModuleLoader__.load({
|
|
|
21098
21727
|
}
|
|
21099
21728
|
//#endregion
|
|
21100
21729
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/CatalogueSettings.module.css.mjs
|
|
21101
|
-
const css$3 = ".rp_KPhXDa_section{flex-direction:column;gap:8px;margin-top:24px;display:flex}.rp_KPhXDa_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_KPhXDa_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_KPhXDa_row{border-bottom
|
|
21730
|
+
const css$3 = ".rp_KPhXDa_section{flex-direction:column;gap:8px;margin-top:24px;display:flex}.rp_KPhXDa_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_KPhXDa_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_KPhXDa_row{border-bottom:.5px solid var(--dsw-alias-border-l3);grid-template-columns:minmax(80px,1fr) minmax(160px,2fr) auto;align-items:end;gap:8px;padding-bottom:8px;display:grid}.rp_KPhXDa_field{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_KPhXDa_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_KPhXDa_problem{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:0;font-size:12px}.rp_KPhXDa_keyHint{color:var(--dsw-alias-label-tertiary);grid-column:1/-1;margin:0;font-size:12px}.rp_KPhXDa_actions{flex-wrap:wrap;gap:8px;display:flex}.rp_KPhXDa_keyArea{grid-column:1/-1;grid-template-columns:minmax(120px,1fr) minmax(160px,2fr) auto;align-items:end;gap:8px;display:grid}@media (width<=720px){.rp_KPhXDa_row,.rp_KPhXDa_keyArea{grid-template-columns:minmax(0,1fr);align-items:stretch}.rp_KPhXDa_actions{justify-content:flex-start}}";
|
|
21102
21731
|
const key$3 = "src/client/settings/CatalogueSettings.module.css";
|
|
21103
21732
|
let tag$3 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$3) + "]");
|
|
21104
21733
|
if (tag$3 === null) {
|
|
@@ -21109,16 +21738,16 @@ window.__ModuleLoader__.load({
|
|
|
21109
21738
|
}
|
|
21110
21739
|
tag$3.textContent = css$3;
|
|
21111
21740
|
var CatalogueSettings_module_css_default = {
|
|
21112
|
-
"
|
|
21741
|
+
"label": "rp_KPhXDa_label",
|
|
21113
21742
|
"section": "rp_KPhXDa_section",
|
|
21743
|
+
"keyArea": "rp_KPhXDa_keyArea",
|
|
21114
21744
|
"problem": "rp_KPhXDa_problem",
|
|
21115
21745
|
"field": "rp_KPhXDa_field",
|
|
21116
21746
|
"title": "rp_KPhXDa_title",
|
|
21117
|
-
"
|
|
21747
|
+
"keyHint": "rp_KPhXDa_keyHint",
|
|
21118
21748
|
"row": "rp_KPhXDa_row",
|
|
21119
|
-
"
|
|
21120
|
-
"
|
|
21121
|
-
"label": "rp_KPhXDa_label"
|
|
21749
|
+
"hint": "rp_KPhXDa_hint",
|
|
21750
|
+
"actions": "rp_KPhXDa_actions"
|
|
21122
21751
|
};
|
|
21123
21752
|
//#endregion
|
|
21124
21753
|
//#region src/client/settings/AuthoringToolSettings.tsx
|
|
@@ -21302,7 +21931,7 @@ window.__ModuleLoader__.load({
|
|
|
21302
21931
|
};
|
|
21303
21932
|
//#endregion
|
|
21304
21933
|
//#region src/client/settings/CatalogueKey.tsx
|
|
21305
|
-
const message = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
21934
|
+
const message$1 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
21306
21935
|
/**
|
|
21307
21936
|
* The key of one catalogue: a name in the credential store and a write-only box. The key is kept by the store the profile uses
|
|
21308
21937
|
* (a file by default, anything another plugin provides) and never comes back to the page, only whether it is set and where from.
|
|
@@ -21322,7 +21951,7 @@ window.__ModuleLoader__.load({
|
|
|
21322
21951
|
setStatus(next);
|
|
21323
21952
|
setFailure(void 0);
|
|
21324
21953
|
}, (error) => {
|
|
21325
|
-
if (!abort.signal.aborted) setFailure(message(error));
|
|
21954
|
+
if (!abort.signal.aborted) setFailure(message$1(error));
|
|
21326
21955
|
});
|
|
21327
21956
|
}, 400);
|
|
21328
21957
|
return () => {
|
|
@@ -21339,7 +21968,7 @@ window.__ModuleLoader__.load({
|
|
|
21339
21968
|
setFailure(void 0);
|
|
21340
21969
|
then?.();
|
|
21341
21970
|
}, (error) => {
|
|
21342
|
-
setFailure(message(error));
|
|
21971
|
+
setFailure(message$1(error));
|
|
21343
21972
|
}).finally(() => {
|
|
21344
21973
|
setBusy(false);
|
|
21345
21974
|
});
|
|
@@ -21442,7 +22071,7 @@ window.__ModuleLoader__.load({
|
|
|
21442
22071
|
}
|
|
21443
22072
|
//#endregion
|
|
21444
22073
|
//#region src/client/settings/CatalogueSettings.tsx
|
|
21445
|
-
const PROBLEM_TEXT = {
|
|
22074
|
+
const PROBLEM_TEXT$1 = {
|
|
21446
22075
|
name: "catalogueProblemName",
|
|
21447
22076
|
address: "catalogueProblemAddress",
|
|
21448
22077
|
duplicate: "catalogueProblemDuplicate",
|
|
@@ -21529,7 +22158,7 @@ window.__ModuleLoader__.load({
|
|
|
21529
22158
|
problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21530
22159
|
className: CatalogueSettings_module_css_default.problem,
|
|
21531
22160
|
role: "alert",
|
|
21532
|
-
children: t(PROBLEM_TEXT[problem])
|
|
22161
|
+
children: t(PROBLEM_TEXT$1[problem])
|
|
21533
22162
|
})
|
|
21534
22163
|
]
|
|
21535
22164
|
}, index);
|
|
@@ -21555,6 +22184,281 @@ window.__ModuleLoader__.load({
|
|
|
21555
22184
|
});
|
|
21556
22185
|
}
|
|
21557
22186
|
//#endregion
|
|
22187
|
+
//#region src/client/settings/sync.ts
|
|
22188
|
+
const text = (value) => typeof value === "string" ? value : "";
|
|
22189
|
+
function syncOf(value) {
|
|
22190
|
+
const row = typeof value === "object" && value !== null ? value : {};
|
|
22191
|
+
const minutes = typeof row["intervalMinutes"] === "number" && Number.isFinite(row["intervalMinutes"]) ? Math.max(0, Math.floor(row["intervalMinutes"])) : 0;
|
|
22192
|
+
return {
|
|
22193
|
+
remote: text(row["remote"]),
|
|
22194
|
+
rclone: text(row["rclone"]),
|
|
22195
|
+
configFile: text(row["configFile"]),
|
|
22196
|
+
passwordRef: text(row["passwordRef"]),
|
|
22197
|
+
intervalMinutes: minutes
|
|
22198
|
+
};
|
|
22199
|
+
}
|
|
22200
|
+
function syncDraftOf(draft) {
|
|
22201
|
+
try {
|
|
22202
|
+
const value = JSON.parse(draft === "" ? "{}" : draft);
|
|
22203
|
+
const row = typeof value === "object" && value !== null ? value : {};
|
|
22204
|
+
const intervalText = typeof row["intervalMinutes"] === "string" || typeof row["intervalMinutes"] === "number" ? String(row["intervalMinutes"]) : "0";
|
|
22205
|
+
return {
|
|
22206
|
+
config: syncOf(value),
|
|
22207
|
+
intervalText
|
|
22208
|
+
};
|
|
22209
|
+
} catch {
|
|
22210
|
+
return {
|
|
22211
|
+
config: { ...DEFAULT_SYNC },
|
|
22212
|
+
intervalText: "0"
|
|
22213
|
+
};
|
|
22214
|
+
}
|
|
22215
|
+
}
|
|
22216
|
+
/** What stops the settings from being saved; sync that is off (no remote) has none. */
|
|
22217
|
+
function syncProblem(config, intervalText) {
|
|
22218
|
+
if (intervalText.trim() !== "" && !/^\d+$/.test(intervalText.trim())) return "interval";
|
|
22219
|
+
if (config.remote.trim() === "") return void 0;
|
|
22220
|
+
if (!/^[^\s]+$/.test(config.remote.trim())) return "remote";
|
|
22221
|
+
if (config.configFile.trim() === "" || !(config.configFile.trim().startsWith("/") || config.configFile.trim().startsWith("~/") || /^[A-Za-z]:[\\/]/.test(config.configFile.trim()))) return "config";
|
|
22222
|
+
if (config.passwordRef.trim() !== "" && !CREDENTIAL_REF.test(config.passwordRef.trim())) return "keyName";
|
|
22223
|
+
}
|
|
22224
|
+
const syncField = {
|
|
22225
|
+
field: "sync",
|
|
22226
|
+
format: (value) => JSON.stringify(syncOf(value)),
|
|
22227
|
+
parse: (draft) => {
|
|
22228
|
+
const { config, intervalText } = syncDraftOf(draft);
|
|
22229
|
+
if (syncProblem(config, intervalText) !== void 0) return void 0;
|
|
22230
|
+
const intervalMinutes = Number(intervalText.trim());
|
|
22231
|
+
return config.remote === "" && config.rclone === "" && config.configFile === "" && config.passwordRef === "" && intervalMinutes === 0 ? { kind: "clear" } : {
|
|
22232
|
+
kind: "set",
|
|
22233
|
+
value: {
|
|
22234
|
+
remote: config.remote.trim(),
|
|
22235
|
+
rclone: config.rclone.trim(),
|
|
22236
|
+
configFile: config.configFile.trim(),
|
|
22237
|
+
passwordRef: config.passwordRef.trim(),
|
|
22238
|
+
intervalMinutes
|
|
22239
|
+
}
|
|
22240
|
+
};
|
|
22241
|
+
}
|
|
22242
|
+
};
|
|
22243
|
+
//#endregion
|
|
22244
|
+
//#region src/client/settings/SyncSettings.tsx
|
|
22245
|
+
const PROBLEM_TEXT = {
|
|
22246
|
+
remote: "syncProblemRemote",
|
|
22247
|
+
config: "syncProblemConfig",
|
|
22248
|
+
keyName: "catalogueProblemKeyName",
|
|
22249
|
+
interval: "syncProblemInterval"
|
|
22250
|
+
};
|
|
22251
|
+
const message = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
22252
|
+
/** The password of an encrypted rclone configuration: kept in the credential store, written here and never read back. */
|
|
22253
|
+
function SyncPassword({ t, reference, disabled }) {
|
|
22254
|
+
const [status, setStatus] = (0, react.useState)();
|
|
22255
|
+
const [value, setValue] = (0, react.useState)("");
|
|
22256
|
+
const [failure, setFailure] = (0, react.useState)();
|
|
22257
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
22258
|
+
(0, react.useEffect)(() => {
|
|
22259
|
+
const abort = new AbortController();
|
|
22260
|
+
const timer = setTimeout(() => {
|
|
22261
|
+
describePassword(reference, abort.signal).then((next) => {
|
|
22262
|
+
setStatus(next);
|
|
22263
|
+
setFailure(void 0);
|
|
22264
|
+
}, (error) => {
|
|
22265
|
+
if (!abort.signal.aborted) setFailure(message(error));
|
|
22266
|
+
});
|
|
22267
|
+
}, 400);
|
|
22268
|
+
return () => {
|
|
22269
|
+
clearTimeout(timer);
|
|
22270
|
+
abort.abort();
|
|
22271
|
+
};
|
|
22272
|
+
}, [reference]);
|
|
22273
|
+
const keep = (next) => {
|
|
22274
|
+
setBusy(true);
|
|
22275
|
+
storePassword(reference, next, new AbortController().signal).then((done) => {
|
|
22276
|
+
setStatus(done);
|
|
22277
|
+
setValue("");
|
|
22278
|
+
setFailure(void 0);
|
|
22279
|
+
}, (error) => {
|
|
22280
|
+
setFailure(message(error));
|
|
22281
|
+
}).finally(() => {
|
|
22282
|
+
setBusy(false);
|
|
22283
|
+
});
|
|
22284
|
+
};
|
|
22285
|
+
const blocked = disabled || busy || status?.writable === false;
|
|
22286
|
+
const shown = status === void 0 ? t("catalogueKeyChecking") : status.configured ? `${t("catalogueKeySet")} (${status.source ?? "?"})` : t("catalogueKeyUnset");
|
|
22287
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22288
|
+
className: CatalogueSettings_module_css_default.keyArea,
|
|
22289
|
+
"data-testid": "roleplay-sync-password",
|
|
22290
|
+
children: [
|
|
22291
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22292
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22293
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22294
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22295
|
+
children: t("syncPassword")
|
|
22296
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22297
|
+
type: "password",
|
|
22298
|
+
autoComplete: "off",
|
|
22299
|
+
value,
|
|
22300
|
+
disabled: blocked,
|
|
22301
|
+
placeholder: status?.configured === true ? "••••••••" : "",
|
|
22302
|
+
onChange: (event) => {
|
|
22303
|
+
setValue(event.target.value);
|
|
22304
|
+
}
|
|
22305
|
+
})]
|
|
22306
|
+
}),
|
|
22307
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22308
|
+
className: CatalogueSettings_module_css_default.actions,
|
|
22309
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
22310
|
+
variant: "outline",
|
|
22311
|
+
size: "sm",
|
|
22312
|
+
disabled: blocked || value === "",
|
|
22313
|
+
onClick: () => {
|
|
22314
|
+
keep(value);
|
|
22315
|
+
},
|
|
22316
|
+
children: t("catalogueKeyStore")
|
|
22317
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
22318
|
+
variant: "ghost",
|
|
22319
|
+
size: "sm",
|
|
22320
|
+
disabled: blocked || status?.configured !== true,
|
|
22321
|
+
onClick: () => {
|
|
22322
|
+
keep("");
|
|
22323
|
+
},
|
|
22324
|
+
children: t("catalogueKeyClear")
|
|
22325
|
+
})]
|
|
22326
|
+
}),
|
|
22327
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
22328
|
+
className: CatalogueSettings_module_css_default.keyHint,
|
|
22329
|
+
role: "status",
|
|
22330
|
+
children: [
|
|
22331
|
+
reference,
|
|
22332
|
+
" · ",
|
|
22333
|
+
shown,
|
|
22334
|
+
status?.writable === false ? ` · ${t("catalogueKeyReadOnly")}` : ""
|
|
22335
|
+
]
|
|
22336
|
+
}),
|
|
22337
|
+
failure !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22338
|
+
className: CatalogueSettings_module_css_default.problem,
|
|
22339
|
+
role: "alert",
|
|
22340
|
+
children: failure
|
|
22341
|
+
})
|
|
22342
|
+
]
|
|
22343
|
+
});
|
|
22344
|
+
}
|
|
22345
|
+
/** Where the content goes and how rclone is reached: the remote, the rclone program and its configuration file (outside the data folder), and how often to sync. */
|
|
22346
|
+
function SyncSettings({ t, text, disabled, onEdit }) {
|
|
22347
|
+
const { config, intervalText } = syncDraftOf(text);
|
|
22348
|
+
const set = (patch) => {
|
|
22349
|
+
onEdit(JSON.stringify({
|
|
22350
|
+
...config,
|
|
22351
|
+
intervalMinutes: intervalText,
|
|
22352
|
+
...patch
|
|
22353
|
+
}));
|
|
22354
|
+
};
|
|
22355
|
+
const problem = syncProblem(config, intervalText);
|
|
22356
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
22357
|
+
className: CatalogueSettings_module_css_default.section,
|
|
22358
|
+
"data-testid": "roleplay-sync-settings",
|
|
22359
|
+
children: [
|
|
22360
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
22361
|
+
className: CatalogueSettings_module_css_default.title,
|
|
22362
|
+
children: t("sync")
|
|
22363
|
+
}),
|
|
22364
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22365
|
+
className: CatalogueSettings_module_css_default.hint,
|
|
22366
|
+
children: t("syncHint")
|
|
22367
|
+
}),
|
|
22368
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22369
|
+
className: CatalogueSettings_module_css_default.row,
|
|
22370
|
+
children: [
|
|
22371
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22372
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22373
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22374
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22375
|
+
children: t("syncRemote")
|
|
22376
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22377
|
+
value: config.remote,
|
|
22378
|
+
disabled,
|
|
22379
|
+
placeholder: "mydrive:dsh-roleplay",
|
|
22380
|
+
onChange: (event) => {
|
|
22381
|
+
set({ remote: event.target.value });
|
|
22382
|
+
}
|
|
22383
|
+
})]
|
|
22384
|
+
}),
|
|
22385
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22386
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22387
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22388
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22389
|
+
children: t("syncConfigFile")
|
|
22390
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22391
|
+
value: config.configFile,
|
|
22392
|
+
disabled,
|
|
22393
|
+
placeholder: "~/.config/rclone/rclone.conf",
|
|
22394
|
+
onChange: (event) => {
|
|
22395
|
+
set({ configFile: event.target.value });
|
|
22396
|
+
}
|
|
22397
|
+
})]
|
|
22398
|
+
}),
|
|
22399
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22400
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22401
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22402
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22403
|
+
children: t("syncRclone")
|
|
22404
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22405
|
+
value: config.rclone,
|
|
22406
|
+
disabled,
|
|
22407
|
+
placeholder: "rclone",
|
|
22408
|
+
onChange: (event) => {
|
|
22409
|
+
set({ rclone: event.target.value });
|
|
22410
|
+
}
|
|
22411
|
+
})]
|
|
22412
|
+
}),
|
|
22413
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22414
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22415
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22416
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22417
|
+
children: t("syncInterval")
|
|
22418
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22419
|
+
value: intervalText,
|
|
22420
|
+
disabled,
|
|
22421
|
+
inputMode: "numeric",
|
|
22422
|
+
"aria-invalid": problem === "interval",
|
|
22423
|
+
onChange: (event) => {
|
|
22424
|
+
set({ intervalMinutes: event.target.value });
|
|
22425
|
+
}
|
|
22426
|
+
})]
|
|
22427
|
+
}),
|
|
22428
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22429
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22430
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22431
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22432
|
+
children: t("catalogueKeyName")
|
|
22433
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22434
|
+
value: config.passwordRef,
|
|
22435
|
+
disabled,
|
|
22436
|
+
placeholder: SYNC_PASSWORD_REF,
|
|
22437
|
+
onChange: (event) => {
|
|
22438
|
+
set({ passwordRef: event.target.value });
|
|
22439
|
+
}
|
|
22440
|
+
})]
|
|
22441
|
+
}),
|
|
22442
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22443
|
+
className: CatalogueSettings_module_css_default.keyHint,
|
|
22444
|
+
children: t("syncDetails")
|
|
22445
|
+
}),
|
|
22446
|
+
problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22447
|
+
className: CatalogueSettings_module_css_default.problem,
|
|
22448
|
+
role: "alert",
|
|
22449
|
+
children: t(PROBLEM_TEXT[problem])
|
|
22450
|
+
})
|
|
22451
|
+
]
|
|
22452
|
+
}),
|
|
22453
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncPassword, {
|
|
22454
|
+
t,
|
|
22455
|
+
reference: config.passwordRef.trim() || "ROLEPLAY_SYNC_RCLONE_CONFIG_PASS",
|
|
22456
|
+
disabled
|
|
22457
|
+
})
|
|
22458
|
+
]
|
|
22459
|
+
});
|
|
22460
|
+
}
|
|
22461
|
+
//#endregion
|
|
21558
22462
|
//#region src/client/settings/locales.ts
|
|
21559
22463
|
const dictionaries$1 = {
|
|
21560
22464
|
en: {
|
|
@@ -21592,6 +22496,17 @@ window.__ModuleLoader__.load({
|
|
|
21592
22496
|
authoringKind_presetAuthoring: "Preset authoring assistant",
|
|
21593
22497
|
authoringKind_lorebookAuthoring: "Lorebook authoring assistant",
|
|
21594
22498
|
authoringKind_worldAuthor: "World author during play (invents places, people and things the story needs)",
|
|
22499
|
+
sync: "Sync with other devices",
|
|
22500
|
+
syncHint: "Keeps the data folder in step with a folder on a remote, through rclone: each world, each session and each shared folder is synced as one unit and is left alone while it syncs. Leave the remote empty to keep sync off. The sync page lists the units.",
|
|
22501
|
+
syncRemote: "Remote and folder",
|
|
22502
|
+
syncConfigFile: "rclone configuration file",
|
|
22503
|
+
syncRclone: "rclone program",
|
|
22504
|
+
syncInterval: "Minutes between automatic syncs",
|
|
22505
|
+
syncPassword: "Configuration password",
|
|
22506
|
+
syncDetails: "The remote is an rclone remote and folder such as mydrive:dsh-roleplay. The configuration file must be outside the data folder (create it with rclone config --config <file>). The program is looked up on the PATH when left empty. 0 minutes syncs only when you ask. A password is only needed when the configuration file is encrypted; it is kept in the credential store under the key name shown, and you can give another name here.",
|
|
22507
|
+
syncProblemRemote: "The remote must be written without spaces, like mydrive:dsh-roleplay.",
|
|
22508
|
+
syncProblemConfig: "Give the absolute path of the rclone configuration file.",
|
|
22509
|
+
syncProblemInterval: "Minutes are a whole number, 0 or more.",
|
|
21595
22510
|
overridden: "Overridden",
|
|
21596
22511
|
reset: "Reset to default",
|
|
21597
22512
|
invalid: "Enter a folder path.",
|
|
@@ -21636,6 +22551,17 @@ window.__ModuleLoader__.load({
|
|
|
21636
22551
|
authoringKind_presetAuthoring: "预设创作助手",
|
|
21637
22552
|
authoringKind_lorebookAuthoring: "世界书创作助手",
|
|
21638
22553
|
authoringKind_worldAuthor: "游戏中的世界作者(为故事补充所需的地点、人物和物品)",
|
|
22554
|
+
sync: "与其他设备同步",
|
|
22555
|
+
syncHint: "通过 rclone 让数据文件夹与远端的一个文件夹保持一致:每个世界、每个会话和每个共享文件夹各自作为一个单元同步,同步期间不会被改动。远端留空即关闭同步。“同步”页面会列出各个单元。",
|
|
22556
|
+
syncRemote: "远端和文件夹",
|
|
22557
|
+
syncConfigFile: "rclone 配置文件",
|
|
22558
|
+
syncRclone: "rclone 程序",
|
|
22559
|
+
syncInterval: "自动同步的间隔(分钟)",
|
|
22560
|
+
syncPassword: "配置文件密码",
|
|
22561
|
+
syncDetails: "远端是 rclone 的远端名和文件夹,例如 mydrive:dsh-roleplay。配置文件必须放在数据文件夹之外(可用 rclone config --config <文件> 创建)。程序留空时在 PATH 中查找。间隔为 0 分钟表示只在你手动同步时才同步。只有配置文件已加密时才需要密码;密码保存在凭据存储中,名称见上方,也可以在这里改用别的名称。",
|
|
22562
|
+
syncProblemRemote: "远端不能含空格,例如 mydrive:dsh-roleplay。",
|
|
22563
|
+
syncProblemConfig: "请填写 rclone 配置文件的绝对路径。",
|
|
22564
|
+
syncProblemInterval: "分钟数必须是不小于 0 的整数。",
|
|
21639
22565
|
overridden: "已覆盖",
|
|
21640
22566
|
reset: "恢复默认",
|
|
21641
22567
|
invalid: "请填写文件夹路径。",
|
|
@@ -21694,6 +22620,14 @@ window.__ModuleLoader__.load({
|
|
|
21694
22620
|
props.edit("catalogues", text);
|
|
21695
22621
|
}
|
|
21696
22622
|
}),
|
|
22623
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncSettings, {
|
|
22624
|
+
t,
|
|
22625
|
+
text: state.sync.text,
|
|
22626
|
+
disabled: !state.writable,
|
|
22627
|
+
onEdit: (text) => {
|
|
22628
|
+
props.edit("sync", text);
|
|
22629
|
+
}
|
|
22630
|
+
}),
|
|
21697
22631
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AuthoringToolSettings, {
|
|
21698
22632
|
t,
|
|
21699
22633
|
text: state.authoringTools.text,
|
|
@@ -21716,13 +22650,15 @@ window.__ModuleLoader__.load({
|
|
|
21716
22650
|
this.form = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, [
|
|
21717
22651
|
(0, _deepseek_ai_dsh_client_ui_primitives.settingsTextField)("rootPath"),
|
|
21718
22652
|
cataloguesField,
|
|
21719
|
-
authoringToolsField
|
|
22653
|
+
authoringToolsField,
|
|
22654
|
+
syncField
|
|
21720
22655
|
]);
|
|
21721
22656
|
this.store = this.form.bind(() => ({
|
|
21722
22657
|
...this.form.shell(),
|
|
21723
22658
|
rootPath: this.form.field("rootPath"),
|
|
21724
22659
|
catalogues: this.form.field("catalogues"),
|
|
21725
|
-
authoringTools: this.form.field("authoringTools")
|
|
22660
|
+
authoringTools: this.form.field("authoringTools"),
|
|
22661
|
+
sync: this.form.field("sync")
|
|
21726
22662
|
}));
|
|
21727
22663
|
}
|
|
21728
22664
|
inject() {
|
|
@@ -21923,28 +22859,28 @@ window.__ModuleLoader__.load({
|
|
|
21923
22859
|
}
|
|
21924
22860
|
tag$2.textContent = css$2;
|
|
21925
22861
|
var NarrationView_module_css_default = {
|
|
21926
|
-
"
|
|
22862
|
+
"oocLabel": "rp_NFPimG_oocLabel",
|
|
22863
|
+
"playLine": "rp_NFPimG_playLine",
|
|
22864
|
+
"dice": "rp_NFPimG_dice",
|
|
22865
|
+
"words": "rp_NFPimG_words",
|
|
22866
|
+
"imageError": "rp_NFPimG_imageError",
|
|
22867
|
+
"line": "rp_NFPimG_line",
|
|
21927
22868
|
"narration": "rp_NFPimG_narration",
|
|
22869
|
+
"diceList": "rp_NFPimG_diceList",
|
|
22870
|
+
"name": "rp_NFPimG_name",
|
|
21928
22871
|
"oocNote": "rp_NFPimG_oocNote",
|
|
21929
22872
|
"output": "rp_NFPimG_output",
|
|
21930
|
-
"
|
|
22873
|
+
"sceneImage": "rp_NFPimG_sceneImage",
|
|
21931
22874
|
"diceSummary": "rp_NFPimG_diceSummary",
|
|
22875
|
+
"oocRefused": "rp_NFPimG_oocRefused",
|
|
22876
|
+
"speech": "rp_NFPimG_speech",
|
|
21932
22877
|
"preview": "rp_NFPimG_preview",
|
|
21933
|
-
"images": "rp_NFPimG_images",
|
|
21934
|
-
"imageButton": "rp_NFPimG_imageButton",
|
|
21935
|
-
"sceneImage": "rp_NFPimG_sceneImage",
|
|
21936
|
-
"dice": "rp_NFPimG_dice",
|
|
21937
|
-
"imageError": "rp_NFPimG_imageError",
|
|
21938
|
-
"playLine": "rp_NFPimG_playLine",
|
|
21939
|
-
"line": "rp_NFPimG_line",
|
|
21940
22878
|
"note": "rp_NFPimG_note",
|
|
21941
|
-
"diceList": "rp_NFPimG_diceList",
|
|
21942
|
-
"name": "rp_NFPimG_name",
|
|
21943
22879
|
"avatar": "rp_NFPimG_avatar",
|
|
22880
|
+
"imageStatus": "rp_NFPimG_imageStatus",
|
|
21944
22881
|
"playAll": "rp_NFPimG_playAll",
|
|
21945
|
-
"
|
|
21946
|
-
"
|
|
21947
|
-
"oocLabel": "rp_NFPimG_oocLabel"
|
|
22882
|
+
"imageButton": "rp_NFPimG_imageButton",
|
|
22883
|
+
"images": "rp_NFPimG_images"
|
|
21948
22884
|
};
|
|
21949
22885
|
//#endregion
|
|
21950
22886
|
//#region src/client/transcript/PreviewNode.tsx
|
|
@@ -22209,9 +23145,9 @@ window.__ModuleLoader__.load({
|
|
|
22209
23145
|
}
|
|
22210
23146
|
tag$1.textContent = css$1;
|
|
22211
23147
|
var SuggestionsDock_module_css_default = {
|
|
22212
|
-
"dock": "rp_rWH4DG_dock",
|
|
22213
23148
|
"label": "rp_rWH4DG_label",
|
|
22214
23149
|
"chip": "rp_rWH4DG_chip",
|
|
23150
|
+
"dock": "rp_rWH4DG_dock",
|
|
22215
23151
|
"card": "rp_rWH4DG_card",
|
|
22216
23152
|
"lines": "rp_rWH4DG_lines"
|
|
22217
23153
|
};
|
|
@@ -22334,11 +23270,11 @@ window.__ModuleLoader__.load({
|
|
|
22334
23270
|
tag.textContent = css;
|
|
22335
23271
|
var TurnsDock_module_css_default = {
|
|
22336
23272
|
"button": "rp_f4YLlq_button",
|
|
22337
|
-
"error": "rp_f4YLlq_error",
|
|
22338
|
-
"select": "rp_f4YLlq_select",
|
|
22339
|
-
"dock": "rp_f4YLlq_dock",
|
|
22340
23273
|
"group": "rp_f4YLlq_group",
|
|
22341
|
-
"count": "rp_f4YLlq_count"
|
|
23274
|
+
"count": "rp_f4YLlq_count",
|
|
23275
|
+
"select": "rp_f4YLlq_select",
|
|
23276
|
+
"error": "rp_f4YLlq_error",
|
|
23277
|
+
"dock": "rp_f4YLlq_dock"
|
|
22342
23278
|
};
|
|
22343
23279
|
//#endregion
|
|
22344
23280
|
//#region src/client/transcript/withdrawn.ts
|
|
@@ -22710,6 +23646,7 @@ window.__ModuleLoader__.load({
|
|
|
22710
23646
|
registerLorebooksPage(ctx);
|
|
22711
23647
|
registerCataloguePage(ctx);
|
|
22712
23648
|
registerSessionsPage(ctx);
|
|
23649
|
+
registerSyncPage(ctx);
|
|
22713
23650
|
registerTranscript(ctx);
|
|
22714
23651
|
registerChatSettings(ctx);
|
|
22715
23652
|
registerWorld(ctx);
|