aicodeman 1.12.2 → 1.13.0

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 (104) hide show
  1. package/README.md +67 -13
  2. package/dist/config/agent-wait.d.ts +73 -0
  3. package/dist/config/agent-wait.d.ts.map +1 -0
  4. package/dist/config/agent-wait.js +99 -0
  5. package/dist/config/agent-wait.js.map +1 -0
  6. package/dist/hooks-config.d.ts +4 -2
  7. package/dist/hooks-config.d.ts.map +1 -1
  8. package/dist/hooks-config.js +14 -4
  9. package/dist/hooks-config.js.map +1 -1
  10. package/dist/session-cli-builder.d.ts.map +1 -1
  11. package/dist/session-cli-builder.js +6 -2
  12. package/dist/session-cli-builder.js.map +1 -1
  13. package/dist/tmux-manager.d.ts.map +1 -1
  14. package/dist/tmux-manager.js +5 -1
  15. package/dist/tmux-manager.js.map +1 -1
  16. package/dist/web/public/admin-ui.js.gz +0 -0
  17. package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
  18. package/dist/web/public/{app.2e9ffd31.js → app.b24f795e.js} +5 -7
  19. package/dist/web/public/app.b24f795e.js.br +0 -0
  20. package/dist/web/public/app.b24f795e.js.gz +0 -0
  21. package/dist/web/public/constants.e7175b95.js.gz +0 -0
  22. package/dist/web/public/cron-ui.js.gz +0 -0
  23. package/dist/web/public/entrance-animations.js.gz +0 -0
  24. package/dist/web/public/i18n.da34cfaf.js +1 -0
  25. package/dist/web/public/i18n.da34cfaf.js.br +0 -0
  26. package/dist/web/public/i18n.da34cfaf.js.gz +0 -0
  27. package/dist/web/public/image-input.ee16ad88.js.gz +0 -0
  28. package/dist/web/public/index.html +12 -5
  29. package/dist/web/public/index.html.br +0 -0
  30. package/dist/web/public/index.html.gz +0 -0
  31. package/dist/web/public/input-cjk.63794d0b.js.gz +0 -0
  32. package/dist/web/public/keyboard-accessory.9936227d.js.gz +0 -0
  33. package/dist/web/public/mobile-handlers.32fdd57f.js.gz +0 -0
  34. package/dist/web/public/mobile-overview.js.gz +0 -0
  35. package/dist/web/public/mobile.32cacde5.css.gz +0 -0
  36. package/dist/web/public/notification-manager.5d229063.js.gz +0 -0
  37. package/dist/web/public/orchestrator-panel.js.gz +0 -0
  38. package/dist/web/public/panels-ui.1d4203e0.js.gz +0 -0
  39. package/dist/web/public/ralph-panel.6de2d0f8.js.gz +0 -0
  40. package/dist/web/public/ralph-wizard.13a1831e.js.gz +0 -0
  41. package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
  42. package/dist/web/public/sanitize-html.bc7078d6.js.gz +0 -0
  43. package/dist/web/public/session-ui.1356a4f4.js.gz +0 -0
  44. package/dist/web/public/settings-ui.ea63d5db.js +67 -0
  45. package/dist/web/public/settings-ui.ea63d5db.js.br +0 -0
  46. package/dist/web/public/settings-ui.ea63d5db.js.gz +0 -0
  47. package/dist/web/public/styles.b10e5edd.css +1 -0
  48. package/dist/web/public/styles.b10e5edd.css.br +0 -0
  49. package/dist/web/public/styles.b10e5edd.css.gz +0 -0
  50. package/dist/web/public/subagent-windows.4cc8b005.js.gz +0 -0
  51. package/dist/web/public/sw.js.gz +0 -0
  52. package/dist/web/public/terminal-ui.78c71f3a.js.gz +0 -0
  53. package/dist/web/public/ultracode-panel.js.gz +0 -0
  54. package/dist/web/public/ultracode-windows.js.gz +0 -0
  55. package/dist/web/public/upload.html.gz +0 -0
  56. package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
  57. package/dist/web/public/vendor/marked.min.js.gz +0 -0
  58. package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
  59. package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
  60. package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
  61. package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
  62. package/dist/web/public/vendor/xterm-zerolag-input.137ad9f0.js.gz +0 -0
  63. package/dist/web/public/vendor/xterm.css.gz +0 -0
  64. package/dist/web/public/vendor/xterm.min.js.gz +0 -0
  65. package/dist/web/public/voice-input.085e9e73.js.gz +0 -0
  66. package/dist/web/public/webview-tabs.js +1 -2
  67. package/dist/web/public/webview-tabs.js.br +0 -0
  68. package/dist/web/public/webview-tabs.js.gz +0 -0
  69. package/dist/web/routes/hook-event-routes.d.ts.map +1 -1
  70. package/dist/web/routes/hook-event-routes.js +22 -0
  71. package/dist/web/routes/hook-event-routes.js.map +1 -1
  72. package/dist/web/routes/session-routes.d.ts +4 -0
  73. package/dist/web/routes/session-routes.d.ts.map +1 -1
  74. package/dist/web/routes/session-routes.js +499 -17
  75. package/dist/web/routes/session-routes.js.map +1 -1
  76. package/dist/web/schemas.d.ts +53 -0
  77. package/dist/web/schemas.d.ts.map +1 -1
  78. package/dist/web/schemas.js +59 -0
  79. package/dist/web/schemas.js.map +1 -1
  80. package/dist/web/server.d.ts.map +1 -1
  81. package/dist/web/server.js +14 -0
  82. package/dist/web/server.js.map +1 -1
  83. package/dist/web/session-listener-wiring.d.ts.map +1 -1
  84. package/dist/web/session-listener-wiring.js +28 -0
  85. package/dist/web/session-listener-wiring.js.map +1 -1
  86. package/dist/web/session-wait-registry.d.ts +407 -0
  87. package/dist/web/session-wait-registry.d.ts.map +1 -0
  88. package/dist/web/session-wait-registry.js +895 -0
  89. package/dist/web/session-wait-registry.js.map +1 -0
  90. package/package.json +2 -1
  91. package/skills/codeman/SKILL.md +274 -0
  92. package/skills/codeman/reference/endpoints.md +214 -0
  93. package/skills/codeman/reference/recipes.md +249 -0
  94. package/dist/web/public/app.2e9ffd31.js.br +0 -0
  95. package/dist/web/public/app.2e9ffd31.js.gz +0 -0
  96. package/dist/web/public/i18n.0fbea500.js +0 -1
  97. package/dist/web/public/i18n.0fbea500.js.br +0 -0
  98. package/dist/web/public/i18n.0fbea500.js.gz +0 -0
  99. package/dist/web/public/settings-ui.01a1ae7d.js +0 -67
  100. package/dist/web/public/settings-ui.01a1ae7d.js.br +0 -0
  101. package/dist/web/public/settings-ui.01a1ae7d.js.gz +0 -0
  102. package/dist/web/public/styles.50cd52bd.css +0 -1
  103. package/dist/web/public/styles.50cd52bd.css.br +0 -0
  104. package/dist/web/public/styles.50cd52bd.css.gz +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(function(s){"use strict";const c="Codeman",O=new Set(["en","zh-CN"]),C=["title","aria-label","placeholder"],x=["[data-i18n-skip]",".xterm",".terminal-container",".terminal-output",".response-content",".response-viewer-content",".file-preview-content",".session-tab-name",".session-name",".case-name",".notif-item-message","pre","code","script","style","textarea"].join(","),D=[".history-item-title",".history-item-subtitle",".history-detail-prompt",".history-detail-path",".folder-history-subtitle"].join(","),m=Object.freeze({"Skip to terminal":"\u8DF3\u8F6C\u5230\u7EC8\u7AEF","Go to main page":"\u8FD4\u56DE\u4E3B\u9875","Session tabs":"\u4F1A\u8BDD\u6807\u7B7E\u9875","Admin Panel":"\u7BA1\u7406\u9762\u677F","Open admin panel":"\u6253\u5F00\u7BA1\u7406\u9762\u677F","Re-dock to dashboard (close window)":"\u91CD\u65B0\u505C\u9760\u5230\u4E3B\u754C\u9762\uFF08\u5173\u95ED\u7A97\u53E3\uFF09","Tunnel status":"\u96A7\u9053\u72B6\u6001","Decrease font size":"\u51CF\u5C0F\u5B57\u4F53","Increase font size":"\u589E\u5927\u5B57\u4F53","Current font size":"\u5F53\u524D\u5B57\u4F53\u5927\u5C0F","System resource usage":"\u7CFB\u7EDF\u8D44\u6E90\u4F7F\u7528\u60C5\u51B5","Redraw terminal":"\u91CD\u7ED8\u7EC8\u7AEF","Redraw terminal to fit current screen (Ctrl+Shift+R)":"\u91CD\u7ED8\u7EC8\u7AEF\u4EE5\u9002\u5E94\u5F53\u524D\u5C4F\u5E55\uFF08Ctrl+Shift+R\uFF09","View last response":"\u67E5\u770B\u6700\u8FD1\u4E00\u6B21\u56DE\u590D","Away Digest":"\u79BB\u5F00\u671F\u95F4\u6458\u8981","Open away digest":"\u6253\u5F00\u79BB\u5F00\u671F\u95F4\u6458\u8981","Session Manager":"\u4F1A\u8BDD\u7BA1\u7406\u5668","Session actions":"\u4F1A\u8BDD\u64CD\u4F5C","Open session manager":"\u6253\u5F00\u4F1A\u8BDD\u7BA1\u7406\u5668",Attachments:"\u9644\u4EF6","Open attachment history":"\u6253\u5F00\u9644\u4EF6\u5386\u53F2","File Viewer":"\u6587\u4EF6\u67E5\u770B\u5668","Open file viewer":"\u6253\u5F00\u6587\u4EF6\u67E5\u770B\u5668","Open Codeman across all displays":"\u5728\u6240\u6709\u663E\u793A\u5668\u4E0A\u6253\u5F00 {name}","Ultracode / Workflow agents":"Ultracode / Workflow \u667A\u80FD\u4F53","Open ultracode workflow agents":"\u6253\u5F00 Ultracode \u5DE5\u4F5C\u6D41\u667A\u80FD\u4F53",Notifications:"\u901A\u77E5","Toggle notifications":"\u5207\u6362\u901A\u77E5\u9762\u677F","Session Lifecycle Log":"\u4F1A\u8BDD\u751F\u547D\u5468\u671F\u65E5\u5FD7","Open session lifecycle log":"\u6253\u5F00\u4F1A\u8BDD\u751F\u547D\u5468\u671F\u65E5\u5FD7","App Settings":"\u5E94\u7528\u8BBE\u7F6E","Open app settings":"\u6253\u5F00\u5E94\u7528\u8BBE\u7F6E","Total tokens across all sessions":"\u6240\u6709\u4F1A\u8BDD\u7684 Token \u603B\u6570","Token usage across active sessions":"\u6D3B\u52A8\u4F1A\u8BDD\u7684 Token \u4F7F\u7528\u91CF","Instance count":"\u5B9E\u4F8B\u6570\u91CF","No response yet":"\u6682\u65E0\u56DE\u590D","No response yet \u2014 send a message in this session first.":"\u6682\u65E0\u56DE\u590D\uFF0C\u8BF7\u5148\u5728\u6B64\u4F1A\u8BDD\u4E2D\u53D1\u9001\u4E00\u6761\u6D88\u606F\u3002","Last Response":"\u6700\u8FD1\u4E00\u6B21\u56DE\u590D",More:"\u66F4\u591A","Codeman version":"{name}\u7248\u672C",Stop:"\u505C\u6B62",Watching:"\u76D1\u89C6\u4E2D",Orchestrator:"\u7F16\u6392\u5668",Close:"\u5173\u95ED","Close window":"\u5173\u95ED\u7A97\u53E3","Session unavailable":"\u4F1A\u8BDD\u4E0D\u53EF\u7528","This session has ended or is no longer available.":"\u6B64\u4F1A\u8BDD\u5DF2\u7ED3\u675F\u6216\u4E0D\u518D\u53EF\u7528\u3002","Manage AI Coding tools in persistent tmux sessions.":"\u5728\u6301\u4E45\u5316 tmux \u4F1A\u8BDD\u4E2D\u7BA1\u7406 AI \u7F16\u7A0B\u5DE5\u5177\u3002","Select case":"\u9009\u62E9\u6848\u4F8B","Select Case":"\u9009\u62E9\u6848\u4F8B","All cases":"\u5168\u90E8\u6848\u4F8B","No directory":"\u672A\u9009\u62E9\u76EE\u5F55",Run:"\u8FD0\u884C","Run Claude Code":"\u8FD0\u884C Claude Code","Run OpenCode":"\u8FD0\u884C OpenCode","Run Gemini":"\u8FD0\u884C Gemini","Run Antigravity":"\u8FD0\u884C Antigravity","Run Shell":"\u8FD0\u884C Shell","Select AI backend":"\u9009\u62E9 AI \u540E\u7AEF","Create New Case":"\u65B0\u5EFA\u6848\u4F8B","Create new case":"\u65B0\u5EFA\u6848\u4F8B","Link Existing":"\u5173\u8054\u73B0\u6709\u76EE\u5F55","Add Case":"\u6DFB\u52A0\u6848\u4F8B","Open sessions":"\u6253\u5F00\u4F1A\u8BDD","Recent Sessions":"\u6700\u8FD1\u4F1A\u8BDD","Search sessions by name, prompt, or path\u2026":"\u6309\u540D\u79F0\u3001\u63D0\u793A\u8BCD\u6216\u8DEF\u5F84\u641C\u7D22\u4F1A\u8BDD\u2026","Search open sessions or start a new one":"\u641C\u7D22\u5DF2\u6253\u5F00\u4F1A\u8BDD\u6216\u542F\u52A8\u65B0\u4F1A\u8BDD","Find Open Session":"\u67E5\u627E\u5DF2\u6253\u5F00\u4F1A\u8BDD","No background agents":"\u6CA1\u6709\u540E\u53F0\u667A\u80FD\u4F53","No background agents detected":"\u672A\u68C0\u6D4B\u5230\u540E\u53F0\u667A\u80FD\u4F53","No notifications":"\u6CA1\u6709\u901A\u77E5","No mux sessions":"\u6CA1\u6709 mux \u4F1A\u8BDD","No lifecycle entries found":"\u672A\u627E\u5230\u751F\u547D\u5468\u671F\u8BB0\u5F55","No ultracode runs detected":"\u672A\u68C0\u6D4B\u5230 Ultracode \u8FD0\u884C",Display:"\u663E\u793A","Claude CLI":"Claude CLI","Codex CLI":"Codex CLI",Models:"\u6A21\u578B",Shortcuts:"\u5FEB\u6377\u952E",Voice:"\u8BED\u97F3",Save:"\u4FDD\u5B58",Cancel:"\u53D6\u6D88",Apply:"\u5E94\u7528",Create:"\u521B\u5EFA",Add:"\u6DFB\u52A0",Delete:"\u5220\u9664",Remove:"\u79FB\u9664",Edit:"\u7F16\u8F91",Refresh:"\u5237\u65B0",Back:"\u8FD4\u56DE",Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Clear:"\u6E05\u9664","Clear all":"\u5168\u90E8\u6E05\u9664","Clear All":"\u5168\u90E8\u6E05\u9664",Search:"\u641C\u7D22",Filter:"\u7B5B\u9009",Enable:"\u542F\u7528",Enabled:"\u5DF2\u542F\u7528",Disabled:"\u5DF2\u7981\u7528",Active:"\u6D3B\u52A8","Not active":"\u672A\u6D3B\u52A8",On:"\u5F00",Off:"\u5173",Yes:"\u662F",No:"\u5426",Optional:"\u53EF\u9009",Default:"\u9ED8\u8BA4",Custom:"\u81EA\u5B9A\u4E49",Name:"\u540D\u79F0",Description:"\u63CF\u8FF0",Status:"\u72B6\u6001",Reason:"\u539F\u56E0",Time:"\u65F6\u95F4",Event:"\u4E8B\u4EF6",Events:"\u4E8B\u4EF6",Session:"\u4F1A\u8BDD",Sessions:"\u4F1A\u8BDD",Files:"\u6587\u4EF6",History:"\u5386\u53F2",Summary:"\u6458\u8981",Details:"\u8BE6\u60C5",Options:"\u9009\u9879",Settings:"\u8BBE\u7F6E",Help:"\u5E2E\u52A9",Loading:"\u6B63\u5728\u52A0\u8F7D",Error:"\u9519\u8BEF",Errors:"\u9519\u8BEF",Warning:"\u8B66\u544A",Warnings:"\u8B66\u544A",Info:"\u4FE1\u606F",Complete:"\u5B8C\u6210",Completed:"\u5DF2\u5B8C\u6210",Stopped:"\u5DF2\u505C\u6B62",Running:"\u8FD0\u884C\u4E2D",Idle:"\u7A7A\u95F2",Working:"\u5DE5\u4F5C\u4E2D",Today:"\u4ECA\u5929",Home:"\u4E3B\u9875",Local:"\u672C\u5730",Remote:"\u8FDC\u7A0B",Docker:"Docker",Terminal:"\u7EC8\u7AEF",Prompt:"\u63D0\u793A\u8BCD",Source:"\u6765\u6E90",Type:"\u7C7B\u578B",Language:"\u8BED\u8A00","Branding & Language":"\u54C1\u724C\u4E0E\u8BED\u8A00","Display Name":"\u663E\u793A\u540D\u79F0","Interface Language":"\u754C\u9762\u8BED\u8A00","Name shown in the browser UI and window title. Supports Unicode, including Chinese.":"\u663E\u793A\u5728\u6D4F\u89C8\u5668\u754C\u9762\u548C\u7A97\u53E3\u6807\u9898\u4E2D\u7684\u540D\u79F0\u3002\u652F\u6301 Unicode\uFF0C\u5305\u62EC\u4E2D\u6587\u3002","Language for this device. Dynamic status messages and dialogs use the same language.":"\u6B64\u8BBE\u5907\u4F7F\u7528\u7684\u754C\u9762\u8BED\u8A00\u3002\u52A8\u6001\u72B6\u6001\u6D88\u606F\u4E0E\u5BF9\u8BDD\u6846\u4E5F\u4F1A\u4F7F\u7528\u540C\u4E00\u8BED\u8A00\u3002",English:"English",Appearance:"\u5916\u89C2",Skin:"\u76AE\u80A4","Visual theme for this device (not synced)":"\u6B64\u8BBE\u5907\u7684\u89C6\u89C9\u4E3B\u9898\uFF08\u4E0D\u540C\u6B65\uFF09","Daylight Blue":"\u65E5\u5149\u84DD","Daylight Green":"\u65E5\u5149\u7EFF","OG Codeman":"\u7ECF\u5178 {name}",Performance:"\u6027\u80FD","WebGL Renderer":"WebGL \u6E32\u67D3\u5668","Header Displays":"\u9876\u90E8\u680F\u663E\u793A","Font Controls":"\u5B57\u4F53\u63A7\u5236","System Stats":"\u7CFB\u7EDF\u72B6\u6001","Lifecycle Log":"\u751F\u547D\u5468\u671F\u65E5\u5FD7","Response Viewer":"\u56DE\u590D\u67E5\u770B\u5668","Attachments Button":"\u9644\u4EF6\u6309\u94AE","Multi-monitor Button":"\u591A\u663E\u793A\u5668\u6309\u94AE","Session Manager Button":"\u4F1A\u8BDD\u7BA1\u7406\u5668\u6309\u94AE","Away Digest Button":"\u79BB\u5F00\u671F\u95F4\u6458\u8981\u6309\u94AE","Cron Button":"\u5B9A\u65F6\u4EFB\u52A1\u6309\u94AE","Redraw Terminal Button":"\u91CD\u7ED8\u7EC8\u7AEF\u6309\u94AE","Tab Bar":"\u6807\u7B7E\u680F","Tall Tabs (Name + Folder)":"\u53CC\u884C\u6807\u7B7E\uFF08\u540D\u79F0 + \u6587\u4EF6\u5939\uFF09","Pop-out Button on Tabs":"\u6807\u7B7E\u9875\u5F39\u51FA\u7A97\u53E3\u6309\u94AE",Panels:"\u9762\u677F",Monitor:"\u76D1\u89C6\u5668","Project Insights":"\u9879\u76EE\u6D1E\u5BDF","File Browser":"\u6587\u4EF6\u6D4F\u89C8\u5668",Subagents:"\u5B50\u667A\u80FD\u4F53","Ultracode Agents":"Ultracode \u667A\u80FD\u4F53","Ultracode Floating Windows":"Ultracode \u6D6E\u52A8\u7A97\u53E3","Subagent Options":"\u5B50\u667A\u80FD\u4F53\u9009\u9879","Enable Tracking":"\u542F\u7528\u8DDF\u8E2A","Active Tab Only":"\u4EC5\u6D3B\u52A8\u6807\u7B7E\u9875","Image Watcher":"\u56FE\u50CF\u76D1\u89C6\u5668","Enable Globally":"\u5168\u5C40\u542F\u7528","Remote Access":"\u8FDC\u7A0B\u8BBF\u95EE","Cloudflare Tunnel":"Cloudflare \u96A7\u9053","Tunnel URL":"\u96A7\u9053\u5730\u5740","Upload URL":"\u4E0A\u4F20\u5730\u5740",Updates:"\u66F4\u65B0","Current Version":"\u5F53\u524D\u7248\u672C","Check for Updates":"\u68C0\u67E5\u66F4\u65B0","Check now":"\u7ACB\u5373\u68C0\u67E5","Update available":"\u6709\u53EF\u7528\u66F4\u65B0","Update now":"\u7ACB\u5373\u66F4\u65B0","Show CPU and memory usage in header":"\u5728\u9876\u90E8\u680F\u663E\u793A CPU \u4E0E\u5185\u5B58\u4F7F\u7528\u60C5\u51B5","Show session lifecycle log button in header":"\u5728\u9876\u90E8\u680F\u663E\u793A\u4F1A\u8BDD\u751F\u547D\u5468\u671F\u65E5\u5FD7\u6309\u94AE","Show the response viewer (eye) button in header":"\u5728\u9876\u90E8\u680F\u663E\u793A\u56DE\u590D\u67E5\u770B\u5668\uFF08\u773C\u775B\uFF09\u6309\u94AE","Show the file viewer button in header (opens the file browser panel for the active session)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u6587\u4EF6\u67E5\u770B\u5668\u6309\u94AE\uFF08\u6253\u5F00\u5F53\u524D\u4F1A\u8BDD\u7684\u6587\u4EF6\u6D4F\u89C8\u5668\u9762\u677F\uFF09","Show the attachments button in header (opens the attachment history drawer)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u9644\u4EF6\u6309\u94AE\uFF08\u6253\u5F00\u9644\u4EF6\u5386\u53F2\u62BD\u5C49\uFF09","Show the multi-monitor button in the header (opens Codeman spanned across all displays)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u591A\u663E\u793A\u5668\u6309\u94AE\uFF08\u8DE8\u6240\u6709\u663E\u793A\u5668\u6253\u5F00 {name}\uFF09","Show the session manager button in the header (opens the session manager \u2014 sessions also stay reachable via the Ctrl+K palette)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u4F1A\u8BDD\u7BA1\u7406\u5668\u6309\u94AE\uFF08\u4E5F\u53EF\u901A\u8FC7 Ctrl+K \u9762\u677F\u8BBF\u95EE\u4F1A\u8BDD\uFF09","Show the away digest button in the header (opens the 'what happened while you were away' summary)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u79BB\u5F00\u671F\u95F4\u6458\u8981\u6309\u94AE","Show the Cron button in the footer toolbar (opens the cron jobs manager)":"\u5728\u5E95\u90E8\u5DE5\u5177\u680F\u663E\u793A\u5B9A\u65F6\u4EFB\u52A1\u6309\u94AE","Show a terminal redraw button in the header \u2014 refit the terminal to the current screen size (useful when switching between devices)":"\u5728\u9876\u90E8\u680F\u663E\u793A\u7EC8\u7AEF\u91CD\u7ED8\u6309\u94AE\uFF0C\u4EE5\u91CD\u65B0\u9002\u914D\u5F53\u524D\u5C4F\u5E55\u5927\u5C0F","Show folder path below tab name and allow tab bar to wrap into multiple rows":"\u5728\u6807\u7B7E\u540D\u79F0\u4E0B\u663E\u793A\u6587\u4EF6\u5939\u8DEF\u5F84\uFF0C\u5E76\u5141\u8BB8\u6807\u7B7E\u680F\u6362\u884C","Show Monitor panel at bottom right":"\u5728\u53F3\u4E0B\u89D2\u663E\u793A\u76D1\u89C6\u5668\u9762\u677F","Show active tools and file viewers in a floating panel":"\u5728\u6D6E\u52A8\u9762\u677F\u4E2D\u663E\u793A\u6D3B\u52A8\u5DE5\u5177\u4E0E\u6587\u4EF6\u67E5\u770B\u5668","Show file browser panel on the right side":"\u5728\u53F3\u4FA7\u663E\u793A\u6587\u4EF6\u6D4F\u89C8\u5668\u9762\u677F","Show the Subagents panel (independent from Monitor)":"\u663E\u793A\u5B50\u667A\u80FD\u4F53\u9762\u677F\uFF08\u72EC\u7ACB\u4E8E\u76D1\u89C6\u5668\uFF09","Monitor Claude Code background agents in real-time":"\u5B9E\u65F6\u76D1\u89C6 Claude Code \u540E\u53F0\u667A\u80FD\u4F53","Only show subagent windows when their parent tab is selected":"\u4EC5\u5728\u9009\u4E2D\u7236\u6807\u7B7E\u9875\u65F6\u663E\u793A\u5B50\u667A\u80FD\u4F53\u7A97\u53E3","Automatically detect and popup new images in session directories":"\u81EA\u52A8\u68C0\u6D4B\u5E76\u5F39\u51FA\u4F1A\u8BDD\u76EE\u5F55\u4E2D\u7684\u65B0\u56FE\u50CF","Expose Codeman via Cloudflare Tunnel for remote access":"\u901A\u8FC7 Cloudflare \u96A7\u9053\u8FDC\u7A0B\u8BBF\u95EE {name}","Codeman version currently running":"\u5F53\u524D\u8FD0\u884C\u7684{name}\u7248\u672C","Check GitHub for a newer Codeman release":"\u68C0\u67E5 GitHub \u4E0A\u662F\u5426\u6709\u65B0\u7248 {name}",Input:"\u8F93\u5165","Local Echo":"\u672C\u5730\u56DE\u663E","CJK Input":"\u4E2D\u65E5\u97E9\u8F93\u5165","Extended Keyboard Bar":"\u6269\u5C55\u952E\u76D8\u680F","Gesture Control (beta)":"\u624B\u52BF\u63A7\u5236\uFF08\u6D4B\u8BD5\u7248\uFF09","Wheel Scrolls Local History":"\u6EDA\u8F6E\u6EDA\u52A8\u672C\u5730\u5386\u53F2","Instant typing feedback with local echo":"\u901A\u8FC7\u672C\u5730\u56DE\u663E\u5373\u65F6\u663E\u793A\u8F93\u5165","Dedicated IME input field for CJK languages":"\u4E3A\u4E2D\u65E5\u97E9\u8BED\u8A00\u63D0\u4F9B\u4E13\u7528\u8F93\u5165\u6CD5\u6587\u672C\u6846","Extra keys: Tab, Esc, arrows, Ctrl+O":"\u9644\u52A0\u6309\u952E\uFF1ATab\u3001Esc\u3001\u65B9\u5411\u952E\u3001Ctrl+O","Startup Mode":"\u542F\u52A8\u6A21\u5F0F","Skip Permissions (default)":"\u8DF3\u8FC7\u6743\u9650\u786E\u8BA4\uFF08\u9ED8\u8BA4\uFF09","Auto (classifier-guarded, low prompts)":"\u81EA\u52A8\uFF08\u5206\u7C7B\u5668\u4FDD\u62A4\uFF0C\u8F83\u5C11\u63D0\u793A\uFF09","Normal (with prompts)":"\u666E\u901A\uFF08\u663E\u793A\u63D0\u793A\uFF09","Allowed Tools Only":"\u4EC5\u5141\u8BB8\u6307\u5B9A\u5DE5\u5177","Allowed Tools":"\u5141\u8BB8\u7684\u5DE5\u5177","Comma-separated list of tools to allow":"\u4EE5\u9017\u53F7\u5206\u9694\u5141\u8BB8\u4F7F\u7528\u7684\u5DE5\u5177","Enable Ralph / Todo Tracker":"\u542F\u7528 Ralph / \u5F85\u529E\u8DDF\u8E2A\u5668","Claude Permissions":"Claude \u6743\u9650","Agent Teams":"\u667A\u80FD\u4F53\u56E2\u961F","Claude Model":"Claude \u6A21\u578B","1M Opus Context":"Opus 100 \u4E07\u4E0A\u4E0B\u6587","Remote auto-reconnect":"\u8FDC\u7A0B\u81EA\u52A8\u91CD\u8FDE","Thinking Effort":"\u601D\u8003\u5F3A\u5EA6",Low:"\u4F4E",Medium:"\u4E2D",High:"\u9AD8",Max:"\u6700\u9AD8","Nice Priority":"Nice \u4F18\u5148\u7EA7","Enable Nice Priority Reduction":"\u542F\u7528 Nice \u4F18\u5148\u7EA7\u8C03\u6574","Nice Value":"Nice \u503C","Bypass Approvals and Sandbox":"\u7ED5\u8FC7\u5BA1\u6279\u4E0E\u6C99\u7BB1","Default Model":"\u9ED8\u8BA4\u6A21\u578B","Show Optimizer Recommendations":"\u663E\u793A\u4F18\u5316\u5668\u5EFA\u8BAE","Agent Type Overrides":"\u6309\u667A\u80FD\u4F53\u7C7B\u578B\u8986\u76D6","Use Default":"\u4F7F\u7528\u9ED8\u8BA4\u503C","Enable Notifications":"\u542F\u7528\u901A\u77E5","Master toggle for all notification layers":"\u6240\u6709\u901A\u77E5\u5C42\u7684\u603B\u5F00\u5173","Browser Notifications":"\u6D4F\u89C8\u5668\u901A\u77E5","Audio Alerts":"\u58F0\u97F3\u63D0\u9192","Push Notifications":"\u63A8\u9001\u901A\u77E5","Notification Levels":"\u901A\u77E5\u7EA7\u522B",Critical:"\u4E25\u91CD","Per-Event Settings":"\u6309\u4E8B\u4EF6\u8BBE\u7F6E","Permission prompts":"\u6743\u9650\u63D0\u793A","Questions from Claude":"Claude \u63D0\u95EE","Session idle":"\u4F1A\u8BDD\u7A7A\u95F2","Response complete":"\u56DE\u590D\u5B8C\u6210","Respawn cycles":"\u91CD\u751F\u5FAA\u73AF","Task complete":"\u4EFB\u52A1\u5B8C\u6210","Subagent activity":"\u5B50\u667A\u80FD\u4F53\u6D3B\u52A8",Browser:"\u6D4F\u89C8\u5668",Audio:"\u58F0\u97F3",Push:"\u63A8\u9001","Voice Input":"\u8BED\u97F3\u8F93\u5165",Provider:"\u670D\u52A1\u5546","Active Provider":"\u5F53\u524D\u670D\u52A1\u5546","API Key":"API \u5BC6\u94A5","Domain Keywords":"\u9886\u57DF\u5173\u952E\u8BCD","Input Mode":"\u8F93\u5165\u6A21\u5F0F","Direct to input":"\u76F4\u63A5\u8F93\u5165","Compose dialog":"\u7F16\u8F91\u5BF9\u8BDD\u6846","Keyboard Shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E","Customize keyboard shortcuts. Click the binding to capture a new key combination.":"\u81EA\u5B9A\u4E49\u952E\u76D8\u5FEB\u6377\u952E\u3002\u70B9\u51FB\u6309\u952E\u7EC4\u5408\u5373\u53EF\u5F55\u5165\u65B0\u7684\u7EC4\u5408\u3002","Show Shortcuts":"\u663E\u793A\u5FEB\u6377\u952E","Full shortcut reference":"\u5B8C\u6574\u5FEB\u6377\u952E\u53C2\u8003","Needs you":"\u9700\u8981\u4F60","Current sessions":"\u5F53\u524D\u4F1A\u8BDD","Past sessions":"\u5386\u53F2\u4F1A\u8BDD","Show all past sessions":"\u663E\u793A\u5168\u90E8\u5386\u53F2\u4F1A\u8BDD","Show fewer":"\u6536\u8D77","Choose what to run":"\u9009\u62E9\u8FD0\u884C\u65B9\u5F0F","Web / URL":"\u7F51\u9875 / \u94FE\u63A5","Add URL\u2026":"\u6DFB\u52A0\u94FE\u63A5\u2026","Nothing running. Hit Run to start something.":"\u5F53\u524D\u6CA1\u6709\u8FD0\u884C\u4E2D\u7684\u4F1A\u8BDD\u3002\u70B9\u51FB\u201C\u8FD0\u884C\u201D\u5F00\u59CB\u3002","No past conversations yet":"\u5C1A\u65E0\u5386\u53F2\u5BF9\u8BDD","Loading\u2026":"\u52A0\u8F7D\u4E2D\u2026","Overview Home Screen":"\u6982\u89C8\u4E3B\u9875","On phones, the C logo opens a session overview (needs you / spaces / idle) instead of the welcome screen":"\u5728\u624B\u673A\u4E0A\uFF0C\u70B9\u51FB C \u56FE\u6807\u6253\u5F00\u4F1A\u8BDD\u6982\u89C8\uFF08\u9700\u8981\u4F60 / \u7A7A\u95F4 / \u7A7A\u95F2\uFF09\uFF0C\u800C\u4E0D\u662F\u6B22\u8FCE\u9875",Phone:"\u624B\u673A","Session Options":"\u4F1A\u8BDD\u9009\u9879","Session Name":"\u4F1A\u8BDD\u540D\u79F0","Session Color":"\u4F1A\u8BDD\u989C\u8272","Working Directory":"\u5DE5\u4F5C\u76EE\u5F55","Set working directory":"\u8BBE\u7F6E\u5DE5\u4F5C\u76EE\u5F55","Resume Conversation":"\u7EE7\u7EED\u5BF9\u8BDD","Close Session":"\u5173\u95ED\u4F1A\u8BDD","Choose how to close":"\u9009\u62E9\u5173\u95ED\u65B9\u5F0F","Tmux session keeps running in background":"Tmux \u4F1A\u8BDD\u7EE7\u7EED\u5728\u540E\u53F0\u8FD0\u884C","Terminate the session completely":"\u5F7B\u5E95\u7EC8\u6B62\u4F1A\u8BDD","Cancel close session":"\u53D6\u6D88\u5173\u95ED\u4F1A\u8BDD","Case Name":"\u6848\u4F8B\u540D\u79F0","Folder Path":"\u6587\u4EF6\u5939\u8DEF\u5F84","Default Working Directory":"\u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55","Default directory for new sessions.":"\u65B0\u4F1A\u8BDD\u7684\u9ED8\u8BA4\u76EE\u5F55\u3002","Default CLAUDE.md Template":"\u9ED8\u8BA4 CLAUDE.md \u6A21\u677F","Used when creating new cases. Leave empty for built-in template.":"\u521B\u5EFA\u65B0\u6848\u4F8B\u65F6\u4F7F\u7528\uFF1B\u7559\u7A7A\u5219\u4F7F\u7528\u5185\u7F6E\u6A21\u677F\u3002","Remote Path":"\u8FDC\u7A0B\u8DEF\u5F84","SSH Host/IP":"SSH \u4E3B\u673A/IP","SSH Username":"SSH \u7528\u6237\u540D","SSH Port":"SSH \u7AEF\u53E3","Identity File":"\u8EAB\u4EFD\u6587\u4EF6","Jump Host":"\u8DF3\u677F\u4E3B\u673A","Advanced SSH":"\u9AD8\u7EA7 SSH","Discover existing sessions":"\u53D1\u73B0\u73B0\u6709\u4F1A\u8BDD","Workspace Path":"\u5DE5\u4F5C\u533A\u8DEF\u5F84","Container settings (optional, sensible defaults)":"\u5BB9\u5668\u8BBE\u7F6E\uFF08\u53EF\u9009\uFF0C\u9ED8\u8BA4\u503C\u5408\u7406\uFF09",Template:"\u6A21\u677F",Network:"\u7F51\u7EDC",CPUs:"CPU \u6570",Memory:"\u5185\u5B58",GPUs:"GPU","Cron Jobs":"\u5B9A\u65F6\u4EFB\u52A1","+ New Job":"+ \u65B0\u5EFA\u4EFB\u52A1","New Cron Job":"\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1",Schedule:"\u8BA1\u5212","Schedule Type":"\u8BA1\u5212\u7C7B\u578B",Once:"\u4E00\u6B21",Interval:"\u95F4\u9694",Daily:"\u6BCF\u5929",Weekly:"\u6BCF\u5468","Run At":"\u8FD0\u884C\u65F6\u95F4","Every (minutes)":"\u6BCF\u9694\uFF08\u5206\u949F\uFF09",Weekdays:"\u5DE5\u4F5C\u65E5","Times use the server's local timezone.":"\u65F6\u95F4\u4F7F\u7528\u670D\u52A1\u5668\u672C\u5730\u65F6\u533A\u3002","All Events":"\u5168\u90E8\u4E8B\u4EF6",Created:"\u5DF2\u521B\u5EFA",Started:"\u5DF2\u542F\u52A8",Exit:"\u9000\u51FA",Deleted:"\u5DF2\u5220\u9664",Recovered:"\u5DF2\u6062\u590D","Stale Cleaned":"\u5DF2\u6E05\u7406\u8FC7\u671F\u9879","Mux Died":"Mux \u5DF2\u7EC8\u6B62","Server Started":"\u670D\u52A1\u5668\u5DF2\u542F\u52A8","Server Stopped":"\u670D\u52A1\u5668\u5DF2\u505C\u6B62",Extra:"\u9644\u52A0\u4FE1\u606F","Token Usage Statistics":"Token \u4F7F\u7528\u7EDF\u8BA1","Daily Breakdown":"\u6BCF\u65E5\u660E\u7EC6","Export JSON":"\u5BFC\u51FA JSON","Export MD":"\u5BFC\u51FA Markdown","Settings saved":"\u8BBE\u7F6E\u5DF2\u4FDD\u5B58","Settings saved locally":"\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\u5230\u672C\u673A","Tunnel active":"\u96A7\u9053\u5DF2\u542F\u7528","Tunnel starting \u2014 QR code will appear when ready...":"\u96A7\u9053\u6B63\u5728\u542F\u52A8\uFF0C\u51C6\u5907\u597D\u540E\u5C06\u663E\u793A\u4E8C\u7EF4\u7801\u2026","Push notifications enabled":"\u63A8\u9001\u901A\u77E5\u5DF2\u542F\u7528","Push notifications disabled":"\u63A8\u9001\u901A\u77E5\u5DF2\u7981\u7528","Permission Required":"\u9700\u8981\u6388\u6743","Waiting for Input":"\u7B49\u5F85\u8F93\u5165","Question Asked":"Claude \u6B63\u5728\u63D0\u95EE","Response Complete":"\u56DE\u590D\u5B8C\u6210","Task Completed":"\u4EFB\u52A1\u5DF2\u5B8C\u6210","Teammate Idle":"\u961F\u53CB\u7A7A\u95F2","Session Error":"\u4F1A\u8BDD\u9519\u8BEF","Respawn Blocked":"\u91CD\u751F\u5DF2\u963B\u6B62","Task Complete":"\u4EFB\u52A1\u5B8C\u6210","Copied to clipboard":"\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F","Failed to copy":"\u590D\u5236\u5931\u8D25","Checking\u2026":"\u6B63\u5728\u68C0\u67E5\u2026","Starting\u2026":"\u6B63\u5728\u542F\u52A8\u2026","Starting update\u2026":"\u6B63\u5728\u5F00\u59CB\u66F4\u65B0\u2026","Queued\u2026":"\u5DF2\u6392\u961F\u2026","Preparing\u2026":"\u6B63\u5728\u51C6\u5907\u2026","Stashing local changes\u2026":"\u6B63\u5728\u6682\u5B58\u672C\u5730\u66F4\u6539\u2026","Fetching release\u2026":"\u6B63\u5728\u83B7\u53D6\u53D1\u884C\u7248\u2026","Checking out release\u2026":"\u6B63\u5728\u68C0\u51FA\u53D1\u884C\u7248\u2026","Installing dependencies\u2026":"\u6B63\u5728\u5B89\u88C5\u4F9D\u8D56\u2026","Building\u2026":"\u6B63\u5728\u6784\u5EFA\u2026","Restarting Codeman\u2026":"\u6B63\u5728\u91CD\u542F {name}\u2026","Try again":"\u91CD\u8BD5","Could not check for updates. Try again later.":"\u65E0\u6CD5\u68C0\u67E5\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","The previous version is still running.":"\u5148\u524D\u7248\u672C\u4ECD\u5728\u8FD0\u884C\u3002","Advanced Options":"\u9AD8\u7EA7\u9009\u9879","Advanced container settings":"\u9AD8\u7EA7\u5BB9\u5668\u8BBE\u7F6E",Basics:"\u57FA\u672C\u8BBE\u7F6E",Behavior:"\u884C\u4E3A",Alerts:"\u63D0\u9192",Limits:"\u9650\u5236",Paths:"\u8DEF\u5F84",Notes:"\u5907\u6CE8",Context:"\u4E0A\u4E0B\u6587",Duration:"\u6301\u7EED\u65F6\u95F4",Iterations:"\u8FED\u4EE3\u6B21\u6570",Elapsed:"\u5DF2\u7528\u65F6\u95F4",Launch:"\u542F\u52A8","Launch Command":"\u542F\u52A8\u547D\u4EE4","Background Agents":"\u540E\u53F0\u667A\u80FD\u4F53","Background Tasks":"\u540E\u53F0\u4EFB\u52A1",Tasks:"\u4EFB\u52A1","Explore Tasks":"\u63A2\u7D22\u4EFB\u52A1","Implement Tasks":"\u5B9E\u73B0\u4EFB\u52A1","Test Tasks":"\u6D4B\u8BD5\u4EFB\u52A1","Review Tasks":"\u5BA1\u67E5\u4EFB\u52A1","Agent Type":"\u667A\u80FD\u4F53\u7C7B\u578B","Implementation Plan":"\u5B9E\u65BD\u8BA1\u5212",Plan:"\u8BA1\u5212","Plan:":"\u8BA1\u5212\uFF1A","Plan Usage Limits":"\u5957\u9910\u4F7F\u7528\u9650\u5236","Plan Wizard Agents":"\u8BA1\u5212\u5411\u5BFC\u667A\u80FD\u4F53","Fix Plan Menu":"\u4FEE\u590D\u8BA1\u5212\u83DC\u5355","View Fix Plan":"\u67E5\u770B\u4FEE\u590D\u8BA1\u5212","Regenerate Plan":"\u91CD\u65B0\u751F\u6210\u8BA1\u5212","Cancel plan generation":"\u53D6\u6D88\u751F\u6210\u8BA1\u5212","Describe your task below. Claude will generate an implementation plan with testing steps.":"\u8BF7\u5728\u4E0B\u65B9\u63CF\u8FF0\u4EFB\u52A1\uFF0CClaude \u5C06\u751F\u6210\u5305\u542B\u6D4B\u8BD5\u6B65\u9AA4\u7684\u5B9E\u65BD\u8BA1\u5212\u3002","What do you want to build?":"\u4F60\u60F3\u6784\u5EFA\u4EC0\u4E48\uFF1F","A brief description...":"\u7B80\u8981\u63CF\u8FF0\u2026",Describe:"\u63CF\u8FF0",Enhanced:"\u589E\u5F3A","Enhanced: parallel subagents + verification (slower but more thorough)":"\u589E\u5F3A\uFF1A\u5E76\u884C\u5B50\u667A\u80FD\u4F53 + \u9A8C\u8BC1\uFF08\u901F\u5EA6\u8F83\u6162\uFF0C\u4F46\u66F4\u5168\u9762\uFF09",Standard:"\u6807\u51C6","Single-pass generation with Opus 4.5":"\u4F7F\u7528 Opus 4.5 \u5355\u8F6E\u751F\u6210","Initializing deep reasoning model":"\u6B63\u5728\u521D\u59CB\u5316\u6DF1\u5EA6\u63A8\u7406\u6A21\u578B","Starting Opus 4.5...":"\u6B63\u5728\u542F\u52A8 Opus 4.5\u2026","Auto-launch when plan completes":"\u8BA1\u5212\u5B8C\u6210\u540E\u81EA\u52A8\u542F\u52A8","Auto-accept prompts":"\u81EA\u52A8\u63A5\u53D7\u63D0\u793A","Presses Enter for plan approvals and default question options":"\u5BF9\u8BA1\u5212\u5BA1\u6279\u548C\u9ED8\u8BA4\u95EE\u9898\u9009\u9879\u81EA\u52A8\u6309 Enter","Auto-accepts, auto-clears, agent completions":"\u81EA\u52A8\u63A5\u53D7\u3001\u81EA\u52A8\u6E05\u7406\u548C\u667A\u80FD\u4F53\u5B8C\u6210\u63D0\u9192","Or click Run to start":"\u6216\u70B9\u51FB\u201C\u8FD0\u884C\u201D\u5F00\u59CB","to edit your task, or":"\u4EE5\u7F16\u8F91\u4EFB\u52A1\uFF0C\u6216","to continue without a plan":"\u4EE5\u4E0D\u4F7F\u7528\u8BA1\u5212\u76F4\u63A5\u7EE7\u7EED",Respawn:"\u91CD\u751F","Respawn loop":"\u91CD\u751F\u5FAA\u73AF","Enable Respawn":"\u542F\u7528\u91CD\u751F","Stop Respawn":"\u505C\u6B62\u91CD\u751F","Auto-resume when usage limit resets":"\u4F7F\u7528\u9650\u5236\u91CD\u7F6E\u540E\u81EA\u52A8\u7EE7\u7EED","Auto-restart sessions when context fills up (usually not needed)":"\u4E0A\u4E0B\u6587\u5DF2\u6EE1\u65F6\u81EA\u52A8\u91CD\u542F\u4F1A\u8BDD\uFF08\u901A\u5E38\u4E0D\u9700\u8981\uFF09","Auto-Compact":"\u81EA\u52A8\u538B\u7F29","Auto-Clear":"\u81EA\u52A8\u6E05\u7A7A","Token Management":"Token \u7BA1\u7406","Use 1M token context window":"\u4F7F\u7528 100 \u4E07 Token \u4E0A\u4E0B\u6587\u7A97\u53E3","Use 1M token context window for new sessions":"\u65B0\u4F1A\u8BDD\u4F7F\u7528 100 \u4E07 Token \u4E0A\u4E0B\u6587\u7A97\u53E3","Full context reset at threshold (use higher than compact)":"\u8FBE\u5230\u9608\u503C\u65F6\u5B8C\u5168\u91CD\u7F6E\u4E0A\u4E0B\u6587\uFF08\u9608\u503C\u5E94\u9AD8\u4E8E\u538B\u7F29\u9608\u503C\uFF09","Idle Threshold":"\u7A7A\u95F2\u9608\u503C","Max Iterations":"\u6700\u5927\u8FED\u4EE3\u6B21\u6570","Max Iterations:":"\u6700\u5927\u8FED\u4EE3\u6B21\u6570\uFF1A","Max Todos":"\u6700\u5927\u5F85\u529E\u6570","Todo Expiration":"\u5F85\u529E\u8FC7\u671F\u65F6\u95F4","Completion Phrase":"\u5B8C\u6210\u77ED\u8BED","Completion Phrase:":"\u5B8C\u6210\u77ED\u8BED\uFF1A","Phrase Claude outputs when loop is complete (without <promise> tags)":"\u5FAA\u73AF\u5B8C\u6210\u65F6 Claude \u8F93\u51FA\u7684\u77ED\u8BED\uFF08\u4E0D\u542B <promise> \u6807\u7B7E\uFF09","Prompt to send when idle":"\u7A7A\u95F2\u65F6\u53D1\u9001\u7684\u63D0\u793A\u8BCD","Prompt to send into the session":"\u53D1\u9001\u5230\u4F1A\u8BDD\u7684\u63D0\u793A\u8BCD","Prompt Source":"\u63D0\u793A\u8BCD\u6765\u6E90","Prompt File Path":"\u63D0\u793A\u8BCD\u6587\u4EF6\u8DEF\u5F84","Prompt file path":"\u63D0\u793A\u8BCD\u6587\u4EF6\u8DEF\u5F84","Prompt Preview":"\u63D0\u793A\u8BCD\u9884\u89C8","Load Preset":"\u52A0\u8F7D\u9884\u8BBE",Presets:"\u9884\u8BBE","Apply preset":"\u5E94\u7528\u9884\u8BBE","Save Preset":"\u4FDD\u5B58\u9884\u8BBE","Save Respawn Preset":"\u4FDD\u5B58\u91CD\u751F\u9884\u8BBE","Save current config as preset":"\u5C06\u5F53\u524D\u914D\u7F6E\u4FDD\u5B58\u4E3A\u9884\u8BBE","Preset Name":"\u9884\u8BBE\u540D\u79F0","Description (optional)":"\u63CF\u8FF0\uFF08\u53EF\u9009\uFF09","When to use this preset":"\u6B64\u9884\u8BBE\u7684\u9002\u7528\u573A\u666F","Start Loop":"\u542F\u52A8\u5FAA\u73AF","Start Ralph Loop":"\u542F\u52A8 Ralph \u5FAA\u73AF","Start Ralph Loop \u2192":"\u542F\u52A8 Ralph \u5FAA\u73AF \u2192","Enable Tracker":"\u542F\u7528\u8DDF\u8E2A\u5668","Ralph / Todo":"Ralph / \u5F85\u529E","Ralph / Todo Tracker":"Ralph / \u5F85\u529E\u8DDF\u8E2A\u5668","Cycle Steps":"\u5FAA\u73AF\u6B65\u9AA4","1. Update Prompt":"1. \u66F4\u65B0\u63D0\u793A\u8BCD","2. Send /clear":"2. \u53D1\u9001 /clear","3. Send /init":"3. \u53D1\u9001 /init","4. Kickstart Prompt":"4. \u542F\u52A8\u63D0\u793A\u8BCD","Sent only when /init completes but Claude stays idle \xB7 Auto-accept presses Enter for plan approvals and default options":"\u4EC5\u5728 /init \u5B8C\u6210\u540E Claude \u4ECD\u7A7A\u95F2\u65F6\u53D1\u9001\uFF1B\u81EA\u52A8\u63A5\u53D7\u4F1A\u5BF9\u8BA1\u5212\u5BA1\u6279\u548C\u9ED8\u8BA4\u9009\u9879\u6309 Enter","One autonomous work cycle: whenever Claude goes idle, Codeman sends the update prompt, optionally runs /clear + /init, and kickstarts the next round \u2014 repeating for the chosen duration. All settings below belong to this loop; configure them, then press Enable.":"\u4E00\u4E2A\u81EA\u4E3B\u5DE5\u4F5C\u5FAA\u73AF\uFF1AClaude \u6BCF\u6B21\u7A7A\u95F2\u65F6\uFF0C{name}\u90FD\u4F1A\u53D1\u9001\u66F4\u65B0\u63D0\u793A\u8BCD\uFF0C\u53EF\u9009\u6267\u884C /clear + /init\uFF0C\u5E76\u542F\u52A8\u4E0B\u4E00\u8F6E\uFF0C\u6301\u7EED\u5230\u8BBE\u5B9A\u65F6\u957F\u3002\u4E0B\u65B9\u8BBE\u7F6E\u5747\u5C5E\u4E8E\u6B64\u5FAA\u73AF\uFF1B\u914D\u7F6E\u540E\u70B9\u51FB\u201C\u542F\u7528\u201D\u3002",'If Claude pauses on a usage limit ("limit reached \xB7 resets 3pm"), Codeman waits for the reset time and automatically continues the work. Independent of the respawn loop below.':"\u5982\u679C Claude \u56E0\u4F7F\u7528\u9650\u5236\u6682\u505C\uFF08\u201Climit reached \xB7 resets 3pm\u201D\uFF09\uFF0C{name}\u4F1A\u7B49\u5F85\u9650\u5236\u91CD\u7F6E\u5E76\u81EA\u52A8\u7EE7\u7EED\u5DE5\u4F5C\u3002\u6B64\u529F\u80FD\u72EC\u7ACB\u4E8E\u4E0B\u65B9\u7684\u91CD\u751F\u5FAA\u73AF\u3002","Search sessions, events, files\u2026":"\u641C\u7D22\u4F1A\u8BDD\u3001\u4E8B\u4EF6\u548C\u6587\u4EF6\u2026","Search across sessions":"\u8DE8\u4F1A\u8BDD\u641C\u7D22","Filter by case":"\u6309\u6848\u4F8B\u7B5B\u9009","Filter by date range":"\u6309\u65E5\u671F\u8303\u56F4\u7B5B\u9009","Filter by session status":"\u6309\u4F1A\u8BDD\u72B6\u6001\u7B5B\u9009","Filter files...":"\u7B5B\u9009\u6587\u4EF6\u2026","Any status":"\u4EFB\u610F\u72B6\u6001","Any time":"\u4EFB\u610F\u65F6\u95F4","Last hour":"\u6700\u8FD1\u4E00\u5C0F\u65F6","Last 7 Days":"\u6700\u8FD1 7 \u5929","Past 24h":"\u8FC7\u53BB 24 \u5C0F\u65F6","Past 7 days":"\u8FC7\u53BB 7 \u5929","Past 30 days":"\u8FC7\u53BB 30 \u5929","Since last visit":"\u81EA\u4E0A\u6B21\u8BBF\u95EE\u4EE5\u6765",Since:"\u5F00\u59CB\u65F6\u95F4",Until:"\u7ED3\u675F\u65F6\u95F4","Away digest range":"\u79BB\u5F00\u671F\u95F4\u6458\u8981\u8303\u56F4","Open the digest to load recent activity":"\u6253\u5F00\u6458\u8981\u4EE5\u52A0\u8F7D\u6700\u8FD1\u6D3B\u52A8","Refresh away digest":"\u5237\u65B0\u79BB\u5F00\u671F\u95F4\u6458\u8981","Refresh summary":"\u5237\u65B0\u6458\u8981","Select a session to view files":"\u9009\u62E9\u4F1A\u8BDD\u4EE5\u67E5\u770B\u6587\u4EF6","Select a session to view summary":"\u9009\u62E9\u4F1A\u8BDD\u4EE5\u67E5\u770B\u6458\u8981","Select an agent to view details":"\u9009\u62E9\u667A\u80FD\u4F53\u4EE5\u67E5\u770B\u8BE6\u60C5","Select a run to view its agents":"\u9009\u62E9\u4E00\u6B21\u8FD0\u884C\u4EE5\u67E5\u770B\u5176\u667A\u80FD\u4F53","Source type filter":"\u6765\u6E90\u7C7B\u578B\u7B5B\u9009","Copy content":"\u590D\u5236\u5185\u5BB9","Edit file":"\u7F16\u8F91\u6587\u4EF6","Unsaved changes":"\u672A\u4FDD\u5B58\u7684\u66F4\u6539",Saved:"\u5DF2\u4FDD\u5B58","Export as JSON":"\u5BFC\u51FA\u4E3A JSON","Export as Markdown":"\u5BFC\u51FA\u4E3A Markdown","Mark all read":"\u5168\u90E8\u6807\u4E3A\u5DF2\u8BFB","Clear search":"\u6E05\u9664\u641C\u7D22","Clear all tracked subagents":"\u6E05\u9664\u6240\u6709\u5DF2\u8DDF\u8E2A\u7684\u5B50\u667A\u80FD\u4F53","Kill All Sessions":"\u7EC8\u6B62\u6240\u6709\u4F1A\u8BDD","Kill all sessions and their tmux processes":"\u7EC8\u6B62\u6240\u6709\u4F1A\u8BDD\u53CA\u5176 tmux \u8FDB\u7A0B","Kill All Claude + Tmux":"\u7EC8\u6B62\u5168\u90E8 Claude + Tmux","Kill Tmux & Claude Code":"\u7EC8\u6B62 Tmux \u4E0E Claude Code","Terminate everything completely":"\u5F7B\u5E95\u7EC8\u6B62\u6240\u6709\u5185\u5BB9","Tmux Sessions":"Tmux \u4F1A\u8BDD","Tmux sessions keep running in background":"Tmux \u4F1A\u8BDD\u7EE7\u7EED\u5728\u540E\u53F0\u8FD0\u884C","Refresh tmux sessions":"\u5237\u65B0 Tmux \u4F1A\u8BDD","Restore Terminal Size":"\u6062\u590D\u7EC8\u7AEF\u5927\u5C0F","Clear Terminal":"\u6E05\u7A7A\u7EC8\u7AEF","Stop current run":"\u505C\u6B62\u5F53\u524D\u8FD0\u884C","Stop respawn":"\u505C\u6B62\u91CD\u751F","Stop (Ctrl+C)":"\u505C\u6B62\uFF08Ctrl+C\uFF09",Case:"\u6848\u4F8B","Case:":"\u6848\u4F8B\uFF1A","Case settings":"\u6848\u4F8B\u8BBE\u7F6E","Create New":"\u65B0\u5EFA","Auto (directory name)":"\u81EA\u52A8\uFF08\u76EE\u5F55\u540D\uFF09","Custom name shown in the tab (right-click tab to rename inline)":"\u6807\u7B7E\u9875\u4E2D\u663E\u793A\u7684\u81EA\u5B9A\u4E49\u540D\u79F0\uFF08\u53F3\u952E\u6807\u7B7E\u53EF\u76F4\u63A5\u91CD\u547D\u540D\uFF09","Name to identify this case in Codeman":"\u7528\u4E8E\u5728{name}\u4E2D\u6807\u8BC6\u6B64\u6848\u4F8B\u7684\u540D\u79F0","Name to identify this remote case in Codeman":"\u7528\u4E8E\u5728{name}\u4E2D\u6807\u8BC6\u6B64\u8FDC\u7A0B\u6848\u4F8B\u7684\u540D\u79F0","Absolute path on the remote host. Codeman will not create or delete it.":"\u8FDC\u7A0B\u4E3B\u673A\u4E0A\u7684\u7EDD\u5BF9\u8DEF\u5F84\uFF1B{name}\u4E0D\u4F1A\u521B\u5EFA\u6216\u5220\u9664\u8BE5\u76EE\u5F55\u3002","Absolute path to an existing project folder, e.g. /home/you/my-project":"\u73B0\u6709\u9879\u76EE\u6587\u4EF6\u5939\u7684\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4F8B\u5982 /home/you/my-project","Letters, numbers, hyphens, underscores only. Created in ~/codeman-cases/":"\u4EC5\u5141\u8BB8\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\u548C\u4E0B\u5212\u7EBF\uFF1B\u5C06\u5728 ~/codeman-cases/ \u4E2D\u521B\u5EFA\u3002","Docker exports":"Docker \u5BFC\u51FA","No exports yet. Export a docker case from its tab.":"\u6682\u65E0\u5BFC\u51FA\uFF1B\u8BF7\u4ECE Docker \u6848\u4F8B\u6807\u7B7E\u9875\u5BFC\u51FA\u3002","Runs inside an isolated container. Multiple sessions can share the same container.":"\u5728\u9694\u79BB\u5BB9\u5668\u5185\u8FD0\u884C\uFF1B\u591A\u4E2A\u4F1A\u8BDD\u53EF\u4EE5\u5171\u4EAB\u540C\u4E00\u5BB9\u5668\u3002","Runs this case in a hardened, isolated container. The base image is built automatically on first use. Docker/Podman must be installed.":"\u5728\u52A0\u56FA\u7684\u9694\u79BB\u5BB9\u5668\u4E2D\u8FD0\u884C\u6B64\u6848\u4F8B\u3002\u9996\u6B21\u4F7F\u7528\u65F6\u4F1A\u81EA\u52A8\u6784\u5EFA\u57FA\u7840\u955C\u50CF\uFF1B\u5FC5\u987B\u5B89\u88C5 Docker/Podman\u3002","Run in an isolated Docker container":"\u5728\u9694\u79BB\u7684 Docker \u5BB9\u5668\u4E2D\u8FD0\u884C","Absolute HOST directory, bind-mounted into the container. Codeman scaffolds CLAUDE.md + hooks into it.":"\u7ED1\u5B9A\u6302\u8F7D\u5230\u5BB9\u5668\u4E2D\u7684\u4E3B\u673A\u7EDD\u5BF9\u76EE\u5F55\uFF1B{name}\u4F1A\u5728\u5176\u4E2D\u751F\u6210 CLAUDE.md \u548C hooks\u3002","A reusable docker host profile. Reuse the same ID across cases to share settings.":"\u53EF\u590D\u7528\u7684 Docker \u4E3B\u673A\u914D\u7F6E\uFF1B\u591A\u4E2A\u6848\u4F8B\u4F7F\u7528\u540C\u4E00 ID \u53EF\u5171\u4EAB\u8BBE\u7F6E\u3002","Mount host credentials (~/.claude etc.)":"\u6302\u8F7D\u4E3B\u673A\u51ED\u636E\uFF08~/.claude \u7B49\uFF09","On: your existing login just works (creds stay on the host, never in exports). Off: sealed sandbox, log in inside the container.":"\u5F00\u542F\uFF1A\u76F4\u63A5\u4F7F\u7528\u73B0\u6709\u767B\u5F55\uFF08\u51ED\u636E\u4FDD\u7559\u5728\u4E3B\u673A\u4E14\u4E0D\u4F1A\u8FDB\u5165\u5BFC\u51FA\uFF09\uFF1B\u5173\u95ED\uFF1A\u4F7F\u7528\u5BC6\u5C01\u6C99\u7BB1\uFF0C\u9700\u8981\u5728\u5BB9\u5668\u5185\u767B\u5F55\u3002","Disk is elastic: storage grows automatically as data flows in (no fixed cap).":"\u78C1\u76D8\u4E3A\u5F39\u6027\u5BB9\u91CF\uFF1A\u4F1A\u968F\u6570\u636E\u81EA\u52A8\u589E\u957F\uFF08\u65E0\u56FA\u5B9A\u4E0A\u9650\uFF09\u3002","Needs the NVIDIA container toolkit on the host.":"\u4E3B\u673A\u9700\u8981\u5B89\u88C5 NVIDIA Container Toolkit\u3002","GPU \u2014 8 GB RAM, 4 CPU, all GPUs":"GPU \u2014 8 GB \u5185\u5B58\u30014 CPU\u3001\u5168\u90E8 GPU","Large \u2014 8 GB RAM, 4 CPU":"\u5927\u578B \u2014 8 GB \u5185\u5B58\u30014 CPU","Medium \u2014 4 GB RAM, 2 CPU (default)":"\u4E2D\u578B \u2014 4 GB \u5185\u5B58\u30012 CPU\uFF08\u9ED8\u8BA4\uFF09","Small \u2014 2 GB RAM, 1 CPU":"\u5C0F\u578B \u2014 2 GB \u5185\u5B58\u30011 CPU","bridge (internet on, default)":"\u6865\u63A5\uFF08\u53EF\u8054\u7F51\uFF0C\u9ED8\u8BA4\uFF09","bridge (internet on)":"\u6865\u63A5\uFF08\u53EF\u8054\u7F51\uFF09","none (fully isolated, no network)":"\u65E0\uFF08\u5B8C\u5168\u9694\u79BB\uFF0C\u4E0D\u8054\u7F51\uFF09","none (fully isolated)":"\u65E0\uFF08\u5B8C\u5168\u9694\u79BB\uFF09","Resume last conversation on relaunch":"\u91CD\u65B0\u542F\u52A8\u65F6\u7EE7\u7EED\u6700\u8FD1\u4E00\u6B21\u5BF9\u8BDD","Extra -o Options":"\u9644\u52A0 -o \u9009\u9879","SOCKS Proxy":"SOCKS \u4EE3\u7406","Host ID":"\u4E3B\u673A ID","Optional. Leave blank for the default port 22.":"\u53EF\u9009\uFF1B\u7559\u7A7A\u4F7F\u7528\u9ED8\u8BA4\u7AEF\u53E3 22\u3002","Optional. Path to a private key on this machine (passed to ssh -i). Never the key contents.":"\u53EF\u9009\uFF1B\u672C\u673A\u79C1\u94A5\u6587\u4EF6\u8DEF\u5F84\uFF08\u4F20\u7ED9 ssh -i\uFF09\uFF0C\u8BF7\u52FF\u586B\u5199\u5BC6\u94A5\u5185\u5BB9\u3002","Optional. [user@]host[:port] for ssh -J (jump/bastion host).":"\u53EF\u9009\uFF1Bssh -J \u4F7F\u7528\u7684 [user@]host[:port]\uFF08\u8DF3\u677F\u673A\uFF09\u3002","Optional. One KEY=VALUE per line; each becomes an ssh -o option.":"\u53EF\u9009\uFF1B\u6BCF\u884C\u4E00\u4E2A KEY=VALUE\uFF0C\u6BCF\u9879\u90FD\u4F1A\u6210\u4E3A ssh -o \u9009\u9879\u3002","Use the GPU-accelerated WebGL terminal renderer (desktop only). Turn off to force the DOM renderer if you hit GPU glitches. Codeman also auto-falls-back to the DOM renderer after repeated GPU stalls.":"\u4F7F\u7528 GPU \u52A0\u901F\u7684 WebGL \u7EC8\u7AEF\u6E32\u67D3\u5668\uFF08\u4EC5\u684C\u9762\u7AEF\uFF09\u3002\u5982\u9047 GPU \u663E\u793A\u95EE\u9898\uFF0C\u53EF\u5173\u95ED\u4EE5\u5F3A\u5236\u4F7F\u7528 DOM \u6E32\u67D3\u5668\uFF1B\u591A\u6B21 GPU \u5361\u987F\u540E{name}\u4E5F\u4F1A\u81EA\u52A8\u56DE\u9000\u3002","Show A-/A+ font size buttons in header":"\u5728\u9876\u90E8\u680F\u663E\u793A A-/A+ \u5B57\u4F53\u5927\u5C0F\u6309\u94AE","Show Claude plan usage limits (5-hour & weekly) in the header. Applies to newly created sessions.":"\u5728\u9876\u90E8\u680F\u663E\u793A Claude \u5957\u9910\u4F7F\u7528\u9650\u5236\uFF085 \u5C0F\u65F6\u548C\u6BCF\u5468\uFF09\uFF1B\u9002\u7528\u4E8E\u65B0\u5EFA\u4F1A\u8BDD\u3002","Show ultracode / Workflow runs as a master-detail tab (tasks on the left, agents with tokens + tool calls on the right)":"\u4EE5\u4E3B\u4ECE\u6807\u7B7E\u9875\u663E\u793A Ultracode / Workflow \u8FD0\u884C\uFF08\u5DE6\u4FA7\u4EFB\u52A1\uFF0C\u53F3\u4FA7\u667A\u80FD\u4F53 Token \u4E0E\u5DE5\u5177\u8C03\u7528\uFF09","Pop a floating window for each active ultracode / Workflow run, connected by a line to its session tab (additional to the Ultracode Agents panel)":"\u4E3A\u6BCF\u4E2A\u6D3B\u52A8\u7684 Ultracode / Workflow \u8FD0\u884C\u5F39\u51FA\u6D6E\u52A8\u7A97\u53E3\uFF0C\u5E76\u7528\u8FDE\u7EBF\u8FDE\u63A5\u5230\u5176\u4F1A\u8BDD\u6807\u7B7E\u9875","Shows typed characters instantly via overlay while forwarding keystrokes to the server in the background. Enables Tab completion, preserves input across tab switches, and protects against session crashes. Recommended for mobile and high-latency connections.":"\u901A\u8FC7\u8986\u76D6\u5C42\u5373\u65F6\u663E\u793A\u8F93\u5165\uFF0C\u540C\u65F6\u5728\u540E\u53F0\u628A\u6309\u952E\u8F6C\u53D1\u5230\u670D\u52A1\u5668\u3002\u652F\u6301 Tab \u8865\u5168\u3001\u5207\u6362\u6807\u7B7E\u65F6\u4FDD\u7559\u8F93\u5165\u5E76\u9632\u6B62\u4F1A\u8BDD\u5D29\u6E83\u4E22\u5B57\uFF1B\u63A8\u8350\u79FB\u52A8\u7AEF\u548C\u9AD8\u5EF6\u8FDF\u8FDE\u63A5\u4F7F\u7528\u3002","Show a dedicated input field below the terminal for CJK (Chinese/Japanese/Korean) IME composition. Recommended for mobile devices with Chinese input methods where xterm's native input handling may drop characters.":"\u5728\u7EC8\u7AEF\u4E0B\u65B9\u663E\u793A\u4E2D\u65E5\u97E9\u8F93\u5165\u6CD5\u4E13\u7528\u6587\u672C\u6846\u3002\u63A8\u8350\u5728\u53EF\u80FD\u56E0 xterm \u539F\u751F\u8F93\u5165\u800C\u4E22\u5B57\u7684\u79FB\u52A8\u7AEF\u4E2D\u6587\u8F93\u5165\u6CD5\u4E2D\u4F7F\u7528\u3002","Show additional buttons (Tab, Shift+Tab, Ctrl+O, Esc, Alt+Enter, left/right arrows) in the mobile keyboard accessory bar.":"\u5728\u79FB\u52A8\u7AEF\u952E\u76D8\u5DE5\u5177\u680F\u663E\u793A\u9644\u52A0\u6309\u952E\uFF08Tab\u3001Shift+Tab\u3001Ctrl+O\u3001Esc\u3001Alt+Enter\u3001\u5DE6\u53F3\u65B9\u5411\u952E\uFF09\u3002","Scroll local history (when mouse passthrough is active)":"\u6EDA\u52A8\u672C\u5730\u5386\u53F2\uFF08\u9F20\u6807\u76F4\u901A\u542F\u7528\u65F6\uFF09","Plain wheel/trackpad pages the terminal scrollback":"\u4F7F\u7528\u666E\u901A\u6EDA\u8F6E/\u89E6\u63A7\u677F\u7FFB\u9605\u7EC8\u7AEF\u5386\u53F2","Camera hand-tracking overlay (applied on reload)":"\u6444\u50CF\u5934\u624B\u52BF\u8DDF\u8E2A\u8986\u76D6\u5C42\uFF08\u91CD\u65B0\u52A0\u8F7D\u540E\u751F\u6548\uFF09","Enable the camera hand-tracking gesture overlay (applied on reload). The instance must run with CODEMAN_GESTURE=1.":"\u542F\u7528\u6444\u50CF\u5934\u624B\u52BF\u8DDF\u8E2A\u8986\u76D6\u5C42\uFF08\u91CD\u65B0\u52A0\u8F7D\u540E\u751F\u6548\uFF09\uFF1B\u5B9E\u4F8B\u5FC5\u987B\u4EE5 CODEMAN_GESTURE=1 \u8FD0\u884C\u3002","How Claude CLI is started in screen sessions. Auto Mode runs without routine prompts behind a background safety classifier (needs Claude Code 2.1.207+ and Opus 4.6+/Sonnet 4.6+/Fable 5)":"\u8BBE\u7F6E Claude CLI \u5728\u4F1A\u8BDD\u4E2D\u7684\u542F\u52A8\u65B9\u5F0F\u3002\u81EA\u52A8\u6A21\u5F0F\u7531\u540E\u53F0\u5B89\u5168\u5206\u7C7B\u5668\u4FDD\u62A4\uFF0C\u65E0\u9700\u5E38\u89C4\u786E\u8BA4\uFF08\u9700\u8981 Claude Code 2.1.207+ \u548C Opus 4.6+/Sonnet 4.6+/Fable 5\uFF09\u3002","Auto-enable for new sessions (otherwise auto-enables on Ralph pattern detection)":"\u4E3A\u65B0\u4F1A\u8BDD\u81EA\u52A8\u542F\u7528\uFF08\u5426\u5219\u68C0\u6D4B\u5230 Ralph \u6A21\u5F0F\u65F6\u81EA\u52A8\u542F\u7528\uFF09","Enable experimental Agent Teams for all new Claude sessions (disabled by default)":"\u4E3A\u6240\u6709\u65B0 Claude \u4F1A\u8BDD\u542F\u7528\u5B9E\u9A8C\u6027\u667A\u80FD\u4F53\u56E2\u961F\uFF08\u9ED8\u8BA4\u5173\u95ED\uFF09","Automatically re-establish remote (SSH) sessions when the connection drops, reattaching to the durable remote tmux session (on by default; bounded backoff)":"\u8FDE\u63A5\u65AD\u5F00\u65F6\u81EA\u52A8\u91CD\u5EFA\u8FDC\u7A0B SSH \u4F1A\u8BDD\uFF0C\u5E76\u91CD\u65B0\u9644\u52A0\u5230\u6301\u4E45\u5316\u8FDC\u7A0B tmux \u4F1A\u8BDD\uFF08\u9ED8\u8BA4\u5F00\u542F\uFF0C\u6709\u9650\u9000\u907F\uFF09","Default effort for new Claude sessions \u2014 soft default, switchable anytime in-session via /effort (e.g. /effort ultracode)":"\u65B0 Claude \u4F1A\u8BDD\u7684\u9ED8\u8BA4\u601D\u8003\u5F3A\u5EA6\uFF1B\u8FD9\u662F\u8F6F\u9ED8\u8BA4\u503C\uFF0C\u53EF\u968F\u65F6\u5728\u4F1A\u8BDD\u4E2D\u901A\u8FC7 /effort \u5207\u6362\u3002","Lower priority of Claude sessions (reduces system impact, only affects new sessions)":"\u964D\u4F4E Claude \u4F1A\u8BDD\u7684\u8FDB\u7A0B\u4F18\u5148\u7EA7\uFF08\u51CF\u5C11\u7CFB\u7EDF\u5F71\u54CD\uFF0C\u4EC5\u5F71\u54CD\u65B0\u4F1A\u8BDD\uFF09","Process priority (-20 to 19, higher = lower priority, default: 10)":"\u8FDB\u7A0B\u4F18\u5148\u7EA7\uFF08-20 \u5230 19\uFF1B\u6570\u503C\u8D8A\u5927\u4F18\u5148\u7EA7\u8D8A\u4F4E\uFF1B\u9ED8\u8BA4 10\uFF09","Start new Codex sessions with --dangerously-bypass-approvals-and-sandbox":"\u4F7F\u7528 --dangerously-bypass-approvals-and-sandbox \u542F\u52A8\u65B0\u7684 Codex \u4F1A\u8BDD","Model used for execution tasks. Optimizer suggestions are advisory only.":"\u6267\u884C\u4EFB\u52A1\u4F7F\u7528\u7684\u6A21\u578B\uFF1B\u4F18\u5316\u5668\u5EFA\u8BAE\u4EC5\u4F9B\u53C2\u8003\u3002","Show what the optimizer recommends (doesn't override your choice)":"\u663E\u793A\u4F18\u5316\u5668\u5EFA\u8BAE\uFF08\u4E0D\u4F1A\u8986\u76D6\u4F60\u7684\u9009\u62E9\uFF09",'Optionally set specific models for each task type. Leave as "Use Default" to use your default model.':"\u53EF\u4E3A\u6BCF\u79CD\u4EFB\u52A1\u7C7B\u578B\u6307\u5B9A\u6A21\u578B\uFF1B\u4FDD\u7559\u201C\u4F7F\u7528\u9ED8\u8BA4\u503C\u201D\u5373\u53EF\u4F7F\u7528\u9ED8\u8BA4\u6A21\u578B\u3002","Request browser notification permission":"\u8BF7\u6C42\u6D4F\u89C8\u5668\u901A\u77E5\u6743\u9650","Show OS-level notifications when tab is hidden":"\u6807\u7B7E\u9875\u9690\u85CF\u65F6\u663E\u793A\u7CFB\u7EDF\u7EA7\u901A\u77E5","OS-level push notifications \u2014 works even when tab is closed":"\u7CFB\u7EDF\u7EA7\u63A8\u9001\u901A\u77E5\uFF0C\u5373\u4F7F\u6807\u7B7E\u9875\u5173\u95ED\u4E5F\u53EF\u63A5\u6536","Play a short beep for critical events":"\u4E25\u91CD\u4E8B\u4EF6\u53D1\u751F\u65F6\u64AD\u653E\u77ED\u63D0\u793A\u97F3","Completions, budget warnings, stuck sessions":"\u5B8C\u6210\u63D0\u9192\u3001\u9884\u7B97\u8B66\u544A\u548C\u4F1A\u8BDD\u5361\u4F4F\u63D0\u9192","Errors, crashes, agent failures":"\u9519\u8BEF\u3001\u5D29\u6E83\u548C\u667A\u80FD\u4F53\u5931\u8D25","Notify when a session is idle longer than this":"\u4F1A\u8BDD\u7A7A\u95F2\u8D85\u8FC7\u6B64\u65F6\u957F\u65F6\u901A\u77E5","Stored locally only, never sent to server. Get a key at":"\u4EC5\u5B58\u50A8\u5728\u672C\u673A\uFF0C\u7EDD\u4E0D\u4F1A\u53D1\u9001\u5230\u670D\u52A1\u5668\u3002\u53EF\u5728\u6B64\u83B7\u53D6\u5BC6\u94A5\uFF1A","Comma-separated terms to boost recognition accuracy":"\u4EE5\u9017\u53F7\u5206\u9694\u53EF\u63D0\u9AD8\u8BC6\u522B\u51C6\u786E\u7387\u7684\u672F\u8BED","Start voice input":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","Voice input":"\u8BED\u97F3\u8F93\u5165","Voice input (Ctrl+Shift+V)":"\u8BED\u97F3\u8F93\u5165\uFF08Ctrl+Shift+V\uFF09","Insert Newline":"\u63D2\u5165\u6362\u884C","Close Panels":"\u5173\u95ED\u9762\u677F","Previous / Next Session":"\u4E0A\u4E00\u4E2A / \u4E0B\u4E00\u4E2A\u4F1A\u8BDD","Next Session":"\u4E0B\u4E00\u4E2A\u4F1A\u8BDD","Switch to Tab N":"\u5207\u6362\u5230\u7B2C N \u4E2A\u6807\u7B7E\u9875","Move Active Tab Left":"\u5411\u5DE6\u79FB\u52A8\u5F53\u524D\u6807\u7B7E\u9875","Move Active Tab Right":"\u5411\u53F3\u79FB\u52A8\u5F53\u524D\u6807\u7B7E\u9875","Focus First Tab":"\u805A\u7126\u7B2C\u4E00\u4E2A\u6807\u7B7E\u9875","Focus Last Tab":"\u805A\u7126\u6700\u540E\u4E00\u4E2A\u6807\u7B7E\u9875","Focus Next Tab":"\u805A\u7126\u4E0B\u4E00\u4E2A\u6807\u7B7E\u9875","Focus Previous Tab":"\u805A\u7126\u4E0A\u4E00\u4E2A\u6807\u7B7E\u9875","Activate Focused Tab":"\u6FC0\u6D3B\u805A\u7126\u7684\u6807\u7B7E\u9875","Remove Tab":"\u79FB\u9664\u6807\u7B7E\u9875","Remove All Tabs":"\u79FB\u9664\u6240\u6709\u6807\u7B7E\u9875","Use arrows to reorder. Changes are saved automatically.":"\u4F7F\u7528\u65B9\u5411\u952E\u91CD\u65B0\u6392\u5E8F\uFF1B\u66F4\u6539\u4F1A\u81EA\u52A8\u4FDD\u5B58\u3002"}),y=new Map(Object.entries(m).map(([e,t])=>[e.toLocaleLowerCase("en"),t])),S=new WeakMap,b=new WeakMap;let r=f(s.__codemanLanguage),i=c,h=null,p=!1;function f(e){return O.has(e)?e:"en"}function T(e){if(typeof e!="string")return c;const t=e.normalize("NFC").replace(/[\u0000-\u001f\u007f]/g,"").trim();return t?Array.from(t).slice(0,40).join(""):c}function k(e,t){return e.replace(/\{([a-zA-Z][\w]*)\}/g,(a,n)=>String(t[n]??""))}function L(e){const t=[[/^(\d+) tokens?$/,(n,o)=>`${o} \u4E2A Token`],[/^(\d+) sessions?$/,(n,o)=>`${o} \u4E2A\u4F1A\u8BDD`],[/^(\d+) tasks?$/,(n,o)=>`${o} \u4E2A\u4EFB\u52A1`],[/^(\d+) running$/,(n,o)=>`${o} \u4E2A\u8FD0\u884C\u4E2D`],[/^(\d+) active$/,(n,o)=>`${o} \u4E2A\u6D3B\u52A8`],[/^Show (\d+) more$/,(n,o)=>`\u518D\u663E\u793A ${o} \u9879`],[/^Show (\d+) more \((\d+) remaining\)$/,(n,o,l)=>`\u518D\u663E\u793A ${o} \u9879\uFF08\u5269\u4F59 ${l} \u9879\uFF09`],[/^Lifetime: (\d+) sessions created$/,(n,o)=>`\u7D2F\u8BA1\u5DF2\u521B\u5EFA ${o} \u4E2A\u4F1A\u8BDD`],[/^Tunnel active: (.+)$/,(n,o)=>`\u96A7\u9053\u5DF2\u542F\u7528\uFF1A${o}`],[/^Tunnel error: (.+)$/,(n,o)=>`\u96A7\u9053\u9519\u8BEF\uFF1A${o}`],[/^Update to v(.+)$/,(n,o)=>`\u66F4\u65B0\u5230 v${o}`],[/^You're up to date \(v(.+)\)\.$/,(n,o)=>`\u5DF2\u662F\u6700\u65B0\u7248\u672C\uFF08v${o}\uFF09\u3002`],[/^Update available: v(.+)$/,(n,o)=>`\u6709\u53EF\u7528\u66F4\u65B0\uFF1Av${o}`],[/^Selected: (.+)$/,(n,o)=>`\u5DF2\u9009\u62E9\uFF1A${o}`],[/^Failed to (.+)$/,(n,o)=>`\u64CD\u4F5C\u5931\u8D25\uFF1A${o}`]];for(const[n,o]of t){const l=e.match(n);if(l)return o(...l)}const a=e.match(/^(Open|Close|Show|Hide|Enable|Disable|Start|Stop|Refresh|Save|Cancel|Clear|Select|View|Export|Import|Remove|Kill|Toggle|Increase|Decrease) (.+)$/i);if(a){const n={open:"\u6253\u5F00",close:"\u5173\u95ED",show:"\u663E\u793A",hide:"\u9690\u85CF",enable:"\u542F\u7528",disable:"\u7981\u7528",start:"\u542F\u52A8",stop:"\u505C\u6B62",refresh:"\u5237\u65B0",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",clear:"\u6E05\u9664",select:"\u9009\u62E9",view:"\u67E5\u770B",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",remove:"\u79FB\u9664",kill:"\u7EC8\u6B62",toggle:"\u5207\u6362",increase:"\u589E\u5927",decrease:"\u51CF\u5C0F"}[a[1].toLowerCase()],o=m[a[2]]||y.get(a[2].toLocaleLowerCase("en"));if(n&&o)return`${n}${o}`}return null}function g(e){return!e||i===c?e:e.replace(/Codeman/g,i).replace(/codeman(?=:)/g,i)}function d(e,t={}){if(typeof e!="string"||!e)return e;const a={name:i,...t};if(r==="zh-CN"){const n=m[e]||y.get(e.toLocaleLowerCase("en"))||L(e);if(n)return g(k(n,a))}return g(k(e,a))}function v(e){const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;return!t||!!t.closest(x)}function U(e){const t=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;return v(e)||!!t?.closest(D)}function M(e,t){const a=e.match(/^\s*/)?.[0]||"",n=e.match(/\s*$/)?.[0]||"";return a+t+n}function E(e){let t=S.get(e);if(U(e)||!t&&!/[A-Za-z]/.test(e.nodeValue||""))return;(!t||e.nodeValue!==t.applied)&&(t={source:e.nodeValue,applied:e.nodeValue});const a=t.source.trim();if(!a)return;const n=M(t.source,d(a));t.applied=n,S.set(e,t),e.nodeValue!==n&&(e.nodeValue=n)}function w(e){if(v(e)||e.matches(".history-item[title]"))return;let t=b.get(e);t||(t=new Map);for(const a of C){if(!e.hasAttribute(a))continue;const n=e.getAttribute(a)||"";let o=t.get(a);(!o||n!==o.applied)&&(o={source:n,applied:n});const l=d(o.source);o.applied=l,t.set(a,o),n!==l&&e.setAttribute(a,l)}b.set(e,t)}function u(e){if(!(!e||p)){p=!0;try{if(e.nodeType===Node.TEXT_NODE){E(e);return}if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)return;e.nodeType===Node.ELEMENT_NODE&&w(e);const t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(let a=t.nextNode();a;a=t.nextNode())a.nodeType===Node.TEXT_NODE?E(a):w(a)}finally{p=!1}}}function A(){const e=document.title||"",t=document.documentElement.dataset.i18nTitleSource||e;document.documentElement.dataset.i18nTitleSource=t,document.title=g(t)}function I(e={}){const t=i;if(r=f(e.language??r),i=T(e.displayName??i),s.__codemanLanguage=r,s.__codemanDisplayName=i,document.documentElement.lang=r,document.documentElement.dataset.language=r,t!==i){const a=document.documentElement.dataset.i18nTitleSource||document.title||"";t!==c&&a.includes(t)&&(document.documentElement.dataset.i18nTitleSource=a.replaceAll(t,i))}return u(document.body),A(),{language:r,displayName:i}}function N(){u(document.body),A(),!h&&(h=new MutationObserver(e=>{if(!p)for(const t of e){t.type==="characterData"&&u(t.target),t.type==="attributes"&&w(t.target);for(const a of t.addedNodes)u(a)}}),h.observe(document.body,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:C}))}const _=Object.freeze({t:d,configure:I,start:N,translateNode:u,normalizeDisplayName:T,normalizeLanguage:f,get language(){return r},get displayName(){return i}});s.CodemanI18n=_,s.codemanT=d;const P=typeof s.confirm=="function"?s.confirm.bind(s):null,R=typeof s.alert=="function"?s.alert.bind(s):null;P&&(s.confirm=e=>P(d(String(e)))),R&&(s.alert=e=>R(d(String(e)))),document.addEventListener("DOMContentLoaded",N,{once:!0})})(window);
@@ -16,7 +16,7 @@
16
16
  <link rel="manifest" href="manifest.json">
17
17
  <title>Codeman</title>
18
18
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2360a5fa'/%3E%3Cstop offset='100%25' stop-color='%233b82f6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='32' height='32' rx='6' fill='%230a0a0a'/%3E%3Cpath d='M18 4L8 18h6l-2 10 10-14h-6z' fill='url(%23g)'/%3E%3C/svg%3E">
19
- <link rel="stylesheet" href="styles.50cd52bd.css">
19
+ <link rel="stylesheet" href="styles.b10e5edd.css">
20
20
  <link rel="stylesheet" href="mobile.32cacde5.css" media="(max-width: 1023px)">
21
21
  <!-- xterm.css loaded async — terminal won't display until xterm.js runs anyway -->
22
22
  <link rel="preload" href="vendor/xterm.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
@@ -25,7 +25,7 @@
25
25
  instead of waiting until <script> tags at bottom-of-body are reached. -->
26
26
  <link rel="preload" href="vendor/xterm.min.js" as="script">
27
27
  <link rel="preload" href="constants.e7175b95.js" as="script">
28
- <link rel="preload" href="app.2e9ffd31.js" as="script">
28
+ <link rel="preload" href="app.b24f795e.js" as="script">
29
29
  <!-- Self-hosted xterm.js — eliminates CDN DNS/TLS latency (~100ms).
30
30
  'defer' preserves execution order (xterm loads before fit addon). -->
31
31
  <script defer src="vendor/xterm.min.js"></script>
@@ -1480,6 +1480,13 @@
1480
1480
  <span class="slider"></span>
1481
1481
  </label>
1482
1482
  </div>
1483
+ <div class="settings-item" title="Show the open-in-new-window (pop-out) button when hovering a session tab">
1484
+ <span class="settings-item-label">Pop-out Button on Tabs</span>
1485
+ <label class="switch switch-sm">
1486
+ <input type="checkbox" id="appSettingsShowTabDetachButton">
1487
+ <span class="slider"></span>
1488
+ </label>
1489
+ </div>
1483
1490
 
1484
1491
  <!-- Panels Section -->
1485
1492
  <div class="settings-section-header">Panels</div>
@@ -2661,7 +2668,7 @@
2661
2668
  </svg>
2662
2669
 
2663
2670
  <script defer src="constants.e7175b95.js"></script>
2664
- <script defer src="i18n.0fbea500.js"></script>
2671
+ <script defer src="i18n.da34cfaf.js"></script>
2665
2672
  <script defer src="mobile-handlers.32fdd57f.js"></script>
2666
2673
  <script defer src="voice-input.085e9e73.js"></script>
2667
2674
  <script defer src="notification-manager.5d229063.js"></script>
@@ -2669,13 +2676,13 @@
2669
2676
  <script defer src="input-cjk.63794d0b.js"></script>
2670
2677
  <!-- Hardened markdown HTML sanitizer (wires DOMPurify). Must precede app.js. -->
2671
2678
  <script defer src="sanitize-html.bc7078d6.js"></script>
2672
- <script defer src="app.2e9ffd31.js"></script>
2679
+ <script defer src="app.b24f795e.js"></script>
2673
2680
  <script defer src="terminal-ui.78c71f3a.js"></script>
2674
2681
  <script defer src="respawn-ui.ff0dae4c.js"></script>
2675
2682
  <script defer src="ralph-panel.6de2d0f8.js"></script>
2676
2683
  <script defer src="orchestrator-panel.js"></script>
2677
2684
  <script defer src="cron-ui.js"></script>
2678
- <script defer src="settings-ui.01a1ae7d.js"></script>
2685
+ <script defer src="settings-ui.ea63d5db.js"></script>
2679
2686
  <script defer src="panels-ui.1d4203e0.js"></script>
2680
2687
  <script defer src="ultracode-panel.js"></script>
2681
2688
  <script defer src="admin-ui.js"></script>
Binary file
Binary file
@@ -0,0 +1,67 @@
1
+ "use strict";Object.assign(CodemanApp.prototype,{_onHookIdlePrompt(e){e.sessionId&&this.setPendingHook(e.sessionId,"idle_prompt"),this._notifySession(e.sessionId,"warning","hook-idle","Waiting for Input",e.message||"Claude is idle and waiting for a prompt")},_onHookPermissionPrompt(e){e.sessionId&&this.setPendingHook(e.sessionId,"permission_prompt");const t=e.tool?`${e.tool}${e.command?": "+e.command:e.file?": "+e.file:""}`:"";this._notifySession(e.sessionId,"critical","hook-permission","Permission Required",t||"Claude needs tool approval to continue")},_onHookElicitationDialog(e){e.sessionId&&this.setPendingHook(e.sessionId,"elicitation_dialog"),this._notifySession(e.sessionId,"critical","hook-elicitation","Question Asked",e.question||"Claude is asking a question and waiting for your answer")},_onHookStop(e){e.sessionId&&this.clearPendingHooks(e.sessionId),this._notifySession(e.sessionId,"info","hook-stop","Response Complete",e.reason||"Claude has finished responding")},_onHookTeammateIdle(e){const t=this.sessions.get(e.sessionId);this._notifySession(e.sessionId,"warning","hook-teammate-idle","Teammate Idle",`A teammate is idle in ${t?.name||e.sessionId}`)},_onHookTaskCompleted(e){const t=this.sessions.get(e.sessionId);this._notifySession(e.sessionId,"info","hook-task-completed","Task Completed",`A team task completed in ${t?.name||e.sessionId}`)},_onTunnelStarted(e){console.log("[Tunnel] Started:",e.url),this._tunnelUrl=e.url,this._dismissTunnelConnecting(),this._updateTunnelUrlDisplay(e.url),this._updateTunnelIndicator(!0),document.getElementById("welcomeOverlay")?.classList.contains("visible")?(this._updateWelcomeTunnelBtn(!0,e.url,!0),this.showToast("Tunnel active","success")):(this._updateWelcomeTunnelBtn(!0,e.url),this.showToast(`Tunnel active: ${e.url}`,"success"),this.showTunnelQR())},_onTunnelStopped(){console.log("[Tunnel] Stopped"),this._tunnelUrl=null,this._dismissTunnelConnecting(),this._updateTunnelUrlDisplay(null),this._updateWelcomeTunnelBtn(!1),this._updateTunnelIndicator(!1),this.closeTunnelPanel(),this.closeTunnelQR()},_onTunnelProgress(e){console.log("[Tunnel] Progress:",e.message);const t=document.getElementById("tunnelConnectingToast");t&&(t.innerHTML=`<span class="tunnel-spinner"></span> ${e.message}`);const n=document.getElementById("welcomeTunnelBtn");n?.classList.contains("connecting")&&(n.innerHTML=`<span class="tunnel-spinner"></span> ${e.message}`)},_onTunnelError(e){console.warn("[Tunnel] Error:",e.message),this._dismissTunnelConnecting(),this.showToast(`Tunnel error: ${e.message}`,"error");const t=document.getElementById("welcomeTunnelBtn");t&&(t.disabled=!1,t.classList.remove("connecting"))},_onTunnelQrRotated(e){if(e.svg){const t=document.getElementById("tunnelQrContainer");t&&(t.innerHTML=e.svg);const n=document.getElementById("welcomeQrInner");n&&(n.innerHTML=e.svg)}else this._refreshTunnelQrFromApi();this._resetQrCountdown()},_onTunnelQrRegenerated(e){if(e.svg){const t=document.getElementById("tunnelQrContainer");t&&(t.innerHTML=e.svg);const n=document.getElementById("welcomeQrInner");n&&(n.innerHTML=e.svg)}else this._refreshTunnelQrFromApi();this._resetQrCountdown()},_onTunnelQrAuthUsed(e){const n=(e.ua||"Unknown device").match(/Chrome|Firefox|Safari|Edge|Mobile/)?.[0]||"Browser";this.showToast(`Device authenticated via QR (${n}, ${e.ip}). Not you?`,"warning",{duration:1e4,action:{label:"Revoke All",onClick:()=>{fetch("/api/auth/revoke",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(()=>this.showToast("All sessions revoked","success")).catch(()=>this.showToast("Failed to revoke sessions","error"))}}})},registerServiceWorker(){"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(e=>{this._swRegistration=e,navigator.serviceWorker.addEventListener("message",t=>{if(t.data?.type==="notification-click"){const{sessionId:n}=t.data;n&&this.sessions.has(n)&&this.selectSession(n),window.focus()}}),e.pushManager.getSubscription().then(t=>{t&&(this._pushSubscription=t,this._updatePushUI(!0))})}).catch(()=>{})},async subscribeToPush(){if(!this._swRegistration){this.showToast("Service worker not available. HTTPS or localhost required.","error");return}try{const e=await this._apiJson("/api/push/vapid-key");if(!e)throw new Error("Failed to get VAPID key");const t=urlBase64ToUint8Array(e.publicKey),n=await this._swRegistration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),s=n.toJSON(),o=await this._apiJson("/api/push/subscribe",{method:"POST",body:{endpoint:s.endpoint,keys:s.keys,userAgent:navigator.userAgent,pushPreferences:this._buildPushPreferences()}});if(!o)throw new Error("Failed to register subscription");this._pushSubscription=n,this._pushSubscriptionId=o.id,localStorage.setItem("codeman-push-subscription-id",o.id),this._updatePushUI(!0),this.showToast("Push notifications enabled","success")}catch(e){this.showToast("Push subscription failed: "+(e.message||e),"error")}},async unsubscribeFromPush(){try{this._pushSubscription&&await this._pushSubscription.unsubscribe();const e=this._pushSubscriptionId||localStorage.getItem("codeman-push-subscription-id");e&&await fetch(`/api/push/subscribe/${e}`,{method:"DELETE"}).catch(()=>{}),this._pushSubscription=null,this._pushSubscriptionId=null,localStorage.removeItem("codeman-push-subscription-id"),this._updatePushUI(!1),this.showToast("Push notifications disabled","success")}catch(e){this.showToast("Failed to unsubscribe: "+(e.message||e),"error")}},async togglePushSubscription(){this._pushSubscription?await this.unsubscribeFromPush():await this.subscribeToPush()},async _syncPushPreferences(){const e=this._pushSubscriptionId||localStorage.getItem("codeman-push-subscription-id");if(e)try{await fetch(`/api/push/subscribe/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pushPreferences:this._buildPushPreferences()})})}catch{}},_buildPushPreferences(){const e={},t={"hook:permission_prompt":"eventPermissionPush","hook:elicitation_dialog":"eventQuestionPush","hook:idle_prompt":"eventIdlePush","hook:stop":"eventStopPush","respawn:blocked":"eventRespawnPush","session:ralphCompletionDetected":"eventRalphPush"};for(const[n,s]of Object.entries(t)){const o=document.getElementById(s);e[n]=o?o.checked:!0}return e["session:error"]=!0,e},_updatePushUI(e){const t=document.getElementById("pushSubscribeBtn"),n=document.getElementById("pushSubscriptionStatus");t&&(t.textContent=e?"Unsubscribe":"Subscribe"),n&&(n.textContent=e?"active":"off",n.classList.remove("granted","denied"),e&&n.classList.add("granted"))},openAppSettings(){const e=this.loadAppSettingsFromStorage();document.getElementById("appSettingsDisplayName").value=e.displayName||"Codeman",document.getElementById("appSettingsLanguage").value=e.language==="zh-CN"?"zh-CN":"en",document.getElementById("appSettingsClaudeMdPath").value=e.defaultClaudeMdPath||"",document.getElementById("appSettingsDefaultDir").value=e.defaultWorkingDir||"";const t=this.getDefaultSettings();document.getElementById("appSettingsRalphEnabled").checked=e.ralphTrackerEnabled??t.ralphTrackerEnabled??!1,document.getElementById("appSettingsShowFontControls").checked=e.showFontControls??t.showFontControls??!1,document.getElementById("appSettingsShowSystemStats").checked=e.showSystemStats??t.showSystemStats??!0,document.getElementById("appSettingsShowLifecycleLog").checked=e.showLifecycleLog??t.showLifecycleLog??!1,document.getElementById("appSettingsShowResponseViewer").checked=e.showResponseViewer??t.showResponseViewer??!1,document.getElementById("appSettingsShowFileViewerButton").checked=e.showFileViewerButton??t.showFileViewerButton??!0,document.getElementById("appSettingsShowAttachmentsButton").checked=e.showAttachmentsButton??t.showAttachmentsButton??!1,document.getElementById("appSettingsSkin").value=e.skin??t.skin??"daylight-blue",this._syncEntranceAnimSetting?.(),document.getElementById("appSettingsWebglRenderer").checked=e.webglRendererEnabled??t.webglRendererEnabled??!0;const n=document.getElementById("appSettingsWebglRendererItem");n&&(n.style.display=MobileDetection.getDeviceType()==="desktop"?"":"none"),document.getElementById("appSettingsShowMonitor").checked=e.showMonitor??t.showMonitor??!1,document.getElementById("appSettingsShowProjectInsights").checked=e.showProjectInsights??t.showProjectInsights??!1,document.getElementById("appSettingsShowFileBrowser").checked=e.showFileBrowser??t.showFileBrowser??!1,document.getElementById("appSettingsShowSubagents").checked=e.showSubagents??t.showSubagents??!1,document.getElementById("appSettingsShowUltracodeAgents").checked=e.showUltracodeAgents??t.showUltracodeAgents??!1,document.getElementById("appSettingsUltracodeFloatingWindows").checked=e.ultracodeFloatingWindows??t.ultracodeFloatingWindows??!1,document.getElementById("appSettingsShowMultiMonitorButton").checked=e.showMultiMonitorButton??t.showMultiMonitorButton??!1,document.getElementById("appSettingsShowPlanUsageLimits").checked=this.planUsageChipEnabled(e),document.getElementById("appSettingsShowRedrawButton").checked=e.showRedrawButton??t.showRedrawButton??!1,document.getElementById("appSettingsMobileOverview").checked=e.mobileOverviewEnabled??t.mobileOverviewEnabled??!1;const s=MobileDetection.getDeviceType()==="mobile"?"":"none",o=document.getElementById("appSettingsMobileOverviewItem");o&&(o.style.display=s);const a=document.getElementById("appSettingsPhoneSection");a&&(a.style.display=s),document.getElementById("appSettingsShowSessionButton").checked=e.showSessionButton??t.showSessionButton??!1,document.getElementById("appSettingsShowAwayDigestButton").checked=e.showAwayDigestButton??t.showAwayDigestButton??!1,document.getElementById("appSettingsShowCronButton").checked=e.showCronButton??t.showCronButton??!1;const i=document.getElementById("appSettingsGestureControlItem");i&&(i.style.display=window.__codemanGestureAvailable?"":"none"),document.getElementById("appSettingsGestureControl").checked=e.gestureControlEnabled??t.gestureControlEnabled??!1,document.getElementById("appSettingsSubagentTracking").checked=e.subagentTrackingEnabled??t.subagentTrackingEnabled??!0,document.getElementById("appSettingsSubagentActiveTabOnly").checked=e.subagentActiveTabOnly??t.subagentActiveTabOnly??!0,document.getElementById("appSettingsImageWatcherEnabled").checked=e.imageWatcherEnabled??t.imageWatcherEnabled??!1,document.getElementById("appSettingsTunnelEnabled").checked=e.tunnelEnabled??!1,this.loadTunnelStatus(),document.getElementById("appSettingsLocalEcho").checked=e.localEchoEnabled??MobileDetection.isTouchDevice(),document.getElementById("appSettingsTerminalWheelLocal").checked=e.terminalWheelLocalScrollback??t.terminalWheelLocalScrollback??!1,document.getElementById("appSettingsCjkInput").checked=e.cjkInputEnabled??t.cjkInputEnabled??!1,document.getElementById("appSettingsExtendedKeyboardBar").checked=e.extendedKeyboardBar??!1,document.getElementById("appSettingsTabTwoRows").checked=e.tabTwoRows??t.tabTwoRows??!1,document.getElementById("appSettingsShowTabDetachButton").checked=e.showTabDetachButton??t.showTabDetachButton??!1;const l=document.getElementById("appSettingsClaudeMode"),r=document.getElementById("allowedToolsRow");l.value=e.claudeMode||"dangerously-skip-permissions",document.getElementById("appSettingsAllowedTools").value=e.allowedTools||"",r.style.display=l.value==="allowedTools"?"":"none",l.onchange=()=>{r.style.display=l.value==="allowedTools"?"":"none"},document.getElementById("appSettingsCodexDangerouslyBypassApprovals").checked=e.codexDangerouslyBypassApprovals??!1,document.getElementById("appSettingsCodexAnimations").checked=e.codexAnimationsEnabled??!1,this._applyCodexSettingsVisibility(),document.getElementById("appSettingsAgentTeams").checked=e.agentTeamsEnabled??!1,document.getElementById("appSettingsClaudeModel").value=e.claudeModel??"",document.getElementById("appSettingsOpusContext1m").checked=e.opusContext1mEnabled??!1,document.getElementById("appSettingsRemoteAutoReconnect").checked=e.remoteAutoReconnect??!0,document.getElementById("appSettingsThinkingEffort").value=e.thinkingEffort??"";const d=e.nice||{};document.getElementById("appSettingsNiceEnabled").checked=d.enabled??!1,document.getElementById("appSettingsNiceValue").value=d.niceValue??10,this.loadModelConfigForSettings();const c=this.notificationManager?.preferences||{};document.getElementById("appSettingsNotifEnabled").checked=c.enabled??!0,document.getElementById("appSettingsNotifBrowser").checked=c.browserNotifications??!1,document.getElementById("appSettingsNotifAudio").checked=c.audioAlerts??!1,document.getElementById("appSettingsNotifStuckMins").value=Math.round((c.stuckThresholdMs||6e5)/6e4),document.getElementById("appSettingsNotifCritical").checked=!c.muteCritical,document.getElementById("appSettingsNotifWarning").checked=!c.muteWarning,document.getElementById("appSettingsNotifInfo").checked=!c.muteInfo,document.getElementById("appSettingsPushEnabled").checked=!!this._pushSubscription,this._updatePushUI(!!this._pushSubscription);const u=c.eventTypes||{},p=u.permission_prompt||{};document.getElementById("eventPermissionEnabled").checked=p.enabled??!0,document.getElementById("eventPermissionBrowser").checked=p.browser??!0,document.getElementById("eventPermissionPush").checked=p.push??!1,document.getElementById("eventPermissionAudio").checked=p.audio??!0;const h=u.elicitation_dialog||{};document.getElementById("eventQuestionEnabled").checked=h.enabled??!0,document.getElementById("eventQuestionBrowser").checked=h.browser??!0,document.getElementById("eventQuestionPush").checked=h.push??!1,document.getElementById("eventQuestionAudio").checked=h.audio??!0;const b=u.idle_prompt||{};document.getElementById("eventIdleEnabled").checked=b.enabled??!0,document.getElementById("eventIdleBrowser").checked=b.browser??!0,document.getElementById("eventIdlePush").checked=b.push??!1,document.getElementById("eventIdleAudio").checked=b.audio??!1;const y=u.stop||{};document.getElementById("eventStopEnabled").checked=y.enabled??!1,document.getElementById("eventStopBrowser").checked=y.browser??!1,document.getElementById("eventStopPush").checked=y.push??!1,document.getElementById("eventStopAudio").checked=y.audio??!1;const S=u.respawn_cycle||{};document.getElementById("eventRespawnEnabled").checked=S.enabled??!0,document.getElementById("eventRespawnBrowser").checked=S.browser??!1,document.getElementById("eventRespawnPush").checked=S.push??!1,document.getElementById("eventRespawnAudio").checked=S.audio??!1;const f=u.ralph_complete||{};document.getElementById("eventRalphEnabled").checked=f.enabled??!0,document.getElementById("eventRalphBrowser").checked=f.browser??!0,document.getElementById("eventRalphPush").checked=f.push??!1,document.getElementById("eventRalphAudio").checked=f.audio??!0;const v=u.subagent_spawn||{};document.getElementById("eventSubagentEnabled").checked=v.enabled??!1,document.getElementById("eventSubagentBrowser").checked=v.browser??!1,document.getElementById("eventSubagentPush").checked=v.push??!1,document.getElementById("eventSubagentAudio").checked=v.audio??!1;const m=document.getElementById("notifPermissionStatus");if(m&&typeof Notification<"u"){const g=Notification.permission;m.textContent=g==="granted"?"\u2713":g==="denied"?"\u2717":"?",m.classList.remove("granted","denied"),g==="granted"?m.classList.add("granted"):g==="denied"&&m.classList.add("denied")}const E=VoiceInput._getDeepgramConfig();document.getElementById("voiceDeepgramKey").value=E.apiKey||"",document.getElementById("voiceLanguage").value=E.language||"en-US",document.getElementById("voiceKeyterms").value=E.keyterms||"refactor, endpoint, middleware, callback, async, regex, TypeScript, npm, API, deploy, config, linter, env, webhook, schema, CLI, JSON, CSS, DOM, SSE, backend, frontend, localhost, dependencies, repository, merge, rebase, diff, commit, com",document.getElementById("voiceInsertMode").value=E.insertMode||"direct";const I=document.getElementById("voiceDeepgramKey");I.type="password",document.getElementById("voiceKeyToggleBtn").textContent="Show";const B=VoiceInput.getActiveProviderName(),w=document.getElementById("voiceProviderStatus");w.textContent=B,w.className="voice-provider-status"+(B.startsWith("Deepgram")?" active":""),this._initUpdatesSection(),this.switchSettingsTab("settings-display");const T=document.getElementById("appSettingsModal");T.querySelectorAll(".modal-tabs .modal-tab-btn").forEach(g=>{g.onclick=()=>this.switchSettingsTab(g.dataset.tab)}),T.classList.add("active"),this.activeFocusTrap=new FocusTrap(T),this.activeFocusTrap.activate()},_applyCodexSettingsVisibility(){const e=document.querySelector('#appSettingsModal .modal-tab-btn[data-tab="settings-codex"]');e&&(e.style.display=window.__codemanCliAvailable?.codex===!0?"":"none")},switchSettingsTab(e){const t=document.getElementById("appSettingsModal");t.querySelectorAll(".modal-tabs .modal-tab-btn").forEach(n=>{n.classList.toggle("active",n.dataset.tab===e)}),t.querySelectorAll(".modal-tab-content").forEach(n=>{n.classList.toggle("hidden",n.id!==e)}),e==="settings-shortcuts"&&this.renderShortcutSettingsList?.()},closeAppSettings(){document.getElementById("appSettingsModal").classList.remove("active"),this.activeFocusTrap&&(this.activeFocusTrap.deactivate(),this.activeFocusTrap=null)},_updatePhaseText(e){return{queued:"Queued\u2026",preparing:"Preparing\u2026",stashing:"Stashing local changes\u2026",fetching:"Fetching release\u2026",checkout:"Checking out release\u2026",installing:"Installing dependencies\u2026",building:"Building\u2026",restarting:"Restarting Codeman\u2026"}[e]||e},_initUpdatesSection(){const e=this.$("updateCurrentVersion");e&&(e.textContent=(this.$("versionDisplay")?.textContent||"").trim()||"\u2014");for(const t of["updateResult","updateActionRow","updateNotes","updateProgress"]){const n=this.$(t);n&&(n.style.display="none")}this._updateCheck=null},_setUpdateResult(e){const t=this.$("updateResult");t&&(t.style.display="block",t.innerHTML=e)},_setUpdateProgress(e){const t=this.$("updateProgress");t&&(t.style.display="block",t.innerHTML=e)},async checkForUpdate(){const e=this.$("updateCheckBtn");e&&(e.disabled=!0,e.textContent="Checking\u2026");const t=await this._apiJson("/api/system/update/check");e&&(e.disabled=!1,e.textContent="Check now");const n=this.$("updateActionRow"),s=this.$("updateNotes");if(n&&(n.style.display="none"),s&&(s.style.display="none"),!t){this._setUpdateResult("Could not check for updates. Try again later.");return}this._updateCheck=t;const o=this.$("updateCurrentVersion");if(o&&t.currentVersion&&(o.textContent=`v${t.currentVersion}`),t.installKind&&t.installKind!=="git"){this._setUpdateResult(`This install can't update itself (${escapeHtml(t.installKind)}). Update with <code>npm i -g aicodeman@latest</code>.`);return}if(t.selfUpdateEnabled===!1){this._setUpdateResult("In-app updates are disabled on this server (CODEMAN_DISABLE_SELF_UPDATE=1).");return}if(t.error&&!t.updateAvailable){this._setUpdateResult(escapeHtml(t.error));return}if(t.updateAvailable&&t.latestVersion){this._setUpdateResult(`Update available: <strong>v${escapeHtml(t.latestVersion)}</strong> &nbsp;(current v${escapeHtml(t.currentVersion||"")})`);const a=this.$("updateActionLabel");a&&(a.textContent=`Update to v${t.latestVersion}`),n&&(n.style.display="flex");const i=this.$("updateNowBtn");i&&(i.disabled=!1,i.textContent="Update now"),s&&t.notes&&(s.style.display="block",s.textContent=t.notes)}else this._setUpdateResult(`You're up to date (v${escapeHtml(t.currentVersion||"")}).`)},async startSelfUpdate(){const e=this._updateCheck?.latestVersion?`v${this._updateCheck.latestVersion}`:"the latest release";if(!confirm(`Update Codeman to ${e}? The server will restart and this page will reload.`))return;const t=this.$("updateNowBtn");t&&(t.disabled=!0,t.textContent="Starting\u2026");const n=await this._apiPost("/api/system/update",{});if(!n||!n.ok){let a="Failed to start the update.";try{const i=await n.json();typeof i?.error=="string"&&i.error&&(a=i.error)}catch{}this._setUpdateProgress(`<span style="color:var(--danger,#e5534b)">${escapeHtml(a)}</span>`),t&&(t.disabled=!1,t.textContent="Update now");return}const s=this.$("updateActionRow");s&&(s.style.display="none");const o=this.$("updateNotes");o&&(o.style.display="none"),this._setUpdateProgress("Starting update\u2026"),this._pollUpdateStatus()},_stopUpdatePolling(){this._updatePollTimer&&(clearInterval(this._updatePollTimer),this._updatePollTimer=null)},_pollUpdateStatus(){this._stopUpdatePolling();const e=new Set(["completed","completed-needs-manual-restart","failed","idle"]),t=async()=>{let n=null;try{const s=await fetch("/api/system/update/status");if(s.ok){const o=await s.json();n=o&&o.success===!0?o.data:o}}catch{}if(!n){this._setUpdateProgress("\u21BB Restarting Codeman\u2026");return}if(!e.has(n.phase)){const s=n.message&&n.message.trim()?n.message.trim():this._updatePhaseText(n.phase);let o="";n.startedAt&&(o=` <span style="color:var(--text-secondary)">\xB7 ${Math.max(0,Math.round((Date.now()-n.startedAt)/1e3))}s</span>`),this._setUpdateProgress(`<span class="tunnel-spinner"></span> ${escapeHtml(s)}${o}`);return}if(this._stopUpdatePolling(),n.phase==="completed"){let s=`<span style="color:var(--success,#3fb950)">\u2713 Updated to v${escapeHtml(n.toVersion||"")}. Reloading\u2026</span>`;n.stashRef&&(s+=`<br><span style="color:var(--text-secondary)">Local changes stashed as <code>${escapeHtml(n.stashRef)}</code> \u2014 run <code>git stash pop</code> to restore.</span>`),this._setUpdateProgress(s),setTimeout(()=>location.reload(),2500)}else if(n.phase==="completed-needs-manual-restart")this._setUpdateProgress(`Update staged. Restart Codeman to apply:<br><code>${escapeHtml(n.manualRestartCommand||"restart codeman web")}</code>`);else if(n.phase==="failed"){let s=`<span style="color:var(--danger,#e5534b)">\u2717 ${escapeHtml(n.message||"Update failed")}.</span>`;n.error&&(s+=`<br><span style="color:var(--text-secondary)">${escapeHtml(n.error)}</span>`),s+='<br><span style="color:var(--text-secondary)">The previous version is still running.</span>',n.stashRef&&(s+=`<br><span style="color:var(--text-secondary)">Local changes stashed as <code>${escapeHtml(n.stashRef)}</code>.</span>`),this._setUpdateProgress(s);const o=this.$("updateNowBtn"),a=this.$("updateActionRow");o&&(o.disabled=!1,o.textContent="Try again"),a&&(a.style.display="flex")}};t(),this._updatePollTimer=setInterval(t,1500)},isCliAvailable(e){const t=window.__codemanCliAvailable;return!t||typeof t!="object"?!0:t[e]!==!1},applyWelcomeCliVisibility(){const e=[["welcomeClaudeBtn","claude"],["welcomeOpencodeBtn","opencode"],["welcomeAntigravityBtn","antigravity"],["welcomeGeminiBtn","gemini"],["welcomeTunnelBtn","cloudflared"]];for(const[t,n]of e){const s=document.getElementById(t);s&&(s.style.display=this.isCliAvailable(n)?"flex":"none")}},async loadTunnelStatus(){try{const t=await(await fetch("/api/tunnel/status")).json(),n=t?.success===!0?t.data:t,s=n.running&&n.url;this._tunnelUrl=s?n.url:null,this._updateTunnelUrlDisplay(this._tunnelUrl),this._updateWelcomeTunnelBtn(!!s,this._tunnelUrl),this._updateTunnelIndicator(!!s)}catch{this._tunnelUrl=null,this._updateTunnelUrlDisplay(null),this._updateWelcomeTunnelBtn(!1),this._updateTunnelIndicator(!1)}},_updateTunnelUrlRow(e,t,n,s=""){const o=document.getElementById(e),a=document.getElementById(t);if(!(!o||!a))if(n){const i=n+s;o.style.display="",a.textContent=i,a.onclick=()=>{navigator.clipboard.writeText(i).then(()=>{this.showToast(`${s?"Upload":"Tunnel"} URL copied`,"success")})}}else o.style.display="none",a.textContent="",a.onclick=null},_updateTunnelUrlDisplay(e){this._updateTunnelUrlRow("tunnelUrlRow","tunnelUrlDisplay",e),this._updateTunnelUrlRow("tunnelUploadUrlRow","tunnelUploadUrlDisplay",e,"/upload.html")},showTunnelQR(){this.closeTunnelQR();const e=document.createElement("div");e.id="tunnelQrOverlay",e.style.cssText="position:fixed;inset:0;background:rgba(0,0,0,0.7);z-index:5000;display:flex;align-items:center;justify-content:center;cursor:pointer",e.onclick=n=>{n.target===e&&this.closeTunnelQR()};const t=document.createElement("div");t.style.cssText="background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:24px;text-align:center;max-width:340px;width:90vw;box-shadow:var(--shadow-lg);cursor:default",t.innerHTML=`
2
+ <div style="font-size:14px;font-weight:600;color:var(--text-primary);margin-bottom:16px">Scan to connect</div>
3
+ <div id="tunnelQrContainer" style="background:#fff;border-radius:8px;padding:16px;display:inline-block">
4
+ <div style="color:#666;font-size:12px">Loading...</div>
5
+ </div>
6
+ <div id="tunnelQrUrl" style="margin-top:12px;font-family:monospace;font-size:11px;color:var(--text-muted);word-break:break-all;cursor:pointer" title="Click to copy"></div>
7
+ <button onclick="app.closeTunnelQR()" style="margin-top:16px;padding:6px 20px;background:var(--bg-elevated);border:1px solid var(--border);border-radius:6px;color:var(--text-primary);cursor:pointer;font-size:13px">Close</button>
8
+ `,e.appendChild(t),document.body.appendChild(e),fetch("/api/tunnel/qr").then(n=>{if(!n.ok)throw new Error("Tunnel not running");return n.json()}).then(n=>{const s=n?.success===!0?n.data:n,o=document.getElementById("tunnelQrContainer");if(o&&s.svg&&(o.innerHTML=s.svg),s.authEnabled){const a=document.createElement("div");a.id="tunnelQrBadge",a.style.cssText="margin-top:8px;font-size:11px;color:var(--text-muted)",a.textContent="Single-use auth \xB7 expires in 60s";const i=document.createElement("button");i.textContent="Regenerate QR",i.style.cssText="margin-top:8px;padding:4px 12px;background:var(--bg-elevated);border:1px solid var(--border);border-radius:4px;color:var(--text-secondary);cursor:pointer;font-size:11px",i.onclick=()=>{fetch("/api/tunnel/qr/regenerate",{method:"POST"}).then(()=>this.showToast("QR code regenerated","success")).catch(()=>this.showToast("Failed to regenerate QR","error"))};const l=o.parentElement;l&&(l.appendChild(a),l.appendChild(i)),this._resetQrCountdown()}}).catch(()=>{const n=document.getElementById("tunnelQrContainer");n&&(n.innerHTML='<div style="color:#c00;font-size:12px;padding:20px">Tunnel not active</div>')}),fetch("/api/tunnel/status").then(n=>n.json()).then(n=>{const s=n?.success===!0?n.data:n,o=document.getElementById("tunnelQrUrl");o&&s.url&&(o.textContent=s.url,o.onclick=()=>{navigator.clipboard.writeText(s.url).then(()=>{this.showToast("Tunnel URL copied","success")})})}).catch(()=>{}),this._tunnelQrEscHandler=n=>{n.key==="Escape"&&this.closeTunnelQR()},document.addEventListener("keydown",this._tunnelQrEscHandler)},closeTunnelQR(){const e=document.getElementById("tunnelQrOverlay");e&&e.remove(),this._tunnelQrEscHandler&&(document.removeEventListener("keydown",this._tunnelQrEscHandler),this._tunnelQrEscHandler=null),this._clearQrCountdown()},_refreshTunnelQrFromApi(){fetch("/api/tunnel/qr").then(e=>e.ok?e.json():null).then(e=>{const t=e?.success===!0?e.data:e;if(!t?.svg)return;const n=document.getElementById("tunnelQrContainer");n&&(n.innerHTML=t.svg);const s=document.getElementById("welcomeQrInner");s&&(s.innerHTML=t.svg)}).catch(()=>{})},_resetQrCountdown(){this._clearQrCountdown(),this._qrCountdownSec=60,this._updateQrCountdownText(),this._qrCountdownTimer=setInterval(()=>{if(this._qrCountdownSec--,this._qrCountdownSec<=0){this._clearQrCountdown();return}this._updateQrCountdownText()},1e3)},_updateQrCountdownText(){const e=document.getElementById("tunnelQrBadge");e&&(e.textContent=`Single-use auth \xB7 expires in ${this._qrCountdownSec}s`)},_clearQrCountdown(){this._qrCountdownTimer&&(clearInterval(this._qrCountdownTimer),this._qrCountdownTimer=null)},async toggleTunnelFromWelcome(){const e=document.getElementById("welcomeTunnelBtn");if(!e)return;const t=e.classList.contains("active");e.disabled=!0;try{const n=!t,s=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelEnabled:n})});if(n&&await this._handleTunnelEnableRefusal(s)){this._dismissTunnelConnecting(),this._updateWelcomeTunnelBtn(!1),e.disabled=!1;return}n?(this._showTunnelConnecting(),this._pollTunnelStatus()):(this._dismissTunnelConnecting(),this.showToast("Tunnel stopped","info"),this._updateWelcomeTunnelBtn(!1),e.disabled=!1)}catch{this._dismissTunnelConnecting(),this.showToast("Failed to toggle tunnel","error"),e.disabled=!1}},_showTunnelConnecting(){const e=document.getElementById("tunnelConnectingToast");e&&e.remove();const t=document.getElementById("welcomeTunnelBtn");t&&(t.classList.add("connecting"),t.innerHTML=`
9
+ <span class="tunnel-spinner"></span>
10
+ Connecting...`);const n=document.createElement("div");n.className="toast toast-info show",n.id="tunnelConnectingToast",n.innerHTML='<span class="tunnel-spinner"></span> Cloudflare Tunnel connecting...',n.style.pointerEvents="auto",this._toastContainer||(this._toastContainer=document.querySelector(".toast-container"),this._toastContainer||(this._toastContainer=document.createElement("div"),this._toastContainer.className="toast-container",document.body.appendChild(this._toastContainer))),this._toastContainer.appendChild(n)},_dismissTunnelConnecting(){clearTimeout(this._tunnelPollTimer),this._tunnelPollTimer=null;const e=document.getElementById("tunnelConnectingToast");e&&(e.classList.remove("show"),setTimeout(()=>e.remove(),200));const t=document.getElementById("welcomeTunnelBtn");t&&t.classList.remove("connecting")},_pollTunnelStatus(e=0){e>15||(this._tunnelPollTimer=setTimeout(async()=>{try{const n=await(await fetch("/api/tunnel/status")).json(),s=n?.success===!0?n.data:n;if(s.running&&s.url){this._dismissTunnelConnecting(),this._updateTunnelUrlDisplay(s.url),document.getElementById("welcomeOverlay")?.classList.contains("visible")?(this._updateWelcomeTunnelBtn(!0,s.url,!0),this.showToast("Tunnel active","success")):(this._updateWelcomeTunnelBtn(!0,s.url),this.showToast(`Tunnel active: ${s.url}`,"success"),this.showTunnelQR());return}}catch{}this._pollTunnelStatus(e+1)},2e3))},_updateWelcomeTunnelBtn(e,t,n=!1){const s=document.getElementById("welcomeTunnelBtn");s&&(s.disabled=!1,e?(s.classList.remove("connecting"),s.classList.add("active"),s.innerHTML=`
11
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>
12
+ Tunnel Active`):(s.classList.remove("active","connecting"),s.innerHTML=`
13
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>
14
+ Cloudflare Tunnel`));const o=document.getElementById("welcomeQr"),a=document.getElementById("welcomeQrInner"),i=document.getElementById("welcomeQrUrl");!o||!a||(e?(o.classList.add("visible"),n&&(o.classList.add("expanded"),clearTimeout(this._welcomeQrShrinkTimer),this._welcomeQrShrinkTimer=setTimeout(()=>{o.classList.remove("expanded")},8e3)),t&&(i.textContent=t,i.title="Click QR to enlarge"),fetch("/api/tunnel/qr").then(l=>{if(!l.ok)throw new Error;return l.json()}).then(l=>{const r=l?.success===!0?l.data:l;r.svg&&(a.innerHTML=r.svg)}).catch(()=>{a.innerHTML='<div style="color:#999;font-size:11px;padding:20px">QR unavailable</div>'})):(clearTimeout(this._welcomeQrShrinkTimer),o.classList.remove("visible","expanded"),a.innerHTML="",i&&(i.textContent="")))},toggleWelcomeQrSize(){const e=document.getElementById("welcomeQr");e&&(clearTimeout(this._welcomeQrShrinkTimer),e.classList.toggle("expanded"))},_updateTunnelIndicator(e){if(MobileDetection.getDeviceType()==="mobile")return;const t=document.getElementById("tunnelIndicator");t&&(t.style.display=e?"flex":"none",t.classList.remove("connecting"))},toggleTunnelPanel(){if(document.getElementById("tunnelPanel")){this.closeTunnelPanel();return}this._openTunnelPanel()},async _openTunnelPanel(){const e=document.createElement("div");e.className="tunnel-panel",e.id="tunnelPanel",e.innerHTML=`
15
+ <div class="tunnel-panel-header">
16
+ <h3>
17
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>
18
+ Cloudflare Tunnel
19
+ <span class="tunnel-panel-status" id="tunnelPanelStatus">Loading...</span>
20
+ </h3>
21
+ </div>
22
+ <div class="tunnel-panel-body" id="tunnelPanelBody">
23
+ <div style="font-size:12px;color:var(--text-muted);padding:8px 0">Loading...</div>
24
+ </div>
25
+ `,document.body.appendChild(e),this._tunnelPanelClickHandler=t=>{!e.contains(t.target)&&t.target.id!=="tunnelIndicator"&&!t.target.closest(".tunnel-indicator")&&this.closeTunnelPanel()},setTimeout(()=>document.addEventListener("click",this._tunnelPanelClickHandler),0),this._tunnelPanelEscHandler=t=>{t.key==="Escape"&&this.closeTunnelPanel()},document.addEventListener("keydown",this._tunnelPanelEscHandler);try{const n=await(await fetch("/api/tunnel/info")).json(),s=n?.success===!0?n.data:n;this._renderTunnelPanel(s)}catch{const t=document.getElementById("tunnelPanelBody");t&&(t.innerHTML='<div style="font-size:12px;color:var(--red);padding:8px 0">Failed to load tunnel info</div>')}},_renderTunnelPanel(e){const t=document.getElementById("tunnelPanelStatus"),n=document.getElementById("tunnelPanelBody");if(!t||!n)return;t.textContent=e.running?"Connected":"Offline",t.className="tunnel-panel-status"+(e.running?"":" offline");let s="";if(e.url&&(s+=`
26
+ <div class="tunnel-panel-section">
27
+ <div class="tunnel-panel-label">URL</div>
28
+ <div class="tunnel-panel-url" id="tunnelPanelUrl" title="Click to copy">${escapeHtml(e.url)}</div>
29
+ </div>`),s+=`
30
+ <div class="tunnel-panel-section">
31
+ <div class="tunnel-panel-label">Connections</div>
32
+ <div class="tunnel-panel-stat">
33
+ <span>Remote Clients</span>
34
+ <span class="tunnel-panel-stat-value">${e.sseClients}</span>
35
+ </div>`,e.authEnabled&&(s+=`
36
+ <div class="tunnel-panel-stat">
37
+ <span>Auth Sessions</span>
38
+ <span class="tunnel-panel-stat-value">${e.authSessions.length}</span>
39
+ </div>`),s+="</div>",e.authEnabled&&e.authSessions.length>0){s+='<div class="tunnel-panel-section"><div class="tunnel-panel-label">Authenticated Devices</div>';for(const a of e.authSessions){const i=a.ua||"Unknown",l=i.match(/Chrome|Firefox|Safari|Edge|Mobile/)?.[0]||"Browser",r=this._formatTimeAgo(a.createdAt);s+=`
40
+ <div class="tunnel-panel-session">
41
+ <span class="tunnel-panel-session-dot"></span>
42
+ <span class="tunnel-panel-session-info" title="${escapeHtml(i)}">${escapeHtml(l)} &middot; ${escapeHtml(a.ip)} &middot; ${r}</span>
43
+ <span class="tunnel-panel-session-method">${a.method}</span>
44
+ </div>`}s+="</div>"}s+='<div class="tunnel-panel-actions">',e.running?s+=`
45
+ <button class="tunnel-panel-btn btn-qr" onclick="app.showTunnelQR();app.closeTunnelPanel()">QR Code</button>
46
+ <button class="tunnel-panel-btn btn-stop" onclick="app._tunnelPanelToggle(false)">Stop Tunnel</button>`:s+='<button class="tunnel-panel-btn btn-start" onclick="app._tunnelPanelToggle(true)">Start Tunnel</button>',s+="</div>",e.authEnabled&&e.authSessions.length>0&&(s+=`
47
+ <div style="padding-top:8px">
48
+ <button class="tunnel-panel-btn btn-revoke" style="width:100%" onclick="app._tunnelPanelRevokeAll()">Revoke All Sessions</button>
49
+ </div>`),n.innerHTML=s;const o=document.getElementById("tunnelPanelUrl");o&&(o.onclick=()=>{navigator.clipboard.writeText(e.url).then(()=>this.showToast("Tunnel URL copied","success"))})},_formatTimeAgo(e){const t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const s=Math.floor(n/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},async _handleTunnelEnableRefusal(e){if(!e||e.ok)return!1;let t="Tunnel refused: set CODEMAN_PASSWORD before exposing Codeman publicly.";try{const n=await e.json();n&&n.error&&(t=n.error)}catch{}if(e.status===403){if(!confirm(`\u26A0\uFE0F SECURITY WARNING \u2014 no password set
50
+
51
+ Enabling the Cloudflare tunnel will publish THIS machine to a public URL with NO login. Anyone who gets the URL has full terminal control \u2014 effectively remote code execution on your computer.
52
+
53
+ Strongly recommended: set CODEMAN_PASSWORD instead.
54
+
55
+ Enable the unauthenticated public tunnel anyway?`))return this._dismissTunnelConnecting?.(),this.showToast("Tunnel not enabled","info"),!0;try{const s=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelEnabled:!0,acknowledgeUnauthTunnel:!0})});if(s.ok)return this.showToast("Public tunnel enabling \u2014 no password set \u26A0\uFE0F","warning"),!1;let o="Failed to enable tunnel.";try{const a=await s.json();a&&a.error&&(o=a.error)}catch{}return this._dismissTunnelConnecting?.(),this.showToast(o,"error"),!0}catch{return this._dismissTunnelConnecting?.(),this.showToast("Failed to enable tunnel","error"),!0}}return this._dismissTunnelConnecting?.(),this.showToast(t,"error"),!0},async _tunnelPanelToggle(e){try{const t=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelEnabled:e})});if(e&&await this._handleTunnelEnableRefusal(t)){this.closeTunnelPanel();return}if(e){this._updateTunnelIndicator(!1);const n=document.getElementById("tunnelIndicator");n&&(n.style.display="flex",n.classList.add("connecting")),this.showToast("Tunnel starting...","info"),this._showTunnelConnecting(),this._pollTunnelStatus()}else this.showToast("Tunnel stopped","info");this.closeTunnelPanel()}catch{this.showToast("Failed to toggle tunnel","error")}},async _tunnelPanelRevokeAll(){try{await fetch("/api/auth/revoke",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),this.showToast("All sessions revoked","success");const t=await(await fetch("/api/tunnel/info")).json(),n=t?.success===!0?t.data:t;this._renderTunnelPanel(n)}catch{this.showToast("Failed to revoke sessions","error")}},closeTunnelPanel(){const e=document.getElementById("tunnelPanel");e&&e.remove(),this._tunnelPanelClickHandler&&(document.removeEventListener("click",this._tunnelPanelClickHandler),this._tunnelPanelClickHandler=null),this._tunnelPanelEscHandler&&(document.removeEventListener("keydown",this._tunnelPanelEscHandler),this._tunnelPanelEscHandler=null)},toggleDeepgramKeyVisibility(){const e=document.getElementById("voiceDeepgramKey"),t=document.getElementById("voiceKeyToggleBtn");e.type==="password"?(e.type="text",t.textContent="Hide"):(e.type="password",t.textContent="Show")},openLifecycleLog(){const e=document.getElementById("lifecycleWindow");e.style.display="block",e._dragInitialized||(e.style.left="50%",e.style.transform="translateX(-50%)",this._initLifecycleDrag(e),e._dragInitialized=!0),this.loadLifecycleLog()},closeLifecycleLog(){document.getElementById("lifecycleWindow").style.display="none"},_initLifecycleDrag(e){const t=document.getElementById("lifecycleWindowHeader");let n=!1,s,o,a,i;t.addEventListener("mousedown",l=>{if(l.target.tagName==="SELECT"||l.target.tagName==="INPUT"||l.target.tagName==="BUTTON")return;n=!0;const r=e.getBoundingClientRect();e.style.transform="none",e.style.left=r.left+"px",e.style.top=r.top+"px",s=l.clientX,o=l.clientY,a=r.left,i=r.top,l.preventDefault()}),document.addEventListener("mousemove",l=>{n&&(e.style.left=a+l.clientX-s+"px",e.style.top=i+l.clientY-o+"px")}),document.addEventListener("mouseup",()=>{n=!1})},async loadLifecycleLog(){const e=document.getElementById("lifecycleFilterEvent").value,t=document.getElementById("lifecycleFilterSession").value.trim(),n=new URLSearchParams;e&&n.set("event",e),t&&n.set("sessionId",t),n.set("limit","300");try{const o=await(await fetch(`/api/session-lifecycle?${n}`)).json(),a=o?.success===!0?o.data:o,i=document.getElementById("lifecycleTableBody"),l=document.getElementById("lifecycleEmpty");if(!a.entries||a.entries.length===0){i.innerHTML="",l.style.display="";return}l.style.display="none";const r={created:"#4ade80",started:"#4ade80",recovered:"#4ade80",exit:"#fbbf24",mux_died:"#f87171",deleted:"#f87171",stale_cleaned:"#f87171",server_started:"#666",server_stopped:"#666"};i.innerHTML=a.entries.map(d=>{const c=new Date(d.ts).toLocaleString(),u=r[d.event]||"#888",p=d.name||(d.sessionId==="*"?"\u2014":this.getShortId(d.sessionId)),h=[];return d.exitCode!==void 0&&d.exitCode!==null&&h.push(`code=${d.exitCode}`),d.mode&&h.push(d.mode),`<tr style="border-bottom:1px solid #1a1a2e">
56
+ <td style="padding:3px 8px;color:#888;white-space:nowrap">${c}</td>
57
+ <td style="padding:3px 8px;color:${u};font-weight:600">${d.event}</td>
58
+ <td style="padding:3px 8px;color:#e0e0e0" title="${d.sessionId}">${p}</td>
59
+ <td style="padding:3px 8px;color:#aaa">${d.reason||""}</td>
60
+ <td style="padding:3px 8px;color:#666">${h.join(", ")}</td>
61
+ </tr>`}).join("")}catch(s){console.error("Failed to load lifecycle log:",s)}},async saveAppSettings(){const e=this.loadAppSettingsFromStorage(),t=(e.gestureControlEnabled??!1)===!0,n=(e.webglRendererEnabled??!0)===!0,s={displayName:window.CodemanI18n?.normalizeDisplayName(document.getElementById("appSettingsDisplayName").value)||"Codeman",language:window.CodemanI18n?.normalizeLanguage(document.getElementById("appSettingsLanguage").value)||"en",defaultClaudeMdPath:document.getElementById("appSettingsClaudeMdPath").value.trim(),defaultWorkingDir:document.getElementById("appSettingsDefaultDir").value.trim(),ralphTrackerEnabled:document.getElementById("appSettingsRalphEnabled").checked,showFontControls:document.getElementById("appSettingsShowFontControls").checked,showSystemStats:document.getElementById("appSettingsShowSystemStats").checked,showLifecycleLog:document.getElementById("appSettingsShowLifecycleLog").checked,showResponseViewer:document.getElementById("appSettingsShowResponseViewer").checked,showFileViewerButton:document.getElementById("appSettingsShowFileViewerButton").checked,showAttachmentsButton:document.getElementById("appSettingsShowAttachmentsButton").checked,showMonitor:document.getElementById("appSettingsShowMonitor").checked,showProjectInsights:document.getElementById("appSettingsShowProjectInsights").checked,showFileBrowser:document.getElementById("appSettingsShowFileBrowser").checked,showSubagents:document.getElementById("appSettingsShowSubagents").checked,showUltracodeAgents:document.getElementById("appSettingsShowUltracodeAgents").checked,ultracodeFloatingWindows:document.getElementById("appSettingsUltracodeFloatingWindows").checked,showMultiMonitorButton:document.getElementById("appSettingsShowMultiMonitorButton").checked,showPlanUsageLimits:document.getElementById("appSettingsShowPlanUsageLimits").checked,showRedrawButton:document.getElementById("appSettingsShowRedrawButton").checked,mobileOverviewEnabled:document.getElementById("appSettingsMobileOverview").checked,showSessionButton:document.getElementById("appSettingsShowSessionButton").checked,showAwayDigestButton:document.getElementById("appSettingsShowAwayDigestButton").checked,showCronButton:document.getElementById("appSettingsShowCronButton").checked,gestureControlEnabled:document.getElementById("appSettingsGestureControl").checked,subagentTrackingEnabled:document.getElementById("appSettingsSubagentTracking").checked,subagentActiveTabOnly:document.getElementById("appSettingsSubagentActiveTabOnly").checked,imageWatcherEnabled:document.getElementById("appSettingsImageWatcherEnabled").checked,tunnelEnabled:document.getElementById("appSettingsTunnelEnabled").checked,localEchoEnabled:document.getElementById("appSettingsLocalEcho").checked,terminalWheelLocalScrollback:document.getElementById("appSettingsTerminalWheelLocal").checked,cjkInputEnabled:document.getElementById("appSettingsCjkInput").checked,webglRendererEnabled:document.getElementById("appSettingsWebglRenderer").checked,extendedKeyboardBar:document.getElementById("appSettingsExtendedKeyboardBar").checked,tabTwoRows:document.getElementById("appSettingsTabTwoRows").checked,showTabDetachButton:document.getElementById("appSettingsShowTabDetachButton").checked,skin:document.getElementById("appSettingsSkin").value,claudeMode:document.getElementById("appSettingsClaudeMode").value,allowedTools:document.getElementById("appSettingsAllowedTools").value.trim(),codexDangerouslyBypassApprovals:document.getElementById("appSettingsCodexDangerouslyBypassApprovals").checked,codexAnimationsEnabled:document.getElementById("appSettingsCodexAnimations").checked,agentTeamsEnabled:document.getElementById("appSettingsAgentTeams").checked,claudeModel:document.getElementById("appSettingsClaudeModel").value,opusContext1mEnabled:document.getElementById("appSettingsOpusContext1m").checked,remoteAutoReconnect:document.getElementById("appSettingsRemoteAutoReconnect").checked,thinkingEffort:document.getElementById("appSettingsThinkingEffort").value,nice:{enabled:document.getElementById("appSettingsNiceEnabled").checked,niceValue:parseInt(document.getElementById("appSettingsNiceValue").value)||10}};if(e.showTokenCount!==void 0&&(s.showTokenCount=e.showTokenCount),e.showCost!==void 0&&(s.showCost=e.showCost),e.shortcutOverrides!==void 0&&(s.shortcutOverrides=e.shortcutOverrides),this.saveAppSettingsToStorage(s),this._updateLocalEchoState(),!n&&s.webglRendererEnabled)try{localStorage.removeItem("codeman-webgl-disabled")}catch{}const o={apiKey:document.getElementById("voiceDeepgramKey").value.trim(),language:document.getElementById("voiceLanguage").value,keyterms:document.getElementById("voiceKeyterms").value.trim(),insertMode:document.getElementById("voiceInsertMode").value};VoiceInput._saveDeepgramConfig(o);const a={enabled:document.getElementById("appSettingsNotifEnabled").checked,browserNotifications:document.getElementById("appSettingsNotifBrowser").checked,audioAlerts:document.getElementById("appSettingsNotifAudio").checked,stuckThresholdMs:(parseInt(document.getElementById("appSettingsNotifStuckMins").value)||10)*6e4,muteCritical:!document.getElementById("appSettingsNotifCritical").checked,muteWarning:!document.getElementById("appSettingsNotifWarning").checked,muteInfo:!document.getElementById("appSettingsNotifInfo").checked,eventTypes:{permission_prompt:{enabled:document.getElementById("eventPermissionEnabled").checked,browser:document.getElementById("eventPermissionBrowser").checked,push:document.getElementById("eventPermissionPush").checked,audio:document.getElementById("eventPermissionAudio").checked},elicitation_dialog:{enabled:document.getElementById("eventQuestionEnabled").checked,browser:document.getElementById("eventQuestionBrowser").checked,push:document.getElementById("eventQuestionPush").checked,audio:document.getElementById("eventQuestionAudio").checked},idle_prompt:{enabled:document.getElementById("eventIdleEnabled").checked,browser:document.getElementById("eventIdleBrowser").checked,push:document.getElementById("eventIdlePush").checked,audio:document.getElementById("eventIdleAudio").checked},stop:{enabled:document.getElementById("eventStopEnabled").checked,browser:document.getElementById("eventStopBrowser").checked,push:document.getElementById("eventStopPush").checked,audio:document.getElementById("eventStopAudio").checked},session_error:{enabled:!0,browser:this.notificationManager?.preferences?.eventTypes?.session_error?.browser??!0,push:this.notificationManager?.preferences?.eventTypes?.session_error?.push??!1,audio:!1},respawn_cycle:{enabled:document.getElementById("eventRespawnEnabled").checked,browser:document.getElementById("eventRespawnBrowser").checked,push:document.getElementById("eventRespawnPush").checked,audio:document.getElementById("eventRespawnAudio").checked},token_milestone:{enabled:!0,browser:!1,push:!1,audio:!1},ralph_complete:{enabled:document.getElementById("eventRalphEnabled").checked,browser:document.getElementById("eventRalphBrowser").checked,push:document.getElementById("eventRalphPush").checked,audio:document.getElementById("eventRalphAudio").checked},subagent_spawn:{enabled:document.getElementById("eventSubagentEnabled").checked,browser:document.getElementById("eventSubagentBrowser").checked,push:document.getElementById("eventSubagentPush").checked,audio:document.getElementById("eventSubagentAudio").checked},subagent_complete:{enabled:document.getElementById("eventSubagentEnabled").checked,browser:document.getElementById("eventSubagentBrowser").checked,push:document.getElementById("eventSubagentPush").checked,audio:document.getElementById("eventSubagentAudio").checked}},_version:5};this.notificationManager&&(this.notificationManager.preferences=a,this.notificationManager.savePreferences()),this._syncPushPreferences(),this.applyHeaderVisibilitySettings(),this.applySkin(),this.applyLocalization(),this.applyTabWrapSettings(),this._updateTokensImmediate(),this.applyMonitorVisibility(),this.renderProjectInsightsPanel(),this.updateSubagentWindowVisibility(),this._updateCjkInputState(),this.activeSessionId||this.showWelcome(),KeyboardAccessoryBar.setMode(s.extendedKeyboardBar?"extended":"simple");const{localEchoEnabled:i,cjkInputEnabled:l,extendedKeyboardBar:r,skin:d,language:c,showPlanUsageLimits:u,showAttachmentsButton:p,showFileViewerButton:h,webglRendererEnabled:b,terminalWheelLocalScrollback:y,showSessionButton:S,showAwayDigestButton:f,showCronButton:v,showTabDetachButton:m,mobileOverviewEnabled:E,...I}=s;try{const B=await this._apiPut("/api/settings",{...I,...s.showPlanUsageLimits?{statusLineTelemetry:!0}:{},notificationPreferences:a,voiceSettings:o});if(s.tunnelEnabled&&await this._handleTunnelEnableRefusal(B)){s.tunnelEnabled=!1,this.saveAppSettingsToStorage(s);const w=document.getElementById("appSettingsTunnelEnabled");w&&(w.checked=!1),this.closeAppSettings();return}await this.saveModelConfigFromSettings(),this.showToast("Settings saved","success"),s.tunnelEnabled&&this.showToast("Tunnel starting \u2014 QR code will appear when ready...","info")}catch{this.showToast("Settings saved locally","warning")}this.closeAppSettings(),s.gestureControlEnabled!==t&&(this.showToast(s.gestureControlEnabled?"Enabling gesture control \u2014 reloading\u2026":"Disabling gesture control \u2014 reloading\u2026","info"),setTimeout(()=>location.reload(),400))},async loadModelConfigForSettings(){try{const t=await(await fetch("/api/execution/model-config")).json();if(t.success&&t.data){const n=t.data,s=document.getElementById("appSettingsDefaultModel");s&&(s.value=n.defaultModel||"");const o=document.getElementById("appSettingsShowModelRecommendations");o&&(o.checked=n.showRecommendations??!0);const a=n.agentTypeOverrides||{},i=document.getElementById("appSettingsModelExplore"),l=document.getElementById("appSettingsModelImplement"),r=document.getElementById("appSettingsModelTest"),d=document.getElementById("appSettingsModelReview");i&&(i.value=a.explore||""),l&&(l.value=a.implement||""),r&&(r.value=a.test||""),d&&(d.value=a.review||"")}}catch(e){console.warn("Failed to load model config:",e)}},async saveModelConfigFromSettings(){const e=document.getElementById("appSettingsDefaultModel"),t=document.getElementById("appSettingsShowModelRecommendations"),n=document.getElementById("appSettingsModelExplore"),s=document.getElementById("appSettingsModelImplement"),o=document.getElementById("appSettingsModelTest"),a=document.getElementById("appSettingsModelReview"),i={};n?.value&&(i.explore=n.value),s?.value&&(i.implement=s.value),o?.value&&(i.test=o.value),a?.value&&(i.review=a.value);const l={defaultModel:e?.value||"",showRecommendations:t?.checked??!0,agentTypeOverrides:i};try{await fetch("/api/execution/model-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}catch(r){console.warn("Failed to save model config:",r)}},isRalphTrackerEnabledByDefault(){return this.loadAppSettingsFromStorage().ralphTrackerEnabled??!1},getSettingsStorageKey(){return MobileDetection.isHandheldDevice?.()??MobileDetection.getDeviceType()==="mobile"?"codeman-app-settings-mobile":"codeman-app-settings"},getDefaultSettings(){return MobileDetection.isHandheldDevice?.()??MobileDetection.getDeviceType()==="mobile"?{showFontControls:!1,showSystemStats:!1,showTokenCount:!1,showCost:!1,showMonitor:!1,showProjectInsights:!1,showFileBrowser:!1,showSubagents:!1,showUltracodeAgents:!1,ultracodeFloatingWindows:!1,showMultiMonitorButton:!1,showPlanUsageLimits:!1,showAttachmentsButton:!1,showFileViewerButton:!1,showRedrawButton:!1,showSessionButton:!1,showAwayDigestButton:!1,showCronButton:!1,mobileOverviewEnabled:!0,remoteAutoReconnect:!0,gestureControlEnabled:!1,subagentTrackingEnabled:!0,subagentActiveTabOnly:!0,imageWatcherEnabled:!1,ralphTrackerEnabled:!1,tabTwoRows:!1,cjkInputEnabled:!1,terminalWheelLocalScrollback:!1,webglRendererEnabled:!1,skin:"daylight-blue"}:{}},loadAppSettingsFromStorage(){if(this._cachedAppSettings)return this._cachedAppSettings;try{const e=this.getSettingsStorageKey(),t=localStorage.getItem(e);if(t)return this._cachedAppSettings=JSON.parse(t),this._cachedAppSettings}catch(e){console.error("Failed to load app settings:",e)}return this._cachedAppSettings=this.getDefaultSettings(),this._cachedAppSettings},saveAppSettingsToStorage(e){this._cachedAppSettings=e;try{const t=this.getSettingsStorageKey();localStorage.setItem(t,JSON.stringify(e))}catch(t){console.error("Failed to save app settings:",t)}},applySkin(){const e=this.loadAppSettingsFromStorage(),t=this.getDefaultSettings(),n=e.skin??t.skin??"daylight-blue";document.documentElement.setAttribute("data-skin",n),window.__codemanSkin=n;const s=getComputedStyle(document.documentElement).getPropertyValue("--bg-dark").trim();s&&document.querySelector('meta[name="theme-color"]')?.setAttribute("content",s);try{localStorage.setItem("codeman:skin",n)}catch{}typeof this.applyTerminalSkin=="function"&&this.applyTerminalSkin(n)},applyLocalization(){const e=this.loadAppSettingsFromStorage();window.CodemanI18n?.configure({language:e.language,displayName:e.displayName})&&this.notificationManager&&(this.notificationManager.originalTitle=document.title)},planUsageChipEnabled(e=null){return(e??this.loadAppSettingsFromStorage()).showPlanUsageLimits??this.getDefaultSettings().showPlanUsageLimits??!0},applyHeaderVisibilitySettings(){const e=this.loadAppSettingsFromStorage(),t=this.getDefaultSettings(),n=e.showTabDetachButton??t.showTabDetachButton??!1;document.documentElement.classList.toggle("tabs-show-detach",n);const s=MobileDetection.getDeviceType()!=="desktop",o=s?!1:e.showFontControls??t.showFontControls??!1,a=s?!1:e.showSystemStats??t.showSystemStats??!0,i=s?!1:e.showTokenCount??t.showTokenCount??!1,l=document.querySelector(".header-font-controls"),r=document.getElementById("headerSystemStats"),d=document.getElementById("headerTokens");l&&(l.style.display=o?"":"none"),r&&(r.style.display=a?"":"none"),d&&(d.style.display=i?"":"none");const c=e.showLifecycleLog??t.showLifecycleLog??!1,u=document.querySelector(".btn-lifecycle-log");u&&(u.style.display=c?"":"none");const p=e.showResponseViewer??t.showResponseViewer??!1,h=document.querySelector(".btn-response-viewer-header");h&&h.classList.toggle("btn-response-viewer-header--hidden",!p);const b=e.showAttachmentsButton??t.showAttachmentsButton??!1,y=document.getElementById("attachmentsHistoryBtn");y&&y.classList.toggle("btn-attachments-history--hidden",!b);const S=e.showFileViewerButton??t.showFileViewerButton??!0,f=document.querySelector(".btn-file-viewer");f&&f.classList.toggle("btn-file-viewer--hidden",!S);const v=e.showMultiMonitorButton??t.showMultiMonitorButton??!1,m=document.querySelector(".btn-multimonitor");m&&m.classList.toggle("btn-multimonitor--hidden",!v);const E=e.showUltracodeAgents??t.showUltracodeAgents??!1,I=document.querySelector(".btn-ultracode-agents");I&&I.classList.toggle("btn-ultracode-agents--hidden",!E);const B=this.planUsageChipEnabled(e),w=document.getElementById("planUsageChip");w&&w.classList.toggle("header-plan-usage--hidden",!B);const T=e.showRedrawButton??t.showRedrawButton??!1,g=document.querySelector(".btn-redraw-terminal");g&&g.classList.toggle("btn-redraw-terminal--hidden",!T);const A=e.showSessionButton??t.showSessionButton??!1,k=document.querySelector(".btn-session-manager");k&&k.classList.toggle("btn-session-manager--hidden",!A);const M=e.showAwayDigestButton??t.showAwayDigestButton??!1,_=document.querySelector(".btn-away-digest");_&&_.classList.toggle("btn-away-digest--hidden",!M);const x=e.showCronButton??t.showCronButton??!1,C=document.querySelector(".btn-cron");C&&C.classList.toggle("btn-cron--hidden",!x);const P=document.querySelector(".btn-notifications");if(P&&(P.style.display="none"),!(this.notificationManager?.preferences?.enabled??!0)){const L=document.getElementById("notifDrawer");L&&L.classList.remove("open")}},applyTabWrapSettings(){const e=this.loadAppSettingsFromStorage(),t=this.getDefaultSettings(),s=MobileDetection.getDeviceType()==="desktop"?e.tabTwoRows??t.tabTwoRows??!1:!1,o=this._tallTabsEnabled;this._tallTabsEnabled=s;const a=document.getElementById("sessionTabs");a&&(a.classList.toggle("tabs-two-rows",s),a.classList.toggle("tabs-show-folder",s)),o!==void 0&&o!==s&&this._fullRenderSessionTabs()},applyMonitorVisibility(){const e=this.loadAppSettingsFromStorage(),t=this.getDefaultSettings(),n=e.showMonitor??t.showMonitor??!1,s=e.showSubagents??t.showSubagents??!1,o=e.showFileBrowser??t.showFileBrowser??!1,a=document.getElementById("monitorPanel");a&&(a.style.display=n?"":"none",n?a.classList.add("open"):a.classList.remove("open"));const i=document.getElementById("subagentsPanel");i&&(s?i.classList.remove("hidden"):i.classList.add("hidden"));const l=e.showUltracodeAgents??t.showUltracodeAgents??!1,r=document.getElementById("ultracodeAgentsPanel");r&&(l?r.classList.remove("hidden"):(r.classList.remove("open"),r.classList.add("hidden"))),e.ultracodeFloatingWindows??t.ultracodeFloatingWindows??!1?typeof this.syncAllUltracodeFloatingWindows=="function"&&this.syncAllUltracodeFloatingWindows():typeof this.removeAllUltracodeWindows=="function"&&this.removeAllUltracodeWindows();const c=document.getElementById("fileBrowserPanel");if(c)if(o&&this.activeSessionId){if(c.classList.add("visible"),this.loadFileBrowser(this.activeSessionId),!this.fileBrowserDragListeners){const u=c.querySelector(".file-browser-header");if(u){const p=()=>{if(!c.style.left){const h=c.getBoundingClientRect();c.style.left=`${h.left}px`,c.style.top=`${h.top}px`,c.style.right="auto"}};u.addEventListener("mousedown",p),u.addEventListener("touchstart",p,{passive:!0}),this.fileBrowserDragListeners=this.makeWindowDraggable(c,u),this.fileBrowserDragListeners._onFirstDrag=p}}}else c.classList.remove("visible")},closeMonitor(){const e=document.getElementById("monitorPanel");e&&(e.classList.remove("open"),e.style.display="none");const t=this.loadAppSettingsFromStorage();t.showMonitor=!1,this.saveAppSettingsToStorage(t)},closeSubagentsPanel(){const e=document.getElementById("subagentsPanel");e&&(e.classList.remove("open"),e.classList.add("hidden")),this.subagentPanelVisible=!1;const t=this.loadAppSettingsFromStorage();t.showSubagents=!1,this.saveAppSettingsToStorage(t)},async clearAllSubagents(){const e=this.subagents.size;if(e===0){this.showToast("No subagents to clear","info");return}if(confirm(`Clear all ${e} tracked subagent(s)? This removes them from the UI but does not affect running processes.`))try{const n=await(await fetch("/api/subagents",{method:"DELETE"})).json();n.success?(this.subagents.clear(),this.subagentActivity.clear(),this.subagentToolResults.clear(),this.cleanupAllFloatingWindows(),this.renderSubagentPanel(),this.renderMonitorSubagents(),this.updateSubagentBadge(),this.showToast(`Cleared ${n.data.cleared} subagent(s)`,"success")):this.showToast("Failed to clear subagents: "+n.error,"error")}catch{this.showToast("Failed to clear subagents","error")}},toggleSubagentsPanel(){const e=document.getElementById("subagentsPanel"),t=document.getElementById("subagentsToggleBtn");if(e){if(e.classList.contains("hidden")){e.classList.remove("hidden");const n=this.loadAppSettingsFromStorage();n.showSubagents=!0,this.saveAppSettingsToStorage(n)}e.classList.toggle("open"),this.subagentPanelVisible=e.classList.contains("open"),t&&(t.innerHTML=this.subagentPanelVisible?"&#x25BC;":"&#x25B2;"),this.subagentPanelVisible&&this.renderSubagentPanel()}},async loadAppSettingsFromServer(e=null){try{if((MobileDetection.isHandheldDevice?.()??MobileDetection.getDeviceType()==="mobile")&&!localStorage.getItem("codeman:planUsagePerDeviceMigrated")){const t=this.loadAppSettingsFromStorage();t&&t.showPlanUsageLimits&&(t.showPlanUsageLimits=!1,this.saveAppSettingsToStorage(t)),localStorage.setItem("codeman:planUsagePerDeviceMigrated","1")}}catch{}try{const t=e?await e:await fetch("/api/settings").then(n=>n.ok?n.json():null).then(n=>n?.success===!0?n.data:n);if(t){const{notificationPreferences:n,voiceSettings:s,respawnPresets:o,runMode:a,...i}=t,l=new Set(["showFontControls","showSystemStats","showTokenCount","showCost","showLifecycleLog","showResponseViewer","showRedrawButton","showMonitor","showProjectInsights","showFileBrowser","showSubagents","subagentActiveTabOnly","tabTwoRows","localEchoEnabled","cjkInputEnabled","extendedKeyboardBar","skin","showPlanUsageLimits","showAttachmentsButton","showFileViewerButton","webglRendererEnabled","language","terminalWheelLocalScrollback","showSessionButton","showAwayDigestButton","showCronButton","showTabDetachButton","mobileOverviewEnabled"]);delete i.showPlanUsageLimits;const r=this.loadAppSettingsFromStorage(),d={...r};for(const[c,u]of Object.entries(i))l.has(c)&&c in r||(d[c]=u);if(this.saveAppSettingsToStorage(d),n&&this.notificationManager&&(localStorage.getItem(this.notificationManager.getStorageKey())||(this.notificationManager.preferences=this.notificationManager.normalizePreferences(n),this.notificationManager.savePreferences())),s){const c=localStorage.getItem("codeman-voice-settings");(!c||!JSON.parse(c).apiKey)&&VoiceInput._saveDeepgramConfig(s)}if(o&&Array.isArray(o))this._serverRespawnPresets=o,localStorage.setItem("codeman-respawn-presets",JSON.stringify(o));else{const c=localStorage.getItem("codeman-respawn-presets");if(c){const u=JSON.parse(c);u.length>0&&(this._serverRespawnPresets=u,this._apiPut("/api/settings",{respawnPresets:u}).catch(()=>{}))}}if(a){this.runMode=a;try{localStorage.setItem("codeman_runMode",a)}catch{}this._applyRunMode()}return d}}catch(t){console.error("Failed to load settings from server:",t)}return this.loadAppSettingsFromStorage()},async loadSubagentWindowStates(){let e=null;try{const t=await fetch("/api/subagent-window-states");if(t.ok){const n=await t.json();e=n?.success===!0?n.data:n,localStorage.setItem("codeman-subagent-window-states",JSON.stringify(e))}}catch(t){console.error("Failed to load subagent window states from server:",t)}if(!e)try{const t=localStorage.getItem("codeman-subagent-window-states");t&&(e=JSON.parse(t))}catch(t){console.error("Failed to load subagent window states from localStorage:",t)}return e||{minimized:{},open:[]}},async saveSubagentParentMap(){const e=Object.fromEntries(this.subagentParentMap);try{localStorage.setItem("codeman-subagent-parents",JSON.stringify(e))}catch(t){console.error("Failed to save subagent parents to localStorage:",t)}try{await fetch("/api/subagent-parents",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(t){console.error("Failed to save subagent parents to server:",t)}},async loadSubagentParentMap(){let e=null;try{const t=await fetch("/api/subagent-parents");if(t.ok){const n=await t.json();e=n?.success===!0?n.data:n,localStorage.setItem("codeman-subagent-parents",JSON.stringify(e))}}catch(t){console.error("Failed to load subagent parents from server:",t)}if(!e)try{const t=localStorage.getItem("codeman-subagent-parents");t&&(e=JSON.parse(t))}catch(t){console.error("Failed to load subagent parents from localStorage:",t)}if(e&&typeof e=="object")for(const[t,n]of Object.entries(e))this.sessions.has(n)&&this.subagents.has(t)&&this.subagentParentMap.set(t,n)},getAgentParentSessionId(e){return this.subagentParentMap.get(e)||null},setAgentParentSessionId(e,t){if(!e||!t||this.subagentParentMap.has(e))return;this.subagentParentMap.set(e,t),this.saveSubagentParentMap();const n=this.subagents.get(e);if(n){n.parentSessionId=t;const s=this.sessions.get(t);s&&(n.parentSessionName=this.getSessionName(s)),this.subagents.set(e,n)}},showHelp(){const e=document.getElementById("helpModal");e.classList.add("active"),this.activeFocusTrap=new FocusTrap(e),this.activeFocusTrap.activate()},closeHelp(){document.getElementById("helpModal").classList.remove("active"),this.activeFocusTrap&&(this.activeFocusTrap.deactivate(),this.activeFocusTrap=null)},renderShortcutSettingsList(){const e=document.getElementById("appSettingsShortcutsList");if(!e)return;const t=this.getShortcutRegistry?this.getShortcutRegistry():typeof DEFAULT_SHORTCUTS<"u"?DEFAULT_SHORTCUTS:[],n=this.readShortcutOverridesFromSettings();e.innerHTML=t.map(s=>{const o=s.displayBindings?s.displayBindings.join(" / "):(s.bindings||[]).map(r=>[...r.modifiers||[],r.key||r.code||""].join("+")).join(" / "),a=!!s.action&&Array.isArray(s.bindings),i=!!n[s.id],l=a?`<button type="button" class="shortcut-capture-btn" data-shortcut-action="capture" title="Capture new binding">Edit</button>
62
+ <button type="button" class="shortcut-reset-btn" data-shortcut-action="reset" title="Reset to default"${i?"":" disabled"}>Reset</button>
63
+ <input class="shortcut-enabled-checkbox" type="checkbox" ${s.disabled?"":"checked"} data-shortcut-action="toggle" title="Enable/disable">`:"";return`<div class="shortcut-setting-row${a?"":" shortcut-setting-row--fixed"}" data-shortcut-id="${escapeHtml(s.id)}">
64
+ <label class="shortcut-setting-label">${escapeHtml(s.label)}</label>
65
+ <input class="shortcut-binding-input" type="text" readonly value="${escapeHtml(o)}" placeholder="(none)" data-id="${escapeHtml(s.id)}">
66
+ ${l}
67
+ </div>`}).join(""),this._wireShortcutSettingsList(e)},_wireShortcutSettingsList(e){e.dataset.shortcutListenersAdded||(e.dataset.shortcutListenersAdded="true",e.addEventListener("click",t=>{const n=t.target?.closest?.("[data-shortcut-action]");if(!n)return;const s=n.closest?.("[data-shortcut-id]")?.dataset?.shortcutId;s&&(n.dataset.shortcutAction==="capture"?this.startShortcutCapture(s):n.dataset.shortcutAction==="reset"&&this.resetShortcutOverride(s))}),e.addEventListener("change",t=>{const n=t.target;if(!n?.matches?.('[data-shortcut-action="toggle"]'))return;const s=n.closest?.("[data-shortcut-id]")?.dataset?.shortcutId;s&&this.toggleShortcutEnabled(s,n.checked)}))},readShortcutOverridesFromSettings(){return this.loadAppSettingsFromStorage().shortcutOverrides||{}},startShortcutCapture(e){const t=document.querySelector(`.shortcut-binding-input[data-id="${e}"]`);if(!t)return;t.value="Press keys\u2026",t.focus(),this._capturingShortcutId=e;const n=s=>{s.preventDefault(),s.stopPropagation(),!(s.key==="Control"||s.key==="Shift"||s.key==="Alt"||s.key==="Meta")&&(t.removeEventListener("keydown",n),this.onShortcutCaptureKeydown(s,e))};t.addEventListener("keydown",n)},onShortcutCaptureKeydown(e,t){if(e.preventDefault(),e.stopPropagation(),this._capturingShortcutId=null,e.key==="Escape"){this.renderShortcutSettingsList();return}if(!e.ctrlKey&&!e.metaKey&&!e.altKey){this.renderShortcutSettingsList(),this.showToast?.("Shortcut must include Ctrl, Cmd, or Alt","error");return}const n=[];e.ctrlKey&&n.push("ctrl"),e.metaKey&&n.push("meta"),e.shiftKey&&n.push("shift"),e.altKey&&n.push("alt");const s=this.loadAppSettingsFromStorage(),o={...s.shortcutOverrides||{}};o[t]={...o[t]||{},bindings:[{modifiers:n,key:e.key,code:e.code}]},s.shortcutOverrides=o,this.saveAppSettingsToStorage(s),this.renderShortcutSettingsList()},resetShortcutOverride(e){const t=this.loadAppSettingsFromStorage(),n={...t.shortcutOverrides||{}};delete n[e],t.shortcutOverrides=n,this.saveAppSettingsToStorage(t),this.renderShortcutSettingsList()},toggleShortcutEnabled(e,t){const n=this.loadAppSettingsFromStorage(),s={...n.shortcutOverrides||{}};s[e]={...s[e]||{},disabled:!t},n.shortcutOverrides=s,this.saveAppSettingsToStorage(n),this.renderShortcutSettingsList()},closeAllPanels(){this.closeSessionOptions(),this.closeAppSettings(),this.cancelCloseSession(),this.closeTokenStats(),document.getElementById("monitorPanel").classList.remove("open");const e=document.getElementById("subagentsPanel");e&&e.classList.remove("open"),this.subagentPanelVisible=!1}});