codexmate 0.1.23 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/cli.js +4 -1
  2. package/package.json +1 -1
  3. package/plugins/prompt-templates/computed.mjs +1 -1
  4. package/plugins/prompt-templates/index.mjs +3 -3
  5. package/plugins/prompt-templates/manifest.mjs +5 -3
  6. package/plugins/prompt-templates/methods.mjs +9 -2
  7. package/plugins/registry.mjs +5 -2
  8. package/plugins/text-tools/computed.mjs +23 -0
  9. package/plugins/text-tools/index.mjs +14 -0
  10. package/plugins/text-tools/manifest.mjs +20 -0
  11. package/plugins/text-tools/methods.mjs +24 -0
  12. package/plugins/text-tools/overview.mjs +12 -0
  13. package/plugins/text-tools/ownership.mjs +7 -0
  14. package/web-ui/app.js +5 -2
  15. package/web-ui/index.html +0 -1
  16. package/web-ui/logic.markdown-editor.mjs +5 -57
  17. package/web-ui/logic.prompts-change-axis.mjs +3 -88
  18. package/web-ui/logic.prompts-path-reference.mjs +118 -0
  19. package/web-ui/modules/app.methods.agents.mjs +1 -0
  20. package/web-ui/modules/app.methods.index.mjs +1 -1
  21. package/web-ui/modules/app.methods.navigation.mjs +79 -3
  22. package/web-ui/modules/app.methods.prompts-editor.mjs +140 -145
  23. package/web-ui/modules/app.methods.web-ui-preferences.mjs +7 -1
  24. package/web-ui/modules/i18n/locales/en.mjs +22 -1
  25. package/web-ui/modules/i18n/locales/ja.mjs +22 -1
  26. package/web-ui/modules/i18n/locales/vi.mjs +22 -1
  27. package/web-ui/modules/i18n/locales/zh-tw.mjs +22 -1
  28. package/web-ui/modules/i18n/locales/zh.mjs +22 -1
  29. package/web-ui/modules/plugins.computed.mjs +8 -2
  30. package/web-ui/modules/plugins.methods.mjs +8 -2
  31. package/web-ui/partials/index/layout-header.html +19 -4
  32. package/web-ui/partials/index/panel-plugins.html +45 -5
  33. package/web-ui/partials/index/panel-prompts.html +24 -31
  34. package/web-ui/res/web-ui-render.precompiled.js +142 -130
  35. package/web-ui/session-helpers.mjs +0 -1
  36. package/web-ui/source-bundle.cjs +1 -0
  37. package/web-ui/styles/prompts-editor.css +20 -91
@@ -485,10 +485,11 @@ return function render(_ctx, _cache) {
485
485
  _createElementVNode("button", {
486
486
  id: "side-tab-plugins",
487
487
  "data-main-tab": "plugins",
488
- "aria-current": _ctx.mainTab === 'plugins' ? 'page' : null,
489
- class: _normalizeClass(['side-item', { active: _ctx.isMainTabNavActive('plugins') }]),
490
- onPointerdown: $event => (_ctx.onMainTabPointerDown('plugins', $event)),
491
- onClick: $event => (_ctx.onMainTabClick('plugins', $event))
488
+ "data-plugins-id": "prompt-templates",
489
+ "aria-current": _ctx.mainTab === 'plugins' && _ctx.pluginsActiveId === 'prompt-templates' ? 'page' : null,
490
+ class: _normalizeClass(['side-item', { active: _ctx.isPluginsIdNavActive('prompt-templates') }]),
491
+ onPointerdown: $event => (_ctx.onPluginsTabPointerDown('prompt-templates', $event)),
492
+ onClick: $event => (_ctx.onPluginsTabClick('prompt-templates', $event))
492
493
  }, [
493
494
  _createElementVNode("span", {
494
495
  class: "side-item-icon",
@@ -499,6 +500,24 @@ return function render(_ctx, _cache) {
499
500
  _createElementVNode("span", null, _toDisplayString(_ctx.t('side.plugins.tools.meta')), 1 /* TEXT */),
500
501
  _createElementVNode("span", null, _toDisplayString(_ctx.t('side.plugins.templatesCount', { count: _ctx.promptTemplatesList.length })), 1 /* TEXT */)
501
502
  ])
503
+ ], 42 /* CLASS, PROPS, NEED_HYDRATION */, ["aria-current", "onPointerdown", "onClick"]),
504
+ _createElementVNode("button", {
505
+ id: "side-tab-plugins-text-tools",
506
+ "data-main-tab": "plugins",
507
+ "data-plugins-id": "text-tools",
508
+ "aria-current": _ctx.mainTab === 'plugins' && _ctx.pluginsActiveId === 'text-tools' ? 'page' : null,
509
+ class: _normalizeClass(['side-item', { active: _ctx.isPluginsIdNavActive('text-tools') }]),
510
+ onPointerdown: $event => (_ctx.onPluginsTabPointerDown('text-tools', $event)),
511
+ onClick: $event => (_ctx.onPluginsTabClick('text-tools', $event))
512
+ }, [
513
+ _createElementVNode("span", {
514
+ class: "side-item-icon",
515
+ "aria-hidden": "true"
516
+ }, "▤"),
517
+ _createElementVNode("div", { class: "side-item-title" }, _toDisplayString(_ctx.t('plugins.catalog.textTools.title')), 1 /* TEXT */),
518
+ _createElementVNode("div", { class: "side-item-meta" }, [
519
+ _createElementVNode("span", null, _toDisplayString(_ctx.t('plugins.textTools.tools.compress')), 1 /* TEXT */)
520
+ ])
502
521
  ], 42 /* CLASS, PROPS, NEED_HYDRATION */, ["aria-current", "onPointerdown", "onClick"])
503
522
  ], 8 /* PROPS */, ["aria-label"]),
504
523
  _createElementVNode("div", {
@@ -6330,14 +6349,6 @@ return function render(_ctx, _cache) {
6330
6349
  _createElementVNode("div", null, [
6331
6350
  _createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('plugins.sidebar.title')), 1 /* TEXT */),
6332
6351
  _createElementVNode("div", { class: "plugins-panel-note" }, _toDisplayString(_ctx.t('plugins.sidebar.note')), 1 /* TEXT */)
6333
- ]),
6334
- _createElementVNode("div", { class: "settings-tab-actions" }, [
6335
- _createElementVNode("button", {
6336
- type: "button",
6337
- class: "btn-tool btn-tool-compact",
6338
- onClick: $event => (_ctx.loadPluginsOverview({ forceRefresh: true, silent: false })),
6339
- disabled: _ctx.loading || !!_ctx.initError || _ctx.pluginsLoading
6340
- }, _toDisplayString(_ctx.pluginsLoading ? _ctx.t('plugins.refreshing') : _ctx.t('plugins.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
6341
6352
  ])
6342
6353
  ]),
6343
6354
  _createElementVNode("div", {
@@ -6845,10 +6856,83 @@ return function render(_ctx, _cache) {
6845
6856
  ])
6846
6857
  ]))
6847
6858
  ]))
6848
- : (_openBlock(), _createElementBlock("div", {
6849
- key: 3,
6850
- class: "skills-empty-state"
6851
- }, _toDisplayString(_ctx.t('plugins.promptTemplates.noPluginSelected')), 1 /* TEXT */))
6859
+ : (_ctx.pluginsActiveId === 'text-tools')
6860
+ ? (_openBlock(), _createElementBlock("div", {
6861
+ key: 3,
6862
+ class: "plugins-panel"
6863
+ }, [
6864
+ _createElementVNode("div", { class: "plugins-panel-head" }, [
6865
+ _createElementVNode("div", null, [
6866
+ _createElementVNode("div", { class: "plugins-panel-title" }, _toDisplayString(_ctx.t('plugins.textTools.title')), 1 /* TEXT */),
6867
+ (_ctx.pluginsActiveAttribution)
6868
+ ? (_openBlock(), _createElementBlock("div", {
6869
+ key: 0,
6870
+ class: "plugins-panel-note"
6871
+ }, _toDisplayString(_ctx.pluginsActiveAttribution), 1 /* TEXT */))
6872
+ : _createCommentVNode("v-if", true)
6873
+ ])
6874
+ ]),
6875
+ _createElementVNode("div", {
6876
+ class: "prompt-templates-modebar",
6877
+ role: "tablist",
6878
+ "aria-label": _ctx.t('plugins.textTools.tools.aria')
6879
+ }, [
6880
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.textToolsList, (tool) => {
6881
+ return (_openBlock(), _createElementBlock("button", {
6882
+ key: 'text-tool-' + tool.id,
6883
+ type: "button",
6884
+ role: "tab",
6885
+ "aria-selected": _ctx.textToolsActiveToolId === tool.id,
6886
+ class: _normalizeClass(['mode-pill', { active: _ctx.textToolsActiveToolId === tool.id }]),
6887
+ onClick: $event => (_ctx.textToolsActiveToolId = tool.id)
6888
+ }, _toDisplayString(tool.label), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"]))
6889
+ }), 128 /* KEYED_FRAGMENT */))
6890
+ ], 8 /* PROPS */, ["aria-label"]),
6891
+ _createElementVNode("div", { class: "prompt-compose" }, [
6892
+ _createElementVNode("div", { class: "prompt-compose-workspace" }, [
6893
+ _createElementVNode("div", { class: "prompt-compose-main" }, [
6894
+ _createElementVNode("div", { class: "prompt-compose-form" }, [
6895
+ _createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('plugins.textTools.compress.inputLabel')), 1 /* TEXT */),
6896
+ _withDirectives(_createElementVNode("textarea", {
6897
+ class: "form-input prompt-editor-textarea",
6898
+ "onUpdate:modelValue": $event => ((_ctx.textToolsInput) = $event),
6899
+ rows: "10",
6900
+ spellcheck: "false",
6901
+ placeholder: _ctx.t('plugins.textTools.compress.inputPlaceholder'),
6902
+ "aria-label": _ctx.t('plugins.textTools.compress.inputAria')
6903
+ }, null, 8 /* PROPS */, ["onUpdate:modelValue", "placeholder", "aria-label"]), [
6904
+ [_vModelText, _ctx.textToolsInput]
6905
+ ])
6906
+ ])
6907
+ ]),
6908
+ _createElementVNode("div", { class: "prompt-preview-block prompt-compose-preview" }, [
6909
+ _createElementVNode("div", { class: "prompt-vars-head" }, [
6910
+ _createElementVNode("div", null, [
6911
+ _createElementVNode("div", { class: "prompt-vars-title" }, _toDisplayString(_ctx.t('plugins.textTools.compress.outputTitle')), 1 /* TEXT */)
6912
+ ]),
6913
+ _createElementVNode("button", {
6914
+ type: "button",
6915
+ class: "btn-mini",
6916
+ onClick: _ctx.copyTextToolsOutput,
6917
+ disabled: !_ctx.textToolsOutput
6918
+ }, _toDisplayString(_ctx.t('plugins.textTools.compress.copy')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
6919
+ ]),
6920
+ _createElementVNode("textarea", {
6921
+ class: "form-input prompt-preview-textarea",
6922
+ value: _ctx.textToolsOutput,
6923
+ rows: "10",
6924
+ readonly: "",
6925
+ spellcheck: "false",
6926
+ "aria-label": _ctx.t('plugins.textTools.compress.outputAria')
6927
+ }, null, 8 /* PROPS */, ["value", "aria-label"])
6928
+ ])
6929
+ ])
6930
+ ])
6931
+ ]))
6932
+ : (_openBlock(), _createElementBlock("div", {
6933
+ key: 4,
6934
+ class: "skills-empty-state"
6935
+ }, _toDisplayString(_ctx.t('plugins.promptTemplates.noPluginSelected')), 1 /* TEXT */))
6852
6936
  ], 8 /* PROPS */, ["aria-label"])
6853
6937
  ], 2 /* CLASS */)
6854
6938
  ], 512 /* NEED_PATCH */), [
@@ -6953,6 +7037,24 @@ return function render(_ctx, _cache) {
6953
7037
  : _createCommentVNode("v-if", true)
6954
7038
  ]),
6955
7039
  _createElementVNode("div", { class: "prompts-editor-actions" }, [
7040
+ _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
7041
+ _createElementVNode("select", {
7042
+ class: "form-input prompts-path-reference-select",
7043
+ disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible || _ctx.promptsPathReferenceLoading,
7044
+ title: _ctx.t('prompts.pathReference.title'),
7045
+ onFocus: $event => (_ctx.loadPromptsPathReferences()),
7046
+ onChange: $event => (_ctx.insertPromptPathReference($event.target.value, 'agents', $event))
7047
+ }, [
7048
+ _createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.pathReference.placeholder')), 1 /* TEXT */),
7049
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptsPathReferenceOptionList(), (opt) => {
7050
+ return (_openBlock(), _createElementBlock("option", {
7051
+ key: opt.id,
7052
+ value: opt.id,
7053
+ disabled: opt.disabled
7054
+ }, _toDisplayString(opt.label), 9 /* TEXT, PROPS */, ["value", "disabled"]))
7055
+ }), 128 /* KEYED_FRAGMENT */))
7056
+ ], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
7057
+ ]),
6956
7058
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
6957
7059
  _createElementVNode("button", {
6958
7060
  class: "btn-mini",
@@ -7037,7 +7139,7 @@ return function render(_ctx, _cache) {
7037
7139
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
7038
7140
  _createElementVNode("button", {
7039
7141
  class: "btn-mini",
7040
- onClick: _ctx.loadPromptsContent,
7142
+ onClick: $event => (_ctx.agentsDiffVisible ? _ctx.resetAgentsDiffState() : _ctx.loadPromptsContent()),
7041
7143
  disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
7042
7144
  title: _ctx.t('common.cancel')
7043
7145
  }, [
@@ -7051,25 +7153,6 @@ return function render(_ctx, _cache) {
7051
7153
  _createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
7052
7154
  ]))
7053
7155
  ], 8 /* PROPS */, ["onClick", "disabled", "title"]),
7054
- (_ctx.agentsDiffVisible)
7055
- ? (_openBlock(), _createElementBlock("button", {
7056
- key: 0,
7057
- class: "btn-mini",
7058
- onClick: _ctx.resetAgentsDiffState,
7059
- disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
7060
- title: _ctx.t('common.backToEdit')
7061
- }, [
7062
- (_openBlock(), _createElementBlock("svg", {
7063
- class: "btn-icon-sm",
7064
- viewBox: "0 0 24 24",
7065
- fill: "none",
7066
- stroke: "currentColor",
7067
- "stroke-width": "2"
7068
- }, [
7069
- _createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
7070
- ]))
7071
- ], 8 /* PROPS */, ["onClick", "disabled", "title"]))
7072
- : _createCommentVNode("v-if", true),
7073
7156
  _createElementVNode("button", {
7074
7157
  class: "btn-mini btn-confirm-mini",
7075
7158
  onClick: _ctx.applyAgentsContent,
@@ -7407,12 +7490,6 @@ return function render(_ctx, _cache) {
7407
7490
  : _createCommentVNode("v-if", true),
7408
7491
  _createElementVNode("div", { class: "prompts-editor-columns" }, [
7409
7492
  _createElementVNode("div", { class: "prompts-edit-pane" }, [
7410
- _createElementVNode("pre", {
7411
- ref: "promptsAgentsHighlight",
7412
- class: "prompts-highlight-backdrop",
7413
- "aria-hidden": "true",
7414
- innerHTML: _ctx.agentsHighlightHtml
7415
- }, null, 8 /* PROPS */, ["innerHTML"]),
7416
7493
  _withDirectives(_createElementVNode("textarea", {
7417
7494
  ref: "promptsAgentsTextarea",
7418
7495
  "onUpdate:modelValue": $event => ((_ctx.agentsContent) = $event),
@@ -7420,39 +7497,10 @@ return function render(_ctx, _cache) {
7420
7497
  spellcheck: "false",
7421
7498
  readonly: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
7422
7499
  onInput: _ctx.onAgentsContentInput,
7423
- onScroll: $event => (_ctx.syncPromptsOverlayScroll('agents')),
7424
7500
  placeholder: _ctx.t(_ctx.promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')
7425
- }, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "onScroll", "placeholder"]), [
7501
+ }, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "placeholder"]), [
7426
7502
  [_vModelText, _ctx.agentsContent]
7427
- ]),
7428
- (!_ctx.agentsDiffVisible && _ctx.agentsChangeAxis.ticks.length)
7429
- ? (_openBlock(), _createElementBlock("div", {
7430
- key: 0,
7431
- class: "prompts-change-axis",
7432
- role: "navigation",
7433
- "aria-label": _ctx.t('prompts.editor.changeAxis')
7434
- }, [
7435
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.agentsChangeAxis.ticks, (tick, index) => {
7436
- return (_openBlock(), _createElementBlock("button", {
7437
- key: 'agents-change-axis-' + index,
7438
- type: "button",
7439
- class: _normalizeClass(["prompts-change-tick", 'prompts-change-tick--' + tick.kind]),
7440
- style: _normalizeStyle({ top: tick.top + '%', height: tick.height + '%' }),
7441
- title: _ctx.t('prompts.editor.changeAxisTick', { line: tick.startLine, added: tick.added, removed: tick.removed }),
7442
- onClick: $event => (_ctx.jumpToPromptsChangeTick('agents', tick))
7443
- }, null, 14 /* CLASS, STYLE, PROPS */, ["title", "onClick"]))
7444
- }), 128 /* KEYED_FRAGMENT */))
7445
- ], 8 /* PROPS */, ["aria-label"]))
7446
- : (!_ctx.agentsDiffVisible && _ctx.agentsChangeAxis.truncated)
7447
- ? (_openBlock(), _createElementBlock("div", {
7448
- key: 1,
7449
- class: "prompts-change-axis prompts-change-axis--summary",
7450
- title: _ctx.t('prompts.editor.changeAxisTruncated')
7451
- }, [
7452
- _createElementVNode("span", { class: "prompts-change-summary add" }, "+" + _toDisplayString(_ctx.agentsChangeAxis.added), 1 /* TEXT */),
7453
- _createElementVNode("span", { class: "prompts-change-summary del" }, "-" + _toDisplayString(_ctx.agentsChangeAxis.removed), 1 /* TEXT */)
7454
- ], 8 /* PROPS */, ["title"]))
7455
- : _createCommentVNode("v-if", true)
7503
+ ])
7456
7504
  ]),
7457
7505
  (_ctx.promptsPreviewEnabled)
7458
7506
  ? (_openBlock(), _createElementBlock("div", {
@@ -7524,6 +7572,24 @@ return function render(_ctx, _cache) {
7524
7572
  : _createCommentVNode("v-if", true)
7525
7573
  ]),
7526
7574
  _createElementVNode("div", { class: "prompts-editor-actions" }, [
7575
+ _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
7576
+ _createElementVNode("select", {
7577
+ class: "form-input prompts-path-reference-select",
7578
+ disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible || _ctx.promptsPathReferenceLoading,
7579
+ title: _ctx.t('prompts.pathReference.title'),
7580
+ onFocus: $event => (_ctx.loadPromptsPathReferences()),
7581
+ onChange: $event => (_ctx.insertPromptPathReference($event.target.value, 'sys', $event))
7582
+ }, [
7583
+ _createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.pathReference.placeholder')), 1 /* TEXT */),
7584
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptsPathReferenceOptionList(), (opt) => {
7585
+ return (_openBlock(), _createElementBlock("option", {
7586
+ key: opt.id,
7587
+ value: opt.id,
7588
+ disabled: opt.disabled
7589
+ }, _toDisplayString(opt.label), 9 /* TEXT, PROPS */, ["value", "disabled"]))
7590
+ }), 128 /* KEYED_FRAGMENT */))
7591
+ ], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
7592
+ ]),
7527
7593
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
7528
7594
  _createElementVNode("button", {
7529
7595
  class: "btn-mini",
@@ -7608,7 +7674,7 @@ return function render(_ctx, _cache) {
7608
7674
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
7609
7675
  _createElementVNode("button", {
7610
7676
  class: "btn-mini",
7611
- onClick: _ctx.cancelSysPromptEdit,
7677
+ onClick: $event => (_ctx.sysPromptDiffVisible ? _ctx.resetSysPromptDiffState() : _ctx.cancelSysPromptEdit()),
7612
7678
  disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
7613
7679
  title: _ctx.t('common.cancel')
7614
7680
  }, [
@@ -7622,25 +7688,6 @@ return function render(_ctx, _cache) {
7622
7688
  _createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
7623
7689
  ]))
7624
7690
  ], 8 /* PROPS */, ["onClick", "disabled", "title"]),
7625
- (_ctx.sysPromptDiffVisible)
7626
- ? (_openBlock(), _createElementBlock("button", {
7627
- key: 0,
7628
- class: "btn-mini",
7629
- onClick: _ctx.resetSysPromptDiffState,
7630
- disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
7631
- title: _ctx.t('common.backToEdit')
7632
- }, [
7633
- (_openBlock(), _createElementBlock("svg", {
7634
- class: "btn-icon-sm",
7635
- viewBox: "0 0 24 24",
7636
- fill: "none",
7637
- stroke: "currentColor",
7638
- "stroke-width": "2"
7639
- }, [
7640
- _createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
7641
- ]))
7642
- ], 8 /* PROPS */, ["onClick", "disabled", "title"]))
7643
- : _createCommentVNode("v-if", true),
7644
7691
  _createElementVNode("button", {
7645
7692
  class: "btn-mini btn-confirm-mini",
7646
7693
  onClick: _ctx.applySystemPrompt,
@@ -7884,51 +7931,16 @@ return function render(_ctx, _cache) {
7884
7931
  : _createCommentVNode("v-if", true),
7885
7932
  _createElementVNode("div", { class: "prompts-editor-columns" }, [
7886
7933
  _createElementVNode("div", { class: "prompts-edit-pane" }, [
7887
- _createElementVNode("pre", {
7888
- ref: "promptsSysHighlight",
7889
- class: "prompts-highlight-backdrop",
7890
- "aria-hidden": "true",
7891
- innerHTML: _ctx.sysPromptHighlightHtml
7892
- }, null, 8 /* PROPS */, ["innerHTML"]),
7893
7934
  _withDirectives(_createElementVNode("textarea", {
7894
7935
  ref: "promptsSysTextarea",
7895
7936
  "onUpdate:modelValue": $event => ((_ctx.sysPromptContent) = $event),
7896
7937
  class: "form-input template-editor",
7897
7938
  spellcheck: "false",
7898
7939
  readonly: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
7899
- onScroll: $event => (_ctx.syncPromptsOverlayScroll('sys')),
7900
7940
  placeholder: _ctx.t('sysPrompt.placeholder')
7901
- }, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onScroll", "placeholder"]), [
7941
+ }, null, 8 /* PROPS */, ["onUpdate:modelValue", "readonly", "placeholder"]), [
7902
7942
  [_vModelText, _ctx.sysPromptContent]
7903
- ]),
7904
- (!_ctx.sysPromptDiffVisible && _ctx.sysChangeAxis.ticks.length)
7905
- ? (_openBlock(), _createElementBlock("div", {
7906
- key: 0,
7907
- class: "prompts-change-axis",
7908
- role: "navigation",
7909
- "aria-label": _ctx.t('prompts.editor.changeAxis')
7910
- }, [
7911
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sysChangeAxis.ticks, (tick, index) => {
7912
- return (_openBlock(), _createElementBlock("button", {
7913
- key: 'sys-change-axis-' + index,
7914
- type: "button",
7915
- class: _normalizeClass(["prompts-change-tick", 'prompts-change-tick--' + tick.kind]),
7916
- style: _normalizeStyle({ top: tick.top + '%', height: tick.height + '%' }),
7917
- title: _ctx.t('prompts.editor.changeAxisTick', { line: tick.startLine, added: tick.added, removed: tick.removed }),
7918
- onClick: $event => (_ctx.jumpToPromptsChangeTick('sys', tick))
7919
- }, null, 14 /* CLASS, STYLE, PROPS */, ["title", "onClick"]))
7920
- }), 128 /* KEYED_FRAGMENT */))
7921
- ], 8 /* PROPS */, ["aria-label"]))
7922
- : (!_ctx.sysPromptDiffVisible && _ctx.sysChangeAxis.truncated)
7923
- ? (_openBlock(), _createElementBlock("div", {
7924
- key: 1,
7925
- class: "prompts-change-axis prompts-change-axis--summary",
7926
- title: _ctx.t('prompts.editor.changeAxisTruncated')
7927
- }, [
7928
- _createElementVNode("span", { class: "prompts-change-summary add" }, "+" + _toDisplayString(_ctx.sysChangeAxis.added), 1 /* TEXT */),
7929
- _createElementVNode("span", { class: "prompts-change-summary del" }, "-" + _toDisplayString(_ctx.sysChangeAxis.removed), 1 /* TEXT */)
7930
- ], 8 /* PROPS */, ["title"]))
7931
- : _createCommentVNode("v-if", true)
7943
+ ])
7932
7944
  ]),
7933
7945
  (_ctx.promptsPreviewEnabled)
7934
7946
  ? (_openBlock(), _createElementBlock("div", {
@@ -186,7 +186,6 @@ export function switchMainTab(tab) {
186
186
  void Promise.resolve(marketOverviewLoad).catch(() => {});
187
187
  }
188
188
  if (enteringPluginsTab && typeof this.loadPluginsOverview === 'function') {
189
- this.pluginsActiveId = 'prompt-templates';
190
189
  this.promptComposerPickerVisible = false;
191
190
  let pluginsLoad = null;
192
191
  try {
@@ -248,6 +248,7 @@ function transformJavaScriptModuleSource(source, options = {}) {
248
248
  });
249
249
  transformed = transformed.replace(/^[ \t]*export\s+\*\s+from\s+['"]\.[^'"]+['"]\s*;?\s*$/gm, '');
250
250
  if (!preserveExports) {
251
+ transformed = transformed.replace(/^[ \t]*export\s*\{[^{}\n]*\}\s*;?\s*$/gm, '');
251
252
  transformed = transformed.replace(/(^|\n)([ \t]*)export\s+(?=(?:async\s+function|const|let|class|function)\b)/g, '$1$2');
252
253
  }
253
254
  return transformed.trimEnd();
@@ -1,10 +1,7 @@
1
1
  /*
2
- * Prompts-panel Markdown editor: syntax-highlight overlay, toolbar,
3
- * split live preview (desktop) and edit/preview switch (mobile).
4
- * Overlay alignment contract: the backdrop <pre> must mirror the
5
- * textarea's font, font-size, line-height, padding and white-space
6
- * exactly (.form-input padding 13px var(--spacing-sm), .template-editor
7
- * mono font 13px / 1.45, white-space pre).
2
+ * Prompts-panel Markdown editor: split live preview (desktop) and
3
+ * edit/preview switch (mobile). The editor pane itself is a plain
4
+ * textarea without any syntax-highlight overlay.
8
5
  */
9
6
 
10
7
  .prompts-md-toolbar {
@@ -125,66 +122,6 @@
125
122
  width: 100%;
126
123
  min-height: 75vh;
127
124
  max-height: none;
128
- color: transparent;
129
- caret-color: var(--color-text-primary);
130
- background: transparent;
131
- position: relative;
132
- z-index: 2;
133
- }
134
-
135
- .prompts-edit-pane .template-editor::selection {
136
- color: transparent;
137
- background: var(--color-brand-subtle);
138
- }
139
-
140
- .prompts-highlight-backdrop {
141
- position: absolute;
142
- inset: 0;
143
- z-index: 1;
144
- margin: 0;
145
- padding: 13px var(--spacing-sm);
146
- border: none;
147
- overflow: hidden;
148
- white-space: pre;
149
- font-family: var(--font-family-mono);
150
- font-size: 13px;
151
- line-height: 1.45;
152
- color: var(--color-text-primary);
153
- pointer-events: none;
154
- }
155
-
156
- /* highlight.js markdown token colors (light theme) */
157
- .prompts-highlight-backdrop .hljs-section {
158
- color: var(--color-brand-dark);
159
- font-weight: var(--font-weight-secondary);
160
- }
161
-
162
- .prompts-highlight-backdrop .hljs-strong {
163
- color: var(--color-text-primary);
164
- font-weight: 700;
165
- }
166
-
167
- .prompts-highlight-backdrop .hljs-emphasis {
168
- color: var(--color-text-secondary);
169
- font-style: italic;
170
- }
171
-
172
- .prompts-highlight-backdrop .hljs-bullet {
173
- color: var(--color-brand);
174
- }
175
-
176
- .prompts-highlight-backdrop .hljs-code {
177
- color: #7C5CBF;
178
- }
179
-
180
- .prompts-highlight-backdrop .hljs-quote {
181
- color: var(--color-text-tertiary);
182
- font-style: italic;
183
- }
184
-
185
- .prompts-highlight-backdrop .hljs-link,
186
- .prompts-highlight-backdrop .hljs-symbol {
187
- color: #3B7EA1;
188
125
  }
189
126
 
190
127
  .prompts-preview-pane {
@@ -364,31 +301,6 @@
364
301
  position: relative;
365
302
  }
366
303
 
367
- .prompts-change-axis--summary {
368
- display: flex;
369
- flex-direction: column;
370
- align-items: flex-end;
371
- gap: 2px;
372
- width: auto;
373
- font-size: 10px;
374
- font-weight: var(--font-weight-secondary);
375
- }
376
-
377
- .prompts-change-summary {
378
- padding: 0 6px;
379
- border-radius: 999px;
380
- white-space: nowrap;
381
- }
382
-
383
- .prompts-change-summary.add {
384
- color: #2b6a3b;
385
- background: rgba(57, 181, 97, 0.12);
386
- }
387
-
388
- .prompts-change-summary.del {
389
- color: #8a2f36;
390
- background: rgba(220, 95, 108, 0.12);
391
- }
392
304
  /* Mobile: force single column and edit/preview tab switching */
393
305
  @media (max-width: 767.98px) {
394
306
  .prompts-mobile-view-switch {
@@ -420,3 +332,20 @@
420
332
  min-height: 12px;
421
333
  }
422
334
  }
335
+
336
+
337
+ .prompts-editor-group--pathref .prompts-path-reference-select {
338
+ width: auto;
339
+ max-width: 190px;
340
+ min-width: 120px;
341
+ padding: 5px 8px;
342
+ font-size: var(--font-size-caption);
343
+ color: var(--color-text-secondary);
344
+ cursor: pointer;
345
+ flex-shrink: 1;
346
+ }
347
+
348
+ .prompts-editor-group--pathref .prompts-path-reference-select:disabled {
349
+ opacity: 0.6;
350
+ cursor: not-allowed;
351
+ }