@dsh-agentic-roleplay/core 0.6.1 → 0.7.1
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/access-DtOxFKBK.js +150 -0
- package/lib/{authoring-tools-BGzzW6O5.js → authoring-tools-BKltdiea.js} +160 -74
- package/lib/authoring.js +10 -5
- package/lib/{child-D5SVNk4O.js → child-CyCViUKa.js} +48 -7
- package/lib/client.js +2157 -780
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +3 -3
- package/lib/doctor.js +3 -3
- package/lib/{gallery-C7VOJ3xH.js → gallery-BxZGOgMb.js} +2 -2
- package/lib/{generator-CO8usAjE.js → generator-BFmSYvR8.js} +2 -2
- package/lib/helper.js +1 -1
- package/lib/{hooks-BLperIIB.js → hooks-HnqXO8mM.js} +10 -241
- package/lib/images.js +4 -4
- package/lib/index.js +1424 -203
- package/lib/{library-DsDc6fQa.js → library-BGxPKs9a.js} +6 -3
- package/lib/{lorebook-author-tools-C-cFiE6E.js → lorebook-author-tools-BAnUyRtS.js} +37 -29
- package/lib/lorebook-authoring.js +8 -3
- package/lib/{narration-_dA9oIt2.js → narration-DvFBqmqe.js} +9 -132
- package/lib/orchestration.js +13 -10
- package/lib/{pack-jail-BKFmbYP8.js → pack-jail-DLGguGS3.js} +20 -13
- package/lib/{packs-ZTG7fWut.js → packs-jowC-MN_.js} +2 -2
- package/lib/{presenter-agent-BHSbyWwZ.js → presenter-agent-DvZtnf0Q.js} +6 -6
- package/lib/{preset-CJLW8Mp0.js → preset-CXbC0NeU.js} +3 -3
- package/lib/{preset-author-tools-1RstgEZs.js → preset-author-tools-C26kj6t5.js} +14 -7
- package/lib/preset-authoring.js +9 -4
- package/lib/{reflection-6qfOC5OT.js → reflection-CvOZGjmn.js} +9 -170
- package/lib/{presets-DcPCnn8O.js → route-DRTJ_vcA.js} +165 -4
- package/lib/text-JbWfTHbr.js +295 -0
- package/lib/turn-guard-BvCs1VxB.js +53 -0
- package/package.json +29 -29
- package/prompts/en/import/cut-off.md +1 -0
- package/prompts/en/import/finish-failed.md +1 -1
- package/prompts/en/roleplay/decide-instruction.md +1 -0
- package/prompts/en/roleplay/decide-irrelevant.md +1 -0
- package/prompts/zh/import/cut-off.md +1 -0
- package/prompts/zh/import/finish-failed.md +1 -1
- package/prompts/zh/roleplay/decide-instruction.md +1 -0
- package/prompts/zh/roleplay/decide-irrelevant.md +1 -0
- package/lib/access-EbNdZFbk.js +0 -25
- package/lib/text-CT1re6XT.js +0 -18
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$34 = ".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$34 = "src/client/panel/PageTabs.module.css";
|
|
31
|
+
let tag$34 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$34) + "]");
|
|
32
|
+
if (tag$34 === null) {
|
|
33
|
+
tag$34 = document.createElement("style");
|
|
34
|
+
tag$34.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
35
|
+
tag$34.dataset.pluginCss = key$34;
|
|
36
|
+
document.head.appendChild(tag$34);
|
|
37
|
+
}
|
|
38
|
+
tag$34.textContent = css$34;
|
|
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$
|
|
93
|
-
}
|
|
94
|
-
tag$
|
|
85
|
+
const css$33 = ".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$33 = "src/client/panel/RoleplayPanel.module.css";
|
|
87
|
+
let tag$33 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$33) + "]");
|
|
88
|
+
if (tag$33 === null) {
|
|
89
|
+
tag$33 = document.createElement("style");
|
|
90
|
+
tag$33.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
91
|
+
tag$33.dataset.pluginCss = key$33;
|
|
92
|
+
document.head.appendChild(tag$33);
|
|
93
|
+
}
|
|
94
|
+
tag$33.textContent = css$33;
|
|
95
95
|
var RoleplayPanel_module_css_default = {
|
|
96
|
-
"
|
|
96
|
+
"title": "rp_ua5gBa_title",
|
|
97
97
|
"panel": "rp_ua5gBa_panel",
|
|
98
98
|
"header": "rp_ua5gBa_header",
|
|
99
|
-
"
|
|
99
|
+
"body": "rp_ua5gBa_body"
|
|
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$32 = ".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$32 = "src/client/widgets/import-card/ImportCard.module.css";
|
|
423
|
+
let tag$32 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$32) + "]");
|
|
424
|
+
if (tag$32 === null) {
|
|
425
|
+
tag$32 = document.createElement("style");
|
|
426
|
+
tag$32.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
427
|
+
tag$32.dataset.pluginCss = key$32;
|
|
428
|
+
document.head.appendChild(tag$32);
|
|
429
429
|
}
|
|
430
|
-
tag$
|
|
430
|
+
tag$32.textContent = css$32;
|
|
431
431
|
var ImportCard_module_css_default = {
|
|
432
|
-
"
|
|
432
|
+
"preview": "rp_5cvtma_preview",
|
|
433
433
|
"error": "rp_5cvtma_error",
|
|
434
|
-
"
|
|
435
|
-
"top": "rp_5cvtma_top",
|
|
436
|
-
"note": "rp_5cvtma_note",
|
|
437
|
-
"field": "rp_5cvtma_field",
|
|
438
|
-
"row": "rp_5cvtma_row",
|
|
439
|
-
"tags": "rp_5cvtma_tags",
|
|
440
|
-
"about": "rp_5cvtma_about",
|
|
434
|
+
"entry": "rp_5cvtma_entry",
|
|
441
435
|
"fieldMeta": "rp_5cvtma_fieldMeta",
|
|
442
|
-
"
|
|
443
|
-
"text": "rp_5cvtma_text",
|
|
444
|
-
"noPicture": "rp_5cvtma_noPicture",
|
|
445
|
-
"header": "rp_5cvtma_header",
|
|
446
|
-
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
436
|
+
"entryOff": "rp_5cvtma_entryOff",
|
|
447
437
|
"choiceText": "rp_5cvtma_choiceText",
|
|
448
|
-
"
|
|
449
|
-
"
|
|
438
|
+
"choice": "rp_5cvtma_choice",
|
|
439
|
+
"entryTitle": "rp_5cvtma_entryTitle",
|
|
440
|
+
"page": "rp_5cvtma_page",
|
|
450
441
|
"label": "rp_5cvtma_label",
|
|
451
442
|
"picture": "rp_5cvtma_picture",
|
|
452
|
-
"
|
|
453
|
-
"entryHead": "rp_5cvtma_entryHead",
|
|
443
|
+
"title": "rp_5cvtma_title",
|
|
454
444
|
"body": "rp_5cvtma_body",
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"
|
|
445
|
+
"field": "rp_5cvtma_field",
|
|
446
|
+
"tags": "rp_5cvtma_tags",
|
|
447
|
+
"header": "rp_5cvtma_header",
|
|
448
|
+
"space": "rp_5cvtma_space",
|
|
449
|
+
"top": "rp_5cvtma_top",
|
|
450
|
+
"heading": "rp_5cvtma_heading",
|
|
451
|
+
"section": "rp_5cvtma_section",
|
|
452
|
+
"note": "rp_5cvtma_note",
|
|
453
|
+
"noPicture": "rp_5cvtma_noPicture",
|
|
454
|
+
"entryHead": "rp_5cvtma_entryHead",
|
|
455
|
+
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
456
|
+
"text": "rp_5cvtma_text",
|
|
457
|
+
"row": "rp_5cvtma_row",
|
|
458
|
+
"about": "rp_5cvtma_about",
|
|
459
|
+
"fieldHead": "rp_5cvtma_fieldHead"
|
|
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$31 = ".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$31 = "src/client/pages/catalogue/CataloguePage.module.css";
|
|
809
|
+
let tag$31 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$31) + "]");
|
|
810
|
+
if (tag$31 === null) {
|
|
811
|
+
tag$31 = document.createElement("style");
|
|
812
|
+
tag$31.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
813
|
+
tag$31.dataset.pluginCss = key$31;
|
|
814
|
+
document.head.appendChild(tag$31);
|
|
815
815
|
}
|
|
816
|
-
tag$
|
|
816
|
+
tag$31.textContent = css$31;
|
|
817
817
|
var CataloguePage_module_css_default = {
|
|
818
|
-
"
|
|
819
|
-
"
|
|
820
|
-
"
|
|
821
|
-
"
|
|
822
|
-
"
|
|
823
|
-
"
|
|
824
|
-
"
|
|
825
|
-
"actions": "rp_qK1u-G_actions",
|
|
826
|
-
"image": "rp_qK1u-G_image",
|
|
827
|
-
"toolbar": "rp_qK1u-G_toolbar",
|
|
828
|
-
"meta": "rp_qK1u-G_meta",
|
|
818
|
+
"spacer": "rp_qK1u-G_spacer",
|
|
819
|
+
"cover": "rp_qK1u-G_cover",
|
|
820
|
+
"page": "rp_qK1u-G_page",
|
|
821
|
+
"label": "rp_qK1u-G_label",
|
|
822
|
+
"description": "rp_qK1u-G_description",
|
|
823
|
+
"search": "rp_qK1u-G_search",
|
|
824
|
+
"form": "rp_qK1u-G_form",
|
|
829
825
|
"status": "rp_qK1u-G_status",
|
|
830
|
-
"
|
|
831
|
-
"grid": "rp_qK1u-G_grid",
|
|
826
|
+
"message": "rp_qK1u-G_message",
|
|
832
827
|
"updates": "rp_qK1u-G_updates",
|
|
833
|
-
"select": "rp_qK1u-G_select",
|
|
834
828
|
"viewport": "rp_qK1u-G_viewport",
|
|
835
|
-
"
|
|
829
|
+
"grid": "rp_qK1u-G_grid",
|
|
830
|
+
"field": "rp_qK1u-G_field",
|
|
831
|
+
"actions": "rp_qK1u-G_actions",
|
|
832
|
+
"body": "rp_qK1u-G_body",
|
|
836
833
|
"detail": "rp_qK1u-G_detail",
|
|
834
|
+
"kinds": "rp_qK1u-G_kinds",
|
|
835
|
+
"tags": "rp_qK1u-G_tags",
|
|
836
|
+
"meta": "rp_qK1u-G_meta",
|
|
837
|
+
"update": "rp_qK1u-G_update",
|
|
838
|
+
"select": "rp_qK1u-G_select",
|
|
839
|
+
"name": "rp_qK1u-G_name",
|
|
840
|
+
"changes": "rp_qK1u-G_changes",
|
|
841
|
+
"kind": "rp_qK1u-G_kind",
|
|
842
|
+
"image": "rp_qK1u-G_image",
|
|
843
|
+
"notice": "rp_qK1u-G_notice",
|
|
837
844
|
"success": "rp_qK1u-G_success",
|
|
838
|
-
"
|
|
839
|
-
"page": "rp_qK1u-G_page",
|
|
845
|
+
"toolbar": "rp_qK1u-G_toolbar",
|
|
840
846
|
"more": "rp_qK1u-G_more",
|
|
841
847
|
"placeholder": "rp_qK1u-G_placeholder",
|
|
842
|
-
"
|
|
843
|
-
"
|
|
844
|
-
"kind": "rp_qK1u-G_kind",
|
|
845
|
-
"changes": "rp_qK1u-G_changes",
|
|
846
|
-
"label": "rp_qK1u-G_label",
|
|
847
|
-
"spacer": "rp_qK1u-G_spacer",
|
|
848
|
-
"form": "rp_qK1u-G_form",
|
|
849
|
-
"description": "rp_qK1u-G_description"
|
|
848
|
+
"warning": "rp_qK1u-G_warning",
|
|
849
|
+
"card": "rp_qK1u-G_card"
|
|
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$30 = ".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$30 = "src/client/widgets/import-selection/ImportSelection.module.css";
|
|
1043
|
+
let tag$30 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$30) + "]");
|
|
1044
|
+
if (tag$30 === null) {
|
|
1045
|
+
tag$30 = document.createElement("style");
|
|
1046
|
+
tag$30.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
1047
|
+
tag$30.dataset.pluginCss = key$30;
|
|
1048
|
+
document.head.appendChild(tag$30);
|
|
1049
1049
|
}
|
|
1050
|
-
tag$
|
|
1050
|
+
tag$30.textContent = css$30;
|
|
1051
1051
|
var ImportSelection_module_css_default = {
|
|
1052
|
-
"
|
|
1052
|
+
"error": "rp_Jx0l4q_error",
|
|
1053
1053
|
"help": "rp_Jx0l4q_help",
|
|
1054
|
-
"extra": "rp_Jx0l4q_extra",
|
|
1055
|
-
"bar": "rp_Jx0l4q_bar",
|
|
1056
1054
|
"list": "rp_Jx0l4q_list",
|
|
1057
|
-
"full": "rp_Jx0l4q_full",
|
|
1058
|
-
"count": "rp_Jx0l4q_count",
|
|
1059
1055
|
"note": "rp_Jx0l4q_note",
|
|
1060
|
-
"
|
|
1056
|
+
"full": "rp_Jx0l4q_full",
|
|
1057
|
+
"meta": "rp_Jx0l4q_meta",
|
|
1058
|
+
"extra": "rp_Jx0l4q_extra",
|
|
1061
1059
|
"sampling": "rp_Jx0l4q_sampling",
|
|
1062
|
-
"text": "rp_Jx0l4q_text",
|
|
1063
1060
|
"row": "rp_Jx0l4q_row",
|
|
1064
|
-
"
|
|
1061
|
+
"text": "rp_Jx0l4q_text",
|
|
1062
|
+
"body": "rp_Jx0l4q_body",
|
|
1063
|
+
"bar": "rp_Jx0l4q_bar",
|
|
1064
|
+
"count": "rp_Jx0l4q_count"
|
|
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$29 = ".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$29 = "src/client/world-editor/CharactersPanel.module.css";
|
|
2927
|
+
let tag$29 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$29) + "]");
|
|
2928
|
+
if (tag$29 === null) {
|
|
2929
|
+
tag$29 = document.createElement("style");
|
|
2930
|
+
tag$29.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
2931
|
+
tag$29.dataset.pluginCss = key$29;
|
|
2932
|
+
document.head.appendChild(tag$29);
|
|
2933
2933
|
}
|
|
2934
|
-
tag$
|
|
2934
|
+
tag$29.textContent = css$29;
|
|
2935
2935
|
var CharactersPanel_module_css_default = {
|
|
2936
|
+
"head": "rp_5ZMIxq_head",
|
|
2936
2937
|
"nameInput": "rp_5ZMIxq_nameInput",
|
|
2938
|
+
"field": "rp_5ZMIxq_field",
|
|
2937
2939
|
"tabs": "rp_5ZMIxq_tabs",
|
|
2938
|
-
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
2939
|
-
"portraitError": "rp_5ZMIxq_portraitError",
|
|
2940
2940
|
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
2941
|
-
"
|
|
2941
|
+
"row": "rp_5ZMIxq_row",
|
|
2942
|
+
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
2942
2943
|
"grid": "rp_5ZMIxq_grid",
|
|
2943
|
-
"
|
|
2944
|
-
"
|
|
2945
|
-
"
|
|
2946
|
-
"error": "rp_5ZMIxq_error",
|
|
2944
|
+
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
2945
|
+
"portrait": "rp_5ZMIxq_portrait",
|
|
2946
|
+
"missing": "rp_5ZMIxq_missing",
|
|
2947
2947
|
"sheet": "rp_5ZMIxq_sheet",
|
|
2948
|
-
"
|
|
2949
|
-
"
|
|
2950
|
-
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
2948
|
+
"panel": "rp_5ZMIxq_panel",
|
|
2949
|
+
"body": "rp_5ZMIxq_body",
|
|
2951
2950
|
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
2951
|
+
"goal": "rp_5ZMIxq_goal",
|
|
2952
|
+
"initial": "rp_5ZMIxq_initial",
|
|
2953
|
+
"wide": "rp_5ZMIxq_wide",
|
|
2952
2954
|
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
2955
|
+
"portraitError": "rp_5ZMIxq_portraitError",
|
|
2956
|
+
"area": "rp_5ZMIxq_area",
|
|
2957
|
+
"tab": "rp_5ZMIxq_tab",
|
|
2953
2958
|
"select": "rp_5ZMIxq_select",
|
|
2954
|
-
"
|
|
2955
|
-
"
|
|
2956
|
-
"portrait": "rp_5ZMIxq_portrait",
|
|
2957
|
-
"field": "rp_5ZMIxq_field",
|
|
2958
|
-
"head": "rp_5ZMIxq_head",
|
|
2959
|
+
"tabOn": "rp_5ZMIxq_tabOn",
|
|
2960
|
+
"section": "rp_5ZMIxq_section",
|
|
2959
2961
|
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
2960
|
-
"body": "rp_5ZMIxq_body",
|
|
2961
2962
|
"placeholder": "rp_5ZMIxq_placeholder",
|
|
2962
|
-
"
|
|
2963
|
-
"
|
|
2963
|
+
"barText": "rp_5ZMIxq_barText",
|
|
2964
|
+
"empty": "rp_5ZMIxq_empty",
|
|
2964
2965
|
"label": "rp_5ZMIxq_label",
|
|
2965
|
-
"help": "rp_5ZMIxq_help",
|
|
2966
|
-
"area": "rp_5ZMIxq_area",
|
|
2967
2966
|
"meta": "rp_5ZMIxq_meta",
|
|
2968
|
-
"
|
|
2969
|
-
"
|
|
2967
|
+
"help": "rp_5ZMIxq_help",
|
|
2968
|
+
"error": "rp_5ZMIxq_error",
|
|
2969
|
+
"bar": "rp_5ZMIxq_bar"
|
|
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$28 = ".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$28 = "src/client/world-editor/RelationsPanel.module.css";
|
|
4685
|
+
let tag$28 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$28) + "]");
|
|
4686
|
+
if (tag$28 === null) {
|
|
4687
|
+
tag$28 = document.createElement("style");
|
|
4688
|
+
tag$28.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
4689
|
+
tag$28.dataset.pluginCss = key$28;
|
|
4690
|
+
document.head.appendChild(tag$28);
|
|
4691
4691
|
}
|
|
4692
|
-
tag$
|
|
4692
|
+
tag$28.textContent = css$28;
|
|
4693
4693
|
var RelationsPanel_module_css_default = {
|
|
4694
|
-
"metrics": "rp_7pEHTW_metrics",
|
|
4695
|
-
"status": "rp_7pEHTW_status",
|
|
4696
|
-
"node_character": "rp_7pEHTW_node_character",
|
|
4697
|
-
"actions": "rp_7pEHTW_actions",
|
|
4698
|
-
"empty": "rp_7pEHTW_empty",
|
|
4699
|
-
"graph": "rp_7pEHTW_graph",
|
|
4700
|
-
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
4701
|
-
"wide": "rp_7pEHTW_wide",
|
|
4702
|
-
"inspector": "rp_7pEHTW_inspector",
|
|
4703
|
-
"node_item": "rp_7pEHTW_node_item",
|
|
4704
|
-
"entities": "rp_7pEHTW_entities",
|
|
4705
|
-
"toolbar": "rp_7pEHTW_toolbar",
|
|
4706
4694
|
"filterOn": "rp_7pEHTW_filterOn",
|
|
4707
|
-
"space": "rp_7pEHTW_space",
|
|
4708
|
-
"head": "rp_7pEHTW_head",
|
|
4709
|
-
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4710
4695
|
"form": "rp_7pEHTW_form",
|
|
4711
|
-
"
|
|
4712
|
-
"
|
|
4696
|
+
"node_character": "rp_7pEHTW_node_character",
|
|
4697
|
+
"node_faction": "rp_7pEHTW_node_faction",
|
|
4698
|
+
"panel": "rp_7pEHTW_panel",
|
|
4713
4699
|
"node": "rp_7pEHTW_node",
|
|
4714
|
-
"perspective": "rp_7pEHTW_perspective",
|
|
4715
4700
|
"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
|
-
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4721
|
-
"error": "rp_7pEHTW_error",
|
|
4722
4701
|
"filter": "rp_7pEHTW_filter",
|
|
4702
|
+
"error": "rp_7pEHTW_error",
|
|
4703
|
+
"perspective": "rp_7pEHTW_perspective",
|
|
4704
|
+
"notice": "rp_7pEHTW_notice",
|
|
4705
|
+
"wide": "rp_7pEHTW_wide",
|
|
4706
|
+
"node_item": "rp_7pEHTW_node_item",
|
|
4707
|
+
"graphEdge": "rp_7pEHTW_graphEdge",
|
|
4708
|
+
"edge": "rp_7pEHTW_edge",
|
|
4723
4709
|
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
4710
|
+
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4711
|
+
"head": "rp_7pEHTW_head",
|
|
4712
|
+
"node_location": "rp_7pEHTW_node_location",
|
|
4713
|
+
"toolbar": "rp_7pEHTW_toolbar",
|
|
4724
4714
|
"list": "rp_7pEHTW_list",
|
|
4715
|
+
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
4716
|
+
"actions": "rp_7pEHTW_actions",
|
|
4717
|
+
"status": "rp_7pEHTW_status",
|
|
4718
|
+
"inspector": "rp_7pEHTW_inspector",
|
|
4719
|
+
"metrics": "rp_7pEHTW_metrics",
|
|
4720
|
+
"empty": "rp_7pEHTW_empty",
|
|
4721
|
+
"graph": "rp_7pEHTW_graph",
|
|
4722
|
+
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4723
|
+
"entities": "rp_7pEHTW_entities",
|
|
4724
|
+
"space": "rp_7pEHTW_space",
|
|
4725
4725
|
"check": "rp_7pEHTW_check",
|
|
4726
|
-
"
|
|
4726
|
+
"edgeKind": "rp_7pEHTW_edgeKind"
|
|
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$27 = ".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$27 = "src/client/widgets/pack-frame/PackFrame.module.css";
|
|
6092
|
+
let tag$27 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$27) + "]");
|
|
6093
|
+
if (tag$27 === null) {
|
|
6094
|
+
tag$27 = document.createElement("style");
|
|
6095
|
+
tag$27.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6096
|
+
tag$27.dataset.pluginCss = key$27;
|
|
6097
|
+
document.head.appendChild(tag$27);
|
|
6098
6098
|
}
|
|
6099
|
-
tag$
|
|
6099
|
+
tag$27.textContent = css$27;
|
|
6100
6100
|
var PackFrame_module_css_default = {
|
|
6101
6101
|
"frame": "rp_h_sbFq_frame",
|
|
6102
|
-
"
|
|
6102
|
+
"problems": "rp_h_sbFq_problems",
|
|
6103
6103
|
"hud": "rp_h_sbFq_hud",
|
|
6104
|
-
"fill": "rp_h_sbFq_fill",
|
|
6105
6104
|
"message": "rp_h_sbFq_message",
|
|
6106
|
-
"
|
|
6105
|
+
"tab": "rp_h_sbFq_tab",
|
|
6106
|
+
"fill": "rp_h_sbFq_fill"
|
|
6107
6107
|
};
|
|
6108
6108
|
//#endregion
|
|
6109
6109
|
//#region src/client/widgets/pack-frame/theme.ts
|
|
@@ -6355,23 +6355,23 @@ 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$26 = ".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$26 = "src/client/world-editor/PacksPanel.module.css";
|
|
6360
|
+
let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
|
|
6361
|
+
if (tag$26 === null) {
|
|
6362
|
+
tag$26 = document.createElement("style");
|
|
6363
|
+
tag$26.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6364
|
+
tag$26.dataset.pluginCss = key$26;
|
|
6365
|
+
document.head.appendChild(tag$26);
|
|
6366
6366
|
}
|
|
6367
|
-
tag$
|
|
6367
|
+
tag$26.textContent = css$26;
|
|
6368
6368
|
var PacksPanel_module_css_default = {
|
|
6369
6369
|
"files": "rp_FLaP7q_files",
|
|
6370
|
+
"stageTall": "rp_FLaP7q_stageTall",
|
|
6370
6371
|
"note": "rp_FLaP7q_note",
|
|
6371
6372
|
"stage": "rp_FLaP7q_stage",
|
|
6372
|
-
"group": "rp_FLaP7q_group",
|
|
6373
6373
|
"controls": "rp_FLaP7q_controls",
|
|
6374
|
-
"
|
|
6374
|
+
"group": "rp_FLaP7q_group",
|
|
6375
6375
|
"log": "rp_FLaP7q_log"
|
|
6376
6376
|
};
|
|
6377
6377
|
//#endregion
|
|
@@ -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$25 = ".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$25 = "src/client/widgets/sampling-fields/SamplingFields.module.css";
|
|
7467
|
+
let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
|
|
7468
|
+
if (tag$25 === null) {
|
|
7469
|
+
tag$25 = document.createElement("style");
|
|
7470
|
+
tag$25.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
7471
|
+
tag$25.dataset.pluginCss = key$25;
|
|
7472
|
+
document.head.appendChild(tag$25);
|
|
7473
7473
|
}
|
|
7474
|
-
tag$
|
|
7474
|
+
tag$25.textContent = css$25;
|
|
7475
7475
|
var SamplingFields_module_css_default = {
|
|
7476
7476
|
"field": "rp_9vxYSG_field",
|
|
7477
|
-
"
|
|
7478
|
-
"input": "rp_9vxYSG_input",
|
|
7479
|
-
"root": "rp_9vxYSG_root",
|
|
7477
|
+
"label": "rp_9vxYSG_label",
|
|
7480
7478
|
"grid": "rp_9vxYSG_grid",
|
|
7481
|
-
"
|
|
7479
|
+
"input": "rp_9vxYSG_input",
|
|
7480
|
+
"help": "rp_9vxYSG_help",
|
|
7481
|
+
"root": "rp_9vxYSG_root"
|
|
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$24 = ".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$24 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
|
|
8889
|
+
let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
|
|
8890
|
+
if (tag$24 === null) {
|
|
8891
|
+
tag$24 = document.createElement("style");
|
|
8892
|
+
tag$24.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8893
|
+
tag$24.dataset.pluginCss = key$24;
|
|
8894
|
+
document.head.appendChild(tag$24);
|
|
8895
8895
|
}
|
|
8896
|
-
tag$
|
|
8896
|
+
tag$24.textContent = css$24;
|
|
8897
8897
|
var ToolSwitches_module_css_default = {
|
|
8898
|
-
"
|
|
8899
|
-
"
|
|
8900
|
-
"error": "rp_CjoFLq_error",
|
|
8901
|
-
"hint": "rp_CjoFLq_hint",
|
|
8898
|
+
"default": "rp_CjoFLq_default",
|
|
8899
|
+
"external": "rp_CjoFLq_external",
|
|
8902
8900
|
"help": "rp_CjoFLq_help",
|
|
8903
8901
|
"agent": "rp_CjoFLq_agent",
|
|
8904
8902
|
"root": "rp_CjoFLq_root",
|
|
8905
8903
|
"toolText": "rp_CjoFLq_toolText",
|
|
8906
|
-
"
|
|
8907
|
-
"
|
|
8908
|
-
"
|
|
8904
|
+
"title": "rp_CjoFLq_title",
|
|
8905
|
+
"agentName": "rp_CjoFLq_agentName",
|
|
8906
|
+
"hint": "rp_CjoFLq_hint",
|
|
8907
|
+
"tool": "rp_CjoFLq_tool",
|
|
8908
|
+
"error": "rp_CjoFLq_error"
|
|
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$23 = ".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$23 = "src/client/widgets/gallery-view/GalleryView.module.css";
|
|
9910
|
+
let tag$23 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$23) + "]");
|
|
9911
|
+
if (tag$23 === null) {
|
|
9912
|
+
tag$23 = document.createElement("style");
|
|
9913
|
+
tag$23.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9914
|
+
tag$23.dataset.pluginCss = key$23;
|
|
9915
|
+
document.head.appendChild(tag$23);
|
|
9916
9916
|
}
|
|
9917
|
-
tag$
|
|
9917
|
+
tag$23.textContent = css$23;
|
|
9918
9918
|
var GalleryView_module_css_default = {
|
|
9919
|
-
"
|
|
9920
|
-
"page": "rp_9pSHmG_page",
|
|
9921
|
-
"open": "rp_9pSHmG_open",
|
|
9922
|
-
"pre": "rp_9pSHmG_pre",
|
|
9919
|
+
"select": "rp_9pSHmG_select",
|
|
9923
9920
|
"message": "rp_9pSHmG_message",
|
|
9924
|
-
"error": "rp_9pSHmG_error",
|
|
9925
|
-
"editHelp": "rp_9pSHmG_editHelp",
|
|
9926
|
-
"count": "rp_9pSHmG_count",
|
|
9927
|
-
"toolbar": "rp_9pSHmG_toolbar",
|
|
9928
9921
|
"facts": "rp_9pSHmG_facts",
|
|
9929
|
-
"
|
|
9930
|
-
"status": "rp_9pSHmG_status",
|
|
9931
|
-
"cell": "rp_9pSHmG_cell",
|
|
9932
|
-
"editButton": "rp_9pSHmG_editButton",
|
|
9922
|
+
"caption": "rp_9pSHmG_caption",
|
|
9933
9923
|
"image": "rp_9pSHmG_image",
|
|
9934
|
-
"
|
|
9924
|
+
"page": "rp_9pSHmG_page",
|
|
9925
|
+
"count": "rp_9pSHmG_count",
|
|
9926
|
+
"editHelp": "rp_9pSHmG_editHelp",
|
|
9927
|
+
"editLabel": "rp_9pSHmG_editLabel",
|
|
9928
|
+
"editButton": "rp_9pSHmG_editButton",
|
|
9929
|
+
"grid": "rp_9pSHmG_grid",
|
|
9935
9930
|
"large": "rp_9pSHmG_large",
|
|
9936
|
-
"note": "rp_9pSHmG_note",
|
|
9937
|
-
"thumb": "rp_9pSHmG_thumb",
|
|
9938
|
-
"caption": "rp_9pSHmG_caption",
|
|
9939
9931
|
"statusError": "rp_9pSHmG_statusError",
|
|
9940
|
-
"
|
|
9941
|
-
"editLabel": "rp_9pSHmG_editLabel",
|
|
9942
|
-
"editInput": "rp_9pSHmG_editInput",
|
|
9932
|
+
"status": "rp_9pSHmG_status",
|
|
9943
9933
|
"editArea": "rp_9pSHmG_editArea",
|
|
9944
|
-
"
|
|
9934
|
+
"cell": "rp_9pSHmG_cell",
|
|
9935
|
+
"editInput": "rp_9pSHmG_editInput",
|
|
9936
|
+
"toolbar": "rp_9pSHmG_toolbar",
|
|
9937
|
+
"open": "rp_9pSHmG_open",
|
|
9938
|
+
"error": "rp_9pSHmG_error",
|
|
9939
|
+
"actions": "rp_9pSHmG_actions",
|
|
9940
|
+
"edit": "rp_9pSHmG_edit",
|
|
9941
|
+
"pre": "rp_9pSHmG_pre",
|
|
9942
|
+
"note": "rp_9pSHmG_note",
|
|
9945
9943
|
"reusable": "rp_9pSHmG_reusable",
|
|
9946
9944
|
"editField": "rp_9pSHmG_editField",
|
|
9947
|
-
"
|
|
9945
|
+
"thumb": "rp_9pSHmG_thumb",
|
|
9946
|
+
"tags": "rp_9pSHmG_tags",
|
|
9947
|
+
"detail": "rp_9pSHmG_detail"
|
|
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$22 = ".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$22 = "src/client/world-editor/WorldEditor.module.css";
|
|
10279
|
+
let tag$22 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$22) + "]");
|
|
10280
|
+
if (tag$22 === null) {
|
|
10281
|
+
tag$22 = document.createElement("style");
|
|
10282
|
+
tag$22.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10283
|
+
tag$22.dataset.pluginCss = key$22;
|
|
10284
|
+
document.head.appendChild(tag$22);
|
|
10285
10285
|
}
|
|
10286
|
-
tag$
|
|
10286
|
+
tag$22.textContent = css$22;
|
|
10287
10287
|
var WorldEditor_module_css_default = {
|
|
10288
|
-
"view": "rp__swA3a_view",
|
|
10289
|
-
"message": "rp__swA3a_message",
|
|
10290
|
-
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
10291
|
-
"drawer": "rp__swA3a_drawer",
|
|
10292
10288
|
"warning": "rp__swA3a_warning",
|
|
10293
10289
|
"drawerItem": "rp__swA3a_drawerItem",
|
|
10294
|
-
"
|
|
10290
|
+
"drawer": "rp__swA3a_drawer",
|
|
10291
|
+
"view": "rp__swA3a_view",
|
|
10292
|
+
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
10293
|
+
"content": "rp__swA3a_content",
|
|
10294
|
+
"message": "rp__swA3a_message"
|
|
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$21 = ".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$21 = "src/client/pages/avatars/AvatarsPage.module.css";
|
|
10681
|
+
let tag$21 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$21) + "]");
|
|
10682
|
+
if (tag$21 === null) {
|
|
10683
|
+
tag$21 = document.createElement("style");
|
|
10684
|
+
tag$21.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10685
|
+
tag$21.dataset.pluginCss = key$21;
|
|
10686
|
+
document.head.appendChild(tag$21);
|
|
10687
10687
|
}
|
|
10688
|
-
tag$
|
|
10688
|
+
tag$21.textContent = css$21;
|
|
10689
10689
|
var AvatarsPage_module_css_default = {
|
|
10690
|
-
"toolbar": "rp_pQOzEG_toolbar",
|
|
10691
|
-
"label": "rp_pQOzEG_label",
|
|
10692
10690
|
"field": "rp_pQOzEG_field",
|
|
10693
|
-
"
|
|
10694
|
-
"text": "rp_pQOzEG_text",
|
|
10695
|
-
"summary": "rp_pQOzEG_summary",
|
|
10696
|
-
"page": "rp_pQOzEG_page",
|
|
10697
|
-
"count": "rp_pQOzEG_count",
|
|
10691
|
+
"toolbar": "rp_pQOzEG_toolbar",
|
|
10698
10692
|
"card": "rp_pQOzEG_card",
|
|
10693
|
+
"open": "rp_pQOzEG_open",
|
|
10694
|
+
"placeholder": "rp_pQOzEG_placeholder",
|
|
10695
|
+
"name": "rp_pQOzEG_name",
|
|
10699
10696
|
"viewport": "rp_pQOzEG_viewport",
|
|
10697
|
+
"summary": "rp_pQOzEG_summary",
|
|
10698
|
+
"error": "rp_pQOzEG_error",
|
|
10699
|
+
"message": "rp_pQOzEG_message",
|
|
10700
10700
|
"portrait": "rp_pQOzEG_portrait",
|
|
10701
|
-
"
|
|
10701
|
+
"actions": "rp_pQOzEG_actions",
|
|
10702
|
+
"editHeader": "rp_pQOzEG_editHeader",
|
|
10702
10703
|
"editTitle": "rp_pQOzEG_editTitle",
|
|
10703
|
-
"
|
|
10704
|
+
"label": "rp_pQOzEG_label",
|
|
10705
|
+
"count": "rp_pQOzEG_count",
|
|
10704
10706
|
"editBody": "rp_pQOzEG_editBody",
|
|
10705
|
-
"
|
|
10706
|
-
"
|
|
10707
|
+
"text": "rp_pQOzEG_text",
|
|
10708
|
+
"page": "rp_pQOzEG_page",
|
|
10707
10709
|
"form": "rp_pQOzEG_form",
|
|
10708
|
-
"
|
|
10709
|
-
"grid": "rp_pQOzEG_grid",
|
|
10710
|
-
"error": "rp_pQOzEG_error"
|
|
10710
|
+
"grid": "rp_pQOzEG_grid"
|
|
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$
|
|
12145
|
+
const css$20 = ".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$20 = "src/client/pages/lorebooks/LorebooksPage.module.css";
|
|
12147
|
+
let tag$20 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$20) + "]");
|
|
12148
|
+
if (tag$20 === null) {
|
|
12149
|
+
tag$20 = document.createElement("style");
|
|
12150
|
+
tag$20.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
12151
|
+
tag$20.dataset.pluginCss = key$20;
|
|
12152
|
+
document.head.appendChild(tag$20);
|
|
12153
12153
|
}
|
|
12154
|
-
tag$
|
|
12154
|
+
tag$20.textContent = css$20;
|
|
12155
12155
|
var LorebooksPage_module_css_default = {
|
|
12156
|
+
"help": "rp_VV-Eha_help",
|
|
12156
12157
|
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12157
12158
|
"row": "rp_VV-Eha_row",
|
|
12159
|
+
"form": "rp_VV-Eha_form",
|
|
12160
|
+
"field": "rp_VV-Eha_field",
|
|
12158
12161
|
"select": "rp_VV-Eha_select",
|
|
12159
|
-
"
|
|
12160
|
-
"
|
|
12161
|
-
"
|
|
12162
|
-
"
|
|
12163
|
-
"
|
|
12164
|
-
"
|
|
12165
|
-
"error": "rp_VV-Eha_error",
|
|
12166
|
-
"actions": "rp_VV-Eha_actions",
|
|
12162
|
+
"title": "rp_VV-Eha_title",
|
|
12163
|
+
"ok": "rp_VV-Eha_ok",
|
|
12164
|
+
"cardActions": "rp_VV-Eha_cardActions",
|
|
12165
|
+
"card": "rp_VV-Eha_card",
|
|
12166
|
+
"viewport": "rp_VV-Eha_viewport",
|
|
12167
|
+
"warning": "rp_VV-Eha_warning",
|
|
12167
12168
|
"label": "rp_VV-Eha_label",
|
|
12168
12169
|
"entryArea": "rp_VV-Eha_entryArea",
|
|
12169
|
-
"
|
|
12170
|
-
"
|
|
12170
|
+
"message": "rp_VV-Eha_message",
|
|
12171
|
+
"editBody": "rp_VV-Eha_editBody",
|
|
12171
12172
|
"description": "rp_VV-Eha_description",
|
|
12172
|
-
"
|
|
12173
|
+
"error": "rp_VV-Eha_error",
|
|
12173
12174
|
"toolbar": "rp_VV-Eha_toolbar",
|
|
12174
|
-
"
|
|
12175
|
-
"
|
|
12176
|
-
"cardActions": "rp_VV-Eha_cardActions",
|
|
12177
|
-
"editHeader": "rp_VV-Eha_editHeader",
|
|
12178
|
-
"ok": "rp_VV-Eha_ok",
|
|
12179
|
-
"input": "rp_VV-Eha_input",
|
|
12180
|
-
"name": "rp_VV-Eha_name",
|
|
12175
|
+
"area": "rp_VV-Eha_area",
|
|
12176
|
+
"meta": "rp_VV-Eha_meta",
|
|
12181
12177
|
"section": "rp_VV-Eha_section",
|
|
12178
|
+
"input": "rp_VV-Eha_input",
|
|
12179
|
+
"editHeader": "rp_VV-Eha_editHeader",
|
|
12180
|
+
"count": "rp_VV-Eha_count",
|
|
12181
|
+
"editTitle": "rp_VV-Eha_editTitle",
|
|
12182
|
+
"page": "rp_VV-Eha_page",
|
|
12183
|
+
"actions": "rp_VV-Eha_actions",
|
|
12184
|
+
"head": "rp_VV-Eha_head",
|
|
12182
12185
|
"grid": "rp_VV-Eha_grid",
|
|
12183
|
-
"
|
|
12184
|
-
"card": "rp_VV-Eha_card",
|
|
12185
|
-
"help": "rp_VV-Eha_help",
|
|
12186
|
-
"viewport": "rp_VV-Eha_viewport"
|
|
12186
|
+
"name": "rp_VV-Eha_name"
|
|
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$19 = ".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$19 = "src/client/pages/presets/PresetsPage.module.css";
|
|
13221
|
+
let tag$19 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$19) + "]");
|
|
13222
|
+
if (tag$19 === null) {
|
|
13223
|
+
tag$19 = document.createElement("style");
|
|
13224
|
+
tag$19.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
13225
|
+
tag$19.dataset.pluginCss = key$19;
|
|
13226
|
+
document.head.appendChild(tag$19);
|
|
13227
13227
|
}
|
|
13228
|
-
tag$
|
|
13228
|
+
tag$19.textContent = css$19;
|
|
13229
13229
|
var PresetsPage_module_css_default = {
|
|
13230
|
-
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13231
|
-
"area": "rp_ZK89ba_area",
|
|
13232
|
-
"editHeader": "rp_ZK89ba_editHeader",
|
|
13233
|
-
"message": "rp_ZK89ba_message",
|
|
13234
13230
|
"editTitle": "rp_ZK89ba_editTitle",
|
|
13231
|
+
"form": "rp_ZK89ba_form",
|
|
13232
|
+
"row": "rp_ZK89ba_row",
|
|
13233
|
+
"cardActions": "rp_ZK89ba_cardActions",
|
|
13234
|
+
"ok": "rp_ZK89ba_ok",
|
|
13235
|
+
"page": "rp_ZK89ba_page",
|
|
13236
|
+
"warning": "rp_ZK89ba_warning",
|
|
13235
13237
|
"label": "rp_ZK89ba_label",
|
|
13236
|
-
"
|
|
13238
|
+
"description": "rp_ZK89ba_description",
|
|
13239
|
+
"error": "rp_ZK89ba_error",
|
|
13240
|
+
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13241
|
+
"message": "rp_ZK89ba_message",
|
|
13242
|
+
"help": "rp_ZK89ba_help",
|
|
13237
13243
|
"card": "rp_ZK89ba_card",
|
|
13238
13244
|
"count": "rp_ZK89ba_count",
|
|
13245
|
+
"viewport": "rp_ZK89ba_viewport",
|
|
13246
|
+
"meta": "rp_ZK89ba_meta",
|
|
13247
|
+
"editBody": "rp_ZK89ba_editBody",
|
|
13248
|
+
"editHeader": "rp_ZK89ba_editHeader",
|
|
13249
|
+
"toolbar": "rp_ZK89ba_toolbar",
|
|
13239
13250
|
"name": "rp_ZK89ba_name",
|
|
13240
13251
|
"actions": "rp_ZK89ba_actions",
|
|
13241
|
-
"
|
|
13242
|
-
"
|
|
13243
|
-
"
|
|
13252
|
+
"field": "rp_ZK89ba_field",
|
|
13253
|
+
"area": "rp_ZK89ba_area",
|
|
13254
|
+
"head": "rp_ZK89ba_head",
|
|
13244
13255
|
"grid": "rp_ZK89ba_grid",
|
|
13245
|
-
"ok": "rp_ZK89ba_ok",
|
|
13246
|
-
"error": "rp_ZK89ba_error",
|
|
13247
|
-
"toolbar": "rp_ZK89ba_toolbar",
|
|
13248
|
-
"input": "rp_ZK89ba_input",
|
|
13249
|
-
"help": "rp_ZK89ba_help",
|
|
13250
|
-
"row": "rp_ZK89ba_row",
|
|
13251
|
-
"warning": "rp_ZK89ba_warning",
|
|
13252
13256
|
"section": "rp_ZK89ba_section",
|
|
13253
|
-
"
|
|
13254
|
-
"
|
|
13255
|
-
"field": "rp_ZK89ba_field",
|
|
13256
|
-
"title": "rp_ZK89ba_title",
|
|
13257
|
-
"cardActions": "rp_ZK89ba_cardActions",
|
|
13258
|
-
"editBody": "rp_ZK89ba_editBody"
|
|
13257
|
+
"input": "rp_ZK89ba_input",
|
|
13258
|
+
"title": "rp_ZK89ba_title"
|
|
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,16 +14307,16 @@ 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$18 = ".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$18 = "src/client/widgets/pager/Pager.module.css";
|
|
14312
|
+
let tag$18 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$18) + "]");
|
|
14313
|
+
if (tag$18 === null) {
|
|
14314
|
+
tag$18 = document.createElement("style");
|
|
14315
|
+
tag$18.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14316
|
+
tag$18.dataset.pluginCss = key$18;
|
|
14317
|
+
document.head.appendChild(tag$18);
|
|
14318
14318
|
}
|
|
14319
|
-
tag$
|
|
14319
|
+
tag$18.textContent = css$18;
|
|
14320
14320
|
var Pager_module_css_default = {
|
|
14321
14321
|
"pager": "rp_KBAD0W_pager",
|
|
14322
14322
|
"position": "rp_KBAD0W_position"
|
|
@@ -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$17 = ".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$17 = "src/client/widgets/problem-list/ProblemList.module.css";
|
|
14359
|
+
let tag$17 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$17) + "]");
|
|
14360
|
+
if (tag$17 === null) {
|
|
14361
|
+
tag$17 = document.createElement("style");
|
|
14362
|
+
tag$17.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14363
|
+
tag$17.dataset.pluginCss = key$17;
|
|
14364
|
+
document.head.appendChild(tag$17);
|
|
14365
14365
|
}
|
|
14366
|
-
tag$
|
|
14366
|
+
tag$17.textContent = css$17;
|
|
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$16 = ".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$16 = "src/client/pages/sessions/DeleteSessionDialog.module.css";
|
|
14386
|
+
let tag$16 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$16) + "]");
|
|
14387
|
+
if (tag$16 === null) {
|
|
14388
|
+
tag$16 = document.createElement("style");
|
|
14389
|
+
tag$16.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14390
|
+
tag$16.dataset.pluginCss = key$16;
|
|
14391
|
+
document.head.appendChild(tag$16);
|
|
14392
14392
|
}
|
|
14393
|
-
tag$
|
|
14393
|
+
tag$16.textContent = css$16;
|
|
14394
14394
|
var DeleteSessionDialog_module_css_default = {
|
|
14395
|
-
"error": "rp_FifHrW_error",
|
|
14396
|
-
"question": "rp_FifHrW_question",
|
|
14397
14395
|
"warning": "rp_FifHrW_warning",
|
|
14398
|
-
"body": "rp_FifHrW_body"
|
|
14396
|
+
"body": "rp_FifHrW_body",
|
|
14397
|
+
"choice": "rp_FifHrW_choice",
|
|
14398
|
+
"question": "rp_FifHrW_question",
|
|
14399
|
+
"error": "rp_FifHrW_error"
|
|
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$15 = ".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$15 = "src/client/pages/sessions/SessionsPage.module.css";
|
|
14528
|
+
let tag$15 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$15) + "]");
|
|
14529
|
+
if (tag$15 === null) {
|
|
14530
|
+
tag$15 = document.createElement("style");
|
|
14531
|
+
tag$15.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14532
|
+
tag$15.dataset.pluginCss = key$15;
|
|
14533
|
+
document.head.appendChild(tag$15);
|
|
14502
14534
|
}
|
|
14503
|
-
tag$
|
|
14535
|
+
tag$15.textContent = css$15;
|
|
14504
14536
|
var SessionsPage_module_css_default = {
|
|
14537
|
+
"worldColumn": "rp_24z4eW_worldColumn",
|
|
14505
14538
|
"page": "rp_24z4eW_page",
|
|
14506
|
-
"spinning": "rp_24z4eW_spinning",
|
|
14507
14539
|
"notice": "rp_24z4eW_notice",
|
|
14508
|
-
"badge": "rp_24z4eW_badge",
|
|
14509
14540
|
"nameColumn": "rp_24z4eW_nameColumn",
|
|
14541
|
+
"archived": "rp_24z4eW_archived",
|
|
14542
|
+
"actions": "rp_24z4eW_actions",
|
|
14543
|
+
"badge": "rp_24z4eW_badge",
|
|
14510
14544
|
"timeColumn": "rp_24z4eW_timeColumn",
|
|
14545
|
+
"scrolls": "rp_24z4eW_scrolls",
|
|
14546
|
+
"spin": "rp_24z4eW_spin",
|
|
14511
14547
|
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
14512
|
-
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14513
14548
|
"number": "rp_24z4eW_number",
|
|
14514
|
-
"
|
|
14549
|
+
"toolbar": "rp_24z4eW_toolbar",
|
|
14515
14550
|
"message": "rp_24z4eW_message",
|
|
14516
|
-
"count": "rp_24z4eW_count",
|
|
14517
|
-
"fits": "rp_24z4eW_fits",
|
|
14518
14551
|
"table": "rp_24z4eW_table",
|
|
14519
|
-
"
|
|
14520
|
-
"
|
|
14552
|
+
"viewport": "rp_24z4eW_viewport",
|
|
14553
|
+
"count": "rp_24z4eW_count",
|
|
14554
|
+
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14555
|
+
"spinning": "rp_24z4eW_spinning",
|
|
14521
14556
|
"name": "rp_24z4eW_name",
|
|
14522
|
-
"
|
|
14523
|
-
"
|
|
14524
|
-
"scrolls": "rp_24z4eW_scrolls",
|
|
14525
|
-
"worldColumn": "rp_24z4eW_worldColumn",
|
|
14526
|
-
"secondary": "rp_24z4eW_secondary"
|
|
14557
|
+
"secondary": "rp_24z4eW_secondary",
|
|
14558
|
+
"fits": "rp_24z4eW_fits"
|
|
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",
|
|
@@ -14814,6 +14850,9 @@ window.__ModuleLoader__.load({
|
|
|
14814
14850
|
deleteQuestion: "删除存档“{name}”?",
|
|
14815
14851
|
deleteWarning: "存档中的角色、状态及所有已保存的内容将被永久删除。",
|
|
14816
14852
|
deleteConfirm: "删除",
|
|
14853
|
+
deleteScope: "删除范围",
|
|
14854
|
+
deleteHere: "只在本机删除。远端仍保留,在“同步”页恢复之前不会同步回来。",
|
|
14855
|
+
deleteEverywhere: "同时从远端删除。其他设备下次同步时也会删除它们的副本。",
|
|
14817
14856
|
deleting: "正在删除…",
|
|
14818
14857
|
deleteFailed: "无法删除存档:{message}",
|
|
14819
14858
|
cancel: "取消",
|
|
@@ -14823,6 +14862,86 @@ window.__ModuleLoader__.load({
|
|
|
14823
14862
|
}
|
|
14824
14863
|
};
|
|
14825
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
|
|
14826
14945
|
//#region src/client/pages/sessions/sessions-controller.ts
|
|
14827
14946
|
/** Reads the sessions list from the host. */
|
|
14828
14947
|
var SessionsController = class {
|
|
@@ -14857,6 +14976,12 @@ window.__ModuleLoader__.load({
|
|
|
14857
14976
|
deleting: false
|
|
14858
14977
|
};
|
|
14859
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
|
+
});
|
|
14860
14985
|
},
|
|
14861
14986
|
cancelRemoval: () => {
|
|
14862
14987
|
this.cancelRemoval();
|
|
@@ -14932,7 +15057,17 @@ window.__ModuleLoader__.load({
|
|
|
14932
15057
|
});
|
|
14933
15058
|
}
|
|
14934
15059
|
}
|
|
14935
|
-
|
|
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() {
|
|
14936
15071
|
if (this.store.getSnapshot().removal?.deleting === true) return;
|
|
14937
15072
|
this.store.update((draft) => {
|
|
14938
15073
|
delete draft.removal;
|
|
@@ -14949,7 +15084,7 @@ window.__ModuleLoader__.load({
|
|
|
14949
15084
|
}
|
|
14950
15085
|
});
|
|
14951
15086
|
try {
|
|
14952
|
-
const response = await fetch(`${API_PREFIX}/sessions/item?id=${encodeURIComponent(removal.id)}`, {
|
|
15087
|
+
const response = await fetch(`${API_PREFIX}/sessions/item?id=${encodeURIComponent(removal.id)}${removal.everywhere === true ? "&everywhere=true" : ""}`, {
|
|
14953
15088
|
method: "DELETE",
|
|
14954
15089
|
credentials: "same-origin",
|
|
14955
15090
|
signal: this.abort.signal
|
|
@@ -15008,11 +15143,11 @@ window.__ModuleLoader__.load({
|
|
|
15008
15143
|
};
|
|
15009
15144
|
//#endregion
|
|
15010
15145
|
//#region src/client/pages/sessions/index.ts
|
|
15011
|
-
const NAMESPACE$
|
|
15146
|
+
const NAMESPACE$9 = "roleplay.sessions";
|
|
15012
15147
|
/** Adds the Sessions page to the Role Play panel. */
|
|
15013
15148
|
function registerSessionsPage(ctx) {
|
|
15014
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
15015
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
15149
|
+
const t = ctx.locale.bind(NAMESPACE$9);
|
|
15150
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$9, dictionaries$8), "roleplay: sessions dictionaries");
|
|
15016
15151
|
const sessions = new SessionsController(createChatOpener(ctx));
|
|
15017
15152
|
ctx.effect(() => () => {
|
|
15018
15153
|
sessions.dispose();
|
|
@@ -15022,33 +15157,527 @@ window.__ModuleLoader__.load({
|
|
|
15022
15157
|
id: "sessions",
|
|
15023
15158
|
order: 10,
|
|
15024
15159
|
label: () => t("nav"),
|
|
15025
|
-
locale: NAMESPACE$
|
|
15160
|
+
locale: NAMESPACE$9,
|
|
15026
15161
|
inject: () => sessions.inject()
|
|
15027
15162
|
}, SessionsPage));
|
|
15028
15163
|
}
|
|
15029
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$14 = ".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$14 = "src/client/pages/sync/SyncPage.module.css";
|
|
15168
|
+
let tag$14 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$14) + "]");
|
|
15169
|
+
if (tag$14 === null) {
|
|
15170
|
+
tag$14 = document.createElement("style");
|
|
15171
|
+
tag$14.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15172
|
+
tag$14.dataset.pluginCss = key$14;
|
|
15173
|
+
document.head.appendChild(tag$14);
|
|
15174
|
+
}
|
|
15175
|
+
tag$14.textContent = css$14;
|
|
15176
|
+
var SyncPage_module_css_default = {
|
|
15177
|
+
"choices": "rp_Gk-byG_choices",
|
|
15178
|
+
"conflict": "rp_Gk-byG_conflict",
|
|
15179
|
+
"message": "rp_Gk-byG_message",
|
|
15180
|
+
"confirmation": "rp_Gk-byG_confirmation",
|
|
15181
|
+
"toolbar": "rp_Gk-byG_toolbar",
|
|
15182
|
+
"unit": "rp_Gk-byG_unit",
|
|
15183
|
+
"viewport": "rp_Gk-byG_viewport",
|
|
15184
|
+
"detail": "rp_Gk-byG_detail",
|
|
15185
|
+
"meta": "rp_Gk-byG_meta",
|
|
15186
|
+
"actions": "rp_Gk-byG_actions",
|
|
15187
|
+
"table": "rp_Gk-byG_table",
|
|
15188
|
+
"page": "rp_Gk-byG_page",
|
|
15189
|
+
"error": "rp_Gk-byG_error",
|
|
15190
|
+
"failed": "rp_Gk-byG_failed",
|
|
15191
|
+
"problem": "rp_Gk-byG_problem"
|
|
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}",
|
|
15504
|
+
refresh: "刷新",
|
|
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}”吗?这会与远端已经记录的删除保持一致。",
|
|
15546
|
+
cancel: "取消",
|
|
15547
|
+
close: "关闭"
|
|
15548
|
+
}
|
|
15549
|
+
};
|
|
15550
|
+
//#endregion
|
|
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 {
|
|
15555
|
+
store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
|
|
15556
|
+
status: "idle",
|
|
15557
|
+
working: false
|
|
15558
|
+
});
|
|
15559
|
+
abort = new AbortController();
|
|
15560
|
+
timer;
|
|
15561
|
+
face = {
|
|
15562
|
+
hooks: { sync: this.store },
|
|
15563
|
+
load: () => {
|
|
15564
|
+
if (this.store.getSnapshot().status === "idle") this.read(true);
|
|
15565
|
+
},
|
|
15566
|
+
refresh: () => {
|
|
15567
|
+
this.read(false);
|
|
15568
|
+
},
|
|
15569
|
+
run: (unit) => {
|
|
15570
|
+
this.work(() => runSync(unit === void 0 ? void 0 : [unit], this.abort.signal));
|
|
15571
|
+
},
|
|
15572
|
+
resolve: (unit, side) => {
|
|
15573
|
+
this.work(() => resolveSync(unit, side, this.abort.signal));
|
|
15574
|
+
},
|
|
15575
|
+
forget: (unit) => {
|
|
15576
|
+
this.work(() => forgetSync(unit, this.abort.signal));
|
|
15577
|
+
},
|
|
15578
|
+
restore: (unit) => {
|
|
15579
|
+
this.work(() => restoreSync(unit, this.abort.signal));
|
|
15580
|
+
}
|
|
15581
|
+
};
|
|
15582
|
+
inject() {
|
|
15583
|
+
return this.face;
|
|
15584
|
+
}
|
|
15585
|
+
dispose() {
|
|
15586
|
+
this.abort.abort();
|
|
15587
|
+
this.stopPolling();
|
|
15588
|
+
}
|
|
15589
|
+
async work(action) {
|
|
15590
|
+
if (this.store.getSnapshot().working) return;
|
|
15591
|
+
this.store.update((draft) => {
|
|
15592
|
+
draft.working = true;
|
|
15593
|
+
delete draft.error;
|
|
15594
|
+
});
|
|
15595
|
+
this.timer ??= setInterval(() => {
|
|
15596
|
+
this.read(false);
|
|
15597
|
+
}, 2e3);
|
|
15598
|
+
try {
|
|
15599
|
+
await action();
|
|
15600
|
+
} catch (error) {
|
|
15601
|
+
if (this.abort.signal.aborted) return;
|
|
15602
|
+
this.store.update((draft) => {
|
|
15603
|
+
draft.error = messageOf$1(error);
|
|
15604
|
+
});
|
|
15605
|
+
} finally {
|
|
15606
|
+
this.stopPolling();
|
|
15607
|
+
if (!this.abort.signal.aborted) {
|
|
15608
|
+
this.store.update((draft) => {
|
|
15609
|
+
draft.working = false;
|
|
15610
|
+
});
|
|
15611
|
+
await this.read(false);
|
|
15612
|
+
}
|
|
15613
|
+
}
|
|
15614
|
+
}
|
|
15615
|
+
stopPolling() {
|
|
15616
|
+
if (this.timer !== void 0) clearInterval(this.timer);
|
|
15617
|
+
this.timer = void 0;
|
|
15618
|
+
}
|
|
15619
|
+
async read(first) {
|
|
15620
|
+
if (first) this.store.update((draft) => {
|
|
15621
|
+
draft.status = "loading";
|
|
15622
|
+
});
|
|
15623
|
+
try {
|
|
15624
|
+
const sync = await loadSyncStatus(this.abort.signal);
|
|
15625
|
+
this.store.update((draft) => {
|
|
15626
|
+
draft.status = "ready";
|
|
15627
|
+
draft.sync = sync;
|
|
15628
|
+
});
|
|
15629
|
+
} catch (error) {
|
|
15630
|
+
if (this.abort.signal.aborted) return;
|
|
15631
|
+
this.store.update((draft) => {
|
|
15632
|
+
draft.error = messageOf$1(error);
|
|
15633
|
+
if (draft.sync === void 0) draft.status = "failed";
|
|
15634
|
+
});
|
|
15635
|
+
}
|
|
15636
|
+
}
|
|
15637
|
+
};
|
|
15638
|
+
//#endregion
|
|
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) {
|
|
15643
|
+
const t = ctx.locale.bind(NAMESPACE$8);
|
|
15644
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$8, dictionaries$7), "roleplay: sync dictionaries");
|
|
15645
|
+
const sync = new SyncController();
|
|
15646
|
+
ctx.effect(() => () => {
|
|
15647
|
+
sync.dispose();
|
|
15648
|
+
}, "roleplay: sync requests");
|
|
15649
|
+
ctx.slots.inject("roleplay.page", () => ctx.slots.register({
|
|
15650
|
+
name: "roleplay.page",
|
|
15651
|
+
id: "sync",
|
|
15652
|
+
order: 12,
|
|
15653
|
+
label: () => t("nav"),
|
|
15654
|
+
locale: NAMESPACE$8,
|
|
15655
|
+
inject: () => sync.inject()
|
|
15656
|
+
}, SyncPage));
|
|
15657
|
+
}
|
|
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
|
|
15031
|
-
const css$
|
|
15032
|
-
const key$
|
|
15033
|
-
let tag$
|
|
15034
|
-
if (tag$
|
|
15035
|
-
tag$
|
|
15036
|
-
tag$
|
|
15037
|
-
tag$
|
|
15038
|
-
document.head.appendChild(tag$
|
|
15660
|
+
const css$13 = ".rp_Bvxx5q_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;flex:auto;min-width:0;transition:border-color .12s;display:flex;position:relative;overflow:hidden}.rp_Bvxx5q_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_Bvxx5q_card:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_Bvxx5q_cover{background:var(--dsw-alias-bg-layer-3);flex:1 1 0;min-height:0;position:relative;overflow:hidden}.rp_Bvxx5q_image{object-fit:cover;width:100%;height:100%;display:block}.rp_Bvxx5q_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:40px;font-weight:500;display:flex}.rp_Bvxx5q_play{z-index:2;corner-shape:round;color:#fff;opacity:.6;cursor:pointer;background:#00000059;border:0;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;padding:0;transition:opacity .12s,background-color .12s;display:flex;position:absolute;top:8px;right:8px}.rp_Bvxx5q_card:hover .rp_Bvxx5q_play,.rp_Bvxx5q_play:focus-visible{opacity:1}.rp_Bvxx5q_play:hover{background:#0000008c}.rp_Bvxx5q_play:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_Bvxx5q_info{flex-direction:column;flex:none;gap:4px;padding:8px 10px;display:flex}.rp_Bvxx5q_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.rp_Bvxx5q_tags{gap:4px;display:flex;overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 20px),#0000)}.rp_Bvxx5q_tag{flex:none}.rp_Bvxx5q_openButton{z-index:1;border-radius:inherit;cursor:pointer;background:0 0;border:0;width:100%;padding:0;position:absolute;inset:0}.rp_Bvxx5q_openButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:-2px}";
|
|
15661
|
+
const key$13 = "src/client/widgets/world-card/WorldCard.module.css";
|
|
15662
|
+
let tag$13 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$13) + "]");
|
|
15663
|
+
if (tag$13 === null) {
|
|
15664
|
+
tag$13 = document.createElement("style");
|
|
15665
|
+
tag$13.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15666
|
+
tag$13.dataset.pluginCss = key$13;
|
|
15667
|
+
document.head.appendChild(tag$13);
|
|
15039
15668
|
}
|
|
15040
|
-
tag$
|
|
15669
|
+
tag$13.textContent = css$13;
|
|
15041
15670
|
var WorldCard_module_css_default = {
|
|
15042
|
-
"openButton": "rp_Bvxx5q_openButton",
|
|
15043
|
-
"image": "rp_Bvxx5q_image",
|
|
15044
|
-
"play": "rp_Bvxx5q_play",
|
|
15045
|
-
"cover": "rp_Bvxx5q_cover",
|
|
15046
15671
|
"name": "rp_Bvxx5q_name",
|
|
15047
|
-
"
|
|
15048
|
-
"
|
|
15672
|
+
"play": "rp_Bvxx5q_play",
|
|
15673
|
+
"image": "rp_Bvxx5q_image",
|
|
15049
15674
|
"card": "rp_Bvxx5q_card",
|
|
15675
|
+
"openButton": "rp_Bvxx5q_openButton",
|
|
15676
|
+
"info": "rp_Bvxx5q_info",
|
|
15677
|
+
"cover": "rp_Bvxx5q_cover",
|
|
15678
|
+
"tags": "rp_Bvxx5q_tags",
|
|
15050
15679
|
"placeholder": "rp_Bvxx5q_placeholder",
|
|
15051
|
-
"
|
|
15680
|
+
"tag": "rp_Bvxx5q_tag"
|
|
15052
15681
|
};
|
|
15053
15682
|
//#endregion
|
|
15054
15683
|
//#region src/client/widgets/world-card/WorldCard.tsx
|
|
@@ -15131,20 +15760,20 @@ window.__ModuleLoader__.load({
|
|
|
15131
15760
|
}
|
|
15132
15761
|
//#endregion
|
|
15133
15762
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/avatar-choices/AvatarChoices.module.css.mjs
|
|
15134
|
-
const css$
|
|
15135
|
-
const key$
|
|
15136
|
-
let tag$
|
|
15137
|
-
if (tag$
|
|
15138
|
-
tag$
|
|
15139
|
-
tag$
|
|
15140
|
-
tag$
|
|
15141
|
-
document.head.appendChild(tag$
|
|
15763
|
+
const css$12 = ".rp_YCstOG_option{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}.rp_YCstOG_option:has(input:checked){border-color:var(--dsw-alias-state-business-primary)}.rp_YCstOG_option input{accent-color:var(--dsw-alias-state-business-primary);margin:3px 0 0}.rp_YCstOG_text{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_YCstOG_name{font-size:13px;font-weight:500}.rp_YCstOG_summary{color:var(--dsw-alias-label-secondary);font-size:12px}";
|
|
15764
|
+
const key$12 = "src/client/widgets/avatar-choices/AvatarChoices.module.css";
|
|
15765
|
+
let tag$12 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$12) + "]");
|
|
15766
|
+
if (tag$12 === null) {
|
|
15767
|
+
tag$12 = document.createElement("style");
|
|
15768
|
+
tag$12.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15769
|
+
tag$12.dataset.pluginCss = key$12;
|
|
15770
|
+
document.head.appendChild(tag$12);
|
|
15142
15771
|
}
|
|
15143
|
-
tag$
|
|
15772
|
+
tag$12.textContent = css$12;
|
|
15144
15773
|
var AvatarChoices_module_css_default = {
|
|
15145
|
-
"name": "rp_YCstOG_name",
|
|
15146
15774
|
"option": "rp_YCstOG_option",
|
|
15147
15775
|
"text": "rp_YCstOG_text",
|
|
15776
|
+
"name": "rp_YCstOG_name",
|
|
15148
15777
|
"summary": "rp_YCstOG_summary"
|
|
15149
15778
|
};
|
|
15150
15779
|
//#endregion
|
|
@@ -15174,29 +15803,29 @@ window.__ModuleLoader__.load({
|
|
|
15174
15803
|
}
|
|
15175
15804
|
//#endregion
|
|
15176
15805
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/StartSessionDialog.module.css.mjs
|
|
15177
|
-
const css$
|
|
15178
|
-
const key$
|
|
15179
|
-
let tag$
|
|
15180
|
-
if (tag$
|
|
15181
|
-
tag$
|
|
15182
|
-
tag$
|
|
15183
|
-
tag$
|
|
15184
|
-
document.head.appendChild(tag$
|
|
15806
|
+
const css$11 = ".rp_AnbLKG_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_AnbLKG_field{border:0;flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;display:flex}.rp_AnbLKG_label{color:var(--dsw-alias-label-secondary);padding:0;font-size:12px}.rp_AnbLKG_option{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}.rp_AnbLKG_option:has(input:checked){border-color:var(--dsw-alias-state-business-primary)}.rp_AnbLKG_option input{accent-color:var(--dsw-alias-state-business-primary);margin:3px 0 0}.rp_AnbLKG_optionText{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_AnbLKG_optionName{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.rp_AnbLKG_optionSummary{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.rp_AnbLKG_message{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_AnbLKG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_AnbLKG_advanced{flex-direction:column;gap:8px;display:flex}.rp_AnbLKG_advancedToggle{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;align-self:flex-start;align-items:center;gap:6px;padding:0;font-size:12px;display:inline-flex}.rp_AnbLKG_advancedToggle:hover{color:var(--dsw-alias-label-primary)}.rp_AnbLKG_advancedBody{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);flex-direction:column;gap:12px;max-height:320px;padding:12px;display:flex;overflow-y:auto}@media (width<=520px){.rp_AnbLKG_form{min-width:0}}";
|
|
15807
|
+
const key$11 = "src/client/pages/worlds/StartSessionDialog.module.css";
|
|
15808
|
+
let tag$11 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$11) + "]");
|
|
15809
|
+
if (tag$11 === null) {
|
|
15810
|
+
tag$11 = document.createElement("style");
|
|
15811
|
+
tag$11.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15812
|
+
tag$11.dataset.pluginCss = key$11;
|
|
15813
|
+
document.head.appendChild(tag$11);
|
|
15185
15814
|
}
|
|
15186
|
-
tag$
|
|
15815
|
+
tag$11.textContent = css$11;
|
|
15187
15816
|
var StartSessionDialog_module_css_default = {
|
|
15817
|
+
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15188
15818
|
"option": "rp_AnbLKG_option",
|
|
15189
|
-
"
|
|
15819
|
+
"label": "rp_AnbLKG_label",
|
|
15190
15820
|
"error": "rp_AnbLKG_error",
|
|
15191
|
-
"form": "rp_AnbLKG_form",
|
|
15192
15821
|
"advanced": "rp_AnbLKG_advanced",
|
|
15193
|
-
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15194
|
-
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
15195
|
-
"optionText": "rp_AnbLKG_optionText",
|
|
15196
15822
|
"optionName": "rp_AnbLKG_optionName",
|
|
15197
|
-
"message": "rp_AnbLKG_message",
|
|
15198
15823
|
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
15199
|
-
"
|
|
15824
|
+
"optionText": "rp_AnbLKG_optionText",
|
|
15825
|
+
"field": "rp_AnbLKG_field",
|
|
15826
|
+
"form": "rp_AnbLKG_form",
|
|
15827
|
+
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
15828
|
+
"message": "rp_AnbLKG_message"
|
|
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(),
|
|
@@ -15910,6 +16539,12 @@ window.__ModuleLoader__.load({
|
|
|
15910
16539
|
label: "triggersBeatTurns",
|
|
15911
16540
|
help: "triggersBeatTurnsHelp"
|
|
15912
16541
|
},
|
|
16542
|
+
{
|
|
16543
|
+
path: ["triggers", "cueTurns"],
|
|
16544
|
+
kind: "integer",
|
|
16545
|
+
label: "triggersCueTurns",
|
|
16546
|
+
help: "triggersCueTurnsHelp"
|
|
16547
|
+
},
|
|
15913
16548
|
{
|
|
15914
16549
|
path: ["rewind", "keepSnapshots"],
|
|
15915
16550
|
kind: "integer",
|
|
@@ -16081,6 +16716,43 @@ window.__ModuleLoader__.load({
|
|
|
16081
16716
|
label: "samplingRecords",
|
|
16082
16717
|
help: "samplingRecordsHelp"
|
|
16083
16718
|
},
|
|
16719
|
+
{
|
|
16720
|
+
path: ["sampling", "tools"],
|
|
16721
|
+
kind: "choice",
|
|
16722
|
+
label: "samplingTools",
|
|
16723
|
+
help: "samplingToolsHelp",
|
|
16724
|
+
choices: [{
|
|
16725
|
+
value: "required",
|
|
16726
|
+
label: "toolsRequired"
|
|
16727
|
+
}, {
|
|
16728
|
+
value: "auto",
|
|
16729
|
+
label: "toolsAuto"
|
|
16730
|
+
}]
|
|
16731
|
+
},
|
|
16732
|
+
{
|
|
16733
|
+
path: ["sampling", "masterMaxTokens"],
|
|
16734
|
+
kind: "integer",
|
|
16735
|
+
label: "samplingMasterMaxTokens",
|
|
16736
|
+
help: "samplingMasterMaxTokensHelp"
|
|
16737
|
+
},
|
|
16738
|
+
{
|
|
16739
|
+
path: ["sampling", "maxTokens"],
|
|
16740
|
+
kind: "integer",
|
|
16741
|
+
label: "samplingMaxTokens",
|
|
16742
|
+
help: "samplingMaxTokensHelp"
|
|
16743
|
+
},
|
|
16744
|
+
{
|
|
16745
|
+
path: ["sampling", "shortMaxTokens"],
|
|
16746
|
+
kind: "integer",
|
|
16747
|
+
label: "samplingShortMaxTokens",
|
|
16748
|
+
help: "samplingShortMaxTokensHelp"
|
|
16749
|
+
},
|
|
16750
|
+
{
|
|
16751
|
+
path: ["sampling", "headroom"],
|
|
16752
|
+
kind: "decimal",
|
|
16753
|
+
label: "samplingHeadroom",
|
|
16754
|
+
help: "samplingHeadroomHelp"
|
|
16755
|
+
},
|
|
16084
16756
|
{
|
|
16085
16757
|
path: ["background", "concurrent"],
|
|
16086
16758
|
kind: "flag",
|
|
@@ -16135,6 +16807,18 @@ window.__ModuleLoader__.load({
|
|
|
16135
16807
|
label: "retainRatio",
|
|
16136
16808
|
help: "retainRatioHelp"
|
|
16137
16809
|
},
|
|
16810
|
+
{
|
|
16811
|
+
path: ["context", "shortTermTokens"],
|
|
16812
|
+
kind: "integer",
|
|
16813
|
+
label: "shortTermTokens",
|
|
16814
|
+
help: "shortTermTokensHelp"
|
|
16815
|
+
},
|
|
16816
|
+
{
|
|
16817
|
+
path: ["context", "longTermTokens"],
|
|
16818
|
+
kind: "integer",
|
|
16819
|
+
label: "longTermTokens",
|
|
16820
|
+
help: "longTermTokensHelp"
|
|
16821
|
+
},
|
|
16138
16822
|
{
|
|
16139
16823
|
path: ["interface", "pack"],
|
|
16140
16824
|
kind: "text",
|
|
@@ -16243,7 +16927,7 @@ window.__ModuleLoader__.load({
|
|
|
16243
16927
|
return next;
|
|
16244
16928
|
}
|
|
16245
16929
|
//#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.
|
|
16930
|
+
//#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
16931
|
/**
|
|
16248
16932
|
* The browser API of the main plugin, which the UI of the main plugin and of every vendor plugin
|
|
16249
16933
|
* uses. Paths are relative to the prefix, and the browser calls them with relative URLs so that a
|
|
@@ -16294,25 +16978,25 @@ window.__ModuleLoader__.load({
|
|
|
16294
16978
|
}
|
|
16295
16979
|
//#endregion
|
|
16296
16980
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings-form/SettingsFields.module.css.mjs
|
|
16297
|
-
const css$
|
|
16298
|
-
const key$
|
|
16299
|
-
let tag$
|
|
16300
|
-
if (tag$
|
|
16301
|
-
tag$
|
|
16302
|
-
tag$
|
|
16303
|
-
tag$
|
|
16304
|
-
document.head.appendChild(tag$
|
|
16981
|
+
const css$10 = ".rp_Rhi3yq_row{flex-direction:column;gap:6px;display:flex}.rp_Rhi3yq_field{flex-direction:column;gap:6px;width:min(100%,320px);display:flex}.rp_Rhi3yq_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Rhi3yq_help{max-width:560px;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_Rhi3yq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Rhi3yq_group{border-top:.5px solid var(--dsw-alias-border-l3);flex-direction:column;gap:12px;padding-top:12px;display:flex}.rp_Rhi3yq_groupTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_Rhi3yq_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%;max-width:560px;min-height:96px;color:inherit;font:inherit;resize:vertical;padding:6px 8px;font-size:13px}.rp_Rhi3yq_area:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}";
|
|
16982
|
+
const key$10 = "src/client/settings-form/SettingsFields.module.css";
|
|
16983
|
+
let tag$10 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$10) + "]");
|
|
16984
|
+
if (tag$10 === null) {
|
|
16985
|
+
tag$10 = document.createElement("style");
|
|
16986
|
+
tag$10.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
16987
|
+
tag$10.dataset.pluginCss = key$10;
|
|
16988
|
+
document.head.appendChild(tag$10);
|
|
16305
16989
|
}
|
|
16306
|
-
tag$
|
|
16990
|
+
tag$10.textContent = css$10;
|
|
16307
16991
|
var SettingsFields_module_css_default = {
|
|
16308
|
-
"
|
|
16309
|
-
"
|
|
16310
|
-
"groupTitle": "rp_Rhi3yq_groupTitle",
|
|
16992
|
+
"label": "rp_Rhi3yq_label",
|
|
16993
|
+
"area": "rp_Rhi3yq_area",
|
|
16311
16994
|
"field": "rp_Rhi3yq_field",
|
|
16995
|
+
"help": "rp_Rhi3yq_help",
|
|
16312
16996
|
"error": "rp_Rhi3yq_error",
|
|
16997
|
+
"row": "rp_Rhi3yq_row",
|
|
16313
16998
|
"group": "rp_Rhi3yq_group",
|
|
16314
|
-
"
|
|
16315
|
-
"area": "rp_Rhi3yq_area"
|
|
16999
|
+
"groupTitle": "rp_Rhi3yq_groupTitle"
|
|
16316
17000
|
};
|
|
16317
17001
|
//#endregion
|
|
16318
17002
|
//#region src/client/settings-form/SettingsFields.tsx
|
|
@@ -16551,24 +17235,24 @@ window.__ModuleLoader__.load({
|
|
|
16551
17235
|
})
|
|
16552
17236
|
}));
|
|
16553
17237
|
}
|
|
16554
|
-
/** The language of the interface or of a setting, as one of the two the plugin writes in. */
|
|
16555
|
-
const storyLanguageOf = (code) => code.trim().toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
16556
|
-
//#endregion
|
|
16557
|
-
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/TranslateBanner.module.css.mjs
|
|
16558
|
-
const css$
|
|
16559
|
-
const key$
|
|
16560
|
-
let tag$
|
|
16561
|
-
if (tag$
|
|
16562
|
-
tag$
|
|
16563
|
-
tag$
|
|
16564
|
-
tag$
|
|
16565
|
-
document.head.appendChild(tag$
|
|
16566
|
-
}
|
|
16567
|
-
tag$
|
|
17238
|
+
/** The language of the interface or of a setting, as one of the two the plugin writes in. */
|
|
17239
|
+
const storyLanguageOf = (code) => code.trim().toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
17240
|
+
//#endregion
|
|
17241
|
+
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/TranslateBanner.module.css.mjs
|
|
17242
|
+
const css$9 = ".rp_Lx8vJa_banner{border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-secondary);align-items:center;gap:12px;margin:0 0 8px;padding:8px 12px;font-size:12px;line-height:18px;display:flex}.rp_Lx8vJa_text{flex:auto}.rp_Lx8vJa_error{color:var(--dsw-alias-state-error-primary);margin:0 0 8px;font-size:12px}";
|
|
17243
|
+
const key$9 = "src/client/pages/worlds/TranslateBanner.module.css";
|
|
17244
|
+
let tag$9 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$9) + "]");
|
|
17245
|
+
if (tag$9 === null) {
|
|
17246
|
+
tag$9 = document.createElement("style");
|
|
17247
|
+
tag$9.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
17248
|
+
tag$9.dataset.pluginCss = key$9;
|
|
17249
|
+
document.head.appendChild(tag$9);
|
|
17250
|
+
}
|
|
17251
|
+
tag$9.textContent = css$9;
|
|
16568
17252
|
var TranslateBanner_module_css_default = {
|
|
16569
|
-
"error": "rp_Lx8vJa_error",
|
|
16570
17253
|
"banner": "rp_Lx8vJa_banner",
|
|
16571
|
-
"text": "rp_Lx8vJa_text"
|
|
17254
|
+
"text": "rp_Lx8vJa_text",
|
|
17255
|
+
"error": "rp_Lx8vJa_error"
|
|
16572
17256
|
};
|
|
16573
17257
|
//#endregion
|
|
16574
17258
|
//#region src/client/pages/worlds/TranslateBanner.tsx
|
|
@@ -17148,36 +17832,36 @@ window.__ModuleLoader__.load({
|
|
|
17148
17832
|
}
|
|
17149
17833
|
//#endregion
|
|
17150
17834
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/WorldsPage.module.css.mjs
|
|
17151
|
-
const css$
|
|
17152
|
-
const key$
|
|
17153
|
-
let tag$
|
|
17154
|
-
if (tag$
|
|
17155
|
-
tag$
|
|
17156
|
-
tag$
|
|
17157
|
-
tag$
|
|
17158
|
-
document.head.appendChild(tag$
|
|
17835
|
+
const css$8 = ".rp_FHUyRq_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_FHUyRq_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_FHUyRq_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_FHUyRq_toolbarActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.rp_FHUyRq_spinning{animation:.9s linear infinite rp_FHUyRq_spin}@keyframes rp_FHUyRq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_FHUyRq_spinning{animation:none}}.rp_FHUyRq_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_FHUyRq_viewport{--rp-card-width:168px;--rp-card-height:288px;--rp-card-gap:16px;flex:1 1 0;min-height:0;padding:4px}.rp_FHUyRq_scrolls{overflow-y:auto}.rp_FHUyRq_fits{overflow:hidden}.rp_FHUyRq_grid{grid-auto-rows:var(--rp-card-height);grid-template-columns:repeat(auto-fill, var(--rp-card-width));gap:var(--rp-card-gap);margin:0;padding:0;list-style:none;display:grid}.rp_FHUyRq_cell{min-width:0;display:flex}.rp_FHUyRq_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_FHUyRq_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_FHUyRq_editTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_FHUyRq_authorButton{margin-left:auto}.rp_FHUyRq_editBody{flex:1 1 0;min-height:0;display:flex}.rp_FHUyRq_starters{flex-direction:column;align-items:center;gap:8px;padding-bottom:24px;display:flex}.rp_FHUyRq_starter{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);text-align:center;max-width:480px;color:var(--dsw-alias-label-secondary);flex-direction:column;align-items:center;gap:6px;padding:12px 16px;font-size:13px;display:flex}@media (width<=640px){.rp_FHUyRq_toolbar{align-items:flex-start}.rp_FHUyRq_count{padding-top:6px}.rp_FHUyRq_toolbarActions{max-width:75%}.rp_FHUyRq_editTitle{text-overflow:ellipsis;white-space:nowrap;flex:calc(100% - 96px);overflow:hidden}.rp_FHUyRq_authorButton{margin-left:0}}";
|
|
17836
|
+
const key$8 = "src/client/pages/worlds/WorldsPage.module.css";
|
|
17837
|
+
let tag$8 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$8) + "]");
|
|
17838
|
+
if (tag$8 === null) {
|
|
17839
|
+
tag$8 = document.createElement("style");
|
|
17840
|
+
tag$8.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
17841
|
+
tag$8.dataset.pluginCss = key$8;
|
|
17842
|
+
document.head.appendChild(tag$8);
|
|
17159
17843
|
}
|
|
17160
|
-
tag$
|
|
17844
|
+
tag$8.textContent = css$8;
|
|
17161
17845
|
var WorldsPage_module_css_default = {
|
|
17162
|
-
"scrolls": "rp_FHUyRq_scrolls",
|
|
17163
|
-
"fits": "rp_FHUyRq_fits",
|
|
17164
|
-
"toolbar": "rp_FHUyRq_toolbar",
|
|
17165
|
-
"starter": "rp_FHUyRq_starter",
|
|
17166
|
-
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
17167
|
-
"count": "rp_FHUyRq_count",
|
|
17168
17846
|
"editBody": "rp_FHUyRq_editBody",
|
|
17169
|
-
"message": "rp_FHUyRq_message",
|
|
17170
|
-
"editTitle": "rp_FHUyRq_editTitle",
|
|
17171
|
-
"notice": "rp_FHUyRq_notice",
|
|
17172
|
-
"editHeader": "rp_FHUyRq_editHeader",
|
|
17173
17847
|
"spin": "rp_FHUyRq_spin",
|
|
17174
17848
|
"cell": "rp_FHUyRq_cell",
|
|
17849
|
+
"toolbar": "rp_FHUyRq_toolbar",
|
|
17850
|
+
"scrolls": "rp_FHUyRq_scrolls",
|
|
17851
|
+
"editTitle": "rp_FHUyRq_editTitle",
|
|
17852
|
+
"starter": "rp_FHUyRq_starter",
|
|
17853
|
+
"count": "rp_FHUyRq_count",
|
|
17175
17854
|
"page": "rp_FHUyRq_page",
|
|
17855
|
+
"grid": "rp_FHUyRq_grid",
|
|
17856
|
+
"fits": "rp_FHUyRq_fits",
|
|
17176
17857
|
"viewport": "rp_FHUyRq_viewport",
|
|
17177
17858
|
"authorButton": "rp_FHUyRq_authorButton",
|
|
17859
|
+
"notice": "rp_FHUyRq_notice",
|
|
17860
|
+
"editHeader": "rp_FHUyRq_editHeader",
|
|
17861
|
+
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
17178
17862
|
"spinning": "rp_FHUyRq_spinning",
|
|
17179
|
-
"
|
|
17180
|
-
"
|
|
17863
|
+
"starters": "rp_FHUyRq_starters",
|
|
17864
|
+
"message": "rp_FHUyRq_message"
|
|
17181
17865
|
};
|
|
17182
17866
|
//#endregion
|
|
17183
17867
|
//#region src/client/pages/worlds/StarterWorlds.tsx
|
|
@@ -17765,6 +18449,24 @@ window.__ModuleLoader__.load({
|
|
|
17765
18449
|
retainRatio: "Kept after folding (%)",
|
|
17766
18450
|
retainRatioHelp: "The share of the limit that stays word for word when the oldest turns are folded.",
|
|
17767
18451
|
invalid: "Enter a number from {min} to {max}.",
|
|
18452
|
+
triggersCueTurns: "Turns a cue stays pending",
|
|
18453
|
+
triggersCueTurnsHelp: "A cue is something a character is told to act on. If the character does not get to it within this many turns, it is let go.",
|
|
18454
|
+
samplingTools: "Helpers answer with a tool call",
|
|
18455
|
+
samplingToolsHelp: "Required makes a helper end with its result tool instead of writing prose (the usual cause of a helper that rambles). Auto lets the model choose; use it only if your provider rejects required tool calls.",
|
|
18456
|
+
samplingMasterMaxTokens: "Game master output cap (tokens)",
|
|
18457
|
+
samplingMasterMaxTokensHelp: "The most one game master request may produce. A reply cut off here is steered back; a model that thinks without end stops at this limit instead of running for minutes.",
|
|
18458
|
+
samplingMaxTokens: "Helper output cap (tokens)",
|
|
18459
|
+
samplingMaxTokensHelp: "The most one request of a helper (records, author, chronicler) may produce, however large its estimate. A helper that rambles is cut off at this size.",
|
|
18460
|
+
samplingShortMaxTokens: "Short helper output cap (tokens)",
|
|
18461
|
+
samplingShortMaxTokensHelp: "The same for helpers whose answer is short (characters, suggestion writer): they are cut off much sooner.",
|
|
18462
|
+
samplingHeadroom: "Output room (times the estimate)",
|
|
18463
|
+
samplingHeadroomHelp: "How many times the estimated size of an answer a helper may produce before it is cut off (1 to 10). Raise it for a model that says a little before it answers.",
|
|
18464
|
+
shortTermTokens: "Short-term summary size (tokens)",
|
|
18465
|
+
shortTermTokensHelp: "The size of the short-term summary before its oldest part moves into the long-term one.",
|
|
18466
|
+
longTermTokens: "Long-term summary size (tokens)",
|
|
18467
|
+
longTermTokensHelp: "The size of the long-term summary before its oldest part is condensed further.",
|
|
18468
|
+
toolsRequired: "Required",
|
|
18469
|
+
toolsAuto: "Auto",
|
|
17768
18470
|
localeId: "en",
|
|
17769
18471
|
presetFast: "Fast preset",
|
|
17770
18472
|
presetApply: "Apply",
|
|
@@ -17956,6 +18658,24 @@ window.__ModuleLoader__.load({
|
|
|
17956
18658
|
retainRatio: "折叠后保留比例(%)",
|
|
17957
18659
|
retainRatioHelp: "折叠最早几轮时,占上限比例的这部分对话会原文保留。",
|
|
17958
18660
|
invalid: "请输入 {min} 到 {max} 之间的数字。",
|
|
18661
|
+
triggersCueTurns: "提示保留的回合数",
|
|
18662
|
+
triggersCueTurnsHelp: "提示是要求角色去回应的事。若角色在这么多回合内都没有回应,就会被放弃。",
|
|
18663
|
+
samplingTools: "辅助者以工具调用作答",
|
|
18664
|
+
samplingToolsHelp: "「必须」让辅助者以结果工具收尾,而不是写一大段文字(辅助者跑题的常见原因)。「自动」由模型自行选择;仅当服务商拒绝必须调用工具时使用。",
|
|
18665
|
+
samplingMasterMaxTokens: "主持人输出上限(token)",
|
|
18666
|
+
samplingMasterMaxTokensHelp: "主持人一次请求最多生成的长度。在此被截断的回复会被引导重来;无休止思考的模型会停在这个上限,而不是运行数分钟。",
|
|
18667
|
+
samplingMaxTokens: "辅助者输出上限(token)",
|
|
18668
|
+
samplingMaxTokensHelp: "辅助者(记录、作者、编年史)一次请求最多生成的长度,不论其估算多大。跑题的辅助者会在此长度被截断。",
|
|
18669
|
+
samplingShortMaxTokens: "短答辅助者输出上限(token)",
|
|
18670
|
+
samplingShortMaxTokensHelp: "针对答案较短的辅助者(角色、建议撰写者):它们会更早被截断。",
|
|
18671
|
+
samplingHeadroom: "输出余量(估算的倍数)",
|
|
18672
|
+
samplingHeadroomHelp: "辅助者的输出可达其估算长度的多少倍才被截断(1 到 10)。对回答前会先说几句的模型可调高。",
|
|
18673
|
+
shortTermTokens: "短期摘要长度(token)",
|
|
18674
|
+
shortTermTokensHelp: "短期摘要在其最早部分并入长期摘要之前的长度。",
|
|
18675
|
+
longTermTokens: "长期摘要长度(token)",
|
|
18676
|
+
longTermTokensHelp: "长期摘要在被进一步压缩之前的长度。",
|
|
18677
|
+
toolsRequired: "必须",
|
|
18678
|
+
toolsAuto: "自动",
|
|
17959
18679
|
localeId: "zh",
|
|
17960
18680
|
presetFast: "快速预设",
|
|
17961
18681
|
presetApply: "应用",
|
|
@@ -18153,7 +18873,7 @@ window.__ModuleLoader__.load({
|
|
|
18153
18873
|
startAvatars: "带上角色形象",
|
|
18154
18874
|
startAvatarsHelp: "勾选要带进这个存档的角色形象,它们会成为存档中的角色,你也可以扮演它们。世界本身不会改变。"
|
|
18155
18875
|
}
|
|
18156
|
-
}, dictionaries$6), dictionaries$
|
|
18876
|
+
}, dictionaries$6), dictionaries$12), dictionaries$20), dictionaries$21);
|
|
18157
18877
|
//#endregion
|
|
18158
18878
|
//#region src/client/pages/worlds/worlds-controller.ts
|
|
18159
18879
|
async function request$1(path, init, signal) {
|
|
@@ -18516,21 +19236,21 @@ window.__ModuleLoader__.load({
|
|
|
18516
19236
|
};
|
|
18517
19237
|
//#endregion
|
|
18518
19238
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/branch/BranchDialog.module.css.mjs
|
|
18519
|
-
const css$
|
|
18520
|
-
const key$
|
|
18521
|
-
let tag$
|
|
18522
|
-
if (tag$
|
|
18523
|
-
tag$
|
|
18524
|
-
tag$
|
|
18525
|
-
tag$
|
|
18526
|
-
document.head.appendChild(tag$
|
|
19239
|
+
const css$7 = ".rp_Dy1TaW_form{flex-direction:column;gap:12px;min-width:min(420px,100%);display:flex}.rp_Dy1TaW_field{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_Dy1TaW_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Dy1TaW_error{color:var(--dsw-alias-state-danger-primary);margin:0;font-size:12px}";
|
|
19240
|
+
const key$7 = "src/client/branch/BranchDialog.module.css";
|
|
19241
|
+
let tag$7 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$7) + "]");
|
|
19242
|
+
if (tag$7 === null) {
|
|
19243
|
+
tag$7 = document.createElement("style");
|
|
19244
|
+
tag$7.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
19245
|
+
tag$7.dataset.pluginCss = key$7;
|
|
19246
|
+
document.head.appendChild(tag$7);
|
|
18527
19247
|
}
|
|
18528
|
-
tag$
|
|
19248
|
+
tag$7.textContent = css$7;
|
|
18529
19249
|
var BranchDialog_module_css_default = {
|
|
18530
|
-
"label": "rp_Dy1TaW_label",
|
|
18531
19250
|
"form": "rp_Dy1TaW_form",
|
|
18532
19251
|
"field": "rp_Dy1TaW_field",
|
|
18533
|
-
"error": "rp_Dy1TaW_error"
|
|
19252
|
+
"error": "rp_Dy1TaW_error",
|
|
19253
|
+
"label": "rp_Dy1TaW_label"
|
|
18534
19254
|
};
|
|
18535
19255
|
//#endregion
|
|
18536
19256
|
//#region src/client/branch/BranchDialog.tsx
|
|
@@ -18673,7 +19393,7 @@ window.__ModuleLoader__.load({
|
|
|
18673
19393
|
/** Adds the Gallery tab beside Chat and World: every image of the session in a grid. */
|
|
18674
19394
|
function registerGallery(ctx) {
|
|
18675
19395
|
const t = ctx.locale.bind(NAMESPACE$5);
|
|
18676
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$
|
|
19396
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$16), "roleplay: gallery dictionaries");
|
|
18677
19397
|
ctx.inject(["uiConversation"], (scope) => {
|
|
18678
19398
|
scope.uiConversation.views.register(galleryTarget);
|
|
18679
19399
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -18988,28 +19708,28 @@ window.__ModuleLoader__.load({
|
|
|
18988
19708
|
}
|
|
18989
19709
|
//#endregion
|
|
18990
19710
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/interface/SidebarPage.module.css.mjs
|
|
18991
|
-
const css$
|
|
18992
|
-
const key$
|
|
18993
|
-
let tag$
|
|
18994
|
-
if (tag$
|
|
18995
|
-
tag$
|
|
18996
|
-
tag$
|
|
18997
|
-
tag$
|
|
18998
|
-
document.head.appendChild(tag$
|
|
19711
|
+
const css$6 = ".rp_Ptco8a_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_Ptco8a_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_Ptco8a_name{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.rp_Ptco8a_content{flex:1 1 0;min-height:0;position:relative}.rp_Ptco8a_message{color:var(--dsw-alias-label-secondary);margin:0;padding:16px;font-size:13px;line-height:20px}.rp_Ptco8a_entry{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius,var(--dsw-radius-sm));background:var(--dsw-alias-bg-layer-1);align-items:center;gap:14px;width:100%;min-height:56px;padding:14px 20px;display:flex;position:relative;overflow:hidden}.rp_Ptco8a_main{border-radius:0;width:100%;height:100%;position:absolute;inset:0}.rp_Ptco8a_icon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);pointer-events:none;flex:none;justify-content:center;align-items:center;display:flex;position:relative}.rp_Ptco8a_text{pointer-events:none;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex;position:relative}.rp_Ptco8a_title{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4;overflow:hidden}.rp_Ptco8a_description{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.4;overflow:hidden}";
|
|
19712
|
+
const key$6 = "src/client/interface/SidebarPage.module.css";
|
|
19713
|
+
let tag$6 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$6) + "]");
|
|
19714
|
+
if (tag$6 === null) {
|
|
19715
|
+
tag$6 = document.createElement("style");
|
|
19716
|
+
tag$6.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
19717
|
+
tag$6.dataset.pluginCss = key$6;
|
|
19718
|
+
document.head.appendChild(tag$6);
|
|
18999
19719
|
}
|
|
19000
|
-
tag$
|
|
19720
|
+
tag$6.textContent = css$6;
|
|
19001
19721
|
var SidebarPage_module_css_default = {
|
|
19722
|
+
"entry": "rp_Ptco8a_entry",
|
|
19723
|
+
"message": "rp_Ptco8a_message",
|
|
19724
|
+
"icon": "rp_Ptco8a_icon",
|
|
19002
19725
|
"text": "rp_Ptco8a_text",
|
|
19003
|
-
"
|
|
19004
|
-
"name": "rp_Ptco8a_name",
|
|
19726
|
+
"title": "rp_Ptco8a_title",
|
|
19005
19727
|
"description": "rp_Ptco8a_description",
|
|
19006
|
-
"
|
|
19007
|
-
"icon": "rp_Ptco8a_icon",
|
|
19008
|
-
"message": "rp_Ptco8a_message",
|
|
19009
|
-
"entry": "rp_Ptco8a_entry",
|
|
19728
|
+
"name": "rp_Ptco8a_name",
|
|
19010
19729
|
"bar": "rp_Ptco8a_bar",
|
|
19011
|
-
"
|
|
19012
|
-
"page": "rp_Ptco8a_page"
|
|
19730
|
+
"content": "rp_Ptco8a_content",
|
|
19731
|
+
"page": "rp_Ptco8a_page",
|
|
19732
|
+
"main": "rp_Ptco8a_main"
|
|
19013
19733
|
};
|
|
19014
19734
|
//#endregion
|
|
19015
19735
|
//#region src/client/interface/SidebarPage.tsx
|
|
@@ -19312,7 +20032,7 @@ window.__ModuleLoader__.load({
|
|
|
19312
20032
|
/** Adds the World tab beside Chat: the state of the story, by the part of the world. */
|
|
19313
20033
|
function registerWorld(ctx) {
|
|
19314
20034
|
const t = ctx.locale.bind(NAMESPACE$3);
|
|
19315
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$
|
|
20035
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$12), "roleplay: world dictionaries");
|
|
19316
20036
|
ctx.inject(["uiConversation"], (scope) => {
|
|
19317
20037
|
scope.uiConversation.views.register(worldTarget);
|
|
19318
20038
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -19326,39 +20046,39 @@ window.__ModuleLoader__.load({
|
|
|
19326
20046
|
}
|
|
19327
20047
|
//#endregion
|
|
19328
20048
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/chat-settings/ChatSettingsView.module.css.mjs
|
|
19329
|
-
const css$
|
|
19330
|
-
const key$
|
|
19331
|
-
let tag$
|
|
19332
|
-
if (tag$
|
|
19333
|
-
tag$
|
|
19334
|
-
tag$
|
|
19335
|
-
tag$
|
|
19336
|
-
document.head.appendChild(tag$
|
|
20049
|
+
const css$5 = ".rp_wLpbxW_view{box-sizing:border-box;flex-direction:column;gap:16px;width:100%;max-width:720px;margin:0 auto;padding:24px 24px 240px;display:flex}.rp_wLpbxW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_wLpbxW_description{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_wLpbxW_field{flex-direction:column;gap:6px;width:min(100%,320px);display:flex}.rp_wLpbxW_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_wLpbxW_help{max-width:560px;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_wLpbxW_actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.rp_wLpbxW_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:40px 0;font-size:13px}.rp_wLpbxW_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_wLpbxW_saved{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_wLpbxW_row{flex-direction:column;gap:6px;display:flex}.rp_wLpbxW_notice{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);margin:0;padding:8px 12px;font-size:12px}.rp_wLpbxW_activity{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:6px;font-size:13px;display:flex}.rp_wLpbxW_activity summary{cursor:pointer;color:var(--dsw-alias-label-primary);font-weight:500}.rp_wLpbxW_activityBody{flex-direction:column;gap:8px;padding-top:8px;display:flex}.rp_wLpbxW_link{font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;border:0;align-self:flex-start;padding:0;font-size:12px}.rp_wLpbxW_table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;min-width:920px;font-size:12px}.rp_wLpbxW_tableViewport{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);max-width:100%;overflow-x:auto}.rp_wLpbxW_tableViewport:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.rp_wLpbxW_table th,.rp_wLpbxW_table td{border-bottom:.5px solid var(--dsw-alias-border-l4);text-align:left;vertical-align:top;overflow-wrap:anywhere;padding:6px 10px}.rp_wLpbxW_table th{color:var(--dsw-alias-label-tertiary);font-weight:400}.rp_wLpbxW_table tbody th{color:var(--dsw-alias-label-primary);font-weight:500}.rp_wLpbxW_table tbody tr:last-child>*{border-bottom:0}.rp_wLpbxW_table th:first-child,.rp_wLpbxW_table td:first-child,.rp_wLpbxW_table th:nth-child(3),.rp_wLpbxW_table td:nth-child(3),.rp_wLpbxW_table th:nth-child(4),.rp_wLpbxW_table td:nth-child(4),.rp_wLpbxW_table th:nth-child(5),.rp_wLpbxW_table td:nth-child(5){white-space:nowrap}.rp_wLpbxW_run{flex-direction:column;gap:4px;padding:4px 0 8px;display:flex}.rp_wLpbxW_pre{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:4px 0;padding:6px 8px;font-size:12px;overflow:auto}.rp_wLpbxW_reasons{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:4px 0;padding-left:20px;font-size:12px}.rp_wLpbxW_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%;max-width:320px;height:32px;color:var(--dsw-alias-label-primary);font:inherit;padding:0 8px;font-size:13px}.rp_wLpbxW_list{color:var(--dsw-alias-label-tertiary);margin:0;padding-left:18px;font-size:12px;line-height:18px}@media (width<=640px){.rp_wLpbxW_view{padding-inline:16px}}";
|
|
20050
|
+
const key$5 = "src/client/chat-settings/ChatSettingsView.module.css";
|
|
20051
|
+
let tag$5 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$5) + "]");
|
|
20052
|
+
if (tag$5 === null) {
|
|
20053
|
+
tag$5 = document.createElement("style");
|
|
20054
|
+
tag$5.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
20055
|
+
tag$5.dataset.pluginCss = key$5;
|
|
20056
|
+
document.head.appendChild(tag$5);
|
|
19337
20057
|
}
|
|
19338
|
-
tag$
|
|
20058
|
+
tag$5.textContent = css$5;
|
|
19339
20059
|
var ChatSettingsView_module_css_default = {
|
|
19340
|
-
"
|
|
19341
|
-
"title": "rp_wLpbxW_title",
|
|
19342
|
-
"field": "rp_wLpbxW_field",
|
|
20060
|
+
"table": "rp_wLpbxW_table",
|
|
19343
20061
|
"help": "rp_wLpbxW_help",
|
|
20062
|
+
"select": "rp_wLpbxW_select",
|
|
20063
|
+
"field": "rp_wLpbxW_field",
|
|
20064
|
+
"title": "rp_wLpbxW_title",
|
|
19344
20065
|
"notice": "rp_wLpbxW_notice",
|
|
20066
|
+
"view": "rp_wLpbxW_view",
|
|
19345
20067
|
"label": "rp_wLpbxW_label",
|
|
19346
|
-
"
|
|
19347
|
-
"
|
|
20068
|
+
"activityBody": "rp_wLpbxW_activityBody",
|
|
20069
|
+
"row": "rp_wLpbxW_row",
|
|
20070
|
+
"error": "rp_wLpbxW_error",
|
|
20071
|
+
"link": "rp_wLpbxW_link",
|
|
19348
20072
|
"description": "rp_wLpbxW_description",
|
|
19349
20073
|
"tableViewport": "rp_wLpbxW_tableViewport",
|
|
19350
|
-
"error": "rp_wLpbxW_error",
|
|
19351
20074
|
"run": "rp_wLpbxW_run",
|
|
19352
|
-
"
|
|
19353
|
-
"row": "rp_wLpbxW_row",
|
|
19354
|
-
"saved": "rp_wLpbxW_saved",
|
|
19355
|
-
"view": "rp_wLpbxW_view",
|
|
20075
|
+
"pre": "rp_wLpbxW_pre",
|
|
19356
20076
|
"reasons": "rp_wLpbxW_reasons",
|
|
19357
|
-
"list": "rp_wLpbxW_list",
|
|
19358
20077
|
"actions": "rp_wLpbxW_actions",
|
|
19359
|
-
"
|
|
19360
|
-
"
|
|
19361
|
-
"
|
|
20078
|
+
"message": "rp_wLpbxW_message",
|
|
20079
|
+
"saved": "rp_wLpbxW_saved",
|
|
20080
|
+
"list": "rp_wLpbxW_list",
|
|
20081
|
+
"activity": "rp_wLpbxW_activity"
|
|
19362
20082
|
};
|
|
19363
20083
|
//#endregion
|
|
19364
20084
|
//#region src/client/chat-settings/settings-api.ts
|
|
@@ -19664,7 +20384,7 @@ window.__ModuleLoader__.load({
|
|
|
19664
20384
|
}
|
|
19665
20385
|
//#endregion
|
|
19666
20386
|
//#region src/client/chat-settings/InterfaceSection.tsx
|
|
19667
|
-
const message$
|
|
20387
|
+
const message$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19668
20388
|
/**
|
|
19669
20389
|
* 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
20390
|
* 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 +20402,7 @@ window.__ModuleLoader__.load({
|
|
|
19682
20402
|
setStatus(next);
|
|
19683
20403
|
setFailure(void 0);
|
|
19684
20404
|
}, (error) => {
|
|
19685
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20405
|
+
if (!abort.signal.aborted) setFailure(message$4(error));
|
|
19686
20406
|
});
|
|
19687
20407
|
return () => {
|
|
19688
20408
|
abort.abort();
|
|
@@ -19703,7 +20423,7 @@ window.__ModuleLoader__.load({
|
|
|
19703
20423
|
setVersion((number) => number + 1);
|
|
19704
20424
|
}, (error) => {
|
|
19705
20425
|
setReport(void 0);
|
|
19706
|
-
setFailure(t("packSyncFailed", { message: message$
|
|
20426
|
+
setFailure(t("packSyncFailed", { message: message$4(error) }));
|
|
19707
20427
|
});
|
|
19708
20428
|
};
|
|
19709
20429
|
if (status === void 0) return failure === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -19818,7 +20538,7 @@ window.__ModuleLoader__.load({
|
|
|
19818
20538
|
}
|
|
19819
20539
|
//#endregion
|
|
19820
20540
|
//#region src/client/chat-settings/LorebookSection.tsx
|
|
19821
|
-
const message$
|
|
20541
|
+
const message$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19822
20542
|
/** The lorebooks the story holds, with a way to add one from the library or take one out. */
|
|
19823
20543
|
function LorebookSection({ t, session, disabled }) {
|
|
19824
20544
|
const [status, setStatus] = (0, react.useState)();
|
|
@@ -19833,7 +20553,7 @@ window.__ModuleLoader__.load({
|
|
|
19833
20553
|
setStatus(next);
|
|
19834
20554
|
setFailure(void 0);
|
|
19835
20555
|
}, (error) => {
|
|
19836
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20556
|
+
if (!abort.signal.aborted) setFailure(message$3(error));
|
|
19837
20557
|
});
|
|
19838
20558
|
return () => {
|
|
19839
20559
|
abort.abort();
|
|
@@ -19849,7 +20569,7 @@ window.__ModuleLoader__.load({
|
|
|
19849
20569
|
const refused = (error) => {
|
|
19850
20570
|
setReport([]);
|
|
19851
20571
|
setLeaving(void 0);
|
|
19852
|
-
setFailure(t("lorebookFailed", { message: message$
|
|
20572
|
+
setFailure(t("lorebookFailed", { message: message$3(error) }));
|
|
19853
20573
|
};
|
|
19854
20574
|
const add = () => {
|
|
19855
20575
|
addStoryLorebook(session, choice, new AbortController().signal).then((added) => {
|
|
@@ -19952,7 +20672,7 @@ window.__ModuleLoader__.load({
|
|
|
19952
20672
|
}
|
|
19953
20673
|
//#endregion
|
|
19954
20674
|
//#region src/client/chat-settings/PresetSection.tsx
|
|
19955
|
-
const message$
|
|
20675
|
+
const message$2 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
19956
20676
|
/** 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
20677
|
function PresetSection({ t, session, disabled }) {
|
|
19958
20678
|
const [status, setStatus] = (0, react.useState)();
|
|
@@ -19967,7 +20687,7 @@ window.__ModuleLoader__.load({
|
|
|
19967
20687
|
setStatus(next);
|
|
19968
20688
|
setFailure(void 0);
|
|
19969
20689
|
}, (error) => {
|
|
19970
|
-
if (!abort.signal.aborted) setFailure(message$
|
|
20690
|
+
if (!abort.signal.aborted) setFailure(message$2(error));
|
|
19971
20691
|
});
|
|
19972
20692
|
return () => {
|
|
19973
20693
|
abort.abort();
|
|
@@ -19982,7 +20702,7 @@ window.__ModuleLoader__.load({
|
|
|
19982
20702
|
setVersion((number) => number + 1);
|
|
19983
20703
|
}, (error) => {
|
|
19984
20704
|
setReport(void 0);
|
|
19985
|
-
setFailure(t("presetFailed", { message: message$
|
|
20705
|
+
setFailure(t("presetFailed", { message: message$2(error) }));
|
|
19986
20706
|
});
|
|
19987
20707
|
};
|
|
19988
20708
|
if (status === void 0) return failure === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -21066,7 +21786,7 @@ window.__ModuleLoader__.load({
|
|
|
21066
21786
|
saved: "已保存。",
|
|
21067
21787
|
saveFailed: "无法保存设置:{message}"
|
|
21068
21788
|
}
|
|
21069
|
-
}, dictionaries$6), dictionaries$
|
|
21789
|
+
}, dictionaries$6), dictionaries$17);
|
|
21070
21790
|
//#endregion
|
|
21071
21791
|
//#region src/client/chat-settings/index.ts
|
|
21072
21792
|
const NAMESPACE$2 = "roleplay.chatSettings";
|
|
@@ -21098,27 +21818,27 @@ window.__ModuleLoader__.load({
|
|
|
21098
21818
|
}
|
|
21099
21819
|
//#endregion
|
|
21100
21820
|
//#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$
|
|
21102
|
-
const key$
|
|
21103
|
-
let tag$
|
|
21104
|
-
if (tag$
|
|
21105
|
-
tag$
|
|
21106
|
-
tag$
|
|
21107
|
-
tag$
|
|
21108
|
-
document.head.appendChild(tag$
|
|
21821
|
+
const css$4 = ".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}}";
|
|
21822
|
+
const key$4 = "src/client/settings/CatalogueSettings.module.css";
|
|
21823
|
+
let tag$4 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$4) + "]");
|
|
21824
|
+
if (tag$4 === null) {
|
|
21825
|
+
tag$4 = document.createElement("style");
|
|
21826
|
+
tag$4.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
21827
|
+
tag$4.dataset.pluginCss = key$4;
|
|
21828
|
+
document.head.appendChild(tag$4);
|
|
21109
21829
|
}
|
|
21110
|
-
tag$
|
|
21830
|
+
tag$4.textContent = css$4;
|
|
21111
21831
|
var CatalogueSettings_module_css_default = {
|
|
21832
|
+
"field": "rp_KPhXDa_field",
|
|
21112
21833
|
"keyHint": "rp_KPhXDa_keyHint",
|
|
21834
|
+
"actions": "rp_KPhXDa_actions",
|
|
21113
21835
|
"section": "rp_KPhXDa_section",
|
|
21114
|
-
"
|
|
21115
|
-
"field": "rp_KPhXDa_field",
|
|
21836
|
+
"keyArea": "rp_KPhXDa_keyArea",
|
|
21116
21837
|
"title": "rp_KPhXDa_title",
|
|
21117
|
-
"hint": "rp_KPhXDa_hint",
|
|
21118
21838
|
"row": "rp_KPhXDa_row",
|
|
21119
|
-
"
|
|
21120
|
-
"
|
|
21121
|
-
"
|
|
21839
|
+
"hint": "rp_KPhXDa_hint",
|
|
21840
|
+
"label": "rp_KPhXDa_label",
|
|
21841
|
+
"problem": "rp_KPhXDa_problem"
|
|
21122
21842
|
};
|
|
21123
21843
|
//#endregion
|
|
21124
21844
|
//#region src/client/settings/AuthoringToolSettings.tsx
|
|
@@ -21182,17 +21902,276 @@ window.__ModuleLoader__.load({
|
|
|
21182
21902
|
alignItems: "flex-start",
|
|
21183
21903
|
margin: "4px 0"
|
|
21184
21904
|
},
|
|
21185
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
21186
|
-
type: "checkbox",
|
|
21187
|
-
checked: externalEnabled(board, kind, tool.name),
|
|
21188
|
-
disabled,
|
|
21189
|
-
"data-external": tool.name,
|
|
21190
|
-
onChange: (event) => {
|
|
21191
|
-
onEdit(JSON.stringify(withExternal(board, kind, tool.name, event.target.checked)));
|
|
21192
|
-
}
|
|
21193
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tool.name })]
|
|
21194
|
-
}, tool.name))]
|
|
21195
|
-
}, kind))
|
|
21905
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
21906
|
+
type: "checkbox",
|
|
21907
|
+
checked: externalEnabled(board, kind, tool.name),
|
|
21908
|
+
disabled,
|
|
21909
|
+
"data-external": tool.name,
|
|
21910
|
+
onChange: (event) => {
|
|
21911
|
+
onEdit(JSON.stringify(withExternal(board, kind, tool.name, event.target.checked)));
|
|
21912
|
+
}
|
|
21913
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tool.name })]
|
|
21914
|
+
}, tool.name))]
|
|
21915
|
+
}, kind))
|
|
21916
|
+
]
|
|
21917
|
+
});
|
|
21918
|
+
}
|
|
21919
|
+
//#endregion
|
|
21920
|
+
//#region src/client/settings/assistants.ts
|
|
21921
|
+
/** The settings of the helper agents of imports and authoring: each is one field of the plugin's configuration, written only when it differs from the default. */
|
|
21922
|
+
const ASSISTANT_FIELDS = [
|
|
21923
|
+
{
|
|
21924
|
+
field: "importReasoning",
|
|
21925
|
+
group: "assistants",
|
|
21926
|
+
kind: "text",
|
|
21927
|
+
placeholder: "off"
|
|
21928
|
+
},
|
|
21929
|
+
{
|
|
21930
|
+
field: "childReasoning",
|
|
21931
|
+
group: "assistants",
|
|
21932
|
+
kind: "text",
|
|
21933
|
+
placeholder: "off"
|
|
21934
|
+
},
|
|
21935
|
+
{
|
|
21936
|
+
field: "importModel",
|
|
21937
|
+
group: "assistants",
|
|
21938
|
+
kind: "text",
|
|
21939
|
+
placeholder: "provider/model"
|
|
21940
|
+
},
|
|
21941
|
+
{
|
|
21942
|
+
field: "importTemperature",
|
|
21943
|
+
group: "assistants",
|
|
21944
|
+
kind: "number",
|
|
21945
|
+
min: 0,
|
|
21946
|
+
max: 2,
|
|
21947
|
+
placeholder: "0.2"
|
|
21948
|
+
},
|
|
21949
|
+
{
|
|
21950
|
+
field: "importMaxTokens",
|
|
21951
|
+
group: "assistants",
|
|
21952
|
+
kind: "integer",
|
|
21953
|
+
min: 1e3,
|
|
21954
|
+
max: 2e5,
|
|
21955
|
+
placeholder: "16000"
|
|
21956
|
+
},
|
|
21957
|
+
{
|
|
21958
|
+
field: "importTimeoutMinutes",
|
|
21959
|
+
group: "assistants",
|
|
21960
|
+
kind: "integer",
|
|
21961
|
+
min: 0,
|
|
21962
|
+
max: 240,
|
|
21963
|
+
placeholder: "15"
|
|
21964
|
+
},
|
|
21965
|
+
{
|
|
21966
|
+
field: "importConcurrency",
|
|
21967
|
+
group: "assistants",
|
|
21968
|
+
kind: "integer",
|
|
21969
|
+
min: 1,
|
|
21970
|
+
max: 16,
|
|
21971
|
+
placeholder: "4"
|
|
21972
|
+
},
|
|
21973
|
+
{
|
|
21974
|
+
field: "importDecisions",
|
|
21975
|
+
group: "assistants",
|
|
21976
|
+
kind: "choice",
|
|
21977
|
+
choices: ["llm", "decision"],
|
|
21978
|
+
placeholder: "llm"
|
|
21979
|
+
},
|
|
21980
|
+
{
|
|
21981
|
+
field: "importConfidence",
|
|
21982
|
+
group: "assistants",
|
|
21983
|
+
kind: "number",
|
|
21984
|
+
min: 0,
|
|
21985
|
+
max: 1,
|
|
21986
|
+
placeholder: "0.7"
|
|
21987
|
+
},
|
|
21988
|
+
{
|
|
21989
|
+
field: "importMaxUploadBytes",
|
|
21990
|
+
group: "limits",
|
|
21991
|
+
kind: "integer",
|
|
21992
|
+
min: 1024,
|
|
21993
|
+
max: 4294967296,
|
|
21994
|
+
placeholder: "104857600"
|
|
21995
|
+
},
|
|
21996
|
+
{
|
|
21997
|
+
field: "catalogueMaxBytes",
|
|
21998
|
+
group: "limits",
|
|
21999
|
+
kind: "integer",
|
|
22000
|
+
min: 1024,
|
|
22001
|
+
max: 4294967296,
|
|
22002
|
+
placeholder: "268435456"
|
|
22003
|
+
},
|
|
22004
|
+
{
|
|
22005
|
+
field: "catalogueTrashDays",
|
|
22006
|
+
group: "limits",
|
|
22007
|
+
kind: "integer",
|
|
22008
|
+
min: 0,
|
|
22009
|
+
max: 3650,
|
|
22010
|
+
placeholder: "30"
|
|
22011
|
+
}
|
|
22012
|
+
];
|
|
22013
|
+
/** A draft is empty (the default), or a value the host accepts; anything else cannot be saved. */
|
|
22014
|
+
function parseDraft(spec, draft) {
|
|
22015
|
+
const text = draft.trim();
|
|
22016
|
+
if (text === "") return { kind: "clear" };
|
|
22017
|
+
if (spec.kind === "text") return {
|
|
22018
|
+
kind: "set",
|
|
22019
|
+
value: text
|
|
22020
|
+
};
|
|
22021
|
+
if (spec.kind === "choice") return spec.choices.includes(text) ? {
|
|
22022
|
+
kind: "set",
|
|
22023
|
+
value: text
|
|
22024
|
+
} : void 0;
|
|
22025
|
+
const number = Number(text);
|
|
22026
|
+
if (!Number.isFinite(number) || number < spec.min || number > spec.max) return void 0;
|
|
22027
|
+
if (spec.kind === "integer" && !Number.isInteger(number)) return void 0;
|
|
22028
|
+
return {
|
|
22029
|
+
kind: "set",
|
|
22030
|
+
value: number
|
|
22031
|
+
};
|
|
22032
|
+
}
|
|
22033
|
+
const assistantFields = ASSISTANT_FIELDS.map((spec) => ({
|
|
22034
|
+
field: spec.field,
|
|
22035
|
+
format: (value) => typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
22036
|
+
parse: (draft) => parseDraft(spec, draft)
|
|
22037
|
+
}));
|
|
22038
|
+
//#endregion
|
|
22039
|
+
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/AssistantSettings.module.css.mjs
|
|
22040
|
+
const css$3 = ".rp_ZwzM4q_section{flex-direction:column;gap:8px;margin-top:24px;display:flex}.rp_ZwzM4q_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_ZwzM4q_hint,.rp_ZwzM4q_fieldHint,.rp_ZwzM4q_invalid{margin:0;font-size:12px;line-height:18px}.rp_ZwzM4q_hint{color:var(--dsw-alias-label-secondary);font-size:13px}.rp_ZwzM4q_fields{min-width:0}.rp_ZwzM4q_fields>*+*{border-top:.5px solid var(--dsw-alias-border-l2)}.rp_ZwzM4q_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.rp_ZwzM4q_head,.rp_ZwzM4q_badges{align-items:center;gap:8px;display:flex}.rp_ZwzM4q_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:20px}.rp_ZwzM4q_reset{color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-size:12px}.rp_ZwzM4q_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.rp_ZwzM4q_reset:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.rp_ZwzM4q_select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);width:100%;height:34px;color:var(--dsw-alias-label-primary);font:inherit;padding:0 12px;font-size:13px}.rp_ZwzM4q_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_ZwzM4q_select[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)}.rp_ZwzM4q_fieldHint{color:var(--dsw-alias-label-tertiary)}.rp_ZwzM4q_invalid{color:var(--dsw-alias-state-error-primary)}@media (width<=520px){.rp_ZwzM4q_head{align-items:flex-start}.rp_ZwzM4q_badges{flex-wrap:wrap;justify-content:flex-end}}";
|
|
22041
|
+
const key$3 = "src/client/settings/AssistantSettings.module.css";
|
|
22042
|
+
let tag$3 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$3) + "]");
|
|
22043
|
+
if (tag$3 === null) {
|
|
22044
|
+
tag$3 = document.createElement("style");
|
|
22045
|
+
tag$3.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
22046
|
+
tag$3.dataset.pluginCss = key$3;
|
|
22047
|
+
document.head.appendChild(tag$3);
|
|
22048
|
+
}
|
|
22049
|
+
tag$3.textContent = css$3;
|
|
22050
|
+
var AssistantSettings_module_css_default = {
|
|
22051
|
+
"label": "rp_ZwzM4q_label",
|
|
22052
|
+
"head": "rp_ZwzM4q_head",
|
|
22053
|
+
"reset": "rp_ZwzM4q_reset",
|
|
22054
|
+
"select": "rp_ZwzM4q_select",
|
|
22055
|
+
"title": "rp_ZwzM4q_title",
|
|
22056
|
+
"fieldHint": "rp_ZwzM4q_fieldHint",
|
|
22057
|
+
"badges": "rp_ZwzM4q_badges",
|
|
22058
|
+
"hint": "rp_ZwzM4q_hint",
|
|
22059
|
+
"invalid": "rp_ZwzM4q_invalid",
|
|
22060
|
+
"field": "rp_ZwzM4q_field",
|
|
22061
|
+
"section": "rp_ZwzM4q_section",
|
|
22062
|
+
"fields": "rp_ZwzM4q_fields"
|
|
22063
|
+
};
|
|
22064
|
+
//#endregion
|
|
22065
|
+
//#region src/client/settings/AssistantSettings.tsx
|
|
22066
|
+
function ChoiceField({ t, spec, state, disabled, onEdit, onReset }) {
|
|
22067
|
+
const id = `roleplay-${spec.field}`;
|
|
22068
|
+
const messageId = `${id}-message`;
|
|
22069
|
+
const known = spec.choices.includes(state.text);
|
|
22070
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22071
|
+
className: AssistantSettings_module_css_default.field,
|
|
22072
|
+
children: [
|
|
22073
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22074
|
+
className: AssistantSettings_module_css_default.head,
|
|
22075
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
22076
|
+
className: AssistantSettings_module_css_default.label,
|
|
22077
|
+
htmlFor: id,
|
|
22078
|
+
children: t(`${spec.field}Label`)
|
|
22079
|
+
}), state.overridden && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
22080
|
+
className: AssistantSettings_module_css_default.badges,
|
|
22081
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
22082
|
+
tone: "neutral",
|
|
22083
|
+
children: t("overridden")
|
|
22084
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22085
|
+
type: "button",
|
|
22086
|
+
className: AssistantSettings_module_css_default.reset,
|
|
22087
|
+
disabled,
|
|
22088
|
+
onClick: onReset,
|
|
22089
|
+
children: t("reset")
|
|
22090
|
+
})]
|
|
22091
|
+
})]
|
|
22092
|
+
}),
|
|
22093
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
22094
|
+
id,
|
|
22095
|
+
className: AssistantSettings_module_css_default.select,
|
|
22096
|
+
value: state.text,
|
|
22097
|
+
disabled,
|
|
22098
|
+
"aria-invalid": state.invalid || void 0,
|
|
22099
|
+
"aria-describedby": messageId,
|
|
22100
|
+
onChange: (event) => {
|
|
22101
|
+
onEdit(event.target.value);
|
|
22102
|
+
},
|
|
22103
|
+
children: [
|
|
22104
|
+
!known && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
22105
|
+
value: state.text,
|
|
22106
|
+
children: state.text
|
|
22107
|
+
}),
|
|
22108
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
22109
|
+
value: "llm",
|
|
22110
|
+
children: t("importDecisionLlm")
|
|
22111
|
+
}),
|
|
22112
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
22113
|
+
value: "decision",
|
|
22114
|
+
children: t("importDecisionModel")
|
|
22115
|
+
})
|
|
22116
|
+
]
|
|
22117
|
+
}),
|
|
22118
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22119
|
+
id: messageId,
|
|
22120
|
+
className: state.invalid ? AssistantSettings_module_css_default.invalid : AssistantSettings_module_css_default.fieldHint,
|
|
22121
|
+
children: state.invalid ? t("assistantInvalidChoice") : t(`${spec.field}Hint`)
|
|
22122
|
+
})
|
|
22123
|
+
]
|
|
22124
|
+
});
|
|
22125
|
+
}
|
|
22126
|
+
/** How the helper agents of imports, translation and authoring are asked: how hard they think, on which model, how long they may work. */
|
|
22127
|
+
function AssistantSettings({ t, group, fields, disabled, onEdit, onReset }) {
|
|
22128
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
22129
|
+
className: AssistantSettings_module_css_default.section,
|
|
22130
|
+
"data-testid": `roleplay-${group}-settings`,
|
|
22131
|
+
children: [
|
|
22132
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
22133
|
+
className: AssistantSettings_module_css_default.title,
|
|
22134
|
+
children: t(group)
|
|
22135
|
+
}),
|
|
22136
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22137
|
+
className: AssistantSettings_module_css_default.hint,
|
|
22138
|
+
children: t(group === "assistants" ? "assistantsHint" : "limitsHint")
|
|
22139
|
+
}),
|
|
22140
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
22141
|
+
className: AssistantSettings_module_css_default.fields,
|
|
22142
|
+
children: ASSISTANT_FIELDS.filter((spec) => spec.group === group).map((spec) => spec.kind === "choice" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChoiceField, {
|
|
22143
|
+
t,
|
|
22144
|
+
spec,
|
|
22145
|
+
state: fields[spec.field],
|
|
22146
|
+
disabled,
|
|
22147
|
+
onEdit: (text) => {
|
|
22148
|
+
onEdit(spec.field, text);
|
|
22149
|
+
},
|
|
22150
|
+
onReset: () => {
|
|
22151
|
+
onReset(spec.field);
|
|
22152
|
+
}
|
|
22153
|
+
}, spec.field) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SettingsValueField, {
|
|
22154
|
+
id: `roleplay-${spec.field}`,
|
|
22155
|
+
label: t(`${spec.field}Label`),
|
|
22156
|
+
hint: t(`${spec.field}Hint`),
|
|
22157
|
+
placeholder: spec.placeholder,
|
|
22158
|
+
numeric: spec.kind === "integer",
|
|
22159
|
+
overriddenLabel: t("overridden"),
|
|
22160
|
+
resetLabel: t("reset"),
|
|
22161
|
+
invalidLabel: "min" in spec ? t("assistantInvalidRange", {
|
|
22162
|
+
min: spec.min,
|
|
22163
|
+
max: spec.max
|
|
22164
|
+
}) : t("invalid"),
|
|
22165
|
+
disabled,
|
|
22166
|
+
...fields[spec.field],
|
|
22167
|
+
onEdit: (text) => {
|
|
22168
|
+
onEdit(spec.field, text);
|
|
22169
|
+
},
|
|
22170
|
+
onReset: () => {
|
|
22171
|
+
onReset(spec.field);
|
|
22172
|
+
}
|
|
22173
|
+
}, spec.field))
|
|
22174
|
+
})
|
|
21196
22175
|
]
|
|
21197
22176
|
});
|
|
21198
22177
|
}
|
|
@@ -21302,7 +22281,7 @@ window.__ModuleLoader__.load({
|
|
|
21302
22281
|
};
|
|
21303
22282
|
//#endregion
|
|
21304
22283
|
//#region src/client/settings/CatalogueKey.tsx
|
|
21305
|
-
const message = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
22284
|
+
const message$1 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
21306
22285
|
/**
|
|
21307
22286
|
* 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
22287
|
* (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 +22301,7 @@ window.__ModuleLoader__.load({
|
|
|
21322
22301
|
setStatus(next);
|
|
21323
22302
|
setFailure(void 0);
|
|
21324
22303
|
}, (error) => {
|
|
21325
|
-
if (!abort.signal.aborted) setFailure(message(error));
|
|
22304
|
+
if (!abort.signal.aborted) setFailure(message$1(error));
|
|
21326
22305
|
});
|
|
21327
22306
|
}, 400);
|
|
21328
22307
|
return () => {
|
|
@@ -21339,7 +22318,7 @@ window.__ModuleLoader__.load({
|
|
|
21339
22318
|
setFailure(void 0);
|
|
21340
22319
|
then?.();
|
|
21341
22320
|
}, (error) => {
|
|
21342
|
-
setFailure(message(error));
|
|
22321
|
+
setFailure(message$1(error));
|
|
21343
22322
|
}).finally(() => {
|
|
21344
22323
|
setBusy(false);
|
|
21345
22324
|
});
|
|
@@ -21442,7 +22421,7 @@ window.__ModuleLoader__.load({
|
|
|
21442
22421
|
}
|
|
21443
22422
|
//#endregion
|
|
21444
22423
|
//#region src/client/settings/CatalogueSettings.tsx
|
|
21445
|
-
const PROBLEM_TEXT = {
|
|
22424
|
+
const PROBLEM_TEXT$1 = {
|
|
21446
22425
|
name: "catalogueProblemName",
|
|
21447
22426
|
address: "catalogueProblemAddress",
|
|
21448
22427
|
duplicate: "catalogueProblemDuplicate",
|
|
@@ -21529,7 +22508,7 @@ window.__ModuleLoader__.load({
|
|
|
21529
22508
|
problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21530
22509
|
className: CatalogueSettings_module_css_default.problem,
|
|
21531
22510
|
role: "alert",
|
|
21532
|
-
children: t(PROBLEM_TEXT[problem])
|
|
22511
|
+
children: t(PROBLEM_TEXT$1[problem])
|
|
21533
22512
|
})
|
|
21534
22513
|
]
|
|
21535
22514
|
}, index);
|
|
@@ -21555,6 +22534,281 @@ window.__ModuleLoader__.load({
|
|
|
21555
22534
|
});
|
|
21556
22535
|
}
|
|
21557
22536
|
//#endregion
|
|
22537
|
+
//#region src/client/settings/sync.ts
|
|
22538
|
+
const text = (value) => typeof value === "string" ? value : "";
|
|
22539
|
+
function syncOf(value) {
|
|
22540
|
+
const row = typeof value === "object" && value !== null ? value : {};
|
|
22541
|
+
const minutes = typeof row["intervalMinutes"] === "number" && Number.isFinite(row["intervalMinutes"]) ? Math.max(0, Math.floor(row["intervalMinutes"])) : 0;
|
|
22542
|
+
return {
|
|
22543
|
+
remote: text(row["remote"]),
|
|
22544
|
+
rclone: text(row["rclone"]),
|
|
22545
|
+
configFile: text(row["configFile"]),
|
|
22546
|
+
passwordRef: text(row["passwordRef"]),
|
|
22547
|
+
intervalMinutes: minutes
|
|
22548
|
+
};
|
|
22549
|
+
}
|
|
22550
|
+
function syncDraftOf(draft) {
|
|
22551
|
+
try {
|
|
22552
|
+
const value = JSON.parse(draft === "" ? "{}" : draft);
|
|
22553
|
+
const row = typeof value === "object" && value !== null ? value : {};
|
|
22554
|
+
const intervalText = typeof row["intervalMinutes"] === "string" || typeof row["intervalMinutes"] === "number" ? String(row["intervalMinutes"]) : "0";
|
|
22555
|
+
return {
|
|
22556
|
+
config: syncOf(value),
|
|
22557
|
+
intervalText
|
|
22558
|
+
};
|
|
22559
|
+
} catch {
|
|
22560
|
+
return {
|
|
22561
|
+
config: { ...DEFAULT_SYNC },
|
|
22562
|
+
intervalText: "0"
|
|
22563
|
+
};
|
|
22564
|
+
}
|
|
22565
|
+
}
|
|
22566
|
+
/** What stops the settings from being saved; sync that is off (no remote) has none. */
|
|
22567
|
+
function syncProblem(config, intervalText) {
|
|
22568
|
+
if (intervalText.trim() !== "" && !/^\d+$/.test(intervalText.trim())) return "interval";
|
|
22569
|
+
if (config.remote.trim() === "") return void 0;
|
|
22570
|
+
if (!/^[^\s]+$/.test(config.remote.trim())) return "remote";
|
|
22571
|
+
if (config.configFile.trim() === "" || !(config.configFile.trim().startsWith("/") || config.configFile.trim().startsWith("~/") || /^[A-Za-z]:[\\/]/.test(config.configFile.trim()))) return "config";
|
|
22572
|
+
if (config.passwordRef.trim() !== "" && !CREDENTIAL_REF.test(config.passwordRef.trim())) return "keyName";
|
|
22573
|
+
}
|
|
22574
|
+
const syncField = {
|
|
22575
|
+
field: "sync",
|
|
22576
|
+
format: (value) => JSON.stringify(syncOf(value)),
|
|
22577
|
+
parse: (draft) => {
|
|
22578
|
+
const { config, intervalText } = syncDraftOf(draft);
|
|
22579
|
+
if (syncProblem(config, intervalText) !== void 0) return void 0;
|
|
22580
|
+
const intervalMinutes = Number(intervalText.trim());
|
|
22581
|
+
return config.remote === "" && config.rclone === "" && config.configFile === "" && config.passwordRef === "" && intervalMinutes === 0 ? { kind: "clear" } : {
|
|
22582
|
+
kind: "set",
|
|
22583
|
+
value: {
|
|
22584
|
+
remote: config.remote.trim(),
|
|
22585
|
+
rclone: config.rclone.trim(),
|
|
22586
|
+
configFile: config.configFile.trim(),
|
|
22587
|
+
passwordRef: config.passwordRef.trim(),
|
|
22588
|
+
intervalMinutes
|
|
22589
|
+
}
|
|
22590
|
+
};
|
|
22591
|
+
}
|
|
22592
|
+
};
|
|
22593
|
+
//#endregion
|
|
22594
|
+
//#region src/client/settings/SyncSettings.tsx
|
|
22595
|
+
const PROBLEM_TEXT = {
|
|
22596
|
+
remote: "syncProblemRemote",
|
|
22597
|
+
config: "syncProblemConfig",
|
|
22598
|
+
keyName: "catalogueProblemKeyName",
|
|
22599
|
+
interval: "syncProblemInterval"
|
|
22600
|
+
};
|
|
22601
|
+
const message = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
22602
|
+
/** The password of an encrypted rclone configuration: kept in the credential store, written here and never read back. */
|
|
22603
|
+
function SyncPassword({ t, reference, disabled }) {
|
|
22604
|
+
const [status, setStatus] = (0, react.useState)();
|
|
22605
|
+
const [value, setValue] = (0, react.useState)("");
|
|
22606
|
+
const [failure, setFailure] = (0, react.useState)();
|
|
22607
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
22608
|
+
(0, react.useEffect)(() => {
|
|
22609
|
+
const abort = new AbortController();
|
|
22610
|
+
const timer = setTimeout(() => {
|
|
22611
|
+
describePassword(reference, abort.signal).then((next) => {
|
|
22612
|
+
setStatus(next);
|
|
22613
|
+
setFailure(void 0);
|
|
22614
|
+
}, (error) => {
|
|
22615
|
+
if (!abort.signal.aborted) setFailure(message(error));
|
|
22616
|
+
});
|
|
22617
|
+
}, 400);
|
|
22618
|
+
return () => {
|
|
22619
|
+
clearTimeout(timer);
|
|
22620
|
+
abort.abort();
|
|
22621
|
+
};
|
|
22622
|
+
}, [reference]);
|
|
22623
|
+
const keep = (next) => {
|
|
22624
|
+
setBusy(true);
|
|
22625
|
+
storePassword(reference, next, new AbortController().signal).then((done) => {
|
|
22626
|
+
setStatus(done);
|
|
22627
|
+
setValue("");
|
|
22628
|
+
setFailure(void 0);
|
|
22629
|
+
}, (error) => {
|
|
22630
|
+
setFailure(message(error));
|
|
22631
|
+
}).finally(() => {
|
|
22632
|
+
setBusy(false);
|
|
22633
|
+
});
|
|
22634
|
+
};
|
|
22635
|
+
const blocked = disabled || busy || status?.writable === false;
|
|
22636
|
+
const shown = status === void 0 ? t("catalogueKeyChecking") : status.configured ? `${t("catalogueKeySet")} (${status.source ?? "?"})` : t("catalogueKeyUnset");
|
|
22637
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22638
|
+
className: CatalogueSettings_module_css_default.keyArea,
|
|
22639
|
+
"data-testid": "roleplay-sync-password",
|
|
22640
|
+
children: [
|
|
22641
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22642
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22643
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22644
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22645
|
+
children: t("syncPassword")
|
|
22646
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22647
|
+
type: "password",
|
|
22648
|
+
autoComplete: "off",
|
|
22649
|
+
value,
|
|
22650
|
+
disabled: blocked,
|
|
22651
|
+
placeholder: status?.configured === true ? "••••••••" : "",
|
|
22652
|
+
onChange: (event) => {
|
|
22653
|
+
setValue(event.target.value);
|
|
22654
|
+
}
|
|
22655
|
+
})]
|
|
22656
|
+
}),
|
|
22657
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22658
|
+
className: CatalogueSettings_module_css_default.actions,
|
|
22659
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
22660
|
+
variant: "outline",
|
|
22661
|
+
size: "sm",
|
|
22662
|
+
disabled: blocked || value === "",
|
|
22663
|
+
onClick: () => {
|
|
22664
|
+
keep(value);
|
|
22665
|
+
},
|
|
22666
|
+
children: t("catalogueKeyStore")
|
|
22667
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
22668
|
+
variant: "ghost",
|
|
22669
|
+
size: "sm",
|
|
22670
|
+
disabled: blocked || status?.configured !== true,
|
|
22671
|
+
onClick: () => {
|
|
22672
|
+
keep("");
|
|
22673
|
+
},
|
|
22674
|
+
children: t("catalogueKeyClear")
|
|
22675
|
+
})]
|
|
22676
|
+
}),
|
|
22677
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
22678
|
+
className: CatalogueSettings_module_css_default.keyHint,
|
|
22679
|
+
role: "status",
|
|
22680
|
+
children: [
|
|
22681
|
+
reference,
|
|
22682
|
+
" · ",
|
|
22683
|
+
shown,
|
|
22684
|
+
status?.writable === false ? ` · ${t("catalogueKeyReadOnly")}` : ""
|
|
22685
|
+
]
|
|
22686
|
+
}),
|
|
22687
|
+
failure !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22688
|
+
className: CatalogueSettings_module_css_default.problem,
|
|
22689
|
+
role: "alert",
|
|
22690
|
+
children: failure
|
|
22691
|
+
})
|
|
22692
|
+
]
|
|
22693
|
+
});
|
|
22694
|
+
}
|
|
22695
|
+
/** 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. */
|
|
22696
|
+
function SyncSettings({ t, text, disabled, onEdit }) {
|
|
22697
|
+
const { config, intervalText } = syncDraftOf(text);
|
|
22698
|
+
const set = (patch) => {
|
|
22699
|
+
onEdit(JSON.stringify({
|
|
22700
|
+
...config,
|
|
22701
|
+
intervalMinutes: intervalText,
|
|
22702
|
+
...patch
|
|
22703
|
+
}));
|
|
22704
|
+
};
|
|
22705
|
+
const problem = syncProblem(config, intervalText);
|
|
22706
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
22707
|
+
className: CatalogueSettings_module_css_default.section,
|
|
22708
|
+
"data-testid": "roleplay-sync-settings",
|
|
22709
|
+
children: [
|
|
22710
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
22711
|
+
className: CatalogueSettings_module_css_default.title,
|
|
22712
|
+
children: t("sync")
|
|
22713
|
+
}),
|
|
22714
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22715
|
+
className: CatalogueSettings_module_css_default.hint,
|
|
22716
|
+
children: t("syncHint")
|
|
22717
|
+
}),
|
|
22718
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22719
|
+
className: CatalogueSettings_module_css_default.row,
|
|
22720
|
+
children: [
|
|
22721
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22722
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22723
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22724
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22725
|
+
children: t("syncRemote")
|
|
22726
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22727
|
+
value: config.remote,
|
|
22728
|
+
disabled,
|
|
22729
|
+
placeholder: "mydrive:dsh-roleplay",
|
|
22730
|
+
onChange: (event) => {
|
|
22731
|
+
set({ remote: event.target.value });
|
|
22732
|
+
}
|
|
22733
|
+
})]
|
|
22734
|
+
}),
|
|
22735
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22736
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22737
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22738
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22739
|
+
children: t("syncConfigFile")
|
|
22740
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22741
|
+
value: config.configFile,
|
|
22742
|
+
disabled,
|
|
22743
|
+
placeholder: "~/.config/rclone/rclone.conf",
|
|
22744
|
+
onChange: (event) => {
|
|
22745
|
+
set({ configFile: event.target.value });
|
|
22746
|
+
}
|
|
22747
|
+
})]
|
|
22748
|
+
}),
|
|
22749
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22750
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22751
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22752
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22753
|
+
children: t("syncRclone")
|
|
22754
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22755
|
+
value: config.rclone,
|
|
22756
|
+
disabled,
|
|
22757
|
+
placeholder: "rclone",
|
|
22758
|
+
onChange: (event) => {
|
|
22759
|
+
set({ rclone: event.target.value });
|
|
22760
|
+
}
|
|
22761
|
+
})]
|
|
22762
|
+
}),
|
|
22763
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22764
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22765
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22766
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22767
|
+
children: t("syncInterval")
|
|
22768
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22769
|
+
value: intervalText,
|
|
22770
|
+
disabled,
|
|
22771
|
+
inputMode: "numeric",
|
|
22772
|
+
"aria-invalid": problem === "interval",
|
|
22773
|
+
onChange: (event) => {
|
|
22774
|
+
set({ intervalMinutes: event.target.value });
|
|
22775
|
+
}
|
|
22776
|
+
})]
|
|
22777
|
+
}),
|
|
22778
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
22779
|
+
className: CatalogueSettings_module_css_default.field,
|
|
22780
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22781
|
+
className: CatalogueSettings_module_css_default.label,
|
|
22782
|
+
children: t("catalogueKeyName")
|
|
22783
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
22784
|
+
value: config.passwordRef,
|
|
22785
|
+
disabled,
|
|
22786
|
+
placeholder: SYNC_PASSWORD_REF,
|
|
22787
|
+
onChange: (event) => {
|
|
22788
|
+
set({ passwordRef: event.target.value });
|
|
22789
|
+
}
|
|
22790
|
+
})]
|
|
22791
|
+
}),
|
|
22792
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22793
|
+
className: CatalogueSettings_module_css_default.keyHint,
|
|
22794
|
+
children: t("syncDetails")
|
|
22795
|
+
}),
|
|
22796
|
+
problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22797
|
+
className: CatalogueSettings_module_css_default.problem,
|
|
22798
|
+
role: "alert",
|
|
22799
|
+
children: t(PROBLEM_TEXT[problem])
|
|
22800
|
+
})
|
|
22801
|
+
]
|
|
22802
|
+
}),
|
|
22803
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncPassword, {
|
|
22804
|
+
t,
|
|
22805
|
+
reference: config.passwordRef.trim() || "ROLEPLAY_SYNC_RCLONE_CONFIG_PASS",
|
|
22806
|
+
disabled
|
|
22807
|
+
})
|
|
22808
|
+
]
|
|
22809
|
+
});
|
|
22810
|
+
}
|
|
22811
|
+
//#endregion
|
|
21558
22812
|
//#region src/client/settings/locales.ts
|
|
21559
22813
|
const dictionaries$1 = {
|
|
21560
22814
|
en: {
|
|
@@ -21592,6 +22846,49 @@ window.__ModuleLoader__.load({
|
|
|
21592
22846
|
authoringKind_presetAuthoring: "Preset authoring assistant",
|
|
21593
22847
|
authoringKind_lorebookAuthoring: "Lorebook authoring assistant",
|
|
21594
22848
|
authoringKind_worldAuthor: "World author during play (invents places, people and things the story needs)",
|
|
22849
|
+
assistants: "Assistant defaults",
|
|
22850
|
+
assistantsHint: "Defaults for import, translation and authoring helpers, plus the fallback thinking level for story helpers. Changes take effect at once; each story can override its own helper settings.",
|
|
22851
|
+
importReasoningLabel: "Thinking level",
|
|
22852
|
+
importReasoningHint: "How hard the helper agents of imports, translation and authoring think, as a level the model offers, for example off or low. Empty uses the helper level below, then the chat's own. A model that thinks without end never answers: set off if an import stalls.",
|
|
22853
|
+
childReasoningLabel: "Thinking level of story helpers",
|
|
22854
|
+
childReasoningHint: "The level the helpers of a story (characters, record keeper, authors, suggestions) get when the chat's own setting is empty. Empty is your own level.",
|
|
22855
|
+
importModelLabel: "Model",
|
|
22856
|
+
importModelHint: "The model the helper agents run on, written provider/model. Empty is the model of the chat.",
|
|
22857
|
+
importTemperatureLabel: "Temperature",
|
|
22858
|
+
importTemperatureHint: "How freely they write, from 0 to 2. Low, because they copy and sort what a card says. Default 0.2.",
|
|
22859
|
+
importMaxTokensLabel: "Most tokens per request",
|
|
22860
|
+
importMaxTokensHint: "The most one model request of a helper may produce, thinking included. Default 16000.",
|
|
22861
|
+
importTimeoutMinutesLabel: "Minutes before a helper is stopped",
|
|
22862
|
+
importTimeoutMinutesHint: "A helper that has not given its result after this long is stopped and the step reports why, so a run-away helper never holds an import for hours. 0 never stops it. Default 15.",
|
|
22863
|
+
importConcurrencyLabel: "Helpers at once",
|
|
22864
|
+
importConcurrencyHint: "How many helpers of an import run side by side, 1 to 16. A local model serves few at a time. Default 4.",
|
|
22865
|
+
importDecisionsLabel: "Decision model for sorting a card",
|
|
22866
|
+
importDecisionsHint: "Use the language model for every piece of a card, or let the selected decision model settle pieces that are only instructions or notes first. Anything it is unsure about still goes to the language model. The language model is the default.",
|
|
22867
|
+
importConfidenceLabel: "Decision model confidence",
|
|
22868
|
+
importConfidenceHint: "How sure the decision model must be before its answer is taken, from 0 to 1. Default 0.7.",
|
|
22869
|
+
importDecisionLlm: "Language model",
|
|
22870
|
+
importDecisionModel: "Decision model first",
|
|
22871
|
+
assistantInvalidRange: "Enter a number from {min} to {max}.",
|
|
22872
|
+
assistantInvalidChoice: "Choose one of the available options.",
|
|
22873
|
+
limits: "Upload and download limits",
|
|
22874
|
+
limitsHint: "Size limits for what the plugin accepts, and how long it keeps what an update replaced. They apply at once.",
|
|
22875
|
+
importMaxUploadBytesLabel: "Largest upload (bytes)",
|
|
22876
|
+
importMaxUploadBytesHint: "The most a character card, preset or lorebook upload may be. Big cards with lorebooks and scripts reach tens of megabytes. Default 104857600 (100 MB).",
|
|
22877
|
+
catalogueMaxBytesLabel: "Largest catalogue download (bytes)",
|
|
22878
|
+
catalogueMaxBytesHint: "The most a world downloaded from a catalogue may be, compressed and again unpacked. Default 268435456 (256 MB).",
|
|
22879
|
+
catalogueTrashDaysLabel: "Days to keep replaced files",
|
|
22880
|
+
catalogueTrashDaysHint: "How long the files an update replaced stay in the trash folder before they are deleted. 0 keeps them for good. Default 30.",
|
|
22881
|
+
sync: "Sync with other devices",
|
|
22882
|
+
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.",
|
|
22883
|
+
syncRemote: "Remote and folder",
|
|
22884
|
+
syncConfigFile: "rclone configuration file",
|
|
22885
|
+
syncRclone: "rclone program",
|
|
22886
|
+
syncInterval: "Minutes between automatic syncs",
|
|
22887
|
+
syncPassword: "Configuration password",
|
|
22888
|
+
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.",
|
|
22889
|
+
syncProblemRemote: "The remote must be written without spaces, like mydrive:dsh-roleplay.",
|
|
22890
|
+
syncProblemConfig: "Give the absolute path of the rclone configuration file.",
|
|
22891
|
+
syncProblemInterval: "Minutes are a whole number, 0 or more.",
|
|
21595
22892
|
overridden: "Overridden",
|
|
21596
22893
|
reset: "Reset to default",
|
|
21597
22894
|
invalid: "Enter a folder path.",
|
|
@@ -21636,6 +22933,49 @@ window.__ModuleLoader__.load({
|
|
|
21636
22933
|
authoringKind_presetAuthoring: "预设创作助手",
|
|
21637
22934
|
authoringKind_lorebookAuthoring: "世界书创作助手",
|
|
21638
22935
|
authoringKind_worldAuthor: "游戏中的世界作者(为故事补充所需的地点、人物和物品)",
|
|
22936
|
+
assistants: "助手默认设置",
|
|
22937
|
+
assistantsHint: "设置导入、翻译与创作助手的默认值,以及故事助手在未单独指定时使用的思考强度。修改立即生效;每个故事仍可覆盖自己的助手设置。",
|
|
22938
|
+
importReasoningLabel: "助手思考强度",
|
|
22939
|
+
importReasoningHint: "导入、翻译和创作所用的助手代理思考的强度,须是模型提供的级别,例如 off 或 low。留空则使用下面的助手级别,再留空则与对话本身一致。一直思考的模型永远不会作答:导入卡住时请设为 off。",
|
|
22940
|
+
childReasoningLabel: "故事助手的思考强度",
|
|
22941
|
+
childReasoningHint: "对话自己的设置为空时,故事助手(角色、记录员、作者、建议)使用的级别。留空则与你自己选择的一致。",
|
|
22942
|
+
importModelLabel: "助手使用的模型",
|
|
22943
|
+
importModelHint: "助手代理使用的模型,写作 provider/model。留空则使用对话的模型。",
|
|
22944
|
+
importTemperatureLabel: "温度",
|
|
22945
|
+
importTemperatureHint: "它们写作的自由度,0 到 2。取低值,因为它们是在抄写和整理卡片的内容。默认 0.2。",
|
|
22946
|
+
importMaxTokensLabel: "每次请求的最大 token 数",
|
|
22947
|
+
importMaxTokensHint: "助手一次模型请求最多产生的 token 数,包括思考。默认 16000。",
|
|
22948
|
+
importTimeoutMinutesLabel: "助手的时限(分钟)",
|
|
22949
|
+
importTimeoutMinutesHint: "助手超过这个时间仍没有给出结果就会被停止,该步骤会说明原因,因此失控的助手不会让导入卡上几个小时。0 表示不限制。默认 15。",
|
|
22950
|
+
importConcurrencyLabel: "同时运行的助手数",
|
|
22951
|
+
importConcurrencyHint: "导入时并行运行的助手数量,1 到 16。本地模型一次只能服务很少几个。默认 4。",
|
|
22952
|
+
importDecisionsLabel: "整理卡片时的决策模型",
|
|
22953
|
+
importDecisionsHint: "可以让语言模型判断卡片的每个片段,也可以先由所选的决策模型处理仅包含指令或说明的片段;它没把握的内容仍交给语言模型。默认使用语言模型。",
|
|
22954
|
+
importConfidenceLabel: "决策模型的把握程度",
|
|
22955
|
+
importConfidenceHint: "决策模型要有多大把握才采纳它的回答,0 到 1。默认 0.7。",
|
|
22956
|
+
importDecisionLlm: "语言模型",
|
|
22957
|
+
importDecisionModel: "优先使用决策模型",
|
|
22958
|
+
assistantInvalidRange: "请输入 {min} 到 {max} 之间的数字。",
|
|
22959
|
+
assistantInvalidChoice: "请选择一个可用选项。",
|
|
22960
|
+
limits: "上传与下载限制",
|
|
22961
|
+
limitsHint: "插件接收内容的大小限制,以及更新后被替换的文件保留多久。立即生效。",
|
|
22962
|
+
importMaxUploadBytesLabel: "上传大小上限(字节)",
|
|
22963
|
+
importMaxUploadBytesHint: "角色卡、预设或世界书上传的最大体积。带世界书和脚本的大卡可达数十 MB。默认 104857600(100 MB)。",
|
|
22964
|
+
catalogueMaxBytesLabel: "目录下载大小上限(字节)",
|
|
22965
|
+
catalogueMaxBytesHint: "从目录下载的世界的最大体积,压缩后和解压后都不得超过。默认 268435456(256 MB)。",
|
|
22966
|
+
catalogueTrashDaysLabel: "被替换文件的保留天数",
|
|
22967
|
+
catalogueTrashDaysHint: "更新替换下来的文件在回收文件夹中保留多少天后删除。0 表示永久保留。默认 30。",
|
|
22968
|
+
sync: "与其他设备同步",
|
|
22969
|
+
syncHint: "通过 rclone 让数据文件夹与远端的一个文件夹保持一致:每个世界、每个会话和每个共享文件夹各自作为一个单元同步,同步期间不会被改动。远端留空即关闭同步。“同步”页面会列出各个单元。",
|
|
22970
|
+
syncRemote: "远端和文件夹",
|
|
22971
|
+
syncConfigFile: "rclone 配置文件",
|
|
22972
|
+
syncRclone: "rclone 程序",
|
|
22973
|
+
syncInterval: "自动同步的间隔(分钟)",
|
|
22974
|
+
syncPassword: "配置文件密码",
|
|
22975
|
+
syncDetails: "远端是 rclone 的远端名和文件夹,例如 mydrive:dsh-roleplay。配置文件必须放在数据文件夹之外(可用 rclone config --config <文件> 创建)。程序留空时在 PATH 中查找。间隔为 0 分钟表示只在你手动同步时才同步。只有配置文件已加密时才需要密码;密码保存在凭据存储中,名称见上方,也可以在这里改用别的名称。",
|
|
22976
|
+
syncProblemRemote: "远端不能含空格,例如 mydrive:dsh-roleplay。",
|
|
22977
|
+
syncProblemConfig: "请填写 rclone 配置文件的绝对路径。",
|
|
22978
|
+
syncProblemInterval: "分钟数必须是不小于 0 的整数。",
|
|
21639
22979
|
overridden: "已覆盖",
|
|
21640
22980
|
reset: "恢复默认",
|
|
21641
22981
|
invalid: "请填写文件夹路径。",
|
|
@@ -21694,6 +23034,38 @@ window.__ModuleLoader__.load({
|
|
|
21694
23034
|
props.edit("catalogues", text);
|
|
21695
23035
|
}
|
|
21696
23036
|
}),
|
|
23037
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncSettings, {
|
|
23038
|
+
t,
|
|
23039
|
+
text: state.sync.text,
|
|
23040
|
+
disabled: !state.writable,
|
|
23041
|
+
onEdit: (text) => {
|
|
23042
|
+
props.edit("sync", text);
|
|
23043
|
+
}
|
|
23044
|
+
}),
|
|
23045
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AssistantSettings, {
|
|
23046
|
+
t,
|
|
23047
|
+
group: "assistants",
|
|
23048
|
+
fields: state.assistants,
|
|
23049
|
+
disabled: !state.writable,
|
|
23050
|
+
onEdit: (field, text) => {
|
|
23051
|
+
props.edit(field, text);
|
|
23052
|
+
},
|
|
23053
|
+
onReset: (field) => {
|
|
23054
|
+
props.resetField(field);
|
|
23055
|
+
}
|
|
23056
|
+
}),
|
|
23057
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AssistantSettings, {
|
|
23058
|
+
t,
|
|
23059
|
+
group: "limits",
|
|
23060
|
+
fields: state.assistants,
|
|
23061
|
+
disabled: !state.writable,
|
|
23062
|
+
onEdit: (field, text) => {
|
|
23063
|
+
props.edit(field, text);
|
|
23064
|
+
},
|
|
23065
|
+
onReset: (field) => {
|
|
23066
|
+
props.resetField(field);
|
|
23067
|
+
}
|
|
23068
|
+
}),
|
|
21697
23069
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AuthoringToolSettings, {
|
|
21698
23070
|
t,
|
|
21699
23071
|
text: state.authoringTools.text,
|
|
@@ -21716,13 +23088,17 @@ window.__ModuleLoader__.load({
|
|
|
21716
23088
|
this.form = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, [
|
|
21717
23089
|
(0, _deepseek_ai_dsh_client_ui_primitives.settingsTextField)("rootPath"),
|
|
21718
23090
|
cataloguesField,
|
|
21719
|
-
authoringToolsField
|
|
23091
|
+
authoringToolsField,
|
|
23092
|
+
syncField,
|
|
23093
|
+
...assistantFields
|
|
21720
23094
|
]);
|
|
21721
23095
|
this.store = this.form.bind(() => ({
|
|
21722
23096
|
...this.form.shell(),
|
|
21723
23097
|
rootPath: this.form.field("rootPath"),
|
|
21724
23098
|
catalogues: this.form.field("catalogues"),
|
|
21725
|
-
authoringTools: this.form.field("authoringTools")
|
|
23099
|
+
authoringTools: this.form.field("authoringTools"),
|
|
23100
|
+
sync: this.form.field("sync"),
|
|
23101
|
+
assistants: Object.fromEntries(ASSISTANT_FIELDS.map((spec) => [spec.field, this.form.field(spec.field)]))
|
|
21726
23102
|
}));
|
|
21727
23103
|
}
|
|
21728
23104
|
inject() {
|
|
@@ -21923,28 +23299,28 @@ window.__ModuleLoader__.load({
|
|
|
21923
23299
|
}
|
|
21924
23300
|
tag$2.textContent = css$2;
|
|
21925
23301
|
var NarrationView_module_css_default = {
|
|
21926
|
-
"oocRefused": "rp_NFPimG_oocRefused",
|
|
21927
|
-
"narration": "rp_NFPimG_narration",
|
|
21928
23302
|
"oocNote": "rp_NFPimG_oocNote",
|
|
21929
|
-
"output": "rp_NFPimG_output",
|
|
21930
|
-
"imageStatus": "rp_NFPimG_imageStatus",
|
|
21931
|
-
"diceSummary": "rp_NFPimG_diceSummary",
|
|
21932
|
-
"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
23303
|
"line": "rp_NFPimG_line",
|
|
21940
|
-
"note": "rp_NFPimG_note",
|
|
21941
|
-
"diceList": "rp_NFPimG_diceList",
|
|
21942
|
-
"name": "rp_NFPimG_name",
|
|
21943
23304
|
"avatar": "rp_NFPimG_avatar",
|
|
21944
|
-
"
|
|
23305
|
+
"diceList": "rp_NFPimG_diceList",
|
|
23306
|
+
"imageError": "rp_NFPimG_imageError",
|
|
21945
23307
|
"words": "rp_NFPimG_words",
|
|
23308
|
+
"imageButton": "rp_NFPimG_imageButton",
|
|
23309
|
+
"playLine": "rp_NFPimG_playLine",
|
|
23310
|
+
"narration": "rp_NFPimG_narration",
|
|
23311
|
+
"oocLabel": "rp_NFPimG_oocLabel",
|
|
23312
|
+
"note": "rp_NFPimG_note",
|
|
21946
23313
|
"speech": "rp_NFPimG_speech",
|
|
21947
|
-
"
|
|
23314
|
+
"name": "rp_NFPimG_name",
|
|
23315
|
+
"imageStatus": "rp_NFPimG_imageStatus",
|
|
23316
|
+
"dice": "rp_NFPimG_dice",
|
|
23317
|
+
"diceSummary": "rp_NFPimG_diceSummary",
|
|
23318
|
+
"output": "rp_NFPimG_output",
|
|
23319
|
+
"preview": "rp_NFPimG_preview",
|
|
23320
|
+
"sceneImage": "rp_NFPimG_sceneImage",
|
|
23321
|
+
"oocRefused": "rp_NFPimG_oocRefused",
|
|
23322
|
+
"images": "rp_NFPimG_images",
|
|
23323
|
+
"playAll": "rp_NFPimG_playAll"
|
|
21948
23324
|
};
|
|
21949
23325
|
//#endregion
|
|
21950
23326
|
//#region src/client/transcript/PreviewNode.tsx
|
|
@@ -22209,10 +23585,10 @@ window.__ModuleLoader__.load({
|
|
|
22209
23585
|
}
|
|
22210
23586
|
tag$1.textContent = css$1;
|
|
22211
23587
|
var SuggestionsDock_module_css_default = {
|
|
22212
|
-
"dock": "rp_rWH4DG_dock",
|
|
22213
|
-
"label": "rp_rWH4DG_label",
|
|
22214
23588
|
"chip": "rp_rWH4DG_chip",
|
|
23589
|
+
"dock": "rp_rWH4DG_dock",
|
|
22215
23590
|
"card": "rp_rWH4DG_card",
|
|
23591
|
+
"label": "rp_rWH4DG_label",
|
|
22216
23592
|
"lines": "rp_rWH4DG_lines"
|
|
22217
23593
|
};
|
|
22218
23594
|
//#endregion
|
|
@@ -22333,12 +23709,12 @@ window.__ModuleLoader__.load({
|
|
|
22333
23709
|
}
|
|
22334
23710
|
tag.textContent = css;
|
|
22335
23711
|
var TurnsDock_module_css_default = {
|
|
23712
|
+
"count": "rp_f4YLlq_count",
|
|
23713
|
+
"group": "rp_f4YLlq_group",
|
|
23714
|
+
"dock": "rp_f4YLlq_dock",
|
|
22336
23715
|
"button": "rp_f4YLlq_button",
|
|
22337
|
-
"error": "rp_f4YLlq_error",
|
|
22338
23716
|
"select": "rp_f4YLlq_select",
|
|
22339
|
-
"
|
|
22340
|
-
"group": "rp_f4YLlq_group",
|
|
22341
|
-
"count": "rp_f4YLlq_count"
|
|
23717
|
+
"error": "rp_f4YLlq_error"
|
|
22342
23718
|
};
|
|
22343
23719
|
//#endregion
|
|
22344
23720
|
//#region src/client/transcript/withdrawn.ts
|
|
@@ -22710,6 +24086,7 @@ window.__ModuleLoader__.load({
|
|
|
22710
24086
|
registerLorebooksPage(ctx);
|
|
22711
24087
|
registerCataloguePage(ctx);
|
|
22712
24088
|
registerSessionsPage(ctx);
|
|
24089
|
+
registerSyncPage(ctx);
|
|
22713
24090
|
registerTranscript(ctx);
|
|
22714
24091
|
registerChatSettings(ctx);
|
|
22715
24092
|
registerWorld(ctx);
|