codexmate 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +95 -4
  2. package/README.vi.md +95 -4
  3. package/README.zh.md +96 -4
  4. package/cli/config-bootstrap.js +25 -11
  5. package/cli.js +360 -44
  6. package/lib/cli-config-engine.js +260 -0
  7. package/lib/cli-utils.js +2 -1
  8. package/lib/cli-webhook.js +1 -1
  9. package/lib/handoff-mcp.js +282 -0
  10. package/lib/http-access-control.js +335 -0
  11. package/lib/thread-handoff.js +130 -0
  12. package/lib/web-startup-auth.js +49 -0
  13. package/lib/workflow-engine.js +92 -21
  14. package/lib/workflow-runner.js +261 -0
  15. package/package.json +1 -1
  16. package/web-ui/app.js +23 -2
  17. package/web-ui/modules/access-token.mjs +33 -0
  18. package/web-ui/modules/api.mjs +2 -1
  19. package/web-ui/modules/app.methods.index.mjs +2 -0
  20. package/web-ui/modules/app.methods.navigation.mjs +17 -3
  21. package/web-ui/modules/app.methods.prompts-editor.mjs +7 -0
  22. package/web-ui/modules/app.methods.providers.mjs +2 -2
  23. package/web-ui/modules/app.methods.runtime.mjs +3 -2
  24. package/web-ui/modules/app.methods.session-actions.mjs +3 -0
  25. package/web-ui/modules/app.methods.session-browser.mjs +6 -2
  26. package/web-ui/modules/app.methods.workflows.mjs +41 -0
  27. package/web-ui/modules/i18n/locales/en.mjs +37 -2
  28. package/web-ui/modules/i18n/locales/ja.mjs +37 -2
  29. package/web-ui/modules/i18n/locales/vi.mjs +37 -2
  30. package/web-ui/modules/i18n/locales/zh-tw.mjs +37 -2
  31. package/web-ui/modules/i18n/locales/zh.mjs +37 -2
  32. package/web-ui/modules/sessions-filters-url.mjs +3 -0
  33. package/web-ui/modules/skills.methods.mjs +6 -5
  34. package/web-ui/modules/thread-handoff.mjs +142 -0
  35. package/web-ui/partials/index/panel-config-claude.html +2 -0
  36. package/web-ui/partials/index/panel-config-codex.html +2 -0
  37. package/web-ui/partials/index/panel-config-kilocode.html +3 -1
  38. package/web-ui/partials/index/panel-config-openclaw.html +2 -0
  39. package/web-ui/partials/index/panel-config-opencode.html +3 -1
  40. package/web-ui/partials/index/panel-config-pi.html +2 -0
  41. package/web-ui/partials/index/panel-dashboard.html +59 -0
  42. package/web-ui/partials/index/panel-prompts.html +28 -16
  43. package/web-ui/partials/index/panel-sessions.html +21 -33
  44. package/web-ui/partials/index/thread-handoff.html +59 -0
  45. package/web-ui/res/web-ui-render.precompiled.js +614 -152
  46. package/web-ui/styles/controls-forms.css +9 -0
  47. package/web-ui/styles/dashboard.css +51 -0
  48. package/web-ui/styles/modals-core.css +87 -0
  49. package/web-ui/styles/navigation-panels.css +1 -1
  50. package/web-ui/styles/plugins-panel.css +62 -0
  51. package/web-ui/styles/prompts-editor.css +11 -4
  52. package/web-ui/styles/responsive.css +19 -10
  53. package/web-ui/styles/sessions-preview.css +185 -111
@@ -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, vShow: _vShow, withDirectives: _withDirectives, vModelSelect: _vModelSelect, vModelText: _vModelText, vModelDynamic: _vModelDynamic, vModelCheckbox: _vModelCheckbox, isMemoSame: _isMemoSame, withMemo: _withMemo, normalizeStyle: _normalizeStyle } = Vue
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, isMemoSame: _isMemoSame, withMemo: _withMemo, normalizeStyle: _normalizeStyle } = 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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
1724
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.codex.lockedTitle')), 1 /* TEXT */),
1725
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.codex.lockedDesc')), 1 /* TEXT */),
1726
- _createElementVNode("button", {
1727
- type: "button",
1728
- class: "btn-tool",
1729
- onClick: $event => (_ctx.setToolConfigPermission('codex', true)),
1730
- disabled: _ctx.toolConfigPermissionSaving.codex
1731
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
2261
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.claude.lockedTitle')), 1 /* TEXT */),
2262
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.claude.lockedDesc')), 1 /* TEXT */),
2263
- _createElementVNode("button", {
2264
- type: "button",
2265
- class: "btn-tool",
2266
- onClick: $event => (_ctx.setToolConfigPermission('claude', true)),
2267
- disabled: _ctx.toolConfigPermissionSaving.claude
2268
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
2516
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.openclaw.lockedTitle')), 1 /* TEXT */),
2517
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.openclaw.lockedDesc')), 1 /* TEXT */),
2518
- _createElementVNode("button", {
2519
- type: "button",
2520
- class: "btn-tool",
2521
- onClick: $event => (_ctx.setToolConfigPermission('openclaw', true)),
2522
- disabled: _ctx.toolConfigPermissionSaving.openclaw
2523
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
2925
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.opencode.lockedTitle')), 1 /* TEXT */),
2926
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.opencode.lockedDesc')), 1 /* TEXT */),
2927
- _createElementVNode("button", {
2928
- type: "button",
2929
- class: "btn-tool",
2930
- onClick: $event => (_ctx.setToolConfigPermission('opencode', true)),
2931
- disabled: _ctx.toolConfigPermissionSaving.opencode
2932
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
3199
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.kilocode.lockedTitle')), 1 /* TEXT */),
3200
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.kilocode.lockedDesc')), 1 /* TEXT */),
3201
- _createElementVNode("button", {
3202
- type: "button",
3203
- class: "btn-tool",
3204
- onClick: $event => (_ctx.setToolConfigPermission('kilocode', true)),
3205
- disabled: _ctx.toolConfigPermissionSaving.kilocode
3206
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
- _createElementVNode("div", { class: "tool-config-write-overlay-card" }, [
3574
- _createElementVNode("div", { class: "tool-config-write-overlay-title" }, _toDisplayString(_ctx.t('toolConfig.pi.lockedTitle')), 1 /* TEXT */),
3575
- _createElementVNode("p", null, _toDisplayString(_ctx.t('toolConfig.pi.lockedDesc')), 1 /* TEXT */),
3576
- _createElementVNode("button", {
3577
- type: "button",
3578
- class: "btn-tool",
3579
- onClick: $event => (_ctx.setToolConfigPermission('pi', true)),
3580
- disabled: _ctx.toolConfigPermissionSaving.pi
3581
- }, _toDisplayString(_ctx.t('toolConfig.enableWrite')), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
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
  ])
@@ -4372,6 +4607,197 @@ return function render(_ctx, _cache) {
4372
4607
  ref: _ctx.setSessionPreviewScrollRef,
4373
4608
  onScroll: _ctx.onSessionPreviewScroll
4374
4609
  }, [
4610
+ (_ctx.activeSession)
4611
+ ? (_openBlock(), _createElementBlock("details", {
4612
+ key: _ctx.handoffSessionKey,
4613
+ class: "session-workspace thread-handoff",
4614
+ open: _ctx.handoffExpanded,
4615
+ onToggle: _ctx.toggleThreadHandoff,
4616
+ "aria-label": "会话交接"
4617
+ }, [
4618
+ _createElementVNode("summary", { class: "thread-handoff-summary" }, [
4619
+ _createElementVNode("span", null, "会话交接"),
4620
+ _createElementVNode("span", { class: "thread-handoff-summary-hint" }, _toDisplayString(_ctx.handoffExpanded ? '收起' : '填写交接 · 查看历史'), 1 /* TEXT */)
4621
+ ]),
4622
+ (_ctx.handoffExpanded)
4623
+ ? (_openBlock(), _createElementBlock("div", {
4624
+ key: 0,
4625
+ class: "thread-handoff-body"
4626
+ }, [
4627
+ _createElementVNode("div", { class: "session-workspace-header session-workspace-card-wide" }, [
4628
+ _createElementVNode("p", { class: "session-workspace-subtitle" }, "交代目标,让下一位代理接着做。草稿在切换会话后保留,刷新后清空。"),
4629
+ _createElementVNode("button", {
4630
+ class: "btn-mini",
4631
+ type: "button",
4632
+ onClick: _ctx.loadThreadHandoffs,
4633
+ disabled: _ctx.handoffLoading || _ctx.handoffBusy
4634
+ }, _toDisplayString(_ctx.handoffLoading ? '刷新中…' : '刷新历史'), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
4635
+ ]),
4636
+ _createElementVNode("form", {
4637
+ onSubmit: _withModifiers(_ctx.createThreadHandoff, ["prevent"]),
4638
+ class: "thread-handoff-form"
4639
+ }, [
4640
+ _createElementVNode("label", { class: "thread-handoff-field" }, [
4641
+ _createElementVNode("span", { class: "session-workspace-card-title" }, [
4642
+ _createTextVNode("交给谁 "),
4643
+ _createElementVNode("small", null, "必填")
4644
+ ]),
4645
+ _withDirectives(_createElementVNode("input", {
4646
+ "onUpdate:modelValue": $event => ((_ctx.handoffDraft.target) = $event),
4647
+ class: "session-query-input",
4648
+ required: "",
4649
+ disabled: _ctx.handoffBusy,
4650
+ placeholder: "目标代理标识,例如 claude"
4651
+ }, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
4652
+ [_vModelText, _ctx.handoffDraft.target]
4653
+ ])
4654
+ ]),
4655
+ _createElementVNode("label", { class: "thread-handoff-field" }, [
4656
+ _createElementVNode("span", { class: "session-workspace-card-title" }, [
4657
+ _createTextVNode("接下来做什么 "),
4658
+ _createElementVNode("small", null, "必填")
4659
+ ]),
4660
+ _withDirectives(_createElementVNode("textarea", {
4661
+ "onUpdate:modelValue": $event => ((_ctx.handoffDraft.goal) = $event),
4662
+ class: "session-query-input",
4663
+ rows: "3",
4664
+ required: "",
4665
+ disabled: _ctx.handoffBusy,
4666
+ placeholder: "描述下一步任务、预期结果或验收标准"
4667
+ }, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
4668
+ [_vModelText, _ctx.handoffDraft.goal]
4669
+ ])
4670
+ ]),
4671
+ _createElementVNode("details", { class: "thread-handoff-optional" }, [
4672
+ _createElementVNode("summary", { class: "thread-handoff-optional-summary" }, [
4673
+ _createTextVNode("补充上下文 "),
4674
+ _createElementVNode("small", null, "已完成 / 阻塞 / 步骤 / 文件 · 可选")
4675
+ ]),
4676
+ _createElementVNode("div", { class: "session-workspace-grid" }, [
4677
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.handoffFields, (field) => {
4678
+ return (_openBlock(), _createElementBlock("label", {
4679
+ key: field.key,
4680
+ class: "thread-handoff-field"
4681
+ }, [
4682
+ _createElementVNode("span", { class: "session-workspace-card-title" }, _toDisplayString(field.label) + "(可选)", 1 /* TEXT */),
4683
+ _withDirectives(_createElementVNode("textarea", {
4684
+ "onUpdate:modelValue": $event => ((_ctx.handoffDraft[field.key]) = $event),
4685
+ class: "session-query-input",
4686
+ rows: "3",
4687
+ disabled: _ctx.handoffBusy,
4688
+ placeholder: "每行填写一项"
4689
+ }, null, 8 /* PROPS */, ["onUpdate:modelValue", "disabled"]), [
4690
+ [_vModelText, _ctx.handoffDraft[field.key]]
4691
+ ])
4692
+ ]))
4693
+ }), 128 /* KEYED_FRAGMENT */))
4694
+ ])
4695
+ ]),
4696
+ _createElementVNode("div", { class: "thread-handoff-actions" }, [
4697
+ _createElementVNode("span", { class: "session-workspace-subtitle" }, "生成后可复制到目标会话"),
4698
+ _createElementVNode("button", {
4699
+ class: "btn-mini thread-handoff-submit",
4700
+ type: "submit",
4701
+ disabled: _ctx.handoffBusy || _ctx.handoffLoading || !_ctx.handoffDraft.target.trim() || !_ctx.handoffDraft.goal.trim()
4702
+ }, _toDisplayString(_ctx.handoffBusy ? '处理中…' : '生成交接'), 9 /* TEXT, PROPS */, ["disabled"])
4703
+ ])
4704
+ ], 40 /* PROPS, NEED_HYDRATION */, ["onSubmit"]),
4705
+ (_ctx.handoffError)
4706
+ ? (_openBlock(), _createElementBlock("p", {
4707
+ key: 0,
4708
+ class: "state-message error session-workspace-card-wide",
4709
+ role: "alert"
4710
+ }, _toDisplayString(_ctx.handoffError), 1 /* TEXT */))
4711
+ : _createCommentVNode("v-if", true),
4712
+ (_ctx.handoffNotice)
4713
+ ? (_openBlock(), _createElementBlock("p", {
4714
+ key: 1,
4715
+ class: "state-message session-workspace-card-wide",
4716
+ role: "status",
4717
+ "aria-live": "polite"
4718
+ }, _toDisplayString(_ctx.handoffNotice), 1 /* TEXT */))
4719
+ : _createCommentVNode("v-if", true),
4720
+ (_ctx.handoffCopyText)
4721
+ ? (_openBlock(), _createElementBlock("label", {
4722
+ key: 2,
4723
+ class: "session-workspace-card session-workspace-card-wide"
4724
+ }, [
4725
+ _createElementVNode("span", { class: "session-workspace-card-title" }, "卡片文本(未发送,可手动复制)"),
4726
+ _createElementVNode("textarea", {
4727
+ class: "session-query-input",
4728
+ rows: "6",
4729
+ readonly: "",
4730
+ value: _ctx.handoffCopyText,
4731
+ onFocus: $event => ($event.target.select())
4732
+ }, null, 40 /* PROPS, NEED_HYDRATION */, ["value", "onFocus"])
4733
+ ]))
4734
+ : _createCommentVNode("v-if", true),
4735
+ _createElementVNode("p", { class: "session-workspace-subtitle session-workspace-card-wide" }, "复制不会自动发送。读取确认由目标代理通过 CLI ack 提交。"),
4736
+ (_ctx.handoffLoading)
4737
+ ? (_openBlock(), _createElementBlock("p", {
4738
+ key: 3,
4739
+ class: "session-workspace-card-wide",
4740
+ role: "status"
4741
+ }, "正在加载交接历史…"))
4742
+ : (!_ctx.handoffError && !_ctx.handoffRecords.length)
4743
+ ? (_openBlock(), _createElementBlock("p", {
4744
+ key: 4,
4745
+ class: "session-workspace-empty session-workspace-card-wide"
4746
+ }, "暂无交接记录"))
4747
+ : _createCommentVNode("v-if", true),
4748
+ (_ctx.handoffRecords.length)
4749
+ ? (_openBlock(), _createElementBlock("ol", {
4750
+ key: 5,
4751
+ class: "session-workspace-list session-workspace-card-wide"
4752
+ }, [
4753
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.handoffRecords, (record) => {
4754
+ return (_openBlock(), _createElementBlock("li", {
4755
+ key: record.id,
4756
+ class: "session-workspace-card"
4757
+ }, [
4758
+ _createElementVNode("div", { class: "session-workspace-card-title" }, _toDisplayString(record.target) + " · " + _toDisplayString(_ctx.handoffStatusLabel(record.status)), 1 /* TEXT */),
4759
+ _createElementVNode("div", null, [
4760
+ _createTextVNode("交接标识:"),
4761
+ _createElementVNode("code", null, _toDisplayString(record.id), 1 /* TEXT */)
4762
+ ]),
4763
+ _createElementVNode("div", null, "创建时间:" + _toDisplayString(record.createdAt) + " · 投递耗时:" + _toDisplayString(record.durationMs) + " 毫秒 · 写入耗时:" + _toDisplayString(record.writeDurationMs || 0) + " 毫秒", 1 /* TEXT */),
4764
+ _createElementVNode("div", null, "交接路径:" + _toDisplayString(record.route === 'mcp' ? 'MCP 工具' : '文件级') + " · 文件回退:" + _toDisplayString(record.fallback ? '是' : '否'), 1 /* TEXT */),
4765
+ (record.mcp)
4766
+ ? (_openBlock(), _createElementBlock("div", { key: 0 }, "服务:" + _toDisplayString(record.mcp.server) + " · 工具:" + _toDisplayString(record.mcp.tool), 1 /* TEXT */))
4767
+ : _createCommentVNode("v-if", true),
4768
+ _createElementVNode("div", null, "写入结果:" + _toDisplayString(record.writeResult === 'written' ? '已写入' : (record.writeResult === 'failed_or_unconfirmed' ? '失败或结果未确认(不重试)' : '未执行写入')), 1 /* TEXT */),
4769
+ (record.filePath)
4770
+ ? (_openBlock(), _createElementBlock("div", { key: 1 }, [
4771
+ _createTextVNode("文件位置:"),
4772
+ _createElementVNode("code", null, _toDisplayString(record.filePath), 1 /* TEXT */)
4773
+ ]))
4774
+ : _createCommentVNode("v-if", true),
4775
+ (record.reason)
4776
+ ? (_openBlock(), _createElementBlock("div", { key: 2 }, "原因:" + _toDisplayString(record.reason), 1 /* TEXT */))
4777
+ : _createCommentVNode("v-if", true),
4778
+ (record.readConfirmation)
4779
+ ? (_openBlock(), _createElementBlock("div", { key: 3 }, [
4780
+ _createElementVNode("div", null, "读取代理:" + _toDisplayString(record.readConfirmation.agent) + " · 确认时间:" + _toDisplayString(record.readConfirmation.at), 1 /* TEXT */),
4781
+ _createElementVNode("div", null, "读取证据:" + _toDisplayString(record.readConfirmation.evidence), 1 /* TEXT */)
4782
+ ]))
4783
+ : _createCommentVNode("v-if", true),
4784
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.discoveryWarnings || [], (warning, index) => {
4785
+ return (_openBlock(), _createElementBlock("div", { key: index }, "探测提示:" + _toDisplayString(warning.source) + " · " + _toDisplayString(warning.reason), 1 /* TEXT */))
4786
+ }), 128 /* KEYED_FRAGMENT */)),
4787
+ _createElementVNode("button", {
4788
+ class: "btn-mini",
4789
+ type: "button",
4790
+ onClick: $event => (_ctx.copyThreadHandoff(record)),
4791
+ disabled: _ctx.handoffBusy || _ctx.handoffLoading
4792
+ }, _toDisplayString(record.route === 'mcp' ? '回退文件并复制卡片' : '复制卡片'), 9 /* TEXT, PROPS */, ["onClick", "disabled"])
4793
+ ]))
4794
+ }), 128 /* KEYED_FRAGMENT */))
4795
+ ]))
4796
+ : _createCommentVNode("v-if", true)
4797
+ ]))
4798
+ : _createCommentVNode("v-if", true)
4799
+ ], 40 /* PROPS, NEED_HYDRATION */, ["open", "onToggle"]))
4800
+ : _createCommentVNode("v-if", true),
4375
4801
  _createElementVNode("div", {
4376
4802
  class: "session-preview-header",
4377
4803
  ref: _ctx.setSessionPreviewHeaderRef
@@ -4528,22 +4954,22 @@ return function render(_ctx, _cache) {
4528
4954
  ]),
4529
4955
  (_ctx.sessionDetailLoading && !_ctx.sessionPreviewLoadingMore)
4530
4956
  ? (_openBlock(), _createElementBlock("div", {
4531
- key: 0,
4957
+ key: 1,
4532
4958
  class: "session-preview-empty"
4533
4959
  }, _toDisplayString(_ctx.t('sessions.preview.loadingBody')), 1 /* TEXT */))
4534
4960
  : (_ctx.activeSessionDetailError)
4535
4961
  ? (_openBlock(), _createElementBlock("div", {
4536
- key: 1,
4962
+ key: 2,
4537
4963
  class: "session-preview-empty"
4538
4964
  }, _toDisplayString(_ctx.activeSessionDetailError), 1 /* TEXT */))
4539
4965
  : (!_ctx.activeSessionMessages.length)
4540
4966
  ? (_openBlock(), _createElementBlock("div", {
4541
- key: 2,
4967
+ key: 3,
4542
4968
  class: "session-preview-empty"
4543
4969
  }, _toDisplayString(_ctx.t('sessions.preview.emptyMsgs')), 1 /* TEXT */))
4544
4970
  : (_ctx.sessionPreviewRenderEnabled && !_ctx.activeSessionVisibleMessages.length)
4545
4971
  ? (_openBlock(), _createElementBlock("div", {
4546
- key: 3,
4972
+ key: 4,
4547
4973
  class: "session-preview-empty"
4548
4974
  }, [
4549
4975
  _createElementVNode("span", null, _toDisplayString(_ctx.t('sessions.preview.rendering')), 1 /* TEXT */),
@@ -4555,11 +4981,11 @@ return function render(_ctx, _cache) {
4555
4981
  ]))
4556
4982
  : (!_ctx.sessionPreviewRenderEnabled)
4557
4983
  ? (_openBlock(), _createElementBlock("div", {
4558
- key: 4,
4984
+ key: 5,
4559
4985
  class: "session-preview-empty"
4560
4986
  }, _toDisplayString(_ctx.t('sessions.preview.preparing')), 1 /* TEXT */))
4561
4987
  : (_openBlock(), _createElementBlock("div", {
4562
- key: 5,
4988
+ key: 6,
4563
4989
  class: "session-preview-body"
4564
4990
  }, [
4565
4991
  (_ctx.activeSessionWorkspaceSummary.available)
@@ -4814,66 +5240,58 @@ return function render(_ctx, _cache) {
4814
5240
  class: _normalizeClass(['session-timeline', 'session-timeline-' + _ctx.sessionTimelineStyle]),
4815
5241
  "aria-label": _ctx.t('sessions.timeline.aria')
4816
5242
  }, [
4817
- _createCommentVNode(" 点状模式 "),
4818
- (_ctx.sessionTimelineStyle === 'dots')
4819
- ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [
4820
- _createElementVNode("div", { class: "session-timeline-track" }),
4821
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionTimelineNodes, (node, __, ___, _cached) => {
4822
- const _memo = ([_ctx.sessionTimelineActiveKey === node.key, node.safePercent, node.title])
4823
- if (_cached && _cached.el && _cached.key === 'timeline-' + node.key && _isMemoSame(_cached, _memo)) return _cached
4824
- const _item = (_openBlock(), _createElementBlock("button", {
4825
- key: 'timeline-' + node.key,
4826
- type: "button",
4827
- class: _normalizeClass(['session-timeline-node', { active: _ctx.sessionTimelineActiveKey === node.key }]),
4828
- "aria-current": _ctx.sessionTimelineActiveKey === node.key ? 'true' : null,
4829
- style: _normalizeStyle({ top: `${node.safePercent}%` }),
4830
- title: node.title,
4831
- onClick: $event => (_ctx.jumpToSessionTimelineNode(node.key))
4832
- }, [
4833
- _createElementVNode("span", { class: "sr-only" }, _toDisplayString(node.title), 1 /* TEXT */)
4834
- ], 14 /* CLASS, STYLE, PROPS */, ["aria-current", "title", "onClick"]))
4835
- _item.memo = _memo
4836
- return _item
4837
- }, _cache, 4), 128 /* KEYED_FRAGMENT */)),
4838
- (_ctx.sessionTimelineActiveTitle)
4839
- ? (_openBlock(), _createElementBlock("div", {
4840
- key: 0,
4841
- class: "session-timeline-current"
4842
- }, _toDisplayString(_ctx.sessionTimelineActiveTitle), 1 /* TEXT */))
4843
- : _createCommentVNode("v-if", true)
4844
- ], 64 /* STABLE_FRAGMENT */))
4845
- : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
4846
- _createCommentVNode(" 条状模式 "),
4847
- _createElementVNode("div", { class: "session-timeline-bar-track" }, [
4848
- _createElementVNode("div", {
4849
- class: "session-timeline-bar-progress",
4850
- style: _normalizeStyle({ height: _ctx.sessionTimelineProgressPercent + '%' })
4851
- }, null, 4 /* STYLE */)
5243
+ _createElementVNode("header", { class: "session-timeline-heading" }, [
5244
+ _createElementVNode("span", null, "阅读目录"),
5245
+ _createElementVNode("span", { class: "session-timeline-count" }, _toDisplayString(_ctx.sessionTimelineNodes.length) + " 个定位点", 1 /* TEXT */)
5246
+ ]),
5247
+ _createElementVNode("div", {
5248
+ class: "session-timeline-reading-progress",
5249
+ "aria-hidden": "true"
5250
+ }, [
5251
+ _createElementVNode("span", {
5252
+ style: _normalizeStyle({ width: _ctx.sessionTimelineProgressPercent + '%' })
5253
+ }, null, 4 /* STYLE */)
5254
+ ]),
5255
+ _createElementVNode("nav", {
5256
+ class: "session-timeline-index",
5257
+ "aria-label": _ctx.t('sessions.timeline.aria')
5258
+ }, [
5259
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionTimelineNodes, (node, __, ___, _cached) => {
5260
+ const _memo = ([_ctx.sessionTimelineActiveKey === node.key, node.safePercent, node.title])
5261
+ if (_cached && _cached.el && _cached.key === 'timeline-' + node.key && _isMemoSame(_cached, _memo)) return _cached
5262
+ const _item = (_openBlock(), _createElementBlock("button", {
5263
+ key: 'timeline-' + node.key,
5264
+ type: "button",
5265
+ class: _normalizeClass(['session-timeline-node', { active: _ctx.sessionTimelineActiveKey === node.key }]),
5266
+ "aria-current": _ctx.sessionTimelineActiveKey === node.key ? 'true' : null,
5267
+ title: node.title,
5268
+ "aria-label": node.title,
5269
+ onClick: $event => (_ctx.jumpToSessionTimelineNode(node.key))
5270
+ }, [
5271
+ _createElementVNode("span", { class: "session-timeline-number" }, _toDisplayString(node.title.split(' · ')[0]), 1 /* TEXT */),
5272
+ _createElementVNode("span", { class: "session-timeline-label" }, [
5273
+ _createElementVNode("span", { class: "session-timeline-role" }, _toDisplayString(node.role === 'user' ? '提问' : node.role === 'assistant' ? '回复' : node.roleLabel), 1 /* TEXT */),
5274
+ _createElementVNode("time", { class: "session-timeline-time" }, _toDisplayString(node.displayTime ? node.displayTime.slice(-5) : '无时间'), 1 /* TEXT */)
4852
5275
  ]),
4853
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.sessionTimelineNodes, (node, __, ___, _cached) => {
4854
- const _memo = ([_ctx.sessionTimelineActiveKey === node.key, node.safePercent, node.title])
4855
- if (_cached && _cached.el && _cached.key === 'timeline-bar-' + node.key && _isMemoSame(_cached, _memo)) return _cached
4856
- const _item = (_openBlock(), _createElementBlock("button", {
4857
- key: 'timeline-bar-' + node.key,
4858
- type: "button",
4859
- class: _normalizeClass(['session-timeline-bar-node', { active: _ctx.sessionTimelineActiveKey === node.key }]),
4860
- "aria-current": _ctx.sessionTimelineActiveKey === node.key ? 'true' : null,
4861
- style: _normalizeStyle({ top: `${node.safePercent}%` }),
4862
- title: node.title,
4863
- onClick: $event => (_ctx.jumpToSessionTimelineNode(node.key))
4864
- }, [
4865
- _createElementVNode("span", { class: "sr-only" }, _toDisplayString(node.title), 1 /* TEXT */)
4866
- ], 14 /* CLASS, STYLE, PROPS */, ["aria-current", "title", "onClick"]))
4867
- _item.memo = _memo
4868
- return _item
4869
- }, _cache, 6), 128 /* KEYED_FRAGMENT */)),
4870
- (_ctx.sessionTimelineActiveTitle)
4871
- ? (_openBlock(), _createElementBlock("div", {
4872
- key: 0,
4873
- class: "session-timeline-current"
4874
- }, _toDisplayString(_ctx.sessionTimelineActiveTitle), 1 /* TEXT */))
4875
- : _createCommentVNode("v-if", true)
4876
- ], 64 /* STABLE_FRAGMENT */))
5276
+ _createElementVNode("span", {
5277
+ class: "session-timeline-indicator",
5278
+ "aria-hidden": "true"
5279
+ })
5280
+ ], 10 /* CLASS, PROPS */, ["aria-current", "title", "aria-label", "onClick"]))
5281
+ _item.memo = _memo
5282
+ return _item
5283
+ }, _cache, 4), 128 /* KEYED_FRAGMENT */))
5284
+ ], 8 /* PROPS */, ["aria-label"]),
5285
+ _createElementVNode("footer", {
5286
+ class: "session-timeline-current",
5287
+ title: _ctx.sessionTimelineActiveTitle
5288
+ }, [
5289
+ _createElementVNode("span", {
5290
+ class: "session-timeline-status-dot",
5291
+ "aria-hidden": "true"
5292
+ }),
5293
+ _createTextVNode(" " + _toDisplayString(_ctx.sessionTimelineActiveTitle ? '正在阅读 ' + _ctx.sessionTimelineActiveTitle.split(' · ')[0] : '选择节点定位原文'), 1 /* TEXT */)
5294
+ ], 8 /* PROPS */, ["title"])
4877
5295
  ], 10 /* CLASS, PROPS */, ["aria-label"]))
4878
5296
  : _createCommentVNode("v-if", true)
4879
5297
  ], 64 /* STABLE_FRAGMENT */))
@@ -7216,17 +7634,31 @@ return function render(_ctx, _cache) {
7216
7634
  class: "prompts-editor"
7217
7635
  }, [
7218
7636
  _createElementVNode("div", { class: "prompts-editor-toolbar" }, [
7219
- _createElementVNode("div", { class: "form-hint" }, [
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),
7637
+ _createElementVNode("div", { class: "prompts-path-summary-wrap" }, [
7224
7638
  (_ctx.agentsPath)
7225
- ? (_openBlock(), _createElementBlock("span", {
7639
+ ? (_openBlock(), _createElementBlock("details", {
7640
+ key: 0,
7641
+ class: "prompts-path-summary"
7642
+ }, [
7643
+ _createElementVNode("summary", {
7644
+ class: "prompts-path-summary-trigger",
7645
+ title: _ctx.agentsPath
7646
+ }, [
7647
+ _createElementVNode("span", { class: "prompts-path-summary-name" }, _toDisplayString(_ctx.promptPathFileName(_ctx.agentsPath)), 1 /* TEXT */),
7648
+ _createElementVNode("span", { class: "prompts-token-hint" }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.agentsTokenCount })), 1 /* TEXT */)
7649
+ ], 8 /* PROPS */, ["title"]),
7650
+ _createElementVNode("div", {
7651
+ class: "prompts-path-summary-popover",
7652
+ role: "tooltip"
7653
+ }, [
7654
+ _createElementVNode("span", { class: "prompts-path-summary-popover-label" }, _toDisplayString(_ctx.t('prompts.path.fullPath')), 1 /* TEXT */),
7655
+ _createElementVNode("code", null, _toDisplayString(_ctx.agentsPath), 1 /* TEXT */)
7656
+ ])
7657
+ ]))
7658
+ : (_openBlock(), _createElementBlock("div", {
7226
7659
  key: 1,
7227
- class: "prompts-token-hint"
7228
- }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.agentsTokenCount })), 1 /* TEXT */))
7229
- : _createCommentVNode("v-if", true)
7660
+ class: "form-hint prompts-path-summary-empty"
7661
+ }, _toDisplayString(_ctx.t('common.notLoaded')), 1 /* TEXT */))
7230
7662
  ]),
7231
7663
  _createElementVNode("div", { class: "prompts-editor-actions" }, [
7232
7664
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
@@ -7247,7 +7679,11 @@ return function render(_ctx, _cache) {
7247
7679
  }), 128 /* KEYED_FRAGMENT */))
7248
7680
  ], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
7249
7681
  ]),
7250
- _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
7682
+ _createElementVNode("div", {
7683
+ class: "prompts-editor-group prompts-editor-group--secondary prompts-editor-group--edit",
7684
+ role: "group",
7685
+ "aria-label": _ctx.t('prompts.actions.edit')
7686
+ }, [
7251
7687
  _createElementVNode("button", {
7252
7688
  class: "btn-mini",
7253
7689
  onClick: _ctx.exportAgentsContent,
@@ -7327,8 +7763,12 @@ return function render(_ctx, _cache) {
7327
7763
  _createElementVNode("path", { d: "M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4" })
7328
7764
  ]))
7329
7765
  ], 8 /* PROPS */, ["onClick", "disabled", "title"])
7330
- ]),
7331
- _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
7766
+ ], 8 /* PROPS */, ["aria-label"]),
7767
+ _createElementVNode("div", {
7768
+ class: "prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view",
7769
+ role: "group",
7770
+ "aria-label": _ctx.t('prompts.actions.view')
7771
+ }, [
7332
7772
  _createElementVNode("button", {
7333
7773
  class: "btn-mini",
7334
7774
  onClick: $event => (_ctx.agentsDiffVisible ? _ctx.resetAgentsDiffState() : _ctx.loadPromptsContent()),
@@ -7378,7 +7818,7 @@ return function render(_ctx, _cache) {
7378
7818
  })
7379
7819
  ]))
7380
7820
  ], 8 /* PROPS */, ["onClick", "disabled", "title"])
7381
- ])
7821
+ ], 8 /* PROPS */, ["aria-label"])
7382
7822
  ])
7383
7823
  ]),
7384
7824
  (_ctx.promptHistoryVisible)
@@ -7768,17 +8208,31 @@ return function render(_ctx, _cache) {
7768
8208
  ]),
7769
8209
  _createElementVNode("div", { class: "prompts-editor" }, [
7770
8210
  _createElementVNode("div", { class: "prompts-editor-toolbar" }, [
7771
- _createElementVNode("div", { class: "form-hint" }, [
7772
- _createTextVNode(_toDisplayString(_ctx.sysPromptPath || _ctx.t('common.notLoaded')) + " ", 1 /* TEXT */),
8211
+ _createElementVNode("div", { class: "prompts-path-summary-wrap" }, [
7773
8212
  (_ctx.sysPromptPath)
7774
- ? (_openBlock(), _createElementBlock("span", { key: 0 }, _toDisplayString(_ctx.paren(_ctx.sysPromptExists ? _ctx.t('common.exists') : _ctx.t('common.notExistsWillCreateOnSave'))), 1 /* TEXT */))
7775
- : _createCommentVNode("v-if", true),
7776
- (_ctx.sysPromptPath)
7777
- ? (_openBlock(), _createElementBlock("span", {
8213
+ ? (_openBlock(), _createElementBlock("details", {
8214
+ key: 0,
8215
+ class: "prompts-path-summary"
8216
+ }, [
8217
+ _createElementVNode("summary", {
8218
+ class: "prompts-path-summary-trigger",
8219
+ title: _ctx.sysPromptPath
8220
+ }, [
8221
+ _createElementVNode("span", { class: "prompts-path-summary-name" }, _toDisplayString(_ctx.promptPathFileName(_ctx.sysPromptPath)), 1 /* TEXT */),
8222
+ _createElementVNode("span", { class: "prompts-token-hint" }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.sysPromptTokenCount })), 1 /* TEXT */)
8223
+ ], 8 /* PROPS */, ["title"]),
8224
+ _createElementVNode("div", {
8225
+ class: "prompts-path-summary-popover",
8226
+ role: "tooltip"
8227
+ }, [
8228
+ _createElementVNode("span", { class: "prompts-path-summary-popover-label" }, _toDisplayString(_ctx.t('prompts.path.fullPath')), 1 /* TEXT */),
8229
+ _createElementVNode("code", null, _toDisplayString(_ctx.sysPromptPath), 1 /* TEXT */)
8230
+ ])
8231
+ ]))
8232
+ : (_openBlock(), _createElementBlock("div", {
7778
8233
  key: 1,
7779
- class: "prompts-token-hint"
7780
- }, "· " + _toDisplayString(_ctx.t('prompts.tokenCount.hint', { count: _ctx.sysPromptTokenCount })), 1 /* TEXT */))
7781
- : _createCommentVNode("v-if", true)
8234
+ class: "form-hint prompts-path-summary-empty"
8235
+ }, _toDisplayString(_ctx.t('common.notLoaded')), 1 /* TEXT */))
7782
8236
  ]),
7783
8237
  _createElementVNode("div", { class: "prompts-editor-actions" }, [
7784
8238
  _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--pathref" }, [
@@ -7799,7 +8253,11 @@ return function render(_ctx, _cache) {
7799
8253
  }), 128 /* KEYED_FRAGMENT */))
7800
8254
  ], 40 /* PROPS, NEED_HYDRATION */, ["disabled", "title", "onFocus", "onChange"])
7801
8255
  ]),
7802
- _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--secondary" }, [
8256
+ _createElementVNode("div", {
8257
+ class: "prompts-editor-group prompts-editor-group--secondary prompts-editor-group--edit",
8258
+ role: "group",
8259
+ "aria-label": _ctx.t('prompts.actions.edit')
8260
+ }, [
7803
8261
  _createElementVNode("button", {
7804
8262
  class: "btn-mini",
7805
8263
  onClick: _ctx.exportSysPromptContent,
@@ -7879,8 +8337,12 @@ return function render(_ctx, _cache) {
7879
8337
  _createElementVNode("path", { d: "M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4" })
7880
8338
  ]))
7881
8339
  ], 8 /* PROPS */, ["onClick", "disabled", "title"])
7882
- ]),
7883
- _createElementVNode("div", { class: "prompts-editor-group prompts-editor-group--workflow" }, [
8340
+ ], 8 /* PROPS */, ["aria-label"]),
8341
+ _createElementVNode("div", {
8342
+ class: "prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view",
8343
+ role: "group",
8344
+ "aria-label": _ctx.t('prompts.actions.view')
8345
+ }, [
7884
8346
  _createElementVNode("button", {
7885
8347
  class: "btn-mini",
7886
8348
  onClick: $event => (_ctx.sysPromptDiffVisible ? _ctx.resetSysPromptDiffState() : _ctx.cancelSysPromptEdit()),
@@ -7930,7 +8392,7 @@ return function render(_ctx, _cache) {
7930
8392
  })
7931
8393
  ]))
7932
8394
  ], 8 /* PROPS */, ["onClick", "disabled", "title"])
7933
- ])
8395
+ ], 8 /* PROPS */, ["aria-label"])
7934
8396
  ])
7935
8397
  ]),
7936
8398
  (_ctx.sysHistoryVisible)