@morlay/ui-conversation-manager 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.cjs CHANGED
@@ -30,11 +30,136 @@ window.__ModuleLoader__.load({
30
30
  };
31
31
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
32
32
  //#endregion
33
+ let react = require("react");
33
34
  let _deepseek_ai_dsh_client_store = require("@deepseek-ai/dsh-client-store");
34
35
  let _deepseek_ai_cordis = require("@deepseek-ai/cordis");
35
- let react = require("react");
36
36
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
37
37
  let react_jsx_runtime = require("react/jsx-runtime");
38
+ //#region src/client/controller.ts
39
+ const SESSION_DELETE_PATH = "/api/morlay/v1/session/delete";
40
+ const SESSION_IMPORT_PATH = "/api/morlay/v1/session/import";
41
+ const SESSION_EXPORT_PATH = "/api/morlay/v1/session/export";
42
+ const SESSION_GC_PATH = "/api/morlay/v1/session/gc";
43
+ const SESSION_USAGE_PATH = "/api/morlay/v1/session/usage";
44
+ const SESSION_ROWS_PATH = "/api/morlay/v1/session/rows";
45
+ var ConversationManagerRequestError = class extends Error {
46
+ code;
47
+ constructor(message, code) {
48
+ super(message);
49
+ this.code = code;
50
+ this.name = "ConversationManagerRequestError";
51
+ }
52
+ };
53
+ async function postJson(path, body) {
54
+ const response = await fetch(path, {
55
+ method: "POST",
56
+ headers: {
57
+ accept: "application/json",
58
+ "content-type": "application/json"
59
+ },
60
+ body: JSON.stringify(body)
61
+ });
62
+ const value = await response.json().catch(() => ({}));
63
+ if (!response.ok) throw new ConversationManagerRequestError(typeof value.error === "string" ? value.error : `请求失败:HTTP ${response.status}`, typeof value.code === "string" ? value.code : void 0);
64
+ return value;
65
+ }
66
+ async function zipBase64(file) {
67
+ const dataUrl = await new Promise((resolve, reject) => {
68
+ const reader = new FileReader();
69
+ reader.onload = () => {
70
+ resolve(typeof reader.result === "string" ? reader.result : "");
71
+ };
72
+ reader.onerror = () => {
73
+ reject(reader.error ?? /* @__PURE__ */ new Error("failed to read the selected file"));
74
+ };
75
+ reader.readAsDataURL(file);
76
+ });
77
+ const comma = dataUrl.indexOf(",");
78
+ return comma < 0 ? dataUrl : dataUrl.slice(comma + 1);
79
+ }
80
+ var ConversationManagerController = class {
81
+ ports;
82
+ face;
83
+ constructor(ports) {
84
+ this.ports = ports;
85
+ this.face = {
86
+ listRows: (query) => this.loadRows(query),
87
+ archive: (sessionId) => this.ports.archiveSession(sessionId),
88
+ unarchive: (sessionId) => this.ports.unarchiveSession(sessionId),
89
+ remove: (sessionId) => this.remove(sessionId),
90
+ exportZip: (sessionId) => this.exportZip(sessionId),
91
+ importZip: (file) => this.importZip(file),
92
+ collectGarbage: () => this.collectGarbage(),
93
+ loadUsage: (range) => this.loadUsage(range)
94
+ };
95
+ }
96
+ async loadRows(query = {}) {
97
+ const value = await postJson(SESSION_ROWS_PATH, query);
98
+ const items = value["items"];
99
+ if (!Array.isArray(items) || typeof value["total"] !== "number") throw new ConversationManagerRequestError("会话列表响应不可用", void 0);
100
+ return {
101
+ items,
102
+ total: value["total"],
103
+ page: typeof value["page"] === "number" ? value["page"] : query.page ?? 1,
104
+ pageSize: typeof value["pageSize"] === "number" ? value["pageSize"] : query.pageSize ?? 20
105
+ };
106
+ }
107
+ async remove(sessionId) {
108
+ await postJson(SESSION_DELETE_PATH, { sessionId });
109
+ await this.ports.refresh();
110
+ }
111
+ async exportZip(sessionId) {
112
+ const response = await fetch(SESSION_EXPORT_PATH, {
113
+ method: "POST",
114
+ headers: {
115
+ accept: "application/zip",
116
+ "content-type": "application/json"
117
+ },
118
+ body: JSON.stringify({ sessionId })
119
+ });
120
+ if (!response.ok) {
121
+ const value = await response.json().catch(() => ({}));
122
+ throw new ConversationManagerRequestError(typeof value.error === "string" ? value.error : `请求失败:HTTP ${response.status}`, typeof value.code === "string" ? value.code : void 0);
123
+ }
124
+ downloadBlob(await response.blob(), filenameOf(response.headers.get("content-disposition"), String(sessionId)));
125
+ }
126
+ async importZip(file) {
127
+ const zip = await zipBase64(file);
128
+ const value = await postJson(SESSION_IMPORT_PATH, { zip });
129
+ await this.ports.refresh();
130
+ return value["sessionId"];
131
+ }
132
+ async collectGarbage() {
133
+ const value = await postJson(SESSION_GC_PATH, {});
134
+ await this.ports.refresh();
135
+ return {
136
+ orphanSessions: typeof value["orphanSessions"] === "number" ? value["orphanSessions"] : 0,
137
+ orphanEvents: typeof value["orphanEvents"] === "number" ? value["orphanEvents"] : 0,
138
+ stoppedAgents: typeof value["stoppedAgents"] === "number" ? value["stoppedAgents"] : 0
139
+ };
140
+ }
141
+ async loadUsage(range) {
142
+ const report = await postJson(SESSION_USAGE_PATH, { range });
143
+ if (report.totals === void 0 || !Array.isArray(report.buckets) || !Array.isArray(report.sessions)) throw new ConversationManagerRequestError("用量统计响应不可用", void 0);
144
+ return report;
145
+ }
146
+ };
147
+ function filenameOf(disposition, sessionId) {
148
+ return (disposition === null ? null : /filename="([^"]+)"/u.exec(disposition))?.[1] ?? `${sessionId}.zip`;
149
+ }
150
+ function downloadBlob(blob, filename) {
151
+ const url = URL.createObjectURL(blob);
152
+ const anchor = document.createElement("a");
153
+ anchor.href = url;
154
+ anchor.download = filename;
155
+ anchor.rel = "noopener";
156
+ document.body.append(anchor);
157
+ anchor.click();
158
+ anchor.remove();
159
+ window.setTimeout(() => {
160
+ URL.revokeObjectURL(url);
161
+ }, 0);
162
+ }
38
163
  function emptyMeta() {
39
164
  return {
40
165
  description: void 0,
@@ -529,7 +654,7 @@ window.__ModuleLoader__.load({
529
654
  return node.variants[0];
530
655
  }
531
656
  //#endregion
532
- //#region ../../client/ui-primitives/src/client/schema-form/draft.ts
657
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/draft.ts
533
658
  function failureOf(error) {
534
659
  const raw = error instanceof Error ? error.message : String(error);
535
660
  const path = (error.options?.path ?? []).filter((segment) => typeof segment === "string" || typeof segment === "number").map(String);
@@ -817,7 +942,7 @@ window.__ModuleLoader__.load({
817
942
  return next;
818
943
  }
819
944
  //#endregion
820
- //#region ../../client/ui-primitives/src/client/schema-form/controller.ts
945
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/controller.ts
821
946
  function declaredSource(node) {
822
947
  const extra = node?.meta.extra;
823
948
  if (typeof extra !== "object" || extra === null) return void 0;
@@ -1021,7 +1146,7 @@ window.__ModuleLoader__.load({
1021
1146
  }
1022
1147
  };
1023
1148
  //#endregion
1024
- //#region ../../client/ui-primitives/src/client/schema-form/hints.ts
1149
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/hints.ts
1025
1150
  var SchemaFormHints = class extends _deepseek_ai_cordis.Service {
1026
1151
  #readers = /* @__PURE__ */ new Map();
1027
1152
  #texts = /* @__PURE__ */ new Map();
@@ -1111,7 +1236,7 @@ window.__ModuleLoader__.load({
1111
1236
  for (let bits = (1 << wildcardable) - 1; bits > 0; bits--) yield path.map((segment, index) => index > 0 && (bits & 1 << index - 1) !== 0 ? "*" : segment);
1112
1237
  }
1113
1238
  //#endregion
1114
- //#region ../../client/ui-primitives/src/client/schema-form/locales.ts
1239
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/locales.ts
1115
1240
  const zh$1 = {
1116
1241
  unavailable: "该插件当前未加载,暂时无法配置。",
1117
1242
  readOnly: "本部署的设置为只读。",
@@ -1221,7 +1346,7 @@ window.__ModuleLoader__.load({
1221
1346
  missingItem: "Every item needs a {key}"
1222
1347
  };
1223
1348
  //#endregion
1224
- //#region ../../client/ui-primitives/src/client/schema-form/rows.ts
1349
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/rows.ts
1225
1350
  function rowRegistrations(namespaces, bundles) {
1226
1351
  const owners = /* @__PURE__ */ new Map();
1227
1352
  for (const bundle of bundles) for (const row of bundle.rows) owners.set(row.rowId, bundle.name);
@@ -1294,7 +1419,7 @@ window.__ModuleLoader__.load({
1294
1419
  }
1295
1420
  };
1296
1421
  //#endregion
1297
- //#region ../../client/ui-primitives/src/client/schema-form/labels.ts
1422
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/labels.ts
1298
1423
  function fieldHint(node, resolveText) {
1299
1424
  const parts = [];
1300
1425
  if (node.meta.description !== void 0) parts.push(resolveText(node.meta.description));
@@ -1302,7 +1427,7 @@ window.__ModuleLoader__.load({
1302
1427
  return parts.length === 0 ? void 0 : parts.join(" ");
1303
1428
  }
1304
1429
  //#endregion
1305
- //#region ../../client/ui-primitives/src/client/schema-form/lines.ts
1430
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/lines.ts
1306
1431
  function containerShape(node, value) {
1307
1432
  switch (variantOf(node, value).type) {
1308
1433
  case "object":
@@ -1472,39 +1597,39 @@ window.__ModuleLoader__.load({
1472
1597
  return prefix.every((segment, index) => path[index] === segment);
1473
1598
  }
1474
1599
  //#endregion
1475
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/schema-form/schema-form.module.css.mjs
1476
- const css$16 = ".B1Faoa_editorRoot{width:100%;color:var(--dsw-alias-label-primary);flex-direction:column;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:14px;line-height:22px;display:flex}.B1Faoa_lineRow{white-space:nowrap;align-items:flex-start;gap:6px;min-height:22px;padding-right:8px;display:flex}.B1Faoa_lineRow:hover{background:var(--dsw-alias-bg-layer-2)}.B1Faoa_lineRow[data-selected=true]{background:var(--dsw-alias-bg-layer-3)}.B1Faoa_lineRow[data-dirty=true]{box-shadow:inset 2px 0 0 var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-overridden=true]{box-shadow:inset 2px 0 0 var(--dsw-elevation-stroke-color)}.B1Faoa_lineRow[data-dirty=true] [data-role=key],.B1Faoa_lineRow[data-overridden=true] [data-role=key]{color:var(--dsw-alias-brand-primary)}.B1Faoa_lineRow[data-invalid=true]{background:color-mix(in srgb, var(--dsw-alias-state-error-secondary) 12%, transparent);box-shadow:inset 2px 0 0 var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow[data-invalid=true] [data-role=key]{color:var(--dsw-alias-state-error-primary)}.B1Faoa_lineRow:hover [data-role=actions]{opacity:1}.B1Faoa_lineBody{flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;display:flex}.B1Faoa_lineNumber{text-align:right;width:32px;color:var(--dsw-alias-label-caption);user-select:none;cursor:pointer;flex:none;line-height:22px}.B1Faoa_lineFold{width:14px;height:22px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineFold:hover{color:var(--dsw-alias-label-secondary)}.B1Faoa_lineFoldSpacer{flex:none;width:14px}.B1Faoa_lineKey{color:var(--dsw-alias-label-primary);flex:none}.B1Faoa_lineKey[data-index=true]{color:var(--dsw-alias-label-caption)}.B1Faoa_lineToken{color:var(--dsw-alias-label-caption);flex:none}.B1Faoa_lineValue{text-overflow:ellipsis;cursor:text;min-width:0;color:var(--dsw-alias-state-business-primary);display:block;overflow:hidden}.B1Faoa_lineValue[data-tone=number]{color:var(--dsw-alias-state-warn-primary)}.B1Faoa_lineValue[data-tone=boolean]{color:var(--dsw-alias-state-success-primary)}.B1Faoa_lineValue[data-tone=empty]{color:var(--dsw-alias-label-caption)}.B1Faoa_valueSlot{flex:0 auto;min-width:0;display:block;overflow:hidden}.B1Faoa_valueTrigger{min-width:0;font:inherit;text-align:left;cursor:pointer;color:var(--dsw-alias-label-caption);background:0 0;border:0;align-items:center;gap:2px;padding:0;display:inline-flex}.B1Faoa_valueTrigger:disabled{cursor:default}.B1Faoa_valueTrigger:focus-visible{outline:none}.B1Faoa_compactInput{flex:auto;min-width:0;display:inline-flex}.B1Faoa_compactInput>span{border-radius:4px;width:100%;height:22px;padding:0 6px}.B1Faoa_compactInput input{font-size:14px;line-height:22px}.B1Faoa_compactTextField{background:var(--dsw-alias-bg-layer-1);min-width:0;box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);border:0;border-radius:4px;flex:auto;padding:0 6px;display:inline-flex}.B1Faoa_compactTextField:focus-within{--dsw-elevation-stroke-color:var(--dsw-alias-brand-primary)}.B1Faoa_compactTextField>textarea{resize:none;field-sizing:content;width:100%;min-height:20px;max-height:240px;color:var(--dsw-alias-label-primary);background:0 0;border:0;outline:none;flex:1;padding:0;font-family:inherit;font-size:14px;line-height:22px}.B1Faoa_lineComment{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineInvalid{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-state-error-primary);flex:0 auto;font-family:inherit;font-size:12px;overflow:hidden}.B1Faoa_lineActions{opacity:0;flex:none;align-items:center;gap:4px;display:inline-flex}.B1Faoa_lineActions>button{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;padding:0;display:inline-flex}.B1Faoa_lineActions>button:hover{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary)}.B1Faoa_lineActions>button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed)}.B1Faoa_hoverActions[data-editing=true]{opacity:1;gap:6px}.B1Faoa_hoverActions[data-editing=true]>button{box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.B1Faoa_hoverActions[data-editing=true]>button:first-of-type{color:var(--dsw-alias-state-success-primary)}.B1Faoa_addWrap{flex:auto;align-items:center;gap:6px;min-width:0;margin-left:6px;display:inline-flex;position:relative}.B1Faoa_addWrap[data-invalid=true] input{border-color:var(--dsw-alias-state-error-primary)}.B1Faoa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}";
1477
- const tagId$16 = "@morlay/ui-conversation-manager/schema-form.module.css";
1600
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/schema-form/schema-form.module.css.mjs
1601
+ const css$15 = ".N3kx7G_editorRoot{width:100%;color:var(--dsw-alias-label-primary);flex-direction:column;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:14px;line-height:22px;display:flex}.N3kx7G_lineRow{white-space:nowrap;align-items:flex-start;gap:6px;min-height:22px;padding-right:8px;display:flex}.N3kx7G_lineRow:hover{background:var(--dsw-alias-bg-layer-2)}.N3kx7G_lineRow[data-selected=true]{background:var(--dsw-alias-bg-layer-3)}.N3kx7G_lineRow[data-dirty=true]{box-shadow:inset 2px 0 0 var(--dsw-alias-brand-primary)}.N3kx7G_lineRow[data-overridden=true]{box-shadow:inset 2px 0 0 var(--dsw-elevation-stroke-color)}.N3kx7G_lineRow[data-dirty=true] [data-role=key],.N3kx7G_lineRow[data-overridden=true] [data-role=key]{color:var(--dsw-alias-brand-primary)}.N3kx7G_lineRow[data-invalid=true]{background:color-mix(in srgb, var(--dsw-alias-state-error-secondary) 12%, transparent);box-shadow:inset 2px 0 0 var(--dsw-alias-state-error-primary)}.N3kx7G_lineRow[data-invalid=true] [data-role=key]{color:var(--dsw-alias-state-error-primary)}.N3kx7G_lineRow:hover [data-role=actions]{opacity:1}.N3kx7G_lineBody{flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;display:flex}.N3kx7G_lineNumber{text-align:right;width:32px;color:var(--dsw-alias-label-caption);user-select:none;cursor:pointer;flex:none;line-height:22px}.N3kx7G_lineFold{width:14px;height:22px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.N3kx7G_lineFold:hover{color:var(--dsw-alias-label-secondary)}.N3kx7G_lineFoldSpacer{flex:none;width:14px}.N3kx7G_lineKey{color:var(--dsw-alias-label-primary);flex:none}.N3kx7G_lineKey[data-index=true]{color:var(--dsw-alias-label-caption)}.N3kx7G_lineToken{color:var(--dsw-alias-label-caption);flex:none}.N3kx7G_lineValue{text-overflow:ellipsis;cursor:text;min-width:0;color:var(--dsw-alias-state-business-primary);display:block;overflow:hidden}.N3kx7G_lineValue[data-tone=number]{color:var(--dsw-alias-state-warn-primary)}.N3kx7G_lineValue[data-tone=boolean]{color:var(--dsw-alias-state-success-primary)}.N3kx7G_lineValue[data-tone=empty]{color:var(--dsw-alias-label-caption)}.N3kx7G_valueSlot{flex:0 auto;min-width:0;display:block;overflow:hidden}.N3kx7G_valueTrigger{min-width:0;font:inherit;text-align:left;cursor:pointer;color:var(--dsw-alias-label-caption);background:0 0;border:0;align-items:center;gap:2px;padding:0;display:inline-flex}.N3kx7G_valueTrigger:disabled{cursor:default}.N3kx7G_valueTrigger:focus-visible{outline:none}.N3kx7G_compactInput{flex:auto;min-width:0;display:inline-flex}.N3kx7G_compactInput>span{border-radius:4px;width:100%;height:22px;padding:0 6px}.N3kx7G_compactInput input{font-size:14px;line-height:22px}.N3kx7G_compactTextField{background:var(--dsw-alias-bg-layer-1);min-width:0;box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);border:0;border-radius:4px;flex:auto;padding:0 6px;display:inline-flex}.N3kx7G_compactTextField:focus-within{--dsw-elevation-stroke-color:var(--dsw-alias-brand-primary)}.N3kx7G_compactTextField>textarea{resize:none;field-sizing:content;width:100%;min-height:20px;max-height:240px;color:var(--dsw-alias-label-primary);background:0 0;border:0;outline:none;flex:1;padding:0;font-family:inherit;font-size:14px;line-height:22px}.N3kx7G_lineComment{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;font-family:inherit;font-size:12px;overflow:hidden}.N3kx7G_lineInvalid{text-overflow:ellipsis;min-width:0;color:var(--dsw-alias-state-error-primary);flex:0 auto;font-family:inherit;font-size:12px;overflow:hidden}.N3kx7G_lineActions{opacity:0;flex:none;align-items:center;gap:4px;display:inline-flex}.N3kx7G_lineActions>button{width:20px;height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-radius:4px;justify-content:center;align-items:center;padding:0;display:inline-flex}.N3kx7G_lineActions>button:hover{background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary)}.N3kx7G_lineActions>button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed)}.N3kx7G_hoverActions[data-editing=true]{opacity:1;gap:6px}.N3kx7G_hoverActions[data-editing=true]>button{box-shadow:0 0 0 .5px var(--dsw-elevation-stroke-color);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.N3kx7G_hoverActions[data-editing=true]>button:first-of-type{color:var(--dsw-alias-state-success-primary)}.N3kx7G_addWrap{flex:auto;align-items:center;gap:6px;min-width:0;margin-left:6px;display:inline-flex;position:relative}.N3kx7G_addWrap[data-invalid=true] input{border-color:var(--dsw-alias-state-error-primary)}.N3kx7G_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}";
1602
+ const tagId$15 = "@morlay/ui-conversation-manager/schema-form.module.css";
1478
1603
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/schema-form.module.css\"]") === null) {
1479
1604
  const tag = document.createElement("style");
1480
1605
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
1481
- tag.dataset.pluginCss = tagId$16;
1482
- tag.textContent = css$16;
1606
+ tag.dataset.pluginCss = tagId$15;
1607
+ tag.textContent = css$15;
1483
1608
  document.head.appendChild(tag);
1484
1609
  }
1485
1610
  var schema_form_module_css_default = {
1486
- "lineInvalid": "B1Faoa_lineInvalid",
1487
- "editorRoot": "B1Faoa_editorRoot",
1488
- "lineNumber": "B1Faoa_lineNumber",
1489
- "lineToken": "B1Faoa_lineToken",
1490
- "lineKey": "B1Faoa_lineKey",
1491
- "lineFold": "B1Faoa_lineFold",
1492
- "hoverActions": "B1Faoa_hoverActions",
1493
- "lineFoldSpacer": "B1Faoa_lineFoldSpacer",
1494
- "valueSlot": "B1Faoa_valueSlot",
1495
- "compactInput": "B1Faoa_compactInput",
1496
- "compactTextField": "B1Faoa_compactTextField",
1497
- "lineComment": "B1Faoa_lineComment",
1498
- "lineRow": "B1Faoa_lineRow",
1499
- "lineValue": "B1Faoa_lineValue",
1500
- "lineActions": "B1Faoa_lineActions",
1501
- "lineBody": "B1Faoa_lineBody",
1502
- "valueTrigger": "B1Faoa_valueTrigger",
1503
- "addWrap": "B1Faoa_addWrap",
1504
- "hint": "B1Faoa_hint"
1611
+ "hint": "N3kx7G_hint",
1612
+ "valueSlot": "N3kx7G_valueSlot",
1613
+ "valueTrigger": "N3kx7G_valueTrigger",
1614
+ "lineFold": "N3kx7G_lineFold",
1615
+ "lineComment": "N3kx7G_lineComment",
1616
+ "editorRoot": "N3kx7G_editorRoot",
1617
+ "lineNumber": "N3kx7G_lineNumber",
1618
+ "lineRow": "N3kx7G_lineRow",
1619
+ "compactInput": "N3kx7G_compactInput",
1620
+ "lineToken": "N3kx7G_lineToken",
1621
+ "compactTextField": "N3kx7G_compactTextField",
1622
+ "lineFoldSpacer": "N3kx7G_lineFoldSpacer",
1623
+ "lineInvalid": "N3kx7G_lineInvalid",
1624
+ "lineActions": "N3kx7G_lineActions",
1625
+ "addWrap": "N3kx7G_addWrap",
1626
+ "lineValue": "N3kx7G_lineValue",
1627
+ "hoverActions": "N3kx7G_hoverActions",
1628
+ "lineKey": "N3kx7G_lineKey",
1629
+ "lineBody": "N3kx7G_lineBody"
1505
1630
  };
1506
1631
  //#endregion
1507
- //#region ../../client/ui-primitives/src/client/schema-form/TruncatedTooltip.tsx
1632
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/TruncatedTooltip.tsx
1508
1633
  function TruncatedTooltip({ label, children }) {
1509
1634
  const node = (0, react.useRef)(null);
1510
1635
  const watch = (0, react.useRef)(null);
@@ -1533,7 +1658,7 @@ window.__ModuleLoader__.load({
1533
1658
  });
1534
1659
  }
1535
1660
  //#endregion
1536
- //#region ../../client/ui-primitives/src/client/schema-form/value.tsx
1661
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/value.tsx
1537
1662
  function valueText(value) {
1538
1663
  if (value === void 0 || value === null) return "";
1539
1664
  if (typeof value === "string") return value;
@@ -1625,7 +1750,7 @@ window.__ModuleLoader__.load({
1625
1750
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineValue, { owner });
1626
1751
  }
1627
1752
  //#endregion
1628
- //#region ../../client/ui-primitives/src/client/schema-form/fields.tsx
1753
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/fields.tsx
1629
1754
  function parseFor(node, t) {
1630
1755
  switch (node.type) {
1631
1756
  case "number": return (text) => {
@@ -1738,12 +1863,12 @@ window.__ModuleLoader__.load({
1738
1863
  }
1739
1864
  }
1740
1865
  //#endregion
1741
- //#region ../../client/ui-primitives/src/client/controls/classes.ts
1866
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/classes.ts
1742
1867
  function classes(...names) {
1743
1868
  return names.filter((name) => typeof name === "string" && name !== "").join(" ");
1744
1869
  }
1745
1870
  //#endregion
1746
- //#region ../../client/ui-primitives/src/client/schema-form/Editor.tsx
1871
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/Editor.tsx
1747
1872
  function Editor(props) {
1748
1873
  const { ns, state, face, t, resolveText, renderField } = props;
1749
1874
  const [toggled, setToggled] = (0, react.useState)(() => /* @__PURE__ */ new Set());
@@ -2283,7 +2408,7 @@ window.__ModuleLoader__.load({
2283
2408
  });
2284
2409
  }
2285
2410
  //#endregion
2286
- //#region ../../client/ui-primitives/src/client/schema-form/SchemaForm.tsx
2411
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/SchemaForm.tsx
2287
2412
  function SchemaForm(props) {
2288
2413
  const { ns, face, t, resolveText, renderSlotChain } = props;
2289
2414
  const store = face.hooks.schemaForm;
@@ -2333,29 +2458,33 @@ window.__ModuleLoader__.load({
2333
2458
  };
2334
2459
  }
2335
2460
  //#endregion
2336
- //#region ../../client/ui-primitives/src/client/schema-form/index.ts
2461
+ //#region ../../client/dsh-client-ui-primitives/src/client/schema-form/index.ts
2337
2462
  var schema_form_exports = /* @__PURE__ */ __exportAll({
2338
2463
  InlineValue: () => InlineValue,
2339
2464
  NS: () => NS$1,
2340
2465
  SchemaFieldDefault: () => SchemaFieldDefault,
2341
2466
  SchemaFormController: () => SchemaFormController,
2342
2467
  SchemaFormHints: () => SchemaFormHints,
2468
+ addableAt: () => addableAt,
2343
2469
  apply: () => apply$2,
2344
2470
  canRender: () => canRender,
2345
2471
  containerShape: () => containerShape,
2346
2472
  editorLines: () => editorLines,
2347
2473
  failureOf: () => failureOf,
2474
+ fieldKey: () => fieldKey,
2348
2475
  inject: () => inject$2,
2349
2476
  optionsFor: () => optionsFor,
2350
2477
  parseFor: () => parseFor,
2351
2478
  projectNode: () => projectNode,
2352
2479
  projectRoot: () => projectRoot,
2480
+ readPath: () => readPath,
2353
2481
  rowRegistrations: () => rowRegistrations,
2354
2482
  tokenText: () => tokenText,
2355
2483
  tokenTone: () => tokenTone,
2356
2484
  valueText: () => valueText,
2357
2485
  visibleFields: () => visibleFields,
2358
- walkFields: () => walkFields
2486
+ walkFields: () => walkFields,
2487
+ zh: () => zh$1
2359
2488
  });
2360
2489
  const NS$1 = "settings.schema-form";
2361
2490
  const inject$2 = [
@@ -2468,7 +2597,7 @@ window.__ModuleLoader__.load({
2468
2597
  }, "ui-schema-form: row registrations");
2469
2598
  }
2470
2599
  //#endregion
2471
- //#region ../../client/ui-primitives/src/client/markdown-labels.ts
2600
+ //#region ../../client/dsh-client-ui-primitives/src/client/markdown-labels.ts
2472
2601
  function markdownLabels(t) {
2473
2602
  return {
2474
2603
  code: {
@@ -2479,69 +2608,69 @@ window.__ModuleLoader__.load({
2479
2608
  };
2480
2609
  }
2481
2610
  //#endregion
2482
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/layout/layout.module.css.mjs
2483
- const css$15 = ".e_G4ZW_stack{flex-direction:column;min-width:0;display:flex}.e_G4ZW_row{flex-direction:row;align-items:center;min-width:0;display:flex}.e_G4ZW_gap0{gap:0}.e_G4ZW_gap2{gap:2px}.e_G4ZW_gap4{gap:4px}.e_G4ZW_gap6{gap:6px}.e_G4ZW_gap8{gap:8px}.e_G4ZW_gap10{gap:10px}.e_G4ZW_gap12{gap:12px}.e_G4ZW_gap14{gap:14px}.e_G4ZW_gap16{gap:16px}.e_G4ZW_alignStart{align-items:flex-start}.e_G4ZW_alignCenter{align-items:center}.e_G4ZW_alignEnd{align-items:flex-end}.e_G4ZW_justifyBetween{justify-content:space-between}.e_G4ZW_justifyEnd{justify-content:flex-end}.e_G4ZW_justifyCenter{justify-content:center}.e_G4ZW_wrap{flex-wrap:wrap}.e_G4ZW_grow{flex:auto;min-width:0}.e_G4ZW_push{margin-left:auto}.e_G4ZW_fill{box-sizing:border-box;width:100%;height:100%;overflow:hidden}.e_G4ZW_scroll{flex:auto;min-height:0;overflow-y:auto}.e_G4ZW_plain{margin:0;padding:0;list-style:none}.e_G4ZW_padNone{padding:0}.e_G4ZW_padCard{padding:8px 12px}.e_G4ZW_padBody{padding:8px 0}.e_G4ZW_padPage{padding:24px 28px}.e_G4ZW_padRow{padding:10px 12px}.e_G4ZW_padBlocking{padding:32px 40px}.e_G4ZW_text{margin:0}.e_G4ZW_sizeXs{font-size:11px;line-height:1.5}.e_G4ZW_sizeSm{font-size:12px;line-height:18px}.e_G4ZW_sizeMd{font-size:13px;line-height:20px}.e_G4ZW_sizeBase{font-size:14px;line-height:24px}.e_G4ZW_sizeLg{font-size:16px;line-height:24px}.e_G4ZW_tonePrimary{color:var(--dsw-alias-label-primary)}.e_G4ZW_toneSecondary{color:var(--dsw-alias-label-secondary)}.e_G4ZW_toneTertiary{color:var(--dsw-alias-label-tertiary)}.e_G4ZW_toneDanger{color:var(--dsw-alias-label-error,var(--dsw-alias-label-primary))}.e_G4ZW_weightMedium{font-weight:500}.e_G4ZW_strong{font-weight:600}.e_G4ZW_mono{word-break:break-all;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace}.e_G4ZW_truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.e_G4ZW_tabular{font-variant-numeric:tabular-nums}.e_G4ZW_boxed{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:10px}.e_G4ZW_fixed{flex:none}.e_G4ZW_gapWide{gap:6px 20px}.e_G4ZW_narrow{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%)}.e_G4ZW_wSearch{flex:none;width:360px;max-width:100%}";
2484
- const tagId$15 = "@morlay/ui-conversation-manager/layout.module.css";
2611
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/layout/layout.module.css.mjs
2612
+ const css$14 = "._7Ar2dq_stack{flex-direction:column;min-width:0;display:flex}._7Ar2dq_row{flex-direction:row;align-items:center;min-width:0;display:flex}._7Ar2dq_gap0{gap:0}._7Ar2dq_gap2{gap:2px}._7Ar2dq_gap4{gap:4px}._7Ar2dq_gap6{gap:6px}._7Ar2dq_gap8{gap:8px}._7Ar2dq_gap10{gap:10px}._7Ar2dq_gap12{gap:12px}._7Ar2dq_gap14{gap:14px}._7Ar2dq_gap16{gap:16px}._7Ar2dq_alignStart{align-items:flex-start}._7Ar2dq_alignCenter{align-items:center}._7Ar2dq_alignEnd{align-items:flex-end}._7Ar2dq_justifyBetween{justify-content:space-between}._7Ar2dq_justifyEnd{justify-content:flex-end}._7Ar2dq_justifyCenter{justify-content:center}._7Ar2dq_wrap{flex-wrap:wrap}._7Ar2dq_grow{flex:auto;min-width:0}._7Ar2dq_push{margin-left:auto}._7Ar2dq_fill{box-sizing:border-box;width:100%;height:100%;overflow:hidden}._7Ar2dq_scroll{flex:auto;min-height:0;overflow-y:auto}._7Ar2dq_plain{margin:0;padding:0;list-style:none}._7Ar2dq_padNone{padding:0}._7Ar2dq_padCard{padding:8px 12px}._7Ar2dq_padBody{padding:8px 0}._7Ar2dq_padPage{padding:24px 28px}._7Ar2dq_padRow{padding:10px 12px}._7Ar2dq_padBlocking{padding:32px 40px}._7Ar2dq_text{margin:0}._7Ar2dq_sizeXs{font-size:11px;line-height:1.5}._7Ar2dq_sizeSm{font-size:12px;line-height:18px}._7Ar2dq_sizeMd{font-size:13px;line-height:20px}._7Ar2dq_sizeBase{font-size:14px;line-height:24px}._7Ar2dq_sizeLg{font-size:16px;line-height:24px}._7Ar2dq_tonePrimary{color:var(--dsw-alias-label-primary)}._7Ar2dq_toneSecondary{color:var(--dsw-alias-label-secondary)}._7Ar2dq_toneTertiary{color:var(--dsw-alias-label-tertiary)}._7Ar2dq_toneDanger{color:var(--dsw-alias-label-error,var(--dsw-alias-label-primary))}._7Ar2dq_weightMedium{font-weight:500}._7Ar2dq_strong{font-weight:600}._7Ar2dq_mono{word-break:break-all;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace}._7Ar2dq_truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._7Ar2dq_tabular{font-variant-numeric:tabular-nums}._7Ar2dq_boxed{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);border-radius:10px}._7Ar2dq_fixed{flex:none}._7Ar2dq_gapWide{gap:6px 20px}._7Ar2dq_narrow{min-width:0;max-width:min(calc(var(--dsh-chat-content-width,748px) * .702), 82%)}._7Ar2dq_wSearch{flex:none;width:360px;max-width:100%}";
2613
+ const tagId$14 = "@morlay/ui-conversation-manager/layout.module.css";
2485
2614
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/layout.module.css\"]") === null) {
2486
2615
  const tag = document.createElement("style");
2487
2616
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2488
- tag.dataset.pluginCss = tagId$15;
2489
- tag.textContent = css$15;
2617
+ tag.dataset.pluginCss = tagId$14;
2618
+ tag.textContent = css$14;
2490
2619
  document.head.appendChild(tag);
2491
2620
  }
2492
2621
  var layout_module_css_default = {
2493
- "stack": "e_G4ZW_stack",
2494
- "boxed": "e_G4ZW_boxed",
2495
- "justifyEnd": "e_G4ZW_justifyEnd",
2496
- "fill": "e_G4ZW_fill",
2497
- "mono": "e_G4ZW_mono",
2498
- "weightMedium": "e_G4ZW_weightMedium",
2499
- "padNone": "e_G4ZW_padNone",
2500
- "tabular": "e_G4ZW_tabular",
2501
- "padCard": "e_G4ZW_padCard",
2502
- "fixed": "e_G4ZW_fixed",
2503
- "justifyCenter": "e_G4ZW_justifyCenter",
2504
- "gap12": "e_G4ZW_gap12",
2505
- "alignEnd": "e_G4ZW_alignEnd",
2506
- "gap4": "e_G4ZW_gap4",
2507
- "padRow": "e_G4ZW_padRow",
2508
- "gap8": "e_G4ZW_gap8",
2509
- "gap6": "e_G4ZW_gap6",
2510
- "padBody": "e_G4ZW_padBody",
2511
- "sizeSm": "e_G4ZW_sizeSm",
2512
- "padPage": "e_G4ZW_padPage",
2513
- "gap10": "e_G4ZW_gap10",
2514
- "alignStart": "e_G4ZW_alignStart",
2515
- "push": "e_G4ZW_push",
2516
- "sizeLg": "e_G4ZW_sizeLg",
2517
- "toneDanger": "e_G4ZW_toneDanger",
2518
- "gapWide": "e_G4ZW_gapWide",
2519
- "sizeMd": "e_G4ZW_sizeMd",
2520
- "gap2": "e_G4ZW_gap2",
2521
- "wrap": "e_G4ZW_wrap",
2522
- "justifyBetween": "e_G4ZW_justifyBetween",
2523
- "toneSecondary": "e_G4ZW_toneSecondary",
2524
- "scroll": "e_G4ZW_scroll",
2525
- "toneTertiary": "e_G4ZW_toneTertiary",
2526
- "text": "e_G4ZW_text",
2527
- "sizeBase": "e_G4ZW_sizeBase",
2528
- "strong": "e_G4ZW_strong",
2529
- "gap0": "e_G4ZW_gap0",
2530
- "sizeXs": "e_G4ZW_sizeXs",
2531
- "truncate": "e_G4ZW_truncate",
2532
- "grow": "e_G4ZW_grow",
2533
- "narrow": "e_G4ZW_narrow",
2534
- "gap14": "e_G4ZW_gap14",
2535
- "wSearch": "e_G4ZW_wSearch",
2536
- "tonePrimary": "e_G4ZW_tonePrimary",
2537
- "row": "e_G4ZW_row",
2538
- "gap16": "e_G4ZW_gap16",
2539
- "padBlocking": "e_G4ZW_padBlocking",
2540
- "alignCenter": "e_G4ZW_alignCenter",
2541
- "plain": "e_G4ZW_plain"
2622
+ "toneSecondary": "_7Ar2dq_toneSecondary",
2623
+ "narrow": "_7Ar2dq_narrow",
2624
+ "wSearch": "_7Ar2dq_wSearch",
2625
+ "padBlocking": "_7Ar2dq_padBlocking",
2626
+ "padCard": "_7Ar2dq_padCard",
2627
+ "alignStart": "_7Ar2dq_alignStart",
2628
+ "justifyBetween": "_7Ar2dq_justifyBetween",
2629
+ "wrap": "_7Ar2dq_wrap",
2630
+ "mono": "_7Ar2dq_mono",
2631
+ "justifyEnd": "_7Ar2dq_justifyEnd",
2632
+ "text": "_7Ar2dq_text",
2633
+ "fixed": "_7Ar2dq_fixed",
2634
+ "gapWide": "_7Ar2dq_gapWide",
2635
+ "gap8": "_7Ar2dq_gap8",
2636
+ "toneDanger": "_7Ar2dq_toneDanger",
2637
+ "alignCenter": "_7Ar2dq_alignCenter",
2638
+ "alignEnd": "_7Ar2dq_alignEnd",
2639
+ "tonePrimary": "_7Ar2dq_tonePrimary",
2640
+ "weightMedium": "_7Ar2dq_weightMedium",
2641
+ "boxed": "_7Ar2dq_boxed",
2642
+ "padNone": "_7Ar2dq_padNone",
2643
+ "tabular": "_7Ar2dq_tabular",
2644
+ "push": "_7Ar2dq_push",
2645
+ "gap12": "_7Ar2dq_gap12",
2646
+ "sizeMd": "_7Ar2dq_sizeMd",
2647
+ "toneTertiary": "_7Ar2dq_toneTertiary",
2648
+ "strong": "_7Ar2dq_strong",
2649
+ "gap4": "_7Ar2dq_gap4",
2650
+ "gap14": "_7Ar2dq_gap14",
2651
+ "justifyCenter": "_7Ar2dq_justifyCenter",
2652
+ "padRow": "_7Ar2dq_padRow",
2653
+ "row": "_7Ar2dq_row",
2654
+ "sizeBase": "_7Ar2dq_sizeBase",
2655
+ "scroll": "_7Ar2dq_scroll",
2656
+ "truncate": "_7Ar2dq_truncate",
2657
+ "gap16": "_7Ar2dq_gap16",
2658
+ "gap0": "_7Ar2dq_gap0",
2659
+ "gap6": "_7Ar2dq_gap6",
2660
+ "stack": "_7Ar2dq_stack",
2661
+ "plain": "_7Ar2dq_plain",
2662
+ "gap10": "_7Ar2dq_gap10",
2663
+ "fill": "_7Ar2dq_fill",
2664
+ "padPage": "_7Ar2dq_padPage",
2665
+ "padBody": "_7Ar2dq_padBody",
2666
+ "gap2": "_7Ar2dq_gap2",
2667
+ "grow": "_7Ar2dq_grow",
2668
+ "sizeXs": "_7Ar2dq_sizeXs",
2669
+ "sizeSm": "_7Ar2dq_sizeSm",
2670
+ "sizeLg": "_7Ar2dq_sizeLg"
2542
2671
  };
2543
2672
  //#endregion
2544
- //#region ../../client/ui-primitives/src/client/layout/scales.ts
2673
+ //#region ../../client/dsh-client-ui-primitives/src/client/layout/scales.ts
2545
2674
  function gapClass(css, gap) {
2546
2675
  if (gap === void 0) return void 0;
2547
2676
  return gap === "wide" ? css.gapWide : css[`gap${gap}`];
@@ -2582,7 +2711,7 @@ window.__ModuleLoader__.load({
2582
2711
  return weight === "medium" ? css.weightMedium : css.strong;
2583
2712
  }
2584
2713
  //#endregion
2585
- //#region ../../client/ui-primitives/src/client/layout/Row.tsx
2714
+ //#region ../../client/dsh-client-ui-primitives/src/client/layout/Row.tsx
2586
2715
  const Row = (0, react.forwardRef)(function Row({ as: Element = "div", gap, align, justify, wrap = false, grow = false, boxed = false, fixed = false, narrow = false, push = false, plain = false, pad, className, children, ...rest }, ref) {
2587
2716
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
2588
2717
  ref,
@@ -2592,7 +2721,7 @@ window.__ModuleLoader__.load({
2592
2721
  });
2593
2722
  });
2594
2723
  //#endregion
2595
- //#region ../../client/ui-primitives/src/client/layout/Stack.tsx
2724
+ //#region ../../client/dsh-client-ui-primitives/src/client/layout/Stack.tsx
2596
2725
  const Stack = (0, react.forwardRef)(function Stack({ as: Element = "div", gap, align, pad, grow = false, boxed = false, fixed = false, narrow = false, fill = false, scroll = false, plain = false, className, children, ...rest }, ref) {
2597
2726
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
2598
2727
  ref,
@@ -2602,7 +2731,7 @@ window.__ModuleLoader__.load({
2602
2731
  });
2603
2732
  });
2604
2733
  //#endregion
2605
- //#region ../../client/ui-primitives/src/client/layout/Text.tsx
2734
+ //#region ../../client/dsh-client-ui-primitives/src/client/layout/Text.tsx
2606
2735
  function Text({ as: Element = "span", size, tone, weight, mono = false, truncate = false, tabular = false, className, children }) {
2607
2736
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Element, {
2608
2737
  className: classes(layout_module_css_default.text, sizeClass(layout_module_css_default, size), toneClass(layout_module_css_default, tone), weightClass(layout_module_css_default, weight), mono ? layout_module_css_default.mono : void 0, truncate ? layout_module_css_default.truncate : void 0, tabular ? layout_module_css_default.tabular : void 0, className),
@@ -2610,29 +2739,29 @@ window.__ModuleLoader__.load({
2610
2739
  });
2611
2740
  }
2612
2741
  //#endregion
2613
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/settings-form/SettingsFieldRow.module.css.mjs
2614
- const css$14 = "._72UBVa_row{flex-direction:column;display:flex}._72UBVa_row[data-divider=true]{border-top:.5px solid var(--dsw-alias-border-l2)}._72UBVa_body{flex-direction:column;gap:6px;padding:12px 0;display:flex}._72UBVa_inline{flex-direction:row;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;display:flex}._72UBVa_text{flex-direction:column;gap:2px;min-width:0;display:flex}._72UBVa_label{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:1.5;display:flex}._72UBVa_badge{corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}._72UBVa_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}._72UBVa_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}._72UBVa_reset:disabled{cursor:default}._72UBVa_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._72UBVa_invalid{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
2615
- const tagId$14 = "@morlay/ui-conversation-manager/SettingsFieldRow.module.css";
2742
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/settings-form/SettingsFieldRow.module.css.mjs
2743
+ const css$13 = ".Il1Dtq_row{flex-direction:column;display:flex}.Il1Dtq_row[data-divider=true]{border-top:.5px solid var(--dsw-alias-border-l2)}.Il1Dtq_body{flex-direction:column;gap:6px;padding:12px 0;display:flex}.Il1Dtq_inline{flex-direction:row;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;display:flex}.Il1Dtq_text{flex-direction:column;gap:2px;min-width:0;display:flex}.Il1Dtq_label{color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:1.5;display:flex}.Il1Dtq_badge{corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.Il1Dtq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.Il1Dtq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.Il1Dtq_reset:disabled{cursor:default}.Il1Dtq_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}.Il1Dtq_invalid{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
2744
+ const tagId$13 = "@morlay/ui-conversation-manager/SettingsFieldRow.module.css";
2616
2745
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/SettingsFieldRow.module.css\"]") === null) {
2617
2746
  const tag = document.createElement("style");
2618
2747
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2619
- tag.dataset.pluginCss = tagId$14;
2620
- tag.textContent = css$14;
2748
+ tag.dataset.pluginCss = tagId$13;
2749
+ tag.textContent = css$13;
2621
2750
  document.head.appendChild(tag);
2622
2751
  }
2623
2752
  var SettingsFieldRow_module_css_default = {
2624
- "invalid": "_72UBVa_invalid",
2625
- "inline": "_72UBVa_inline",
2626
- "body": "_72UBVa_body",
2627
- "label": "_72UBVa_label",
2628
- "row": "_72UBVa_row",
2629
- "text": "_72UBVa_text",
2630
- "badge": "_72UBVa_badge",
2631
- "reset": "_72UBVa_reset",
2632
- "hint": "_72UBVa_hint"
2753
+ "hint": "Il1Dtq_hint",
2754
+ "invalid": "Il1Dtq_invalid",
2755
+ "inline": "Il1Dtq_inline",
2756
+ "label": "Il1Dtq_label",
2757
+ "reset": "Il1Dtq_reset",
2758
+ "text": "Il1Dtq_text",
2759
+ "badge": "Il1Dtq_badge",
2760
+ "body": "Il1Dtq_body",
2761
+ "row": "Il1Dtq_row"
2633
2762
  };
2634
2763
  //#endregion
2635
- //#region ../../client/ui-primitives/src/client/settings-form/SettingsFieldRow.tsx
2764
+ //#region ../../client/dsh-client-ui-primitives/src/client/settings-form/SettingsFieldRow.tsx
2636
2765
  function SettingsFieldRow({ label, hint, layout = "stack", divider = false, overriddenLabel, resetLabel, onReset, invalid, children, className, ...rest }) {
2637
2766
  const labelNode = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
2638
2767
  className: SettingsFieldRow_module_css_default.label,
@@ -2688,19 +2817,19 @@ window.__ModuleLoader__.load({
2688
2817
  });
2689
2818
  }
2690
2819
  //#endregion
2691
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Bubble.module.css.mjs
2692
- const css$13 = ".dtkLCG_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}";
2693
- const tagId$13 = "@morlay/ui-conversation-manager/Bubble.module.css";
2820
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/Bubble.module.css.mjs
2821
+ const css$12 = ".Iy2DYG_bubble{background:var(--dsw-specific-bubble);border-radius:var(--dsw-radius-xl);max-width:100%;font-size:var(--dsh-content-font-size,14px);line-height:calc(22px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-primary);white-space:pre-wrap;word-break:break-word;padding:10px 16px}";
2822
+ const tagId$12 = "@morlay/ui-conversation-manager/Bubble.module.css";
2694
2823
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/Bubble.module.css\"]") === null) {
2695
2824
  const tag = document.createElement("style");
2696
2825
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2697
- tag.dataset.pluginCss = tagId$13;
2698
- tag.textContent = css$13;
2826
+ tag.dataset.pluginCss = tagId$12;
2827
+ tag.textContent = css$12;
2699
2828
  document.head.appendChild(tag);
2700
2829
  }
2701
- var Bubble_module_css_default = { "bubble": "dtkLCG_bubble" };
2830
+ var Bubble_module_css_default = { "bubble": "Iy2DYG_bubble" };
2702
2831
  //#endregion
2703
- //#region ../../client/ui-primitives/src/client/controls/Bubble.tsx
2832
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/Bubble.tsx
2704
2833
  function Bubble({ className, children, ...rest }) {
2705
2834
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2706
2835
  className: classes(Bubble_module_css_default.bubble, className),
@@ -2709,22 +2838,22 @@ window.__ModuleLoader__.load({
2709
2838
  });
2710
2839
  }
2711
2840
  //#endregion
2712
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Button.module.css.mjs
2713
- const css$12 = ".WFViLq_label{white-space:nowrap}.WFViLq_danger{--dsw-alias-button-primary-fill:var(--dsw-alias-state-error-primary)}";
2714
- const tagId$12 = "@morlay/ui-conversation-manager/Button.module.css";
2841
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/Button.module.css.mjs
2842
+ const css$11 = ".LWgVXW_label{white-space:nowrap}.LWgVXW_danger{--dsw-alias-button-primary-fill:var(--dsw-alias-state-error-primary)}";
2843
+ const tagId$11 = "@morlay/ui-conversation-manager/Button.module.css";
2715
2844
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/Button.module.css\"]") === null) {
2716
2845
  const tag = document.createElement("style");
2717
2846
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2718
- tag.dataset.pluginCss = tagId$12;
2719
- tag.textContent = css$12;
2847
+ tag.dataset.pluginCss = tagId$11;
2848
+ tag.textContent = css$11;
2720
2849
  document.head.appendChild(tag);
2721
2850
  }
2722
2851
  var Button_module_css_default = {
2723
- "label": "WFViLq_label",
2724
- "danger": "WFViLq_danger"
2852
+ "danger": "LWgVXW_danger",
2853
+ "label": "LWgVXW_label"
2725
2854
  };
2726
2855
  //#endregion
2727
- //#region ../../client/ui-primitives/src/client/controls/Button.tsx
2856
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/Button.tsx
2728
2857
  const Button$1 = (0, react.forwardRef)(function Button({ className, tone, ...rest }, ref) {
2729
2858
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
2730
2859
  ref,
@@ -2734,22 +2863,22 @@ window.__ModuleLoader__.load({
2734
2863
  });
2735
2864
  });
2736
2865
  //#endregion
2737
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/DisclosureRow.module.css.mjs
2738
- const css$11 = ".MBWCEG_content{flex:auto;min-width:0}.MBWCEG_contentLayout{align-items:center;gap:8px;width:100%;min-width:0;display:flex}";
2739
- const tagId$11 = "@morlay/ui-conversation-manager/DisclosureRow.module.css";
2866
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/DisclosureRow.module.css.mjs
2867
+ const css$10 = "._2HN-kW_content{flex:auto;min-width:0}._2HN-kW_contentLayout{align-items:center;gap:8px;width:100%;min-width:0;display:flex}";
2868
+ const tagId$10 = "@morlay/ui-conversation-manager/DisclosureRow.module.css";
2740
2869
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/DisclosureRow.module.css\"]") === null) {
2741
2870
  const tag = document.createElement("style");
2742
2871
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2743
- tag.dataset.pluginCss = tagId$11;
2744
- tag.textContent = css$11;
2872
+ tag.dataset.pluginCss = tagId$10;
2873
+ tag.textContent = css$10;
2745
2874
  document.head.appendChild(tag);
2746
2875
  }
2747
2876
  var DisclosureRow_module_css_default = {
2748
- "contentLayout": "MBWCEG_contentLayout",
2749
- "content": "MBWCEG_content"
2877
+ "content": "_2HN-kW_content",
2878
+ "contentLayout": "_2HN-kW_contentLayout"
2750
2879
  };
2751
2880
  //#endregion
2752
- //#region ../../client/ui-primitives/src/client/controls/DisclosureRow.tsx
2881
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/DisclosureRow.tsx
2753
2882
  function DisclosureRow(props) {
2754
2883
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
2755
2884
  contentClassName: DisclosureRow_module_css_default.content,
@@ -2758,31 +2887,8 @@ window.__ModuleLoader__.load({
2758
2887
  });
2759
2888
  }
2760
2889
  //#endregion
2761
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchInput.module.css.mjs
2762
- const css$10 = ".KiR4MG_search{flex:none;width:360px;max-width:100%}.KiR4MG_full{flex:none;width:100%}";
2763
- const tagId$10 = "@morlay/ui-conversation-manager/SearchInput.module.css";
2764
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/SearchInput.module.css\"]") === null) {
2765
- const tag = document.createElement("style");
2766
- tag.dataset.plugin = "@morlay/ui-conversation-manager";
2767
- tag.dataset.pluginCss = tagId$10;
2768
- tag.textContent = css$10;
2769
- document.head.appendChild(tag);
2770
- }
2771
- var SearchInput_module_css_default = {
2772
- "full": "KiR4MG_full",
2773
- "search": "KiR4MG_search"
2774
- };
2775
- //#endregion
2776
- //#region ../../client/ui-primitives/src/client/controls/SearchInput.tsx
2777
- function SearchInput({ width = "search", className, ...rest }) {
2778
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
2779
- className: classes(className, width === "search" ? SearchInput_module_css_default.search : SearchInput_module_css_default.full),
2780
- ...rest
2781
- });
2782
- }
2783
- //#endregion
2784
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SeatButton.module.css.mjs
2785
- const css$9 = ".HcNbhG_seat{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(100%,240px);min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.HcNbhG_seat:not(:disabled):hover,.HcNbhG_seat[aria-expanded=true],.HcNbhG_expanded{background:var(--dsw-alias-interactive-bg-hover)}.HcNbhG_seat:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.HcNbhG_icon{color:var(--dsw-alias-label-primary);flex:none;align-items:center;display:inline-flex}.HcNbhG_label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.HcNbhG_chevron{color:var(--dsw-alias-label-caption);flex:none;display:inline-flex}";
2890
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/SeatButton.module.css.mjs
2891
+ const css$9 = ".JqQ4qG_seat{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(100%,240px);min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;padding:0 8px;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.JqQ4qG_seat:not(:disabled):hover,.JqQ4qG_seat[aria-expanded=true],.JqQ4qG_expanded{background:var(--dsw-alias-interactive-bg-hover)}.JqQ4qG_seat:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.JqQ4qG_icon{color:var(--dsw-alias-label-primary);flex:none;align-items:center;display:inline-flex}.JqQ4qG_label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.JqQ4qG_chevron{color:var(--dsw-alias-label-caption);flex:none;display:inline-flex}";
2786
2892
  const tagId$9 = "@morlay/ui-conversation-manager/SeatButton.module.css";
2787
2893
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/SeatButton.module.css\"]") === null) {
2788
2894
  const tag = document.createElement("style");
@@ -2792,14 +2898,14 @@ window.__ModuleLoader__.load({
2792
2898
  document.head.appendChild(tag);
2793
2899
  }
2794
2900
  var SeatButton_module_css_default = {
2795
- "seat": "HcNbhG_seat",
2796
- "expanded": "HcNbhG_expanded",
2797
- "icon": "HcNbhG_icon",
2798
- "label": "HcNbhG_label",
2799
- "chevron": "HcNbhG_chevron"
2901
+ "expanded": "JqQ4qG_expanded",
2902
+ "icon": "JqQ4qG_icon",
2903
+ "label": "JqQ4qG_label",
2904
+ "chevron": "JqQ4qG_chevron",
2905
+ "seat": "JqQ4qG_seat"
2800
2906
  };
2801
2907
  //#endregion
2802
- //#region ../../client/ui-primitives/src/client/controls/SeatButton.tsx
2908
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/SeatButton.tsx
2803
2909
  function SeatButton({ icon, label, expanded = false, chevron, type = "button", className, ...rest }) {
2804
2910
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
2805
2911
  type,
@@ -2822,8 +2928,8 @@ window.__ModuleLoader__.load({
2822
2928
  });
2823
2929
  }
2824
2930
  //#endregion
2825
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Spinner.module.css.mjs
2826
- const css$8 = ".HGVDmW_spinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-primary);border-radius:50%;width:28px;height:28px;animation:.9s linear infinite HGVDmW_spin}@keyframes HGVDmW_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}";
2931
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/Spinner.module.css.mjs
2932
+ const css$8 = "._1uNobG_spinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-primary);border-radius:50%;width:28px;height:28px;animation:.9s linear infinite _1uNobG_spin}@keyframes _1uNobG_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}";
2827
2933
  const tagId$8 = "@morlay/ui-conversation-manager/Spinner.module.css";
2828
2934
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/Spinner.module.css\"]") === null) {
2829
2935
  const tag = document.createElement("style");
@@ -2833,11 +2939,11 @@ window.__ModuleLoader__.load({
2833
2939
  document.head.appendChild(tag);
2834
2940
  }
2835
2941
  var Spinner_module_css_default = {
2836
- "spinner": "HGVDmW_spinner",
2837
- "spin": "HGVDmW_spin"
2942
+ "spin": "_1uNobG_spin",
2943
+ "spinner": "_1uNobG_spinner"
2838
2944
  };
2839
2945
  //#endregion
2840
- //#region ../../client/ui-primitives/src/client/controls/Spinner.tsx
2946
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/Spinner.tsx
2841
2947
  function Spinner({ label }) {
2842
2948
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2843
2949
  className: Spinner_module_css_default.spinner,
@@ -2846,60 +2952,19 @@ window.__ModuleLoader__.load({
2846
2952
  });
2847
2953
  }
2848
2954
  //#endregion
2849
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/Tabs.module.css.mjs
2850
- const css$7 = ".GO-36q_tabs{z-index:1;flex:none;gap:36px;margin-top:10px;padding-left:8px;display:flex;position:relative}.GO-36q_tab{color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;padding:0 0 9px;font-size:13px;font-weight:500;line-height:16px;position:relative}.GO-36q_tab:after{content:\"\";background:0 0;border-radius:2px;height:2px;position:absolute;bottom:-1px;left:0;right:0}.GO-36q_tabActive{color:var(--dsw-alias-state-business-primary)}.GO-36q_tabActive:after{background:var(--dsw-alias-state-business-primary)}.GO-36q_tab:disabled{cursor:not-allowed;opacity:.4}";
2851
- const tagId$7 = "@morlay/ui-conversation-manager/Tabs.module.css";
2852
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/Tabs.module.css\"]") === null) {
2955
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/TimeLabel.module.css.mjs
2956
+ const css$7 = ".P8Yiia_label{color:var(--dsw-alias-label-tertiary);white-space:nowrap;opacity:0;padding:0;font-size:14px;line-height:24px;transition:opacity 80ms}[data-time-hover-root]:hover .P8Yiia_label,[data-time-hover-root]:focus-within .P8Yiia_label{opacity:1}";
2957
+ const tagId$7 = "@morlay/ui-conversation-manager/TimeLabel.module.css";
2958
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/TimeLabel.module.css\"]") === null) {
2853
2959
  const tag = document.createElement("style");
2854
2960
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2855
2961
  tag.dataset.pluginCss = tagId$7;
2856
2962
  tag.textContent = css$7;
2857
2963
  document.head.appendChild(tag);
2858
2964
  }
2859
- var Tabs_module_css_default = {
2860
- "tab": "GO-36q_tab",
2861
- "tabs": "GO-36q_tabs",
2862
- "tabActive": "GO-36q_tabActive"
2863
- };
2864
- //#endregion
2865
- //#region ../../client/ui-primitives/src/client/controls/Tabs.tsx
2866
- function Tabs({ label, items, value, onChange, role = "tablist", disabled = false }) {
2867
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2868
- className: Tabs_module_css_default.tabs,
2869
- role,
2870
- "aria-label": label,
2871
- children: items.map((item) => {
2872
- const active = item.value === value;
2873
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
2874
- type: "button",
2875
- role: role === "tablist" ? "tab" : "radio",
2876
- "data-tab": item.value,
2877
- "aria-selected": role === "tablist" ? active : void 0,
2878
- "aria-checked": role === "tablist" ? void 0 : active,
2879
- disabled,
2880
- className: classes(Tabs_module_css_default.tab, active ? Tabs_module_css_default.tabActive : void 0),
2881
- onClick: () => {
2882
- onChange(item.value);
2883
- },
2884
- children: item.label
2885
- }, item.value);
2886
- })
2887
- });
2888
- }
2889
- //#endregion
2890
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TimeLabel.module.css.mjs
2891
- const css$6 = "._3IuWPG_label{color:var(--dsw-alias-label-tertiary);white-space:nowrap;opacity:0;padding:0;font-size:14px;line-height:24px;transition:opacity 80ms}[data-time-hover-root]:hover ._3IuWPG_label,[data-time-hover-root]:focus-within ._3IuWPG_label{opacity:1}";
2892
- const tagId$6 = "@morlay/ui-conversation-manager/TimeLabel.module.css";
2893
- if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/TimeLabel.module.css\"]") === null) {
2894
- const tag = document.createElement("style");
2895
- tag.dataset.plugin = "@morlay/ui-conversation-manager";
2896
- tag.dataset.pluginCss = tagId$6;
2897
- tag.textContent = css$6;
2898
- document.head.appendChild(tag);
2899
- }
2900
- var TimeLabel_module_css_default = { "label": "_3IuWPG_label" };
2965
+ var TimeLabel_module_css_default = { "label": "P8Yiia_label" };
2901
2966
  //#endregion
2902
- //#region ../../client/ui-primitives/src/client/controls/TimeLabel.tsx
2967
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/TimeLabel.tsx
2903
2968
  function TimeLabel({ className, children, ...rest }) {
2904
2969
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2905
2970
  className: classes(TimeLabel_module_css_default.label, className),
@@ -2908,19 +2973,19 @@ window.__ModuleLoader__.load({
2908
2973
  });
2909
2974
  }
2910
2975
  //#endregion
2911
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/VisuallyHidden.module.css.mjs
2912
- const css$5 = ".YAvv4W_hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
2913
- const tagId$5 = "@morlay/ui-conversation-manager/VisuallyHidden.module.css";
2976
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/VisuallyHidden.module.css.mjs
2977
+ const css$6 = ".d5ueOG_hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}";
2978
+ const tagId$6 = "@morlay/ui-conversation-manager/VisuallyHidden.module.css";
2914
2979
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/VisuallyHidden.module.css\"]") === null) {
2915
2980
  const tag = document.createElement("style");
2916
2981
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2917
- tag.dataset.pluginCss = tagId$5;
2918
- tag.textContent = css$5;
2982
+ tag.dataset.pluginCss = tagId$6;
2983
+ tag.textContent = css$6;
2919
2984
  document.head.appendChild(tag);
2920
2985
  }
2921
- var VisuallyHidden_module_css_default = { "hidden": "YAvv4W_hidden" };
2986
+ var VisuallyHidden_module_css_default = { "hidden": "d5ueOG_hidden" };
2922
2987
  //#endregion
2923
- //#region ../../client/ui-primitives/src/client/controls/VisuallyHidden.tsx
2988
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/VisuallyHidden.tsx
2924
2989
  function VisuallyHidden({ children, ...rest }) {
2925
2990
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2926
2991
  className: VisuallyHidden_module_css_default.hidden,
@@ -2929,23 +2994,23 @@ window.__ModuleLoader__.load({
2929
2994
  });
2930
2995
  }
2931
2996
  //#endregion
2932
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/IconButton.module.css.mjs
2933
- const css$4 = ".I3t6Ga_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.I3t6Ga_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.I3t6Ga_iconButton:disabled{cursor:not-allowed;opacity:.4}.I3t6Ga_iconButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.I3t6Ga_sm{width:20px;height:20px;padding:0}.I3t6Ga_circle{color:var(--dsw-alias-label-tertiary);border-radius:28px;padding:6px}.I3t6Ga_circle:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}";
2934
- const tagId$4 = "@morlay/ui-conversation-manager/IconButton.module.css";
2997
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/IconButton.module.css.mjs
2998
+ const css$5 = ".AibFna_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-sm);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.AibFna_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.AibFna_iconButton:disabled{cursor:not-allowed;opacity:.4}.AibFna_iconButton:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.AibFna_sm{width:20px;height:20px;padding:0}.AibFna_circle{color:var(--dsw-alias-label-tertiary);border-radius:28px;padding:6px}.AibFna_circle:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}";
2999
+ const tagId$5 = "@morlay/ui-conversation-manager/IconButton.module.css";
2935
3000
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/IconButton.module.css\"]") === null) {
2936
3001
  const tag = document.createElement("style");
2937
3002
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2938
- tag.dataset.pluginCss = tagId$4;
2939
- tag.textContent = css$4;
3003
+ tag.dataset.pluginCss = tagId$5;
3004
+ tag.textContent = css$5;
2940
3005
  document.head.appendChild(tag);
2941
3006
  }
2942
3007
  var IconButton_module_css_default = {
2943
- "sm": "I3t6Ga_sm",
2944
- "circle": "I3t6Ga_circle",
2945
- "iconButton": "I3t6Ga_iconButton"
3008
+ "iconButton": "AibFna_iconButton",
3009
+ "sm": "AibFna_sm",
3010
+ "circle": "AibFna_circle"
2946
3011
  };
2947
3012
  //#endregion
2948
- //#region ../../client/ui-primitives/src/client/controls/IconButton.tsx
3013
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/IconButton.tsx
2949
3014
  function IconButton({ label, children, type = "button", shape = "square", size = "md", className, ...rest }) {
2950
3015
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
2951
3016
  type,
@@ -2957,30 +3022,30 @@ window.__ModuleLoader__.load({
2957
3022
  });
2958
3023
  }
2959
3024
  //#endregion
2960
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/ModelRouteList.module.css.mjs
2961
- const css$3 = "._2eBkWq_list{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);gap:6px;min-width:0;max-height:280px;margin:0;padding:10px;display:grid;overflow:auto}._2eBkWq_group{gap:6px;display:grid}._2eBkWq_group+._2eBkWq_group{border-top:.5px solid var(--dsw-alias-border-l3);margin-top:4px;padding-top:10px}._2eBkWq_provider{color:var(--dsw-alias-label-tertiary);padding:0 6px;font-size:11px;font-weight:500}._2eBkWq_item{border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:6px;display:grid}._2eBkWq_item:hover{background:var(--dsw-alias-bg-layer-4)}._2eBkWq_item:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}._2eBkWq_item[aria-disabled=true]{cursor:not-allowed;opacity:.4}._2eBkWq_picked{background:var(--dsw-alias-interactive-bg-hover)}._2eBkWq_text{min-width:0}._2eBkWq_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;display:block;overflow:hidden}._2eBkWq_id{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;display:block;overflow:hidden}._2eBkWq_notice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._2eBkWq_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
2962
- const tagId$3 = "@morlay/ui-conversation-manager/ModelRouteList.module.css";
3025
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/ModelRouteList.module.css.mjs
3026
+ const css$4 = "._1vK46q_list{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-lg);gap:6px;min-width:0;max-height:280px;margin:0;padding:10px;display:grid;overflow:auto}._1vK46q_group{gap:6px;display:grid}._1vK46q_group+._1vK46q_group{border-top:.5px solid var(--dsw-alias-border-l3);margin-top:4px;padding-top:10px}._1vK46q_provider{color:var(--dsw-alias-label-tertiary);padding:0 6px;font-size:11px;font-weight:500}._1vK46q_item{border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:6px;display:grid}._1vK46q_item:hover{background:var(--dsw-alias-bg-layer-4)}._1vK46q_item:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}._1vK46q_item[aria-disabled=true]{cursor:not-allowed;opacity:.4}._1vK46q_picked{background:var(--dsw-alias-interactive-bg-hover)}._1vK46q_text{min-width:0}._1vK46q_name{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:13px;display:block;overflow:hidden}._1vK46q_id{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;display:block;overflow:hidden}._1vK46q_notice{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.5}._1vK46q_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}";
3027
+ const tagId$4 = "@morlay/ui-conversation-manager/ModelRouteList.module.css";
2963
3028
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/ModelRouteList.module.css\"]") === null) {
2964
3029
  const tag = document.createElement("style");
2965
3030
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
2966
- tag.dataset.pluginCss = tagId$3;
2967
- tag.textContent = css$3;
3031
+ tag.dataset.pluginCss = tagId$4;
3032
+ tag.textContent = css$4;
2968
3033
  document.head.appendChild(tag);
2969
3034
  }
2970
3035
  var ModelRouteList_module_css_default = {
2971
- "picked": "_2eBkWq_picked",
2972
- "notice": "_2eBkWq_notice",
2973
- "text": "_2eBkWq_text",
2974
- "item": "_2eBkWq_item",
2975
- "id": "_2eBkWq_id",
2976
- "group": "_2eBkWq_group",
2977
- "name": "_2eBkWq_name",
2978
- "error": "_2eBkWq_error",
2979
- "list": "_2eBkWq_list",
2980
- "provider": "_2eBkWq_provider"
3036
+ "picked": "_1vK46q_picked",
3037
+ "group": "_1vK46q_group",
3038
+ "id": "_1vK46q_id",
3039
+ "text": "_1vK46q_text",
3040
+ "item": "_1vK46q_item",
3041
+ "list": "_1vK46q_list",
3042
+ "notice": "_1vK46q_notice",
3043
+ "error": "_1vK46q_error",
3044
+ "name": "_1vK46q_name",
3045
+ "provider": "_1vK46q_provider"
2981
3046
  };
2982
3047
  //#endregion
2983
- //#region ../../client/ui-primitives/src/client/controls/ModelRouteList.tsx
3048
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/ModelRouteList.tsx
2984
3049
  function ModelRouteList({ label, candidates, selectedKey, disabled = false, status, loadingLabel, errorLabel, emptyLabel, onSelect }) {
2985
3050
  if (status === "loading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2986
3051
  className: ModelRouteList_module_css_default.notice,
@@ -3051,19 +3116,19 @@ window.__ModuleLoader__.load({
3051
3116
  });
3052
3117
  }
3053
3118
  //#endregion
3054
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/MultilineField.module.css.mjs
3055
- const css$2 = "._stHfW_multiline{box-sizing:border-box;width:100%;min-height:64px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);resize:vertical;padding:6px 12px;font-family:inherit;font-size:13px;line-height:1.5}._stHfW_multiline:disabled{cursor:not-allowed;opacity:.4}._stHfW_multiline:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}";
3056
- const tagId$2 = "@morlay/ui-conversation-manager/MultilineField.module.css";
3119
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/MultilineField.module.css.mjs
3120
+ const css$3 = ".V0rRdq_multiline{box-sizing:border-box;width:100%;min-height:64px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);resize:vertical;padding:6px 12px;font-family:inherit;font-size:13px;line-height:1.5}.V0rRdq_multiline:disabled{cursor:not-allowed;opacity:.4}.V0rRdq_multiline:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}";
3121
+ const tagId$3 = "@morlay/ui-conversation-manager/MultilineField.module.css";
3057
3122
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/MultilineField.module.css\"]") === null) {
3058
3123
  const tag = document.createElement("style");
3059
3124
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
3060
- tag.dataset.pluginCss = tagId$2;
3061
- tag.textContent = css$2;
3125
+ tag.dataset.pluginCss = tagId$3;
3126
+ tag.textContent = css$3;
3062
3127
  document.head.appendChild(tag);
3063
3128
  }
3064
- var MultilineField_module_css_default = { "multiline": "_stHfW_multiline" };
3129
+ var MultilineField_module_css_default = { "multiline": "V0rRdq_multiline" };
3065
3130
  //#endregion
3066
- //#region ../../client/ui-primitives/src/client/controls/MultilineField.tsx
3131
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/MultilineField.tsx
3067
3132
  function MultilineField({ rows = 3, className, ...rest }) {
3068
3133
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
3069
3134
  rows,
@@ -3073,24 +3138,24 @@ window.__ModuleLoader__.load({
3073
3138
  });
3074
3139
  }
3075
3140
  //#endregion
3076
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/SearchSelect.module.css.mjs
3077
- const css$1 = ".BtUTmW_trigger{white-space:nowrap;height:32px}.BtUTmW_searchRow{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;padding:4px 8px 8px;display:flex}.BtUTmW_searchInput{width:100%;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.BtUTmW_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
3078
- const tagId$1 = "@morlay/ui-conversation-manager/SearchSelect.module.css";
3141
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/SearchSelect.module.css.mjs
3142
+ const css$2 = ".kEYv4q_trigger{white-space:nowrap;height:32px}.kEYv4q_searchRow{border-bottom:.5px solid var(--dsw-alias-border-l2);align-items:center;padding:4px 8px 8px;display:flex}.kEYv4q_searchInput{width:100%;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.kEYv4q_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
3143
+ const tagId$2 = "@morlay/ui-conversation-manager/SearchSelect.module.css";
3079
3144
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/SearchSelect.module.css\"]") === null) {
3080
3145
  const tag = document.createElement("style");
3081
3146
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
3082
- tag.dataset.pluginCss = tagId$1;
3083
- tag.textContent = css$1;
3147
+ tag.dataset.pluginCss = tagId$2;
3148
+ tag.textContent = css$2;
3084
3149
  document.head.appendChild(tag);
3085
3150
  }
3086
3151
  var SearchSelect_module_css_default = {
3087
- "trigger": "BtUTmW_trigger",
3088
- "searchInput": "BtUTmW_searchInput",
3089
- "empty": "BtUTmW_empty",
3090
- "searchRow": "BtUTmW_searchRow"
3152
+ "searchInput": "kEYv4q_searchInput",
3153
+ "empty": "kEYv4q_empty",
3154
+ "trigger": "kEYv4q_trigger",
3155
+ "searchRow": "kEYv4q_searchRow"
3091
3156
  };
3092
3157
  //#endregion
3093
- //#region ../../client/ui-primitives/src/client/controls/SearchSelect.tsx
3158
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/SearchSelect.tsx
3094
3159
  function SearchSelect({ label, value, emptyLabel, options, disabled = false, searchLabel, noMatchLabel, onSelect }) {
3095
3160
  const [open, setOpen] = (0, react.useState)(false);
3096
3161
  const [query, setQuery] = (0, react.useState)("");
@@ -3168,7 +3233,7 @@ window.__ModuleLoader__.load({
3168
3233
  });
3169
3234
  }
3170
3235
  //#endregion
3171
- //#region ../../client/ui-primitives/src/client/controls/tags.ts
3236
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/tags.ts
3172
3237
  function parseTagList(text) {
3173
3238
  const seen = /* @__PURE__ */ new Set();
3174
3239
  const names = [];
@@ -3189,27 +3254,27 @@ window.__ModuleLoader__.load({
3189
3254
  return merged;
3190
3255
  }
3191
3256
  //#endregion
3192
- //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/ui-primitives/src/client/controls/TagInput.module.css.mjs
3193
- const css = ".Is5kta_row{align-items:flex-start;gap:8px;width:100%;display:flex}.Is5kta_anchor{flex:auto;width:100%;min-width:0;display:flex}.Is5kta_box{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);flex-flow:wrap;align-items:center;gap:4px 6px;width:100%;min-height:32px;padding:4px 8px;display:flex}.Is5kta_input{min-width:120px;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:120px;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.Is5kta_chip{corner-shape:round;white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;gap:2px;padding:1px 4px 1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.Is5kta_chipRemove{box-sizing:border-box;width:14px;height:14px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}.Is5kta_chipRemove:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Is5kta_chipRemove:disabled{cursor:not-allowed;opacity:.4}.Is5kta_chipRemove:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:0}.Is5kta_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
3194
- const tagId = "@morlay/ui-conversation-manager/TagInput.module.css";
3257
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/client/dsh-client-ui-primitives/src/client/controls/TagInput.module.css.mjs
3258
+ const css$1 = ".Qg7I9G_row{align-items:flex-start;gap:8px;width:100%;display:flex}.Qg7I9G_anchor{flex:auto;width:100%;min-width:0;display:flex}.Qg7I9G_box{box-sizing:border-box;background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);flex-flow:wrap;align-items:center;gap:4px 6px;width:100%;min-height:32px;padding:4px 8px;display:flex}.Qg7I9G_input{min-width:120px;color:var(--dsw-alias-label-primary);background:0 0;border:none;outline:none;flex:120px;padding:2px 0;font-family:inherit;font-size:13px;line-height:1.5}.Qg7I9G_chip{corner-shape:round;white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);border-radius:999px;align-items:center;gap:2px;padding:1px 4px 1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.Qg7I9G_chipRemove{box-sizing:border-box;width:14px;height:14px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}.Qg7I9G_chipRemove:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.Qg7I9G_chipRemove:disabled{cursor:not-allowed;opacity:.4}.Qg7I9G_chipRemove:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:0}.Qg7I9G_empty{color:var(--dsw-alias-label-tertiary);margin:0;padding:8px;font-size:12px;line-height:1.5}";
3259
+ const tagId$1 = "@morlay/ui-conversation-manager/TagInput.module.css";
3195
3260
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/TagInput.module.css\"]") === null) {
3196
3261
  const tag = document.createElement("style");
3197
3262
  tag.dataset.plugin = "@morlay/ui-conversation-manager";
3198
- tag.dataset.pluginCss = tagId;
3199
- tag.textContent = css;
3263
+ tag.dataset.pluginCss = tagId$1;
3264
+ tag.textContent = css$1;
3200
3265
  document.head.appendChild(tag);
3201
3266
  }
3202
3267
  var TagInput_module_css_default = {
3203
- "chipRemove": "Is5kta_chipRemove",
3204
- "row": "Is5kta_row",
3205
- "input": "Is5kta_input",
3206
- "chip": "Is5kta_chip",
3207
- "empty": "Is5kta_empty",
3208
- "box": "Is5kta_box",
3209
- "anchor": "Is5kta_anchor"
3268
+ "input": "Qg7I9G_input",
3269
+ "box": "Qg7I9G_box",
3270
+ "anchor": "Qg7I9G_anchor",
3271
+ "row": "Qg7I9G_row",
3272
+ "chipRemove": "Qg7I9G_chipRemove",
3273
+ "empty": "Qg7I9G_empty",
3274
+ "chip": "Qg7I9G_chip"
3210
3275
  };
3211
3276
  //#endregion
3212
- //#region ../../client/ui-primitives/src/client/controls/TagInput.tsx
3277
+ //#region ../../client/dsh-client-ui-primitives/src/client/controls/TagInput.tsx
3213
3278
  function TagInput({ value, onChange, options, placeholder, label, disabled = false, noMatchLabel = "", removeLabel }) {
3214
3279
  const [draft, setDraft] = (0, react.useState)("");
3215
3280
  const [open, setOpen] = (0, react.useState)(false);
@@ -3473,7 +3538,7 @@ window.__ModuleLoader__.load({
3473
3538
  * NormalizedExtension
3474
3539
  * } from 'micromark-util-types'
3475
3540
  */
3476
- const hasOwnProperty = {}.hasOwnProperty;
3541
+ const hasOwnProperty$1 = {}.hasOwnProperty;
3477
3542
  /**
3478
3543
  * Combine multiple syntax extensions into one.
3479
3544
  *
@@ -3504,13 +3569,13 @@ window.__ModuleLoader__.load({
3504
3569
  let hook;
3505
3570
  for (hook in extension) {
3506
3571
  /** @type {Record<string, unknown>} */
3507
- const left = (hasOwnProperty.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
3572
+ const left = (hasOwnProperty$1.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
3508
3573
  /** @type {Record<string, unknown> | undefined} */
3509
3574
  const right = extension[hook];
3510
3575
  /** @type {string} */
3511
3576
  let code;
3512
3577
  if (right) for (code in right) {
3513
- if (!hasOwnProperty.call(left, code)) left[code] = [];
3578
+ if (!hasOwnProperty$1.call(left, code)) left[code] = [];
3514
3579
  const value = right[code];
3515
3580
  constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
3516
3581
  }
@@ -3807,6 +3872,7 @@ window.__ModuleLoader__.load({
3807
3872
  return code !== null && code > -1 && regex.test(String.fromCharCode(code));
3808
3873
  }
3809
3874
  }
3875
+ ({}).hasOwnProperty;
3810
3876
  //#endregion
3811
3877
  //#region ../../../node_modules/.pnpm/micromark-factory-space@2.1.0/node_modules/micromark-factory-space/index.js
3812
3878
  /**
@@ -4416,7 +4482,7 @@ window.__ModuleLoader__.load({
4416
4482
  * } from 'micromark-util-types'
4417
4483
  */
4418
4484
  /** @type {Construct} */
4419
- const attention = {
4485
+ const attention$2 = {
4420
4486
  name: "attention",
4421
4487
  resolveAll: resolveAllAttention,
4422
4488
  tokenize: tokenizeAttention
@@ -10220,16 +10286,16 @@ window.__ModuleLoader__.load({
10220
10286
  [-3]: lineEnding,
10221
10287
  [33]: labelStartImage,
10222
10288
  [38]: characterReference,
10223
- [42]: attention,
10289
+ [42]: attention$2,
10224
10290
  [60]: [autolink, htmlText],
10225
10291
  [91]: labelStartLink,
10226
10292
  [92]: [hardBreakEscape, characterEscape],
10227
10293
  [93]: labelEnd,
10228
- [95]: attention,
10294
+ [95]: attention$2,
10229
10295
  [96]: codeText
10230
10296
  };
10231
10297
  /** @satisfies {Extension['insideSpan']} */
10232
- const insideSpan = { null: [attention, resolver] };
10298
+ const insideSpan = { null: [attention$2, resolver] };
10233
10299
  /** @satisfies {Extension['attentionMarkers']} */
10234
10300
  const attentionMarkers = { null: [42, 95] };
10235
10301
  /** @satisfies {Extension['disable']} */
@@ -10954,7 +11020,7 @@ window.__ModuleLoader__.load({
10954
11020
  return value && typeof value === "number" ? value : 1;
10955
11021
  }
10956
11022
  //#endregion
10957
- //#region ../../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@9.4.0/node_modules/mdast-util-from-markdown/lib/index.js
11023
+ //#region ../../../node_modules/.pnpm/mdast-util-from-markdown@2.1.0_supports-color@9.4.0/node_modules/mdast-util-from-markdown/lib/index.js
10958
11024
  /**
10959
11025
  * @import {
10960
11026
  * Break,
@@ -10995,7 +11061,7 @@ window.__ModuleLoader__.load({
10995
11061
  * Options
10996
11062
  * } from './types.js'
10997
11063
  */
10998
- const own = {}.hasOwnProperty;
11064
+ const own$4 = {}.hasOwnProperty;
10999
11065
  /**
11000
11066
  * Turn markdown into a syntax tree.
11001
11067
  *
@@ -11034,6 +11100,8 @@ window.__ModuleLoader__.load({
11034
11100
  function compiler(options) {
11035
11101
  /** @type {Config} */
11036
11102
  const config = {
11103
+ afterExit: [],
11104
+ beforeEnter: [],
11037
11105
  transforms: [],
11038
11106
  canContainEols: [
11039
11107
  "emphasis",
@@ -11153,7 +11221,8 @@ window.__ModuleLoader__.load({
11153
11221
  /** @type {Root} */
11154
11222
  let tree = {
11155
11223
  type: "root",
11156
- children: []
11224
+ children: [],
11225
+ position: void 0
11157
11226
  };
11158
11227
  /** @type {Omit<CompileContext, 'sliceSerialize'>} */
11159
11228
  const context = {
@@ -11168,15 +11237,32 @@ window.__ModuleLoader__.load({
11168
11237
  };
11169
11238
  /** @type {Array<number>} */
11170
11239
  const listStack = [];
11240
+ /** @type {Array<Event>} */
11241
+ const prepared = [];
11171
11242
  let index = -1;
11172
- while (++index < events.length) if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
11173
- if (events[index][0] === "enter") listStack.push(index);
11174
- else index = prepareList(events, listStack.pop(), index);
11243
+ while (++index < events.length) {
11244
+ prepared.push(events[index]);
11245
+ if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
11246
+ if (events[index][0] === "enter") listStack.push(prepared.length - 1);
11247
+ else prepareList(prepared, listStack.pop());
11248
+ }
11175
11249
  }
11250
+ events = prepared;
11176
11251
  index = -1;
11177
11252
  while (++index < events.length) {
11178
11253
  const handler = config[events[index][0]];
11179
- if (own.call(handler, events[index][1].type)) handler[events[index][1].type].call(Object.assign({ sliceSerialize: events[index][2].sliceSerialize }, context), events[index][1]);
11254
+ if (events[index][0] === "enter" && config.beforeEnter.length > 0) callListeners(config.beforeEnter, {
11255
+ ...context,
11256
+ sliceSerialize: events[index][2].sliceSerialize
11257
+ }, events[index][1]);
11258
+ if (own$4.call(handler, events[index][1].type)) handler[events[index][1].type].call({
11259
+ ...context,
11260
+ sliceSerialize: events[index][2].sliceSerialize
11261
+ }, events[index][1]);
11262
+ if (events[index][0] === "exit" && config.afterExit.length > 0) callListeners(config.afterExit, {
11263
+ ...context,
11264
+ sliceSerialize: events[index][2].sliceSerialize
11265
+ }, events[index][1]);
11180
11266
  }
11181
11267
  if (context.tokenStack.length > 0) {
11182
11268
  const tail = context.tokenStack[context.tokenStack.length - 1];
@@ -11199,12 +11285,28 @@ window.__ModuleLoader__.load({
11199
11285
  return tree;
11200
11286
  }
11201
11287
  /**
11288
+ * @param {Array<Handle>} listeners
11289
+ * Listeners.
11290
+ * @param {CompileContext} context
11291
+ * Context.
11292
+ * @param {Token} token
11293
+ * Token.
11294
+ * @returns {undefined}
11295
+ * Nothing.
11296
+ */
11297
+ function callListeners(listeners, context, token) {
11298
+ let index = -1;
11299
+ while (++index < listeners.length) listeners[index].call(context, token);
11300
+ }
11301
+ /**
11202
11302
  * @param {Array<Event>} events
11303
+ * Events, ending with the list to prepare.
11203
11304
  * @param {number} start
11204
- * @param {number} length
11205
- * @returns {number}
11305
+ * Index of the list enter.
11306
+ * @returns {undefined}
11206
11307
  */
11207
- function prepareList(events, start, length) {
11308
+ function prepareList(events, start) {
11309
+ const end = events.length - 1;
11208
11310
  let index = start - 1;
11209
11311
  let containerBalance = -1;
11210
11312
  let listSpread = false;
@@ -11216,7 +11318,14 @@ window.__ModuleLoader__.load({
11216
11318
  let firstBlankLineIndex;
11217
11319
  /** @type {boolean | undefined} */
11218
11320
  let atMarker;
11219
- while (++index <= length) {
11321
+ /**
11322
+ * `listItem` events to insert before the event at `at`, in walk order.
11323
+ * Merged in after the walk, as inserting while walking would shift the
11324
+ * rest of the list once per item.
11325
+ * @type {Array<{at: number, event: Event}>}
11326
+ */
11327
+ const insertions = [];
11328
+ while (++index <= end) {
11220
11329
  const event = events[index];
11221
11330
  switch (event[1].type) {
11222
11331
  case "listUnordered":
@@ -11257,13 +11366,14 @@ window.__ModuleLoader__.load({
11257
11366
  }
11258
11367
  if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) listItem._spread = true;
11259
11368
  listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
11260
- events.splice(lineIndex || index, 0, [
11261
- "exit",
11262
- listItem,
11263
- event[2]
11264
- ]);
11265
- index++;
11266
- length++;
11369
+ insertions.push({
11370
+ at: lineIndex || index,
11371
+ event: [
11372
+ "exit",
11373
+ listItem,
11374
+ event[2]
11375
+ ]
11376
+ });
11267
11377
  }
11268
11378
  if (event[1].type === "listItemPrefix") {
11269
11379
  /** @type {Token} */
@@ -11274,20 +11384,27 @@ window.__ModuleLoader__.load({
11274
11384
  end: void 0
11275
11385
  };
11276
11386
  listItem = item;
11277
- events.splice(index, 0, [
11278
- "enter",
11279
- item,
11280
- event[2]
11281
- ]);
11282
- index++;
11283
- length++;
11387
+ insertions.push({
11388
+ at: index,
11389
+ event: [
11390
+ "enter",
11391
+ item,
11392
+ event[2]
11393
+ ]
11394
+ });
11284
11395
  firstBlankLineIndex = void 0;
11285
11396
  atMarker = true;
11286
11397
  }
11287
11398
  }
11288
11399
  }
11400
+ const listEvents = events.splice(start);
11401
+ let insertion = 0;
11402
+ index = -1;
11403
+ while (++index < listEvents.length) {
11404
+ while (insertion < insertions.length && insertions[insertion].at === start + index) events.push(insertions[insertion++].event);
11405
+ events.push(listEvents[index]);
11406
+ }
11289
11407
  events[start][1]._spread = listSpread;
11290
- return length;
11291
11408
  }
11292
11409
  /**
11293
11410
  * Create an opener handle.
@@ -11362,7 +11479,7 @@ window.__ModuleLoader__.load({
11362
11479
  start: token.start,
11363
11480
  end: token.end
11364
11481
  }) + "): it’s not open");
11365
- else if (open[0].type !== token.type) {
11482
+ if (open[0].type !== token.type) {
11366
11483
  if (onExitError) onExitError.call(this, token, open[0]);
11367
11484
  else (open[1] || defaultOnError).call(this, token, open[0]);
11368
11485
  }
@@ -11730,7 +11847,8 @@ window.__ModuleLoader__.load({
11730
11847
  function blockQuote() {
11731
11848
  return {
11732
11849
  type: "blockquote",
11733
- children: []
11850
+ children: [],
11851
+ position: void 0
11734
11852
  };
11735
11853
  }
11736
11854
  /** @returns {Code} */
@@ -11739,14 +11857,16 @@ window.__ModuleLoader__.load({
11739
11857
  type: "code",
11740
11858
  lang: null,
11741
11859
  meta: null,
11742
- value: ""
11860
+ value: "",
11861
+ position: void 0
11743
11862
  };
11744
11863
  }
11745
11864
  /** @returns {InlineCode} */
11746
11865
  function codeText() {
11747
11866
  return {
11748
11867
  type: "inlineCode",
11749
- value: ""
11868
+ value: "",
11869
+ position: void 0
11750
11870
  };
11751
11871
  }
11752
11872
  /** @returns {Definition} */
@@ -11756,14 +11876,16 @@ window.__ModuleLoader__.load({
11756
11876
  identifier: "",
11757
11877
  label: null,
11758
11878
  title: null,
11759
- url: ""
11879
+ url: "",
11880
+ position: void 0
11760
11881
  };
11761
11882
  }
11762
11883
  /** @returns {Emphasis} */
11763
11884
  function emphasis() {
11764
11885
  return {
11765
11886
  type: "emphasis",
11766
- children: []
11887
+ children: [],
11888
+ position: void 0
11767
11889
  };
11768
11890
  }
11769
11891
  /** @returns {Heading} */
@@ -11771,18 +11893,23 @@ window.__ModuleLoader__.load({
11771
11893
  return {
11772
11894
  type: "heading",
11773
11895
  depth: 0,
11774
- children: []
11896
+ children: [],
11897
+ position: void 0
11775
11898
  };
11776
11899
  }
11777
11900
  /** @returns {Break} */
11778
11901
  function hardBreak() {
11779
- return { type: "break" };
11902
+ return {
11903
+ type: "break",
11904
+ position: void 0
11905
+ };
11780
11906
  }
11781
11907
  /** @returns {Html} */
11782
11908
  function html() {
11783
11909
  return {
11784
11910
  type: "html",
11785
- value: ""
11911
+ value: "",
11912
+ position: void 0
11786
11913
  };
11787
11914
  }
11788
11915
  /** @returns {Image} */
@@ -11791,7 +11918,8 @@ window.__ModuleLoader__.load({
11791
11918
  type: "image",
11792
11919
  title: null,
11793
11920
  url: "",
11794
- alt: null
11921
+ alt: null,
11922
+ position: void 0
11795
11923
  };
11796
11924
  }
11797
11925
  /** @returns {Link} */
@@ -11800,7 +11928,8 @@ window.__ModuleLoader__.load({
11800
11928
  type: "link",
11801
11929
  title: null,
11802
11930
  url: "",
11803
- children: []
11931
+ children: [],
11932
+ position: void 0
11804
11933
  };
11805
11934
  }
11806
11935
  /**
@@ -11813,7 +11942,8 @@ window.__ModuleLoader__.load({
11813
11942
  ordered: token.type === "listOrdered",
11814
11943
  start: null,
11815
11944
  spread: token._spread,
11816
- children: []
11945
+ children: [],
11946
+ position: void 0
11817
11947
  };
11818
11948
  }
11819
11949
  /**
@@ -11825,33 +11955,40 @@ window.__ModuleLoader__.load({
11825
11955
  type: "listItem",
11826
11956
  spread: token._spread,
11827
11957
  checked: null,
11828
- children: []
11958
+ children: [],
11959
+ position: void 0
11829
11960
  };
11830
11961
  }
11831
11962
  /** @returns {Paragraph} */
11832
11963
  function paragraph() {
11833
11964
  return {
11834
11965
  type: "paragraph",
11835
- children: []
11966
+ children: [],
11967
+ position: void 0
11836
11968
  };
11837
11969
  }
11838
11970
  /** @returns {Strong} */
11839
11971
  function strong() {
11840
11972
  return {
11841
11973
  type: "strong",
11842
- children: []
11974
+ children: [],
11975
+ position: void 0
11843
11976
  };
11844
11977
  }
11845
11978
  /** @returns {Text} */
11846
11979
  function text() {
11847
11980
  return {
11848
11981
  type: "text",
11849
- value: ""
11982
+ value: "",
11983
+ position: void 0
11850
11984
  };
11851
11985
  }
11852
11986
  /** @returns {ThematicBreak} */
11853
11987
  function thematicBreak() {
11854
- return { type: "thematicBreak" };
11988
+ return {
11989
+ type: "thematicBreak",
11990
+ position: void 0
11991
+ };
11855
11992
  }
11856
11993
  }
11857
11994
  /**
@@ -11890,7 +12027,7 @@ window.__ModuleLoader__.load({
11890
12027
  function extension(combined, extension) {
11891
12028
  /** @type {keyof Extension} */
11892
12029
  let key;
11893
- for (key in extension) if (own.call(extension, key)) switch (key) {
12030
+ for (key in extension) if (own$4.call(extension, key)) switch (key) {
11894
12031
  case "canContainEols": {
11895
12032
  const right = extension[key];
11896
12033
  if (right) combined[key].push(...right);
@@ -11901,6 +12038,12 @@ window.__ModuleLoader__.load({
11901
12038
  if (right) combined[key].push(...right);
11902
12039
  break;
11903
12040
  }
12041
+ case "afterExit":
12042
+ case "beforeEnter": {
12043
+ const right = extension[key];
12044
+ if (right) combined[key].push(right);
12045
+ break;
12046
+ }
11904
12047
  case "enter":
11905
12048
  case "exit": {
11906
12049
  const right = extension[key];
@@ -11918,7 +12061,7 @@ window.__ModuleLoader__.load({
11918
12061
  start: right.start,
11919
12062
  end: right.end
11920
12063
  }) + ") is open");
11921
- else throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
12064
+ throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({
11922
12065
  start: right.start,
11923
12066
  end: right.end
11924
12067
  }) + ") is still open");
@@ -12067,13 +12210,13 @@ window.__ModuleLoader__.load({
12067
12210
  return value !== null && typeof value === "object" && "type" in value;
12068
12211
  }
12069
12212
  //#endregion
12070
- //#region ../../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
12213
+ //#region ../../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js
12071
12214
  /**
12072
12215
  * @param {string} d
12073
12216
  * @returns {string}
12074
12217
  */
12075
12218
  function color(d) {
12076
- return "\x1B[33m" + d + "\x1B[39m";
12219
+ return d;
12077
12220
  }
12078
12221
  //#endregion
12079
12222
  //#region ../../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
@@ -12397,7 +12540,7 @@ window.__ModuleLoader__.load({
12397
12540
  return value === null || value === void 0 ? empty : [value];
12398
12541
  }
12399
12542
  //#endregion
12400
- //#region ../../../node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
12543
+ //#region ../../../node_modules/.pnpm/mdast-util-find-and-replace@3.0.3/node_modules/mdast-util-find-and-replace/lib/index.js
12401
12544
  /**
12402
12545
  * @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'
12403
12546
  * @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'
@@ -12474,7 +12617,11 @@ window.__ModuleLoader__.load({
12474
12617
  const pairs = toPairs(list);
12475
12618
  let pairIndex = -1;
12476
12619
  while (++pairIndex < pairs.length) visitParents(tree, "text", visitor);
12477
- /** @type {BuildVisitor<Root, 'text'>} */
12620
+ /**
12621
+ * Visit a text node, and handle it if it is not in an ignored parent.
12622
+ *
12623
+ * @type {BuildVisitor<Root, 'text'>}
12624
+ */
12478
12625
  function visitor(node, parents) {
12479
12626
  let index = -1;
12480
12627
  /** @type {Parents | undefined} */
@@ -12492,11 +12639,11 @@ window.__ModuleLoader__.load({
12492
12639
  * Handle a text node which is not in an ignored parent.
12493
12640
  *
12494
12641
  * @param {Text} node
12495
- * Text node.
12642
+ * Text node to search in.
12496
12643
  * @param {Array<Parents>} parents
12497
- * Parents.
12644
+ * Ancestors of `node`.
12498
12645
  * @returns {VisitorResult}
12499
- * Result.
12646
+ * Where to continue visiting.
12500
12647
  */
12501
12648
  function handler(node, parents) {
12502
12649
  const parent = parents[parents.length - 1];
@@ -12524,12 +12671,12 @@ window.__ModuleLoader__.load({
12524
12671
  } : void 0;
12525
12672
  if (value === false) find.lastIndex = position + 1;
12526
12673
  else {
12527
- if (start !== position) nodes.push({
12674
+ if (start !== position) add({
12528
12675
  type: "text",
12529
12676
  value: node.value.slice(start, position)
12530
12677
  });
12531
- if (Array.isArray(value)) nodes.push(...value);
12532
- else if (value) nodes.push(value);
12678
+ if (Array.isArray(value)) for (const child of value) add(child);
12679
+ else if (value) add(value);
12533
12680
  start = position + match[0].length;
12534
12681
  change = true;
12535
12682
  }
@@ -12537,13 +12684,26 @@ window.__ModuleLoader__.load({
12537
12684
  match = find.exec(node.value);
12538
12685
  }
12539
12686
  if (change) {
12540
- if (start < node.value.length) nodes.push({
12687
+ if (start < node.value.length) add({
12541
12688
  type: "text",
12542
12689
  value: node.value.slice(start)
12543
12690
  });
12544
12691
  parent.children.splice(index, 1, ...nodes);
12545
12692
  } else nodes = [node];
12546
12693
  return index + nodes.length;
12694
+ /**
12695
+ * Add a node.
12696
+ *
12697
+ * @param {PhrasingContent} child
12698
+ * Node to add.
12699
+ * @returns {undefined}
12700
+ * Nothing.
12701
+ */
12702
+ function add(child) {
12703
+ const previous = nodes[nodes.length - 1];
12704
+ if (previous && previous.type === "text" && child.type === "text") previous.value += child.value;
12705
+ else nodes.push(child);
12706
+ }
12547
12707
  }
12548
12708
  }
12549
12709
  /**
@@ -12555,9 +12715,9 @@ window.__ModuleLoader__.load({
12555
12715
  * Clean pairs.
12556
12716
  */
12557
12717
  function toPairs(tupleOrList) {
12718
+ if (!Array.isArray(tupleOrList)) throw new TypeError("Expected find and replace tuple or list of tuples");
12558
12719
  /** @type {Pairs} */
12559
12720
  const result = [];
12560
- if (!Array.isArray(tupleOrList)) throw new TypeError("Expected find and replace tuple or list of tuples");
12561
12721
  /** @type {FindAndReplaceList} */
12562
12722
  const list = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];
12563
12723
  let index = -1;
@@ -12571,9 +12731,9 @@ window.__ModuleLoader__.load({
12571
12731
  * Turn a find into an expression.
12572
12732
  *
12573
12733
  * @param {Find} find
12574
- * Find.
12734
+ * Pattern to find.
12575
12735
  * @returns {RegExp}
12576
- * Expression.
12736
+ * Global expression.
12577
12737
  */
12578
12738
  function toExpression(find) {
12579
12739
  return typeof find === "string" ? new RegExp(escapeStringRegexp(find), "g") : find;
@@ -12582,9 +12742,9 @@ window.__ModuleLoader__.load({
12582
12742
  * Turn a replace into a function.
12583
12743
  *
12584
12744
  * @param {Replace} replace
12585
- * Replace.
12745
+ * Thing to replace with.
12586
12746
  * @returns {ReplaceFunction}
12587
- * Function.
12747
+ * Function that returns that thing.
12588
12748
  */
12589
12749
  function toFunction(replace) {
12590
12750
  return typeof replace === "function" ? replace : function() {
@@ -12987,6 +13147,864 @@ window.__ModuleLoader__.load({
12987
13147
  function peekDelete() {
12988
13148
  return "~";
12989
13149
  }
13150
+ convert([
13151
+ "break",
13152
+ "delete",
13153
+ "emphasis",
13154
+ "footnote",
13155
+ "footnoteReference",
13156
+ "image",
13157
+ "imageReference",
13158
+ "inlineCode",
13159
+ "inlineMath",
13160
+ "link",
13161
+ "linkReference",
13162
+ "mdxJsxTextElement",
13163
+ "mdxTextExpression",
13164
+ "strong",
13165
+ "text",
13166
+ "textDirective"
13167
+ ]);
13168
+ ({}).hasOwnProperty;
13169
+ ({}).hasOwnProperty;
13170
+ //#endregion
13171
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/util/check-quote.js
13172
+ /**
13173
+ * @import {Options, State} from 'mdast-util-to-markdown'
13174
+ */
13175
+ /**
13176
+ * Checks the preferred quote option.
13177
+ *
13178
+ * @param {State} state
13179
+ * Info passed around.
13180
+ * @returns {Exclude<Options['quote'], null | undefined>}
13181
+ * Preferred quote.
13182
+ */
13183
+ function checkQuote(state) {
13184
+ const marker = state.options.quote || "\"";
13185
+ if (marker !== "\"" && marker !== "'") throw new Error("Cannot serialize title with `" + marker + "` for `options.quote`, expected `\"`, or `'`");
13186
+ return marker;
13187
+ }
13188
+ //#endregion
13189
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js
13190
+ /**
13191
+ * @import {Options, State} from 'mdast-util-to-markdown'
13192
+ */
13193
+ /**
13194
+ * Checks the preferred emphasis option.
13195
+ *
13196
+ * @param {State} state
13197
+ * Info passed around.
13198
+ * @returns {Exclude<Options['emphasis'], null | undefined>}
13199
+ * Preferred emphasis marker.
13200
+ */
13201
+ function checkEmphasis(state) {
13202
+ const marker = state.options.emphasis || "*";
13203
+ if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize emphasis with `" + marker + "` for `options.emphasis`, expected `*`, or `_`");
13204
+ return marker;
13205
+ }
13206
+ //#endregion
13207
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
13208
+ /**
13209
+ * @import {AttentionInfo, Info, State} from 'mdast-util-to-markdown'
13210
+ * @import {Emphasis, Parents} from 'mdast'
13211
+ */
13212
+ emphasis.attention = attention$1;
13213
+ emphasis.peek = peek$1;
13214
+ /**
13215
+ * Serialize an emphasis node.
13216
+ *
13217
+ * Attention is properly handled by `containerPhrasing`.
13218
+ *
13219
+ * @param {Emphasis} node
13220
+ * Node to serialize.
13221
+ * @param {Parents | undefined} _
13222
+ * Parent node.
13223
+ * @param {State} state
13224
+ * Info passed around.
13225
+ * @param {Info} info
13226
+ * Info on surrounding context.
13227
+ * @returns {string}
13228
+ * Serialized markdown.
13229
+ */
13230
+ function emphasis(node, _, state, info) {
13231
+ const exit = state.enter("phrasing");
13232
+ const value = state.containerPhrasing({
13233
+ type: "root",
13234
+ children: [node]
13235
+ }, info);
13236
+ exit();
13237
+ return value;
13238
+ }
13239
+ /**
13240
+ * Serialize an emphasis node as attention.
13241
+ *
13242
+ * @param {Emphasis} _
13243
+ * Node to serialize.
13244
+ * @param {State} state
13245
+ * Info passed around.
13246
+ * @returns {AttentionInfo}
13247
+ * Info on how to serialize the node.
13248
+ */
13249
+ function attention$1(_, state) {
13250
+ return {
13251
+ construct: "emphasis",
13252
+ markers: checkEmphasis(state) === "*" ? ["*", "_"] : ["_", "*"],
13253
+ sizes: [1]
13254
+ };
13255
+ }
13256
+ /**
13257
+ * Peek at this node.
13258
+ *
13259
+ * @param {Emphasis} _
13260
+ * Node to serialize.
13261
+ * @param {Parents | undefined} _1
13262
+ * Parent node.
13263
+ * @param {State} state
13264
+ * Info passed around.
13265
+ * @returns {string}
13266
+ * Start of the serialized markdown.
13267
+ */
13268
+ function peek$1(_, _1, state) {
13269
+ return state.options.emphasis || "*";
13270
+ }
13271
+ //#endregion
13272
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/html.js
13273
+ /**
13274
+ * @import {Html} from 'mdast'
13275
+ */
13276
+ html.peek = htmlPeek;
13277
+ /**
13278
+ * Serialize an HTML node.
13279
+ *
13280
+ * @param {Html} node
13281
+ * Node to serialize.
13282
+ * @returns {string}
13283
+ * Serialized markdown.
13284
+ */
13285
+ function html(node) {
13286
+ return node.value || "";
13287
+ }
13288
+ /**
13289
+ * Peek at this node.
13290
+ *
13291
+ * @returns {string}
13292
+ * Start of the serialized markdown.
13293
+ */
13294
+ function htmlPeek() {
13295
+ return "<";
13296
+ }
13297
+ //#endregion
13298
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/image.js
13299
+ /**
13300
+ * @import {Info, State} from 'mdast-util-to-markdown'
13301
+ * @import {Image, Parents} from 'mdast'
13302
+ */
13303
+ image.peek = imagePeek;
13304
+ /**
13305
+ * Serialize an image node.
13306
+ *
13307
+ * @param {Image} node
13308
+ * Node to serialize.
13309
+ * @param {Parents | undefined} _
13310
+ * Parent node.
13311
+ * @param {State} state
13312
+ * Info passed around.
13313
+ * @param {Info} info
13314
+ * Info on surrounding context.
13315
+ * @returns {string}
13316
+ * Serialized markdown.
13317
+ */
13318
+ function image(node, _, state, info) {
13319
+ const quote = checkQuote(state);
13320
+ const suffix = quote === "\"" ? "Quote" : "Apostrophe";
13321
+ const exit = state.enter("image");
13322
+ let subexit = state.enter("label");
13323
+ const tracker = state.createTracker(info);
13324
+ let value = tracker.move("![");
13325
+ value += tracker.move(state.safe(node.alt, {
13326
+ before: value,
13327
+ after: "]",
13328
+ ...tracker.current()
13329
+ }));
13330
+ value += tracker.move("](");
13331
+ subexit();
13332
+ if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
13333
+ subexit = state.enter("destinationLiteral");
13334
+ value += tracker.move("<");
13335
+ value += tracker.move(state.safe(node.url, {
13336
+ before: value,
13337
+ after: ">",
13338
+ ...tracker.current()
13339
+ }));
13340
+ value += tracker.move(">");
13341
+ } else {
13342
+ subexit = state.enter("destinationRaw");
13343
+ value += tracker.move(state.safe(node.url, {
13344
+ before: value,
13345
+ after: node.title ? " " : ")",
13346
+ ...tracker.current()
13347
+ }));
13348
+ }
13349
+ subexit();
13350
+ if (node.title) {
13351
+ subexit = state.enter(`title${suffix}`);
13352
+ value += tracker.move(" " + quote);
13353
+ value += tracker.move(state.safe(node.title, {
13354
+ before: value,
13355
+ after: quote,
13356
+ ...tracker.current()
13357
+ }));
13358
+ value += tracker.move(quote);
13359
+ subexit();
13360
+ }
13361
+ value += tracker.move(")");
13362
+ exit();
13363
+ return value;
13364
+ }
13365
+ /**
13366
+ * Peek at this node.
13367
+ *
13368
+ * @returns {string}
13369
+ * Start of the serialized markdown.
13370
+ */
13371
+ function imagePeek() {
13372
+ return "!";
13373
+ }
13374
+ //#endregion
13375
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js
13376
+ /**
13377
+ * @import {Info, State} from 'mdast-util-to-markdown'
13378
+ * @import {ImageReference, Parents} from 'mdast'
13379
+ */
13380
+ imageReference.peek = imageReferencePeek;
13381
+ /**
13382
+ * Serialize an image reference node.
13383
+ *
13384
+ * @param {ImageReference} node
13385
+ * Node to serialize.
13386
+ * @param {Parents | undefined} _
13387
+ * Parent node.
13388
+ * @param {State} state
13389
+ * Info passed around.
13390
+ * @param {Info} info
13391
+ * Info on surrounding context.
13392
+ * @returns {string}
13393
+ * Serialized markdown.
13394
+ */
13395
+ function imageReference(node, _, state, info) {
13396
+ const type = node.referenceType;
13397
+ const exit = state.enter("imageReference");
13398
+ let subexit = state.enter("label");
13399
+ const tracker = state.createTracker(info);
13400
+ let value = tracker.move("![");
13401
+ const alt = state.safe(node.alt, {
13402
+ before: value,
13403
+ after: "]",
13404
+ ...tracker.current()
13405
+ });
13406
+ value += tracker.move(alt + "][");
13407
+ subexit();
13408
+ const stack = state.stack;
13409
+ state.stack = stack.filter(function(d) {
13410
+ return d !== "phrasing";
13411
+ });
13412
+ subexit = state.enter("reference");
13413
+ const reference = state.safe(state.associationId(node), {
13414
+ before: value,
13415
+ after: "]",
13416
+ ...tracker.current()
13417
+ });
13418
+ subexit();
13419
+ state.stack = stack;
13420
+ exit();
13421
+ if (type === "full" || !alt || alt !== reference) value += tracker.move(reference + "]");
13422
+ else if (type === "shortcut") value = value.slice(0, -1);
13423
+ else value += tracker.move("]");
13424
+ return value;
13425
+ }
13426
+ /**
13427
+ * Peek at this node.
13428
+ *
13429
+ * @returns {string}
13430
+ * Start of the serialized markdown.
13431
+ */
13432
+ function imageReferencePeek() {
13433
+ return "!";
13434
+ }
13435
+ //#endregion
13436
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
13437
+ /**
13438
+ * @import {State} from 'mdast-util-to-markdown'
13439
+ * @import {InlineCode, Parents} from 'mdast'
13440
+ */
13441
+ inlineCode.peek = inlineCodePeek;
13442
+ /**
13443
+ * Serialize an inline code node.
13444
+ *
13445
+ * @param {InlineCode} node
13446
+ * Node to serialize.
13447
+ * @param {Parents | undefined} _
13448
+ * Parent node.
13449
+ * @param {State} state
13450
+ * Info passed around.
13451
+ * @returns {string}
13452
+ * Serialized markdown.
13453
+ */
13454
+ function inlineCode(node, _, state) {
13455
+ let value = node.value || "";
13456
+ let sequence = "`";
13457
+ let index = -1;
13458
+ while (new RegExp("(^|[^`])" + sequence + "([^`]|$)").test(value)) sequence += "`";
13459
+ if (/[^\n\r ]/.test(value) && (/^[\n\r ]/.test(value) && /[\n\r ]$/.test(value) || /^`|`$/.test(value))) value = " " + value + " ";
13460
+ while (++index < state.unsafe.length) {
13461
+ const pattern = state.unsafe[index];
13462
+ const expression = state.compilePattern(pattern);
13463
+ if (!pattern.atBreak) continue;
13464
+ /** @type {RegExpExecArray | null} */
13465
+ let match;
13466
+ while (match = expression.exec(value)) {
13467
+ let position = match.index;
13468
+ if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) position--;
13469
+ value = value.slice(0, position) + " " + value.slice(match.index + 1);
13470
+ }
13471
+ }
13472
+ return sequence + value + sequence;
13473
+ }
13474
+ /**
13475
+ * Peek at this node.
13476
+ *
13477
+ * @returns {string}
13478
+ * Start of the serialized markdown.
13479
+ */
13480
+ function inlineCodePeek() {
13481
+ return "`";
13482
+ }
13483
+ //#endregion
13484
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
13485
+ /**
13486
+ * @import {State} from 'mdast-util-to-markdown'
13487
+ * @import {Link} from 'mdast'
13488
+ */
13489
+ /**
13490
+ * Checks if a link can be formatted as an autolink.
13491
+ *
13492
+ * @param {Link} node
13493
+ * Node to check.
13494
+ * @param {State} state
13495
+ * Info passed around.
13496
+ * @returns {boolean}
13497
+ * Whether the link can be formatted as an autolink.
13498
+ */
13499
+ function formatLinkAsAutolink(node, state) {
13500
+ const raw = toString(node);
13501
+ return Boolean(!state.options.resourceLink && node.url && !node.title && node.children && node.children.length === 1 && node.children[0].type === "text" && (raw === node.url || "mailto:" + raw === node.url) && /^[a-z][+\-.a-z]+:/i.test(node.url) && !/[\0- <>\u007F]/.test(node.url));
13502
+ }
13503
+ //#endregion
13504
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/link.js
13505
+ /**
13506
+ * @import {Info, State} from 'mdast-util-to-markdown'
13507
+ * @import {Link, Parents} from 'mdast'
13508
+ * @import {Exit} from '../types.js'
13509
+ */
13510
+ link.peek = linkPeek;
13511
+ /**
13512
+ * Serialize a link node.
13513
+ *
13514
+ * @param {Link} node
13515
+ * Node to serialize.
13516
+ * @param {Parents | undefined} _
13517
+ * Parent node.
13518
+ * @param {State} state
13519
+ * Info passed around.
13520
+ * @param {Info} info
13521
+ * Info on surrounding context.
13522
+ * @returns {string}
13523
+ * Serialized markdown.
13524
+ */
13525
+ function link(node, _, state, info) {
13526
+ const quote = checkQuote(state);
13527
+ const suffix = quote === "\"" ? "Quote" : "Apostrophe";
13528
+ const tracker = state.createTracker(info);
13529
+ if (formatLinkAsAutolink(node, state)) {
13530
+ const stack = state.stack;
13531
+ state.stack = stack.filter(function(d) {
13532
+ return d !== "phrasing";
13533
+ });
13534
+ const exit = state.enter("autolink");
13535
+ let value = tracker.move("<");
13536
+ value += tracker.move(state.containerPhrasing(node, {
13537
+ before: value,
13538
+ after: ">",
13539
+ ...tracker.current()
13540
+ }));
13541
+ value += tracker.move(">");
13542
+ exit();
13543
+ state.stack = stack;
13544
+ return value;
13545
+ }
13546
+ const exit = state.enter("link");
13547
+ let subexit = state.enter("label");
13548
+ let value = tracker.move("[");
13549
+ value += tracker.move(state.containerPhrasing(node, {
13550
+ before: value,
13551
+ after: "](",
13552
+ ...tracker.current()
13553
+ }));
13554
+ value += tracker.move("](");
13555
+ subexit();
13556
+ if (!node.url && node.title || /[\0- \u007F]/.test(node.url)) {
13557
+ subexit = state.enter("destinationLiteral");
13558
+ value += tracker.move("<");
13559
+ value += tracker.move(state.safe(node.url, {
13560
+ before: value,
13561
+ after: ">",
13562
+ ...tracker.current()
13563
+ }));
13564
+ value += tracker.move(">");
13565
+ } else {
13566
+ subexit = state.enter("destinationRaw");
13567
+ value += tracker.move(state.safe(node.url, {
13568
+ before: value,
13569
+ after: node.title ? " " : ")",
13570
+ ...tracker.current()
13571
+ }));
13572
+ }
13573
+ subexit();
13574
+ if (node.title) {
13575
+ subexit = state.enter(`title${suffix}`);
13576
+ value += tracker.move(" " + quote);
13577
+ value += tracker.move(state.safe(node.title, {
13578
+ before: value,
13579
+ after: quote,
13580
+ ...tracker.current()
13581
+ }));
13582
+ value += tracker.move(quote);
13583
+ subexit();
13584
+ }
13585
+ value += tracker.move(")");
13586
+ exit();
13587
+ return value;
13588
+ }
13589
+ /**
13590
+ * Peek at this node.
13591
+ *
13592
+ * @param {Link} node
13593
+ * Node to peek at.
13594
+ * @param {Parents | undefined} _
13595
+ * Parent node.
13596
+ * @param {State} state
13597
+ * Info passed around.
13598
+ * @returns {string}
13599
+ * Start of the serialized markdown.
13600
+ */
13601
+ function linkPeek(node, _, state) {
13602
+ return formatLinkAsAutolink(node, state) ? "<" : "[";
13603
+ }
13604
+ //#endregion
13605
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js
13606
+ /**
13607
+ * @import {Info, State} from 'mdast-util-to-markdown'
13608
+ * @import {LinkReference, Parents} from 'mdast'
13609
+ */
13610
+ linkReference.peek = linkReferencePeek;
13611
+ /**
13612
+ * Serialize a link reference node.
13613
+ *
13614
+ * @param {LinkReference} node
13615
+ * Node to serialize.
13616
+ * @param {Parents | undefined} _
13617
+ * Parent node.
13618
+ * @param {State} state
13619
+ * Info passed around.
13620
+ * @param {Info} info
13621
+ * Info on surrounding context.
13622
+ * @returns {string}
13623
+ * Serialized markdown.
13624
+ */
13625
+ function linkReference(node, _, state, info) {
13626
+ const type = node.referenceType;
13627
+ const exit = state.enter("linkReference");
13628
+ let subexit = state.enter("label");
13629
+ const tracker = state.createTracker(info);
13630
+ let value = tracker.move("[");
13631
+ const text = state.containerPhrasing(node, {
13632
+ before: value,
13633
+ after: "]",
13634
+ ...tracker.current()
13635
+ });
13636
+ value += tracker.move(text + "][");
13637
+ subexit();
13638
+ const stack = state.stack;
13639
+ state.stack = stack.filter(function(d) {
13640
+ return d !== "phrasing";
13641
+ });
13642
+ subexit = state.enter("reference");
13643
+ const reference = state.safe(state.associationId(node), {
13644
+ before: value,
13645
+ after: "]",
13646
+ ...tracker.current()
13647
+ });
13648
+ subexit();
13649
+ state.stack = stack;
13650
+ exit();
13651
+ if (type === "full" || !text || text !== reference) value += tracker.move(reference + "]");
13652
+ else if (type === "shortcut") value = value.slice(0, -1);
13653
+ else value += tracker.move("]");
13654
+ return value;
13655
+ }
13656
+ /**
13657
+ * Peek at this node.
13658
+ *
13659
+ * @returns {string}
13660
+ * Start of the serialized markdown.
13661
+ */
13662
+ function linkReferencePeek() {
13663
+ return "[";
13664
+ }
13665
+ //#endregion
13666
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/util/check-strong.js
13667
+ /**
13668
+ * @import {Options, State} from 'mdast-util-to-markdown'
13669
+ */
13670
+ /**
13671
+ * Checks the preferred strong option.
13672
+ *
13673
+ * @param {State} state
13674
+ * Info passed around.
13675
+ * @returns {Exclude<Options['strong'], null | undefined>}
13676
+ * Preferred strong marker.
13677
+ */
13678
+ function checkStrong(state) {
13679
+ const marker = state.options.strong || "*";
13680
+ if (marker !== "*" && marker !== "_") throw new Error("Cannot serialize strong with `" + marker + "` for `options.strong`, expected `*`, or `_`");
13681
+ return marker;
13682
+ }
13683
+ //#endregion
13684
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/handle/strong.js
13685
+ /**
13686
+ * @import {AttentionInfo, Info, State} from 'mdast-util-to-markdown'
13687
+ * @import {Parents, Strong} from 'mdast'
13688
+ */
13689
+ strong.attention = attention;
13690
+ strong.peek = peek;
13691
+ /**
13692
+ * Serialize a strong node.
13693
+ *
13694
+ * Attention is properly handled by `containerPhrasing`.
13695
+ *
13696
+ * @param {Strong} node
13697
+ * Node to serialize.
13698
+ * @param {Parents | undefined} _
13699
+ * Parent node.
13700
+ * @param {State} state
13701
+ * Info passed around.
13702
+ * @param {Info} info
13703
+ * Info on surrounding context.
13704
+ * @returns {string}
13705
+ * Serialized markdown.
13706
+ */
13707
+ function strong(node, _, state, info) {
13708
+ const exit = state.enter("phrasing");
13709
+ const value = state.containerPhrasing({
13710
+ type: "root",
13711
+ children: [node]
13712
+ }, info);
13713
+ exit();
13714
+ return value;
13715
+ }
13716
+ /**
13717
+ * Serialize a strong node as attention.
13718
+ *
13719
+ * @param {Strong} _
13720
+ * Node to serialize.
13721
+ * @param {State} state
13722
+ * Info passed around.
13723
+ * @returns {AttentionInfo}
13724
+ * Info on how to serialize the node.
13725
+ */
13726
+ function attention(_, state) {
13727
+ return {
13728
+ construct: "strong",
13729
+ markers: checkStrong(state) === "*" ? ["*", "_"] : ["_", "*"],
13730
+ sizes: [2]
13731
+ };
13732
+ }
13733
+ /**
13734
+ * Peek at this node.
13735
+ *
13736
+ * @param {Strong} _
13737
+ * Node to serialize.
13738
+ * @param {Parents | undefined} _1
13739
+ * Parent node.
13740
+ * @param {State} state
13741
+ * Info passed around.
13742
+ * @returns {string}
13743
+ * Start of the serialized markdown.
13744
+ */
13745
+ function peek(_, _1, state) {
13746
+ return state.options.strong || "*";
13747
+ }
13748
+ //#endregion
13749
+ //#region ../../../node_modules/.pnpm/mdast-util-to-markdown@2.2.0/node_modules/mdast-util-to-markdown/lib/unsafe.js
13750
+ /**
13751
+ * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'
13752
+ */
13753
+ /**
13754
+ * List of constructs that occur in phrasing (paragraphs, headings), but cannot
13755
+ * contain things like attention (emphasis, strong), images, or links.
13756
+ * So they sort of cancel each other out.
13757
+ * Note: could use a better name.
13758
+ *
13759
+ * @type {Array<ConstructName>}
13760
+ */
13761
+ const fullPhrasingSpans = [
13762
+ "autolink",
13763
+ "destinationLiteral",
13764
+ "destinationRaw",
13765
+ "reference",
13766
+ "titleQuote",
13767
+ "titleApostrophe"
13768
+ ];
13769
+ /** @type {Array<Unsafe>} */
13770
+ const unsafe = [
13771
+ {
13772
+ character: " ",
13773
+ after: "[\\r\\n]",
13774
+ inConstruct: "phrasing"
13775
+ },
13776
+ {
13777
+ character: " ",
13778
+ before: "[\\r\\n]",
13779
+ inConstruct: "phrasing"
13780
+ },
13781
+ {
13782
+ character: " ",
13783
+ inConstruct: ["codeFencedLangGraveAccent", "codeFencedLangTilde"]
13784
+ },
13785
+ {
13786
+ character: "\r",
13787
+ inConstruct: [
13788
+ "codeFencedLangGraveAccent",
13789
+ "codeFencedLangTilde",
13790
+ "codeFencedMetaGraveAccent",
13791
+ "codeFencedMetaTilde",
13792
+ "destinationLiteral",
13793
+ "headingAtx"
13794
+ ]
13795
+ },
13796
+ {
13797
+ character: "\n",
13798
+ inConstruct: [
13799
+ "codeFencedLangGraveAccent",
13800
+ "codeFencedLangTilde",
13801
+ "codeFencedMetaGraveAccent",
13802
+ "codeFencedMetaTilde",
13803
+ "destinationLiteral",
13804
+ "headingAtx"
13805
+ ]
13806
+ },
13807
+ {
13808
+ character: "\r",
13809
+ before: "[\\r\\n]",
13810
+ inConstruct: "phrasing"
13811
+ },
13812
+ {
13813
+ character: "\r",
13814
+ after: "\\r",
13815
+ inConstruct: "phrasing"
13816
+ },
13817
+ {
13818
+ character: "\n",
13819
+ before: "\\n",
13820
+ inConstruct: "phrasing"
13821
+ },
13822
+ {
13823
+ character: "\n",
13824
+ after: "[\\r\\n]",
13825
+ inConstruct: "phrasing"
13826
+ },
13827
+ {
13828
+ character: " ",
13829
+ after: "[\\r\\n]",
13830
+ inConstruct: "phrasing"
13831
+ },
13832
+ {
13833
+ character: " ",
13834
+ before: "[\\r\\n]",
13835
+ inConstruct: "phrasing"
13836
+ },
13837
+ {
13838
+ character: " ",
13839
+ inConstruct: ["codeFencedLangGraveAccent", "codeFencedLangTilde"]
13840
+ },
13841
+ {
13842
+ character: "!",
13843
+ after: "\\[",
13844
+ inConstruct: "phrasing",
13845
+ notInConstruct: fullPhrasingSpans
13846
+ },
13847
+ {
13848
+ character: "\"",
13849
+ inConstruct: "titleQuote"
13850
+ },
13851
+ {
13852
+ atBreak: true,
13853
+ character: "#"
13854
+ },
13855
+ {
13856
+ character: "#",
13857
+ inConstruct: "headingAtx",
13858
+ after: "(?:[\r\n]|$)"
13859
+ },
13860
+ {
13861
+ character: "&",
13862
+ after: "[#A-Za-z]",
13863
+ inConstruct: "phrasing"
13864
+ },
13865
+ {
13866
+ character: "'",
13867
+ inConstruct: "titleApostrophe"
13868
+ },
13869
+ {
13870
+ character: "(",
13871
+ inConstruct: "destinationRaw"
13872
+ },
13873
+ {
13874
+ before: "\\]",
13875
+ character: "(",
13876
+ inConstruct: "phrasing",
13877
+ notInConstruct: fullPhrasingSpans
13878
+ },
13879
+ {
13880
+ atBreak: true,
13881
+ before: "\\d+",
13882
+ character: ")"
13883
+ },
13884
+ {
13885
+ character: ")",
13886
+ inConstruct: "destinationRaw"
13887
+ },
13888
+ {
13889
+ atBreak: true,
13890
+ character: "*",
13891
+ after: "(?:[ \r\n*])"
13892
+ },
13893
+ {
13894
+ character: "*",
13895
+ inConstruct: "phrasing",
13896
+ notInConstruct: fullPhrasingSpans
13897
+ },
13898
+ {
13899
+ atBreak: true,
13900
+ character: "+",
13901
+ after: "(?:[ \r\n])"
13902
+ },
13903
+ {
13904
+ atBreak: true,
13905
+ character: "-",
13906
+ after: "(?:[ \r\n-])"
13907
+ },
13908
+ {
13909
+ atBreak: true,
13910
+ before: "\\d+",
13911
+ character: ".",
13912
+ after: "(?:[ \r\n]|$)"
13913
+ },
13914
+ {
13915
+ atBreak: true,
13916
+ character: "<",
13917
+ after: "[!/?A-Za-z]"
13918
+ },
13919
+ {
13920
+ character: "<",
13921
+ after: "[!/?A-Za-z]",
13922
+ inConstruct: "phrasing",
13923
+ notInConstruct: fullPhrasingSpans
13924
+ },
13925
+ {
13926
+ character: "<",
13927
+ inConstruct: "destinationLiteral"
13928
+ },
13929
+ {
13930
+ atBreak: true,
13931
+ character: "="
13932
+ },
13933
+ {
13934
+ atBreak: true,
13935
+ character: ">"
13936
+ },
13937
+ {
13938
+ character: ">",
13939
+ inConstruct: "destinationLiteral"
13940
+ },
13941
+ {
13942
+ atBreak: true,
13943
+ character: "["
13944
+ },
13945
+ {
13946
+ character: "[",
13947
+ inConstruct: "phrasing",
13948
+ notInConstruct: fullPhrasingSpans
13949
+ },
13950
+ {
13951
+ character: "[",
13952
+ inConstruct: ["label", "reference"]
13953
+ },
13954
+ {
13955
+ character: "\\",
13956
+ after: "[\\r\\n]",
13957
+ inConstruct: "phrasing"
13958
+ },
13959
+ {
13960
+ character: "]",
13961
+ inConstruct: ["label", "reference"]
13962
+ },
13963
+ {
13964
+ atBreak: true,
13965
+ character: "_"
13966
+ },
13967
+ {
13968
+ character: "_",
13969
+ inConstruct: "phrasing",
13970
+ notInConstruct: fullPhrasingSpans
13971
+ },
13972
+ {
13973
+ atBreak: true,
13974
+ character: "`"
13975
+ },
13976
+ {
13977
+ character: "`",
13978
+ inConstruct: ["codeFencedLangGraveAccent", "codeFencedMetaGraveAccent"]
13979
+ },
13980
+ {
13981
+ character: "`",
13982
+ inConstruct: "phrasing",
13983
+ notInConstruct: fullPhrasingSpans
13984
+ },
13985
+ {
13986
+ atBreak: true,
13987
+ character: "~"
13988
+ },
13989
+ {
13990
+ character: "<",
13991
+ inConstruct: "autolink"
13992
+ },
13993
+ {
13994
+ character: ">",
13995
+ inConstruct: "autolink"
13996
+ },
13997
+ {
13998
+ character: "",
13999
+ inConstruct: "autolink"
14000
+ }
14001
+ ];
14002
+ let code$1 = -1;
14003
+ while (++code$1 < 33) unsafe.push({
14004
+ character: String.fromCharCode(code$1),
14005
+ inConstruct: "autolink"
14006
+ });
14007
+ ({}).hasOwnProperty;
12990
14008
  //#endregion
12991
14009
  //#region ../../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@9.4.0/node_modules/mdast-util-gfm-table/lib/index.js
12992
14010
  /**
@@ -14325,6 +15343,7 @@ window.__ModuleLoader__.load({
14325
15343
  return tail && tail[1].type === "gfmFootnoteDefinitionIndent" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code);
14326
15344
  }
14327
15345
  }
15346
+ ({}).hasOwnProperty;
14328
15347
  //#endregion
14329
15348
  //#region ../../../node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
14330
15349
  /**
@@ -15332,6 +16351,7 @@ window.__ModuleLoader__.load({
15332
16351
  const side = event[0] === "enter" ? "start" : "end";
15333
16352
  return event[1][side];
15334
16353
  }
16354
+ new RegExp("^" + /<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi.source, "i");
15335
16355
  //#endregion
15336
16356
  //#region ../../../node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
15337
16357
  /**
@@ -15755,7 +16775,7 @@ window.__ModuleLoader__.load({
15755
16775
  chunkString: "chunkString"
15756
16776
  };
15757
16777
  //#endregion
15758
- //#region ../../client/ui-primitives/src/reference.ts
16778
+ //#region ../../client/dsh-client-ui-primitives/src/reference.ts
15759
16779
  const DEFAULT_PROTOCOL = "file";
15760
16780
  const EXTERNAL_PROTOCOLS = [
15761
16781
  "http",
@@ -16196,7 +17216,7 @@ window.__ModuleLoader__.load({
16196
17216
  }
16197
17217
  }
16198
17218
  //#endregion
16199
- //#region ../../client/ui-primitives/src/reference-markdown.tsx
17219
+ //#region ../../client/dsh-client-ui-primitives/src/reference-markdown.tsx
16200
17220
  function referenceMentions(actions, tokens) {
16201
17221
  return { resolve: (value) => {
16202
17222
  const reference = tokens?.get(value) ?? parseReferenceToken(value);
@@ -16255,7 +17275,7 @@ window.__ModuleLoader__.load({
16255
17275
  if (reference.protocol === "file") actions.openFile(path);
16256
17276
  }
16257
17277
  //#endregion
16258
- //#region ../../client/ui-primitives/src/client/index.ts
17278
+ //#region ../../client/dsh-client-ui-primitives/src/client/index.ts
16259
17279
  var client_exports = /* @__PURE__ */ __exportAll({
16260
17280
  Bubble: () => Bubble,
16261
17281
  Button: () => Button$1,
@@ -16268,13 +17288,11 @@ window.__ModuleLoader__.load({
16268
17288
  SCHEMA_FORM_NS: () => NS$1,
16269
17289
  SchemaFormController: () => SchemaFormController,
16270
17290
  SchemaFormHints: () => SchemaFormHints,
16271
- SearchInput: () => SearchInput,
16272
17291
  SearchSelect: () => SearchSelect,
16273
17292
  SeatButton: () => SeatButton,
16274
17293
  SettingsFieldRow: () => SettingsFieldRow,
16275
17294
  Spinner: () => Spinner,
16276
17295
  Stack: () => Stack,
16277
- Tabs: () => Tabs,
16278
17296
  TagInput: () => TagInput,
16279
17297
  Text: () => Text,
16280
17298
  TimeLabel: () => TimeLabel,
@@ -16303,131 +17321,36 @@ window.__ModuleLoader__.load({
16303
17321
  apply$2(ctx);
16304
17322
  }
16305
17323
  //#endregion
16306
- //#region src/client/controller.ts
16307
- const SESSION_DELETE_PATH = "/api/morlay/v1/session/delete";
16308
- const SESSION_IMPORT_PATH = "/api/morlay/v1/session/import";
16309
- const SESSION_EXPORT_PATH = "/api/morlay/v1/session/export";
16310
- const SESSION_GC_PATH = "/api/morlay/v1/session/gc";
16311
- const SESSION_USAGE_PATH = "/api/morlay/v1/session/usage";
16312
- const SESSION_ROWS_PATH = "/api/morlay/v1/session/rows";
16313
- var ConversationManagerRequestError = class extends Error {
16314
- code;
16315
- constructor(message, code) {
16316
- super(message);
16317
- this.code = code;
16318
- this.name = "ConversationManagerRequestError";
16319
- }
16320
- };
16321
- async function postJson(path, body) {
16322
- const response = await fetch(path, {
16323
- method: "POST",
16324
- headers: {
16325
- accept: "application/json",
16326
- "content-type": "application/json"
16327
- },
16328
- body: JSON.stringify(body)
16329
- });
16330
- const value = await response.json().catch(() => ({}));
16331
- if (!response.ok) throw new ConversationManagerRequestError(typeof value.error === "string" ? value.error : `请求失败:HTTP ${response.status}`, typeof value.code === "string" ? value.code : void 0);
16332
- return value;
16333
- }
16334
- async function zipBase64(file) {
16335
- const dataUrl = await new Promise((resolve, reject) => {
16336
- const reader = new FileReader();
16337
- reader.onload = () => {
16338
- resolve(typeof reader.result === "string" ? reader.result : "");
16339
- };
16340
- reader.onerror = () => {
16341
- reject(reader.error ?? /* @__PURE__ */ new Error("failed to read the selected file"));
16342
- };
16343
- reader.readAsDataURL(file);
16344
- });
16345
- const comma = dataUrl.indexOf(",");
16346
- return comma < 0 ? dataUrl : dataUrl.slice(comma + 1);
17324
+ //#region \0dsh-css-modules:/Users/morlay/src/github.com/morlay/dsh-plugin/packages/session/ui-conversation-manager/src/client/ConversationManagerPage.module.css.mjs
17325
+ const css = ".AmU5Dq_page{width:100%;min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base);font-size:14px;line-height:1.6;display:flex;overflow:hidden}.AmU5Dq_listPane{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.AmU5Dq_pageScroll{scrollbar-gutter:stable;flex:1;min-height:0;overflow:auto}.AmU5Dq_pageContent{max-width:960px;margin:0 auto;padding:0 clamp(24px,4vw,48px) 48px}.AmU5Dq_pageHeading{justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;padding-top:28px;display:flex}[data-platform=darwin] .AmU5Dq_pageHeading{padding-top:calc(28px + var(--dsh-frame-top-clearance,0px))}.AmU5Dq_pageHeading h1{flex:1;min-width:0;margin:0;font-size:20px;font-weight:500;line-height:28px}.AmU5Dq_headingActions{flex:none;align-items:center;gap:8px;display:flex}.AmU5Dq_filters{flex-wrap:wrap;align-items:center;gap:8px 20px;margin-bottom:14px;display:flex}.AmU5Dq_filterTabs{flex-wrap:wrap;align-items:center;gap:8px 12px;display:flex}.AmU5Dq_filterTab{height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:14px;flex:none;align-items:center;padding:0 10px;font-size:14px;line-height:22px;display:inline-flex}.AmU5Dq_filterTab:hover{background:var(--dsw-alias-interactive-bg-hover)}.AmU5Dq_filterTabActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.AmU5Dq_searchField{border:.5px solid var(--dsw-alias-border-l3);height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;align-items:center;margin:0 0 16px;padding:0 10px;transition:border-color .15s;display:flex}.AmU5Dq_searchField:hover{border-color:var(--dsw-alias-border-l2)}.AmU5Dq_searchField:focus-within{border-color:var(--dsw-alias-state-business-primary)}.AmU5Dq_searchField>:first-child{background:0 0;border:0;border-radius:0;flex:1;min-width:0;height:100%;padding:0}.AmU5Dq_searchField>:first-child:focus-within{border-color:#0000}.AmU5Dq_searchField>:first-child svg{width:14px;height:14px}.AmU5Dq_searchField input::placeholder{color:var(--dsw-alias-label-caption)}.AmU5Dq_searchField input:focus-visible{outline:none}.AmU5Dq_searchField input::-webkit-search-cancel-button{display:none}.AmU5Dq_searchClear{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);flex:none;margin-right:-6px;padding:0}.AmU5Dq_searchClear svg{width:14px;height:14px}.AmU5Dq_list{flex-direction:column;gap:4px;min-width:0;display:flex}.AmU5Dq_status{text-align:center;flex:1;place-items:center;min-width:0;min-height:0;padding:24px;display:grid}.AmU5Dq_statusBody{flex-direction:column;align-items:center;gap:12px;display:flex}.AmU5Dq_statusText{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}.AmU5Dq_statusFailure{color:var(--dsw-alias-state-error-primary)}.AmU5Dq_listStatus{text-align:center;place-items:center;padding:32px 0;display:grid}";
17326
+ const tagId = "@morlay/ui-conversation-manager/ConversationManagerPage.module.css";
17327
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@morlay/ui-conversation-manager/ConversationManagerPage.module.css\"]") === null) {
17328
+ const tag = document.createElement("style");
17329
+ tag.dataset.plugin = "@morlay/ui-conversation-manager";
17330
+ tag.dataset.pluginCss = tagId;
17331
+ tag.textContent = css;
17332
+ document.head.appendChild(tag);
16347
17333
  }
16348
- var ConversationManagerController = class {
16349
- ports;
16350
- face;
16351
- constructor(ports) {
16352
- this.ports = ports;
16353
- this.face = {
16354
- listRows: (query) => this.loadRows(query),
16355
- archive: (sessionId) => this.ports.archiveSession(sessionId),
16356
- unarchive: (sessionId) => this.ports.unarchiveSession(sessionId),
16357
- remove: (sessionId) => this.remove(sessionId),
16358
- exportZip: (sessionId) => this.exportZip(sessionId),
16359
- importZip: (file) => this.importZip(file),
16360
- collectGarbage: () => this.collectGarbage(),
16361
- loadUsage: (range) => this.loadUsage(range)
16362
- };
16363
- }
16364
- async loadRows(query = {}) {
16365
- const value = await postJson(SESSION_ROWS_PATH, query);
16366
- const items = value["items"];
16367
- if (!Array.isArray(items) || typeof value["total"] !== "number") throw new ConversationManagerRequestError("会话列表响应不可用", void 0);
16368
- return {
16369
- items,
16370
- total: value["total"],
16371
- page: typeof value["page"] === "number" ? value["page"] : query.page ?? 1,
16372
- pageSize: typeof value["pageSize"] === "number" ? value["pageSize"] : query.pageSize ?? 20
16373
- };
16374
- }
16375
- async remove(sessionId) {
16376
- await postJson(SESSION_DELETE_PATH, { sessionId });
16377
- await this.ports.refresh();
16378
- }
16379
- async exportZip(sessionId) {
16380
- const response = await fetch(SESSION_EXPORT_PATH, {
16381
- method: "POST",
16382
- headers: {
16383
- accept: "application/zip",
16384
- "content-type": "application/json"
16385
- },
16386
- body: JSON.stringify({ sessionId })
16387
- });
16388
- if (!response.ok) {
16389
- const value = await response.json().catch(() => ({}));
16390
- throw new ConversationManagerRequestError(typeof value.error === "string" ? value.error : `请求失败:HTTP ${response.status}`, typeof value.code === "string" ? value.code : void 0);
16391
- }
16392
- downloadBlob(await response.blob(), filenameOf(response.headers.get("content-disposition"), String(sessionId)));
16393
- }
16394
- async importZip(file) {
16395
- const zip = await zipBase64(file);
16396
- const value = await postJson(SESSION_IMPORT_PATH, { zip });
16397
- await this.ports.refresh();
16398
- return value["sessionId"];
16399
- }
16400
- async collectGarbage() {
16401
- const value = await postJson(SESSION_GC_PATH, {});
16402
- await this.ports.refresh();
16403
- return {
16404
- orphanSessions: typeof value["orphanSessions"] === "number" ? value["orphanSessions"] : 0,
16405
- orphanEvents: typeof value["orphanEvents"] === "number" ? value["orphanEvents"] : 0,
16406
- stoppedAgents: typeof value["stoppedAgents"] === "number" ? value["stoppedAgents"] : 0
16407
- };
16408
- }
16409
- async loadUsage(range) {
16410
- const report = await postJson(SESSION_USAGE_PATH, { range });
16411
- if (report.totals === void 0 || !Array.isArray(report.buckets) || !Array.isArray(report.sessions)) throw new ConversationManagerRequestError("用量统计响应不可用", void 0);
16412
- return report;
16413
- }
17334
+ var ConversationManagerPage_module_css_default = {
17335
+ "pageScroll": "AmU5Dq_pageScroll",
17336
+ "status": "AmU5Dq_status",
17337
+ "searchField": "AmU5Dq_searchField",
17338
+ "statusBody": "AmU5Dq_statusBody",
17339
+ "statusFailure": "AmU5Dq_statusFailure",
17340
+ "listPane": "AmU5Dq_listPane",
17341
+ "filters": "AmU5Dq_filters",
17342
+ "page": "AmU5Dq_page",
17343
+ "filterTab": "AmU5Dq_filterTab",
17344
+ "pageHeading": "AmU5Dq_pageHeading",
17345
+ "headingActions": "AmU5Dq_headingActions",
17346
+ "listStatus": "AmU5Dq_listStatus",
17347
+ "pageContent": "AmU5Dq_pageContent",
17348
+ "filterTabs": "AmU5Dq_filterTabs",
17349
+ "searchClear": "AmU5Dq_searchClear",
17350
+ "filterTabActive": "AmU5Dq_filterTabActive",
17351
+ "statusText": "AmU5Dq_statusText",
17352
+ "list": "AmU5Dq_list"
16414
17353
  };
16415
- function filenameOf(disposition, sessionId) {
16416
- return (disposition === null ? null : /filename="([^"]+)"/u.exec(disposition))?.[1] ?? `${sessionId}.zip`;
16417
- }
16418
- function downloadBlob(blob, filename) {
16419
- const url = URL.createObjectURL(blob);
16420
- const anchor = document.createElement("a");
16421
- anchor.href = url;
16422
- anchor.download = filename;
16423
- anchor.rel = "noopener";
16424
- document.body.append(anchor);
16425
- anchor.click();
16426
- anchor.remove();
16427
- window.setTimeout(() => {
16428
- URL.revokeObjectURL(url);
16429
- }, 0);
16430
- }
16431
17354
  //#endregion
16432
17355
  //#region src/client/format.ts
16433
17356
  function trim(value) {
@@ -16463,6 +17386,37 @@ window.__ModuleLoader__.load({
16463
17386
  if (code === "SESSION_NOT_FOUND") return t("failure.missing");
16464
17387
  return t("failure.other", { reason: error instanceof Error ? error.message : String(error) });
16465
17388
  }
17389
+ function FilterChip({ active, label, tab, onSelect }) {
17390
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
17391
+ type: "button",
17392
+ className: active ? `${ConversationManagerPage_module_css_default.filterTab} ${ConversationManagerPage_module_css_default.filterTabActive}` : ConversationManagerPage_module_css_default.filterTab,
17393
+ "aria-pressed": active,
17394
+ ...tab === void 0 ? {} : { "data-tab": tab },
17395
+ onClick: onSelect,
17396
+ children: label
17397
+ });
17398
+ }
17399
+ function PageStatus({ t, status, text, spinner = false, failure = false }) {
17400
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
17401
+ className: ConversationManagerPage_module_css_default.page,
17402
+ "aria-label": t("title"),
17403
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17404
+ className: ConversationManagerPage_module_css_default.listPane,
17405
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17406
+ className: ConversationManagerPage_module_css_default.status,
17407
+ "data-status": status,
17408
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17409
+ className: ConversationManagerPage_module_css_default.statusBody,
17410
+ children: [spinner ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spinner, { label: t("loading") }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17411
+ className: failure ? `${ConversationManagerPage_module_css_default.statusText} ${ConversationManagerPage_module_css_default.statusFailure}` : ConversationManagerPage_module_css_default.statusText,
17412
+ ...failure ? { role: "alert" } : {},
17413
+ children: text
17414
+ })]
17415
+ })
17416
+ })
17417
+ })
17418
+ });
17419
+ }
16466
17420
  function ConversationManagerPage({ t, listRows, archive, unarchive, remove, exportZip, importZip, collectGarbage, loadUsage }) {
16467
17421
  const [rowsPage, setRowsPage] = (0, react.useState)(null);
16468
17422
  const [rowsFailure, setRowsFailure] = (0, react.useState)(null);
@@ -16567,11 +17521,16 @@ window.__ModuleLoader__.load({
16567
17521
  setView("usage");
16568
17522
  if (usage === null && !usageLoading) requestUsage(usageRange);
16569
17523
  };
16570
- if (rowsPage === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16571
- as: "p",
16572
- size: "md",
16573
- tone: "tertiary",
16574
- children: rowsFailure ?? t("loading")
17524
+ if (rowsPage === null) return rowsFailure === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageStatus, {
17525
+ t,
17526
+ status: "loading",
17527
+ text: t("loading"),
17528
+ spinner: true
17529
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageStatus, {
17530
+ t,
17531
+ status: "failure",
17532
+ text: rowsFailure,
17533
+ failure: true
16575
17534
  });
16576
17535
  const now = Date.now();
16577
17536
  const visible = rows;
@@ -16580,287 +17539,309 @@ window.__ModuleLoader__.load({
16580
17539
  const currentPage = Math.min(page, pageCount);
16581
17540
  const matched = rows;
16582
17541
  const confirmed = confirming;
16583
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
17542
+ if (total === 0 && settledQuery === "") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageStatus, {
17543
+ t,
17544
+ status: "empty",
17545
+ text: t("empty")
17546
+ });
17547
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
17548
+ className: ConversationManagerPage_module_css_default.page,
16584
17549
  "data-view": view,
16585
- fill: true,
16586
- pad: "page",
16587
- gap: 12,
17550
+ "aria-label": t("title"),
16588
17551
  children: [
16589
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16590
- gap: 12,
16591
- justify: "between",
16592
- fixed: true,
16593
- children: [
16594
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16595
- as: "h1",
16596
- size: "lg",
16597
- weight: "medium",
16598
- children: t("title")
16599
- }),
16600
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tabs, {
16601
- label: t("title"),
16602
- items: [{
16603
- value: "sessions",
16604
- label: t("view.sessions")
16605
- }, {
16606
- value: "usage",
16607
- label: t("view.usage")
16608
- }],
16609
- value: view,
16610
- onChange: (next) => {
16611
- if (next === "usage") openUsage();
16612
- else setView("sessions");
16613
- }
16614
- }),
16615
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16616
- gap: 8,
16617
- fixed: true,
16618
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16619
- variant: "outline",
16620
- size: "sm",
16621
- "data-action": "import",
16622
- disabled: importing,
16623
- "aria-busy": importing,
16624
- "aria-label": importing ? t("importing") : t("import"),
16625
- onClick: () => {
16626
- fileRef.current?.click();
16627
- },
16628
- children: importing ? t("importing") : t("import")
16629
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16630
- variant: "outline",
16631
- size: "sm",
16632
- "data-action": "gc",
16633
- disabled: gcPhase !== "idle",
16634
- "aria-label": t("gc.button"),
16635
- onClick: () => {
16636
- setFailure(null);
16637
- setNotice(null);
16638
- setGcPhase("confirm");
16639
- },
16640
- children: t("gc.button")
16641
- })]
16642
- }),
16643
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
16644
- ref: fileRef,
16645
- type: "file",
16646
- accept: ".zip,application/zip",
16647
- hidden: true,
16648
- onChange: (event) => {
16649
- const file = event.currentTarget.files?.[0];
16650
- event.currentTarget.value = "";
16651
- if (file === void 0) return;
16652
- setImporting(true);
16653
- setFailure(null);
16654
- setNotice(null);
16655
- importZip(file).then(() => {
16656
- setNotice(t("imported"));
16657
- }, (error) => {
16658
- setFailure(failureText(error, t));
16659
- }).finally(() => {
16660
- setImporting(false);
16661
- });
16662
- }
16663
- })
16664
- ]
16665
- }),
16666
- view === "usage" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Stack, {
16667
- "data-scroll": "page",
16668
- gap: 12,
16669
- scroll: true,
16670
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UsageView, {
16671
- report: usage,
16672
- loading: usageLoading,
16673
- error: usageError,
16674
- tab: usageTab,
16675
- onTab: setUsageTab,
16676
- range: usageRange,
16677
- onRange: requestUsage,
16678
- onlySubagents: usageOnlySubagents,
16679
- onOnlySubagents: setUsageOnlySubagents,
16680
- t
16681
- })
16682
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16683
- gap: 16,
16684
- fixed: true,
16685
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchInput, {
16686
- width: "search",
16687
- "data-filter": "search",
16688
- type: "search",
16689
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.IconSearchOutlineRegular, {}),
16690
- value: query,
16691
- placeholder: t("search"),
16692
- "aria-label": t("search"),
16693
- onChange: (event) => {
16694
- setQuery(event.currentTarget.value);
16695
- setPage(1);
16696
- }
16697
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
16698
- "data-filter": "subagents",
16699
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Checkbox, {
16700
- checked: showSubagents,
16701
- label: t("showSubagents"),
16702
- onChange: (next) => {
16703
- setShowSubagents(next);
16704
- setPage(1);
16705
- }
16706
- })
16707
- })]
16708
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
16709
- "data-scroll": "page",
16710
- gap: 12,
16711
- scroll: true,
16712
- children: [
16713
- notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16714
- "data-notice": "result",
16715
- as: "p",
16716
- size: "md",
16717
- tone: "tertiary",
16718
- children: notice
16719
- }),
16720
- failure === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16721
- "data-failure": "result",
16722
- role: "alert",
16723
- as: "p",
16724
- size: "md",
16725
- tone: "danger",
16726
- children: failure
16727
- }),
16728
- total === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16729
- "data-status": "empty",
16730
- as: "p",
16731
- size: "md",
16732
- tone: "tertiary",
16733
- children: t(settledQuery === "" ? "empty" : "emptySearch")
16734
- }) : null,
16735
- visible.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Stack, {
16736
- as: "ul",
16737
- gap: 4,
16738
- plain: true,
16739
- children: visible.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16740
- as: "li",
16741
- gap: 16,
16742
- justify: "between",
16743
- boxed: true,
16744
- pad: "row",
16745
- fixed: true,
16746
- "data-session-id": String(row.id),
16747
- "data-archived": row.archived ? "true" : "false",
16748
- "data-subagent": row.subagent ? "true" : "false",
16749
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
16750
- gap: 2,
16751
- grow: true,
16752
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16753
- gap: 8,
16754
- grow: true,
16755
- children: [
16756
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16757
- size: "md",
16758
- truncate: true,
16759
- children: row.title
16760
- }),
16761
- row.archived ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Tag, {
16762
- tone: "neutral",
16763
- children: t("archived")
16764
- }) : null,
16765
- row.subagent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Tag, {
16766
- tone: "quiet",
16767
- children: t("subagent")
16768
- }) : null
16769
- ]
16770
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16771
- size: "sm",
16772
- tone: "tertiary",
16773
- children: [row.workspace, timeLabel(row.updatedAt, now, t)].join(" · ")
16774
- })]
16775
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16776
- gap: 8,
16777
- fixed: true,
16778
- children: [
16779
- row.archived ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16780
- variant: "outline",
16781
- size: "sm",
16782
- "data-action": "unarchive",
16783
- "aria-label": t("unarchiveNamed", { title: row.title }),
16784
- onClick: () => {
16785
- run(unarchive(row.id));
16786
- },
16787
- children: t("unarchive")
16788
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16789
- variant: "outline",
16790
- size: "sm",
16791
- "data-action": "archive",
16792
- "aria-label": t("archiveNamed", { title: row.title }),
16793
- onClick: () => {
16794
- run(archive(row.id));
16795
- },
16796
- children: t("archive")
16797
- }),
16798
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17552
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17553
+ className: ConversationManagerPage_module_css_default.listPane,
17554
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17555
+ className: ConversationManagerPage_module_css_default.pageScroll,
17556
+ "data-scroll": "page",
17557
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17558
+ className: ConversationManagerPage_module_css_default.pageContent,
17559
+ children: [
17560
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17561
+ className: ConversationManagerPage_module_css_default.pageHeading,
17562
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", { children: t("title") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17563
+ className: ConversationManagerPage_module_css_default.headingActions,
17564
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16799
17565
  variant: "outline",
16800
17566
  size: "sm",
16801
- "data-action": "export",
16802
- "aria-label": t("exportNamed", { title: row.title }),
17567
+ "data-action": "import",
17568
+ disabled: importing,
17569
+ "aria-busy": importing,
17570
+ "aria-label": importing ? t("importing") : t("import"),
16803
17571
  onClick: () => {
16804
- run(exportZip(row.id));
17572
+ fileRef.current?.click();
16805
17573
  },
16806
- children: t("export")
16807
- }),
16808
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17574
+ children: importing ? t("importing") : t("import")
17575
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16809
17576
  variant: "outline",
16810
17577
  size: "sm",
16811
- disabled: !row.archived,
16812
- "data-action": "remove",
16813
- "aria-label": t("removeNamed", { title: row.title }),
17578
+ "data-action": "gc",
17579
+ disabled: gcPhase !== "idle",
17580
+ "aria-label": t("gc.button"),
16814
17581
  onClick: () => {
16815
17582
  setFailure(null);
16816
17583
  setNotice(null);
16817
- setConfirming(row);
17584
+ setGcPhase("confirm");
16818
17585
  },
16819
- children: t("remove")
16820
- })
16821
- ]
16822
- })]
16823
- }, row.id))
16824
- }) : null,
16825
- matched.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
16826
- "data-pagination": "",
16827
- "data-page-current": currentPage,
16828
- "data-page-total": pageCount,
16829
- gap: 8,
16830
- justify: "end",
16831
- fixed: true,
16832
- children: [
16833
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16834
- variant: "ghost",
16835
- size: "sm",
16836
- disabled: currentPage <= 1,
16837
- onClick: () => {
16838
- setPage(currentPage - 1);
16839
- },
16840
- children: t("page.previous")
17586
+ children: t("gc.button")
17587
+ })]
17588
+ })]
17589
+ }),
17590
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
17591
+ ref: fileRef,
17592
+ type: "file",
17593
+ accept: ".zip,application/zip",
17594
+ hidden: true,
17595
+ onChange: (event) => {
17596
+ const file = event.currentTarget.files?.[0];
17597
+ event.currentTarget.value = "";
17598
+ if (file === void 0) return;
17599
+ setImporting(true);
17600
+ setFailure(null);
17601
+ setNotice(null);
17602
+ importZip(file).then(() => {
17603
+ setNotice(t("imported"));
17604
+ }, (error) => {
17605
+ setFailure(failureText(error, t));
17606
+ }).finally(() => {
17607
+ setImporting(false);
17608
+ });
17609
+ }
16841
17610
  }),
16842
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
16843
- size: "sm",
16844
- tone: "tertiary",
16845
- tabular: true,
16846
- children: t("page.label", {
16847
- page: currentPage,
16848
- total: pageCount
17611
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17612
+ className: ConversationManagerPage_module_css_default.filters,
17613
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17614
+ className: ConversationManagerPage_module_css_default.filterTabs,
17615
+ role: "group",
17616
+ "aria-label": t("filter.view"),
17617
+ "data-filter": "view",
17618
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
17619
+ active: view === "sessions",
17620
+ label: t("view.sessions"),
17621
+ tab: "sessions",
17622
+ onSelect: () => {
17623
+ setView("sessions");
17624
+ }
17625
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
17626
+ active: view === "usage",
17627
+ label: t("view.usage"),
17628
+ tab: "usage",
17629
+ onSelect: openUsage
17630
+ })]
16849
17631
  })
16850
17632
  }),
16851
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
16852
- variant: "ghost",
16853
- size: "sm",
16854
- disabled: currentPage >= pageCount,
16855
- onClick: () => {
16856
- setPage(currentPage + 1);
16857
- },
16858
- children: t("page.next")
17633
+ view === "usage" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17634
+ className: ConversationManagerPage_module_css_default.filters,
17635
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17636
+ className: ConversationManagerPage_module_css_default.filterTabs,
17637
+ role: "group",
17638
+ "aria-label": t("filter.subagents"),
17639
+ "data-filter": "subagents",
17640
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
17641
+ active: showSubagents,
17642
+ label: t("showSubagents"),
17643
+ onSelect: () => {
17644
+ setShowSubagents(!showSubagents);
17645
+ setPage(1);
17646
+ }
17647
+ })
17648
+ })
17649
+ }),
17650
+ view === "usage" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17651
+ className: ConversationManagerPage_module_css_default.searchField,
17652
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Input, {
17653
+ "data-filter": "search",
17654
+ type: "search",
17655
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.IconSearchOutlineRegular, {}),
17656
+ value: query,
17657
+ placeholder: t("search"),
17658
+ "aria-label": t("search"),
17659
+ onChange: (event) => {
17660
+ setQuery(event.currentTarget.value);
17661
+ setPage(1);
17662
+ }
17663
+ }), query === "" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17664
+ variant: "ghost",
17665
+ size: "sm",
17666
+ className: ConversationManagerPage_module_css_default.searchClear,
17667
+ "aria-label": t("clearSearch"),
17668
+ onClick: () => {
17669
+ setQuery("");
17670
+ setPage(1);
17671
+ },
17672
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.IconCloseOutlineRegular, {})
17673
+ })]
17674
+ }),
17675
+ view === "usage" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UsageView, {
17676
+ report: usage,
17677
+ loading: usageLoading,
17678
+ error: usageError,
17679
+ tab: usageTab,
17680
+ onTab: setUsageTab,
17681
+ range: usageRange,
17682
+ onRange: requestUsage,
17683
+ onlySubagents: usageOnlySubagents,
17684
+ onOnlySubagents: setUsageOnlySubagents,
17685
+ t
17686
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
17687
+ className: ConversationManagerPage_module_css_default.list,
17688
+ children: [
17689
+ notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
17690
+ "data-notice": "result",
17691
+ as: "p",
17692
+ size: "md",
17693
+ tone: "tertiary",
17694
+ children: notice
17695
+ }),
17696
+ failure === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
17697
+ "data-failure": "result",
17698
+ role: "alert",
17699
+ as: "p",
17700
+ size: "md",
17701
+ tone: "danger",
17702
+ children: failure
17703
+ }),
17704
+ total === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17705
+ className: ConversationManagerPage_module_css_default.listStatus,
17706
+ "data-status": "empty-search",
17707
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
17708
+ className: ConversationManagerPage_module_css_default.statusText,
17709
+ children: t("emptySearch")
17710
+ })
17711
+ }) : null,
17712
+ visible.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Stack, {
17713
+ as: "ul",
17714
+ gap: 4,
17715
+ plain: true,
17716
+ children: visible.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
17717
+ as: "li",
17718
+ gap: 16,
17719
+ justify: "between",
17720
+ boxed: true,
17721
+ pad: "row",
17722
+ fixed: true,
17723
+ "data-session-id": String(row.id),
17724
+ "data-archived": row.archived ? "true" : "false",
17725
+ "data-subagent": row.subagent ? "true" : "false",
17726
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
17727
+ gap: 2,
17728
+ grow: true,
17729
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
17730
+ gap: 8,
17731
+ grow: true,
17732
+ children: [
17733
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
17734
+ size: "md",
17735
+ truncate: true,
17736
+ children: row.title
17737
+ }),
17738
+ row.archived ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Tag, {
17739
+ tone: "neutral",
17740
+ children: t("archived")
17741
+ }) : null,
17742
+ row.subagent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Tag, {
17743
+ tone: "quiet",
17744
+ children: t("subagent")
17745
+ }) : null
17746
+ ]
17747
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
17748
+ size: "sm",
17749
+ tone: "tertiary",
17750
+ children: [row.workspace, timeLabel(row.updatedAt, now, t)].join(" · ")
17751
+ })]
17752
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
17753
+ gap: 8,
17754
+ fixed: true,
17755
+ children: [
17756
+ row.archived ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17757
+ variant: "outline",
17758
+ size: "sm",
17759
+ "data-action": "unarchive",
17760
+ "aria-label": t("unarchiveNamed", { title: row.title }),
17761
+ onClick: () => {
17762
+ run(unarchive(row.id));
17763
+ },
17764
+ children: t("unarchive")
17765
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17766
+ variant: "outline",
17767
+ size: "sm",
17768
+ "data-action": "archive",
17769
+ "aria-label": t("archiveNamed", { title: row.title }),
17770
+ onClick: () => {
17771
+ run(archive(row.id));
17772
+ },
17773
+ children: t("archive")
17774
+ }),
17775
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17776
+ variant: "outline",
17777
+ size: "sm",
17778
+ "data-action": "export",
17779
+ "aria-label": t("exportNamed", { title: row.title }),
17780
+ onClick: () => {
17781
+ run(exportZip(row.id));
17782
+ },
17783
+ children: t("export")
17784
+ }),
17785
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17786
+ variant: "outline",
17787
+ size: "sm",
17788
+ disabled: !row.archived,
17789
+ "data-action": "remove",
17790
+ "aria-label": t("removeNamed", { title: row.title }),
17791
+ onClick: () => {
17792
+ setFailure(null);
17793
+ setNotice(null);
17794
+ setConfirming(row);
17795
+ },
17796
+ children: t("remove")
17797
+ })
17798
+ ]
17799
+ })]
17800
+ }, row.id))
17801
+ }) : null,
17802
+ matched.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
17803
+ "data-pagination": "",
17804
+ "data-page-current": currentPage,
17805
+ "data-page-total": pageCount,
17806
+ gap: 8,
17807
+ justify: "end",
17808
+ fixed: true,
17809
+ children: [
17810
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17811
+ variant: "ghost",
17812
+ size: "sm",
17813
+ disabled: currentPage <= 1,
17814
+ onClick: () => {
17815
+ setPage(currentPage - 1);
17816
+ },
17817
+ children: t("page.previous")
17818
+ }),
17819
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
17820
+ size: "sm",
17821
+ tone: "tertiary",
17822
+ tabular: true,
17823
+ children: t("page.label", {
17824
+ page: currentPage,
17825
+ total: pageCount
17826
+ })
17827
+ }),
17828
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
17829
+ variant: "ghost",
17830
+ size: "sm",
17831
+ disabled: currentPage >= pageCount,
17832
+ onClick: () => {
17833
+ setPage(currentPage + 1);
17834
+ },
17835
+ children: t("page.next")
17836
+ })
17837
+ ]
17838
+ }) : null
17839
+ ]
16859
17840
  })
16860
17841
  ]
16861
- }) : null
16862
- ]
16863
- })] }),
17842
+ })
17843
+ })
17844
+ }),
16864
17845
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Modal, {
16865
17846
  open: confirmed !== null,
16866
17847
  onClose: () => {
@@ -17147,37 +18128,45 @@ window.__ModuleLoader__.load({
17147
18128
  gap: 12,
17148
18129
  fixed: true,
17149
18130
  children: [
17150
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tabs, {
17151
- role: "radiogroup",
17152
- label: t("usage.range"),
17153
- items: USAGE_RANGES.map((option) => ({
17154
- value: option,
17155
- label: rangeLabel(option, t)
17156
- })),
17157
- value: range,
17158
- onChange: (next) => {
17159
- onRange(next);
17160
- }
18131
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
18132
+ className: ConversationManagerPage_module_css_default.filterTabs,
18133
+ role: "group",
18134
+ "aria-label": t("usage.range"),
18135
+ "data-filter": "usage-range",
18136
+ children: USAGE_RANGES.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
18137
+ active: option === range,
18138
+ label: rangeLabel(option, t),
18139
+ tab: option,
18140
+ onSelect: () => {
18141
+ onRange(option);
18142
+ }
18143
+ }, option))
17161
18144
  }),
17162
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tabs, {
17163
- label: t("usage.range"),
17164
- items: items.map((item) => ({
17165
- value: item,
17166
- label: labels[item]
17167
- })),
17168
- value: tab,
17169
- onChange: (next) => {
17170
- onTab(next);
17171
- }
18145
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
18146
+ className: ConversationManagerPage_module_css_default.filterTabs,
18147
+ role: "group",
18148
+ "aria-label": t("usage.dimension"),
18149
+ "data-filter": "usage-tabs",
18150
+ children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
18151
+ active: item === tab,
18152
+ label: labels[item],
18153
+ tab: item,
18154
+ onSelect: () => {
18155
+ onTab(item);
18156
+ }
18157
+ }, item))
17172
18158
  }),
17173
- tab === "sessions" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
18159
+ tab === "sessions" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
18160
+ className: ConversationManagerPage_module_css_default.filterTabs,
18161
+ role: "group",
18162
+ "aria-label": t("filter.subagents"),
17174
18163
  "data-filter": "usage-subagents",
17175
- gap: 16,
17176
- fixed: true,
17177
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(client_exports.Checkbox, {
17178
- checked: onlySubagents,
18164
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterChip, {
18165
+ active: onlySubagents,
17179
18166
  label: t("usage.onlySubagents"),
17180
- onChange: onOnlySubagents
18167
+ onSelect: () => {
18168
+ onOnlySubagents(!onlySubagents);
18169
+ }
17181
18170
  })
17182
18171
  }) : null,
17183
18172
  loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
@@ -17223,8 +18212,12 @@ window.__ModuleLoader__.load({
17223
18212
  archived: "已归档",
17224
18213
  subagent: "子代理",
17225
18214
  showSubagents: "显示子代理会话",
18215
+ clearSearch: "清空搜索",
18216
+ "filter.view": "视图",
18217
+ "filter.subagents": "会话筛选",
17226
18218
  "view.sessions": "会话",
17227
18219
  "view.usage": "统计",
18220
+ "usage.dimension": "用量维度",
17228
18221
  "usage.overview": "总览",
17229
18222
  "usage.all": "全部会话",
17230
18223
  "usage.range": "时间范围",
@@ -17298,8 +18291,12 @@ window.__ModuleLoader__.load({
17298
18291
  archived: "Archived",
17299
18292
  subagent: "Subagent",
17300
18293
  showSubagents: "Show subagent sessions",
18294
+ clearSearch: "Clear search",
18295
+ "filter.view": "View",
18296
+ "filter.subagents": "Session filter",
17301
18297
  "view.sessions": "Sessions",
17302
18298
  "view.usage": "Usage",
18299
+ "usage.dimension": "Usage dimension",
17303
18300
  "usage.overview": "Overview",
17304
18301
  "usage.all": "All sessions",
17305
18302
  "usage.range": "Time range",
@@ -17375,7 +18372,6 @@ window.__ModuleLoader__.load({
17375
18372
  "sessions"
17376
18373
  ];
17377
18374
  function apply(ctx) {
17378
- apply$1(ctx);
17379
18375
  ctx.effect(() => ctx.locale.register(NS, {
17380
18376
  zh,
17381
18377
  en