@dsh-agentic-roleplay/core 0.8.1 → 0.9.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.
Files changed (51) hide show
  1. package/lib/{access-DtOxFKBK.js → access-CfQWbNZP.js} +4 -7
  2. package/lib/{authoring-tools-DNnx0Nts.js → authoring-tools-CdHlvx32.js} +2125 -152
  3. package/lib/authoring.js +143 -47
  4. package/lib/{child-D6mpkkCE.js → child-lYYeOwl2.js} +28 -51
  5. package/lib/client.js +611 -774
  6. package/lib/client.js.map +1 -1
  7. package/lib/compaction.js +8 -13
  8. package/lib/{doctor-chat-ByDfCMeo.js → doctor-chat-hL1a61hp.js} +2 -3
  9. package/lib/doctor.js +6 -8
  10. package/lib/{gallery-D9nG3C78.js → gallery-BKh7eu80.js} +3 -4
  11. package/lib/{generator-r1Czm7oi.js → generator-DdZ1-sgv.js} +3 -4
  12. package/lib/helper.js +2 -3
  13. package/lib/{hooks-BQCzgggH.js → hooks-CcQj_dJo.js} +69 -97
  14. package/lib/images.js +4 -4
  15. package/lib/index.js +195 -265
  16. package/lib/{library-zI-2tG7h.js → library-QFL6Z_Nr.js} +9 -15
  17. package/lib/{lorebook-author-tools-ywaYicwd.js → lorebook-author-tools-DWBnYo1E.js} +10 -13
  18. package/lib/lorebook-authoring.js +5 -6
  19. package/lib/{narration-CnBlVure.js → narration-CjB_KwwY.js} +9 -15
  20. package/lib/orchestration.js +53 -64
  21. package/lib/{pack-jail-5EJ-WYyW.js → pack-jail-BMy6NcCY.js} +81 -788
  22. package/lib/{packs-Cv8hanXJ.js → packs-BREPSfHy.js} +6 -10
  23. package/lib/{presenter-agent-BSaMSd3G.js → presenter-agent-B49-_iUm.js} +12 -18
  24. package/lib/{preset-CWI3-0r1.js → preset-BqgY1Tz4.js} +5 -6
  25. package/lib/{preset-author-tools-BrJYa2cr.js → preset-author-tools-BB_Dcv2o.js} +12 -14
  26. package/lib/preset-authoring.js +6 -7
  27. package/lib/{presets-MwOSMMyu.js → presets-Bwnrx7p0.js} +69 -63
  28. package/lib/{reflection-zSaMsjKj.js → reflection-CUWG-6Qg.js} +19 -30
  29. package/lib/{text-BzudpQLS.js → text-CbGQhK1-.js} +9 -10
  30. package/lib/{turn-guard-Cv8pfHEA.js → turn-guard-Bb8Ew-1z.js} +6 -11
  31. package/package.json +29 -29
  32. package/prompts/en/checks/decide-sheet.md +1 -0
  33. package/prompts/en/checks/fidelity.md +7 -0
  34. package/prompts/en/checks/gaps.md +4 -0
  35. package/prompts/en/checks/notice.md +3 -0
  36. package/prompts/en/import/casting.md +1 -1
  37. package/prompts/en/import/character.md +1 -0
  38. package/prompts/en/import/finish-draft.md +1 -1
  39. package/prompts/en/import/finish-ok.md +3 -1
  40. package/prompts/en/import/notice-repair.md +2 -2
  41. package/prompts/en/import/repair-again.md +2 -2
  42. package/prompts/zh/checks/decide-sheet.md +1 -0
  43. package/prompts/zh/checks/fidelity.md +7 -0
  44. package/prompts/zh/checks/gaps.md +4 -0
  45. package/prompts/zh/checks/notice.md +3 -0
  46. package/prompts/zh/import/casting.md +1 -1
  47. package/prompts/zh/import/character.md +1 -0
  48. package/prompts/zh/import/finish-draft.md +1 -1
  49. package/prompts/zh/import/finish-ok.md +3 -1
  50. package/prompts/zh/import/notice-repair.md +2 -2
  51. package/prompts/zh/import/repair-again.md +2 -2
package/lib/client.js CHANGED
@@ -10,7 +10,7 @@ window.__ModuleLoader__.load({
10
10
  let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
11
11
  let _deepseek_ai_dsh_client_ui_slots = require("@deepseek-ai/dsh-client-ui-slots");
12
12
  let react_dom = require("react-dom");
13
- //#region src/shared/ids.ts
13
+ // src/shared/ids.ts
14
14
  /**
15
15
  * Profile entry id of the core plugin's row. Settings forms are addressed by
16
16
  * it, so the bundle patch row must use the same id.
@@ -18,14 +18,12 @@ window.__ModuleLoader__.load({
18
18
  const ENTRY_ID = "roleplay";
19
19
  /** Id shared by the sidebar entry and the main panel it opens. */
20
20
  const PANEL_ID = "roleplay";
21
- //#endregion
22
- //#region src/client/panel/PanelIcon.tsx
21
+ // src/client/panel/PanelIcon.tsx
23
22
  /** Sidebar glyph; the sidebar owns the button, label and selected state around it. */
24
23
  function PanelIcon({ size }) {
25
24
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUsersOutlineRegular, { size });
26
25
  }
27
- //#endregion
28
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/PageTabs.module.css.mjs
26
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/PageTabs.module.css.mjs
29
27
  const css$34 = ".rp_Poldga_tabs{scrollbar-width:none;gap:24px;margin-bottom:-1px;display:flex;overflow-x:auto}.rp_Poldga_tabs::-webkit-scrollbar{display:none}.rp_Poldga_tab{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:0;margin:0;padding:8px 0;font-size:13px;line-height:20px;box-shadow:inset 0 -2px #0000}.rp_Poldga_tab:hover{color:var(--dsw-alias-label-primary)}.rp_Poldga_tab[aria-selected=true]{color:var(--dsw-alias-state-business-primary);font-weight:500;box-shadow:inset 0 -2px}.rp_Poldga_tab:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}";
30
28
  const key$34 = "src/client/panel/PageTabs.module.css";
31
29
  let tag$34 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$34) + "]");
@@ -40,8 +38,7 @@ window.__ModuleLoader__.load({
40
38
  "tab": "rp_Poldga_tab",
41
39
  "tabs": "rp_Poldga_tabs"
42
40
  };
43
- //#endregion
44
- //#region src/client/panel/PageTabs.tsx
41
+ // src/client/panel/PageTabs.tsx
45
42
  /** Underlined text tabs; arrow keys, Home and End move between them. */
46
43
  function PageTabs({ tabs, value, label, onChange }) {
47
44
  const onKeyDown = (event, index) => {
@@ -80,8 +77,7 @@ window.__ModuleLoader__.load({
80
77
  }, tab.id))
81
78
  });
82
79
  }
83
- //#endregion
84
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/RoleplayPanel.module.css.mjs
80
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/panel/RoleplayPanel.module.css.mjs
85
81
  const css$33 = ".rp_ua5gBa_panel{min-height:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;display:flex}.rp_ua5gBa_header{border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;padding:12px 24px 0}.rp_ua5gBa_title{margin:0 0 4px;font-size:14px;font-weight:500;line-height:22px}.rp_ua5gBa_body{flex-direction:column;flex:1 1 0;min-height:0;padding:12px 24px 16px;display:flex}@media (width<=640px){.rp_ua5gBa_header,.rp_ua5gBa_body{padding-inline:16px}}";
86
82
  const key$33 = "src/client/panel/RoleplayPanel.module.css";
87
83
  let tag$33 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$33) + "]");
@@ -93,13 +89,12 @@ window.__ModuleLoader__.load({
93
89
  }
94
90
  tag$33.textContent = css$33;
95
91
  var RoleplayPanel_module_css_default = {
92
+ "panel": "rp_ua5gBa_panel",
96
93
  "header": "rp_ua5gBa_header",
97
94
  "body": "rp_ua5gBa_body",
98
- "title": "rp_ua5gBa_title",
99
- "panel": "rp_ua5gBa_panel"
95
+ "title": "rp_ua5gBa_title"
100
96
  };
101
- //#endregion
102
- //#region src/client/panel/RoleplayPanel.tsx
97
+ // src/client/panel/RoleplayPanel.tsx
103
98
  /** Header, page navigation and the selected page. */
104
99
  function RoleplayPanel({ t, renderSlot, useStore, actions, usePages }) {
105
100
  const idBase = (0, react.useId)();
@@ -141,8 +136,7 @@ window.__ModuleLoader__.load({
141
136
  }, active.id)]
142
137
  });
143
138
  }
144
- //#endregion
145
- //#region src/client/panel/locales.ts
139
+ // src/client/panel/locales.ts
146
140
  const dictionaries$22 = {
147
141
  en: {
148
142
  label: "Role Play",
@@ -155,8 +149,7 @@ window.__ModuleLoader__.load({
155
149
  navLabel: "角色扮演栏目"
156
150
  }
157
151
  };
158
- //#endregion
159
- //#region src/client/panel/pages-source.ts
152
+ // src/client/panel/pages-source.ts
160
153
  /**
161
154
  * Pages registered into `roleplay.page`, ordered, with their current labels.
162
155
  * Labels are functions of the active language, so the list is rebuilt when
@@ -188,8 +181,7 @@ window.__ModuleLoader__.load({
188
181
  }
189
182
  };
190
183
  }
191
- //#endregion
192
- //#region src/client/panel/panel-store.ts
184
+ // src/client/panel/panel-store.ts
193
185
  function createPanelStore() {
194
186
  return (0, _deepseek_ai_dsh_client_store.defineStore)({
195
187
  init: () => ({ page: void 0 }),
@@ -198,8 +190,7 @@ window.__ModuleLoader__.load({
198
190
  } }
199
191
  });
200
192
  }
201
- //#endregion
202
- //#region src/client/panel/index.ts
193
+ // src/client/panel/index.ts
203
194
  const NAMESPACE$14 = "roleplay.panel";
204
195
  /** Adds the Role Play entry to the sidebar and the main panel it opens. */
205
196
  function registerPanel(ctx) {
@@ -232,8 +223,7 @@ window.__ModuleLoader__.load({
232
223
  locale: NAMESPACE$14
233
224
  }, PanelIcon));
234
225
  }
235
- //#endregion
236
- //#region src/client/chat/open-chat.ts
226
+ // src/client/chat/open-chat.ts
237
227
  /** Resolves the workspace service on use, so a client without it fails at the click, not at load. */
238
228
  function createChatOpener(ctx) {
239
229
  return (chatSessionId) => {
@@ -242,8 +232,7 @@ window.__ModuleLoader__.load({
242
232
  workspace.openSession(chatSessionId);
243
233
  };
244
234
  }
245
- //#endregion
246
- //#region src/shared/text.ts
235
+ // src/shared/text.ts
247
236
  /** Remove characters from either end without a backtracking regular expression. */
248
237
  function trimCharacters(value, characters, edge = "both") {
249
238
  let start = 0;
@@ -257,8 +246,7 @@ window.__ModuleLoader__.load({
257
246
  const dot = value.lastIndexOf(".");
258
247
  return dot < 0 ? value : value.slice(0, dot);
259
248
  }
260
- //#endregion
261
- //#region src/shared/catalogue.ts
249
+ // src/shared/catalogue.ts
262
250
  /** What a credential reference is: letters, digits and `_`, not starting with a digit (DSH's grammar). */
263
251
  const CREDENTIAL_REF = /^[A-Za-z_][A-Za-z0-9_]*$/;
264
252
  /** The credential a catalogue's key is stored under when its entry names none. Names with other characters get a short checksum so that two of them never share a key. */
@@ -271,8 +259,7 @@ window.__ModuleLoader__.load({
271
259
  }
272
260
  /** The browser event settings fires after a key is stored or removed, so that the catalogue page reads its sources again. */
273
261
  const CATALOGUE_KEYS_CHANGED = "roleplay:catalogue-keys-changed";
274
- //#endregion
275
- //#region src/shared/worlds.ts
262
+ // src/shared/worlds.ts
276
263
  /** Path prefix of the plugin's HTTP API. Relative, so a mounted deployment resolves it against the page. */
277
264
  const API_PREFIX = "roleplay-api";
278
265
  function worldCoverPath(id, version) {
@@ -281,8 +268,7 @@ window.__ModuleLoader__.load({
281
268
  v: version
282
269
  })}`;
283
270
  }
284
- //#endregion
285
- //#region src/client/pages/catalogue/catalogue-api.ts
271
+ // src/client/pages/catalogue/catalogue-api.ts
286
272
  /** The host refused to go on because of something the person can decide: a world they already have, or one they changed. */
287
273
  var InstallConflict = class extends Error {
288
274
  reason;
@@ -364,8 +350,7 @@ window.__ModuleLoader__.load({
364
350
  function downloadUrl(baseUrl, versionId) {
365
351
  return `${trimCharacters(baseUrl.trim(), "/", "end")}/versions/${encodeURIComponent(versionId)}/download`;
366
352
  }
367
- //#endregion
368
- //#region src/client/pages/catalogue/catalogue-controller.ts
353
+ // src/client/pages/catalogue/catalogue-controller.ts
369
354
  const messageOf$13 = (error) => error instanceof Error ? error.message : String(error);
370
355
  /** The configured catalogues as the host sees them, read again whenever the settings change. */
371
356
  var CatalogueController = class {
@@ -416,8 +401,7 @@ window.__ModuleLoader__.load({
416
401
  this.abort.abort();
417
402
  }
418
403
  };
419
- //#endregion
420
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-card/ImportCard.module.css.mjs
404
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-card/ImportCard.module.css.mjs
421
405
  const css$32 = ".rp_5cvtma_page{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_5cvtma_header{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_5cvtma_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_5cvtma_space{flex:auto}.rp_5cvtma_error{color:var(--dsw-alias-state-error-primary);margin:0;padding:8px 16px;font-size:12px}.rp_5cvtma_body{box-sizing:border-box;flex-direction:column;flex:1 1 0;gap:20px;min-height:0;padding:20px 24px 40px;display:flex;overflow-y:auto}.rp_5cvtma_body>*{flex:none;width:100%;max-width:860px}.rp_5cvtma_top{align-items:flex-start;gap:20px;display:flex}.rp_5cvtma_picture{object-fit:cover;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);flex:0 0 120px;width:120px;height:160px}.rp_5cvtma_noPicture{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;font-size:12px;display:flex}.rp_5cvtma_about{flex-direction:column;flex:1 1 0;gap:8px;min-width:0;display:flex}.rp_5cvtma_label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:4px;font-size:12px;display:flex}.rp_5cvtma_tags{flex-wrap:wrap;gap:6px;display:flex}.rp_5cvtma_note{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_5cvtma_section{flex-direction:column;gap:8px;display:flex}.rp_5cvtma_heading{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_5cvtma_row{align-items:center;gap:8px;display:flex}.rp_5cvtma_field,.rp_5cvtma_entry{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg)}.rp_5cvtma_fieldHead,.rp_5cvtma_entryHead{box-sizing:border-box;width:100%;font:inherit;text-align:left;color:inherit;background:0 0;border:0;align-items:center;gap:8px;padding:8px 10px;display:flex}.rp_5cvtma_fieldHead{cursor:pointer}.rp_5cvtma_fieldTitle,.rp_5cvtma_entryTitle{min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px}.rp_5cvtma_entryTitle{font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0;font-size:13px}.rp_5cvtma_fieldMeta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5cvtma_field .rp_5cvtma_note,.rp_5cvtma_entry .rp_5cvtma_note{padding:0 10px 6px}.rp_5cvtma_text{white-space:pre-wrap;word-break:break-word;max-height:320px;font:inherit;color:var(--dsw-alias-label-secondary);border-top:.5px solid var(--dsw-alias-border-l4);margin:0;padding:8px 10px 10px;font-size:12px;line-height:18px;overflow:auto}.rp_5cvtma_entryOff .rp_5cvtma_entryTitle{color:var(--dsw-alias-label-tertiary);text-decoration:line-through}.rp_5cvtma_choice{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}@media (width<=640px){.rp_5cvtma_body{padding-inline:16px}.rp_5cvtma_top{flex-direction:column}.rp_5cvtma_picture{width:96px;height:128px}.rp_5cvtma_row{flex-wrap:wrap}}.rp_5cvtma_choice input{margin-top:3px}.rp_5cvtma_choiceText{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_5cvtma_preview{white-space:pre-wrap;word-break:break-word;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}";
422
406
  const key$32 = "src/client/widgets/import-card/ImportCard.module.css";
423
407
  let tag$32 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$32) + "]");
@@ -430,36 +414,35 @@ window.__ModuleLoader__.load({
430
414
  tag$32.textContent = css$32;
431
415
  var ImportCard_module_css_default = {
432
416
  "title": "rp_5cvtma_title",
417
+ "label": "rp_5cvtma_label",
418
+ "error": "rp_5cvtma_error",
419
+ "space": "rp_5cvtma_space",
420
+ "note": "rp_5cvtma_note",
421
+ "section": "rp_5cvtma_section",
422
+ "body": "rp_5cvtma_body",
423
+ "heading": "rp_5cvtma_heading",
433
424
  "row": "rp_5cvtma_row",
425
+ "entryTitle": "rp_5cvtma_entryTitle",
426
+ "fieldMeta": "rp_5cvtma_fieldMeta",
434
427
  "picture": "rp_5cvtma_picture",
435
428
  "field": "rp_5cvtma_field",
436
- "entry": "rp_5cvtma_entry",
429
+ "entryOff": "rp_5cvtma_entryOff",
437
430
  "noPicture": "rp_5cvtma_noPicture",
431
+ "header": "rp_5cvtma_header",
432
+ "top": "rp_5cvtma_top",
438
433
  "fieldHead": "rp_5cvtma_fieldHead",
439
434
  "entryHead": "rp_5cvtma_entryHead",
440
- "text": "rp_5cvtma_text",
441
435
  "fieldTitle": "rp_5cvtma_fieldTitle",
436
+ "tags": "rp_5cvtma_tags",
442
437
  "choice": "rp_5cvtma_choice",
443
- "note": "rp_5cvtma_note",
444
- "header": "rp_5cvtma_header",
445
- "entryOff": "rp_5cvtma_entryOff",
446
- "page": "rp_5cvtma_page",
447
- "choiceText": "rp_5cvtma_choiceText",
448
438
  "preview": "rp_5cvtma_preview",
449
- "tags": "rp_5cvtma_tags",
450
- "heading": "rp_5cvtma_heading",
439
+ "text": "rp_5cvtma_text",
451
440
  "about": "rp_5cvtma_about",
452
- "body": "rp_5cvtma_body",
453
- "label": "rp_5cvtma_label",
454
- "entryTitle": "rp_5cvtma_entryTitle",
455
- "fieldMeta": "rp_5cvtma_fieldMeta",
456
- "top": "rp_5cvtma_top",
457
- "section": "rp_5cvtma_section",
458
- "space": "rp_5cvtma_space",
459
- "error": "rp_5cvtma_error"
441
+ "choiceText": "rp_5cvtma_choiceText",
442
+ "entry": "rp_5cvtma_entry",
443
+ "page": "rp_5cvtma_page"
460
444
  };
461
- //#endregion
462
- //#region src/client/widgets/import-card/ImportCard.tsx
445
+ // src/client/widgets/import-card/ImportCard.tsx
463
446
  const pictureUrl = (id) => `${API_PREFIX}/worlds/import/picture?id=${encodeURIComponent(id)}`;
464
447
  /** What the person is offered first: updating the world of that name nobody changed, otherwise a new world. */
465
448
  const defaultTarget = (targets) => targets?.find((target) => target.sameName && target.edited === "no")?.worldId;
@@ -500,7 +483,7 @@ window.__ModuleLoader__.load({
500
483
  * What a card holds, for the person to look through and decide what becomes of it: which lorebook entries are read at all, and which greeting opens the story.
501
484
  * The caller says what starting and cancelling do, because a card comes from a file or from a catalogue.
502
485
  */
503
- function ImportCard({ t, preview, initialUpdate, start: begin, discard, onCancelled, onStarted }) {
486
+ function ImportCard({ t, preview, initialUpdate, start: begin, startPlain, discard, onCancelled, onStarted, onImportedPlain }) {
504
487
  const { card } = preview;
505
488
  const entries = card.book?.entries ?? [];
506
489
  const [name, setName] = (0, react.useState)(preview.choices.name);
@@ -552,6 +535,17 @@ window.__ModuleLoader__.load({
552
535
  setError(failure instanceof Error ? failure.message : String(failure));
553
536
  });
554
537
  };
538
+ const startWithoutModel = () => {
539
+ if (name.trim() === "" || starting || startPlain === void 0) return;
540
+ setStarting(true);
541
+ setError(void 0);
542
+ startPlain(choices()).then((done) => {
543
+ onImportedPlain?.(done.worldId, done.draft);
544
+ }, (failure) => {
545
+ setStarting(false);
546
+ setError(failure instanceof Error ? failure.message : String(failure));
547
+ });
548
+ };
555
549
  const cancel = () => {
556
550
  discard().finally(onCancelled);
557
551
  };
@@ -575,6 +569,17 @@ window.__ModuleLoader__.load({
575
569
  onClick: cancel,
576
570
  children: t("ic_cancel")
577
571
  }),
572
+ startPlain !== void 0 && update === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
573
+ label: t("ic_startPlainHelp"),
574
+ portal: true,
575
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
576
+ variant: "ghost",
577
+ size: "sm",
578
+ disabled: name.trim() === "" || starting,
579
+ onClick: startWithoutModel,
580
+ children: t("ic_startPlain")
581
+ })
582
+ }),
578
583
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
579
584
  variant: "primary",
580
585
  size: "sm",
@@ -905,8 +910,7 @@ window.__ModuleLoader__.load({
905
910
  ]
906
911
  });
907
912
  }
908
- //#endregion
909
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/catalogue/CataloguePage.module.css.mjs
913
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/catalogue/CataloguePage.module.css.mjs
910
914
  const css$31 = ".rp_qK1u-G_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_qK1u-G_toolbar{flex-wrap:wrap;flex:none;align-items:center;gap:8px;min-height:32px;display:flex}.rp_qK1u-G_spacer{flex:auto}.rp_qK1u-G_select,.rp_qK1u-G_search{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_qK1u-G_search{min-width:200px}.rp_qK1u-G_select:focus-visible,.rp_qK1u-G_search:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_qK1u-G_status{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.rp_qK1u-G_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_qK1u-G_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_qK1u-G_grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_qK1u-G_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);min-width:0;font:inherit;text-align:left;color:inherit;background:var(--dsw-alias-settings-card-fill);cursor:pointer;flex-direction:column;padding:0;transition:border-color .12s;display:flex;overflow:hidden}.rp_qK1u-G_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_qK1u-G_card:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_qK1u-G_cover{aspect-ratio:4/3;background:var(--dsw-alias-bg-layer-3)}.rp_qK1u-G_image{object-fit:cover;width:100%;height:100%;display:block}.rp_qK1u-G_placeholder{color:#ffffffd9;background:linear-gradient(145deg, hsl(var(--rp-hue) 38% 46%), hsl(calc(var(--rp-hue) + 35) 38% 32%));user-select:none;justify-content:center;align-items:center;width:100%;height:100%;font-size:36px;font-weight:500;display:flex}.rp_qK1u-G_body{flex-direction:column;gap:4px;padding:8px 10px 10px;display:flex}.rp_qK1u-G_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_qK1u-G_meta{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_qK1u-G_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_qK1u-G_more{justify-content:center;padding:12px 0;display:flex}.rp_qK1u-G_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_qK1u-G_form{flex-direction:column;gap:8px;display:flex}.rp_qK1u-G_field{flex-direction:column;gap:4px;display:flex}.rp_qK1u-G_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_qK1u-G_detail{flex-direction:column;gap:8px;font-size:13px;display:flex}.rp_qK1u-G_description{white-space:pre-wrap;max-height:240px;color:var(--dsw-alias-label-secondary);margin:0;overflow-y:auto}.rp_qK1u-G_success{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_qK1u-G_kinds{border-bottom:1px solid var(--dsw-alias-border-l2);flex:none;gap:16px;display:flex}.rp_qK1u-G_kind{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;margin-bottom:-1px;padding:4px 0 6px;font-size:13px}.rp_qK1u-G_kind[aria-selected=true]{border-bottom-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary);font-weight:500}.rp_qK1u-G_kind:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.rp_qK1u-G_updates{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;flex:none;align-items:center;gap:4px 8px;margin:0;padding:0;font-size:12px;list-style:none;display:flex}.rp_qK1u-G_update{border:.5px solid var(--dsw-alias-state-business-primary);border-radius:var(--dsw-radius-sm);font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;padding:2px 8px}.rp_qK1u-G_warning{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-secondary);flex-direction:column;gap:8px;padding:8px 12px;font-size:12px;display:flex}.rp_qK1u-G_warning p{margin:0}.rp_qK1u-G_changes{font-family:var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-tertiary);margin:0;padding-left:16px;font-size:12px}.rp_qK1u-G_actions{flex-wrap:wrap;gap:8px;display:flex}";
911
915
  const key$31 = "src/client/pages/catalogue/CataloguePage.module.css";
912
916
  let tag$31 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$31) + "]");
@@ -918,41 +922,40 @@ window.__ModuleLoader__.load({
918
922
  }
919
923
  tag$31.textContent = css$31;
920
924
  var CataloguePage_module_css_default = {
921
- "success": "rp_qK1u-G_success",
922
- "image": "rp_qK1u-G_image",
923
- "update": "rp_qK1u-G_update",
924
- "search": "rp_qK1u-G_search",
925
- "field": "rp_qK1u-G_field",
926
- "description": "rp_qK1u-G_description",
927
- "kind": "rp_qK1u-G_kind",
925
+ "grid": "rp_qK1u-G_grid",
928
926
  "spacer": "rp_qK1u-G_spacer",
929
- "warning": "rp_qK1u-G_warning",
930
- "page": "rp_qK1u-G_page",
931
- "status": "rp_qK1u-G_status",
932
- "body": "rp_qK1u-G_body",
933
- "updates": "rp_qK1u-G_updates",
934
- "label": "rp_qK1u-G_label",
927
+ "changes": "rp_qK1u-G_changes",
928
+ "viewport": "rp_qK1u-G_viewport",
929
+ "field": "rp_qK1u-G_field",
930
+ "image": "rp_qK1u-G_image",
931
+ "more": "rp_qK1u-G_more",
935
932
  "kinds": "rp_qK1u-G_kinds",
936
- "grid": "rp_qK1u-G_grid",
937
933
  "actions": "rp_qK1u-G_actions",
938
- "tags": "rp_qK1u-G_tags",
934
+ "status": "rp_qK1u-G_status",
935
+ "name": "rp_qK1u-G_name",
936
+ "kind": "rp_qK1u-G_kind",
937
+ "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
+ "description": "rp_qK1u-G_description",
939
944
  "select": "rp_qK1u-G_select",
940
945
  "placeholder": "rp_qK1u-G_placeholder",
941
946
  "notice": "rp_qK1u-G_notice",
942
- "changes": "rp_qK1u-G_changes",
943
- "viewport": "rp_qK1u-G_viewport",
944
- "form": "rp_qK1u-G_form",
945
- "name": "rp_qK1u-G_name",
946
- "message": "rp_qK1u-G_message",
947
+ "tags": "rp_qK1u-G_tags",
948
+ "body": "rp_qK1u-G_body",
949
+ "search": "rp_qK1u-G_search",
950
+ "toolbar": "rp_qK1u-G_toolbar",
947
951
  "card": "rp_qK1u-G_card",
948
- "more": "rp_qK1u-G_more",
949
- "detail": "rp_qK1u-G_detail",
950
952
  "meta": "rp_qK1u-G_meta",
951
- "toolbar": "rp_qK1u-G_toolbar",
952
- "cover": "rp_qK1u-G_cover"
953
+ "cover": "rp_qK1u-G_cover",
954
+ "updates": "rp_qK1u-G_updates",
955
+ "label": "rp_qK1u-G_label",
956
+ "success": "rp_qK1u-G_success"
953
957
  };
954
- //#endregion
955
- //#region src/client/pages/catalogue/ImportUrlDialog.tsx
958
+ // src/client/pages/catalogue/ImportUrlDialog.tsx
956
959
  /** 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. */
957
960
  function ImportUrlDialog({ t, onClose, onInstalled }) {
958
961
  const formId = (0, react.useId)();
@@ -1016,8 +1019,7 @@ window.__ModuleLoader__.load({
1016
1019
  })
1017
1020
  });
1018
1021
  }
1019
- //#endregion
1020
- //#region src/client/import-selection-api.ts
1022
+ // src/client/import-selection-api.ts
1021
1023
  async function reply$4(response) {
1022
1024
  if (!response.ok) {
1023
1025
  const body = await response.json().catch(() => void 0);
@@ -1095,8 +1097,7 @@ window.__ModuleLoader__.load({
1095
1097
  worldId
1096
1098
  }, signal)));
1097
1099
  }
1098
- //#endregion
1099
- //#region src/shared/sampling.ts
1100
+ // src/shared/sampling.ts
1100
1101
  /** Each control's range and the value that leaves the choice to the model's server (and so is never sent). */
1101
1102
  const SAMPLING_RANGES = {
1102
1103
  master: {
@@ -1139,8 +1140,7 @@ window.__ModuleLoader__.load({
1139
1140
  }
1140
1141
  };
1141
1142
  const SAMPLING_KEYS = Object.keys(SAMPLING_RANGES);
1142
- //#endregion
1143
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/import-selection/ImportSelection.module.css.mjs
1143
+ // \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
1144
  const css$30 = ".rp_Jx0l4q_body{flex-direction:column;gap:12px;min-width:min(640px,100%);max-height:calc(100vh - 220px);display:flex;overflow-y:auto}.rp_Jx0l4q_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_Jx0l4q_bar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Jx0l4q_count{color:var(--dsw-alias-label-tertiary);margin-right:auto;font-size:12px}.rp_Jx0l4q_list{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;max-height:max(120px,min(420px,100vh - 560px));margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.rp_Jx0l4q_row{border-bottom:.5px solid var(--dsw-alias-border-l3);gap:8px;padding:6px 8px;display:flex}.rp_Jx0l4q_row:last-child{border-bottom:0}.rp_Jx0l4q_row[data-usable=false]{opacity:.55}.rp_Jx0l4q_text{min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;flex:1 1 0;gap:2px;font-size:13px;display:flex}.rp_Jx0l4q_meta{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px}.rp_Jx0l4q_note{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Jx0l4q_full{max-height:200px;font:12px/18px var(--dsw-font-mono,monospace);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--dsw-alias-bg-layer-1);border-radius:var(--dsw-radius-sm);margin:4px 0 0;padding:6px 8px;overflow:auto}.rp_Jx0l4q_sampling{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);flex-direction:column;gap:4px;padding:8px;display:flex}.rp_Jx0l4q_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Jx0l4q_extra{display:block}";
1145
1145
  const key$30 = "src/client/widgets/import-selection/ImportSelection.module.css";
1146
1146
  let tag$30 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$30) + "]");
@@ -1152,22 +1152,21 @@ window.__ModuleLoader__.load({
1152
1152
  }
1153
1153
  tag$30.textContent = css$30;
1154
1154
  var ImportSelection_module_css_default = {
1155
+ "sampling": "rp_Jx0l4q_sampling",
1155
1156
  "text": "rp_Jx0l4q_text",
1156
- "list": "rp_Jx0l4q_list",
1157
- "extra": "rp_Jx0l4q_extra",
1158
- "note": "rp_Jx0l4q_note",
1159
- "help": "rp_Jx0l4q_help",
1160
- "body": "rp_Jx0l4q_body",
1157
+ "count": "rp_Jx0l4q_count",
1161
1158
  "bar": "rp_Jx0l4q_bar",
1162
- "full": "rp_Jx0l4q_full",
1163
- "sampling": "rp_Jx0l4q_sampling",
1164
- "error": "rp_Jx0l4q_error",
1159
+ "body": "rp_Jx0l4q_body",
1160
+ "help": "rp_Jx0l4q_help",
1165
1161
  "meta": "rp_Jx0l4q_meta",
1162
+ "note": "rp_Jx0l4q_note",
1163
+ "full": "rp_Jx0l4q_full",
1166
1164
  "row": "rp_Jx0l4q_row",
1167
- "count": "rp_Jx0l4q_count"
1165
+ "list": "rp_Jx0l4q_list",
1166
+ "error": "rp_Jx0l4q_error",
1167
+ "extra": "rp_Jx0l4q_extra"
1168
1168
  };
1169
- //#endregion
1170
- //#region src/client/widgets/import-selection/ImportSelection.tsx
1169
+ // src/client/widgets/import-selection/ImportSelection.tsx
1171
1170
  const messageOf$12 = (failure) => failure instanceof Error ? failure.message : String(failure);
1172
1171
  /**
1173
1172
  * The choice of what an imported preset or lorebook brings: every item the file offers, each ticked or not, and the file's sampling. Only the ticked items reach the conversion.
@@ -1395,8 +1394,7 @@ window.__ModuleLoader__.load({
1395
1394
  })
1396
1395
  });
1397
1396
  }
1398
- //#endregion
1399
- //#region src/client/pages/catalogue/WorldDialog.tsx
1397
+ // src/client/pages/catalogue/WorldDialog.tsx
1400
1398
  const sizeOf = (bytes) => bytes >= 1048576 ? `${(bytes / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`;
1401
1399
  const dateOf = (iso) => {
1402
1400
  const date = new Date(iso);
@@ -1720,8 +1718,7 @@ window.__ModuleLoader__.load({
1720
1718
  onConfirm: importChosen
1721
1719
  })] });
1722
1720
  }
1723
- //#endregion
1724
- //#region src/client/pages/catalogue/CataloguePage.tsx
1721
+ // src/client/pages/catalogue/CataloguePage.tsx
1725
1722
  const hueOf$5 = (name) => Array.from(name).reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 360, 0);
1726
1723
  /** The worlds of the configured catalogues, to look through and install. */
1727
1724
  function CataloguePage({ t, useCatalogue, load, openChat }) {
@@ -2120,8 +2117,7 @@ window.__ModuleLoader__.load({
2120
2117
  ]
2121
2118
  });
2122
2119
  }
2123
- //#endregion
2124
- //#region src/client/i18n.ts
2120
+ // src/client/i18n.ts
2125
2121
  /** A feature's copy together with the copy of a shared piece it embeds. */
2126
2122
  function withDictionaries(own, shared) {
2127
2123
  return Object.fromEntries(Object.keys(own).map((locale) => [locale, {
@@ -2133,8 +2129,7 @@ window.__ModuleLoader__.load({
2133
2129
  function prefixed(dictionaries, prefix) {
2134
2130
  return Object.fromEntries(Object.keys(dictionaries).map((locale) => [locale, Object.fromEntries(Object.entries(dictionaries[locale]).map(([key, value]) => [`${prefix}${key}`, value]))]));
2135
2131
  }
2136
- //#endregion
2137
- //#region src/client/widgets/import-card/locales.ts
2132
+ // src/client/widgets/import-card/locales.ts
2138
2133
  const dictionaries$21 = {
2139
2134
  en: {
2140
2135
  ic_title: "Import a character card",
@@ -2177,6 +2172,8 @@ window.__ModuleLoader__.load({
2177
2172
  ic_noKeys: "No keys",
2178
2173
  ic_scripts: "{count} scripts and settings of the tool that made the card are not imported.",
2179
2174
  ic_start: "Import",
2175
+ ic_startPlain: "Import without a model",
2176
+ ic_startPlainHelp: "Carries over the card's own character, its lorebook (for the game master only) and its instructions as they are written, with no model: places, factions and other people are not read out of it.",
2180
2177
  ic_starting: "Starting…",
2181
2178
  ic_startFailed: "Could not start the import: {message}",
2182
2179
  ic_cancel: "Cancel",
@@ -2223,14 +2220,15 @@ window.__ModuleLoader__.load({
2223
2220
  ic_noKeys: "无关键词",
2224
2221
  ic_scripts: "制作角色卡的工具的 {count} 个脚本和设置不会导入。",
2225
2222
  ic_start: "导入",
2223
+ ic_startPlain: "不使用模型导入",
2224
+ ic_startPlainHelp: "不使用模型,原样带入卡片自己的角色、世界书(仅游戏主持人可读)和指令;不会从中识别地点、势力或其他人物。",
2226
2225
  ic_starting: "正在开始…",
2227
2226
  ic_startFailed: "无法开始导入:{message}",
2228
2227
  ic_cancel: "取消",
2229
2228
  ic_empty: "(空)"
2230
2229
  }
2231
2230
  };
2232
- //#endregion
2233
- //#region src/client/widgets/import-selection/locales.ts
2231
+ // src/client/widgets/import-selection/locales.ts
2234
2232
  const dictionaries$20 = {
2235
2233
  en: {
2236
2234
  is_title_preset: "Choose what to import from {name}",
@@ -2503,8 +2501,7 @@ window.__ModuleLoader__.load({
2503
2501
  openChat: "打开对话"
2504
2502
  }
2505
2503
  }, dictionaries$20), dictionaries$21);
2506
- //#endregion
2507
- //#region src/client/pages/catalogue/index.ts
2504
+ // src/client/pages/catalogue/index.ts
2508
2505
  const NAMESPACE$13 = "roleplay.catalogue";
2509
2506
  /** Adds the Catalogue page to the Role Play panel: worlds of the catalogues set up in the settings. */
2510
2507
  function registerCataloguePage(ctx) {
@@ -2535,12 +2532,10 @@ window.__ModuleLoader__.load({
2535
2532
  inject: () => catalogue.inject()
2536
2533
  }, CataloguePage));
2537
2534
  }
2538
- //#endregion
2539
- //#region src/shared/avatars.ts
2535
+ // src/shared/avatars.ts
2540
2536
  /** 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. */
2541
2537
  const AVATARS_WORLD_ID = "@avatars";
2542
- //#endregion
2543
- //#region src/client/avatars-api.ts
2538
+ // src/client/avatars-api.ts
2544
2539
  async function failure$1(response) {
2545
2540
  const body = await response.json().catch(() => void 0);
2546
2541
  const problems = Array.isArray(body?.problems) ? body.problems.join("; ") : void 0;
@@ -2591,8 +2586,7 @@ window.__ModuleLoader__.load({
2591
2586
  if (!response.ok) throw await failure$1(response);
2592
2587
  return (await response.json()).added;
2593
2588
  }
2594
- //#endregion
2595
- //#region src/client/pages/avatars/avatars-controller.ts
2589
+ // src/client/pages/avatars/avatars-controller.ts
2596
2590
  const messageOf$10 = (error) => error instanceof Error ? error.message : String(error);
2597
2591
  /** Reads the player avatars from the host and makes and removes them. */
2598
2592
  var AvatarsController = class {
@@ -2650,8 +2644,7 @@ window.__ModuleLoader__.load({
2650
2644
  }
2651
2645
  }
2652
2646
  };
2653
- //#endregion
2654
- //#region src/client/world-editor/source.ts
2647
+ // src/client/world-editor/source.ts
2655
2648
  /** The chat or the world is not something that can be edited: it does not exist, or is not a roleplay session. */
2656
2649
  var NotEditableError = class extends Error {};
2657
2650
  /** What the host said when it refused an edit, in its words. */
@@ -2728,8 +2721,7 @@ window.__ModuleLoader__.load({
2728
2721
  }];
2729
2722
  });
2730
2723
  }
2731
- //#endregion
2732
- //#region src/client/world-editor/authored-world-source.ts
2724
+ // src/client/world-editor/authored-world-source.ts
2733
2725
  /** An authored world's files, shared by the catalogue editor and its authoring chat. */
2734
2726
  function worldSource(worldId) {
2735
2727
  const id = encodeURIComponent(worldId);
@@ -2775,8 +2767,7 @@ window.__ModuleLoader__.load({
2775
2767
  uploadImage: async (kind, key, file, signal) => await postFile(`${API_PREFIX}/worlds/state/${kind}/image/upload?id=${id}&key=${encodeURIComponent(key)}`, file, signal)
2776
2768
  };
2777
2769
  }
2778
- //#endregion
2779
- //#region ../dsh-roleplay-model/src/character.ts
2770
+ // ../dsh-roleplay-model/src/character.ts
2780
2771
  const CHARACTER_ROLES = ["playable", "npc"];
2781
2772
  const CHARACTER_TIERS = [
2782
2773
  "principal",
@@ -2784,8 +2775,7 @@ window.__ModuleLoader__.load({
2784
2775
  "background"
2785
2776
  ];
2786
2777
  const CHARACTER_KINDS = ["person", "group"];
2787
- //#endregion
2788
- //#region ../dsh-roleplay-model/src/intent.ts
2778
+ // ../dsh-roleplay-model/src/intent.ts
2789
2779
  const INTENT_STATUSES = [
2790
2780
  "active",
2791
2781
  "paused",
@@ -2793,15 +2783,13 @@ window.__ModuleLoader__.load({
2793
2783
  "failed",
2794
2784
  "abandoned"
2795
2785
  ];
2796
- //#endregion
2797
- //#region ../dsh-roleplay-model/src/clock.ts
2786
+ // ../dsh-roleplay-model/src/clock.ts
2798
2787
  /**
2799
2788
  * How the story's time passes: `simulated` moves only when the story does (the game master says how
2800
2789
  * long things take and may skip ahead), `real` follows the wall clock.
2801
2790
  */
2802
2791
  const CLOCK_MODES = ["simulated", "real"];
2803
- //#endregion
2804
- //#region ../dsh-roleplay-model/src/variable.ts
2792
+ // ../dsh-roleplay-model/src/variable.ts
2805
2793
  /** What a variable holds: a number within bounds, a yes or no, or one of a list of words. */
2806
2794
  const VARIABLE_KINDS = [
2807
2795
  "number",
@@ -2925,8 +2913,7 @@ window.__ModuleLoader__.load({
2925
2913
  always: false,
2926
2914
  builtin: true
2927
2915
  }));
2928
- //#endregion
2929
- //#region ../dsh-roleplay-model/src/lore.ts
2916
+ // ../dsh-roleplay-model/src/lore.ts
2930
2917
  const LORE_KINDS = [
2931
2918
  "history",
2932
2919
  "culture",
@@ -2940,8 +2927,7 @@ window.__ModuleLoader__.load({
2940
2927
  ];
2941
2928
  /** Who knows an entry: `everyone` is common knowledge of the story's world, `listed` only the characters that have a knowledge edge to it (the game master always reads all of it). */
2942
2929
  const LORE_SCOPES = ["everyone", "listed"];
2943
- //#endregion
2944
- //#region src/client/world-editor/character-draft.ts
2930
+ // src/client/world-editor/character-draft.ts
2945
2931
  const lines$1 = (text) => text.split("\n").map((line) => line.trim()).filter((line) => line !== "");
2946
2932
  const commas = (text) => text.split(",").map((part) => part.trim()).filter((part) => part !== "");
2947
2933
  function toDraft(character) {
@@ -3048,8 +3034,7 @@ window.__ModuleLoader__.load({
3048
3034
  return edit;
3049
3035
  }
3050
3036
  const isDirty = (character, draft) => Object.keys(editOf$1(character, draft)).length > 0;
3051
- //#endregion
3052
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/CharactersPanel.module.css.mjs
3037
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/CharactersPanel.module.css.mjs
3053
3038
  const css$29 = ".rp_5ZMIxq_panel{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.rp_5ZMIxq_tabs{border-bottom:.5px solid var(--dsw-alias-border-l2);flex:none;gap:4px;padding:0 24px;display:flex;overflow-x:auto}.rp_5ZMIxq_tab{font:inherit;white-space:nowrap;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;flex:none;margin-bottom:-1px;padding:12px 10px 10px;font-size:13px;line-height:20px}.rp_5ZMIxq_tabOn{color:var(--dsw-alias-state-business-primary);border-bottom-color:var(--dsw-alias-state-business-primary);font-weight:500}.rp_5ZMIxq_body{flex:1 1 0;min-height:0;overflow-y:auto}.rp_5ZMIxq_sheet{box-sizing:border-box;flex-direction:column;gap:20px;max-width:760px;padding:24px 24px 240px;display:flex}.rp_5ZMIxq_head{align-items:flex-start;gap:20px;display:flex}.rp_5ZMIxq_portrait{aspect-ratio:3/4;object-fit:cover;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:150px;height:auto;display:block}.rp_5ZMIxq_portraitBox{border-radius:var(--dsw-radius-lg);width:150px;height:200px;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;flex:0 0 150px;padding:0;display:block;position:relative}.rp_5ZMIxq_portraitBox:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.rp_5ZMIxq_portraitBox:disabled{cursor:not-allowed}.rp_5ZMIxq_portraitAction{box-sizing:border-box;border-radius:0 0 var(--dsw-radius-lg) var(--dsw-radius-lg);color:#fff;text-align:center;opacity:0;background:#0000009e;padding:7px 6px;font-size:12px;line-height:16px;transition:opacity .12s;position:absolute;bottom:1px;left:1px;right:1px}.rp_5ZMIxq_portraitBox:hover .rp_5ZMIxq_portraitAction,.rp_5ZMIxq_portraitBox:focus-visible .rp_5ZMIxq_portraitAction,.rp_5ZMIxq_portraitBox:disabled .rp_5ZMIxq_portraitAction{opacity:1}.rp_5ZMIxq_portraitError,.rp_5ZMIxq_portraitHint{margin:12px 24px 0;font-size:12px}.rp_5ZMIxq_portraitError{color:var(--dsw-alias-state-danger-primary)}.rp_5ZMIxq_portraitHint{color:var(--dsw-alias-label-secondary)}.rp_5ZMIxq_placeholder{box-sizing:border-box;color:var(--dsw-alias-label-secondary);flex-direction:column;justify-content:center;align-items:center;gap:8px;display:flex}.rp_5ZMIxq_initial{opacity:.6;font-size:48px;font-weight:500;line-height:1}.rp_5ZMIxq_missing{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5ZMIxq_meta{flex-direction:column;flex:1 1 0;gap:10px;min-width:0;display:flex}.rp_5ZMIxq_section{border-top:.5px solid var(--dsw-alias-border-l4);flex-direction:column;gap:6px;padding-top:16px;display:flex}.rp_5ZMIxq_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:13px;font-weight:500;line-height:20px}.rp_5ZMIxq_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:0 24px;font-size:13px}.rp_5ZMIxq_section .rp_5ZMIxq_empty{padding:0}.rp_5ZMIxq_tabsSpace{flex:auto}.rp_5ZMIxq_voiceInline{min-width:220px;color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;display:flex}.rp_5ZMIxq_bar{border-bottom:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-2);flex:none;justify-content:flex-end;align-items:center;gap:8px;padding:6px 24px;display:flex}.rp_5ZMIxq_barText{color:var(--dsw-alias-label-secondary);margin-right:auto;font-size:12px}.rp_5ZMIxq_nameInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:var(--dsw-alias-label-primary);font:inherit;padding:4px 8px;font-size:14px;line-height:22px}.rp_5ZMIxq_row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_5ZMIxq_grid{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:10px 12px;display:grid}.rp_5ZMIxq_field{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_5ZMIxq_wide{grid-column:1/-1}.rp_5ZMIxq_label,.rp_5ZMIxq_help{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_5ZMIxq_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.rp_5ZMIxq_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:inherit;font:inherit;padding:4px 8px;font-size:13px}.rp_5ZMIxq_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:96px;color:inherit;font:inherit;resize:vertical;padding:6px 8px;font-size:13px;line-height:20px}.rp_5ZMIxq_goal{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);flex-direction:column;gap:8px;padding:10px;display:flex}.rp_5ZMIxq_row>.rp_5ZMIxq_select{width:auto;min-width:110px}.rp_5ZMIxq_select:focus-visible,.rp_5ZMIxq_area:focus-visible,.rp_5ZMIxq_nameInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}@media (width<=640px){.rp_5ZMIxq_sheet{padding-inline:16px}.rp_5ZMIxq_head{flex-direction:column}.rp_5ZMIxq_portraitBox,.rp_5ZMIxq_portrait{width:120px}.rp_5ZMIxq_portraitBox{flex-basis:120px;height:160px}.rp_5ZMIxq_bar{flex-wrap:wrap;padding-inline:16px}.rp_5ZMIxq_voiceInline{width:100%;min-width:0}}";
3054
3039
  const key$29 = "src/client/world-editor/CharactersPanel.module.css";
3055
3040
  let tag$29 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$29) + "]");
@@ -3061,43 +3046,42 @@ window.__ModuleLoader__.load({
3061
3046
  }
3062
3047
  tag$29.textContent = css$29;
3063
3048
  var CharactersPanel_module_css_default = {
3049
+ "help": "rp_5ZMIxq_help",
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",
3055
+ "row": "rp_5ZMIxq_row",
3064
3056
  "sheet": "rp_5ZMIxq_sheet",
3065
- "placeholder": "rp_5ZMIxq_placeholder",
3066
- "empty": "rp_5ZMIxq_empty",
3067
- "head": "rp_5ZMIxq_head",
3068
- "label": "rp_5ZMIxq_label",
3069
- "sectionTitle": "rp_5ZMIxq_sectionTitle",
3070
3057
  "body": "rp_5ZMIxq_body",
3071
- "portraitBox": "rp_5ZMIxq_portraitBox",
3072
- "section": "rp_5ZMIxq_section",
3073
- "portraitError": "rp_5ZMIxq_portraitError",
3074
- "help": "rp_5ZMIxq_help",
3058
+ "area": "rp_5ZMIxq_area",
3059
+ "goal": "rp_5ZMIxq_goal",
3060
+ "bar": "rp_5ZMIxq_bar",
3061
+ "portrait": "rp_5ZMIxq_portrait",
3075
3062
  "wide": "rp_5ZMIxq_wide",
3076
- "tabsSpace": "rp_5ZMIxq_tabsSpace",
3077
- "row": "rp_5ZMIxq_row",
3078
- "initial": "rp_5ZMIxq_initial",
3063
+ "head": "rp_5ZMIxq_head",
3064
+ "placeholder": "rp_5ZMIxq_placeholder",
3065
+ "tabOn": "rp_5ZMIxq_tabOn",
3079
3066
  "barText": "rp_5ZMIxq_barText",
3080
- "tab": "rp_5ZMIxq_tab",
3081
- "portraitHint": "rp_5ZMIxq_portraitHint",
3082
- "tabs": "rp_5ZMIxq_tabs",
3083
- "nameInput": "rp_5ZMIxq_nameInput",
3084
- "error": "rp_5ZMIxq_error",
3085
- "area": "rp_5ZMIxq_area",
3086
- "field": "rp_5ZMIxq_field",
3087
- "panel": "rp_5ZMIxq_panel",
3088
3067
  "portraitAction": "rp_5ZMIxq_portraitAction",
3089
- "bar": "rp_5ZMIxq_bar",
3090
- "meta": "rp_5ZMIxq_meta",
3091
3068
  "missing": "rp_5ZMIxq_missing",
3069
+ "tabs": "rp_5ZMIxq_tabs",
3070
+ "tab": "rp_5ZMIxq_tab",
3071
+ "meta": "rp_5ZMIxq_meta",
3072
+ "tabsSpace": "rp_5ZMIxq_tabsSpace",
3092
3073
  "grid": "rp_5ZMIxq_grid",
3093
- "portrait": "rp_5ZMIxq_portrait",
3094
- "goal": "rp_5ZMIxq_goal",
3074
+ "field": "rp_5ZMIxq_field",
3075
+ "empty": "rp_5ZMIxq_empty",
3076
+ "nameInput": "rp_5ZMIxq_nameInput",
3077
+ "portraitBox": "rp_5ZMIxq_portraitBox",
3078
+ "initial": "rp_5ZMIxq_initial",
3079
+ "panel": "rp_5ZMIxq_panel",
3080
+ "label": "rp_5ZMIxq_label",
3095
3081
  "select": "rp_5ZMIxq_select",
3096
- "voiceInline": "rp_5ZMIxq_voiceInline",
3097
- "tabOn": "rp_5ZMIxq_tabOn"
3082
+ "sectionTitle": "rp_5ZMIxq_sectionTitle"
3098
3083
  };
3099
- //#endregion
3100
- //#region src/client/world-editor/EditorTabs.tsx
3084
+ // src/client/world-editor/EditorTabs.tsx
3101
3085
  /** Adds expected arrow, Home and End navigation to an existing editor tab strip. */
3102
3086
  function navigateEditorTabs(event) {
3103
3087
  if (event.defaultPrevented || !(event.target instanceof HTMLButtonElement) || event.target.getAttribute("role") !== "tab") return;
@@ -3143,8 +3127,7 @@ window.__ModuleLoader__.load({
3143
3127
  }, tab.key)), children]
3144
3128
  });
3145
3129
  }
3146
- //#endregion
3147
- //#region src/client/world-editor/CharactersPanel.tsx
3130
+ // src/client/world-editor/CharactersPanel.tsx
3148
3131
  /** A steady colour per name, for a portrait that does not exist yet. */
3149
3132
  function hueOf$4(name) {
3150
3133
  let hash = 0;
@@ -3812,8 +3795,7 @@ window.__ModuleLoader__.load({
3812
3795
  ]
3813
3796
  });
3814
3797
  }
3815
- //#endregion
3816
- //#region src/client/world-editor/EntityImage.tsx
3798
+ // src/client/world-editor/EntityImage.tsx
3817
3799
  /** A steady colour per name, for a picture that does not exist yet. */
3818
3800
  function hueOf$3(name) {
3819
3801
  let hash = 0;
@@ -3906,8 +3888,7 @@ window.__ModuleLoader__.load({
3906
3888
  ]
3907
3889
  });
3908
3890
  }
3909
- //#endregion
3910
- //#region src/client/world-editor/EntityPanels.tsx
3891
+ // src/client/world-editor/EntityPanels.tsx
3911
3892
  const split = (value) => value.split(",").map((part) => part.trim()).filter(Boolean);
3912
3893
  const visual = (description, tags, negativeTags, globalId) => description.trim() === "" ? null : {
3913
3894
  description: description.trim(),
@@ -4542,8 +4523,7 @@ window.__ModuleLoader__.load({
4542
4523
  ]
4543
4524
  });
4544
4525
  }
4545
- //#endregion
4546
- //#region src/client/world-editor/FactionsPanel.tsx
4526
+ // src/client/world-editor/FactionsPanel.tsx
4547
4527
  const list$2 = (text) => text.split(",").map((value) => value.trim()).filter(Boolean);
4548
4528
  function FactionsPanel({ t, world, source, onChanged, actions }) {
4549
4529
  const [chosen, setChosen] = (0, react.useState)();
@@ -4806,8 +4786,7 @@ window.__ModuleLoader__.load({
4806
4786
  ]
4807
4787
  });
4808
4788
  }
4809
- //#endregion
4810
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/RelationsPanel.module.css.mjs
4789
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/RelationsPanel.module.css.mjs
4811
4790
  const css$28 = ".rp_7pEHTW_panel{flex-direction:column;flex:1 1 0;min-height:0;display:flex;position:relative}.rp_7pEHTW_toolbar{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;align-items:center;gap:4px;padding:8px 16px;display:flex}.rp_7pEHTW_filter{border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:4px 10px}.rp_7pEHTW_filterOn{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_filter:focus-visible,.rp_7pEHTW_edge:focus-visible,.rp_7pEHTW_graphEdge:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:-2px}.rp_7pEHTW_space{flex:1}.rp_7pEHTW_perspective{color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;font-size:12px;display:flex}.rp_7pEHTW_perspective select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);max-width:180px;min-height:32px;color:inherit;padding:4px 8px}.rp_7pEHTW_workspace{flex:1 1 0;grid-template-columns:minmax(220px,34%) minmax(320px,1fr);min-height:0;display:grid}.rp_7pEHTW_list{border-right:.5px solid var(--dsw-alias-border-l3);overflow-y:auto}.rp_7pEHTW_edge{border:0;border-bottom:.5px solid var(--dsw-alias-border-l4);width:100%;min-height:48px;color:inherit;text-align:left;cursor:pointer;background:0 0;flex-direction:column;gap:2px;padding:8px 16px;display:flex}.rp_7pEHTW_edgeOn{background:var(--dsw-alias-bg-layer-2)}.rp_7pEHTW_edgeTitle{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.rp_7pEHTW_edgeKind{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_7pEHTW_empty{color:var(--dsw-alias-label-tertiary);padding:20px}.rp_7pEHTW_inspector{min-width:0;padding:24px 24px 240px;overflow-y:auto}.rp_7pEHTW_head h2{margin:0 0 8px;font-size:16px}.rp_7pEHTW_entities{color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:6px;display:flex}.rp_7pEHTW_notice{color:var(--dsw-alias-label-secondary);margin:24px 0}.rp_7pEHTW_form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px;display:grid}.rp_7pEHTW_form label{color:var(--dsw-alias-label-tertiary);flex-direction:column;gap:5px;font-size:12px;display:flex}.rp_7pEHTW_form select,.rp_7pEHTW_form textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:inherit;font:inherit;padding:6px 8px}.rp_7pEHTW_form textarea{resize:vertical;min-height:96px}.rp_7pEHTW_form select:focus-visible,.rp_7pEHTW_form textarea:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_7pEHTW_wide{grid-column:1/-1}.rp_7pEHTW_metrics{grid-column:1/-1;grid-template-columns:repeat(4,minmax(90px,1fr));gap:10px;display:grid}.rp_7pEHTW_check{align-self:end;align-items:center;min-height:32px;flex-direction:row!important}.rp_7pEHTW_actions{border-top:.5px solid var(--dsw-alias-border-l4);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;margin-top:28px;padding-top:12px;display:flex}.rp_7pEHTW_status{color:var(--dsw-alias-label-secondary);margin-right:auto}.rp_7pEHTW_error{color:var(--dsw-alias-state-error-primary);margin-right:auto}.rp_7pEHTW_graph{background:radial-gradient(circle, var(--dsw-alias-bg-layer-2), transparent 70%);flex:1 1 0;min-height:360px;position:relative;overflow:hidden}.rp_7pEHTW_graph svg{width:100%;height:100%;min-height:520px}.rp_7pEHTW_graphEdge{cursor:pointer;stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_graphEdge:hover,.rp_7pEHTW_graphEdgeOn{stroke:var(--dsw-alias-state-business-primary);stroke-width:4px}.rp_7pEHTW_node circle{fill:var(--dsw-alias-bg-layer-1);stroke:var(--dsw-alias-border-l1);stroke-width:2px}.rp_7pEHTW_node_character circle{fill:color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_location circle{fill:color-mix(in srgb, #4a9 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_item circle{fill:color-mix(in srgb, #c90 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node_faction circle{fill:color-mix(in srgb, #96c 20%, var(--dsw-alias-bg-layer-1))}.rp_7pEHTW_node text{fill:var(--dsw-alias-label-primary);pointer-events:none;font-size:12px}.rp_7pEHTW_graphInspector{box-sizing:border-box;border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-1);width:min(480px,100% - 40px);max-height:62%;box-shadow:var(--dsw-elevation-panel);border:0;padding:18px;position:absolute;bottom:20px;right:20px;overflow-y:auto}@media (width<=760px){.rp_7pEHTW_workspace{grid-template-columns:1fr}.rp_7pEHTW_list{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l3);max-height:220px}.rp_7pEHTW_inspector{padding-inline:16px}.rp_7pEHTW_form{grid-template-columns:1fr}.rp_7pEHTW_wide,.rp_7pEHTW_metrics{grid-column:1}.rp_7pEHTW_metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.rp_7pEHTW_graphInspector{width:calc(100% - 24px);bottom:12px;right:12px}}@media (pointer:coarse){.rp_7pEHTW_filter{min-height:44px}}";
4812
4791
  const key$28 = "src/client/world-editor/RelationsPanel.module.css";
4813
4792
  let tag$28 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$28) + "]");
@@ -4819,42 +4798,41 @@ window.__ModuleLoader__.load({
4819
4798
  }
4820
4799
  tag$28.textContent = css$28;
4821
4800
  var RelationsPanel_module_css_default = {
4822
- "error": "rp_7pEHTW_error",
4823
- "node_location": "rp_7pEHTW_node_location",
4824
- "node_faction": "rp_7pEHTW_node_faction",
4825
- "edgeOn": "rp_7pEHTW_edgeOn",
4826
- "workspace": "rp_7pEHTW_workspace",
4827
- "node_item": "rp_7pEHTW_node_item",
4828
- "entities": "rp_7pEHTW_entities",
4829
- "node_character": "rp_7pEHTW_node_character",
4801
+ "wide": "rp_7pEHTW_wide",
4830
4802
  "space": "rp_7pEHTW_space",
4831
- "list": "rp_7pEHTW_list",
4832
- "node": "rp_7pEHTW_node",
4833
- "filterOn": "rp_7pEHTW_filterOn",
4834
- "edgeKind": "rp_7pEHTW_edgeKind",
4835
- "notice": "rp_7pEHTW_notice",
4836
- "graphInspector": "rp_7pEHTW_graphInspector",
4803
+ "status": "rp_7pEHTW_status",
4804
+ "node_location": "rp_7pEHTW_node_location",
4837
4805
  "actions": "rp_7pEHTW_actions",
4838
- "check": "rp_7pEHTW_check",
4839
- "graphEdge": "rp_7pEHTW_graphEdge",
4840
- "panel": "rp_7pEHTW_panel",
4841
- "inspector": "rp_7pEHTW_inspector",
4842
- "wide": "rp_7pEHTW_wide",
4843
- "empty": "rp_7pEHTW_empty",
4844
- "metrics": "rp_7pEHTW_metrics",
4845
4806
  "filter": "rp_7pEHTW_filter",
4807
+ "error": "rp_7pEHTW_error",
4808
+ "edge": "rp_7pEHTW_edge",
4809
+ "inspector": "rp_7pEHTW_inspector",
4810
+ "workspace": "rp_7pEHTW_workspace",
4846
4811
  "head": "rp_7pEHTW_head",
4812
+ "toolbar": "rp_7pEHTW_toolbar",
4847
4813
  "graphEdgeOn": "rp_7pEHTW_graphEdgeOn",
4848
- "status": "rp_7pEHTW_status",
4849
- "perspective": "rp_7pEHTW_perspective",
4850
- "edge": "rp_7pEHTW_edge",
4814
+ "node_item": "rp_7pEHTW_node_item",
4815
+ "filterOn": "rp_7pEHTW_filterOn",
4851
4816
  "edgeTitle": "rp_7pEHTW_edgeTitle",
4817
+ "node_character": "rp_7pEHTW_node_character",
4818
+ "empty": "rp_7pEHTW_empty",
4819
+ "list": "rp_7pEHTW_list",
4820
+ "graphEdge": "rp_7pEHTW_graphEdge",
4852
4821
  "form": "rp_7pEHTW_form",
4822
+ "perspective": "rp_7pEHTW_perspective",
4853
4823
  "graph": "rp_7pEHTW_graph",
4854
- "toolbar": "rp_7pEHTW_toolbar"
4824
+ "notice": "rp_7pEHTW_notice",
4825
+ "node": "rp_7pEHTW_node",
4826
+ "metrics": "rp_7pEHTW_metrics",
4827
+ "edgeOn": "rp_7pEHTW_edgeOn",
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"
4855
4834
  };
4856
- //#endregion
4857
- //#region src/client/world-editor/RelationsPanel.tsx
4835
+ // src/client/world-editor/RelationsPanel.tsx
4858
4836
  const title = (relation) => `${relation.from.name} → ${relation.to.name}`;
4859
4837
  const numeric = (value) => Number.isFinite(Number(value)) ? Number(value) : 0;
4860
4838
  const kindLabel = (t, kind) => t(`relation${kind[0].toUpperCase()}${kind.slice(1)}`);
@@ -5521,8 +5499,7 @@ window.__ModuleLoader__.load({
5521
5499
  onChange: (event) => onChange(Math.max(min, Math.min(1, numeric(event.target.value))))
5522
5500
  })] });
5523
5501
  }
5524
- //#endregion
5525
- //#region src/client/world-editor/LorePanel.tsx
5502
+ // src/client/world-editor/LorePanel.tsx
5526
5503
  function LorePanel({ t, world: rawWorld, source, onChanged, actions }) {
5527
5504
  const world = {
5528
5505
  ...rawWorld,
@@ -5875,8 +5852,7 @@ window.__ModuleLoader__.load({
5875
5852
  ]
5876
5853
  });
5877
5854
  }
5878
- //#endregion
5879
- //#region src/client/world-editor/PlotsPanel.tsx
5855
+ // src/client/world-editor/PlotsPanel.tsx
5880
5856
  const newPlot = () => ({
5881
5857
  id: "new-plot",
5882
5858
  name: "New plot",
@@ -6021,8 +5997,7 @@ window.__ModuleLoader__.load({
6021
5997
  ]
6022
5998
  });
6023
5999
  }
6024
- //#endregion
6025
- //#region src/shared/interface-pack.ts
6000
+ // src/shared/interface-pack.ts
6026
6001
  /** The places in the interface that take a surface. */
6027
6002
  const SURFACE_NAMES = [
6028
6003
  "hud",
@@ -6062,8 +6037,7 @@ window.__ModuleLoader__.load({
6062
6037
  max: 100
6063
6038
  }
6064
6039
  };
6065
- //#endregion
6066
- //#region src/client/widgets/pack-frame/frame-api.ts
6040
+ // src/client/widgets/pack-frame/frame-api.ts
6067
6041
  const enc$1 = encodeURIComponent;
6068
6042
  async function read$3(response, what) {
6069
6043
  if (!response.ok) throw new Error((await response.json().catch(() => ({}))).message ?? `${what} (${response.status})`);
@@ -6213,8 +6187,7 @@ window.__ModuleLoader__.load({
6213
6187
  }
6214
6188
  }
6215
6189
  };
6216
- //#endregion
6217
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pack-frame/PackFrame.module.css.mjs
6190
+ // \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
6218
6191
  const css$27 = ".rp_h_sbFq_frame{background:0 0;border:0;width:100%;display:block}.rp_h_sbFq_fill{height:100%;min-height:0}.rp_h_sbFq_message{color:var(--dsw-alias-label-secondary);margin:0;padding:16px 24px;font-size:13px;line-height:20px}.rp_h_sbFq_problems{color:var(--dsw-alias-label-tertiary);margin:8px 0 0;padding-left:18px;font-size:12px}.rp_h_sbFq_hud{box-sizing:border-box;width:min(800px,100%);margin:0 auto 8px;padding:0 16px}.rp_h_sbFq_tab{flex-direction:column;flex:1 1 0;width:100%;min-height:0;display:flex}";
6219
6192
  const key$27 = "src/client/widgets/pack-frame/PackFrame.module.css";
6220
6193
  let tag$27 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$27) + "]");
@@ -6226,15 +6199,14 @@ window.__ModuleLoader__.load({
6226
6199
  }
6227
6200
  tag$27.textContent = css$27;
6228
6201
  var PackFrame_module_css_default = {
6229
- "problems": "rp_h_sbFq_problems",
6230
- "message": "rp_h_sbFq_message",
6231
- "tab": "rp_h_sbFq_tab",
6232
6202
  "frame": "rp_h_sbFq_frame",
6203
+ "message": "rp_h_sbFq_message",
6204
+ "fill": "rp_h_sbFq_fill",
6205
+ "problems": "rp_h_sbFq_problems",
6233
6206
  "hud": "rp_h_sbFq_hud",
6234
- "fill": "rp_h_sbFq_fill"
6207
+ "tab": "rp_h_sbFq_tab"
6235
6208
  };
6236
- //#endregion
6237
- //#region src/client/widgets/pack-frame/theme.ts
6209
+ // src/client/widgets/pack-frame/theme.ts
6238
6210
  /** The colours of DSH a surface is given, so that it looks right in light and dark. */
6239
6211
  const SHARED_TOKENS = [
6240
6212
  "--dsw-alias-bg-base",
@@ -6296,8 +6268,7 @@ window.__ModuleLoader__.load({
6296
6268
  observer.disconnect();
6297
6269
  };
6298
6270
  }
6299
- //#endregion
6300
- //#region src/client/widgets/pack-frame/PackFrame.tsx
6271
+ // src/client/widgets/pack-frame/PackFrame.tsx
6301
6272
  /**
6302
6273
  * A surface of a pack, in a frame that can run its scripts and nothing more: no access to this page,
6303
6274
  * its storage or the network. The only way out is the bridge, which answers what the pack asked for.
@@ -6423,8 +6394,7 @@ window.__ModuleLoader__.load({
6423
6394
  "data-rp-frame": surface
6424
6395
  });
6425
6396
  }
6426
- //#endregion
6427
- //#region src/client/world-editor/world-files-api.ts
6397
+ // src/client/world-editor/world-files-api.ts
6428
6398
  async function read$2(response) {
6429
6399
  if (!response.ok) {
6430
6400
  const body = await response.json().catch(() => void 0);
@@ -6481,8 +6451,7 @@ window.__ModuleLoader__.load({
6481
6451
  const savePackFile = async (world, pack, path, text, signal) => (await read$2(await fetch(`${API_PREFIX}/worlds/interface/file?${packQuery(world, pack, path)}`, init("PUT", signal, { text })))).problems;
6482
6452
  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;
6483
6453
  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;
6484
- //#endregion
6485
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/PacksPanel.module.css.mjs
6454
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/PacksPanel.module.css.mjs
6486
6455
  const css$26 = ".rp_FLaP7q_controls{flex-wrap:wrap;align-items:center;gap:8px 16px;margin:8px 0;display:flex}.rp_FLaP7q_group{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;font-size:12px;display:inline-flex}.rp_FLaP7q_stage{border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-base);max-width:100%;overflow:hidden}.rp_FLaP7q_stageTall{height:420px}.rp_FLaP7q_log{color:var(--dsw-alias-label-secondary);margin:4px 0 0;padding-left:16px;font-size:12px}.rp_FLaP7q_files{columns:2 220px;margin:4px 0 0;padding-left:16px;font-size:12px}.rp_FLaP7q_note{color:var(--dsw-alias-label-tertiary);font-size:12px}";
6487
6456
  const key$26 = "src/client/world-editor/PacksPanel.module.css";
6488
6457
  let tag$26 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$26) + "]");
@@ -6495,15 +6464,14 @@ window.__ModuleLoader__.load({
6495
6464
  tag$26.textContent = css$26;
6496
6465
  var PacksPanel_module_css_default = {
6497
6466
  "log": "rp_FLaP7q_log",
6498
- "stageTall": "rp_FLaP7q_stageTall",
6499
6467
  "note": "rp_FLaP7q_note",
6468
+ "stage": "rp_FLaP7q_stage",
6500
6469
  "group": "rp_FLaP7q_group",
6501
6470
  "controls": "rp_FLaP7q_controls",
6502
- "stage": "rp_FLaP7q_stage",
6471
+ "stageTall": "rp_FLaP7q_stageTall",
6503
6472
  "files": "rp_FLaP7q_files"
6504
6473
  };
6505
- //#endregion
6506
- //#region src/client/world-editor/PacksPanel.tsx
6474
+ // src/client/world-editor/PacksPanel.tsx
6507
6475
  const WIDTHS = {
6508
6476
  narrow: 360,
6509
6477
  medium: 720,
@@ -7001,8 +6969,7 @@ window.__ModuleLoader__.load({
7001
6969
  })]
7002
6970
  });
7003
6971
  }
7004
- //#endregion
7005
- //#region src/client/world-editor/trigger-text.ts
6972
+ // src/client/world-editor/trigger-text.ts
7006
6973
  function namesOf(world) {
7007
6974
  const by = (list) => {
7008
6975
  const names = new Map((list ?? []).map((entry) => [entry.key, entry.name]));
@@ -7082,8 +7049,7 @@ window.__ModuleLoader__.load({
7082
7049
  });
7083
7050
  return effect.while === void 0 ? text : `${text} (${say("only", { condition: describeCondition(say, names, effect.while) })})`;
7084
7051
  }
7085
- //#endregion
7086
- //#region src/client/world-editor/TriggersPanel.tsx
7052
+ // src/client/world-editor/TriggersPanel.tsx
7087
7053
  const STATUS = {
7088
7054
  fired: "fired",
7089
7055
  failed: "failed",
@@ -7395,8 +7361,7 @@ window.__ModuleLoader__.load({
7395
7361
  ]
7396
7362
  });
7397
7363
  }
7398
- //#endregion
7399
- //#region src/client/lorebooks-api.ts
7364
+ // src/client/lorebooks-api.ts
7400
7365
  async function reply$3(response) {
7401
7366
  if (!response.ok) {
7402
7367
  const body = await response.json().catch(() => void 0);
@@ -7484,8 +7449,7 @@ window.__ModuleLoader__.load({
7484
7449
  signal
7485
7450
  }));
7486
7451
  }
7487
- //#endregion
7488
- //#region src/client/presets-api.ts
7452
+ // src/client/presets-api.ts
7489
7453
  async function reply$2(response) {
7490
7454
  if (!response.ok) {
7491
7455
  const body = await response.json().catch(() => void 0);
@@ -7588,8 +7552,7 @@ window.__ModuleLoader__.load({
7588
7552
  signal
7589
7553
  }));
7590
7554
  }
7591
- //#endregion
7592
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/sampling-fields/SamplingFields.module.css.mjs
7555
+ // \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
7593
7556
  const css$25 = ".rp_9vxYSG_root{flex-direction:column;gap:8px;display:flex}.rp_9vxYSG_grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px 12px;display:grid}.rp_9vxYSG_field{flex-direction:column;gap:4px;display:flex}.rp_9vxYSG_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9vxYSG_input{font:inherit;border:1px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:inherit;background:0 0;min-width:0;padding:4px 8px;font-size:13px}.rp_9vxYSG_input:disabled{opacity:.6}.rp_9vxYSG_help{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}";
7594
7557
  const key$25 = "src/client/widgets/sampling-fields/SamplingFields.module.css";
7595
7558
  let tag$25 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$25) + "]");
@@ -7601,15 +7564,14 @@ window.__ModuleLoader__.load({
7601
7564
  }
7602
7565
  tag$25.textContent = css$25;
7603
7566
  var SamplingFields_module_css_default = {
7604
- "field": "rp_9vxYSG_field",
7605
7567
  "grid": "rp_9vxYSG_grid",
7606
- "root": "rp_9vxYSG_root",
7607
- "label": "rp_9vxYSG_label",
7568
+ "help": "rp_9vxYSG_help",
7608
7569
  "input": "rp_9vxYSG_input",
7609
- "help": "rp_9vxYSG_help"
7570
+ "label": "rp_9vxYSG_label",
7571
+ "root": "rp_9vxYSG_root",
7572
+ "field": "rp_9vxYSG_field"
7610
7573
  };
7611
- //#endregion
7612
- //#region src/client/widgets/sampling-fields/SamplingFields.tsx
7574
+ // src/client/widgets/sampling-fields/SamplingFields.tsx
7613
7575
  const samplingTexts = (sampling) => Object.fromEntries(SAMPLING_KEYS.map((key) => [key, sampling[key]?.toString() ?? ""]));
7614
7576
  /** The controls typed so far; a text that is not a number in range is left out, which the host then reports when the form is saved. */
7615
7577
  function samplingOfTexts(texts) {
@@ -7654,8 +7616,7 @@ window.__ModuleLoader__.load({
7654
7616
  })]
7655
7617
  });
7656
7618
  }
7657
- //#endregion
7658
- //#region src/client/world-editor/InfoPanel.tsx
7619
+ // src/client/world-editor/InfoPanel.tsx
7659
7620
  const draftOf$4 = (info) => ({
7660
7621
  name: info.name,
7661
7622
  description: info.description,
@@ -8078,8 +8039,7 @@ window.__ModuleLoader__.load({
8078
8039
  ]
8079
8040
  });
8080
8041
  }
8081
- //#endregion
8082
- //#region src/client/world-editor/PromptsPanel.tsx
8042
+ // src/client/world-editor/PromptsPanel.tsx
8083
8043
  const messageOf$9 = (error) => error instanceof Error ? error.message : String(error);
8084
8044
  /** The prompts the models are given: the world can carry its own version of each, which replaces the shipped one in the sessions it starts. */
8085
8045
  function PromptsPanel({ t, worldId, language, actions }) {
@@ -8311,8 +8271,7 @@ window.__ModuleLoader__.load({
8311
8271
  })]
8312
8272
  });
8313
8273
  }
8314
- //#endregion
8315
- //#region src/client/world-editor/RoutinesPanel.tsx
8274
+ // src/client/world-editor/RoutinesPanel.tsx
8316
8275
  const DAYS = [
8317
8276
  "mon",
8318
8277
  "tue",
@@ -8661,8 +8620,7 @@ window.__ModuleLoader__.load({
8661
8620
  ]
8662
8621
  });
8663
8622
  }
8664
- //#endregion
8665
- //#region src/client/world-editor/CalendarPanel.tsx
8623
+ // src/client/world-editor/CalendarPanel.tsx
8666
8624
  const draftOf$3 = (calendar) => ({
8667
8625
  hemisphere: calendar.hemisphere,
8668
8626
  holidays: calendar.holidays.map((holiday) => ({
@@ -8869,8 +8827,7 @@ window.__ModuleLoader__.load({
8869
8827
  ]
8870
8828
  });
8871
8829
  }
8872
- //#endregion
8873
- //#region src/client/widgets/tool-switches/tools-api.ts
8830
+ // src/client/widgets/tool-switches/tools-api.ts
8874
8831
  /** The tools other plugins registered for everyone (a file or shell tool, an MCP server's), which an agent can be given. */
8875
8832
  async function loadExternalTools(signal) {
8876
8833
  const response = await fetch(`${API_PREFIX}/tools`, {
@@ -8880,8 +8837,7 @@ window.__ModuleLoader__.load({
8880
8837
  if (!response.ok) throw new Error(`${response.status} ${response.statusText}`.trim());
8881
8838
  return (await response.json()).tools ?? [];
8882
8839
  }
8883
- //#endregion
8884
- //#region src/shared/tools.ts
8840
+ // src/shared/tools.ts
8885
8841
  /** The kinds of agent whose tools can be chosen. A character is not one agent but a kind: the choice is for all of them. */
8886
8842
  const AGENT_KINDS = [
8887
8843
  "gameMaster",
@@ -9010,8 +8966,7 @@ window.__ModuleLoader__.load({
9010
8966
  if (Object.keys(mine).length === 0) delete next[agent];
9011
8967
  return next;
9012
8968
  }
9013
- //#endregion
9014
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/tool-switches/ToolSwitches.module.css.mjs
8969
+ // \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
9015
8970
  const css$24 = ".rp_CjoFLq_root{flex-direction:column;gap:12px;display:flex}.rp_CjoFLq_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_CjoFLq_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_CjoFLq_agent{border-top:1px solid var(--dsw-alias-border-l3);flex-direction:column;gap:6px;padding:8px 0;display:flex}.rp_CjoFLq_agentName{font-size:14px;font-weight:500}.rp_CjoFLq_hint{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_CjoFLq_tool{cursor:pointer;align-items:flex-start;gap:8px;font-size:13px;display:flex}.rp_CjoFLq_tool input{margin-top:3px}.rp_CjoFLq_toolText{flex-direction:column;display:flex}.rp_CjoFLq_default{color:var(--dsw-alias-label-tertiary);margin-left:6px;font-size:12px}.rp_CjoFLq_error{color:var(--dsw-alias-state-error-primary);font-size:12px}.rp_CjoFLq_external{flex-direction:column;gap:6px;margin-top:4px;display:flex}.rp_CjoFLq_external>summary{cursor:pointer}";
9016
8971
  const key$24 = "src/client/widgets/tool-switches/ToolSwitches.module.css";
9017
8972
  let tag$24 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$24) + "]");
@@ -9023,20 +8978,19 @@ window.__ModuleLoader__.load({
9023
8978
  }
9024
8979
  tag$24.textContent = css$24;
9025
8980
  var ToolSwitches_module_css_default = {
9026
- "external": "rp_CjoFLq_external",
9027
- "error": "rp_CjoFLq_error",
9028
- "hint": "rp_CjoFLq_hint",
9029
- "tool": "rp_CjoFLq_tool",
9030
- "help": "rp_CjoFLq_help",
8981
+ "title": "rp_CjoFLq_title",
9031
8982
  "agentName": "rp_CjoFLq_agentName",
9032
- "toolText": "rp_CjoFLq_toolText",
9033
8983
  "default": "rp_CjoFLq_default",
8984
+ "tool": "rp_CjoFLq_tool",
9034
8985
  "agent": "rp_CjoFLq_agent",
8986
+ "error": "rp_CjoFLq_error",
8987
+ "toolText": "rp_CjoFLq_toolText",
9035
8988
  "root": "rp_CjoFLq_root",
9036
- "title": "rp_CjoFLq_title"
8989
+ "hint": "rp_CjoFLq_hint",
8990
+ "help": "rp_CjoFLq_help",
8991
+ "external": "rp_CjoFLq_external"
9037
8992
  };
9038
- //#endregion
9039
- //#region src/client/widgets/tool-switches/ToolSwitches.tsx
8993
+ // src/client/widgets/tool-switches/ToolSwitches.tsx
9040
8994
  /**
9041
8995
  * The optional tools of each kind of agent, each a switch. It shows only the tools this version offers: names in the board it does not know
9042
8996
  * stay in it untouched, so that what a world or a settings file carries from another version survives a change made here.
@@ -9144,8 +9098,7 @@ window.__ModuleLoader__.load({
9144
9098
  ]
9145
9099
  });
9146
9100
  }
9147
- //#endregion
9148
- //#region src/client/world-editor/ToolsPanel.tsx
9101
+ // src/client/world-editor/ToolsPanel.tsx
9149
9102
  /** The optional tools the world's agents have, kept in `world.json` and given to every story started from the world; a story can change them for itself later. */
9150
9103
  function ToolsPanel({ t, worldId, actions }) {
9151
9104
  const [board, setBoard] = (0, react.useState)();
@@ -9202,8 +9155,7 @@ window.__ModuleLoader__.load({
9202
9155
  })]
9203
9156
  });
9204
9157
  }
9205
- //#endregion
9206
- //#region src/client/world-editor/DicePanel.tsx
9158
+ // src/client/world-editor/DicePanel.tsx
9207
9159
  const draftOf$2 = (dice) => dice.checks.map((check) => ({
9208
9160
  key: check.key,
9209
9161
  name: check.name,
@@ -9602,8 +9554,7 @@ window.__ModuleLoader__.load({
9602
9554
  ]
9603
9555
  });
9604
9556
  }
9605
- //#endregion
9606
- //#region src/client/world-editor/variables-draft.ts
9557
+ // src/client/world-editor/variables-draft.ts
9607
9558
  const list$1 = (value) => value.split(/[,,\n]/).map((entry) => entry.trim()).filter((entry) => entry !== "");
9608
9559
  const NEW = {
9609
9560
  key: "",
@@ -9675,8 +9626,7 @@ window.__ModuleLoader__.load({
9675
9626
  ...draft.kind === "number" && bands.length > 0 ? { bands } : {}
9676
9627
  };
9677
9628
  }
9678
- //#endregion
9679
- //#region src/client/world-editor/VariablesPanel.tsx
9629
+ // src/client/world-editor/VariablesPanel.tsx
9680
9630
  /** What the world tracks beyond what every story does: numbers, flags and choices about characters, things, places or the world, with how each is told. */
9681
9631
  function VariablesPanel({ t, worldId, actions }) {
9682
9632
  const [saved, setSaved] = (0, react.useState)();
@@ -9936,8 +9886,7 @@ window.__ModuleLoader__.load({
9936
9886
  ]
9937
9887
  });
9938
9888
  }
9939
- //#endregion
9940
- //#region src/client/widgets/media-image/MediaImage.tsx
9889
+ // src/client/widgets/media-image/MediaImage.tsx
9941
9890
  const MAX_PROMPT = 360;
9942
9891
  /** What the tooltip of an image says: what it shows, who is in it, and the prompt it was made from. */
9943
9892
  function imageSummary(details, labels) {
@@ -9989,8 +9938,7 @@ window.__ModuleLoader__.load({
9989
9938
  }
9990
9939
  })] });
9991
9940
  }
9992
- //#endregion
9993
- //#region src/client/widgets/gallery-view/gallery-api.ts
9941
+ // src/client/widgets/gallery-view/gallery-api.ts
9994
9942
  const route = (target, path = "") => `${API_PREFIX}/${target.kind}/gallery${path}?id=${encodeURIComponent(target.id)}`;
9995
9943
  async function failure(response) {
9996
9944
  const body = await response.json().catch(() => void 0);
@@ -10031,8 +9979,7 @@ window.__ModuleLoader__.load({
10031
9979
  return await response.json();
10032
9980
  }
10033
9981
  const imageUrl = (target, image) => `${route(target, "/file")}&path=${encodeURIComponent(image.path)}&v=${encodeURIComponent(image.createdAt)}`;
10034
- //#endregion
10035
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/gallery-view/GalleryView.module.css.mjs
9982
+ // \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
10036
9983
  const css$23 = ".rp_9pSHmG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_9pSHmG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;display:flex}.rp_9pSHmG_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_9pSHmG_select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);height:32px;font:inherit;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);padding:0 8px;font-size:12px}.rp_9pSHmG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 24px;font-size:13px}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_9pSHmG_cell{min-width:0}.rp_9pSHmG_thumb{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);width:100%;font:inherit;text-align:left;color:inherit;cursor:pointer;flex-direction:column;padding:0;display:flex;overflow:hidden}.rp_9pSHmG_open{cursor:zoom-in;background:0 0;border:0;padding:0;display:block}.rp_9pSHmG_thumb:hover{border-color:var(--dsw-alias-border-l4)}.rp_9pSHmG_image{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-layer-3);width:100%;display:block}.rp_9pSHmG_caption{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-secondary);padding:6px 8px;font-size:12px;overflow:hidden}.rp_9pSHmG_detail{flex-direction:column;gap:12px;width:min(640px,100%);max-height:70vh;display:flex;overflow-y:auto}.rp_9pSHmG_large{border-radius:var(--dsw-radius-lg);object-fit:contain;max-width:100%;max-height:32vh;margin:0 auto;display:block}.rp_9pSHmG_facts{grid-template-columns:max-content 1fr;gap:6px 12px;margin:0;font-size:12px;line-height:18px;display:grid}.rp_9pSHmG_facts dt{color:var(--dsw-alias-label-tertiary)}.rp_9pSHmG_facts dd{min-width:0;color:var(--dsw-alias-label-primary);margin:0}.rp_9pSHmG_pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow-y:auto}.rp_9pSHmG_tags{flex-wrap:wrap;gap:4px;display:flex}.rp_9pSHmG_note{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_9pSHmG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_9pSHmG_status,.rp_9pSHmG_statusError{color:var(--dsw-alias-label-tertiary);padding:0 8px 6px;font-size:12px;line-height:16px}.rp_9pSHmG_statusError{color:var(--dsw-alias-state-error-primary)}.rp_9pSHmG_reusable{color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;padding:0 8px 6px;font-size:12px;display:flex}.rp_9pSHmG_reusable input{accent-color:var(--dsw-alias-state-business-primary);margin:0}.rp_9pSHmG_editButton{font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;border:0;align-self:flex-start;margin:0 8px 4px;padding:0;font-size:12px}.rp_9pSHmG_edit{flex-direction:column;gap:12px;width:min(480px,100%);display:flex}.rp_9pSHmG_editField{flex-direction:column;gap:4px;display:flex}.rp_9pSHmG_editLabel{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_9pSHmG_editHelp{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_9pSHmG_editArea,.rp_9pSHmG_editInput{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}.rp_9pSHmG_editArea{resize:vertical;min-height:96px}.rp_9pSHmG_editArea:focus-visible,.rp_9pSHmG_editInput:focus-visible,.rp_9pSHmG_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}@media (width<=640px){.rp_9pSHmG_page{padding-inline:16px}.rp_9pSHmG_toolbar{align-items:flex-start}.rp_9pSHmG_grid{grid-template-columns:repeat(auto-fill,minmax(136px,1fr))}}";
10037
9984
  const key$23 = "src/client/widgets/gallery-view/GalleryView.module.css";
10038
9985
  let tag$23 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$23) + "]");
@@ -10044,38 +9991,37 @@ window.__ModuleLoader__.load({
10044
9991
  }
10045
9992
  tag$23.textContent = css$23;
10046
9993
  var GalleryView_module_css_default = {
10047
- "reusable": "rp_9pSHmG_reusable",
10048
- "pre": "rp_9pSHmG_pre",
10049
9994
  "facts": "rp_9pSHmG_facts",
10050
- "detail": "rp_9pSHmG_detail",
10051
- "actions": "rp_9pSHmG_actions",
10052
- "editLabel": "rp_9pSHmG_editLabel",
10053
- "edit": "rp_9pSHmG_edit",
10054
- "grid": "rp_9pSHmG_grid",
10055
- "note": "rp_9pSHmG_note",
10056
- "thumb": "rp_9pSHmG_thumb",
10057
- "editInput": "rp_9pSHmG_editInput",
10058
9995
  "tags": "rp_9pSHmG_tags",
10059
9996
  "open": "rp_9pSHmG_open",
9997
+ "actions": "rp_9pSHmG_actions",
10060
9998
  "count": "rp_9pSHmG_count",
10061
- "message": "rp_9pSHmG_message",
10062
- "caption": "rp_9pSHmG_caption",
9999
+ "editInput": "rp_9pSHmG_editInput",
10000
+ "thumb": "rp_9pSHmG_thumb",
10063
10001
  "page": "rp_9pSHmG_page",
10064
- "large": "rp_9pSHmG_large",
10002
+ "message": "rp_9pSHmG_message",
10065
10003
  "select": "rp_9pSHmG_select",
10066
- "cell": "rp_9pSHmG_cell",
10067
- "editField": "rp_9pSHmG_editField",
10068
- "status": "rp_9pSHmG_status",
10069
10004
  "editArea": "rp_9pSHmG_editArea",
10070
10005
  "error": "rp_9pSHmG_error",
10006
+ "pre": "rp_9pSHmG_pre",
10007
+ "reusable": "rp_9pSHmG_reusable",
10008
+ "detail": "rp_9pSHmG_detail",
10009
+ "editLabel": "rp_9pSHmG_editLabel",
10071
10010
  "editHelp": "rp_9pSHmG_editHelp",
10072
- "statusError": "rp_9pSHmG_statusError",
10073
- "image": "rp_9pSHmG_image",
10074
10011
  "editButton": "rp_9pSHmG_editButton",
10012
+ "status": "rp_9pSHmG_status",
10013
+ "grid": "rp_9pSHmG_grid",
10014
+ "edit": "rp_9pSHmG_edit",
10015
+ "cell": "rp_9pSHmG_cell",
10016
+ "note": "rp_9pSHmG_note",
10017
+ "caption": "rp_9pSHmG_caption",
10018
+ "large": "rp_9pSHmG_large",
10019
+ "image": "rp_9pSHmG_image",
10020
+ "editField": "rp_9pSHmG_editField",
10021
+ "statusError": "rp_9pSHmG_statusError",
10075
10022
  "toolbar": "rp_9pSHmG_toolbar"
10076
10023
  };
10077
- //#endregion
10078
- //#region src/client/widgets/gallery-view/GalleryView.tsx
10024
+ // src/client/widgets/gallery-view/GalleryView.tsx
10079
10025
  /** How often the list is read again while pictures are waiting to be described. */
10080
10026
  const POLL_MS$2 = 3e3;
10081
10027
  const messageOf$8 = (error) => error instanceof Error ? error.message : String(error);
@@ -10400,8 +10346,7 @@ window.__ModuleLoader__.load({
10400
10346
  ]
10401
10347
  });
10402
10348
  }
10403
- //#endregion
10404
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/WorldEditor.module.css.mjs
10349
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/world-editor/WorldEditor.module.css.mjs
10405
10350
  const css$22 = ".rp__swA3a_view{flex:1 1 0;width:100%;min-height:0;display:flex}.rp__swA3a_message{color:var(--dsw-alias-label-secondary);margin:0;padding:24px;font-size:13px}.rp__swA3a_warning{color:var(--dsw-alias-label-primary);border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);margin:0 0 12px;padding:8px 12px;font-size:13px}.rp__swA3a_drawer{box-sizing:border-box;border-right:.5px solid var(--dsw-alias-border-l3);flex-direction:column;flex:0 0 168px;gap:2px;padding:16px 8px;display:flex}.rp__swA3a_drawerItem{border-radius:var(--dsw-radius-md);width:100%;font:inherit;text-align:left;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;padding:6px 12px;font-size:13px;line-height:20px;display:block}@media (width<=720px){.rp__swA3a_view{flex-direction:column}.rp__swA3a_drawer{border-right:0;border-bottom:.5px solid var(--dsw-alias-border-l3);flex-direction:row;flex:none;width:100%;padding:8px;overflow-x:auto}.rp__swA3a_drawerItem{white-space:nowrap;flex:none;width:auto}}.rp__swA3a_drawerItem:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.rp__swA3a_drawerItemOn{color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-layer-2);font-weight:500}.rp__swA3a_content{flex-direction:column;flex:1 1 0;min-width:0;min-height:0;display:flex}";
10406
10351
  const key$22 = "src/client/world-editor/WorldEditor.module.css";
10407
10352
  let tag$22 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$22) + "]");
@@ -10414,15 +10359,14 @@ window.__ModuleLoader__.load({
10414
10359
  tag$22.textContent = css$22;
10415
10360
  var WorldEditor_module_css_default = {
10416
10361
  "message": "rp__swA3a_message",
10417
- "warning": "rp__swA3a_warning",
10418
- "view": "rp__swA3a_view",
10419
- "drawerItem": "rp__swA3a_drawerItem",
10420
10362
  "drawerItemOn": "rp__swA3a_drawerItemOn",
10363
+ "content": "rp__swA3a_content",
10364
+ "view": "rp__swA3a_view",
10365
+ "warning": "rp__swA3a_warning",
10421
10366
  "drawer": "rp__swA3a_drawer",
10422
- "content": "rp__swA3a_content"
10367
+ "drawerItem": "rp__swA3a_drawerItem"
10423
10368
  };
10424
- //#endregion
10425
- //#region src/client/world-editor/WorldEditor.tsx
10369
+ // src/client/world-editor/WorldEditor.tsx
10426
10370
  const SECTIONS = [
10427
10371
  {
10428
10372
  id: "info",
@@ -10802,8 +10746,7 @@ window.__ModuleLoader__.load({
10802
10746
  })]
10803
10747
  });
10804
10748
  }
10805
- //#endregion
10806
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/avatars/AvatarsPage.module.css.mjs
10749
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/avatars/AvatarsPage.module.css.mjs
10807
10750
  const css$21 = ".rp_pQOzEG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_pQOzEG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_pQOzEG_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_pQOzEG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_pQOzEG_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_pQOzEG_grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_pQOzEG_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);align-items:center;gap:4px;min-width:0;padding-right:8px;display:flex}.rp_pQOzEG_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_pQOzEG_open{min-width:0;font:inherit;text-align:left;color:inherit;cursor:pointer;background:0 0;border:0;flex:auto;align-items:center;gap:12px;padding:10px 0 10px 10px;display:flex}.rp_pQOzEG_open:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_pQOzEG_portrait,.rp_pQOzEG_placeholder{border-radius:var(--dsw-radius-lg);object-fit:cover;flex:none;width:48px;height:48px}.rp_pQOzEG_placeholder{color:var(--dsw-alias-label-secondary);justify-content:center;align-items:center;font-size:20px;font-weight:500;display:flex}.rp_pQOzEG_text{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_pQOzEG_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_pQOzEG_summary{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_pQOzEG_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_pQOzEG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_pQOzEG_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_pQOzEG_editTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500}.rp_pQOzEG_editBody{flex:1 1 0;min-height:0;display:flex}.rp_pQOzEG_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_pQOzEG_field{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_pQOzEG_label{color:var(--dsw-alias-label-secondary);font-size:12px}@media (width<=640px){.rp_pQOzEG_toolbar{align-items:flex-start}.rp_pQOzEG_count{padding-top:6px}.rp_pQOzEG_grid{grid-template-columns:1fr}.rp_pQOzEG_form{min-width:0}}";
10808
10751
  const key$21 = "src/client/pages/avatars/AvatarsPage.module.css";
10809
10752
  let tag$21 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$21) + "]");
@@ -10815,30 +10758,29 @@ window.__ModuleLoader__.load({
10815
10758
  }
10816
10759
  tag$21.textContent = css$21;
10817
10760
  var AvatarsPage_module_css_default = {
10818
- "text": "rp_pQOzEG_text",
10819
- "portrait": "rp_pQOzEG_portrait",
10820
- "viewport": "rp_pQOzEG_viewport",
10821
- "open": "rp_pQOzEG_open",
10822
- "name": "rp_pQOzEG_name",
10761
+ "card": "rp_pQOzEG_card",
10762
+ "editBody": "rp_pQOzEG_editBody",
10823
10763
  "label": "rp_pQOzEG_label",
10824
- "editHeader": "rp_pQOzEG_editHeader",
10825
- "message": "rp_pQOzEG_message",
10764
+ "portrait": "rp_pQOzEG_portrait",
10826
10765
  "toolbar": "rp_pQOzEG_toolbar",
10766
+ "viewport": "rp_pQOzEG_viewport",
10767
+ "editTitle": "rp_pQOzEG_editTitle",
10827
10768
  "count": "rp_pQOzEG_count",
10828
- "page": "rp_pQOzEG_page",
10829
- "summary": "rp_pQOzEG_summary",
10830
- "card": "rp_pQOzEG_card",
10831
- "editBody": "rp_pQOzEG_editBody",
10832
10769
  "form": "rp_pQOzEG_form",
10833
- "placeholder": "rp_pQOzEG_placeholder",
10770
+ "field": "rp_pQOzEG_field",
10771
+ "message": "rp_pQOzEG_message",
10772
+ "page": "rp_pQOzEG_page",
10834
10773
  "grid": "rp_pQOzEG_grid",
10835
10774
  "actions": "rp_pQOzEG_actions",
10836
- "editTitle": "rp_pQOzEG_editTitle",
10837
- "error": "rp_pQOzEG_error",
10838
- "field": "rp_pQOzEG_field"
10775
+ "summary": "rp_pQOzEG_summary",
10776
+ "open": "rp_pQOzEG_open",
10777
+ "text": "rp_pQOzEG_text",
10778
+ "name": "rp_pQOzEG_name",
10779
+ "editHeader": "rp_pQOzEG_editHeader",
10780
+ "placeholder": "rp_pQOzEG_placeholder",
10781
+ "error": "rp_pQOzEG_error"
10839
10782
  };
10840
- //#endregion
10841
- //#region src/client/pages/avatars/AvatarsPage.tsx
10783
+ // src/client/pages/avatars/AvatarsPage.tsx
10842
10784
  const hueOf$2 = (name) => Array.from(name).reduce((hash, char) => (hash * 31 + char.charCodeAt(0)) % 360, 0);
10843
10785
  function Card({ avatar, editLabel, deleteLabel, onEdit, onDelete }) {
10844
10786
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
@@ -11103,8 +11045,7 @@ window.__ModuleLoader__.load({
11103
11045
  ]
11104
11046
  });
11105
11047
  }
11106
- //#endregion
11107
- //#region src/client/widgets/sampling-fields/locales.ts
11048
+ // src/client/widgets/sampling-fields/locales.ts
11108
11049
  const dictionaries$18 = {
11109
11050
  en: {
11110
11051
  sf_master: "Narrator temperature (0 to 2)",
@@ -11129,8 +11070,7 @@ window.__ModuleLoader__.load({
11129
11070
  sf_help: "由此开始的故事向模型提出请求的方式,只对那个故事生效:开始时它自己的选择优先。留空表示不作建议。温度之外的值作用于叙述者和角色,不会用于需要精确的辅助者。"
11130
11071
  }
11131
11072
  };
11132
- //#endregion
11133
- //#region src/client/widgets/tool-switches/locales.ts
11073
+ // src/client/widgets/tool-switches/locales.ts
11134
11074
  const dictionaries$17 = {
11135
11075
  en: {
11136
11076
  sw_title: "Tools",
@@ -11209,8 +11149,7 @@ window.__ModuleLoader__.load({
11209
11149
  sw_tool_list_items_hint: "记录员可以查看故事中的物品及其位置。"
11210
11150
  }
11211
11151
  };
11212
- //#endregion
11213
- //#region src/client/widgets/gallery-view/locales.ts
11152
+ // src/client/widgets/gallery-view/locales.ts
11214
11153
  const dictionaries$16 = {
11215
11154
  en: {
11216
11155
  tab: "Gallery",
@@ -12248,8 +12187,7 @@ window.__ModuleLoader__.load({
12248
12187
  avatarEdit: "编辑"
12249
12188
  }
12250
12189
  }, dictionaries$12);
12251
- //#endregion
12252
- //#region src/client/pages/avatars/index.ts
12190
+ // src/client/pages/avatars/index.ts
12253
12191
  const NAMESPACE$12 = "roleplay.avatars";
12254
12192
  /** Adds the Avatars page to the Role Play panel: characters to play in any world. */
12255
12193
  function registerAvatarsPage(ctx) {
@@ -12268,8 +12206,7 @@ window.__ModuleLoader__.load({
12268
12206
  inject: () => avatars.inject()
12269
12207
  }, AvatarsPage));
12270
12208
  }
12271
- //#endregion
12272
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/lorebooks/LorebooksPage.module.css.mjs
12209
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/lorebooks/LorebooksPage.module.css.mjs
12273
12210
  const css$20 = ".rp_VV-Eha_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_VV-Eha_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_VV-Eha_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_VV-Eha_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_VV-Eha_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_VV-Eha_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_VV-Eha_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_VV-Eha_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_VV-Eha_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_VV-Eha_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_VV-Eha_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_VV-Eha_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_VV-Eha_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_VV-Eha_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_VV-Eha_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_VV-Eha_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_VV-Eha_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_VV-Eha_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_VV-Eha_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_VV-Eha_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_VV-Eha_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_VV-Eha_row{flex-wrap:wrap;gap:12px;display:flex}.rp_VV-Eha_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_VV-Eha_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_VV-Eha_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_VV-Eha_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_VV-Eha_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_VV-Eha_grid{grid-template-columns:1fr}.rp_VV-Eha_form{min-width:0}.rp_VV-Eha_editBody{padding:16px}}.rp_VV-Eha_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:4px 6px;font-size:13px}.rp_VV-Eha_entryArea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:200px;font:inherit;color:var(--dsw-alias-label-primary);resize:vertical;padding:8px;font-size:13px;line-height:20px}";
12274
12211
  const key$20 = "src/client/pages/lorebooks/LorebooksPage.module.css";
12275
12212
  let tag$20 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$20) + "]");
@@ -12281,40 +12218,39 @@ window.__ModuleLoader__.load({
12281
12218
  }
12282
12219
  tag$20.textContent = css$20;
12283
12220
  var LorebooksPage_module_css_default = {
12284
- "head": "rp_VV-Eha_head",
12285
- "label": "rp_VV-Eha_label",
12286
- "row": "rp_VV-Eha_row",
12221
+ "ok": "rp_VV-Eha_ok",
12222
+ "title": "rp_VV-Eha_title",
12223
+ "error": "rp_VV-Eha_error",
12224
+ "section": "rp_VV-Eha_section",
12287
12225
  "input": "rp_VV-Eha_input",
12288
- "sectionTitle": "rp_VV-Eha_sectionTitle",
12289
- "warning": "rp_VV-Eha_warning",
12226
+ "head": "rp_VV-Eha_head",
12290
12227
  "page": "rp_VV-Eha_page",
12291
- "card": "rp_VV-Eha_card",
12292
- "form": "rp_VV-Eha_form",
12293
- "select": "rp_VV-Eha_select",
12294
- "section": "rp_VV-Eha_section",
12295
- "title": "rp_VV-Eha_title",
12296
12228
  "toolbar": "rp_VV-Eha_toolbar",
12297
- "cardActions": "rp_VV-Eha_cardActions",
12229
+ "form": "rp_VV-Eha_form",
12230
+ "field": "rp_VV-Eha_field",
12298
12231
  "count": "rp_VV-Eha_count",
12299
- "name": "rp_VV-Eha_name",
12300
- "entryArea": "rp_VV-Eha_entryArea",
12301
- "ok": "rp_VV-Eha_ok",
12302
- "grid": "rp_VV-Eha_grid",
12303
- "error": "rp_VV-Eha_error",
12304
- "description": "rp_VV-Eha_description",
12305
12232
  "viewport": "rp_VV-Eha_viewport",
12233
+ "row": "rp_VV-Eha_row",
12234
+ "description": "rp_VV-Eha_description",
12235
+ "help": "rp_VV-Eha_help",
12236
+ "grid": "rp_VV-Eha_grid",
12237
+ "name": "rp_VV-Eha_name",
12306
12238
  "message": "rp_VV-Eha_message",
12239
+ "cardActions": "rp_VV-Eha_cardActions",
12240
+ "editTitle": "rp_VV-Eha_editTitle",
12241
+ "card": "rp_VV-Eha_card",
12242
+ "meta": "rp_VV-Eha_meta",
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",
12307
12249
  "editBody": "rp_VV-Eha_editBody",
12308
- "field": "rp_VV-Eha_field",
12309
12250
  "area": "rp_VV-Eha_area",
12310
- "actions": "rp_VV-Eha_actions",
12311
- "help": "rp_VV-Eha_help",
12312
- "editHeader": "rp_VV-Eha_editHeader",
12313
- "editTitle": "rp_VV-Eha_editTitle",
12314
- "meta": "rp_VV-Eha_meta"
12251
+ "select": "rp_VV-Eha_select"
12315
12252
  };
12316
- //#endregion
12317
- //#region src/client/pages/lorebooks/LorebookEditor.tsx
12253
+ // src/client/pages/lorebooks/LorebookEditor.tsx
12318
12254
  const messageOf$7 = (failure) => failure instanceof Error ? failure.message : String(failure);
12319
12255
  const KINDS = [
12320
12256
  "history",
@@ -12706,8 +12642,7 @@ window.__ModuleLoader__.load({
12706
12642
  })]
12707
12643
  });
12708
12644
  }
12709
- //#endregion
12710
- //#region src/client/pages/lorebooks/LorebooksPage.tsx
12645
+ // src/client/pages/lorebooks/LorebooksPage.tsx
12711
12646
  const NAME$1 = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
12712
12647
  const messageOf$6 = (failure) => failure instanceof Error ? failure.message : String(failure);
12713
12648
  const nameFromFile$1 = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
@@ -13230,8 +13165,7 @@ window.__ModuleLoader__.load({
13230
13165
  kind_other: "其他"
13231
13166
  }
13232
13167
  }, dictionaries$20);
13233
- //#endregion
13234
- //#region src/client/pages/lorebooks/lorebooks-controller.ts
13168
+ // src/client/pages/lorebooks/lorebooks-controller.ts
13235
13169
  const messageOf$5 = (error) => error instanceof Error ? error.message : String(error);
13236
13170
  /** Reads the lorebook library from the host and makes, removes and opens its lorebooks. */
13237
13171
  var LorebooksController = class {
@@ -13322,8 +13256,7 @@ window.__ModuleLoader__.load({
13322
13256
  }
13323
13257
  }
13324
13258
  };
13325
- //#endregion
13326
- //#region src/client/pages/lorebooks/index.ts
13259
+ // src/client/pages/lorebooks/index.ts
13327
13260
  const NAMESPACE$11 = "roleplay.lorebooks";
13328
13261
  /** Adds the Lorebooks page to the Role Play panel: reusable background knowledge that stories start with. */
13329
13262
  function registerLorebooksPage(ctx) {
@@ -13342,8 +13275,7 @@ window.__ModuleLoader__.load({
13342
13275
  inject: () => lorebooks.inject()
13343
13276
  }, LorebooksPage));
13344
13277
  }
13345
- //#endregion
13346
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/presets/PresetsPage.module.css.mjs
13278
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/presets/PresetsPage.module.css.mjs
13347
13279
  const css$19 = ".rp_ZK89ba_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_ZK89ba_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_ZK89ba_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_ZK89ba_viewport{flex:1 1 0;min-height:0;padding:4px;overflow-y:auto}.rp_ZK89ba_grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.rp_ZK89ba_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;gap:8px;min-width:0;padding:12px;display:flex}.rp_ZK89ba_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_ZK89ba_head{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_ZK89ba_title{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;overflow:hidden}.rp_ZK89ba_name{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_description{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.rp_ZK89ba_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_cardActions{flex-wrap:wrap;gap:4px;margin-top:auto;display:flex}.rp_ZK89ba_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_ZK89ba_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_ZK89ba_warning{color:var(--dsw-alias-state-warning-primary,var(--dsw-alias-state-error-primary));margin:0;font-size:12px}.rp_ZK89ba_ok{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_ZK89ba_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_ZK89ba_editTitle{color:var(--dsw-alias-label-primary);flex:auto;font-size:14px;font-weight:500}.rp_ZK89ba_editBody{flex-direction:column;flex:1 1 0;gap:24px;min-height:0;padding:16px 24px;display:flex;overflow-y:auto}.rp_ZK89ba_section{flex-direction:column;gap:12px;max-width:720px;display:flex}.rp_ZK89ba_sectionTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_ZK89ba_help{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_ZK89ba_row{flex-wrap:wrap;gap:12px;display:flex}.rp_ZK89ba_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_ZK89ba_field{flex-direction:column;flex:200px;gap:6px;min-width:0;display:flex}.rp_ZK89ba_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_ZK89ba_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:280px;font:13px/20px var(--dsw-font-mono,monospace);color:var(--dsw-alias-label-primary);resize:vertical;padding:8px}.rp_ZK89ba_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);width:100%;font:inherit;color:var(--dsw-alias-label-primary);padding:6px 8px;font-size:13px}@media (width<=640px){.rp_ZK89ba_grid{grid-template-columns:1fr}.rp_ZK89ba_form{min-width:0}.rp_ZK89ba_editBody{padding:16px}}";
13348
13280
  const key$19 = "src/client/pages/presets/PresetsPage.module.css";
13349
13281
  let tag$19 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$19) + "]");
@@ -13355,38 +13287,37 @@ window.__ModuleLoader__.load({
13355
13287
  }
13356
13288
  tag$19.textContent = css$19;
13357
13289
  var PresetsPage_module_css_default = {
13358
- "page": "rp_ZK89ba_page",
13359
- "count": "rp_ZK89ba_count",
13360
- "grid": "rp_ZK89ba_grid",
13361
- "toolbar": "rp_ZK89ba_toolbar",
13362
- "card": "rp_ZK89ba_card",
13363
- "head": "rp_ZK89ba_head",
13364
- "actions": "rp_ZK89ba_actions",
13365
- "name": "rp_ZK89ba_name",
13290
+ "warning": "rp_ZK89ba_warning",
13366
13291
  "editHeader": "rp_ZK89ba_editHeader",
13367
- "message": "rp_ZK89ba_message",
13292
+ "section": "rp_ZK89ba_section",
13293
+ "cardActions": "rp_ZK89ba_cardActions",
13294
+ "description": "rp_ZK89ba_description",
13368
13295
  "error": "rp_ZK89ba_error",
13369
- "warning": "rp_ZK89ba_warning",
13370
- "sectionTitle": "rp_ZK89ba_sectionTitle",
13371
- "title": "rp_ZK89ba_title",
13372
13296
  "area": "rp_ZK89ba_area",
13373
- "field": "rp_ZK89ba_field",
13374
- "viewport": "rp_ZK89ba_viewport",
13375
13297
  "input": "rp_ZK89ba_input",
13376
- "editTitle": "rp_ZK89ba_editTitle",
13377
- "label": "rp_ZK89ba_label",
13378
- "form": "rp_ZK89ba_form",
13298
+ "count": "rp_ZK89ba_count",
13299
+ "sectionTitle": "rp_ZK89ba_sectionTitle",
13300
+ "actions": "rp_ZK89ba_actions",
13379
13301
  "help": "rp_ZK89ba_help",
13380
- "description": "rp_ZK89ba_description",
13381
- "row": "rp_ZK89ba_row",
13382
- "section": "rp_ZK89ba_section",
13383
- "meta": "rp_ZK89ba_meta",
13384
13302
  "editBody": "rp_ZK89ba_editBody",
13385
- "cardActions": "rp_ZK89ba_cardActions",
13386
- "ok": "rp_ZK89ba_ok"
13303
+ "form": "rp_ZK89ba_form",
13304
+ "card": "rp_ZK89ba_card",
13305
+ "name": "rp_ZK89ba_name",
13306
+ "row": "rp_ZK89ba_row",
13307
+ "ok": "rp_ZK89ba_ok",
13308
+ "editTitle": "rp_ZK89ba_editTitle",
13309
+ "grid": "rp_ZK89ba_grid",
13310
+ "message": "rp_ZK89ba_message",
13311
+ "label": "rp_ZK89ba_label",
13312
+ "toolbar": "rp_ZK89ba_toolbar",
13313
+ "viewport": "rp_ZK89ba_viewport",
13314
+ "title": "rp_ZK89ba_title",
13315
+ "page": "rp_ZK89ba_page",
13316
+ "head": "rp_ZK89ba_head",
13317
+ "field": "rp_ZK89ba_field",
13318
+ "meta": "rp_ZK89ba_meta"
13387
13319
  };
13388
- //#endregion
13389
- //#region src/client/pages/presets/PresetEditor.tsx
13320
+ // src/client/pages/presets/PresetEditor.tsx
13390
13321
  const messageOf$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
13391
13322
  const PROMPT_IDS = [
13392
13323
  "roleplay/persona",
@@ -13802,8 +13733,7 @@ window.__ModuleLoader__.load({
13802
13733
  })]
13803
13734
  });
13804
13735
  }
13805
- //#endregion
13806
- //#region src/client/pages/presets/PresetsPage.tsx
13736
+ // src/client/pages/presets/PresetsPage.tsx
13807
13737
  const NAME = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
13808
13738
  const messageOf$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
13809
13739
  const nameFromFile = (file) => trimCharacters(withoutExtension(file).replace(/[^A-Za-z0-9_-]+/g, "-"), "-_").slice(0, 64);
@@ -14307,8 +14237,7 @@ window.__ModuleLoader__.load({
14307
14237
  "prompt_roleplay/character-style": "角色风格"
14308
14238
  }
14309
14239
  }, dictionaries$18), dictionaries$20);
14310
- //#endregion
14311
- //#region src/client/pages/presets/presets-controller.ts
14240
+ // src/client/pages/presets/presets-controller.ts
14312
14241
  const messageOf$2 = (error) => error instanceof Error ? error.message : String(error);
14313
14242
  /** Reads the preset library from the host and makes, removes and opens its presets. */
14314
14243
  var PresetsController = class {
@@ -14395,8 +14324,7 @@ window.__ModuleLoader__.load({
14395
14324
  }
14396
14325
  }
14397
14326
  };
14398
- //#endregion
14399
- //#region src/client/pages/presets/index.ts
14327
+ // src/client/pages/presets/index.ts
14400
14328
  const NAMESPACE$10 = "roleplay.presets";
14401
14329
  /** Adds the Presets page to the Role Play panel: reusable writing instructions for stories. */
14402
14330
  function registerPresetsPage(ctx) {
@@ -14433,8 +14361,7 @@ window.__ModuleLoader__.load({
14433
14361
  const lastPage = pageCount(total, pageSize) - 1;
14434
14362
  return Math.min(Math.floor(Math.max(0, index) / pageSize), lastPage) * pageSize;
14435
14363
  }
14436
- //#endregion
14437
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pager/Pager.module.css.mjs
14364
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/pager/Pager.module.css.mjs
14438
14365
  const css$18 = ".rp_KBAD0W_pager{flex:none;justify-content:center;align-items:center;gap:8px;display:flex}.rp_KBAD0W_position{text-align:center;min-width:120px;color:var(--dsw-alias-label-tertiary);font-size:12px}";
14439
14366
  const key$18 = "src/client/widgets/pager/Pager.module.css";
14440
14367
  let tag$18 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$18) + "]");
@@ -14446,11 +14373,10 @@ window.__ModuleLoader__.load({
14446
14373
  }
14447
14374
  tag$18.textContent = css$18;
14448
14375
  var Pager_module_css_default = {
14449
- "position": "rp_KBAD0W_position",
14450
- "pager": "rp_KBAD0W_pager"
14376
+ "pager": "rp_KBAD0W_pager",
14377
+ "position": "rp_KBAD0W_position"
14451
14378
  };
14452
- //#endregion
14453
- //#region src/client/widgets/pager/Pager.tsx
14379
+ // src/client/widgets/pager/Pager.tsx
14454
14380
  /** Previous and next buttons around the current position; the owner supplies every label. */
14455
14381
  function Pager({ label, previousLabel, nextLabel, positionLabel, hasPrevious, hasNext, onPrevious, onNext }) {
14456
14382
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
@@ -14480,8 +14406,7 @@ window.__ModuleLoader__.load({
14480
14406
  ]
14481
14407
  });
14482
14408
  }
14483
- //#endregion
14484
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/problem-list/ProblemList.module.css.mjs
14409
+ // \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
14485
14410
  const css$17 = ".rp_LZh3Iq_problems{color:var(--dsw-alias-state-warn-primary);flex:none;font-size:12px}.rp_LZh3Iq_problems summary{cursor:pointer}.rp_LZh3Iq_problems ul{color:var(--dsw-alias-label-secondary);margin:8px 0 0;padding-left:20px}.rp_LZh3Iq_problems code{font-family:var(--dsw-font-mono);color:var(--dsw-alias-label-primary)}";
14486
14411
  const key$17 = "src/client/widgets/problem-list/ProblemList.module.css";
14487
14412
  let tag$17 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$17) + "]");
@@ -14493,8 +14418,7 @@ window.__ModuleLoader__.load({
14493
14418
  }
14494
14419
  tag$17.textContent = css$17;
14495
14420
  var ProblemList_module_css_default = { "problems": "rp_LZh3Iq_problems" };
14496
- //#endregion
14497
- //#region src/client/widgets/problem-list/ProblemList.tsx
14421
+ // src/client/widgets/problem-list/ProblemList.tsx
14498
14422
  /** A collapsed list of what went wrong while reading files; renders nothing when nothing did. */
14499
14423
  function ProblemList({ summary, problems }) {
14500
14424
  if (problems.length === 0) return null;
@@ -14507,8 +14431,7 @@ window.__ModuleLoader__.load({
14507
14431
  ] }, `${problem.path}:${problem.message}`)) })]
14508
14432
  });
14509
14433
  }
14510
- //#endregion
14511
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/DeleteSessionDialog.module.css.mjs
14434
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/DeleteSessionDialog.module.css.mjs
14512
14435
  const css$16 = ".rp_FifHrW_body{flex-direction:column;gap:8px;min-width:min(380px,100%);display:flex}.rp_FifHrW_body p{margin:0}.rp_FifHrW_question{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_FifHrW_warning{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.rp_FifHrW_choice{color:var(--dsw-alias-label-primary);border:0;flex-direction:column;gap:4px;margin:4px 0 0;padding:0;font-size:13px;line-height:20px;display:flex}.rp_FifHrW_choice legend{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;padding:0;font-size:12px}.rp_FifHrW_error{color:var(--dsw-alias-state-error-primary);font-size:12px}";
14513
14436
  const key$16 = "src/client/pages/sessions/DeleteSessionDialog.module.css";
14514
14437
  let tag$16 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$16) + "]");
@@ -14521,13 +14444,12 @@ window.__ModuleLoader__.load({
14521
14444
  tag$16.textContent = css$16;
14522
14445
  var DeleteSessionDialog_module_css_default = {
14523
14446
  "question": "rp_FifHrW_question",
14447
+ "body": "rp_FifHrW_body",
14524
14448
  "error": "rp_FifHrW_error",
14525
14449
  "choice": "rp_FifHrW_choice",
14526
- "body": "rp_FifHrW_body",
14527
14450
  "warning": "rp_FifHrW_warning"
14528
14451
  };
14529
- //#endregion
14530
- //#region src/client/pages/sessions/DeleteSessionDialog.tsx
14452
+ // src/client/pages/sessions/DeleteSessionDialog.tsx
14531
14453
  /** Asks for confirmation before a session and everything saved with it is removed. */
14532
14454
  function DeleteSessionDialog({ t, removal, onConfirm, onCancel, onEverywhere }) {
14533
14455
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
@@ -14598,8 +14520,7 @@ window.__ModuleLoader__.load({
14598
14520
  })
14599
14521
  });
14600
14522
  }
14601
- //#endregion
14602
- //#region src/client/paging/use-fit.ts
14523
+ // src/client/paging/use-fit.ts
14603
14524
  /**
14604
14525
  * How many items fit in the element, measured whenever it resizes; 0 until
14605
14526
  * measured. `compute` receives the content box and the element's styles, where
@@ -14629,14 +14550,12 @@ window.__ModuleLoader__.load({
14629
14550
  const value = Number.parseFloat(style.getPropertyValue(name));
14630
14551
  return Number.isFinite(value) ? value : void 0;
14631
14552
  }
14632
- //#endregion
14633
- //#region src/client/pages/sessions/row-layout.ts
14553
+ // src/client/pages/sessions/row-layout.ts
14634
14554
  /** How many whole rows fit under the header without scrolling. */
14635
14555
  function rowsThatFit(box, { rowHeight, headerHeight }) {
14636
14556
  return Math.max(0, Math.floor((box.height - headerHeight) / rowHeight));
14637
14557
  }
14638
- //#endregion
14639
- //#region src/client/pages/sessions/use-row-fit.ts
14558
+ // src/client/pages/sessions/use-row-fit.ts
14640
14559
  function rowFit(box, style) {
14641
14560
  const rowHeight = pixels(style, "--rp-row-height");
14642
14561
  const headerHeight = pixels(style, "--rp-header-height");
@@ -14649,8 +14568,7 @@ window.__ModuleLoader__.load({
14649
14568
  function useRowFit(viewport) {
14650
14569
  return useFit(viewport, rowFit);
14651
14570
  }
14652
- //#endregion
14653
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/SessionsPage.module.css.mjs
14571
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sessions/SessionsPage.module.css.mjs
14654
14572
  const css$15 = ".rp_24z4eW_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_24z4eW_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_24z4eW_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_24z4eW_spinning{animation:.9s linear infinite rp_24z4eW_spin}@keyframes rp_24z4eW_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_24z4eW_spinning{animation:none}}.rp_24z4eW_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_24z4eW_viewport{--rp-row-height:40px;--rp-header-height:32px;flex:1 1 0;min-height:0;overflow-x:auto}.rp_24z4eW_scrolls{overflow-y:auto}.rp_24z4eW_fits{overflow-y:hidden}.rp_24z4eW_table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:720px}.rp_24z4eW_actionsColumn{width:104px}.rp_24z4eW_nameColumn{width:30%}.rp_24z4eW_worldColumn{width:26%}.rp_24z4eW_timeColumn{width:16%}.rp_24z4eW_turnsColumn{width:10%}.rp_24z4eW_table th{height:var(--rp-header-height);border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);text-align:left;color:var(--dsw-alias-label-tertiary);padding:0 12px;font-size:12px;font-weight:400;position:sticky;top:0}.rp_24z4eW_table td{height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l1);text-overflow:ellipsis;white-space:nowrap;padding:0 12px;font-size:13px;overflow:hidden}.rp_24z4eW_name{color:var(--dsw-alias-label-primary);font-weight:500}.rp_24z4eW_secondary{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_24z4eW_table .rp_24z4eW_number{text-align:right}.rp_24z4eW_table .rp_24z4eW_actions{text-align:center;white-space:nowrap;padding:0 8px}.rp_24z4eW_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_24z4eW_archived td{opacity:.6}.rp_24z4eW_badge{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-label-tertiary);margin-left:6px;padding:0 6px;font-size:12px}@media (width<=640px){.rp_24z4eW_viewport{--rp-row-height:196px;--rp-header-height:0px;overflow-x:hidden}.rp_24z4eW_table,.rp_24z4eW_table tbody,.rp_24z4eW_table tr,.rp_24z4eW_table td{width:100%;display:block}.rp_24z4eW_table{min-width:0}.rp_24z4eW_table colgroup,.rp_24z4eW_table thead{display:none}.rp_24z4eW_table tr{box-sizing:border-box;min-height:var(--rp-row-height);border-bottom:.5px solid var(--dsw-alias-border-l2);padding:10px 12px}.rp_24z4eW_table td{box-sizing:border-box;text-align:start;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;border:0;grid-template-columns:minmax(88px,34%) minmax(0,1fr);align-items:baseline;height:auto;min-height:24px;padding:2px 0;display:grid;overflow:visible}.rp_24z4eW_table td:before{content:attr(data-label);color:var(--dsw-alias-label-tertiary);padding-inline-end:10px;font-size:12px;font-weight:400}.rp_24z4eW_table .rp_24z4eW_number{text-align:start}.rp_24z4eW_table .rp_24z4eW_actions{justify-content:flex-end;min-height:36px;padding-top:4px;display:flex}.rp_24z4eW_table .rp_24z4eW_actions:before{margin-inline-end:auto}}";
14655
14573
  const key$15 = "src/client/pages/sessions/SessionsPage.module.css";
14656
14574
  let tag$15 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$15) + "]");
@@ -14662,31 +14580,30 @@ window.__ModuleLoader__.load({
14662
14580
  }
14663
14581
  tag$15.textContent = css$15;
14664
14582
  var SessionsPage_module_css_default = {
14583
+ "secondary": "rp_24z4eW_secondary",
14584
+ "archived": "rp_24z4eW_archived",
14585
+ "name": "rp_24z4eW_name",
14586
+ "count": "rp_24z4eW_count",
14587
+ "page": "rp_24z4eW_page",
14588
+ "scrolls": "rp_24z4eW_scrolls",
14665
14589
  "worldColumn": "rp_24z4eW_worldColumn",
14666
- "message": "rp_24z4eW_message",
14667
- "turnsColumn": "rp_24z4eW_turnsColumn",
14668
- "timeColumn": "rp_24z4eW_timeColumn",
14669
- "fits": "rp_24z4eW_fits",
14590
+ "badge": "rp_24z4eW_badge",
14670
14591
  "actionsColumn": "rp_24z4eW_actionsColumn",
14671
14592
  "spin": "rp_24z4eW_spin",
14672
14593
  "number": "rp_24z4eW_number",
14673
- "name": "rp_24z4eW_name",
14594
+ "turnsColumn": "rp_24z4eW_turnsColumn",
14595
+ "message": "rp_24z4eW_message",
14596
+ "notice": "rp_24z4eW_notice",
14597
+ "timeColumn": "rp_24z4eW_timeColumn",
14598
+ "viewport": "rp_24z4eW_viewport",
14674
14599
  "toolbar": "rp_24z4eW_toolbar",
14675
14600
  "table": "rp_24z4eW_table",
14676
- "count": "rp_24z4eW_count",
14677
- "archived": "rp_24z4eW_archived",
14678
- "page": "rp_24z4eW_page",
14679
- "scrolls": "rp_24z4eW_scrolls",
14680
14601
  "nameColumn": "rp_24z4eW_nameColumn",
14681
- "badge": "rp_24z4eW_badge",
14682
14602
  "actions": "rp_24z4eW_actions",
14683
- "secondary": "rp_24z4eW_secondary",
14684
- "notice": "rp_24z4eW_notice",
14685
- "viewport": "rp_24z4eW_viewport",
14686
- "spinning": "rp_24z4eW_spinning"
14603
+ "spinning": "rp_24z4eW_spinning",
14604
+ "fits": "rp_24z4eW_fits"
14687
14605
  };
14688
- //#endregion
14689
- //#region src/client/pages/sessions/SessionsPage.tsx
14606
+ // src/client/pages/sessions/SessionsPage.tsx
14690
14607
  /** The sessions as a table, one page at a time, the most recently played first. */
14691
14608
  function SessionsPage({ t, useRoleplaySessions, load, refresh, open, archive, restore, askRemoval, cancelRemoval, confirmRemoval, setEverywhere }) {
14692
14609
  const state = useRoleplaySessions((snapshot) => snapshot);
@@ -14905,8 +14822,7 @@ window.__ModuleLoader__.load({
14905
14822
  ]
14906
14823
  });
14907
14824
  }
14908
- //#endregion
14909
- //#region src/client/pages/sessions/locales.ts
14825
+ // src/client/pages/sessions/locales.ts
14910
14826
  const dictionaries$8 = {
14911
14827
  en: {
14912
14828
  nav: "Sessions",
@@ -14989,8 +14905,7 @@ window.__ModuleLoader__.load({
14989
14905
  dateLocale: "zh-CN"
14990
14906
  }
14991
14907
  };
14992
- //#endregion
14993
- //#region src/shared/sync.ts
14908
+ // src/shared/sync.ts
14994
14909
  const DEFAULT_SYNC = {
14995
14910
  remote: "",
14996
14911
  rclone: "",
@@ -15000,8 +14915,7 @@ window.__ModuleLoader__.load({
15000
14915
  };
15001
14916
  const SYNC_PASSWORD_REF = "ROLEPLAY_SYNC_RCLONE_CONFIG_PASS";
15002
14917
  const SYNC_CHANGED = "roleplay-sync-changed";
15003
- //#endregion
15004
- //#region src/client/sync-api.ts
14918
+ // src/client/sync-api.ts
15005
14919
  async function reply$1(response) {
15006
14920
  if (!response.ok) {
15007
14921
  const body = await response.json().catch(() => void 0);
@@ -15069,8 +14983,7 @@ window.__ModuleLoader__.load({
15069
14983
  globalThis.dispatchEvent(new Event(SYNC_CHANGED));
15070
14984
  return status;
15071
14985
  }
15072
- //#endregion
15073
- //#region src/client/pages/sessions/sessions-controller.ts
14986
+ // src/client/pages/sessions/sessions-controller.ts
15074
14987
  /** Reads the sessions list from the host. */
15075
14988
  var SessionsController = class {
15076
14989
  store = (0, _deepseek_ai_dsh_client_store.createSnapshotStore)({
@@ -15269,8 +15182,7 @@ window.__ModuleLoader__.load({
15269
15182
  }
15270
15183
  }
15271
15184
  };
15272
- //#endregion
15273
- //#region src/client/pages/sessions/index.ts
15185
+ // src/client/pages/sessions/index.ts
15274
15186
  const NAMESPACE$9 = "roleplay.sessions";
15275
15187
  /** Adds the Sessions page to the Role Play panel. */
15276
15188
  function registerSessionsPage(ctx) {
@@ -15289,8 +15201,7 @@ window.__ModuleLoader__.load({
15289
15201
  inject: () => sessions.inject()
15290
15202
  }, SessionsPage));
15291
15203
  }
15292
- //#endregion
15293
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sync/SyncPage.module.css.mjs
15204
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/sync/SyncPage.module.css.mjs
15294
15205
  const css$14 = ".rp_Gk-byG_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_Gk-byG_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_Gk-byG_meta{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_Gk-byG_actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.rp_Gk-byG_viewport{flex:1 1 0;min-height:0;overflow:auto}.rp_Gk-byG_table{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}";
15295
15206
  const key$14 = "src/client/pages/sync/SyncPage.module.css";
15296
15207
  let tag$14 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$14) + "]");
@@ -15302,32 +15213,31 @@ window.__ModuleLoader__.load({
15302
15213
  }
15303
15214
  tag$14.textContent = css$14;
15304
15215
  var SyncPage_module_css_default = {
15305
- "detailsColumn": "rp_Gk-byG_detailsColumn",
15306
- "page": "rp_Gk-byG_page",
15216
+ "failed": "rp_Gk-byG_failed",
15217
+ "actionHeading": "rp_Gk-byG_actionHeading",
15307
15218
  "viewport": "rp_Gk-byG_viewport",
15308
15219
  "table": "rp_Gk-byG_table",
15220
+ "message": "rp_Gk-byG_message",
15221
+ "meta": "rp_Gk-byG_meta",
15309
15222
  "stateColumn": "rp_Gk-byG_stateColumn",
15310
- "actionHeading": "rp_Gk-byG_actionHeading",
15311
- "actions": "rp_Gk-byG_actions",
15312
- "failed": "rp_Gk-byG_failed",
15223
+ "detailsColumn": "rp_Gk-byG_detailsColumn",
15224
+ "caption": "rp_Gk-byG_caption",
15313
15225
  "unit": "rp_Gk-byG_unit",
15314
- "actionsColumn": "rp_Gk-byG_actionsColumn",
15315
- "choices": "rp_Gk-byG_choices",
15316
- "detail": "rp_Gk-byG_detail",
15317
- "problem": "rp_Gk-byG_problem",
15318
- "confirmation": "rp_Gk-byG_confirmation",
15319
15226
  "conflict": "rp_Gk-byG_conflict",
15320
- "meta": "rp_Gk-byG_meta",
15321
- "message": "rp_Gk-byG_message",
15322
- "kindColumn": "rp_Gk-byG_kindColumn",
15323
- "caption": "rp_Gk-byG_caption",
15324
- "error": "rp_Gk-byG_error",
15325
15227
  "unitColumn": "rp_Gk-byG_unitColumn",
15228
+ "page": "rp_Gk-byG_page",
15229
+ "error": "rp_Gk-byG_error",
15230
+ "toolbar": "rp_Gk-byG_toolbar",
15231
+ "kindColumn": "rp_Gk-byG_kindColumn",
15232
+ "actions": "rp_Gk-byG_actions",
15326
15233
  "syncedColumn": "rp_Gk-byG_syncedColumn",
15327
- "toolbar": "rp_Gk-byG_toolbar"
15234
+ "choices": "rp_Gk-byG_choices",
15235
+ "confirmation": "rp_Gk-byG_confirmation",
15236
+ "actionsColumn": "rp_Gk-byG_actionsColumn",
15237
+ "detail": "rp_Gk-byG_detail",
15238
+ "problem": "rp_Gk-byG_problem"
15328
15239
  };
15329
- //#endregion
15330
- //#region src/client/pages/sync/SyncPage.tsx
15240
+ // src/client/pages/sync/SyncPage.tsx
15331
15241
  const when = (iso, never, locale) => iso === void 0 ? never : new Date(iso).toLocaleString(locale);
15332
15242
  function Details({ t, unit, working, face, confirmDeletion }) {
15333
15243
  if (unit.state === "ignored") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
@@ -15615,8 +15525,7 @@ window.__ModuleLoader__.load({
15615
15525
  ]
15616
15526
  });
15617
15527
  }
15618
- //#endregion
15619
- //#region src/client/pages/sync/locales.ts
15528
+ // src/client/pages/sync/locales.ts
15620
15529
  const dictionaries$7 = {
15621
15530
  en: {
15622
15531
  nav: "Sync",
@@ -15721,8 +15630,7 @@ window.__ModuleLoader__.load({
15721
15630
  close: "关闭"
15722
15631
  }
15723
15632
  };
15724
- //#endregion
15725
- //#region src/client/pages/sync/sync-controller.ts
15633
+ // src/client/pages/sync/sync-controller.ts
15726
15634
  const messageOf$1 = (error) => error instanceof Error ? error.message : String(error);
15727
15635
  /** Reads what the sync knows of each unit and starts runs and choices; while one runs the page keeps reading. */
15728
15636
  var SyncController = class {
@@ -15809,8 +15717,7 @@ window.__ModuleLoader__.load({
15809
15717
  }
15810
15718
  }
15811
15719
  };
15812
- //#endregion
15813
- //#region src/client/pages/sync/index.ts
15720
+ // src/client/pages/sync/index.ts
15814
15721
  const NAMESPACE$8 = "roleplay.sync";
15815
15722
  /** Adds the Sync page to the Role Play panel: what is in step with the remote and what needs a choice. */
15816
15723
  function registerSyncPage(ctx) {
@@ -15829,8 +15736,7 @@ window.__ModuleLoader__.load({
15829
15736
  inject: () => sync.inject()
15830
15737
  }, SyncPage));
15831
15738
  }
15832
- //#endregion
15833
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/world-card/WorldCard.module.css.mjs
15739
+ // \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
15834
15740
  const css$13 = ".rp_Bvxx5q_card{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);flex-direction:column;flex:auto;min-width:0;transition:border-color .12s;display:flex;position:relative;overflow:hidden}.rp_Bvxx5q_card:hover{border-color:var(--dsw-alias-border-l4)}.rp_Bvxx5q_card:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_Bvxx5q_cover{background:var(--dsw-alias-bg-layer-3);flex:1 1 0;min-height:0;position:relative;overflow:hidden}.rp_Bvxx5q_image{object-fit:cover;width:100%;height:100%;display:block}.rp_Bvxx5q_placeholder{color:#ffffffd9;background:linear-gradient(145deg, hsl(var(--rp-hue) 38% 46%), hsl(calc(var(--rp-hue) + 35) 38% 32%));user-select:none;justify-content:center;align-items:center;width:100%;height:100%;font-size:40px;font-weight:500;display:flex}.rp_Bvxx5q_play{z-index:2;corner-shape:round;color:#fff;opacity:.6;cursor:pointer;background:#00000059;border:0;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;padding:0;transition:opacity .12s,background-color .12s;display:flex;position:absolute;top:8px;right:8px}.rp_Bvxx5q_card:hover .rp_Bvxx5q_play,.rp_Bvxx5q_play:focus-visible{opacity:1}.rp_Bvxx5q_play:hover{background:#0000008c}.rp_Bvxx5q_play:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px}.rp_Bvxx5q_info{flex-direction:column;flex:none;gap:4px;padding:8px 10px;display:flex}.rp_Bvxx5q_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.rp_Bvxx5q_tags{gap:4px;display:flex;overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 20px),#0000)}.rp_Bvxx5q_tag{flex:none}.rp_Bvxx5q_openButton{z-index:1;border-radius:inherit;cursor:pointer;background:0 0;border:0;width:100%;padding:0;position:absolute;inset:0}.rp_Bvxx5q_openButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:-2px}";
15835
15741
  const key$13 = "src/client/widgets/world-card/WorldCard.module.css";
15836
15742
  let tag$13 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$13) + "]");
@@ -15842,19 +15748,18 @@ window.__ModuleLoader__.load({
15842
15748
  }
15843
15749
  tag$13.textContent = css$13;
15844
15750
  var WorldCard_module_css_default = {
15751
+ "tags": "rp_Bvxx5q_tags",
15752
+ "cover": "rp_Bvxx5q_cover",
15753
+ "openButton": "rp_Bvxx5q_openButton",
15845
15754
  "name": "rp_Bvxx5q_name",
15846
- "image": "rp_Bvxx5q_image",
15847
- "card": "rp_Bvxx5q_card",
15755
+ "tag": "rp_Bvxx5q_tag",
15848
15756
  "placeholder": "rp_Bvxx5q_placeholder",
15849
15757
  "info": "rp_Bvxx5q_info",
15850
15758
  "play": "rp_Bvxx5q_play",
15851
- "tags": "rp_Bvxx5q_tags",
15852
- "tag": "rp_Bvxx5q_tag",
15853
- "cover": "rp_Bvxx5q_cover",
15854
- "openButton": "rp_Bvxx5q_openButton"
15759
+ "image": "rp_Bvxx5q_image",
15760
+ "card": "rp_Bvxx5q_card"
15855
15761
  };
15856
- //#endregion
15857
- //#region src/client/widgets/world-card/WorldCard.tsx
15762
+ // src/client/widgets/world-card/WorldCard.tsx
15858
15763
  /** Stable hue per name, so a world without a cover keeps the same colour. */
15859
15764
  function hueOf$1(name) {
15860
15765
  let hash = 0;
@@ -15937,8 +15842,7 @@ window.__ModuleLoader__.load({
15937
15842
  })
15938
15843
  });
15939
15844
  }
15940
- //#endregion
15941
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/widgets/avatar-choices/AvatarChoices.module.css.mjs
15845
+ // \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
15942
15846
  const css$12 = ".rp_YCstOG_option{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}.rp_YCstOG_option:has(input:checked){border-color:var(--dsw-alias-state-business-primary)}.rp_YCstOG_option input{accent-color:var(--dsw-alias-state-business-primary);margin:3px 0 0}.rp_YCstOG_text{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_YCstOG_name{font-size:13px;font-weight:500}.rp_YCstOG_summary{color:var(--dsw-alias-label-secondary);font-size:12px}";
15943
15847
  const key$12 = "src/client/widgets/avatar-choices/AvatarChoices.module.css";
15944
15848
  let tag$12 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$12) + "]");
@@ -15951,12 +15855,11 @@ window.__ModuleLoader__.load({
15951
15855
  tag$12.textContent = css$12;
15952
15856
  var AvatarChoices_module_css_default = {
15953
15857
  "summary": "rp_YCstOG_summary",
15954
- "option": "rp_YCstOG_option",
15955
15858
  "text": "rp_YCstOG_text",
15859
+ "option": "rp_YCstOG_option",
15956
15860
  "name": "rp_YCstOG_name"
15957
15861
  };
15958
- //#endregion
15959
- //#region src/client/widgets/avatar-choices/AvatarChoices.tsx
15862
+ // src/client/widgets/avatar-choices/AvatarChoices.tsx
15960
15863
  /** A list of avatars to tick: the ones brought into a world or a session. */
15961
15864
  function AvatarChoices({ avatars, selected, disabled, onToggle }) {
15962
15865
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: avatars.map((avatar) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
@@ -15980,8 +15883,7 @@ window.__ModuleLoader__.load({
15980
15883
  })]
15981
15884
  }, avatar.key)) });
15982
15885
  }
15983
- //#endregion
15984
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/StartSessionDialog.module.css.mjs
15886
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/StartSessionDialog.module.css.mjs
15985
15887
  const css$11 = ".rp_AnbLKG_form{flex-direction:column;gap:16px;min-width:min(420px,100%);display:flex}.rp_AnbLKG_field{border:0;flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;display:flex}.rp_AnbLKG_label{color:var(--dsw-alias-label-secondary);padding:0;font-size:12px}.rp_AnbLKG_option{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);cursor:pointer;align-items:flex-start;gap:10px;padding:8px 10px;display:flex}.rp_AnbLKG_option:has(input:checked){border-color:var(--dsw-alias-state-business-primary)}.rp_AnbLKG_option input{accent-color:var(--dsw-alias-state-business-primary);margin:3px 0 0}.rp_AnbLKG_optionText{flex-direction:column;gap:2px;min-width:0;display:flex}.rp_AnbLKG_optionName{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.rp_AnbLKG_optionSummary{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.rp_AnbLKG_message{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px}.rp_AnbLKG_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_AnbLKG_advanced{flex-direction:column;gap:8px;display:flex}.rp_AnbLKG_advancedToggle{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;align-self:flex-start;align-items:center;gap:6px;padding:0;font-size:12px;display:inline-flex}.rp_AnbLKG_advancedToggle:hover{color:var(--dsw-alias-label-primary)}.rp_AnbLKG_advancedBody{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);flex-direction:column;gap:12px;max-height:320px;padding:12px;display:flex;overflow-y:auto}@media (width<=520px){.rp_AnbLKG_form{min-width:0}}";
15986
15888
  const key$11 = "src/client/pages/worlds/StartSessionDialog.module.css";
15987
15889
  let tag$11 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$11) + "]");
@@ -15994,20 +15896,19 @@ window.__ModuleLoader__.load({
15994
15896
  tag$11.textContent = css$11;
15995
15897
  var StartSessionDialog_module_css_default = {
15996
15898
  "form": "rp_AnbLKG_form",
15997
- "advanced": "rp_AnbLKG_advanced",
15899
+ "label": "rp_AnbLKG_label",
15998
15900
  "error": "rp_AnbLKG_error",
15999
- "optionText": "rp_AnbLKG_optionText",
15901
+ "advanced": "rp_AnbLKG_advanced",
15902
+ "option": "rp_AnbLKG_option",
16000
15903
  "advancedToggle": "rp_AnbLKG_advancedToggle",
15904
+ "advancedBody": "rp_AnbLKG_advancedBody",
15905
+ "optionName": "rp_AnbLKG_optionName",
16001
15906
  "optionSummary": "rp_AnbLKG_optionSummary",
16002
- "label": "rp_AnbLKG_label",
16003
15907
  "message": "rp_AnbLKG_message",
16004
- "optionName": "rp_AnbLKG_optionName",
16005
- "option": "rp_AnbLKG_option",
16006
- "advancedBody": "rp_AnbLKG_advancedBody",
16007
- "field": "rp_AnbLKG_field"
15908
+ "field": "rp_AnbLKG_field",
15909
+ "optionText": "rp_AnbLKG_optionText"
16008
15910
  };
16009
- //#endregion
16010
- //#region src/client/pages/worlds/AddAvatarsDialog.tsx
15911
+ // src/client/pages/worlds/AddAvatarsDialog.tsx
16011
15912
  /** Asks which avatars become characters of a world's own files. */
16012
15913
  function AddAvatarsDialog({ t, worldId, worldName, onAdded, onClose }) {
16013
15914
  const formId = (0, react.useId)();
@@ -16093,8 +15994,7 @@ window.__ModuleLoader__.load({
16093
15994
  })
16094
15995
  });
16095
15996
  }
16096
- //#endregion
16097
- //#region src/shared/decisions.ts
15997
+ // src/shared/decisions.ts
16098
15998
  /** The places where a language model's closed-choice judgement can be given to a decision model instead, or, for the gates, a check can be made at all. */
16099
15999
  const DECISION_SITES = [
16100
16000
  "triggers",
@@ -16120,12 +16020,10 @@ window.__ModuleLoader__.load({
16120
16020
  ];
16121
16021
  /** What a gate can be set to: the modes of any site, or off. */
16122
16022
  const GATE_MODES = ["off", ...DECISION_MODES];
16123
- //#endregion
16124
- //#region src/shared/rules.ts
16023
+ // src/shared/rules.ts
16125
16024
  /** The longest text of the player's own rules. */
16126
16025
  const MAX_OWN_RULES = 2e3;
16127
- //#endregion
16128
- //#region src/shared/settings.ts
16026
+ // src/shared/settings.ts
16129
16027
  const integer = (min, max, fallback) => ({
16130
16028
  kind: "integer",
16131
16029
  min,
@@ -16248,7 +16146,7 @@ window.__ModuleLoader__.load({
16248
16146
  judgedPerTurn: integer(0, 5, 2)
16249
16147
  },
16250
16148
  decisions: {
16251
- triggers: choice(DECISION_MODES, "llm"),
16149
+ triggers: choice(DECISION_MODES, "hybrid"),
16252
16150
  reflection: choice(DECISION_MODES, "llm"),
16253
16151
  agency: choice(GATE_MODES, "off"),
16254
16152
  refusal: choice(GATE_MODES, "off"),
@@ -16300,8 +16198,7 @@ window.__ModuleLoader__.load({
16300
16198
  }
16301
16199
  /** A model as `provider/model`: both parts present, no spaces. */
16302
16200
  const MODEL_NAME = /^[^\s/]+\/\S+$/;
16303
- //#endregion
16304
- //#region src/client/settings-form/fields.ts
16201
+ // src/client/settings-form/fields.ts
16305
16202
  /** The settings the form offers, in the order shown. The rest are in the settings file. */
16306
16203
  const FORM_FIELDS = [
16307
16204
  {
@@ -17105,8 +17002,7 @@ window.__ModuleLoader__.load({
17105
17002
  }
17106
17003
  return next;
17107
17004
  }
17108
- //#endregion
17109
- //#region ../../node_modules/.pnpm/@dsh-ai-providers+core@0.5.0_@deepseek-ai+cordis@4.0.5_@deepseek-ai+dsh-llm@0.2.1-rc.3_@deepseek-ai+cordis@4.0.5_/node_modules/@dsh-ai-providers/core/lib/index.js
17005
+ // ../../node_modules/.pnpm/@dsh-ai-providers+core@0.5.4_@deepseek-ai+cordis@4.0.5_@deepseek-ai+dsh-llm@0.2.1-rc.5_@deepseek-ai+cordis@4.0.5_/node_modules/@dsh-ai-providers/core/lib/index.js
17110
17006
  /**
17111
17007
  * The browser API of the main plugin, which the UI of the main plugin and of every vendor plugin
17112
17008
  * uses. Paths are relative to the prefix, and the browser calls them with relative URLs so that a
@@ -17127,8 +17023,7 @@ window.__ModuleLoader__.load({
17127
17023
  if (typeof text === "string") return text;
17128
17024
  return text[locale] ?? text["en"] ?? Object.values(text)[0] ?? "";
17129
17025
  }
17130
- //#endregion
17131
- //#region src/client/settings-form/embedding-options.ts
17026
+ // src/client/settings-form/embedding-options.ts
17132
17027
  /**
17133
17028
  * What the selected embedding provider lets a request set, as the provider describes it, for the chat
17134
17029
  * settings to offer. It asks the AI providers plugin; without it, or without a provider selected, or
@@ -17155,8 +17050,7 @@ window.__ModuleLoader__.load({
17155
17050
  }, [only]);
17156
17051
  return options;
17157
17052
  }
17158
- //#endregion
17159
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings-form/SettingsFields.module.css.mjs
17053
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings-form/SettingsFields.module.css.mjs
17160
17054
  const css$10 = ".rp_Rhi3yq_row{flex-direction:column;gap:6px;display:flex}.rp_Rhi3yq_field{flex-direction:column;gap:6px;width:min(100%,320px);display:flex}.rp_Rhi3yq_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Rhi3yq_help{max-width:560px;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_Rhi3yq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_Rhi3yq_group{border-top:.5px solid var(--dsw-alias-border-l3);flex-direction:column;gap:12px;padding-top:12px;display:flex}.rp_Rhi3yq_groupTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:14px;font-weight:500}.rp_Rhi3yq_area{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;max-width:560px;min-height:96px;color:inherit;font:inherit;resize:vertical;padding:6px 8px;font-size:13px}.rp_Rhi3yq_area:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}";
17161
17055
  const key$10 = "src/client/settings-form/SettingsFields.module.css";
17162
17056
  let tag$10 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$10) + "]");
@@ -17168,17 +17062,16 @@ window.__ModuleLoader__.load({
17168
17062
  }
17169
17063
  tag$10.textContent = css$10;
17170
17064
  var SettingsFields_module_css_default = {
17065
+ "groupTitle": "rp_Rhi3yq_groupTitle",
17171
17066
  "help": "rp_Rhi3yq_help",
17172
17067
  "error": "rp_Rhi3yq_error",
17173
- "groupTitle": "rp_Rhi3yq_groupTitle",
17174
- "group": "rp_Rhi3yq_group",
17175
- "area": "rp_Rhi3yq_area",
17176
17068
  "row": "rp_Rhi3yq_row",
17177
17069
  "field": "rp_Rhi3yq_field",
17178
- "label": "rp_Rhi3yq_label"
17070
+ "label": "rp_Rhi3yq_label",
17071
+ "area": "rp_Rhi3yq_area",
17072
+ "group": "rp_Rhi3yq_group"
17179
17073
  };
17180
- //#endregion
17181
- //#region src/client/settings-form/SettingsFields.tsx
17074
+ // src/client/settings-form/SettingsFields.tsx
17182
17075
  /** The settings of a chat as editable fields: one control with its explanation under each. */
17183
17076
  function SettingsFields({ t, drafts, onChange, onPreset, options = [], disabled = false, locked = {}, hidden = [] }) {
17184
17077
  const bad = problemsOf(drafts, options);
@@ -17352,8 +17245,7 @@ window.__ModuleLoader__.load({
17352
17245
  })
17353
17246
  ] });
17354
17247
  }
17355
- //#endregion
17356
- //#region src/client/pages/worlds/import-api.ts
17248
+ // src/client/pages/worlds/import-api.ts
17357
17249
  async function answer$1(response) {
17358
17250
  if (!response.ok) {
17359
17251
  const body = await response.json().catch(() => void 0);
@@ -17386,6 +17278,17 @@ window.__ModuleLoader__.load({
17386
17278
  })
17387
17279
  }));
17388
17280
  }
17281
+ async function importWithoutModel(id, choices, language) {
17282
+ return await answer$1(await fetch(`${API_PREFIX}/worlds/import/structure?id=${encodeURIComponent(id)}`, {
17283
+ method: "POST",
17284
+ credentials: "same-origin",
17285
+ headers: { "content-type": "application/json" },
17286
+ body: JSON.stringify({
17287
+ ...choices,
17288
+ language
17289
+ })
17290
+ }));
17291
+ }
17389
17292
  async function discardImport(id) {
17390
17293
  await fetch(`${API_PREFIX}/worlds/import?id=${encodeURIComponent(id)}`, {
17391
17294
  method: "DELETE",
@@ -17422,8 +17325,7 @@ window.__ModuleLoader__.load({
17422
17325
  })
17423
17326
  }));
17424
17327
  }
17425
- //#endregion
17426
- //#region src/client/pages/worlds/translate-api.ts
17328
+ // src/client/pages/worlds/translate-api.ts
17427
17329
  /** The language a world is written in, or nothing when it has too little text to tell. */
17428
17330
  async function worldLanguage(worldId, signal) {
17429
17331
  const { language } = await answer$1(await fetch(`${API_PREFIX}/worlds/language?id=${encodeURIComponent(worldId)}`, {
@@ -17447,8 +17349,7 @@ window.__ModuleLoader__.load({
17447
17349
  }
17448
17350
  /** The language of the interface or of a setting, as one of the two the plugin writes in. */
17449
17351
  const storyLanguageOf = (code) => code.trim().toLowerCase().startsWith("zh") ? "zh" : "en";
17450
- //#endregion
17451
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/TranslateBanner.module.css.mjs
17352
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/TranslateBanner.module.css.mjs
17452
17353
  const css$9 = ".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}";
17453
17354
  const key$9 = "src/client/pages/worlds/TranslateBanner.module.css";
17454
17355
  let tag$9 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$9) + "]");
@@ -17461,12 +17362,11 @@ window.__ModuleLoader__.load({
17461
17362
  tag$9.textContent = css$9;
17462
17363
  var TranslateBanner_module_css_default = {
17463
17364
  "bannerActions": "rp_Lx8vJa_bannerActions",
17365
+ "text": "rp_Lx8vJa_text",
17464
17366
  "banner": "rp_Lx8vJa_banner",
17465
- "error": "rp_Lx8vJa_error",
17466
- "text": "rp_Lx8vJa_text"
17367
+ "error": "rp_Lx8vJa_error"
17467
17368
  };
17468
- //#endregion
17469
- //#region src/client/pages/worlds/TranslateBanner.tsx
17369
+ // src/client/pages/worlds/TranslateBanner.tsx
17470
17370
  const languageName = (t, language) => language === "zh" ? t("languageChinese") : t("languageEnglish");
17471
17371
  /** The language a world is written in, read from the host; nothing while it is being read or when it cannot be told. */
17472
17372
  function useWorldLanguage(worldId) {
@@ -17523,8 +17423,7 @@ window.__ModuleLoader__.load({
17523
17423
  children: failure
17524
17424
  })] });
17525
17425
  }
17526
- //#endregion
17527
- //#region src/client/pages/worlds/StartSessionDialog.tsx
17426
+ // src/client/pages/worlds/StartSessionDialog.tsx
17528
17427
  /** Asks what a new session needs: its name and which playable character the player takes. */
17529
17428
  function StartSessionDialog({ t, dialog, onStart, onClose }) {
17530
17429
  const formId = (0, react.useId)();
@@ -17852,16 +17751,14 @@ window.__ModuleLoader__.load({
17852
17751
  })
17853
17752
  });
17854
17753
  }
17855
- //#endregion
17856
- //#region src/client/pages/worlds/grid-layout.ts
17754
+ // src/client/pages/worlds/grid-layout.ts
17857
17755
  /** How many whole cards fit in the box without scrolling. */
17858
17756
  function cardsThatFit(box, { cardWidth, cardHeight, gap }) {
17859
17757
  const columns = Math.floor((box.width + gap) / (cardWidth + gap));
17860
17758
  const rows = Math.floor((box.height + gap) / (cardHeight + gap));
17861
17759
  return Math.max(0, columns) * Math.max(0, rows);
17862
17760
  }
17863
- //#endregion
17864
- //#region src/client/pages/worlds/use-grid-fit.ts
17761
+ // src/client/pages/worlds/use-grid-fit.ts
17865
17762
  function gridFit(box, style) {
17866
17763
  const cardWidth = pixels(style, "--rp-card-width");
17867
17764
  const cardHeight = pixels(style, "--rp-card-height");
@@ -17876,8 +17773,7 @@ window.__ModuleLoader__.load({
17876
17773
  function useGridFit(viewport) {
17877
17774
  return useFit(viewport, gridFit);
17878
17775
  }
17879
- //#endregion
17880
- //#region src/client/pages/worlds/CreateWorldDialog.tsx
17776
+ // src/client/pages/worlds/CreateWorldDialog.tsx
17881
17777
  function CreateWorldDialog({ t, onCreated, onClose }) {
17882
17778
  const formId = (0, react.useId)();
17883
17779
  const [folder, setFolder] = (0, react.useState)("");
@@ -18016,8 +17912,7 @@ window.__ModuleLoader__.load({
18016
17912
  })
18017
17913
  });
18018
17914
  }
18019
- //#endregion
18020
- //#region src/client/pages/worlds/starter-api.ts
17915
+ // src/client/pages/worlds/starter-api.ts
18021
17916
  async function answer(response) {
18022
17917
  if (!response.ok) {
18023
17918
  const body = await response.json().catch(() => void 0);
@@ -18041,9 +17936,8 @@ window.__ModuleLoader__.load({
18041
17936
  body: JSON.stringify({ folder })
18042
17937
  }));
18043
17938
  }
18044
- //#endregion
18045
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/pages/worlds/WorldsPage.module.css.mjs
18046
- const css$8 = ".rp_FHUyRq_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_FHUyRq_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_FHUyRq_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_FHUyRq_toolbarActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.rp_FHUyRq_spinning{animation:.9s linear infinite rp_FHUyRq_spin}@keyframes rp_FHUyRq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_FHUyRq_spinning{animation:none}}.rp_FHUyRq_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_FHUyRq_viewport{--rp-card-width:168px;--rp-card-height:288px;--rp-card-gap:16px;flex:1 1 0;min-height:0;padding:4px}.rp_FHUyRq_scrolls{overflow-y:auto}.rp_FHUyRq_fits{overflow:hidden}.rp_FHUyRq_grid{grid-auto-rows:var(--rp-card-height);grid-template-columns:repeat(auto-fill, var(--rp-card-width));gap:var(--rp-card-gap);margin:0;padding:0;list-style:none;display:grid}.rp_FHUyRq_cell{min-width:0;display:flex}.rp_FHUyRq_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:0;padding:40px 0;font-size:13px}.rp_FHUyRq_editHeader{border-bottom:.5px solid var(--dsw-alias-border-l3);flex-wrap:wrap;flex:none;align-items:center;gap:8px;padding:8px 16px;display:flex}.rp_FHUyRq_editTitle{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}}";
17939
+ // \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$8 = ".rp_FHUyRq_page{flex-direction:column;flex:1 1 0;gap:8px;min-height:0;display:flex}.rp_FHUyRq_toolbar{flex:none;justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.rp_FHUyRq_count{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_FHUyRq_toolbarActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.rp_FHUyRq_spinning{animation:.9s linear infinite rp_FHUyRq_spin}@keyframes rp_FHUyRq_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.rp_FHUyRq_spinning{animation:none}}.rp_FHUyRq_notice{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_FHUyRq_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}}";
18047
17941
  const key$8 = "src/client/pages/worlds/WorldsPage.module.css";
18048
17942
  let tag$8 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$8) + "]");
18049
17943
  if (tag$8 === null) {
@@ -18054,28 +17948,28 @@ window.__ModuleLoader__.load({
18054
17948
  }
18055
17949
  tag$8.textContent = css$8;
18056
17950
  var WorldsPage_module_css_default = {
18057
- "starters": "rp_FHUyRq_starters",
18058
17951
  "editHeader": "rp_FHUyRq_editHeader",
17952
+ "toolbarActions": "rp_FHUyRq_toolbarActions",
17953
+ "editTitle": "rp_FHUyRq_editTitle",
17954
+ "cell": "rp_FHUyRq_cell",
17955
+ "toolbar": "rp_FHUyRq_toolbar",
17956
+ "message": "rp_FHUyRq_message",
17957
+ "starters": "rp_FHUyRq_starters",
17958
+ "info": "rp_FHUyRq_info",
17959
+ "starter": "rp_FHUyRq_starter",
17960
+ "grid": "rp_FHUyRq_grid",
17961
+ "page": "rp_FHUyRq_page",
17962
+ "editBody": "rp_FHUyRq_editBody",
18059
17963
  "scrolls": "rp_FHUyRq_scrolls",
18060
17964
  "spinning": "rp_FHUyRq_spinning",
18061
- "page": "rp_FHUyRq_page",
18062
17965
  "count": "rp_FHUyRq_count",
18063
- "viewport": "rp_FHUyRq_viewport",
18064
- "grid": "rp_FHUyRq_grid",
18065
- "message": "rp_FHUyRq_message",
18066
17966
  "fits": "rp_FHUyRq_fits",
18067
- "editTitle": "rp_FHUyRq_editTitle",
18068
- "starter": "rp_FHUyRq_starter",
18069
- "toolbarActions": "rp_FHUyRq_toolbarActions",
18070
- "cell": "rp_FHUyRq_cell",
17967
+ "viewport": "rp_FHUyRq_viewport",
18071
17968
  "notice": "rp_FHUyRq_notice",
18072
- "spin": "rp_FHUyRq_spin",
18073
17969
  "editActions": "rp_FHUyRq_editActions",
18074
- "toolbar": "rp_FHUyRq_toolbar",
18075
- "editBody": "rp_FHUyRq_editBody"
17970
+ "spin": "rp_FHUyRq_spin"
18076
17971
  };
18077
- //#endregion
18078
- //#region src/client/pages/worlds/StarterWorlds.tsx
17972
+ // src/client/pages/worlds/StarterWorlds.tsx
18079
17973
  /** The worlds that ship with the plugin and are not yet the person's, offered where the list of worlds is empty. */
18080
17974
  function StarterWorlds({ t, onAdded }) {
18081
17975
  const [offered, setOffered] = (0, react.useState)([]);
@@ -18129,8 +18023,7 @@ window.__ModuleLoader__.load({
18129
18023
  })]
18130
18024
  });
18131
18025
  }
18132
- //#endregion
18133
- //#region src/client/pages/worlds/DraftBanner.tsx
18026
+ // src/client/pages/worlds/DraftBanner.tsx
18134
18027
  /** The most problems the banner lists: the rest are counted. */
18135
18028
  const SHOWN = 5;
18136
18029
  /** Says that a world is an import written as a draft, what is wrong with it, and lets the person have it repaired, keep it as it is or discard it. */
@@ -18228,8 +18121,7 @@ window.__ModuleLoader__.load({
18228
18121
  children: failure
18229
18122
  })] });
18230
18123
  }
18231
- //#endregion
18232
- //#region src/client/pages/worlds/RevertUpdateDialog.tsx
18124
+ // src/client/pages/worlds/RevertUpdateDialog.tsx
18233
18125
  /** Asks before a world goes back to how it was before its last card update. */
18234
18126
  function RevertUpdateDialog({ t, revert, onDone, onClose }) {
18235
18127
  const [busy, setBusy] = (0, react.useState)(false);
@@ -18268,8 +18160,7 @@ window.__ModuleLoader__.load({
18268
18160
  })
18269
18161
  });
18270
18162
  }
18271
- //#endregion
18272
- //#region src/client/pages/worlds/WorldsPage.tsx
18163
+ // src/client/pages/worlds/WorldsPage.tsx
18273
18164
  /** The worlds, one page of cards at a time. */
18274
18165
  function WorldsPage({ t, useWorlds, load, refresh, openStartDialog, closeStartDialog, startSession, dismissStarted, openAuthoring, openChat }) {
18275
18166
  const state = useWorlds((snapshot) => snapshot);
@@ -18288,6 +18179,7 @@ window.__ModuleLoader__.load({
18288
18179
  const [updateBusy, setUpdateBusy] = (0, react.useState)(false);
18289
18180
  const [uploading, setUploading] = (0, react.useState)(false);
18290
18181
  const [importNotice, setImportNotice] = (0, react.useState)();
18182
+ const [importDone, setImportDone] = (0, react.useState)();
18291
18183
  const picker = (0, react.useRef)(null);
18292
18184
  const presetPicker = (0, react.useRef)(null);
18293
18185
  const [presetBusy, setPresetBusy] = (0, react.useState)(false);
@@ -18325,6 +18217,7 @@ window.__ModuleLoader__.load({
18325
18217
  if (file === void 0) return;
18326
18218
  setUploading(true);
18327
18219
  setImportNotice(void 0);
18220
+ setImportDone(void 0);
18328
18221
  uploadCard(file).then((preview) => {
18329
18222
  setUploading(false);
18330
18223
  setImporting(preview);
@@ -18374,6 +18267,14 @@ window.__ModuleLoader__.load({
18374
18267
  preview: importing,
18375
18268
  ...updating === void 0 ? {} : { initialUpdate: updating },
18376
18269
  start: (choices, update) => startImport(importing.id, choices, t("language"), update),
18270
+ startPlain: (choices) => importWithoutModel(importing.id, choices, t("language")),
18271
+ onImportedPlain: (_world, draft) => {
18272
+ setImporting(void 0);
18273
+ setUpdating(void 0);
18274
+ refresh();
18275
+ if (draft) setImportNotice(t("importPlainDraft"));
18276
+ else setImportDone(t("importPlainDone"));
18277
+ },
18377
18278
  discard: () => discardImport(importing.id),
18378
18279
  onCancelled: () => {
18379
18280
  setImporting(void 0);
@@ -18619,6 +18520,11 @@ window.__ModuleLoader__.load({
18619
18520
  role: "alert",
18620
18521
  children: importNotice
18621
18522
  }),
18523
+ importDone !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
18524
+ className: WorldsPage_module_css_default.info,
18525
+ role: "status",
18526
+ children: importDone
18527
+ }),
18622
18528
  state.error !== void 0 && !failedWithoutData && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
18623
18529
  className: WorldsPage_module_css_default.notice,
18624
18530
  role: "alert",
@@ -18712,8 +18618,7 @@ window.__ModuleLoader__.load({
18712
18618
  ]
18713
18619
  });
18714
18620
  }
18715
- //#endregion
18716
- //#region src/client/settings-form/locales.ts
18621
+ // src/client/settings-form/locales.ts
18717
18622
  const dictionaries$6 = {
18718
18623
  en: {
18719
18624
  samplingMaster: "Temperature: game master",
@@ -19158,6 +19063,8 @@ window.__ModuleLoader__.load({
19158
19063
  importUploading: "Reading the card…",
19159
19064
  importUploadFailed: "Could not read the card: {message}",
19160
19065
  importTags: "Tags",
19066
+ importPlainDone: "The card was imported without a model: its character, its lorebook and its instructions are in the new world. Open it to add places and other people yourself, or have an assistant do it.",
19067
+ importPlainDraft: "The card was imported without a model, but the world would not start yet: open it to see what is missing.",
19161
19068
  importNotStarted: "The world was made, but the import has not started: open its authoring chat and send the /import-st command yourself.",
19162
19069
  chatNotOpened: "Started the session \"{name}\", but could not open its chat: {message}",
19163
19070
  advanced: "Advanced settings",
@@ -19271,6 +19178,8 @@ window.__ModuleLoader__.load({
19271
19178
  importUploading: "正在读取角色卡…",
19272
19179
  importUploadFailed: "无法读取角色卡:{message}",
19273
19180
  importTags: "标签",
19181
+ importPlainDone: "卡片已在不使用模型的情况下导入:它的角色、世界书和指令都已在新世界中。可以打开它自己补充地点和其他人物,或请助手来做。",
19182
+ importPlainDraft: "卡片已在不使用模型的情况下导入,但世界还无法开始:打开它查看缺少什么。",
19274
19183
  importNotStarted: "世界已创建,但导入尚未开始:请打开它的编辑对话,并自行发送 /import-st 指令。",
19275
19184
  chatNotOpened: "已开始存档“{name}”,但无法打开对话:{message}",
19276
19185
  advanced: "高级设置",
@@ -19362,8 +19271,7 @@ window.__ModuleLoader__.load({
19362
19271
  startAvatarsHelp: "勾选要带进这个存档的角色形象,它们会成为存档中的角色,你也可以扮演它们。世界本身不会改变。"
19363
19272
  }
19364
19273
  }, dictionaries$6), dictionaries$12), dictionaries$20), dictionaries$21);
19365
- //#endregion
19366
- //#region src/client/pages/worlds/worlds-controller.ts
19274
+ // src/client/pages/worlds/worlds-controller.ts
19367
19275
  async function request$1(path, init, signal) {
19368
19276
  const response = await fetch(`${API_PREFIX}${path}`, {
19369
19277
  ...init,
@@ -19608,8 +19516,7 @@ window.__ModuleLoader__.load({
19608
19516
  }
19609
19517
  }
19610
19518
  };
19611
- //#endregion
19612
- //#region src/client/pages/worlds/index.ts
19519
+ // src/client/pages/worlds/index.ts
19613
19520
  const NAMESPACE$7 = "roleplay.worlds";
19614
19521
  /** Adds the Worlds page to the Role Play panel. */
19615
19522
  function registerWorldsPage(ctx) {
@@ -19628,8 +19535,7 @@ window.__ModuleLoader__.load({
19628
19535
  inject: () => worlds.inject()
19629
19536
  }, WorldsPage));
19630
19537
  }
19631
- //#endregion
19632
- //#region src/shared/chat.ts
19538
+ // src/shared/chat.ts
19633
19539
  const CHAT_PREFIX = "session-";
19634
19540
  const UUID_V4 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
19635
19541
  /** The roleplay session a DSH chat id could belong to; ordinary DSH chats have ids of the same shape. */
@@ -19638,8 +19544,7 @@ window.__ModuleLoader__.load({
19638
19544
  const id = chat.slice(8);
19639
19545
  return UUID_V4.test(id) ? id : void 0;
19640
19546
  }
19641
- //#endregion
19642
- //#region src/client/branch/branch-controller.ts
19547
+ // src/client/branch/branch-controller.ts
19643
19548
  /**
19644
19549
  * A chat DSH makes as a branch of a roleplay chat is given a session by the host, named after the first. Here the player is asked
19645
19550
  * for a name for it. Only a chat that appears while the client runs is asked about, never one that was already there.
@@ -19722,8 +19627,7 @@ window.__ModuleLoader__.load({
19722
19627
  }
19723
19628
  }
19724
19629
  };
19725
- //#endregion
19726
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/branch/BranchDialog.module.css.mjs
19630
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/branch/BranchDialog.module.css.mjs
19727
19631
  const css$7 = ".rp_Dy1TaW_form{flex-direction:column;gap:12px;min-width:min(420px,100%);display:flex}.rp_Dy1TaW_field{flex-direction:column;gap:6px;min-width:0;display:flex}.rp_Dy1TaW_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_Dy1TaW_error{color:var(--dsw-alias-state-danger-primary);margin:0;font-size:12px}";
19728
19632
  const key$7 = "src/client/branch/BranchDialog.module.css";
19729
19633
  let tag$7 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$7) + "]");
@@ -19740,8 +19644,7 @@ window.__ModuleLoader__.load({
19740
19644
  "label": "rp_Dy1TaW_label",
19741
19645
  "error": "rp_Dy1TaW_error"
19742
19646
  };
19743
- //#endregion
19744
- //#region src/client/branch/BranchDialog.tsx
19647
+ // src/client/branch/BranchDialog.tsx
19745
19648
  /** Asks for the name of a session that was just branched off another. */
19746
19649
  function BranchDialog({ t, useBranch, save, keep }) {
19747
19650
  const state = useBranch((snapshot) => snapshot);
@@ -19805,8 +19708,7 @@ window.__ModuleLoader__.load({
19805
19708
  })
19806
19709
  });
19807
19710
  }
19808
- //#endregion
19809
- //#region src/client/branch/locales.ts
19711
+ // src/client/branch/locales.ts
19810
19712
  const dictionaries$4 = {
19811
19713
  en: {
19812
19714
  title: "Name the branch",
@@ -19829,8 +19731,7 @@ window.__ModuleLoader__.load({
19829
19731
  failed: "无法重命名会话:{message}"
19830
19732
  }
19831
19733
  };
19832
- //#endregion
19833
- //#region src/client/branch/index.ts
19734
+ // src/client/branch/index.ts
19834
19735
  const NAMESPACE$6 = "roleplay.branch";
19835
19736
  /** 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. */
19836
19737
  function registerBranchNaming(ctx) {
@@ -19847,8 +19748,7 @@ window.__ModuleLoader__.load({
19847
19748
  inject: () => branches.inject()
19848
19749
  }, BranchDialog));
19849
19750
  }
19850
- //#endregion
19851
- //#region src/client/gallery/GalleryTab.tsx
19751
+ // src/client/gallery/GalleryTab.tsx
19852
19752
  /** The Gallery tab of a chat: the pictures of its roleplay session. */
19853
19753
  function GalleryTab({ t, sessionId }) {
19854
19754
  const session = roleplaySessionOf(sessionId);
@@ -19865,8 +19765,7 @@ window.__ModuleLoader__.load({
19865
19765
  target
19866
19766
  });
19867
19767
  }
19868
- //#endregion
19869
- //#region src/client/gallery/index.ts
19768
+ // src/client/gallery/index.ts
19870
19769
  const NAMESPACE$5 = "roleplay.gallery";
19871
19770
  const VIEW_ID$3 = "roleplay-gallery";
19872
19771
  /** The shell activates a data target for every view tab; this tab reads from the host itself, so its target is empty. */
@@ -19893,8 +19792,7 @@ window.__ModuleLoader__.load({
19893
19792
  }, GalleryTab));
19894
19793
  });
19895
19794
  }
19896
- //#endregion
19897
- //#region src/client/chat-input.ts
19795
+ // src/client/chat-input.ts
19898
19796
  /** What can be done with the input box of a session: put words in it, and send them. Resolved on use, so a client without it fails at the click. */
19899
19797
  function facadeOf(scope, sessionId) {
19900
19798
  const input = () => {
@@ -19914,8 +19812,7 @@ window.__ModuleLoader__.load({
19914
19812
  }
19915
19813
  };
19916
19814
  }
19917
- //#endregion
19918
- //#region src/client/interface/api.ts
19815
+ // src/client/interface/api.ts
19919
19816
  /** The host says why in `message`; a failure that has none is told by its status. */
19920
19817
  async function read(response, what) {
19921
19818
  if (!response.ok) throw new Error((await response.json().catch(() => ({}))).message ?? `${what} (${response.status})`);
@@ -19931,8 +19828,7 @@ window.__ModuleLoader__.load({
19931
19828
  async function availability() {
19932
19829
  return read(await fetch("roleplay-api/interface/availability"), "the interface packs could not be looked up");
19933
19830
  }
19934
- //#endregion
19935
- //#region src/client/interface/conversation-body.ts
19831
+ // src/client/interface/conversation-body.ts
19936
19832
  /** How the conversation's scrolling body is found: DSH's class name ends in this, with a prefix of its build's own. */
19937
19833
  const SCROLL_BODY = "_scrollBody";
19938
19834
  /**
@@ -19948,8 +19844,7 @@ window.__ModuleLoader__.load({
19948
19844
  };
19949
19845
  }
19950
19846
  }
19951
- //#endregion
19952
- //#region src/client/interface/backdrop.ts
19847
+ // src/client/interface/backdrop.ts
19953
19848
  const LIFTED = "data-rp-lifted";
19954
19849
  const STYLE = "data-roleplay-backdrop-style";
19955
19850
  /**
@@ -19994,8 +19889,7 @@ window.__ModuleLoader__.load({
19994
19889
  }, [anchor, enabled]);
19995
19890
  return host;
19996
19891
  }
19997
- //#endregion
19998
- //#region src/client/interface/hooks.ts
19892
+ // src/client/interface/hooks.ts
19999
19893
  const PACK_POLL_MS = 4e3;
20000
19894
  const VIEW_POLL_MS = 2e3;
20001
19895
  /**
@@ -20078,8 +19972,7 @@ window.__ModuleLoader__.load({
20078
19972
  console.warn("roleplay: the story could not be read for the interface pack", error);
20079
19973
  }, VIEW_POLL_MS);
20080
19974
  }
20081
- //#endregion
20082
- //#region src/client/interface/PackDock.tsx
19975
+ // src/client/interface/PackDock.tsx
20083
19976
  /**
20084
19977
  * A strip of the story's interface pack in the chat: `hud` above the input box and its docks, `dock` just above the
20085
19978
  * input, `opening` in the place of both until the first turn has been played. The `hud` one also puts the pack's
@@ -20155,8 +20048,7 @@ window.__ModuleLoader__.load({
20155
20048
  }), layer)
20156
20049
  ] });
20157
20050
  }
20158
- //#endregion
20159
- //#region src/client/interface/InterfaceTab.tsx
20051
+ // src/client/interface/InterfaceTab.tsx
20160
20052
  /** The tab of the story's interface pack: a page of its own beside Chat. */
20161
20053
  function InterfaceTab({ sessionId, frameInput, t }) {
20162
20054
  const session = roleplaySessionOf(sessionId);
@@ -20194,8 +20086,7 @@ window.__ModuleLoader__.load({
20194
20086
  })
20195
20087
  });
20196
20088
  }
20197
- //#endregion
20198
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/interface/SidebarPage.module.css.mjs
20089
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/interface/SidebarPage.module.css.mjs
20199
20090
  const css$6 = ".rp_Ptco8a_page{flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.rp_Ptco8a_bar{border-bottom:.5px solid var(--dsw-alias-border-l3);flex:none;align-items:center;gap:8px;padding:4px 8px;display:flex}.rp_Ptco8a_name{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.rp_Ptco8a_content{flex:1 1 0;min-height:0;position:relative}.rp_Ptco8a_message{color:var(--dsw-alias-label-secondary);margin:0;padding:16px;font-size:13px;line-height:20px}.rp_Ptco8a_entry{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsl-guide-entry-radius,var(--dsw-radius-sm));background:var(--dsw-alias-bg-layer-1);align-items:center;gap:14px;width:100%;min-height:56px;padding:14px 20px;display:flex;position:relative;overflow:hidden}.rp_Ptco8a_main{border-radius:0;width:100%;height:100%;position:absolute;inset:0}.rp_Ptco8a_icon{width:26px;height:26px;color:var(--dsw-alias-label-secondary);pointer-events:none;flex:none;justify-content:center;align-items:center;display:flex;position:relative}.rp_Ptco8a_text{pointer-events:none;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex;position:relative}.rp_Ptco8a_title{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4;overflow:hidden}.rp_Ptco8a_description{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.4;overflow:hidden}";
20200
20091
  const key$6 = "src/client/interface/SidebarPage.module.css";
20201
20092
  let tag$6 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$6) + "]");
@@ -20207,20 +20098,19 @@ window.__ModuleLoader__.load({
20207
20098
  }
20208
20099
  tag$6.textContent = css$6;
20209
20100
  var SidebarPage_module_css_default = {
20210
- "bar": "rp_Ptco8a_bar",
20101
+ "page": "rp_Ptco8a_page",
20102
+ "content": "rp_Ptco8a_content",
20103
+ "main": "rp_Ptco8a_main",
20211
20104
  "message": "rp_Ptco8a_message",
20105
+ "description": "rp_Ptco8a_description",
20106
+ "bar": "rp_Ptco8a_bar",
20212
20107
  "entry": "rp_Ptco8a_entry",
20213
- "main": "rp_Ptco8a_main",
20214
20108
  "name": "rp_Ptco8a_name",
20215
- "page": "rp_Ptco8a_page",
20216
- "content": "rp_Ptco8a_content",
20217
20109
  "icon": "rp_Ptco8a_icon",
20218
20110
  "title": "rp_Ptco8a_title",
20219
- "text": "rp_Ptco8a_text",
20220
- "description": "rp_Ptco8a_description"
20111
+ "text": "rp_Ptco8a_text"
20221
20112
  };
20222
- //#endregion
20223
- //#region src/client/interface/SidebarPage.tsx
20113
+ // src/client/interface/SidebarPage.tsx
20224
20114
  /** The kind of the tab type, and the identity it registers its card and body under. */
20225
20115
  const SIDEBAR_KIND = "roleplay-pack";
20226
20116
  const SIDEBAR_ID = "@dsh-agentic-roleplay/core/interface-sidebar";
@@ -20310,8 +20200,7 @@ window.__ModuleLoader__.load({
20310
20200
  })]
20311
20201
  });
20312
20202
  }
20313
- //#endregion
20314
- //#region src/client/interface/locales.ts
20203
+ // src/client/interface/locales.ts
20315
20204
  const dictionaries$3 = {
20316
20205
  en: {
20317
20206
  tab: "Interface",
@@ -20346,8 +20235,7 @@ window.__ModuleLoader__.load({
20346
20235
  sidebarNone: "此故事的界面包没有侧栏页面。"
20347
20236
  }
20348
20237
  };
20349
- //#endregion
20350
- //#region src/client/interface/index.ts
20238
+ // src/client/interface/index.ts
20351
20239
  const NAMESPACE$4 = "roleplay.interface";
20352
20240
  const VIEW_ID$2 = "roleplay-interface";
20353
20241
  /** The shell activates a data target for every view tab; the pack's tab reads from the host itself, so its target is empty. */
@@ -20446,8 +20334,7 @@ window.__ModuleLoader__.load({
20446
20334
  });
20447
20335
  });
20448
20336
  }
20449
- //#endregion
20450
- //#region src/shared/authoring-chat.ts
20337
+ // src/shared/authoring-chat.ts
20451
20338
  const PREFIX = "world-author-";
20452
20339
  /** The authored world named by a dedicated authoring chat. */
20453
20340
  function authoredWorldOf(chatSessionId) {
@@ -20459,8 +20346,7 @@ window.__ModuleLoader__.load({
20459
20346
  return;
20460
20347
  }
20461
20348
  }
20462
- //#endregion
20463
- //#region src/client/world/session-source.ts
20349
+ // src/client/world/session-source.ts
20464
20350
  /** The story of a roleplay session, as the World tab reads and edits it. */
20465
20351
  function sessionSource(session) {
20466
20352
  const id = encodeURIComponent(session);
@@ -20484,8 +20370,7 @@ window.__ModuleLoader__.load({
20484
20370
  uploadImage: async (kind, key, file, signal) => await postFile(`${API_PREFIX}/sessions/world/${kind}/image/upload?id=${id}&key=${encodeURIComponent(key)}`, file, signal)
20485
20371
  };
20486
20372
  }
20487
- //#endregion
20488
- //#region src/client/world/WorldTab.tsx
20373
+ // src/client/world/WorldTab.tsx
20489
20374
  /** The story of the current chat, to read and to author. Ordinary DSH chats have ids of the same shape, so the host decides whether this one is a roleplay session. */
20490
20375
  function WorldTab({ t, sessionId }) {
20491
20376
  const session = roleplaySessionOf(sessionId);
@@ -20504,8 +20389,7 @@ window.__ModuleLoader__.load({
20504
20389
  notEditable: t("notRoleplay")
20505
20390
  });
20506
20391
  }
20507
- //#endregion
20508
- //#region src/client/world/index.ts
20392
+ // src/client/world/index.ts
20509
20393
  const NAMESPACE$3 = "roleplay.world";
20510
20394
  const VIEW_ID$1 = "roleplay-world";
20511
20395
  /** The shell activates a data target for every view tab; this tab reads from the host itself, so its target is empty. */
@@ -20532,8 +20416,7 @@ window.__ModuleLoader__.load({
20532
20416
  }, WorldTab));
20533
20417
  });
20534
20418
  }
20535
- //#endregion
20536
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/chat-settings/ChatSettingsView.module.css.mjs
20419
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/chat-settings/ChatSettingsView.module.css.mjs
20537
20420
  const css$5 = ".rp_wLpbxW_view{box-sizing:border-box;flex-direction:column;gap:16px;width:100%;max-width:720px;margin:0 auto;padding:24px 24px 240px;display:flex}.rp_wLpbxW_title{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_wLpbxW_description{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_wLpbxW_field{flex-direction:column;gap:6px;width:min(100%,320px);display:flex}.rp_wLpbxW_label{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_wLpbxW_help{max-width:560px;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_wLpbxW_actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.rp_wLpbxW_message{text-align:center;color:var(--dsw-alias-label-secondary);margin:40px 0;font-size:13px}.rp_wLpbxW_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.rp_wLpbxW_saved{color:var(--dsw-alias-label-secondary);font-size:12px}.rp_wLpbxW_row{flex-direction:column;gap:6px;display:flex}.rp_wLpbxW_notice{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);margin:0;padding:8px 12px;font-size:12px}.rp_wLpbxW_activity{color:var(--dsw-alias-label-secondary);flex-direction:column;gap:6px;font-size:13px;display:flex}.rp_wLpbxW_activity summary{cursor:pointer;color:var(--dsw-alias-label-primary);font-weight:500}.rp_wLpbxW_activityBody{flex-direction:column;gap:8px;padding-top:8px;display:flex}.rp_wLpbxW_link{font:inherit;color:var(--dsw-alias-state-business-primary);cursor:pointer;background:0 0;border:0;align-self:flex-start;padding:0;font-size:12px}.rp_wLpbxW_table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;min-width:920px;font-size:12px}.rp_wLpbxW_tableViewport{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);max-width:100%;overflow-x:auto}.rp_wLpbxW_tableViewport:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.rp_wLpbxW_table th,.rp_wLpbxW_table td{border-bottom:.5px solid var(--dsw-alias-border-l4);text-align:left;vertical-align:top;overflow-wrap:anywhere;padding:6px 10px}.rp_wLpbxW_table th{color:var(--dsw-alias-label-tertiary);font-weight:400}.rp_wLpbxW_table tbody th{color:var(--dsw-alias-label-primary);font-weight:500}.rp_wLpbxW_table tbody tr:last-child>*{border-bottom:0}.rp_wLpbxW_table th:first-child,.rp_wLpbxW_table td:first-child,.rp_wLpbxW_table th:nth-child(3),.rp_wLpbxW_table td:nth-child(3),.rp_wLpbxW_table th:nth-child(4),.rp_wLpbxW_table td:nth-child(4),.rp_wLpbxW_table th:nth-child(5),.rp_wLpbxW_table td:nth-child(5){white-space:nowrap}.rp_wLpbxW_run{flex-direction:column;gap:4px;padding:4px 0 8px;display:flex}.rp_wLpbxW_pre{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-markdown-code-block);white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;margin:4px 0;padding:6px 8px;font-size:12px;overflow:auto}.rp_wLpbxW_reasons{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:4px 0;padding-left:20px;font-size:12px}.rp_wLpbxW_select{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;max-width:320px;height:32px;color:var(--dsw-alias-label-primary);font:inherit;padding:0 8px;font-size:13px}.rp_wLpbxW_list{color:var(--dsw-alias-label-tertiary);margin:0;padding-left:18px;font-size:12px;line-height:18px}@media (width<=640px){.rp_wLpbxW_view{padding-inline:16px}}";
20538
20421
  const key$5 = "src/client/chat-settings/ChatSettingsView.module.css";
20539
20422
  let tag$5 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$5) + "]");
@@ -20545,31 +20428,30 @@ window.__ModuleLoader__.load({
20545
20428
  }
20546
20429
  tag$5.textContent = css$5;
20547
20430
  var ChatSettingsView_module_css_default = {
20548
- "pre": "rp_wLpbxW_pre",
20549
- "list": "rp_wLpbxW_list",
20550
- "view": "rp_wLpbxW_view",
20551
- "table": "rp_wLpbxW_table",
20552
- "reasons": "rp_wLpbxW_reasons",
20431
+ "link": "rp_wLpbxW_link",
20432
+ "run": "rp_wLpbxW_run",
20553
20433
  "actions": "rp_wLpbxW_actions",
20554
- "field": "rp_wLpbxW_field",
20555
- "message": "rp_wLpbxW_message",
20556
- "saved": "rp_wLpbxW_saved",
20557
- "error": "rp_wLpbxW_error",
20558
- "row": "rp_wLpbxW_row",
20434
+ "tableViewport": "rp_wLpbxW_tableViewport",
20435
+ "select": "rp_wLpbxW_select",
20559
20436
  "label": "rp_wLpbxW_label",
20560
- "notice": "rp_wLpbxW_notice",
20561
- "run": "rp_wLpbxW_run",
20437
+ "activity": "rp_wLpbxW_activity",
20562
20438
  "description": "rp_wLpbxW_description",
20563
- "link": "rp_wLpbxW_link",
20439
+ "saved": "rp_wLpbxW_saved",
20440
+ "reasons": "rp_wLpbxW_reasons",
20441
+ "pre": "rp_wLpbxW_pre",
20442
+ "error": "rp_wLpbxW_error",
20564
20443
  "title": "rp_wLpbxW_title",
20565
- "tableViewport": "rp_wLpbxW_tableViewport",
20444
+ "table": "rp_wLpbxW_table",
20445
+ "view": "rp_wLpbxW_view",
20446
+ "row": "rp_wLpbxW_row",
20566
20447
  "activityBody": "rp_wLpbxW_activityBody",
20567
- "select": "rp_wLpbxW_select",
20568
- "activity": "rp_wLpbxW_activity",
20569
- "help": "rp_wLpbxW_help"
20448
+ "field": "rp_wLpbxW_field",
20449
+ "list": "rp_wLpbxW_list",
20450
+ "help": "rp_wLpbxW_help",
20451
+ "notice": "rp_wLpbxW_notice",
20452
+ "message": "rp_wLpbxW_message"
20570
20453
  };
20571
- //#endregion
20572
- //#region src/client/chat-settings/settings-api.ts
20454
+ // src/client/chat-settings/settings-api.ts
20573
20455
  /** The chat is not a roleplay session, so it has no settings. */
20574
20456
  var NotRoleplayError = class extends Error {};
20575
20457
  async function receive(response) {
@@ -20680,14 +20562,12 @@ window.__ModuleLoader__.load({
20680
20562
  }
20681
20563
  return await response.json();
20682
20564
  }
20683
- //#endregion
20684
- //#region src/client/chat-settings/decision-figures.ts
20565
+ // src/client/chat-settings/decision-figures.ts
20685
20566
  /** The average time of a run, or a dash when the site has not run. */
20686
20567
  const perRun = (total, runs) => runs === 0 ? "–" : `${Math.round(total / runs)} ms`;
20687
20568
  /** The share of compared judgements that the decision model made the way the language model did, or a dash when none were compared. */
20688
20569
  const agreement = (stats) => stats.agreed + stats.disagreed === 0 ? "–" : `${Math.round(100 * stats.agreed / (stats.agreed + stats.disagreed))}%`;
20689
- //#endregion
20690
- //#region src/client/chat-settings/DecisionsSection.tsx
20570
+ // src/client/chat-settings/DecisionsSection.tsx
20691
20571
  const MODE_LABEL = {
20692
20572
  off: "decisionOff",
20693
20573
  llm: "decisionLlm",
@@ -20870,8 +20750,7 @@ window.__ModuleLoader__.load({
20870
20750
  })]
20871
20751
  });
20872
20752
  }
20873
- //#endregion
20874
- //#region src/client/chat-settings/InterfaceSection.tsx
20753
+ // src/client/chat-settings/InterfaceSection.tsx
20875
20754
  const message$4 = (failure) => failure instanceof Error ? failure.message : String(failure);
20876
20755
  /**
20877
20756
  * The interface pack of the story: which one is in use or why none is, a choice of the packs the story could use (kept
@@ -21024,8 +20903,7 @@ window.__ModuleLoader__.load({
21024
20903
  ]
21025
20904
  });
21026
20905
  }
21027
- //#endregion
21028
- //#region src/client/chat-settings/LorebookSection.tsx
20906
+ // src/client/chat-settings/LorebookSection.tsx
21029
20907
  const message$3 = (failure) => failure instanceof Error ? failure.message : String(failure);
21030
20908
  /** The lorebooks the story holds, with a way to add one from the library or take one out. */
21031
20909
  function LorebookSection({ t, session, disabled }) {
@@ -21158,8 +21036,7 @@ window.__ModuleLoader__.load({
21158
21036
  ]
21159
21037
  });
21160
21038
  }
21161
- //#endregion
21162
- //#region src/client/chat-settings/PresetSection.tsx
21039
+ // src/client/chat-settings/PresetSection.tsx
21163
21040
  const message$2 = (failure) => failure instanceof Error ? failure.message : String(failure);
21164
21041
  /** The writing preset the story's prompts came from, whether it still matches the library, and a way to switch or take it out. */
21165
21042
  function PresetSection({ t, session, disabled }) {
@@ -21275,8 +21152,7 @@ window.__ModuleLoader__.load({
21275
21152
  ]
21276
21153
  });
21277
21154
  }
21278
- //#endregion
21279
- //#region src/client/chat-settings/ReflectionSection.tsx
21155
+ // src/client/chat-settings/ReflectionSection.tsx
21280
21156
  const POLL_MS$1 = 3e3;
21281
21157
  /** When the characters last sorted what they took in, and a way to have them do it now. */
21282
21158
  function ReflectionSection({ t, status, onStart, onRefresh, disabled }) {
@@ -21334,8 +21210,7 @@ window.__ModuleLoader__.load({
21334
21210
  ]
21335
21211
  });
21336
21212
  }
21337
- //#endregion
21338
- //#region src/client/chat-settings/VectorsSection.tsx
21213
+ // src/client/chat-settings/VectorsSection.tsx
21339
21214
  /** What the search by meaning stands on, and a way to start it again with another embedding model. */
21340
21215
  function VectorsSection({ t, status, onReset, disabled }) {
21341
21216
  const [sure, setSure] = (0, react.useState)(false);
@@ -21382,16 +21257,14 @@ window.__ModuleLoader__.load({
21382
21257
  ]
21383
21258
  });
21384
21259
  }
21385
- //#endregion
21386
- //#region src/shared/usage.ts
21260
+ // src/shared/usage.ts
21387
21261
  const addTokens = (a, b) => ({
21388
21262
  input: a.input + b.input,
21389
21263
  cached: a.cached + b.cached,
21390
21264
  output: a.output + b.output
21391
21265
  });
21392
21266
  const totalTokens = (count) => count.input + count.cached + count.output;
21393
- //#endregion
21394
- //#region src/client/chat-settings/ActivityList.tsx
21267
+ // src/client/chat-settings/ActivityList.tsx
21395
21268
  const seconds = (ms) => `${(ms / 1e3).toFixed(ms < 1e4 ? 1 : 0)} s`;
21396
21269
  const count = (value) => value.toLocaleString();
21397
21270
  /** Fresh input plus output, and what came from the service's cache beside it when there was any. */
@@ -21598,8 +21471,7 @@ window.__ModuleLoader__.load({
21598
21471
  })]
21599
21472
  ].join(" · ");
21600
21473
  }
21601
- //#endregion
21602
- //#region src/client/chat-settings/InterventionList.tsx
21474
+ // src/client/chat-settings/InterventionList.tsx
21603
21475
  /** What the story's triggers delivered lately, and whether the game master or the characters took it up, newest first. */
21604
21476
  function InterventionList({ t, entries }) {
21605
21477
  const shown = [...entries].reverse();
@@ -21632,8 +21504,7 @@ window.__ModuleLoader__.load({
21632
21504
  ]
21633
21505
  });
21634
21506
  }
21635
- //#endregion
21636
- //#region src/client/chat-settings/ChatSettingsView.tsx
21507
+ // src/client/chat-settings/ChatSettingsView.tsx
21637
21508
  /** The settings of one chat. Ordinary DSH chats have ids of the same shape, so the host decides whether this one is a roleplay session. */
21638
21509
  function ChatSettingsView({ t, sessionId, openChat }) {
21639
21510
  const session = roleplaySessionOf(sessionId);
@@ -22275,8 +22146,7 @@ window.__ModuleLoader__.load({
22275
22146
  saveFailed: "无法保存设置:{message}"
22276
22147
  }
22277
22148
  }, dictionaries$6), dictionaries$17);
22278
- //#endregion
22279
- //#region src/client/chat-settings/index.ts
22149
+ // src/client/chat-settings/index.ts
22280
22150
  const NAMESPACE$2 = "roleplay.chatSettings";
22281
22151
  const VIEW_ID = "roleplay-settings";
22282
22152
  /** The shell activates a data target for every view tab; this tab has no data, so its target is empty. */
@@ -22304,8 +22174,7 @@ window.__ModuleLoader__.load({
22304
22174
  }, ChatSettingsView));
22305
22175
  });
22306
22176
  }
22307
- //#endregion
22308
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/CatalogueSettings.module.css.mjs
22177
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/CatalogueSettings.module.css.mjs
22309
22178
  const css$4 = ".rp_KPhXDa_section{flex-direction:column;gap:8px;margin-top:24px;display:flex}.rp_KPhXDa_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_KPhXDa_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.rp_KPhXDa_row{border-bottom:.5px solid var(--dsw-alias-border-l3);grid-template-columns:minmax(80px,1fr) minmax(160px,2fr) auto;align-items:end;gap:8px;padding-bottom:8px;display:grid}.rp_KPhXDa_field{flex-direction:column;gap:4px;min-width:0;display:flex}.rp_KPhXDa_label{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_KPhXDa_problem{color:var(--dsw-alias-state-error-primary);grid-column:1/-1;margin:0;font-size:12px}.rp_KPhXDa_keyHint{color:var(--dsw-alias-label-tertiary);grid-column:1/-1;margin:0;font-size:12px}.rp_KPhXDa_actions{flex-wrap:wrap;gap:8px;display:flex}.rp_KPhXDa_keyArea{grid-column:1/-1;grid-template-columns:minmax(120px,1fr) minmax(160px,2fr) auto;align-items:end;gap:8px;display:grid}@media (width<=720px){.rp_KPhXDa_row,.rp_KPhXDa_keyArea{grid-template-columns:minmax(0,1fr);align-items:stretch}.rp_KPhXDa_actions{justify-content:flex-start}}";
22310
22179
  const key$4 = "src/client/settings/CatalogueSettings.module.css";
22311
22180
  let tag$4 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$4) + "]");
@@ -22317,19 +22186,18 @@ window.__ModuleLoader__.load({
22317
22186
  }
22318
22187
  tag$4.textContent = css$4;
22319
22188
  var CatalogueSettings_module_css_default = {
22320
- "keyArea": "rp_KPhXDa_keyArea",
22321
- "hint": "rp_KPhXDa_hint",
22322
- "section": "rp_KPhXDa_section",
22323
- "label": "rp_KPhXDa_label",
22324
- "title": "rp_KPhXDa_title",
22325
- "keyHint": "rp_KPhXDa_keyHint",
22326
- "actions": "rp_KPhXDa_actions",
22327
22189
  "row": "rp_KPhXDa_row",
22328
22190
  "field": "rp_KPhXDa_field",
22329
- "problem": "rp_KPhXDa_problem"
22191
+ "actions": "rp_KPhXDa_actions",
22192
+ "keyHint": "rp_KPhXDa_keyHint",
22193
+ "title": "rp_KPhXDa_title",
22194
+ "label": "rp_KPhXDa_label",
22195
+ "keyArea": "rp_KPhXDa_keyArea",
22196
+ "problem": "rp_KPhXDa_problem",
22197
+ "hint": "rp_KPhXDa_hint",
22198
+ "section": "rp_KPhXDa_section"
22330
22199
  };
22331
- //#endregion
22332
- //#region src/client/settings/AuthoringToolSettings.tsx
22200
+ // src/client/settings/AuthoringToolSettings.tsx
22333
22201
  const boardOf = (text) => {
22334
22202
  try {
22335
22203
  const parsed = JSON.parse(text === "" ? "{}" : text);
@@ -22404,8 +22272,7 @@ window.__ModuleLoader__.load({
22404
22272
  ]
22405
22273
  });
22406
22274
  }
22407
- //#endregion
22408
- //#region src/client/settings/assistants.ts
22275
+ // src/client/settings/assistants.ts
22409
22276
  /** The settings of the helper agents of imports and authoring: each is one field of the plugin's configuration, written only when it differs from the default. */
22410
22277
  const ASSISTANT_FIELDS = [
22411
22278
  {
@@ -22440,7 +22307,7 @@ window.__ModuleLoader__.load({
22440
22307
  kind: "choice",
22441
22308
  choices: ["tool", "schema"],
22442
22309
  labels: ["importStructuredTool", "importStructuredSchema"],
22443
- placeholder: "tool"
22310
+ placeholder: "schema"
22444
22311
  },
22445
22312
  {
22446
22313
  field: "importMaxTokens",
@@ -22548,8 +22415,7 @@ window.__ModuleLoader__.load({
22548
22415
  format: (value) => typeof value === "string" || typeof value === "number" ? String(value) : "",
22549
22416
  parse: (draft) => parseDraft(spec, draft)
22550
22417
  }));
22551
- //#endregion
22552
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/AssistantSettings.module.css.mjs
22418
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/settings/AssistantSettings.module.css.mjs
22553
22419
  const css$3 = ".rp_ZwzM4q_section{flex-direction:column;gap:8px;margin-top:24px;display:flex}.rp_ZwzM4q_title{margin:0;font-size:16px;font-weight:500;line-height:24px}.rp_ZwzM4q_hint,.rp_ZwzM4q_fieldHint,.rp_ZwzM4q_invalid{margin:0;font-size:12px;line-height:18px}.rp_ZwzM4q_hint{color:var(--dsw-alias-label-secondary);font-size:13px}.rp_ZwzM4q_fields{min-width:0}.rp_ZwzM4q_fields>*+*{border-top:.5px solid var(--dsw-alias-border-l2)}.rp_ZwzM4q_field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.rp_ZwzM4q_head,.rp_ZwzM4q_badges{align-items:center;gap:8px;display:flex}.rp_ZwzM4q_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:20px}.rp_ZwzM4q_reset{color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-size:12px}.rp_ZwzM4q_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.rp_ZwzM4q_reset:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.rp_ZwzM4q_select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-3);width:100%;height:34px;color:var(--dsw-alias-label-primary);font:inherit;padding:0 12px;font-size:13px}.rp_ZwzM4q_select:focus-visible{border-color:var(--dsw-alias-state-business-primary);outline:none}.rp_ZwzM4q_select[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)}.rp_ZwzM4q_fieldHint{color:var(--dsw-alias-label-tertiary)}.rp_ZwzM4q_invalid{color:var(--dsw-alias-state-error-primary)}@media (width<=520px){.rp_ZwzM4q_head{align-items:flex-start}.rp_ZwzM4q_badges{flex-wrap:wrap;justify-content:flex-end}}";
22554
22420
  const key$3 = "src/client/settings/AssistantSettings.module.css";
22555
22421
  let tag$3 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$3) + "]");
@@ -22561,21 +22427,20 @@ window.__ModuleLoader__.load({
22561
22427
  }
22562
22428
  tag$3.textContent = css$3;
22563
22429
  var AssistantSettings_module_css_default = {
22564
- "section": "rp_ZwzM4q_section",
22565
22430
  "invalid": "rp_ZwzM4q_invalid",
22566
- "reset": "rp_ZwzM4q_reset",
22567
- "title": "rp_ZwzM4q_title",
22568
- "badges": "rp_ZwzM4q_badges",
22569
- "fields": "rp_ZwzM4q_fields",
22431
+ "field": "rp_ZwzM4q_field",
22432
+ "label": "rp_ZwzM4q_label",
22570
22433
  "select": "rp_ZwzM4q_select",
22571
- "hint": "rp_ZwzM4q_hint",
22434
+ "fields": "rp_ZwzM4q_fields",
22572
22435
  "fieldHint": "rp_ZwzM4q_fieldHint",
22573
- "field": "rp_ZwzM4q_field",
22436
+ "section": "rp_ZwzM4q_section",
22437
+ "title": "rp_ZwzM4q_title",
22438
+ "reset": "rp_ZwzM4q_reset",
22439
+ "hint": "rp_ZwzM4q_hint",
22574
22440
  "head": "rp_ZwzM4q_head",
22575
- "label": "rp_ZwzM4q_label"
22441
+ "badges": "rp_ZwzM4q_badges"
22576
22442
  };
22577
- //#endregion
22578
- //#region src/client/settings/AssistantSettings.tsx
22443
+ // src/client/settings/AssistantSettings.tsx
22579
22444
  function ChoiceField({ t, spec, state, disabled, onEdit, onReset }) {
22580
22445
  const id = `roleplay-${spec.field}`;
22581
22446
  const messageId = `${id}-message`;
@@ -22681,8 +22546,7 @@ window.__ModuleLoader__.load({
22681
22546
  ]
22682
22547
  });
22683
22548
  }
22684
- //#endregion
22685
- //#region src/client/settings/catalogue-keys-api.ts
22549
+ // src/client/settings/catalogue-keys-api.ts
22686
22550
  async function reply(response) {
22687
22551
  if (!response.ok) {
22688
22552
  const body = await response.json().catch(() => void 0);
@@ -22712,8 +22576,7 @@ window.__ModuleLoader__.load({
22712
22576
  window.dispatchEvent(new Event(CATALOGUE_KEYS_CHANGED));
22713
22577
  return status;
22714
22578
  }
22715
- //#endregion
22716
- //#region src/client/settings/catalogues.ts
22579
+ // src/client/settings/catalogues.ts
22717
22580
  /** The credential a row's key lives under, or nothing while the row has no name to derive it from. */
22718
22581
  const keyRefOf = (row) => row.apiKeyRef.trim() !== "" ? row.apiKeyRef.trim() : row.name.trim() === "" ? void 0 : catalogueKeyRef(row.name);
22719
22582
  const rowOf = (value) => {
@@ -22785,8 +22648,7 @@ window.__ModuleLoader__.load({
22785
22648
  }
22786
22649
  }
22787
22650
  };
22788
- //#endregion
22789
- //#region src/client/settings/CatalogueKey.tsx
22651
+ // src/client/settings/CatalogueKey.tsx
22790
22652
  const message$1 = (failure) => failure instanceof Error ? failure.message : String(failure);
22791
22653
  /**
22792
22654
  * The key of one catalogue: a name in the credential store and a write-only box. The key is kept by the store the profile uses
@@ -22925,8 +22787,7 @@ window.__ModuleLoader__.load({
22925
22787
  ]
22926
22788
  });
22927
22789
  }
22928
- //#endregion
22929
- //#region src/client/settings/CatalogueSettings.tsx
22790
+ // src/client/settings/CatalogueSettings.tsx
22930
22791
  const PROBLEM_TEXT$1 = {
22931
22792
  name: "catalogueProblemName",
22932
22793
  address: "catalogueProblemAddress",
@@ -23039,8 +22900,7 @@ window.__ModuleLoader__.load({
23039
22900
  ]
23040
22901
  });
23041
22902
  }
23042
- //#endregion
23043
- //#region src/client/settings/setup-api.ts
22903
+ // src/client/settings/setup-api.ts
23044
22904
  /** The ids of the plugin rows the profile holds more than once; empty when the profile is as it should be. */
23045
22905
  async function loadRedundantLayers(signal) {
23046
22906
  const response = await fetch(`${API_PREFIX}/setup`, {
@@ -23051,8 +22911,7 @@ window.__ModuleLoader__.load({
23051
22911
  const body = await response.json();
23052
22912
  return Array.isArray(body.redundantLayers) ? body.redundantLayers.filter((id) => typeof id === "string") : [];
23053
22913
  }
23054
- //#endregion
23055
- //#region src/client/settings/SetupNotice.tsx
22914
+ // src/client/settings/SetupNotice.tsx
23056
22915
  /** Says why the settings cannot be saved when the profile holds a plugin row twice; nothing is shown otherwise. */
23057
22916
  function SetupNotice({ t }) {
23058
22917
  const [rows, setRows] = (0, react.useState)([]);
@@ -23076,8 +22935,7 @@ window.__ModuleLoader__.load({
23076
22935
  ]
23077
22936
  });
23078
22937
  }
23079
- //#endregion
23080
- //#region src/client/settings/sync.ts
22938
+ // src/client/settings/sync.ts
23081
22939
  const text = (value) => typeof value === "string" ? value : "";
23082
22940
  function syncOf(value) {
23083
22941
  const row = typeof value === "object" && value !== null ? value : {};
@@ -23133,8 +22991,7 @@ window.__ModuleLoader__.load({
23133
22991
  };
23134
22992
  }
23135
22993
  };
23136
- //#endregion
23137
- //#region src/client/settings/SyncSettings.tsx
22994
+ // src/client/settings/SyncSettings.tsx
23138
22995
  const PROBLEM_TEXT = {
23139
22996
  remote: "syncProblemRemote",
23140
22997
  config: "syncProblemConfig",
@@ -23351,8 +23208,7 @@ window.__ModuleLoader__.load({
23351
23208
  ]
23352
23209
  });
23353
23210
  }
23354
- //#endregion
23355
- //#region src/client/settings/locales.ts
23211
+ // src/client/settings/locales.ts
23356
23212
  const dictionaries$1 = {
23357
23213
  en: {
23358
23214
  nav: "Role Play",
@@ -23402,7 +23258,7 @@ window.__ModuleLoader__.load({
23402
23258
  importMaxTokensLabel: "Most tokens per request",
23403
23259
  importMaxTokensHint: "The most one model request of a helper may produce, thinking included. 0 (the default) is a tenth of the model's context window, at least 16000.",
23404
23260
  importStructuredOutputLabel: "How helpers give their result",
23405
- importStructuredOutputHint: "Call a tool (works with every model), or reply with JSON the endpoint constrains to the result's shape (the model cannot ramble first; needs an OpenAI-compatible endpoint that takes a JSON schema, such as LocalAI, vLLM or OpenAI). Default: call a tool.",
23261
+ importStructuredOutputHint: "Call a tool (works with every model), or reply with JSON the endpoint constrains to the result's shape (the model cannot ramble first; needs an OpenAI-compatible endpoint that takes a JSON schema, such as LocalAI, vLLM or OpenAI). Default: the constrained JSON reply; a model whose endpoint refuses it is asked by a tool call from then on.",
23406
23262
  importStructuredTool: "Call a tool",
23407
23263
  importStructuredSchema: "Constrained JSON reply",
23408
23264
  importVariablesPerRequestLabel: "Tracked values per request",
@@ -23500,7 +23356,7 @@ window.__ModuleLoader__.load({
23500
23356
  importMaxTokensLabel: "每次请求的最大 token 数",
23501
23357
  importMaxTokensHint: "助手一次模型请求最多产生的 token 数,包括思考。0(默认)表示模型上下文窗口的十分之一,至少 16000。",
23502
23358
  importStructuredOutputLabel: "助手如何给出结果",
23503
- importStructuredOutputHint: "调用工具(所有模型都可用),或用端点按结果结构约束的 JSON 回复(模型不会先写一大段分析;需要支持 JSON schema 的 OpenAI 兼容端点,如 LocalAI、vLLM 或 OpenAI)。默认:调用工具。",
23359
+ importStructuredOutputHint: "调用工具(所有模型都可用),或用端点按结果结构约束的 JSON 回复(模型不会先写一大段分析;需要支持 JSON schema 的 OpenAI 兼容端点,如 LocalAI、vLLM 或 OpenAI)。默认:约束 JSON 回复;如果模型的端点不接受,之后会改用调用工具的方式。",
23504
23360
  importStructuredTool: "调用工具",
23505
23361
  importStructuredSchema: "约束 JSON 回复",
23506
23362
  importVariablesPerRequestLabel: "每次请求声明的追踪数值数",
@@ -23560,8 +23416,7 @@ window.__ModuleLoader__.load({
23560
23416
  saving: t("saving")
23561
23417
  };
23562
23418
  }
23563
- //#endregion
23564
- //#region src/client/settings/RoleplaySection.tsx
23419
+ // src/client/settings/RoleplaySection.tsx
23565
23420
  function RoleplaySection(props) {
23566
23421
  const { t } = props;
23567
23422
  const state = props.useRoleplaySettings((snapshot) => snapshot);
@@ -23644,8 +23499,7 @@ window.__ModuleLoader__.load({
23644
23499
  })
23645
23500
  ] });
23646
23501
  }
23647
- //#endregion
23648
- //#region src/client/settings/settings-controller.ts
23502
+ // src/client/settings/settings-controller.ts
23649
23503
  /** Stages the role play settings form over the host plugin's configuration entry. */
23650
23504
  var RoleplaySettingsController = class {
23651
23505
  form;
@@ -23677,8 +23531,7 @@ window.__ModuleLoader__.load({
23677
23531
  this.form.dispose();
23678
23532
  }
23679
23533
  };
23680
- //#endregion
23681
- //#region src/client/settings/index.ts
23534
+ // src/client/settings/index.ts
23682
23535
  const NAMESPACE$1 = "roleplay.settings";
23683
23536
  /** Adds the Role Play section to the settings modal. */
23684
23537
  function registerSettings(ctx) {
@@ -23697,8 +23550,7 @@ window.__ModuleLoader__.load({
23697
23550
  inject: () => settings.inject()
23698
23551
  }, RoleplaySection))), "roleplay: settings section");
23699
23552
  }
23700
- //#endregion
23701
- //#region src/shared/narration.ts
23553
+ // src/shared/narration.ts
23702
23554
  const OPEN = "<roleplay-output>";
23703
23555
  const CLOSE = "</roleplay-output>";
23704
23556
  const PREVIEW_OPEN = "<roleplay-preview>";
@@ -23745,8 +23597,7 @@ window.__ModuleLoader__.load({
23745
23597
  return;
23746
23598
  }
23747
23599
  }
23748
- //#endregion
23749
- //#region src/client/transcript/definitions.ts
23600
+ // src/client/transcript/definitions.ts
23750
23601
  const NARRATION_NODE = "roleplay-narration";
23751
23602
  const PREVIEW_NODE = "roleplay-preview";
23752
23603
  /** The words of the text blocks of a message. */
@@ -23852,8 +23703,7 @@ window.__ModuleLoader__.load({
23852
23703
  };
23853
23704
  }
23854
23705
  };
23855
- //#endregion
23856
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/NarrationView.module.css.mjs
23706
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/NarrationView.module.css.mjs
23857
23707
  const css$2 = ".rp_NFPimG_output{flex-direction:column;gap:8px;min-width:0;margin:8px 0;display:flex}.rp_NFPimG_narration{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:22px}.rp_NFPimG_line{align-items:flex-start;gap:10px;min-width:0;display:flex}.rp_NFPimG_avatar{corner-shape:round;color:#fff;border-radius:14px;flex:none;justify-content:center;align-items:center;width:28px;height:28px;font-size:12px;font-weight:500;display:flex}.rp_NFPimG_speech{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);flex-direction:column;gap:2px;min-width:0;max-width:100%;padding:6px 10px;display:flex}.rp_NFPimG_name{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.rp_NFPimG_words{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:20px}.rp_NFPimG_note{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_preview{opacity:.8}.rp_NFPimG_oocNote,.rp_NFPimG_oocRefused{border-left:2px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);margin:0;padding:6px 10px;font-size:12px;line-height:18px}.rp_NFPimG_oocRefused{border-left-color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_oocLabel{font-weight:500}.rp_NFPimG_images{flex-direction:column;align-items:flex-start;gap:6px;margin:8px 0 12px;display:flex}.rp_NFPimG_sceneImage{object-fit:contain;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:auto;max-width:min(100%,480px);height:auto;max-height:50vh;display:block}.rp_NFPimG_imageButton{cursor:zoom-in;background:0 0;border:0;padding:0}.rp_NFPimG_imageStatus,.rp_NFPimG_imageError{color:var(--dsw-alias-label-tertiary);font-size:12px}.rp_NFPimG_imageError{color:var(--dsw-alias-state-error-primary)}.rp_NFPimG_playAll,.rp_NFPimG_playLine{color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center}.rp_NFPimG_playAll{float:right;gap:4px;min-height:28px;margin:0 0 8px 12px;padding:2px 4px;font-size:12px;display:inline-flex}.rp_NFPimG_playLine{vertical-align:middle;width:28px;height:28px;margin:-5px -6px -5px 4px;padding:6px;display:inline-flex}.rp_NFPimG_playAll svg,.rp_NFPimG_playLine svg{width:14px;height:14px}.rp_NFPimG_playAll:disabled,.rp_NFPimG_playLine:disabled{cursor:wait;opacity:.5}.rp_NFPimG_playAll:hover,.rp_NFPimG_playLine:hover{color:var(--dsw-alias-label-primary)}.rp_NFPimG_playAll:focus-visible,.rp_NFPimG_playLine:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);outline-offset:2px;border-radius:var(--dsw-radius-xs)}@media (pointer:coarse){.rp_NFPimG_playAll,.rp_NFPimG_playLine{min-width:44px;min-height:44px}.rp_NFPimG_playLine{width:44px;height:44px;margin-block:-13px}}.rp_NFPimG_dice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.rp_NFPimG_diceSummary{cursor:pointer;color:var(--dsw-alias-label-secondary)}.rp_NFPimG_diceList{margin:4px 0 0;padding:0 0 0 18px}";
23858
23708
  const key$2 = "src/client/transcript/NarrationView.module.css";
23859
23709
  let tag$2 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$2) + "]");
@@ -23865,31 +23715,30 @@ window.__ModuleLoader__.load({
23865
23715
  }
23866
23716
  tag$2.textContent = css$2;
23867
23717
  var NarrationView_module_css_default = {
23868
- "diceSummary": "rp_NFPimG_diceSummary",
23718
+ "oocRefused": "rp_NFPimG_oocRefused",
23719
+ "line": "rp_NFPimG_line",
23720
+ "output": "rp_NFPimG_output",
23721
+ "oocLabel": "rp_NFPimG_oocLabel",
23722
+ "oocNote": "rp_NFPimG_oocNote",
23723
+ "preview": "rp_NFPimG_preview",
23869
23724
  "words": "rp_NFPimG_words",
23725
+ "narration": "rp_NFPimG_narration",
23870
23726
  "name": "rp_NFPimG_name",
23871
23727
  "playAll": "rp_NFPimG_playAll",
23872
- "playLine": "rp_NFPimG_playLine",
23873
- "line": "rp_NFPimG_line",
23874
23728
  "speech": "rp_NFPimG_speech",
23875
- "preview": "rp_NFPimG_preview",
23876
- "imageStatus": "rp_NFPimG_imageStatus",
23877
- "note": "rp_NFPimG_note",
23878
- "output": "rp_NFPimG_output",
23729
+ "sceneImage": "rp_NFPimG_sceneImage",
23879
23730
  "imageError": "rp_NFPimG_imageError",
23731
+ "playLine": "rp_NFPimG_playLine",
23880
23732
  "avatar": "rp_NFPimG_avatar",
23881
- "oocNote": "rp_NFPimG_oocNote",
23882
- "images": "rp_NFPimG_images",
23883
- "oocRefused": "rp_NFPimG_oocRefused",
23884
- "sceneImage": "rp_NFPimG_sceneImage",
23885
- "imageButton": "rp_NFPimG_imageButton",
23886
23733
  "dice": "rp_NFPimG_dice",
23887
- "narration": "rp_NFPimG_narration",
23888
- "oocLabel": "rp_NFPimG_oocLabel",
23889
- "diceList": "rp_NFPimG_diceList"
23734
+ "imageButton": "rp_NFPimG_imageButton",
23735
+ "diceSummary": "rp_NFPimG_diceSummary",
23736
+ "note": "rp_NFPimG_note",
23737
+ "diceList": "rp_NFPimG_diceList",
23738
+ "images": "rp_NFPimG_images",
23739
+ "imageStatus": "rp_NFPimG_imageStatus"
23890
23740
  };
23891
- //#endregion
23892
- //#region src/client/transcript/PreviewNode.tsx
23741
+ // src/client/transcript/PreviewNode.tsx
23893
23742
  /**
23894
23743
  * How the game master opened the scene while the rest of the turn was worked out. Once the output of the turn
23895
23744
  * has arrived (a later narration), the view no longer shows it: the log keeps both.
@@ -23905,8 +23754,7 @@ window.__ModuleLoader__.load({
23905
23754
  })
23906
23755
  });
23907
23756
  }
23908
- //#endregion
23909
- //#region src/client/transcript/NarrationView.tsx
23757
+ // src/client/transcript/NarrationView.tsx
23910
23758
  /** A steady colour per speaker, so a character looks the same wherever it speaks. */
23911
23759
  function hueOf(name) {
23912
23760
  let hash = 0;
@@ -24039,8 +23887,7 @@ window.__ModuleLoader__.load({
24039
23887
  ]
24040
23888
  });
24041
23889
  }
24042
- //#endregion
24043
- //#region src/client/transcript/SceneImages.tsx
23890
+ // src/client/transcript/SceneImages.tsx
24044
23891
  async function request(chat, node, method) {
24045
23892
  const id = roleplaySessionOf(chat);
24046
23893
  if (id === void 0) throw new Error("this chat is not a roleplay session");
@@ -24122,8 +23969,7 @@ window.__ModuleLoader__.load({
24122
23969
  ]
24123
23970
  });
24124
23971
  }
24125
- //#endregion
24126
- //#region src/client/transcript/NarrationNode.tsx
23972
+ // src/client/transcript/NarrationNode.tsx
24127
23973
  /** The output of a turn inside the normal Chat; the Chat gives its own translator, so ours comes from outside. */
24128
23974
  function narrationNode(t) {
24129
23975
  return function NarrationNode({ node, sessionId }) {
@@ -24138,8 +23984,7 @@ window.__ModuleLoader__.load({
24138
23984
  })] });
24139
23985
  };
24140
23986
  }
24141
- //#endregion
24142
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/SuggestionsDock.module.css.mjs
23987
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/SuggestionsDock.module.css.mjs
24143
23988
  const css$1 = ".rp_rWH4DG_dock{box-sizing:border-box;flex-direction:column;align-items:stretch;gap:4px;width:min(800px,100%);min-width:0;margin:0 auto 8px;padding:0 16px;display:flex}.rp_rWH4DG_label{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}.rp_rWH4DG_chip{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);width:100%;min-height:32px;color:var(--dsw-alias-label-secondary);font:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere;padding:5px 10px;font-size:13px;line-height:20px}.rp_rWH4DG_chip:hover,.rp_rWH4DG_chip:focus-visible{border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary);outline:none}.rp_rWH4DG_card{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-2);flex-direction:column;gap:2px;padding:6px 10px;display:flex}.rp_rWH4DG_lines{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0;padding-left:16px;font-size:13px;line-height:20px}@media (pointer:coarse){.rp_rWH4DG_chip{min-height:44px}}";
24144
23989
  const key$1 = "src/client/transcript/SuggestionsDock.module.css";
24145
23990
  let tag$1 = document.querySelector("style[data-plugin-css=" + JSON.stringify(key$1) + "]");
@@ -24152,13 +23997,12 @@ window.__ModuleLoader__.load({
24152
23997
  tag$1.textContent = css$1;
24153
23998
  var SuggestionsDock_module_css_default = {
24154
23999
  "lines": "rp_rWH4DG_lines",
24155
- "label": "rp_rWH4DG_label",
24156
- "chip": "rp_rWH4DG_chip",
24157
24000
  "dock": "rp_rWH4DG_dock",
24158
- "card": "rp_rWH4DG_card"
24001
+ "label": "rp_rWH4DG_label",
24002
+ "card": "rp_rWH4DG_card",
24003
+ "chip": "rp_rWH4DG_chip"
24159
24004
  };
24160
- //#endregion
24161
- //#region src/client/transcript/SuggestionsDock.tsx
24005
+ // src/client/transcript/SuggestionsDock.tsx
24162
24006
  /** The suggestions are made after the output is shown, so they are asked for until they are there. */
24163
24007
  const POLL_MS = 2e3;
24164
24008
  const GIVE_UP_AFTER = 45;
@@ -24262,8 +24106,7 @@ window.__ModuleLoader__.load({
24262
24106
  ]
24263
24107
  });
24264
24108
  }
24265
- //#endregion
24266
- //#region \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/TurnsDock.module.css.mjs
24109
+ // \0css-module:/home/runner/work/dsh-agentic-roleplay/dsh-agentic-roleplay/packages/dsh-agentic-roleplay-core/src/client/transcript/TurnsDock.module.css.mjs
24267
24110
  const css = ".rp_f4YLlq_dock{box-sizing:border-box;width:min(800px,100%);min-width:0;color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 auto 8px;padding:0 16px;font-size:12px;display:flex}.rp_f4YLlq_group{align-items:center;gap:2px;display:flex}.rp_f4YLlq_button{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;padding:2px 10px;line-height:18px}.rp_f4YLlq_button:hover:not(:disabled),.rp_f4YLlq_button:focus-visible{border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-state-business-primary);outline:none}.rp_f4YLlq_button:disabled{opacity:.5;cursor:default}.rp_f4YLlq_count{text-align:center;min-width:32px}.rp_f4YLlq_select{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);min-width:96px;max-width:220px;min-height:28px;color:var(--dsw-alias-label-secondary);font:inherit;background:0 0;padding:2px 6px}.rp_f4YLlq_error{color:var(--dsw-alias-state-error-primary)}@media (pointer:coarse){.rp_f4YLlq_button,.rp_f4YLlq_select{min-height:44px}}";
24268
24111
  const key = "src/client/transcript/TurnsDock.module.css";
24269
24112
  let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(key) + "]");
@@ -24275,22 +24118,20 @@ window.__ModuleLoader__.load({
24275
24118
  }
24276
24119
  tag.textContent = css;
24277
24120
  var TurnsDock_module_css_default = {
24278
- "count": "rp_f4YLlq_count",
24279
- "button": "rp_f4YLlq_button",
24121
+ "dock": "rp_f4YLlq_dock",
24280
24122
  "select": "rp_f4YLlq_select",
24123
+ "count": "rp_f4YLlq_count",
24281
24124
  "error": "rp_f4YLlq_error",
24282
24125
  "group": "rp_f4YLlq_group",
24283
- "dock": "rp_f4YLlq_dock"
24126
+ "button": "rp_f4YLlq_button"
24284
24127
  };
24285
- //#endregion
24286
- //#region src/client/transcript/withdrawn.ts
24128
+ // src/client/transcript/withdrawn.ts
24287
24129
  /** The rows of the transcript that belong to turns the story is not at, by the key DSH gives each row. */
24288
24130
  function withdrawnKeys(nodes, withdrawn) {
24289
24131
  if (withdrawn.length === 0) return [];
24290
24132
  return [...nodes].flatMap((node) => node.key !== void 0 && node.anchorSeq !== void 0 && withdrawn.some((range) => node.anchorSeq >= range.from && node.anchorSeq <= range.to) ? [node.key] : []);
24291
24133
  }
24292
- //#endregion
24293
- //#region src/client/transcript/TurnsDock.tsx
24134
+ // src/client/transcript/TurnsDock.tsx
24294
24135
  const START = "start";
24295
24136
  const LABEL_LENGTH = 40;
24296
24137
  const escapeAttribute = (value) => value.replace(/["\\]/g, (match) => `\\${match}`);
@@ -24465,8 +24306,7 @@ window.__ModuleLoader__.load({
24465
24306
  ]
24466
24307
  });
24467
24308
  }
24468
- //#endregion
24469
- //#region src/client/transcript/locales.ts
24309
+ // src/client/transcript/locales.ts
24470
24310
  const dictionaries = {
24471
24311
  en: {
24472
24312
  unwritten: "{count} round(s) not yet written into the story's memory",
@@ -24549,8 +24389,7 @@ window.__ModuleLoader__.load({
24549
24389
  dicePlayer: "你掷出:"
24550
24390
  }
24551
24391
  };
24552
- //#endregion
24553
- //#region src/client/transcript/index.ts
24392
+ // src/client/transcript/index.ts
24554
24393
  const NAMESPACE = "roleplay.transcript";
24555
24394
  /** The turns of a roleplay session, as the host keeps them. */
24556
24395
  async function timelineOf(chat) {
@@ -24635,8 +24474,7 @@ window.__ModuleLoader__.load({
24635
24474
  }, narrationNode(t)));
24636
24475
  });
24637
24476
  }
24638
- //#endregion
24639
- //#region src/client/index.ts
24477
+ // src/client/index.ts
24640
24478
  /** Union of what every feature needs. */
24641
24479
  const inject = [
24642
24480
  "slots",
@@ -24660,7 +24498,6 @@ window.__ModuleLoader__.load({
24660
24498
  registerInterface(ctx);
24661
24499
  registerBranchNaming(ctx);
24662
24500
  }
24663
- //#endregion
24664
24501
  exports.apply = apply;
24665
24502
  exports.inject = inject;
24666
24503
  return module.exports;