codexmate 0.1.30 → 0.1.32
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 +98 -7
- package/README.vi.md +98 -7
- package/README.zh.md +99 -7
- package/cli/agents-files.js +18 -4
- package/cli/config-bootstrap.js +25 -11
- package/cli/plugin-config.js +64 -0
- package/cli/prompt-history.js +17 -4
- package/cli/system-prompt-files.js +7 -2
- package/cli.js +396 -46
- package/lib/cli-config-engine.js +266 -0
- package/lib/cli-utils.js +2 -1
- package/lib/cli-webhook.js +1 -1
- package/lib/handoff-mcp.js +282 -0
- package/lib/http-access-control.js +335 -0
- package/lib/session-context-health.js +82 -0
- package/lib/session-context-records.js +153 -0
- package/lib/thread-handoff.js +130 -0
- package/lib/web-startup-auth.js +53 -0
- package/lib/workflow-engine.js +92 -21
- package/lib/workflow-runner.js +261 -0
- package/package.json +1 -1
- package/plugins/prompt-templates/computed.mjs +3 -3
- package/plugins/prompt-templates/invocation.mjs +73 -0
- package/plugins/prompt-templates/methods.mjs +48 -3
- package/plugins/prompt-templates/overview.mjs +2 -0
- package/web-ui/app.js +48 -2
- package/web-ui/index.html +1 -0
- package/web-ui/logic.context-health.mjs +144 -0
- package/web-ui/modules/access-token.mjs +33 -0
- package/web-ui/modules/api.mjs +2 -1
- package/web-ui/modules/app.computed.prompts.mjs +11 -0
- package/web-ui/modules/app.methods.agents.mjs +20 -3
- package/web-ui/modules/app.methods.index.mjs +6 -0
- package/web-ui/modules/app.methods.navigation.mjs +17 -3
- package/web-ui/modules/app.methods.prompts-editor.mjs +7 -0
- package/web-ui/modules/app.methods.providers.mjs +2 -2
- package/web-ui/modules/app.methods.runtime.mjs +3 -2
- package/web-ui/modules/app.methods.session-actions.mjs +3 -0
- package/web-ui/modules/app.methods.session-browser.mjs +6 -2
- package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
- package/web-ui/modules/app.methods.workflows.mjs +41 -0
- package/web-ui/modules/context-health.methods.mjs +70 -0
- package/web-ui/modules/i18n/locales/en.mjs +70 -2
- package/web-ui/modules/i18n/locales/ja.mjs +70 -2
- package/web-ui/modules/i18n/locales/vi.mjs +70 -2
- package/web-ui/modules/i18n/locales/zh-tw.mjs +70 -2
- package/web-ui/modules/i18n/locales/zh.mjs +70 -2
- package/web-ui/modules/plugins.methods.mjs +2 -0
- package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
- package/web-ui/modules/sessions-filters-url.mjs +3 -0
- package/web-ui/modules/skills.methods.mjs +6 -5
- package/web-ui/modules/thread-handoff.mjs +142 -0
- package/web-ui/partials/index/context-health.html +45 -0
- package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
- package/web-ui/partials/index/panel-config-claude.html +2 -0
- package/web-ui/partials/index/panel-config-codex.html +2 -0
- package/web-ui/partials/index/panel-config-kilocode.html +3 -1
- package/web-ui/partials/index/panel-config-openclaw.html +2 -0
- package/web-ui/partials/index/panel-config-opencode.html +3 -1
- package/web-ui/partials/index/panel-config-pi.html +2 -0
- package/web-ui/partials/index/panel-dashboard.html +59 -0
- package/web-ui/partials/index/panel-plugins.html +37 -9
- package/web-ui/partials/index/panel-prompts.html +46 -18
- package/web-ui/partials/index/panel-sessions.html +35 -44
- package/web-ui/partials/index/thread-handoff.html +59 -0
- package/web-ui/res/web-ui-render.precompiled.js +1289 -177
- package/web-ui/styles/context-health.css +107 -0
- package/web-ui/styles/controls-forms.css +9 -0
- package/web-ui/styles/dashboard.css +51 -0
- package/web-ui/styles/modals-core.css +87 -0
- package/web-ui/styles/navigation-panels.css +1 -1
- package/web-ui/styles/plugins-panel.css +62 -0
- package/web-ui/styles/prompts-editor.css +34 -4
- package/web-ui/styles/responsive.css +19 -10
- package/web-ui/styles/sessions-preview.css +206 -111
- package/web-ui/styles/sub-tabs.css +181 -0
- package/web-ui/styles.css +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__CODEXMATE_WEB_UI_RENDER__ = (() => {
|
|
2
|
-
const { toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, createElementVNode: _createElementVNode, normalizeClass: _normalizeClass, withModifiers: _withModifiers, withKeys: _withKeys, renderList: _renderList, Fragment: _Fragment,
|
|
2
|
+
const { toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, createElementVNode: _createElementVNode, normalizeClass: _normalizeClass, withModifiers: _withModifiers, withKeys: _withKeys, renderList: _renderList, Fragment: _Fragment, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, vModelCheckbox: _vModelCheckbox, vShow: _vShow, Teleport: _Teleport, createBlock: _createBlock, vModelDynamic: _vModelDynamic, normalizeStyle: _normalizeStyle, isMemoSame: _isMemoSame, withMemo: _withMemo } = Vue
|
|
3
3
|
|
|
4
4
|
return function render(_ctx, _cache) {
|
|
5
5
|
return (_openBlock(), _createElementBlock(_Fragment, null, [
|
|
@@ -890,6 +890,199 @@ return function render(_ctx, _cache) {
|
|
|
890
890
|
role: "tabpanel",
|
|
891
891
|
"aria-labelledby": 'tab-dashboard'
|
|
892
892
|
}, [
|
|
893
|
+
_createElementVNode("section", {
|
|
894
|
+
class: "selector-section workflow-panel",
|
|
895
|
+
"aria-label": _ctx.t('workflow.title'),
|
|
896
|
+
"aria-busy": _ctx.workflowBusy
|
|
897
|
+
}, [
|
|
898
|
+
_createElementVNode("header", { class: "workflow-header" }, [
|
|
899
|
+
_createElementVNode("div", null, [
|
|
900
|
+
_createElementVNode("h2", { class: "workflow-title" }, _toDisplayString(_ctx.t('workflow.title')), 1 /* TEXT */),
|
|
901
|
+
_createElementVNode("p", { class: "workflow-description" }, _toDisplayString(_ctx.t('workflow.tagline')), 1 /* TEXT */)
|
|
902
|
+
]),
|
|
903
|
+
_createElementVNode("button", {
|
|
904
|
+
type: "button",
|
|
905
|
+
class: "btn-tool btn-tool-compact workflow-refresh",
|
|
906
|
+
onClick: _ctx.refreshWorkflowRuns,
|
|
907
|
+
disabled: _ctx.workflowBusy
|
|
908
|
+
}, _toDisplayString(_ctx.t('workflow.refresh')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
909
|
+
]),
|
|
910
|
+
_createElementVNode("form", {
|
|
911
|
+
class: "workflow-form",
|
|
912
|
+
onSubmit: _withModifiers(_ctx.submitWorkflowRun, ["prevent"])
|
|
913
|
+
}, [
|
|
914
|
+
_createElementVNode("div", { class: "workflow-launch" }, [
|
|
915
|
+
_createElementVNode("div", { class: "workflow-field" }, [
|
|
916
|
+
_createElementVNode("label", {
|
|
917
|
+
class: "form-label",
|
|
918
|
+
for: "workflow-id"
|
|
919
|
+
}, _toDisplayString(_ctx.t('workflow.definition')), 1 /* TEXT */),
|
|
920
|
+
_withDirectives(_createElementVNode("select", {
|
|
921
|
+
id: "workflow-id",
|
|
922
|
+
"onUpdate:modelValue": $event => ((_ctx.workflowId) = $event),
|
|
923
|
+
class: "model-select workflow-select",
|
|
924
|
+
disabled: _ctx.workflowBusy || !_ctx.workflowDefinitions.length
|
|
925
|
+
}, [
|
|
926
|
+
(!_ctx.workflowDefinitions.length)
|
|
927
|
+
? (_openBlock(), _createElementBlock("option", {
|
|
928
|
+
key: 0,
|
|
929
|
+
value: "diagnose-config"
|
|
930
|
+
}, _toDisplayString(_ctx.t('workflow.noDefinitions')), 1 /* TEXT */))
|
|
931
|
+
: _createCommentVNode("v-if", true),
|
|
932
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.workflowDefinitions, (item) => {
|
|
933
|
+
return (_openBlock(), _createElementBlock("option", {
|
|
934
|
+
key: item.id,
|
|
935
|
+
value: item.id
|
|
936
|
+
}, _toDisplayString(item.name || item.id), 9 /* TEXT, PROPS */, ["value"]))
|
|
937
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
938
|
+
], 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
939
|
+
[_vModelSelect, _ctx.workflowId]
|
|
940
|
+
])
|
|
941
|
+
]),
|
|
942
|
+
_createElementVNode("button", {
|
|
943
|
+
type: "submit",
|
|
944
|
+
class: "btn btn-confirm workflow-submit",
|
|
945
|
+
disabled: _ctx.workflowBusy || !_ctx.workflowDefinitions.length
|
|
946
|
+
}, [
|
|
947
|
+
_createTextVNode(_toDisplayString(_ctx.workflowBusy ? _ctx.t('workflow.submitting') : _ctx.t('workflow.submit')), 1 /* TEXT */),
|
|
948
|
+
_createElementVNode("span", { "aria-hidden": "true" }, "↗")
|
|
949
|
+
], 8 /* PROPS */, ["disabled"])
|
|
950
|
+
]),
|
|
951
|
+
_createElementVNode("details", {
|
|
952
|
+
class: "workflow-options",
|
|
953
|
+
open: _ctx.workflowInput.trim() !== '{}'
|
|
954
|
+
}, [
|
|
955
|
+
_createElementVNode("summary", null, [
|
|
956
|
+
_createTextVNode(_toDisplayString(_ctx.t('workflow.options')) + " ", 1 /* TEXT */),
|
|
957
|
+
_createElementVNode("span", { class: "workflow-option-kind" }, "JSON")
|
|
958
|
+
]),
|
|
959
|
+
_createElementVNode("div", { class: "workflow-field" }, [
|
|
960
|
+
_createElementVNode("label", {
|
|
961
|
+
class: "form-label",
|
|
962
|
+
for: "workflow-input"
|
|
963
|
+
}, _toDisplayString(_ctx.t('workflow.input')), 1 /* TEXT */),
|
|
964
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
965
|
+
id: "workflow-input",
|
|
966
|
+
"onUpdate:modelValue": $event => ((_ctx.workflowInput) = $event),
|
|
967
|
+
class: "form-input workflow-json",
|
|
968
|
+
rows: "4",
|
|
969
|
+
spellcheck: "false",
|
|
970
|
+
disabled: _ctx.workflowBusy,
|
|
971
|
+
"aria-describedby": "workflow-input-hint"
|
|
972
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
973
|
+
[_vModelText, _ctx.workflowInput]
|
|
974
|
+
]),
|
|
975
|
+
_createElementVNode("p", {
|
|
976
|
+
id: "workflow-input-hint",
|
|
977
|
+
class: "form-hint"
|
|
978
|
+
}, _toDisplayString(_ctx.t('workflow.inputHint')), 1 /* TEXT */)
|
|
979
|
+
]),
|
|
980
|
+
_createElementVNode("p", { class: "form-hint" }, _toDisplayString(_ctx.t('workflow.description')), 1 /* TEXT */)
|
|
981
|
+
], 8 /* PROPS */, ["open"]),
|
|
982
|
+
_createElementVNode("label", { class: "workflow-authorization" }, [
|
|
983
|
+
_withDirectives(_createElementVNode("input", {
|
|
984
|
+
type: "checkbox",
|
|
985
|
+
"onUpdate:modelValue": $event => ((_ctx.workflowAllowWrite) = $event),
|
|
986
|
+
disabled: _ctx.workflowBusy
|
|
987
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
988
|
+
[_vModelCheckbox, _ctx.workflowAllowWrite]
|
|
989
|
+
]),
|
|
990
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('workflow.allowWrite')), 1 /* TEXT */)
|
|
991
|
+
])
|
|
992
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["onSubmit"]),
|
|
993
|
+
(_ctx.workflowError)
|
|
994
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
995
|
+
key: 0,
|
|
996
|
+
class: "form-hint form-error",
|
|
997
|
+
role: "alert"
|
|
998
|
+
}, _toDisplayString(_ctx.workflowError), 1 /* TEXT */))
|
|
999
|
+
: _createCommentVNode("v-if", true),
|
|
1000
|
+
_createElementVNode("details", {
|
|
1001
|
+
class: "workflow-history",
|
|
1002
|
+
open: _ctx.workflowRuns.length > 0
|
|
1003
|
+
}, [
|
|
1004
|
+
_createElementVNode("summary", { class: "workflow-history-title" }, [
|
|
1005
|
+
_createTextVNode(_toDisplayString(_ctx.t('workflow.runs')) + " ", 1 /* TEXT */),
|
|
1006
|
+
_createElementVNode("span", { class: "workflow-count" }, _toDisplayString(_ctx.workflowRuns.length), 1 /* TEXT */)
|
|
1007
|
+
]),
|
|
1008
|
+
(!_ctx.workflowRuns.length)
|
|
1009
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
1010
|
+
key: 0,
|
|
1011
|
+
class: "workflow-empty"
|
|
1012
|
+
}, [
|
|
1013
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('workflow.empty')), 1 /* TEXT */),
|
|
1014
|
+
_createElementVNode("p", { class: "form-hint" }, _toDisplayString(_ctx.t('workflow.emptyHint')), 1 /* TEXT */)
|
|
1015
|
+
]))
|
|
1016
|
+
: _createCommentVNode("v-if", true),
|
|
1017
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.workflowRuns, (run) => {
|
|
1018
|
+
return (_openBlock(), _createElementBlock("article", {
|
|
1019
|
+
key: run.id,
|
|
1020
|
+
class: "workflow-run"
|
|
1021
|
+
}, [
|
|
1022
|
+
_createElementVNode("div", { class: "workflow-run-header" }, [
|
|
1023
|
+
_createElementVNode("h4", { class: "workflow-run-title" }, _toDisplayString(run.definition.name || run.definition.id), 1 /* TEXT */),
|
|
1024
|
+
_createElementVNode("span", {
|
|
1025
|
+
class: "workflow-status",
|
|
1026
|
+
"data-status": run.status
|
|
1027
|
+
}, _toDisplayString(_ctx.workflowStatusLabel(run.status)), 9 /* TEXT, PROPS */, ["data-status"])
|
|
1028
|
+
]),
|
|
1029
|
+
_createElementVNode("p", { class: "workflow-run-id" }, [
|
|
1030
|
+
_createTextVNode(_toDisplayString(_ctx.t('workflow.runId')) + " ", 1 /* TEXT */),
|
|
1031
|
+
_createElementVNode("code", null, _toDisplayString(run.id), 1 /* TEXT */)
|
|
1032
|
+
]),
|
|
1033
|
+
(run.reason || run.error)
|
|
1034
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
1035
|
+
key: 0,
|
|
1036
|
+
class: "workflow-run-reason"
|
|
1037
|
+
}, _toDisplayString(run.reason || run.error), 1 /* TEXT */))
|
|
1038
|
+
: _createCommentVNode("v-if", true),
|
|
1039
|
+
(['queued', 'running', 'waiting'].includes(run.status))
|
|
1040
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
1041
|
+
key: 1,
|
|
1042
|
+
class: "workflow-run-actions"
|
|
1043
|
+
}, [
|
|
1044
|
+
(run.status === 'waiting')
|
|
1045
|
+
? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [
|
|
1046
|
+
_createElementVNode("button", {
|
|
1047
|
+
type: "button",
|
|
1048
|
+
class: "btn-tool btn-tool-compact",
|
|
1049
|
+
onClick: $event => (_ctx.workflowInput = JSON.stringify(run.input, null, 2)),
|
|
1050
|
+
disabled: _ctx.workflowBusy
|
|
1051
|
+
}, _toDisplayString(_ctx.t('workflow.loadInput')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
1052
|
+
_createElementVNode("button", {
|
|
1053
|
+
type: "button",
|
|
1054
|
+
class: "btn-tool btn-tool-compact",
|
|
1055
|
+
onClick: $event => (_ctx.controlWorkflowRun(run, 'resume')),
|
|
1056
|
+
disabled: _ctx.workflowBusy
|
|
1057
|
+
}, _toDisplayString(_ctx.t('workflow.resume')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
1058
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1059
|
+
: _createCommentVNode("v-if", true),
|
|
1060
|
+
_createElementVNode("button", {
|
|
1061
|
+
type: "button",
|
|
1062
|
+
class: "btn-tool btn-tool-compact",
|
|
1063
|
+
onClick: $event => (_ctx.controlWorkflowRun(run, 'cancel')),
|
|
1064
|
+
disabled: _ctx.workflowBusy
|
|
1065
|
+
}, _toDisplayString(_ctx.t('workflow.cancel')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
1066
|
+
]))
|
|
1067
|
+
: _createCommentVNode("v-if", true),
|
|
1068
|
+
(run.summary)
|
|
1069
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
1070
|
+
key: 2,
|
|
1071
|
+
class: "workflow-details",
|
|
1072
|
+
open: run.status === 'waiting'
|
|
1073
|
+
}, [
|
|
1074
|
+
_createElementVNode("summary", null, _toDisplayString(_ctx.t('workflow.summary')), 1 /* TEXT */),
|
|
1075
|
+
_createElementVNode("pre", null, _toDisplayString(JSON.stringify(run.summary, null, 2)), 1 /* TEXT */)
|
|
1076
|
+
], 8 /* PROPS */, ["open"]))
|
|
1077
|
+
: _createCommentVNode("v-if", true),
|
|
1078
|
+
_createElementVNode("details", { class: "workflow-details" }, [
|
|
1079
|
+
_createElementVNode("summary", null, _toDisplayString(_ctx.t('workflow.details')), 1 /* TEXT */),
|
|
1080
|
+
_createElementVNode("pre", null, _toDisplayString(JSON.stringify({ steps: run.steps, notification: run.notification }, null, 2)), 1 /* TEXT */)
|
|
1081
|
+
])
|
|
1082
|
+
]))
|
|
1083
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
1084
|
+
], 8 /* PROPS */, ["open"])
|
|
1085
|
+
], 8 /* PROPS */, ["aria-label", "aria-busy"]),
|
|
893
1086
|
_createElementVNode("div", { class: "selector-section doctor-hero" }, [
|
|
894
1087
|
_createElementVNode("div", { class: "selector-header doctor-header" }, [
|
|
895
1088
|
_createElementVNode("span", { class: "selector-title" }, _toDisplayString(_ctx.t('dashboard.doctor.title')), 1 /* TEXT */),
|
|
@@ -1720,16 +1913,23 @@ return function render(_ctx, _cache) {
|
|
|
1720
1913
|
key: 4,
|
|
1721
1914
|
class: "tool-config-write-overlay"
|
|
1722
1915
|
}, [
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1916
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'codex')
|
|
1917
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
1918
|
+
key: 0,
|
|
1919
|
+
to: "body"
|
|
1920
|
+
}, [
|
|
1921
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
1922
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.codex.lockedTitle')), 1 /* TEXT */),
|
|
1923
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.codex.lockedDesc')), 1 /* TEXT */),
|
|
1924
|
+
_createElementVNode("button", {
|
|
1925
|
+
type: "button",
|
|
1926
|
+
class: "btn-tool",
|
|
1927
|
+
onClick: $event => (_ctx.setToolConfigPermission('codex', true)),
|
|
1928
|
+
disabled: _ctx.toolConfigPermissionSaving.codex
|
|
1929
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
1930
|
+
])
|
|
1931
|
+
]))
|
|
1932
|
+
: _createCommentVNode("v-if", true)
|
|
1733
1933
|
]))
|
|
1734
1934
|
: _createCommentVNode("v-if", true)
|
|
1735
1935
|
])
|
|
@@ -2257,16 +2457,23 @@ return function render(_ctx, _cache) {
|
|
|
2257
2457
|
key: 1,
|
|
2258
2458
|
class: "tool-config-write-overlay"
|
|
2259
2459
|
}, [
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2460
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'claude')
|
|
2461
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
2462
|
+
key: 0,
|
|
2463
|
+
to: "body"
|
|
2464
|
+
}, [
|
|
2465
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
2466
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.claude.lockedTitle')), 1 /* TEXT */),
|
|
2467
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.claude.lockedDesc')), 1 /* TEXT */),
|
|
2468
|
+
_createElementVNode("button", {
|
|
2469
|
+
type: "button",
|
|
2470
|
+
class: "btn-tool",
|
|
2471
|
+
onClick: $event => (_ctx.setToolConfigPermission('claude', true)),
|
|
2472
|
+
disabled: _ctx.toolConfigPermissionSaving.claude
|
|
2473
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
2474
|
+
])
|
|
2475
|
+
]))
|
|
2476
|
+
: _createCommentVNode("v-if", true)
|
|
2270
2477
|
]))
|
|
2271
2478
|
: _createCommentVNode("v-if", true)
|
|
2272
2479
|
])
|
|
@@ -2512,16 +2719,23 @@ return function render(_ctx, _cache) {
|
|
|
2512
2719
|
key: 0,
|
|
2513
2720
|
class: "tool-config-write-overlay"
|
|
2514
2721
|
}, [
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2722
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'openclaw')
|
|
2723
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
2724
|
+
key: 0,
|
|
2725
|
+
to: "body"
|
|
2726
|
+
}, [
|
|
2727
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
2728
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.openclaw.lockedTitle')), 1 /* TEXT */),
|
|
2729
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.openclaw.lockedDesc')), 1 /* TEXT */),
|
|
2730
|
+
_createElementVNode("button", {
|
|
2731
|
+
type: "button",
|
|
2732
|
+
class: "btn-tool",
|
|
2733
|
+
onClick: $event => (_ctx.setToolConfigPermission('openclaw', true)),
|
|
2734
|
+
disabled: _ctx.toolConfigPermissionSaving.openclaw
|
|
2735
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
2736
|
+
])
|
|
2737
|
+
]))
|
|
2738
|
+
: _createCommentVNode("v-if", true)
|
|
2525
2739
|
]))
|
|
2526
2740
|
: _createCommentVNode("v-if", true)
|
|
2527
2741
|
])
|
|
@@ -2921,16 +3135,23 @@ return function render(_ctx, _cache) {
|
|
|
2921
3135
|
key: 1,
|
|
2922
3136
|
class: "tool-config-write-overlay"
|
|
2923
3137
|
}, [
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3138
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'opencode')
|
|
3139
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
3140
|
+
key: 0,
|
|
3141
|
+
to: "body"
|
|
3142
|
+
}, [
|
|
3143
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
3144
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.opencode.lockedTitle')), 1 /* TEXT */),
|
|
3145
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.opencode.lockedDesc')), 1 /* TEXT */),
|
|
3146
|
+
_createElementVNode("button", {
|
|
3147
|
+
type: "button",
|
|
3148
|
+
class: "btn-tool",
|
|
3149
|
+
onClick: $event => (_ctx.setToolConfigPermission('opencode', true)),
|
|
3150
|
+
disabled: _ctx.toolConfigPermissionSaving.opencode
|
|
3151
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3152
|
+
])
|
|
3153
|
+
]))
|
|
3154
|
+
: _createCommentVNode("v-if", true)
|
|
2934
3155
|
]))
|
|
2935
3156
|
: _createCommentVNode("v-if", true)
|
|
2936
3157
|
])
|
|
@@ -3195,16 +3416,23 @@ return function render(_ctx, _cache) {
|
|
|
3195
3416
|
key: 1,
|
|
3196
3417
|
class: "tool-config-write-overlay"
|
|
3197
3418
|
}, [
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3419
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'kilocode')
|
|
3420
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
3421
|
+
key: 0,
|
|
3422
|
+
to: "body"
|
|
3423
|
+
}, [
|
|
3424
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
3425
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.kilocode.lockedTitle')), 1 /* TEXT */),
|
|
3426
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.kilocode.lockedDesc')), 1 /* TEXT */),
|
|
3427
|
+
_createElementVNode("button", {
|
|
3428
|
+
type: "button",
|
|
3429
|
+
class: "btn-tool",
|
|
3430
|
+
onClick: $event => (_ctx.setToolConfigPermission('kilocode', true)),
|
|
3431
|
+
disabled: _ctx.toolConfigPermissionSaving.kilocode
|
|
3432
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3433
|
+
])
|
|
3434
|
+
]))
|
|
3435
|
+
: _createCommentVNode("v-if", true)
|
|
3208
3436
|
]))
|
|
3209
3437
|
: _createCommentVNode("v-if", true)
|
|
3210
3438
|
])
|
|
@@ -3570,16 +3798,23 @@ return function render(_ctx, _cache) {
|
|
|
3570
3798
|
key: 0,
|
|
3571
3799
|
class: "tool-config-write-overlay"
|
|
3572
3800
|
}, [
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3801
|
+
(_ctx.mainTab === 'config' && _ctx.configMode === 'pi')
|
|
3802
|
+
? (_openBlock(), _createBlock(_Teleport, {
|
|
3803
|
+
key: 0,
|
|
3804
|
+
to: "body"
|
|
3805
|
+
}, [
|
|
3806
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
|
|
3807
|
+
_createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.pi.lockedTitle')), 1 /* TEXT */),
|
|
3808
|
+
_createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.pi.lockedDesc')), 1 /* TEXT */),
|
|
3809
|
+
_createElementVNode("button", {
|
|
3810
|
+
type: "button",
|
|
3811
|
+
class: "btn-tool",
|
|
3812
|
+
onClick: $event => (_ctx.setToolConfigPermission('pi', true)),
|
|
3813
|
+
disabled: _ctx.toolConfigPermissionSaving.pi
|
|
3814
|
+
}, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
3815
|
+
])
|
|
3816
|
+
]))
|
|
3817
|
+
: _createCommentVNode("v-if", true)
|
|
3583
3818
|
]))
|
|
3584
3819
|
: _createCommentVNode("v-if", true)
|
|
3585
3820
|
])
|
|
@@ -3935,6 +4170,208 @@ return function render(_ctx, _cache) {
|
|
|
3935
4170
|
? (_openBlock(), _createElementBlock("span", { key: 0 }, " · " + _toDisplayString(_ctx.sessionStandaloneSourceLabel), 1 /* TEXT */))
|
|
3936
4171
|
: _createCommentVNode("v-if", true)
|
|
3937
4172
|
]),
|
|
4173
|
+
(_ctx.activeSession)
|
|
4174
|
+
? (_openBlock(), _createElementBlock("section", {
|
|
4175
|
+
key: 0,
|
|
4176
|
+
class: "context-health",
|
|
4177
|
+
"aria-labelledby": "context-health-heading",
|
|
4178
|
+
"aria-busy": _ctx.sessionContextHealthLoading,
|
|
4179
|
+
onVnodeMounted: $event => (_ctx.loadSessionContextHealth()),
|
|
4180
|
+
onVnodeUpdated: $event => (_ctx.loadSessionContextHealth())
|
|
4181
|
+
}, [
|
|
4182
|
+
_createElementVNode("div", { class: "context-health-header" }, [
|
|
4183
|
+
_createElementVNode("div", { class: "context-health-heading" }, [
|
|
4184
|
+
_createElementVNode("h3", {
|
|
4185
|
+
id: "context-health-heading",
|
|
4186
|
+
class: "context-health-title"
|
|
4187
|
+
}, _toDisplayString(_ctx.t('contextHealth.title')), 1 /* TEXT */),
|
|
4188
|
+
(_ctx.sessionContextHealth)
|
|
4189
|
+
? (_openBlock(), _createElementBlock("span", {
|
|
4190
|
+
key: 0,
|
|
4191
|
+
class: _normalizeClass(['context-health-rating', _ctx.sessionContextHealth.health]),
|
|
4192
|
+
role: "img",
|
|
4193
|
+
"aria-label": _ctx.t('contextHealth.level.' + _ctx.sessionContextHealth.health)
|
|
4194
|
+
}, null, 10 /* CLASS, PROPS */, ["aria-label"]))
|
|
4195
|
+
: _createCommentVNode("v-if", true),
|
|
4196
|
+
(_ctx.sessionContextHealth)
|
|
4197
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4198
|
+
key: 1,
|
|
4199
|
+
class: "context-health-meta"
|
|
4200
|
+
}, _toDisplayString(_ctx.sessionContextHealth.messageCount.toLocaleString()) + " " + _toDisplayString(_ctx.t('contextHealth.nodes')), 1 /* TEXT */))
|
|
4201
|
+
: (_ctx.sessionContextHealthLoading)
|
|
4202
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4203
|
+
key: 2,
|
|
4204
|
+
class: "context-health-meta",
|
|
4205
|
+
role: "status"
|
|
4206
|
+
}, _toDisplayString(_ctx.t('contextHealth.loading')), 1 /* TEXT */))
|
|
4207
|
+
: _createCommentVNode("v-if", true)
|
|
4208
|
+
]),
|
|
4209
|
+
(_ctx.sessionContextHealth)
|
|
4210
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
4211
|
+
key: 0,
|
|
4212
|
+
class: "context-health-summary"
|
|
4213
|
+
}, [
|
|
4214
|
+
_createElementVNode("span", { class: "context-health-total mono" }, [
|
|
4215
|
+
_createTextVNode("≈ " + _toDisplayString(_ctx.sessionContextHealth.totalEstimatedTokens.toLocaleString()) + " ", 1 /* TEXT */),
|
|
4216
|
+
_createElementVNode("small", null, "Token")
|
|
4217
|
+
])
|
|
4218
|
+
]))
|
|
4219
|
+
: (_ctx.sessionContextHealthLoading)
|
|
4220
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
4221
|
+
key: 1,
|
|
4222
|
+
class: "context-health-summary context-health-summary-skeleton",
|
|
4223
|
+
"aria-hidden": "true"
|
|
4224
|
+
}, [
|
|
4225
|
+
_createElementVNode("span")
|
|
4226
|
+
]))
|
|
4227
|
+
: _createCommentVNode("v-if", true),
|
|
4228
|
+
_createElementVNode("button", {
|
|
4229
|
+
type: "button",
|
|
4230
|
+
class: "btn-mini context-health-refresh",
|
|
4231
|
+
onClick: $event => (_ctx.loadSessionContextHealth(true)),
|
|
4232
|
+
disabled: _ctx.sessionContextHealthLoading,
|
|
4233
|
+
"aria-label": _ctx.t('common.refresh'),
|
|
4234
|
+
title: _ctx.t('common.refresh')
|
|
4235
|
+
}, [
|
|
4236
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
4237
|
+
width: "16",
|
|
4238
|
+
height: "16",
|
|
4239
|
+
viewBox: "0 0 24 24",
|
|
4240
|
+
fill: "none",
|
|
4241
|
+
stroke: "currentColor",
|
|
4242
|
+
"stroke-width": "1.75",
|
|
4243
|
+
"stroke-linecap": "round",
|
|
4244
|
+
"stroke-linejoin": "round",
|
|
4245
|
+
"aria-hidden": "true"
|
|
4246
|
+
}, [
|
|
4247
|
+
_createElementVNode("path", { d: "M20 7v5h-5M4 17v-5h5" }),
|
|
4248
|
+
_createElementVNode("path", { d: "M6.1 7a7 7 0 0 1 11.5-1.3L20 8M4 16l2.4 2.3A7 7 0 0 0 17.9 17" })
|
|
4249
|
+
]))
|
|
4250
|
+
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"])
|
|
4251
|
+
]),
|
|
4252
|
+
_createElementVNode("div", {
|
|
4253
|
+
class: "context-health-bar",
|
|
4254
|
+
role: "img",
|
|
4255
|
+
"aria-label": _ctx.t('contextHealth.composition')
|
|
4256
|
+
}, [
|
|
4257
|
+
(_ctx.sessionContextHealth)
|
|
4258
|
+
? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_ctx.sessionContextHealth.categories, (part) => {
|
|
4259
|
+
return _withDirectives((_openBlock(), _createElementBlock("span", {
|
|
4260
|
+
key: part.id,
|
|
4261
|
+
class: _normalizeClass(['context-health-segment', part.id]),
|
|
4262
|
+
style: _normalizeStyle({ flexGrow: part.estimatedTokens }),
|
|
4263
|
+
title: _ctx.t('contextHealth.category.' + part.id) + ': ≈ ' + part.estimatedTokens + ' Token (' + part.percentage.toFixed(2) + '%)',
|
|
4264
|
+
"aria-label": _ctx.t('contextHealth.category.' + part.id) + ': ' + part.percentage.toFixed(2) + '%'
|
|
4265
|
+
}, null, 14 /* CLASS, STYLE, PROPS */, ["title", "aria-label"])), [
|
|
4266
|
+
[_vShow, part.estimatedTokens > 0]
|
|
4267
|
+
])
|
|
4268
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4269
|
+
: _createCommentVNode("v-if", true)
|
|
4270
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
4271
|
+
(_ctx.sessionContextHealthError)
|
|
4272
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4273
|
+
key: 0,
|
|
4274
|
+
class: "form-error context-health-error",
|
|
4275
|
+
role: "alert"
|
|
4276
|
+
}, _toDisplayString(_ctx.sessionContextHealthError), 1 /* TEXT */))
|
|
4277
|
+
: _createCommentVNode("v-if", true),
|
|
4278
|
+
(_ctx.sessionContextHealth)
|
|
4279
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
4280
|
+
key: 1,
|
|
4281
|
+
id: "context-health-details",
|
|
4282
|
+
class: "context-health-details"
|
|
4283
|
+
}, [
|
|
4284
|
+
_createElementVNode("dl", { class: "context-health-legend" }, [
|
|
4285
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionContextHealth.categories, (part) => {
|
|
4286
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
4287
|
+
key: part.id
|
|
4288
|
+
}, [
|
|
4289
|
+
_createElementVNode("dt", null, [
|
|
4290
|
+
_createElementVNode("span", {
|
|
4291
|
+
class: _normalizeClass(['context-health-dot', part.id]),
|
|
4292
|
+
"aria-hidden": "true"
|
|
4293
|
+
}, null, 2 /* CLASS */),
|
|
4294
|
+
_createTextVNode(_toDisplayString(_ctx.t('contextHealth.category.' + part.id)), 1 /* TEXT */)
|
|
4295
|
+
]),
|
|
4296
|
+
_createElementVNode("dd", null, [
|
|
4297
|
+
_createElementVNode("span", { class: "context-health-category-tokens mono" }, "≈ " + _toDisplayString(part.estimatedTokens.toLocaleString()), 1 /* TEXT */),
|
|
4298
|
+
_createElementVNode("span", { class: "context-health-category-share mono" }, _toDisplayString(part.percentage.toFixed(2)) + "%", 1 /* TEXT */)
|
|
4299
|
+
])
|
|
4300
|
+
]))
|
|
4301
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4302
|
+
]),
|
|
4303
|
+
(!_ctx.sessionContextHealth.messageCount)
|
|
4304
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4305
|
+
key: 0,
|
|
4306
|
+
class: "context-health-note"
|
|
4307
|
+
}, _toDisplayString(_ctx.t('contextHealth.empty')), 1 /* TEXT */))
|
|
4308
|
+
: _createCommentVNode("v-if", true)
|
|
4309
|
+
]))
|
|
4310
|
+
: (_ctx.sessionContextHealthLoading)
|
|
4311
|
+
? (_openBlock(), _createElementBlock("dl", {
|
|
4312
|
+
key: 2,
|
|
4313
|
+
class: "context-health-legend context-health-loading",
|
|
4314
|
+
"aria-hidden": "true"
|
|
4315
|
+
}, [
|
|
4316
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(['system', 'user', 'assistant', 'tools', 'code'], (part) => {
|
|
4317
|
+
return _createElementVNode("div", {
|
|
4318
|
+
key: part,
|
|
4319
|
+
class: "context-health-loading-row"
|
|
4320
|
+
}, [
|
|
4321
|
+
_createElementVNode("dt", null, [
|
|
4322
|
+
_createElementVNode("span", {
|
|
4323
|
+
class: _normalizeClass(['context-health-dot', part]),
|
|
4324
|
+
"aria-hidden": "true"
|
|
4325
|
+
}, null, 2 /* CLASS */),
|
|
4326
|
+
_createTextVNode(_toDisplayString(_ctx.t('contextHealth.category.' + part)), 1 /* TEXT */)
|
|
4327
|
+
]),
|
|
4328
|
+
_createElementVNode("dd", null, [
|
|
4329
|
+
_createElementVNode("span", { class: "context-health-value-skeleton" }),
|
|
4330
|
+
_createElementVNode("span", { class: "context-health-share-skeleton" })
|
|
4331
|
+
])
|
|
4332
|
+
])
|
|
4333
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
4334
|
+
]))
|
|
4335
|
+
: _createCommentVNode("v-if", true)
|
|
4336
|
+
], 8 /* PROPS */, ["aria-busy", "onVnodeMounted", "onVnodeUpdated"]))
|
|
4337
|
+
: _createCommentVNode("v-if", true),
|
|
4338
|
+
(_ctx.sessionContextHealthFocusedNode)
|
|
4339
|
+
? (_openBlock(), _createElementBlock("article", {
|
|
4340
|
+
key: 1,
|
|
4341
|
+
ref: "contextHealthFocusedMessage",
|
|
4342
|
+
class: "context-health-focused-message",
|
|
4343
|
+
tabindex: "-1",
|
|
4344
|
+
"data-context-node-id": _ctx.sessionContextHealthFocusedNode.id,
|
|
4345
|
+
"aria-label": _ctx.t('contextHealth.message')
|
|
4346
|
+
}, [
|
|
4347
|
+
_createElementVNode("header", null, [
|
|
4348
|
+
_createElementVNode("div", null, [
|
|
4349
|
+
_createElementVNode("strong", null, _toDisplayString(_ctx.t('contextHealth.message')), 1 /* TEXT */),
|
|
4350
|
+
_createElementVNode("span", { class: "context-health-meta mono" }, _toDisplayString(_ctx.sessionContextHealthFocusedNode.id), 1 /* TEXT */)
|
|
4351
|
+
]),
|
|
4352
|
+
_createElementVNode("button", {
|
|
4353
|
+
type: "button",
|
|
4354
|
+
class: "btn-mini context-health-refresh",
|
|
4355
|
+
onClick: $event => (_ctx.sessionContextHealthFocusedNode = null),
|
|
4356
|
+
"aria-label": _ctx.t('common.close')
|
|
4357
|
+
}, [
|
|
4358
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
4359
|
+
width: "16",
|
|
4360
|
+
height: "16",
|
|
4361
|
+
viewBox: "0 0 24 24",
|
|
4362
|
+
fill: "none",
|
|
4363
|
+
stroke: "currentColor",
|
|
4364
|
+
"stroke-width": "1.75",
|
|
4365
|
+
"stroke-linecap": "round",
|
|
4366
|
+
"aria-hidden": "true"
|
|
4367
|
+
}, [
|
|
4368
|
+
_createElementVNode("path", { d: "m6 6 12 12M18 6 6 18" })
|
|
4369
|
+
]))
|
|
4370
|
+
], 8 /* PROPS */, ["onClick", "aria-label"])
|
|
4371
|
+
]),
|
|
4372
|
+
_createElementVNode("pre", null, _toDisplayString(_ctx.sessionContextHealthFocusedNode.text), 1 /* TEXT */)
|
|
4373
|
+
], 8 /* PROPS */, ["data-context-node-id", "aria-label"]))
|
|
4374
|
+
: _createCommentVNode("v-if", true),
|
|
3938
4375
|
_createElementVNode("pre", { class: "session-standalone-text" }, _toDisplayString(_ctx.sessionStandaloneText), 1 /* TEXT */)
|
|
3939
4376
|
]))
|
|
3940
4377
|
]))
|
|
@@ -4372,6 +4809,197 @@ return function render(_ctx, _cache) {
|
|
|
4372
4809
|
ref: _ctx.setSessionPreviewScrollRef,
|
|
4373
4810
|
onScroll: _ctx.onSessionPreviewScroll
|
|
4374
4811
|
}, [
|
|
4812
|
+
(_ctx.activeSession)
|
|
4813
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
4814
|
+
key: _ctx.handoffSessionKey,
|
|
4815
|
+
class: "session-workspace thread-handoff",
|
|
4816
|
+
open: _ctx.handoffExpanded,
|
|
4817
|
+
onToggle: _ctx.toggleThreadHandoff,
|
|
4818
|
+
"aria-label": "会话交接"
|
|
4819
|
+
}, [
|
|
4820
|
+
_createElementVNode("summary", { class: "thread-handoff-summary" }, [
|
|
4821
|
+
_createElementVNode("span", null, "会话交接"),
|
|
4822
|
+
_createElementVNode("span", { class: "thread-handoff-summary-hint" }, _toDisplayString(_ctx.handoffExpanded ? '收起' : '填写交接 · 查看历史'), 1 /* TEXT */)
|
|
4823
|
+
]),
|
|
4824
|
+
(_ctx.handoffExpanded)
|
|
4825
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
4826
|
+
key: 0,
|
|
4827
|
+
class: "thread-handoff-body"
|
|
4828
|
+
}, [
|
|
4829
|
+
_createElementVNode("div", { class: "session-workspace-header session-workspace-card-wide" }, [
|
|
4830
|
+
_createElementVNode("p", { class: "session-workspace-subtitle" }, "交代目标,让下一位代理接着做。草稿在切换会话后保留,刷新后清空。"),
|
|
4831
|
+
_createElementVNode("button", {
|
|
4832
|
+
class: "btn-mini",
|
|
4833
|
+
type: "button",
|
|
4834
|
+
onClick: _ctx.loadThreadHandoffs,
|
|
4835
|
+
disabled: _ctx.handoffLoading || _ctx.handoffBusy
|
|
4836
|
+
}, _toDisplayString(_ctx.handoffLoading ? '刷新中…' : '刷新历史'), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
4837
|
+
]),
|
|
4838
|
+
_createElementVNode("form", {
|
|
4839
|
+
onSubmit: _withModifiers(_ctx.createThreadHandoff, ["prevent"]),
|
|
4840
|
+
class: "thread-handoff-form"
|
|
4841
|
+
}, [
|
|
4842
|
+
_createElementVNode("label", { class: "thread-handoff-field" }, [
|
|
4843
|
+
_createElementVNode("span", { class: "session-workspace-card-title" }, [
|
|
4844
|
+
_createTextVNode("交给谁 "),
|
|
4845
|
+
_createElementVNode("small", null, "必填")
|
|
4846
|
+
]),
|
|
4847
|
+
_withDirectives(_createElementVNode("input", {
|
|
4848
|
+
"onUpdate:modelValue": $event => ((_ctx.handoffDraft.target) = $event),
|
|
4849
|
+
class: "session-query-input",
|
|
4850
|
+
required: "",
|
|
4851
|
+
disabled: _ctx.handoffBusy,
|
|
4852
|
+
placeholder: "目标代理标识,例如 claude"
|
|
4853
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
4854
|
+
[_vModelText, _ctx.handoffDraft.target]
|
|
4855
|
+
])
|
|
4856
|
+
]),
|
|
4857
|
+
_createElementVNode("label", { class: "thread-handoff-field" }, [
|
|
4858
|
+
_createElementVNode("span", { class: "session-workspace-card-title" }, [
|
|
4859
|
+
_createTextVNode("接下来做什么 "),
|
|
4860
|
+
_createElementVNode("small", null, "必填")
|
|
4861
|
+
]),
|
|
4862
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
4863
|
+
"onUpdate:modelValue": $event => ((_ctx.handoffDraft.goal) = $event),
|
|
4864
|
+
class: "session-query-input",
|
|
4865
|
+
rows: "3",
|
|
4866
|
+
required: "",
|
|
4867
|
+
disabled: _ctx.handoffBusy,
|
|
4868
|
+
placeholder: "描述下一步任务、预期结果或验收标准"
|
|
4869
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
4870
|
+
[_vModelText, _ctx.handoffDraft.goal]
|
|
4871
|
+
])
|
|
4872
|
+
]),
|
|
4873
|
+
_createElementVNode("details", { class: "thread-handoff-optional" }, [
|
|
4874
|
+
_createElementVNode("summary", { class: "thread-handoff-optional-summary" }, [
|
|
4875
|
+
_createTextVNode("补充上下文 "),
|
|
4876
|
+
_createElementVNode("small", null, "已完成 / 阻塞 / 步骤 / 文件 · 可选")
|
|
4877
|
+
]),
|
|
4878
|
+
_createElementVNode("div", { class: "session-workspace-grid" }, [
|
|
4879
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.handoffFields, (field) => {
|
|
4880
|
+
return (_openBlock(), _createElementBlock("label", {
|
|
4881
|
+
key: field.key,
|
|
4882
|
+
class: "thread-handoff-field"
|
|
4883
|
+
}, [
|
|
4884
|
+
_createElementVNode("span", { class: "session-workspace-card-title" }, _toDisplayString(field.label) + "(可选)", 1 /* TEXT */),
|
|
4885
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
4886
|
+
"onUpdate:modelValue": $event => ((_ctx.handoffDraft[field.key]) = $event),
|
|
4887
|
+
class: "session-query-input",
|
|
4888
|
+
rows: "3",
|
|
4889
|
+
disabled: _ctx.handoffBusy,
|
|
4890
|
+
placeholder: "每行填写一项"
|
|
4891
|
+
}, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
|
|
4892
|
+
[_vModelText, _ctx.handoffDraft[field.key]]
|
|
4893
|
+
])
|
|
4894
|
+
]))
|
|
4895
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4896
|
+
])
|
|
4897
|
+
]),
|
|
4898
|
+
_createElementVNode("div", { class: "thread-handoff-actions" }, [
|
|
4899
|
+
_createElementVNode("span", { class: "session-workspace-subtitle" }, "生成后可复制到目标会话"),
|
|
4900
|
+
_createElementVNode("button", {
|
|
4901
|
+
class: "btn-mini thread-handoff-submit",
|
|
4902
|
+
type: "submit",
|
|
4903
|
+
disabled: _ctx.handoffBusy || _ctx.handoffLoading || !_ctx.handoffDraft.target.trim() || !_ctx.handoffDraft.goal.trim()
|
|
4904
|
+
}, _toDisplayString(_ctx.handoffBusy ? '处理中…' : '生成交接'), 9 /* TEXT, PROPS */, ["disabled"])
|
|
4905
|
+
])
|
|
4906
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["onSubmit"]),
|
|
4907
|
+
(_ctx.handoffError)
|
|
4908
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4909
|
+
key: 0,
|
|
4910
|
+
class: "state-message error session-workspace-card-wide",
|
|
4911
|
+
role: "alert"
|
|
4912
|
+
}, _toDisplayString(_ctx.handoffError), 1 /* TEXT */))
|
|
4913
|
+
: _createCommentVNode("v-if", true),
|
|
4914
|
+
(_ctx.handoffNotice)
|
|
4915
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4916
|
+
key: 1,
|
|
4917
|
+
class: "state-message session-workspace-card-wide",
|
|
4918
|
+
role: "status",
|
|
4919
|
+
"aria-live": "polite"
|
|
4920
|
+
}, _toDisplayString(_ctx.handoffNotice), 1 /* TEXT */))
|
|
4921
|
+
: _createCommentVNode("v-if", true),
|
|
4922
|
+
(_ctx.handoffCopyText)
|
|
4923
|
+
? (_openBlock(), _createElementBlock("label", {
|
|
4924
|
+
key: 2,
|
|
4925
|
+
class: "session-workspace-card session-workspace-card-wide"
|
|
4926
|
+
}, [
|
|
4927
|
+
_createElementVNode("span", { class: "session-workspace-card-title" }, "卡片文本(未发送,可手动复制)"),
|
|
4928
|
+
_createElementVNode("textarea", {
|
|
4929
|
+
class: "session-query-input",
|
|
4930
|
+
rows: "6",
|
|
4931
|
+
readonly: "",
|
|
4932
|
+
value: _ctx.handoffCopyText,
|
|
4933
|
+
onFocus: $event => ($event.target.select())
|
|
4934
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onFocus"])
|
|
4935
|
+
]))
|
|
4936
|
+
: _createCommentVNode("v-if", true),
|
|
4937
|
+
_createElementVNode("p", { class: "session-workspace-subtitle session-workspace-card-wide" }, "复制不会自动发送。读取确认由目标代理通过 CLI ack 提交。"),
|
|
4938
|
+
(_ctx.handoffLoading)
|
|
4939
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4940
|
+
key: 3,
|
|
4941
|
+
class: "session-workspace-card-wide",
|
|
4942
|
+
role: "status"
|
|
4943
|
+
}, "正在加载交接历史…"))
|
|
4944
|
+
: (!_ctx.handoffError && !_ctx.handoffRecords.length)
|
|
4945
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
4946
|
+
key: 4,
|
|
4947
|
+
class: "session-workspace-empty session-workspace-card-wide"
|
|
4948
|
+
}, "暂无交接记录"))
|
|
4949
|
+
: _createCommentVNode("v-if", true),
|
|
4950
|
+
(_ctx.handoffRecords.length)
|
|
4951
|
+
? (_openBlock(), _createElementBlock("ol", {
|
|
4952
|
+
key: 5,
|
|
4953
|
+
class: "session-workspace-list session-workspace-card-wide"
|
|
4954
|
+
}, [
|
|
4955
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.handoffRecords, (record) => {
|
|
4956
|
+
return (_openBlock(), _createElementBlock("li", {
|
|
4957
|
+
key: record.id,
|
|
4958
|
+
class: "session-workspace-card"
|
|
4959
|
+
}, [
|
|
4960
|
+
_createElementVNode("div", { class: "session-workspace-card-title" }, _toDisplayString(record.target) + " · " + _toDisplayString(_ctx.handoffStatusLabel(record.status)), 1 /* TEXT */),
|
|
4961
|
+
_createElementVNode("div", null, [
|
|
4962
|
+
_createTextVNode("交接标识:"),
|
|
4963
|
+
_createElementVNode("code", null, _toDisplayString(record.id), 1 /* TEXT */)
|
|
4964
|
+
]),
|
|
4965
|
+
_createElementVNode("div", null, "创建时间:" + _toDisplayString(record.createdAt) + " · 投递耗时:" + _toDisplayString(record.durationMs) + " 毫秒 · 写入耗时:" + _toDisplayString(record.writeDurationMs || 0) + " 毫秒", 1 /* TEXT */),
|
|
4966
|
+
_createElementVNode("div", null, "交接路径:" + _toDisplayString(record.route === 'mcp' ? 'MCP 工具' : '文件级') + " · 文件回退:" + _toDisplayString(record.fallback ? '是' : '否'), 1 /* TEXT */),
|
|
4967
|
+
(record.mcp)
|
|
4968
|
+
? (_openBlock(), _createElementBlock("div", { key: 0 }, "服务:" + _toDisplayString(record.mcp.server) + " · 工具:" + _toDisplayString(record.mcp.tool), 1 /* TEXT */))
|
|
4969
|
+
: _createCommentVNode("v-if", true),
|
|
4970
|
+
_createElementVNode("div", null, "写入结果:" + _toDisplayString(record.writeResult === 'written' ? '已写入' : (record.writeResult === 'failed_or_unconfirmed' ? '失败或结果未确认(不重试)' : '未执行写入')), 1 /* TEXT */),
|
|
4971
|
+
(record.filePath)
|
|
4972
|
+
? (_openBlock(), _createElementBlock("div", { key: 1 }, [
|
|
4973
|
+
_createTextVNode("文件位置:"),
|
|
4974
|
+
_createElementVNode("code", null, _toDisplayString(record.filePath), 1 /* TEXT */)
|
|
4975
|
+
]))
|
|
4976
|
+
: _createCommentVNode("v-if", true),
|
|
4977
|
+
(record.reason)
|
|
4978
|
+
? (_openBlock(), _createElementBlock("div", { key: 2 }, "原因:" + _toDisplayString(record.reason), 1 /* TEXT */))
|
|
4979
|
+
: _createCommentVNode("v-if", true),
|
|
4980
|
+
(record.readConfirmation)
|
|
4981
|
+
? (_openBlock(), _createElementBlock("div", { key: 3 }, [
|
|
4982
|
+
_createElementVNode("div", null, "读取代理:" + _toDisplayString(record.readConfirmation.agent) + " · 确认时间:" + _toDisplayString(record.readConfirmation.at), 1 /* TEXT */),
|
|
4983
|
+
_createElementVNode("div", null, "读取证据:" + _toDisplayString(record.readConfirmation.evidence), 1 /* TEXT */)
|
|
4984
|
+
]))
|
|
4985
|
+
: _createCommentVNode("v-if", true),
|
|
4986
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.discoveryWarnings || [], (warning, index) => {
|
|
4987
|
+
return (_openBlock(), _createElementBlock("div", { key: index }, "探测提示:" + _toDisplayString(warning.source) + " · " + _toDisplayString(warning.reason), 1 /* TEXT */))
|
|
4988
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
4989
|
+
_createElementVNode("button", {
|
|
4990
|
+
class: "btn-mini",
|
|
4991
|
+
type: "button",
|
|
4992
|
+
onClick: $event => (_ctx.copyThreadHandoff(record)),
|
|
4993
|
+
disabled: _ctx.handoffBusy || _ctx.handoffLoading
|
|
4994
|
+
}, _toDisplayString(record.route === 'mcp' ? '回退文件并复制卡片' : '复制卡片'), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
4995
|
+
]))
|
|
4996
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4997
|
+
]))
|
|
4998
|
+
: _createCommentVNode("v-if", true)
|
|
4999
|
+
]))
|
|
5000
|
+
: _createCommentVNode("v-if", true)
|
|
5001
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["open", "onToggle"]))
|
|
5002
|
+
: _createCommentVNode("v-if", true),
|
|
4375
5003
|
_createElementVNode("div", {
|
|
4376
5004
|
class: "session-preview-header",
|
|
4377
5005
|
ref: _ctx.setSessionPreviewHeaderRef
|
|
@@ -4398,12 +5026,15 @@ return function render(_ctx, _cache) {
|
|
|
4398
5026
|
_createElementVNode("div", { class: "session-secondary-actions" }, [
|
|
4399
5027
|
_createElementVNode("button", {
|
|
4400
5028
|
class: "btn-session-refresh has-label session-action-optional-label",
|
|
5029
|
+
"data-icon-only": "true",
|
|
4401
5030
|
onClick: _ctx.loadActiveSessionDetail,
|
|
4402
5031
|
disabled: _ctx.sessionDetailLoading || !_ctx.activeSession,
|
|
4403
5032
|
title: _ctx.sessionDetailLoading ? _ctx.t('sessions.preview.loading') : _ctx.t('sessions.preview.refresh'),
|
|
4404
5033
|
"aria-label": _ctx.sessionDetailLoading ? _ctx.t('sessions.preview.loading') : _ctx.t('sessions.preview.refresh')
|
|
4405
5034
|
}, [
|
|
4406
5035
|
(_openBlock(), _createElementBlock("svg", {
|
|
5036
|
+
"aria-hidden": "true",
|
|
5037
|
+
focusable: "false",
|
|
4407
5038
|
viewBox: "0 0 16 16",
|
|
4408
5039
|
fill: "none",
|
|
4409
5040
|
stroke: "currentColor",
|
|
@@ -4416,7 +5047,11 @@ return function render(_ctx, _cache) {
|
|
|
4416
5047
|
_createElementVNode("polyline", { points: "2.5 2 2.5 5 5.5 5" }),
|
|
4417
5048
|
_createElementVNode("polyline", { points: "13.5 14 13.5 11 10.5 11" })
|
|
4418
5049
|
])),
|
|
4419
|
-
_createElementVNode("span", {
|
|
5050
|
+
_createElementVNode("span", {
|
|
5051
|
+
class: "session-action-label session-action-optional-text",
|
|
5052
|
+
hidden: "",
|
|
5053
|
+
"aria-hidden": "true"
|
|
5054
|
+
}, _toDisplayString(_ctx.t('sessions.preview.refresh')), 1 /* TEXT */)
|
|
4420
5055
|
], 8 /* PROPS */, ["onClick", "disabled", "title", "aria-label"]),
|
|
4421
5056
|
_createElementVNode("div", { class: "session-link-group" }, [
|
|
4422
5057
|
_createElementVNode("button", {
|
|
@@ -4462,12 +5097,15 @@ return function render(_ctx, _cache) {
|
|
|
4462
5097
|
]),
|
|
4463
5098
|
_createElementVNode("button", {
|
|
4464
5099
|
class: "btn-session-open has-label session-action-optional-label",
|
|
5100
|
+
"data-icon-only": "true",
|
|
4465
5101
|
onClick: $event => (_ctx.copySessionPath(_ctx.activeSession)),
|
|
4466
5102
|
disabled: !_ctx.activeSession || !_ctx.getSessionFilePath(_ctx.activeSession),
|
|
4467
5103
|
title: _ctx.t('sessions.preview.copyPath'),
|
|
4468
5104
|
"aria-label": _ctx.t('sessions.preview.copyPath')
|
|
4469
5105
|
}, [
|
|
4470
5106
|
(_openBlock(), _createElementBlock("svg", {
|
|
5107
|
+
"aria-hidden": "true",
|
|
5108
|
+
focusable: "false",
|
|
4471
5109
|
viewBox: "0 0 16 16",
|
|
4472
5110
|
fill: "none",
|
|
4473
5111
|
stroke: "currentColor",
|
|
@@ -4477,18 +5115,25 @@ return function render(_ctx, _cache) {
|
|
|
4477
5115
|
}, [
|
|
4478
5116
|
_createElementVNode("path", { d: "M2 5.5V12.5a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7.5a1 1 0 0 0-1-1H8L6.5 5H3a1 1 0 0 0-1 1z" })
|
|
4479
5117
|
])),
|
|
4480
|
-
_createElementVNode("span", {
|
|
5118
|
+
_createElementVNode("span", {
|
|
5119
|
+
class: "session-action-label session-action-optional-text",
|
|
5120
|
+
hidden: "",
|
|
5121
|
+
"aria-hidden": "true"
|
|
5122
|
+
}, _toDisplayString(_ctx.t('sessions.preview.copyPath')), 1 /* TEXT */)
|
|
4481
5123
|
], 8 /* PROPS */, ["onClick", "disabled", "title", "aria-label"])
|
|
4482
5124
|
]),
|
|
4483
5125
|
_createElementVNode("div", { class: "session-primary-actions" }, [
|
|
4484
5126
|
_createElementVNode("button", {
|
|
4485
5127
|
class: "btn-session-export has-label",
|
|
5128
|
+
"data-icon-only": "true",
|
|
4486
5129
|
onClick: $event => (_ctx.exportSession(_ctx.activeSession)),
|
|
4487
5130
|
disabled: !_ctx.activeSession || _ctx.sessionExporting[_ctx.getSessionExportKey(_ctx.activeSession)],
|
|
4488
5131
|
title: (_ctx.activeSession && _ctx.sessionExporting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? _ctx.t('sessions.preview.exporting') : _ctx.t('sessions.preview.export'),
|
|
4489
5132
|
"aria-label": (_ctx.activeSession && _ctx.sessionExporting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? _ctx.t('sessions.preview.exporting') : _ctx.t('sessions.preview.export')
|
|
4490
5133
|
}, [
|
|
4491
5134
|
(_openBlock(), _createElementBlock("svg", {
|
|
5135
|
+
"aria-hidden": "true",
|
|
5136
|
+
focusable: "false",
|
|
4492
5137
|
viewBox: "0 0 16 16",
|
|
4493
5138
|
fill: "none",
|
|
4494
5139
|
stroke: "currentColor",
|
|
@@ -4500,23 +5145,247 @@ return function render(_ctx, _cache) {
|
|
|
4500
5145
|
_createElementVNode("polyline", { points: "4 7 8 10.5 12 7" }),
|
|
4501
5146
|
_createElementVNode("path", { d: "M2.5 12v1.5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V12" })
|
|
4502
5147
|
])),
|
|
4503
|
-
_createElementVNode("span", {
|
|
5148
|
+
_createElementVNode("span", {
|
|
5149
|
+
class: "session-action-label",
|
|
5150
|
+
hidden: "",
|
|
5151
|
+
"aria-hidden": "true"
|
|
5152
|
+
}, _toDisplayString((_ctx.activeSession && _ctx.sessionExporting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? _ctx.t('sessions.preview.exporting') : _ctx.t('sessions.preview.export')), 1 /* TEXT */)
|
|
4504
5153
|
], 8 /* PROPS */, ["onClick", "disabled", "title", "aria-label"]),
|
|
4505
5154
|
(_ctx.isDeleteAvailable(_ctx.activeSession))
|
|
4506
5155
|
? (_openBlock(), _createElementBlock("button", {
|
|
4507
5156
|
key: 0,
|
|
4508
5157
|
class: "btn-session-delete has-label session-delete-text-button",
|
|
5158
|
+
"data-icon-only": "true",
|
|
4509
5159
|
onClick: $event => (_ctx.deleteSession(_ctx.activeSession)),
|
|
4510
5160
|
disabled: !_ctx.activeSession || _ctx.sessionsLoading || _ctx.sessionDeleting[_ctx.getSessionExportKey(_ctx.activeSession)],
|
|
4511
5161
|
title: (_ctx.activeSession && _ctx.sessionDeleting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleting') : _ctx.t('sessions.preview.moving')) : (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleteHard') : _ctx.t('sessions.preview.moveToTrash')),
|
|
4512
5162
|
"aria-label": (_ctx.activeSession && _ctx.sessionDeleting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleting') : _ctx.t('sessions.preview.moving')) : (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleteHard') : _ctx.t('sessions.preview.moveToTrash'))
|
|
4513
5163
|
}, [
|
|
4514
|
-
|
|
5164
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
5165
|
+
viewBox: "0 0 16 16",
|
|
5166
|
+
fill: "none",
|
|
5167
|
+
stroke: "currentColor",
|
|
5168
|
+
"stroke-width": "1.8",
|
|
5169
|
+
"stroke-linecap": "round",
|
|
5170
|
+
"stroke-linejoin": "round",
|
|
5171
|
+
"aria-hidden": "true",
|
|
5172
|
+
focusable: "false"
|
|
5173
|
+
}, [
|
|
5174
|
+
_createElementVNode("path", { d: "M2.5 4.5h11M6 4.5V2.5h4v2" }),
|
|
5175
|
+
_createElementVNode("path", { d: "m4 4.5 .5 9h7l.5-9M6.5 7v4M9.5 7v4" })
|
|
5176
|
+
])),
|
|
5177
|
+
_createElementVNode("span", {
|
|
5178
|
+
class: "session-action-label",
|
|
5179
|
+
hidden: "",
|
|
5180
|
+
"aria-hidden": "true"
|
|
5181
|
+
}, _toDisplayString((_ctx.activeSession && _ctx.sessionDeleting[_ctx.getSessionExportKey(_ctx.activeSession)]) ? (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleting') : _ctx.t('sessions.preview.moving')) : (_ctx.sessionTrashEnabled === false ? _ctx.t('sessions.preview.deleteHard') : _ctx.t('sessions.preview.moveToTrash'))), 1 /* TEXT */)
|
|
4515
5182
|
], 8 /* PROPS */, ["onClick", "disabled", "title", "aria-label"]))
|
|
4516
5183
|
: _createCommentVNode("v-if", true)
|
|
4517
5184
|
])
|
|
4518
5185
|
])
|
|
4519
5186
|
], 512 /* NEED_PATCH */),
|
|
5187
|
+
(_ctx.activeSession)
|
|
5188
|
+
? (_openBlock(), _createElementBlock("section", {
|
|
5189
|
+
key: 1,
|
|
5190
|
+
class: "context-health",
|
|
5191
|
+
"aria-labelledby": "context-health-heading",
|
|
5192
|
+
"aria-busy": _ctx.sessionContextHealthLoading,
|
|
5193
|
+
onVnodeMounted: $event => (_ctx.loadSessionContextHealth()),
|
|
5194
|
+
onVnodeUpdated: $event => (_ctx.loadSessionContextHealth())
|
|
5195
|
+
}, [
|
|
5196
|
+
_createElementVNode("div", { class: "context-health-header" }, [
|
|
5197
|
+
_createElementVNode("div", { class: "context-health-heading" }, [
|
|
5198
|
+
_createElementVNode("h3", {
|
|
5199
|
+
id: "context-health-heading",
|
|
5200
|
+
class: "context-health-title"
|
|
5201
|
+
}, _toDisplayString(_ctx.t('contextHealth.title')), 1 /* TEXT */),
|
|
5202
|
+
(_ctx.sessionContextHealth)
|
|
5203
|
+
? (_openBlock(), _createElementBlock("span", {
|
|
5204
|
+
key: 0,
|
|
5205
|
+
class: _normalizeClass(['context-health-rating', _ctx.sessionContextHealth.health]),
|
|
5206
|
+
role: "img",
|
|
5207
|
+
"aria-label": _ctx.t('contextHealth.level.' + _ctx.sessionContextHealth.health)
|
|
5208
|
+
}, null, 10 /* CLASS, PROPS */, ["aria-label"]))
|
|
5209
|
+
: _createCommentVNode("v-if", true),
|
|
5210
|
+
(_ctx.sessionContextHealth)
|
|
5211
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
5212
|
+
key: 1,
|
|
5213
|
+
class: "context-health-meta"
|
|
5214
|
+
}, _toDisplayString(_ctx.sessionContextHealth.messageCount.toLocaleString()) + " " + _toDisplayString(_ctx.t('contextHealth.nodes')), 1 /* TEXT */))
|
|
5215
|
+
: (_ctx.sessionContextHealthLoading)
|
|
5216
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
5217
|
+
key: 2,
|
|
5218
|
+
class: "context-health-meta",
|
|
5219
|
+
role: "status"
|
|
5220
|
+
}, _toDisplayString(_ctx.t('contextHealth.loading')), 1 /* TEXT */))
|
|
5221
|
+
: _createCommentVNode("v-if", true)
|
|
5222
|
+
]),
|
|
5223
|
+
(_ctx.sessionContextHealth)
|
|
5224
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
5225
|
+
key: 0,
|
|
5226
|
+
class: "context-health-summary"
|
|
5227
|
+
}, [
|
|
5228
|
+
_createElementVNode("span", { class: "context-health-total mono" }, [
|
|
5229
|
+
_createTextVNode("≈ " + _toDisplayString(_ctx.sessionContextHealth.totalEstimatedTokens.toLocaleString()) + " ", 1 /* TEXT */),
|
|
5230
|
+
_createElementVNode("small", null, "Token")
|
|
5231
|
+
])
|
|
5232
|
+
]))
|
|
5233
|
+
: (_ctx.sessionContextHealthLoading)
|
|
5234
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
5235
|
+
key: 1,
|
|
5236
|
+
class: "context-health-summary context-health-summary-skeleton",
|
|
5237
|
+
"aria-hidden": "true"
|
|
5238
|
+
}, [
|
|
5239
|
+
_createElementVNode("span")
|
|
5240
|
+
]))
|
|
5241
|
+
: _createCommentVNode("v-if", true),
|
|
5242
|
+
_createElementVNode("button", {
|
|
5243
|
+
type: "button",
|
|
5244
|
+
class: "btn-mini context-health-refresh",
|
|
5245
|
+
onClick: $event => (_ctx.loadSessionContextHealth(true)),
|
|
5246
|
+
disabled: _ctx.sessionContextHealthLoading,
|
|
5247
|
+
"aria-label": _ctx.t('common.refresh'),
|
|
5248
|
+
title: _ctx.t('common.refresh')
|
|
5249
|
+
}, [
|
|
5250
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
5251
|
+
width: "16",
|
|
5252
|
+
height: "16",
|
|
5253
|
+
viewBox: "0 0 24 24",
|
|
5254
|
+
fill: "none",
|
|
5255
|
+
stroke: "currentColor",
|
|
5256
|
+
"stroke-width": "1.75",
|
|
5257
|
+
"stroke-linecap": "round",
|
|
5258
|
+
"stroke-linejoin": "round",
|
|
5259
|
+
"aria-hidden": "true"
|
|
5260
|
+
}, [
|
|
5261
|
+
_createElementVNode("path", { d: "M20 7v5h-5M4 17v-5h5" }),
|
|
5262
|
+
_createElementVNode("path", { d: "M6.1 7a7 7 0 0 1 11.5-1.3L20 8M4 16l2.4 2.3A7 7 0 0 0 17.9 17" })
|
|
5263
|
+
]))
|
|
5264
|
+
], 8 /* PROPS */, ["onClick", "disabled", "aria-label", "title"])
|
|
5265
|
+
]),
|
|
5266
|
+
_createElementVNode("div", {
|
|
5267
|
+
class: "context-health-bar",
|
|
5268
|
+
role: "img",
|
|
5269
|
+
"aria-label": _ctx.t('contextHealth.composition')
|
|
5270
|
+
}, [
|
|
5271
|
+
(_ctx.sessionContextHealth)
|
|
5272
|
+
? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(_ctx.sessionContextHealth.categories, (part) => {
|
|
5273
|
+
return _withDirectives((_openBlock(), _createElementBlock("span", {
|
|
5274
|
+
key: part.id,
|
|
5275
|
+
class: _normalizeClass(['context-health-segment', part.id]),
|
|
5276
|
+
style: _normalizeStyle({ flexGrow: part.estimatedTokens }),
|
|
5277
|
+
title: _ctx.t('contextHealth.category.' + part.id) + ': ≈ ' + part.estimatedTokens + ' Token (' + part.percentage.toFixed(2) + '%)',
|
|
5278
|
+
"aria-label": _ctx.t('contextHealth.category.' + part.id) + ': ' + part.percentage.toFixed(2) + '%'
|
|
5279
|
+
}, null, 14 /* CLASS, STYLE, PROPS */, ["title", "aria-label"])), [
|
|
5280
|
+
[_vShow, part.estimatedTokens > 0]
|
|
5281
|
+
])
|
|
5282
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
5283
|
+
: _createCommentVNode("v-if", true)
|
|
5284
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
5285
|
+
(_ctx.sessionContextHealthError)
|
|
5286
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
5287
|
+
key: 0,
|
|
5288
|
+
class: "form-error context-health-error",
|
|
5289
|
+
role: "alert"
|
|
5290
|
+
}, _toDisplayString(_ctx.sessionContextHealthError), 1 /* TEXT */))
|
|
5291
|
+
: _createCommentVNode("v-if", true),
|
|
5292
|
+
(_ctx.sessionContextHealth)
|
|
5293
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
5294
|
+
key: 1,
|
|
5295
|
+
id: "context-health-details",
|
|
5296
|
+
class: "context-health-details"
|
|
5297
|
+
}, [
|
|
5298
|
+
_createElementVNode("dl", { class: "context-health-legend" }, [
|
|
5299
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionContextHealth.categories, (part) => {
|
|
5300
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
5301
|
+
key: part.id
|
|
5302
|
+
}, [
|
|
5303
|
+
_createElementVNode("dt", null, [
|
|
5304
|
+
_createElementVNode("span", {
|
|
5305
|
+
class: _normalizeClass(['context-health-dot', part.id]),
|
|
5306
|
+
"aria-hidden": "true"
|
|
5307
|
+
}, null, 2 /* CLASS */),
|
|
5308
|
+
_createTextVNode(_toDisplayString(_ctx.t('contextHealth.category.' + part.id)), 1 /* TEXT */)
|
|
5309
|
+
]),
|
|
5310
|
+
_createElementVNode("dd", null, [
|
|
5311
|
+
_createElementVNode("span", { class: "context-health-category-tokens mono" }, "≈ " + _toDisplayString(part.estimatedTokens.toLocaleString()), 1 /* TEXT */),
|
|
5312
|
+
_createElementVNode("span", { class: "context-health-category-share mono" }, _toDisplayString(part.percentage.toFixed(2)) + "%", 1 /* TEXT */)
|
|
5313
|
+
])
|
|
5314
|
+
]))
|
|
5315
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
5316
|
+
]),
|
|
5317
|
+
(!_ctx.sessionContextHealth.messageCount)
|
|
5318
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
5319
|
+
key: 0,
|
|
5320
|
+
class: "context-health-note"
|
|
5321
|
+
}, _toDisplayString(_ctx.t('contextHealth.empty')), 1 /* TEXT */))
|
|
5322
|
+
: _createCommentVNode("v-if", true)
|
|
5323
|
+
]))
|
|
5324
|
+
: (_ctx.sessionContextHealthLoading)
|
|
5325
|
+
? (_openBlock(), _createElementBlock("dl", {
|
|
5326
|
+
key: 2,
|
|
5327
|
+
class: "context-health-legend context-health-loading",
|
|
5328
|
+
"aria-hidden": "true"
|
|
5329
|
+
}, [
|
|
5330
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(['system', 'user', 'assistant', 'tools', 'code'], (part) => {
|
|
5331
|
+
return _createElementVNode("div", {
|
|
5332
|
+
key: part,
|
|
5333
|
+
class: "context-health-loading-row"
|
|
5334
|
+
}, [
|
|
5335
|
+
_createElementVNode("dt", null, [
|
|
5336
|
+
_createElementVNode("span", {
|
|
5337
|
+
class: _normalizeClass(['context-health-dot', part]),
|
|
5338
|
+
"aria-hidden": "true"
|
|
5339
|
+
}, null, 2 /* CLASS */),
|
|
5340
|
+
_createTextVNode(_toDisplayString(_ctx.t('contextHealth.category.' + part)), 1 /* TEXT */)
|
|
5341
|
+
]),
|
|
5342
|
+
_createElementVNode("dd", null, [
|
|
5343
|
+
_createElementVNode("span", { class: "context-health-value-skeleton" }),
|
|
5344
|
+
_createElementVNode("span", { class: "context-health-share-skeleton" })
|
|
5345
|
+
])
|
|
5346
|
+
])
|
|
5347
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
5348
|
+
]))
|
|
5349
|
+
: _createCommentVNode("v-if", true)
|
|
5350
|
+
], 8 /* PROPS */, ["aria-busy", "onVnodeMounted", "onVnodeUpdated"]))
|
|
5351
|
+
: _createCommentVNode("v-if", true),
|
|
5352
|
+
(_ctx.sessionContextHealthFocusedNode)
|
|
5353
|
+
? (_openBlock(), _createElementBlock("article", {
|
|
5354
|
+
key: 2,
|
|
5355
|
+
ref: "contextHealthFocusedMessage",
|
|
5356
|
+
class: "context-health-focused-message",
|
|
5357
|
+
tabindex: "-1",
|
|
5358
|
+
"data-context-node-id": _ctx.sessionContextHealthFocusedNode.id,
|
|
5359
|
+
"aria-label": _ctx.t('contextHealth.message')
|
|
5360
|
+
}, [
|
|
5361
|
+
_createElementVNode("header", null, [
|
|
5362
|
+
_createElementVNode("div", null, [
|
|
5363
|
+
_createElementVNode("strong", null, _toDisplayString(_ctx.t('contextHealth.message')), 1 /* TEXT */),
|
|
5364
|
+
_createElementVNode("span", { class: "context-health-meta mono" }, _toDisplayString(_ctx.sessionContextHealthFocusedNode.id), 1 /* TEXT */)
|
|
5365
|
+
]),
|
|
5366
|
+
_createElementVNode("button", {
|
|
5367
|
+
type: "button",
|
|
5368
|
+
class: "btn-mini context-health-refresh",
|
|
5369
|
+
onClick: $event => (_ctx.sessionContextHealthFocusedNode = null),
|
|
5370
|
+
"aria-label": _ctx.t('common.close')
|
|
5371
|
+
}, [
|
|
5372
|
+
(_openBlock(), _createElementBlock("svg", {
|
|
5373
|
+
width: "16",
|
|
5374
|
+
height: "16",
|
|
5375
|
+
viewBox: "0 0 24 24",
|
|
5376
|
+
fill: "none",
|
|
5377
|
+
stroke: "currentColor",
|
|
5378
|
+
"stroke-width": "1.75",
|
|
5379
|
+
"stroke-linecap": "round",
|
|
5380
|
+
"aria-hidden": "true"
|
|
5381
|
+
}, [
|
|
5382
|
+
_createElementVNode("path", { d: "m6 6 12 12M18 6 6 18" })
|
|
5383
|
+
]))
|
|
5384
|
+
], 8 /* PROPS */, ["onClick", "aria-label"])
|
|
5385
|
+
]),
|
|
5386
|
+
_createElementVNode("pre", null, _toDisplayString(_ctx.sessionContextHealthFocusedNode.text), 1 /* TEXT */)
|
|
5387
|
+
], 8 /* PROPS */, ["data-context-node-id", "aria-label"]))
|
|
5388
|
+
: _createCommentVNode("v-if", true),
|
|
4520
5389
|
_createElementVNode("div", { class: "session-export-feedback" }, [
|
|
4521
5390
|
(_ctx.sessionExportNotice && _ctx.sessionExportNotice.key === _ctx.getSessionExportKey(_ctx.activeSession))
|
|
4522
5391
|
? (_openBlock(), _createElementBlock("p", {
|
|
@@ -4528,22 +5397,22 @@ return function render(_ctx, _cache) {
|
|
|
4528
5397
|
]),
|
|
4529
5398
|
(_ctx.sessionDetailLoading && !_ctx.sessionPreviewLoadingMore)
|
|
4530
5399
|
? (_openBlock(), _createElementBlock("div", {
|
|
4531
|
-
key:
|
|
5400
|
+
key: 3,
|
|
4532
5401
|
class: "session-preview-empty"
|
|
4533
5402
|
}, _toDisplayString(_ctx.t('sessions.preview.loadingBody')), 1 /* TEXT */))
|
|
4534
5403
|
: (_ctx.activeSessionDetailError)
|
|
4535
5404
|
? (_openBlock(), _createElementBlock("div", {
|
|
4536
|
-
key:
|
|
5405
|
+
key: 4,
|
|
4537
5406
|
class: "session-preview-empty"
|
|
4538
5407
|
}, _toDisplayString(_ctx.activeSessionDetailError), 1 /* TEXT */))
|
|
4539
5408
|
: (!_ctx.activeSessionMessages.length)
|
|
4540
5409
|
? (_openBlock(), _createElementBlock("div", {
|
|
4541
|
-
key:
|
|
5410
|
+
key: 5,
|
|
4542
5411
|
class: "session-preview-empty"
|
|
4543
5412
|
}, _toDisplayString(_ctx.t('sessions.preview.emptyMsgs')), 1 /* TEXT */))
|
|
4544
5413
|
: (_ctx.sessionPreviewRenderEnabled && !_ctx.activeSessionVisibleMessages.length)
|
|
4545
5414
|
? (_openBlock(), _createElementBlock("div", {
|
|
4546
|
-
key:
|
|
5415
|
+
key: 6,
|
|
4547
5416
|
class: "session-preview-empty"
|
|
4548
5417
|
}, [
|
|
4549
5418
|
_createElementVNode("span", null, _toDisplayString(_ctx.t('sessions.preview.rendering')), 1 /* TEXT */),
|
|
@@ -4555,11 +5424,11 @@ return function render(_ctx, _cache) {
|
|
|
4555
5424
|
]))
|
|
4556
5425
|
: (!_ctx.sessionPreviewRenderEnabled)
|
|
4557
5426
|
? (_openBlock(), _createElementBlock("div", {
|
|
4558
|
-
key:
|
|
5427
|
+
key: 7,
|
|
4559
5428
|
class: "session-preview-empty"
|
|
4560
5429
|
}, _toDisplayString(_ctx.t('sessions.preview.preparing')), 1 /* TEXT */))
|
|
4561
5430
|
: (_openBlock(), _createElementBlock("div", {
|
|
4562
|
-
key:
|
|
5431
|
+
key: 8,
|
|
4563
5432
|
class: "session-preview-body"
|
|
4564
5433
|
}, [
|
|
4565
5434
|
(_ctx.activeSessionWorkspaceSummary.available)
|
|
@@ -4814,66 +5683,58 @@ return function render(_ctx, _cache) {
|
|
|
4814
5683
|
class: _normalizeClass(['session-timeline', 'session-timeline-' + _ctx.sessionTimelineStyle]),
|
|
4815
5684
|
"aria-label": _ctx.t('sessions.timeline.aria')
|
|
4816
5685
|
}, [
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
_createElementVNode("
|
|
4849
|
-
class: "session-timeline-bar-progress",
|
|
4850
|
-
style: _normalizeStyle({ height: _ctx.sessionTimelineProgressPercent + '%' })
|
|
4851
|
-
}, null, 4 /* STYLE */)
|
|
5686
|
+
_createElementVNode("header", { class: "session-timeline-heading" }, [
|
|
5687
|
+
_createElementVNode("span", null, "阅读目录"),
|
|
5688
|
+
_createElementVNode("span", { class: "session-timeline-count" }, _toDisplayString(_ctx.sessionTimelineNodes.length) + " 个定位点", 1 /* TEXT */)
|
|
5689
|
+
]),
|
|
5690
|
+
_createElementVNode("div", {
|
|
5691
|
+
class: "session-timeline-reading-progress",
|
|
5692
|
+
"aria-hidden": "true"
|
|
5693
|
+
}, [
|
|
5694
|
+
_createElementVNode("span", {
|
|
5695
|
+
style: _normalizeStyle({ width: _ctx.sessionTimelineProgressPercent + '%' })
|
|
5696
|
+
}, null, 4 /* STYLE */)
|
|
5697
|
+
]),
|
|
5698
|
+
_createElementVNode("nav", {
|
|
5699
|
+
class: "session-timeline-index",
|
|
5700
|
+
"aria-label": _ctx.t('sessions.timeline.aria')
|
|
5701
|
+
}, [
|
|
5702
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionTimelineNodes, (node, __, ___, _cached) => {
|
|
5703
|
+
const _memo = ([_ctx.sessionTimelineActiveKey === node.key, node.safePercent, node.title])
|
|
5704
|
+
if (_cached && _cached.el && _cached.key === 'timeline-' + node.key && _isMemoSame(_cached, _memo)) return _cached
|
|
5705
|
+
const _item = (_openBlock(), _createElementBlock("button", {
|
|
5706
|
+
key: 'timeline-' + node.key,
|
|
5707
|
+
type: "button",
|
|
5708
|
+
class: _normalizeClass(['session-timeline-node', { active: _ctx.sessionTimelineActiveKey === node.key }]),
|
|
5709
|
+
"aria-current": _ctx.sessionTimelineActiveKey === node.key ? 'true' : null,
|
|
5710
|
+
title: node.title,
|
|
5711
|
+
"aria-label": node.title,
|
|
5712
|
+
onClick: $event => (_ctx.jumpToSessionTimelineNode(node.key))
|
|
5713
|
+
}, [
|
|
5714
|
+
_createElementVNode("span", { class: "session-timeline-number" }, _toDisplayString(node.title.split(' · ')[0]), 1 /* TEXT */),
|
|
5715
|
+
_createElementVNode("span", { class: "session-timeline-label" }, [
|
|
5716
|
+
_createElementVNode("span", { class: "session-timeline-role" }, _toDisplayString(node.role === 'user' ? '提问' : node.role === 'assistant' ? '回复' : node.roleLabel), 1 /* TEXT */),
|
|
5717
|
+
_createElementVNode("time", { class: "session-timeline-time" }, _toDisplayString(node.displayTime ? node.displayTime.slice(-5) : '无时间'), 1 /* TEXT */)
|
|
4852
5718
|
]),
|
|
4853
|
-
(
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
key: 0,
|
|
4873
|
-
class: "session-timeline-current"
|
|
4874
|
-
}, _toDisplayString(_ctx.sessionTimelineActiveTitle), 1 /* TEXT */))
|
|
4875
|
-
: _createCommentVNode("v-if", true)
|
|
4876
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5719
|
+
_createElementVNode("span", {
|
|
5720
|
+
class: "session-timeline-indicator",
|
|
5721
|
+
"aria-hidden": "true"
|
|
5722
|
+
})
|
|
5723
|
+
], 10 /* CLASS, PROPS */, ["aria-current", "title", "aria-label", "onClick"]))
|
|
5724
|
+
_item.memo = _memo
|
|
5725
|
+
return _item
|
|
5726
|
+
}, _cache, 4), 128 /* KEYED_FRAGMENT */))
|
|
5727
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
5728
|
+
_createElementVNode("footer", {
|
|
5729
|
+
class: "session-timeline-current",
|
|
5730
|
+
title: _ctx.sessionTimelineActiveTitle
|
|
5731
|
+
}, [
|
|
5732
|
+
_createElementVNode("span", {
|
|
5733
|
+
class: "session-timeline-status-dot",
|
|
5734
|
+
"aria-hidden": "true"
|
|
5735
|
+
}),
|
|
5736
|
+
_createTextVNode(" " + _toDisplayString(_ctx.sessionTimelineActiveTitle ? '正在阅读 ' + _ctx.sessionTimelineActiveTitle.split(' · ')[0] : '选择节点定位原文'), 1 /* TEXT */)
|
|
5737
|
+
], 8 /* PROPS */, ["title"])
|
|
4877
5738
|
], 10 /* CLASS, PROPS */, ["aria-label"]))
|
|
4878
5739
|
: _createCommentVNode("v-if", true)
|
|
4879
5740
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -6733,14 +7594,14 @@ return function render(_ctx, _cache) {
|
|
|
6733
7594
|
type: "button",
|
|
6734
7595
|
class: "btn-mini",
|
|
6735
7596
|
onClick: _ctx.focusPromptComposerFirstMissingVar,
|
|
6736
|
-
disabled: _ctx.pluginsLoading
|
|
7597
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6737
7598
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.compose.jumpToMissing')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]))
|
|
6738
7599
|
: _createCommentVNode("v-if", true),
|
|
6739
7600
|
_createElementVNode("button", {
|
|
6740
7601
|
type: "button",
|
|
6741
7602
|
class: "btn-mini",
|
|
6742
7603
|
onClick: _ctx.resetPromptComposerVarValues,
|
|
6743
|
-
disabled: _ctx.pluginsLoading
|
|
7604
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6744
7605
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.vars.reset')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6745
7606
|
])
|
|
6746
7607
|
]),
|
|
@@ -6824,7 +7685,7 @@ return function render(_ctx, _cache) {
|
|
|
6824
7685
|
type: "button",
|
|
6825
7686
|
class: "btn-mini",
|
|
6826
7687
|
onClick: _ctx.createPromptTemplate,
|
|
6827
|
-
disabled: _ctx.pluginsLoading
|
|
7688
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6828
7689
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.manage.create')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
6829
7690
|
_createElementVNode("button", {
|
|
6830
7691
|
type: "button",
|
|
@@ -6836,7 +7697,7 @@ return function render(_ctx, _cache) {
|
|
|
6836
7697
|
type: "button",
|
|
6837
7698
|
class: "btn-mini",
|
|
6838
7699
|
onClick: _ctx.triggerPromptTemplatesImport,
|
|
6839
|
-
disabled: _ctx.pluginsLoading
|
|
7700
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6840
7701
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.manage.import')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6841
7702
|
]),
|
|
6842
7703
|
(_ctx.pluginsLoading && !_ctx.promptTemplatesLoadedOnce)
|
|
@@ -6878,12 +7739,105 @@ return function render(_ctx, _cache) {
|
|
|
6878
7739
|
]))
|
|
6879
7740
|
]),
|
|
6880
7741
|
_createElementVNode("div", { class: "prompt-templates-pane prompt-templates-pane-editor" }, [
|
|
7742
|
+
_createElementVNode("div", { class: "prompt-editor-actions" }, [
|
|
7743
|
+
_createElementVNode("button", {
|
|
7744
|
+
type: "button",
|
|
7745
|
+
class: "btn-mini",
|
|
7746
|
+
onClick: _ctx.openPluginHistory,
|
|
7747
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving || _ctx.pluginHistoryLoading
|
|
7748
|
+
}, _toDisplayString(_ctx.t('common.history')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
7749
|
+
_createElementVNode("button", {
|
|
7750
|
+
type: "button",
|
|
7751
|
+
class: "btn-mini",
|
|
7752
|
+
onClick: _ctx.sharePromptTemplate,
|
|
7753
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving || !_ctx.promptTemplateDraft
|
|
7754
|
+
}, _toDisplayString(_ctx.t('ecosystem.share')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
7755
|
+
]),
|
|
7756
|
+
(_ctx.pluginHistoryVisible)
|
|
7757
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
7758
|
+
key: 0,
|
|
7759
|
+
class: "prompt-history-panel",
|
|
7760
|
+
open: ""
|
|
7761
|
+
}, [
|
|
7762
|
+
_createElementVNode("summary", { class: "prompt-history-summary" }, [
|
|
7763
|
+
_createElementVNode("span", null, _toDisplayString(_ctx.t('common.history')), 1 /* TEXT */),
|
|
7764
|
+
_createElementVNode("button", {
|
|
7765
|
+
type: "button",
|
|
7766
|
+
class: "btn-mini",
|
|
7767
|
+
onClick: $event => {_ctx.pluginHistoryVisible = false; _ctx.pluginHistorySelectedId = ''},
|
|
7768
|
+
"aria-label": _ctx.t('common.close')
|
|
7769
|
+
}, "×", 8 /* PROPS */, ["onClick", "aria-label"])
|
|
7770
|
+
]),
|
|
7771
|
+
_createElementVNode("div", { class: "prompt-history-body" }, [
|
|
7772
|
+
_createElementVNode("div", {
|
|
7773
|
+
class: "prompt-history-list",
|
|
7774
|
+
role: "group",
|
|
7775
|
+
"aria-label": _ctx.t('common.history')
|
|
7776
|
+
}, [
|
|
7777
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.pluginHistoryItems, (item) => {
|
|
7778
|
+
return (_openBlock(), _createElementBlock("button", {
|
|
7779
|
+
key: item.id,
|
|
7780
|
+
type: "button",
|
|
7781
|
+
class: _normalizeClass(['btn-mini', { active: _ctx.pluginHistorySelectedId === item.id }]),
|
|
7782
|
+
"aria-pressed": _ctx.pluginHistorySelectedId === item.id,
|
|
7783
|
+
disabled: _ctx.pluginHistoryLoading || _ctx.pluginConfigSaving,
|
|
7784
|
+
onClick: $event => (_ctx.viewPluginHistory(item))
|
|
7785
|
+
}, _toDisplayString(item.id), 11 /* TEXT, CLASS, PROPS */, ["aria-pressed", "disabled", "onClick"]))
|
|
7786
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7787
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
7788
|
+
(_ctx.pluginHistoryLoading)
|
|
7789
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
7790
|
+
key: 0,
|
|
7791
|
+
class: "state-message"
|
|
7792
|
+
}, _toDisplayString(_ctx.t('diff.generating')), 1 /* TEXT */))
|
|
7793
|
+
: (_ctx.pluginHistoryError)
|
|
7794
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
7795
|
+
key: 1,
|
|
7796
|
+
class: "state-message error",
|
|
7797
|
+
role: "alert"
|
|
7798
|
+
}, _toDisplayString(_ctx.pluginHistoryError), 1 /* TEXT */))
|
|
7799
|
+
: (!_ctx.pluginHistoryItems.length)
|
|
7800
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
7801
|
+
key: 2,
|
|
7802
|
+
class: "state-message"
|
|
7803
|
+
}, _toDisplayString(_ctx.t('toast.history.empty')), 1 /* TEXT */))
|
|
7804
|
+
: _createCommentVNode("v-if", true),
|
|
7805
|
+
(_ctx.pluginHistorySelectedId && !_ctx.pluginHistoryLoading && !_ctx.pluginHistoryError)
|
|
7806
|
+
? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [
|
|
7807
|
+
_createElementVNode("div", { class: "form-hint" }, _toDisplayString(_ctx.t('ecosystem.historyCompare')) + " · +" + _toDisplayString(_ctx.pluginHistoryComparison.stats.added) + " / −" + _toDisplayString(_ctx.pluginHistoryComparison.stats.removed), 1 /* TEXT */),
|
|
7808
|
+
_createElementVNode("div", {
|
|
7809
|
+
class: "agents-diff-view prompt-history-diff",
|
|
7810
|
+
role: "region",
|
|
7811
|
+
"aria-label": _ctx.t('ecosystem.historyCompare'),
|
|
7812
|
+
tabindex: "0"
|
|
7813
|
+
}, [
|
|
7814
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.pluginHistoryComparison.lines, (line, index) => {
|
|
7815
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
7816
|
+
key: index,
|
|
7817
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
7818
|
+
}, [
|
|
7819
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '−' : ' ')), 1 /* TEXT */),
|
|
7820
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
7821
|
+
], 2 /* CLASS */))
|
|
7822
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
7823
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
7824
|
+
_createElementVNode("button", {
|
|
7825
|
+
type: "button",
|
|
7826
|
+
class: "btn-mini btn-confirm-mini",
|
|
7827
|
+
onClick: _ctx.rollbackPluginConfig,
|
|
7828
|
+
disabled: _ctx.pluginConfigSaving || _ctx.pluginHistoryLoading
|
|
7829
|
+
}, _toDisplayString(_ctx.t('ecosystem.rollback')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
7830
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
7831
|
+
: _createCommentVNode("v-if", true)
|
|
7832
|
+
])
|
|
7833
|
+
]))
|
|
7834
|
+
: _createCommentVNode("v-if", true),
|
|
6881
7835
|
(!_ctx.promptTemplateDraft)
|
|
6882
7836
|
? (_openBlock(), _createElementBlock("div", {
|
|
6883
|
-
key:
|
|
7837
|
+
key: 1,
|
|
6884
7838
|
class: "skills-empty-state"
|
|
6885
7839
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.editor.selectHint')), 1 /* TEXT */))
|
|
6886
|
-
: (_openBlock(), _createElementBlock(_Fragment, { key:
|
|
7840
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [
|
|
6887
7841
|
_createElementVNode("div", { class: "prompt-editor-head" }, [
|
|
6888
7842
|
_createElementVNode("div", { class: "prompt-editor-title-row" }, [
|
|
6889
7843
|
_withDirectives(_createElementVNode("input", {
|
|
@@ -6910,19 +7864,19 @@ return function render(_ctx, _cache) {
|
|
|
6910
7864
|
type: "button",
|
|
6911
7865
|
class: "btn-mini",
|
|
6912
7866
|
onClick: _ctx.duplicatePromptTemplate,
|
|
6913
|
-
disabled: _ctx.pluginsLoading
|
|
7867
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6914
7868
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.editor.duplicate')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
6915
7869
|
_createElementVNode("button", {
|
|
6916
7870
|
type: "button",
|
|
6917
7871
|
class: "btn-mini delete",
|
|
6918
7872
|
onClick: _ctx.deletePromptTemplate,
|
|
6919
|
-
disabled: _ctx.pluginsLoading
|
|
7873
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6920
7874
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.editor.delete')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
6921
7875
|
_createElementVNode("button", {
|
|
6922
7876
|
type: "button",
|
|
6923
7877
|
class: "btn-mini",
|
|
6924
7878
|
onClick: _ctx.savePromptTemplate,
|
|
6925
|
-
disabled: _ctx.pluginsLoading
|
|
7879
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6926
7880
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.editor.save')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6927
7881
|
]))
|
|
6928
7882
|
: _createCommentVNode("v-if", true)
|
|
@@ -6983,7 +7937,7 @@ return function render(_ctx, _cache) {
|
|
|
6983
7937
|
type: "button",
|
|
6984
7938
|
class: "btn-mini",
|
|
6985
7939
|
onClick: _ctx.resetPromptVariableValues,
|
|
6986
|
-
disabled: _ctx.pluginsLoading
|
|
7940
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
6987
7941
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.vars.reset')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
6988
7942
|
]))
|
|
6989
7943
|
: _createCommentVNode("v-if", true)
|
|
@@ -7025,7 +7979,7 @@ return function render(_ctx, _cache) {
|
|
|
7025
7979
|
type: "button",
|
|
7026
7980
|
class: "btn-mini",
|
|
7027
7981
|
onClick: _ctx.copyRenderedPrompt,
|
|
7028
|
-
disabled: _ctx.pluginsLoading
|
|
7982
|
+
disabled: _ctx.pluginsLoading || _ctx.pluginConfigSaving
|
|
7029
7983
|
}, _toDisplayString(_ctx.t('plugins.promptTemplates.preview.copy')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
|
|
7030
7984
|
]),
|
|
7031
7985
|
_createElementVNode("textarea", {
|
|
@@ -7216,17 +8170,31 @@ return function render(_ctx, _cache) {
|
|
|
7216
8170
|
class: "prompts-editor"
|
|
7217
8171
|
}, [
|
|
7218
8172
|
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7219
|
-
_createElementVNode("div", { class: "
|
|
7220
|
-
_createTextVNode(_toDisplayString(_ctx.agentsPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
7221
|
-
(_ctx.agentsPath)
|
|
7222
|
-
? (_openBlock(), _createElementBlock("span", { key: 0 }, _toDisplayString(_ctx.paren(_ctx.agentsExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave'))), 1 /* TEXT */))
|
|
7223
|
-
: _createCommentVNode("v-if", true),
|
|
8173
|
+
_createElementVNode("div", { class: "prompts-path-summary-wrap" }, [
|
|
7224
8174
|
(_ctx.agentsPath)
|
|
7225
|
-
? (_openBlock(), _createElementBlock("
|
|
8175
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
8176
|
+
key: 0,
|
|
8177
|
+
class: "prompts-path-summary"
|
|
8178
|
+
}, [
|
|
8179
|
+
_createElementVNode("summary", {
|
|
8180
|
+
class: "prompts-path-summary-trigger",
|
|
8181
|
+
title: _ctx.agentsPath
|
|
8182
|
+
}, [
|
|
8183
|
+
_createElementVNode("span", { class: "prompts-path-summary-name" }, _toDisplayString(_ctx.promptPathFileName(_ctx.agentsPath)), 1 /* TEXT */),
|
|
8184
|
+
_createElementVNode("span", { class: "prompts-token-hint" }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.agentsTokenCount })), 1 /* TEXT */)
|
|
8185
|
+
], 8 /* PROPS */, ["title"]),
|
|
8186
|
+
_createElementVNode("div", {
|
|
8187
|
+
class: "prompts-path-summary-popover",
|
|
8188
|
+
role: "tooltip"
|
|
8189
|
+
}, [
|
|
8190
|
+
_createElementVNode("span", { class: "prompts-path-summary-popover-label" }, _toDisplayString(_ctx.t('prompts.path.fullPath')), 1 /* TEXT */),
|
|
8191
|
+
_createElementVNode("code", null, _toDisplayString(_ctx.agentsPath), 1 /* TEXT */)
|
|
8192
|
+
])
|
|
8193
|
+
]))
|
|
8194
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7226
8195
|
key: 1,
|
|
7227
|
-
class: "prompts-
|
|
7228
|
-
},
|
|
7229
|
-
: _createCommentVNode("v-if", true)
|
|
8196
|
+
class: "form-hint prompts-path-summary-empty"
|
|
8197
|
+
}, _toDisplayString(_ctx.t('common.notLoaded')), 1 /* TEXT */))
|
|
7230
8198
|
]),
|
|
7231
8199
|
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7232
8200
|
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
|
|
@@ -7247,7 +8215,11 @@ return function render(_ctx, _cache) {
|
|
|
7247
8215
|
}), 128 /* KEYED_FRAGMENT */))
|
|
7248
8216
|
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
|
|
7249
8217
|
]),
|
|
7250
|
-
_createElementVNode("div", {
|
|
8218
|
+
_createElementVNode("div", {
|
|
8219
|
+
class: "prompts-editor-group prompts-editor-group--secondary prompts-editor-group--edit",
|
|
8220
|
+
role: "group",
|
|
8221
|
+
"aria-label": _ctx.t('prompts.actions.edit')
|
|
8222
|
+
}, [
|
|
7251
8223
|
_createElementVNode("button", {
|
|
7252
8224
|
class: "btn-mini",
|
|
7253
8225
|
onClick: _ctx.exportAgentsContent,
|
|
@@ -7327,8 +8299,12 @@ return function render(_ctx, _cache) {
|
|
|
7327
8299
|
_createElementVNode("path", { d: "M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4" })
|
|
7328
8300
|
]))
|
|
7329
8301
|
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7330
|
-
]),
|
|
7331
|
-
_createElementVNode("div", {
|
|
8302
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
8303
|
+
_createElementVNode("div", {
|
|
8304
|
+
class: "prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view",
|
|
8305
|
+
role: "group",
|
|
8306
|
+
"aria-label": _ctx.t('prompts.actions.view')
|
|
8307
|
+
}, [
|
|
7332
8308
|
_createElementVNode("button", {
|
|
7333
8309
|
class: "btn-mini",
|
|
7334
8310
|
onClick: $event => (_ctx.agentsDiffVisible ? _ctx.resetAgentsDiffState() : _ctx.loadPromptsContent()),
|
|
@@ -7378,7 +8354,7 @@ return function render(_ctx, _cache) {
|
|
|
7378
8354
|
})
|
|
7379
8355
|
]))
|
|
7380
8356
|
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7381
|
-
])
|
|
8357
|
+
], 8 /* PROPS */, ["aria-label"])
|
|
7382
8358
|
])
|
|
7383
8359
|
]),
|
|
7384
8360
|
(_ctx.promptHistoryVisible)
|
|
@@ -7430,12 +8406,35 @@ return function render(_ctx, _cache) {
|
|
|
7430
8406
|
class: "state-message"
|
|
7431
8407
|
}, _toDisplayString(_ctx.t('toast.history.empty')), 1 /* TEXT */))
|
|
7432
8408
|
: _createCommentVNode("v-if", true),
|
|
7433
|
-
(_ctx.
|
|
8409
|
+
(_ctx.promptHistoryPreviewId && !_ctx.promptHistoryLoading && !_ctx.promptHistoryError)
|
|
7434
8410
|
? (_openBlock(), _createElementBlock("div", {
|
|
7435
8411
|
key: 4,
|
|
7436
8412
|
class: "prompt-history-preview-wrap"
|
|
7437
8413
|
}, [
|
|
7438
8414
|
_createElementVNode("pre", { class: "prompt-history-preview" }, _toDisplayString(_ctx.promptHistoryPreviewContent), 1 /* TEXT */),
|
|
8415
|
+
_createElementVNode("div", { class: "form-hint" }, _toDisplayString(_ctx.t('ecosystem.historyCompare')) + " · +" + _toDisplayString(_ctx.promptHistoryComparison.stats.added) + " / −" + _toDisplayString(_ctx.promptHistoryComparison.stats.removed), 1 /* TEXT */),
|
|
8416
|
+
_createElementVNode("div", {
|
|
8417
|
+
class: "agents-diff-view prompt-history-diff",
|
|
8418
|
+
role: "region",
|
|
8419
|
+
"aria-label": _ctx.t('ecosystem.historyCompare'),
|
|
8420
|
+
tabindex: "0"
|
|
8421
|
+
}, [
|
|
8422
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptHistoryComparison.lines, (line, index) => {
|
|
8423
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
8424
|
+
key: index,
|
|
8425
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
8426
|
+
}, [
|
|
8427
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '−' : ' ')), 1 /* TEXT */),
|
|
8428
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
8429
|
+
], 2 /* CLASS */))
|
|
8430
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
8431
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
8432
|
+
_createElementVNode("button", {
|
|
8433
|
+
type: "button",
|
|
8434
|
+
class: "btn-mini btn-confirm-mini",
|
|
8435
|
+
onClick: $event => (_ctx.rollbackPromptHistory('agents')),
|
|
8436
|
+
disabled: _ctx.agentsSaving || _ctx.promptHistoryLoading || _ctx.agentsDiffVisible
|
|
8437
|
+
}, _toDisplayString(_ctx.t('ecosystem.rollback')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
7439
8438
|
_createElementVNode("button", {
|
|
7440
8439
|
type: "button",
|
|
7441
8440
|
class: "btn-mini btn-confirm-mini",
|
|
@@ -7768,17 +8767,31 @@ return function render(_ctx, _cache) {
|
|
|
7768
8767
|
]),
|
|
7769
8768
|
_createElementVNode("div", { class: "prompts-editor" }, [
|
|
7770
8769
|
_createElementVNode("div", { class: "prompts-editor-toolbar" }, [
|
|
7771
|
-
_createElementVNode("div", { class: "
|
|
7772
|
-
_createTextVNode(_toDisplayString(_ctx.sysPromptPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
|
|
8770
|
+
_createElementVNode("div", { class: "prompts-path-summary-wrap" }, [
|
|
7773
8771
|
(_ctx.sysPromptPath)
|
|
7774
|
-
? (_openBlock(), _createElementBlock("
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
8772
|
+
? (_openBlock(), _createElementBlock("details", {
|
|
8773
|
+
key: 0,
|
|
8774
|
+
class: "prompts-path-summary"
|
|
8775
|
+
}, [
|
|
8776
|
+
_createElementVNode("summary", {
|
|
8777
|
+
class: "prompts-path-summary-trigger",
|
|
8778
|
+
title: _ctx.sysPromptPath
|
|
8779
|
+
}, [
|
|
8780
|
+
_createElementVNode("span", { class: "prompts-path-summary-name" }, _toDisplayString(_ctx.promptPathFileName(_ctx.sysPromptPath)), 1 /* TEXT */),
|
|
8781
|
+
_createElementVNode("span", { class: "prompts-token-hint" }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.sysPromptTokenCount })), 1 /* TEXT */)
|
|
8782
|
+
], 8 /* PROPS */, ["title"]),
|
|
8783
|
+
_createElementVNode("div", {
|
|
8784
|
+
class: "prompts-path-summary-popover",
|
|
8785
|
+
role: "tooltip"
|
|
8786
|
+
}, [
|
|
8787
|
+
_createElementVNode("span", { class: "prompts-path-summary-popover-label" }, _toDisplayString(_ctx.t('prompts.path.fullPath')), 1 /* TEXT */),
|
|
8788
|
+
_createElementVNode("code", null, _toDisplayString(_ctx.sysPromptPath), 1 /* TEXT */)
|
|
8789
|
+
])
|
|
8790
|
+
]))
|
|
8791
|
+
: (_openBlock(), _createElementBlock("div", {
|
|
7778
8792
|
key: 1,
|
|
7779
|
-
class: "prompts-
|
|
7780
|
-
},
|
|
7781
|
-
: _createCommentVNode("v-if", true)
|
|
8793
|
+
class: "form-hint prompts-path-summary-empty"
|
|
8794
|
+
}, _toDisplayString(_ctx.t('common.notLoaded')), 1 /* TEXT */))
|
|
7782
8795
|
]),
|
|
7783
8796
|
_createElementVNode("div", { class: "prompts-editor-actions" }, [
|
|
7784
8797
|
_createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
|
|
@@ -7799,7 +8812,11 @@ return function render(_ctx, _cache) {
|
|
|
7799
8812
|
}), 128 /* KEYED_FRAGMENT */))
|
|
7800
8813
|
], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
|
|
7801
8814
|
]),
|
|
7802
|
-
_createElementVNode("div", {
|
|
8815
|
+
_createElementVNode("div", {
|
|
8816
|
+
class: "prompts-editor-group prompts-editor-group--secondary prompts-editor-group--edit",
|
|
8817
|
+
role: "group",
|
|
8818
|
+
"aria-label": _ctx.t('prompts.actions.edit')
|
|
8819
|
+
}, [
|
|
7803
8820
|
_createElementVNode("button", {
|
|
7804
8821
|
class: "btn-mini",
|
|
7805
8822
|
onClick: _ctx.exportSysPromptContent,
|
|
@@ -7879,8 +8896,12 @@ return function render(_ctx, _cache) {
|
|
|
7879
8896
|
_createElementVNode("path", { d: "M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4" })
|
|
7880
8897
|
]))
|
|
7881
8898
|
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7882
|
-
]),
|
|
7883
|
-
_createElementVNode("div", {
|
|
8899
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
8900
|
+
_createElementVNode("div", {
|
|
8901
|
+
class: "prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view",
|
|
8902
|
+
role: "group",
|
|
8903
|
+
"aria-label": _ctx.t('prompts.actions.view')
|
|
8904
|
+
}, [
|
|
7884
8905
|
_createElementVNode("button", {
|
|
7885
8906
|
class: "btn-mini",
|
|
7886
8907
|
onClick: $event => (_ctx.sysPromptDiffVisible ? _ctx.resetSysPromptDiffState() : _ctx.cancelSysPromptEdit()),
|
|
@@ -7930,7 +8951,7 @@ return function render(_ctx, _cache) {
|
|
|
7930
8951
|
})
|
|
7931
8952
|
]))
|
|
7932
8953
|
], 8 /* PROPS */, ["onClick", "disabled", "title"])
|
|
7933
|
-
])
|
|
8954
|
+
], 8 /* PROPS */, ["aria-label"])
|
|
7934
8955
|
])
|
|
7935
8956
|
]),
|
|
7936
8957
|
(_ctx.sysHistoryVisible)
|
|
@@ -7982,12 +9003,35 @@ return function render(_ctx, _cache) {
|
|
|
7982
9003
|
class: "state-message"
|
|
7983
9004
|
}, _toDisplayString(_ctx.t('toast.history.empty')), 1 /* TEXT */))
|
|
7984
9005
|
: _createCommentVNode("v-if", true),
|
|
7985
|
-
(_ctx.
|
|
9006
|
+
(_ctx.sysHistoryPreviewId && !_ctx.sysHistoryLoading && !_ctx.sysHistoryError)
|
|
7986
9007
|
? (_openBlock(), _createElementBlock("div", {
|
|
7987
9008
|
key: 4,
|
|
7988
9009
|
class: "prompt-history-preview-wrap"
|
|
7989
9010
|
}, [
|
|
7990
9011
|
_createElementVNode("pre", { class: "prompt-history-preview" }, _toDisplayString(_ctx.sysHistoryPreviewContent), 1 /* TEXT */),
|
|
9012
|
+
_createElementVNode("div", { class: "form-hint" }, _toDisplayString(_ctx.t('ecosystem.historyCompare')) + " · +" + _toDisplayString(_ctx.sysHistoryComparison.stats.added) + " / −" + _toDisplayString(_ctx.sysHistoryComparison.stats.removed), 1 /* TEXT */),
|
|
9013
|
+
_createElementVNode("div", {
|
|
9014
|
+
class: "agents-diff-view prompt-history-diff",
|
|
9015
|
+
role: "region",
|
|
9016
|
+
"aria-label": _ctx.t('ecosystem.historyCompare'),
|
|
9017
|
+
tabindex: "0"
|
|
9018
|
+
}, [
|
|
9019
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sysHistoryComparison.lines, (line, index) => {
|
|
9020
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
9021
|
+
key: index,
|
|
9022
|
+
class: _normalizeClass(['agents-diff-line', line.type])
|
|
9023
|
+
}, [
|
|
9024
|
+
_createElementVNode("span", { class: "agents-diff-line-sign" }, _toDisplayString(line.type === 'add' ? '+' : (line.type === 'del' ? '−' : ' ')), 1 /* TEXT */),
|
|
9025
|
+
_createElementVNode("span", { class: "agents-diff-line-text" }, _toDisplayString(line.value), 1 /* TEXT */)
|
|
9026
|
+
], 2 /* CLASS */))
|
|
9027
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
9028
|
+
], 8 /* PROPS */, ["aria-label"]),
|
|
9029
|
+
_createElementVNode("button", {
|
|
9030
|
+
type: "button",
|
|
9031
|
+
class: "btn-mini btn-confirm-mini",
|
|
9032
|
+
onClick: $event => (_ctx.rollbackPromptHistory('sys')),
|
|
9033
|
+
disabled: _ctx.sysPromptSaving || _ctx.sysHistoryLoading || _ctx.sysPromptDiffVisible
|
|
9034
|
+
}, _toDisplayString(_ctx.t('ecosystem.rollback')), 9 /* TEXT, PROPS */, ["onClick", "disabled"]),
|
|
7991
9035
|
_createElementVNode("button", {
|
|
7992
9036
|
type: "button",
|
|
7993
9037
|
class: "btn-mini btn-confirm-mini",
|
|
@@ -9375,10 +10419,78 @@ return function render(_ctx, _cache) {
|
|
|
9375
10419
|
])
|
|
9376
10420
|
], 8 /* PROPS */, ["onClick"]))
|
|
9377
10421
|
: _createCommentVNode("v-if", true),
|
|
10422
|
+
(_ctx.promptInvocationVisible)
|
|
10423
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
10424
|
+
key: 14,
|
|
10425
|
+
class: "modal-overlay",
|
|
10426
|
+
onClick: _withModifiers(_ctx.closePromptTemplateInvocation, ["self"])
|
|
10427
|
+
}, [
|
|
10428
|
+
_createElementVNode("form", {
|
|
10429
|
+
ref: "promptInvocationDialog",
|
|
10430
|
+
class: "modal prompt-invocation-dialog",
|
|
10431
|
+
role: "dialog",
|
|
10432
|
+
"aria-modal": "true",
|
|
10433
|
+
"aria-labelledby": "prompt-invocation-title",
|
|
10434
|
+
"aria-describedby": "prompt-invocation-hint",
|
|
10435
|
+
onSubmit: _withModifiers(_ctx.finishPromptTemplateInvocation, ["prevent"]),
|
|
10436
|
+
onKeydown: _ctx.onPromptInvocationKeydown
|
|
10437
|
+
}, [
|
|
10438
|
+
_createElementVNode("h2", {
|
|
10439
|
+
id: "prompt-invocation-title",
|
|
10440
|
+
class: "modal-title"
|
|
10441
|
+
}, _toDisplayString(_ctx.t('ecosystem.variablesTitle')), 1 /* TEXT */),
|
|
10442
|
+
_createElementVNode("p", {
|
|
10443
|
+
id: "prompt-invocation-hint",
|
|
10444
|
+
class: "form-hint"
|
|
10445
|
+
}, _toDisplayString(_ctx.t('ecosystem.variablesHint')), 1 /* TEXT */),
|
|
10446
|
+
_createElementVNode("div", { class: "prompt-invocation-fields" }, [
|
|
10447
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.promptInvocationNames, (name, index) => {
|
|
10448
|
+
return (_openBlock(), _createElementBlock("label", {
|
|
10449
|
+
key: name,
|
|
10450
|
+
class: "form-group",
|
|
10451
|
+
for: 'prompt-invocation-var-' + index
|
|
10452
|
+
}, [
|
|
10453
|
+
_createElementVNode("span", { class: "form-label mono" }, _toDisplayString('{' + '{' + name + '}' + '}'), 1 /* TEXT */),
|
|
10454
|
+
_withDirectives(_createElementVNode("textarea", {
|
|
10455
|
+
id: 'prompt-invocation-var-' + index,
|
|
10456
|
+
"onUpdate:modelValue": $event => ((_ctx.promptInvocationValues[name]) = $event),
|
|
10457
|
+
class: "form-input",
|
|
10458
|
+
rows: name === 'git_diff' ? 6 : 2,
|
|
10459
|
+
autocomplete: "off",
|
|
10460
|
+
spellcheck: "false",
|
|
10461
|
+
"aria-required": "true",
|
|
10462
|
+
"aria-invalid": !!_ctx.promptInvocationError && !_ctx.promptInvocationValues[name].trim()
|
|
10463
|
+
}, null, 8 /* PROPS */, ["id", "onUpdate:modelValue", "rows", "aria-invalid"]), [
|
|
10464
|
+
[_vModelText, _ctx.promptInvocationValues[name]]
|
|
10465
|
+
])
|
|
10466
|
+
], 8 /* PROPS */, ["for"]))
|
|
10467
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
10468
|
+
]),
|
|
10469
|
+
(_ctx.promptInvocationError)
|
|
10470
|
+
? (_openBlock(), _createElementBlock("p", {
|
|
10471
|
+
key: 0,
|
|
10472
|
+
class: "form-error",
|
|
10473
|
+
role: "alert"
|
|
10474
|
+
}, _toDisplayString(_ctx.promptInvocationError), 1 /* TEXT */))
|
|
10475
|
+
: _createCommentVNode("v-if", true),
|
|
10476
|
+
_createElementVNode("div", { class: "modal-actions" }, [
|
|
10477
|
+
_createElementVNode("button", {
|
|
10478
|
+
type: "button",
|
|
10479
|
+
class: "btn btn-secondary",
|
|
10480
|
+
onClick: _ctx.closePromptTemplateInvocation
|
|
10481
|
+
}, _toDisplayString(_ctx.t('common.cancel')), 9 /* TEXT, PROPS */, ["onClick"]),
|
|
10482
|
+
_createElementVNode("button", {
|
|
10483
|
+
type: "submit",
|
|
10484
|
+
class: "btn btn-primary"
|
|
10485
|
+
}, _toDisplayString(_ctx.t('ecosystem.useTemplate')), 1 /* TEXT */)
|
|
10486
|
+
])
|
|
10487
|
+
], 40 /* PROPS, NEED_HYDRATION */, ["onSubmit", "onKeydown"])
|
|
10488
|
+
], 8 /* PROPS */, ["onClick"]))
|
|
10489
|
+
: _createCommentVNode("v-if", true),
|
|
9378
10490
|
_createCommentVNode(" Webhook settings modal "),
|
|
9379
10491
|
(_ctx.showWebhookModal)
|
|
9380
10492
|
? (_openBlock(), _createElementBlock("div", {
|
|
9381
|
-
key:
|
|
10493
|
+
key: 15,
|
|
9382
10494
|
class: "modal-overlay",
|
|
9383
10495
|
onClick: _withModifiers(_ctx.closeWebhookModal, ["self"])
|
|
9384
10496
|
}, [
|
|
@@ -9451,7 +10563,7 @@ return function render(_ctx, _cache) {
|
|
|
9451
10563
|
: _createCommentVNode("v-if", true),
|
|
9452
10564
|
(_ctx.showOpenclawConfigModal)
|
|
9453
10565
|
? (_openBlock(), _createElementBlock("div", {
|
|
9454
|
-
key:
|
|
10566
|
+
key: 16,
|
|
9455
10567
|
class: "modal-overlay",
|
|
9456
10568
|
onClick: _withModifiers($event => (!(_ctx.openclawSaving || _ctx.openclawApplying) && _ctx.closeOpenclawConfigModal()), ["self"])
|
|
9457
10569
|
}, [
|
|
@@ -10163,7 +11275,7 @@ return function render(_ctx, _cache) {
|
|
|
10163
11275
|
: _createCommentVNode("v-if", true),
|
|
10164
11276
|
(_ctx.showConfigTemplateModal)
|
|
10165
11277
|
? (_openBlock(), _createElementBlock("div", {
|
|
10166
|
-
key:
|
|
11278
|
+
key: 17,
|
|
10167
11279
|
class: "modal-overlay",
|
|
10168
11280
|
onClick: _withModifiers($event => (!_ctx.configTemplateApplying && _ctx.closeConfigTemplateModal()), ["self"])
|
|
10169
11281
|
}, [
|
|
@@ -10308,7 +11420,7 @@ return function render(_ctx, _cache) {
|
|
|
10308
11420
|
: _createCommentVNode("v-if", true),
|
|
10309
11421
|
(_ctx.showAgentsModal)
|
|
10310
11422
|
? (_openBlock(), _createElementBlock("div", {
|
|
10311
|
-
key:
|
|
11423
|
+
key: 18,
|
|
10312
11424
|
class: "modal-overlay",
|
|
10313
11425
|
onClick: _withModifiers(_ctx.closeAgentsModal, ["self"])
|
|
10314
11426
|
}, [
|
|
@@ -10479,7 +11591,7 @@ return function render(_ctx, _cache) {
|
|
|
10479
11591
|
: _createCommentVNode("v-if", true),
|
|
10480
11592
|
(_ctx.showSkillsModal)
|
|
10481
11593
|
? (_openBlock(), _createElementBlock("div", {
|
|
10482
|
-
key:
|
|
11594
|
+
key: 19,
|
|
10483
11595
|
class: "modal-overlay",
|
|
10484
11596
|
onClick: _withModifiers(_ctx.closeSkillsModal, ["self"])
|
|
10485
11597
|
}, [
|
|
@@ -10784,7 +11896,7 @@ return function render(_ctx, _cache) {
|
|
|
10784
11896
|
}, null, 40 /* PROPS, NEED_HYDRATION */, ["onChange"]),
|
|
10785
11897
|
(_ctx.showHealthCheckModal)
|
|
10786
11898
|
? (_openBlock(), _createElementBlock("div", {
|
|
10787
|
-
key:
|
|
11899
|
+
key: 20,
|
|
10788
11900
|
class: "modal-overlay",
|
|
10789
11901
|
onClick: _withModifiers($event => (_ctx.showHealthCheckModal = false), ["self"])
|
|
10790
11902
|
}, [
|
|
@@ -10957,7 +12069,7 @@ return function render(_ctx, _cache) {
|
|
|
10957
12069
|
: _createCommentVNode("v-if", true),
|
|
10958
12070
|
(_ctx.showConfirmDialog)
|
|
10959
12071
|
? (_openBlock(), _createElementBlock("div", {
|
|
10960
|
-
key:
|
|
12072
|
+
key: 21,
|
|
10961
12073
|
class: "modal-overlay",
|
|
10962
12074
|
onClick: _withModifiers(_ctx.closeConfirmDialog, ["self"])
|
|
10963
12075
|
}, [
|
|
@@ -10995,7 +12107,7 @@ return function render(_ctx, _cache) {
|
|
|
10995
12107
|
_createCommentVNode(" Toast "),
|
|
10996
12108
|
(_ctx.message)
|
|
10997
12109
|
? (_openBlock(), _createElementBlock("div", {
|
|
10998
|
-
key:
|
|
12110
|
+
key: 22,
|
|
10999
12111
|
class: _normalizeClass(['toast', _ctx.messageType]),
|
|
11000
12112
|
role: "status",
|
|
11001
12113
|
"aria-live": "polite",
|