@dsh-agentic-roleplay/core 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{access-CfQWbNZP.js → access-CXtaZNbx.js} +50 -2
- package/lib/{authoring-tools-CdHlvx32.js → authoring-tools-B4mEdKp_.js} +1349 -604
- package/lib/authoring.js +23 -19
- package/lib/{child-lYYeOwl2.js → child-Dtv76jNx.js} +116 -11
- package/lib/client.js +2810 -795
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +3 -3
- package/lib/doctor.js +3 -3
- package/lib/{gallery-BKh7eu80.js → gallery-BZJleAeH.js} +5 -9
- package/lib/{generator-DdZ1-sgv.js → generator-Cg6CQc5S.js} +2 -2
- package/lib/helper.js +1 -1
- package/lib/{hooks-CcQj_dJo.js → hooks-DTjHWTfx.js} +168 -28
- package/lib/images.js +4 -4
- package/lib/index.js +362 -33
- package/lib/{library-QFL6Z_Nr.js → library-GIlrkOim.js} +9 -14
- package/lib/{lorebook-author-tools-DWBnYo1E.js → lorebook-author-tools-BCFFJSle.js} +6 -6
- package/lib/lorebook-authoring.js +4 -4
- package/lib/{narration-CjB_KwwY.js → narration-BVzew4-K.js} +7 -52
- package/lib/orchestration.js +155 -10
- package/lib/{pack-jail-BMy6NcCY.js → pack-jail-hsNQNTOf.js} +25 -15
- package/lib/{packs-BREPSfHy.js → packs-UpK_cvI4.js} +2 -2
- package/lib/{presenter-agent-B49-_iUm.js → presenter-agent-DZOgBOR9.js} +12 -17
- package/lib/{preset-BqgY1Tz4.js → preset-Cyoj1ZWa.js} +4 -4
- package/lib/{preset-author-tools-BB_Dcv2o.js → preset-author-tools-RSta6pHK.js} +6 -6
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-Bwnrx7p0.js → presets-CvpsW_10.js} +17 -9
- package/lib/{reflection-CUWG-6Qg.js → reflection-0qTvw2It.js} +53 -26
- package/lib/{turn-guard-Bb8Ew-1z.js → turn-guard-BzNeGNnc.js} +3 -3
- package/package.json +2 -2
- package/prompts/en/checks/conflict.md +1 -0
- package/prompts/en/checks/decide-conflict.md +1 -0
- package/prompts/en/checks/decide-covered.md +1 -0
- package/prompts/en/checks/decide-opening.md +1 -0
- package/prompts/en/checks/decide-same-thing.md +1 -0
- package/prompts/en/checks/decide-same-value.md +1 -0
- package/prompts/en/checks/decide-sheet.md +1 -1
- package/prompts/en/checks/fidelity.md +1 -0
- package/prompts/en/checks/notice.md +2 -2
- package/prompts/zh/checks/conflict.md +1 -0
- package/prompts/zh/checks/decide-conflict.md +1 -0
- package/prompts/zh/checks/decide-covered.md +1 -0
- package/prompts/zh/checks/decide-opening.md +1 -0
- package/prompts/zh/checks/decide-same-thing.md +1 -0
- package/prompts/zh/checks/decide-same-value.md +1 -0
- package/prompts/zh/checks/decide-sheet.md +1 -1
- package/prompts/zh/checks/fidelity.md +1 -0
- package/prompts/zh/checks/notice.md +2 -2
package/lib/client.js
CHANGED
|
@@ -23,22 +23,22 @@ window.__ModuleLoader__.load({
|
|
|
23
23
|
function PanelIcon({ size }) {
|
|
24
24
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUsersOutlineRegular, { size });
|
|
25
25
|
}
|
|
26
|
-
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/
|
|
27
|
-
const css$
|
|
28
|
-
const key$
|
|
29
|
-
let tag$
|
|
30
|
-
if (tag$
|
|
31
|
-
tag$
|
|
32
|
-
tag$
|
|
33
|
-
tag$
|
|
34
|
-
document.head.appendChild(tag$
|
|
35
|
-
}
|
|
36
|
-
tag$
|
|
26
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/page-tabs/PageTabs.module.css.mjs
|
|
27
|
+
const css$39 = ".rp_LrKukW_tabs{scrollbar-width:none;gap:24px;margin-bottom:-1px;display:flex;overflow-x:auto}.rp_LrKukW_tabs::-webkit-scrollbar{display:none}.rp_LrKukW_tab{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:0;margin:0;padding:8px 0;font-size:13px;line-height:20px;box-shadow:inset 0 -2px #0000}.rp_LrKukW_tab:hover{color:var(--dsw-alias-label-primary)}.rp_LrKukW_tab[aria-selected=true]{color:var(--dsw-alias-state-business-primary);font-weight:500;box-shadow:inset 0 -2px}.rp_LrKukW_tab:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}";
|
|
28
|
+
const key$39 = "src/client/widgets/page-tabs/PageTabs.module.css";
|
|
29
|
+
let tag$39 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$39) + "]");
|
|
30
|
+
if (tag$39 === null) {
|
|
31
|
+
tag$39 = document.createElement("style");
|
|
32
|
+
tag$39.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
33
|
+
tag$39.dataset.pluginCss = key$39;
|
|
34
|
+
document.head.appendChild(tag$39);
|
|
35
|
+
}
|
|
36
|
+
tag$39.textContent = css$39;
|
|
37
37
|
var PageTabs_module_css_default = {
|
|
38
|
-
"tab": "
|
|
39
|
-
"tabs": "
|
|
38
|
+
"tab": "rp_LrKukW_tab",
|
|
39
|
+
"tabs": "rp_LrKukW_tabs"
|
|
40
40
|
};
|
|
41
|
-
// src/client/
|
|
41
|
+
// src/client/widgets/page-tabs/PageTabs.tsx
|
|
42
42
|
/** Underlined text tabs; arrow keys, Home and End move between them. */
|
|
43
43
|
function PageTabs({ tabs, value, label, onChange }) {
|
|
44
44
|
const onKeyDown = (event, index) => {
|
|
@@ -78,20 +78,20 @@ window.__ModuleLoader__.load({
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/RoleplayPanel.module.css.mjs
|
|
81
|
-
const css$
|
|
82
|
-
const key$
|
|
83
|
-
let tag$
|
|
84
|
-
if (tag$
|
|
85
|
-
tag$
|
|
86
|
-
tag$
|
|
87
|
-
tag$
|
|
88
|
-
document.head.appendChild(tag$
|
|
89
|
-
}
|
|
90
|
-
tag$
|
|
81
|
+
const css$38 = ".rp_ua5gBa_panel{min-height:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;display:flex}.rp_ua5gBa_header{border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;padding:12px 24px 0}.rp_ua5gBa_title{margin:0 0 4px;font-size:14px;font-weight:500;line-height:22px}.rp_ua5gBa_body{flex-direction:column;flex:1 1 0;min-height:0;padding:12px 24px 16px;display:flex}@media (width<=640px){.rp_ua5gBa_header,.rp_ua5gBa_body{padding-inline:16px}}";
|
|
82
|
+
const key$38 = "src/client/panel/RoleplayPanel.module.css";
|
|
83
|
+
let tag$38 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$38) + "]");
|
|
84
|
+
if (tag$38 === null) {
|
|
85
|
+
tag$38 = document.createElement("style");
|
|
86
|
+
tag$38.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
87
|
+
tag$38.dataset.pluginCss = key$38;
|
|
88
|
+
document.head.appendChild(tag$38);
|
|
89
|
+
}
|
|
90
|
+
tag$38.textContent = css$38;
|
|
91
91
|
var RoleplayPanel_module_css_default = {
|
|
92
|
+
"body": "rp_ua5gBa_body",
|
|
92
93
|
"panel": "rp_ua5gBa_panel",
|
|
93
94
|
"header": "rp_ua5gBa_header",
|
|
94
|
-
"body": "rp_ua5gBa_body",
|
|
95
95
|
"title": "rp_ua5gBa_title"
|
|
96
96
|
};
|
|
97
97
|
// src/client/panel/RoleplayPanel.tsx
|
|
@@ -137,7 +137,7 @@ window.__ModuleLoader__.load({
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
// src/client/panel/locales.ts
|
|
140
|
-
const dictionaries$
|
|
140
|
+
const dictionaries$25 = {
|
|
141
141
|
en: {
|
|
142
142
|
label: "Role Play",
|
|
143
143
|
heading: "DSH Agentic Role Play",
|
|
@@ -149,16 +149,15 @@ window.__ModuleLoader__.load({
|
|
|
149
149
|
navLabel: "角色扮演栏目"
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
// src/client/
|
|
152
|
+
// src/client/widgets/slot-list/slot-list.ts
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
155
|
-
* Labels are functions of the active language, so the list is rebuilt when
|
|
156
|
-
* either the registrations or the language change.
|
|
154
|
+
* The entries registered into a list slot, ordered, with their current labels.
|
|
155
|
+
* Labels are functions of the active language, so the list is rebuilt when either the registrations or the language change.
|
|
157
156
|
*/
|
|
158
|
-
function
|
|
157
|
+
function createSlotList(ctx, slot) {
|
|
159
158
|
const store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)([]);
|
|
160
159
|
const sync = () => {
|
|
161
|
-
const next = ctx.slots.entriesOfSlot(
|
|
160
|
+
const next = ctx.slots.entriesOfSlot(slot).map(({ options }) => ({
|
|
162
161
|
id: options.id,
|
|
163
162
|
order: options.order ?? 0,
|
|
164
163
|
label: (0, _deepseek_ai_dsh_client_ui_slots.resolveSlotLabel)(options.label) ?? options.id
|
|
@@ -167,20 +166,25 @@ window.__ModuleLoader__.load({
|
|
|
167
166
|
label
|
|
168
167
|
}));
|
|
169
168
|
const previous = store.getSnapshot();
|
|
170
|
-
if (previous.length === next.length && previous.every((
|
|
169
|
+
if (previous.length === next.length && previous.every((entry, index) => entry.id === next[index]?.id && entry.label === next[index]?.label)) return;
|
|
171
170
|
store.set(next);
|
|
172
171
|
};
|
|
173
172
|
return {
|
|
174
173
|
store,
|
|
175
174
|
start: () => {
|
|
176
175
|
sync();
|
|
177
|
-
const disposers = [ctx.slots.subscribe(
|
|
176
|
+
const disposers = [ctx.slots.subscribe(slot, sync), ctx.locale.subscribe(sync)];
|
|
178
177
|
return () => {
|
|
179
178
|
for (const dispose of disposers) dispose();
|
|
180
179
|
};
|
|
181
180
|
}
|
|
182
181
|
};
|
|
183
182
|
}
|
|
183
|
+
// src/client/panel/pages-source.ts
|
|
184
|
+
/** Pages registered into `roleplay.page`, ordered, with their current labels. */
|
|
185
|
+
function createPagesSource(ctx) {
|
|
186
|
+
return createSlotList(ctx, "roleplay.page");
|
|
187
|
+
}
|
|
184
188
|
// src/client/panel/panel-store.ts
|
|
185
189
|
function createPanelStore() {
|
|
186
190
|
return (0, _deepseek_ai_dsh_client_store.defineStore)({
|
|
@@ -191,11 +195,11 @@ window.__ModuleLoader__.load({
|
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
197
|
// src/client/panel/index.ts
|
|
194
|
-
const NAMESPACE$
|
|
198
|
+
const NAMESPACE$16 = "roleplay.panel";
|
|
195
199
|
/** Adds the Role Play entry to the sidebar and the main panel it opens. */
|
|
196
200
|
function registerPanel(ctx) {
|
|
197
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
198
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
201
|
+
const t = ctx.locale.bind(NAMESPACE$16);
|
|
202
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$16, dictionaries$25), "roleplay: panel dictionaries");
|
|
199
203
|
const pages = createPagesSource(ctx);
|
|
200
204
|
ctx.effect(() => pages.start(), "roleplay: page list");
|
|
201
205
|
const handle = createPanelStore();
|
|
@@ -207,7 +211,7 @@ window.__ModuleLoader__.load({
|
|
|
207
211
|
ctx.slots.inject("main", () => ctx.slots.register({
|
|
208
212
|
name: "main",
|
|
209
213
|
key: PANEL_ID,
|
|
210
|
-
locale: NAMESPACE$
|
|
214
|
+
locale: NAMESPACE$16,
|
|
211
215
|
store,
|
|
212
216
|
inject: () => ({ hooks: { pages: pages.store } }),
|
|
213
217
|
children: { "roleplay.page": {
|
|
@@ -220,7 +224,7 @@ window.__ModuleLoader__.load({
|
|
|
220
224
|
id: PANEL_ID,
|
|
221
225
|
order: 5,
|
|
222
226
|
label: () => t("label"),
|
|
223
|
-
locale: NAMESPACE$
|
|
227
|
+
locale: NAMESPACE$16
|
|
224
228
|
}, PanelIcon));
|
|
225
229
|
}
|
|
226
230
|
// src/client/chat/open-chat.ts
|
|
@@ -402,45 +406,45 @@ window.__ModuleLoader__.load({
|
|
|
402
406
|
}
|
|
403
407
|
};
|
|
404
408
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-card/ImportCard.module.css.mjs
|
|
405
|
-
const css$
|
|
406
|
-
const key$
|
|
407
|
-
let tag$
|
|
408
|
-
if (tag$
|
|
409
|
-
tag$
|
|
410
|
-
tag$
|
|
411
|
-
tag$
|
|
412
|
-
document.head.appendChild(tag$
|
|
413
|
-
}
|
|
414
|
-
tag$
|
|
409
|
+
const css$37 = ".rp_5cvtma_page{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_5cvtma_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_5cvtma_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_5cvtma_space{flex:auto}.rp_5cvtma_error{color:var(--dsw-alias-state-error-primary);margin:0;padding:8px 16px;font-size:12px}.rp_5cvtma_body{box-sizing:border-box;flex-direction:column;flex:1 1 0;gap:20px;min-height:0;padding:20px 24px 40px;display:flex;overflow-y:auto}.rp_5cvtma_body>*{flex:none;width:100%;max-width:860px}.rp_5cvtma_top{align-items:flex-start;gap:20px;display:flex}.rp_5cvtma_picture{object-fit:cover;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex:0 0 120px;width:120px;height:160px}.rp_5cvtma_noPicture{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;font-size:12px;display:flex}.rp_5cvtma_about{flex-direction:column;flex:1 1 0;gap:8px;min-width:0;display:flex}.rp_5cvtma_label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:4px;font-size:12px;display:flex}.rp_5cvtma_tags{flex-wrap:wrap;gap:6px;display:flex}.rp_5cvtma_note{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_5cvtma_section{flex-direction:column;gap:8px;display:flex}.rp_5cvtma_heading{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_5cvtma_row{align-items:center;gap:8px;display:flex}.rp_5cvtma_field,.rp_5cvtma_entry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg)}.rp_5cvtma_fieldHead,.rp_5cvtma_entryHead{box-sizing:border-box;width:100%;font:inherit;text-align:left;color:inherit;background:0 0;border:0;align-items:center;gap:8px;padding:8px 10px;display:flex}.rp_5cvtma_fieldHead{cursor:pointer}.rp_5cvtma_fieldTitle,.rp_5cvtma_entryTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px}.rp_5cvtma_entryTitle{font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0;font-size:13px}.rp_5cvtma_fieldMeta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5cvtma_field .rp_5cvtma_note,.rp_5cvtma_entry .rp_5cvtma_note{padding:0 10px 6px}.rp_5cvtma_text{white-space:pre-wrap;word-break:break-word;max-height:320px;font:inherit;color:var(--dsw-alias-label-secondary);border-top:.5px solid var(--dsw-alias-border-l4);margin:0;padding:8px 10px 10px;font-size:12px;line-height:18px;overflow:auto}.rp_5cvtma_entryOff .rp_5cvtma_entryTitle{color:var(--dsw-alias-label-tertiary);text-decoration:line-through}.rp_5cvtma_choice{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}@media (width<=640px){.rp_5cvtma_body{padding-inline:16px}.rp_5cvtma_top{flex-direction:column}.rp_5cvtma_picture{width:96px;height:128px}.rp_5cvtma_row{flex-wrap:wrap}}.rp_5cvtma_choice input{margin-top:3px}.rp_5cvtma_choiceText{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_5cvtma_preview{white-space:pre-wrap;word-break:break-word;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}";
|
|
410
|
+
const key$37 = "src/client/widgets/import-card/ImportCard.module.css";
|
|
411
|
+
let tag$37 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$37) + "]");
|
|
412
|
+
if (tag$37 === null) {
|
|
413
|
+
tag$37 = document.createElement("style");
|
|
414
|
+
tag$37.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
415
|
+
tag$37.dataset.pluginCss = key$37;
|
|
416
|
+
document.head.appendChild(tag$37);
|
|
417
|
+
}
|
|
418
|
+
tag$37.textContent = css$37;
|
|
415
419
|
var ImportCard_module_css_default = {
|
|
420
|
+
"entryHead": "rp_5cvtma_entryHead",
|
|
421
|
+
"section": "rp_5cvtma_section",
|
|
422
|
+
"entry": "rp_5cvtma_entry",
|
|
423
|
+
"choice": "rp_5cvtma_choice",
|
|
424
|
+
"page": "rp_5cvtma_page",
|
|
425
|
+
"header": "rp_5cvtma_header",
|
|
426
|
+
"note": "rp_5cvtma_note",
|
|
427
|
+
"top": "rp_5cvtma_top",
|
|
416
428
|
"title": "rp_5cvtma_title",
|
|
417
|
-
"label": "rp_5cvtma_label",
|
|
418
|
-
"error": "rp_5cvtma_error",
|
|
419
429
|
"space": "rp_5cvtma_space",
|
|
420
|
-
"note": "rp_5cvtma_note",
|
|
421
|
-
"section": "rp_5cvtma_section",
|
|
422
|
-
"body": "rp_5cvtma_body",
|
|
423
|
-
"heading": "rp_5cvtma_heading",
|
|
424
|
-
"row": "rp_5cvtma_row",
|
|
425
430
|
"entryTitle": "rp_5cvtma_entryTitle",
|
|
426
|
-
"
|
|
427
|
-
"
|
|
431
|
+
"about": "rp_5cvtma_about",
|
|
432
|
+
"tags": "rp_5cvtma_tags",
|
|
428
433
|
"field": "rp_5cvtma_field",
|
|
429
|
-
"
|
|
434
|
+
"text": "rp_5cvtma_text",
|
|
430
435
|
"noPicture": "rp_5cvtma_noPicture",
|
|
431
|
-
"
|
|
432
|
-
"
|
|
436
|
+
"row": "rp_5cvtma_row",
|
|
437
|
+
"picture": "rp_5cvtma_picture",
|
|
433
438
|
"fieldHead": "rp_5cvtma_fieldHead",
|
|
434
|
-
"
|
|
435
|
-
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
436
|
-
"tags": "rp_5cvtma_tags",
|
|
437
|
-
"choice": "rp_5cvtma_choice",
|
|
438
|
-
"preview": "rp_5cvtma_preview",
|
|
439
|
-
"text": "rp_5cvtma_text",
|
|
440
|
-
"about": "rp_5cvtma_about",
|
|
439
|
+
"entryOff": "rp_5cvtma_entryOff",
|
|
441
440
|
"choiceText": "rp_5cvtma_choiceText",
|
|
442
|
-
"
|
|
443
|
-
"
|
|
441
|
+
"error": "rp_5cvtma_error",
|
|
442
|
+
"label": "rp_5cvtma_label",
|
|
443
|
+
"body": "rp_5cvtma_body",
|
|
444
|
+
"heading": "rp_5cvtma_heading",
|
|
445
|
+
"fieldMeta": "rp_5cvtma_fieldMeta",
|
|
446
|
+
"fieldTitle": "rp_5cvtma_fieldTitle",
|
|
447
|
+
"preview": "rp_5cvtma_preview"
|
|
444
448
|
};
|
|
445
449
|
// src/client/widgets/import-card/ImportCard.tsx
|
|
446
450
|
const pictureUrl = (id) => `${API_PREFIX}/worlds/import/picture?id=${encodeURIComponent(id)}`;
|
|
@@ -911,49 +915,49 @@ window.__ModuleLoader__.load({
|
|
|
911
915
|
});
|
|
912
916
|
}
|
|
913
917
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/catalogue/CataloguePage.module.css.mjs
|
|
914
|
-
const css$
|
|
915
|
-
const key$
|
|
916
|
-
let tag$
|
|
917
|
-
if (tag$
|
|
918
|
-
tag$
|
|
919
|
-
tag$
|
|
920
|
-
tag$
|
|
921
|
-
document.head.appendChild(tag$
|
|
922
|
-
}
|
|
923
|
-
tag$
|
|
918
|
+
const css$36 = ".rp_qK1u-G_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_qK1u-G_toolbar{flex-wrap:wrap;flex:none;align-items:center;gap:8px;min-height:32px;display:flex}.rp_qK1u-G_spacer{flex:auto}.rp_qK1u-G_select,.rp_qK1u-G_search{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_qK1u-G_search{min-width:200px}.rp_qK1u-G_select:focus-visible,.rp_qK1u-G_search:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_qK1u-G_status{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.rp_qK1u-G_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_qK1u-G_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_qK1u-G_grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_qK1u-G_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);min-width:0;font:inherit;text-align:left;color:inherit;background:var(--dsw-alias-settings-card-fill);cursor:pointer;flex-direction:column;padding:0;transition:border-color .12s;display:flex;overflow:hidden}.rp_qK1u-G_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_qK1u-G_card:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_qK1u-G_cover{aspect-ratio:4/3;background:var(--dsw-alias-bg-layer-3)}.rp_qK1u-G_image{object-fit:cover;width:100%;height:100%;display:block}.rp_qK1u-G_placeholder{color:#ffffffd9;background:linear-gradient(145deg, hsl(var(--rp-hue) 38% 46%), hsl(calc(var(--rp-hue) + 35) 38% 32%));user-select:none;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:500;display:flex}.rp_qK1u-G_body{flex-direction:column;gap:4px;padding:8px 10px 10px;display:flex}.rp_qK1u-G_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_qK1u-G_meta{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_qK1u-G_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_qK1u-G_more{justify-content:center;padding:12px 0;display:flex}.rp_qK1u-G_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_qK1u-G_form{flex-direction:column;gap:8px;display:flex}.rp_qK1u-G_field{flex-direction:column;gap:4px;display:flex}.rp_qK1u-G_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_qK1u-G_detail{flex-direction:column;gap:8px;font-size:13px;display:flex}.rp_qK1u-G_description{white-space:pre-wrap;max-height:240px;color:var(--dsw-alias-label-secondary);margin:0;overflow-y:auto}.rp_qK1u-G_success{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_qK1u-G_kinds{border-bottom:1px solid var(--dsw-alias-border-l2);flex:none;gap:16px;display:flex}.rp_qK1u-G_kind{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;margin-bottom:-1px;padding:4px 0 6px;font-size:13px}.rp_qK1u-G_kind[aria-selected=true]{border-bottom-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary);font-weight:500}.rp_qK1u-G_kind:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.rp_qK1u-G_updates{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;flex:none;align-items:center;gap:4px 8px;margin:0;padding:0;font-size:12px;list-style:none;display:flex}.rp_qK1u-G_update{border:.5px solid var(--dsw-alias-state-business-primary);border-radius:var(--dsw-radius-sm);font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;padding:2px 8px}.rp_qK1u-G_warning{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-secondary);flex-direction:column;gap:8px;padding:8px 12px;font-size:12px;display:flex}.rp_qK1u-G_warning p{margin:0}.rp_qK1u-G_changes{font-family:var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-tertiary);margin:0;padding-left:16px;font-size:12px}.rp_qK1u-G_actions{flex-wrap:wrap;gap:8px;display:flex}";
|
|
919
|
+
const key$36 = "src/client/pages/catalogue/CataloguePage.module.css";
|
|
920
|
+
let tag$36 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$36) + "]");
|
|
921
|
+
if (tag$36 === null) {
|
|
922
|
+
tag$36 = document.createElement("style");
|
|
923
|
+
tag$36.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
924
|
+
tag$36.dataset.pluginCss = key$36;
|
|
925
|
+
document.head.appendChild(tag$36);
|
|
926
|
+
}
|
|
927
|
+
tag$36.textContent = css$36;
|
|
924
928
|
var CataloguePage_module_css_default = {
|
|
925
|
-
"
|
|
929
|
+
"kind": "rp_qK1u-G_kind",
|
|
930
|
+
"image": "rp_qK1u-G_image",
|
|
931
|
+
"placeholder": "rp_qK1u-G_placeholder",
|
|
932
|
+
"detail": "rp_qK1u-G_detail",
|
|
933
|
+
"card": "rp_qK1u-G_card",
|
|
934
|
+
"page": "rp_qK1u-G_page",
|
|
935
|
+
"notice": "rp_qK1u-G_notice",
|
|
936
|
+
"name": "rp_qK1u-G_name",
|
|
937
|
+
"field": "rp_qK1u-G_field",
|
|
938
|
+
"form": "rp_qK1u-G_form",
|
|
939
|
+
"updates": "rp_qK1u-G_updates",
|
|
926
940
|
"spacer": "rp_qK1u-G_spacer",
|
|
927
941
|
"changes": "rp_qK1u-G_changes",
|
|
928
|
-
"
|
|
929
|
-
"
|
|
930
|
-
"image": "rp_qK1u-G_image",
|
|
931
|
-
"more": "rp_qK1u-G_more",
|
|
932
|
-
"kinds": "rp_qK1u-G_kinds",
|
|
933
|
-
"actions": "rp_qK1u-G_actions",
|
|
942
|
+
"tags": "rp_qK1u-G_tags",
|
|
943
|
+
"toolbar": "rp_qK1u-G_toolbar",
|
|
934
944
|
"status": "rp_qK1u-G_status",
|
|
935
|
-
"
|
|
936
|
-
"kind": "rp_qK1u-G_kind",
|
|
945
|
+
"viewport": "rp_qK1u-G_viewport",
|
|
937
946
|
"message": "rp_qK1u-G_message",
|
|
938
|
-
"page": "rp_qK1u-G_page",
|
|
939
|
-
"detail": "rp_qK1u-G_detail",
|
|
940
|
-
"form": "rp_qK1u-G_form",
|
|
941
|
-
"warning": "rp_qK1u-G_warning",
|
|
942
|
-
"update": "rp_qK1u-G_update",
|
|
943
947
|
"description": "rp_qK1u-G_description",
|
|
944
|
-
"
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
+
"success": "rp_qK1u-G_success",
|
|
949
|
+
"warning": "rp_qK1u-G_warning",
|
|
950
|
+
"kinds": "rp_qK1u-G_kinds",
|
|
951
|
+
"label": "rp_qK1u-G_label",
|
|
948
952
|
"body": "rp_qK1u-G_body",
|
|
953
|
+
"grid": "rp_qK1u-G_grid",
|
|
949
954
|
"search": "rp_qK1u-G_search",
|
|
950
|
-
"
|
|
951
|
-
"card": "rp_qK1u-G_card",
|
|
952
|
-
"meta": "rp_qK1u-G_meta",
|
|
955
|
+
"actions": "rp_qK1u-G_actions",
|
|
953
956
|
"cover": "rp_qK1u-G_cover",
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"
|
|
957
|
+
"meta": "rp_qK1u-G_meta",
|
|
958
|
+
"update": "rp_qK1u-G_update",
|
|
959
|
+
"more": "rp_qK1u-G_more",
|
|
960
|
+
"select": "rp_qK1u-G_select"
|
|
957
961
|
};
|
|
958
962
|
// src/client/pages/catalogue/ImportUrlDialog.tsx
|
|
959
963
|
/** Installs a world from the address of its archive; an address on a configured catalogue's site is asked for with that catalogue's key. */
|
|
@@ -1141,30 +1145,30 @@ window.__ModuleLoader__.load({
|
|
|
1141
1145
|
};
|
|
1142
1146
|
const SAMPLING_KEYS = Object.keys(SAMPLING_RANGES);
|
|
1143
1147
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-selection/ImportSelection.module.css.mjs
|
|
1144
|
-
const css$
|
|
1145
|
-
const key$
|
|
1146
|
-
let tag$
|
|
1147
|
-
if (tag$
|
|
1148
|
-
tag$
|
|
1149
|
-
tag$
|
|
1150
|
-
tag$
|
|
1151
|
-
document.head.appendChild(tag$
|
|
1152
|
-
}
|
|
1153
|
-
tag$
|
|
1148
|
+
const css$35 = ".rp_Jx0l4q_body{flex-direction:column;gap:12px;min-width:min(640px,100%);max-height:calc(100vh - 220px);display:flex;overflow-y:auto}.rp_Jx0l4q_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_Jx0l4q_bar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Jx0l4q_count{color:var(--dsw-alias-label-tertiary);margin-right:auto;font-size:12px}.rp_Jx0l4q_list{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;max-height:max(120px,min(420px,100vh - 560px));margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.rp_Jx0l4q_row{border-bottom:.5px solid var(--dsw-alias-border-l3);gap:8px;padding:6px 8px;display:flex}.rp_Jx0l4q_row:last-child{border-bottom:0}.rp_Jx0l4q_row[data-usable=false]{opacity:.55}.rp_Jx0l4q_text{min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;gap:2px;font-size:13px;display:flex}.rp_Jx0l4q_meta{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px}.rp_Jx0l4q_note{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Jx0l4q_full{max-height:200px;font:12px/18px var(--dsw-font-mono,monospace);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--dsw-alias-bg-layer-1);border-radius:var(--dsw-radius-sm);margin:4px 0 0;padding:6px 8px;overflow:auto}.rp_Jx0l4q_sampling{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;gap:4px;padding:8px;display:flex}.rp_Jx0l4q_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Jx0l4q_extra{display:block}";
|
|
1149
|
+
const key$35 = "src/client/widgets/import-selection/ImportSelection.module.css";
|
|
1150
|
+
let tag$35 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$35) + "]");
|
|
1151
|
+
if (tag$35 === null) {
|
|
1152
|
+
tag$35 = document.createElement("style");
|
|
1153
|
+
tag$35.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
1154
|
+
tag$35.dataset.pluginCss = key$35;
|
|
1155
|
+
document.head.appendChild(tag$35);
|
|
1156
|
+
}
|
|
1157
|
+
tag$35.textContent = css$35;
|
|
1154
1158
|
var ImportSelection_module_css_default = {
|
|
1155
|
-
"sampling": "rp_Jx0l4q_sampling",
|
|
1156
|
-
"text": "rp_Jx0l4q_text",
|
|
1157
1159
|
"count": "rp_Jx0l4q_count",
|
|
1158
1160
|
"bar": "rp_Jx0l4q_bar",
|
|
1161
|
+
"meta": "rp_Jx0l4q_meta",
|
|
1162
|
+
"full": "rp_Jx0l4q_full",
|
|
1163
|
+
"sampling": "rp_Jx0l4q_sampling",
|
|
1159
1164
|
"body": "rp_Jx0l4q_body",
|
|
1165
|
+
"error": "rp_Jx0l4q_error",
|
|
1166
|
+
"extra": "rp_Jx0l4q_extra",
|
|
1160
1167
|
"help": "rp_Jx0l4q_help",
|
|
1161
|
-
"meta": "rp_Jx0l4q_meta",
|
|
1162
1168
|
"note": "rp_Jx0l4q_note",
|
|
1163
|
-
"
|
|
1169
|
+
"text": "rp_Jx0l4q_text",
|
|
1164
1170
|
"row": "rp_Jx0l4q_row",
|
|
1165
|
-
"list": "rp_Jx0l4q_list"
|
|
1166
|
-
"error": "rp_Jx0l4q_error",
|
|
1167
|
-
"extra": "rp_Jx0l4q_extra"
|
|
1171
|
+
"list": "rp_Jx0l4q_list"
|
|
1168
1172
|
};
|
|
1169
1173
|
// src/client/widgets/import-selection/ImportSelection.tsx
|
|
1170
1174
|
const messageOf$12 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
@@ -2130,7 +2134,7 @@ window.__ModuleLoader__.load({
|
|
|
2130
2134
|
return Object.fromEntries(Object.keys(dictionaries).map((locale) => [locale, Object.fromEntries(Object.entries(dictionaries[locale]).map(([key, value]) => [`${prefix}${key}`, value]))]));
|
|
2131
2135
|
}
|
|
2132
2136
|
// src/client/widgets/import-card/locales.ts
|
|
2133
|
-
const dictionaries$
|
|
2137
|
+
const dictionaries$24 = {
|
|
2134
2138
|
en: {
|
|
2135
2139
|
ic_title: "Import a character card",
|
|
2136
2140
|
ic_updateTitle: "Update a world from a newer card",
|
|
@@ -2229,7 +2233,7 @@ window.__ModuleLoader__.load({
|
|
|
2229
2233
|
}
|
|
2230
2234
|
};
|
|
2231
2235
|
// src/client/widgets/import-selection/locales.ts
|
|
2232
|
-
const dictionaries$
|
|
2236
|
+
const dictionaries$23 = {
|
|
2233
2237
|
en: {
|
|
2234
2238
|
is_title_preset: "Choose what to import from {name}",
|
|
2235
2239
|
is_title_lorebook: "Choose what to import from {name}",
|
|
@@ -2313,7 +2317,7 @@ window.__ModuleLoader__.load({
|
|
|
2313
2317
|
is_failed: "无法导入:{message}"
|
|
2314
2318
|
}
|
|
2315
2319
|
};
|
|
2316
|
-
const dictionaries$
|
|
2320
|
+
const dictionaries$22 = withDictionaries(withDictionaries({
|
|
2317
2321
|
en: {
|
|
2318
2322
|
nav: "Catalogue",
|
|
2319
2323
|
loading: "Loading worlds…",
|
|
@@ -2500,13 +2504,13 @@ window.__ModuleLoader__.load({
|
|
|
2500
2504
|
convertNotStarted: "世界“{name}”已创建,但转换没有开始:{failure}。请打开它的创作对话,自己发送导入消息。",
|
|
2501
2505
|
openChat: "打开对话"
|
|
2502
2506
|
}
|
|
2503
|
-
}, dictionaries$
|
|
2507
|
+
}, dictionaries$23), dictionaries$24);
|
|
2504
2508
|
// src/client/pages/catalogue/index.ts
|
|
2505
|
-
const NAMESPACE$
|
|
2509
|
+
const NAMESPACE$15 = "roleplay.catalogue";
|
|
2506
2510
|
/** Adds the Catalogue page to the Role Play panel: worlds of the catalogues set up in the settings. */
|
|
2507
2511
|
function registerCataloguePage(ctx) {
|
|
2508
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
2509
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
2512
|
+
const t = ctx.locale.bind(NAMESPACE$15);
|
|
2513
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$15, dictionaries$22), "roleplay: catalogue dictionaries");
|
|
2510
2514
|
const catalogue = new CatalogueController(createChatOpener(ctx));
|
|
2511
2515
|
ctx.effect(() => () => {
|
|
2512
2516
|
catalogue.dispose();
|
|
@@ -2528,7 +2532,7 @@ window.__ModuleLoader__.load({
|
|
|
2528
2532
|
id: "catalogue",
|
|
2529
2533
|
order: 3,
|
|
2530
2534
|
label: () => t("nav"),
|
|
2531
|
-
locale: NAMESPACE$
|
|
2535
|
+
locale: NAMESPACE$15,
|
|
2532
2536
|
inject: () => catalogue.inject()
|
|
2533
2537
|
}, CataloguePage));
|
|
2534
2538
|
}
|
|
@@ -2536,7 +2540,7 @@ window.__ModuleLoader__.load({
|
|
|
2536
2540
|
/** The id under which the player avatars are served by the world editor's routes: they are edited as the cast of a world of their own. */
|
|
2537
2541
|
const AVATARS_WORLD_ID = "@avatars";
|
|
2538
2542
|
// src/client/avatars-api.ts
|
|
2539
|
-
async function failure$
|
|
2543
|
+
async function failure$2(response) {
|
|
2540
2544
|
const body = await response.json().catch(() => void 0);
|
|
2541
2545
|
const problems = Array.isArray(body?.problems) ? body.problems.join("; ") : void 0;
|
|
2542
2546
|
return new Error(problems ?? (typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim()));
|
|
@@ -2546,7 +2550,7 @@ window.__ModuleLoader__.load({
|
|
|
2546
2550
|
credentials: "same-origin",
|
|
2547
2551
|
signal
|
|
2548
2552
|
});
|
|
2549
|
-
if (!response.ok) throw await failure$
|
|
2553
|
+
if (!response.ok) throw await failure$2(response);
|
|
2550
2554
|
return (await response.json()).characters.map((character) => ({
|
|
2551
2555
|
key: character.key,
|
|
2552
2556
|
name: character.name,
|
|
@@ -2563,7 +2567,7 @@ window.__ModuleLoader__.load({
|
|
|
2563
2567
|
body: JSON.stringify({ name }),
|
|
2564
2568
|
signal
|
|
2565
2569
|
});
|
|
2566
|
-
if (!response.ok) throw await failure$
|
|
2570
|
+
if (!response.ok) throw await failure$2(response);
|
|
2567
2571
|
return (await response.json()).key;
|
|
2568
2572
|
}
|
|
2569
2573
|
async function deleteAvatar(key, signal) {
|
|
@@ -2572,7 +2576,7 @@ window.__ModuleLoader__.load({
|
|
|
2572
2576
|
credentials: "same-origin",
|
|
2573
2577
|
signal
|
|
2574
2578
|
});
|
|
2575
|
-
if (!response.ok) throw await failure$
|
|
2579
|
+
if (!response.ok) throw await failure$2(response);
|
|
2576
2580
|
}
|
|
2577
2581
|
/** @returns the ids the avatars have in the world. */
|
|
2578
2582
|
async function addAvatarsToWorld(worldId, keys, signal) {
|
|
@@ -2583,7 +2587,7 @@ window.__ModuleLoader__.load({
|
|
|
2583
2587
|
body: JSON.stringify({ avatars: keys }),
|
|
2584
2588
|
signal
|
|
2585
2589
|
});
|
|
2586
|
-
if (!response.ok) throw await failure$
|
|
2590
|
+
if (!response.ok) throw await failure$2(response);
|
|
2587
2591
|
return (await response.json()).added;
|
|
2588
2592
|
}
|
|
2589
2593
|
// src/client/pages/avatars/avatars-controller.ts
|
|
@@ -3035,51 +3039,51 @@ window.__ModuleLoader__.load({
|
|
|
3035
3039
|
}
|
|
3036
3040
|
const isDirty = (character, draft) => Object.keys(editOf$1(character, draft)).length > 0;
|
|
3037
3041
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/CharactersPanel.module.css.mjs
|
|
3038
|
-
const css$
|
|
3039
|
-
const key$
|
|
3040
|
-
let tag$
|
|
3041
|
-
if (tag$
|
|
3042
|
-
tag$
|
|
3043
|
-
tag$
|
|
3044
|
-
tag$
|
|
3045
|
-
document.head.appendChild(tag$
|
|
3042
|
+
const css$34 = ".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}}";
|
|
3043
|
+
const key$34 = "src/client/world-editor/CharactersPanel.module.css";
|
|
3044
|
+
let tag$34 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$34) + "]");
|
|
3045
|
+
if (tag$34 === null) {
|
|
3046
|
+
tag$34 = document.createElement("style");
|
|
3047
|
+
tag$34.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
3048
|
+
tag$34.dataset.pluginCss = key$34;
|
|
3049
|
+
document.head.appendChild(tag$34);
|
|
3046
3050
|
}
|
|
3047
|
-
tag$
|
|
3051
|
+
tag$34.textContent = css$34;
|
|
3048
3052
|
var CharactersPanel_module_css_default = {
|
|
3049
|
-
"
|
|
3050
|
-
"portraitError": "rp_5ZMIxq_portraitError",
|
|
3051
|
-
"error": "rp_5ZMIxq_error",
|
|
3052
|
-
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
3053
|
-
"section": "rp_5ZMIxq_section",
|
|
3054
|
-
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
3053
|
+
"missing": "rp_5ZMIxq_missing",
|
|
3055
3054
|
"row": "rp_5ZMIxq_row",
|
|
3056
|
-
"
|
|
3057
|
-
"
|
|
3058
|
-
"
|
|
3059
|
-
"
|
|
3060
|
-
"
|
|
3055
|
+
"grid": "rp_5ZMIxq_grid",
|
|
3056
|
+
"initial": "rp_5ZMIxq_initial",
|
|
3057
|
+
"section": "rp_5ZMIxq_section",
|
|
3058
|
+
"nameInput": "rp_5ZMIxq_nameInput",
|
|
3059
|
+
"portraitError": "rp_5ZMIxq_portraitError",
|
|
3061
3060
|
"portrait": "rp_5ZMIxq_portrait",
|
|
3061
|
+
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
3062
|
+
"voiceInline": "rp_5ZMIxq_voiceInline",
|
|
3063
|
+
"barText": "rp_5ZMIxq_barText",
|
|
3064
|
+
"label": "rp_5ZMIxq_label",
|
|
3065
|
+
"empty": "rp_5ZMIxq_empty",
|
|
3066
|
+
"sectionTitle": "rp_5ZMIxq_sectionTitle",
|
|
3062
3067
|
"wide": "rp_5ZMIxq_wide",
|
|
3068
|
+
"body": "rp_5ZMIxq_body",
|
|
3069
|
+
"panel": "rp_5ZMIxq_panel",
|
|
3063
3070
|
"head": "rp_5ZMIxq_head",
|
|
3064
|
-
"
|
|
3071
|
+
"meta": "rp_5ZMIxq_meta",
|
|
3072
|
+
"goal": "rp_5ZMIxq_goal",
|
|
3073
|
+
"select": "rp_5ZMIxq_select",
|
|
3074
|
+
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
3065
3075
|
"tabOn": "rp_5ZMIxq_tabOn",
|
|
3066
|
-
"
|
|
3076
|
+
"portraitHint": "rp_5ZMIxq_portraitHint",
|
|
3077
|
+
"placeholder": "rp_5ZMIxq_placeholder",
|
|
3078
|
+
"help": "rp_5ZMIxq_help",
|
|
3067
3079
|
"portraitAction": "rp_5ZMIxq_portraitAction",
|
|
3068
|
-
"
|
|
3080
|
+
"sheet": "rp_5ZMIxq_sheet",
|
|
3081
|
+
"error": "rp_5ZMIxq_error",
|
|
3082
|
+
"bar": "rp_5ZMIxq_bar",
|
|
3069
3083
|
"tabs": "rp_5ZMIxq_tabs",
|
|
3070
|
-
"tab": "rp_5ZMIxq_tab",
|
|
3071
|
-
"meta": "rp_5ZMIxq_meta",
|
|
3072
|
-
"tabsSpace": "rp_5ZMIxq_tabsSpace",
|
|
3073
|
-
"grid": "rp_5ZMIxq_grid",
|
|
3074
3084
|
"field": "rp_5ZMIxq_field",
|
|
3075
|
-
"
|
|
3076
|
-
"
|
|
3077
|
-
"portraitBox": "rp_5ZMIxq_portraitBox",
|
|
3078
|
-
"initial": "rp_5ZMIxq_initial",
|
|
3079
|
-
"panel": "rp_5ZMIxq_panel",
|
|
3080
|
-
"label": "rp_5ZMIxq_label",
|
|
3081
|
-
"select": "rp_5ZMIxq_select",
|
|
3082
|
-
"sectionTitle": "rp_5ZMIxq_sectionTitle"
|
|
3085
|
+
"area": "rp_5ZMIxq_area",
|
|
3086
|
+
"tab": "rp_5ZMIxq_tab"
|
|
3083
3087
|
};
|
|
3084
3088
|
// src/client/world-editor/EditorTabs.tsx
|
|
3085
3089
|
/** Adds expected arrow, Home and End navigation to an existing editor tab strip. */
|
|
@@ -4787,50 +4791,50 @@ window.__ModuleLoader__.load({
|
|
|
4787
4791
|
});
|
|
4788
4792
|
}
|
|
4789
4793
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/RelationsPanel.module.css.mjs
|
|
4790
|
-
const css$
|
|
4791
|
-
const key$
|
|
4792
|
-
let tag$
|
|
4793
|
-
if (tag$
|
|
4794
|
-
tag$
|
|
4795
|
-
tag$
|
|
4796
|
-
tag$
|
|
4797
|
-
document.head.appendChild(tag$
|
|
4794
|
+
const css$33 = ".rp_7pEHTW_panel{flex-direction:column;flex:1 1 0;min-height:0;display:flex;position:relative}.rp_7pEHTW_toolbar{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;align-items:center;gap:4px;padding:8px 16px;display:flex}.rp_7pEHTW_filter{border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:4px 10px}.rp_7pEHTW_filterOn{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_filter:focus-visible,.rp_7pEHTW_edge:focus-visible,.rp_7pEHTW_graphEdge:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:-2px}.rp_7pEHTW_space{flex:1}.rp_7pEHTW_perspective{color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;display:flex}.rp_7pEHTW_perspective select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);max-width:180px;min-height:32px;color:inherit;padding:4px 8px}.rp_7pEHTW_workspace{flex:1 1 0;grid-template-columns:minmax(220px,34%) minmax(320px,1fr);min-height:0;display:grid}.rp_7pEHTW_list{border-right:.5px solid var(--dsw-alias-border-l3);overflow-y:auto}.rp_7pEHTW_edge{border:0;border-bottom:.5px solid var(--dsw-alias-border-l4);width:100%;min-height:48px;color:inherit;text-align:left;cursor:pointer;background:0 0;flex-direction:column;gap:2px;padding:8px 16px;display:flex}.rp_7pEHTW_edgeOn{background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_edgeTitle{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.rp_7pEHTW_edgeKind{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_7pEHTW_empty{color:var(--dsw-alias-label-tertiary);padding:20px}.rp_7pEHTW_inspector{min-width:0;padding:24px 24px 240px;overflow-y:auto}.rp_7pEHTW_head h2{margin:0 0 8px;font-size:16px}.rp_7pEHTW_entities{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:6px;display:flex}.rp_7pEHTW_notice{color:var(--dsw-alias-label-secondary);margin:24px 0}.rp_7pEHTW_form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px;display:grid}.rp_7pEHTW_form label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:5px;font-size:12px;display:flex}.rp_7pEHTW_form select,.rp_7pEHTW_form textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:inherit;font:inherit;padding:6px 8px}.rp_7pEHTW_form textarea{resize:vertical;min-height:96px}.rp_7pEHTW_form select:focus-visible,.rp_7pEHTW_form textarea:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_7pEHTW_wide{grid-column:1/-1}.rp_7pEHTW_metrics{grid-column:1/-1;grid-template-columns:repeat(4,minmax(90px,1fr));gap:10px;display:grid}.rp_7pEHTW_check{align-self:end;align-items:center;min-height:32px;flex-direction:row!important}.rp_7pEHTW_actions{border-top:.5px solid var(--dsw-alias-border-l4);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;margin-top:28px;padding-top:12px;display:flex}.rp_7pEHTW_status{color:var(--dsw-alias-label-secondary);margin-right:auto}.rp_7pEHTW_error{color:var(--dsw-alias-state-error-primary);margin-right:auto}.rp_7pEHTW_graph{background:radial-gradient(circle, var(--dsw-alias-bg-layer-2), transparent 70%);flex:1 1 0;min-height:360px;position:relative;overflow:hidden}.rp_7pEHTW_graph svg{width:100%;height:100%;min-height:520px}.rp_7pEHTW_graphEdge{cursor:pointer;stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_graphEdge:hover,.rp_7pEHTW_graphEdgeOn{stroke:var(--dsw-alias-state-business-primary);stroke-width:4px}.rp_7pEHTW_node circle{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_node_character circle{fill:color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_location circle{fill:color-mix(in srgb, #4a9 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_item circle{fill:color-mix(in srgb, #c90 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_faction circle{fill:color-mix(in srgb, #96c 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node text{fill:var(--dsw-alias-label-primary);pointer-events:none;font-size:12px}.rp_7pEHTW_graphInspector{box-sizing:border-box;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-1);width:min(480px,100% - 40px);max-height:62%;box-shadow:var(--dsw-elevation-panel);border:0;padding:18px;position:absolute;bottom:20px;right:20px;overflow-y:auto}@media (width<=760px){.rp_7pEHTW_workspace{grid-template-columns:1fr}.rp_7pEHTW_list{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l3);max-height:220px}.rp_7pEHTW_inspector{padding-inline:16px}.rp_7pEHTW_form{grid-template-columns:1fr}.rp_7pEHTW_wide,.rp_7pEHTW_metrics{grid-column:1}.rp_7pEHTW_metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rp_7pEHTW_graphInspector{width:calc(100% - 24px);bottom:12px;right:12px}}@media (pointer:coarse){.rp_7pEHTW_filter{min-height:44px}}";
|
|
4795
|
+
const key$33 = "src/client/world-editor/RelationsPanel.module.css";
|
|
4796
|
+
let tag$33 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$33) + "]");
|
|
4797
|
+
if (tag$33 === null) {
|
|
4798
|
+
tag$33 = document.createElement("style");
|
|
4799
|
+
tag$33.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
4800
|
+
tag$33.dataset.pluginCss = key$33;
|
|
4801
|
+
document.head.appendChild(tag$33);
|
|
4798
4802
|
}
|
|
4799
|
-
tag$
|
|
4803
|
+
tag$33.textContent = css$33;
|
|
4800
4804
|
var RelationsPanel_module_css_default = {
|
|
4801
|
-
"wide": "rp_7pEHTW_wide",
|
|
4802
4805
|
"space": "rp_7pEHTW_space",
|
|
4803
|
-
"
|
|
4806
|
+
"graph": "rp_7pEHTW_graph",
|
|
4804
4807
|
"node_location": "rp_7pEHTW_node_location",
|
|
4805
|
-
"
|
|
4806
|
-
"filter": "rp_7pEHTW_filter",
|
|
4807
|
-
"error": "rp_7pEHTW_error",
|
|
4808
|
+
"wide": "rp_7pEHTW_wide",
|
|
4808
4809
|
"edge": "rp_7pEHTW_edge",
|
|
4810
|
+
"edgeOn": "rp_7pEHTW_edgeOn",
|
|
4811
|
+
"perspective": "rp_7pEHTW_perspective",
|
|
4809
4812
|
"inspector": "rp_7pEHTW_inspector",
|
|
4810
|
-
"workspace": "rp_7pEHTW_workspace",
|
|
4811
|
-
"head": "rp_7pEHTW_head",
|
|
4812
|
-
"toolbar": "rp_7pEHTW_toolbar",
|
|
4813
|
-
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
|
|
4814
4813
|
"node_item": "rp_7pEHTW_node_item",
|
|
4814
|
+
"error": "rp_7pEHTW_error",
|
|
4815
|
+
"empty": "rp_7pEHTW_empty",
|
|
4816
|
+
"toolbar": "rp_7pEHTW_toolbar",
|
|
4815
4817
|
"filterOn": "rp_7pEHTW_filterOn",
|
|
4816
4818
|
"edgeTitle": "rp_7pEHTW_edgeTitle",
|
|
4819
|
+
"status": "rp_7pEHTW_status",
|
|
4820
|
+
"entities": "rp_7pEHTW_entities",
|
|
4821
|
+
"head": "rp_7pEHTW_head",
|
|
4822
|
+
"workspace": "rp_7pEHTW_workspace",
|
|
4817
4823
|
"node_character": "rp_7pEHTW_node_character",
|
|
4818
|
-
"
|
|
4824
|
+
"metrics": "rp_7pEHTW_metrics",
|
|
4825
|
+
"node": "rp_7pEHTW_node",
|
|
4826
|
+
"node_faction": "rp_7pEHTW_node_faction",
|
|
4819
4827
|
"list": "rp_7pEHTW_list",
|
|
4828
|
+
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
4829
|
+
"panel": "rp_7pEHTW_panel",
|
|
4820
4830
|
"graphEdge": "rp_7pEHTW_graphEdge",
|
|
4821
|
-
"
|
|
4822
|
-
"
|
|
4823
|
-
"
|
|
4831
|
+
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4832
|
+
"check": "rp_7pEHTW_check",
|
|
4833
|
+
"filter": "rp_7pEHTW_filter",
|
|
4824
4834
|
"notice": "rp_7pEHTW_notice",
|
|
4825
|
-
"
|
|
4826
|
-
"
|
|
4827
|
-
"
|
|
4828
|
-
"panel": "rp_7pEHTW_panel",
|
|
4829
|
-
"check": "rp_7pEHTW_check",
|
|
4830
|
-
"graphInspector": "rp_7pEHTW_graphInspector",
|
|
4831
|
-
"node_faction": "rp_7pEHTW_node_faction",
|
|
4832
|
-
"edgeKind": "rp_7pEHTW_edgeKind",
|
|
4833
|
-
"entities": "rp_7pEHTW_entities"
|
|
4835
|
+
"actions": "rp_7pEHTW_actions",
|
|
4836
|
+
"form": "rp_7pEHTW_form",
|
|
4837
|
+
"graphEdgeOn": "rp_7pEHTW_graphEdgeOn"
|
|
4834
4838
|
};
|
|
4835
4839
|
// src/client/world-editor/RelationsPanel.tsx
|
|
4836
4840
|
const title = (relation) => `${relation.from.name} → ${relation.to.name}`;
|
|
@@ -6188,23 +6192,23 @@ window.__ModuleLoader__.load({
|
|
|
6188
6192
|
}
|
|
6189
6193
|
};
|
|
6190
6194
|
// \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
|
|
6191
|
-
const css$
|
|
6192
|
-
const key$
|
|
6193
|
-
let tag$
|
|
6194
|
-
if (tag$
|
|
6195
|
-
tag$
|
|
6196
|
-
tag$
|
|
6197
|
-
tag$
|
|
6198
|
-
document.head.appendChild(tag$
|
|
6195
|
+
const css$32 = ".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}";
|
|
6196
|
+
const key$32 = "src/client/widgets/pack-frame/PackFrame.module.css";
|
|
6197
|
+
let tag$32 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$32) + "]");
|
|
6198
|
+
if (tag$32 === null) {
|
|
6199
|
+
tag$32 = document.createElement("style");
|
|
6200
|
+
tag$32.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6201
|
+
tag$32.dataset.pluginCss = key$32;
|
|
6202
|
+
document.head.appendChild(tag$32);
|
|
6199
6203
|
}
|
|
6200
|
-
tag$
|
|
6204
|
+
tag$32.textContent = css$32;
|
|
6201
6205
|
var PackFrame_module_css_default = {
|
|
6202
6206
|
"frame": "rp_h_sbFq_frame",
|
|
6203
|
-
"message": "rp_h_sbFq_message",
|
|
6204
|
-
"fill": "rp_h_sbFq_fill",
|
|
6205
6207
|
"problems": "rp_h_sbFq_problems",
|
|
6206
6208
|
"hud": "rp_h_sbFq_hud",
|
|
6207
|
-
"tab": "rp_h_sbFq_tab"
|
|
6209
|
+
"tab": "rp_h_sbFq_tab",
|
|
6210
|
+
"message": "rp_h_sbFq_message",
|
|
6211
|
+
"fill": "rp_h_sbFq_fill"
|
|
6208
6212
|
};
|
|
6209
6213
|
// src/client/widgets/pack-frame/theme.ts
|
|
6210
6214
|
/** The colours of DSH a surface is given, so that it looks right in light and dark. */
|
|
@@ -6452,24 +6456,24 @@ window.__ModuleLoader__.load({
|
|
|
6452
6456
|
const removePackFile = async (world, pack, path, signal) => (await read$2(await fetch(`${API_PREFIX}/worlds/interface/file?${packQuery(world, pack, path)}`, init("DELETE", signal)))).problems;
|
|
6453
6457
|
const createPack = async (world, pack, name, signal) => (await read$2(await fetch(`${API_PREFIX}/worlds/interface/pack?${packQuery(world, pack)}`, init("POST", signal, { name })))).problems;
|
|
6454
6458
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/PacksPanel.module.css.mjs
|
|
6455
|
-
const css$
|
|
6456
|
-
const key$
|
|
6457
|
-
let tag$
|
|
6458
|
-
if (tag$
|
|
6459
|
-
tag$
|
|
6460
|
-
tag$
|
|
6461
|
-
tag$
|
|
6462
|
-
document.head.appendChild(tag$
|
|
6459
|
+
const css$31 = ".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}";
|
|
6460
|
+
const key$31 = "src/client/world-editor/PacksPanel.module.css";
|
|
6461
|
+
let tag$31 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$31) + "]");
|
|
6462
|
+
if (tag$31 === null) {
|
|
6463
|
+
tag$31 = document.createElement("style");
|
|
6464
|
+
tag$31.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
6465
|
+
tag$31.dataset.pluginCss = key$31;
|
|
6466
|
+
document.head.appendChild(tag$31);
|
|
6463
6467
|
}
|
|
6464
|
-
tag$
|
|
6468
|
+
tag$31.textContent = css$31;
|
|
6465
6469
|
var PacksPanel_module_css_default = {
|
|
6466
|
-
"log": "rp_FLaP7q_log",
|
|
6467
|
-
"note": "rp_FLaP7q_note",
|
|
6468
|
-
"stage": "rp_FLaP7q_stage",
|
|
6469
|
-
"group": "rp_FLaP7q_group",
|
|
6470
6470
|
"controls": "rp_FLaP7q_controls",
|
|
6471
|
+
"group": "rp_FLaP7q_group",
|
|
6471
6472
|
"stageTall": "rp_FLaP7q_stageTall",
|
|
6472
|
-
"
|
|
6473
|
+
"log": "rp_FLaP7q_log",
|
|
6474
|
+
"files": "rp_FLaP7q_files",
|
|
6475
|
+
"note": "rp_FLaP7q_note",
|
|
6476
|
+
"stage": "rp_FLaP7q_stage"
|
|
6473
6477
|
};
|
|
6474
6478
|
// src/client/world-editor/PacksPanel.tsx
|
|
6475
6479
|
const WIDTHS = {
|
|
@@ -7553,21 +7557,21 @@ window.__ModuleLoader__.load({
|
|
|
7553
7557
|
}));
|
|
7554
7558
|
}
|
|
7555
7559
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/sampling-fields/SamplingFields.module.css.mjs
|
|
7556
|
-
const css$
|
|
7557
|
-
const key$
|
|
7558
|
-
let tag$
|
|
7559
|
-
if (tag$
|
|
7560
|
-
tag$
|
|
7561
|
-
tag$
|
|
7562
|
-
tag$
|
|
7563
|
-
document.head.appendChild(tag$
|
|
7560
|
+
const css$30 = ".rp_9vxYSG_root{flex-direction:column;gap:8px;display:flex}.rp_9vxYSG_grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px 12px;display:grid}.rp_9vxYSG_field{flex-direction:column;gap:4px;display:flex}.rp_9vxYSG_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9vxYSG_input{font:inherit;border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:inherit;background:0 0;min-width:0;padding:4px 8px;font-size:13px}.rp_9vxYSG_input:disabled{opacity:.6}.rp_9vxYSG_help{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}";
|
|
7561
|
+
const key$30 = "src/client/widgets/sampling-fields/SamplingFields.module.css";
|
|
7562
|
+
let tag$30 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$30) + "]");
|
|
7563
|
+
if (tag$30 === null) {
|
|
7564
|
+
tag$30 = document.createElement("style");
|
|
7565
|
+
tag$30.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
7566
|
+
tag$30.dataset.pluginCss = key$30;
|
|
7567
|
+
document.head.appendChild(tag$30);
|
|
7564
7568
|
}
|
|
7565
|
-
tag$
|
|
7569
|
+
tag$30.textContent = css$30;
|
|
7566
7570
|
var SamplingFields_module_css_default = {
|
|
7571
|
+
"label": "rp_9vxYSG_label",
|
|
7567
7572
|
"grid": "rp_9vxYSG_grid",
|
|
7568
|
-
"help": "rp_9vxYSG_help",
|
|
7569
7573
|
"input": "rp_9vxYSG_input",
|
|
7570
|
-
"
|
|
7574
|
+
"help": "rp_9vxYSG_help",
|
|
7571
7575
|
"root": "rp_9vxYSG_root",
|
|
7572
7576
|
"field": "rp_9vxYSG_field"
|
|
7573
7577
|
};
|
|
@@ -8967,28 +8971,28 @@ window.__ModuleLoader__.load({
|
|
|
8967
8971
|
return next;
|
|
8968
8972
|
}
|
|
8969
8973
|
// \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
|
|
8970
|
-
const css$
|
|
8971
|
-
const key$
|
|
8972
|
-
let tag$
|
|
8973
|
-
if (tag$
|
|
8974
|
-
tag$
|
|
8975
|
-
tag$
|
|
8976
|
-
tag$
|
|
8977
|
-
document.head.appendChild(tag$
|
|
8974
|
+
const css$29 = ".rp_CjoFLq_root{flex-direction:column;gap:12px;display:flex}.rp_CjoFLq_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_CjoFLq_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_CjoFLq_agent{border-top:1px solid var(--dsw-alias-border-l3);flex-direction:column;gap:6px;padding:8px 0;display:flex}.rp_CjoFLq_agentName{font-size:14px;font-weight:500}.rp_CjoFLq_hint{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_CjoFLq_tool{cursor:pointer;align-items:flex-start;gap:8px;font-size:13px;display:flex}.rp_CjoFLq_tool input{margin-top:3px}.rp_CjoFLq_toolText{flex-direction:column;display:flex}.rp_CjoFLq_default{color:var(--dsw-alias-label-tertiary);margin-left:6px;font-size:12px}.rp_CjoFLq_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.rp_CjoFLq_external{flex-direction:column;gap:6px;margin-top:4px;display:flex}.rp_CjoFLq_external>summary{cursor:pointer}";
|
|
8975
|
+
const key$29 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
|
|
8976
|
+
let tag$29 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$29) + "]");
|
|
8977
|
+
if (tag$29 === null) {
|
|
8978
|
+
tag$29 = document.createElement("style");
|
|
8979
|
+
tag$29.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
8980
|
+
tag$29.dataset.pluginCss = key$29;
|
|
8981
|
+
document.head.appendChild(tag$29);
|
|
8978
8982
|
}
|
|
8979
|
-
tag$
|
|
8983
|
+
tag$29.textContent = css$29;
|
|
8980
8984
|
var ToolSwitches_module_css_default = {
|
|
8981
|
-
"title": "rp_CjoFLq_title",
|
|
8982
8985
|
"agentName": "rp_CjoFLq_agentName",
|
|
8983
|
-
"default": "rp_CjoFLq_default",
|
|
8984
|
-
"tool": "rp_CjoFLq_tool",
|
|
8985
|
-
"agent": "rp_CjoFLq_agent",
|
|
8986
|
-
"error": "rp_CjoFLq_error",
|
|
8987
|
-
"toolText": "rp_CjoFLq_toolText",
|
|
8988
8986
|
"root": "rp_CjoFLq_root",
|
|
8989
8987
|
"hint": "rp_CjoFLq_hint",
|
|
8988
|
+
"tool": "rp_CjoFLq_tool",
|
|
8989
|
+
"external": "rp_CjoFLq_external",
|
|
8990
8990
|
"help": "rp_CjoFLq_help",
|
|
8991
|
-
"
|
|
8991
|
+
"agent": "rp_CjoFLq_agent",
|
|
8992
|
+
"title": "rp_CjoFLq_title",
|
|
8993
|
+
"toolText": "rp_CjoFLq_toolText",
|
|
8994
|
+
"default": "rp_CjoFLq_default",
|
|
8995
|
+
"error": "rp_CjoFLq_error"
|
|
8992
8996
|
};
|
|
8993
8997
|
// src/client/widgets/tool-switches/ToolSwitches.tsx
|
|
8994
8998
|
/**
|
|
@@ -9940,7 +9944,7 @@ window.__ModuleLoader__.load({
|
|
|
9940
9944
|
}
|
|
9941
9945
|
// src/client/widgets/gallery-view/gallery-api.ts
|
|
9942
9946
|
const route = (target, path = "") => `${API_PREFIX}/${target.kind}/gallery${path}?id=${encodeURIComponent(target.id)}`;
|
|
9943
|
-
async function failure(response) {
|
|
9947
|
+
async function failure$1(response) {
|
|
9944
9948
|
const body = await response.json().catch(() => void 0);
|
|
9945
9949
|
return new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
9946
9950
|
}
|
|
@@ -9949,7 +9953,7 @@ window.__ModuleLoader__.load({
|
|
|
9949
9953
|
credentials: "same-origin",
|
|
9950
9954
|
signal
|
|
9951
9955
|
});
|
|
9952
|
-
if (!response.ok) throw await failure(response);
|
|
9956
|
+
if (!response.ok) throw await failure$1(response);
|
|
9953
9957
|
return await response.json();
|
|
9954
9958
|
}
|
|
9955
9959
|
/** Adds a picture to the library. @returns its path. */
|
|
@@ -9964,7 +9968,7 @@ window.__ModuleLoader__.load({
|
|
|
9964
9968
|
body: file,
|
|
9965
9969
|
signal
|
|
9966
9970
|
});
|
|
9967
|
-
if (!response.ok) throw await failure(response);
|
|
9971
|
+
if (!response.ok) throw await failure$1(response);
|
|
9968
9972
|
return (await response.json()).path;
|
|
9969
9973
|
}
|
|
9970
9974
|
async function updateImage(target, path, update, signal) {
|
|
@@ -9975,51 +9979,51 @@ window.__ModuleLoader__.load({
|
|
|
9975
9979
|
body: JSON.stringify(update),
|
|
9976
9980
|
signal
|
|
9977
9981
|
});
|
|
9978
|
-
if (!response.ok) throw await failure(response);
|
|
9982
|
+
if (!response.ok) throw await failure$1(response);
|
|
9979
9983
|
return await response.json();
|
|
9980
9984
|
}
|
|
9981
9985
|
const imageUrl = (target, image) => `${route(target, "/file")}&path=${encodeURIComponent(image.path)}&v=${encodeURIComponent(image.createdAt)}`;
|
|
9982
9986
|
// \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
|
|
9983
|
-
const css$
|
|
9984
|
-
const key$
|
|
9985
|
-
let tag$
|
|
9986
|
-
if (tag$
|
|
9987
|
-
tag$
|
|
9988
|
-
tag$
|
|
9989
|
-
tag$
|
|
9990
|
-
document.head.appendChild(tag$
|
|
9987
|
+
const css$28 = ".rp_9pSHmG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_9pSHmG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.rp_9pSHmG_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_9pSHmG_select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_9pSHmG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_9pSHmG_cell{min-width:0}.rp_9pSHmG_thumb{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);width:100%;font:inherit;text-align:left;color:inherit;cursor:pointer;flex-direction:column;padding:0;display:flex;overflow:hidden}.rp_9pSHmG_open{cursor:zoom-in;background:0 0;border:0;padding:0;display:block}.rp_9pSHmG_thumb:hover{border-color:var(--dsw-alias-border-l4)}.rp_9pSHmG_image{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-layer-3);width:100%;display:block}.rp_9pSHmG_caption{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);padding:6px 8px;font-size:12px;overflow:hidden}.rp_9pSHmG_detail{flex-direction:column;gap:12px;width:min(640px,100%);max-height:70vh;display:flex;overflow-y:auto}.rp_9pSHmG_large{border-radius:var(--dsw-radius-lg);object-fit:contain;max-width:100%;max-height:32vh;margin:0 auto;display:block}.rp_9pSHmG_facts{grid-template-columns:max-content 1fr;gap:6px 12px;margin:0;font-size:12px;line-height:18px;display:grid}.rp_9pSHmG_facts dt{color:var(--dsw-alias-label-tertiary)}.rp_9pSHmG_facts dd{min-width:0;color:var(--dsw-alias-label-primary);margin:0}.rp_9pSHmG_pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow-y:auto}.rp_9pSHmG_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_9pSHmG_note{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_9pSHmG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_9pSHmG_status,.rp_9pSHmG_statusError{color:var(--dsw-alias-label-tertiary);padding:0 8px 6px;font-size:12px;line-height:16px}.rp_9pSHmG_statusError{color:var(--dsw-alias-state-error-primary)}.rp_9pSHmG_reusable{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;padding:0 8px 6px;font-size:12px;display:flex}.rp_9pSHmG_reusable input{accent-color:var(--dsw-alias-state-business-primary);margin:0}.rp_9pSHmG_editButton{font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;border:0;align-self:flex-start;margin:0 8px 4px;padding:0;font-size:12px}.rp_9pSHmG_edit{flex-direction:column;gap:12px;width:min(480px,100%);display:flex}.rp_9pSHmG_editField{flex-direction:column;gap:4px;display:flex}.rp_9pSHmG_editLabel{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_9pSHmG_editHelp{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_editArea,.rp_9pSHmG_editInput{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}.rp_9pSHmG_editArea{resize:vertical;min-height:96px}.rp_9pSHmG_editArea:focus-visible,.rp_9pSHmG_editInput:focus-visible,.rp_9pSHmG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}@media (width<=640px){.rp_9pSHmG_page{padding-inline:16px}.rp_9pSHmG_toolbar{align-items:flex-start}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(136px,1fr))}}";
|
|
9988
|
+
const key$28 = "src/client/widgets/gallery-view/GalleryView.module.css";
|
|
9989
|
+
let tag$28 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$28) + "]");
|
|
9990
|
+
if (tag$28 === null) {
|
|
9991
|
+
tag$28 = document.createElement("style");
|
|
9992
|
+
tag$28.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
9993
|
+
tag$28.dataset.pluginCss = key$28;
|
|
9994
|
+
document.head.appendChild(tag$28);
|
|
9991
9995
|
}
|
|
9992
|
-
tag$
|
|
9996
|
+
tag$28.textContent = css$28;
|
|
9993
9997
|
var GalleryView_module_css_default = {
|
|
9994
|
-
"facts": "rp_9pSHmG_facts",
|
|
9995
|
-
"tags": "rp_9pSHmG_tags",
|
|
9996
|
-
"open": "rp_9pSHmG_open",
|
|
9997
|
-
"actions": "rp_9pSHmG_actions",
|
|
9998
|
-
"count": "rp_9pSHmG_count",
|
|
9999
9998
|
"editInput": "rp_9pSHmG_editInput",
|
|
10000
|
-
"thumb": "rp_9pSHmG_thumb",
|
|
10001
|
-
"page": "rp_9pSHmG_page",
|
|
10002
|
-
"message": "rp_9pSHmG_message",
|
|
10003
|
-
"select": "rp_9pSHmG_select",
|
|
10004
|
-
"editArea": "rp_9pSHmG_editArea",
|
|
10005
9999
|
"error": "rp_9pSHmG_error",
|
|
10006
|
-
"
|
|
10000
|
+
"image": "rp_9pSHmG_image",
|
|
10001
|
+
"tags": "rp_9pSHmG_tags",
|
|
10002
|
+
"thumb": "rp_9pSHmG_thumb",
|
|
10003
|
+
"count": "rp_9pSHmG_count",
|
|
10007
10004
|
"reusable": "rp_9pSHmG_reusable",
|
|
10008
10005
|
"detail": "rp_9pSHmG_detail",
|
|
10009
|
-
"
|
|
10010
|
-
"
|
|
10006
|
+
"pre": "rp_9pSHmG_pre",
|
|
10007
|
+
"message": "rp_9pSHmG_message",
|
|
10008
|
+
"actions": "rp_9pSHmG_actions",
|
|
10009
|
+
"edit": "rp_9pSHmG_edit",
|
|
10010
|
+
"large": "rp_9pSHmG_large",
|
|
10011
10011
|
"editButton": "rp_9pSHmG_editButton",
|
|
10012
|
-
"
|
|
10012
|
+
"editHelp": "rp_9pSHmG_editHelp",
|
|
10013
10013
|
"grid": "rp_9pSHmG_grid",
|
|
10014
|
-
"
|
|
10015
|
-
"
|
|
10014
|
+
"toolbar": "rp_9pSHmG_toolbar",
|
|
10015
|
+
"select": "rp_9pSHmG_select",
|
|
10016
|
+
"page": "rp_9pSHmG_page",
|
|
10017
|
+
"facts": "rp_9pSHmG_facts",
|
|
10016
10018
|
"note": "rp_9pSHmG_note",
|
|
10019
|
+
"statusError": "rp_9pSHmG_statusError",
|
|
10020
|
+
"open": "rp_9pSHmG_open",
|
|
10021
|
+
"status": "rp_9pSHmG_status",
|
|
10022
|
+
"editArea": "rp_9pSHmG_editArea",
|
|
10017
10023
|
"caption": "rp_9pSHmG_caption",
|
|
10018
|
-
"large": "rp_9pSHmG_large",
|
|
10019
|
-
"image": "rp_9pSHmG_image",
|
|
10020
10024
|
"editField": "rp_9pSHmG_editField",
|
|
10021
|
-
"
|
|
10022
|
-
"
|
|
10025
|
+
"cell": "rp_9pSHmG_cell",
|
|
10026
|
+
"editLabel": "rp_9pSHmG_editLabel"
|
|
10023
10027
|
};
|
|
10024
10028
|
// src/client/widgets/gallery-view/GalleryView.tsx
|
|
10025
10029
|
/** How often the list is read again while pictures are waiting to be described. */
|
|
@@ -10347,24 +10351,24 @@ window.__ModuleLoader__.load({
|
|
|
10347
10351
|
});
|
|
10348
10352
|
}
|
|
10349
10353
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/WorldEditor.module.css.mjs
|
|
10350
|
-
const css$
|
|
10351
|
-
const key$
|
|
10352
|
-
let tag$
|
|
10353
|
-
if (tag$
|
|
10354
|
-
tag$
|
|
10355
|
-
tag$
|
|
10356
|
-
tag$
|
|
10357
|
-
document.head.appendChild(tag$
|
|
10354
|
+
const css$27 = ".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}";
|
|
10355
|
+
const key$27 = "src/client/world-editor/WorldEditor.module.css";
|
|
10356
|
+
let tag$27 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$27) + "]");
|
|
10357
|
+
if (tag$27 === null) {
|
|
10358
|
+
tag$27 = document.createElement("style");
|
|
10359
|
+
tag$27.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10360
|
+
tag$27.dataset.pluginCss = key$27;
|
|
10361
|
+
document.head.appendChild(tag$27);
|
|
10358
10362
|
}
|
|
10359
|
-
tag$
|
|
10363
|
+
tag$27.textContent = css$27;
|
|
10360
10364
|
var WorldEditor_module_css_default = {
|
|
10361
|
-
"
|
|
10365
|
+
"drawer": "rp__swA3a_drawer",
|
|
10362
10366
|
"drawerItemOn": "rp__swA3a_drawerItemOn",
|
|
10363
|
-
"content": "rp__swA3a_content",
|
|
10364
|
-
"view": "rp__swA3a_view",
|
|
10365
10367
|
"warning": "rp__swA3a_warning",
|
|
10366
|
-
"
|
|
10367
|
-
"
|
|
10368
|
+
"message": "rp__swA3a_message",
|
|
10369
|
+
"view": "rp__swA3a_view",
|
|
10370
|
+
"drawerItem": "rp__swA3a_drawerItem",
|
|
10371
|
+
"content": "rp__swA3a_content"
|
|
10368
10372
|
};
|
|
10369
10373
|
// src/client/world-editor/WorldEditor.tsx
|
|
10370
10374
|
const SECTIONS = [
|
|
@@ -10747,38 +10751,38 @@ window.__ModuleLoader__.load({
|
|
|
10747
10751
|
});
|
|
10748
10752
|
}
|
|
10749
10753
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/avatars/AvatarsPage.module.css.mjs
|
|
10750
|
-
const css$
|
|
10751
|
-
const key$
|
|
10752
|
-
let tag$
|
|
10753
|
-
if (tag$
|
|
10754
|
-
tag$
|
|
10755
|
-
tag$
|
|
10756
|
-
tag$
|
|
10757
|
-
document.head.appendChild(tag$
|
|
10754
|
+
const css$26 = ".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}}";
|
|
10755
|
+
const key$26 = "src/client/pages/avatars/AvatarsPage.module.css";
|
|
10756
|
+
let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
|
|
10757
|
+
if (tag$26 === null) {
|
|
10758
|
+
tag$26 = document.createElement("style");
|
|
10759
|
+
tag$26.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
10760
|
+
tag$26.dataset.pluginCss = key$26;
|
|
10761
|
+
document.head.appendChild(tag$26);
|
|
10758
10762
|
}
|
|
10759
|
-
tag$
|
|
10763
|
+
tag$26.textContent = css$26;
|
|
10760
10764
|
var AvatarsPage_module_css_default = {
|
|
10765
|
+
"grid": "rp_pQOzEG_grid",
|
|
10761
10766
|
"card": "rp_pQOzEG_card",
|
|
10762
|
-
"editBody": "rp_pQOzEG_editBody",
|
|
10763
10767
|
"label": "rp_pQOzEG_label",
|
|
10764
|
-
"
|
|
10765
|
-
"
|
|
10766
|
-
"
|
|
10768
|
+
"text": "rp_pQOzEG_text",
|
|
10769
|
+
"summary": "rp_pQOzEG_summary",
|
|
10770
|
+
"form": "rp_pQOzEG_form",
|
|
10767
10771
|
"editTitle": "rp_pQOzEG_editTitle",
|
|
10768
10772
|
"count": "rp_pQOzEG_count",
|
|
10769
|
-
"form": "rp_pQOzEG_form",
|
|
10770
|
-
"field": "rp_pQOzEG_field",
|
|
10771
|
-
"message": "rp_pQOzEG_message",
|
|
10772
|
-
"page": "rp_pQOzEG_page",
|
|
10773
|
-
"grid": "rp_pQOzEG_grid",
|
|
10774
|
-
"actions": "rp_pQOzEG_actions",
|
|
10775
|
-
"summary": "rp_pQOzEG_summary",
|
|
10776
10773
|
"open": "rp_pQOzEG_open",
|
|
10777
|
-
"text": "rp_pQOzEG_text",
|
|
10778
10774
|
"name": "rp_pQOzEG_name",
|
|
10779
10775
|
"editHeader": "rp_pQOzEG_editHeader",
|
|
10780
|
-
"
|
|
10781
|
-
"
|
|
10776
|
+
"editBody": "rp_pQOzEG_editBody",
|
|
10777
|
+
"viewport": "rp_pQOzEG_viewport",
|
|
10778
|
+
"actions": "rp_pQOzEG_actions",
|
|
10779
|
+
"toolbar": "rp_pQOzEG_toolbar",
|
|
10780
|
+
"message": "rp_pQOzEG_message",
|
|
10781
|
+
"error": "rp_pQOzEG_error",
|
|
10782
|
+
"page": "rp_pQOzEG_page",
|
|
10783
|
+
"portrait": "rp_pQOzEG_portrait",
|
|
10784
|
+
"field": "rp_pQOzEG_field",
|
|
10785
|
+
"placeholder": "rp_pQOzEG_placeholder"
|
|
10782
10786
|
};
|
|
10783
10787
|
// src/client/pages/avatars/AvatarsPage.tsx
|
|
10784
10788
|
const hueOf$2 = (name) => Array.from(name).reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 360, 0);
|
|
@@ -11046,7 +11050,7 @@ window.__ModuleLoader__.load({
|
|
|
11046
11050
|
});
|
|
11047
11051
|
}
|
|
11048
11052
|
// src/client/widgets/sampling-fields/locales.ts
|
|
11049
|
-
const dictionaries$
|
|
11053
|
+
const dictionaries$21 = {
|
|
11050
11054
|
en: {
|
|
11051
11055
|
sf_master: "Narrator temperature (0 to 2)",
|
|
11052
11056
|
sf_characters: "Characters temperature (0 to 2)",
|
|
@@ -11071,7 +11075,7 @@ window.__ModuleLoader__.load({
|
|
|
11071
11075
|
}
|
|
11072
11076
|
};
|
|
11073
11077
|
// src/client/widgets/tool-switches/locales.ts
|
|
11074
|
-
const dictionaries$
|
|
11078
|
+
const dictionaries$20 = {
|
|
11075
11079
|
en: {
|
|
11076
11080
|
sw_title: "Tools",
|
|
11077
11081
|
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.",
|
|
@@ -11150,7 +11154,7 @@ window.__ModuleLoader__.load({
|
|
|
11150
11154
|
}
|
|
11151
11155
|
};
|
|
11152
11156
|
// src/client/widgets/gallery-view/locales.ts
|
|
11153
|
-
const dictionaries$
|
|
11157
|
+
const dictionaries$19 = {
|
|
11154
11158
|
en: {
|
|
11155
11159
|
tab: "Gallery",
|
|
11156
11160
|
notRoleplay: "This chat is not a roleplay session, so it has no gallery.",
|
|
@@ -11187,7 +11191,9 @@ window.__ModuleLoader__.load({
|
|
|
11187
11191
|
tagsHelp: "Separated by commas.",
|
|
11188
11192
|
save: "Save",
|
|
11189
11193
|
saving: "Saving…",
|
|
11190
|
-
cancel: "Cancel"
|
|
11194
|
+
cancel: "Cancel",
|
|
11195
|
+
guideText: "Scene images, portraits and your own pictures, beside the chat",
|
|
11196
|
+
back: "Back"
|
|
11191
11197
|
},
|
|
11192
11198
|
zh: {
|
|
11193
11199
|
tab: "图库",
|
|
@@ -11225,10 +11231,12 @@ window.__ModuleLoader__.load({
|
|
|
11225
11231
|
tagsHelp: "用逗号分隔。",
|
|
11226
11232
|
save: "保存",
|
|
11227
11233
|
saving: "正在保存…",
|
|
11228
|
-
cancel: "取消"
|
|
11234
|
+
cancel: "取消",
|
|
11235
|
+
guideText: "场景图、立绘和你自己的图片,与对话并排查看",
|
|
11236
|
+
back: "返回"
|
|
11229
11237
|
}
|
|
11230
11238
|
};
|
|
11231
|
-
const dictionaries$
|
|
11239
|
+
const dictionaries$15 = withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries(withDictionaries({
|
|
11232
11240
|
en: {
|
|
11233
11241
|
language: "en",
|
|
11234
11242
|
sectionInfo: "About",
|
|
@@ -11825,7 +11833,7 @@ window.__ModuleLoader__.load({
|
|
|
11825
11833
|
relationCancel: "取消",
|
|
11826
11834
|
relationCreate: "创建"
|
|
11827
11835
|
}
|
|
11828
|
-
}, prefixed(dictionaries$
|
|
11836
|
+
}, prefixed(dictionaries$19, "gallery_")), prefixed({
|
|
11829
11837
|
en: {
|
|
11830
11838
|
title: "Triggers",
|
|
11831
11839
|
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.",
|
|
@@ -12059,7 +12067,7 @@ window.__ModuleLoader__.load({
|
|
|
12059
12067
|
logOpen: "请求打开:{surface}",
|
|
12060
12068
|
noSurfaces: "这个界面包没有可预览的界面位置。"
|
|
12061
12069
|
}
|
|
12062
|
-
}, "pk_")), dictionaries$
|
|
12070
|
+
}, "pk_")), dictionaries$20), prefixed({
|
|
12063
12071
|
en: {
|
|
12064
12072
|
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.",
|
|
12065
12073
|
none: "This world has no checks. Its game master can still roll plain dice for things that have none.",
|
|
@@ -12132,8 +12140,8 @@ window.__ModuleLoader__.load({
|
|
|
12132
12140
|
resultFailed: "失败",
|
|
12133
12141
|
bandCritical: "关键"
|
|
12134
12142
|
}
|
|
12135
|
-
}, "dice_")), dictionaries$
|
|
12136
|
-
const dictionaries$
|
|
12143
|
+
}, "dice_")), dictionaries$21);
|
|
12144
|
+
const dictionaries$14 = withDictionaries({
|
|
12137
12145
|
en: {
|
|
12138
12146
|
nav: "Avatars",
|
|
12139
12147
|
avatarsLoading: "Loading avatars…",
|
|
@@ -12186,13 +12194,13 @@ window.__ModuleLoader__.load({
|
|
|
12186
12194
|
avatarDeleteFailed: "无法删除角色形象:{message}",
|
|
12187
12195
|
avatarEdit: "编辑"
|
|
12188
12196
|
}
|
|
12189
|
-
}, dictionaries$
|
|
12197
|
+
}, dictionaries$15);
|
|
12190
12198
|
// src/client/pages/avatars/index.ts
|
|
12191
|
-
const NAMESPACE$
|
|
12199
|
+
const NAMESPACE$14 = "roleplay.avatars";
|
|
12192
12200
|
/** Adds the Avatars page to the Role Play panel: characters to play in any world. */
|
|
12193
12201
|
function registerAvatarsPage(ctx) {
|
|
12194
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
12195
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
12202
|
+
const t = ctx.locale.bind(NAMESPACE$14);
|
|
12203
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$14, dictionaries$14), "roleplay: avatars dictionaries");
|
|
12196
12204
|
const avatars = new AvatarsController();
|
|
12197
12205
|
ctx.effect(() => () => {
|
|
12198
12206
|
avatars.dispose();
|
|
@@ -12202,53 +12210,53 @@ window.__ModuleLoader__.load({
|
|
|
12202
12210
|
id: "avatars",
|
|
12203
12211
|
order: 5,
|
|
12204
12212
|
label: () => t("nav"),
|
|
12205
|
-
locale: NAMESPACE$
|
|
12213
|
+
locale: NAMESPACE$14,
|
|
12206
12214
|
inject: () => avatars.inject()
|
|
12207
12215
|
}, AvatarsPage));
|
|
12208
12216
|
}
|
|
12209
12217
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/lorebooks/LorebooksPage.module.css.mjs
|
|
12210
|
-
const css$
|
|
12211
|
-
const key$
|
|
12212
|
-
let tag$
|
|
12213
|
-
if (tag$
|
|
12214
|
-
tag$
|
|
12215
|
-
tag$
|
|
12216
|
-
tag$
|
|
12217
|
-
document.head.appendChild(tag$
|
|
12218
|
+
const css$25 = ".rp_VV-Eha_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_VV-Eha_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_VV-Eha_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_VV-Eha_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_VV-Eha_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_VV-Eha_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_VV-Eha_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_VV-Eha_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_VV-Eha_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_VV-Eha_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_VV-Eha_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_VV-Eha_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_VV-Eha_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_VV-Eha_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_VV-Eha_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_VV-Eha_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_VV-Eha_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_VV-Eha_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_VV-Eha_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_VV-Eha_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_VV-Eha_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_VV-Eha_row{flex-wrap:wrap;gap:12px;display:flex}.rp_VV-Eha_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_VV-Eha_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_VV-Eha_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_VV-Eha_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_VV-Eha_grid{grid-template-columns:1fr}.rp_VV-Eha_form{min-width:0}.rp_VV-Eha_editBody{padding:16px}}.rp_VV-Eha_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:4px 6px;font-size:13px}.rp_VV-Eha_entryArea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:200px;font:inherit;color:var(--dsw-alias-label-primary);resize:vertical;padding:8px;font-size:13px;line-height:20px}";
|
|
12219
|
+
const key$25 = "src/client/pages/lorebooks/LorebooksPage.module.css";
|
|
12220
|
+
let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
|
|
12221
|
+
if (tag$25 === null) {
|
|
12222
|
+
tag$25 = document.createElement("style");
|
|
12223
|
+
tag$25.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
12224
|
+
tag$25.dataset.pluginCss = key$25;
|
|
12225
|
+
document.head.appendChild(tag$25);
|
|
12218
12226
|
}
|
|
12219
|
-
tag$
|
|
12227
|
+
tag$25.textContent = css$25;
|
|
12220
12228
|
var LorebooksPage_module_css_default = {
|
|
12221
|
-
"ok": "rp_VV-Eha_ok",
|
|
12222
|
-
"title": "rp_VV-Eha_title",
|
|
12223
|
-
"error": "rp_VV-Eha_error",
|
|
12224
|
-
"section": "rp_VV-Eha_section",
|
|
12225
|
-
"input": "rp_VV-Eha_input",
|
|
12226
|
-
"head": "rp_VV-Eha_head",
|
|
12227
12229
|
"page": "rp_VV-Eha_page",
|
|
12228
|
-
"toolbar": "rp_VV-Eha_toolbar",
|
|
12229
12230
|
"form": "rp_VV-Eha_form",
|
|
12231
|
+
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12232
|
+
"editHeader": "rp_VV-Eha_editHeader",
|
|
12233
|
+
"meta": "rp_VV-Eha_meta",
|
|
12234
|
+
"viewport": "rp_VV-Eha_viewport",
|
|
12235
|
+
"card": "rp_VV-Eha_card",
|
|
12236
|
+
"select": "rp_VV-Eha_select",
|
|
12230
12237
|
"field": "rp_VV-Eha_field",
|
|
12231
12238
|
"count": "rp_VV-Eha_count",
|
|
12232
|
-
"
|
|
12239
|
+
"cardActions": "rp_VV-Eha_cardActions",
|
|
12240
|
+
"section": "rp_VV-Eha_section",
|
|
12241
|
+
"toolbar": "rp_VV-Eha_toolbar",
|
|
12242
|
+
"error": "rp_VV-Eha_error",
|
|
12243
|
+
"message": "rp_VV-Eha_message",
|
|
12244
|
+
"title": "rp_VV-Eha_title",
|
|
12245
|
+
"area": "rp_VV-Eha_area",
|
|
12246
|
+
"entryArea": "rp_VV-Eha_entryArea",
|
|
12247
|
+
"actions": "rp_VV-Eha_actions",
|
|
12233
12248
|
"row": "rp_VV-Eha_row",
|
|
12249
|
+
"grid": "rp_VV-Eha_grid",
|
|
12250
|
+
"ok": "rp_VV-Eha_ok",
|
|
12251
|
+
"warning": "rp_VV-Eha_warning",
|
|
12252
|
+
"editBody": "rp_VV-Eha_editBody",
|
|
12234
12253
|
"description": "rp_VV-Eha_description",
|
|
12254
|
+
"label": "rp_VV-Eha_label",
|
|
12255
|
+
"input": "rp_VV-Eha_input",
|
|
12235
12256
|
"help": "rp_VV-Eha_help",
|
|
12236
|
-
"grid": "rp_VV-Eha_grid",
|
|
12237
|
-
"name": "rp_VV-Eha_name",
|
|
12238
|
-
"message": "rp_VV-Eha_message",
|
|
12239
|
-
"cardActions": "rp_VV-Eha_cardActions",
|
|
12240
12257
|
"editTitle": "rp_VV-Eha_editTitle",
|
|
12241
|
-
"
|
|
12242
|
-
"
|
|
12243
|
-
"warning": "rp_VV-Eha_warning",
|
|
12244
|
-
"entryArea": "rp_VV-Eha_entryArea",
|
|
12245
|
-
"sectionTitle": "rp_VV-Eha_sectionTitle",
|
|
12246
|
-
"label": "rp_VV-Eha_label",
|
|
12247
|
-
"editHeader": "rp_VV-Eha_editHeader",
|
|
12248
|
-
"actions": "rp_VV-Eha_actions",
|
|
12249
|
-
"editBody": "rp_VV-Eha_editBody",
|
|
12250
|
-
"area": "rp_VV-Eha_area",
|
|
12251
|
-
"select": "rp_VV-Eha_select"
|
|
12258
|
+
"head": "rp_VV-Eha_head",
|
|
12259
|
+
"name": "rp_VV-Eha_name"
|
|
12252
12260
|
};
|
|
12253
12261
|
// src/client/pages/lorebooks/LorebookEditor.tsx
|
|
12254
12262
|
const messageOf$7 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
@@ -13017,7 +13025,7 @@ window.__ModuleLoader__.load({
|
|
|
13017
13025
|
]
|
|
13018
13026
|
});
|
|
13019
13027
|
}
|
|
13020
|
-
const dictionaries$
|
|
13028
|
+
const dictionaries$13 = withDictionaries({
|
|
13021
13029
|
en: {
|
|
13022
13030
|
nav: "Lorebooks",
|
|
13023
13031
|
language: "en",
|
|
@@ -13164,7 +13172,7 @@ window.__ModuleLoader__.load({
|
|
|
13164
13172
|
kind_legend: "传说",
|
|
13165
13173
|
kind_other: "其他"
|
|
13166
13174
|
}
|
|
13167
|
-
}, dictionaries$
|
|
13175
|
+
}, dictionaries$23);
|
|
13168
13176
|
// src/client/pages/lorebooks/lorebooks-controller.ts
|
|
13169
13177
|
const messageOf$5 = (error) => error instanceof Error ? error.message : String(error);
|
|
13170
13178
|
/** Reads the lorebook library from the host and makes, removes and opens its lorebooks. */
|
|
@@ -13257,11 +13265,11 @@ window.__ModuleLoader__.load({
|
|
|
13257
13265
|
}
|
|
13258
13266
|
};
|
|
13259
13267
|
// src/client/pages/lorebooks/index.ts
|
|
13260
|
-
const NAMESPACE$
|
|
13268
|
+
const NAMESPACE$13 = "roleplay.lorebooks";
|
|
13261
13269
|
/** Adds the Lorebooks page to the Role Play panel: reusable background knowledge that stories start with. */
|
|
13262
13270
|
function registerLorebooksPage(ctx) {
|
|
13263
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
13264
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
13271
|
+
const t = ctx.locale.bind(NAMESPACE$13);
|
|
13272
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$13, dictionaries$13), "roleplay: lorebooks dictionaries");
|
|
13265
13273
|
const lorebooks = new LorebooksController(createChatOpener(ctx), () => t("language"));
|
|
13266
13274
|
ctx.effect(() => () => {
|
|
13267
13275
|
lorebooks.dispose();
|
|
@@ -13271,51 +13279,51 @@ window.__ModuleLoader__.load({
|
|
|
13271
13279
|
id: "lorebooks",
|
|
13272
13280
|
order: 8,
|
|
13273
13281
|
label: () => t("nav"),
|
|
13274
|
-
locale: NAMESPACE$
|
|
13282
|
+
locale: NAMESPACE$13,
|
|
13275
13283
|
inject: () => lorebooks.inject()
|
|
13276
13284
|
}, LorebooksPage));
|
|
13277
13285
|
}
|
|
13278
13286
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/presets/PresetsPage.module.css.mjs
|
|
13279
|
-
const css$
|
|
13280
|
-
const key$
|
|
13281
|
-
let tag$
|
|
13282
|
-
if (tag$
|
|
13283
|
-
tag$
|
|
13284
|
-
tag$
|
|
13285
|
-
tag$
|
|
13286
|
-
document.head.appendChild(tag$
|
|
13287
|
+
const css$24 = ".rp_ZK89ba_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_ZK89ba_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_ZK89ba_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_ZK89ba_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_ZK89ba_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_ZK89ba_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_ZK89ba_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_ZK89ba_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_ZK89ba_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_ZK89ba_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_ZK89ba_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_ZK89ba_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_ZK89ba_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_ZK89ba_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_ZK89ba_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_ZK89ba_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_ZK89ba_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_ZK89ba_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_ZK89ba_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_ZK89ba_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_ZK89ba_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_ZK89ba_row{flex-wrap:wrap;gap:12px;display:flex}.rp_ZK89ba_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_ZK89ba_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_ZK89ba_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_ZK89ba_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_ZK89ba_grid{grid-template-columns:1fr}.rp_ZK89ba_form{min-width:0}.rp_ZK89ba_editBody{padding:16px}}";
|
|
13288
|
+
const key$24 = "src/client/pages/presets/PresetsPage.module.css";
|
|
13289
|
+
let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
|
|
13290
|
+
if (tag$24 === null) {
|
|
13291
|
+
tag$24 = document.createElement("style");
|
|
13292
|
+
tag$24.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
13293
|
+
tag$24.dataset.pluginCss = key$24;
|
|
13294
|
+
document.head.appendChild(tag$24);
|
|
13287
13295
|
}
|
|
13288
|
-
tag$
|
|
13296
|
+
tag$24.textContent = css$24;
|
|
13289
13297
|
var PresetsPage_module_css_default = {
|
|
13298
|
+
"title": "rp_ZK89ba_title",
|
|
13299
|
+
"meta": "rp_ZK89ba_meta",
|
|
13290
13300
|
"warning": "rp_ZK89ba_warning",
|
|
13291
|
-
"
|
|
13292
|
-
"section": "rp_ZK89ba_section",
|
|
13293
|
-
"cardActions": "rp_ZK89ba_cardActions",
|
|
13301
|
+
"editTitle": "rp_ZK89ba_editTitle",
|
|
13294
13302
|
"description": "rp_ZK89ba_description",
|
|
13295
|
-
"
|
|
13303
|
+
"page": "rp_ZK89ba_page",
|
|
13296
13304
|
"area": "rp_ZK89ba_area",
|
|
13297
|
-
"input": "rp_ZK89ba_input",
|
|
13298
|
-
"count": "rp_ZK89ba_count",
|
|
13299
|
-
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13300
|
-
"actions": "rp_ZK89ba_actions",
|
|
13301
13305
|
"help": "rp_ZK89ba_help",
|
|
13306
|
+
"count": "rp_ZK89ba_count",
|
|
13307
|
+
"editHeader": "rp_ZK89ba_editHeader",
|
|
13302
13308
|
"editBody": "rp_ZK89ba_editBody",
|
|
13303
13309
|
"form": "rp_ZK89ba_form",
|
|
13304
13310
|
"card": "rp_ZK89ba_card",
|
|
13311
|
+
"cardActions": "rp_ZK89ba_cardActions",
|
|
13312
|
+
"error": "rp_ZK89ba_error",
|
|
13313
|
+
"field": "rp_ZK89ba_field",
|
|
13314
|
+
"head": "rp_ZK89ba_head",
|
|
13315
|
+
"viewport": "rp_ZK89ba_viewport",
|
|
13316
|
+
"toolbar": "rp_ZK89ba_toolbar",
|
|
13305
13317
|
"name": "rp_ZK89ba_name",
|
|
13306
|
-
"row": "rp_ZK89ba_row",
|
|
13307
|
-
"ok": "rp_ZK89ba_ok",
|
|
13308
|
-
"editTitle": "rp_ZK89ba_editTitle",
|
|
13309
13318
|
"grid": "rp_ZK89ba_grid",
|
|
13310
|
-
"message": "rp_ZK89ba_message",
|
|
13311
13319
|
"label": "rp_ZK89ba_label",
|
|
13312
|
-
"
|
|
13313
|
-
"
|
|
13314
|
-
"
|
|
13315
|
-
"
|
|
13316
|
-
"
|
|
13317
|
-
"
|
|
13318
|
-
"
|
|
13320
|
+
"ok": "rp_ZK89ba_ok",
|
|
13321
|
+
"input": "rp_ZK89ba_input",
|
|
13322
|
+
"section": "rp_ZK89ba_section",
|
|
13323
|
+
"sectionTitle": "rp_ZK89ba_sectionTitle",
|
|
13324
|
+
"actions": "rp_ZK89ba_actions",
|
|
13325
|
+
"row": "rp_ZK89ba_row",
|
|
13326
|
+
"message": "rp_ZK89ba_message"
|
|
13319
13327
|
};
|
|
13320
13328
|
// src/client/pages/presets/PresetEditor.tsx
|
|
13321
13329
|
const messageOf$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
|
|
@@ -14111,7 +14119,7 @@ window.__ModuleLoader__.load({
|
|
|
14111
14119
|
]
|
|
14112
14120
|
});
|
|
14113
14121
|
}
|
|
14114
|
-
const dictionaries$
|
|
14122
|
+
const dictionaries$12 = withDictionaries(withDictionaries({
|
|
14115
14123
|
en: {
|
|
14116
14124
|
nav: "Presets",
|
|
14117
14125
|
language: "en",
|
|
@@ -14236,7 +14244,7 @@ window.__ModuleLoader__.load({
|
|
|
14236
14244
|
"prompt_roleplay/style": "叙述文风",
|
|
14237
14245
|
"prompt_roleplay/character-style": "角色风格"
|
|
14238
14246
|
}
|
|
14239
|
-
}, dictionaries$
|
|
14247
|
+
}, dictionaries$21), dictionaries$23);
|
|
14240
14248
|
// src/client/pages/presets/presets-controller.ts
|
|
14241
14249
|
const messageOf$2 = (error) => error instanceof Error ? error.message : String(error);
|
|
14242
14250
|
/** Reads the preset library from the host and makes, removes and opens its presets. */
|
|
@@ -14325,11 +14333,11 @@ window.__ModuleLoader__.load({
|
|
|
14325
14333
|
}
|
|
14326
14334
|
};
|
|
14327
14335
|
// src/client/pages/presets/index.ts
|
|
14328
|
-
const NAMESPACE$
|
|
14336
|
+
const NAMESPACE$12 = "roleplay.presets";
|
|
14329
14337
|
/** Adds the Presets page to the Role Play panel: reusable writing instructions for stories. */
|
|
14330
14338
|
function registerPresetsPage(ctx) {
|
|
14331
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
14332
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
14339
|
+
const t = ctx.locale.bind(NAMESPACE$12);
|
|
14340
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$12, dictionaries$12), "roleplay: presets dictionaries");
|
|
14333
14341
|
const presets = new PresetsController(createChatOpener(ctx), () => t("language"));
|
|
14334
14342
|
ctx.effect(() => () => {
|
|
14335
14343
|
presets.dispose();
|
|
@@ -14339,7 +14347,7 @@ window.__ModuleLoader__.load({
|
|
|
14339
14347
|
id: "presets",
|
|
14340
14348
|
order: 7,
|
|
14341
14349
|
label: () => t("nav"),
|
|
14342
|
-
locale: NAMESPACE$
|
|
14350
|
+
locale: NAMESPACE$12,
|
|
14343
14351
|
inject: () => presets.inject()
|
|
14344
14352
|
}, PresetsPage));
|
|
14345
14353
|
}
|
|
@@ -14362,16 +14370,16 @@ window.__ModuleLoader__.load({
|
|
|
14362
14370
|
return Math.min(Math.floor(Math.max(0, index) / pageSize), lastPage) * pageSize;
|
|
14363
14371
|
}
|
|
14364
14372
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pager/Pager.module.css.mjs
|
|
14365
|
-
const css$
|
|
14366
|
-
const key$
|
|
14367
|
-
let tag$
|
|
14368
|
-
if (tag$
|
|
14369
|
-
tag$
|
|
14370
|
-
tag$
|
|
14371
|
-
tag$
|
|
14372
|
-
document.head.appendChild(tag$
|
|
14373
|
+
const css$23 = ".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}";
|
|
14374
|
+
const key$23 = "src/client/widgets/pager/Pager.module.css";
|
|
14375
|
+
let tag$23 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$23) + "]");
|
|
14376
|
+
if (tag$23 === null) {
|
|
14377
|
+
tag$23 = document.createElement("style");
|
|
14378
|
+
tag$23.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14379
|
+
tag$23.dataset.pluginCss = key$23;
|
|
14380
|
+
document.head.appendChild(tag$23);
|
|
14373
14381
|
}
|
|
14374
|
-
tag$
|
|
14382
|
+
tag$23.textContent = css$23;
|
|
14375
14383
|
var Pager_module_css_default = {
|
|
14376
14384
|
"pager": "rp_KBAD0W_pager",
|
|
14377
14385
|
"position": "rp_KBAD0W_position"
|
|
@@ -14407,16 +14415,16 @@ window.__ModuleLoader__.load({
|
|
|
14407
14415
|
});
|
|
14408
14416
|
}
|
|
14409
14417
|
// \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
|
|
14410
|
-
const css$
|
|
14411
|
-
const key$
|
|
14412
|
-
let tag$
|
|
14413
|
-
if (tag$
|
|
14414
|
-
tag$
|
|
14415
|
-
tag$
|
|
14416
|
-
tag$
|
|
14417
|
-
document.head.appendChild(tag$
|
|
14418
|
+
const css$22 = ".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)}";
|
|
14419
|
+
const key$22 = "src/client/widgets/problem-list/ProblemList.module.css";
|
|
14420
|
+
let tag$22 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$22) + "]");
|
|
14421
|
+
if (tag$22 === null) {
|
|
14422
|
+
tag$22 = document.createElement("style");
|
|
14423
|
+
tag$22.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14424
|
+
tag$22.dataset.pluginCss = key$22;
|
|
14425
|
+
document.head.appendChild(tag$22);
|
|
14418
14426
|
}
|
|
14419
|
-
tag$
|
|
14427
|
+
tag$22.textContent = css$22;
|
|
14420
14428
|
var ProblemList_module_css_default = { "problems": "rp_LZh3Iq_problems" };
|
|
14421
14429
|
// src/client/widgets/problem-list/ProblemList.tsx
|
|
14422
14430
|
/** A collapsed list of what went wrong while reading files; renders nothing when nothing did. */
|
|
@@ -14432,22 +14440,22 @@ window.__ModuleLoader__.load({
|
|
|
14432
14440
|
});
|
|
14433
14441
|
}
|
|
14434
14442
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/DeleteSessionDialog.module.css.mjs
|
|
14435
|
-
const css$
|
|
14436
|
-
const key$
|
|
14437
|
-
let tag$
|
|
14438
|
-
if (tag$
|
|
14439
|
-
tag$
|
|
14440
|
-
tag$
|
|
14441
|
-
tag$
|
|
14442
|
-
document.head.appendChild(tag$
|
|
14443
|
+
const css$21 = ".rp_FifHrW_body{flex-direction:column;gap:8px;min-width:min(380px,100%);display:flex}.rp_FifHrW_body p{margin:0}.rp_FifHrW_question{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_FifHrW_warning{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.rp_FifHrW_choice{color:var(--dsw-alias-label-primary);border:0;flex-direction:column;gap:4px;margin:4px 0 0;padding:0;font-size:13px;line-height:20px;display:flex}.rp_FifHrW_choice legend{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;padding:0;font-size:12px}.rp_FifHrW_error{color:var(--dsw-alias-state-error-primary);font-size:12px}";
|
|
14444
|
+
const key$21 = "src/client/pages/sessions/DeleteSessionDialog.module.css";
|
|
14445
|
+
let tag$21 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$21) + "]");
|
|
14446
|
+
if (tag$21 === null) {
|
|
14447
|
+
tag$21 = document.createElement("style");
|
|
14448
|
+
tag$21.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14449
|
+
tag$21.dataset.pluginCss = key$21;
|
|
14450
|
+
document.head.appendChild(tag$21);
|
|
14443
14451
|
}
|
|
14444
|
-
tag$
|
|
14452
|
+
tag$21.textContent = css$21;
|
|
14445
14453
|
var DeleteSessionDialog_module_css_default = {
|
|
14446
14454
|
"question": "rp_FifHrW_question",
|
|
14447
|
-
"
|
|
14448
|
-
"error": "rp_FifHrW_error",
|
|
14455
|
+
"warning": "rp_FifHrW_warning",
|
|
14449
14456
|
"choice": "rp_FifHrW_choice",
|
|
14450
|
-
"
|
|
14457
|
+
"body": "rp_FifHrW_body",
|
|
14458
|
+
"error": "rp_FifHrW_error"
|
|
14451
14459
|
};
|
|
14452
14460
|
// src/client/pages/sessions/DeleteSessionDialog.tsx
|
|
14453
14461
|
/** Asks for confirmation before a session and everything saved with it is removed. */
|
|
@@ -14569,39 +14577,39 @@ window.__ModuleLoader__.load({
|
|
|
14569
14577
|
return useFit(viewport, rowFit);
|
|
14570
14578
|
}
|
|
14571
14579
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/SessionsPage.module.css.mjs
|
|
14572
|
-
const css$
|
|
14573
|
-
const key$
|
|
14574
|
-
let tag$
|
|
14575
|
-
if (tag$
|
|
14576
|
-
tag$
|
|
14577
|
-
tag$
|
|
14578
|
-
tag$
|
|
14579
|
-
document.head.appendChild(tag$
|
|
14580
|
+
const css$20 = ".rp_24z4eW_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_24z4eW_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_24z4eW_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_24z4eW_spinning{animation:.9s linear infinite rp_24z4eW_spin}@keyframes rp_24z4eW_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_24z4eW_spinning{animation:none}}.rp_24z4eW_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_24z4eW_viewport{--rp-row-height:40px;--rp-header-height:32px;flex:1 1 0;min-height:0;overflow-x:auto}.rp_24z4eW_scrolls{overflow-y:auto}.rp_24z4eW_fits{overflow-y:hidden}.rp_24z4eW_table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:720px}.rp_24z4eW_actionsColumn{width:104px}.rp_24z4eW_nameColumn{width:30%}.rp_24z4eW_worldColumn{width:26%}.rp_24z4eW_timeColumn{width:16%}.rp_24z4eW_turnsColumn{width:10%}.rp_24z4eW_table th{height:var(--rp-header-height);border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);text-align:left;color:var(--dsw-alias-label-tertiary);padding:0 12px;font-size:12px;font-weight:400;position:sticky;top:0}.rp_24z4eW_table td{height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;padding:0 12px;font-size:13px;overflow:hidden}.rp_24z4eW_name{color:var(--dsw-alias-label-primary);font-weight:500}.rp_24z4eW_secondary{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_24z4eW_table .rp_24z4eW_number{text-align:right}.rp_24z4eW_table .rp_24z4eW_actions{text-align:center;white-space:nowrap;padding:0 8px}.rp_24z4eW_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_24z4eW_archived td{opacity:.6}.rp_24z4eW_badge{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);margin-left:6px;padding:0 6px;font-size:12px}@media (width<=640px){.rp_24z4eW_viewport{--rp-row-height:196px;--rp-header-height:0px;overflow-x:hidden}.rp_24z4eW_table,.rp_24z4eW_table tbody,.rp_24z4eW_table tr,.rp_24z4eW_table td{width:100%;display:block}.rp_24z4eW_table{min-width:0}.rp_24z4eW_table colgroup,.rp_24z4eW_table thead{display:none}.rp_24z4eW_table tr{box-sizing:border-box;min-height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l2);padding:10px 12px}.rp_24z4eW_table td{box-sizing:border-box;text-align:start;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;border:0;grid-template-columns:minmax(88px,34%) minmax(0,1fr);align-items:baseline;height:auto;min-height:24px;padding:2px 0;display:grid;overflow:visible}.rp_24z4eW_table td:before{content:attr(data-label);color:var(--dsw-alias-label-tertiary);padding-inline-end:10px;font-size:12px;font-weight:400}.rp_24z4eW_table .rp_24z4eW_number{text-align:start}.rp_24z4eW_table .rp_24z4eW_actions{justify-content:flex-end;min-height:36px;padding-top:4px;display:flex}.rp_24z4eW_table .rp_24z4eW_actions:before{margin-inline-end:auto}}";
|
|
14581
|
+
const key$20 = "src/client/pages/sessions/SessionsPage.module.css";
|
|
14582
|
+
let tag$20 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$20) + "]");
|
|
14583
|
+
if (tag$20 === null) {
|
|
14584
|
+
tag$20 = document.createElement("style");
|
|
14585
|
+
tag$20.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
14586
|
+
tag$20.dataset.pluginCss = key$20;
|
|
14587
|
+
document.head.appendChild(tag$20);
|
|
14580
14588
|
}
|
|
14581
|
-
tag$
|
|
14589
|
+
tag$20.textContent = css$20;
|
|
14582
14590
|
var SessionsPage_module_css_default = {
|
|
14583
|
-
"
|
|
14584
|
-
"archived": "rp_24z4eW_archived",
|
|
14585
|
-
"name": "rp_24z4eW_name",
|
|
14591
|
+
"actions": "rp_24z4eW_actions",
|
|
14586
14592
|
"count": "rp_24z4eW_count",
|
|
14593
|
+
"spinning": "rp_24z4eW_spinning",
|
|
14594
|
+
"viewport": "rp_24z4eW_viewport",
|
|
14595
|
+
"number": "rp_24z4eW_number",
|
|
14596
|
+
"table": "rp_24z4eW_table",
|
|
14587
14597
|
"page": "rp_24z4eW_page",
|
|
14588
|
-
"scrolls": "rp_24z4eW_scrolls",
|
|
14589
|
-
"worldColumn": "rp_24z4eW_worldColumn",
|
|
14590
|
-
"badge": "rp_24z4eW_badge",
|
|
14591
14598
|
"actionsColumn": "rp_24z4eW_actionsColumn",
|
|
14592
14599
|
"spin": "rp_24z4eW_spin",
|
|
14593
|
-
"number": "rp_24z4eW_number",
|
|
14594
|
-
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
14595
14600
|
"message": "rp_24z4eW_message",
|
|
14601
|
+
"nameColumn": "rp_24z4eW_nameColumn",
|
|
14596
14602
|
"notice": "rp_24z4eW_notice",
|
|
14603
|
+
"badge": "rp_24z4eW_badge",
|
|
14597
14604
|
"timeColumn": "rp_24z4eW_timeColumn",
|
|
14598
|
-
"viewport": "rp_24z4eW_viewport",
|
|
14599
14605
|
"toolbar": "rp_24z4eW_toolbar",
|
|
14600
|
-
"
|
|
14601
|
-
"
|
|
14602
|
-
"
|
|
14603
|
-
"
|
|
14604
|
-
"
|
|
14606
|
+
"fits": "rp_24z4eW_fits",
|
|
14607
|
+
"worldColumn": "rp_24z4eW_worldColumn",
|
|
14608
|
+
"archived": "rp_24z4eW_archived",
|
|
14609
|
+
"turnsColumn": "rp_24z4eW_turnsColumn",
|
|
14610
|
+
"secondary": "rp_24z4eW_secondary",
|
|
14611
|
+
"name": "rp_24z4eW_name",
|
|
14612
|
+
"scrolls": "rp_24z4eW_scrolls"
|
|
14605
14613
|
};
|
|
14606
14614
|
// src/client/pages/sessions/SessionsPage.tsx
|
|
14607
14615
|
/** The sessions as a table, one page at a time, the most recently played first. */
|
|
@@ -14823,7 +14831,7 @@ window.__ModuleLoader__.load({
|
|
|
14823
14831
|
});
|
|
14824
14832
|
}
|
|
14825
14833
|
// src/client/pages/sessions/locales.ts
|
|
14826
|
-
const dictionaries$
|
|
14834
|
+
const dictionaries$11 = {
|
|
14827
14835
|
en: {
|
|
14828
14836
|
nav: "Sessions",
|
|
14829
14837
|
loading: "Loading sessions…",
|
|
@@ -15183,11 +15191,11 @@ window.__ModuleLoader__.load({
|
|
|
15183
15191
|
}
|
|
15184
15192
|
};
|
|
15185
15193
|
// src/client/pages/sessions/index.ts
|
|
15186
|
-
const NAMESPACE$
|
|
15194
|
+
const NAMESPACE$11 = "roleplay.sessions";
|
|
15187
15195
|
/** Adds the Sessions page to the Role Play panel. */
|
|
15188
15196
|
function registerSessionsPage(ctx) {
|
|
15189
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
15190
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
15197
|
+
const t = ctx.locale.bind(NAMESPACE$11);
|
|
15198
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$11, dictionaries$11), "roleplay: sessions dictionaries");
|
|
15191
15199
|
const sessions = new SessionsController(createChatOpener(ctx));
|
|
15192
15200
|
ctx.effect(() => () => {
|
|
15193
15201
|
sessions.dispose();
|
|
@@ -15197,45 +15205,45 @@ window.__ModuleLoader__.load({
|
|
|
15197
15205
|
id: "sessions",
|
|
15198
15206
|
order: 10,
|
|
15199
15207
|
label: () => t("nav"),
|
|
15200
|
-
locale: NAMESPACE$
|
|
15208
|
+
locale: NAMESPACE$11,
|
|
15201
15209
|
inject: () => sessions.inject()
|
|
15202
15210
|
}, SessionsPage));
|
|
15203
15211
|
}
|
|
15204
15212
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sync/SyncPage.module.css.mjs
|
|
15205
|
-
const css$
|
|
15206
|
-
const key$
|
|
15207
|
-
let tag$
|
|
15208
|
-
if (tag$
|
|
15209
|
-
tag$
|
|
15210
|
-
tag$
|
|
15211
|
-
tag$
|
|
15212
|
-
document.head.appendChild(tag$
|
|
15213
|
+
const css$19 = ".rp_Gk-byG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_Gk-byG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_Gk-byG_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_Gk-byG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Gk-byG_viewport{flex:1 1 0;min-height:0;overflow:auto}.rp_Gk-byG_table{table-layout:fixed;border-collapse:collapse;width:100%;min-width:720px;font-size:13px}.rp_Gk-byG_unitColumn{width:18%}.rp_Gk-byG_kindColumn{width:13%}.rp_Gk-byG_stateColumn{width:14%}.rp_Gk-byG_syncedColumn{width:16%}.rp_Gk-byG_detailsColumn{width:29%}.rp_Gk-byG_actionsColumn{width:10%}.rp_Gk-byG_caption{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.rp_Gk-byG_table th{text-align:left;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);border-bottom:.5px solid var(--dsw-alias-border-l3);padding:6px 8px;font-size:12px;font-weight:400;position:sticky;top:0}.rp_Gk-byG_table .rp_Gk-byG_actionHeading{text-align:right}.rp_Gk-byG_table td{vertical-align:top;border-bottom:.5px solid var(--dsw-alias-border-l4);color:var(--dsw-alias-label-primary);padding:6px 8px}.rp_Gk-byG_table td:last-child{text-align:right}.rp_Gk-byG_unit{font-family:var(--dsw-font-mono,monospace);word-break:break-all;font-size:12px}.rp_Gk-byG_conflict{color:var(--dsw-alias-state-warn-primary,var(--dsw-alias-state-error-primary))}.rp_Gk-byG_failed{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;display:block}.rp_Gk-byG_detail{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:6px;margin:0;font-size:12px;display:flex}.rp_Gk-byG_detail>span:first-child{overflow-wrap:anywhere}.rp_Gk-byG_choices{flex-wrap:wrap;gap:4px;display:flex}.rp_Gk-byG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_Gk-byG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Gk-byG_problem{color:var(--dsw-alias-state-warn-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_Gk-byG_confirmation{max-width:60ch;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;margin:0}";
|
|
15214
|
+
const key$19 = "src/client/pages/sync/SyncPage.module.css";
|
|
15215
|
+
let tag$19 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$19) + "]");
|
|
15216
|
+
if (tag$19 === null) {
|
|
15217
|
+
tag$19 = document.createElement("style");
|
|
15218
|
+
tag$19.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15219
|
+
tag$19.dataset.pluginCss = key$19;
|
|
15220
|
+
document.head.appendChild(tag$19);
|
|
15213
15221
|
}
|
|
15214
|
-
tag$
|
|
15222
|
+
tag$19.textContent = css$19;
|
|
15215
15223
|
var SyncPage_module_css_default = {
|
|
15216
|
-
"
|
|
15224
|
+
"page": "rp_Gk-byG_page",
|
|
15225
|
+
"kindColumn": "rp_Gk-byG_kindColumn",
|
|
15226
|
+
"actions": "rp_Gk-byG_actions",
|
|
15227
|
+
"syncedColumn": "rp_Gk-byG_syncedColumn",
|
|
15228
|
+
"problem": "rp_Gk-byG_problem",
|
|
15229
|
+
"detail": "rp_Gk-byG_detail",
|
|
15217
15230
|
"actionHeading": "rp_Gk-byG_actionHeading",
|
|
15218
|
-
"
|
|
15231
|
+
"unitColumn": "rp_Gk-byG_unitColumn",
|
|
15219
15232
|
"table": "rp_Gk-byG_table",
|
|
15220
15233
|
"message": "rp_Gk-byG_message",
|
|
15234
|
+
"failed": "rp_Gk-byG_failed",
|
|
15235
|
+
"conflict": "rp_Gk-byG_conflict",
|
|
15221
15236
|
"meta": "rp_Gk-byG_meta",
|
|
15237
|
+
"error": "rp_Gk-byG_error",
|
|
15222
15238
|
"stateColumn": "rp_Gk-byG_stateColumn",
|
|
15223
15239
|
"detailsColumn": "rp_Gk-byG_detailsColumn",
|
|
15224
|
-
"
|
|
15225
|
-
"unit": "rp_Gk-byG_unit",
|
|
15226
|
-
"conflict": "rp_Gk-byG_conflict",
|
|
15227
|
-
"unitColumn": "rp_Gk-byG_unitColumn",
|
|
15228
|
-
"page": "rp_Gk-byG_page",
|
|
15229
|
-
"error": "rp_Gk-byG_error",
|
|
15240
|
+
"confirmation": "rp_Gk-byG_confirmation",
|
|
15230
15241
|
"toolbar": "rp_Gk-byG_toolbar",
|
|
15231
|
-
"
|
|
15232
|
-
"
|
|
15233
|
-
"syncedColumn": "rp_Gk-byG_syncedColumn",
|
|
15242
|
+
"unit": "rp_Gk-byG_unit",
|
|
15243
|
+
"viewport": "rp_Gk-byG_viewport",
|
|
15234
15244
|
"choices": "rp_Gk-byG_choices",
|
|
15235
|
-
"
|
|
15236
|
-
"actionsColumn": "rp_Gk-byG_actionsColumn"
|
|
15237
|
-
"detail": "rp_Gk-byG_detail",
|
|
15238
|
-
"problem": "rp_Gk-byG_problem"
|
|
15245
|
+
"caption": "rp_Gk-byG_caption",
|
|
15246
|
+
"actionsColumn": "rp_Gk-byG_actionsColumn"
|
|
15239
15247
|
};
|
|
15240
15248
|
// src/client/pages/sync/SyncPage.tsx
|
|
15241
15249
|
const when = (iso, never, locale) => iso === void 0 ? never : new Date(iso).toLocaleString(locale);
|
|
@@ -15526,7 +15534,7 @@ window.__ModuleLoader__.load({
|
|
|
15526
15534
|
});
|
|
15527
15535
|
}
|
|
15528
15536
|
// src/client/pages/sync/locales.ts
|
|
15529
|
-
const dictionaries$
|
|
15537
|
+
const dictionaries$10 = {
|
|
15530
15538
|
en: {
|
|
15531
15539
|
nav: "Sync",
|
|
15532
15540
|
loading: "Reading the sync state…",
|
|
@@ -15718,11 +15726,11 @@ window.__ModuleLoader__.load({
|
|
|
15718
15726
|
}
|
|
15719
15727
|
};
|
|
15720
15728
|
// src/client/pages/sync/index.ts
|
|
15721
|
-
const NAMESPACE$
|
|
15729
|
+
const NAMESPACE$10 = "roleplay.sync";
|
|
15722
15730
|
/** Adds the Sync page to the Role Play panel: what is in step with the remote and what needs a choice. */
|
|
15723
15731
|
function registerSyncPage(ctx) {
|
|
15724
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
15725
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
15732
|
+
const t = ctx.locale.bind(NAMESPACE$10);
|
|
15733
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$10, dictionaries$10), "roleplay: sync dictionaries");
|
|
15726
15734
|
const sync = new SyncController();
|
|
15727
15735
|
ctx.effect(() => () => {
|
|
15728
15736
|
sync.dispose();
|
|
@@ -15732,32 +15740,32 @@ window.__ModuleLoader__.load({
|
|
|
15732
15740
|
id: "sync",
|
|
15733
15741
|
order: 12,
|
|
15734
15742
|
label: () => t("nav"),
|
|
15735
|
-
locale: NAMESPACE$
|
|
15743
|
+
locale: NAMESPACE$10,
|
|
15736
15744
|
inject: () => sync.inject()
|
|
15737
15745
|
}, SyncPage));
|
|
15738
15746
|
}
|
|
15739
15747
|
// \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
|
|
15740
|
-
const css$
|
|
15741
|
-
const key$
|
|
15742
|
-
let tag$
|
|
15743
|
-
if (tag$
|
|
15744
|
-
tag$
|
|
15745
|
-
tag$
|
|
15746
|
-
tag$
|
|
15747
|
-
document.head.appendChild(tag$
|
|
15748
|
+
const css$18 = ".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}";
|
|
15749
|
+
const key$18 = "src/client/widgets/world-card/WorldCard.module.css";
|
|
15750
|
+
let tag$18 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$18) + "]");
|
|
15751
|
+
if (tag$18 === null) {
|
|
15752
|
+
tag$18 = document.createElement("style");
|
|
15753
|
+
tag$18.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15754
|
+
tag$18.dataset.pluginCss = key$18;
|
|
15755
|
+
document.head.appendChild(tag$18);
|
|
15748
15756
|
}
|
|
15749
|
-
tag$
|
|
15757
|
+
tag$18.textContent = css$18;
|
|
15750
15758
|
var WorldCard_module_css_default = {
|
|
15751
|
-
"tags": "rp_Bvxx5q_tags",
|
|
15752
|
-
"cover": "rp_Bvxx5q_cover",
|
|
15753
15759
|
"openButton": "rp_Bvxx5q_openButton",
|
|
15754
|
-
"name": "rp_Bvxx5q_name",
|
|
15755
|
-
"tag": "rp_Bvxx5q_tag",
|
|
15756
15760
|
"placeholder": "rp_Bvxx5q_placeholder",
|
|
15757
15761
|
"info": "rp_Bvxx5q_info",
|
|
15758
|
-
"
|
|
15762
|
+
"tag": "rp_Bvxx5q_tag",
|
|
15763
|
+
"tags": "rp_Bvxx5q_tags",
|
|
15759
15764
|
"image": "rp_Bvxx5q_image",
|
|
15760
|
-
"
|
|
15765
|
+
"cover": "rp_Bvxx5q_cover",
|
|
15766
|
+
"name": "rp_Bvxx5q_name",
|
|
15767
|
+
"card": "rp_Bvxx5q_card",
|
|
15768
|
+
"play": "rp_Bvxx5q_play"
|
|
15761
15769
|
};
|
|
15762
15770
|
// src/client/widgets/world-card/WorldCard.tsx
|
|
15763
15771
|
/** Stable hue per name, so a world without a cover keeps the same colour. */
|
|
@@ -15843,21 +15851,21 @@ window.__ModuleLoader__.load({
|
|
|
15843
15851
|
});
|
|
15844
15852
|
}
|
|
15845
15853
|
// \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
|
|
15846
|
-
const css$
|
|
15847
|
-
const key$
|
|
15848
|
-
let tag$
|
|
15849
|
-
if (tag$
|
|
15850
|
-
tag$
|
|
15851
|
-
tag$
|
|
15852
|
-
tag$
|
|
15853
|
-
document.head.appendChild(tag$
|
|
15854
|
+
const css$17 = ".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}";
|
|
15855
|
+
const key$17 = "src/client/widgets/avatar-choices/AvatarChoices.module.css";
|
|
15856
|
+
let tag$17 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$17) + "]");
|
|
15857
|
+
if (tag$17 === null) {
|
|
15858
|
+
tag$17 = document.createElement("style");
|
|
15859
|
+
tag$17.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15860
|
+
tag$17.dataset.pluginCss = key$17;
|
|
15861
|
+
document.head.appendChild(tag$17);
|
|
15854
15862
|
}
|
|
15855
|
-
tag$
|
|
15863
|
+
tag$17.textContent = css$17;
|
|
15856
15864
|
var AvatarChoices_module_css_default = {
|
|
15857
15865
|
"summary": "rp_YCstOG_summary",
|
|
15858
15866
|
"text": "rp_YCstOG_text",
|
|
15859
|
-
"
|
|
15860
|
-
"
|
|
15867
|
+
"name": "rp_YCstOG_name",
|
|
15868
|
+
"option": "rp_YCstOG_option"
|
|
15861
15869
|
};
|
|
15862
15870
|
// src/client/widgets/avatar-choices/AvatarChoices.tsx
|
|
15863
15871
|
/** A list of avatars to tick: the ones brought into a world or a session. */
|
|
@@ -15884,29 +15892,29 @@ window.__ModuleLoader__.load({
|
|
|
15884
15892
|
}, avatar.key)) });
|
|
15885
15893
|
}
|
|
15886
15894
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/StartSessionDialog.module.css.mjs
|
|
15887
|
-
const css$
|
|
15888
|
-
const key$
|
|
15889
|
-
let tag$
|
|
15890
|
-
if (tag$
|
|
15891
|
-
tag$
|
|
15892
|
-
tag$
|
|
15893
|
-
tag$
|
|
15894
|
-
document.head.appendChild(tag$
|
|
15895
|
+
const css$16 = ".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}}";
|
|
15896
|
+
const key$16 = "src/client/pages/worlds/StartSessionDialog.module.css";
|
|
15897
|
+
let tag$16 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$16) + "]");
|
|
15898
|
+
if (tag$16 === null) {
|
|
15899
|
+
tag$16 = document.createElement("style");
|
|
15900
|
+
tag$16.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
15901
|
+
tag$16.dataset.pluginCss = key$16;
|
|
15902
|
+
document.head.appendChild(tag$16);
|
|
15895
15903
|
}
|
|
15896
|
-
tag$
|
|
15904
|
+
tag$16.textContent = css$16;
|
|
15897
15905
|
var StartSessionDialog_module_css_default = {
|
|
15898
|
-
"form": "rp_AnbLKG_form",
|
|
15899
15906
|
"label": "rp_AnbLKG_label",
|
|
15900
|
-
"error": "rp_AnbLKG_error",
|
|
15901
|
-
"advanced": "rp_AnbLKG_advanced",
|
|
15902
|
-
"option": "rp_AnbLKG_option",
|
|
15903
|
-
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15904
|
-
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
15905
|
-
"optionName": "rp_AnbLKG_optionName",
|
|
15906
15907
|
"optionSummary": "rp_AnbLKG_optionSummary",
|
|
15907
|
-
"message": "rp_AnbLKG_message",
|
|
15908
15908
|
"field": "rp_AnbLKG_field",
|
|
15909
|
-
"
|
|
15909
|
+
"advanced": "rp_AnbLKG_advanced",
|
|
15910
|
+
"optionName": "rp_AnbLKG_optionName",
|
|
15911
|
+
"form": "rp_AnbLKG_form",
|
|
15912
|
+
"advancedToggle": "rp_AnbLKG_advancedToggle",
|
|
15913
|
+
"option": "rp_AnbLKG_option",
|
|
15914
|
+
"message": "rp_AnbLKG_message",
|
|
15915
|
+
"error": "rp_AnbLKG_error",
|
|
15916
|
+
"advancedBody": "rp_AnbLKG_advancedBody",
|
|
15917
|
+
"optionText": "rp_AnbLKG_optionText"
|
|
15910
15918
|
};
|
|
15911
15919
|
// src/client/pages/worlds/AddAvatarsDialog.tsx
|
|
15912
15920
|
/** Asks which avatars become characters of a world's own files. */
|
|
@@ -17051,25 +17059,25 @@ window.__ModuleLoader__.load({
|
|
|
17051
17059
|
return options;
|
|
17052
17060
|
}
|
|
17053
17061
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings-form/SettingsFields.module.css.mjs
|
|
17054
|
-
const css$
|
|
17055
|
-
const key$
|
|
17056
|
-
let tag$
|
|
17057
|
-
if (tag$
|
|
17058
|
-
tag$
|
|
17059
|
-
tag$
|
|
17060
|
-
tag$
|
|
17061
|
-
document.head.appendChild(tag$
|
|
17062
|
+
const css$15 = ".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}";
|
|
17063
|
+
const key$15 = "src/client/settings-form/SettingsFields.module.css";
|
|
17064
|
+
let tag$15 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$15) + "]");
|
|
17065
|
+
if (tag$15 === null) {
|
|
17066
|
+
tag$15 = document.createElement("style");
|
|
17067
|
+
tag$15.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
17068
|
+
tag$15.dataset.pluginCss = key$15;
|
|
17069
|
+
document.head.appendChild(tag$15);
|
|
17062
17070
|
}
|
|
17063
|
-
tag$
|
|
17071
|
+
tag$15.textContent = css$15;
|
|
17064
17072
|
var SettingsFields_module_css_default = {
|
|
17065
|
-
"
|
|
17066
|
-
"help": "rp_Rhi3yq_help",
|
|
17073
|
+
"label": "rp_Rhi3yq_label",
|
|
17067
17074
|
"error": "rp_Rhi3yq_error",
|
|
17068
|
-
"row": "rp_Rhi3yq_row",
|
|
17069
17075
|
"field": "rp_Rhi3yq_field",
|
|
17070
|
-
"
|
|
17076
|
+
"groupTitle": "rp_Rhi3yq_groupTitle",
|
|
17071
17077
|
"area": "rp_Rhi3yq_area",
|
|
17072
|
-
"
|
|
17078
|
+
"row": "rp_Rhi3yq_row",
|
|
17079
|
+
"group": "rp_Rhi3yq_group",
|
|
17080
|
+
"help": "rp_Rhi3yq_help"
|
|
17073
17081
|
};
|
|
17074
17082
|
// src/client/settings-form/SettingsFields.tsx
|
|
17075
17083
|
/** The settings of a chat as editable fields: one control with its explanation under each. */
|
|
@@ -17350,21 +17358,21 @@ window.__ModuleLoader__.load({
|
|
|
17350
17358
|
/** The language of the interface or of a setting, as one of the two the plugin writes in. */
|
|
17351
17359
|
const storyLanguageOf = (code) => code.trim().toLowerCase().startsWith("zh") ? "zh" : "en";
|
|
17352
17360
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/TranslateBanner.module.css.mjs
|
|
17353
|
-
const css$
|
|
17354
|
-
const key$
|
|
17355
|
-
let tag$
|
|
17356
|
-
if (tag$
|
|
17357
|
-
tag$
|
|
17358
|
-
tag$
|
|
17359
|
-
tag$
|
|
17360
|
-
document.head.appendChild(tag$
|
|
17361
|
+
const css$14 = ".rp_Lx8vJa_banner{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 8px;padding:8px 12px;font-size:12px;line-height:18px;display:flex}.rp_Lx8vJa_text{flex:360px;min-width:0}.rp_Lx8vJa_text ul{margin:4px 0 0;padding-left:20px}.rp_Lx8vJa_bannerActions{flex-wrap:wrap;flex:0 auto;justify-content:flex-end;gap:8px;display:flex}.rp_Lx8vJa_error{color:var(--dsw-alias-state-error-primary);margin:0 0 8px;font-size:12px}";
|
|
17362
|
+
const key$14 = "src/client/pages/worlds/TranslateBanner.module.css";
|
|
17363
|
+
let tag$14 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$14) + "]");
|
|
17364
|
+
if (tag$14 === null) {
|
|
17365
|
+
tag$14 = document.createElement("style");
|
|
17366
|
+
tag$14.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
17367
|
+
tag$14.dataset.pluginCss = key$14;
|
|
17368
|
+
document.head.appendChild(tag$14);
|
|
17361
17369
|
}
|
|
17362
|
-
tag$
|
|
17370
|
+
tag$14.textContent = css$14;
|
|
17363
17371
|
var TranslateBanner_module_css_default = {
|
|
17372
|
+
"error": "rp_Lx8vJa_error",
|
|
17364
17373
|
"bannerActions": "rp_Lx8vJa_bannerActions",
|
|
17365
17374
|
"text": "rp_Lx8vJa_text",
|
|
17366
|
-
"banner": "rp_Lx8vJa_banner"
|
|
17367
|
-
"error": "rp_Lx8vJa_error"
|
|
17375
|
+
"banner": "rp_Lx8vJa_banner"
|
|
17368
17376
|
};
|
|
17369
17377
|
// src/client/pages/worlds/TranslateBanner.tsx
|
|
17370
17378
|
const languageName = (t, language) => language === "zh" ? t("languageChinese") : t("languageEnglish");
|
|
@@ -17937,37 +17945,37 @@ window.__ModuleLoader__.load({
|
|
|
17937
17945
|
}));
|
|
17938
17946
|
}
|
|
17939
17947
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/WorldsPage.module.css.mjs
|
|
17940
|
-
const css$
|
|
17941
|
-
const key$
|
|
17942
|
-
let tag$
|
|
17943
|
-
if (tag$
|
|
17944
|
-
tag$
|
|
17945
|
-
tag$
|
|
17946
|
-
tag$
|
|
17947
|
-
document.head.appendChild(tag$
|
|
17948
|
+
const css$13 = ".rp_FHUyRq_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_FHUyRq_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_FHUyRq_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_FHUyRq_toolbarActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.rp_FHUyRq_spinning{animation:.9s linear infinite rp_FHUyRq_spin}@keyframes rp_FHUyRq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_FHUyRq_spinning{animation:none}}.rp_FHUyRq_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_FHUyRq_info{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_FHUyRq_viewport{--rp-card-width:168px;--rp-card-height:288px;--rp-card-gap:16px;flex:1 1 0;min-height:0;padding:4px}.rp_FHUyRq_scrolls{overflow-y:auto}.rp_FHUyRq_fits{overflow:hidden}.rp_FHUyRq_grid{grid-auto-rows:var(--rp-card-height);grid-template-columns:repeat(auto-fill, var(--rp-card-width));gap:var(--rp-card-gap);margin:0;padding:0;list-style:none;display:grid}.rp_FHUyRq_cell{min-width:0;display:flex}.rp_FHUyRq_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_FHUyRq_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_FHUyRq_editTitle{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:180px;font-size:14px;font-weight:500;overflow:hidden}.rp_FHUyRq_editActions{flex-wrap:wrap;flex:0 auto;justify-content:flex-end;gap:8px;display:flex}.rp_FHUyRq_editBody{flex:1 1 0;min-height:0;display:flex}.rp_FHUyRq_starters{flex-direction:column;align-items:center;gap:8px;padding-bottom:24px;display:flex}.rp_FHUyRq_starter{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);text-align:center;max-width:480px;color:var(--dsw-alias-label-secondary);flex-direction:column;align-items:center;gap:6px;padding:12px 16px;font-size:13px;display:flex}@media (width<=640px){.rp_FHUyRq_toolbar{align-items:flex-start}.rp_FHUyRq_count{padding-top:6px}.rp_FHUyRq_toolbarActions{max-width:75%}.rp_FHUyRq_editTitle{text-overflow:ellipsis;white-space:nowrap;flex:calc(100% - 96px);overflow:hidden}.rp_FHUyRq_editActions{flex:0 0 100%;justify-content:flex-start}}";
|
|
17949
|
+
const key$13 = "src/client/pages/worlds/WorldsPage.module.css";
|
|
17950
|
+
let tag$13 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$13) + "]");
|
|
17951
|
+
if (tag$13 === null) {
|
|
17952
|
+
tag$13 = document.createElement("style");
|
|
17953
|
+
tag$13.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
17954
|
+
tag$13.dataset.pluginCss = key$13;
|
|
17955
|
+
document.head.appendChild(tag$13);
|
|
17948
17956
|
}
|
|
17949
|
-
tag$
|
|
17957
|
+
tag$13.textContent = css$13;
|
|
17950
17958
|
var WorldsPage_module_css_default = {
|
|
17951
|
-
"
|
|
17959
|
+
"spinning": "rp_FHUyRq_spinning",
|
|
17952
17960
|
"toolbarActions": "rp_FHUyRq_toolbarActions",
|
|
17953
|
-
"
|
|
17954
|
-
"cell": "rp_FHUyRq_cell",
|
|
17955
|
-
"toolbar": "rp_FHUyRq_toolbar",
|
|
17956
|
-
"message": "rp_FHUyRq_message",
|
|
17961
|
+
"editBody": "rp_FHUyRq_editBody",
|
|
17957
17962
|
"starters": "rp_FHUyRq_starters",
|
|
17958
|
-
"
|
|
17959
|
-
"starter": "rp_FHUyRq_starter",
|
|
17963
|
+
"editHeader": "rp_FHUyRq_editHeader",
|
|
17960
17964
|
"grid": "rp_FHUyRq_grid",
|
|
17961
|
-
"
|
|
17962
|
-
"
|
|
17963
|
-
"
|
|
17964
|
-
"spinning": "rp_FHUyRq_spinning",
|
|
17965
|
+
"cell": "rp_FHUyRq_cell",
|
|
17966
|
+
"starter": "rp_FHUyRq_starter",
|
|
17967
|
+
"toolbar": "rp_FHUyRq_toolbar",
|
|
17965
17968
|
"count": "rp_FHUyRq_count",
|
|
17966
|
-
"fits": "rp_FHUyRq_fits",
|
|
17967
17969
|
"viewport": "rp_FHUyRq_viewport",
|
|
17968
|
-
"
|
|
17970
|
+
"fits": "rp_FHUyRq_fits",
|
|
17971
|
+
"spin": "rp_FHUyRq_spin",
|
|
17972
|
+
"editTitle": "rp_FHUyRq_editTitle",
|
|
17973
|
+
"scrolls": "rp_FHUyRq_scrolls",
|
|
17974
|
+
"page": "rp_FHUyRq_page",
|
|
17969
17975
|
"editActions": "rp_FHUyRq_editActions",
|
|
17970
|
-
"
|
|
17976
|
+
"notice": "rp_FHUyRq_notice",
|
|
17977
|
+
"info": "rp_FHUyRq_info",
|
|
17978
|
+
"message": "rp_FHUyRq_message"
|
|
17971
17979
|
};
|
|
17972
17980
|
// src/client/pages/worlds/StarterWorlds.tsx
|
|
17973
17981
|
/** The worlds that ship with the plugin and are not yet the person's, offered where the list of worlds is empty. */
|
|
@@ -18619,7 +18627,7 @@ window.__ModuleLoader__.load({
|
|
|
18619
18627
|
});
|
|
18620
18628
|
}
|
|
18621
18629
|
// src/client/settings-form/locales.ts
|
|
18622
|
-
const dictionaries$
|
|
18630
|
+
const dictionaries$9 = {
|
|
18623
18631
|
en: {
|
|
18624
18632
|
samplingMaster: "Temperature: game master",
|
|
18625
18633
|
samplingMasterHelp: "How freely the game master decides and narrates (0 to 2). Lower keeps its calls and the world consistent.",
|
|
@@ -19039,7 +19047,7 @@ window.__ModuleLoader__.load({
|
|
|
19039
19047
|
embeddingOptionsHelp: "所选嵌入提供方允许本对话为每次请求设置的内容。留空则使用提供方自己的设置。"
|
|
19040
19048
|
}
|
|
19041
19049
|
};
|
|
19042
|
-
const dictionaries$
|
|
19050
|
+
const dictionaries$8 = withDictionaries(withDictionaries(withDictionaries(withDictionaries({
|
|
19043
19051
|
en: {
|
|
19044
19052
|
nav: "Worlds",
|
|
19045
19053
|
loading: "Loading worlds…",
|
|
@@ -19270,7 +19278,7 @@ window.__ModuleLoader__.load({
|
|
|
19270
19278
|
startAvatars: "带上角色形象",
|
|
19271
19279
|
startAvatarsHelp: "勾选要带进这个存档的角色形象,它们会成为存档中的角色,你也可以扮演它们。世界本身不会改变。"
|
|
19272
19280
|
}
|
|
19273
|
-
}, dictionaries$
|
|
19281
|
+
}, dictionaries$9), dictionaries$15), dictionaries$23), dictionaries$24);
|
|
19274
19282
|
// src/client/pages/worlds/worlds-controller.ts
|
|
19275
19283
|
async function request$1(path, init, signal) {
|
|
19276
19284
|
const response = await fetch(`${API_PREFIX}${path}`, {
|
|
@@ -19517,11 +19525,11 @@ window.__ModuleLoader__.load({
|
|
|
19517
19525
|
}
|
|
19518
19526
|
};
|
|
19519
19527
|
// src/client/pages/worlds/index.ts
|
|
19520
|
-
const NAMESPACE$
|
|
19528
|
+
const NAMESPACE$9 = "roleplay.worlds";
|
|
19521
19529
|
/** Adds the Worlds page to the Role Play panel. */
|
|
19522
19530
|
function registerWorldsPage(ctx) {
|
|
19523
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
19524
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
19531
|
+
const t = ctx.locale.bind(NAMESPACE$9);
|
|
19532
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$9, dictionaries$8), "roleplay: worlds dictionaries");
|
|
19525
19533
|
const worlds = new WorldsController(createChatOpener(ctx), () => t("language"));
|
|
19526
19534
|
ctx.effect(() => () => {
|
|
19527
19535
|
worlds.dispose();
|
|
@@ -19531,7 +19539,7 @@ window.__ModuleLoader__.load({
|
|
|
19531
19539
|
id: "worlds",
|
|
19532
19540
|
order: 0,
|
|
19533
19541
|
label: () => t("nav"),
|
|
19534
|
-
locale: NAMESPACE$
|
|
19542
|
+
locale: NAMESPACE$9,
|
|
19535
19543
|
inject: () => worlds.inject()
|
|
19536
19544
|
}, WorldsPage));
|
|
19537
19545
|
}
|
|
@@ -19628,21 +19636,21 @@ window.__ModuleLoader__.load({
|
|
|
19628
19636
|
}
|
|
19629
19637
|
};
|
|
19630
19638
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/branch/BranchDialog.module.css.mjs
|
|
19631
|
-
const css$
|
|
19632
|
-
const key$
|
|
19633
|
-
let tag$
|
|
19634
|
-
if (tag$
|
|
19635
|
-
tag$
|
|
19636
|
-
tag$
|
|
19637
|
-
tag$
|
|
19638
|
-
document.head.appendChild(tag$
|
|
19639
|
+
const css$12 = ".rp_Dy1TaW_form{flex-direction:column;gap:12px;min-width:min(420px,100%);display:flex}.rp_Dy1TaW_field{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_Dy1TaW_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Dy1TaW_error{color:var(--dsw-alias-state-danger-primary);margin:0;font-size:12px}";
|
|
19640
|
+
const key$12 = "src/client/branch/BranchDialog.module.css";
|
|
19641
|
+
let tag$12 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$12) + "]");
|
|
19642
|
+
if (tag$12 === null) {
|
|
19643
|
+
tag$12 = document.createElement("style");
|
|
19644
|
+
tag$12.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
19645
|
+
tag$12.dataset.pluginCss = key$12;
|
|
19646
|
+
document.head.appendChild(tag$12);
|
|
19639
19647
|
}
|
|
19640
|
-
tag$
|
|
19648
|
+
tag$12.textContent = css$12;
|
|
19641
19649
|
var BranchDialog_module_css_default = {
|
|
19642
19650
|
"field": "rp_Dy1TaW_field",
|
|
19643
|
-
"
|
|
19651
|
+
"error": "rp_Dy1TaW_error",
|
|
19644
19652
|
"label": "rp_Dy1TaW_label",
|
|
19645
|
-
"
|
|
19653
|
+
"form": "rp_Dy1TaW_form"
|
|
19646
19654
|
};
|
|
19647
19655
|
// src/client/branch/BranchDialog.tsx
|
|
19648
19656
|
/** Asks for the name of a session that was just branched off another. */
|
|
@@ -19709,7 +19717,7 @@ window.__ModuleLoader__.load({
|
|
|
19709
19717
|
});
|
|
19710
19718
|
}
|
|
19711
19719
|
// src/client/branch/locales.ts
|
|
19712
|
-
const dictionaries$
|
|
19720
|
+
const dictionaries$7 = {
|
|
19713
19721
|
en: {
|
|
19714
19722
|
title: "Name the branch",
|
|
19715
19723
|
description: "A new session was made from the story at this point; the first one is as it was.",
|
|
@@ -19732,10 +19740,10 @@ window.__ModuleLoader__.load({
|
|
|
19732
19740
|
}
|
|
19733
19741
|
};
|
|
19734
19742
|
// src/client/branch/index.ts
|
|
19735
|
-
const NAMESPACE$
|
|
19743
|
+
const NAMESPACE$8 = "roleplay.branch";
|
|
19736
19744
|
/** Asks for a name when DSH's fork of a roleplay chat has made a session of its own. Forks of ordinary chats are not touched. */
|
|
19737
19745
|
function registerBranchNaming(ctx) {
|
|
19738
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
19746
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$8, dictionaries$7), "roleplay: branch dictionaries");
|
|
19739
19747
|
const branches = new BranchController();
|
|
19740
19748
|
ctx.inject(["sessions"], (inner) => {
|
|
19741
19749
|
const sessions = inner.get("sessions");
|
|
@@ -19744,52 +19752,157 @@ window.__ModuleLoader__.load({
|
|
|
19744
19752
|
ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
19745
19753
|
name: "shell.overlay",
|
|
19746
19754
|
id: "roleplay-branch",
|
|
19747
|
-
locale: NAMESPACE$
|
|
19755
|
+
locale: NAMESPACE$8,
|
|
19748
19756
|
inject: () => branches.inject()
|
|
19749
19757
|
}, BranchDialog));
|
|
19750
19758
|
}
|
|
19759
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/sidebar-guide/SidebarGuideEntry.module.css.mjs
|
|
19760
|
+
const css$11 = ".rp_Okaj1q_entry{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius,var(--dsw-radius-sm));background:var(--dsw-alias-bg-layer-1);align-items:center;gap:14px;width:100%;min-height:56px;padding:14px 20px;display:flex;position:relative;overflow:hidden}.rp_Okaj1q_main{border-radius:0;width:100%;height:100%;position:absolute;inset:0}.rp_Okaj1q_icon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);pointer-events:none;flex:none;justify-content:center;align-items:center;display:flex;position:relative}.rp_Okaj1q_text{pointer-events:none;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex;position:relative}.rp_Okaj1q_title{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4;overflow:hidden}.rp_Okaj1q_description{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.4;overflow:hidden}";
|
|
19761
|
+
const key$11 = "src/client/widgets/sidebar-guide/SidebarGuideEntry.module.css";
|
|
19762
|
+
let tag$11 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$11) + "]");
|
|
19763
|
+
if (tag$11 === null) {
|
|
19764
|
+
tag$11 = document.createElement("style");
|
|
19765
|
+
tag$11.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
19766
|
+
tag$11.dataset.pluginCss = key$11;
|
|
19767
|
+
document.head.appendChild(tag$11);
|
|
19768
|
+
}
|
|
19769
|
+
tag$11.textContent = css$11;
|
|
19770
|
+
var SidebarGuideEntry_module_css_default = {
|
|
19771
|
+
"main": "rp_Okaj1q_main",
|
|
19772
|
+
"text": "rp_Okaj1q_text",
|
|
19773
|
+
"icon": "rp_Okaj1q_icon",
|
|
19774
|
+
"entry": "rp_Okaj1q_entry",
|
|
19775
|
+
"title": "rp_Okaj1q_title",
|
|
19776
|
+
"description": "rp_Okaj1q_description"
|
|
19777
|
+
};
|
|
19778
|
+
// src/client/widgets/sidebar-guide/SidebarGuideEntry.tsx
|
|
19779
|
+
/** A card of the right sidebar's new-tab guide, drawn like DSH's own entries. */
|
|
19780
|
+
function SidebarGuideEntry({ kind, title, description, icon: Icon, onOpen }) {
|
|
19781
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19782
|
+
className: SidebarGuideEntry_module_css_default.entry,
|
|
19783
|
+
"data-sidebar-right-guide-entry": kind,
|
|
19784
|
+
children: [
|
|
19785
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
19786
|
+
variant: "ghost",
|
|
19787
|
+
className: SidebarGuideEntry_module_css_default.main,
|
|
19788
|
+
"aria-label": title,
|
|
19789
|
+
onClick: onOpen
|
|
19790
|
+
}),
|
|
19791
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19792
|
+
className: SidebarGuideEntry_module_css_default.icon,
|
|
19793
|
+
"aria-hidden": "true",
|
|
19794
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { size: 26 })
|
|
19795
|
+
}),
|
|
19796
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
19797
|
+
className: SidebarGuideEntry_module_css_default.text,
|
|
19798
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19799
|
+
className: SidebarGuideEntry_module_css_default.title,
|
|
19800
|
+
"aria-hidden": "true",
|
|
19801
|
+
children: title
|
|
19802
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19803
|
+
className: SidebarGuideEntry_module_css_default.description,
|
|
19804
|
+
"aria-hidden": "true",
|
|
19805
|
+
children: description
|
|
19806
|
+
})]
|
|
19807
|
+
})
|
|
19808
|
+
]
|
|
19809
|
+
});
|
|
19810
|
+
}
|
|
19811
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/gallery/GalleryTab.module.css.mjs
|
|
19812
|
+
const css$10 = ".rp_W688Pa_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_W688Pa_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_W688Pa_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:24px;font-size:13px}";
|
|
19813
|
+
const key$10 = "src/client/gallery/GalleryTab.module.css";
|
|
19814
|
+
let tag$10 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$10) + "]");
|
|
19815
|
+
if (tag$10 === null) {
|
|
19816
|
+
tag$10 = document.createElement("style");
|
|
19817
|
+
tag$10.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
19818
|
+
tag$10.dataset.pluginCss = key$10;
|
|
19819
|
+
document.head.appendChild(tag$10);
|
|
19820
|
+
}
|
|
19821
|
+
tag$10.textContent = css$10;
|
|
19822
|
+
var GalleryTab_module_css_default = {
|
|
19823
|
+
"message": "rp_W688Pa_message",
|
|
19824
|
+
"page": "rp_W688Pa_page",
|
|
19825
|
+
"bar": "rp_W688Pa_bar"
|
|
19826
|
+
};
|
|
19751
19827
|
// src/client/gallery/GalleryTab.tsx
|
|
19752
|
-
/** The
|
|
19753
|
-
|
|
19828
|
+
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
19829
|
+
const GALLERY_KIND = "roleplay-gallery";
|
|
19830
|
+
const GALLERY_ID = "@dsh-agentic-roleplay/core/gallery-sidebar";
|
|
19831
|
+
/** The guide entry that opens the gallery; only a roleplay chat has it. */
|
|
19832
|
+
function GalleryGuide({ sessionId, useTabInfo, t }) {
|
|
19833
|
+
const { tab } = useTabInfo();
|
|
19834
|
+
if (roleplaySessionOf(sessionId) === void 0) return null;
|
|
19835
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarGuideEntry, {
|
|
19836
|
+
kind: GALLERY_KIND,
|
|
19837
|
+
title: t("tab"),
|
|
19838
|
+
description: t("guideText"),
|
|
19839
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconBrowseOutlineRegular,
|
|
19840
|
+
onOpen: () => {
|
|
19841
|
+
tab.actions.openTab(GALLERY_KIND, { replaceTab: true });
|
|
19842
|
+
}
|
|
19843
|
+
});
|
|
19844
|
+
}
|
|
19845
|
+
/** The gallery page of the right sidebar: the pictures of the chat's roleplay session, readable beside the story. */
|
|
19846
|
+
function GalleryBody({ sessionId, useTabInfo, t }) {
|
|
19754
19847
|
const session = roleplaySessionOf(sessionId);
|
|
19848
|
+
const { tab } = useTabInfo();
|
|
19755
19849
|
const target = (0, react.useMemo)(() => session === void 0 ? void 0 : {
|
|
19756
19850
|
kind: "sessions",
|
|
19757
19851
|
id: session
|
|
19758
19852
|
}, [session]);
|
|
19759
|
-
|
|
19760
|
-
className:
|
|
19761
|
-
children:
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
|
|
19853
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19854
|
+
className: GalleryTab_module_css_default.page,
|
|
19855
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
19856
|
+
className: GalleryTab_module_css_default.bar,
|
|
19857
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
19858
|
+
variant: "ghost",
|
|
19859
|
+
size: "sm",
|
|
19860
|
+
onClick: () => {
|
|
19861
|
+
tab.actions.openTab("guide", { replaceTab: true });
|
|
19862
|
+
},
|
|
19863
|
+
children: ["← ", t("back")]
|
|
19864
|
+
})
|
|
19865
|
+
}), target === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
19866
|
+
className: GalleryTab_module_css_default.message,
|
|
19867
|
+
children: t("notRoleplay")
|
|
19868
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GalleryView, {
|
|
19869
|
+
t,
|
|
19870
|
+
target
|
|
19871
|
+
})]
|
|
19766
19872
|
});
|
|
19767
19873
|
}
|
|
19768
19874
|
// src/client/gallery/index.ts
|
|
19769
|
-
const NAMESPACE$
|
|
19770
|
-
|
|
19771
|
-
/** The shell activates a data target for every view tab; this tab reads from the host itself, so its target is empty. */
|
|
19772
|
-
const galleryTarget = {
|
|
19773
|
-
target: VIEW_ID$3,
|
|
19774
|
-
create: () => ({
|
|
19775
|
-
empty: {},
|
|
19776
|
-
replace: () => ({}),
|
|
19777
|
-
apply: () => ({})
|
|
19778
|
-
})
|
|
19779
|
-
};
|
|
19780
|
-
/** Adds the Gallery tab beside Chat and World: every image of the session in a grid. */
|
|
19875
|
+
const NAMESPACE$7 = "roleplay.gallery";
|
|
19876
|
+
/** The gallery: a page of the right sidebar, so the pictures can be browsed while the story is read. */
|
|
19781
19877
|
function registerGallery(ctx) {
|
|
19782
|
-
const t = ctx.locale.bind(NAMESPACE$
|
|
19783
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$
|
|
19784
|
-
ctx.inject(["
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
|
|
19788
|
-
|
|
19789
|
-
|
|
19790
|
-
|
|
19791
|
-
|
|
19792
|
-
|
|
19878
|
+
const t = ctx.locale.bind(NAMESPACE$7);
|
|
19879
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$7, dictionaries$19), "roleplay: gallery dictionaries");
|
|
19880
|
+
ctx.inject(["sidebarRight", "sidebarRightTabs"], (right) => {
|
|
19881
|
+
right.effect(() => right.sidebarRightTabs.register({
|
|
19882
|
+
id: GALLERY_ID,
|
|
19883
|
+
kind: GALLERY_KIND,
|
|
19884
|
+
keepMounted: true,
|
|
19885
|
+
title: () => t("tab"),
|
|
19886
|
+
guide: [{
|
|
19887
|
+
id: "gallery",
|
|
19888
|
+
order: 32,
|
|
19889
|
+
title: () => t("tab"),
|
|
19890
|
+
description: () => t("guideText"),
|
|
19891
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconBrowseOutlineRegular
|
|
19892
|
+
}]
|
|
19893
|
+
}), "roleplay: gallery tab type");
|
|
19894
|
+
right.effect(() => right.slots.inject("sidebar.right.tab.guide.entry", () => right.slots.register({
|
|
19895
|
+
name: "sidebar.right.tab.guide.entry",
|
|
19896
|
+
key: GALLERY_ID,
|
|
19897
|
+
locale: NAMESPACE$7,
|
|
19898
|
+
inject: (sessionId) => ({ sessionId })
|
|
19899
|
+
}, GalleryGuide)), "roleplay: gallery guide entry");
|
|
19900
|
+
right.effect(() => right.slots.inject("sidebar.right.pane.tab", () => right.slots.register({
|
|
19901
|
+
name: "sidebar.right.pane.tab",
|
|
19902
|
+
key: GALLERY_ID,
|
|
19903
|
+
locale: NAMESPACE$7,
|
|
19904
|
+
inject: (sessionId) => ({ sessionId })
|
|
19905
|
+
}, GalleryBody)), "roleplay: gallery body");
|
|
19793
19906
|
});
|
|
19794
19907
|
}
|
|
19795
19908
|
// src/client/chat-input.ts
|
|
@@ -20087,28 +20200,28 @@ window.__ModuleLoader__.load({
|
|
|
20087
20200
|
});
|
|
20088
20201
|
}
|
|
20089
20202
|
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/interface/SidebarPage.module.css.mjs
|
|
20090
|
-
const css$
|
|
20091
|
-
const key$
|
|
20092
|
-
let tag$
|
|
20093
|
-
if (tag$
|
|
20094
|
-
tag$
|
|
20095
|
-
tag$
|
|
20096
|
-
tag$
|
|
20097
|
-
document.head.appendChild(tag$
|
|
20203
|
+
const css$9 = ".rp_Ptco8a_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_Ptco8a_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_Ptco8a_name{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.rp_Ptco8a_content{flex:1 1 0;min-height:0;position:relative}.rp_Ptco8a_message{color:var(--dsw-alias-label-secondary);margin:0;padding:16px;font-size:13px;line-height:20px}.rp_Ptco8a_entry{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius,var(--dsw-radius-sm));background:var(--dsw-alias-bg-layer-1);align-items:center;gap:14px;width:100%;min-height:56px;padding:14px 20px;display:flex;position:relative;overflow:hidden}.rp_Ptco8a_main{border-radius:0;width:100%;height:100%;position:absolute;inset:0}.rp_Ptco8a_icon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);pointer-events:none;flex:none;justify-content:center;align-items:center;display:flex;position:relative}.rp_Ptco8a_text{pointer-events:none;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex;position:relative}.rp_Ptco8a_title{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4;overflow:hidden}.rp_Ptco8a_description{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.4;overflow:hidden}";
|
|
20204
|
+
const key$9 = "src/client/interface/SidebarPage.module.css";
|
|
20205
|
+
let tag$9 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$9) + "]");
|
|
20206
|
+
if (tag$9 === null) {
|
|
20207
|
+
tag$9 = document.createElement("style");
|
|
20208
|
+
tag$9.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
20209
|
+
tag$9.dataset.pluginCss = key$9;
|
|
20210
|
+
document.head.appendChild(tag$9);
|
|
20098
20211
|
}
|
|
20099
|
-
tag$
|
|
20212
|
+
tag$9.textContent = css$9;
|
|
20100
20213
|
var SidebarPage_module_css_default = {
|
|
20101
|
-
"page": "rp_Ptco8a_page",
|
|
20102
20214
|
"content": "rp_Ptco8a_content",
|
|
20215
|
+
"text": "rp_Ptco8a_text",
|
|
20103
20216
|
"main": "rp_Ptco8a_main",
|
|
20217
|
+
"page": "rp_Ptco8a_page",
|
|
20218
|
+
"name": "rp_Ptco8a_name",
|
|
20104
20219
|
"message": "rp_Ptco8a_message",
|
|
20220
|
+
"title": "rp_Ptco8a_title",
|
|
20221
|
+
"icon": "rp_Ptco8a_icon",
|
|
20105
20222
|
"description": "rp_Ptco8a_description",
|
|
20106
|
-
"bar": "rp_Ptco8a_bar",
|
|
20107
20223
|
"entry": "rp_Ptco8a_entry",
|
|
20108
|
-
"
|
|
20109
|
-
"icon": "rp_Ptco8a_icon",
|
|
20110
|
-
"title": "rp_Ptco8a_title",
|
|
20111
|
-
"text": "rp_Ptco8a_text"
|
|
20224
|
+
"bar": "rp_Ptco8a_bar"
|
|
20112
20225
|
};
|
|
20113
20226
|
// src/client/interface/SidebarPage.tsx
|
|
20114
20227
|
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
@@ -20201,7 +20314,7 @@ window.__ModuleLoader__.load({
|
|
|
20201
20314
|
});
|
|
20202
20315
|
}
|
|
20203
20316
|
// src/client/interface/locales.ts
|
|
20204
|
-
const dictionaries$
|
|
20317
|
+
const dictionaries$6 = {
|
|
20205
20318
|
en: {
|
|
20206
20319
|
tab: "Interface",
|
|
20207
20320
|
notRoleplay: "This chat is not a roleplay session.",
|
|
@@ -20236,7 +20349,7 @@ window.__ModuleLoader__.load({
|
|
|
20236
20349
|
}
|
|
20237
20350
|
};
|
|
20238
20351
|
// src/client/interface/index.ts
|
|
20239
|
-
const NAMESPACE$
|
|
20352
|
+
const NAMESPACE$6 = "roleplay.interface";
|
|
20240
20353
|
const VIEW_ID$2 = "roleplay-interface";
|
|
20241
20354
|
/** The shell activates a data target for every view tab; the pack's tab reads from the host itself, so its target is empty. */
|
|
20242
20355
|
const target = {
|
|
@@ -20251,87 +20364,1506 @@ window.__ModuleLoader__.load({
|
|
|
20251
20364
|
* Interface packs: what a story's files add to the page. The status strip and the pack's colours and skin come with the
|
|
20252
20365
|
* dock above the input box; the tab is offered only when some pack has one, which the host is asked when the page loads.
|
|
20253
20366
|
*/
|
|
20254
|
-
function registerInterface(ctx) {
|
|
20367
|
+
function registerInterface(ctx) {
|
|
20368
|
+
const t = ctx.locale.bind(NAMESPACE$6);
|
|
20369
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$6, dictionaries$6), "roleplay: interface dictionaries");
|
|
20370
|
+
ctx.inject(["uiConversation"], (scope) => {
|
|
20371
|
+
const input = (sessionId) => {
|
|
20372
|
+
const facade = facadeOf(scope, sessionId);
|
|
20373
|
+
return {
|
|
20374
|
+
say: (text) => {
|
|
20375
|
+
facade.fill(text, true);
|
|
20376
|
+
},
|
|
20377
|
+
fill: (text) => {
|
|
20378
|
+
facade.fill(text, false);
|
|
20379
|
+
},
|
|
20380
|
+
open: (surface) => {
|
|
20381
|
+
if (surface === "sidebar") scope.get("sidebarRight")?.openTab(SIDEBAR_KIND);
|
|
20382
|
+
else scope.uiConversation.binding(sessionId).activate(VIEW_ID$2);
|
|
20383
|
+
}
|
|
20384
|
+
};
|
|
20385
|
+
};
|
|
20386
|
+
const overrideTokens = (source, tokens) => scope.get("theme")?.overrideTokens(source, tokens) ?? (() => void 0);
|
|
20387
|
+
for (const [surface, order] of [
|
|
20388
|
+
["opening", 1],
|
|
20389
|
+
["hud", 3],
|
|
20390
|
+
["dock", 20]
|
|
20391
|
+
]) scope.slots.inject("conversation.input.dock", () => scope.slots.register({
|
|
20392
|
+
name: "conversation.input.dock",
|
|
20393
|
+
id: `roleplay-${surface}`,
|
|
20394
|
+
order,
|
|
20395
|
+
locale: NAMESPACE$6,
|
|
20396
|
+
inject: (sessionId) => ({
|
|
20397
|
+
surface,
|
|
20398
|
+
frameInput: input(sessionId),
|
|
20399
|
+
overrideTokens
|
|
20400
|
+
})
|
|
20401
|
+
}, PackDock));
|
|
20402
|
+
scope.inject(["sidebarRight", "sidebarRightTabs"], (right) => {
|
|
20403
|
+
right.effect(() => right.sidebarRightTabs.register({
|
|
20404
|
+
id: SIDEBAR_ID,
|
|
20405
|
+
kind: SIDEBAR_KIND,
|
|
20406
|
+
keepMounted: true,
|
|
20407
|
+
title: () => t("sidebarTitle"),
|
|
20408
|
+
guide: [{
|
|
20409
|
+
id: "page",
|
|
20410
|
+
order: 30,
|
|
20411
|
+
title: () => t("sidebarTitle"),
|
|
20412
|
+
description: () => t("sidebarDescription"),
|
|
20413
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconGlobeOutlineRegular
|
|
20414
|
+
}]
|
|
20415
|
+
}), "roleplay: sidebar tab type");
|
|
20416
|
+
right.effect(() => right.slots.inject("sidebar.right.tab.guide.entry", () => right.slots.register({
|
|
20417
|
+
name: "sidebar.right.tab.guide.entry",
|
|
20418
|
+
key: SIDEBAR_ID,
|
|
20419
|
+
locale: NAMESPACE$6,
|
|
20420
|
+
inject: (sessionId) => ({ sessionId })
|
|
20421
|
+
}, SidebarGuide)), "roleplay: sidebar guide entry");
|
|
20422
|
+
right.effect(() => right.slots.inject("sidebar.right.pane.tab", () => right.slots.register({
|
|
20423
|
+
name: "sidebar.right.pane.tab",
|
|
20424
|
+
key: SIDEBAR_ID,
|
|
20425
|
+
locale: NAMESPACE$6,
|
|
20426
|
+
inject: (sessionId) => ({
|
|
20427
|
+
sessionId,
|
|
20428
|
+
frameInput: input(sessionId)
|
|
20429
|
+
})
|
|
20430
|
+
}, SidebarBody)), "roleplay: sidebar body");
|
|
20431
|
+
});
|
|
20432
|
+
let offered = false;
|
|
20433
|
+
availability().then((found) => {
|
|
20434
|
+
if (!found.tab || offered) return;
|
|
20435
|
+
offered = true;
|
|
20436
|
+
scope.uiConversation.views.register(target);
|
|
20437
|
+
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
20438
|
+
name: "conversation.view",
|
|
20439
|
+
id: VIEW_ID$2,
|
|
20440
|
+
order: 18,
|
|
20441
|
+
label: () => t("tab"),
|
|
20442
|
+
locale: NAMESPACE$6,
|
|
20443
|
+
inject: () => ({ frameInput: input })
|
|
20444
|
+
}, InterfaceTab));
|
|
20445
|
+
}).catch((error) => {
|
|
20446
|
+
console.warn("roleplay: the interface packs could not be looked up", error);
|
|
20447
|
+
});
|
|
20448
|
+
});
|
|
20449
|
+
}
|
|
20450
|
+
// src/client/recall/locales.ts
|
|
20451
|
+
const dictionaries$5 = {
|
|
20452
|
+
en: {
|
|
20453
|
+
tab: "Recall",
|
|
20454
|
+
title: "Recall check",
|
|
20455
|
+
description: "What a moment would bring back for the characters",
|
|
20456
|
+
back: "Back",
|
|
20457
|
+
none: "This chat is not a roleplay session.",
|
|
20458
|
+
situation: "The moment",
|
|
20459
|
+
situationHint: "Describe what is happening, as the game master would tell a character.",
|
|
20460
|
+
who: "Character",
|
|
20461
|
+
here: "Everyone with the player",
|
|
20462
|
+
show: "Show what comes to mind",
|
|
20463
|
+
showing: "Looking…",
|
|
20464
|
+
noCharacters: "Nobody else is with the player. Pick a character.",
|
|
20465
|
+
byMeaning: "Found by words and by meaning.",
|
|
20466
|
+
byWords: "Found by words only: the story has no stored vectors or the embedding service is not available.",
|
|
20467
|
+
limit: "A character is reminded of at most {count} things.",
|
|
20468
|
+
nothing: "Nothing comes to mind.",
|
|
20469
|
+
lore: "Background it may look up",
|
|
20470
|
+
known: "{characters} people, {places} places, {things} things, {routes} ways, {factions} organisations known",
|
|
20471
|
+
turn: "As for turn {turn}",
|
|
20472
|
+
failed: "Could not look: {message}",
|
|
20473
|
+
readOnly: "Looking changes nothing: what comes back is not counted as recalled.",
|
|
20474
|
+
whyMatch: "match {value}",
|
|
20475
|
+
whyMatters: "matters {value}",
|
|
20476
|
+
whyAge: "{value} story days ago",
|
|
20477
|
+
whyKept: "kept {value}",
|
|
20478
|
+
whyScore: "score {value}",
|
|
20479
|
+
whyLinked: "came to mind with another memory",
|
|
20480
|
+
clear: "clear",
|
|
20481
|
+
faded: "faded",
|
|
20482
|
+
vague: "vague"
|
|
20483
|
+
},
|
|
20484
|
+
zh: {
|
|
20485
|
+
tab: "回忆",
|
|
20486
|
+
title: "回忆检查",
|
|
20487
|
+
description: "某个时刻会让角色想起什么",
|
|
20488
|
+
back: "返回",
|
|
20489
|
+
none: "此聊天不是角色扮演会话。",
|
|
20490
|
+
situation: "这一刻",
|
|
20491
|
+
situationHint: "描述正在发生什么,就像游戏主持人告诉角色的那样。",
|
|
20492
|
+
who: "角色",
|
|
20493
|
+
here: "与玩家在一起的所有人",
|
|
20494
|
+
show: "看看会想起什么",
|
|
20495
|
+
showing: "查看中…",
|
|
20496
|
+
noCharacters: "没有其他人和玩家在一起。请选择一个角色。",
|
|
20497
|
+
byMeaning: "按字词和含义查找。",
|
|
20498
|
+
byWords: "仅按字词查找:故事没有已存储的向量,或嵌入服务不可用。",
|
|
20499
|
+
limit: "一个角色最多会想起 {count} 件事。",
|
|
20500
|
+
nothing: "什么也没想起。",
|
|
20501
|
+
lore: "可以查阅的背景",
|
|
20502
|
+
known: "已知 {characters} 个人、{places} 个地点、{things} 件物品、{routes} 条通路、{factions} 个组织",
|
|
20503
|
+
turn: "按第 {turn} 回合计",
|
|
20504
|
+
failed: "无法查看:{message}",
|
|
20505
|
+
readOnly: "查看不会改变任何东西:想起的内容不会被计为“已回忆”。",
|
|
20506
|
+
whyMatch: "匹配度 {value}",
|
|
20507
|
+
whyMatters: "重要性 {value}",
|
|
20508
|
+
whyAge: "{value} 个故事日前",
|
|
20509
|
+
whyKept: "记忆保持度 {value}",
|
|
20510
|
+
whyScore: "得分 {value}",
|
|
20511
|
+
whyLinked: "随另一段记忆想起",
|
|
20512
|
+
clear: "清晰",
|
|
20513
|
+
faded: "模糊",
|
|
20514
|
+
vague: "朦胧"
|
|
20515
|
+
}
|
|
20516
|
+
};
|
|
20517
|
+
// src/shared/recall-preview.ts
|
|
20518
|
+
/** The longest situation accepted. */
|
|
20519
|
+
const MAX_SITUATION = 4e3;
|
|
20520
|
+
// src/client/recall/recall-api.ts
|
|
20521
|
+
const failure = async (response) => {
|
|
20522
|
+
const body = await response.json().catch(() => void 0);
|
|
20523
|
+
return new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
20524
|
+
};
|
|
20525
|
+
/** What the moment would bring back for the characters of the story, without playing it. */
|
|
20526
|
+
async function previewRecall(session, situation, character, signal) {
|
|
20527
|
+
const response = await fetch(`${API_PREFIX}/sessions/recall?id=${encodeURIComponent(session)}`, {
|
|
20528
|
+
method: "POST",
|
|
20529
|
+
credentials: "same-origin",
|
|
20530
|
+
signal,
|
|
20531
|
+
headers: { "content-type": "application/json" },
|
|
20532
|
+
body: JSON.stringify({
|
|
20533
|
+
situation,
|
|
20534
|
+
...character === void 0 ? {} : { character }
|
|
20535
|
+
})
|
|
20536
|
+
});
|
|
20537
|
+
if (!response.ok) throw await failure(response);
|
|
20538
|
+
return await response.json();
|
|
20539
|
+
}
|
|
20540
|
+
/** The characters an agent plays, to pick one from. */
|
|
20541
|
+
async function loadCharacters(session, signal) {
|
|
20542
|
+
const response = await fetch(`${API_PREFIX}/sessions/world?id=${encodeURIComponent(session)}`, {
|
|
20543
|
+
credentials: "same-origin",
|
|
20544
|
+
signal
|
|
20545
|
+
});
|
|
20546
|
+
if (!response.ok) throw await failure(response);
|
|
20547
|
+
return (await response.json()).characters.filter((character) => character.control === "agent").map(({ key, name }) => ({
|
|
20548
|
+
key,
|
|
20549
|
+
name
|
|
20550
|
+
}));
|
|
20551
|
+
}
|
|
20552
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/recall/RecallTab.module.css.mjs
|
|
20553
|
+
const css$8 = ".rp_jl9CIq_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_jl9CIq_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_jl9CIq_name{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.rp_jl9CIq_body{flex:1 1 0;min-height:0;padding:12px 16px 24px;overflow-y:auto}.rp_jl9CIq_form{flex-direction:column;gap:8px;display:flex}.rp_jl9CIq_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_jl9CIq_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_jl9CIq_field{box-sizing:border-box;width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);padding:6px 8px;font-size:13px}.rp_jl9CIq_area{resize:vertical;min-height:84px}.rp_jl9CIq_actions{align-items:center;gap:8px;display:flex}.rp_jl9CIq_error{color:var(--dsw-alias-state-error-primary,#d33);margin:0;font-size:13px}.rp_jl9CIq_note{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:18px}.rp_jl9CIq_person{border-top:.5px solid var(--dsw-alias-border-l3);margin-top:16px;padding-top:12px}.rp_jl9CIq_heading{align-items:baseline;gap:8px;font-size:14px;font-weight:500;display:flex}.rp_jl9CIq_place{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400}.rp_jl9CIq_list{flex-direction:column;gap:8px;margin:8px 0 0;padding:0;list-style:none;display:flex}.rp_jl9CIq_item{font-size:13px;line-height:20px}.rp_jl9CIq_meta{color:var(--dsw-alias-label-tertiary);font-size:12px;display:block}";
|
|
20554
|
+
const key$8 = "src/client/recall/RecallTab.module.css";
|
|
20555
|
+
let tag$8 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$8) + "]");
|
|
20556
|
+
if (tag$8 === null) {
|
|
20557
|
+
tag$8 = document.createElement("style");
|
|
20558
|
+
tag$8.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
20559
|
+
tag$8.dataset.pluginCss = key$8;
|
|
20560
|
+
document.head.appendChild(tag$8);
|
|
20561
|
+
}
|
|
20562
|
+
tag$8.textContent = css$8;
|
|
20563
|
+
var RecallTab_module_css_default = {
|
|
20564
|
+
"place": "rp_jl9CIq_place",
|
|
20565
|
+
"label": "rp_jl9CIq_label",
|
|
20566
|
+
"actions": "rp_jl9CIq_actions",
|
|
20567
|
+
"item": "rp_jl9CIq_item",
|
|
20568
|
+
"hint": "rp_jl9CIq_hint",
|
|
20569
|
+
"meta": "rp_jl9CIq_meta",
|
|
20570
|
+
"area": "rp_jl9CIq_area",
|
|
20571
|
+
"bar": "rp_jl9CIq_bar",
|
|
20572
|
+
"heading": "rp_jl9CIq_heading",
|
|
20573
|
+
"field": "rp_jl9CIq_field",
|
|
20574
|
+
"note": "rp_jl9CIq_note",
|
|
20575
|
+
"error": "rp_jl9CIq_error",
|
|
20576
|
+
"body": "rp_jl9CIq_body",
|
|
20577
|
+
"form": "rp_jl9CIq_form",
|
|
20578
|
+
"person": "rp_jl9CIq_person",
|
|
20579
|
+
"name": "rp_jl9CIq_name",
|
|
20580
|
+
"page": "rp_jl9CIq_page",
|
|
20581
|
+
"list": "rp_jl9CIq_list"
|
|
20582
|
+
};
|
|
20583
|
+
// src/client/recall/RecallTab.tsx
|
|
20584
|
+
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
20585
|
+
const RECALL_KIND = "roleplay-recall";
|
|
20586
|
+
const RECALL_ID = "@dsh-agentic-roleplay/core/recall-sidebar";
|
|
20587
|
+
/** The guide entry that opens the recall check, drawn like DSH's own; only a roleplay chat has it. */
|
|
20588
|
+
function RecallGuide({ sessionId, useTabInfo, t }) {
|
|
20589
|
+
const { tab } = useTabInfo();
|
|
20590
|
+
if (roleplaySessionOf(sessionId) === void 0) return null;
|
|
20591
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarGuideEntry, {
|
|
20592
|
+
kind: RECALL_KIND,
|
|
20593
|
+
title: t("title"),
|
|
20594
|
+
description: t("description"),
|
|
20595
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular,
|
|
20596
|
+
onOpen: () => {
|
|
20597
|
+
tab.actions.openTab(RECALL_KIND, { replaceTab: true });
|
|
20598
|
+
}
|
|
20599
|
+
});
|
|
20600
|
+
}
|
|
20601
|
+
const figure$1 = (value) => (Math.round(value * 100) / 100).toString();
|
|
20602
|
+
function reasonOf(t, why) {
|
|
20603
|
+
if (why === void 0) return "";
|
|
20604
|
+
return [
|
|
20605
|
+
t("whyMatch", { value: figure$1(why.relevance) }),
|
|
20606
|
+
t("whyMatters", { value: why.importance }),
|
|
20607
|
+
t("whyAge", { value: figure$1(why.ageDays) }),
|
|
20608
|
+
...why.retention === void 0 ? [] : [t("whyKept", { value: figure$1(why.retention) })],
|
|
20609
|
+
t("whyScore", { value: figure$1(why.score) }),
|
|
20610
|
+
...why.linked === void 0 ? [] : [t("whyLinked")]
|
|
20611
|
+
].join(" · ");
|
|
20612
|
+
}
|
|
20613
|
+
/** The tab: a moment in, what each character would be reminded of out. Nothing is played and nothing the story keeps changes. */
|
|
20614
|
+
function RecallBody({ sessionId, useTabInfo, t }) {
|
|
20615
|
+
const session = roleplaySessionOf(sessionId);
|
|
20616
|
+
const { tab } = useTabInfo();
|
|
20617
|
+
const [situation, setSituation] = (0, react.useState)("");
|
|
20618
|
+
const [character, setCharacter] = (0, react.useState)("");
|
|
20619
|
+
const [people, setPeople] = (0, react.useState)([]);
|
|
20620
|
+
const [result, setResult] = (0, react.useState)({ state: "idle" });
|
|
20621
|
+
const running = (0, react.useRef)(void 0);
|
|
20622
|
+
(0, react.useEffect)(() => {
|
|
20623
|
+
if (session === void 0 || !tab.visible) return void 0;
|
|
20624
|
+
const abort = new AbortController();
|
|
20625
|
+
loadCharacters(session, abort.signal).then(setPeople, () => void 0);
|
|
20626
|
+
return () => {
|
|
20627
|
+
abort.abort();
|
|
20628
|
+
};
|
|
20629
|
+
}, [session, tab.visible]);
|
|
20630
|
+
(0, react.useEffect)(() => () => {
|
|
20631
|
+
running.current?.abort();
|
|
20632
|
+
}, []);
|
|
20633
|
+
const show = () => {
|
|
20634
|
+
if (session === void 0 || situation.trim() === "") return;
|
|
20635
|
+
running.current?.abort();
|
|
20636
|
+
const abort = new AbortController();
|
|
20637
|
+
running.current = abort;
|
|
20638
|
+
setResult({ state: "working" });
|
|
20639
|
+
previewRecall(session, situation, character === "" ? void 0 : character, abort.signal).then((preview) => {
|
|
20640
|
+
if (!abort.signal.aborted) setResult({
|
|
20641
|
+
state: "done",
|
|
20642
|
+
preview
|
|
20643
|
+
});
|
|
20644
|
+
}, (error) => {
|
|
20645
|
+
if (!abort.signal.aborted) setResult({
|
|
20646
|
+
state: "failed",
|
|
20647
|
+
message: error instanceof Error ? error.message : String(error)
|
|
20648
|
+
});
|
|
20649
|
+
});
|
|
20650
|
+
};
|
|
20651
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20652
|
+
className: RecallTab_module_css_default.page,
|
|
20653
|
+
"data-rp": "recall",
|
|
20654
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20655
|
+
className: RecallTab_module_css_default.bar,
|
|
20656
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20657
|
+
variant: "ghost",
|
|
20658
|
+
size: "sm",
|
|
20659
|
+
onClick: () => {
|
|
20660
|
+
tab.actions.openTab("guide", { replaceTab: true });
|
|
20661
|
+
},
|
|
20662
|
+
children: ["← ", t("back")]
|
|
20663
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
20664
|
+
className: RecallTab_module_css_default.name,
|
|
20665
|
+
children: t("title")
|
|
20666
|
+
})]
|
|
20667
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20668
|
+
className: RecallTab_module_css_default.body,
|
|
20669
|
+
children: session === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20670
|
+
className: RecallTab_module_css_default.hint,
|
|
20671
|
+
children: t("none")
|
|
20672
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
20673
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20674
|
+
className: RecallTab_module_css_default.form,
|
|
20675
|
+
children: [
|
|
20676
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
20677
|
+
className: RecallTab_module_css_default.label,
|
|
20678
|
+
htmlFor: "rp-recall-situation",
|
|
20679
|
+
children: t("situation")
|
|
20680
|
+
}),
|
|
20681
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
20682
|
+
id: "rp-recall-situation",
|
|
20683
|
+
className: `${RecallTab_module_css_default.field} ${RecallTab_module_css_default.area}`,
|
|
20684
|
+
value: situation,
|
|
20685
|
+
maxLength: MAX_SITUATION,
|
|
20686
|
+
placeholder: t("situationHint"),
|
|
20687
|
+
onChange: (event) => {
|
|
20688
|
+
setSituation(event.target.value);
|
|
20689
|
+
}
|
|
20690
|
+
}),
|
|
20691
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
20692
|
+
className: RecallTab_module_css_default.label,
|
|
20693
|
+
htmlFor: "rp-recall-who",
|
|
20694
|
+
children: t("who")
|
|
20695
|
+
}),
|
|
20696
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
20697
|
+
id: "rp-recall-who",
|
|
20698
|
+
className: RecallTab_module_css_default.field,
|
|
20699
|
+
value: character,
|
|
20700
|
+
onChange: (event) => {
|
|
20701
|
+
setCharacter(event.target.value);
|
|
20702
|
+
},
|
|
20703
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
20704
|
+
value: "",
|
|
20705
|
+
children: t("here")
|
|
20706
|
+
}), people.map((person) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
20707
|
+
value: person.key,
|
|
20708
|
+
children: person.name
|
|
20709
|
+
}, person.key))]
|
|
20710
|
+
}),
|
|
20711
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20712
|
+
className: RecallTab_module_css_default.actions,
|
|
20713
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20714
|
+
variant: "primary",
|
|
20715
|
+
size: "sm",
|
|
20716
|
+
disabled: situation.trim() === "" || result.state === "working",
|
|
20717
|
+
onClick: show,
|
|
20718
|
+
children: result.state === "working" ? t("showing") : t("show")
|
|
20719
|
+
})
|
|
20720
|
+
}),
|
|
20721
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20722
|
+
className: RecallTab_module_css_default.hint,
|
|
20723
|
+
children: t("readOnly")
|
|
20724
|
+
})
|
|
20725
|
+
]
|
|
20726
|
+
}),
|
|
20727
|
+
result.state === "failed" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20728
|
+
className: RecallTab_module_css_default.error,
|
|
20729
|
+
role: "alert",
|
|
20730
|
+
children: t("failed", { message: result.message })
|
|
20731
|
+
}),
|
|
20732
|
+
result.state === "done" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Preview, {
|
|
20733
|
+
t,
|
|
20734
|
+
preview: result.preview
|
|
20735
|
+
})
|
|
20736
|
+
] })
|
|
20737
|
+
})]
|
|
20738
|
+
});
|
|
20739
|
+
}
|
|
20740
|
+
function Preview({ t, preview }) {
|
|
20741
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20742
|
+
"data-testid": "roleplay-recall-result",
|
|
20743
|
+
children: [
|
|
20744
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20745
|
+
className: RecallTab_module_css_default.note,
|
|
20746
|
+
children: `${t("turn", { turn: preview.turn })}. ${preview.byMeaning ? t("byMeaning") : t("byWords")} ${t("limit", { count: preview.limit })}`
|
|
20747
|
+
}),
|
|
20748
|
+
preview.characters.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20749
|
+
className: RecallTab_module_css_default.hint,
|
|
20750
|
+
children: t("noCharacters")
|
|
20751
|
+
}),
|
|
20752
|
+
preview.characters.map((person) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
20753
|
+
className: RecallTab_module_css_default.person,
|
|
20754
|
+
children: [
|
|
20755
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20756
|
+
className: RecallTab_module_css_default.heading,
|
|
20757
|
+
children: [person.name, person.place === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
20758
|
+
className: RecallTab_module_css_default.place,
|
|
20759
|
+
children: person.place
|
|
20760
|
+
})]
|
|
20761
|
+
}),
|
|
20762
|
+
person.memories.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20763
|
+
className: RecallTab_module_css_default.hint,
|
|
20764
|
+
children: t("nothing")
|
|
20765
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
20766
|
+
className: RecallTab_module_css_default.list,
|
|
20767
|
+
children: person.memories.map((memory, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
20768
|
+
className: RecallTab_module_css_default.item,
|
|
20769
|
+
children: [memory.text, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
20770
|
+
className: RecallTab_module_css_default.meta,
|
|
20771
|
+
children: `${t(memory.clarity)} · ${memory.turn} — ${reasonOf(t, memory.why)}`
|
|
20772
|
+
})]
|
|
20773
|
+
}, index))
|
|
20774
|
+
}),
|
|
20775
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20776
|
+
className: RecallTab_module_css_default.hint,
|
|
20777
|
+
children: t("known", person.known)
|
|
20778
|
+
}),
|
|
20779
|
+
person.lore.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
20780
|
+
className: RecallTab_module_css_default.hint,
|
|
20781
|
+
children: `${t("lore")}: ${person.lore.join(", ")}`
|
|
20782
|
+
})
|
|
20783
|
+
]
|
|
20784
|
+
}, person.key))
|
|
20785
|
+
]
|
|
20786
|
+
});
|
|
20787
|
+
}
|
|
20788
|
+
// src/client/recall/index.ts
|
|
20789
|
+
const NAMESPACE$5 = "roleplay.recall";
|
|
20790
|
+
/** The recall check: a page of the right sidebar, beside the chat, that shows what a moment would bring back for the characters. */
|
|
20791
|
+
function registerRecall(ctx) {
|
|
20792
|
+
const t = ctx.locale.bind(NAMESPACE$5);
|
|
20793
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$5, dictionaries$5), "roleplay: recall dictionaries");
|
|
20794
|
+
ctx.inject(["sidebarRight", "sidebarRightTabs"], (right) => {
|
|
20795
|
+
right.effect(() => right.sidebarRightTabs.register({
|
|
20796
|
+
id: RECALL_ID,
|
|
20797
|
+
kind: RECALL_KIND,
|
|
20798
|
+
keepMounted: true,
|
|
20799
|
+
title: () => t("tab"),
|
|
20800
|
+
guide: [{
|
|
20801
|
+
id: "recall",
|
|
20802
|
+
order: 31,
|
|
20803
|
+
title: () => t("title"),
|
|
20804
|
+
description: () => t("description"),
|
|
20805
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular
|
|
20806
|
+
}]
|
|
20807
|
+
}), "roleplay: recall tab type");
|
|
20808
|
+
right.effect(() => right.slots.inject("sidebar.right.tab.guide.entry", () => right.slots.register({
|
|
20809
|
+
name: "sidebar.right.tab.guide.entry",
|
|
20810
|
+
key: RECALL_ID,
|
|
20811
|
+
locale: NAMESPACE$5,
|
|
20812
|
+
inject: (sessionId) => ({ sessionId })
|
|
20813
|
+
}, RecallGuide)), "roleplay: recall guide entry");
|
|
20814
|
+
right.effect(() => right.slots.inject("sidebar.right.pane.tab", () => right.slots.register({
|
|
20815
|
+
name: "sidebar.right.pane.tab",
|
|
20816
|
+
key: RECALL_ID,
|
|
20817
|
+
locale: NAMESPACE$5,
|
|
20818
|
+
inject: (sessionId) => ({ sessionId })
|
|
20819
|
+
}, RecallBody)), "roleplay: recall body");
|
|
20820
|
+
});
|
|
20821
|
+
}
|
|
20822
|
+
// src/client/reference/locales.ts
|
|
20823
|
+
const dictionaries$4 = {
|
|
20824
|
+
en: {
|
|
20825
|
+
tab: "Reference",
|
|
20826
|
+
title: "Reference",
|
|
20827
|
+
description: "Who you have met, where you have been, what you carry",
|
|
20828
|
+
back: "Back",
|
|
20829
|
+
navLabel: "Reference pages",
|
|
20830
|
+
refresh: "Refresh",
|
|
20831
|
+
notRoleplay: "This chat is not a roleplay session, so it has no reference.",
|
|
20832
|
+
loading: "Loading…",
|
|
20833
|
+
failed: "Could not load this page: {message}",
|
|
20834
|
+
profile: "Profile",
|
|
20835
|
+
noProfile: "There is no character of yours in this story yet.",
|
|
20836
|
+
aliases: "Also called {list}",
|
|
20837
|
+
now: "Now",
|
|
20838
|
+
doing: "Doing",
|
|
20839
|
+
feeling: "Inside",
|
|
20840
|
+
appearance: "Appearance",
|
|
20841
|
+
personality: "Personality",
|
|
20842
|
+
background: "Background",
|
|
20843
|
+
speech: "How you speak",
|
|
20844
|
+
values: "Tracked",
|
|
20845
|
+
goals: "What you want",
|
|
20846
|
+
groups: "Groups",
|
|
20847
|
+
recollections: "What you remember ({count})",
|
|
20848
|
+
beliefs: "What you believe ({count})",
|
|
20849
|
+
showing: "Showing the newest {shown} of {count}.",
|
|
20850
|
+
turn: "turn {turn}",
|
|
20851
|
+
witnessed: "saw",
|
|
20852
|
+
heard: "heard",
|
|
20853
|
+
told: "was told",
|
|
20854
|
+
inferred: "worked out",
|
|
20855
|
+
doubtful: "doubtful",
|
|
20856
|
+
likely: "likely",
|
|
20857
|
+
sure: "sure",
|
|
20858
|
+
deadline: "by {when}",
|
|
20859
|
+
map: "Map",
|
|
20860
|
+
mapHint: "Places you know, set out by how many ways they are from where you are. A dashed line is a way that is closed.",
|
|
20861
|
+
journal: "Journal",
|
|
20862
|
+
journalHint: "Your own notes on the story. Only you read them.",
|
|
20863
|
+
savedNotes: "Saved",
|
|
20864
|
+
savingNotes: "Saving…",
|
|
20865
|
+
unsavedNotes: "Not saved yet",
|
|
20866
|
+
saveFailed: "Could not save: {message}",
|
|
20867
|
+
people: "People",
|
|
20868
|
+
places: "Places",
|
|
20869
|
+
things: "Things",
|
|
20870
|
+
noPeople: "Nobody yet. People you meet or are with appear here.",
|
|
20871
|
+
noPlaces: "No places yet.",
|
|
20872
|
+
noThings: "You carry nothing and see nothing lying around.",
|
|
20873
|
+
here: "here",
|
|
20874
|
+
youAreHere: "you are here",
|
|
20875
|
+
inside: "inside {place}",
|
|
20876
|
+
features: "Notable: {list}",
|
|
20877
|
+
ways: "Ways out: {list}",
|
|
20878
|
+
closedWay: "{place} (closed)",
|
|
20879
|
+
carried: "carried",
|
|
20880
|
+
worn: "worn",
|
|
20881
|
+
lyingHere: "lying here"
|
|
20882
|
+
},
|
|
20883
|
+
zh: {
|
|
20884
|
+
tab: "资料",
|
|
20885
|
+
title: "资料",
|
|
20886
|
+
description: "你遇见过谁、去过哪里、带着什么",
|
|
20887
|
+
back: "返回",
|
|
20888
|
+
navLabel: "资料页",
|
|
20889
|
+
refresh: "刷新",
|
|
20890
|
+
notRoleplay: "此对话不是角色扮演存档,没有资料。",
|
|
20891
|
+
loading: "正在加载…",
|
|
20892
|
+
failed: "无法加载此页:{message}",
|
|
20893
|
+
profile: "档案",
|
|
20894
|
+
noProfile: "这个故事里还没有你的角色。",
|
|
20895
|
+
aliases: "又称{list}",
|
|
20896
|
+
now: "此刻",
|
|
20897
|
+
doing: "正在做",
|
|
20898
|
+
feeling: "内心",
|
|
20899
|
+
appearance: "外貌",
|
|
20900
|
+
personality: "性格",
|
|
20901
|
+
background: "背景",
|
|
20902
|
+
speech: "说话方式",
|
|
20903
|
+
values: "状态数值",
|
|
20904
|
+
goals: "想要什么",
|
|
20905
|
+
groups: "所属团体",
|
|
20906
|
+
recollections: "你记得的事({count})",
|
|
20907
|
+
beliefs: "你的看法({count})",
|
|
20908
|
+
showing: "显示最近的 {shown} 条,共 {count} 条。",
|
|
20909
|
+
turn: "第 {turn} 回合",
|
|
20910
|
+
witnessed: "亲眼所见",
|
|
20911
|
+
heard: "听到",
|
|
20912
|
+
told: "听说",
|
|
20913
|
+
inferred: "推断",
|
|
20914
|
+
doubtful: "存疑",
|
|
20915
|
+
likely: "多半",
|
|
20916
|
+
sure: "确信",
|
|
20917
|
+
deadline: "期限:{when}",
|
|
20918
|
+
map: "地图",
|
|
20919
|
+
mapHint: "你知道的地方,按离你所在之处有几步路排列。虚线表示已关闭的路。",
|
|
20920
|
+
journal: "日志",
|
|
20921
|
+
journalHint: "你自己对故事的笔记,只有你能看到。",
|
|
20922
|
+
savedNotes: "已保存",
|
|
20923
|
+
savingNotes: "正在保存…",
|
|
20924
|
+
unsavedNotes: "尚未保存",
|
|
20925
|
+
saveFailed: "无法保存:{message}",
|
|
20926
|
+
people: "人物",
|
|
20927
|
+
places: "地点",
|
|
20928
|
+
things: "物品",
|
|
20929
|
+
noPeople: "还没有人。你遇见或同行的人会出现在这里。",
|
|
20930
|
+
noPlaces: "还没有地点。",
|
|
20931
|
+
noThings: "你身上没有东西,周围也没有看得见的东西。",
|
|
20932
|
+
here: "在这里",
|
|
20933
|
+
youAreHere: "你在这里",
|
|
20934
|
+
inside: "位于{place}内",
|
|
20935
|
+
features: "显眼之处:{list}",
|
|
20936
|
+
ways: "出路:{list}",
|
|
20937
|
+
closedWay: "{place}(关闭)",
|
|
20938
|
+
carried: "携带",
|
|
20939
|
+
worn: "穿戴",
|
|
20940
|
+
lyingHere: "放在这里"
|
|
20941
|
+
}
|
|
20942
|
+
};
|
|
20943
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/reference/ReferenceTab.module.css.mjs
|
|
20944
|
+
const css$7 = ".rp_7BGO2a_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_7BGO2a_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_7BGO2a_nav{flex:none;padding:0 16px}.rp_7BGO2a_body{flex:1 1 0;min-height:0;padding:4px 16px 24px;overflow-y:auto}.rp_7BGO2a_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:24px;font-size:13px}";
|
|
20945
|
+
const key$7 = "src/client/reference/ReferenceTab.module.css";
|
|
20946
|
+
let tag$7 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$7) + "]");
|
|
20947
|
+
if (tag$7 === null) {
|
|
20948
|
+
tag$7 = document.createElement("style");
|
|
20949
|
+
tag$7.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
20950
|
+
tag$7.dataset.pluginCss = key$7;
|
|
20951
|
+
document.head.appendChild(tag$7);
|
|
20952
|
+
}
|
|
20953
|
+
tag$7.textContent = css$7;
|
|
20954
|
+
var ReferenceTab_module_css_default = {
|
|
20955
|
+
"nav": "rp_7BGO2a_nav",
|
|
20956
|
+
"bar": "rp_7BGO2a_bar",
|
|
20957
|
+
"page": "rp_7BGO2a_page",
|
|
20958
|
+
"message": "rp_7BGO2a_message",
|
|
20959
|
+
"body": "rp_7BGO2a_body"
|
|
20960
|
+
};
|
|
20961
|
+
// src/client/reference/ReferenceTab.tsx
|
|
20962
|
+
/** The kind of the tab type, and the identity it registers its card and body under. */
|
|
20963
|
+
const REFERENCE_KIND = "roleplay-reference";
|
|
20964
|
+
const REFERENCE_ID = "@dsh-agentic-roleplay/core/reference-sidebar";
|
|
20965
|
+
/** The guide entry that opens the reference; only a roleplay chat has it. */
|
|
20966
|
+
function ReferenceGuide({ sessionId, useTabInfo, t }) {
|
|
20967
|
+
const { tab } = useTabInfo();
|
|
20968
|
+
if (roleplaySessionOf(sessionId) === void 0) return null;
|
|
20969
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarGuideEntry, {
|
|
20970
|
+
kind: REFERENCE_KIND,
|
|
20971
|
+
title: t("title"),
|
|
20972
|
+
description: t("description"),
|
|
20973
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconListPenOutlineRegular,
|
|
20974
|
+
onOpen: () => {
|
|
20975
|
+
tab.actions.openTab(REFERENCE_KIND, { replaceTab: true });
|
|
20976
|
+
}
|
|
20977
|
+
});
|
|
20978
|
+
}
|
|
20979
|
+
/** What the player may look up beside the story, one page at a time; a page is an entry of `roleplay.reference.section`. */
|
|
20980
|
+
function ReferenceBody({ sessionId, useTabInfo, useSections, renderSlot, t }) {
|
|
20981
|
+
const base = (0, react.useId)();
|
|
20982
|
+
const { tab } = useTabInfo();
|
|
20983
|
+
const sections = useSections((snapshot) => snapshot);
|
|
20984
|
+
const [selected, setSelected] = (0, react.useState)();
|
|
20985
|
+
const active = sections.find((section) => section.id === selected) ?? sections[0];
|
|
20986
|
+
const tabs = sections.map((section) => ({
|
|
20987
|
+
id: section.id,
|
|
20988
|
+
label: section.label,
|
|
20989
|
+
tabId: `${base}-tab-${section.id}`,
|
|
20990
|
+
panelId: `${base}-page-${section.id}`
|
|
20991
|
+
}));
|
|
20992
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20993
|
+
className: ReferenceTab_module_css_default.page,
|
|
20994
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20995
|
+
className: ReferenceTab_module_css_default.bar,
|
|
20996
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
20997
|
+
variant: "ghost",
|
|
20998
|
+
size: "sm",
|
|
20999
|
+
onClick: () => {
|
|
21000
|
+
tab.actions.openTab("guide", { replaceTab: true });
|
|
21001
|
+
},
|
|
21002
|
+
children: ["← ", t("back")]
|
|
21003
|
+
})
|
|
21004
|
+
}), roleplaySessionOf(sessionId) === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21005
|
+
className: ReferenceTab_module_css_default.message,
|
|
21006
|
+
children: t("notRoleplay")
|
|
21007
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [active !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21008
|
+
className: ReferenceTab_module_css_default.nav,
|
|
21009
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageTabs, {
|
|
21010
|
+
tabs,
|
|
21011
|
+
value: active.id,
|
|
21012
|
+
label: t("navLabel"),
|
|
21013
|
+
onChange: setSelected
|
|
21014
|
+
})
|
|
21015
|
+
}), active !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21016
|
+
className: ReferenceTab_module_css_default.body,
|
|
21017
|
+
role: "tabpanel",
|
|
21018
|
+
id: `${base}-page-${active.id}`,
|
|
21019
|
+
"aria-labelledby": `${base}-tab-${active.id}`,
|
|
21020
|
+
children: renderSlot("roleplay.reference.section", {
|
|
21021
|
+
sessionId,
|
|
21022
|
+
visible: tab.visible
|
|
21023
|
+
}, { only: active.id })
|
|
21024
|
+
}, active.id)] })]
|
|
21025
|
+
});
|
|
21026
|
+
}
|
|
21027
|
+
// src/shared/journal.ts
|
|
21028
|
+
/** The most a journal may hold. */
|
|
21029
|
+
const MAX_JOURNAL = 2e4;
|
|
21030
|
+
// src/client/reference/reference-api.ts
|
|
21031
|
+
/** One page of what the player may look up about the story. */
|
|
21032
|
+
async function loadReference(session, section, signal, character) {
|
|
21033
|
+
const response = await fetch(`${API_PREFIX}/sessions/reference?id=${encodeURIComponent(session)}§ion=${section}${character === void 0 ? "" : `&character=${encodeURIComponent(character)}`}`, {
|
|
21034
|
+
credentials: "same-origin",
|
|
21035
|
+
signal
|
|
21036
|
+
});
|
|
21037
|
+
if (!response.ok) {
|
|
21038
|
+
const body = await response.json().catch(() => void 0);
|
|
21039
|
+
throw new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
21040
|
+
}
|
|
21041
|
+
return await response.json();
|
|
21042
|
+
}
|
|
21043
|
+
const failed = async (response) => {
|
|
21044
|
+
const body = await response.json().catch(() => void 0);
|
|
21045
|
+
return new Error(typeof body?.message === "string" ? body.message : `${response.status} ${response.statusText}`.trim());
|
|
21046
|
+
};
|
|
21047
|
+
/** The player's notes on the story. */
|
|
21048
|
+
async function loadJournal(session, signal) {
|
|
21049
|
+
const response = await fetch(`${API_PREFIX}/sessions/journal?id=${encodeURIComponent(session)}`, {
|
|
21050
|
+
credentials: "same-origin",
|
|
21051
|
+
signal
|
|
21052
|
+
});
|
|
21053
|
+
if (!response.ok) throw await failed(response);
|
|
21054
|
+
return await response.json();
|
|
21055
|
+
}
|
|
21056
|
+
async function saveJournal(session, text, signal) {
|
|
21057
|
+
const response = await fetch(`${API_PREFIX}/sessions/journal?id=${encodeURIComponent(session)}`, {
|
|
21058
|
+
method: "PUT",
|
|
21059
|
+
credentials: "same-origin",
|
|
21060
|
+
...signal === void 0 ? {} : { signal },
|
|
21061
|
+
headers: { "content-type": "application/json" },
|
|
21062
|
+
body: JSON.stringify({ text })
|
|
21063
|
+
});
|
|
21064
|
+
if (!response.ok) throw await failed(response);
|
|
21065
|
+
return await response.json();
|
|
21066
|
+
}
|
|
21067
|
+
// \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/reference/sections/Page.module.css.mjs
|
|
21068
|
+
const css$6 = ".rp_bG1sCa_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:24px 0;font-size:13px;line-height:20px}.rp_bG1sCa_list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.rp_bG1sCa_entry{border-bottom:.5px solid var(--dsw-alias-border-l3);padding:10px 0}.rp_bG1sCa_entry:last-child{border-bottom:none}.rp_bG1sCa_head{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.rp_bG1sCa_name{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_bG1sCa_tag{color:var(--dsw-alias-state-business-primary);font-size:12px}.rp_bG1sCa_sub{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_bG1sCa_text{color:var(--dsw-alias-label-secondary);margin:4px 0 0;font-size:13px;line-height:20px}.rp_bG1sCa_meta{color:var(--dsw-alias-label-tertiary);margin:4px 0 0;font-size:12px;line-height:18px}.rp_bG1sCa_block{margin-top:16px}.rp_bG1sCa_heading{color:var(--dsw-alias-label-tertiary);margin:0 0 4px;font-size:12px;font-weight:500}.rp_bG1sCa_title{color:var(--dsw-alias-label-primary);font-size:16px;font-weight:500;line-height:24px}.rp_bG1sCa_link{font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;padding:0;font-size:14px;font-weight:500}.rp_bG1sCa_link:hover{color:var(--dsw-alias-state-business-primary)}.rp_bG1sCa_opened{border-left:.5px solid var(--dsw-alias-border-l3);margin-top:8px;padding:4px 0 4px 12px}.rp_bG1sCa_map{padding:8px 0;overflow-x:auto}.rp_bG1sCa_way{stroke:var(--dsw-alias-border-l4);stroke-width:1px}.rp_bG1sCa_closedWay{stroke:var(--dsw-alias-border-l4);stroke-width:1px;stroke-dasharray:3 3}.rp_bG1sCa_place{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l4);stroke-width:.5px}.rp_bG1sCa_here{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-state-business-primary);stroke-width:1.5px}.rp_bG1sCa_placeName{fill:var(--dsw-alias-label-primary);font-size:12px}.rp_bG1sCa_journal{flex-direction:column;gap:6px;height:100%;display:flex}.rp_bG1sCa_notes{box-sizing:border-box;width:100%;min-height:220px;font:inherit;resize:vertical;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex:none;padding:8px;font-size:13px;line-height:20px}";
|
|
21069
|
+
const key$6 = "src/client/reference/sections/Page.module.css";
|
|
21070
|
+
let tag$6 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$6) + "]");
|
|
21071
|
+
if (tag$6 === null) {
|
|
21072
|
+
tag$6 = document.createElement("style");
|
|
21073
|
+
tag$6.dataset.plugin = "@dsh-agentic-roleplay/core";
|
|
21074
|
+
tag$6.dataset.pluginCss = key$6;
|
|
21075
|
+
document.head.appendChild(tag$6);
|
|
21076
|
+
}
|
|
21077
|
+
tag$6.textContent = css$6;
|
|
21078
|
+
var Page_module_css_default = {
|
|
21079
|
+
"heading": "rp_bG1sCa_heading",
|
|
21080
|
+
"entry": "rp_bG1sCa_entry",
|
|
21081
|
+
"head": "rp_bG1sCa_head",
|
|
21082
|
+
"name": "rp_bG1sCa_name",
|
|
21083
|
+
"message": "rp_bG1sCa_message",
|
|
21084
|
+
"sub": "rp_bG1sCa_sub",
|
|
21085
|
+
"tag": "rp_bG1sCa_tag",
|
|
21086
|
+
"block": "rp_bG1sCa_block",
|
|
21087
|
+
"closedWay": "rp_bG1sCa_closedWay",
|
|
21088
|
+
"journal": "rp_bG1sCa_journal",
|
|
21089
|
+
"map": "rp_bG1sCa_map",
|
|
21090
|
+
"placeName": "rp_bG1sCa_placeName",
|
|
21091
|
+
"text": "rp_bG1sCa_text",
|
|
21092
|
+
"title": "rp_bG1sCa_title",
|
|
21093
|
+
"meta": "rp_bG1sCa_meta",
|
|
21094
|
+
"place": "rp_bG1sCa_place",
|
|
21095
|
+
"way": "rp_bG1sCa_way",
|
|
21096
|
+
"opened": "rp_bG1sCa_opened",
|
|
21097
|
+
"link": "rp_bG1sCa_link",
|
|
21098
|
+
"notes": "rp_bG1sCa_notes",
|
|
21099
|
+
"list": "rp_bG1sCa_list",
|
|
21100
|
+
"here": "rp_bG1sCa_here"
|
|
21101
|
+
};
|
|
21102
|
+
// src/client/reference/sections/Journal.tsx
|
|
21103
|
+
/** How long typing pauses before the notes are saved. */
|
|
21104
|
+
const SAVE_AFTER_MS = 1e3;
|
|
21105
|
+
/** The player's own notes: written here, kept with the story, never read by the story. */
|
|
21106
|
+
function JournalPage({ t, sessionId, visible }) {
|
|
21107
|
+
const session = roleplaySessionOf(sessionId);
|
|
21108
|
+
const [text, setText] = (0, react.useState)("");
|
|
21109
|
+
const [loaded, setLoaded] = (0, react.useState)(false);
|
|
21110
|
+
const [saving, setSaving] = (0, react.useState)("saved");
|
|
21111
|
+
const [error, setError] = (0, react.useState)();
|
|
21112
|
+
const pending = (0, react.useRef)(void 0);
|
|
21113
|
+
const currentSession = (0, react.useRef)(session);
|
|
21114
|
+
const saveSequence = (0, react.useRef)(0);
|
|
21115
|
+
const flush = () => {
|
|
21116
|
+
const waiting = pending.current;
|
|
21117
|
+
if (waiting === void 0) return;
|
|
21118
|
+
window.clearTimeout(waiting.timer);
|
|
21119
|
+
pending.current = void 0;
|
|
21120
|
+
setSaving("saving");
|
|
21121
|
+
const sequence = ++saveSequence.current;
|
|
21122
|
+
saveJournal(waiting.session, waiting.text).then(() => {
|
|
21123
|
+
if (sequence === saveSequence.current) setSaving(pending.current === void 0 ? "saved" : "unsaved");
|
|
21124
|
+
}, (failure) => {
|
|
21125
|
+
if (sequence === saveSequence.current) setSaving({ failed: failure instanceof Error ? failure.message : String(failure) });
|
|
21126
|
+
});
|
|
21127
|
+
};
|
|
21128
|
+
const flushRef = (0, react.useRef)(flush);
|
|
21129
|
+
flushRef.current = flush;
|
|
21130
|
+
(0, react.useEffect)(() => {
|
|
21131
|
+
if (currentSession.current === session) return;
|
|
21132
|
+
flushRef.current();
|
|
21133
|
+
saveSequence.current += 1;
|
|
21134
|
+
currentSession.current = session;
|
|
21135
|
+
setText("");
|
|
21136
|
+
setLoaded(false);
|
|
21137
|
+
setSaving("saved");
|
|
21138
|
+
setError(void 0);
|
|
21139
|
+
}, [session]);
|
|
21140
|
+
(0, react.useEffect)(() => {
|
|
21141
|
+
if (session === void 0 || !visible || loaded) return void 0;
|
|
21142
|
+
const abort = new AbortController();
|
|
21143
|
+
loadJournal(session, abort.signal).then((journal) => {
|
|
21144
|
+
setText(journal.text);
|
|
21145
|
+
setLoaded(true);
|
|
21146
|
+
}, (failure) => {
|
|
21147
|
+
if (!abort.signal.aborted) setError(failure instanceof Error ? failure.message : String(failure));
|
|
21148
|
+
});
|
|
21149
|
+
return () => {
|
|
21150
|
+
abort.abort();
|
|
21151
|
+
};
|
|
21152
|
+
}, [
|
|
21153
|
+
session,
|
|
21154
|
+
visible,
|
|
21155
|
+
loaded
|
|
21156
|
+
]);
|
|
21157
|
+
(0, react.useEffect)(() => () => {
|
|
21158
|
+
flushRef.current();
|
|
21159
|
+
}, []);
|
|
21160
|
+
if (error !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21161
|
+
className: Page_module_css_default.message,
|
|
21162
|
+
role: "alert",
|
|
21163
|
+
children: t("failed", { message: error })
|
|
21164
|
+
});
|
|
21165
|
+
if (!loaded) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21166
|
+
className: Page_module_css_default.message,
|
|
21167
|
+
children: t("loading")
|
|
21168
|
+
});
|
|
21169
|
+
const edit = (value) => {
|
|
21170
|
+
setText(value);
|
|
21171
|
+
setSaving("unsaved");
|
|
21172
|
+
if (pending.current !== void 0) window.clearTimeout(pending.current.timer);
|
|
21173
|
+
if (session !== void 0) pending.current = {
|
|
21174
|
+
session,
|
|
21175
|
+
text: value,
|
|
21176
|
+
timer: window.setTimeout(flush, SAVE_AFTER_MS)
|
|
21177
|
+
};
|
|
21178
|
+
};
|
|
21179
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21180
|
+
className: Page_module_css_default.journal,
|
|
21181
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
21182
|
+
className: Page_module_css_default.notes,
|
|
21183
|
+
value: text,
|
|
21184
|
+
maxLength: MAX_JOURNAL,
|
|
21185
|
+
placeholder: t("journalHint"),
|
|
21186
|
+
"aria-label": t("journal"),
|
|
21187
|
+
onChange: (event) => {
|
|
21188
|
+
edit(event.target.value);
|
|
21189
|
+
},
|
|
21190
|
+
onBlur: flush
|
|
21191
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21192
|
+
className: Page_module_css_default.meta,
|
|
21193
|
+
role: "status",
|
|
21194
|
+
children: typeof saving === "object" ? t("saveFailed", { message: saving.failed }) : t(saving === "saved" ? "savedNotes" : saving === "saving" ? "savingNotes" : "unsavedNotes")
|
|
21195
|
+
})]
|
|
21196
|
+
});
|
|
21197
|
+
}
|
|
21198
|
+
const GAP_X = 40;
|
|
21199
|
+
const GAP_Y = 14;
|
|
21200
|
+
const PAD = 8;
|
|
21201
|
+
/**
|
|
21202
|
+
* Places in columns by how many ways they are from where the player is, so the map reads outward from the player's place.
|
|
21203
|
+
* Ways count in both directions; places no known way reaches are set in the columns after the last reachable one.
|
|
21204
|
+
*/
|
|
21205
|
+
function layoutMap(places, routes) {
|
|
21206
|
+
const keys = new Set(places.map((place) => place.key));
|
|
21207
|
+
const links = /* @__PURE__ */ new Map();
|
|
21208
|
+
for (const route of routes) {
|
|
21209
|
+
if (!keys.has(route.from) || !keys.has(route.to) || route.from === route.to) continue;
|
|
21210
|
+
const id = [route.from, route.to].sort((left, right) => left.localeCompare(right)).join("\n");
|
|
21211
|
+
const known = links.get(id);
|
|
21212
|
+
links.set(id, {
|
|
21213
|
+
from: route.from,
|
|
21214
|
+
to: route.to,
|
|
21215
|
+
open: route.open || known?.open === true
|
|
21216
|
+
});
|
|
21217
|
+
}
|
|
21218
|
+
const next = new Map(places.map((place) => [place.key, []]));
|
|
21219
|
+
for (const link of links.values()) {
|
|
21220
|
+
next.get(link.from)?.push(link.to);
|
|
21221
|
+
next.get(link.to)?.push(link.from);
|
|
21222
|
+
}
|
|
21223
|
+
const depth = /* @__PURE__ */ new Map();
|
|
21224
|
+
const walk = (start, from) => {
|
|
21225
|
+
depth.set(start, from);
|
|
21226
|
+
for (let queue = [start]; queue.length > 0;) {
|
|
21227
|
+
const following = [];
|
|
21228
|
+
for (const key of queue) for (const other of next.get(key) ?? []) if (!depth.has(other)) {
|
|
21229
|
+
depth.set(other, (depth.get(key) ?? 0) + 1);
|
|
21230
|
+
following.push(other);
|
|
21231
|
+
}
|
|
21232
|
+
queue = following;
|
|
21233
|
+
}
|
|
21234
|
+
};
|
|
21235
|
+
const origin = places.find((place) => place.here) ?? places[0];
|
|
21236
|
+
if (origin !== void 0) walk(origin.key, 0);
|
|
21237
|
+
for (const place of places) if (!depth.has(place.key)) walk(place.key, Math.max(-1, ...depth.values()) + 1);
|
|
21238
|
+
const rows = /* @__PURE__ */ new Map();
|
|
21239
|
+
return {
|
|
21240
|
+
nodes: places.map((place) => {
|
|
21241
|
+
const column = depth.get(place.key) ?? 0;
|
|
21242
|
+
const row = rows.get(column) ?? 0;
|
|
21243
|
+
rows.set(column, row + 1);
|
|
21244
|
+
return {
|
|
21245
|
+
key: place.key,
|
|
21246
|
+
x: PAD + column * 200,
|
|
21247
|
+
y: PAD + row * 42
|
|
21248
|
+
};
|
|
21249
|
+
}),
|
|
21250
|
+
links: [...links.values()],
|
|
21251
|
+
width: 16 + (Math.max(0, ...depth.values()) + 1) * 160 + Math.max(0, ...depth.values()) * GAP_X,
|
|
21252
|
+
height: 16 + Math.max(1, ...rows.values()) * 28 + (Math.max(1, ...rows.values()) - 1) * GAP_Y
|
|
21253
|
+
};
|
|
21254
|
+
}
|
|
21255
|
+
const LABEL_UNITS = 22;
|
|
21256
|
+
/** A place's name cut to fit its box; a character of CJK script is as wide as two of any other. */
|
|
21257
|
+
function fitLabel(name) {
|
|
21258
|
+
let used = 0;
|
|
21259
|
+
let out = "";
|
|
21260
|
+
for (const character of name) {
|
|
21261
|
+
used += /[\u2e80-\u9fff\uff00-\uffef]/.test(character) ? 2 : 1;
|
|
21262
|
+
if (used > LABEL_UNITS) return `${out.trimEnd()}…`;
|
|
21263
|
+
out += character;
|
|
21264
|
+
}
|
|
21265
|
+
return out;
|
|
21266
|
+
}
|
|
21267
|
+
// src/client/reference/use-reference.ts
|
|
21268
|
+
/** How often a page on screen reads again: the story moves with every turn. */
|
|
21269
|
+
const REFRESH_MS = 8e3;
|
|
21270
|
+
/** A page's entries, read when it is shown and again while it stays on screen. */
|
|
21271
|
+
function useReference(chat, section, visible, character) {
|
|
21272
|
+
const session = roleplaySessionOf(chat);
|
|
21273
|
+
const identity = `${session ?? ""}\0${section}\0${character ?? ""}`;
|
|
21274
|
+
const [result, setResult] = (0, react.useState)({
|
|
21275
|
+
identity,
|
|
21276
|
+
reading: { state: "loading" }
|
|
21277
|
+
});
|
|
21278
|
+
const reading = result.identity === identity ? result.reading : { state: "loading" };
|
|
21279
|
+
const [tick, setTick] = (0, react.useState)(0);
|
|
21280
|
+
(0, react.useEffect)(() => {
|
|
21281
|
+
if (session === void 0 || !visible) return void 0;
|
|
21282
|
+
const abort = new AbortController();
|
|
21283
|
+
loadReference(session, section, abort.signal, character).then((reply) => {
|
|
21284
|
+
setResult({
|
|
21285
|
+
identity,
|
|
21286
|
+
reading: {
|
|
21287
|
+
state: "ready",
|
|
21288
|
+
entries: reply.entries
|
|
21289
|
+
}
|
|
21290
|
+
});
|
|
21291
|
+
}, (failure) => {
|
|
21292
|
+
if (!abort.signal.aborted) setResult({
|
|
21293
|
+
identity,
|
|
21294
|
+
reading: {
|
|
21295
|
+
state: "failed",
|
|
21296
|
+
message: failure instanceof Error ? failure.message : String(failure)
|
|
21297
|
+
}
|
|
21298
|
+
});
|
|
21299
|
+
});
|
|
21300
|
+
const timer = window.setTimeout(() => {
|
|
21301
|
+
setTick((count) => count + 1);
|
|
21302
|
+
}, REFRESH_MS);
|
|
21303
|
+
return () => {
|
|
21304
|
+
window.clearTimeout(timer);
|
|
21305
|
+
abort.abort();
|
|
21306
|
+
};
|
|
21307
|
+
}, [
|
|
21308
|
+
session,
|
|
21309
|
+
section,
|
|
21310
|
+
visible,
|
|
21311
|
+
tick,
|
|
21312
|
+
character
|
|
21313
|
+
]);
|
|
21314
|
+
return {
|
|
21315
|
+
reading,
|
|
21316
|
+
refresh: (0, react.useCallback)(() => {
|
|
21317
|
+
setTick((count) => count + 1);
|
|
21318
|
+
}, [])
|
|
21319
|
+
};
|
|
21320
|
+
}
|
|
21321
|
+
// src/client/reference/sections/Page.tsx
|
|
21322
|
+
/** The frame every page of the reference shares: loading, failure and nothing-yet look the same. */
|
|
21323
|
+
function Page({ reading, empty, failed, loading, children, className }) {
|
|
21324
|
+
if (reading.state === "loading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21325
|
+
className,
|
|
21326
|
+
children: loading
|
|
21327
|
+
});
|
|
21328
|
+
if (reading.state === "failed") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21329
|
+
className,
|
|
21330
|
+
role: "alert",
|
|
21331
|
+
children: failed(reading.message)
|
|
21332
|
+
});
|
|
21333
|
+
return reading.entries.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21334
|
+
className,
|
|
21335
|
+
children: empty
|
|
21336
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: children(reading.entries) });
|
|
21337
|
+
}
|
|
21338
|
+
// src/client/reference/sections/Map.tsx
|
|
21339
|
+
/** The places the player's character knows, set out from where they are by how many ways away each is. */
|
|
21340
|
+
function MapPage({ t, sessionId, visible }) {
|
|
21341
|
+
const { reading } = useReference(sessionId, "places", visible);
|
|
21342
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21343
|
+
reading,
|
|
21344
|
+
className: Page_module_css_default.message ?? "",
|
|
21345
|
+
loading: t("loading"),
|
|
21346
|
+
failed: (message) => t("failed", { message }),
|
|
21347
|
+
empty: t("noPlaces"),
|
|
21348
|
+
children: (places) => {
|
|
21349
|
+
const layout = layoutMap(places, places.flatMap((place) => place.ways.map((way) => ({
|
|
21350
|
+
from: place.key,
|
|
21351
|
+
to: way.toKey,
|
|
21352
|
+
open: way.open
|
|
21353
|
+
}))));
|
|
21354
|
+
const byKey = new Map(places.map((place) => [place.key, place]));
|
|
21355
|
+
const at = new Map(layout.nodes.map((node) => [node.key, node]));
|
|
21356
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21357
|
+
className: Page_module_css_default.map,
|
|
21358
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
21359
|
+
width: layout.width,
|
|
21360
|
+
height: layout.height,
|
|
21361
|
+
role: "img",
|
|
21362
|
+
"aria-label": t("map"),
|
|
21363
|
+
children: [layout.links.map((link) => {
|
|
21364
|
+
const from = at.get(link.from);
|
|
21365
|
+
const to = at.get(link.to);
|
|
21366
|
+
if (from === void 0 || to === void 0) return null;
|
|
21367
|
+
const forward = from.x <= to.x;
|
|
21368
|
+
const x1 = from.x + (forward ? 160 : 0);
|
|
21369
|
+
const x2 = to.x + (forward ? 0 : 160);
|
|
21370
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
|
|
21371
|
+
className: link.open ? Page_module_css_default.way : Page_module_css_default.closedWay,
|
|
21372
|
+
x1: from.x === to.x ? from.x + 80 : x1,
|
|
21373
|
+
y1: from.y + 14,
|
|
21374
|
+
x2: from.x === to.x ? to.x + 80 : x2,
|
|
21375
|
+
y2: to.y + 14
|
|
21376
|
+
}, `${link.from}-${link.to}`);
|
|
21377
|
+
}), layout.nodes.map((node) => {
|
|
21378
|
+
const place = byKey.get(node.key);
|
|
21379
|
+
if (place === void 0) return null;
|
|
21380
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
|
|
21381
|
+
transform: `translate(${node.x} ${node.y})`,
|
|
21382
|
+
children: [
|
|
21383
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("title", { children: place.name }),
|
|
21384
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
21385
|
+
className: place.here ? Page_module_css_default.here : Page_module_css_default.place,
|
|
21386
|
+
width: 160,
|
|
21387
|
+
height: 28,
|
|
21388
|
+
rx: 6
|
|
21389
|
+
}),
|
|
21390
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
21391
|
+
className: Page_module_css_default.placeName,
|
|
21392
|
+
x: 80,
|
|
21393
|
+
y: 14,
|
|
21394
|
+
textAnchor: "middle",
|
|
21395
|
+
dominantBaseline: "central",
|
|
21396
|
+
children: fitLabel(place.name)
|
|
21397
|
+
})
|
|
21398
|
+
]
|
|
21399
|
+
}, node.key);
|
|
21400
|
+
})]
|
|
21401
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21402
|
+
className: Page_module_css_default.meta,
|
|
21403
|
+
children: t("mapHint")
|
|
21404
|
+
})]
|
|
21405
|
+
});
|
|
21406
|
+
}
|
|
21407
|
+
});
|
|
21408
|
+
}
|
|
21409
|
+
// src/client/reference/sections/sections.tsx
|
|
21410
|
+
const unit = (count) => count === 1 ? "" : ` ×${count}`;
|
|
21411
|
+
function PeoplePage({ t, sessionId, visible }) {
|
|
21412
|
+
const { reading } = useReference(sessionId, "people", visible);
|
|
21413
|
+
const [open, setOpen] = (0, react.useState)();
|
|
21414
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21415
|
+
reading,
|
|
21416
|
+
className: Page_module_css_default.message ?? "",
|
|
21417
|
+
loading: t("loading"),
|
|
21418
|
+
failed: (message) => t("failed", { message }),
|
|
21419
|
+
empty: t("noPeople"),
|
|
21420
|
+
children: (people) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21421
|
+
className: Page_module_css_default.list,
|
|
21422
|
+
children: people.map((person) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21423
|
+
className: Page_module_css_default.entry,
|
|
21424
|
+
children: [
|
|
21425
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21426
|
+
className: Page_module_css_default.head,
|
|
21427
|
+
children: [
|
|
21428
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
21429
|
+
type: "button",
|
|
21430
|
+
className: Page_module_css_default.link,
|
|
21431
|
+
"aria-expanded": open === person.key,
|
|
21432
|
+
onClick: () => {
|
|
21433
|
+
setOpen(open === person.key ? void 0 : person.key);
|
|
21434
|
+
},
|
|
21435
|
+
children: person.name
|
|
21436
|
+
}),
|
|
21437
|
+
person.label !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21438
|
+
className: Page_module_css_default.sub,
|
|
21439
|
+
children: person.label
|
|
21440
|
+
}),
|
|
21441
|
+
person.here && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21442
|
+
className: Page_module_css_default.tag,
|
|
21443
|
+
children: t("here")
|
|
21444
|
+
})
|
|
21445
|
+
]
|
|
21446
|
+
}),
|
|
21447
|
+
person.publicState !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21448
|
+
className: Page_module_css_default.text,
|
|
21449
|
+
children: person.publicState
|
|
21450
|
+
}),
|
|
21451
|
+
person.summary !== void 0 && person.summary !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21452
|
+
className: Page_module_css_default.meta,
|
|
21453
|
+
children: person.summary
|
|
21454
|
+
}),
|
|
21455
|
+
open === person.key && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21456
|
+
className: Page_module_css_default.opened,
|
|
21457
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Observed, {
|
|
21458
|
+
t,
|
|
21459
|
+
sessionId,
|
|
21460
|
+
character: person.key
|
|
21461
|
+
})
|
|
21462
|
+
})
|
|
21463
|
+
]
|
|
21464
|
+
}, person.key))
|
|
21465
|
+
})
|
|
21466
|
+
});
|
|
21467
|
+
}
|
|
21468
|
+
function PlacesPage({ t, sessionId, visible }) {
|
|
21469
|
+
const { reading } = useReference(sessionId, "places", visible);
|
|
21470
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21471
|
+
reading,
|
|
21472
|
+
className: Page_module_css_default.message ?? "",
|
|
21473
|
+
loading: t("loading"),
|
|
21474
|
+
failed: (message) => t("failed", { message }),
|
|
21475
|
+
empty: t("noPlaces"),
|
|
21476
|
+
children: (places) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21477
|
+
className: Page_module_css_default.list,
|
|
21478
|
+
children: places.map((place) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21479
|
+
className: Page_module_css_default.entry,
|
|
21480
|
+
children: [
|
|
21481
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21482
|
+
className: Page_module_css_default.head,
|
|
21483
|
+
children: [
|
|
21484
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21485
|
+
className: Page_module_css_default.name,
|
|
21486
|
+
children: place.name
|
|
21487
|
+
}),
|
|
21488
|
+
place.parent !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21489
|
+
className: Page_module_css_default.sub,
|
|
21490
|
+
children: t("inside", { place: place.parent })
|
|
21491
|
+
}),
|
|
21492
|
+
place.here && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21493
|
+
className: Page_module_css_default.tag,
|
|
21494
|
+
children: t("youAreHere")
|
|
21495
|
+
})
|
|
21496
|
+
]
|
|
21497
|
+
}),
|
|
21498
|
+
place.description !== void 0 && place.description !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21499
|
+
className: Page_module_css_default.text,
|
|
21500
|
+
children: place.description
|
|
21501
|
+
}),
|
|
21502
|
+
place.features.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21503
|
+
className: Page_module_css_default.meta,
|
|
21504
|
+
children: t("features", { list: place.features.join(", ") })
|
|
21505
|
+
}),
|
|
21506
|
+
place.ways.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21507
|
+
className: Page_module_css_default.meta,
|
|
21508
|
+
children: t("ways", { list: place.ways.map((way) => way.open ? way.to : t("closedWay", { place: way.to })).join(", ") })
|
|
21509
|
+
})
|
|
21510
|
+
]
|
|
21511
|
+
}, place.key))
|
|
21512
|
+
})
|
|
21513
|
+
});
|
|
21514
|
+
}
|
|
21515
|
+
function ThingsPage({ t, sessionId, visible }) {
|
|
21516
|
+
const { reading } = useReference(sessionId, "things", visible);
|
|
21517
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21518
|
+
reading,
|
|
21519
|
+
className: Page_module_css_default.message ?? "",
|
|
21520
|
+
loading: t("loading"),
|
|
21521
|
+
failed: (message) => t("failed", { message }),
|
|
21522
|
+
empty: t("noThings"),
|
|
21523
|
+
children: (things) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21524
|
+
className: Page_module_css_default.list,
|
|
21525
|
+
children: things.map((thing, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
21526
|
+
className: Page_module_css_default.entry,
|
|
21527
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21528
|
+
className: Page_module_css_default.head,
|
|
21529
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
21530
|
+
className: Page_module_css_default.name,
|
|
21531
|
+
children: [thing.name, unit(thing.quantity)]
|
|
21532
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21533
|
+
className: Page_module_css_default.sub,
|
|
21534
|
+
children: t(thing.where === "here" ? "lyingHere" : thing.where === "worn" ? "worn" : "carried")
|
|
21535
|
+
})]
|
|
21536
|
+
})
|
|
21537
|
+
}, `${thing.where}-${thing.name}-${index}`))
|
|
21538
|
+
})
|
|
21539
|
+
});
|
|
21540
|
+
}
|
|
21541
|
+
function Block({ title, children }) {
|
|
21542
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
21543
|
+
className: Page_module_css_default.block,
|
|
21544
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
21545
|
+
className: Page_module_css_default.heading,
|
|
21546
|
+
children: title
|
|
21547
|
+
}), children]
|
|
21548
|
+
});
|
|
21549
|
+
}
|
|
21550
|
+
/** A character as the audience may see them: the blocks the host left out are simply absent. */
|
|
21551
|
+
function ProfileCard({ profile, t, named = true }) {
|
|
21552
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
21553
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21554
|
+
className: Page_module_css_default.head,
|
|
21555
|
+
children: [named && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21556
|
+
className: Page_module_css_default.title,
|
|
21557
|
+
children: profile.name
|
|
21558
|
+
}), [
|
|
21559
|
+
profile.pronouns,
|
|
21560
|
+
profile.gender,
|
|
21561
|
+
profile.age
|
|
21562
|
+
].filter((part) => part !== void 0 && part !== "").map((part) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21563
|
+
className: Page_module_css_default.sub,
|
|
21564
|
+
children: part
|
|
21565
|
+
}, part))]
|
|
21566
|
+
}),
|
|
21567
|
+
profile.aliases.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21568
|
+
className: Page_module_css_default.meta,
|
|
21569
|
+
children: t("aliases", { list: profile.aliases.join(", ") })
|
|
21570
|
+
}),
|
|
21571
|
+
profile.summary !== void 0 && profile.summary !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21572
|
+
className: Page_module_css_default.text,
|
|
21573
|
+
children: profile.summary
|
|
21574
|
+
}),
|
|
21575
|
+
(profile.publicState !== "" || (profile.activity ?? "") !== "" || (profile.innerState ?? "") !== "") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Block, {
|
|
21576
|
+
title: t("now"),
|
|
21577
|
+
children: [
|
|
21578
|
+
profile.publicState !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21579
|
+
className: Page_module_css_default.text,
|
|
21580
|
+
children: profile.publicState
|
|
21581
|
+
}),
|
|
21582
|
+
(profile.activity ?? "") !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
21583
|
+
className: Page_module_css_default.meta,
|
|
21584
|
+
children: [
|
|
21585
|
+
t("doing"),
|
|
21586
|
+
": ",
|
|
21587
|
+
profile.activity
|
|
21588
|
+
]
|
|
21589
|
+
}),
|
|
21590
|
+
(profile.innerState ?? "") !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
21591
|
+
className: Page_module_css_default.meta,
|
|
21592
|
+
children: [
|
|
21593
|
+
t("feeling"),
|
|
21594
|
+
": ",
|
|
21595
|
+
profile.innerState
|
|
21596
|
+
]
|
|
21597
|
+
})
|
|
21598
|
+
]
|
|
21599
|
+
}),
|
|
21600
|
+
profile.appearance !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21601
|
+
title: t("appearance"),
|
|
21602
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21603
|
+
className: Page_module_css_default.text,
|
|
21604
|
+
children: profile.appearance
|
|
21605
|
+
})
|
|
21606
|
+
}),
|
|
21607
|
+
(profile.personality ?? "") !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21608
|
+
title: t("personality"),
|
|
21609
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21610
|
+
className: Page_module_css_default.text,
|
|
21611
|
+
children: profile.personality
|
|
21612
|
+
})
|
|
21613
|
+
}),
|
|
21614
|
+
(profile.background ?? "") !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21615
|
+
title: t("background"),
|
|
21616
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21617
|
+
className: Page_module_css_default.text,
|
|
21618
|
+
children: profile.background
|
|
21619
|
+
})
|
|
21620
|
+
}),
|
|
21621
|
+
profile.speech !== void 0 && (profile.speech.style !== "" || profile.speech.examples.length > 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Block, {
|
|
21622
|
+
title: t("speech"),
|
|
21623
|
+
children: [profile.speech.style !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21624
|
+
className: Page_module_css_default.text,
|
|
21625
|
+
children: profile.speech.style
|
|
21626
|
+
}), profile.speech.examples.map((example) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
21627
|
+
className: Page_module_css_default.meta,
|
|
21628
|
+
children: [
|
|
21629
|
+
"“",
|
|
21630
|
+
example,
|
|
21631
|
+
"”"
|
|
21632
|
+
]
|
|
21633
|
+
}, example))]
|
|
21634
|
+
}),
|
|
21635
|
+
profile.values.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21636
|
+
title: t("values"),
|
|
21637
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21638
|
+
className: Page_module_css_default.list,
|
|
21639
|
+
children: profile.values.map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21640
|
+
className: Page_module_css_default.text,
|
|
21641
|
+
children: [
|
|
21642
|
+
value.name,
|
|
21643
|
+
": ",
|
|
21644
|
+
value.value
|
|
21645
|
+
]
|
|
21646
|
+
}, value.name))
|
|
21647
|
+
})
|
|
21648
|
+
}),
|
|
21649
|
+
(profile.goals ?? []).length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21650
|
+
title: t("goals"),
|
|
21651
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21652
|
+
className: Page_module_css_default.list,
|
|
21653
|
+
children: (profile.goals ?? []).map((goal) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21654
|
+
className: Page_module_css_default.entry,
|
|
21655
|
+
children: [
|
|
21656
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21657
|
+
className: Page_module_css_default.name,
|
|
21658
|
+
children: goal.name
|
|
21659
|
+
}),
|
|
21660
|
+
goal.deadline !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
21661
|
+
className: Page_module_css_default.sub,
|
|
21662
|
+
children: [" ", t("deadline", { when: goal.deadline })]
|
|
21663
|
+
}),
|
|
21664
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21665
|
+
className: Page_module_css_default.text,
|
|
21666
|
+
children: goal.description
|
|
21667
|
+
}),
|
|
21668
|
+
goal.plan.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21669
|
+
className: Page_module_css_default.meta,
|
|
21670
|
+
children: goal.plan.join(" → ")
|
|
21671
|
+
})
|
|
21672
|
+
]
|
|
21673
|
+
}, goal.name))
|
|
21674
|
+
})
|
|
21675
|
+
}),
|
|
21676
|
+
(profile.groups ?? []).length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Block, {
|
|
21677
|
+
title: t("groups"),
|
|
21678
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21679
|
+
className: Page_module_css_default.list,
|
|
21680
|
+
children: (profile.groups ?? []).map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21681
|
+
className: Page_module_css_default.text,
|
|
21682
|
+
children: [
|
|
21683
|
+
group.name,
|
|
21684
|
+
" ",
|
|
21685
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21686
|
+
className: Page_module_css_default.sub,
|
|
21687
|
+
children: group.role
|
|
21688
|
+
})
|
|
21689
|
+
]
|
|
21690
|
+
}, group.name))
|
|
21691
|
+
})
|
|
21692
|
+
}),
|
|
21693
|
+
profile.beliefs !== void 0 && profile.totals !== void 0 && profile.beliefs.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Block, {
|
|
21694
|
+
title: t("beliefs", { count: profile.totals.beliefs }),
|
|
21695
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21696
|
+
className: Page_module_css_default.list,
|
|
21697
|
+
children: profile.beliefs.map((belief, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21698
|
+
className: Page_module_css_default.entry,
|
|
21699
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21700
|
+
className: Page_module_css_default.text,
|
|
21701
|
+
children: belief.text
|
|
21702
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
21703
|
+
className: Page_module_css_default.meta,
|
|
21704
|
+
children: [
|
|
21705
|
+
t(belief.confidence),
|
|
21706
|
+
" · ",
|
|
21707
|
+
t("turn", { turn: belief.turn })
|
|
21708
|
+
]
|
|
21709
|
+
})]
|
|
21710
|
+
}, index))
|
|
21711
|
+
}), profile.totals.beliefs > profile.beliefs.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21712
|
+
className: Page_module_css_default.meta,
|
|
21713
|
+
children: t("showing", {
|
|
21714
|
+
shown: profile.beliefs.length,
|
|
21715
|
+
count: profile.totals.beliefs
|
|
21716
|
+
})
|
|
21717
|
+
})]
|
|
21718
|
+
}),
|
|
21719
|
+
profile.recollections !== void 0 && profile.totals !== void 0 && profile.recollections.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Block, {
|
|
21720
|
+
title: t("recollections", { count: profile.totals.recollections }),
|
|
21721
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
21722
|
+
className: Page_module_css_default.list,
|
|
21723
|
+
children: profile.recollections.map((recollection, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
21724
|
+
className: Page_module_css_default.entry,
|
|
21725
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21726
|
+
className: Page_module_css_default.text,
|
|
21727
|
+
children: recollection.text
|
|
21728
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
21729
|
+
className: Page_module_css_default.meta,
|
|
21730
|
+
children: [
|
|
21731
|
+
t(recollection.mode),
|
|
21732
|
+
" · ",
|
|
21733
|
+
t("turn", { turn: recollection.turn })
|
|
21734
|
+
]
|
|
21735
|
+
})]
|
|
21736
|
+
}, index))
|
|
21737
|
+
}), profile.totals.recollections > profile.recollections.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21738
|
+
className: Page_module_css_default.meta,
|
|
21739
|
+
children: t("showing", {
|
|
21740
|
+
shown: profile.recollections.length,
|
|
21741
|
+
count: profile.totals.recollections
|
|
21742
|
+
})
|
|
21743
|
+
})]
|
|
21744
|
+
})
|
|
21745
|
+
] });
|
|
21746
|
+
}
|
|
21747
|
+
/** The player's own page: what they are, feel and want, and everything they remember. */
|
|
21748
|
+
function ProfilePage({ t, sessionId, visible }) {
|
|
21749
|
+
const { reading } = useReference(sessionId, "profile", visible);
|
|
21750
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21751
|
+
reading,
|
|
21752
|
+
className: Page_module_css_default.message ?? "",
|
|
21753
|
+
loading: t("loading"),
|
|
21754
|
+
failed: (message) => t("failed", { message }),
|
|
21755
|
+
empty: t("noProfile"),
|
|
21756
|
+
children: ([profile]) => profile === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileCard, {
|
|
21757
|
+
profile,
|
|
21758
|
+
t
|
|
21759
|
+
})
|
|
21760
|
+
});
|
|
21761
|
+
}
|
|
21762
|
+
/** Another character, as an observer sees them; read only while it is open. */
|
|
21763
|
+
function Observed({ t, sessionId, character }) {
|
|
21764
|
+
const { reading } = useReference(sessionId, "profile", true, character);
|
|
21765
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Page, {
|
|
21766
|
+
reading,
|
|
21767
|
+
className: Page_module_css_default.message ?? "",
|
|
21768
|
+
loading: t("loading"),
|
|
21769
|
+
failed: (message) => t("failed", { message }),
|
|
21770
|
+
empty: t("noProfile"),
|
|
21771
|
+
children: ([profile]) => profile === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfileCard, {
|
|
21772
|
+
profile,
|
|
21773
|
+
t,
|
|
21774
|
+
named: false
|
|
21775
|
+
})
|
|
21776
|
+
});
|
|
21777
|
+
}
|
|
21778
|
+
// src/client/reference/index.ts
|
|
21779
|
+
const NAMESPACE$4 = "roleplay.reference";
|
|
21780
|
+
/**
|
|
21781
|
+
* The reference: a page of the right sidebar with what the player may look up beside the story. Its pages are entries of
|
|
21782
|
+
* `roleplay.reference.section`, so a profile, a map, a journal or what the character remembers is one more registration.
|
|
21783
|
+
*/
|
|
21784
|
+
function registerReference(ctx) {
|
|
20255
21785
|
const t = ctx.locale.bind(NAMESPACE$4);
|
|
20256
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$4, dictionaries$
|
|
20257
|
-
ctx.
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
21786
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$4, dictionaries$4), "roleplay: reference dictionaries");
|
|
21787
|
+
const sections = createSlotList(ctx, "roleplay.reference.section");
|
|
21788
|
+
ctx.effect(() => sections.start(), "roleplay: reference page list");
|
|
21789
|
+
const pages = [
|
|
21790
|
+
{
|
|
21791
|
+
id: "profile",
|
|
21792
|
+
order: 5,
|
|
21793
|
+
label: "profile",
|
|
21794
|
+
component: ProfilePage
|
|
21795
|
+
},
|
|
21796
|
+
{
|
|
21797
|
+
id: "people",
|
|
21798
|
+
order: 10,
|
|
21799
|
+
label: "people",
|
|
21800
|
+
component: PeoplePage
|
|
21801
|
+
},
|
|
21802
|
+
{
|
|
21803
|
+
id: "places",
|
|
21804
|
+
order: 20,
|
|
21805
|
+
label: "places",
|
|
21806
|
+
component: PlacesPage
|
|
21807
|
+
},
|
|
21808
|
+
{
|
|
21809
|
+
id: "map",
|
|
21810
|
+
order: 25,
|
|
21811
|
+
label: "map",
|
|
21812
|
+
component: MapPage
|
|
21813
|
+
},
|
|
21814
|
+
{
|
|
21815
|
+
id: "things",
|
|
21816
|
+
order: 30,
|
|
21817
|
+
label: "things",
|
|
21818
|
+
component: ThingsPage
|
|
21819
|
+
},
|
|
21820
|
+
{
|
|
21821
|
+
id: "journal",
|
|
21822
|
+
order: 40,
|
|
21823
|
+
label: "journal",
|
|
21824
|
+
component: JournalPage
|
|
21825
|
+
}
|
|
21826
|
+
];
|
|
21827
|
+
for (const page of pages) ctx.slots.inject("roleplay.reference.section", () => ctx.slots.register({
|
|
21828
|
+
name: "roleplay.reference.section",
|
|
21829
|
+
id: page.id,
|
|
21830
|
+
order: page.order,
|
|
21831
|
+
label: () => t(page.label),
|
|
21832
|
+
locale: NAMESPACE$4
|
|
21833
|
+
}, page.component));
|
|
21834
|
+
ctx.inject(["sidebarRight", "sidebarRightTabs"], (right) => {
|
|
21835
|
+
right.effect(() => right.sidebarRightTabs.register({
|
|
21836
|
+
id: REFERENCE_ID,
|
|
21837
|
+
kind: REFERENCE_KIND,
|
|
21838
|
+
keepMounted: true,
|
|
21839
|
+
title: () => t("tab"),
|
|
21840
|
+
guide: [{
|
|
21841
|
+
id: "reference",
|
|
21842
|
+
order: 30,
|
|
21843
|
+
title: () => t("title"),
|
|
21844
|
+
description: () => t("description"),
|
|
21845
|
+
icon: _deepseek_ai_dsh_client_ui_primitives.IconListPenOutlineRegular
|
|
21846
|
+
}]
|
|
21847
|
+
}), "roleplay: reference tab type");
|
|
21848
|
+
right.effect(() => right.slots.inject("sidebar.right.tab.guide.entry", () => right.slots.register({
|
|
21849
|
+
name: "sidebar.right.tab.guide.entry",
|
|
21850
|
+
key: REFERENCE_ID,
|
|
21851
|
+
locale: NAMESPACE$4,
|
|
21852
|
+
inject: (sessionId) => ({ sessionId })
|
|
21853
|
+
}, ReferenceGuide)), "roleplay: reference guide entry");
|
|
21854
|
+
right.effect(() => right.slots.inject("sidebar.right.pane.tab", () => right.slots.register({
|
|
21855
|
+
name: "sidebar.right.pane.tab",
|
|
21856
|
+
key: REFERENCE_ID,
|
|
20282
21857
|
locale: NAMESPACE$4,
|
|
20283
21858
|
inject: (sessionId) => ({
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
|
|
20290
|
-
|
|
20291
|
-
|
|
20292
|
-
kind: SIDEBAR_KIND,
|
|
20293
|
-
keepMounted: true,
|
|
20294
|
-
title: () => t("sidebarTitle"),
|
|
20295
|
-
guide: [{
|
|
20296
|
-
id: "page",
|
|
20297
|
-
order: 30,
|
|
20298
|
-
title: () => t("sidebarTitle"),
|
|
20299
|
-
description: () => t("sidebarDescription"),
|
|
20300
|
-
icon: _deepseek_ai_dsh_client_ui_primitives.IconGlobeOutlineRegular
|
|
20301
|
-
}]
|
|
20302
|
-
}), "roleplay: sidebar tab type");
|
|
20303
|
-
right.effect(() => right.slots.inject("sidebar.right.tab.guide.entry", () => right.slots.register({
|
|
20304
|
-
name: "sidebar.right.tab.guide.entry",
|
|
20305
|
-
key: SIDEBAR_ID,
|
|
20306
|
-
locale: NAMESPACE$4,
|
|
20307
|
-
inject: (sessionId) => ({ sessionId })
|
|
20308
|
-
}, SidebarGuide)), "roleplay: sidebar guide entry");
|
|
20309
|
-
right.effect(() => right.slots.inject("sidebar.right.pane.tab", () => right.slots.register({
|
|
20310
|
-
name: "sidebar.right.pane.tab",
|
|
20311
|
-
key: SIDEBAR_ID,
|
|
20312
|
-
locale: NAMESPACE$4,
|
|
20313
|
-
inject: (sessionId) => ({
|
|
20314
|
-
sessionId,
|
|
20315
|
-
frameInput: input(sessionId)
|
|
20316
|
-
})
|
|
20317
|
-
}, SidebarBody)), "roleplay: sidebar body");
|
|
20318
|
-
});
|
|
20319
|
-
let offered = false;
|
|
20320
|
-
availability().then((found) => {
|
|
20321
|
-
if (!found.tab || offered) return;
|
|
20322
|
-
offered = true;
|
|
20323
|
-
scope.uiConversation.views.register(target);
|
|
20324
|
-
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
20325
|
-
name: "conversation.view",
|
|
20326
|
-
id: VIEW_ID$2,
|
|
20327
|
-
order: 18,
|
|
20328
|
-
label: () => t("tab"),
|
|
20329
|
-
locale: NAMESPACE$4,
|
|
20330
|
-
inject: () => ({ frameInput: input })
|
|
20331
|
-
}, InterfaceTab));
|
|
20332
|
-
}).catch((error) => {
|
|
20333
|
-
console.warn("roleplay: the interface packs could not be looked up", error);
|
|
20334
|
-
});
|
|
21859
|
+
sessionId,
|
|
21860
|
+
hooks: { sections: sections.store }
|
|
21861
|
+
}),
|
|
21862
|
+
children: { "roleplay.reference.section": {
|
|
21863
|
+
kind: "list",
|
|
21864
|
+
scope: "root"
|
|
21865
|
+
} }
|
|
21866
|
+
}, ReferenceBody)), "roleplay: reference body");
|
|
20335
21867
|
});
|
|
20336
21868
|
}
|
|
20337
21869
|
// src/shared/authoring-chat.ts
|
|
@@ -20404,7 +21936,7 @@ window.__ModuleLoader__.load({
|
|
|
20404
21936
|
/** Adds the World tab beside Chat: the state of the story, by the part of the world. */
|
|
20405
21937
|
function registerWorld(ctx) {
|
|
20406
21938
|
const t = ctx.locale.bind(NAMESPACE$3);
|
|
20407
|
-
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$
|
|
21939
|
+
ctx.effect(() => ctx.locale.register(NAMESPACE$3, dictionaries$15), "roleplay: world dictionaries");
|
|
20408
21940
|
ctx.inject(["uiConversation"], (scope) => {
|
|
20409
21941
|
scope.uiConversation.views.register(worldTarget);
|
|
20410
21942
|
scope.slots.inject("conversation.view", () => scope.slots.register({
|
|
@@ -20429,27 +21961,27 @@ window.__ModuleLoader__.load({
|
|
|
20429
21961
|
tag$5.textContent = css$5;
|
|
20430
21962
|
var ChatSettingsView_module_css_default = {
|
|
20431
21963
|
"link": "rp_wLpbxW_link",
|
|
21964
|
+
"activity": "rp_wLpbxW_activity",
|
|
21965
|
+
"title": "rp_wLpbxW_title",
|
|
21966
|
+
"activityBody": "rp_wLpbxW_activityBody",
|
|
20432
21967
|
"run": "rp_wLpbxW_run",
|
|
20433
|
-
"
|
|
20434
|
-
"tableViewport": "rp_wLpbxW_tableViewport",
|
|
21968
|
+
"view": "rp_wLpbxW_view",
|
|
20435
21969
|
"select": "rp_wLpbxW_select",
|
|
21970
|
+
"list": "rp_wLpbxW_list",
|
|
20436
21971
|
"label": "rp_wLpbxW_label",
|
|
20437
|
-
"activity": "rp_wLpbxW_activity",
|
|
20438
21972
|
"description": "rp_wLpbxW_description",
|
|
20439
|
-
"
|
|
20440
|
-
"reasons": "rp_wLpbxW_reasons",
|
|
20441
|
-
"pre": "rp_wLpbxW_pre",
|
|
20442
|
-
"error": "rp_wLpbxW_error",
|
|
20443
|
-
"title": "rp_wLpbxW_title",
|
|
20444
|
-
"table": "rp_wLpbxW_table",
|
|
20445
|
-
"view": "rp_wLpbxW_view",
|
|
21973
|
+
"notice": "rp_wLpbxW_notice",
|
|
20446
21974
|
"row": "rp_wLpbxW_row",
|
|
20447
|
-
"
|
|
21975
|
+
"saved": "rp_wLpbxW_saved",
|
|
20448
21976
|
"field": "rp_wLpbxW_field",
|
|
20449
|
-
"
|
|
21977
|
+
"message": "rp_wLpbxW_message",
|
|
21978
|
+
"tableViewport": "rp_wLpbxW_tableViewport",
|
|
21979
|
+
"table": "rp_wLpbxW_table",
|
|
21980
|
+
"pre": "rp_wLpbxW_pre",
|
|
21981
|
+
"reasons": "rp_wLpbxW_reasons",
|
|
20450
21982
|
"help": "rp_wLpbxW_help",
|
|
20451
|
-
"
|
|
20452
|
-
"
|
|
21983
|
+
"error": "rp_wLpbxW_error",
|
|
21984
|
+
"actions": "rp_wLpbxW_actions"
|
|
20453
21985
|
};
|
|
20454
21986
|
// src/client/chat-settings/settings-api.ts
|
|
20455
21987
|
/** The chat is not a roleplay session, so it has no settings. */
|
|
@@ -21258,17 +22790,471 @@ window.__ModuleLoader__.load({
|
|
|
21258
22790
|
});
|
|
21259
22791
|
}
|
|
21260
22792
|
// src/shared/usage.ts
|
|
21261
|
-
const addTokens = (a, b) =>
|
|
21262
|
-
|
|
21263
|
-
|
|
21264
|
-
|
|
21265
|
-
|
|
22793
|
+
const addTokens = (a, b) => {
|
|
22794
|
+
const unreported = (a.unreported ?? 0) + (b.unreported ?? 0);
|
|
22795
|
+
return {
|
|
22796
|
+
input: a.input + b.input,
|
|
22797
|
+
cached: a.cached + b.cached,
|
|
22798
|
+
output: a.output + b.output,
|
|
22799
|
+
...unreported > 0 ? { unreported } : {}
|
|
22800
|
+
};
|
|
22801
|
+
};
|
|
21266
22802
|
const totalTokens = (count) => count.input + count.cached + count.output;
|
|
22803
|
+
// src/client/chat-settings/trace-locales.ts
|
|
22804
|
+
const PART_IDS = [
|
|
22805
|
+
"system",
|
|
22806
|
+
"tools",
|
|
22807
|
+
"notices",
|
|
22808
|
+
"input",
|
|
22809
|
+
"steps",
|
|
22810
|
+
"earlier"
|
|
22811
|
+
];
|
|
22812
|
+
const SECTION_IDS = [
|
|
22813
|
+
"time",
|
|
22814
|
+
"agenda",
|
|
22815
|
+
"scene",
|
|
22816
|
+
"activation",
|
|
22817
|
+
"carried",
|
|
22818
|
+
"world",
|
|
22819
|
+
"upcoming",
|
|
22820
|
+
"beats",
|
|
22821
|
+
"tracked",
|
|
22822
|
+
"threads",
|
|
22823
|
+
"events",
|
|
22824
|
+
"command",
|
|
22825
|
+
"pacing",
|
|
22826
|
+
"rules",
|
|
22827
|
+
"roll"
|
|
22828
|
+
];
|
|
22829
|
+
const dictionaries$3 = {
|
|
22830
|
+
en: {
|
|
22831
|
+
traceTitle: "Where each turn went",
|
|
22832
|
+
traceHelp: "For each turn: how long the player waited and for what, what the game master's prompt held, what the harness refused or repeated, what the game master was reminded of from the records, and what each character was given and not given. Sizes are estimated from the text; the service reports only the whole prompt. Open the activity list below for a helper's own requests.",
|
|
22833
|
+
traceEmpty: "No turn has been traced yet.",
|
|
22834
|
+
traceSummary: "Turn {turn}: {front} until delivered, {back} after in the background, {refused} refused",
|
|
22835
|
+
traceUnfinished: "Turn {turn}: not delivered yet",
|
|
22836
|
+
traceTimeTitle: "Time",
|
|
22837
|
+
traceWaited: "Waited before the first request: {time}",
|
|
22838
|
+
traceModel: "The game master's own requests: {time}",
|
|
22839
|
+
traceToolTime: "{tool}: {time} ({count} calls)",
|
|
22840
|
+
traceHelperTime: "{label}: {front} before delivery, {back} after ({runs} runs)",
|
|
22841
|
+
traceBackground: "The last background work ended {time} after delivery.",
|
|
22842
|
+
tracePromptTitle: "The game master's prompt, at its fullest",
|
|
22843
|
+
tracePromptSize: "Step {step}: {count} tokens counted by the service",
|
|
22844
|
+
traceSceneTitle: "The scene notice by section (estimated tokens)",
|
|
22845
|
+
traceRefusalTitle: "Refused and repeated",
|
|
22846
|
+
traceNoRefusal: "Nothing was refused, steered or cut off.",
|
|
22847
|
+
traceRefusedCall: "Refused {tool}: {reason}",
|
|
22848
|
+
traceSteered: "The harness told the game master: {text}",
|
|
22849
|
+
traceHelperRefused: "{label}: {count} refused calls",
|
|
22850
|
+
traceCutOff: "A request was cut off at its output limit (step {step}).",
|
|
22851
|
+
traceRemindedTitle: "Reminded from the records",
|
|
22852
|
+
traceRemindedSearch: "found by search",
|
|
22853
|
+
traceRemindedCues: "found by names and words",
|
|
22854
|
+
traceLeftOut: "{omitted} more matched and were left out. Turns up to {folded} are folded into summaries, and only those are searched; later ones are still in the conversation.",
|
|
22855
|
+
traceNothingFolded: "No turn has been folded into summaries yet, so the whole story is still in the conversation and nothing is searched.",
|
|
22856
|
+
traceNoneReminded: "Nothing from the folded turns bore on this move.",
|
|
22857
|
+
traceLookups: "Looked up by the game master",
|
|
22858
|
+
traceLookupRow: "{tool}: {text}",
|
|
22859
|
+
traceCharactersTitle: "What each character was given",
|
|
22860
|
+
traceCharactersHelp: "Given is what went into the brief; withheld is what the story holds that the character has no knowledge of. Turn on \"Keep what the helpers were told\" to see the names behind the withheld counts.",
|
|
22861
|
+
traceGiven: "Given",
|
|
22862
|
+
traceWithheld: "Withheld",
|
|
22863
|
+
traceMemories: "memories: {clear} clear, {faded} faded, {vague} vague",
|
|
22864
|
+
traceRetry: "retry",
|
|
22865
|
+
traceNames: "Not given: {names}",
|
|
22866
|
+
tracePart_system: "Instructions",
|
|
22867
|
+
tracePart_tools: "Tool list",
|
|
22868
|
+
tracePart_notices: "Scene and notices",
|
|
22869
|
+
tracePart_input: "What was asked",
|
|
22870
|
+
tracePart_steps: "This turn's calls and results",
|
|
22871
|
+
tracePart_earlier: "Earlier conversation",
|
|
22872
|
+
traceSection_time: "Time",
|
|
22873
|
+
traceSection_agenda: "Days",
|
|
22874
|
+
traceSection_scene: "Cast and places",
|
|
22875
|
+
traceSection_activation: "Who could act",
|
|
22876
|
+
traceSection_carried: "Carried things",
|
|
22877
|
+
traceSection_world: "What the world did",
|
|
22878
|
+
traceSection_upcoming: "Coming up",
|
|
22879
|
+
traceSection_beats: "Beats to weave in",
|
|
22880
|
+
traceSection_tracked: "Tracked values",
|
|
22881
|
+
traceSection_threads: "Open threads",
|
|
22882
|
+
traceSection_events: "Earlier events",
|
|
22883
|
+
traceSection_command: "World command",
|
|
22884
|
+
traceSection_pacing: "Pacing",
|
|
22885
|
+
traceSection_rules: "Rules",
|
|
22886
|
+
traceSection_roll: "Player's roll",
|
|
22887
|
+
traceKind_people: "people",
|
|
22888
|
+
traceKind_places: "places",
|
|
22889
|
+
traceKind_things: "things",
|
|
22890
|
+
traceKind_routes: "ways",
|
|
22891
|
+
traceKind_factions: "groups",
|
|
22892
|
+
traceKind_lore: "background",
|
|
22893
|
+
traceKind_relationships: "relationships",
|
|
22894
|
+
traceKind_present: "present",
|
|
22895
|
+
traceKind_carrying: "carried",
|
|
22896
|
+
traceKind_cues: "cues",
|
|
22897
|
+
traceKind_hidden: "hidden things here",
|
|
22898
|
+
traceKind_events: "events it took no part in"
|
|
22899
|
+
},
|
|
22900
|
+
zh: {
|
|
22901
|
+
traceTitle: "每回合的去向",
|
|
22902
|
+
traceHelp: "每回合:玩家等了多久、等什么,游戏主持人的提示词里有什么,运行框架拒绝或重复了什么,主持人从记录中被提醒了什么,以及每个角色得到了什么、没有得到什么。大小按文本估算,服务只报告整个提示词的总数。助手自己的请求见下方的活动列表。",
|
|
22903
|
+
traceEmpty: "还没有记录过任何回合。",
|
|
22904
|
+
traceSummary: "第 {turn} 回合:送出前 {front},之后后台 {back},被拒绝 {refused} 次",
|
|
22905
|
+
traceUnfinished: "第 {turn} 回合:尚未送出",
|
|
22906
|
+
traceTimeTitle: "时间",
|
|
22907
|
+
traceWaited: "第一次请求之前等待:{time}",
|
|
22908
|
+
traceModel: "游戏主持人自己的请求:{time}",
|
|
22909
|
+
traceToolTime: "{tool}:{time}({count} 次调用)",
|
|
22910
|
+
traceHelperTime: "{label}:送出前 {front},送出后 {back}({runs} 次运行)",
|
|
22911
|
+
traceBackground: "最后一项后台工作在送出后 {time} 结束。",
|
|
22912
|
+
tracePromptTitle: "游戏主持人最长的一次提示词",
|
|
22913
|
+
tracePromptSize: "第 {step} 步:服务统计 {count} 个令牌",
|
|
22914
|
+
traceSceneTitle: "场景通知按段落统计(估算令牌)",
|
|
22915
|
+
traceRefusalTitle: "被拒绝与重复",
|
|
22916
|
+
traceNoRefusal: "没有被拒绝、被引导或被截断的内容。",
|
|
22917
|
+
traceRefusedCall: "{tool} 被拒绝:{reason}",
|
|
22918
|
+
traceSteered: "运行框架对游戏主持人说:{text}",
|
|
22919
|
+
traceHelperRefused: "{label}:{count} 次调用被拒绝",
|
|
22920
|
+
traceCutOff: "有一次请求在输出上限处被截断(第 {step} 步)。",
|
|
22921
|
+
traceRemindedTitle: "从记录中提醒的内容",
|
|
22922
|
+
traceRemindedSearch: "按搜索找到",
|
|
22923
|
+
traceRemindedCues: "按名字和词语找到",
|
|
22924
|
+
traceLeftOut: "另有 {omitted} 条也匹配,但被省略。第 {folded} 回合之前的内容已折叠进摘要,只在这部分中搜索;之后的回合仍在对话中。",
|
|
22925
|
+
traceNothingFolded: "还没有回合被折叠进摘要,整个故事仍在对话中,因此没有搜索。",
|
|
22926
|
+
traceNoneReminded: "已折叠的回合中没有与这次行动相关的内容。",
|
|
22927
|
+
traceLookups: "游戏主持人查阅的内容",
|
|
22928
|
+
traceLookupRow: "{tool}:{text}",
|
|
22929
|
+
traceCharactersTitle: "每个角色得到了什么",
|
|
22930
|
+
traceCharactersHelp: "“得到”指进入简报的内容;“未给”指故事里有、但该角色并不知道的内容。打开“保留助手收到的内容”,可看到未给内容的名称。",
|
|
22931
|
+
traceGiven: "得到",
|
|
22932
|
+
traceWithheld: "未给",
|
|
22933
|
+
traceMemories: "记忆:清晰 {clear}、模糊 {faded}、依稀 {vague}",
|
|
22934
|
+
traceRetry: "重试",
|
|
22935
|
+
traceNames: "未给:{names}",
|
|
22936
|
+
tracePart_system: "指令",
|
|
22937
|
+
tracePart_tools: "工具列表",
|
|
22938
|
+
tracePart_notices: "场景与通知",
|
|
22939
|
+
tracePart_input: "被问的内容",
|
|
22940
|
+
tracePart_steps: "本回合的调用与结果",
|
|
22941
|
+
tracePart_earlier: "之前的对话",
|
|
22942
|
+
traceSection_time: "时间",
|
|
22943
|
+
traceSection_agenda: "日程",
|
|
22944
|
+
traceSection_scene: "角色与地点",
|
|
22945
|
+
traceSection_activation: "谁可以行动",
|
|
22946
|
+
traceSection_carried: "携带的物品",
|
|
22947
|
+
traceSection_world: "世界的动作",
|
|
22948
|
+
traceSection_upcoming: "即将发生",
|
|
22949
|
+
traceSection_beats: "待织入的情节点",
|
|
22950
|
+
traceSection_tracked: "跟踪的数值",
|
|
22951
|
+
traceSection_threads: "未决线索",
|
|
22952
|
+
traceSection_events: "早先的事件",
|
|
22953
|
+
traceSection_command: "世界指令",
|
|
22954
|
+
traceSection_pacing: "节奏",
|
|
22955
|
+
traceSection_rules: "规则",
|
|
22956
|
+
traceSection_roll: "玩家的掷骰",
|
|
22957
|
+
traceKind_people: "人物",
|
|
22958
|
+
traceKind_places: "地点",
|
|
22959
|
+
traceKind_things: "物品",
|
|
22960
|
+
traceKind_routes: "通路",
|
|
22961
|
+
traceKind_factions: "团体",
|
|
22962
|
+
traceKind_lore: "背景",
|
|
22963
|
+
traceKind_relationships: "关系",
|
|
22964
|
+
traceKind_present: "在场",
|
|
22965
|
+
traceKind_carrying: "携带",
|
|
22966
|
+
traceKind_cues: "提示",
|
|
22967
|
+
traceKind_hidden: "此处隐藏的物品",
|
|
22968
|
+
traceKind_events: "它未参与的事件"
|
|
22969
|
+
}
|
|
22970
|
+
};
|
|
22971
|
+
// src/client/chat-settings/turn-times.ts
|
|
22972
|
+
/**
|
|
22973
|
+
* Where a turn's time went. A helper's run is counted for the turn it was working for (the one the game master had begun when it ended), and the part of it that fell after
|
|
22974
|
+
* delivery is background. A background run that ends after the next turn began is counted for that turn instead.
|
|
22975
|
+
*/
|
|
22976
|
+
function turnTimes(trace, activity) {
|
|
22977
|
+
const delivered = trace.endedAt;
|
|
22978
|
+
const byTool = /* @__PURE__ */ new Map();
|
|
22979
|
+
for (const call of trace.calls ?? []) {
|
|
22980
|
+
const entry = byTool.get(call.tool) ?? {
|
|
22981
|
+
ms: 0,
|
|
22982
|
+
calls: 0
|
|
22983
|
+
};
|
|
22984
|
+
byTool.set(call.tool, {
|
|
22985
|
+
ms: entry.ms + (call.ms ?? 0),
|
|
22986
|
+
calls: entry.calls + 1
|
|
22987
|
+
});
|
|
22988
|
+
}
|
|
22989
|
+
const helpers = /* @__PURE__ */ new Map();
|
|
22990
|
+
let lastEnd = delivered ?? 0;
|
|
22991
|
+
for (const entry of activity.filter((run) => run.turn === trace.turn)) {
|
|
22992
|
+
const start = entry.at - entry.ms;
|
|
22993
|
+
const before = delivered === void 0 ? entry.ms : Math.max(0, Math.min(entry.at, delivered) - Math.max(start, trace.startedAt));
|
|
22994
|
+
const after = delivered === void 0 ? 0 : Math.max(0, entry.at - Math.max(start, delivered));
|
|
22995
|
+
if (after > 0) lastEnd = Math.max(lastEnd, entry.at);
|
|
22996
|
+
const current = helpers.get(entry.label) ?? {
|
|
22997
|
+
label: entry.label,
|
|
22998
|
+
foregroundMs: 0,
|
|
22999
|
+
backgroundMs: 0,
|
|
23000
|
+
runs: 0,
|
|
23001
|
+
refused: 0
|
|
23002
|
+
};
|
|
23003
|
+
helpers.set(entry.label, {
|
|
23004
|
+
...current,
|
|
23005
|
+
foregroundMs: current.foregroundMs + before,
|
|
23006
|
+
backgroundMs: current.backgroundMs + after,
|
|
23007
|
+
runs: current.runs + 1,
|
|
23008
|
+
refused: current.refused + (entry.refused ?? 0)
|
|
23009
|
+
});
|
|
23010
|
+
}
|
|
23011
|
+
return {
|
|
23012
|
+
foregroundMs: delivered === void 0 ? 0 : Math.max(0, delivered - trace.startedAt),
|
|
23013
|
+
beforeMs: trace.beforeMs ?? 0,
|
|
23014
|
+
modelMs: (trace.requests ?? []).reduce((sum, request) => sum + (request.ms ?? 0), 0),
|
|
23015
|
+
tools: [...byTool].map(([tool, value]) => ({
|
|
23016
|
+
tool,
|
|
23017
|
+
...value
|
|
23018
|
+
})).sort((a, b) => b.ms - a.ms),
|
|
23019
|
+
helpers: [...helpers.values()].sort((a, b) => b.foregroundMs + b.backgroundMs - a.foregroundMs - a.backgroundMs),
|
|
23020
|
+
backgroundMs: delivered === void 0 ? 0 : Math.max(0, lastEnd - delivered)
|
|
23021
|
+
};
|
|
23022
|
+
}
|
|
23023
|
+
/** The request with the biggest prompt, where the game master's context stood at its fullest, with its parts largest first. */
|
|
23024
|
+
function fullestRequest(trace) {
|
|
23025
|
+
const sized = (trace.requests ?? []).filter((request) => request.parts !== void 0);
|
|
23026
|
+
if (sized.length === 0) return void 0;
|
|
23027
|
+
const fullest = sized.slice(1).reduce((best, request) => (request.prompt ?? 0) > (best.prompt ?? 0) ? request : best, sized[0]);
|
|
23028
|
+
return {
|
|
23029
|
+
...fullest.prompt === void 0 ? {} : { prompt: fullest.prompt },
|
|
23030
|
+
step: fullest.step,
|
|
23031
|
+
parts: [...fullest.parts ?? []].sort((a, b) => b.tokens - a.tokens)
|
|
23032
|
+
};
|
|
23033
|
+
}
|
|
23034
|
+
/** The tools whose answers are what the game master looked up, as opposed to what it did. */
|
|
23035
|
+
const LOOKUP_TOOLS = [
|
|
23036
|
+
"search_lore",
|
|
23037
|
+
"search_events",
|
|
23038
|
+
"recall_memories",
|
|
23039
|
+
"list_threads",
|
|
23040
|
+
"list_characters",
|
|
23041
|
+
"get_character",
|
|
23042
|
+
"list_relationships",
|
|
23043
|
+
"list_items",
|
|
23044
|
+
"get_item",
|
|
23045
|
+
"list_locations",
|
|
23046
|
+
"get_location",
|
|
23047
|
+
"get_agenda",
|
|
23048
|
+
"search_images",
|
|
23049
|
+
"preview_scene"
|
|
23050
|
+
];
|
|
23051
|
+
/** Everything the harness refused or steered in a turn: the game master's refused calls and its own messages, and the runs of helpers with refused calls. */
|
|
23052
|
+
function refusalsOf(trace, helpers) {
|
|
23053
|
+
return {
|
|
23054
|
+
calls: (trace.calls ?? []).filter((call) => call.failed).map((call) => ({
|
|
23055
|
+
tool: call.tool,
|
|
23056
|
+
note: call.note
|
|
23057
|
+
})),
|
|
23058
|
+
steered: trace.steered ?? [],
|
|
23059
|
+
helpers: helpers.filter((helper) => helper.refused > 0).map((helper) => ({
|
|
23060
|
+
label: helper.label,
|
|
23061
|
+
refused: helper.refused
|
|
23062
|
+
})),
|
|
23063
|
+
cutOff: (trace.requests ?? []).filter((request) => request.stop === "max-tokens").map((request) => request.step)
|
|
23064
|
+
};
|
|
23065
|
+
}
|
|
23066
|
+
// src/client/chat-settings/TraceList.tsx
|
|
23067
|
+
const seconds$1 = (ms) => `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)} s`;
|
|
23068
|
+
const count$1 = (value) => value.toLocaleString();
|
|
23069
|
+
const labelOf = (t, prefix, id, known) => known.includes(id) ? t(`${prefix}${id}`) : id;
|
|
23070
|
+
const sizes = (t, prefix, known, parts) => parts.map((part) => `${labelOf(t, prefix, part.id, known)} ~${count$1(part.tokens)}`).join(" · ");
|
|
23071
|
+
const kindText = (t, kind, value) => `${value} ${t(`traceKind_${kind}`)}`;
|
|
23072
|
+
const nonzero = (t, counts) => Object.entries(counts).filter(([, value]) => value > 0).map(([kind, value]) => kindText(t, kind, value));
|
|
23073
|
+
function givenText(t, access) {
|
|
23074
|
+
const { memories, ...counts } = access.given;
|
|
23075
|
+
return [t("traceMemories", memories), ...nonzero(t, counts)].join(" · ");
|
|
23076
|
+
}
|
|
23077
|
+
const withheldText = (t, access) => nonzero(t, access.withheld).join(" · ");
|
|
23078
|
+
function TurnBody({ t, trace, activity }) {
|
|
23079
|
+
const times = turnTimes(trace, activity);
|
|
23080
|
+
const refusals = refusalsOf(trace, times.helpers);
|
|
23081
|
+
const fullest = fullestRequest(trace);
|
|
23082
|
+
const lookups = (trace.calls ?? []).filter((call) => LOOKUP_TOOLS.includes(call.tool));
|
|
23083
|
+
const nothingRefused = refusals.calls.length === 0 && refusals.steered.length === 0 && refusals.helpers.length === 0 && refusals.cutOff.length === 0;
|
|
23084
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23085
|
+
className: ChatSettingsView_module_css_default.run,
|
|
23086
|
+
"data-testid": "roleplay-trace-turn",
|
|
23087
|
+
children: [
|
|
23088
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23089
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23090
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("traceTimeTitle") })
|
|
23091
|
+
}),
|
|
23092
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
23093
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23094
|
+
children: [
|
|
23095
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceWaited", { time: seconds$1(times.beforeMs) }) }),
|
|
23096
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceModel", { time: seconds$1(times.modelMs) }) }),
|
|
23097
|
+
times.tools.slice(0, 4).map((tool) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceToolTime", {
|
|
23098
|
+
tool: tool.tool,
|
|
23099
|
+
time: seconds$1(tool.ms),
|
|
23100
|
+
count: tool.calls
|
|
23101
|
+
}) }, tool.tool)),
|
|
23102
|
+
times.helpers.map((helper) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceHelperTime", {
|
|
23103
|
+
label: helper.label,
|
|
23104
|
+
front: seconds$1(helper.foregroundMs),
|
|
23105
|
+
back: seconds$1(helper.backgroundMs),
|
|
23106
|
+
runs: helper.runs
|
|
23107
|
+
}) }, helper.label)),
|
|
23108
|
+
times.backgroundMs > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceBackground", { time: seconds$1(times.backgroundMs) }) })
|
|
23109
|
+
]
|
|
23110
|
+
}),
|
|
23111
|
+
fullest !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23112
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23113
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("tracePromptTitle") })
|
|
23114
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
23115
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23116
|
+
"data-testid": "roleplay-trace-prompt",
|
|
23117
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: fullest.prompt === void 0 ? sizes(t, "tracePart_", PART_IDS, fullest.parts) : `${t("tracePromptSize", {
|
|
23118
|
+
step: fullest.step,
|
|
23119
|
+
count: count$1(fullest.prompt)
|
|
23120
|
+
})}: ${sizes(t, "tracePart_", PART_IDS, fullest.parts)}` }), trace.scene !== void 0 && trace.scene.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: `${t("traceSceneTitle")}: ${sizes(t, "traceSection_", SECTION_IDS, [...trace.scene].sort((a, b) => b.tokens - a.tokens))}` })]
|
|
23121
|
+
})] }),
|
|
23122
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23123
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23124
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("traceRefusalTitle") })
|
|
23125
|
+
}),
|
|
23126
|
+
nothingRefused ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23127
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23128
|
+
children: t("traceNoRefusal")
|
|
23129
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
23130
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23131
|
+
"data-testid": "roleplay-trace-refusals",
|
|
23132
|
+
children: [
|
|
23133
|
+
refusals.calls.map((call, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceRefusedCall", {
|
|
23134
|
+
tool: call.tool,
|
|
23135
|
+
reason: call.note
|
|
23136
|
+
}) }, `c${index}`)),
|
|
23137
|
+
refusals.steered.map((text, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceSteered", { text }) }, `s${index}`)),
|
|
23138
|
+
refusals.helpers.map((helper) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceHelperRefused", {
|
|
23139
|
+
label: helper.label,
|
|
23140
|
+
count: helper.refused
|
|
23141
|
+
}) }, helper.label)),
|
|
23142
|
+
refusals.cutOff.map((step) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceCutOff", { step }) }, `o${step}`))
|
|
23143
|
+
]
|
|
23144
|
+
}),
|
|
23145
|
+
trace.selected !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23146
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23147
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("traceRemindedTitle") })
|
|
23148
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
23149
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23150
|
+
"data-testid": "roleplay-trace-reminded",
|
|
23151
|
+
children: [trace.selected.folded === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceNothingFolded") }) : trace.selected.events.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceNoneReminded") }) : trace.selected.events.map((event, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: `(${event.turn}) ${event.text} — ${t(event.how === "search" ? "traceRemindedSearch" : "traceRemindedCues")}` }, index)), trace.selected.folded > 0 && trace.selected.omitted > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: t("traceLeftOut", {
|
|
23152
|
+
omitted: trace.selected.omitted,
|
|
23153
|
+
folded: trace.selected.folded
|
|
23154
|
+
}) })]
|
|
23155
|
+
})] }),
|
|
23156
|
+
lookups.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23157
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23158
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("traceLookups") })
|
|
23159
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
23160
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23161
|
+
children: lookups.map((call, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
23162
|
+
className: call.failed ? ChatSettingsView_module_css_default.error : void 0,
|
|
23163
|
+
children: t("traceLookupRow", {
|
|
23164
|
+
tool: call.tool,
|
|
23165
|
+
text: call.note
|
|
23166
|
+
})
|
|
23167
|
+
}, index))
|
|
23168
|
+
})] }),
|
|
23169
|
+
trace.access !== void 0 && trace.access.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
23170
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23171
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23172
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("traceCharactersTitle") })
|
|
23173
|
+
}),
|
|
23174
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23175
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23176
|
+
children: t("traceCharactersHelp")
|
|
23177
|
+
}),
|
|
23178
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
|
|
23179
|
+
className: ChatSettingsView_module_css_default.table,
|
|
23180
|
+
"data-testid": "roleplay-trace-access",
|
|
23181
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
23182
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {}),
|
|
23183
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("traceGiven") }),
|
|
23184
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("traceWithheld") })
|
|
23185
|
+
] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: trace.access.map((access, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
23186
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: access.attempt > 1 ? `${access.character} (${t("traceRetry")})` : access.character }),
|
|
23187
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: givenText(t, access) }),
|
|
23188
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", { children: [withheldText(t, access), access.names !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
23189
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23190
|
+
children: t("traceNames", { names: Object.values(access.names).flat().join(", ") })
|
|
23191
|
+
})] })
|
|
23192
|
+
] }, index)) })]
|
|
23193
|
+
})
|
|
23194
|
+
] })
|
|
23195
|
+
]
|
|
23196
|
+
});
|
|
23197
|
+
}
|
|
23198
|
+
/** Where each of the latest turns went, newest first: the time before and after delivery, the game master's prompt by part, what was refused, what it was reminded of, and what each character was given. */
|
|
23199
|
+
function TraceList({ t, trace, activity }) {
|
|
23200
|
+
const shown = trace.slice(-10).reverse();
|
|
23201
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
23202
|
+
className: ChatSettingsView_module_css_default.activity,
|
|
23203
|
+
"data-testid": "roleplay-trace",
|
|
23204
|
+
children: [
|
|
23205
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("traceTitle") }),
|
|
23206
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23207
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23208
|
+
children: t("traceHelp")
|
|
23209
|
+
}),
|
|
23210
|
+
shown.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
23211
|
+
className: ChatSettingsView_module_css_default.description,
|
|
23212
|
+
children: t("traceEmpty")
|
|
23213
|
+
}) : shown.map((entry) => {
|
|
23214
|
+
const times = turnTimes(entry, activity);
|
|
23215
|
+
const refused = refusalsOf(entry, times.helpers);
|
|
23216
|
+
const total = refused.calls.length + refused.helpers.reduce((sum, helper) => sum + helper.refused, 0);
|
|
23217
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: entry.endedAt === void 0 ? t("traceUnfinished", { turn: entry.turn }) : t("traceSummary", {
|
|
23218
|
+
turn: entry.turn,
|
|
23219
|
+
front: seconds$1(times.foregroundMs),
|
|
23220
|
+
back: seconds$1(times.backgroundMs),
|
|
23221
|
+
refused: total
|
|
23222
|
+
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TurnBody, {
|
|
23223
|
+
t,
|
|
23224
|
+
trace: entry,
|
|
23225
|
+
activity
|
|
23226
|
+
})] }, entry.turn);
|
|
23227
|
+
})
|
|
23228
|
+
]
|
|
23229
|
+
});
|
|
23230
|
+
}
|
|
21267
23231
|
// src/client/chat-settings/ActivityList.tsx
|
|
21268
23232
|
const seconds = (ms) => `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)} s`;
|
|
21269
23233
|
const count = (value) => value.toLocaleString();
|
|
21270
|
-
/** Fresh input plus output, and what came from the service's cache
|
|
21271
|
-
const tokenText = (t, tokens) =>
|
|
23234
|
+
/** Fresh input plus output, and beside it what came from the service's cache, or that the service does not say. */
|
|
23235
|
+
const tokenText = (t, tokens) => {
|
|
23236
|
+
const notes = [...tokens.cached > 0 ? [t("usageCached", { count: count(tokens.cached) })] : [], ...(tokens.unreported ?? 0) > 0 ? [t("usageUnreported")] : []];
|
|
23237
|
+
return `${count(tokens.input + tokens.output)}${notes.length > 0 ? ` (${notes.join(", ")})` : ""}`;
|
|
23238
|
+
};
|
|
23239
|
+
/** One request on one line: what its prompt held, whether the service said how much of it came from its cache, how long the model took to start, and a stop that was not the ordinary end. */
|
|
23240
|
+
const requestText = (t, request) => [
|
|
23241
|
+
...request.prompt === void 0 ? [] : [t("reqPrompt", { count: count(request.prompt) })],
|
|
23242
|
+
...request.parts === void 0 ? [] : [`(${sizes(t, "tracePart_", PART_IDS, [...request.parts].sort((a, b) => b.tokens - a.tokens))})`],
|
|
23243
|
+
...request.cached !== void 0 ? [t("usageCached", { count: count(request.cached) })] : request.prompt === void 0 ? [] : [t("usageUnreported")],
|
|
23244
|
+
...request.waitMs === void 0 ? [] : [t("reqWait", { time: seconds(request.waitMs) })],
|
|
23245
|
+
...request.ms === void 0 ? [] : [t("reqTook", { time: seconds(request.ms) })],
|
|
23246
|
+
...request.stop === "max-tokens" ? [t("reqCutOff")] : request.stop === "error" ? [t("reqError")] : []
|
|
23247
|
+
].join(" · ");
|
|
23248
|
+
function RequestList({ t, requests }) {
|
|
23249
|
+
if (requests === void 0 || requests.length === 0) return null;
|
|
23250
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
23251
|
+
"data-testid": "roleplay-requests",
|
|
23252
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("reqCount", { count: requests.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
|
|
23253
|
+
className: ChatSettingsView_module_css_default.reasons,
|
|
23254
|
+
children: requests.map((request, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: `${request.step}: ${requestText(t, request)}` }, index))
|
|
23255
|
+
})]
|
|
23256
|
+
});
|
|
23257
|
+
}
|
|
21272
23258
|
/** What each turn used, newest first: the game master, its helpers, and the sum. */
|
|
21273
23259
|
function UsageTable({ t, usage }) {
|
|
21274
23260
|
const shown = usage.slice(-20).reverse();
|
|
@@ -21290,12 +23276,14 @@ window.__ModuleLoader__.load({
|
|
|
21290
23276
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageTurn") }),
|
|
21291
23277
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageMaster") }),
|
|
21292
23278
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageHelpers") }),
|
|
23279
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageMasterTime") }),
|
|
21293
23280
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageRuns") }),
|
|
21294
23281
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("usageTotal") })
|
|
21295
23282
|
] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: shown.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
21296
23283
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: entry.turn }),
|
|
21297
23284
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: tokenText(t, entry.master) }),
|
|
21298
23285
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: tokenText(t, entry.helpers) }),
|
|
23286
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: entry.masterMs === void 0 ? "" : seconds(entry.masterMs) }),
|
|
21299
23287
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: entry.runs }),
|
|
21300
23288
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: count(totalTokens(addTokens(entry.master, entry.helpers))) })
|
|
21301
23289
|
] }, entry.turn)) })]
|
|
@@ -21363,7 +23351,10 @@ window.__ModuleLoader__.load({
|
|
|
21363
23351
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: entry.model === "" ? t("activityOwnModel") : entry.model }),
|
|
21364
23352
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: seconds(entry.ms) }),
|
|
21365
23353
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: entry.calls }),
|
|
21366
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
23354
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", { children: [entry.tokens === void 0 ? "" : tokenText(t, entry.tokens), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RequestList, {
|
|
23355
|
+
t,
|
|
23356
|
+
requests: entry.requests
|
|
23357
|
+
})] }),
|
|
21367
23358
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
21368
23359
|
className: entry.error === void 0 ? void 0 : ChatSettingsView_module_css_default.error,
|
|
21369
23360
|
title: entry.error,
|
|
@@ -21595,6 +23586,7 @@ window.__ModuleLoader__.load({
|
|
|
21595
23586
|
...payload,
|
|
21596
23587
|
activity: next.activity,
|
|
21597
23588
|
usage: next.usage,
|
|
23589
|
+
trace: next.trace,
|
|
21598
23590
|
interventions: next.interventions,
|
|
21599
23591
|
vectors: next.vectors,
|
|
21600
23592
|
reflection: next.reflection,
|
|
@@ -21755,6 +23747,11 @@ window.__ModuleLoader__.load({
|
|
|
21755
23747
|
t,
|
|
21756
23748
|
usage: payload.usage
|
|
21757
23749
|
}),
|
|
23750
|
+
session !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TraceList, {
|
|
23751
|
+
t,
|
|
23752
|
+
trace: payload.trace,
|
|
23753
|
+
activity: payload.activity
|
|
23754
|
+
}),
|
|
21758
23755
|
session !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActivityList, {
|
|
21759
23756
|
t,
|
|
21760
23757
|
session,
|
|
@@ -21782,7 +23779,7 @@ window.__ModuleLoader__.load({
|
|
|
21782
23779
|
]
|
|
21783
23780
|
});
|
|
21784
23781
|
}
|
|
21785
|
-
const dictionaries$2 = withDictionaries(withDictionaries({
|
|
23782
|
+
const dictionaries$2 = withDictionaries(withDictionaries(withDictionaries({
|
|
21786
23783
|
en: {
|
|
21787
23784
|
tab: "Chat settings",
|
|
21788
23785
|
title: "Chat settings",
|
|
@@ -21853,6 +23850,14 @@ window.__ModuleLoader__.load({
|
|
|
21853
23850
|
usageRuns: "Helper runs",
|
|
21854
23851
|
usageTotal: "Total",
|
|
21855
23852
|
usageCached: "{count} cached",
|
|
23853
|
+
usageUnreported: "cache not reported",
|
|
23854
|
+
usageMasterTime: "Game master time",
|
|
23855
|
+
reqPrompt: "prompt {count}",
|
|
23856
|
+
reqWait: "first answer after {time}",
|
|
23857
|
+
reqTook: "{time} in all",
|
|
23858
|
+
reqCutOff: "cut off by the output limit",
|
|
23859
|
+
reqError: "failed",
|
|
23860
|
+
reqCount: "{count} requests",
|
|
21856
23861
|
usageEmpty: "No turn has been counted yet.",
|
|
21857
23862
|
activityResult: "Result",
|
|
21858
23863
|
activityOwnModel: "chat model",
|
|
@@ -22034,6 +24039,14 @@ window.__ModuleLoader__.load({
|
|
|
22034
24039
|
usageRuns: "助手运行次数",
|
|
22035
24040
|
usageTotal: "合计",
|
|
22036
24041
|
usageCached: "缓存 {count}",
|
|
24042
|
+
usageUnreported: "服务未报告缓存",
|
|
24043
|
+
usageMasterTime: "游戏主持人用时",
|
|
24044
|
+
reqPrompt: "提示 {count}",
|
|
24045
|
+
reqWait: "{time} 后开始回答",
|
|
24046
|
+
reqTook: "共 {time}",
|
|
24047
|
+
reqCutOff: "被输出上限截断",
|
|
24048
|
+
reqError: "失败",
|
|
24049
|
+
reqCount: "{count} 次请求",
|
|
22037
24050
|
usageEmpty: "还没有统计过任何回合。",
|
|
22038
24051
|
activityResult: "结果",
|
|
22039
24052
|
activityOwnModel: "对话模型",
|
|
@@ -22145,7 +24158,7 @@ window.__ModuleLoader__.load({
|
|
|
22145
24158
|
saved: "已保存。",
|
|
22146
24159
|
saveFailed: "无法保存设置:{message}"
|
|
22147
24160
|
}
|
|
22148
|
-
}, dictionaries$
|
|
24161
|
+
}, dictionaries$9), dictionaries$20), dictionaries$3);
|
|
22149
24162
|
// src/client/chat-settings/index.ts
|
|
22150
24163
|
const NAMESPACE$2 = "roleplay.chatSettings";
|
|
22151
24164
|
const VIEW_ID = "roleplay-settings";
|
|
@@ -22186,16 +24199,16 @@ window.__ModuleLoader__.load({
|
|
|
22186
24199
|
}
|
|
22187
24200
|
tag$4.textContent = css$4;
|
|
22188
24201
|
var CatalogueSettings_module_css_default = {
|
|
22189
|
-
"
|
|
24202
|
+
"hint": "rp_KPhXDa_hint",
|
|
22190
24203
|
"field": "rp_KPhXDa_field",
|
|
22191
|
-
"
|
|
24204
|
+
"problem": "rp_KPhXDa_problem",
|
|
22192
24205
|
"keyHint": "rp_KPhXDa_keyHint",
|
|
22193
24206
|
"title": "rp_KPhXDa_title",
|
|
22194
|
-
"
|
|
24207
|
+
"section": "rp_KPhXDa_section",
|
|
24208
|
+
"row": "rp_KPhXDa_row",
|
|
22195
24209
|
"keyArea": "rp_KPhXDa_keyArea",
|
|
22196
|
-
"
|
|
22197
|
-
"
|
|
22198
|
-
"section": "rp_KPhXDa_section"
|
|
24210
|
+
"actions": "rp_KPhXDa_actions",
|
|
24211
|
+
"label": "rp_KPhXDa_label"
|
|
22199
24212
|
};
|
|
22200
24213
|
// src/client/settings/AuthoringToolSettings.tsx
|
|
22201
24214
|
const boardOf = (text) => {
|
|
@@ -22427,18 +24440,18 @@ window.__ModuleLoader__.load({
|
|
|
22427
24440
|
}
|
|
22428
24441
|
tag$3.textContent = css$3;
|
|
22429
24442
|
var AssistantSettings_module_css_default = {
|
|
22430
|
-
"
|
|
22431
|
-
"field": "rp_ZwzM4q_field",
|
|
24443
|
+
"badges": "rp_ZwzM4q_badges",
|
|
22432
24444
|
"label": "rp_ZwzM4q_label",
|
|
22433
|
-
"select": "rp_ZwzM4q_select",
|
|
22434
|
-
"fields": "rp_ZwzM4q_fields",
|
|
22435
24445
|
"fieldHint": "rp_ZwzM4q_fieldHint",
|
|
24446
|
+
"hint": "rp_ZwzM4q_hint",
|
|
24447
|
+
"invalid": "rp_ZwzM4q_invalid",
|
|
22436
24448
|
"section": "rp_ZwzM4q_section",
|
|
22437
|
-
"
|
|
24449
|
+
"select": "rp_ZwzM4q_select",
|
|
22438
24450
|
"reset": "rp_ZwzM4q_reset",
|
|
22439
|
-
"
|
|
24451
|
+
"fields": "rp_ZwzM4q_fields",
|
|
24452
|
+
"field": "rp_ZwzM4q_field",
|
|
22440
24453
|
"head": "rp_ZwzM4q_head",
|
|
22441
|
-
"
|
|
24454
|
+
"title": "rp_ZwzM4q_title"
|
|
22442
24455
|
};
|
|
22443
24456
|
// src/client/settings/AssistantSettings.tsx
|
|
22444
24457
|
function ChoiceField({ t, spec, state, disabled, onEdit, onReset }) {
|
|
@@ -23715,28 +25728,28 @@ window.__ModuleLoader__.load({
|
|
|
23715
25728
|
}
|
|
23716
25729
|
tag$2.textContent = css$2;
|
|
23717
25730
|
var NarrationView_module_css_default = {
|
|
23718
|
-
"
|
|
23719
|
-
"
|
|
23720
|
-
"
|
|
23721
|
-
"oocLabel": "rp_NFPimG_oocLabel",
|
|
25731
|
+
"diceList": "rp_NFPimG_diceList",
|
|
25732
|
+
"avatar": "rp_NFPimG_avatar",
|
|
25733
|
+
"note": "rp_NFPimG_note",
|
|
23722
25734
|
"oocNote": "rp_NFPimG_oocNote",
|
|
23723
|
-
"
|
|
25735
|
+
"line": "rp_NFPimG_line",
|
|
25736
|
+
"imageStatus": "rp_NFPimG_imageStatus",
|
|
25737
|
+
"playAll": "rp_NFPimG_playAll",
|
|
23724
25738
|
"words": "rp_NFPimG_words",
|
|
23725
25739
|
"narration": "rp_NFPimG_narration",
|
|
25740
|
+
"oocRefused": "rp_NFPimG_oocRefused",
|
|
25741
|
+
"oocLabel": "rp_NFPimG_oocLabel",
|
|
23726
25742
|
"name": "rp_NFPimG_name",
|
|
23727
|
-
"
|
|
25743
|
+
"diceSummary": "rp_NFPimG_diceSummary",
|
|
23728
25744
|
"speech": "rp_NFPimG_speech",
|
|
25745
|
+
"imageButton": "rp_NFPimG_imageButton",
|
|
25746
|
+
"output": "rp_NFPimG_output",
|
|
23729
25747
|
"sceneImage": "rp_NFPimG_sceneImage",
|
|
23730
|
-
"imageError": "rp_NFPimG_imageError",
|
|
23731
25748
|
"playLine": "rp_NFPimG_playLine",
|
|
23732
|
-
"avatar": "rp_NFPimG_avatar",
|
|
23733
25749
|
"dice": "rp_NFPimG_dice",
|
|
23734
|
-
"
|
|
23735
|
-
"
|
|
23736
|
-
"
|
|
23737
|
-
"diceList": "rp_NFPimG_diceList",
|
|
23738
|
-
"images": "rp_NFPimG_images",
|
|
23739
|
-
"imageStatus": "rp_NFPimG_imageStatus"
|
|
25750
|
+
"imageError": "rp_NFPimG_imageError",
|
|
25751
|
+
"preview": "rp_NFPimG_preview",
|
|
25752
|
+
"images": "rp_NFPimG_images"
|
|
23740
25753
|
};
|
|
23741
25754
|
// src/client/transcript/PreviewNode.tsx
|
|
23742
25755
|
/**
|
|
@@ -23996,10 +26009,10 @@ window.__ModuleLoader__.load({
|
|
|
23996
26009
|
}
|
|
23997
26010
|
tag$1.textContent = css$1;
|
|
23998
26011
|
var SuggestionsDock_module_css_default = {
|
|
23999
|
-
"lines": "rp_rWH4DG_lines",
|
|
24000
|
-
"dock": "rp_rWH4DG_dock",
|
|
24001
26012
|
"label": "rp_rWH4DG_label",
|
|
24002
26013
|
"card": "rp_rWH4DG_card",
|
|
26014
|
+
"lines": "rp_rWH4DG_lines",
|
|
26015
|
+
"dock": "rp_rWH4DG_dock",
|
|
24003
26016
|
"chip": "rp_rWH4DG_chip"
|
|
24004
26017
|
};
|
|
24005
26018
|
// src/client/transcript/SuggestionsDock.tsx
|
|
@@ -24118,12 +26131,12 @@ window.__ModuleLoader__.load({
|
|
|
24118
26131
|
}
|
|
24119
26132
|
tag.textContent = css;
|
|
24120
26133
|
var TurnsDock_module_css_default = {
|
|
24121
|
-
"dock": "rp_f4YLlq_dock",
|
|
24122
26134
|
"select": "rp_f4YLlq_select",
|
|
24123
|
-
"count": "rp_f4YLlq_count",
|
|
24124
26135
|
"error": "rp_f4YLlq_error",
|
|
26136
|
+
"count": "rp_f4YLlq_count",
|
|
26137
|
+
"button": "rp_f4YLlq_button",
|
|
24125
26138
|
"group": "rp_f4YLlq_group",
|
|
24126
|
-
"
|
|
26139
|
+
"dock": "rp_f4YLlq_dock"
|
|
24127
26140
|
};
|
|
24128
26141
|
// src/client/transcript/withdrawn.ts
|
|
24129
26142
|
/** The rows of the transcript that belong to turns the story is not at, by the key DSH gives each row. */
|
|
@@ -24496,6 +26509,8 @@ window.__ModuleLoader__.load({
|
|
|
24496
26509
|
registerWorld(ctx);
|
|
24497
26510
|
registerGallery(ctx);
|
|
24498
26511
|
registerInterface(ctx);
|
|
26512
|
+
registerRecall(ctx);
|
|
26513
|
+
registerReference(ctx);
|
|
24499
26514
|
registerBranchNaming(ctx);
|
|
24500
26515
|
}
|
|
24501
26516
|
exports.apply = apply;
|