codexmate 0.1.6 → 0.1.8
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 +3 -1
- package/README.vi.md +6 -3
- package/README.zh.md +6 -3
- package/cli/system-prompt-files.js +177 -0
- package/cli.js +27 -0
- package/package.json +1 -1
- package/skills/{codexmate-project-context-recovery → context-recovery}/SKILL.md +2 -2
- package/web-ui/app.js +19 -0
- package/web-ui/modules/app.computed.session.mjs +1 -1
- package/web-ui/modules/app.methods.agents.mjs +5 -12
- package/web-ui/modules/app.methods.index.mjs +2 -0
- package/web-ui/modules/app.methods.session-actions.mjs +27 -0
- package/web-ui/modules/app.methods.session-browser.mjs +21 -1
- package/web-ui/modules/app.methods.session-trash.mjs +5 -0
- package/web-ui/modules/app.methods.system-prompt.mjs +294 -0
- package/web-ui/modules/i18n/locales/en.mjs +29 -0
- package/web-ui/modules/i18n/locales/ja.mjs +43 -0
- package/web-ui/modules/i18n/locales/vi.mjs +27 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +27 -0
- package/web-ui/modules/i18n/locales/zh.mjs +27 -0
- package/web-ui/modules/request-token.mjs +9 -0
- package/web-ui/partials/index/panel-prompts.html +96 -1
- package/web-ui/partials/index/panel-settings.html +0 -23
- package/web-ui/partials/index/panel-trash.html +36 -1
- package/web-ui/res/web-ui-render.precompiled.js +750 -456
- package/web-ui/session-helpers.mjs +9 -0
- package/web-ui/styles/responsive.css +18 -0
- package/web-ui/styles/sessions-list.css +5 -0
- package/web-ui/styles/sessions-usage.css +20 -1
- package/web-ui/styles/system-prompt.css +23 -0
- package/web-ui/styles/trash-panel.css +9 -0
- package/web-ui/styles.css +1 -0
- /package/skills/{codexmate-project-context-recovery → context-recovery}/scripts/search_sessions.py +0 -0
|
@@ -5886,42 +5886,6 @@ return function render(_ctx, _cache) {
|
|
|
5886
5886
|
}, _toDisplayString(_ctx.providerCacheSyncing ? _ctx.t('settings.providerCache.syncing') : _ctx.t('settings.providerCache.sync')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
5887
5887
|
])
|
|
5888
5888
|
], 8 /* PROPS */, ["aria-label"]),
|
|
5889
|
-
_createElementVNode("section", {
|
|
5890
|
-
class: "settings-card",
|
|
5891
|
-
"aria-label": _ctx.t('settings.trashConfig.title')
|
|
5892
|
-
}, [
|
|
5893
|
-
_createElementVNode("div", { class: "settings-card-main" }, [
|
|
5894
|
-
_createElementVNode("div", { class: "settings-card-content" }, [
|
|
5895
|
-
_createElementVNode("div", { class: "settings-card-title" }, _toDisplayString(_ctx.t('settings.trashConfig.title')), 1 /* TEXT */),
|
|
5896
|
-
_createElementVNode("p", { class: "settings-card-desc" }, _toDisplayString(_ctx.t('settings.trashConfig.meta')), 1 /* TEXT */),
|
|
5897
|
-
_createElementVNode("label", { class: "settings-toggle-row" }, [
|
|
5898
|
-
_createElementVNode("input", {
|
|
5899
|
-
type: "checkbox",
|
|
5900
|
-
checked: _ctx.sessionTrashEnabled,
|
|
5901
|
-
onChange: $event => (_ctx.setSessionTrashEnabled($event.target.checked))
|
|
5902
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["checked", "onChange"]),
|
|
5903
|
-
_createElementVNode("span", { class: "toggle-track" }, [
|
|
5904
|
-
_createElementVNode("span", { class: "toggle-thumb" })
|
|
5905
|
-
]),
|
|
5906
|
-
_createElementVNode("span", null, _toDisplayString(_ctx.t('settings.deleteBehavior.toggle')), 1 /* TEXT */)
|
|
5907
|
-
]),
|
|
5908
|
-
_createElementVNode("div", { class: "settings-retention" }, [
|
|
5909
|
-
_createElementVNode("label", { for: "settings-trash-retention-days" }, _toDisplayString(_ctx.t('settings.trash.retentionLabel')), 1 /* TEXT */),
|
|
5910
|
-
_createElementVNode("input", {
|
|
5911
|
-
id: "settings-trash-retention-days",
|
|
5912
|
-
type: "number",
|
|
5913
|
-
min: "1",
|
|
5914
|
-
max: "365",
|
|
5915
|
-
value: _ctx.sessionTrashRetentionDays,
|
|
5916
|
-
onChange: $event => (_ctx.setSessionTrashRetentionDays(Number($event.target.value))),
|
|
5917
|
-
class: "settings-retention-input"
|
|
5918
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange"]),
|
|
5919
|
-
_createElementVNode("span", null, _toDisplayString(_ctx.t('settings.trash.retentionUnit')), 1 /* TEXT */)
|
|
5920
|
-
]),
|
|
5921
|
-
_createElementVNode("p", { class: "settings-card-hint" }, _toDisplayString(_ctx.t('settings.trash.retentionHint')), 1 /* TEXT */)
|
|
5922
|
-
])
|
|
5923
|
-
])
|
|
5924
|
-
], 8 /* PROPS */, ["aria-label"]),
|
|
5925
5889
|
_createElementVNode("section", {
|
|
5926
5890
|
class: "settings-card settings-card--destructive",
|
|
5927
5891
|
"aria-label": _ctx.t('settings.reset.title')
|
|
@@ -5958,11 +5922,48 @@ return function render(_ctx, _cache) {
|
|
|
5958
5922
|
key: 0,
|
|
5959
5923
|
class: "trash-panel-shell"
|
|
5960
5924
|
}, [
|
|
5961
|
-
_createCommentVNode("
|
|
5962
|
-
(
|
|
5925
|
+
_createCommentVNode(" Trash configuration "),
|
|
5926
|
+
_createElementVNode("section", {
|
|
5927
|
+
class: "settings-card trash-config-card",
|
|
5928
|
+
"aria-label": _ctx.t('settings.trashConfig.title')
|
|
5929
|
+
}, [
|
|
5930
|
+
_createElementVNode("div", { class: "settings-card-main" }, [
|
|
5931
|
+
_createElementVNode("div", { class: "settings-card-content" }, [
|
|
5932
|
+
_createElementVNode("div", { class: "settings-card-title" }, _toDisplayString(_ctx.t('settings.trashConfig.title')), 1 /* TEXT */),
|
|
5933
|
+
_createElementVNode("p", { class: "settings-card-desc" }, _toDisplayString(_ctx.t('settings.trashConfig.meta')), 1 /* TEXT */),
|
|
5934
|
+
_createElementVNode("label", { class: "settings-toggle-row" }, [
|
|
5935
|
+
_createElementVNode("input", {
|
|
5936
|
+
type: "checkbox",
|
|
5937
|
+
checked: _ctx.sessionTrashEnabled,
|
|
5938
|
+
onChange: $event => (_ctx.setSessionTrashEnabled($event.target.checked))
|
|
5939
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["checked", "onChange"]),
|
|
5940
|
+
_createElementVNode("span", { class: "toggle-track" }, [
|
|
5941
|
+
_createElementVNode("span", { class: "toggle-thumb" })
|
|
5942
|
+
]),
|
|
5943
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('settings.deleteBehavior.toggle')), 1 /* TEXT */)
|
|
5944
|
+
]),
|
|
5945
|
+
_createElementVNode("div", { class: "settings-retention" }, [
|
|
5946
|
+
_createElementVNode("label", { for: "settings-trash-retention-days" }, _toDisplayString(_ctx.t('settings.trash.retentionLabel')), 1 /* TEXT */),
|
|
5947
|
+
_createElementVNode("input", {
|
|
5948
|
+
id: "settings-trash-retention-days",
|
|
5949
|
+
type: "number",
|
|
5950
|
+
min: "1",
|
|
5951
|
+
max: "365",
|
|
5952
|
+
value: _ctx.sessionTrashRetentionDays,
|
|
5953
|
+
onChange: $event => (_ctx.setSessionTrashRetentionDays(Number($event.target.value))),
|
|
5954
|
+
class: "settings-retention-input"
|
|
5955
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange"]),
|
|
5956
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('settings.trash.retentionUnit')), 1 /* TEXT */)
|
|
5957
|
+
]),
|
|
5958
|
+
_createElementVNode("p", { class: "settings-card-hint" }, _toDisplayString(_ctx.t('settings.trash.retentionHint')), 1 /* TEXT */)
|
|
5959
|
+
])
|
|
5960
|
+
])
|
|
5961
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
5962
|
+
_createCommentVNode(" Disabled state "),
|
|
5963
|
+
(_ctx.getSessionTrashViewState() === 'disabled')
|
|
5963
5964
|
? (_openBlock(), _createElementBlock("div", {
|
|
5964
5965
|
key: 0,
|
|
5965
|
-
class: "trash-empty-state"
|
|
5966
|
+
class: "trash-empty-state trash-disabled-state"
|
|
5966
5967
|
}, [
|
|
5967
5968
|
(_openBlock(), _createElementBlock("svg", {
|
|
5968
5969
|
class: "trash-empty-svg",
|
|
@@ -5975,158 +5976,182 @@ return function render(_ctx, _cache) {
|
|
|
5975
5976
|
_createElementVNode("path", { d: "M14 22h36" }),
|
|
5976
5977
|
_createElementVNode("path", { d: "M24 22v-4a4 4 0 014-4h8a4 4 0 014 4v4" }),
|
|
5977
5978
|
_createElementVNode("path", {
|
|
5978
|
-
d: "
|
|
5979
|
-
"stroke-width": "
|
|
5979
|
+
d: "M10 10l44 44",
|
|
5980
|
+
"stroke-width": "2",
|
|
5980
5981
|
"stroke-linecap": "round"
|
|
5981
5982
|
})
|
|
5982
5983
|
])),
|
|
5983
|
-
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.
|
|
5984
|
-
_createElementVNode("div", { class: "trash-empty-hint" }, _toDisplayString(_ctx.t('settings.trash.
|
|
5984
|
+
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.disabled')), 1 /* TEXT */),
|
|
5985
|
+
_createElementVNode("div", { class: "trash-empty-hint" }, _toDisplayString(_ctx.t('settings.trash.disabledHint')), 1 /* TEXT */)
|
|
5985
5986
|
]))
|
|
5986
|
-
: (_ctx.getSessionTrashViewState() === '
|
|
5987
|
+
: (_ctx.getSessionTrashViewState() === 'empty')
|
|
5987
5988
|
? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
5988
|
-
_createCommentVNode("
|
|
5989
|
+
_createCommentVNode(" Empty state "),
|
|
5989
5990
|
_createElementVNode("div", { class: "trash-empty-state" }, [
|
|
5990
|
-
|
|
5991
|
-
|
|
5991
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
5992
|
+
class: "trash-empty-svg",
|
|
5993
|
+
viewBox: "0 0 64 64",
|
|
5994
|
+
fill: "none",
|
|
5995
|
+
stroke: "currentColor",
|
|
5996
|
+
"stroke-width": "1.2"
|
|
5997
|
+
}, [
|
|
5998
|
+
_createElementVNode("path", { d: "M20 22l4 32h16l4-32" }),
|
|
5999
|
+
_createElementVNode("path", { d: "M14 22h36" }),
|
|
6000
|
+
_createElementVNode("path", { d: "M24 22v-4a4 4 0 014-4h8a4 4 0 014 4v4" }),
|
|
6001
|
+
_createElementVNode("path", {
|
|
6002
|
+
d: "M28 30v16M36 30v16",
|
|
6003
|
+
"stroke-width": "1.6",
|
|
6004
|
+
"stroke-linecap": "round"
|
|
6005
|
+
})
|
|
6006
|
+
])),
|
|
6007
|
+
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.empty')), 1 /* TEXT */),
|
|
6008
|
+
_createElementVNode("div", { class: "trash-empty-hint" }, _toDisplayString(_ctx.t('settings.trash.emptyHint', { days: _ctx.sessionTrashRetentionDays })), 1 /* TEXT */)
|
|
5992
6009
|
])
|
|
5993
6010
|
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
|
|
5994
|
-
: (_ctx.getSessionTrashViewState() === '
|
|
6011
|
+
: (_ctx.getSessionTrashViewState() === 'loading')
|
|
5995
6012
|
? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [
|
|
5996
|
-
_createCommentVNode("
|
|
6013
|
+
_createCommentVNode(" Loading state "),
|
|
5997
6014
|
_createElementVNode("div", { class: "trash-empty-state" }, [
|
|
5998
|
-
(
|
|
5999
|
-
|
|
6000
|
-
viewBox: "0 0 64 64",
|
|
6001
|
-
fill: "none",
|
|
6002
|
-
stroke: "currentColor",
|
|
6003
|
-
"stroke-width": "1.2"
|
|
6004
|
-
}, [
|
|
6005
|
-
_createElementVNode("circle", {
|
|
6006
|
-
cx: "32",
|
|
6007
|
-
cy: "32",
|
|
6008
|
-
r: "22"
|
|
6009
|
-
}),
|
|
6010
|
-
_createElementVNode("path", {
|
|
6011
|
-
d: "M32 20v16M32 44v2",
|
|
6012
|
-
"stroke-width": "2",
|
|
6013
|
-
"stroke-linecap": "round"
|
|
6014
|
-
})
|
|
6015
|
-
])),
|
|
6016
|
-
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.retry')), 1 /* TEXT */),
|
|
6017
|
-
_createElementVNode("button", {
|
|
6018
|
-
class: "btn-tool",
|
|
6019
|
-
onClick: $event => (_ctx.loadSessionTrash({ forceRefresh: true }))
|
|
6020
|
-
}, _toDisplayString(_ctx.t('common.retry')), 9 /* TEXT, PROPS */, ["onClick"])
|
|
6015
|
+
_createElementVNode("div", { class: "trash-spinner" }),
|
|
6016
|
+
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.loading')), 1 /* TEXT */)
|
|
6021
6017
|
])
|
|
6022
6018
|
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
|
|
6023
|
-
: (
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
_createElementVNode("div", { class: "trash-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
onClick: $event => (_ctx.loadSessionTrash({ forceRefresh: true })),
|
|
6034
|
-
disabled: _ctx.sessionTrashLoading,
|
|
6035
|
-
"aria-label": _ctx.t('sessions.refresh'),
|
|
6036
|
-
title: _ctx.t('sessions.refresh')
|
|
6019
|
+
: (_ctx.getSessionTrashViewState() === 'retry')
|
|
6020
|
+
? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [
|
|
6021
|
+
_createCommentVNode(" Error state "),
|
|
6022
|
+
_createElementVNode("div", { class: "trash-empty-state" }, [
|
|
6023
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
6024
|
+
class: "trash-empty-svg",
|
|
6025
|
+
viewBox: "0 0 64 64",
|
|
6026
|
+
fill: "none",
|
|
6027
|
+
stroke: "currentColor",
|
|
6028
|
+
"stroke-width": "1.2"
|
|
6037
6029
|
}, [
|
|
6038
|
-
(
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6030
|
+
_createElementVNode("circle", {
|
|
6031
|
+
cx: "32",
|
|
6032
|
+
cy: "32",
|
|
6033
|
+
r: "22"
|
|
6034
|
+
}),
|
|
6035
|
+
_createElementVNode("path", {
|
|
6036
|
+
d: "M32 20v16M32 44v2",
|
|
6042
6037
|
"stroke-width": "2",
|
|
6043
|
-
|
|
6044
|
-
}
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"]),
|
|
6038
|
+
"stroke-linecap": "round"
|
|
6039
|
+
})
|
|
6040
|
+
])),
|
|
6041
|
+
_createElementVNode("div", { class: "trash-empty-title" }, _toDisplayString(_ctx.t('settings.trash.retry')), 1 /* TEXT */),
|
|
6048
6042
|
_createElementVNode("button", {
|
|
6049
|
-
class: "btn-
|
|
6050
|
-
onClick: _ctx.
|
|
6051
|
-
|
|
6052
|
-
}, _toDisplayString(_ctx.sessionTrashClearing ? _ctx.t('settings.trash.clearing') : _ctx.t('settings.trash.clearShort')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6043
|
+
class: "btn-tool",
|
|
6044
|
+
onClick: $event => (_ctx.loadSessionTrash({ forceRefresh: true }))
|
|
6045
|
+
}, _toDisplayString(_ctx.t('common.retry')), 9 /* TEXT, PROPS */, ["onClick"])
|
|
6053
6046
|
])
|
|
6054
|
-
])
|
|
6055
|
-
|
|
6056
|
-
(
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
class: "trash-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6047
|
+
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
|
|
6048
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 4 }, [
|
|
6049
|
+
_createCommentVNode(" List state "),
|
|
6050
|
+
_createElementVNode("div", { class: "trash-toolbar" }, [
|
|
6051
|
+
_createElementVNode("div", { class: "trash-toolbar-left" }, [
|
|
6052
|
+
_createElementVNode("span", { class: "trash-toolbar-count" }, _toDisplayString(_ctx.t('settings.trash.count', { count: _ctx.sessionTrashCount })), 1 /* TEXT */),
|
|
6053
|
+
_createElementVNode("span", { class: "trash-toolbar-retention" }, _toDisplayString(_ctx.t('settings.trash.retentionShort', { days: _ctx.sessionTrashRetentionDays })), 1 /* TEXT */)
|
|
6054
|
+
]),
|
|
6055
|
+
_createElementVNode("div", { class: "trash-toolbar-right" }, [
|
|
6056
|
+
_createElementVNode("button", {
|
|
6057
|
+
class: "btn-mini",
|
|
6058
|
+
onClick: $event => (_ctx.loadSessionTrash({ forceRefresh: true })),
|
|
6059
|
+
disabled: _ctx.sessionTrashLoading,
|
|
6060
|
+
"aria-label": _ctx.t('sessions.refresh'),
|
|
6061
|
+
title: _ctx.t('sessions.refresh')
|
|
6062
|
+
}, [
|
|
6063
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
6064
|
+
viewBox: "0 0 24 24",
|
|
6065
|
+
fill: "none",
|
|
6066
|
+
stroke: "currentColor",
|
|
6067
|
+
"stroke-width": "2",
|
|
6068
|
+
class: "btn-icon-sm"
|
|
6069
|
+
}, [
|
|
6070
|
+
_createElementVNode("path", { d: "M21 2v6h-6M3 12a9 9 0 0115-6.7L21 8M3 22v-6h6M21 12a9 9 0 01-15 6.7L3 16" })
|
|
6071
|
+
]))
|
|
6072
|
+
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"]),
|
|
6073
|
+
_createElementVNode("button", {
|
|
6074
|
+
class: "btn-mini delete",
|
|
6075
|
+
onClick: _ctx.clearSessionTrash,
|
|
6076
|
+
disabled: _ctx.sessionTrashClearing || _ctx.sessionTrashLoading || !(Number(_ctx.sessionTrashCount) > 0)
|
|
6077
|
+
}, _toDisplayString(_ctx.sessionTrashClearing ? _ctx.t('settings.trash.clearing') : _ctx.t('settings.trash.clearShort')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6078
|
+
])
|
|
6079
|
+
]),
|
|
6080
|
+
_createElementVNode("div", { class: "trash-list" }, [
|
|
6081
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.visibleSessionTrashItems, (item) => {
|
|
6082
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
6083
|
+
key: item.trashId,
|
|
6084
|
+
class: "trash-item"
|
|
6085
|
+
}, [
|
|
6086
|
+
_createElementVNode("div", { class: "trash-item-body" }, [
|
|
6087
|
+
_createElementVNode("div", { class: "trash-item-main" }, [
|
|
6088
|
+
_createElementVNode("div", { class: "trash-item-title" }, _toDisplayString(item.title || item.sessionId), 1 /* TEXT */),
|
|
6089
|
+
_createElementVNode("div", { class: "trash-item-meta" }, [
|
|
6090
|
+
_createElementVNode("span", {
|
|
6091
|
+
class: "session-source",
|
|
6092
|
+
"data-source": item.source
|
|
6093
|
+
}, _toDisplayString(item.sourceLabel), 9 /* TEXT, PROPS */, ["data-source"]),
|
|
6094
|
+
_createElementVNode("span", { class: "trash-item-time" }, _toDisplayString(item.deletedAt || item.updatedAt || _ctx.t('sessions.unknownTime')), 1 /* TEXT */),
|
|
6095
|
+
(item.cwd)
|
|
6096
|
+
? (_openBlock(), _createElementBlock("span", {
|
|
6097
|
+
key: 0,
|
|
6098
|
+
class: "trash-item-cwd"
|
|
6099
|
+
}, _toDisplayString(item.cwd), 1 /* TEXT */))
|
|
6100
|
+
: _createCommentVNode("v-if", true)
|
|
6101
|
+
])
|
|
6102
|
+
]),
|
|
6103
|
+
_createElementVNode("div", { class: "trash-item-actions" }, [
|
|
6104
|
+
_createElementVNode("button", {
|
|
6105
|
+
class: "trash-action-btn restore",
|
|
6106
|
+
onClick: $event => (_ctx.restoreSessionTrash(item)),
|
|
6107
|
+
disabled: _ctx.sessionTrashLoading || _ctx.sessionTrashClearing || _ctx.isSessionTrashActionBusy(item),
|
|
6108
|
+
"aria-label": _ctx.sessionTrashRestoring[_ctx.getSessionTrashActionKey(item)] ? _ctx.t('settings.trash.restoring') : _ctx.t('settings.trash.restore'),
|
|
6109
|
+
title: _ctx.sessionTrashRestoring[_ctx.getSessionTrashActionKey(item)] ? _ctx.t('settings.trash.restoring') : _ctx.t('settings.trash.restore')
|
|
6091
6110
|
}, [
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6111
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
6112
|
+
viewBox: "0 0 24 24",
|
|
6113
|
+
fill: "none",
|
|
6114
|
+
stroke: "currentColor",
|
|
6115
|
+
"stroke-width": "2"
|
|
6116
|
+
}, [
|
|
6117
|
+
_createElementVNode("path", { d: "M3 12a9 9 0 119 9" }),
|
|
6118
|
+
_createElementVNode("path", { d: "M3 4v6h6" })
|
|
6119
|
+
]))
|
|
6120
|
+
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"]),
|
|
6121
|
+
_createElementVNode("button", {
|
|
6122
|
+
class: "trash-action-btn delete",
|
|
6123
|
+
onClick: $event => (_ctx.purgeSessionTrash(item)),
|
|
6124
|
+
disabled: _ctx.sessionTrashLoading || _ctx.sessionTrashClearing || _ctx.isSessionTrashActionBusy(item),
|
|
6125
|
+
"aria-label": _ctx.sessionTrashPurging[_ctx.getSessionTrashActionKey(item)] ? _ctx.t('settings.trash.purging') : _ctx.t('settings.trash.purge'),
|
|
6126
|
+
title: _ctx.sessionTrashPurging[_ctx.getSessionTrashActionKey(item)] ? _ctx.t('settings.trash.purging') : _ctx.t('settings.trash.purge')
|
|
6108
6127
|
}, [
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6128
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
6129
|
+
viewBox: "0 0 24 24",
|
|
6130
|
+
fill: "none",
|
|
6131
|
+
stroke: "currentColor",
|
|
6132
|
+
"stroke-width": "2"
|
|
6133
|
+
}, [
|
|
6134
|
+
_createElementVNode("path", { d: "M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6M10 11v6M14 11v6" })
|
|
6135
|
+
]))
|
|
6136
|
+
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"])
|
|
6137
|
+
])
|
|
6112
6138
|
])
|
|
6113
|
-
])
|
|
6114
|
-
]))
|
|
6115
|
-
}), 128 /* KEYED_FRAGMENT */)),
|
|
6116
|
-
(_ctx.sessionTrashHasMoreItems)
|
|
6117
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
6118
|
-
key: 0,
|
|
6119
|
-
class: "trash-list-footer"
|
|
6120
|
-
}, [
|
|
6121
|
-
_createElementVNode("button", {
|
|
6122
|
-
class: "btn-tool btn-tool-compact",
|
|
6123
|
-
onClick: _ctx.loadMoreSessionTrashItems,
|
|
6124
|
-
disabled: _ctx.sessionTrashLoading || _ctx.sessionTrashClearing
|
|
6125
|
-
}, _toDisplayString(_ctx.t('settings.trash.loadMoreItems', { count: _ctx.sessionTrashHiddenCount })), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6126
6139
|
]))
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6140
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
6141
|
+
(_ctx.sessionTrashHasMoreItems)
|
|
6142
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
6143
|
+
key: 0,
|
|
6144
|
+
class: "trash-list-footer"
|
|
6145
|
+
}, [
|
|
6146
|
+
_createElementVNode("button", {
|
|
6147
|
+
class: "btn-tool btn-tool-compact",
|
|
6148
|
+
onClick: _ctx.loadMoreSessionTrashItems,
|
|
6149
|
+
disabled: _ctx.sessionTrashLoading || _ctx.sessionTrashClearing
|
|
6150
|
+
}, _toDisplayString(_ctx.t('settings.trash.loadMoreItems', { count: _ctx.sessionTrashHiddenCount })), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6151
|
+
]))
|
|
6152
|
+
: _createCommentVNode("v-if", true)
|
|
6153
|
+
])
|
|
6154
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
6130
6155
|
]))
|
|
6131
6156
|
: _createCommentVNode("v-if", true)
|
|
6132
6157
|
], 512 /* NEED_PATCH */), [
|
|
@@ -6978,7 +7003,14 @@ return function render(_ctx, _cache) {
|
|
|
6978
7003
|
role: "tab",
|
|
6979
7004
|
"aria-selected": _ctx.promptsSubTab === 'claude-project',
|
|
6980
7005
|
onClick: $event => (_ctx.switchPromptsSubTab('claude-project'))
|
|
6981
|
-
}, _toDisplayString(_ctx.t('prompts.subTab.project')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"])
|
|
7006
|
+
}, _toDisplayString(_ctx.t('prompts.subTab.project')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"]),
|
|
7007
|
+
_createElementVNode("button", {
|
|
7008
|
+
type: "button",
|
|
7009
|
+
class: _normalizeClass(['prompts-md-tab', { active: _ctx.promptsSubTab === 'system' }]),
|
|
7010
|
+
role: "tab",
|
|
7011
|
+
"aria-selected": _ctx.promptsSubTab === 'system',
|
|
7012
|
+
onClick: $event => (_ctx.switchPromptsSubTab('system'))
|
|
7013
|
+
}, _toDisplayString(_ctx.t('prompts.subTab.system')), 11 /* TEXT, CLASS, PROPS */, ["aria-selected", "onClick"])
|
|
6982
7014
|
], 8 /* PROPS */, ["aria-label"]),
|
|
6983
7015
|
(_ctx.promptsSubTab === 'claude-project')
|
|
6984
7016
|
? (_openBlock(), _createElementBlock("div", {
|
|
@@ -7016,103 +7048,25 @@ return function render(_ctx, _cache) {
|
|
|
7016
7048
|
: _createCommentVNode("v-if", true)
|
|
7017
7049
|
]))
|
|
7018
7050
|
: _createCommentVNode("v-if", true),
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
:
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
}, [
|
|
7035
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7036
|
-
class: "btn-icon-sm",
|
|
7037
|
-
viewBox: "0 0 24 24",
|
|
7038
|
-
fill: "none",
|
|
7039
|
-
stroke: "currentColor",
|
|
7040
|
-
"stroke-width": "2"
|
|
7041
|
-
}, [
|
|
7042
|
-
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7043
|
-
]))
|
|
7044
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7045
|
-
_createElementVNode("button", {
|
|
7046
|
-
class: "btn-mini",
|
|
7047
|
-
onClick: _ctx.copyAgentsContent,
|
|
7048
|
-
disabled: _ctx.agentsLoading,
|
|
7049
|
-
title: _ctx.t('modal.agents.copy')
|
|
7050
|
-
}, [
|
|
7051
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7052
|
-
class: "btn-icon-sm",
|
|
7053
|
-
viewBox: "0 0 24 24",
|
|
7054
|
-
fill: "none",
|
|
7055
|
-
stroke: "currentColor",
|
|
7056
|
-
"stroke-width": "2"
|
|
7057
|
-
}, [
|
|
7058
|
-
_createElementVNode("rect", {
|
|
7059
|
-
x: "9",
|
|
7060
|
-
y: "9",
|
|
7061
|
-
width: "13",
|
|
7062
|
-
height: "13",
|
|
7063
|
-
rx: "2"
|
|
7064
|
-
}),
|
|
7065
|
-
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7066
|
-
]))
|
|
7067
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7068
|
-
_createElementVNode("button", {
|
|
7069
|
-
class: "btn-mini",
|
|
7070
|
-
onClick: _ctx.pasteAgentsContent,
|
|
7071
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7072
|
-
title: _ctx.t('common.paste')
|
|
7073
|
-
}, [
|
|
7074
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7075
|
-
class: "btn-icon-sm",
|
|
7076
|
-
viewBox: "0 0 24 24",
|
|
7077
|
-
fill: "none",
|
|
7078
|
-
stroke: "currentColor",
|
|
7079
|
-
"stroke-width": "2"
|
|
7080
|
-
}, [
|
|
7081
|
-
_createElementVNode("rect", {
|
|
7082
|
-
x: "8",
|
|
7083
|
-
y: "2",
|
|
7084
|
-
width: "8",
|
|
7085
|
-
height: "4",
|
|
7086
|
-
rx: "1"
|
|
7087
|
-
}),
|
|
7088
|
-
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7089
|
-
]))
|
|
7090
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7091
|
-
]),
|
|
7092
|
-
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7093
|
-
_createElementVNode("button", {
|
|
7094
|
-
class: "btn-mini",
|
|
7095
|
-
onClick: _ctx.loadPromptsContent,
|
|
7096
|
-
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7097
|
-
title: _ctx.t('common.cancel')
|
|
7098
|
-
}, [
|
|
7099
|
-
(_openBlock(), _createElementBlock("svg", {
|
|
7100
|
-
class: "btn-icon-sm",
|
|
7101
|
-
viewBox: "0 0 24 24",
|
|
7102
|
-
fill: "none",
|
|
7103
|
-
stroke: "currentColor",
|
|
7104
|
-
"stroke-width": "2"
|
|
7105
|
-
}, [
|
|
7106
|
-
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7107
|
-
]))
|
|
7108
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7109
|
-
(_ctx.agentsDiffVisible)
|
|
7110
|
-
? (_openBlock(), _createElementBlock("button", {
|
|
7111
|
-
key: 0,
|
|
7051
|
+
(_ctx.promptsSubTab !== 'system')
|
|
7052
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7053
|
+
key: 1,
|
|
7054
|
+
class: "prompts-editor"
|
|
7055
|
+
}, [
|
|
7056
|
+
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7057
|
+
_createElementVNode("div", { class: "form-hint" }, [
|
|
7058
|
+
_createTextVNode(_toDisplayString(_ctx.agentsPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
7059
|
+
(_ctx.agentsPath)
|
|
7060
|
+
? (_openBlock(), _createElementBlock("span", { key: 0 }, " (" + _toDisplayString(_ctx.agentsExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave')) + ") ", 1 /* TEXT */))
|
|
7061
|
+
: _createCommentVNode("v-if", true)
|
|
7062
|
+
]),
|
|
7063
|
+
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7064
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
|
|
7065
|
+
_createElementVNode("button", {
|
|
7112
7066
|
class: "btn-mini",
|
|
7113
|
-
onClick: _ctx.
|
|
7114
|
-
disabled: _ctx.
|
|
7115
|
-
title: _ctx.t('
|
|
7067
|
+
onClick: _ctx.exportAgentsContent,
|
|
7068
|
+
disabled: _ctx.agentsLoading,
|
|
7069
|
+
title: _ctx.t('modal.agents.export')
|
|
7116
7070
|
}, [
|
|
7117
7071
|
(_openBlock(), _createElementBlock("svg", {
|
|
7118
7072
|
class: "btn-icon-sm",
|
|
@@ -7121,223 +7075,563 @@ return function render(_ctx, _cache) {
|
|
|
7121
7075
|
stroke: "currentColor",
|
|
7122
7076
|
"stroke-width": "2"
|
|
7123
7077
|
}, [
|
|
7124
|
-
_createElementVNode("path", { d: "
|
|
7078
|
+
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7125
7079
|
]))
|
|
7126
|
-
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
(_ctx.agentsDiffVisible)
|
|
7135
|
-
? (_openBlock(), _createElementBlock("svg", {
|
|
7136
|
-
key: 0,
|
|
7080
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7081
|
+
_createElementVNode("button", {
|
|
7082
|
+
class: "btn-mini",
|
|
7083
|
+
onClick: _ctx.copyAgentsContent,
|
|
7084
|
+
disabled: _ctx.agentsLoading,
|
|
7085
|
+
title: _ctx.t('modal.agents.copy')
|
|
7086
|
+
}, [
|
|
7087
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7137
7088
|
class: "btn-icon-sm",
|
|
7138
7089
|
viewBox: "0 0 24 24",
|
|
7139
7090
|
fill: "none",
|
|
7140
7091
|
stroke: "currentColor",
|
|
7141
7092
|
"stroke-width": "2"
|
|
7142
7093
|
}, [
|
|
7143
|
-
_createElementVNode("
|
|
7094
|
+
_createElementVNode("rect", {
|
|
7095
|
+
x: "9",
|
|
7096
|
+
y: "9",
|
|
7097
|
+
width: "13",
|
|
7098
|
+
height: "13",
|
|
7099
|
+
rx: "2"
|
|
7100
|
+
}),
|
|
7101
|
+
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7144
7102
|
]))
|
|
7145
|
-
|
|
7146
|
-
|
|
7103
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7104
|
+
_createElementVNode("button", {
|
|
7105
|
+
class: "btn-mini",
|
|
7106
|
+
onClick: _ctx.pasteAgentsContent,
|
|
7107
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7108
|
+
title: _ctx.t('common.paste')
|
|
7109
|
+
}, [
|
|
7110
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7147
7111
|
class: "btn-icon-sm",
|
|
7148
7112
|
viewBox: "0 0 24 24",
|
|
7149
7113
|
fill: "none",
|
|
7150
7114
|
stroke: "currentColor",
|
|
7151
7115
|
"stroke-width": "2"
|
|
7152
7116
|
}, [
|
|
7153
|
-
_createElementVNode("
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7117
|
+
_createElementVNode("rect", {
|
|
7118
|
+
x: "8",
|
|
7119
|
+
y: "2",
|
|
7120
|
+
width: "8",
|
|
7121
|
+
height: "4",
|
|
7122
|
+
rx: "1"
|
|
7123
|
+
}),
|
|
7124
|
+
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7159
7125
|
]))
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
class: "form-input prompt-presets-select",
|
|
7169
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible || !_ctx.promptPresets.length,
|
|
7170
|
-
title: _ctx.t('prompts.presets.title'),
|
|
7171
|
-
onChange: $event => (_ctx.applyPromptPresetSelection($event))
|
|
7172
|
-
}, [
|
|
7173
|
-
_createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.presets.selectPlaceholder')), 1 /* TEXT */),
|
|
7174
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7175
|
-
return (_openBlock(), _createElementBlock("option", {
|
|
7176
|
-
key: preset.id,
|
|
7177
|
-
value: preset.id
|
|
7178
|
-
}, _toDisplayString(preset.name), 9 /* TEXT, PROPS */, ["value"]))
|
|
7179
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
7180
|
-
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onChange"])
|
|
7181
|
-
]),
|
|
7182
|
-
_createElementVNode("div", { class: "prompt-presets-inline-group prompt-presets-inline-group--save" }, [
|
|
7183
|
-
_withDirectives(_createElementVNode("input", {
|
|
7184
|
-
type: "text",
|
|
7185
|
-
class: "form-input prompt-presets-name-input",
|
|
7186
|
-
"onUpdate:modelValue": $event => ((_ctx.promptPresetNameDraft) = $event),
|
|
7187
|
-
placeholder: _ctx.t('prompts.presets.namePlaceholder'),
|
|
7188
|
-
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7189
|
-
onKeydown: _withKeys(_withModifiers(_ctx.saveCurrentPromptAsPreset, ["prevent"]), ["enter"])
|
|
7190
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "placeholder", "disabled", "onKeydown"]), [
|
|
7191
|
-
[_vModelText, _ctx.promptPresetNameDraft]
|
|
7192
|
-
]),
|
|
7193
|
-
_createElementVNode("button", {
|
|
7194
|
-
type: "button",
|
|
7195
|
-
class: "btn-mini btn-confirm-mini",
|
|
7196
|
-
onClick: _ctx.saveCurrentPromptAsPreset,
|
|
7197
|
-
disabled: _ctx.promptPresetSaving || _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7198
|
-
title: _ctx.t('prompts.presets.saveCurrent')
|
|
7199
|
-
}, _toDisplayString(_ctx.t('prompts.presets.saveCurrent')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"])
|
|
7200
|
-
])
|
|
7201
|
-
]),
|
|
7202
|
-
_createElementVNode("details", { class: "prompt-presets-panel" }, [
|
|
7203
|
-
_createElementVNode("summary", { class: "prompt-presets-summary" }, [
|
|
7204
|
-
_createElementVNode("span", null, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7205
|
-
_createElementVNode("small", null, _toDisplayString(_ctx.t('prompts.presets.hint')), 1 /* TEXT */)
|
|
7206
|
-
]),
|
|
7207
|
-
_createElementVNode("div", { class: "form-group prompt-presets-body" }, [
|
|
7208
|
-
_createElementVNode("div", { class: "editor-frame prompt-presets-frame" }, [
|
|
7209
|
-
(!_ctx.promptPresets.length)
|
|
7210
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
7211
|
-
key: 0,
|
|
7212
|
-
class: "state-message prompt-presets-empty"
|
|
7213
|
-
}, _toDisplayString(_ctx.t('prompts.presets.empty')), 1 /* TEXT */))
|
|
7214
|
-
: (_openBlock(), _createElementBlock("div", {
|
|
7215
|
-
key: 1,
|
|
7216
|
-
class: "prompt-presets-list"
|
|
7126
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7127
|
+
]),
|
|
7128
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7129
|
+
_createElementVNode("button", {
|
|
7130
|
+
class: "btn-mini",
|
|
7131
|
+
onClick: _ctx.loadPromptsContent,
|
|
7132
|
+
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7133
|
+
title: _ctx.t('common.cancel')
|
|
7217
7134
|
}, [
|
|
7218
|
-
(_openBlock(
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7135
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7136
|
+
class: "btn-icon-sm",
|
|
7137
|
+
viewBox: "0 0 24 24",
|
|
7138
|
+
fill: "none",
|
|
7139
|
+
stroke: "currentColor",
|
|
7140
|
+
"stroke-width": "2"
|
|
7141
|
+
}, [
|
|
7142
|
+
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7143
|
+
]))
|
|
7144
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7145
|
+
(_ctx.agentsDiffVisible)
|
|
7146
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
7147
|
+
key: 0,
|
|
7148
|
+
class: "btn-mini",
|
|
7149
|
+
onClick: _ctx.resetAgentsDiffState,
|
|
7150
|
+
disabled: _ctx.agentsSaving || _ctx.agentsDiffLoading,
|
|
7151
|
+
title: _ctx.t('common.backToEdit')
|
|
7222
7152
|
}, [
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7153
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7154
|
+
class: "btn-icon-sm",
|
|
7155
|
+
viewBox: "0 0 24 24",
|
|
7156
|
+
fill: "none",
|
|
7157
|
+
stroke: "currentColor",
|
|
7158
|
+
"stroke-width": "2"
|
|
7159
|
+
}, [
|
|
7160
|
+
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7161
|
+
]))
|
|
7162
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7163
|
+
: _createCommentVNode("v-if", true),
|
|
7164
|
+
_createElementVNode("button", {
|
|
7165
|
+
class: "btn-mini btn-confirm-mini",
|
|
7166
|
+
onClick: _ctx.applyAgentsContent,
|
|
7167
|
+
disabled: _ctx.agentsSaving || _ctx.agentsLoading || _ctx.agentsDiffLoading || (!_ctx.agentsDiffVisible && !_ctx.hasAgentsContentChanged()) || (_ctx.agentsDiffVisible && !_ctx.agentsDiffHasChanges),
|
|
7168
|
+
title: _ctx.agentsDiffVisible ? _ctx.t('common.save') : _ctx.t('common.preview')
|
|
7169
|
+
}, [
|
|
7170
|
+
(_ctx.agentsDiffVisible)
|
|
7171
|
+
? (_openBlock(), _createElementBlock("svg", {
|
|
7172
|
+
key: 0,
|
|
7173
|
+
class: "btn-icon-sm",
|
|
7174
|
+
viewBox: "0 0 24 24",
|
|
7175
|
+
fill: "none",
|
|
7176
|
+
stroke: "currentColor",
|
|
7177
|
+
"stroke-width": "2"
|
|
7178
|
+
}, [
|
|
7179
|
+
_createElementVNode("path", { d: "M20 6L9 17l-5-5" })
|
|
7180
|
+
]))
|
|
7181
|
+
: (_openBlock(), _createElementBlock("svg", {
|
|
7182
|
+
key: 1,
|
|
7183
|
+
class: "btn-icon-sm",
|
|
7184
|
+
viewBox: "0 0 24 24",
|
|
7185
|
+
fill: "none",
|
|
7186
|
+
stroke: "currentColor",
|
|
7187
|
+
"stroke-width": "2"
|
|
7188
|
+
}, [
|
|
7189
|
+
_createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
7190
|
+
_createElementVNode("circle", {
|
|
7191
|
+
cx: "12",
|
|
7192
|
+
cy: "12",
|
|
7193
|
+
r: "3"
|
|
7194
|
+
})
|
|
7195
|
+
]))
|
|
7196
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7197
|
+
])
|
|
7198
|
+
])
|
|
7199
|
+
]),
|
|
7200
|
+
_createElementVNode("div", { class: "prompt-presets-inline-row" }, [
|
|
7201
|
+
_createElementVNode("div", { class: "prompt-presets-inline-group" }, [
|
|
7202
|
+
_createElementVNode("label", { class: "prompt-presets-inline-label" }, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7203
|
+
_createElementVNode("select", {
|
|
7204
|
+
class: "form-input prompt-presets-select",
|
|
7205
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible || !_ctx.promptPresets.length,
|
|
7206
|
+
title: _ctx.t('prompts.presets.title'),
|
|
7207
|
+
onChange: $event => (_ctx.applyPromptPresetSelection($event))
|
|
7208
|
+
}, [
|
|
7209
|
+
_createElementVNode("option", { value: "" }, _toDisplayString(_ctx.t('prompts.presets.selectPlaceholder')), 1 /* TEXT */),
|
|
7210
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7211
|
+
return (_openBlock(), _createElementBlock("option", {
|
|
7212
|
+
key: preset.id,
|
|
7213
|
+
value: preset.id
|
|
7214
|
+
}, _toDisplayString(preset.name), 9 /* TEXT, PROPS */, ["value"]))
|
|
7215
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7216
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onChange"])
|
|
7217
|
+
]),
|
|
7218
|
+
_createElementVNode("div", { class: "prompt-presets-inline-group prompt-presets-inline-group--save" }, [
|
|
7219
|
+
_withDirectives(_createElementVNode("input", {
|
|
7220
|
+
type: "text",
|
|
7221
|
+
class: "form-input prompt-presets-name-input",
|
|
7222
|
+
"onUpdate:modelValue": $event => ((_ctx.promptPresetNameDraft) = $event),
|
|
7223
|
+
placeholder: _ctx.t('prompts.presets.namePlaceholder'),
|
|
7224
|
+
disabled: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7225
|
+
onKeydown: _withKeys(_withModifiers(_ctx.saveCurrentPromptAsPreset, ["prevent"]), ["enter"])
|
|
7226
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "placeholder", "disabled", "onKeydown"]), [
|
|
7227
|
+
[_vModelText, _ctx.promptPresetNameDraft]
|
|
7228
|
+
]),
|
|
7229
|
+
_createElementVNode("button", {
|
|
7230
|
+
type: "button",
|
|
7231
|
+
class: "btn-mini btn-confirm-mini",
|
|
7232
|
+
onClick: _ctx.saveCurrentPromptAsPreset,
|
|
7233
|
+
disabled: _ctx.promptPresetSaving || _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7234
|
+
title: _ctx.t('prompts.presets.saveCurrent')
|
|
7235
|
+
}, _toDisplayString(_ctx.t('prompts.presets.saveCurrent')), 9 /* TEXT, PROPS */, ["onClick", "disabled", "title"])
|
|
7236
|
+
])
|
|
7237
|
+
]),
|
|
7238
|
+
_createElementVNode("details", { class: "prompt-presets-panel" }, [
|
|
7239
|
+
_createElementVNode("summary", { class: "prompt-presets-summary" }, [
|
|
7240
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('prompts.presets.title')), 1 /* TEXT */),
|
|
7241
|
+
_createElementVNode("small", null, _toDisplayString(_ctx.t('prompts.presets.hint')), 1 /* TEXT */)
|
|
7242
|
+
]),
|
|
7243
|
+
_createElementVNode("div", { class: "form-group prompt-presets-body" }, [
|
|
7244
|
+
_createElementVNode("div", { class: "editor-frame prompt-presets-frame" }, [
|
|
7245
|
+
(!_ctx.promptPresets.length)
|
|
7246
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7247
|
+
key: 0,
|
|
7248
|
+
class: "state-message prompt-presets-empty"
|
|
7249
|
+
}, _toDisplayString(_ctx.t('prompts.presets.empty')), 1 /* TEXT */))
|
|
7250
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7251
|
+
key: 1,
|
|
7252
|
+
class: "prompt-presets-list"
|
|
7253
|
+
}, [
|
|
7254
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptPresets, (preset) => {
|
|
7255
|
+
return (_openBlock(), _createElementBlock("article", {
|
|
7256
|
+
key: preset.id,
|
|
7257
|
+
class: "prompt-preset-row"
|
|
7258
|
+
}, [
|
|
7259
|
+
_createElementVNode("div", { class: "prompt-preset-main" }, [
|
|
7260
|
+
_createElementVNode("input", {
|
|
7261
|
+
type: "text",
|
|
7262
|
+
class: "form-input prompt-preset-name",
|
|
7263
|
+
value: _ctx.getPromptPresetRenameDraft(preset),
|
|
7264
|
+
onInput: $event => (_ctx.setPromptPresetRenameDraft(preset.id, $event.target.value)),
|
|
7265
|
+
onKeydown: _withKeys(_withModifiers($event => (_ctx.renamePromptPreset(preset)), ["prevent"]), ["enter"]),
|
|
7266
|
+
"aria-label": _ctx.t('prompts.presets.renameAria')
|
|
7267
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onInput", "onKeydown", "aria-label"]),
|
|
7268
|
+
_createElementVNode("div", { class: "form-hint" }, _toDisplayString(_ctx.t('prompts.presets.updatedAt', { time: _ctx.formatPromptPresetTime(preset.updatedAt) })), 1 /* TEXT */),
|
|
7269
|
+
_createElementVNode("pre", { class: "prompt-preset-preview" }, _toDisplayString(preset.content), 1 /* TEXT */)
|
|
7270
|
+
]),
|
|
7271
|
+
_createElementVNode("div", { class: "prompts-editor-actions prompt-preset-actions" }, [
|
|
7272
|
+
_createElementVNode("button", {
|
|
7273
|
+
type: "button",
|
|
7274
|
+
class: "btn-mini",
|
|
7275
|
+
onClick: $event => (_ctx.renamePromptPreset(preset))
|
|
7276
|
+
}, _toDisplayString(_ctx.t('common.save')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
7277
|
+
_createElementVNode("button", {
|
|
7278
|
+
type: "button",
|
|
7279
|
+
class: "btn-mini",
|
|
7280
|
+
onClick: $event => (_ctx.applyPromptPresetToEditor(preset))
|
|
7281
|
+
}, _toDisplayString(_ctx.t('common.paste')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
7282
|
+
_createElementVNode("button", {
|
|
7283
|
+
type: "button",
|
|
7284
|
+
class: "btn-mini btn-danger-mini",
|
|
7285
|
+
onClick: $event => (_ctx.deletePromptPreset(preset))
|
|
7286
|
+
}, _toDisplayString(_ctx.t('common.delete')), 9 /* TEXT, PROPS */, ["onClick"])
|
|
7287
|
+
])
|
|
7288
|
+
]))
|
|
7289
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7252
7290
|
]))
|
|
7253
|
-
|
|
7291
|
+
])
|
|
7292
|
+
])
|
|
7293
|
+
]),
|
|
7294
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
7295
|
+
(_ctx.agentsDiffVisible)
|
|
7296
|
+
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7297
|
+
(!_ctx.agentsDiffLoading && !_ctx.agentsDiffError && !_ctx.agentsDiffTruncated && (_ctx.agentsDiffStats.added || _ctx.agentsDiffStats.removed))
|
|
7298
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7299
|
+
key: 0,
|
|
7300
|
+
class: "agents-diff-summary"
|
|
7301
|
+
}, [
|
|
7302
|
+
_createElementVNode("span", { class: "agents-diff-stat add" }, "+" + _toDisplayString(_ctx.agentsDiffStats.added), 1 /* TEXT */),
|
|
7303
|
+
_createElementVNode("span", { class: "agents-diff-stat del" }, "-" + _toDisplayString(_ctx.agentsDiffStats.removed), 1 /* TEXT */)
|
|
7304
|
+
]))
|
|
7305
|
+
: _createCommentVNode("v-if", true),
|
|
7306
|
+
(_ctx.agentsDiffLoading)
|
|
7307
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7308
|
+
key: 1,
|
|
7309
|
+
class: "state-message"
|
|
7310
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
7311
|
+
: (_ctx.agentsDiffError)
|
|
7312
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7313
|
+
key: 2,
|
|
7314
|
+
class: "state-message error"
|
|
7315
|
+
}, _toDisplayString(_ctx.agentsDiffError), 1 /* TEXT */))
|
|
7316
|
+
: (_ctx.agentsDiffTruncated)
|
|
7317
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7318
|
+
key: 3,
|
|
7319
|
+
class: "agents-diff-empty"
|
|
7320
|
+
}, _toDisplayString(_ctx.t('diff.tooLargeSkip')), 1 /* TEXT */))
|
|
7321
|
+
: (!_ctx.agentsDiffHasChanges)
|
|
7322
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7323
|
+
key: 4,
|
|
7324
|
+
class: "agents-diff-empty"
|
|
7325
|
+
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7326
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7327
|
+
key: 5,
|
|
7328
|
+
class: "agents-diff-view agents-diff-editor"
|
|
7329
|
+
}, [
|
|
7330
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.agentsDiffLines, (line, index) => {
|
|
7331
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
7332
|
+
key: line.key || (line.type + '-' + index),
|
|
7333
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7334
|
+
}, [
|
|
7335
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7336
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7337
|
+
], 2 /* CLASS */))
|
|
7338
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7339
|
+
]))
|
|
7254
7340
|
]))
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7261
|
-
(!_ctx.agentsDiffLoading && !_ctx.agentsDiffError && !_ctx.agentsDiffTruncated && (_ctx.agentsDiffStats.added || _ctx.agentsDiffStats.removed))
|
|
7341
|
+
: _createCommentVNode("v-if", true),
|
|
7342
|
+
_createElementVNode("div", {
|
|
7343
|
+
class: _normalizeClass(['editor-frame', { 'editor-frame--loading': _ctx.agentsLoading }])
|
|
7344
|
+
}, [
|
|
7345
|
+
(_ctx.agentsLoading)
|
|
7262
7346
|
? (_openBlock(), _createElementBlock("div", {
|
|
7263
7347
|
key: 0,
|
|
7264
|
-
class: "
|
|
7348
|
+
class: "editor-skeleton"
|
|
7265
7349
|
}, [
|
|
7266
|
-
|
|
7267
|
-
|
|
7350
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (i) => {
|
|
7351
|
+
return _createElementVNode("div", {
|
|
7352
|
+
class: "skeleton-line",
|
|
7353
|
+
key: i
|
|
7354
|
+
})
|
|
7355
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
7268
7356
|
]))
|
|
7269
7357
|
: _createCommentVNode("v-if", true),
|
|
7270
|
-
(
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
:
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7358
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
7359
|
+
"onUpdate:modelValue": $event => ((_ctx.agentsContent) = $event),
|
|
7360
|
+
class: "form-input template-editor",
|
|
7361
|
+
spellcheck: "false",
|
|
7362
|
+
readonly: _ctx.agentsLoading || _ctx.agentsSaving || _ctx.agentsDiffVisible,
|
|
7363
|
+
onInput: _ctx.onAgentsContentInput,
|
|
7364
|
+
placeholder: _ctx.t(_ctx.promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')
|
|
7365
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onUpdate:modelValue", "readonly", "onInput", "placeholder"]), [
|
|
7366
|
+
[_vModelText, _ctx.agentsContent]
|
|
7367
|
+
])
|
|
7368
|
+
], 2 /* CLASS */),
|
|
7369
|
+
(_ctx.promptsContextHint)
|
|
7370
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7371
|
+
key: 1,
|
|
7372
|
+
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.promptsContextHint.warn }])
|
|
7373
|
+
}, _toDisplayString(_ctx.promptsContextHint.text), 3 /* TEXT, CLASS */))
|
|
7374
|
+
: _createCommentVNode("v-if", true)
|
|
7375
|
+
])
|
|
7376
|
+
]))
|
|
7377
|
+
: _createCommentVNode("v-if", true),
|
|
7378
|
+
(_ctx.promptsSubTab === 'system')
|
|
7379
|
+
? (_openBlock(), _createElementBlock("div", { key: 2 }, [
|
|
7380
|
+
_createElementVNode("div", { class: "sys-prompt-controls" }, [
|
|
7381
|
+
_createElementVNode("div", { class: "sys-prompt-control-group" }, [
|
|
7382
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('sysPrompt.scope.label')), 1 /* TEXT */),
|
|
7383
|
+
_createElementVNode("select", {
|
|
7384
|
+
class: "form-input sys-prompt-select",
|
|
7385
|
+
value: _ctx.sysPromptScope,
|
|
7386
|
+
onChange: $event => (_ctx.switchSysPromptScope($event.target.value)),
|
|
7387
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible
|
|
7388
|
+
}, [
|
|
7389
|
+
_createElementVNode("option", { value: "global" }, _toDisplayString(_ctx.t('sysPrompt.scope.global')), 1 /* TEXT */),
|
|
7390
|
+
_createElementVNode("option", { value: "project" }, _toDisplayString(_ctx.t('sysPrompt.scope.project')), 1 /* TEXT */)
|
|
7391
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"])
|
|
7392
|
+
]),
|
|
7393
|
+
_createElementVNode("div", { class: "sys-prompt-control-group" }, [
|
|
7394
|
+
_createElementVNode("label", { class: "form-label" }, _toDisplayString(_ctx.t('sysPrompt.mode.label')), 1 /* TEXT */),
|
|
7395
|
+
_createElementVNode("select", {
|
|
7396
|
+
class: "form-input sys-prompt-select",
|
|
7397
|
+
value: _ctx.sysPromptMode,
|
|
7398
|
+
onChange: $event => (_ctx.switchSysPromptMode($event.target.value)),
|
|
7399
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible
|
|
7400
|
+
}, [
|
|
7401
|
+
_createElementVNode("option", { value: "append" }, _toDisplayString(_ctx.t('sysPrompt.mode.append')), 1 /* TEXT */),
|
|
7402
|
+
_createElementVNode("option", { value: "system" }, _toDisplayString(_ctx.t('sysPrompt.mode.system')), 1 /* TEXT */)
|
|
7403
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["value", "onChange", "disabled"])
|
|
7404
|
+
])
|
|
7405
|
+
]),
|
|
7406
|
+
_createElementVNode("div", { class: "prompts-editor" }, [
|
|
7407
|
+
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7408
|
+
_createElementVNode("div", { class: "form-hint" }, [
|
|
7409
|
+
_createTextVNode(_toDisplayString(_ctx.sysPromptPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
7410
|
+
(_ctx.sysPromptPath)
|
|
7411
|
+
? (_openBlock(), _createElementBlock("span", { key: 0 }, " (" + _toDisplayString(_ctx.sysPromptExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave')) + ") ", 1 /* TEXT */))
|
|
7412
|
+
: _createCommentVNode("v-if", true)
|
|
7413
|
+
]),
|
|
7414
|
+
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7415
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
|
|
7416
|
+
_createElementVNode("button", {
|
|
7417
|
+
class: "btn-mini",
|
|
7418
|
+
onClick: _ctx.exportSysPromptContent,
|
|
7419
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || !_ctx.sysPromptContent,
|
|
7420
|
+
title: _ctx.t('modal.agents.export')
|
|
7421
|
+
}, [
|
|
7422
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7423
|
+
class: "btn-icon-sm",
|
|
7424
|
+
viewBox: "0 0 24 24",
|
|
7425
|
+
fill: "none",
|
|
7426
|
+
stroke: "currentColor",
|
|
7427
|
+
"stroke-width": "2"
|
|
7428
|
+
}, [
|
|
7429
|
+
_createElementVNode("path", { d: "M12 3v12M8 11l4 4 4-4M4 17v2h16v-2" })
|
|
7430
|
+
]))
|
|
7431
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7432
|
+
_createElementVNode("button", {
|
|
7433
|
+
class: "btn-mini",
|
|
7434
|
+
onClick: _ctx.copySysPromptContent,
|
|
7435
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || !_ctx.sysPromptContent,
|
|
7436
|
+
title: _ctx.t('modal.agents.copy')
|
|
7437
|
+
}, [
|
|
7438
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7439
|
+
class: "btn-icon-sm",
|
|
7440
|
+
viewBox: "0 0 24 24",
|
|
7441
|
+
fill: "none",
|
|
7442
|
+
stroke: "currentColor",
|
|
7443
|
+
"stroke-width": "2"
|
|
7444
|
+
}, [
|
|
7445
|
+
_createElementVNode("rect", {
|
|
7446
|
+
x: "9",
|
|
7447
|
+
y: "9",
|
|
7448
|
+
width: "13",
|
|
7449
|
+
height: "13",
|
|
7450
|
+
rx: "2"
|
|
7451
|
+
}),
|
|
7452
|
+
_createElementVNode("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
7453
|
+
]))
|
|
7454
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7455
|
+
_createElementVNode("button", {
|
|
7456
|
+
class: "btn-mini",
|
|
7457
|
+
onClick: _ctx.pasteSysPromptContent,
|
|
7458
|
+
disabled: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
|
|
7459
|
+
title: _ctx.t('common.paste')
|
|
7460
|
+
}, [
|
|
7461
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7462
|
+
class: "btn-icon-sm",
|
|
7463
|
+
viewBox: "0 0 24 24",
|
|
7464
|
+
fill: "none",
|
|
7465
|
+
stroke: "currentColor",
|
|
7466
|
+
"stroke-width": "2"
|
|
7467
|
+
}, [
|
|
7468
|
+
_createElementVNode("rect", {
|
|
7469
|
+
x: "8",
|
|
7470
|
+
y: "2",
|
|
7471
|
+
width: "8",
|
|
7472
|
+
height: "4",
|
|
7473
|
+
rx: "1"
|
|
7474
|
+
}),
|
|
7475
|
+
_createElementVNode("path", { d: "M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2" })
|
|
7476
|
+
]))
|
|
7477
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7478
|
+
]),
|
|
7479
|
+
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
|
|
7480
|
+
_createElementVNode("button", {
|
|
7481
|
+
class: "btn-mini",
|
|
7482
|
+
onClick: _ctx.cancelSysPromptEdit,
|
|
7483
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7484
|
+
title: _ctx.t('common.cancel')
|
|
7485
|
+
}, [
|
|
7486
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7487
|
+
class: "btn-icon-sm",
|
|
7488
|
+
viewBox: "0 0 24 24",
|
|
7489
|
+
fill: "none",
|
|
7490
|
+
stroke: "currentColor",
|
|
7491
|
+
"stroke-width": "2"
|
|
7492
|
+
}, [
|
|
7493
|
+
_createElementVNode("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7494
|
+
]))
|
|
7495
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]),
|
|
7496
|
+
(_ctx.sysPromptDiffVisible)
|
|
7497
|
+
? (_openBlock(), _createElementBlock("button", {
|
|
7498
|
+
key: 0,
|
|
7499
|
+
class: "btn-mini",
|
|
7500
|
+
onClick: _ctx.resetSysPromptDiffState,
|
|
7501
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptDiffLoading,
|
|
7502
|
+
title: _ctx.t('common.backToEdit')
|
|
7503
|
+
}, [
|
|
7504
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
7505
|
+
class: "btn-icon-sm",
|
|
7506
|
+
viewBox: "0 0 24 24",
|
|
7507
|
+
fill: "none",
|
|
7508
|
+
stroke: "currentColor",
|
|
7509
|
+
"stroke-width": "2"
|
|
7510
|
+
}, [
|
|
7511
|
+
_createElementVNode("path", { d: "M19 12H5M12 19l-7-7 7-7" })
|
|
7512
|
+
]))
|
|
7513
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"]))
|
|
7514
|
+
: _createCommentVNode("v-if", true),
|
|
7515
|
+
_createElementVNode("button", {
|
|
7516
|
+
class: "btn-mini btn-confirm-mini",
|
|
7517
|
+
onClick: _ctx.applySystemPrompt,
|
|
7518
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysPromptLoading || _ctx.sysPromptDiffLoading || (!_ctx.sysPromptDiffVisible && !_ctx.hasSysPromptContentChanged()) || (_ctx.sysPromptDiffVisible && !_ctx.sysPromptDiffHasChangesValue),
|
|
7519
|
+
title: _ctx.sysPromptDiffVisible ? _ctx.t('common.save') : _ctx.t('common.preview')
|
|
7520
|
+
}, [
|
|
7521
|
+
(_ctx.sysPromptDiffVisible)
|
|
7522
|
+
? (_openBlock(), _createElementBlock("svg", {
|
|
7523
|
+
key: 0,
|
|
7524
|
+
class: "btn-icon-sm",
|
|
7525
|
+
viewBox: "0 0 24 24",
|
|
7526
|
+
fill: "none",
|
|
7527
|
+
stroke: "currentColor",
|
|
7528
|
+
"stroke-width": "2"
|
|
7529
|
+
}, [
|
|
7530
|
+
_createElementVNode("path", { d: "M20 6L9 17l-5-5" })
|
|
7531
|
+
]))
|
|
7532
|
+
: (_openBlock(), _createElementBlock("svg", {
|
|
7533
|
+
key: 1,
|
|
7534
|
+
class: "btn-icon-sm",
|
|
7535
|
+
viewBox: "0 0 24 24",
|
|
7536
|
+
fill: "none",
|
|
7537
|
+
stroke: "currentColor",
|
|
7538
|
+
"stroke-width": "2"
|
|
7539
|
+
}, [
|
|
7540
|
+
_createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
7541
|
+
_createElementVNode("circle", {
|
|
7542
|
+
cx: "12",
|
|
7543
|
+
cy: "12",
|
|
7544
|
+
r: "3"
|
|
7545
|
+
})
|
|
7546
|
+
]))
|
|
7547
|
+
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7548
|
+
])
|
|
7549
|
+
])
|
|
7550
|
+
]),
|
|
7551
|
+
_createElementVNode("div", { class: "form-group" }, [
|
|
7552
|
+
(_ctx.sysPromptDiffVisible)
|
|
7553
|
+
? (_openBlock(), _createElementBlock("div", { key: 0 }, [
|
|
7554
|
+
(!_ctx.sysPromptDiffLoading && !_ctx.sysPromptDiffError && !_ctx.sysPromptDiffTruncated && (_ctx.sysPromptDiffStats.added || _ctx.sysPromptDiffStats.removed))
|
|
7286
7555
|
? (_openBlock(), _createElementBlock("div", {
|
|
7287
|
-
key:
|
|
7288
|
-
class: "agents-diff-
|
|
7289
|
-
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7290
|
-
: (_openBlock(), _createElementBlock("div", {
|
|
7291
|
-
key: 5,
|
|
7292
|
-
class: "agents-diff-view agents-diff-editor"
|
|
7556
|
+
key: 0,
|
|
7557
|
+
class: "agents-diff-summary"
|
|
7293
7558
|
}, [
|
|
7294
|
-
(
|
|
7295
|
-
|
|
7296
|
-
key: line.key || (line.type + '-' + index),
|
|
7297
|
-
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7298
|
-
}, [
|
|
7299
|
-
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7300
|
-
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7301
|
-
], 2 /* CLASS */))
|
|
7302
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
7559
|
+
_createElementVNode("span", { class: "agents-diff-stat add" }, "+" + _toDisplayString(_ctx.sysPromptDiffStats.added), 1 /* TEXT */),
|
|
7560
|
+
_createElementVNode("span", { class: "agents-diff-stat del" }, "-" + _toDisplayString(_ctx.sysPromptDiffStats.removed), 1 /* TEXT */)
|
|
7303
7561
|
]))
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7562
|
+
: _createCommentVNode("v-if", true),
|
|
7563
|
+
(_ctx.sysPromptDiffLoading)
|
|
7564
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7565
|
+
key: 1,
|
|
7566
|
+
class: "state-message"
|
|
7567
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
7568
|
+
: (_ctx.sysPromptDiffError)
|
|
7569
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7570
|
+
key: 2,
|
|
7571
|
+
class: "state-message error"
|
|
7572
|
+
}, _toDisplayString(_ctx.sysPromptDiffError), 1 /* TEXT */))
|
|
7573
|
+
: (_ctx.sysPromptDiffTruncated)
|
|
7574
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7575
|
+
key: 3,
|
|
7576
|
+
class: "agents-diff-empty"
|
|
7577
|
+
}, _toDisplayString(_ctx.t('diff.tooLargeSkip')), 1 /* TEXT */))
|
|
7578
|
+
: (!_ctx.sysPromptDiffHasChangesValue)
|
|
7579
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7580
|
+
key: 4,
|
|
7581
|
+
class: "agents-diff-empty"
|
|
7582
|
+
}, _toDisplayString(_ctx.t('diff.noChanges')), 1 /* TEXT */))
|
|
7583
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7584
|
+
key: 5,
|
|
7585
|
+
class: "agents-diff-view agents-diff-editor"
|
|
7586
|
+
}, [
|
|
7587
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sysPromptDiffLines, (line, index) => {
|
|
7588
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
7589
|
+
key: 'sys-prompt-diff-' + index,
|
|
7590
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7591
|
+
}, [
|
|
7592
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '-' : ' ')), 1 /* TEXT */),
|
|
7593
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7594
|
+
], 2 /* CLASS */))
|
|
7595
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7596
|
+
]))
|
|
7597
|
+
]))
|
|
7598
|
+
: _createCommentVNode("v-if", true),
|
|
7599
|
+
_createElementVNode("div", {
|
|
7600
|
+
class: _normalizeClass(['editor-frame', { 'editor-frame--loading': _ctx.sysPromptLoading }])
|
|
7313
7601
|
}, [
|
|
7314
|
-
(
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7602
|
+
(_ctx.sysPromptLoading)
|
|
7603
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7604
|
+
key: 0,
|
|
7605
|
+
class: "editor-skeleton"
|
|
7606
|
+
}, [
|
|
7607
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(6, (i) => {
|
|
7608
|
+
return _createElementVNode("div", {
|
|
7609
|
+
class: "skeleton-line",
|
|
7610
|
+
key: i
|
|
7611
|
+
})
|
|
7612
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
7613
|
+
]))
|
|
7614
|
+
: _createCommentVNode("v-if", true),
|
|
7615
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
7616
|
+
"onUpdate:modelValue": $event => ((_ctx.sysPromptContent) = $event),
|
|
7617
|
+
class: "form-input template-editor",
|
|
7618
|
+
spellcheck: "false",
|
|
7619
|
+
readonly: _ctx.sysPromptLoading || _ctx.sysPromptSaving || _ctx.sysPromptDiffVisible,
|
|
7620
|
+
placeholder: _ctx.t('sysPrompt.placeholder')
|
|
7621
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "readonly", "placeholder"]), [
|
|
7622
|
+
[_vModelText, _ctx.sysPromptContent]
|
|
7623
|
+
])
|
|
7624
|
+
], 2 /* CLASS */),
|
|
7625
|
+
(_ctx.sysPromptContextHint())
|
|
7626
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
7627
|
+
key: 1,
|
|
7628
|
+
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.sysPromptContextHint().warn }])
|
|
7629
|
+
}, _toDisplayString(_ctx.sysPromptContextHint().text), 3 /* TEXT, CLASS */))
|
|
7630
|
+
: _createCommentVNode("v-if", true)
|
|
7631
|
+
])
|
|
7331
7632
|
])
|
|
7332
|
-
]
|
|
7333
|
-
|
|
7334
|
-
? (_openBlock(), _createElementBlock("div", {
|
|
7335
|
-
key: 1,
|
|
7336
|
-
class: _normalizeClass(['prompts-context-hint', { 'prompts-context-hint--warn': _ctx.promptsContextHint.warn }])
|
|
7337
|
-
}, _toDisplayString(_ctx.promptsContextHint.text), 3 /* TEXT, CLASS */))
|
|
7338
|
-
: _createCommentVNode("v-if", true)
|
|
7339
|
-
])
|
|
7340
|
-
])
|
|
7633
|
+
]))
|
|
7634
|
+
: _createCommentVNode("v-if", true)
|
|
7341
7635
|
]))
|
|
7342
7636
|
: _createCommentVNode("v-if", true),
|
|
7343
7637
|
_createCommentVNode(" 加载状态 "),
|