@dsh-agentic-roleplay/core 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/authoring.js +18 -223
- package/lib/client.js +1838 -489
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +1 -1
- package/lib/deliver-BSsDtF6X.js +3443 -0
- package/lib/{documents-7GMc5NnW.js → documents-B5XAdfo2.js} +992 -14
- package/lib/{gallery-DUeBMHQX.js → gallery-DS5-qH9F.js} +2 -2
- package/lib/{generator-HPifO3Kk.js → generator-BzeepLd2.js} +3 -3
- package/lib/images.js +3 -3
- package/lib/index.js +351 -13
- package/lib/narration-DK2kiIjE.js +141 -0
- package/lib/orchestration.js +867 -1547
- package/lib/{packs-alJTiDM2.js → packs-BCGK9KZV.js} +51 -7
- package/lib/{presenter-agent-PX1WVaJB.js → presenter-agent-Cp-J0onD.js} +3 -3
- package/lib/{narration-CKZTk5UE.js → settings-CA6icLL_.js} +158 -142
- package/package.json +4 -4
- package/packs/scene/strip.js +1 -1
- package/prompts/en/roleplay/character-decide.md +1 -1
- package/prompts/en/roleplay/character-rules.md +1 -1
- package/prompts/en/roleplay/chronicler.md +1 -1
- package/prompts/en/roleplay/dice.md +7 -0
- package/prompts/en/roleplay/game-master.md +3 -1
- package/prompts/en/roleplay/reflection.md +4 -2
- package/prompts/en/roleplay/style.md +1 -1
- package/prompts/en/roleplay/suggester.md +1 -1
- package/prompts/en/translate/document.md +6 -0
- package/prompts/en/translate/glossary.md +5 -0
- package/prompts/en/translate/notice.md +2 -0
- package/prompts/zh/roleplay/character-decide.md +1 -1
- package/prompts/zh/roleplay/character-rules.md +1 -1
- package/prompts/zh/roleplay/chronicler.md +1 -1
- package/prompts/zh/roleplay/dice.md +7 -0
- package/prompts/zh/roleplay/game-master.md +3 -1
- package/prompts/zh/roleplay/reflection.md +4 -2
- package/prompts/zh/roleplay/style.md +1 -1
- package/prompts/zh/roleplay/suggester.md +1 -1
- package/prompts/zh/translate/document.md +6 -0
- package/prompts/zh/translate/glossary.md +5 -0
- package/prompts/zh/translate/notice.md +2 -0
- package/lib/deliver--uMhC6oO.js +0 -1878
- package/lib/src-CWTNeL6Y.js +0 -128
package/lib/client.js
CHANGED
|
@@ -26,16 +26,16 @@ 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$26 = ".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$26 = "src/client/panel/PageTabs.module.css";
|
|
31
|
+
let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
|
|
32
|
+
if (tag$26 === null) {
|
|
33
|
+
tag$26 = document.createElement("style");
|
|
34
|
+
tag$26.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
35
|
+
tag$26.dataset.pluginCss = key$26;
|
|
36
|
+
document.head.appendChild(tag$26);
|
|
37
|
+
}
|
|
38
|
+
tag$26.textContent = css$26;
|
|
39
39
|
var PageTabs_module_css_default = {
|
|
40
40
|
"tabs": "rp_Poldga_tabs",
|
|
41
41
|
"tab": "rp_Poldga_tab"
|
|
@@ -82,20 +82,20 @@ 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$25 = ".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$25 = "src/client/panel/RoleplayPanel.module.css";
|
|
87
|
+
let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
|
|
88
|
+
if (tag$25 === null) {
|
|
89
|
+
tag$25 = document.createElement("style");
|
|
90
|
+
tag$25.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
91
|
+
tag$25.dataset.pluginCss = key$25;
|
|
92
|
+
document.head.appendChild(tag$25);
|
|
93
|
+
}
|
|
94
|
+
tag$25.textContent = css$25;
|
|
95
95
|
var RoleplayPanel_module_css_default = {
|
|
96
|
-
"panel": "rp_ua5gBa_panel",
|
|
97
|
-
"body": "rp_ua5gBa_body",
|
|
98
96
|
"title": "rp_ua5gBa_title",
|
|
97
|
+
"body": "rp_ua5gBa_body",
|
|
98
|
+
"panel": "rp_ua5gBa_panel",
|
|
99
99
|
"header": "rp_ua5gBa_header"
|
|
100
100
|
};
|
|
101
101
|
//#endregion
|
|
@@ -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$15 = {
|
|
147
147
|
en: {
|
|
148
148
|
label: "Role Play",
|
|
149
149
|
heading: "DSH Agentic Role Play",
|
|
@@ -204,7 +204,7 @@ window.__ModuleLoader__.load({
|
|
|
204
204
|
/** Adds the Role Play entry to the sidebar and the main panel it opens. */
|
|
205
205
|
function registerPanel(ctx) {
|
|
206
206
|
const t = ctx.locale.bind(NAMESPACE$10);
|
|
207
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$10, dictionaries$
|
|
207
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$10, dictionaries$15), "roleplay: panel dictionaries");
|
|
208
208
|
const pages = createPagesSource(ctx);
|
|
209
209
|
ctx.effect(() => pages.start(), "roleplay: page list");
|
|
210
210
|
const handle = createPanelStore();
|
|
@@ -734,51 +734,51 @@ window.__ModuleLoader__.load({
|
|
|
734
734
|
const isDirty = (character, draft) => Object.keys(editOf$1(character, draft)).length > 0;
|
|
735
735
|
//#endregion
|
|
736
736
|
//#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
|
|
737
|
-
const css$
|
|
738
|
-
const key$
|
|
739
|
-
let tag$
|
|
740
|
-
if (tag$
|
|
741
|
-
tag$
|
|
742
|
-
tag$
|
|
743
|
-
tag$
|
|
744
|
-
document.head.appendChild(tag$
|
|
737
|
+
const css$24 = ".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}}";
|
|
738
|
+
const key$24 = "src/client/world-editor/CharactersPanel.module.css";
|
|
739
|
+
let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
|
|
740
|
+
if (tag$24 === null) {
|
|
741
|
+
tag$24 = document.createElement("style");
|
|
742
|
+
tag$24.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
743
|
+
tag$24.dataset.pluginCss = key$24;
|
|
744
|
+
document.head.appendChild(tag$24);
|
|
745
745
|
}
|
|
746
|
-
tag$
|
|
746
|
+
tag$24.textContent = css$24;
|
|
747
747
|
var CharactersPanel_module_css_default = {
|
|
748
|
+
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
748
749
|
"help": "rp_5ZMIxq_help",
|
|
749
750
|
"field": "rp_5ZMIxq_field",
|
|
750
|
-
"
|
|
751
|
-
"area": "rp_5ZMIxq_area",
|
|
752
|
-
"placeholder": "rp_5ZMIxq_placeholder",
|
|
753
|
-
"bar": "rp_5ZMIxq_bar",
|
|
754
|
-
"tabs": "rp_5ZMIxq_tabs",
|
|
755
|
-
"meta": "rp_5ZMIxq_meta",
|
|
751
|
+
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
756
752
|
"error": "rp_5ZMIxq_error",
|
|
757
|
-
"initial": "rp_5ZMIxq_initial",
|
|
758
|
-
"nameInput": "rp_5ZMIxq_nameInput",
|
|
759
|
-
"row": "rp_5ZMIxq_row",
|
|
760
|
-
"portrait": "rp_5ZMIxq_portrait",
|
|
761
|
-
"missing": "rp_5ZMIxq_missing",
|
|
762
753
|
"empty": "rp_5ZMIxq_empty",
|
|
763
|
-
"
|
|
764
|
-
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
765
|
-
"select": "rp_5ZMIxq_select",
|
|
754
|
+
"grid": "rp_5ZMIxq_grid",
|
|
766
755
|
"head": "rp_5ZMIxq_head",
|
|
767
|
-
"
|
|
768
|
-
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
769
|
-
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
770
|
-
"barText": "rp_5ZMIxq_barText",
|
|
756
|
+
"row": "rp_5ZMIxq_row",
|
|
771
757
|
"portraitError": "rp_5ZMIxq_portraitError",
|
|
772
|
-
"grid": "rp_5ZMIxq_grid",
|
|
773
|
-
"wide": "rp_5ZMIxq_wide",
|
|
774
758
|
"sheet": "rp_5ZMIxq_sheet",
|
|
759
|
+
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
760
|
+
"placeholder": "rp_5ZMIxq_placeholder",
|
|
775
761
|
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
776
|
-
"
|
|
777
|
-
"tabOn": "rp_5ZMIxq_tabOn",
|
|
762
|
+
"wide": "rp_5ZMIxq_wide",
|
|
778
763
|
"panel": "rp_5ZMIxq_panel",
|
|
764
|
+
"initial": "rp_5ZMIxq_initial",
|
|
765
|
+
"section": "rp_5ZMIxq_section",
|
|
766
|
+
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
767
|
+
"goal": "rp_5ZMIxq_goal",
|
|
768
|
+
"barText": "rp_5ZMIxq_barText",
|
|
769
|
+
"nameInput": "rp_5ZMIxq_nameInput",
|
|
770
|
+
"tabOn": "rp_5ZMIxq_tabOn",
|
|
771
|
+
"area": "rp_5ZMIxq_area",
|
|
779
772
|
"tab": "rp_5ZMIxq_tab",
|
|
780
|
-
"
|
|
781
|
-
"
|
|
773
|
+
"missing": "rp_5ZMIxq_missing",
|
|
774
|
+
"bar": "rp_5ZMIxq_bar",
|
|
775
|
+
"select": "rp_5ZMIxq_select",
|
|
776
|
+
"meta": "rp_5ZMIxq_meta",
|
|
777
|
+
"portrait": "rp_5ZMIxq_portrait",
|
|
778
|
+
"body": "rp_5ZMIxq_body",
|
|
779
|
+
"label": "rp_5ZMIxq_label",
|
|
780
|
+
"tabs": "rp_5ZMIxq_tabs",
|
|
781
|
+
"portraitHint": "rp_5ZMIxq_portraitHint"
|
|
782
782
|
};
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region src/client/world-editor/EditorTabs.tsx
|
|
@@ -2379,50 +2379,50 @@ window.__ModuleLoader__.load({
|
|
|
2379
2379
|
}
|
|
2380
2380
|
//#endregion
|
|
2381
2381
|
//#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
|
|
2382
|
-
const css$
|
|
2383
|
-
const key$
|
|
2384
|
-
let tag$
|
|
2385
|
-
if (tag$
|
|
2386
|
-
tag$
|
|
2387
|
-
tag$
|
|
2388
|
-
tag$
|
|
2389
|
-
document.head.appendChild(tag$
|
|
2382
|
+
const css$23 = ".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:11px}.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:17px}.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:11px}.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}}";
|
|
2383
|
+
const key$23 = "src/client/world-editor/RelationsPanel.module.css";
|
|
2384
|
+
let tag$23 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$23) + "]");
|
|
2385
|
+
if (tag$23 === null) {
|
|
2386
|
+
tag$23 = document.createElement("style");
|
|
2387
|
+
tag$23.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
2388
|
+
tag$23.dataset.pluginCss = key$23;
|
|
2389
|
+
document.head.appendChild(tag$23);
|
|
2390
2390
|
}
|
|
2391
|
-
tag$
|
|
2391
|
+
tag$23.textContent = css$23;
|
|
2392
2392
|
var RelationsPanel_module_css_default = {
|
|
2393
|
-
"filter": "rp_7pEHTW_filter",
|
|
2394
|
-
"check": "rp_7pEHTW_check",
|
|
2395
|
-
"head": "rp_7pEHTW_head",
|
|
2396
|
-
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
2397
|
-
"graph": "rp_7pEHTW_graph",
|
|
2398
2393
|
"space": "rp_7pEHTW_space",
|
|
2399
|
-
"
|
|
2400
|
-
"
|
|
2401
|
-
"
|
|
2402
|
-
"
|
|
2403
|
-
"
|
|
2404
|
-
"
|
|
2394
|
+
"head": "rp_7pEHTW_head",
|
|
2395
|
+
"edge": "rp_7pEHTW_edge",
|
|
2396
|
+
"filter": "rp_7pEHTW_filter",
|
|
2397
|
+
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
2398
|
+
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
2399
|
+
"form": "rp_7pEHTW_form",
|
|
2400
|
+
"wide": "rp_7pEHTW_wide",
|
|
2405
2401
|
"notice": "rp_7pEHTW_notice",
|
|
2406
|
-
"
|
|
2407
|
-
"
|
|
2402
|
+
"graph": "rp_7pEHTW_graph",
|
|
2403
|
+
"node": "rp_7pEHTW_node",
|
|
2404
|
+
"panel": "rp_7pEHTW_panel",
|
|
2405
|
+
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
2406
|
+
"node_character": "rp_7pEHTW_node_character",
|
|
2408
2407
|
"error": "rp_7pEHTW_error",
|
|
2409
|
-
"actions": "rp_7pEHTW_actions",
|
|
2410
2408
|
"toolbar": "rp_7pEHTW_toolbar",
|
|
2411
|
-
"node": "rp_7pEHTW_node",
|
|
2412
2409
|
"entities": "rp_7pEHTW_entities",
|
|
2413
|
-
"
|
|
2414
|
-
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
2415
|
-
"metrics": "rp_7pEHTW_metrics",
|
|
2410
|
+
"node_faction": "rp_7pEHTW_node_faction",
|
|
2416
2411
|
"perspective": "rp_7pEHTW_perspective",
|
|
2417
|
-
"
|
|
2418
|
-
"
|
|
2419
|
-
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
2420
|
-
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
2421
|
-
"form": "rp_7pEHTW_form",
|
|
2422
|
-
"inspector": "rp_7pEHTW_inspector",
|
|
2423
|
-
"node_character": "rp_7pEHTW_node_character",
|
|
2412
|
+
"workspace": "rp_7pEHTW_workspace",
|
|
2413
|
+
"actions": "rp_7pEHTW_actions",
|
|
2424
2414
|
"status": "rp_7pEHTW_status",
|
|
2425
|
-
"
|
|
2415
|
+
"empty": "rp_7pEHTW_empty",
|
|
2416
|
+
"filterOn": "rp_7pEHTW_filterOn",
|
|
2417
|
+
"list": "rp_7pEHTW_list",
|
|
2418
|
+
"node_location": "rp_7pEHTW_node_location",
|
|
2419
|
+
"inspector": "rp_7pEHTW_inspector",
|
|
2420
|
+
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
2421
|
+
"check": "rp_7pEHTW_check",
|
|
2422
|
+
"node_item": "rp_7pEHTW_node_item",
|
|
2423
|
+
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
2424
|
+
"metrics": "rp_7pEHTW_metrics",
|
|
2425
|
+
"graphEdge": "rp_7pEHTW_graphEdge"
|
|
2426
2426
|
};
|
|
2427
2427
|
//#endregion
|
|
2428
2428
|
//#region src/client/world-editor/RelationsPanel.tsx
|
|
@@ -3739,23 +3739,23 @@ window.__ModuleLoader__.load({
|
|
|
3739
3739
|
};
|
|
3740
3740
|
//#endregion
|
|
3741
3741
|
//#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
|
|
3742
|
-
const css$
|
|
3743
|
-
const key$
|
|
3744
|
-
let tag$
|
|
3745
|
-
if (tag$
|
|
3746
|
-
tag$
|
|
3747
|
-
tag$
|
|
3748
|
-
tag$
|
|
3749
|
-
document.head.appendChild(tag$
|
|
3742
|
+
const css$22 = ".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}";
|
|
3743
|
+
const key$22 = "src/client/widgets/pack-frame/PackFrame.module.css";
|
|
3744
|
+
let tag$22 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$22) + "]");
|
|
3745
|
+
if (tag$22 === null) {
|
|
3746
|
+
tag$22 = document.createElement("style");
|
|
3747
|
+
tag$22.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
3748
|
+
tag$22.dataset.pluginCss = key$22;
|
|
3749
|
+
document.head.appendChild(tag$22);
|
|
3750
3750
|
}
|
|
3751
|
-
tag$
|
|
3751
|
+
tag$22.textContent = css$22;
|
|
3752
3752
|
var PackFrame_module_css_default = {
|
|
3753
3753
|
"message": "rp_h_sbFq_message",
|
|
3754
|
+
"frame": "rp_h_sbFq_frame",
|
|
3754
3755
|
"problems": "rp_h_sbFq_problems",
|
|
3755
3756
|
"hud": "rp_h_sbFq_hud",
|
|
3756
3757
|
"fill": "rp_h_sbFq_fill",
|
|
3757
|
-
"tab": "rp_h_sbFq_tab"
|
|
3758
|
-
"frame": "rp_h_sbFq_frame"
|
|
3758
|
+
"tab": "rp_h_sbFq_tab"
|
|
3759
3759
|
};
|
|
3760
3760
|
//#endregion
|
|
3761
3761
|
//#region src/client/widgets/pack-frame/theme.ts
|
|
@@ -3979,29 +3979,33 @@ window.__ModuleLoader__.load({
|
|
|
3979
3979
|
};
|
|
3980
3980
|
const loadRoutines = async (world, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/routines?${query(world)}`, init("GET", signal)));
|
|
3981
3981
|
const saveRoutine = async (world, key, windows, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/routines/item?${query(world)}&key=${encodeURIComponent(key)}`, init("PUT", signal, { windows })));
|
|
3982
|
+
const loadDice = async (world, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/dice?${query(world)}`, init("GET", signal)));
|
|
3983
|
+
const saveDice = async (world, dice, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/dice?${query(world)}`, init("PUT", signal, dice)));
|
|
3984
|
+
const loadCalendar = async (world, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/calendar?${query(world)}`, init("GET", signal)));
|
|
3985
|
+
const saveCalendar = async (world, calendar, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/calendar?${query(world)}`, init("PUT", signal, calendar)));
|
|
3982
3986
|
const loadVariables = async (world, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/variables?${query(world)}`, init("GET", signal)));
|
|
3983
3987
|
const saveVariables = async (world, variables, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/variables?${query(world)}`, init("PUT", signal, { variables })));
|
|
3984
3988
|
const loadWorldPacks = async (world, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/interface?${query(world)}`, init("GET", signal)));
|
|
3985
3989
|
const loadPackPreview = async (world, pack, signal) => await read$2(await fetch(`${API_PREFIX}/worlds/interface/preview?${query(world)}&pack=${encodeURIComponent(pack)}`, init("GET", signal)));
|
|
3986
3990
|
//#endregion
|
|
3987
3991
|
//#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
|
|
3988
|
-
const css$
|
|
3989
|
-
const key$
|
|
3990
|
-
let tag$
|
|
3991
|
-
if (tag$
|
|
3992
|
-
tag$
|
|
3993
|
-
tag$
|
|
3994
|
-
tag$
|
|
3995
|
-
document.head.appendChild(tag$
|
|
3992
|
+
const css$21 = ".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}";
|
|
3993
|
+
const key$21 = "src/client/world-editor/PacksPanel.module.css";
|
|
3994
|
+
let tag$21 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$21) + "]");
|
|
3995
|
+
if (tag$21 === null) {
|
|
3996
|
+
tag$21 = document.createElement("style");
|
|
3997
|
+
tag$21.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
3998
|
+
tag$21.dataset.pluginCss = key$21;
|
|
3999
|
+
document.head.appendChild(tag$21);
|
|
3996
4000
|
}
|
|
3997
|
-
tag$
|
|
4001
|
+
tag$21.textContent = css$21;
|
|
3998
4002
|
var PacksPanel_module_css_default = {
|
|
3999
4003
|
"note": "rp_FLaP7q_note",
|
|
4000
|
-
"stageTall": "rp_FLaP7q_stageTall",
|
|
4001
4004
|
"group": "rp_FLaP7q_group",
|
|
4002
4005
|
"stage": "rp_FLaP7q_stage",
|
|
4003
|
-
"log": "rp_FLaP7q_log",
|
|
4004
4006
|
"controls": "rp_FLaP7q_controls",
|
|
4007
|
+
"stageTall": "rp_FLaP7q_stageTall",
|
|
4008
|
+
"log": "rp_FLaP7q_log",
|
|
4005
4009
|
"files": "rp_FLaP7q_files"
|
|
4006
4010
|
};
|
|
4007
4011
|
//#endregion
|
|
@@ -4441,7 +4445,7 @@ window.__ModuleLoader__.load({
|
|
|
4441
4445
|
}
|
|
4442
4446
|
//#endregion
|
|
4443
4447
|
//#region src/client/world-editor/InfoPanel.tsx
|
|
4444
|
-
const draftOf$
|
|
4448
|
+
const draftOf$3 = (info) => ({
|
|
4445
4449
|
name: info.name,
|
|
4446
4450
|
description: info.description,
|
|
4447
4451
|
tags: info.tags.join(", "),
|
|
@@ -4488,8 +4492,8 @@ window.__ModuleLoader__.load({
|
|
|
4488
4492
|
const abort = new AbortController();
|
|
4489
4493
|
loadInfo(worldId, abort.signal).then((value) => {
|
|
4490
4494
|
setInfo(value);
|
|
4491
|
-
setSaved(draftOf$
|
|
4492
|
-
setDraft(draftOf$
|
|
4495
|
+
setSaved(draftOf$3(value));
|
|
4496
|
+
setDraft(draftOf$3(value));
|
|
4493
4497
|
}, (failure) => {
|
|
4494
4498
|
if (!abort.signal.aborted) setStatus({
|
|
4495
4499
|
state: "failed",
|
|
@@ -4525,8 +4529,8 @@ window.__ModuleLoader__.load({
|
|
|
4525
4529
|
setStatus({ state: "saving" });
|
|
4526
4530
|
saveInfo(worldId, edit, new AbortController().signal).then((value) => {
|
|
4527
4531
|
setInfo(value);
|
|
4528
|
-
setSaved(draftOf$
|
|
4529
|
-
setDraft(draftOf$
|
|
4532
|
+
setSaved(draftOf$3(value));
|
|
4533
|
+
setDraft(draftOf$3(value));
|
|
4530
4534
|
setStatus({ state: "saved" });
|
|
4531
4535
|
onSaved();
|
|
4532
4536
|
}, (failure) => {
|
|
@@ -5112,6 +5116,32 @@ window.__ModuleLoader__.load({
|
|
|
5112
5116
|
})
|
|
5113
5117
|
]
|
|
5114
5118
|
}),
|
|
5119
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5120
|
+
className: `${CharactersPanel_module_css_default.field} ${CharactersPanel_module_css_default.wide}`,
|
|
5121
|
+
children: [
|
|
5122
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5123
|
+
className: CharactersPanel_module_css_default.label,
|
|
5124
|
+
children: t("routineOn")
|
|
5125
|
+
}),
|
|
5126
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5127
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
5128
|
+
value: (window.on ?? []).join(", "),
|
|
5129
|
+
placeholder: "dec, 12-24, season:winter, !holiday:festival",
|
|
5130
|
+
onChange: (event) => {
|
|
5131
|
+
const on = event.target.value.split(",").map((part) => part.trim()).filter((part) => part !== "");
|
|
5132
|
+
const { on: _o, ...rest } = window;
|
|
5133
|
+
change(draft.map((item, at) => at === index ? {
|
|
5134
|
+
...rest,
|
|
5135
|
+
...on.length === 0 ? {} : { on }
|
|
5136
|
+
} : item));
|
|
5137
|
+
}
|
|
5138
|
+
}),
|
|
5139
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5140
|
+
className: CharactersPanel_module_css_default.help,
|
|
5141
|
+
children: t("routineOnHelp")
|
|
5142
|
+
})
|
|
5143
|
+
]
|
|
5144
|
+
}),
|
|
5115
5145
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5116
5146
|
className: CharactersPanel_module_css_default.field,
|
|
5117
5147
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -5224,74 +5254,962 @@ window.__ModuleLoader__.load({
|
|
|
5224
5254
|
});
|
|
5225
5255
|
}
|
|
5226
5256
|
//#endregion
|
|
5227
|
-
//#region src/client/world-editor/
|
|
5228
|
-
const
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
description: "",
|
|
5236
|
-
min: "",
|
|
5237
|
-
max: "",
|
|
5238
|
-
integer: false,
|
|
5239
|
-
baseline: false,
|
|
5240
|
-
always: false,
|
|
5241
|
-
default: "",
|
|
5242
|
-
only: "",
|
|
5243
|
-
options: "",
|
|
5244
|
-
bands: ""
|
|
5245
|
-
};
|
|
5246
|
-
const draftOf = (value) => ({
|
|
5247
|
-
key: value.key,
|
|
5248
|
-
name: value.name,
|
|
5249
|
-
kind: value.kind,
|
|
5250
|
-
subject: value.subject,
|
|
5251
|
-
visibility: value.visibility,
|
|
5252
|
-
description: value.description ?? "",
|
|
5253
|
-
min: value.min === void 0 ? "" : String(value.min),
|
|
5254
|
-
max: value.max === void 0 ? "" : String(value.max),
|
|
5255
|
-
integer: value.integer === true,
|
|
5256
|
-
baseline: value.baseline === true,
|
|
5257
|
-
always: value.always === true,
|
|
5258
|
-
default: value.default === void 0 ? "" : String(value.default),
|
|
5259
|
-
only: (value.only ?? []).join(", "),
|
|
5260
|
-
options: (value.options ?? []).join(", "),
|
|
5261
|
-
bands: (value.bands ?? []).map((band) => `${band.up_to}: ${band.label}`).join("\n")
|
|
5257
|
+
//#region src/client/world-editor/CalendarPanel.tsx
|
|
5258
|
+
const draftOf$2 = (calendar) => ({
|
|
5259
|
+
hemisphere: calendar.hemisphere,
|
|
5260
|
+
holidays: calendar.holidays.map((holiday) => ({
|
|
5261
|
+
id: holiday.id,
|
|
5262
|
+
name: holiday.name,
|
|
5263
|
+
on: holiday.on.join(", ")
|
|
5264
|
+
}))
|
|
5262
5265
|
});
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5266
|
+
const documentOf$1 = (draft) => ({
|
|
5267
|
+
hemisphere: draft.hemisphere,
|
|
5268
|
+
holidays: draft.holidays.map((holiday) => ({
|
|
5269
|
+
id: holiday.id.trim(),
|
|
5270
|
+
name: holiday.name.trim(),
|
|
5271
|
+
on: holiday.on.split(/[,,\n]/).map((day) => day.trim()).filter((day) => day !== "")
|
|
5272
|
+
}))
|
|
5273
|
+
});
|
|
5274
|
+
/** The calendar of a world: which hemisphere its seasons follow, and its holidays, each told by the days it falls on. */
|
|
5275
|
+
function CalendarPanel({ t, worldId, actions }) {
|
|
5276
|
+
const [saved, setSaved] = (0, react.useState)();
|
|
5277
|
+
const [draft, setDraft] = (0, react.useState)({
|
|
5278
|
+
hemisphere: "north",
|
|
5279
|
+
holidays: []
|
|
5274
5280
|
});
|
|
5275
|
-
const [
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5281
|
+
const [status, setStatus] = (0, react.useState)({ state: "idle" });
|
|
5282
|
+
(0, react.useEffect)(() => {
|
|
5283
|
+
const abort = new AbortController();
|
|
5284
|
+
loadCalendar(worldId, abort.signal).then((value) => {
|
|
5285
|
+
const next = draftOf$2(value);
|
|
5286
|
+
setSaved(next);
|
|
5287
|
+
setDraft(next);
|
|
5288
|
+
}, (failure) => {
|
|
5289
|
+
if (!abort.signal.aborted) setStatus({
|
|
5290
|
+
state: "failed",
|
|
5291
|
+
message: failure instanceof Error ? failure.message : String(failure)
|
|
5292
|
+
});
|
|
5293
|
+
});
|
|
5294
|
+
return () => {
|
|
5295
|
+
abort.abort();
|
|
5296
|
+
};
|
|
5297
|
+
}, [worldId]);
|
|
5298
|
+
if (saved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5299
|
+
className: CharactersPanel_module_css_default.empty,
|
|
5300
|
+
role: status.state === "failed" ? "alert" : void 0,
|
|
5301
|
+
children: status.state === "failed" ? t("saveFailed", { message: status.message ?? "" }) : t("editorLoading")
|
|
5302
|
+
});
|
|
5303
|
+
const dirty = JSON.stringify(documentOf$1(draft)) !== JSON.stringify(documentOf$1(saved));
|
|
5304
|
+
const change = (next) => {
|
|
5305
|
+
setDraft(next);
|
|
5306
|
+
setStatus({ state: "idle" });
|
|
5307
|
+
};
|
|
5308
|
+
const patch = (index, fields) => {
|
|
5309
|
+
change({
|
|
5310
|
+
...draft,
|
|
5311
|
+
holidays: draft.holidays.map((entry, at) => at === index ? {
|
|
5312
|
+
...entry,
|
|
5313
|
+
...fields
|
|
5314
|
+
} : entry)
|
|
5315
|
+
});
|
|
5316
|
+
};
|
|
5317
|
+
const save = () => {
|
|
5318
|
+
setStatus({ state: "saving" });
|
|
5319
|
+
saveCalendar(worldId, documentOf$1(draft), new AbortController().signal).then((value) => {
|
|
5320
|
+
const next = draftOf$2(value);
|
|
5321
|
+
setSaved(next);
|
|
5322
|
+
setDraft(next);
|
|
5323
|
+
setStatus({ state: "saved" });
|
|
5324
|
+
}, (failure) => {
|
|
5325
|
+
setStatus({
|
|
5326
|
+
state: "failed",
|
|
5327
|
+
message: failure instanceof Error ? failure.message : String(failure)
|
|
5328
|
+
});
|
|
5329
|
+
});
|
|
5330
|
+
};
|
|
5331
|
+
const field = (index, key, label, wide = false, placeholder) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5332
|
+
className: `${CharactersPanel_module_css_default.field} ${wide ? CharactersPanel_module_css_default.wide : ""}`,
|
|
5333
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5334
|
+
className: CharactersPanel_module_css_default.label,
|
|
5335
|
+
children: t(label)
|
|
5336
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5337
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
5338
|
+
value: draft.holidays[index][key],
|
|
5339
|
+
placeholder,
|
|
5340
|
+
onChange: (event) => {
|
|
5341
|
+
patch(index, { [key]: event.target.value });
|
|
5342
|
+
}
|
|
5343
|
+
})]
|
|
5344
|
+
});
|
|
5345
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5346
|
+
className: CharactersPanel_module_css_default.panel,
|
|
5347
|
+
"data-testid": "roleplay-calendar",
|
|
5348
|
+
children: [
|
|
5349
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5350
|
+
className: CharactersPanel_module_css_default.tabs,
|
|
5351
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: CharactersPanel_module_css_default.tabsSpace }), actions]
|
|
5352
|
+
}),
|
|
5353
|
+
(dirty || status.state !== "idle") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5354
|
+
className: CharactersPanel_module_css_default.bar,
|
|
5355
|
+
role: "status",
|
|
5356
|
+
children: [
|
|
5357
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5358
|
+
className: status.state === "failed" ? CharactersPanel_module_css_default.error : CharactersPanel_module_css_default.barText,
|
|
5359
|
+
children: status.state === "failed" ? t("saveFailed", { message: status.message ?? "" }) : dirty ? t("unsaved") : t("saved")
|
|
5360
|
+
}),
|
|
5361
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5362
|
+
variant: "ghost",
|
|
5363
|
+
size: "sm",
|
|
5364
|
+
onClick: () => {
|
|
5365
|
+
setDraft(saved);
|
|
5366
|
+
setStatus({ state: "idle" });
|
|
5367
|
+
},
|
|
5368
|
+
children: t("reset")
|
|
5369
|
+
}),
|
|
5370
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5371
|
+
variant: "primary",
|
|
5372
|
+
size: "sm",
|
|
5373
|
+
disabled: status.state === "saving",
|
|
5374
|
+
onClick: save,
|
|
5375
|
+
children: status.state === "saving" ? t("saving") : t("save")
|
|
5376
|
+
})
|
|
5377
|
+
]
|
|
5378
|
+
}),
|
|
5379
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5380
|
+
className: CharactersPanel_module_css_default.body,
|
|
5381
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
|
|
5382
|
+
className: CharactersPanel_module_css_default.sheet,
|
|
5383
|
+
children: [
|
|
5384
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5385
|
+
className: CharactersPanel_module_css_default.help,
|
|
5386
|
+
children: t("calendarHelp")
|
|
5387
|
+
}),
|
|
5388
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
|
|
5389
|
+
className: CharactersPanel_module_css_default.section,
|
|
5390
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5391
|
+
className: CharactersPanel_module_css_default.grid,
|
|
5392
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5393
|
+
className: CharactersPanel_module_css_default.field,
|
|
5394
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5395
|
+
className: CharactersPanel_module_css_default.label,
|
|
5396
|
+
children: t("calendarHemisphere")
|
|
5397
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5398
|
+
value: draft.hemisphere,
|
|
5399
|
+
onChange: (event) => {
|
|
5400
|
+
change({
|
|
5401
|
+
...draft,
|
|
5402
|
+
hemisphere: event.target.value
|
|
5403
|
+
});
|
|
5404
|
+
},
|
|
5405
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5406
|
+
value: "north",
|
|
5407
|
+
children: t("hemisphereNorth")
|
|
5408
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5409
|
+
value: "south",
|
|
5410
|
+
children: t("hemisphereSouth")
|
|
5411
|
+
})]
|
|
5412
|
+
})]
|
|
5413
|
+
})
|
|
5414
|
+
})
|
|
5415
|
+
}),
|
|
5416
|
+
draft.holidays.map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
|
|
5417
|
+
className: CharactersPanel_module_css_default.section,
|
|
5418
|
+
"data-testid": "roleplay-holiday",
|
|
5419
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5420
|
+
className: CharactersPanel_module_css_default.grid,
|
|
5421
|
+
children: [
|
|
5422
|
+
field(index, "id", "holidayId"),
|
|
5423
|
+
field(index, "name", "holidayName"),
|
|
5424
|
+
field(index, "on", "holidayOn", true, "09-21, nth:fri:last"),
|
|
5425
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5426
|
+
variant: "ghost",
|
|
5427
|
+
size: "sm",
|
|
5428
|
+
onClick: () => {
|
|
5429
|
+
change({
|
|
5430
|
+
...draft,
|
|
5431
|
+
holidays: draft.holidays.filter((__, at) => at !== index)
|
|
5432
|
+
});
|
|
5433
|
+
},
|
|
5434
|
+
children: t("holidayRemove")
|
|
5435
|
+
})
|
|
5436
|
+
]
|
|
5437
|
+
})
|
|
5438
|
+
}, index)),
|
|
5439
|
+
draft.holidays.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5440
|
+
className: CharactersPanel_module_css_default.empty,
|
|
5441
|
+
children: t("holidaysNone")
|
|
5442
|
+
}),
|
|
5443
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5444
|
+
variant: "ghost",
|
|
5445
|
+
size: "sm",
|
|
5446
|
+
onClick: () => {
|
|
5447
|
+
change({
|
|
5448
|
+
...draft,
|
|
5449
|
+
holidays: [...draft.holidays, {
|
|
5450
|
+
id: "",
|
|
5451
|
+
name: "",
|
|
5452
|
+
on: ""
|
|
5453
|
+
}]
|
|
5454
|
+
});
|
|
5455
|
+
},
|
|
5456
|
+
children: t("holidayAdd")
|
|
5457
|
+
})
|
|
5458
|
+
]
|
|
5459
|
+
})
|
|
5460
|
+
})
|
|
5461
|
+
]
|
|
5462
|
+
});
|
|
5463
|
+
}
|
|
5464
|
+
//#endregion
|
|
5465
|
+
//#region src/client/widgets/tool-switches/tools-api.ts
|
|
5466
|
+
/** The tools other plugins registered for everyone (a file or shell tool, an MCP server's), which an agent can be given. */
|
|
5467
|
+
async function loadExternalTools(signal) {
|
|
5468
|
+
const response = await fetch(`${API_PREFIX}/tools`, {
|
|
5469
|
+
credentials: "same-origin",
|
|
5470
|
+
signal
|
|
5471
|
+
});
|
|
5472
|
+
if (!response.ok) throw new Error(`${response.status} ${response.statusText}`.trim());
|
|
5473
|
+
return (await response.json()).tools ?? [];
|
|
5474
|
+
}
|
|
5475
|
+
//#endregion
|
|
5476
|
+
//#region src/shared/tools.ts
|
|
5477
|
+
/** The kinds of agent whose tools can be chosen. A character is not one agent but a kind: the choice is for all of them. */
|
|
5478
|
+
const AGENT_KINDS = [
|
|
5479
|
+
"gameMaster",
|
|
5480
|
+
"characters",
|
|
5481
|
+
"records"
|
|
5482
|
+
];
|
|
5483
|
+
/** What this version can offer. A name in a settings file or a world that is not here is kept and ignored. */
|
|
5484
|
+
const OPTIONAL_TOOLS = [
|
|
5485
|
+
{
|
|
5486
|
+
id: "roll_check",
|
|
5487
|
+
agent: "gameMaster",
|
|
5488
|
+
default: true
|
|
5489
|
+
},
|
|
5490
|
+
{
|
|
5491
|
+
id: "roll_dice",
|
|
5492
|
+
agent: "gameMaster",
|
|
5493
|
+
default: true
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
id: "list_checks",
|
|
5497
|
+
agent: "gameMaster",
|
|
5498
|
+
default: true
|
|
5499
|
+
}
|
|
5500
|
+
];
|
|
5501
|
+
/** Whether an agent of this kind has a tool, by what the switches say and, failing that, by default. A tool this version does not offer is never on. */
|
|
5502
|
+
function toolEnabled(board, agent, id) {
|
|
5503
|
+
const offered = OPTIONAL_TOOLS.find((tool) => tool.agent === agent && tool.id === id);
|
|
5504
|
+
if (offered === void 0) return false;
|
|
5505
|
+
return board[agent]?.[id] ?? offered.default;
|
|
5506
|
+
}
|
|
5507
|
+
/** The tools this version offers for each kind of agent, as the switches stand; names it does not know are left out. */
|
|
5508
|
+
function switchesOf(board) {
|
|
5509
|
+
return AGENT_KINDS.map((agent) => ({
|
|
5510
|
+
agent,
|
|
5511
|
+
tools: OPTIONAL_TOOLS.filter((tool) => tool.agent === agent).map((tool) => ({
|
|
5512
|
+
id: tool.id,
|
|
5513
|
+
enabled: toolEnabled(board, agent, tool.id),
|
|
5514
|
+
default: tool.default
|
|
5515
|
+
}))
|
|
5516
|
+
}));
|
|
5517
|
+
}
|
|
5518
|
+
/**
|
|
5519
|
+
* The switches after one is set. Names this version does not know stay as they were, and a switch set to what the tool is by default is dropped,
|
|
5520
|
+
* so that a settings file says only what was chosen.
|
|
5521
|
+
*/
|
|
5522
|
+
function withSwitch(board, agent, id, enabled) {
|
|
5523
|
+
const offered = OPTIONAL_TOOLS.find((tool) => tool.agent === agent && tool.id === id);
|
|
5524
|
+
if (offered === void 0) throw new Error(`there is no tool "${id}" to switch for ${agent}`);
|
|
5525
|
+
const mine = { ...board[agent] };
|
|
5526
|
+
if (enabled === offered.default) delete mine[id];
|
|
5527
|
+
else mine[id] = enabled;
|
|
5528
|
+
const next = {
|
|
5529
|
+
...board,
|
|
5530
|
+
[agent]: mine
|
|
5531
|
+
};
|
|
5532
|
+
if (Object.keys(mine).length === 0) delete next[agent];
|
|
5533
|
+
return next;
|
|
5534
|
+
}
|
|
5535
|
+
/**
|
|
5536
|
+
* Whether an agent of this kind has a tool that is not one of this plugin's own: only when it was switched on. Such tools are off by default, because
|
|
5537
|
+
* they reach beyond the story (files, a shell, the web), and a name that no plugin registers now has no effect.
|
|
5538
|
+
*/
|
|
5539
|
+
function externalEnabled(board, agent, name) {
|
|
5540
|
+
return board[agent]?.[name] === true;
|
|
5541
|
+
}
|
|
5542
|
+
/** The switches after an external tool is switched: only what is on is kept, so that a settings file says only what was chosen. */
|
|
5543
|
+
function withExternal(board, agent, name, enabled) {
|
|
5544
|
+
const mine = { ...board[agent] };
|
|
5545
|
+
if (enabled) mine[name] = true;
|
|
5546
|
+
else delete mine[name];
|
|
5547
|
+
const next = {
|
|
5548
|
+
...board,
|
|
5549
|
+
[agent]: mine
|
|
5550
|
+
};
|
|
5551
|
+
if (Object.keys(mine).length === 0) delete next[agent];
|
|
5552
|
+
return next;
|
|
5553
|
+
}
|
|
5554
|
+
//#endregion
|
|
5555
|
+
//#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
|
|
5556
|
+
const css$20 = ".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:11px}.rp_CjoFLq_error{color:var(--dsw-alias-state-error-primary,#d33);font-size:12px}.rp_CjoFLq_external{flex-direction:column;gap:6px;margin-top:4px;display:flex}.rp_CjoFLq_external>summary{cursor:pointer}";
|
|
5557
|
+
const key$20 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
|
|
5558
|
+
let tag$20 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$20) + "]");
|
|
5559
|
+
if (tag$20 === null) {
|
|
5560
|
+
tag$20 = document.createElement("style");
|
|
5561
|
+
tag$20.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
5562
|
+
tag$20.dataset.pluginCss = key$20;
|
|
5563
|
+
document.head.appendChild(tag$20);
|
|
5564
|
+
}
|
|
5565
|
+
tag$20.textContent = css$20;
|
|
5566
|
+
var ToolSwitches_module_css_default = {
|
|
5567
|
+
"external": "rp_CjoFLq_external",
|
|
5568
|
+
"title": "rp_CjoFLq_title",
|
|
5569
|
+
"tool": "rp_CjoFLq_tool",
|
|
5570
|
+
"agent": "rp_CjoFLq_agent",
|
|
5571
|
+
"agentName": "rp_CjoFLq_agentName",
|
|
5572
|
+
"toolText": "rp_CjoFLq_toolText",
|
|
5573
|
+
"help": "rp_CjoFLq_help",
|
|
5574
|
+
"hint": "rp_CjoFLq_hint",
|
|
5575
|
+
"root": "rp_CjoFLq_root",
|
|
5576
|
+
"default": "rp_CjoFLq_default",
|
|
5577
|
+
"error": "rp_CjoFLq_error"
|
|
5578
|
+
};
|
|
5579
|
+
//#endregion
|
|
5580
|
+
//#region src/client/widgets/tool-switches/ToolSwitches.tsx
|
|
5581
|
+
/**
|
|
5582
|
+
* The optional tools of each kind of agent, each a switch. It shows only the tools this version offers: names in the board it does not know
|
|
5583
|
+
* stay in it untouched, so that what a world or a settings file carries from another version survives a change made here.
|
|
5584
|
+
*/
|
|
5585
|
+
function ToolSwitches({ board, onChange, disabled, error, external = [], t }) {
|
|
5586
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5587
|
+
className: ToolSwitches_module_css_default.root,
|
|
5588
|
+
"data-testid": "roleplay-tool-switches",
|
|
5589
|
+
"data-rp": "tool-switches",
|
|
5590
|
+
children: [
|
|
5591
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
5592
|
+
className: ToolSwitches_module_css_default.title,
|
|
5593
|
+
children: t("sw_title")
|
|
5594
|
+
}),
|
|
5595
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5596
|
+
className: ToolSwitches_module_css_default.help,
|
|
5597
|
+
children: t("sw_help")
|
|
5598
|
+
}),
|
|
5599
|
+
error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5600
|
+
className: ToolSwitches_module_css_default.error,
|
|
5601
|
+
role: "alert",
|
|
5602
|
+
children: t("sw_failed", { message: error })
|
|
5603
|
+
}),
|
|
5604
|
+
switchesOf(board).map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5605
|
+
className: ToolSwitches_module_css_default.agent,
|
|
5606
|
+
"data-agent": entry.agent,
|
|
5607
|
+
children: [
|
|
5608
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5609
|
+
className: ToolSwitches_module_css_default.agentName,
|
|
5610
|
+
children: t(`sw_agent_${entry.agent}`)
|
|
5611
|
+
}),
|
|
5612
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5613
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5614
|
+
children: t(`sw_agent_${entry.agent}_hint`)
|
|
5615
|
+
}),
|
|
5616
|
+
entry.tools.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5617
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5618
|
+
children: t("sw_none")
|
|
5619
|
+
}),
|
|
5620
|
+
entry.tools.map((tool) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5621
|
+
className: ToolSwitches_module_css_default.tool,
|
|
5622
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5623
|
+
type: "checkbox",
|
|
5624
|
+
checked: tool.enabled,
|
|
5625
|
+
disabled,
|
|
5626
|
+
"data-tool": tool.id,
|
|
5627
|
+
onChange: (event) => {
|
|
5628
|
+
onChange(withSwitch(board, entry.agent, tool.id, event.target.checked));
|
|
5629
|
+
}
|
|
5630
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5631
|
+
className: ToolSwitches_module_css_default.toolText,
|
|
5632
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [t(`sw_tool_${tool.id}`), tool.default ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5633
|
+
className: ToolSwitches_module_css_default.default,
|
|
5634
|
+
children: t("sw_default")
|
|
5635
|
+
}) : null] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5636
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5637
|
+
children: t(`sw_tool_${tool.id}_hint`)
|
|
5638
|
+
})]
|
|
5639
|
+
})]
|
|
5640
|
+
}, tool.id)),
|
|
5641
|
+
external.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
5642
|
+
className: ToolSwitches_module_css_default.external,
|
|
5643
|
+
"data-testid": "roleplay-external-tools",
|
|
5644
|
+
children: [
|
|
5645
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
5646
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5647
|
+
children: t("sw_external", {
|
|
5648
|
+
count: String(external.length),
|
|
5649
|
+
on: String(external.filter((tool) => externalEnabled(board, entry.agent, tool.name)).length)
|
|
5650
|
+
})
|
|
5651
|
+
}),
|
|
5652
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5653
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5654
|
+
children: t("sw_external_help")
|
|
5655
|
+
}),
|
|
5656
|
+
external.map((tool) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5657
|
+
className: ToolSwitches_module_css_default.tool,
|
|
5658
|
+
title: tool.description,
|
|
5659
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5660
|
+
type: "checkbox",
|
|
5661
|
+
checked: externalEnabled(board, entry.agent, tool.name),
|
|
5662
|
+
disabled,
|
|
5663
|
+
"data-external": tool.name,
|
|
5664
|
+
onChange: (event) => {
|
|
5665
|
+
onChange(withExternal(board, entry.agent, tool.name, event.target.checked));
|
|
5666
|
+
}
|
|
5667
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5668
|
+
className: ToolSwitches_module_css_default.toolText,
|
|
5669
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tool.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5670
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5671
|
+
children: tool.description.length > 140 ? `${tool.description.slice(0, 140)}…` : tool.description
|
|
5672
|
+
})]
|
|
5673
|
+
})]
|
|
5674
|
+
}, tool.name))
|
|
5675
|
+
]
|
|
5676
|
+
})
|
|
5677
|
+
]
|
|
5678
|
+
}, entry.agent)),
|
|
5679
|
+
external.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5680
|
+
className: ToolSwitches_module_css_default.hint,
|
|
5681
|
+
children: t("sw_external_none")
|
|
5682
|
+
})
|
|
5683
|
+
]
|
|
5684
|
+
});
|
|
5685
|
+
}
|
|
5686
|
+
//#endregion
|
|
5687
|
+
//#region src/client/world-editor/ToolsPanel.tsx
|
|
5688
|
+
/** The optional tools the world's agents have, kept in `world.json` and given to every story started from the world; a story can change them for itself later. */
|
|
5689
|
+
function ToolsPanel({ t, worldId, actions }) {
|
|
5690
|
+
const [board, setBoard] = (0, react.useState)();
|
|
5691
|
+
const [external, setExternal] = (0, react.useState)([]);
|
|
5692
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
5693
|
+
const [error, setError] = (0, react.useState)();
|
|
5694
|
+
(0, react.useEffect)(() => {
|
|
5695
|
+
const abort = new AbortController();
|
|
5696
|
+
loadInfo(worldId, abort.signal).then((info) => {
|
|
5697
|
+
setBoard(info.tools);
|
|
5698
|
+
}, (failure) => {
|
|
5699
|
+
if (!abort.signal.aborted) setError(failure instanceof Error ? failure.message : String(failure));
|
|
5700
|
+
});
|
|
5701
|
+
loadExternalTools(abort.signal).then(setExternal, () => void 0);
|
|
5702
|
+
return () => {
|
|
5703
|
+
abort.abort();
|
|
5704
|
+
};
|
|
5705
|
+
}, [worldId]);
|
|
5706
|
+
if (board === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5707
|
+
className: CharactersPanel_module_css_default.empty,
|
|
5708
|
+
role: error === void 0 ? void 0 : "alert",
|
|
5709
|
+
children: error === void 0 ? t("editorLoading") : t("saveFailed", { message: error })
|
|
5710
|
+
});
|
|
5711
|
+
const change = (next) => {
|
|
5712
|
+
setBusy(true);
|
|
5713
|
+
setError(void 0);
|
|
5714
|
+
saveInfo(worldId, { tools: next }, new AbortController().signal).then((info) => {
|
|
5715
|
+
setBoard(info.tools);
|
|
5716
|
+
}, (failure) => {
|
|
5717
|
+
setError(failure instanceof Error ? failure.message : String(failure));
|
|
5718
|
+
}).finally(() => {
|
|
5719
|
+
setBusy(false);
|
|
5720
|
+
});
|
|
5721
|
+
};
|
|
5722
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5723
|
+
className: CharactersPanel_module_css_default.panel,
|
|
5724
|
+
"data-testid": "roleplay-world-tools",
|
|
5725
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5726
|
+
className: CharactersPanel_module_css_default.tabs,
|
|
5727
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: CharactersPanel_module_css_default.tabsSpace }), actions]
|
|
5728
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5729
|
+
className: CharactersPanel_module_css_default.body,
|
|
5730
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", {
|
|
5731
|
+
className: CharactersPanel_module_css_default.sheet,
|
|
5732
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolSwitches, {
|
|
5733
|
+
board,
|
|
5734
|
+
onChange: change,
|
|
5735
|
+
disabled: busy,
|
|
5736
|
+
external,
|
|
5737
|
+
...error === void 0 ? {} : { error },
|
|
5738
|
+
t
|
|
5739
|
+
})
|
|
5740
|
+
})
|
|
5741
|
+
})]
|
|
5742
|
+
});
|
|
5743
|
+
}
|
|
5744
|
+
//#endregion
|
|
5745
|
+
//#region src/client/world-editor/DicePanel.tsx
|
|
5746
|
+
const draftOf$1 = (dice) => dice.checks.map((check) => ({
|
|
5747
|
+
key: check.key,
|
|
5748
|
+
name: check.name,
|
|
5749
|
+
use: check.use,
|
|
5750
|
+
dice: check.dice,
|
|
5751
|
+
reading: check.reading ?? "total",
|
|
5752
|
+
hit: check.hit === void 0 ? "" : String(check.hit),
|
|
5753
|
+
compare: check.compare ?? "absolute",
|
|
5754
|
+
modifier: check.modifier ?? "",
|
|
5755
|
+
bands: check.bands.map((band) => ({
|
|
5756
|
+
min: band.min === void 0 ? "" : String(band.min),
|
|
5757
|
+
max: band.max === void 0 ? "" : String(band.max),
|
|
5758
|
+
label: band.label,
|
|
5759
|
+
result: band.result,
|
|
5760
|
+
critical: band.critical === true
|
|
5761
|
+
}))
|
|
5762
|
+
}));
|
|
5763
|
+
const number = (text) => text.trim() === "" || !Number.isFinite(Number(text)) ? void 0 : Number(text);
|
|
5764
|
+
const documentOf = (drafts) => ({ checks: drafts.map((check) => ({
|
|
5765
|
+
key: check.key.trim(),
|
|
5766
|
+
name: check.name.trim(),
|
|
5767
|
+
use: check.use.trim(),
|
|
5768
|
+
dice: check.dice.trim(),
|
|
5769
|
+
...check.reading === "total" ? {} : { reading: check.reading },
|
|
5770
|
+
...check.reading === "successes" && number(check.hit) !== void 0 ? { hit: number(check.hit) } : {},
|
|
5771
|
+
...check.compare === "absolute" ? {} : { compare: check.compare },
|
|
5772
|
+
...check.modifier.trim() === "" ? {} : { modifier: check.modifier.trim() },
|
|
5773
|
+
bands: check.bands.map((band) => ({
|
|
5774
|
+
label: band.label.trim(),
|
|
5775
|
+
result: band.result,
|
|
5776
|
+
...number(band.min) === void 0 ? {} : { min: number(band.min) },
|
|
5777
|
+
...number(band.max) === void 0 ? {} : { max: number(band.max) },
|
|
5778
|
+
...band.critical ? { critical: true } : {}
|
|
5779
|
+
}))
|
|
5780
|
+
})) });
|
|
5781
|
+
const blankBand = () => ({
|
|
5782
|
+
min: "",
|
|
5783
|
+
max: "",
|
|
5784
|
+
label: "",
|
|
5785
|
+
result: "succeeded",
|
|
5786
|
+
critical: false
|
|
5787
|
+
});
|
|
5788
|
+
const blankCheck = () => ({
|
|
5789
|
+
key: "",
|
|
5790
|
+
name: "",
|
|
5791
|
+
use: "",
|
|
5792
|
+
dice: "1d20",
|
|
5793
|
+
reading: "total",
|
|
5794
|
+
hit: "",
|
|
5795
|
+
compare: "absolute",
|
|
5796
|
+
modifier: "",
|
|
5797
|
+
bands: [blankBand()]
|
|
5798
|
+
});
|
|
5799
|
+
/** The dice checks of a world: what each is used for, the dice it rolls and the bands that say what a roll means. */
|
|
5800
|
+
function DicePanel({ t, worldId, actions }) {
|
|
5801
|
+
const [saved, setSaved] = (0, react.useState)();
|
|
5802
|
+
const [draft, setDraft] = (0, react.useState)([]);
|
|
5803
|
+
const [status, setStatus] = (0, react.useState)({ state: "idle" });
|
|
5804
|
+
(0, react.useEffect)(() => {
|
|
5805
|
+
const abort = new AbortController();
|
|
5806
|
+
loadDice(worldId, abort.signal).then((value) => {
|
|
5807
|
+
const next = draftOf$1(value);
|
|
5808
|
+
setSaved(next);
|
|
5809
|
+
setDraft(next);
|
|
5810
|
+
}, (failure) => {
|
|
5811
|
+
if (!abort.signal.aborted) setStatus({
|
|
5812
|
+
state: "failed",
|
|
5813
|
+
message: failure instanceof Error ? failure.message : String(failure)
|
|
5814
|
+
});
|
|
5815
|
+
});
|
|
5816
|
+
return () => {
|
|
5817
|
+
abort.abort();
|
|
5818
|
+
};
|
|
5819
|
+
}, [worldId]);
|
|
5820
|
+
if (saved === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5821
|
+
className: CharactersPanel_module_css_default.empty,
|
|
5822
|
+
role: status.state === "failed" ? "alert" : void 0,
|
|
5823
|
+
children: status.state === "failed" ? t("saveFailed", { message: status.message ?? "" }) : t("editorLoading")
|
|
5824
|
+
});
|
|
5825
|
+
const dirty = JSON.stringify(documentOf(draft)) !== JSON.stringify(documentOf(saved));
|
|
5826
|
+
const change = (next) => {
|
|
5827
|
+
setDraft(next);
|
|
5828
|
+
setStatus({ state: "idle" });
|
|
5829
|
+
};
|
|
5830
|
+
const patch = (index, fields) => {
|
|
5831
|
+
change(draft.map((entry, at) => at === index ? {
|
|
5832
|
+
...entry,
|
|
5833
|
+
...fields
|
|
5834
|
+
} : entry));
|
|
5835
|
+
};
|
|
5836
|
+
const patchBand = (index, band, fields) => {
|
|
5837
|
+
patch(index, { bands: draft[index].bands.map((entry, at) => at === band ? {
|
|
5838
|
+
...entry,
|
|
5839
|
+
...fields
|
|
5840
|
+
} : entry) });
|
|
5841
|
+
};
|
|
5842
|
+
const save = () => {
|
|
5843
|
+
setStatus({ state: "saving" });
|
|
5844
|
+
saveDice(worldId, documentOf(draft), new AbortController().signal).then((value) => {
|
|
5845
|
+
const next = draftOf$1(value);
|
|
5846
|
+
setSaved(next);
|
|
5847
|
+
setDraft(next);
|
|
5848
|
+
setStatus({ state: "saved" });
|
|
5849
|
+
}, (failure) => {
|
|
5850
|
+
setStatus({
|
|
5851
|
+
state: "failed",
|
|
5852
|
+
message: failure instanceof Error ? failure.message : String(failure)
|
|
5853
|
+
});
|
|
5854
|
+
});
|
|
5855
|
+
};
|
|
5856
|
+
const text = (index, key, label, help) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5857
|
+
className: CharactersPanel_module_css_default.field,
|
|
5858
|
+
children: [
|
|
5859
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5860
|
+
className: CharactersPanel_module_css_default.label,
|
|
5861
|
+
children: t(label)
|
|
5862
|
+
}),
|
|
5863
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5864
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
5865
|
+
value: draft[index][key],
|
|
5866
|
+
onChange: (event) => {
|
|
5867
|
+
patch(index, { [key]: event.target.value });
|
|
5868
|
+
}
|
|
5869
|
+
}),
|
|
5870
|
+
help !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5871
|
+
className: CharactersPanel_module_css_default.help,
|
|
5872
|
+
children: t(help)
|
|
5873
|
+
})
|
|
5874
|
+
]
|
|
5875
|
+
});
|
|
5876
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5877
|
+
className: CharactersPanel_module_css_default.panel,
|
|
5878
|
+
"data-testid": "roleplay-dice-editor",
|
|
5879
|
+
children: [
|
|
5880
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5881
|
+
className: CharactersPanel_module_css_default.tabs,
|
|
5882
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: CharactersPanel_module_css_default.tabsSpace }), actions]
|
|
5883
|
+
}),
|
|
5884
|
+
(dirty || status.state !== "idle") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5885
|
+
className: CharactersPanel_module_css_default.bar,
|
|
5886
|
+
role: "status",
|
|
5887
|
+
children: [
|
|
5888
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5889
|
+
className: status.state === "failed" ? CharactersPanel_module_css_default.error : CharactersPanel_module_css_default.barText,
|
|
5890
|
+
children: status.state === "failed" ? t("saveFailed", { message: status.message ?? "" }) : dirty ? t("unsaved") : t("saved")
|
|
5891
|
+
}),
|
|
5892
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5893
|
+
variant: "ghost",
|
|
5894
|
+
size: "sm",
|
|
5895
|
+
onClick: () => {
|
|
5896
|
+
setDraft(saved);
|
|
5897
|
+
setStatus({ state: "idle" });
|
|
5898
|
+
},
|
|
5899
|
+
children: t("reset")
|
|
5900
|
+
}),
|
|
5901
|
+
dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5902
|
+
variant: "primary",
|
|
5903
|
+
size: "sm",
|
|
5904
|
+
disabled: status.state === "saving",
|
|
5905
|
+
onClick: save,
|
|
5906
|
+
children: status.state === "saving" ? t("saving") : t("save")
|
|
5907
|
+
})
|
|
5908
|
+
]
|
|
5909
|
+
}),
|
|
5910
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5911
|
+
className: CharactersPanel_module_css_default.body,
|
|
5912
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
|
|
5913
|
+
className: CharactersPanel_module_css_default.sheet,
|
|
5914
|
+
children: [
|
|
5915
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5916
|
+
className: CharactersPanel_module_css_default.help,
|
|
5917
|
+
children: t("dice_help")
|
|
5918
|
+
}),
|
|
5919
|
+
draft.map((check, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5920
|
+
className: CharactersPanel_module_css_default.section,
|
|
5921
|
+
"data-testid": "roleplay-dice-check",
|
|
5922
|
+
children: [
|
|
5923
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5924
|
+
className: CharactersPanel_module_css_default.grid,
|
|
5925
|
+
children: [
|
|
5926
|
+
text(index, "key", "dice_key"),
|
|
5927
|
+
text(index, "name", "dice_name"),
|
|
5928
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5929
|
+
className: `${CharactersPanel_module_css_default.field} ${CharactersPanel_module_css_default.wide}`,
|
|
5930
|
+
children: [
|
|
5931
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5932
|
+
className: CharactersPanel_module_css_default.label,
|
|
5933
|
+
children: t("dice_use")
|
|
5934
|
+
}),
|
|
5935
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
5936
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
5937
|
+
rows: 2,
|
|
5938
|
+
value: check.use,
|
|
5939
|
+
onChange: (event) => {
|
|
5940
|
+
patch(index, { use: event.target.value });
|
|
5941
|
+
}
|
|
5942
|
+
}),
|
|
5943
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5944
|
+
className: CharactersPanel_module_css_default.help,
|
|
5945
|
+
children: t("dice_useHelp")
|
|
5946
|
+
})
|
|
5947
|
+
]
|
|
5948
|
+
}),
|
|
5949
|
+
text(index, "dice", "dice_dice", "dice_diceHelp"),
|
|
5950
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5951
|
+
className: CharactersPanel_module_css_default.field,
|
|
5952
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5953
|
+
className: CharactersPanel_module_css_default.label,
|
|
5954
|
+
children: t("dice_reading")
|
|
5955
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5956
|
+
value: check.reading,
|
|
5957
|
+
onChange: (event) => {
|
|
5958
|
+
patch(index, { reading: event.target.value });
|
|
5959
|
+
},
|
|
5960
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5961
|
+
value: "total",
|
|
5962
|
+
children: t("dice_readTotal")
|
|
5963
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5964
|
+
value: "successes",
|
|
5965
|
+
children: t("dice_readSuccesses")
|
|
5966
|
+
})]
|
|
5967
|
+
})]
|
|
5968
|
+
}),
|
|
5969
|
+
check.reading === "successes" && text(index, "hit", "dice_hit"),
|
|
5970
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5971
|
+
className: CharactersPanel_module_css_default.field,
|
|
5972
|
+
children: [
|
|
5973
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5974
|
+
className: CharactersPanel_module_css_default.label,
|
|
5975
|
+
children: t("dice_compare")
|
|
5976
|
+
}),
|
|
5977
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5978
|
+
value: check.compare,
|
|
5979
|
+
onChange: (event) => {
|
|
5980
|
+
patch(index, { compare: event.target.value });
|
|
5981
|
+
},
|
|
5982
|
+
children: [
|
|
5983
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5984
|
+
value: "absolute",
|
|
5985
|
+
children: t("dice_compareAbsolute")
|
|
5986
|
+
}),
|
|
5987
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5988
|
+
value: "over",
|
|
5989
|
+
children: t("dice_compareOver")
|
|
5990
|
+
}),
|
|
5991
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5992
|
+
value: "under",
|
|
5993
|
+
children: t("dice_compareUnder")
|
|
5994
|
+
})
|
|
5995
|
+
]
|
|
5996
|
+
}),
|
|
5997
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5998
|
+
className: CharactersPanel_module_css_default.help,
|
|
5999
|
+
children: t("dice_compareHelp")
|
|
6000
|
+
})
|
|
6001
|
+
]
|
|
6002
|
+
}),
|
|
6003
|
+
text(index, "modifier", "dice_modifier", "dice_modifierHelp")
|
|
6004
|
+
]
|
|
6005
|
+
}),
|
|
6006
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6007
|
+
className: CharactersPanel_module_css_default.label,
|
|
6008
|
+
children: t("dice_bands")
|
|
6009
|
+
}),
|
|
6010
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6011
|
+
className: CharactersPanel_module_css_default.help,
|
|
6012
|
+
children: t("dice_bandsHelp")
|
|
6013
|
+
}),
|
|
6014
|
+
check.bands.map((band, at) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6015
|
+
className: CharactersPanel_module_css_default.grid,
|
|
6016
|
+
"data-testid": "roleplay-dice-band",
|
|
6017
|
+
children: [
|
|
6018
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6019
|
+
className: CharactersPanel_module_css_default.field,
|
|
6020
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6021
|
+
className: CharactersPanel_module_css_default.label,
|
|
6022
|
+
children: t("dice_bandMin")
|
|
6023
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6024
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
6025
|
+
value: band.min,
|
|
6026
|
+
onChange: (event) => {
|
|
6027
|
+
patchBand(index, at, { min: event.target.value });
|
|
6028
|
+
}
|
|
6029
|
+
})]
|
|
6030
|
+
}),
|
|
6031
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6032
|
+
className: CharactersPanel_module_css_default.field,
|
|
6033
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6034
|
+
className: CharactersPanel_module_css_default.label,
|
|
6035
|
+
children: t("dice_bandMax")
|
|
6036
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6037
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
6038
|
+
value: band.max,
|
|
6039
|
+
onChange: (event) => {
|
|
6040
|
+
patchBand(index, at, { max: event.target.value });
|
|
6041
|
+
}
|
|
6042
|
+
})]
|
|
6043
|
+
}),
|
|
6044
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6045
|
+
className: CharactersPanel_module_css_default.field,
|
|
6046
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6047
|
+
className: CharactersPanel_module_css_default.label,
|
|
6048
|
+
children: t("dice_bandLabel")
|
|
6049
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6050
|
+
className: CharactersPanel_module_css_default.nameInput,
|
|
6051
|
+
value: band.label,
|
|
6052
|
+
onChange: (event) => {
|
|
6053
|
+
patchBand(index, at, { label: event.target.value });
|
|
6054
|
+
}
|
|
6055
|
+
})]
|
|
6056
|
+
}),
|
|
6057
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6058
|
+
className: CharactersPanel_module_css_default.field,
|
|
6059
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6060
|
+
className: CharactersPanel_module_css_default.label,
|
|
6061
|
+
children: t("dice_bandResult")
|
|
6062
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
6063
|
+
value: band.result,
|
|
6064
|
+
onChange: (event) => {
|
|
6065
|
+
patchBand(index, at, { result: event.target.value });
|
|
6066
|
+
},
|
|
6067
|
+
children: [
|
|
6068
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
6069
|
+
value: "succeeded",
|
|
6070
|
+
children: t("dice_resultSucceeded")
|
|
6071
|
+
}),
|
|
6072
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
6073
|
+
value: "partial",
|
|
6074
|
+
children: t("dice_resultPartial")
|
|
6075
|
+
}),
|
|
6076
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
6077
|
+
value: "failed",
|
|
6078
|
+
children: t("dice_resultFailed")
|
|
6079
|
+
})
|
|
6080
|
+
]
|
|
6081
|
+
})]
|
|
6082
|
+
}),
|
|
6083
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6084
|
+
className: CharactersPanel_module_css_default.field,
|
|
6085
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6086
|
+
className: CharactersPanel_module_css_default.label,
|
|
6087
|
+
children: t("dice_bandCritical")
|
|
6088
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6089
|
+
type: "checkbox",
|
|
6090
|
+
checked: band.critical,
|
|
6091
|
+
onChange: (event) => {
|
|
6092
|
+
patchBand(index, at, { critical: event.target.checked });
|
|
6093
|
+
}
|
|
6094
|
+
})]
|
|
6095
|
+
}),
|
|
6096
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6097
|
+
variant: "ghost",
|
|
6098
|
+
size: "sm",
|
|
6099
|
+
onClick: () => {
|
|
6100
|
+
patch(index, { bands: check.bands.filter((_, other) => other !== at) });
|
|
6101
|
+
},
|
|
6102
|
+
children: t("dice_bandRemove")
|
|
6103
|
+
})
|
|
6104
|
+
]
|
|
6105
|
+
}, at)),
|
|
6106
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6107
|
+
className: CharactersPanel_module_css_default.grid,
|
|
6108
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6109
|
+
variant: "ghost",
|
|
6110
|
+
size: "sm",
|
|
6111
|
+
onClick: () => {
|
|
6112
|
+
patch(index, { bands: [...check.bands, blankBand()] });
|
|
6113
|
+
},
|
|
6114
|
+
children: t("dice_bandAdd")
|
|
6115
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6116
|
+
variant: "ghost",
|
|
6117
|
+
size: "sm",
|
|
6118
|
+
onClick: () => {
|
|
6119
|
+
change(draft.filter((_, other) => other !== index));
|
|
6120
|
+
},
|
|
6121
|
+
children: t("dice_remove")
|
|
6122
|
+
})]
|
|
6123
|
+
})
|
|
6124
|
+
]
|
|
6125
|
+
}, index)),
|
|
6126
|
+
draft.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
6127
|
+
className: CharactersPanel_module_css_default.empty,
|
|
6128
|
+
children: t("dice_none")
|
|
6129
|
+
}),
|
|
6130
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6131
|
+
variant: "ghost",
|
|
6132
|
+
size: "sm",
|
|
6133
|
+
onClick: () => {
|
|
6134
|
+
change([...draft, blankCheck()]);
|
|
6135
|
+
},
|
|
6136
|
+
children: t("dice_add")
|
|
6137
|
+
})
|
|
6138
|
+
]
|
|
6139
|
+
})
|
|
6140
|
+
})
|
|
6141
|
+
]
|
|
6142
|
+
});
|
|
6143
|
+
}
|
|
6144
|
+
//#endregion
|
|
6145
|
+
//#region src/client/world-editor/variables-draft.ts
|
|
6146
|
+
const list = (value) => value.split(/[,,\n]/).map((entry) => entry.trim()).filter((entry) => entry !== "");
|
|
6147
|
+
const NEW = {
|
|
6148
|
+
key: "",
|
|
6149
|
+
name: "",
|
|
6150
|
+
kind: "number",
|
|
6151
|
+
subject: "character",
|
|
6152
|
+
visibility: "public",
|
|
6153
|
+
description: "",
|
|
6154
|
+
min: "",
|
|
6155
|
+
max: "",
|
|
6156
|
+
integer: false,
|
|
6157
|
+
baseline: false,
|
|
6158
|
+
always: false,
|
|
6159
|
+
default: "",
|
|
6160
|
+
only: "",
|
|
6161
|
+
options: "",
|
|
6162
|
+
bands: ""
|
|
6163
|
+
};
|
|
6164
|
+
const draftOf = (value) => ({
|
|
6165
|
+
key: value.key,
|
|
6166
|
+
name: value.name,
|
|
6167
|
+
kind: value.kind,
|
|
6168
|
+
subject: value.subject,
|
|
6169
|
+
visibility: value.visibility,
|
|
6170
|
+
description: value.description ?? "",
|
|
6171
|
+
min: value.min === void 0 ? "" : String(value.min),
|
|
6172
|
+
max: value.max === void 0 ? "" : String(value.max),
|
|
6173
|
+
integer: value.integer === true,
|
|
6174
|
+
baseline: value.baseline === true,
|
|
6175
|
+
always: value.always === true,
|
|
6176
|
+
default: value.default === void 0 ? "" : String(value.default),
|
|
6177
|
+
only: (value.only ?? []).join(", "),
|
|
6178
|
+
options: (value.options ?? []).join(", "),
|
|
6179
|
+
bands: (value.bands ?? []).map((band) => `${band.up_to}: ${band.label}`).join("\n")
|
|
6180
|
+
});
|
|
6181
|
+
/** The declaration as it will be sent: a default is a number, true/false or text according to the kind; bands are `up to: label` lines. */
|
|
6182
|
+
function declarationOf(draft) {
|
|
6183
|
+
const number = (text) => text.trim() === "" || !Number.isFinite(Number(text)) ? void 0 : Number(text);
|
|
6184
|
+
const defaultValue = draft.default.trim() === "" ? void 0 : draft.kind === "number" ? number(draft.default) ?? draft.default.trim() : draft.kind === "flag" ? draft.default.trim() === "true" : draft.default.trim();
|
|
6185
|
+
const bands = draft.bands.split("\n").flatMap((line) => {
|
|
6186
|
+
const at = line.indexOf(":");
|
|
6187
|
+
const upTo = at < 0 ? void 0 : number(line.slice(0, at));
|
|
6188
|
+
return upTo === void 0 ? [] : [{
|
|
6189
|
+
up_to: upTo,
|
|
6190
|
+
label: line.slice(at + 1).trim()
|
|
6191
|
+
}];
|
|
6192
|
+
});
|
|
6193
|
+
const [min, max, only, options] = [
|
|
6194
|
+
number(draft.min),
|
|
6195
|
+
number(draft.max),
|
|
6196
|
+
list(draft.only),
|
|
6197
|
+
list(draft.options)
|
|
6198
|
+
];
|
|
6199
|
+
return {
|
|
6200
|
+
key: draft.key.trim(),
|
|
6201
|
+
name: draft.name.trim(),
|
|
6202
|
+
kind: draft.kind,
|
|
6203
|
+
subject: draft.subject,
|
|
6204
|
+
visibility: draft.visibility,
|
|
6205
|
+
...draft.description.trim() === "" ? {} : { description: draft.description.trim() },
|
|
6206
|
+
...draft.kind === "number" && min !== void 0 ? { min } : {},
|
|
6207
|
+
...draft.kind === "number" && max !== void 0 ? { max } : {},
|
|
6208
|
+
...draft.kind === "number" && draft.integer ? { integer: true } : {},
|
|
6209
|
+
...draft.baseline ? { baseline: true } : {},
|
|
6210
|
+
...draft.always ? { always: true } : {},
|
|
6211
|
+
...defaultValue === void 0 ? {} : { default: defaultValue },
|
|
6212
|
+
...only.length === 0 ? {} : { only },
|
|
5295
6213
|
...draft.kind === "choice" && options.length > 0 ? { options } : {},
|
|
5296
6214
|
...draft.kind === "number" && bands.length > 0 ? { bands } : {}
|
|
5297
6215
|
};
|
|
@@ -5654,46 +6572,46 @@ window.__ModuleLoader__.load({
|
|
|
5654
6572
|
const imageUrl = (target, image) => `${route(target, "/file")}&path=${encodeURIComponent(image.path)}&v=${encodeURIComponent(image.createdAt)}`;
|
|
5655
6573
|
//#endregion
|
|
5656
6574
|
//#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
|
|
5657
|
-
const css$
|
|
5658
|
-
const key$
|
|
5659
|
-
let tag$
|
|
5660
|
-
if (tag$
|
|
5661
|
-
tag$
|
|
5662
|
-
tag$
|
|
5663
|
-
tag$
|
|
5664
|
-
document.head.appendChild(tag$
|
|
6575
|
+
const css$19 = ".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:11px;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:11px;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:11px}.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))}}";
|
|
6576
|
+
const key$19 = "src/client/widgets/gallery-view/GalleryView.module.css";
|
|
6577
|
+
let tag$19 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$19) + "]");
|
|
6578
|
+
if (tag$19 === null) {
|
|
6579
|
+
tag$19 = document.createElement("style");
|
|
6580
|
+
tag$19.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6581
|
+
tag$19.dataset.pluginCss = key$19;
|
|
6582
|
+
document.head.appendChild(tag$19);
|
|
5665
6583
|
}
|
|
5666
|
-
tag$
|
|
6584
|
+
tag$19.textContent = css$19;
|
|
5667
6585
|
var GalleryView_module_css_default = {
|
|
5668
|
-
"
|
|
5669
|
-
"
|
|
5670
|
-
"
|
|
5671
|
-
"editField": "rp_9pSHmG_editField",
|
|
6586
|
+
"pre": "rp_9pSHmG_pre",
|
|
6587
|
+
"error": "rp_9pSHmG_error",
|
|
6588
|
+
"large": "rp_9pSHmG_large",
|
|
5672
6589
|
"facts": "rp_9pSHmG_facts",
|
|
6590
|
+
"editButton": "rp_9pSHmG_editButton",
|
|
6591
|
+
"editField": "rp_9pSHmG_editField",
|
|
6592
|
+
"cell": "rp_9pSHmG_cell",
|
|
5673
6593
|
"editArea": "rp_9pSHmG_editArea",
|
|
5674
|
-
"
|
|
6594
|
+
"count": "rp_9pSHmG_count",
|
|
6595
|
+
"thumb": "rp_9pSHmG_thumb",
|
|
5675
6596
|
"editHelp": "rp_9pSHmG_editHelp",
|
|
6597
|
+
"grid": "rp_9pSHmG_grid",
|
|
5676
6598
|
"status": "rp_9pSHmG_status",
|
|
5677
|
-
"reusable": "rp_9pSHmG_reusable",
|
|
5678
|
-
"editButton": "rp_9pSHmG_editButton",
|
|
5679
|
-
"page": "rp_9pSHmG_page",
|
|
5680
|
-
"pre": "rp_9pSHmG_pre",
|
|
5681
|
-
"actions": "rp_9pSHmG_actions",
|
|
5682
|
-
"error": "rp_9pSHmG_error",
|
|
5683
|
-
"toolbar": "rp_9pSHmG_toolbar",
|
|
5684
6599
|
"open": "rp_9pSHmG_open",
|
|
6600
|
+
"reusable": "rp_9pSHmG_reusable",
|
|
6601
|
+
"detail": "rp_9pSHmG_detail",
|
|
5685
6602
|
"tags": "rp_9pSHmG_tags",
|
|
6603
|
+
"toolbar": "rp_9pSHmG_toolbar",
|
|
5686
6604
|
"note": "rp_9pSHmG_note",
|
|
5687
|
-
"large": "rp_9pSHmG_large",
|
|
5688
|
-
"count": "rp_9pSHmG_count",
|
|
5689
|
-
"image": "rp_9pSHmG_image",
|
|
5690
|
-
"select": "rp_9pSHmG_select",
|
|
5691
6605
|
"edit": "rp_9pSHmG_edit",
|
|
5692
|
-
"
|
|
6606
|
+
"page": "rp_9pSHmG_page",
|
|
5693
6607
|
"editLabel": "rp_9pSHmG_editLabel",
|
|
5694
|
-
"
|
|
5695
|
-
"
|
|
5696
|
-
"
|
|
6608
|
+
"message": "rp_9pSHmG_message",
|
|
6609
|
+
"image": "rp_9pSHmG_image",
|
|
6610
|
+
"caption": "rp_9pSHmG_caption",
|
|
6611
|
+
"editInput": "rp_9pSHmG_editInput",
|
|
6612
|
+
"statusError": "rp_9pSHmG_statusError",
|
|
6613
|
+
"actions": "rp_9pSHmG_actions",
|
|
6614
|
+
"select": "rp_9pSHmG_select"
|
|
5697
6615
|
};
|
|
5698
6616
|
//#endregion
|
|
5699
6617
|
//#region src/client/widgets/gallery-view/GalleryView.tsx
|
|
@@ -6023,23 +6941,23 @@ window.__ModuleLoader__.load({
|
|
|
6023
6941
|
}
|
|
6024
6942
|
//#endregion
|
|
6025
6943
|
//#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
|
|
6026
|
-
const css$
|
|
6027
|
-
const key$
|
|
6028
|
-
let tag$
|
|
6029
|
-
if (tag$
|
|
6030
|
-
tag$
|
|
6031
|
-
tag$
|
|
6032
|
-
tag$
|
|
6033
|
-
document.head.appendChild(tag$
|
|
6944
|
+
const css$18 = ".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}";
|
|
6945
|
+
const key$18 = "src/client/world-editor/WorldEditor.module.css";
|
|
6946
|
+
let tag$18 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$18) + "]");
|
|
6947
|
+
if (tag$18 === null) {
|
|
6948
|
+
tag$18 = document.createElement("style");
|
|
6949
|
+
tag$18.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6950
|
+
tag$18.dataset.pluginCss = key$18;
|
|
6951
|
+
document.head.appendChild(tag$18);
|
|
6034
6952
|
}
|
|
6035
|
-
tag$
|
|
6953
|
+
tag$18.textContent = css$18;
|
|
6036
6954
|
var WorldEditor_module_css_default = {
|
|
6955
|
+
"warning": "rp__swA3a_warning",
|
|
6956
|
+
"drawerItem": "rp__swA3a_drawerItem",
|
|
6037
6957
|
"view": "rp__swA3a_view",
|
|
6038
6958
|
"drawer": "rp__swA3a_drawer",
|
|
6039
6959
|
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
6040
|
-
"drawerItem": "rp__swA3a_drawerItem",
|
|
6041
6960
|
"content": "rp__swA3a_content",
|
|
6042
|
-
"warning": "rp__swA3a_warning",
|
|
6043
6961
|
"message": "rp__swA3a_message"
|
|
6044
6962
|
};
|
|
6045
6963
|
//#endregion
|
|
@@ -6097,12 +7015,30 @@ window.__ModuleLoader__.load({
|
|
|
6097
7015
|
built: true,
|
|
6098
7016
|
ownFiles: true
|
|
6099
7017
|
},
|
|
7018
|
+
{
|
|
7019
|
+
id: "calendar",
|
|
7020
|
+
label: "sectionCalendar",
|
|
7021
|
+
built: true,
|
|
7022
|
+
ownFiles: true
|
|
7023
|
+
},
|
|
6100
7024
|
{
|
|
6101
7025
|
id: "variables",
|
|
6102
7026
|
label: "sectionVariables",
|
|
6103
7027
|
built: true,
|
|
6104
7028
|
ownFiles: true
|
|
6105
7029
|
},
|
|
7030
|
+
{
|
|
7031
|
+
id: "dice",
|
|
7032
|
+
label: "sectionDice",
|
|
7033
|
+
built: true,
|
|
7034
|
+
ownFiles: true
|
|
7035
|
+
},
|
|
7036
|
+
{
|
|
7037
|
+
id: "tools",
|
|
7038
|
+
label: "sectionTools",
|
|
7039
|
+
built: true,
|
|
7040
|
+
ownFiles: true
|
|
7041
|
+
},
|
|
6106
7042
|
{
|
|
6107
7043
|
id: "prompts",
|
|
6108
7044
|
label: "sectionPrompts",
|
|
@@ -6211,10 +7147,43 @@ window.__ModuleLoader__.load({
|
|
|
6211
7147
|
children: t("editorRefresh")
|
|
6212
7148
|
})
|
|
6213
7149
|
}),
|
|
6214
|
-
section === "prompts" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromptsPanel, {
|
|
7150
|
+
section === "prompts" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromptsPanel, {
|
|
7151
|
+
t,
|
|
7152
|
+
worldId: source.worldId,
|
|
7153
|
+
language: t("language"),
|
|
7154
|
+
actions: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7155
|
+
variant: "ghost",
|
|
7156
|
+
size: "sm",
|
|
7157
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}),
|
|
7158
|
+
onClick: refresh,
|
|
7159
|
+
children: t("editorRefresh")
|
|
7160
|
+
})
|
|
7161
|
+
}),
|
|
7162
|
+
section === "routines" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RoutinesPanel, {
|
|
7163
|
+
t,
|
|
7164
|
+
worldId: source.worldId,
|
|
7165
|
+
actions: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7166
|
+
variant: "ghost",
|
|
7167
|
+
size: "sm",
|
|
7168
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}),
|
|
7169
|
+
onClick: refresh,
|
|
7170
|
+
children: t("editorRefresh")
|
|
7171
|
+
})
|
|
7172
|
+
}),
|
|
7173
|
+
section === "calendar" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarPanel, {
|
|
7174
|
+
t,
|
|
7175
|
+
worldId: source.worldId,
|
|
7176
|
+
actions: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7177
|
+
variant: "ghost",
|
|
7178
|
+
size: "sm",
|
|
7179
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {}),
|
|
7180
|
+
onClick: refresh,
|
|
7181
|
+
children: t("editorRefresh")
|
|
7182
|
+
})
|
|
7183
|
+
}),
|
|
7184
|
+
section === "dice" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DicePanel, {
|
|
6215
7185
|
t,
|
|
6216
7186
|
worldId: source.worldId,
|
|
6217
|
-
language: t("language"),
|
|
6218
7187
|
actions: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6219
7188
|
variant: "ghost",
|
|
6220
7189
|
size: "sm",
|
|
@@ -6223,7 +7192,7 @@ window.__ModuleLoader__.load({
|
|
|
6223
7192
|
children: t("editorRefresh")
|
|
6224
7193
|
})
|
|
6225
7194
|
}),
|
|
6226
|
-
section === "
|
|
7195
|
+
section === "tools" && source.worldId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolsPanel, {
|
|
6227
7196
|
t,
|
|
6228
7197
|
worldId: source.worldId,
|
|
6229
7198
|
actions: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
@@ -6372,38 +7341,38 @@ window.__ModuleLoader__.load({
|
|
|
6372
7341
|
}
|
|
6373
7342
|
//#endregion
|
|
6374
7343
|
//#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
|
|
6375
|
-
const css$
|
|
6376
|
-
const key$
|
|
6377
|
-
let tag$
|
|
6378
|
-
if (tag$
|
|
6379
|
-
tag$
|
|
6380
|
-
tag$
|
|
6381
|
-
tag$
|
|
6382
|
-
document.head.appendChild(tag$
|
|
7344
|
+
const css$17 = ".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}}";
|
|
7345
|
+
const key$17 = "src/client/pages/avatars/AvatarsPage.module.css";
|
|
7346
|
+
let tag$17 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$17) + "]");
|
|
7347
|
+
if (tag$17 === null) {
|
|
7348
|
+
tag$17 = document.createElement("style");
|
|
7349
|
+
tag$17.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
7350
|
+
tag$17.dataset.pluginCss = key$17;
|
|
7351
|
+
document.head.appendChild(tag$17);
|
|
6383
7352
|
}
|
|
6384
|
-
tag$
|
|
7353
|
+
tag$17.textContent = css$17;
|
|
6385
7354
|
var AvatarsPage_module_css_default = {
|
|
6386
|
-
"
|
|
6387
|
-
"
|
|
6388
|
-
"
|
|
6389
|
-
"form": "rp_pQOzEG_form",
|
|
6390
|
-
"field": "rp_pQOzEG_field",
|
|
7355
|
+
"error": "rp_pQOzEG_error",
|
|
7356
|
+
"actions": "rp_pQOzEG_actions",
|
|
7357
|
+
"placeholder": "rp_pQOzEG_placeholder",
|
|
6391
7358
|
"name": "rp_pQOzEG_name",
|
|
6392
|
-
"message": "rp_pQOzEG_message",
|
|
6393
|
-
"toolbar": "rp_pQOzEG_toolbar",
|
|
6394
|
-
"label": "rp_pQOzEG_label",
|
|
6395
|
-
"editBody": "rp_pQOzEG_editBody",
|
|
6396
|
-
"viewport": "rp_pQOzEG_viewport",
|
|
6397
7359
|
"grid": "rp_pQOzEG_grid",
|
|
6398
|
-
"
|
|
7360
|
+
"editTitle": "rp_pQOzEG_editTitle",
|
|
7361
|
+
"viewport": "rp_pQOzEG_viewport",
|
|
6399
7362
|
"count": "rp_pQOzEG_count",
|
|
6400
|
-
"actions": "rp_pQOzEG_actions",
|
|
6401
7363
|
"card": "rp_pQOzEG_card",
|
|
6402
|
-
"
|
|
7364
|
+
"message": "rp_pQOzEG_message",
|
|
7365
|
+
"form": "rp_pQOzEG_form",
|
|
6403
7366
|
"page": "rp_pQOzEG_page",
|
|
7367
|
+
"portrait": "rp_pQOzEG_portrait",
|
|
6404
7368
|
"editHeader": "rp_pQOzEG_editHeader",
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
7369
|
+
"label": "rp_pQOzEG_label",
|
|
7370
|
+
"toolbar": "rp_pQOzEG_toolbar",
|
|
7371
|
+
"open": "rp_pQOzEG_open",
|
|
7372
|
+
"editBody": "rp_pQOzEG_editBody",
|
|
7373
|
+
"text": "rp_pQOzEG_text",
|
|
7374
|
+
"summary": "rp_pQOzEG_summary",
|
|
7375
|
+
"field": "rp_pQOzEG_field"
|
|
6407
7376
|
};
|
|
6408
7377
|
//#endregion
|
|
6409
7378
|
//#region src/client/pages/avatars/AvatarsPage.tsx
|
|
@@ -6685,8 +7654,56 @@ window.__ModuleLoader__.load({
|
|
|
6685
7654
|
return Object.fromEntries(Object.keys(dictionaries).map((locale) => [locale, Object.fromEntries(Object.entries(dictionaries[locale]).map(([key, value]) => [`${prefix}${key}`, value]))]));
|
|
6686
7655
|
}
|
|
6687
7656
|
//#endregion
|
|
7657
|
+
//#region src/client/widgets/tool-switches/locales.ts
|
|
7658
|
+
const dictionaries$14 = {
|
|
7659
|
+
en: {
|
|
7660
|
+
sw_title: "Tools",
|
|
7661
|
+
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.",
|
|
7662
|
+
sw_external: "Tools from other plugins: {on} of {count} on",
|
|
7663
|
+
sw_external_help: "Registered by other plugins for everyone (files, a shell, MCP servers such as a search). They are off unless you switch them on, and a tool acts with whatever access its plugin has, so switch on only what this agent should be able to do. A tool that is not registered now is kept here and has no effect.",
|
|
7664
|
+
sw_external_none: "No tools from other plugins are registered right now. Load a plugin that registers tools for everyone (a file or shell tool, an MCP server) and they are offered here.",
|
|
7665
|
+
sw_none: "No optional tools for this agent yet.",
|
|
7666
|
+
sw_default: "default",
|
|
7667
|
+
sw_failed: "Could not change the tools: {message}",
|
|
7668
|
+
sw_agent_gameMaster: "Game master",
|
|
7669
|
+
sw_agent_gameMaster_hint: "Decides what happens and writes the narration.",
|
|
7670
|
+
sw_agent_characters: "Characters",
|
|
7671
|
+
sw_agent_characters_hint: "Every character that is asked to act.",
|
|
7672
|
+
sw_agent_records: "Record keeper",
|
|
7673
|
+
sw_agent_records_hint: "Writes what happened into the story's records in the background.",
|
|
7674
|
+
sw_tool_roll_check: "Roll a check",
|
|
7675
|
+
sw_tool_roll_check_hint: "Rolls one of the world's checks for an uncertain attempt and reads the result with the world's own rules.",
|
|
7676
|
+
sw_tool_roll_dice: "Roll dice",
|
|
7677
|
+
sw_tool_roll_dice_hint: "Rolls plain dice (2d6+1, d100) for what has no check, so that no number is made up.",
|
|
7678
|
+
sw_tool_list_checks: "List checks",
|
|
7679
|
+
sw_tool_list_checks_hint: "Shows the world's checks and when each is used."
|
|
7680
|
+
},
|
|
7681
|
+
zh: {
|
|
7682
|
+
sw_title: "工具",
|
|
7683
|
+
sw_help: "每一类智能体可以使用哪些可选工具。选择对该类的所有智能体生效,而不是只针对某一个角色。此版本不认识的工具保持原样,也不显示。",
|
|
7684
|
+
sw_external: "来自其他插件的工具:{count} 个中开启 {on} 个",
|
|
7685
|
+
sw_external_help: "由其他插件为所有人注册的工具(文件、命令行、搜索之类的 MCP 服务器)。除非你开启,否则它们都是关闭的;工具以其插件所拥有的权限运行,所以只开启这个智能体应该能做的事。当前没有注册的工具会保留在这里,但不起作用。",
|
|
7686
|
+
sw_external_none: "当前没有其他插件注册的工具。加载一个为所有人注册工具的插件(文件或命令行工具、MCP 服务器)后,它们会在这里提供。",
|
|
7687
|
+
sw_none: "该智能体暂时没有可选工具。",
|
|
7688
|
+
sw_default: "默认",
|
|
7689
|
+
sw_failed: "无法更改工具:{message}",
|
|
7690
|
+
sw_agent_gameMaster: "主持人",
|
|
7691
|
+
sw_agent_gameMaster_hint: "决定发生什么,并撰写叙述。",
|
|
7692
|
+
sw_agent_characters: "角色",
|
|
7693
|
+
sw_agent_characters_hint: "每一个被要求行动的角色。",
|
|
7694
|
+
sw_agent_records: "记录员",
|
|
7695
|
+
sw_agent_records_hint: "在后台把发生的事写入故事记录。",
|
|
7696
|
+
sw_tool_roll_check: "进行检定",
|
|
7697
|
+
sw_tool_roll_check_hint: "为不确定的尝试掷出世界定义的检定,并按世界自己的规则解读结果。",
|
|
7698
|
+
sw_tool_roll_dice: "掷骰子",
|
|
7699
|
+
sw_tool_roll_dice_hint: "为没有检定的事掷普通骰子(2d6+1、d100),不让任何数字被编造。",
|
|
7700
|
+
sw_tool_list_checks: "列出检定",
|
|
7701
|
+
sw_tool_list_checks_hint: "显示世界的检定以及各自的使用场合。"
|
|
7702
|
+
}
|
|
7703
|
+
};
|
|
7704
|
+
//#endregion
|
|
6688
7705
|
//#region src/client/widgets/gallery-view/locales.ts
|
|
6689
|
-
const dictionaries$
|
|
7706
|
+
const dictionaries$13 = {
|
|
6690
7707
|
en: {
|
|
6691
7708
|
tab: "Gallery",
|
|
6692
7709
|
notRoleplay: "This chat is not a roleplay session, so it has no gallery.",
|
|
@@ -6764,7 +7781,7 @@ window.__ModuleLoader__.load({
|
|
|
6764
7781
|
cancel: "取消"
|
|
6765
7782
|
}
|
|
6766
7783
|
};
|
|
6767
|
-
const dictionaries$9 = withDictionaries(withDictionaries(withDictionaries({
|
|
7784
|
+
const dictionaries$9 = withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries({
|
|
6768
7785
|
en: {
|
|
6769
7786
|
language: "en",
|
|
6770
7787
|
sectionInfo: "About",
|
|
@@ -6777,6 +7794,19 @@ window.__ModuleLoader__.load({
|
|
|
6777
7794
|
infoOpening: "Opening message",
|
|
6778
7795
|
infoOpeningHelp: "What the story begins with, before the player says anything. Leave empty for none.",
|
|
6779
7796
|
infoOpeningParts: "This opening has lines spoken by characters, so it cannot be edited here as plain text. Change it in the file, or ask the authoring assistant.",
|
|
7797
|
+
sectionDice: "Dice",
|
|
7798
|
+
sectionTools: "Tools",
|
|
7799
|
+
sectionCalendar: "Calendar",
|
|
7800
|
+
calendarHelp: "The seasons follow the hemisphere, and a holiday is told by the days it falls on: a date (09-21), a span (12-20..01-05), a weekday of the month (nth:fri:last), a month or a season. Routines, triggers and the time shown to the models can name a holiday with holiday:<id>.",
|
|
7801
|
+
calendarHemisphere: "Seasons follow",
|
|
7802
|
+
hemisphereNorth: "The northern hemisphere",
|
|
7803
|
+
hemisphereSouth: "The southern hemisphere",
|
|
7804
|
+
holidayId: "Id",
|
|
7805
|
+
holidayName: "Name",
|
|
7806
|
+
holidayOn: "Days",
|
|
7807
|
+
holidayAdd: "Add a holiday",
|
|
7808
|
+
holidayRemove: "Remove",
|
|
7809
|
+
holidaysNone: "This world names no holidays.",
|
|
6780
7810
|
sectionRoutines: "Daily life",
|
|
6781
7811
|
sectionVariables: "Tracked values",
|
|
6782
7812
|
routinesNoCharacters: "This world has no characters yet.",
|
|
@@ -6785,6 +7815,8 @@ window.__ModuleLoader__.load({
|
|
|
6785
7815
|
routineTo: "Until",
|
|
6786
7816
|
routineActivity: "Activity",
|
|
6787
7817
|
routineDays: "Days",
|
|
7818
|
+
routineOn: "Other days",
|
|
7819
|
+
routineOnHelp: "Months (dec), dates (12-24), stretches (12-20..01-05), dom:1, nth:mon:1 (first Monday), season:winter, holiday:<id> of the world's calendar.json; a ! before one leaves that day out. Empty means no restriction.",
|
|
6788
7820
|
routineDaysHelp: "None ticked means every day. A window that ends before it starts runs past midnight.",
|
|
6789
7821
|
routinePlace: "Place",
|
|
6790
7822
|
routineNoPlace: "None",
|
|
@@ -7035,6 +8067,19 @@ window.__ModuleLoader__.load({
|
|
|
7035
8067
|
infoOpening: "开场白",
|
|
7036
8068
|
infoOpeningHelp: "玩家开口之前故事的开头。留空表示没有。",
|
|
7037
8069
|
infoOpeningParts: "这段开场白含有角色说的话,因此不能在这里按纯文本编辑。请在文件中修改,或请创作助手处理。",
|
|
8070
|
+
sectionDice: "骰子",
|
|
8071
|
+
sectionTools: "工具",
|
|
8072
|
+
sectionCalendar: "日历",
|
|
8073
|
+
calendarHelp: "季节随半球而定;节日用它所在的日子来表示:某个日期(09-21)、一段日期(12-20..01-05)、某月的第几个星期几(nth:fri:last)、整个月或某个季节。日常、触发器和提供给模型的时间都可以用 holiday:<id> 引用节日。",
|
|
8074
|
+
calendarHemisphere: "季节依据",
|
|
8075
|
+
hemisphereNorth: "北半球",
|
|
8076
|
+
hemisphereSouth: "南半球",
|
|
8077
|
+
holidayId: "标识",
|
|
8078
|
+
holidayName: "名称",
|
|
8079
|
+
holidayOn: "日子",
|
|
8080
|
+
holidayAdd: "添加节日",
|
|
8081
|
+
holidayRemove: "删除",
|
|
8082
|
+
holidaysNone: "这个世界没有设定节日。",
|
|
7038
8083
|
sectionRoutines: "日常",
|
|
7039
8084
|
sectionVariables: "追踪数值",
|
|
7040
8085
|
routinesNoCharacters: "这个世界还没有角色。",
|
|
@@ -7043,6 +8088,8 @@ window.__ModuleLoader__.load({
|
|
|
7043
8088
|
routineTo: "到",
|
|
7044
8089
|
routineActivity: "活动",
|
|
7045
8090
|
routineDays: "星期",
|
|
8091
|
+
routineOn: "其他日子",
|
|
8092
|
+
routineOnHelp: "月份(dec)、日期(12-24)、日期范围(12-20..01-05)、dom:1、nth:mon:1(每月第一个星期一)、season:winter、世界 calendar.json 中的 holiday:<id>;前面加 ! 表示排除该日。留空表示不限制。",
|
|
7046
8093
|
routineDaysHelp: "都不勾选表示每天。结束早于开始的时段会跨过午夜。",
|
|
7047
8094
|
routinePlace: "地点",
|
|
7048
8095
|
routineNoPlace: "无",
|
|
@@ -7281,7 +8328,7 @@ window.__ModuleLoader__.load({
|
|
|
7281
8328
|
relationCancel: "取消",
|
|
7282
8329
|
relationCreate: "创建"
|
|
7283
8330
|
}
|
|
7284
|
-
}, prefixed(dictionaries$
|
|
8331
|
+
}, prefixed(dictionaries$13, "gallery_")), prefixed({
|
|
7285
8332
|
en: {
|
|
7286
8333
|
title: "Triggers",
|
|
7287
8334
|
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.",
|
|
@@ -7457,7 +8504,80 @@ window.__ModuleLoader__.load({
|
|
|
7457
8504
|
logOpen: "请求打开:{surface}",
|
|
7458
8505
|
noSurfaces: "这个界面包没有可预览的界面位置。"
|
|
7459
8506
|
}
|
|
7460
|
-
}, "pk_"))
|
|
8507
|
+
}, "pk_")), dictionaries$14), prefixed({
|
|
8508
|
+
en: {
|
|
8509
|
+
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.",
|
|
8510
|
+
none: "This world has no checks. Its game master can still roll plain dice for things that have none.",
|
|
8511
|
+
add: "Add a check",
|
|
8512
|
+
remove: "Remove this check",
|
|
8513
|
+
checkTitle: "Check",
|
|
8514
|
+
key: "Key",
|
|
8515
|
+
name: "Name",
|
|
8516
|
+
use: "When it is used",
|
|
8517
|
+
useHelp: "Said to the game master in your words: what kind of attempt it is for, and how hard is hard (for example \"target 10 moderate, 15 hard\").",
|
|
8518
|
+
dice: "Dice",
|
|
8519
|
+
diceHelp: "2d6+1, 1d20, 4d6kh3 (keep the highest 3), d100.",
|
|
8520
|
+
reading: "Read as",
|
|
8521
|
+
readTotal: "The total of the dice",
|
|
8522
|
+
readSuccesses: "The number of dice that hit",
|
|
8523
|
+
hit: "A die hits from",
|
|
8524
|
+
compare: "Compared with",
|
|
8525
|
+
compareAbsolute: "Nothing: the value itself",
|
|
8526
|
+
compareOver: "A difficulty to meet or beat",
|
|
8527
|
+
compareUnder: "A skill to roll under",
|
|
8528
|
+
compareHelp: "With a difficulty or a skill, the game master gives the number, and the bands read how far over or under it the roll is.",
|
|
8529
|
+
modifier: "Adds a quality of the character",
|
|
8530
|
+
modifierHelp: "The key of a number about characters declared in Tracked values, or empty.",
|
|
8531
|
+
bands: "Results",
|
|
8532
|
+
bandsHelp: "The first band that holds the value is the result. Leave \"from\" or \"to\" empty for no end.",
|
|
8533
|
+
bandAdd: "Add a result",
|
|
8534
|
+
bandRemove: "Remove",
|
|
8535
|
+
bandMin: "From",
|
|
8536
|
+
bandMax: "To",
|
|
8537
|
+
bandLabel: "Called",
|
|
8538
|
+
bandResult: "Counts as",
|
|
8539
|
+
resultSucceeded: "Success",
|
|
8540
|
+
resultPartial: "Partial",
|
|
8541
|
+
resultFailed: "Failure",
|
|
8542
|
+
bandCritical: "Critical"
|
|
8543
|
+
},
|
|
8544
|
+
zh: {
|
|
8545
|
+
help: "不确定的尝试如何裁定。主持人掷出其中一个检定,并被告知掷出的结果落在哪个区段,因此不会有任何数字被编造。每个检定写明何时使用、掷什么骰子,以及每种结果意味着什么;各区段合起来应覆盖骰子可能给出的每个数值。",
|
|
8546
|
+
none: "这个世界没有检定。它的主持人仍然可以为没有检定的事掷普通骰子。",
|
|
8547
|
+
add: "添加检定",
|
|
8548
|
+
remove: "删除此检定",
|
|
8549
|
+
checkTitle: "检定",
|
|
8550
|
+
key: "标识",
|
|
8551
|
+
name: "名称",
|
|
8552
|
+
use: "何时使用",
|
|
8553
|
+
useHelp: "用你的话告诉主持人:它适用于哪一类尝试,以及怎样算难(例如“目标 10 为中等,15 为困难”)。",
|
|
8554
|
+
dice: "骰子",
|
|
8555
|
+
diceHelp: "2d6+1、1d20、4d6kh3(保留最高的 3 个)、d100。",
|
|
8556
|
+
reading: "读取方式",
|
|
8557
|
+
readTotal: "骰子的总和",
|
|
8558
|
+
readSuccesses: "命中的骰子数",
|
|
8559
|
+
hit: "骰子从多少起算命中",
|
|
8560
|
+
compare: "与什么比较",
|
|
8561
|
+
compareAbsolute: "不比较:直接读取数值",
|
|
8562
|
+
compareOver: "要达到或超过的难度",
|
|
8563
|
+
compareUnder: "要掷低于的技能值",
|
|
8564
|
+
compareHelp: "选择难度或技能值时,由主持人给出该数字,区段读取的是掷出的结果比它高出或低多少。",
|
|
8565
|
+
modifier: "加上角色的某项属性",
|
|
8566
|
+
modifierHelp: "在“追踪数值”中声明的、关于角色的数值的 key;留空为不加。",
|
|
8567
|
+
bands: "结果",
|
|
8568
|
+
bandsHelp: "第一个包含该数值的区段就是结果。“从”或“到”留空表示没有上限或下限。",
|
|
8569
|
+
bandAdd: "添加结果",
|
|
8570
|
+
bandRemove: "删除",
|
|
8571
|
+
bandMin: "从",
|
|
8572
|
+
bandMax: "到",
|
|
8573
|
+
bandLabel: "称为",
|
|
8574
|
+
bandResult: "算作",
|
|
8575
|
+
resultSucceeded: "成功",
|
|
8576
|
+
resultPartial: "部分成功",
|
|
8577
|
+
resultFailed: "失败",
|
|
8578
|
+
bandCritical: "关键"
|
|
8579
|
+
}
|
|
8580
|
+
}, "dice_"));
|
|
7461
8581
|
const dictionaries$8 = withDictionaries({
|
|
7462
8582
|
en: {
|
|
7463
8583
|
nav: "Avatars",
|
|
@@ -7562,16 +8682,16 @@ window.__ModuleLoader__.load({
|
|
|
7562
8682
|
}
|
|
7563
8683
|
//#endregion
|
|
7564
8684
|
//#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
|
|
7565
|
-
const css$
|
|
7566
|
-
const key$
|
|
7567
|
-
let tag$
|
|
7568
|
-
if (tag$
|
|
7569
|
-
tag$
|
|
7570
|
-
tag$
|
|
7571
|
-
tag$
|
|
7572
|
-
document.head.appendChild(tag$
|
|
8685
|
+
const css$16 = ".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}";
|
|
8686
|
+
const key$16 = "src/client/widgets/pager/Pager.module.css";
|
|
8687
|
+
let tag$16 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$16) + "]");
|
|
8688
|
+
if (tag$16 === null) {
|
|
8689
|
+
tag$16 = document.createElement("style");
|
|
8690
|
+
tag$16.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8691
|
+
tag$16.dataset.pluginCss = key$16;
|
|
8692
|
+
document.head.appendChild(tag$16);
|
|
7573
8693
|
}
|
|
7574
|
-
tag$
|
|
8694
|
+
tag$16.textContent = css$16;
|
|
7575
8695
|
var Pager_module_css_default = {
|
|
7576
8696
|
"position": "rp_KBAD0W_position",
|
|
7577
8697
|
"pager": "rp_KBAD0W_pager"
|
|
@@ -7609,16 +8729,16 @@ window.__ModuleLoader__.load({
|
|
|
7609
8729
|
}
|
|
7610
8730
|
//#endregion
|
|
7611
8731
|
//#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
|
|
7612
|
-
const css$
|
|
7613
|
-
const key$
|
|
7614
|
-
let tag$
|
|
7615
|
-
if (tag$
|
|
7616
|
-
tag$
|
|
7617
|
-
tag$
|
|
7618
|
-
tag$
|
|
7619
|
-
document.head.appendChild(tag$
|
|
8732
|
+
const css$15 = ".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)}";
|
|
8733
|
+
const key$15 = "src/client/widgets/problem-list/ProblemList.module.css";
|
|
8734
|
+
let tag$15 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$15) + "]");
|
|
8735
|
+
if (tag$15 === null) {
|
|
8736
|
+
tag$15 = document.createElement("style");
|
|
8737
|
+
tag$15.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8738
|
+
tag$15.dataset.pluginCss = key$15;
|
|
8739
|
+
document.head.appendChild(tag$15);
|
|
7620
8740
|
}
|
|
7621
|
-
tag$
|
|
8741
|
+
tag$15.textContent = css$15;
|
|
7622
8742
|
var ProblemList_module_css_default = { "problems": "rp_LZh3Iq_problems" };
|
|
7623
8743
|
//#endregion
|
|
7624
8744
|
//#region src/client/widgets/problem-list/ProblemList.tsx
|
|
@@ -7636,21 +8756,21 @@ window.__ModuleLoader__.load({
|
|
|
7636
8756
|
}
|
|
7637
8757
|
//#endregion
|
|
7638
8758
|
//#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
|
|
7639
|
-
const css$
|
|
7640
|
-
const key$
|
|
7641
|
-
let tag$
|
|
7642
|
-
if (tag$
|
|
7643
|
-
tag$
|
|
7644
|
-
tag$
|
|
7645
|
-
tag$
|
|
7646
|
-
document.head.appendChild(tag$
|
|
8759
|
+
const css$14 = ".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_error{color:var(--dsw-alias-state-error-primary);font-size:12px}";
|
|
8760
|
+
const key$14 = "src/client/pages/sessions/DeleteSessionDialog.module.css";
|
|
8761
|
+
let tag$14 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$14) + "]");
|
|
8762
|
+
if (tag$14 === null) {
|
|
8763
|
+
tag$14 = document.createElement("style");
|
|
8764
|
+
tag$14.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8765
|
+
tag$14.dataset.pluginCss = key$14;
|
|
8766
|
+
document.head.appendChild(tag$14);
|
|
7647
8767
|
}
|
|
7648
|
-
tag$
|
|
8768
|
+
tag$14.textContent = css$14;
|
|
7649
8769
|
var DeleteSessionDialog_module_css_default = {
|
|
8770
|
+
"error": "rp_FifHrW_error",
|
|
7650
8771
|
"warning": "rp_FifHrW_warning",
|
|
7651
|
-
"body": "rp_FifHrW_body",
|
|
7652
8772
|
"question": "rp_FifHrW_question",
|
|
7653
|
-
"
|
|
8773
|
+
"body": "rp_FifHrW_body"
|
|
7654
8774
|
};
|
|
7655
8775
|
//#endregion
|
|
7656
8776
|
//#region src/client/pages/sessions/DeleteSessionDialog.tsx
|
|
@@ -7746,39 +8866,39 @@ window.__ModuleLoader__.load({
|
|
|
7746
8866
|
}
|
|
7747
8867
|
//#endregion
|
|
7748
8868
|
//#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
|
|
7749
|
-
const css$
|
|
7750
|
-
const key$
|
|
7751
|
-
let tag$
|
|
7752
|
-
if (tag$
|
|
7753
|
-
tag$
|
|
7754
|
-
tag$
|
|
7755
|
-
tag$
|
|
7756
|
-
document.head.appendChild(tag$
|
|
8869
|
+
const css$13 = ".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:11px}@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:11px;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}}";
|
|
8870
|
+
const key$13 = "src/client/pages/sessions/SessionsPage.module.css";
|
|
8871
|
+
let tag$13 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$13) + "]");
|
|
8872
|
+
if (tag$13 === null) {
|
|
8873
|
+
tag$13 = document.createElement("style");
|
|
8874
|
+
tag$13.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8875
|
+
tag$13.dataset.pluginCss = key$13;
|
|
8876
|
+
document.head.appendChild(tag$13);
|
|
7757
8877
|
}
|
|
7758
|
-
tag$
|
|
8878
|
+
tag$13.textContent = css$13;
|
|
7759
8879
|
var SessionsPage_module_css_default = {
|
|
7760
|
-
"
|
|
7761
|
-
"
|
|
7762
|
-
"fits": "rp_24z4eW_fits",
|
|
7763
|
-
"scrolls": "rp_24z4eW_scrolls",
|
|
7764
|
-
"viewport": "rp_24z4eW_viewport",
|
|
7765
|
-
"name": "rp_24z4eW_name",
|
|
7766
|
-
"spinning": "rp_24z4eW_spinning",
|
|
7767
|
-
"number": "rp_24z4eW_number",
|
|
8880
|
+
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
8881
|
+
"nameColumn": "rp_24z4eW_nameColumn",
|
|
7768
8882
|
"archived": "rp_24z4eW_archived",
|
|
8883
|
+
"notice": "rp_24z4eW_notice",
|
|
8884
|
+
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
8885
|
+
"actions": "rp_24z4eW_actions",
|
|
8886
|
+
"spinning": "rp_24z4eW_spinning",
|
|
7769
8887
|
"toolbar": "rp_24z4eW_toolbar",
|
|
7770
|
-
"
|
|
8888
|
+
"table": "rp_24z4eW_table",
|
|
8889
|
+
"viewport": "rp_24z4eW_viewport",
|
|
8890
|
+
"fits": "rp_24z4eW_fits",
|
|
8891
|
+
"timeColumn": "rp_24z4eW_timeColumn",
|
|
8892
|
+
"scrolls": "rp_24z4eW_scrolls",
|
|
8893
|
+
"badge": "rp_24z4eW_badge",
|
|
7771
8894
|
"page": "rp_24z4eW_page",
|
|
7772
|
-
"count": "rp_24z4eW_count",
|
|
7773
|
-
"spin": "rp_24z4eW_spin",
|
|
7774
|
-
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
7775
8895
|
"worldColumn": "rp_24z4eW_worldColumn",
|
|
7776
|
-
"
|
|
7777
|
-
"notice": "rp_24z4eW_notice",
|
|
8896
|
+
"name": "rp_24z4eW_name",
|
|
7778
8897
|
"secondary": "rp_24z4eW_secondary",
|
|
7779
|
-
"
|
|
7780
|
-
"
|
|
7781
|
-
"
|
|
8898
|
+
"count": "rp_24z4eW_count",
|
|
8899
|
+
"spin": "rp_24z4eW_spin",
|
|
8900
|
+
"number": "rp_24z4eW_number",
|
|
8901
|
+
"message": "rp_24z4eW_message"
|
|
7782
8902
|
};
|
|
7783
8903
|
//#endregion
|
|
7784
8904
|
//#region src/client/pages/sessions/SessionsPage.tsx
|
|
@@ -8283,27 +9403,27 @@ window.__ModuleLoader__.load({
|
|
|
8283
9403
|
}
|
|
8284
9404
|
//#endregion
|
|
8285
9405
|
//#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
|
|
8286
|
-
const css$
|
|
8287
|
-
const key$
|
|
8288
|
-
let tag$
|
|
8289
|
-
if (tag$
|
|
8290
|
-
tag$
|
|
8291
|
-
tag$
|
|
8292
|
-
tag$
|
|
8293
|
-
document.head.appendChild(tag$
|
|
9406
|
+
const css$12 = ".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}";
|
|
9407
|
+
const key$12 = "src/client/widgets/world-card/WorldCard.module.css";
|
|
9408
|
+
let tag$12 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$12) + "]");
|
|
9409
|
+
if (tag$12 === null) {
|
|
9410
|
+
tag$12 = document.createElement("style");
|
|
9411
|
+
tag$12.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9412
|
+
tag$12.dataset.pluginCss = key$12;
|
|
9413
|
+
document.head.appendChild(tag$12);
|
|
8294
9414
|
}
|
|
8295
|
-
tag$
|
|
9415
|
+
tag$12.textContent = css$12;
|
|
8296
9416
|
var WorldCard_module_css_default = {
|
|
8297
|
-
"info": "rp_Bvxx5q_info",
|
|
8298
|
-
"name": "rp_Bvxx5q_name",
|
|
8299
|
-
"image": "rp_Bvxx5q_image",
|
|
8300
9417
|
"placeholder": "rp_Bvxx5q_placeholder",
|
|
8301
|
-
"
|
|
8302
|
-
"
|
|
9418
|
+
"play": "rp_Bvxx5q_play",
|
|
9419
|
+
"openButton": "rp_Bvxx5q_openButton",
|
|
9420
|
+
"image": "rp_Bvxx5q_image",
|
|
8303
9421
|
"tag": "rp_Bvxx5q_tag",
|
|
9422
|
+
"cover": "rp_Bvxx5q_cover",
|
|
8304
9423
|
"card": "rp_Bvxx5q_card",
|
|
8305
|
-
"
|
|
8306
|
-
"
|
|
9424
|
+
"tags": "rp_Bvxx5q_tags",
|
|
9425
|
+
"info": "rp_Bvxx5q_info",
|
|
9426
|
+
"name": "rp_Bvxx5q_name"
|
|
8307
9427
|
};
|
|
8308
9428
|
//#endregion
|
|
8309
9429
|
//#region src/client/widgets/world-card/WorldCard.tsx
|
|
@@ -8386,20 +9506,20 @@ window.__ModuleLoader__.load({
|
|
|
8386
9506
|
}
|
|
8387
9507
|
//#endregion
|
|
8388
9508
|
//#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
|
|
8389
|
-
const css$
|
|
8390
|
-
const key$
|
|
8391
|
-
let tag$
|
|
8392
|
-
if (tag$
|
|
8393
|
-
tag$
|
|
8394
|
-
tag$
|
|
8395
|
-
tag$
|
|
8396
|
-
document.head.appendChild(tag$
|
|
9509
|
+
const css$11 = ".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}";
|
|
9510
|
+
const key$11 = "src/client/widgets/avatar-choices/AvatarChoices.module.css";
|
|
9511
|
+
let tag$11 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$11) + "]");
|
|
9512
|
+
if (tag$11 === null) {
|
|
9513
|
+
tag$11 = document.createElement("style");
|
|
9514
|
+
tag$11.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9515
|
+
tag$11.dataset.pluginCss = key$11;
|
|
9516
|
+
document.head.appendChild(tag$11);
|
|
8397
9517
|
}
|
|
8398
|
-
tag$
|
|
9518
|
+
tag$11.textContent = css$11;
|
|
8399
9519
|
var AvatarChoices_module_css_default = {
|
|
8400
|
-
"option": "rp_YCstOG_option",
|
|
8401
|
-
"text": "rp_YCstOG_text",
|
|
8402
9520
|
"summary": "rp_YCstOG_summary",
|
|
9521
|
+
"text": "rp_YCstOG_text",
|
|
9522
|
+
"option": "rp_YCstOG_option",
|
|
8403
9523
|
"name": "rp_YCstOG_name"
|
|
8404
9524
|
};
|
|
8405
9525
|
//#endregion
|
|
@@ -8429,29 +9549,29 @@ window.__ModuleLoader__.load({
|
|
|
8429
9549
|
}
|
|
8430
9550
|
//#endregion
|
|
8431
9551
|
//#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
|
|
8432
|
-
const css$
|
|
8433
|
-
const key$
|
|
8434
|
-
let tag$
|
|
8435
|
-
if (tag$
|
|
8436
|
-
tag$
|
|
8437
|
-
tag$
|
|
8438
|
-
tag$
|
|
8439
|
-
document.head.appendChild(tag$
|
|
9552
|
+
const css$10 = ".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}}";
|
|
9553
|
+
const key$10 = "src/client/pages/worlds/StartSessionDialog.module.css";
|
|
9554
|
+
let tag$10 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$10) + "]");
|
|
9555
|
+
if (tag$10 === null) {
|
|
9556
|
+
tag$10 = document.createElement("style");
|
|
9557
|
+
tag$10.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9558
|
+
tag$10.dataset.pluginCss = key$10;
|
|
9559
|
+
document.head.appendChild(tag$10);
|
|
8440
9560
|
}
|
|
8441
|
-
tag$
|
|
9561
|
+
tag$10.textContent = css$10;
|
|
8442
9562
|
var StartSessionDialog_module_css_default = {
|
|
9563
|
+
"message": "rp_AnbLKG_message",
|
|
8443
9564
|
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
8444
9565
|
"option": "rp_AnbLKG_option",
|
|
8445
|
-
"optionName": "rp_AnbLKG_optionName",
|
|
8446
9566
|
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
8447
|
-
"message": "rp_AnbLKG_message",
|
|
8448
9567
|
"label": "rp_AnbLKG_label",
|
|
8449
|
-
"
|
|
8450
|
-
"
|
|
9568
|
+
"optionName": "rp_AnbLKG_optionName",
|
|
9569
|
+
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
8451
9570
|
"optionText": "rp_AnbLKG_optionText",
|
|
9571
|
+
"form": "rp_AnbLKG_form",
|
|
8452
9572
|
"advanced": "rp_AnbLKG_advanced",
|
|
8453
|
-
"
|
|
8454
|
-
"
|
|
9573
|
+
"error": "rp_AnbLKG_error",
|
|
9574
|
+
"field": "rp_AnbLKG_field"
|
|
8455
9575
|
};
|
|
8456
9576
|
//#endregion
|
|
8457
9577
|
//#region src/client/pages/worlds/AddAvatarsDialog.tsx
|
|
@@ -8566,6 +9686,7 @@ window.__ModuleLoader__.load({
|
|
|
8566
9686
|
kind: "record",
|
|
8567
9687
|
fallback: {}
|
|
8568
9688
|
});
|
|
9689
|
+
const switchboard = () => ({ kind: "switchboard" });
|
|
8569
9690
|
const choice = (options, fallback) => ({
|
|
8570
9691
|
kind: "choice",
|
|
8571
9692
|
options,
|
|
@@ -8588,7 +9709,8 @@ window.__ModuleLoader__.load({
|
|
|
8588
9709
|
backlogRounds: integer(1, 100, 6),
|
|
8589
9710
|
overRetrieve: integer(1, 10, 4),
|
|
8590
9711
|
associate: integer(0, 10, 2),
|
|
8591
|
-
diversity: ratio(0, 1, .3)
|
|
9712
|
+
diversity: ratio(0, 1, .3),
|
|
9713
|
+
foldedFade: ratio(.05, 1, .5)
|
|
8592
9714
|
},
|
|
8593
9715
|
context: {
|
|
8594
9716
|
limitTokens: integer(0, 1e6, 0),
|
|
@@ -8678,11 +9800,13 @@ window.__ModuleLoader__.load({
|
|
|
8678
9800
|
interpreterModel: text(200, ""),
|
|
8679
9801
|
captioner: text(200, "")
|
|
8680
9802
|
},
|
|
9803
|
+
dice: { visibility: choice(["hidden", "card"], "card") },
|
|
9804
|
+
tools: switchboard(),
|
|
8681
9805
|
embedding: { options: record() }
|
|
8682
9806
|
};
|
|
8683
9807
|
const isField = (spec) => "kind" in spec && typeof spec["kind"] === "string";
|
|
8684
9808
|
function defaultsOf(spec) {
|
|
8685
|
-
return Object.fromEntries(Object.entries(spec).map(([key, entry]) => [key, isField(entry) ? entry.kind === "record" ? { ...entry.fallback } : entry.fallback : defaultsOf(entry)]));
|
|
9809
|
+
return Object.fromEntries(Object.entries(spec).map(([key, entry]) => [key, isField(entry) ? entry.kind === "record" ? { ...entry.fallback } : entry.kind === "switchboard" ? {} : entry.fallback : defaultsOf(entry)]));
|
|
8686
9810
|
}
|
|
8687
9811
|
const DEFAULT_SETTINGS = defaultsOf(SETTINGS_SPEC);
|
|
8688
9812
|
/** Whether a name is a time zone the runtime knows. */
|
|
@@ -8743,6 +9867,12 @@ window.__ModuleLoader__.load({
|
|
|
8743
9867
|
label: "diversity",
|
|
8744
9868
|
help: "diversityHelp"
|
|
8745
9869
|
},
|
|
9870
|
+
{
|
|
9871
|
+
path: ["memory", "foldedFade"],
|
|
9872
|
+
kind: "decimal",
|
|
9873
|
+
label: "foldedFade",
|
|
9874
|
+
help: "foldedFadeHelp"
|
|
9875
|
+
},
|
|
8746
9876
|
{
|
|
8747
9877
|
path: ["memory", "lookup"],
|
|
8748
9878
|
kind: "flag",
|
|
@@ -8985,6 +10115,19 @@ window.__ModuleLoader__.load({
|
|
|
8985
10115
|
label: "suggestionsCount",
|
|
8986
10116
|
help: "suggestionsCountHelp"
|
|
8987
10117
|
},
|
|
10118
|
+
{
|
|
10119
|
+
path: ["dice", "visibility"],
|
|
10120
|
+
kind: "choice",
|
|
10121
|
+
label: "diceVisibility",
|
|
10122
|
+
help: "diceVisibilityHelp",
|
|
10123
|
+
choices: [{
|
|
10124
|
+
value: "hidden",
|
|
10125
|
+
label: "diceHidden"
|
|
10126
|
+
}, {
|
|
10127
|
+
value: "card",
|
|
10128
|
+
label: "diceCard"
|
|
10129
|
+
}]
|
|
10130
|
+
},
|
|
8988
10131
|
{
|
|
8989
10132
|
path: ["images", "mode"],
|
|
8990
10133
|
kind: "choice",
|
|
@@ -9290,24 +10433,24 @@ window.__ModuleLoader__.load({
|
|
|
9290
10433
|
}
|
|
9291
10434
|
//#endregion
|
|
9292
10435
|
//#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
|
|
9293
|
-
const css$
|
|
9294
|
-
const key$
|
|
9295
|
-
let tag$
|
|
9296
|
-
if (tag$
|
|
9297
|
-
tag$
|
|
9298
|
-
tag$
|
|
9299
|
-
tag$
|
|
9300
|
-
document.head.appendChild(tag$
|
|
10436
|
+
const css$9 = ".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}";
|
|
10437
|
+
const key$9 = "src/client/settings-form/SettingsFields.module.css";
|
|
10438
|
+
let tag$9 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$9) + "]");
|
|
10439
|
+
if (tag$9 === null) {
|
|
10440
|
+
tag$9 = document.createElement("style");
|
|
10441
|
+
tag$9.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10442
|
+
tag$9.dataset.pluginCss = key$9;
|
|
10443
|
+
document.head.appendChild(tag$9);
|
|
9301
10444
|
}
|
|
9302
|
-
tag$
|
|
10445
|
+
tag$9.textContent = css$9;
|
|
9303
10446
|
var SettingsFields_module_css_default = {
|
|
9304
10447
|
"row": "rp_Rhi3yq_row",
|
|
9305
|
-
"field": "rp_Rhi3yq_field",
|
|
9306
10448
|
"label": "rp_Rhi3yq_label",
|
|
9307
|
-
"group": "rp_Rhi3yq_group",
|
|
9308
10449
|
"error": "rp_Rhi3yq_error",
|
|
9309
|
-
"area": "rp_Rhi3yq_area",
|
|
9310
10450
|
"help": "rp_Rhi3yq_help",
|
|
10451
|
+
"field": "rp_Rhi3yq_field",
|
|
10452
|
+
"area": "rp_Rhi3yq_area",
|
|
10453
|
+
"group": "rp_Rhi3yq_group",
|
|
9311
10454
|
"groupTitle": "rp_Rhi3yq_groupTitle"
|
|
9312
10455
|
};
|
|
9313
10456
|
//#endregion
|
|
@@ -9483,7 +10626,147 @@ window.__ModuleLoader__.load({
|
|
|
9483
10626
|
})
|
|
9484
10627
|
]
|
|
9485
10628
|
})
|
|
9486
|
-
] });
|
|
10629
|
+
] });
|
|
10630
|
+
}
|
|
10631
|
+
//#endregion
|
|
10632
|
+
//#region src/client/pages/worlds/import-api.ts
|
|
10633
|
+
async function answer$1(response) {
|
|
10634
|
+
if (!response.ok) {
|
|
10635
|
+
const body = await response.json().catch(() => void 0);
|
|
10636
|
+
const problems = Array.isArray(body?.problems) ? body.problems.join("; ") : void 0;
|
|
10637
|
+
throw new Error(problems ?? (typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim()));
|
|
10638
|
+
}
|
|
10639
|
+
return await response.json();
|
|
10640
|
+
}
|
|
10641
|
+
/** Sends a card file to the host to be read; the answer is what it holds. */
|
|
10642
|
+
async function uploadCard(file) {
|
|
10643
|
+
return await answer$1(await fetch(`${API_PREFIX}/worlds/import/card`, {
|
|
10644
|
+
method: "POST",
|
|
10645
|
+
credentials: "same-origin",
|
|
10646
|
+
headers: {
|
|
10647
|
+
"x-file-name": encodeURIComponent(file.name),
|
|
10648
|
+
"content-type": file.type || "application/octet-stream"
|
|
10649
|
+
},
|
|
10650
|
+
body: file
|
|
10651
|
+
}));
|
|
10652
|
+
}
|
|
10653
|
+
async function startImport(id, choices, language) {
|
|
10654
|
+
return await answer$1(await fetch(`${API_PREFIX}/worlds/import/start?id=${encodeURIComponent(id)}`, {
|
|
10655
|
+
method: "POST",
|
|
10656
|
+
credentials: "same-origin",
|
|
10657
|
+
headers: { "content-type": "application/json" },
|
|
10658
|
+
body: JSON.stringify({
|
|
10659
|
+
...choices,
|
|
10660
|
+
language
|
|
10661
|
+
})
|
|
10662
|
+
}));
|
|
10663
|
+
}
|
|
10664
|
+
async function discardImport(id) {
|
|
10665
|
+
await fetch(`${API_PREFIX}/worlds/import?id=${encodeURIComponent(id)}`, {
|
|
10666
|
+
method: "DELETE",
|
|
10667
|
+
credentials: "same-origin"
|
|
10668
|
+
});
|
|
10669
|
+
}
|
|
10670
|
+
const pictureUrl = (id) => `${API_PREFIX}/worlds/import/picture?id=${encodeURIComponent(id)}`;
|
|
10671
|
+
//#endregion
|
|
10672
|
+
//#region src/client/pages/worlds/translate-api.ts
|
|
10673
|
+
/** The language a world is written in, or nothing when it has too little text to tell. */
|
|
10674
|
+
async function worldLanguage(worldId, signal) {
|
|
10675
|
+
const { language } = await answer$1(await fetch(`${API_PREFIX}/worlds/language?id=${encodeURIComponent(worldId)}`, {
|
|
10676
|
+
credentials: "same-origin",
|
|
10677
|
+
...signal === void 0 ? {} : { signal }
|
|
10678
|
+
}));
|
|
10679
|
+
return language ?? void 0;
|
|
10680
|
+
}
|
|
10681
|
+
/** Opens the authoring chat of the world and has it make a translated copy. */
|
|
10682
|
+
async function translateWorld(worldId, to, title, language) {
|
|
10683
|
+
return await answer$1(await fetch(`${API_PREFIX}/worlds/translate?id=${encodeURIComponent(worldId)}`, {
|
|
10684
|
+
method: "POST",
|
|
10685
|
+
credentials: "same-origin",
|
|
10686
|
+
headers: { "content-type": "application/json" },
|
|
10687
|
+
body: JSON.stringify({
|
|
10688
|
+
to,
|
|
10689
|
+
title,
|
|
10690
|
+
language
|
|
10691
|
+
})
|
|
10692
|
+
}));
|
|
10693
|
+
}
|
|
10694
|
+
/** The language of the interface or of a setting, as one of the two the plugin writes in. */
|
|
10695
|
+
const storyLanguageOf = (code) => code.trim().toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
10696
|
+
//#endregion
|
|
10697
|
+
//#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
|
|
10698
|
+
const css$8 = ".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}";
|
|
10699
|
+
const key$8 = "src/client/pages/worlds/TranslateBanner.module.css";
|
|
10700
|
+
let tag$8 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$8) + "]");
|
|
10701
|
+
if (tag$8 === null) {
|
|
10702
|
+
tag$8 = document.createElement("style");
|
|
10703
|
+
tag$8.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10704
|
+
tag$8.dataset.pluginCss = key$8;
|
|
10705
|
+
document.head.appendChild(tag$8);
|
|
10706
|
+
}
|
|
10707
|
+
tag$8.textContent = css$8;
|
|
10708
|
+
var TranslateBanner_module_css_default = {
|
|
10709
|
+
"error": "rp_Lx8vJa_error",
|
|
10710
|
+
"banner": "rp_Lx8vJa_banner",
|
|
10711
|
+
"text": "rp_Lx8vJa_text"
|
|
10712
|
+
};
|
|
10713
|
+
//#endregion
|
|
10714
|
+
//#region src/client/pages/worlds/TranslateBanner.tsx
|
|
10715
|
+
const languageName = (t, language) => language === "zh" ? t("languageChinese") : t("languageEnglish");
|
|
10716
|
+
/** The language a world is written in, read from the host; nothing while it is being read or when it cannot be told. */
|
|
10717
|
+
function useWorldLanguage(worldId) {
|
|
10718
|
+
const [language, setLanguage] = (0, react.useState)();
|
|
10719
|
+
(0, react.useEffect)(() => {
|
|
10720
|
+
const abort = new AbortController();
|
|
10721
|
+
setLanguage(void 0);
|
|
10722
|
+
worldLanguage(worldId, abort.signal).then(setLanguage, () => void 0);
|
|
10723
|
+
return () => {
|
|
10724
|
+
abort.abort();
|
|
10725
|
+
};
|
|
10726
|
+
}, [worldId]);
|
|
10727
|
+
return language;
|
|
10728
|
+
}
|
|
10729
|
+
/** Says that a world is written in another language than the person's, and offers to translate it into a copy. */
|
|
10730
|
+
function TranslateBanner({ t, worldId, worldName, openChat }) {
|
|
10731
|
+
const own = storyLanguageOf(t("language"));
|
|
10732
|
+
const written = useWorldLanguage(worldId);
|
|
10733
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
10734
|
+
const [failure, setFailure] = (0, react.useState)();
|
|
10735
|
+
if (written === void 0 || written === own) return null;
|
|
10736
|
+
const translate = () => {
|
|
10737
|
+
setBusy(true);
|
|
10738
|
+
setFailure(void 0);
|
|
10739
|
+
translateWorld(worldId, own, t("translateChatTitle", { name: worldName }), t("language")).then((opened) => {
|
|
10740
|
+
setBusy(false);
|
|
10741
|
+
if (!opened.started) setFailure(t("translateNotStarted", { message: opened.failure ?? "" }));
|
|
10742
|
+
openChat(opened.chatSessionId);
|
|
10743
|
+
}, (error) => {
|
|
10744
|
+
setBusy(false);
|
|
10745
|
+
setFailure(t("translateFailed", { message: error instanceof Error ? error.message : String(error) }));
|
|
10746
|
+
});
|
|
10747
|
+
};
|
|
10748
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10749
|
+
className: TranslateBanner_module_css_default.banner,
|
|
10750
|
+
role: "status",
|
|
10751
|
+
"data-testid": "roleplay-translate-banner",
|
|
10752
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10753
|
+
className: TranslateBanner_module_css_default.text,
|
|
10754
|
+
children: t("translateWarning", {
|
|
10755
|
+
from: languageName(t, written),
|
|
10756
|
+
to: languageName(t, own)
|
|
10757
|
+
})
|
|
10758
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
10759
|
+
variant: "outline",
|
|
10760
|
+
size: "sm",
|
|
10761
|
+
disabled: busy,
|
|
10762
|
+
onClick: translate,
|
|
10763
|
+
children: busy ? t("translateOpening") : t("translateAction", { to: languageName(t, own) })
|
|
10764
|
+
})]
|
|
10765
|
+
}), failure !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
10766
|
+
className: TranslateBanner_module_css_default.error,
|
|
10767
|
+
role: "alert",
|
|
10768
|
+
children: failure
|
|
10769
|
+
})] });
|
|
9487
10770
|
}
|
|
9488
10771
|
//#endregion
|
|
9489
10772
|
//#region src/client/pages/worlds/StartSessionDialog.tsx
|
|
@@ -9518,6 +10801,9 @@ window.__ModuleLoader__.load({
|
|
|
9518
10801
|
...toDrafts(base, options),
|
|
9519
10802
|
...drafts
|
|
9520
10803
|
};
|
|
10804
|
+
const written = useWorldLanguage(dialog.worldId);
|
|
10805
|
+
const chosen = shown["prompts.language"];
|
|
10806
|
+
const played = storyLanguageOf(typeof chosen === "string" && chosen.trim() !== "" ? chosen : t("language"));
|
|
9521
10807
|
const canStart = dialog.status === "ready" && selected !== void 0 && !dialog.submitting && problemsOf(shown, options).size === 0;
|
|
9522
10808
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
9523
10809
|
open: true,
|
|
@@ -9566,6 +10852,14 @@ window.__ModuleLoader__.load({
|
|
|
9566
10852
|
}
|
|
9567
10853
|
})]
|
|
9568
10854
|
}),
|
|
10855
|
+
written !== void 0 && written !== played && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
10856
|
+
className: StartSessionDialog_module_css_default.message,
|
|
10857
|
+
role: "status",
|
|
10858
|
+
children: t("startLanguageNote", {
|
|
10859
|
+
from: languageName(t, written),
|
|
10860
|
+
to: languageName(t, played)
|
|
10861
|
+
})
|
|
10862
|
+
}),
|
|
9569
10863
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", {
|
|
9570
10864
|
className: StartSessionDialog_module_css_default.field,
|
|
9571
10865
|
disabled: dialog.status !== "ready" || dialog.submitting,
|
|
@@ -9851,7 +11145,7 @@ window.__ModuleLoader__.load({
|
|
|
9851
11145
|
}
|
|
9852
11146
|
//#endregion
|
|
9853
11147
|
//#region src/client/pages/worlds/starter-api.ts
|
|
9854
|
-
async function answer
|
|
11148
|
+
async function answer(response) {
|
|
9855
11149
|
if (!response.ok) {
|
|
9856
11150
|
const body = await response.json().catch(() => void 0);
|
|
9857
11151
|
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
@@ -9860,14 +11154,14 @@ window.__ModuleLoader__.load({
|
|
|
9860
11154
|
}
|
|
9861
11155
|
/** The worlds that ship with the plugin. */
|
|
9862
11156
|
async function loadStarters(signal) {
|
|
9863
|
-
return await answer
|
|
11157
|
+
return await answer(await fetch(`${API_PREFIX}/worlds/starter`, {
|
|
9864
11158
|
credentials: "same-origin",
|
|
9865
11159
|
signal
|
|
9866
11160
|
}));
|
|
9867
11161
|
}
|
|
9868
11162
|
/** Copies one into the person's worlds. */
|
|
9869
11163
|
async function addStarter(folder) {
|
|
9870
|
-
await answer
|
|
11164
|
+
await answer(await fetch(`${API_PREFIX}/worlds/starter`, {
|
|
9871
11165
|
method: "POST",
|
|
9872
11166
|
credentials: "same-origin",
|
|
9873
11167
|
headers: { "content-type": "application/json" },
|
|
@@ -9887,25 +11181,25 @@ window.__ModuleLoader__.load({
|
|
|
9887
11181
|
}
|
|
9888
11182
|
tag$7.textContent = css$7;
|
|
9889
11183
|
var WorldsPage_module_css_default = {
|
|
9890
|
-
"editBody": "rp_FHUyRq_editBody",
|
|
9891
|
-
"grid": "rp_FHUyRq_grid",
|
|
9892
|
-
"viewport": "rp_FHUyRq_viewport",
|
|
9893
|
-
"starters": "rp_FHUyRq_starters",
|
|
9894
|
-
"editHeader": "rp_FHUyRq_editHeader",
|
|
9895
|
-
"notice": "rp_FHUyRq_notice",
|
|
9896
|
-
"spin": "rp_FHUyRq_spin",
|
|
9897
11184
|
"scrolls": "rp_FHUyRq_scrolls",
|
|
9898
|
-
"fits": "rp_FHUyRq_fits",
|
|
9899
|
-
"editTitle": "rp_FHUyRq_editTitle",
|
|
9900
|
-
"starter": "rp_FHUyRq_starter",
|
|
9901
11185
|
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
9902
11186
|
"count": "rp_FHUyRq_count",
|
|
9903
|
-
"
|
|
11187
|
+
"spin": "rp_FHUyRq_spin",
|
|
11188
|
+
"fits": "rp_FHUyRq_fits",
|
|
9904
11189
|
"authorButton": "rp_FHUyRq_authorButton",
|
|
9905
|
-
"
|
|
11190
|
+
"toolbar": "rp_FHUyRq_toolbar",
|
|
11191
|
+
"editHeader": "rp_FHUyRq_editHeader",
|
|
9906
11192
|
"message": "rp_FHUyRq_message",
|
|
11193
|
+
"cell": "rp_FHUyRq_cell",
|
|
11194
|
+
"starters": "rp_FHUyRq_starters",
|
|
11195
|
+
"editTitle": "rp_FHUyRq_editTitle",
|
|
11196
|
+
"spinning": "rp_FHUyRq_spinning",
|
|
9907
11197
|
"page": "rp_FHUyRq_page",
|
|
9908
|
-
"
|
|
11198
|
+
"notice": "rp_FHUyRq_notice",
|
|
11199
|
+
"grid": "rp_FHUyRq_grid",
|
|
11200
|
+
"editBody": "rp_FHUyRq_editBody",
|
|
11201
|
+
"starter": "rp_FHUyRq_starter",
|
|
11202
|
+
"viewport": "rp_FHUyRq_viewport"
|
|
9909
11203
|
};
|
|
9910
11204
|
//#endregion
|
|
9911
11205
|
//#region src/client/pages/worlds/StarterWorlds.tsx
|
|
@@ -9963,46 +11257,6 @@ window.__ModuleLoader__.load({
|
|
|
9963
11257
|
});
|
|
9964
11258
|
}
|
|
9965
11259
|
//#endregion
|
|
9966
|
-
//#region src/client/pages/worlds/import-api.ts
|
|
9967
|
-
async function answer(response) {
|
|
9968
|
-
if (!response.ok) {
|
|
9969
|
-
const body = await response.json().catch(() => void 0);
|
|
9970
|
-
const problems = Array.isArray(body?.problems) ? body.problems.join("; ") : void 0;
|
|
9971
|
-
throw new Error(problems ?? (typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim()));
|
|
9972
|
-
}
|
|
9973
|
-
return await response.json();
|
|
9974
|
-
}
|
|
9975
|
-
/** Sends a card file to the host to be read; the answer is what it holds. */
|
|
9976
|
-
async function uploadCard(file) {
|
|
9977
|
-
return await answer(await fetch(`${API_PREFIX}/worlds/import/card`, {
|
|
9978
|
-
method: "POST",
|
|
9979
|
-
credentials: "same-origin",
|
|
9980
|
-
headers: {
|
|
9981
|
-
"x-file-name": encodeURIComponent(file.name),
|
|
9982
|
-
"content-type": file.type || "application/octet-stream"
|
|
9983
|
-
},
|
|
9984
|
-
body: file
|
|
9985
|
-
}));
|
|
9986
|
-
}
|
|
9987
|
-
async function startImport(id, choices, language) {
|
|
9988
|
-
return await answer(await fetch(`${API_PREFIX}/worlds/import/start?id=${encodeURIComponent(id)}`, {
|
|
9989
|
-
method: "POST",
|
|
9990
|
-
credentials: "same-origin",
|
|
9991
|
-
headers: { "content-type": "application/json" },
|
|
9992
|
-
body: JSON.stringify({
|
|
9993
|
-
...choices,
|
|
9994
|
-
language
|
|
9995
|
-
})
|
|
9996
|
-
}));
|
|
9997
|
-
}
|
|
9998
|
-
async function discardImport(id) {
|
|
9999
|
-
await fetch(`${API_PREFIX}/worlds/import?id=${encodeURIComponent(id)}`, {
|
|
10000
|
-
method: "DELETE",
|
|
10001
|
-
credentials: "same-origin"
|
|
10002
|
-
});
|
|
10003
|
-
}
|
|
10004
|
-
const pictureUrl = (id) => `${API_PREFIX}/worlds/import/picture?id=${encodeURIComponent(id)}`;
|
|
10005
|
-
//#endregion
|
|
10006
11260
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/ImportCardPage.module.css.mjs
|
|
10007
11261
|
const css$6 = ".rp_DmG_oG_page{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_DmG_oG_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_DmG_oG_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_DmG_oG_space{flex:auto}.rp_DmG_oG_error{color:var(--dsw-alias-state-error-primary);margin:0;padding:8px 16px;font-size:12px}.rp_DmG_oG_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_DmG_oG_body>*{flex:none;width:100%;max-width:860px}.rp_DmG_oG_top{align-items:flex-start;gap:20px;display:flex}.rp_DmG_oG_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_DmG_oG_noPicture{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;font-size:12px;display:flex}.rp_DmG_oG_about{flex-direction:column;flex:1 1 0;gap:8px;min-width:0;display:flex}.rp_DmG_oG_label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:4px;font-size:12px;display:flex}.rp_DmG_oG_tags{flex-wrap:wrap;gap:6px;display:flex}.rp_DmG_oG_note{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_DmG_oG_section{flex-direction:column;gap:8px;display:flex}.rp_DmG_oG_heading{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_DmG_oG_row{align-items:center;gap:8px;display:flex}.rp_DmG_oG_field,.rp_DmG_oG_entry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg)}.rp_DmG_oG_fieldHead,.rp_DmG_oG_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_DmG_oG_fieldHead{cursor:pointer}.rp_DmG_oG_fieldTitle,.rp_DmG_oG_entryTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px}.rp_DmG_oG_entryTitle{font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0;font-size:13px}.rp_DmG_oG_fieldMeta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_DmG_oG_field .rp_DmG_oG_note,.rp_DmG_oG_entry .rp_DmG_oG_note{padding:0 10px 6px}.rp_DmG_oG_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_DmG_oG_entryOff .rp_DmG_oG_entryTitle{color:var(--dsw-alias-label-tertiary);text-decoration:line-through}.rp_DmG_oG_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_DmG_oG_body{padding-inline:16px}.rp_DmG_oG_top{flex-direction:column}.rp_DmG_oG_picture{width:96px;height:128px}.rp_DmG_oG_row{flex-wrap:wrap}}.rp_DmG_oG_choice input{margin-top:3px}.rp_DmG_oG_choiceText{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_DmG_oG_preview{white-space:pre-wrap;word-break:break-word;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}";
|
|
10008
11262
|
const key$6 = "src/client/pages/worlds/ImportCardPage.module.css";
|
|
@@ -10015,33 +11269,33 @@ window.__ModuleLoader__.load({
|
|
|
10015
11269
|
}
|
|
10016
11270
|
tag$6.textContent = css$6;
|
|
10017
11271
|
var ImportCardPage_module_css_default = {
|
|
10018
|
-
"top": "rp_DmG_oG_top",
|
|
10019
|
-
"fieldTitle": "rp_DmG_oG_fieldTitle",
|
|
10020
|
-
"text": "rp_DmG_oG_text",
|
|
10021
|
-
"entryOff": "rp_DmG_oG_entryOff",
|
|
10022
11272
|
"picture": "rp_DmG_oG_picture",
|
|
10023
|
-
"
|
|
10024
|
-
"about": "rp_DmG_oG_about",
|
|
10025
|
-
"title": "rp_DmG_oG_title",
|
|
10026
|
-
"tags": "rp_DmG_oG_tags",
|
|
10027
|
-
"page": "rp_DmG_oG_page",
|
|
10028
|
-
"note": "rp_DmG_oG_note",
|
|
11273
|
+
"fieldHead": "rp_DmG_oG_fieldHead",
|
|
10029
11274
|
"entryHead": "rp_DmG_oG_entryHead",
|
|
10030
|
-
"
|
|
10031
|
-
"
|
|
11275
|
+
"text": "rp_DmG_oG_text",
|
|
11276
|
+
"page": "rp_DmG_oG_page",
|
|
11277
|
+
"space": "rp_DmG_oG_space",
|
|
11278
|
+
"entry": "rp_DmG_oG_entry",
|
|
11279
|
+
"fieldTitle": "rp_DmG_oG_fieldTitle",
|
|
10032
11280
|
"entryTitle": "rp_DmG_oG_entryTitle",
|
|
10033
11281
|
"fieldMeta": "rp_DmG_oG_fieldMeta",
|
|
10034
|
-
"
|
|
10035
|
-
"
|
|
11282
|
+
"tags": "rp_DmG_oG_tags",
|
|
11283
|
+
"note": "rp_DmG_oG_note",
|
|
10036
11284
|
"noPicture": "rp_DmG_oG_noPicture",
|
|
11285
|
+
"entryOff": "rp_DmG_oG_entryOff",
|
|
10037
11286
|
"error": "rp_DmG_oG_error",
|
|
10038
|
-
"
|
|
10039
|
-
"
|
|
11287
|
+
"preview": "rp_DmG_oG_preview",
|
|
11288
|
+
"choice": "rp_DmG_oG_choice",
|
|
11289
|
+
"choiceText": "rp_DmG_oG_choiceText",
|
|
11290
|
+
"body": "rp_DmG_oG_body",
|
|
11291
|
+
"top": "rp_DmG_oG_top",
|
|
10040
11292
|
"header": "rp_DmG_oG_header",
|
|
11293
|
+
"title": "rp_DmG_oG_title",
|
|
11294
|
+
"section": "rp_DmG_oG_section",
|
|
11295
|
+
"about": "rp_DmG_oG_about",
|
|
11296
|
+
"heading": "rp_DmG_oG_heading",
|
|
10041
11297
|
"label": "rp_DmG_oG_label",
|
|
10042
11298
|
"row": "rp_DmG_oG_row",
|
|
10043
|
-
"fieldHead": "rp_DmG_oG_fieldHead",
|
|
10044
|
-
"choice": "rp_DmG_oG_choice",
|
|
10045
11299
|
"field": "rp_DmG_oG_field"
|
|
10046
11300
|
};
|
|
10047
11301
|
//#endregion
|
|
@@ -10485,6 +11739,12 @@ window.__ModuleLoader__.load({
|
|
|
10485
11739
|
role: "alert",
|
|
10486
11740
|
children: t("authorWorldFailed", { message: state.authoring.error })
|
|
10487
11741
|
}),
|
|
11742
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TranslateBanner, {
|
|
11743
|
+
t,
|
|
11744
|
+
worldId: editing.id,
|
|
11745
|
+
worldName: editing.name,
|
|
11746
|
+
openChat
|
|
11747
|
+
}),
|
|
10488
11748
|
addingAvatars && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AddAvatarsDialog, {
|
|
10489
11749
|
t,
|
|
10490
11750
|
worldId: editing.id,
|
|
@@ -10684,6 +11944,8 @@ window.__ModuleLoader__.load({
|
|
|
10684
11944
|
associateHelp: "The most extra memories a character is reminded of because they are strongly tied (the same people together with the same place or tags) to something the moment called to mind, and matter enough. 0 turns it off.",
|
|
10685
11945
|
diversity: "Spread of what is recalled",
|
|
10686
11946
|
diversityHelp: "From 0 to 1: how much a memory that says what one already chosen says counts against it, so that a character is not reminded of the same moment several times. 0 chooses by score alone.",
|
|
11947
|
+
foldedFade: "How long digested memories last",
|
|
11948
|
+
foldedFadeHelp: "From 0.05 to 1. Once a belief rests on something a character took in, that memory fades this much as fast (a half means it fades twice as soon), and it is not told again when the belief is. 1 changes nothing.",
|
|
10687
11949
|
lookup: "Characters can look up memories",
|
|
10688
11950
|
lookupHelp: "While it decides, a character can ask itself about something it remembers beyond what the moment already brought to mind. Each character only reaches its own memories. It makes a character's turn a little longer.",
|
|
10689
11951
|
lookupCalls: "Memory look-ups per decision",
|
|
@@ -10764,6 +12026,10 @@ window.__ModuleLoader__.load({
|
|
|
10764
12026
|
modelsSuggestionsHelp: "As provider/model. Leave empty to use the chat's own model.",
|
|
10765
12027
|
modelsAuthoring: "Model for the world and plot author",
|
|
10766
12028
|
modelsAuthoringHelp: "As provider/model. Leave empty to use the chat's own model. Made-up characters, places and things are only as good as this model.",
|
|
12029
|
+
diceVisibility: "Dice",
|
|
12030
|
+
diceVisibilityHelp: "What the player sees of the dice the game master rolls: a collapsed card under the narration to open when you want to check, or nothing, to stay in the story. The dice are rolled either way.",
|
|
12031
|
+
diceHidden: "Hidden",
|
|
12032
|
+
diceCard: "Collapsed card",
|
|
10767
12033
|
imagesOff: "Off",
|
|
10768
12034
|
imagesManual: "Manual",
|
|
10769
12035
|
imagesEveryTurn: "Every turn",
|
|
@@ -10827,6 +12093,8 @@ window.__ModuleLoader__.load({
|
|
|
10827
12093
|
recallHelp: "角色每次行动时最多被唤起的记忆条数,按当前情境联想到的内容挑选。",
|
|
10828
12094
|
overRetrieve: "每条回忆的候选倍数",
|
|
10829
12095
|
overRetrieveHelp: "为了选出角色被唤起的记忆,会先检索出此倍数的候选(按情境线索、字词和语义),再保留最好的;若已配置重排序服务,则由它评判这张更大的网。1 表示直接从第一次检索中选取。",
|
|
12096
|
+
foldedFade: "已归纳记忆保留多久",
|
|
12097
|
+
foldedFadeHelp: "0.05 到 1。一旦某个信念建立在角色见闻之上,那条记忆的保留时间就缩短到这个比例(0.5 表示淡忘速度快一倍),并且在讲到该信念时不再重复讲它。1 表示不改变。",
|
|
10830
12098
|
diversity: "回忆的分散程度",
|
|
10831
12099
|
diversityHelp: "0 到 1:与已选中的某条记忆说的是同一件事的记忆要被扣多少分,这样角色就不会把同一个时刻想起好几遍。0 表示只按得分选择。",
|
|
10832
12100
|
associate: "顺带想起的记忆",
|
|
@@ -10911,6 +12179,10 @@ window.__ModuleLoader__.load({
|
|
|
10911
12179
|
modelsSuggestionsHelp: "写成 提供方/模型。留空则使用对话自己的模型。",
|
|
10912
12180
|
modelsAuthoring: "世界与剧情作者使用的模型",
|
|
10913
12181
|
modelsAuthoringHelp: "写成 提供方/模型。留空则使用对话自己的模型。新编造的角色、地点和物品的质量取决于这个模型。",
|
|
12182
|
+
diceVisibility: "骰子",
|
|
12183
|
+
diceVisibilityHelp: "玩家能看到主持人掷出的骰子的什么:叙述下方一张折叠的卡片,想核对时可以展开;或什么都不显示,保持沉浸在故事里。无论哪种,骰子都会照常掷出。",
|
|
12184
|
+
diceHidden: "隐藏",
|
|
12185
|
+
diceCard: "折叠卡片",
|
|
10914
12186
|
imagesOff: "关闭",
|
|
10915
12187
|
imagesManual: "手动",
|
|
10916
12188
|
imagesEveryTurn: "每轮",
|
|
@@ -11041,6 +12313,15 @@ window.__ModuleLoader__.load({
|
|
|
11041
12313
|
openingAuthor: "Opening…",
|
|
11042
12314
|
authorWorldFailed: "Could not open the authoring chat: {message}",
|
|
11043
12315
|
authoringChatTitle: "Authoring {name}",
|
|
12316
|
+
translateWarning: "This world is written in {from}, but you use {to}. Names, descriptions and the characters' speech may mix the two languages.",
|
|
12317
|
+
translateAction: "Translate into {to}",
|
|
12318
|
+
translateOpening: "Opening…",
|
|
12319
|
+
translateChatTitle: "Translating {name}",
|
|
12320
|
+
translateFailed: "Could not start the translation: {message}",
|
|
12321
|
+
translateNotStarted: "The authoring chat opened but the translation did not start: {message}. Ask it to translate the world.",
|
|
12322
|
+
languageEnglish: "English",
|
|
12323
|
+
languageChinese: "Chinese",
|
|
12324
|
+
startLanguageNote: "This world is written in {from}, but the story will be played in {to}: names and descriptions stay in {from}. A translated copy can be made from the world's editor.",
|
|
11044
12325
|
addAvatars: "Add avatars",
|
|
11045
12326
|
addAvatarsTitle: "Add avatars to the world",
|
|
11046
12327
|
addAvatarsHelp: "Each avatar you tick becomes a playable character of this world, with its own copy of everything. It starts where the world's playable characters start.",
|
|
@@ -11137,6 +12418,15 @@ window.__ModuleLoader__.load({
|
|
|
11137
12418
|
openingAuthor: "正在打开…",
|
|
11138
12419
|
authorWorldFailed: "无法打开世界编辑对话:{message}",
|
|
11139
12420
|
authoringChatTitle: "编辑{name}",
|
|
12421
|
+
translateWarning: "这个世界是用{from}写的,而你使用的是{to}。名字、描述和角色的说话可能会两种语言混在一起。",
|
|
12422
|
+
translateAction: "翻译成{to}",
|
|
12423
|
+
translateOpening: "正在打开…",
|
|
12424
|
+
translateChatTitle: "翻译{name}",
|
|
12425
|
+
translateFailed: "无法开始翻译:{message}",
|
|
12426
|
+
translateNotStarted: "世界编辑对话已打开,但翻译没有开始:{message}。可以请它翻译这个世界。",
|
|
12427
|
+
languageEnglish: "英文",
|
|
12428
|
+
languageChinese: "中文",
|
|
12429
|
+
startLanguageNote: "这个世界是用{from}写的,而故事将用{to}进行:名字和描述仍是{from}。可以在世界编辑器里生成一个翻译后的副本。",
|
|
11140
12430
|
addAvatars: "添加角色形象",
|
|
11141
12431
|
addAvatarsTitle: "把角色形象加入世界",
|
|
11142
12432
|
addAvatarsHelp: "勾选的每个角色形象都会成为这个世界的可扮演角色,并带有自己的一份副本。它们从世界中可扮演角色的起始位置出发。",
|
|
@@ -11505,9 +12795,9 @@ window.__ModuleLoader__.load({
|
|
|
11505
12795
|
}
|
|
11506
12796
|
tag$5.textContent = css$5;
|
|
11507
12797
|
var BranchDialog_module_css_default = {
|
|
11508
|
-
"form": "rp_Dy1TaW_form",
|
|
11509
12798
|
"error": "rp_Dy1TaW_error",
|
|
11510
12799
|
"label": "rp_Dy1TaW_label",
|
|
12800
|
+
"form": "rp_Dy1TaW_form",
|
|
11511
12801
|
"field": "rp_Dy1TaW_field"
|
|
11512
12802
|
};
|
|
11513
12803
|
//#endregion
|
|
@@ -11651,7 +12941,7 @@ window.__ModuleLoader__.load({
|
|
|
11651
12941
|
/** Adds the Gallery tab beside Chat and World: every image of the session in a grid. */
|
|
11652
12942
|
function registerGallery(ctx) {
|
|
11653
12943
|
const t = ctx.locale.bind(NAMESPACE$5);
|
|
11654
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$
|
|
12944
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$13), "roleplay: gallery dictionaries");
|
|
11655
12945
|
ctx.inject(["uiConversation"], (scope) => {
|
|
11656
12946
|
scope.uiConversation.views.register(galleryTarget);
|
|
11657
12947
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -11977,17 +13267,17 @@ window.__ModuleLoader__.load({
|
|
|
11977
13267
|
}
|
|
11978
13268
|
tag$4.textContent = css$4;
|
|
11979
13269
|
var SidebarPage_module_css_default = {
|
|
11980
|
-
"
|
|
11981
|
-
"bar": "rp_Ptco8a_bar",
|
|
11982
|
-
"content": "rp_Ptco8a_content",
|
|
13270
|
+
"text": "rp_Ptco8a_text",
|
|
11983
13271
|
"name": "rp_Ptco8a_name",
|
|
11984
13272
|
"icon": "rp_Ptco8a_icon",
|
|
11985
|
-
"message": "rp_Ptco8a_message",
|
|
11986
13273
|
"page": "rp_Ptco8a_page",
|
|
13274
|
+
"main": "rp_Ptco8a_main",
|
|
13275
|
+
"content": "rp_Ptco8a_content",
|
|
11987
13276
|
"title": "rp_Ptco8a_title",
|
|
13277
|
+
"bar": "rp_Ptco8a_bar",
|
|
11988
13278
|
"description": "rp_Ptco8a_description",
|
|
11989
13279
|
"entry": "rp_Ptco8a_entry",
|
|
11990
|
-
"
|
|
13280
|
+
"message": "rp_Ptco8a_message"
|
|
11991
13281
|
};
|
|
11992
13282
|
//#endregion
|
|
11993
13283
|
//#region src/client/interface/SidebarPage.tsx
|
|
@@ -12313,26 +13603,26 @@ window.__ModuleLoader__.load({
|
|
|
12313
13603
|
}
|
|
12314
13604
|
tag$3.textContent = css$3;
|
|
12315
13605
|
var ChatSettingsView_module_css_default = {
|
|
12316
|
-
"actions": "rp_wLpbxW_actions",
|
|
12317
|
-
"activity": "rp_wLpbxW_activity",
|
|
12318
|
-
"message": "rp_wLpbxW_message",
|
|
12319
|
-
"view": "rp_wLpbxW_view",
|
|
12320
|
-
"field": "rp_wLpbxW_field",
|
|
12321
|
-
"table": "rp_wLpbxW_table",
|
|
12322
|
-
"help": "rp_wLpbxW_help",
|
|
12323
|
-
"reasons": "rp_wLpbxW_reasons",
|
|
12324
13606
|
"pre": "rp_wLpbxW_pre",
|
|
12325
|
-
"label": "rp_wLpbxW_label",
|
|
12326
|
-
"saved": "rp_wLpbxW_saved",
|
|
12327
13607
|
"title": "rp_wLpbxW_title",
|
|
12328
|
-
"
|
|
13608
|
+
"field": "rp_wLpbxW_field",
|
|
12329
13609
|
"link": "rp_wLpbxW_link",
|
|
12330
|
-
"
|
|
13610
|
+
"message": "rp_wLpbxW_message",
|
|
13611
|
+
"table": "rp_wLpbxW_table",
|
|
12331
13612
|
"run": "rp_wLpbxW_run",
|
|
12332
13613
|
"list": "rp_wLpbxW_list",
|
|
12333
|
-
"
|
|
13614
|
+
"notice": "rp_wLpbxW_notice",
|
|
13615
|
+
"label": "rp_wLpbxW_label",
|
|
13616
|
+
"error": "rp_wLpbxW_error",
|
|
13617
|
+
"help": "rp_wLpbxW_help",
|
|
13618
|
+
"actions": "rp_wLpbxW_actions",
|
|
13619
|
+
"saved": "rp_wLpbxW_saved",
|
|
13620
|
+
"view": "rp_wLpbxW_view",
|
|
13621
|
+
"row": "rp_wLpbxW_row",
|
|
13622
|
+
"activity": "rp_wLpbxW_activity",
|
|
13623
|
+
"reasons": "rp_wLpbxW_reasons",
|
|
12334
13624
|
"select": "rp_wLpbxW_select",
|
|
12335
|
-
"
|
|
13625
|
+
"description": "rp_wLpbxW_description"
|
|
12336
13626
|
};
|
|
12337
13627
|
//#endregion
|
|
12338
13628
|
//#region src/client/chat-settings/settings-api.ts
|
|
@@ -12892,7 +14182,16 @@ window.__ModuleLoader__.load({
|
|
|
12892
14182
|
const [saving, setSaving] = (0, react.useState)(false);
|
|
12893
14183
|
const [saved, setSaved] = (0, react.useState)(false);
|
|
12894
14184
|
const [error, setError] = (0, react.useState)();
|
|
14185
|
+
const [toolsError, setToolsError] = (0, react.useState)();
|
|
14186
|
+
const [external, setExternal] = (0, react.useState)([]);
|
|
12895
14187
|
const options = useEmbeddingOptions("all");
|
|
14188
|
+
(0, react.useEffect)(() => {
|
|
14189
|
+
const abort = new AbortController();
|
|
14190
|
+
loadExternalTools(abort.signal).then(setExternal, () => void 0);
|
|
14191
|
+
return () => {
|
|
14192
|
+
abort.abort();
|
|
14193
|
+
};
|
|
14194
|
+
}, []);
|
|
12896
14195
|
(0, react.useEffect)(() => {
|
|
12897
14196
|
if (session === void 0) return void 0;
|
|
12898
14197
|
const abort = new AbortController();
|
|
@@ -12968,6 +14267,24 @@ window.__ModuleLoader__.load({
|
|
|
12968
14267
|
setError(failure instanceof Error ? failure.message : String(failure));
|
|
12969
14268
|
});
|
|
12970
14269
|
};
|
|
14270
|
+
const setTools = (tools) => {
|
|
14271
|
+
if (session === void 0) return;
|
|
14272
|
+
setSaving(true);
|
|
14273
|
+
setToolsError(void 0);
|
|
14274
|
+
saveSettings(session, {
|
|
14275
|
+
...payload.settings,
|
|
14276
|
+
tools
|
|
14277
|
+
}, new AbortController().signal).then((next) => {
|
|
14278
|
+
setLoad({
|
|
14279
|
+
status: "ready",
|
|
14280
|
+
payload: next
|
|
14281
|
+
});
|
|
14282
|
+
}, (failure) => {
|
|
14283
|
+
setToolsError(failure instanceof Error ? failure.message : String(failure));
|
|
14284
|
+
}).finally(() => {
|
|
14285
|
+
setSaving(false);
|
|
14286
|
+
});
|
|
14287
|
+
};
|
|
12971
14288
|
const save = () => {
|
|
12972
14289
|
if (session === void 0 || !changed) return;
|
|
12973
14290
|
setSaving(true);
|
|
@@ -13038,6 +14355,14 @@ window.__ModuleLoader__.load({
|
|
|
13038
14355
|
saved: payload.settings.interface.pack,
|
|
13039
14356
|
disabled: saving
|
|
13040
14357
|
}),
|
|
14358
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolSwitches, {
|
|
14359
|
+
board: payload.settings.tools,
|
|
14360
|
+
onChange: setTools,
|
|
14361
|
+
disabled: saving,
|
|
14362
|
+
external,
|
|
14363
|
+
...toolsError === void 0 ? {} : { error: toolsError },
|
|
14364
|
+
t
|
|
14365
|
+
}),
|
|
13041
14366
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReflectionSection, {
|
|
13042
14367
|
t,
|
|
13043
14368
|
status: payload.reflection,
|
|
@@ -13082,7 +14407,7 @@ window.__ModuleLoader__.load({
|
|
|
13082
14407
|
]
|
|
13083
14408
|
});
|
|
13084
14409
|
}
|
|
13085
|
-
const dictionaries$2 = withDictionaries({
|
|
14410
|
+
const dictionaries$2 = withDictionaries(withDictionaries({
|
|
13086
14411
|
en: {
|
|
13087
14412
|
tab: "Chat settings",
|
|
13088
14413
|
title: "Chat settings",
|
|
@@ -13287,7 +14612,7 @@ window.__ModuleLoader__.load({
|
|
|
13287
14612
|
saved: "已保存。",
|
|
13288
14613
|
saveFailed: "无法保存设置:{message}"
|
|
13289
14614
|
}
|
|
13290
|
-
}, dictionaries$6);
|
|
14615
|
+
}, dictionaries$6), dictionaries$14);
|
|
13291
14616
|
//#endregion
|
|
13292
14617
|
//#region src/client/chat-settings/index.ts
|
|
13293
14618
|
const NAMESPACE$2 = "roleplay.chatSettings";
|
|
@@ -13473,10 +14798,12 @@ window.__ModuleLoader__.load({
|
|
|
13473
14798
|
const ooc = value["ooc"];
|
|
13474
14799
|
const ruled = typeof ooc === "object" && ooc !== null && typeof ooc["legal"] === "boolean" && typeof ooc["note"] === "string" ? ooc : void 0;
|
|
13475
14800
|
const timelineNode = typeof value["timelineNode"] === "string" ? value["timelineNode"] : void 0;
|
|
14801
|
+
const rolls = Array.isArray(value["rolls"]) ? value["rolls"].filter((entry) => typeof entry === "object" && entry !== null && typeof entry.id === "number" && typeof entry.text === "string" && (entry.by === "agent" || entry.by === "player")) : [];
|
|
13476
14802
|
return {
|
|
13477
14803
|
segments,
|
|
13478
14804
|
repaired: value["repaired"],
|
|
13479
14805
|
...ruled === void 0 ? {} : { ooc: ruled },
|
|
14806
|
+
...rolls.length === 0 ? {} : { rolls },
|
|
13480
14807
|
...timelineNode === void 0 ? {} : { timelineNode }
|
|
13481
14808
|
};
|
|
13482
14809
|
} catch {
|
|
@@ -13592,7 +14919,7 @@ window.__ModuleLoader__.load({
|
|
|
13592
14919
|
};
|
|
13593
14920
|
//#endregion
|
|
13594
14921
|
//#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/NarrationView.module.css.mjs
|
|
13595
|
-
const css$2 = ".rp_NFPimG_output{flex-direction:column;gap:8px;min-width:0;margin:8px 0;display:flex}.rp_NFPimG_narration{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:22px}.rp_NFPimG_line{align-items:flex-start;gap:10px;min-width:0;display:flex}.rp_NFPimG_avatar{corner-shape:round;color:#fff;border-radius:14px;flex:none;justify-content:center;align-items:center;width:28px;height:28px;font-size:12px;font-weight:500;display:flex}.rp_NFPimG_speech{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:2px;min-width:0;max-width:100%;padding:6px 10px;display:flex}.rp_NFPimG_name{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.rp_NFPimG_words{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_NFPimG_note{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_preview{opacity:.8}.rp_NFPimG_oocNote,.rp_NFPimG_oocRefused{border-left:2px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);margin:0;padding:6px 10px;font-size:12px;line-height:18px}.rp_NFPimG_oocRefused{border-left-color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_oocLabel{font-weight:500}.rp_NFPimG_images{flex-direction:column;align-items:flex-start;gap:6px;margin:8px 0 12px;display:flex}.rp_NFPimG_sceneImage{object-fit:contain;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:auto;max-width:min(100%,480px);height:auto;max-height:50vh;display:block}.rp_NFPimG_imageButton{cursor:zoom-in;background:0 0;border:0;padding:0}.rp_NFPimG_imageStatus,.rp_NFPimG_imageError{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_imageError{color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_playAll,.rp_NFPimG_playLine{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center}.rp_NFPimG_playAll{float:right;gap:4px;min-height:28px;margin:0 0 8px 12px;padding:2px 4px;font-size:12px;display:inline-flex}.rp_NFPimG_playLine{vertical-align:middle;width:28px;height:28px;margin:-5px -6px -5px 4px;padding:6px;display:inline-flex}.rp_NFPimG_playAll svg,.rp_NFPimG_playLine svg{width:14px;height:14px}.rp_NFPimG_playAll:disabled,.rp_NFPimG_playLine:disabled{cursor:wait;opacity:.5}.rp_NFPimG_playAll:hover,.rp_NFPimG_playLine:hover{color:var(--dsw-alias-label-primary)}.rp_NFPimG_playAll:focus-visible,.rp_NFPimG_playLine:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}@media (pointer:coarse){.rp_NFPimG_playAll,.rp_NFPimG_playLine{min-width:44px;min-height:44px}.rp_NFPimG_playLine{width:44px;height:44px;margin-block:-13px}}";
|
|
14922
|
+
const css$2 = ".rp_NFPimG_output{flex-direction:column;gap:8px;min-width:0;margin:8px 0;display:flex}.rp_NFPimG_narration{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:22px}.rp_NFPimG_line{align-items:flex-start;gap:10px;min-width:0;display:flex}.rp_NFPimG_avatar{corner-shape:round;color:#fff;border-radius:14px;flex:none;justify-content:center;align-items:center;width:28px;height:28px;font-size:12px;font-weight:500;display:flex}.rp_NFPimG_speech{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:2px;min-width:0;max-width:100%;padding:6px 10px;display:flex}.rp_NFPimG_name{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.rp_NFPimG_words{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_NFPimG_note{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_preview{opacity:.8}.rp_NFPimG_oocNote,.rp_NFPimG_oocRefused{border-left:2px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);margin:0;padding:6px 10px;font-size:12px;line-height:18px}.rp_NFPimG_oocRefused{border-left-color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_oocLabel{font-weight:500}.rp_NFPimG_images{flex-direction:column;align-items:flex-start;gap:6px;margin:8px 0 12px;display:flex}.rp_NFPimG_sceneImage{object-fit:contain;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:auto;max-width:min(100%,480px);height:auto;max-height:50vh;display:block}.rp_NFPimG_imageButton{cursor:zoom-in;background:0 0;border:0;padding:0}.rp_NFPimG_imageStatus,.rp_NFPimG_imageError{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_imageError{color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_playAll,.rp_NFPimG_playLine{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center}.rp_NFPimG_playAll{float:right;gap:4px;min-height:28px;margin:0 0 8px 12px;padding:2px 4px;font-size:12px;display:inline-flex}.rp_NFPimG_playLine{vertical-align:middle;width:28px;height:28px;margin:-5px -6px -5px 4px;padding:6px;display:inline-flex}.rp_NFPimG_playAll svg,.rp_NFPimG_playLine svg{width:14px;height:14px}.rp_NFPimG_playAll:disabled,.rp_NFPimG_playLine:disabled{cursor:wait;opacity:.5}.rp_NFPimG_playAll:hover,.rp_NFPimG_playLine:hover{color:var(--dsw-alias-label-primary)}.rp_NFPimG_playAll:focus-visible,.rp_NFPimG_playLine:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}@media (pointer:coarse){.rp_NFPimG_playAll,.rp_NFPimG_playLine{min-width:44px;min-height:44px}.rp_NFPimG_playLine{width:44px;height:44px;margin-block:-13px}}.rp_NFPimG_dice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_NFPimG_diceSummary{cursor:pointer;color:var(--dsw-alias-label-secondary)}.rp_NFPimG_diceList{margin:4px 0 0;padding:0 0 0 18px}";
|
|
13596
14923
|
const key$2 = "src/client/transcript/NarrationView.module.css";
|
|
13597
14924
|
let tag$2 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$2) + "]");
|
|
13598
14925
|
if (tag$2 === null) {
|
|
@@ -13603,25 +14930,28 @@ window.__ModuleLoader__.load({
|
|
|
13603
14930
|
}
|
|
13604
14931
|
tag$2.textContent = css$2;
|
|
13605
14932
|
var NarrationView_module_css_default = {
|
|
13606
|
-
"
|
|
13607
|
-
"playLine": "rp_NFPimG_playLine",
|
|
13608
|
-
"speech": "rp_NFPimG_speech",
|
|
13609
|
-
"preview": "rp_NFPimG_preview",
|
|
14933
|
+
"sceneImage": "rp_NFPimG_sceneImage",
|
|
13610
14934
|
"output": "rp_NFPimG_output",
|
|
13611
|
-
"
|
|
13612
|
-
"
|
|
14935
|
+
"speech": "rp_NFPimG_speech",
|
|
14936
|
+
"imageButton": "rp_NFPimG_imageButton",
|
|
14937
|
+
"diceList": "rp_NFPimG_diceList",
|
|
14938
|
+
"diceSummary": "rp_NFPimG_diceSummary",
|
|
14939
|
+
"dice": "rp_NFPimG_dice",
|
|
13613
14940
|
"oocRefused": "rp_NFPimG_oocRefused",
|
|
13614
|
-
"
|
|
13615
|
-
"
|
|
13616
|
-
"
|
|
13617
|
-
"
|
|
14941
|
+
"note": "rp_NFPimG_note",
|
|
14942
|
+
"preview": "rp_NFPimG_preview",
|
|
14943
|
+
"narration": "rp_NFPimG_narration",
|
|
14944
|
+
"name": "rp_NFPimG_name",
|
|
14945
|
+
"imageStatus": "rp_NFPimG_imageStatus",
|
|
13618
14946
|
"imageError": "rp_NFPimG_imageError",
|
|
13619
14947
|
"playAll": "rp_NFPimG_playAll",
|
|
13620
|
-
"
|
|
13621
|
-
"
|
|
14948
|
+
"playLine": "rp_NFPimG_playLine",
|
|
14949
|
+
"words": "rp_NFPimG_words",
|
|
14950
|
+
"line": "rp_NFPimG_line",
|
|
13622
14951
|
"oocNote": "rp_NFPimG_oocNote",
|
|
13623
|
-
"
|
|
13624
|
-
"
|
|
14952
|
+
"images": "rp_NFPimG_images",
|
|
14953
|
+
"avatar": "rp_NFPimG_avatar",
|
|
14954
|
+
"oocLabel": "rp_NFPimG_oocLabel"
|
|
13625
14955
|
};
|
|
13626
14956
|
//#endregion
|
|
13627
14957
|
//#region src/client/transcript/PreviewNode.tsx
|
|
@@ -13752,6 +15082,21 @@ window.__ModuleLoader__.load({
|
|
|
13752
15082
|
})]
|
|
13753
15083
|
})]
|
|
13754
15084
|
}, index)),
|
|
15085
|
+
data.rolls !== void 0 && data.rolls.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
15086
|
+
className: NarrationView_module_css_default.dice,
|
|
15087
|
+
"data-testid": "roleplay-dice",
|
|
15088
|
+
"data-rp": "dice",
|
|
15089
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
|
|
15090
|
+
className: NarrationView_module_css_default.diceSummary,
|
|
15091
|
+
children: t("diceRolled", { count: String(data.rolls.length) })
|
|
15092
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
15093
|
+
className: NarrationView_module_css_default.diceList,
|
|
15094
|
+
children: data.rolls.map((roll) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
15095
|
+
"data-rp": "roll",
|
|
15096
|
+
children: [roll.by === "player" ? `${t("dicePlayer")} ` : "", roll.text]
|
|
15097
|
+
}, roll.id))
|
|
15098
|
+
})]
|
|
15099
|
+
}),
|
|
13755
15100
|
data.repaired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
13756
15101
|
className: NarrationView_module_css_default.note,
|
|
13757
15102
|
children: t("repaired")
|
|
@@ -13871,11 +15216,11 @@ window.__ModuleLoader__.load({
|
|
|
13871
15216
|
}
|
|
13872
15217
|
tag$1.textContent = css$1;
|
|
13873
15218
|
var SuggestionsDock_module_css_default = {
|
|
13874
|
-
"
|
|
15219
|
+
"label": "rp_rWH4DG_label",
|
|
13875
15220
|
"dock": "rp_rWH4DG_dock",
|
|
13876
15221
|
"chip": "rp_rWH4DG_chip",
|
|
13877
|
-
"
|
|
13878
|
-
"
|
|
15222
|
+
"card": "rp_rWH4DG_card",
|
|
15223
|
+
"lines": "rp_rWH4DG_lines"
|
|
13879
15224
|
};
|
|
13880
15225
|
//#endregion
|
|
13881
15226
|
//#region src/client/transcript/SuggestionsDock.tsx
|
|
@@ -13986,12 +15331,12 @@ window.__ModuleLoader__.load({
|
|
|
13986
15331
|
}
|
|
13987
15332
|
tag.textContent = css;
|
|
13988
15333
|
var TurnsDock_module_css_default = {
|
|
13989
|
-
"error": "rp_f4YLlq_error",
|
|
13990
15334
|
"button": "rp_f4YLlq_button",
|
|
13991
|
-
"dock": "rp_f4YLlq_dock",
|
|
13992
|
-
"group": "rp_f4YLlq_group",
|
|
13993
15335
|
"count": "rp_f4YLlq_count",
|
|
13994
|
-
"select": "rp_f4YLlq_select"
|
|
15336
|
+
"select": "rp_f4YLlq_select",
|
|
15337
|
+
"error": "rp_f4YLlq_error",
|
|
15338
|
+
"group": "rp_f4YLlq_group",
|
|
15339
|
+
"dock": "rp_f4YLlq_dock"
|
|
13995
15340
|
};
|
|
13996
15341
|
//#endregion
|
|
13997
15342
|
//#region src/client/transcript/withdrawn.ts
|
|
@@ -14214,7 +15559,9 @@ window.__ModuleLoader__.load({
|
|
|
14214
15559
|
imageDialog: "Illustration",
|
|
14215
15560
|
imageClose: "Close",
|
|
14216
15561
|
imageReusable: "Reusable",
|
|
14217
|
-
imageUploaded: "Uploaded"
|
|
15562
|
+
imageUploaded: "Uploaded",
|
|
15563
|
+
diceRolled: "Dice rolled: {count}",
|
|
15564
|
+
dicePlayer: "You rolled:"
|
|
14218
15565
|
},
|
|
14219
15566
|
zh: {
|
|
14220
15567
|
speakAll: "播放整段",
|
|
@@ -14251,7 +15598,9 @@ window.__ModuleLoader__.load({
|
|
|
14251
15598
|
imageDialog: "插图",
|
|
14252
15599
|
imageClose: "关闭",
|
|
14253
15600
|
imageReusable: "可复用",
|
|
14254
|
-
imageUploaded: "已上传"
|
|
15601
|
+
imageUploaded: "已上传",
|
|
15602
|
+
diceRolled: "掷骰:{count}",
|
|
15603
|
+
dicePlayer: "你掷出:"
|
|
14255
15604
|
}
|
|
14256
15605
|
};
|
|
14257
15606
|
//#endregion
|