@deepseek-insight/dsi 0.5.22 → 0.5.24
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/README.md +1 -1
- package/build/client/_app/immutable/assets/{2.DRj7JwRK.css → 2.BpERqkk_.css} +1 -1
- package/build/client/_app/immutable/chunks/BFAx3hqQ.js +2 -0
- package/build/client/_app/immutable/chunks/BjB44r24.js +1 -0
- package/build/client/_app/immutable/chunks/{zBRTraNY.js → CT33sMmw.js} +1 -1
- package/build/client/_app/immutable/chunks/as89y6ti.js +1 -0
- package/build/client/_app/immutable/chunks/{Ch36fHI9.js → xNyHdy4Z.js} +1 -1
- package/build/client/_app/immutable/entry/{app.DLUi0EIr.js → app.BfVt8pR9.js} +2 -2
- package/build/client/_app/immutable/entry/start.BOYIplSn.js +1 -0
- package/build/client/_app/immutable/nodes/{0.DfmjWWCy.js → 0.BBoMIehN.js} +1 -1
- package/build/client/_app/immutable/nodes/{1.Cy_8L_sF.js → 1.BZ_iRXtk.js} +1 -1
- package/build/client/_app/immutable/nodes/2.BADJoHBB.js +171 -0
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{app-config.svelte.js-DX-xENzY.js → app-config.svelte.js-F-U5xz0r.js} +22 -3
- package/build/server/chunks/chunks/{db.js-DUiYPVrk.js → db.js-CSrMZzws.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-B2wnWJ5y.js → db2.js-B9P1MuEl.js} +8 -6
- package/build/server/chunks/chunks/{dsh-connection.js-DLLvHgxn.js → dsh-connection.js-DjwmUFoE.js} +2 -2
- package/build/server/chunks/chunks/{git-probe.js-CNhqEFLP.js → git-probe.js-BGOqAXVt.js} +2 -2
- package/build/server/chunks/chunks/{insight-config.js-BgiNeS6f.js → insight-config.js-CmCFt2Kp.js} +2 -2
- package/build/server/chunks/chunks/{internal.js-Du2x925l.js → internal.js-nJTGYhdX.js} +2 -2
- package/build/server/chunks/chunks/{state.js-BOUZ4Mdx.js → state.js-D0-EDcsi.js} +2 -2
- package/build/server/chunks/chunks/{watcher.js-DMNZ6PC_.js → watcher.js-CuX0WU5B.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-BFZR8uHn.js → _server.ts.js-BGuC49gg.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-BgqhjoUU.js → _server.ts.js-BVH1ToLe.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-CLVptu9i.js → _server.ts.js-a85F1GOf.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-D8M_XizI.js → _server.ts.js-CBq4bRig.js} +17 -4
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-DS8L3_Bt.js → _server.ts.js-BpQX_N7Q.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-BUEokCIX.js → _server.ts.js-eYQQnSgq.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-lLG8ls0C.js → _server.ts.js-vOFZ1siq.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-BSenSXeg.js → _server.ts.js-D2tytVhM.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-DCXKkJ0v.js → _server.ts.js-BEn9Ta_U.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-BED7HhEP.js → _server.ts.js-ZfOtq-D3.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-Bg8nHHOZ.js → _server.ts.js-BmJbICbR.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-Dyo678sQ.js → _server.ts.js-gsaVQwiM.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-Bo1MLZzv.js → _server.ts.js-Dn0v3kPL.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-B5hEmzA3.js → _server.ts.js-3y0ufVj_.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-B0YMraSe.js → _server.ts.js-CLe_Yd9T.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-B7E_ugh9.js → _server.ts.js-Reg3sATn.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/path/{_server.ts.js-CpSm33QW.js → _server.ts.js-Der7_1Gf.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-qX_48Xfk.js → _server.ts.js-B0F4vS5A.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-BmMx7VT-.js → _server.ts.js-DLlAJ59P.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-D9WGgQkP.js → _server.ts.js-cxdpHzTp.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-JNQ1THCO.js → _server.ts.js-Bdymup3B.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-CyYEK2YZ.js → _server.ts.js-13DIGKaK.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-9teKQw8I.js → _server.ts.js-ChqfgswA.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-D0EtJceT.js → _server.ts.js-CT8DKYFX.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file-bytes/{_server.ts.js-DVBe8VFL.js → _server.ts.js-DY-EoPi1.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-_ICn-AJI.js → _server.ts.js-D4tdFfjX.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-deEnJXis.js → _server.ts.js-BUcBfYnX.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-C99S7qPG.js → _server.ts.js-CunmEcMs.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-DIbV5U-C.js → _server.ts.js-CmGqWlUy.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-C9sx5xeq.js → _server.ts.js-DMyDOvrX.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-BQN2GfYg.js → _server.ts.js-BS2wQOe7.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-Ya8ewOIo.js → _server.ts.js-5-lf15sG.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-Dtq_vXJc.js → _server.ts.js-PDRzWcsI.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-DptPqI-s.js → _server.ts.js-COt-HtL0.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-B4C7kLHl.js → _server.ts.js-k7bgOO_c.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-Db9JKnPM.js → _server.ts.js-H1HUbRif.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-C8gzgR2I.js → _server.ts.js-D7nqciP7.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-BIlHfNA_.js → _server.ts.js-D0HYWO9M.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/workspace/write-gate/{_server.ts.js-DRza8q_m.js → _server.ts.js-Boi1Sn8U.js} +4 -4
- package/build/server/chunks/entries/pages/{_error.svelte.js-B6QZqJkc.js → _error.svelte.js-BTQyW5Df.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.server.ts.js-BOFnfJKx.js → _page.server.ts.js-DdzOMHcO.js} +2 -2
- package/build/server/chunks/entries/pages/{_page.svelte.js-GQS2SRws.js → _page.svelte.js-D63btYnK.js} +766 -126
- package/build/server/chunks/{handler-cx07G9-G.js → handler-DiaR2DmJ.js} +3 -3
- package/build/server/chunks/{index.js-Dfzyw-2i.js → index.js-trwV04zl.js} +2 -2
- package/build/server/chunks/{manifest.js-CFJqE5Kz.js → manifest.js-B2sb3fMn.js} +44 -44
- package/build/server/chunks/nodes/{0.js-CLm26i36.js → 0.js-CcvNYltc.js} +2 -2
- package/build/server/chunks/nodes/{1.js-cfJjJ8lx.js → 1.js-2FULYexO.js} +3 -3
- package/build/server/chunks/nodes/{2.js-BtKfdVVe.js → 2.js-CEsSSgY6.js} +7 -7
- package/package.json +1 -1
- package/template/.dsi/prompts.sqlite +0 -0
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/template/.dsi/settings.yaml +1 -1
- package/build/client/_app/immutable/chunks/D94Od7GQ.js +0 -2
- package/build/client/_app/immutable/chunks/DUawi_ZZ.js +0 -1
- package/build/client/_app/immutable/chunks/DXSIz1Bv.js +0 -1
- package/build/client/_app/immutable/entry/start.CWU06EOY.js +0 -1
- package/build/client/_app/immutable/nodes/2.hEv7awQ2.js +0 -171
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as onDestroy } from '../../chunks/internal.js-
|
|
1
|
+
import { c as onDestroy } from '../../chunks/internal.js-nJTGYhdX.js';
|
|
2
2
|
import { V as head, y as derived, X as bind_props, W as escape_html, Y as attr, Z as attr_style, _ as attr_class, x as setContext, $ as spread_props, a0 as attributes, a1 as clsx, a2 as ensure_array_like, a3 as element, J as getContext, a4 as stringify, a5 as html, F as run, a6 as props_id } from '../../chunks/server.js-11-pxAWV.js';
|
|
3
3
|
import { U as UI_LOCALES } from '../../chunks/config.js-BvW5LrfQ.js';
|
|
4
4
|
import { m as mergeEntries, c as collapseSystemPromptEntries, t as truncate } from '../../chunks/dsh-events.js-DEZgATm-.js';
|
|
5
5
|
import { p as parseA2aSignature, m as mintA2aId, b as buildDeliveredText } from '../../chunks/a2a-protocol.js-C77mVg2Q.js';
|
|
6
6
|
import { b as applyKnobEvent, E as EMPTY_KNOBS, r as resolvePermission, l as localPermission, c as presetLabel, d as presetDescription, C as CUSTOM_PRESET, F as FULL_ACCESS_PRESET } from '../../chunks/permission-state.js-B7UpAHBv.js';
|
|
7
7
|
import { D as DEFAULT_IMAGE_LIMITS } from '../../chunks/image-limits.js-CUdJ0f7r.js';
|
|
8
|
-
import { a as appConfig, t as
|
|
8
|
+
import { a as appConfig, t as triggerMode, g as getTrigger, p as previewSegments, i as isValidTagWord, b as textPreviewOf, s as searchKey, c as shouldRecordPrompt, d as parseTagWords } from '../../chunks/app-config.svelte.js-F-U5xz0r.js';
|
|
9
9
|
import { c as getLocale } from '../../chunks/runtime.js-CCJi3XaY.js';
|
|
10
|
-
import { p as page, a as afterNavigate, t, r as replaceState, c as currentLocale } from '../../chunks/state.js-
|
|
10
|
+
import { p as page, a as afterNavigate, t, r as replaceState, c as currentLocale } from '../../chunks/state.js-D0-EDcsi.js';
|
|
11
11
|
import 'yaml';
|
|
12
12
|
import 'html-to-image';
|
|
13
13
|
import hljs from 'highlight.js/lib/core';
|
|
@@ -87,6 +87,38 @@ var accessmodecurrent2 = ((inputs, options = {}) => {
|
|
|
87
87
|
return en_accessmodecurrent2(inputs);
|
|
88
88
|
});
|
|
89
89
|
//#endregion
|
|
90
|
+
//#region src/lib/paraglide/messages/addprompt1.js
|
|
91
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
92
|
+
/** @typedef {{}} Addprompt1Inputs */
|
|
93
|
+
var en_addprompt1 = () => {
|
|
94
|
+
return `Add prompt`;
|
|
95
|
+
};
|
|
96
|
+
var zh_addprompt1 = () => {
|
|
97
|
+
return `添加提示`;
|
|
98
|
+
};
|
|
99
|
+
var id_addprompt1 = () => {
|
|
100
|
+
return `Tambah prompt`;
|
|
101
|
+
};
|
|
102
|
+
var es_addprompt1 = () => {
|
|
103
|
+
return `Añadir prompt`;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* | output |
|
|
107
|
+
* | --- |
|
|
108
|
+
* | "Add prompt" |
|
|
109
|
+
*
|
|
110
|
+
* @param {Addprompt1Inputs} inputs
|
|
111
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
112
|
+
* @returns {LocalizedString}
|
|
113
|
+
*/
|
|
114
|
+
var addprompt1 = ((inputs = {}, options = {}) => {
|
|
115
|
+
const locale = options.locale ?? getLocale();
|
|
116
|
+
if (locale === "zh") return zh_addprompt1();
|
|
117
|
+
if (locale === "id") return id_addprompt1();
|
|
118
|
+
if (locale === "es") return es_addprompt1();
|
|
119
|
+
return en_addprompt1();
|
|
120
|
+
});
|
|
121
|
+
//#endregion
|
|
90
122
|
//#region src/lib/paraglide/messages/allowonce1.js
|
|
91
123
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
92
124
|
/** @typedef {{}} Allowonce1Inputs */
|
|
@@ -407,6 +439,38 @@ var clearbtn1 = ((inputs = {}, options = {}) => {
|
|
|
407
439
|
return en_clearbtn1();
|
|
408
440
|
});
|
|
409
441
|
//#endregion
|
|
442
|
+
//#region src/lib/paraglide/messages/clearsearch1.js
|
|
443
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
444
|
+
/** @typedef {{}} Clearsearch1Inputs */
|
|
445
|
+
var en_clearsearch1 = () => {
|
|
446
|
+
return `Clear search`;
|
|
447
|
+
};
|
|
448
|
+
var zh_clearsearch1 = () => {
|
|
449
|
+
return `清除搜索`;
|
|
450
|
+
};
|
|
451
|
+
var id_clearsearch1 = () => {
|
|
452
|
+
return `Hapus pencarian`;
|
|
453
|
+
};
|
|
454
|
+
var es_clearsearch1 = () => {
|
|
455
|
+
return `Limpiar búsqueda`;
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* | output |
|
|
459
|
+
* | --- |
|
|
460
|
+
* | "Clear search" |
|
|
461
|
+
*
|
|
462
|
+
* @param {Clearsearch1Inputs} inputs
|
|
463
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
464
|
+
* @returns {LocalizedString}
|
|
465
|
+
*/
|
|
466
|
+
var clearsearch1 = ((inputs = {}, options = {}) => {
|
|
467
|
+
const locale = options.locale ?? getLocale();
|
|
468
|
+
if (locale === "zh") return zh_clearsearch1();
|
|
469
|
+
if (locale === "id") return id_clearsearch1();
|
|
470
|
+
if (locale === "es") return es_clearsearch1();
|
|
471
|
+
return en_clearsearch1();
|
|
472
|
+
});
|
|
473
|
+
//#endregion
|
|
410
474
|
//#region src/lib/paraglide/messages/clearthegoal2.js
|
|
411
475
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
412
476
|
/** @typedef {{}} Clearthegoal2Inputs */
|
|
@@ -983,6 +1047,38 @@ var copypageimage2 = ((inputs = {}, options = {}) => {
|
|
|
983
1047
|
return en_copypageimage2();
|
|
984
1048
|
});
|
|
985
1049
|
//#endregion
|
|
1050
|
+
//#region src/lib/paraglide/messages/copypanelasimage3.js
|
|
1051
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
1052
|
+
/** @typedef {{}} Copypanelasimage3Inputs */
|
|
1053
|
+
var en_copypanelasimage3 = () => {
|
|
1054
|
+
return `Copy panel as image (Shift+Click to save)`;
|
|
1055
|
+
};
|
|
1056
|
+
var zh_copypanelasimage3 = () => {
|
|
1057
|
+
return `复制面板为图片(Shift+点击 可保存)`;
|
|
1058
|
+
};
|
|
1059
|
+
var id_copypanelasimage3 = () => {
|
|
1060
|
+
return `Salin panel sebagai gambar (Shift+Klik untuk menyimpan)`;
|
|
1061
|
+
};
|
|
1062
|
+
var es_copypanelasimage3 = () => {
|
|
1063
|
+
return `Copiar panel como imagen (Shift+Clic para guardar)`;
|
|
1064
|
+
};
|
|
1065
|
+
/**
|
|
1066
|
+
* | output |
|
|
1067
|
+
* | --- |
|
|
1068
|
+
* | "Copy panel as image (Shift+Click to save)" |
|
|
1069
|
+
*
|
|
1070
|
+
* @param {Copypanelasimage3Inputs} inputs
|
|
1071
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
1072
|
+
* @returns {LocalizedString}
|
|
1073
|
+
*/
|
|
1074
|
+
var copypanelasimage3 = ((inputs = {}, options = {}) => {
|
|
1075
|
+
const locale = options.locale ?? getLocale();
|
|
1076
|
+
if (locale === "zh") return zh_copypanelasimage3();
|
|
1077
|
+
if (locale === "id") return id_copypanelasimage3();
|
|
1078
|
+
if (locale === "es") return es_copypanelasimage3();
|
|
1079
|
+
return en_copypanelasimage3();
|
|
1080
|
+
});
|
|
1081
|
+
//#endregion
|
|
986
1082
|
//#region src/lib/paraglide/messages/copypanelcolumn2.js
|
|
987
1083
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
988
1084
|
/** @typedef {{}} Copypanelcolumn2Inputs */
|
|
@@ -1591,6 +1687,38 @@ var dismiss = ((inputs = {}, options = {}) => {
|
|
|
1591
1687
|
return en_dismiss();
|
|
1592
1688
|
});
|
|
1593
1689
|
//#endregion
|
|
1690
|
+
//#region src/lib/paraglide/messages/dismissalert1.js
|
|
1691
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
1692
|
+
/** @typedef {{}} Dismissalert1Inputs */
|
|
1693
|
+
var en_dismissalert1 = () => {
|
|
1694
|
+
return `Dismiss alert`;
|
|
1695
|
+
};
|
|
1696
|
+
var zh_dismissalert1 = () => {
|
|
1697
|
+
return `关闭提醒`;
|
|
1698
|
+
};
|
|
1699
|
+
var id_dismissalert1 = () => {
|
|
1700
|
+
return `Tutup peringatan`;
|
|
1701
|
+
};
|
|
1702
|
+
var es_dismissalert1 = () => {
|
|
1703
|
+
return `Descartar alerta`;
|
|
1704
|
+
};
|
|
1705
|
+
/**
|
|
1706
|
+
* | output |
|
|
1707
|
+
* | --- |
|
|
1708
|
+
* | "Dismiss alert" |
|
|
1709
|
+
*
|
|
1710
|
+
* @param {Dismissalert1Inputs} inputs
|
|
1711
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
1712
|
+
* @returns {LocalizedString}
|
|
1713
|
+
*/
|
|
1714
|
+
var dismissalert1 = ((inputs = {}, options = {}) => {
|
|
1715
|
+
const locale = options.locale ?? getLocale();
|
|
1716
|
+
if (locale === "zh") return zh_dismissalert1();
|
|
1717
|
+
if (locale === "id") return id_dismissalert1();
|
|
1718
|
+
if (locale === "es") return es_dismissalert1();
|
|
1719
|
+
return en_dismissalert1();
|
|
1720
|
+
});
|
|
1721
|
+
//#endregion
|
|
1594
1722
|
//#region src/lib/paraglide/messages/dismissrunsheet2.js
|
|
1595
1723
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
1596
1724
|
/** @typedef {{}} Dismissrunsheet2Inputs */
|
|
@@ -2743,6 +2871,38 @@ var label = ((inputs = {}, options = {}) => {
|
|
|
2743
2871
|
return en_label();
|
|
2744
2872
|
});
|
|
2745
2873
|
//#endregion
|
|
2874
|
+
//#region src/lib/paraglide/messages/labeloptional1.js
|
|
2875
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
2876
|
+
/** @typedef {{}} Labeloptional1Inputs */
|
|
2877
|
+
var en_labeloptional1 = () => {
|
|
2878
|
+
return `Label (optional)`;
|
|
2879
|
+
};
|
|
2880
|
+
var zh_labeloptional1 = () => {
|
|
2881
|
+
return `标签(可选)`;
|
|
2882
|
+
};
|
|
2883
|
+
var id_labeloptional1 = () => {
|
|
2884
|
+
return `Label (opsional)`;
|
|
2885
|
+
};
|
|
2886
|
+
var es_labeloptional1 = () => {
|
|
2887
|
+
return `Etiqueta (opcional)`;
|
|
2888
|
+
};
|
|
2889
|
+
/**
|
|
2890
|
+
* | output |
|
|
2891
|
+
* | --- |
|
|
2892
|
+
* | "Label (optional)" |
|
|
2893
|
+
*
|
|
2894
|
+
* @param {Labeloptional1Inputs} inputs
|
|
2895
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
2896
|
+
* @returns {LocalizedString}
|
|
2897
|
+
*/
|
|
2898
|
+
var labeloptional1 = ((inputs = {}, options = {}) => {
|
|
2899
|
+
const locale = options.locale ?? getLocale();
|
|
2900
|
+
if (locale === "zh") return zh_labeloptional1();
|
|
2901
|
+
if (locale === "id") return id_labeloptional1();
|
|
2902
|
+
if (locale === "es") return es_labeloptional1();
|
|
2903
|
+
return en_labeloptional1();
|
|
2904
|
+
});
|
|
2905
|
+
//#endregion
|
|
2746
2906
|
//#region src/lib/paraglide/messages/labelslashtext2.js
|
|
2747
2907
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
2748
2908
|
/** @typedef {{}} Labelslashtext2Inputs */
|
|
@@ -2775,6 +2935,38 @@ var labelslashtext2 = ((inputs = {}, options = {}) => {
|
|
|
2775
2935
|
return en_labelslashtext2();
|
|
2776
2936
|
});
|
|
2777
2937
|
//#endregion
|
|
2938
|
+
//#region src/lib/paraglide/messages/labelslashtextmode3.js
|
|
2939
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
2940
|
+
/** @typedef {{}} Labelslashtextmode3Inputs */
|
|
2941
|
+
var en_labelslashtextmode3 = () => {
|
|
2942
|
+
return `Label/text mode`;
|
|
2943
|
+
};
|
|
2944
|
+
var zh_labelslashtextmode3 = () => {
|
|
2945
|
+
return `标签/文本模式`;
|
|
2946
|
+
};
|
|
2947
|
+
var id_labelslashtextmode3 = () => {
|
|
2948
|
+
return `Mode label/teks`;
|
|
2949
|
+
};
|
|
2950
|
+
var es_labelslashtextmode3 = () => {
|
|
2951
|
+
return `Modo etiqueta/texto`;
|
|
2952
|
+
};
|
|
2953
|
+
/**
|
|
2954
|
+
* | output |
|
|
2955
|
+
* | --- |
|
|
2956
|
+
* | "Label/text mode" |
|
|
2957
|
+
*
|
|
2958
|
+
* @param {Labelslashtextmode3Inputs} inputs
|
|
2959
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
2960
|
+
* @returns {LocalizedString}
|
|
2961
|
+
*/
|
|
2962
|
+
var labelslashtextmode3 = ((inputs = {}, options = {}) => {
|
|
2963
|
+
const locale = options.locale ?? getLocale();
|
|
2964
|
+
if (locale === "zh") return zh_labelslashtextmode3();
|
|
2965
|
+
if (locale === "id") return id_labelslashtextmode3();
|
|
2966
|
+
if (locale === "es") return es_labelslashtextmode3();
|
|
2967
|
+
return en_labelslashtextmode3();
|
|
2968
|
+
});
|
|
2969
|
+
//#endregion
|
|
2778
2970
|
//#region src/lib/paraglide/messages/languagemenu_label1.js
|
|
2779
2971
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
2780
2972
|
/** @typedef {{}} Languagemenu_Label1Inputs */
|
|
@@ -2935,6 +3127,38 @@ var macro = ((inputs = {}, options = {}) => {
|
|
|
2935
3127
|
return en_macro();
|
|
2936
3128
|
});
|
|
2937
3129
|
//#endregion
|
|
3130
|
+
//#region src/lib/paraglide/messages/macroshort1.js
|
|
3131
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
3132
|
+
/** @typedef {{}} Macroshort1Inputs */
|
|
3133
|
+
var en_macroshort1 = () => {
|
|
3134
|
+
return `MCR`;
|
|
3135
|
+
};
|
|
3136
|
+
var zh_macroshort1 = () => {
|
|
3137
|
+
return `宏`;
|
|
3138
|
+
};
|
|
3139
|
+
var id_macroshort1 = () => {
|
|
3140
|
+
return `MCR`;
|
|
3141
|
+
};
|
|
3142
|
+
var es_macroshort1 = () => {
|
|
3143
|
+
return `MCR`;
|
|
3144
|
+
};
|
|
3145
|
+
/**
|
|
3146
|
+
* | output |
|
|
3147
|
+
* | --- |
|
|
3148
|
+
* | "MCR" |
|
|
3149
|
+
*
|
|
3150
|
+
* @param {Macroshort1Inputs} inputs
|
|
3151
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
3152
|
+
* @returns {LocalizedString}
|
|
3153
|
+
*/
|
|
3154
|
+
var macroshort1 = ((inputs = {}, options = {}) => {
|
|
3155
|
+
const locale = options.locale ?? getLocale();
|
|
3156
|
+
if (locale === "zh") return zh_macroshort1();
|
|
3157
|
+
if (locale === "id") return id_macroshort1();
|
|
3158
|
+
if (locale === "es") return es_macroshort1();
|
|
3159
|
+
return en_macroshort1();
|
|
3160
|
+
});
|
|
3161
|
+
//#endregion
|
|
2938
3162
|
//#region src/lib/paraglide/messages/manageprompts1.js
|
|
2939
3163
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
2940
3164
|
/** @typedef {{}} Manageprompts1Inputs */
|
|
@@ -3095,6 +3319,70 @@ var messageone1 = ((inputs = {}, options = {}) => {
|
|
|
3095
3319
|
return en_messageone1();
|
|
3096
3320
|
});
|
|
3097
3321
|
//#endregion
|
|
3322
|
+
//#region src/lib/paraglide/messages/modenormtitle2.js
|
|
3323
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
3324
|
+
/** @typedef {{}} Modenormtitle2Inputs */
|
|
3325
|
+
var en_modenormtitle2 = () => {
|
|
3326
|
+
return `Flowing preview`;
|
|
3327
|
+
};
|
|
3328
|
+
var zh_modenormtitle2 = () => {
|
|
3329
|
+
return `流式预览`;
|
|
3330
|
+
};
|
|
3331
|
+
var id_modenormtitle2 = () => {
|
|
3332
|
+
return `Pratinjau mengalir`;
|
|
3333
|
+
};
|
|
3334
|
+
var es_modenormtitle2 = () => {
|
|
3335
|
+
return `Vista fluida`;
|
|
3336
|
+
};
|
|
3337
|
+
/**
|
|
3338
|
+
* | output |
|
|
3339
|
+
* | --- |
|
|
3340
|
+
* | "Flowing preview" |
|
|
3341
|
+
*
|
|
3342
|
+
* @param {Modenormtitle2Inputs} inputs
|
|
3343
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
3344
|
+
* @returns {LocalizedString}
|
|
3345
|
+
*/
|
|
3346
|
+
var modenormtitle2 = ((inputs = {}, options = {}) => {
|
|
3347
|
+
const locale = options.locale ?? getLocale();
|
|
3348
|
+
if (locale === "zh") return zh_modenormtitle2();
|
|
3349
|
+
if (locale === "id") return id_modenormtitle2();
|
|
3350
|
+
if (locale === "es") return es_modenormtitle2();
|
|
3351
|
+
return en_modenormtitle2();
|
|
3352
|
+
});
|
|
3353
|
+
//#endregion
|
|
3354
|
+
//#region src/lib/paraglide/messages/moderawtitle2.js
|
|
3355
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
3356
|
+
/** @typedef {{}} Moderawtitle2Inputs */
|
|
3357
|
+
var en_moderawtitle2 = () => {
|
|
3358
|
+
return `Raw text — 5 lines, then scroll`;
|
|
3359
|
+
};
|
|
3360
|
+
var zh_moderawtitle2 = () => {
|
|
3361
|
+
return `原始文本 — 5 行后滚动`;
|
|
3362
|
+
};
|
|
3363
|
+
var id_moderawtitle2 = () => {
|
|
3364
|
+
return `Teks mentah — 5 baris, lalu gulir`;
|
|
3365
|
+
};
|
|
3366
|
+
var es_moderawtitle2 = () => {
|
|
3367
|
+
return `Texto sin formato — 5 líneas, luego desplazamiento`;
|
|
3368
|
+
};
|
|
3369
|
+
/**
|
|
3370
|
+
* | output |
|
|
3371
|
+
* | --- |
|
|
3372
|
+
* | "Raw text — 5 lines, then scroll" |
|
|
3373
|
+
*
|
|
3374
|
+
* @param {Moderawtitle2Inputs} inputs
|
|
3375
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
3376
|
+
* @returns {LocalizedString}
|
|
3377
|
+
*/
|
|
3378
|
+
var moderawtitle2 = ((inputs = {}, options = {}) => {
|
|
3379
|
+
const locale = options.locale ?? getLocale();
|
|
3380
|
+
if (locale === "zh") return zh_moderawtitle2();
|
|
3381
|
+
if (locale === "id") return id_moderawtitle2();
|
|
3382
|
+
if (locale === "es") return es_moderawtitle2();
|
|
3383
|
+
return en_moderawtitle2();
|
|
3384
|
+
});
|
|
3385
|
+
//#endregion
|
|
3098
3386
|
//#region src/lib/paraglide/messages/morerefine1.js
|
|
3099
3387
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
3100
3388
|
/** @typedef {{}} Morerefine1Inputs */
|
|
@@ -4343,6 +4631,38 @@ var prompttextaria2 = ((inputs = {}, options = {}) => {
|
|
|
4343
4631
|
return en_prompttextaria2();
|
|
4344
4632
|
});
|
|
4345
4633
|
//#endregion
|
|
4634
|
+
//#region src/lib/paraglide/messages/prompttextph2.js
|
|
4635
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
4636
|
+
/** @typedef {{}} Prompttextph2Inputs */
|
|
4637
|
+
var en_prompttextph2 = () => {
|
|
4638
|
+
return `Prompt text…`;
|
|
4639
|
+
};
|
|
4640
|
+
var zh_prompttextph2 = () => {
|
|
4641
|
+
return `提示文本…`;
|
|
4642
|
+
};
|
|
4643
|
+
var id_prompttextph2 = () => {
|
|
4644
|
+
return `Teks prompt…`;
|
|
4645
|
+
};
|
|
4646
|
+
var es_prompttextph2 = () => {
|
|
4647
|
+
return `Texto del prompt…`;
|
|
4648
|
+
};
|
|
4649
|
+
/**
|
|
4650
|
+
* | output |
|
|
4651
|
+
* | --- |
|
|
4652
|
+
* | "Prompt text…" |
|
|
4653
|
+
*
|
|
4654
|
+
* @param {Prompttextph2Inputs} inputs
|
|
4655
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
4656
|
+
* @returns {LocalizedString}
|
|
4657
|
+
*/
|
|
4658
|
+
var prompttextph2 = ((inputs = {}, options = {}) => {
|
|
4659
|
+
const locale = options.locale ?? getLocale();
|
|
4660
|
+
if (locale === "zh") return zh_prompttextph2();
|
|
4661
|
+
if (locale === "id") return id_prompttextph2();
|
|
4662
|
+
if (locale === "es") return es_prompttextph2();
|
|
4663
|
+
return en_prompttextph2();
|
|
4664
|
+
});
|
|
4665
|
+
//#endregion
|
|
4346
4666
|
//#region src/lib/paraglide/messages/promptsmanager1.js
|
|
4347
4667
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
4348
4668
|
/** @typedef {{}} Promptsmanager1Inputs */
|
|
@@ -8422,7 +8742,7 @@ function AppSidebarHeaderTitle($$renderer) {
|
|
|
8422
8742
|
//#region src/lib/components/common/buttons/CanvasCopyButton.svelte
|
|
8423
8743
|
function CanvasCopyButton($$renderer, $$props) {
|
|
8424
8744
|
$$renderer.component(($$renderer) => {
|
|
8425
|
-
let { container, title = "Copy canvas as image (Shift+Click to save)", size = 12, class: className = "" } = $$props;
|
|
8745
|
+
let { container, title = "Copy canvas as image (Shift+Click to save)", size = 12, class: className = "", mode = "full" } = $$props;
|
|
8426
8746
|
$$renderer.push(`<button data-svelte="CanvasCopyButton" type="button"${attr_class(className)}${attr("title", title)} data-testid="canvas-copy-button">`);
|
|
8427
8747
|
$$renderer.push("<!--[-1-->");
|
|
8428
8748
|
Image($$renderer, { size });
|
|
@@ -8442,6 +8762,7 @@ function AppSidebarHeaderAction($$renderer, $$props) {
|
|
|
8442
8762
|
$$renderer.push(`<div data-svelte="AppSidebarHeaderAction" class="rail-header-actions svelte-ijmtbh">`);
|
|
8443
8763
|
CanvasCopyButton($$renderer, {
|
|
8444
8764
|
container: captureContainer,
|
|
8765
|
+
mode: "visible",
|
|
8445
8766
|
title: t(copypageimage2),
|
|
8446
8767
|
size: 14,
|
|
8447
8768
|
class: "inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded transition-colors hover:bg-surface-hover"
|
|
@@ -9938,26 +10259,57 @@ function CommandHelpCard($$renderer, $$props) {
|
|
|
9938
10259
|
});
|
|
9939
10260
|
}
|
|
9940
10261
|
//#endregion
|
|
9941
|
-
//#region src/lib/components/
|
|
10262
|
+
//#region src/lib/components/prompt-manager/PromptManagerTDLabel.svelte
|
|
9942
10263
|
function PromptManagerTDLabel($$renderer, $$props) {
|
|
9943
10264
|
$$renderer.component(($$renderer) => {
|
|
9944
10265
|
/** Prompt row whose text cell this component renders. */
|
|
9945
|
-
let { row } = $$props;
|
|
9946
|
-
$$renderer.push(`<td data-svelte="PromptManagerTDLabel"
|
|
10266
|
+
let { row, textMode = "norm" } = $$props;
|
|
10267
|
+
$$renderer.push(`<td data-svelte="PromptManagerTDLabel" class="mgr-text-cell mgr-stacked svelte-1jyv96o">`);
|
|
9947
10268
|
if (row.label) {
|
|
9948
10269
|
$$renderer.push("<!--[0-->");
|
|
9949
|
-
$$renderer.push(`<span class="mgr-label-tag svelte-
|
|
10270
|
+
$$renderer.push(`<span class="mgr-label-tag svelte-1jyv96o">${escape_html(row.label)}</span>`);
|
|
9950
10271
|
} else $$renderer.push("<!--[-1-->");
|
|
9951
|
-
$$renderer.push(`<!--]--> <span class="mgr-line2 svelte-
|
|
9952
|
-
if (
|
|
10272
|
+
$$renderer.push(`<!--]--> <span class="mgr-line2 svelte-1jyv96o">`);
|
|
10273
|
+
if (textMode === "pre") {
|
|
9953
10274
|
$$renderer.push("<!--[0-->");
|
|
9954
|
-
$$renderer.push(`<span class="mgr-
|
|
9955
|
-
} else
|
|
10275
|
+
$$renderer.push(`<span class="mgr-pre svelte-1jyv96o">${escape_html(row.text)}</span>`);
|
|
10276
|
+
} else {
|
|
10277
|
+
$$renderer.push("<!--[-1-->");
|
|
10278
|
+
$$renderer.push(`<span class="mgr-preview svelte-1jyv96o">${escape_html(textPreviewOf(row))}</span> `);
|
|
10279
|
+
if (row.text.includes("\n")) {
|
|
10280
|
+
$$renderer.push("<!--[0-->");
|
|
10281
|
+
$$renderer.push(`<span class="mgr-ml svelte-1jyv96o">⏎</span>`);
|
|
10282
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10283
|
+
$$renderer.push(`<!--]-->`);
|
|
10284
|
+
}
|
|
9956
10285
|
$$renderer.push(`<!--]--></span></td>`);
|
|
9957
10286
|
});
|
|
9958
10287
|
}
|
|
9959
10288
|
//#endregion
|
|
9960
|
-
//#region src/lib/components/
|
|
10289
|
+
//#region src/lib/components/prompt-manager/PromptManagerTagFilter.svelte
|
|
10290
|
+
function PromptManagerTagFilter($$renderer, $$props) {
|
|
10291
|
+
$$renderer.component(($$renderer) => {
|
|
10292
|
+
/**
|
|
10293
|
+
* PromptManagerTagFilter — the vocabulary chip row of the prompts
|
|
10294
|
+
* manager toolbar (The Prompt Tags ADR, 2026-09-14, D5): the CHIP view
|
|
10295
|
+
* of the active filter state. The words come from /api/config
|
|
10296
|
+
* prompts.tags (the operator's settings.yaml vocabulary); toggling a
|
|
10297
|
+
* chip reports the word up — the HOST owns the state, its persistence
|
|
10298
|
+
* (the dsi-prompt-tags-filter desk slot), and the search-box plus-word
|
|
10299
|
+
* twins (D11).
|
|
10300
|
+
*/
|
|
10301
|
+
let { vocabulary, selected} = $$props;
|
|
10302
|
+
$$renderer.push(`<div data-svelte="PromptManagerTagFilter" class="mgr-tag-row svelte-529ig4" role="group"${attr("aria-label", t(filterbytags2))}${attr("title", t(filterbytags2))}><!--[-->`);
|
|
10303
|
+
const each_array = ensure_array_like(vocabulary);
|
|
10304
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
10305
|
+
let word = each_array[$$index];
|
|
10306
|
+
$$renderer.push(`<button type="button"${attr_class("mgr-tag-filter-chip svelte-529ig4", void 0, { "on": selected.includes(word) })}${attr("aria-pressed", selected.includes(word))}>${escape_html(word)}</button>`);
|
|
10307
|
+
}
|
|
10308
|
+
$$renderer.push(`<!--]--></div>`);
|
|
10309
|
+
});
|
|
10310
|
+
}
|
|
10311
|
+
//#endregion
|
|
10312
|
+
//#region src/lib/components/prompt-manager/PromptManagerSearch.svelte
|
|
9961
10313
|
function PromptManagerSearch($$renderer, $$props) {
|
|
9962
10314
|
$$renderer.component(($$renderer) => {
|
|
9963
10315
|
/**
|
|
@@ -9965,86 +10317,208 @@ function PromptManagerSearch($$renderer, $$props) {
|
|
|
9965
10317
|
* manager toolbar (extracted from PromptManagerPanel.svelte).
|
|
9966
10318
|
* Value binds to the host's `searchQ`; each keystroke calls `oninput`
|
|
9967
10319
|
* (the host owns the 300ms debounce + refresh).
|
|
10320
|
+
*
|
|
10321
|
+
* A clear button (`(x)`) sits at the bottom-right INSIDE the textarea
|
|
10322
|
+
* whenever the box is non-empty; one click empties the box and fires
|
|
10323
|
+
* `oninput` so the host's debounced refresh runs (2026-09-19).
|
|
9968
10324
|
*/
|
|
9969
10325
|
let { value = "", oninput } = $$props;
|
|
9970
|
-
$$renderer.push(`<
|
|
10326
|
+
$$renderer.push(`<div data-svelte="PromptManagerSearch" class="mgr-search-wrap svelte-ihapru"><textarea class="mgr-search svelte-ihapru" rows="2"${attr("placeholder", t(searchprompts1))}>`);
|
|
9971
10327
|
const $$body = escape_html(value);
|
|
9972
10328
|
if ($$body) $$renderer.push(`${$$body}`);
|
|
9973
|
-
$$renderer.push(`</textarea
|
|
10329
|
+
$$renderer.push(`</textarea> `);
|
|
10330
|
+
if (value.length > 0) {
|
|
10331
|
+
$$renderer.push("<!--[0-->");
|
|
10332
|
+
$$renderer.push(`<button type="button" class="mgr-search-clear svelte-ihapru"${attr("aria-label", t(clearsearch1))}${attr("title", t(clearsearch1))}>(x)</button>`);
|
|
10333
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10334
|
+
$$renderer.push(`<!--]--></div>`);
|
|
9974
10335
|
bind_props($$props, { value });
|
|
9975
10336
|
});
|
|
9976
10337
|
}
|
|
9977
10338
|
//#endregion
|
|
9978
|
-
//#region src/lib/components/
|
|
10339
|
+
//#region src/lib/components/prompt-manager/PromptManagerToolbar.svelte
|
|
10340
|
+
function PromptManagerToolbar($$renderer, $$props) {
|
|
10341
|
+
$$renderer.component(($$renderer) => {
|
|
10342
|
+
/**
|
|
10343
|
+
* PromptManagerToolbar — the sticky header's first row (2026-09-19):
|
|
10344
|
+
* LEFT — the prompts.sqlite FULL path (server-expanded, rides
|
|
10345
|
+
* /api/config prompts.dbPath; unknown → the filename only).
|
|
10346
|
+
* RIGHT — a CanvasCopyButton capturing the whole PromptManagerPanel
|
|
10347
|
+
* (the container prop is the panel's root element).
|
|
10348
|
+
*/
|
|
10349
|
+
let { dbPath, container } = $$props;
|
|
10350
|
+
$$renderer.push(`<div data-svelte="PromptManagerToolbar" class="mgr-toolbar-row svelte-1j41j2p"><span class="mgr-db-path svelte-1j41j2p"${attr("title", dbPath)}>${escape_html(dbPath || "prompts.sqlite")}</span> `);
|
|
10351
|
+
CanvasCopyButton($$renderer, {
|
|
10352
|
+
container,
|
|
10353
|
+
mode: "visible",
|
|
10354
|
+
title: t(copypanelasimage3),
|
|
10355
|
+
class: "shrink-0 rounded-md text-slate-400 hover:bg-slate-100 hover:text-slate-600"
|
|
10356
|
+
});
|
|
10357
|
+
$$renderer.push(`<!----></div>`);
|
|
10358
|
+
});
|
|
10359
|
+
}
|
|
10360
|
+
//#endregion
|
|
10361
|
+
//#region src/lib/components/prompt-manager/PromptManagerHeader.svelte
|
|
10362
|
+
function PromptManagerHeader($$renderer, $$props) {
|
|
10363
|
+
$$renderer.component(($$renderer) => {
|
|
10364
|
+
/**
|
|
10365
|
+
* PromptManagerHeader — the header of the prompts manager (the former
|
|
10366
|
+
* PromptManagerStickyHeader, 2026-09-19 rework): toolbar row
|
|
10367
|
+
* (delete-selected, tag chips, search, add/cancel) + the head table
|
|
10368
|
+
* row, no gaps. NOT position:sticky anymore — the panel is a flex
|
|
10369
|
+
* column and the header simply sits on top in normal flow; the
|
|
10370
|
+
* PromptManagerContainer BELOW it owns the scroll.
|
|
10371
|
+
*
|
|
10372
|
+
* Presentational: state lives in the panel and arrives via props;
|
|
10373
|
+
* every gesture is reported back through a callback. searchQ is
|
|
10374
|
+
* $bindable (the search box owns keystrokes, the panel owns the
|
|
10375
|
+
* value — it derives the +token filter from it).
|
|
10376
|
+
*/
|
|
10377
|
+
let { selectedCount, vocabulary, tagFilter, dbPath, container, sortState, loading, hasRows, addingNew, searchQ = "", textMode = "pre", ontoggle, onsearchinput, ondeleteselected, onunselectall, onsort, onadd, oncanceladd } = $$props;
|
|
10378
|
+
/** Direction icon for a column header. */
|
|
10379
|
+
function sortIcon(col) {
|
|
10380
|
+
if (!sortState || sortState.col !== col) return "↕";
|
|
10381
|
+
return sortState.dir === "asc" ? "▲" : "▼";
|
|
10382
|
+
}
|
|
10383
|
+
let $$settled = true;
|
|
10384
|
+
let $$inner_renderer;
|
|
10385
|
+
function $$render_inner($$renderer) {
|
|
10386
|
+
$$renderer.push(`<div data-svelte="PromptManagerHeader" class="mgr-header svelte-aw18b1">`);
|
|
10387
|
+
PromptManagerToolbar($$renderer, {
|
|
10388
|
+
dbPath,
|
|
10389
|
+
container
|
|
10390
|
+
});
|
|
10391
|
+
$$renderer.push(`<!----> <div class="mgr-header-bar svelte-aw18b1"><button type="button" class="mgr-btn mgr-btn-danger svelte-aw18b1"${attr("disabled", selectedCount === 0, true)}${attr("title", selectedCount > 0 ? `Delete ${selectedCount} selected` : "Select rows to enable delete")}>${escape_html(t(del))}${escape_html(selectedCount > 0 ? ` (${selectedCount})` : "")}</button> <div class="mgr-toolbar svelte-aw18b1">`);
|
|
10392
|
+
if (vocabulary.length > 0) {
|
|
10393
|
+
$$renderer.push("<!--[0-->");
|
|
10394
|
+
PromptManagerTagFilter($$renderer, {
|
|
10395
|
+
vocabulary,
|
|
10396
|
+
selected: tagFilter});
|
|
10397
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10398
|
+
$$renderer.push(`<!--]--> `);
|
|
10399
|
+
PromptManagerSearch($$renderer, {
|
|
10400
|
+
oninput: onsearchinput,
|
|
10401
|
+
get value() {
|
|
10402
|
+
return searchQ;
|
|
10403
|
+
},
|
|
10404
|
+
set value($$value) {
|
|
10405
|
+
searchQ = $$value;
|
|
10406
|
+
$$settled = false;
|
|
10407
|
+
}
|
|
10408
|
+
});
|
|
10409
|
+
$$renderer.push(`<!----> `);
|
|
10410
|
+
if (addingNew) {
|
|
10411
|
+
$$renderer.push("<!--[0-->");
|
|
10412
|
+
$$renderer.push(`<button type="button" class="mgr-btn mgr-btn-cancel svelte-aw18b1">${escape_html(t(cancel))}</button>`);
|
|
10413
|
+
} else {
|
|
10414
|
+
$$renderer.push("<!--[-1-->");
|
|
10415
|
+
$$renderer.push(`<button type="button" class="mgr-btn mgr-btn-add svelte-aw18b1">${escape_html(t(plusadd1))}</button>`);
|
|
10416
|
+
}
|
|
10417
|
+
$$renderer.push(`<!--]--></div></div> `);
|
|
10418
|
+
if (!loading && hasRows) {
|
|
10419
|
+
$$renderer.push("<!--[0-->");
|
|
10420
|
+
$$renderer.push(`<table class="mgr-table mgr-head-table svelte-aw18b1"><thead class="svelte-aw18b1"><tr><th class="mgr-sel-col svelte-aw18b1">`);
|
|
10421
|
+
if (selectedCount > 0) {
|
|
10422
|
+
$$renderer.push("<!--[0-->");
|
|
10423
|
+
$$renderer.push(`<button type="button" class="mgr-unselect-all svelte-aw18b1"${attr("title", t(unselectall1))}>☐</button>`);
|
|
10424
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10425
|
+
$$renderer.push(`<!--]--></th><th class="svelte-aw18b1"><button type="button"${attr_class("mgr-sort-btn svelte-aw18b1", void 0, { "active": sortState?.col === "uses" })}>${escape_html(t(uses))} ${escape_html(sortIcon("uses"))}</button></th><th class="svelte-aw18b1"><button type="button"${attr_class("mgr-sort-btn svelte-aw18b1", void 0, { "active": sortState?.col === "display" })}>${escape_html(t(labelslashtext2))} ${escape_html(sortIcon("display"))}</button></th><th class="mgr-macro-col svelte-aw18b1"${attr("title", t(macro))}>${escape_html(t(macroshort1))}</th><th class="mgr-tags-col svelte-aw18b1"><span class="mgr-tags-head svelte-aw18b1">${escape_html(t(tags))} <span class="mgr-mode-seg svelte-aw18b1" role="group"${attr("aria-label", t(labelslashtextmode3))}><button type="button"${attr_class("mgr-mode-btn left svelte-aw18b1", void 0, { "on": textMode === "pre" })}${attr("aria-pressed", textMode === "pre")}${attr("title", t(moderawtitle2))}>pre</button><button type="button"${attr_class("mgr-mode-btn right svelte-aw18b1", void 0, { "on": textMode === "norm" })}${attr("aria-pressed", textMode === "norm")}${attr("title", t(modenormtitle2))}>norm</button></span></span></th></tr></thead></table>`);
|
|
10426
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10427
|
+
$$renderer.push(`<!--]--></div>`);
|
|
10428
|
+
}
|
|
10429
|
+
do {
|
|
10430
|
+
$$settled = true;
|
|
10431
|
+
$$inner_renderer = $$renderer.copy();
|
|
10432
|
+
$$render_inner($$inner_renderer);
|
|
10433
|
+
} while (!$$settled);
|
|
10434
|
+
$$renderer.subsume($$inner_renderer);
|
|
10435
|
+
bind_props($$props, {
|
|
10436
|
+
searchQ,
|
|
10437
|
+
textMode
|
|
10438
|
+
});
|
|
10439
|
+
});
|
|
10440
|
+
}
|
|
10441
|
+
//#endregion
|
|
10442
|
+
//#region src/lib/components/prompt-manager/PromptManagerContainer.svelte
|
|
10443
|
+
function PromptManagerContainer($$renderer, $$props) {
|
|
10444
|
+
/**
|
|
10445
|
+
* PromptManagerContainer — the scroll container UNDER the header
|
|
10446
|
+
* (2026-09-19 rework): the header sits on top in normal flow; this
|
|
10447
|
+
* box takes the rest of the panel column and owns the overflow, so
|
|
10448
|
+
* the body table scrolls beneath a stationary header.
|
|
10449
|
+
*/
|
|
10450
|
+
let { children } = $$props;
|
|
10451
|
+
$$renderer.push(`<div data-svelte="PromptManagerContainer" class="mgr-container svelte-rem7f1">`);
|
|
10452
|
+
children($$renderer);
|
|
10453
|
+
$$renderer.push(`<!----></div>`);
|
|
10454
|
+
}
|
|
10455
|
+
//#endregion
|
|
10456
|
+
//#region src/lib/components/prompt-manager/PromptManagerTDTags.svelte
|
|
9979
10457
|
function PromptManagerTDTags($$renderer, $$props) {
|
|
9980
10458
|
$$renderer.component(($$renderer) => {
|
|
9981
10459
|
/**
|
|
9982
10460
|
* PromptManagerTDTags — the tags body cell (The Prompt Tags ADR,
|
|
9983
|
-
* 2026-09-14, D4; the TDUses/TDLabel cell seam).
|
|
9984
|
-
*
|
|
9985
|
-
*
|
|
9986
|
-
*
|
|
10461
|
+
* 2026-09-14, D4; the TDUses/TDLabel cell seam). ALL tag chips render
|
|
10462
|
+
* and wrap down (2026-09-19) — pre mode's tall rows give the column
|
|
10463
|
+
* vertical room. Untagged ('') renders the em-dash, same as the
|
|
10464
|
+
* macro column.
|
|
9987
10465
|
*/
|
|
9988
10466
|
let { row } = $$props;
|
|
9989
10467
|
const words = derived(() => row.tags ? row.tags.split(" ").filter(Boolean) : []);
|
|
9990
|
-
|
|
9991
|
-
const overflow = derived(() => words().length - shown().length);
|
|
9992
|
-
$$renderer.push(`<td data-svelte="PromptManagerTDTags" class="mgr-tags-cell svelte-108d03j">`);
|
|
10468
|
+
$$renderer.push(`<td data-svelte="PromptManagerTDTags" class="mgr-tags-cell svelte-q3k195">`);
|
|
9993
10469
|
if (words().length === 0) {
|
|
9994
10470
|
$$renderer.push("<!--[0-->");
|
|
9995
|
-
$$renderer.push(`<span class="mgr-tag-none svelte-
|
|
10471
|
+
$$renderer.push(`<span class="mgr-tag-none svelte-q3k195">—</span>`);
|
|
9996
10472
|
} else {
|
|
9997
10473
|
$$renderer.push("<!--[-1-->");
|
|
9998
10474
|
$$renderer.push(`<!--[-->`);
|
|
9999
|
-
const each_array = ensure_array_like(
|
|
10475
|
+
const each_array = ensure_array_like(words());
|
|
10000
10476
|
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
10001
10477
|
let w = each_array[$$index];
|
|
10002
|
-
$$renderer.push(`<span class="mgr-tag-chip svelte-
|
|
10478
|
+
$$renderer.push(`<span class="mgr-tag-chip svelte-q3k195">${escape_html(w)}</span>`);
|
|
10003
10479
|
}
|
|
10004
|
-
$$renderer.push(`<!--]--> `);
|
|
10005
|
-
if (overflow() > 0) {
|
|
10006
|
-
$$renderer.push("<!--[0-->");
|
|
10007
|
-
$$renderer.push(`<span class="mgr-tag-more svelte-108d03j"${attr("title", words().join(" "))}>+${escape_html(overflow())}</span>`);
|
|
10008
|
-
} else $$renderer.push("<!--[-1-->");
|
|
10009
10480
|
$$renderer.push(`<!--]-->`);
|
|
10010
10481
|
}
|
|
10011
10482
|
$$renderer.push(`<!--]--></td>`);
|
|
10012
10483
|
});
|
|
10013
10484
|
}
|
|
10014
10485
|
//#endregion
|
|
10015
|
-
//#region src/lib/components/
|
|
10016
|
-
function
|
|
10486
|
+
//#region src/lib/components/prompt-manager/PromptManagerTDUses.svelte
|
|
10487
|
+
function PromptManagerTDUses($$renderer, $$props) {
|
|
10017
10488
|
$$renderer.component(($$renderer) => {
|
|
10018
|
-
/**
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
* of the active filter state. The words come from /api/config
|
|
10022
|
-
* prompts.tags (the operator's settings.yaml vocabulary); toggling a
|
|
10023
|
-
* chip reports the word up — the HOST owns the state, its persistence
|
|
10024
|
-
* (the dsi-prompt-tags-filter desk slot), and the search-box plus-word
|
|
10025
|
-
* twins (D11).
|
|
10026
|
-
*/
|
|
10027
|
-
let { vocabulary, selected} = $$props;
|
|
10028
|
-
$$renderer.push(`<div data-svelte="PromptManagerTagFilter" class="mgr-tag-row svelte-1uamgti" role="group"${attr("aria-label", t(filterbytags2))}${attr("title", t(filterbytags2))}><!--[-->`);
|
|
10029
|
-
const each_array = ensure_array_like(vocabulary);
|
|
10030
|
-
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
10031
|
-
let word = each_array[$$index];
|
|
10032
|
-
$$renderer.push(`<button type="button"${attr_class("mgr-tag-filter-chip svelte-1uamgti", void 0, { "on": selected.includes(word) })}${attr("aria-pressed", selected.includes(word))}>${escape_html(word)}</button>`);
|
|
10033
|
-
}
|
|
10034
|
-
$$renderer.push(`<!--]--></div>`);
|
|
10489
|
+
/** Prompt row whose use-count cell this component renders. */
|
|
10490
|
+
let { row } = $$props;
|
|
10491
|
+
$$renderer.push(`<td data-svelte="PromptManagerTDUses" class="mgr-count svelte-2jpoxe">${escape_html(row.use_count)}</td>`);
|
|
10035
10492
|
});
|
|
10036
10493
|
}
|
|
10037
10494
|
//#endregion
|
|
10038
|
-
//#region src/lib/components/
|
|
10039
|
-
function
|
|
10495
|
+
//#region src/lib/components/prompt-manager/PromptManagerAdd.svelte
|
|
10496
|
+
function PromptManagerAdd($$renderer, $$props) {
|
|
10040
10497
|
$$renderer.component(($$renderer) => {
|
|
10041
|
-
/**
|
|
10042
|
-
|
|
10043
|
-
|
|
10498
|
+
/**
|
|
10499
|
+
* PromptManagerAdd - the add-prompt dialog extracted from PromptManagerPanel
|
|
10500
|
+
* (extraction seam, The Prompt Tags ADR D8). Same dialog pattern as
|
|
10501
|
+
* PromptManagerEdit: backdrop + centered form, portal pair to document.body
|
|
10502
|
+
* when `portal` is true (BC-7 - fixed layers escape the floor zoom
|
|
10503
|
+
* transform); the modal host renders it in place, so the wrapper is inert
|
|
10504
|
+
* there. The panel owns `addingNew` and the POST.
|
|
10505
|
+
*/
|
|
10506
|
+
let { uses: uses$1 = "1", macro: macro$1 = false, text: text$1 = "", label: label$1 = "", tags: tags$1 = "", portal = false, onsave, oncancel } = $$props;
|
|
10507
|
+
$$renderer.push(`<div data-svelte="PromptManagerAdd" class="mgr-edit-portal svelte-wmiw05"><div class="mgr-edit-backdrop svelte-wmiw05" role="presentation"></div> <div class="mgr-edit-dialog svelte-wmiw05" role="dialog"${attr("aria-label", t(addprompt1))}><h3 class="svelte-wmiw05">${escape_html(t(addprompt1))}</h3> <div class="mgr-field mgr-field-pair svelte-wmiw05"><label class="mgr-field svelte-wmiw05"><span class="svelte-wmiw05">${escape_html(t(uses))}</span> <input type="number" class="mgr-edit-uses svelte-wmiw05"${attr("value", uses$1)} min="1"/></label> <label class="mgr-field mgr-field-macro svelte-wmiw05"><span class="svelte-wmiw05">${escape_html(t(macro))}</span> <input type="checkbox" class="mgr-edit-macro svelte-wmiw05"${attr("checked", macro$1, true)}/></label></div> <label class="mgr-field svelte-wmiw05"><span class="svelte-wmiw05">${escape_html(t(label))}</span> <input type="text" class="mgr-add-label svelte-wmiw05"${attr("value", label$1)}${attr("placeholder", t(labeloptional1))}/></label> <label class="mgr-field svelte-wmiw05"><span class="svelte-wmiw05">${escape_html(t(text))}</span> <textarea class="mgr-add-text svelte-wmiw05"${attr("placeholder", t(prompttextph2))}${attr("rows", Math.min(10, Math.max(3, text$1.split("\n").length)))}>`);
|
|
10508
|
+
const $$body = escape_html(text$1);
|
|
10509
|
+
if ($$body) $$renderer.push(`${$$body}`);
|
|
10510
|
+
$$renderer.push(`</textarea></label> <label class="mgr-field svelte-wmiw05"><span class="svelte-wmiw05">${escape_html(t(tags))}</span> <input type="text" class="mgr-add-tags svelte-wmiw05"${attr("value", tags$1)}${attr("placeholder", t(tags))}/></label> <div class="mgr-edit-actions svelte-wmiw05"><button type="button" class="mgr-btn mgr-btn-save svelte-wmiw05">${escape_html(t(addprompt1))}</button> <button type="button" class="mgr-btn mgr-btn-cancel svelte-wmiw05">${escape_html(t(cancel))}</button></div></div></div>`);
|
|
10511
|
+
bind_props($$props, {
|
|
10512
|
+
uses: uses$1,
|
|
10513
|
+
macro: macro$1,
|
|
10514
|
+
text: text$1,
|
|
10515
|
+
label: label$1,
|
|
10516
|
+
tags: tags$1
|
|
10517
|
+
});
|
|
10044
10518
|
});
|
|
10045
10519
|
}
|
|
10046
10520
|
//#endregion
|
|
10047
|
-
//#region src/lib/components/
|
|
10521
|
+
//#region src/lib/components/prompt-manager/PromptManagerPanel.svelte
|
|
10048
10522
|
function PromptManagerPanel($$renderer, $$props) {
|
|
10049
10523
|
$$renderer.component(($$renderer) => {
|
|
10050
10524
|
/**
|
|
@@ -10068,10 +10542,24 @@ function PromptManagerPanel($$renderer, $$props) {
|
|
|
10068
10542
|
let rows = [];
|
|
10069
10543
|
let total = 0;
|
|
10070
10544
|
let searchQ = "";
|
|
10545
|
+
/** Sort state: null = unsorted (server default), else {col, dir}.
|
|
10546
|
+
* Clicking a column cycles: unsorted → asc → desc → unsorted. */
|
|
10547
|
+
let sortState = null;
|
|
10548
|
+
/** Label/text cell mode (2026-09-19): 'pre' — the raw text, 5 lines
|
|
10549
|
+
* then scroll (the DEFAULT); 'norm' — the flowing preview. */
|
|
10550
|
+
let textMode = "pre";
|
|
10071
10551
|
let loading$1 = false;
|
|
10072
10552
|
let editingId = null;
|
|
10553
|
+
let addingNew = false;
|
|
10554
|
+
let newText = "";
|
|
10555
|
+
let newLabel = "";
|
|
10556
|
+
let newTags = "";
|
|
10557
|
+
let newUses = "1";
|
|
10558
|
+
let newMacro = false;
|
|
10073
10559
|
let errorMsg = null;
|
|
10074
10560
|
let searchTimer = null;
|
|
10561
|
+
/** The panel's root element — the CanvasCopyButton capture target. */
|
|
10562
|
+
let rootEl = null;
|
|
10075
10563
|
const profile = derived(() => null);
|
|
10076
10564
|
/** The operator's vocabulary (settings.yaml prompts.tags via /api/config). */
|
|
10077
10565
|
const vocabulary = derived(() => appConfig().prompts.tags);
|
|
@@ -10082,6 +10570,20 @@ function PromptManagerPanel($$renderer, $$props) {
|
|
|
10082
10570
|
function plainWords(v) {
|
|
10083
10571
|
return v.split(/[\s;]+/).filter((tok) => tok && !tok.startsWith("+")).join(" ");
|
|
10084
10572
|
}
|
|
10573
|
+
/** Rewrite the box's +tokens from the filter state, keeping plain words. */
|
|
10574
|
+
function rewritePlusTokens() {
|
|
10575
|
+
const plain = plainWords(searchQ);
|
|
10576
|
+
searchQ = [...tagFilter.map((w) => "+" + w), ...plain ? [plain] : []].join(" ");
|
|
10577
|
+
}
|
|
10578
|
+
/** Chip toggle (and the +word path's shared tail): flip the word in the
|
|
10579
|
+
* filter, persist to the desk slot, mirror into the box, refresh. */
|
|
10580
|
+
function toggleTag(word) {
|
|
10581
|
+
tagFilter = tagFilter.includes(word) ? tagFilter.filter((w) => w !== word) : [...tagFilter, word];
|
|
10582
|
+
saveTagFilter(TAG_FILTER_KEY, tagFilter, profile());
|
|
10583
|
+
rewritePlusTokens();
|
|
10584
|
+
if (searchTimer) clearTimeout(searchTimer);
|
|
10585
|
+
searchTimer = setTimeout(refresh, 300);
|
|
10586
|
+
}
|
|
10085
10587
|
/** Selected row ids (checkbox column). */
|
|
10086
10588
|
let selected = /* @__PURE__ */ new Set();
|
|
10087
10589
|
async function refresh() {
|
|
@@ -10089,7 +10591,10 @@ function PromptManagerPanel($$renderer, $$props) {
|
|
|
10089
10591
|
errorMsg = null;
|
|
10090
10592
|
try {
|
|
10091
10593
|
const params = new URLSearchParams({ limit: "200" });
|
|
10092
|
-
|
|
10594
|
+
if (sortState) {
|
|
10595
|
+
params.set("sort", sortState.col);
|
|
10596
|
+
params.set("dir", sortState.dir);
|
|
10597
|
+
} else params.set("sort", "last_used");
|
|
10093
10598
|
if (tagFilter.length > 0) params.set("tags", tagFilter.join(","));
|
|
10094
10599
|
const q = plainWords(searchQ).trim();
|
|
10095
10600
|
if (q) params.set("q", q);
|
|
@@ -10118,93 +10623,228 @@ function PromptManagerPanel($$renderer, $$props) {
|
|
|
10118
10623
|
}
|
|
10119
10624
|
/** Visible rows: the server-ordered list as loaded. */
|
|
10120
10625
|
let visibleRows = derived(() => rows);
|
|
10121
|
-
/**
|
|
10122
|
-
function
|
|
10123
|
-
return
|
|
10626
|
+
/** Bulk delete all selected — no confirmation (OCI parity). */
|
|
10627
|
+
async function deleteSelected() {
|
|
10628
|
+
if (selected.size === 0) return;
|
|
10629
|
+
const ids = [...selected];
|
|
10630
|
+
try {
|
|
10631
|
+
await Promise.all(ids.map((id) => fetch(`/api/prompts/${id}`, { method: "DELETE" })));
|
|
10632
|
+
selected = /* @__PURE__ */ new Set();
|
|
10633
|
+
onchanged?.();
|
|
10634
|
+
refresh();
|
|
10635
|
+
} catch {
|
|
10636
|
+
errorMsg = "Network error";
|
|
10637
|
+
}
|
|
10638
|
+
}
|
|
10639
|
+
function sortByCol(col) {
|
|
10640
|
+
if (!sortState || sortState.col !== col) sortState = {
|
|
10641
|
+
col,
|
|
10642
|
+
dir: "asc"
|
|
10643
|
+
};
|
|
10644
|
+
else if (sortState.dir === "asc") sortState = {
|
|
10645
|
+
col,
|
|
10646
|
+
dir: "desc"
|
|
10647
|
+
};
|
|
10648
|
+
else sortState = null;
|
|
10649
|
+
refresh();
|
|
10650
|
+
}
|
|
10651
|
+
async function addPrompt() {
|
|
10652
|
+
if (!newText.trim()) return;
|
|
10653
|
+
try {
|
|
10654
|
+
const res = await fetch("/api/prompts", {
|
|
10655
|
+
method: "POST",
|
|
10656
|
+
headers: { "Content-Type": "application/json" },
|
|
10657
|
+
body: JSON.stringify({
|
|
10658
|
+
text: newText,
|
|
10659
|
+
label: newLabel || void 0,
|
|
10660
|
+
use_count: (() => {
|
|
10661
|
+
const n = parseInt(newUses, 10);
|
|
10662
|
+
return !isNaN(n) && n !== 1 ? n : void 0;
|
|
10663
|
+
})(),
|
|
10664
|
+
macro: newMacro ? true : void 0,
|
|
10665
|
+
tags: parseTagWords(newTags).length > 0 ? parseTagWords(newTags) : void 0
|
|
10666
|
+
})
|
|
10667
|
+
});
|
|
10668
|
+
if (res.status === 409) {
|
|
10669
|
+
errorMsg = `Already saved (${(await res.json()).existing?.use_count ?? "?"} uses)`;
|
|
10670
|
+
return;
|
|
10671
|
+
}
|
|
10672
|
+
if (!res.ok) {
|
|
10673
|
+
errorMsg = "Add failed";
|
|
10674
|
+
return;
|
|
10675
|
+
}
|
|
10676
|
+
addingNew = false;
|
|
10677
|
+
newText = "";
|
|
10678
|
+
newLabel = "";
|
|
10679
|
+
newTags = "";
|
|
10680
|
+
newUses = "1";
|
|
10681
|
+
newMacro = false;
|
|
10682
|
+
errorMsg = null;
|
|
10683
|
+
onchanged?.();
|
|
10684
|
+
refresh();
|
|
10685
|
+
} catch {
|
|
10686
|
+
errorMsg = "Network error";
|
|
10687
|
+
}
|
|
10124
10688
|
}
|
|
10125
10689
|
let $$settled = true;
|
|
10126
10690
|
let $$inner_renderer;
|
|
10127
10691
|
function $$render_inner($$renderer) {
|
|
10128
|
-
$$renderer.push(`<div data-svelte="PromptManagerPanel" class="mgr-panel-root" role="region"${attr("aria-label", t(promptsmanager1))}${attr("tabindex", escapeScope === "root" ? -1 : void 0)}
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10692
|
+
$$renderer.push(`<div data-svelte="PromptManagerPanel" class="mgr-panel-root svelte-1t3fglc" role="region"${attr("aria-label", t(promptsmanager1))}${attr("tabindex", escapeScope === "root" ? -1 : void 0)}>`);
|
|
10693
|
+
PromptManagerHeader($$renderer, {
|
|
10694
|
+
selectedCount: selected.size,
|
|
10695
|
+
vocabulary: vocabulary(),
|
|
10696
|
+
dbPath: appConfig().prompts.dbPath,
|
|
10697
|
+
container: rootEl,
|
|
10698
|
+
tagFilter,
|
|
10699
|
+
sortState,
|
|
10700
|
+
loading: loading$1,
|
|
10701
|
+
hasRows: rows.length > 0,
|
|
10702
|
+
addingNew,
|
|
10703
|
+
ontoggle: toggleTag,
|
|
10704
|
+
onsearchinput: onSearchInput,
|
|
10705
|
+
ondeleteselected: deleteSelected,
|
|
10706
|
+
onunselectall: () => {
|
|
10707
|
+
selected = /* @__PURE__ */ new Set();
|
|
10708
|
+
},
|
|
10709
|
+
onsort: sortByCol,
|
|
10710
|
+
onadd: () => {
|
|
10711
|
+
addingNew = true;
|
|
10712
|
+
errorMsg = null;
|
|
10713
|
+
},
|
|
10714
|
+
oncanceladd: () => {
|
|
10715
|
+
addingNew = false;
|
|
10716
|
+
newText = "";
|
|
10717
|
+
newLabel = "";
|
|
10718
|
+
newTags = "";
|
|
10719
|
+
errorMsg = null;
|
|
10720
|
+
},
|
|
10721
|
+
get textMode() {
|
|
10722
|
+
return textMode;
|
|
10723
|
+
},
|
|
10724
|
+
set textMode($$value) {
|
|
10725
|
+
textMode = $$value;
|
|
10726
|
+
$$settled = false;
|
|
10727
|
+
},
|
|
10728
|
+
get searchQ() {
|
|
10139
10729
|
return searchQ;
|
|
10140
10730
|
},
|
|
10141
|
-
set
|
|
10731
|
+
set searchQ($$value) {
|
|
10142
10732
|
searchQ = $$value;
|
|
10143
10733
|
$$settled = false;
|
|
10144
10734
|
}
|
|
10145
10735
|
});
|
|
10146
10736
|
$$renderer.push(`<!----> `);
|
|
10147
|
-
{
|
|
10148
|
-
$$renderer.push("<!--[-1-->");
|
|
10149
|
-
$$renderer.push(`<button type="button" class="mgr-btn mgr-btn-add svelte-1kuoadm">${escape_html(t(plusadd1))}</button>`);
|
|
10150
|
-
}
|
|
10151
|
-
$$renderer.push(`<!--]--></div></div> `);
|
|
10152
|
-
if (!loading$1 && rows.length > 0) {
|
|
10153
|
-
$$renderer.push("<!--[0-->");
|
|
10154
|
-
$$renderer.push(`<table class="mgr-table mgr-head-table svelte-1kuoadm"><thead class="svelte-1kuoadm"><tr><th class="mgr-sel-col svelte-1kuoadm">`);
|
|
10155
|
-
if (selected.size > 0) {
|
|
10156
|
-
$$renderer.push("<!--[0-->");
|
|
10157
|
-
$$renderer.push(`<button type="button" class="mgr-unselect-all svelte-1kuoadm"${attr("title", t(unselectall1))}>☐</button>`);
|
|
10158
|
-
} else $$renderer.push("<!--[-1-->");
|
|
10159
|
-
$$renderer.push(`<!--]--></th><th class="svelte-1kuoadm"><button type="button"${attr_class("mgr-sort-btn svelte-1kuoadm", void 0, { "active": false })}>${escape_html(t(uses))} ${escape_html(sortIcon())}</button></th><th class="svelte-1kuoadm"><button type="button"${attr_class("mgr-sort-btn svelte-1kuoadm", void 0, { "active": false })}>${escape_html(t(labelslashtext2))} ${escape_html(sortIcon())}</button></th><th class="mgr-macro-col svelte-1kuoadm">${escape_html(t(macro))}</th><th class="mgr-tags-col svelte-1kuoadm">${escape_html(t(tags))}</th></tr></thead></table>`);
|
|
10160
|
-
} else $$renderer.push("<!--[-1-->");
|
|
10161
|
-
$$renderer.push(`<!--]--></div> `);
|
|
10162
10737
|
if (errorMsg) {
|
|
10163
10738
|
$$renderer.push("<!--[0-->");
|
|
10164
|
-
$$renderer.push(`<div class="mgr-error svelte-
|
|
10739
|
+
$$renderer.push(`<div class="mgr-error svelte-1t3fglc" role="alert"><span class="mgr-error-msg">${escape_html(errorMsg)}</span> <button type="button" class="mgr-error-close svelte-1t3fglc"${attr("aria-label", t(dismissalert1))}${attr("title", t(dismiss))}>`);
|
|
10740
|
+
X($$renderer, {
|
|
10741
|
+
size: 11,
|
|
10742
|
+
"aria-hidden": "true"
|
|
10743
|
+
});
|
|
10744
|
+
$$renderer.push(`<!----></button></div>`);
|
|
10165
10745
|
} else $$renderer.push("<!--[-1-->");
|
|
10166
10746
|
$$renderer.push(`<!--]--> `);
|
|
10167
|
-
|
|
10168
|
-
$$renderer.push(`<!--]--> `);
|
|
10169
|
-
if (loading$1) {
|
|
10747
|
+
if (addingNew) {
|
|
10170
10748
|
$$renderer.push("<!--[0-->");
|
|
10171
|
-
$$renderer
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10749
|
+
PromptManagerAdd($$renderer, {
|
|
10750
|
+
portal: host === "panel",
|
|
10751
|
+
onsave: addPrompt,
|
|
10752
|
+
oncancel: () => {
|
|
10753
|
+
addingNew = false;
|
|
10754
|
+
newText = "";
|
|
10755
|
+
newLabel = "";
|
|
10756
|
+
newTags = "";
|
|
10757
|
+
newUses = "1";
|
|
10758
|
+
newMacro = false;
|
|
10759
|
+
errorMsg = null;
|
|
10760
|
+
},
|
|
10761
|
+
get uses() {
|
|
10762
|
+
return newUses;
|
|
10763
|
+
},
|
|
10764
|
+
set uses($$value) {
|
|
10765
|
+
newUses = $$value;
|
|
10766
|
+
$$settled = false;
|
|
10767
|
+
},
|
|
10768
|
+
get macro() {
|
|
10769
|
+
return newMacro;
|
|
10770
|
+
},
|
|
10771
|
+
set macro($$value) {
|
|
10772
|
+
newMacro = $$value;
|
|
10773
|
+
$$settled = false;
|
|
10774
|
+
},
|
|
10775
|
+
get text() {
|
|
10776
|
+
return newText;
|
|
10777
|
+
},
|
|
10778
|
+
set text($$value) {
|
|
10779
|
+
newText = $$value;
|
|
10780
|
+
$$settled = false;
|
|
10781
|
+
},
|
|
10782
|
+
get label() {
|
|
10783
|
+
return newLabel;
|
|
10784
|
+
},
|
|
10785
|
+
set label($$value) {
|
|
10786
|
+
newLabel = $$value;
|
|
10787
|
+
$$settled = false;
|
|
10788
|
+
},
|
|
10789
|
+
get tags() {
|
|
10790
|
+
return newTags;
|
|
10791
|
+
},
|
|
10792
|
+
set tags($$value) {
|
|
10793
|
+
newTags = $$value;
|
|
10794
|
+
$$settled = false;
|
|
10795
|
+
}
|
|
10796
|
+
});
|
|
10797
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10798
|
+
$$renderer.push(`<!--]--> `);
|
|
10799
|
+
PromptManagerContainer($$renderer, {
|
|
10800
|
+
children: ($$renderer) => {
|
|
10801
|
+
if (loading$1) {
|
|
10182
10802
|
$$renderer.push("<!--[0-->");
|
|
10183
|
-
$$renderer.push(`<
|
|
10184
|
-
|
|
10185
|
-
$$renderer.push(
|
|
10186
|
-
|
|
10187
|
-
$$renderer.push(`<!----></tr>`);
|
|
10803
|
+
$$renderer.push(`<div class="mgr-loading svelte-1t3fglc">${escape_html(t(loading))}</div>`);
|
|
10804
|
+
} else if (rows.length === 0) {
|
|
10805
|
+
$$renderer.push("<!--[1-->");
|
|
10806
|
+
$$renderer.push(`<div class="mgr-empty svelte-1t3fglc">${escape_html(searchQ ? t(nopromptsmatch2) : t(nopromptsyet2))}</div>`);
|
|
10188
10807
|
} else {
|
|
10189
10808
|
$$renderer.push("<!--[-1-->");
|
|
10190
|
-
$$renderer.push(`<
|
|
10191
|
-
|
|
10192
|
-
$$
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10809
|
+
$$renderer.push(`<table class="mgr-table mgr-body-table svelte-1t3fglc"><tbody class="svelte-1t3fglc"><!--[-->`);
|
|
10810
|
+
const each_array = ensure_array_like(visibleRows());
|
|
10811
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
10812
|
+
let row = each_array[$$index];
|
|
10813
|
+
if (editingId === row.id) {
|
|
10814
|
+
$$renderer.push("<!--[0-->");
|
|
10815
|
+
$$renderer.push(`<tr class="mgr-editing svelte-1t3fglc"><td></td><td>${escape_html(row.use_count)}</td>`);
|
|
10816
|
+
PromptManagerTDLabel($$renderer, {
|
|
10817
|
+
row,
|
|
10818
|
+
textMode
|
|
10819
|
+
});
|
|
10820
|
+
$$renderer.push(`<!----><td class="mgr-macro-col svelte-1t3fglc">${escape_html(row.macro === 1 ? "✓" : "—")}</td>`);
|
|
10821
|
+
PromptManagerTDTags($$renderer, { row });
|
|
10822
|
+
$$renderer.push(`<!----></tr>`);
|
|
10823
|
+
} else {
|
|
10824
|
+
$$renderer.push("<!--[-1-->");
|
|
10825
|
+
$$renderer.push(`<tr${attr_class("svelte-1t3fglc", void 0, { "sel": selected.has(row.id) })}><td class="mgr-sel-col svelte-1t3fglc"><input type="checkbox" class="mgr-check svelte-1t3fglc"${attr("checked", selected.has(row.id), true)} aria-label="Select prompt"/></td>`);
|
|
10826
|
+
PromptManagerTDUses($$renderer, { row });
|
|
10827
|
+
$$renderer.push(`<!---->`);
|
|
10828
|
+
PromptManagerTDLabel($$renderer, {
|
|
10829
|
+
row,
|
|
10830
|
+
textMode
|
|
10831
|
+
});
|
|
10832
|
+
$$renderer.push(`<!----><td class="mgr-macro-col svelte-1t3fglc"><button type="button"${attr_class("mgr-macro-toggle svelte-1t3fglc", void 0, { "on": row.macro === 1 })}${attr("aria-pressed", row.macro === 1)}${attr("title", row.macro === 1 ? "Macro — click to turn off" : "Not a macro — click to turn on")}>${escape_html(row.macro === 1 ? "✓" : "—")}</button></td>`);
|
|
10833
|
+
PromptManagerTDTags($$renderer, { row });
|
|
10834
|
+
$$renderer.push(`<!----></tr>`);
|
|
10835
|
+
}
|
|
10836
|
+
$$renderer.push(`<!--]-->`);
|
|
10837
|
+
}
|
|
10838
|
+
$$renderer.push(`<!--]--></tbody></table> `);
|
|
10839
|
+
if (total > rows.length) {
|
|
10840
|
+
$$renderer.push("<!--[0-->");
|
|
10841
|
+
$$renderer.push(`<div class="mgr-footer svelte-1t3fglc">${escape_html(total - rows.length)} ${escape_html(t(morerefine1))}</div>`);
|
|
10842
|
+
} else $$renderer.push("<!--[-1-->");
|
|
10843
|
+
$$renderer.push(`<!--]-->`);
|
|
10197
10844
|
}
|
|
10198
10845
|
$$renderer.push(`<!--]-->`);
|
|
10199
|
-
}
|
|
10200
|
-
|
|
10201
|
-
if (total > rows.length) {
|
|
10202
|
-
$$renderer.push("<!--[0-->");
|
|
10203
|
-
$$renderer.push(`<div class="mgr-footer svelte-1kuoadm">${escape_html(total - rows.length)} ${escape_html(t(morerefine1))}</div>`);
|
|
10204
|
-
} else $$renderer.push("<!--[-1-->");
|
|
10205
|
-
$$renderer.push(`<!--]-->`);
|
|
10206
|
-
}
|
|
10207
|
-
$$renderer.push(`<!--]--></div> `);
|
|
10846
|
+
}});
|
|
10847
|
+
$$renderer.push(`<!----></div> `);
|
|
10208
10848
|
$$renderer.push("<!--[-1-->");
|
|
10209
10849
|
$$renderer.push(`<!--]-->`);
|
|
10210
10850
|
}
|
|
@@ -10747,7 +11387,7 @@ function rowFactsByPanelId(rows) {
|
|
|
10747
11387
|
return new Map(rows.map((r) => [r.panel.id, r]));
|
|
10748
11388
|
}
|
|
10749
11389
|
//#endregion
|
|
10750
|
-
//#region src/lib/components/
|
|
11390
|
+
//#region src/lib/components/prompt-manager/PromptsManagerDialog.svelte
|
|
10751
11391
|
function PromptsManagerDialog($$renderer, $$props) {
|
|
10752
11392
|
$$renderer.component(($$renderer) => {
|
|
10753
11393
|
/**
|
|
@@ -10769,7 +11409,7 @@ function PromptsManagerDialog($$renderer, $$props) {
|
|
|
10769
11409
|
* {#if} — onclose unmounts it.
|
|
10770
11410
|
*/
|
|
10771
11411
|
let { onclose, onchanged } = $$props;
|
|
10772
|
-
$$renderer.push(`<div data-svelte="PromptsManagerDialog" class="mgr-backdrop svelte-
|
|
11412
|
+
$$renderer.push(`<div data-svelte="PromptsManagerDialog" class="mgr-backdrop svelte-2gs0br" role="presentation"></div> <div data-svelte="PromptsManagerDialog" class="mgr-modal svelte-2gs0br" role="dialog"${attr("aria-label", t(managesavedprompts2))} tabindex="-1"><div class="mgr-dialog-header svelte-2gs0br"><div class="mgr-dialog-title svelte-2gs0br">${escape_html(MANAGER_ROW_TITLE)}</div> <button type="button" class="mgr-dialog-close svelte-2gs0br"${attr("aria-label", t(close))}>×</button></div> <div class="mgr-dialog-body svelte-2gs0br">`);
|
|
10773
11413
|
PromptManagerPanel($$renderer, {
|
|
10774
11414
|
onclose,
|
|
10775
11415
|
onchanged
|
|
@@ -21366,4 +22006,4 @@ function _page($$renderer, $$props) {
|
|
|
21366
22006
|
}
|
|
21367
22007
|
|
|
21368
22008
|
export { _page as default };
|
|
21369
|
-
//# sourceMappingURL=_page.svelte.js-
|
|
22009
|
+
//# sourceMappingURL=_page.svelte.js-D63btYnK.js.map
|