Thanks to visit codestin.com
Credit goes to cmux.com

ស្ដារវគ្គ

cmux រក្សាទម្រង់ការងាររបស់អ្នក ដើម្បីឲ្យការបើក app ឡើងវិញនាំ window, workspace, pane, terminal context និង browser state ដដែលត្រឡប់មកវិញ។

អ្វីដែល cmux ស្ដារ

បន្ទាប់ពីបើកឡើងវិញ cmux ស្ដារ layout និង metadata ដែល app គ្រប់គ្រង៖

  • layout របស់ window, workspace និង pane
  • working directory
  • terminal scrollback តាម best effort
  • Browser URL និង navigation history
cmux មិន checkpoint state របស់ live process ទូទៅទេ។ tmux, vim, shell និង terminal app ដែលមិនគាំទ្រ បើកឡើងវិញជាទម្រង់ terminal ធម្មតា លុះត្រាតែវាមាន cmux resume integration ផ្ទាល់ខ្លួន។

បន្ត agent session

AI coding agent ដែលគាំទ្រ អាច resume បានពេល cmux បានចាប់យក native session ID របស់ agent។ ដំឡើង hooks បន្ទាប់ពីដំឡើង agent CLI ដើម្បីឲ្យ binary ស្ថិតនៅលើ PATH៖

cmux hooks setup
cmux hooks setup codex
cmux hooks setup grok
cmux hooks setup antigravity
cmux hooks setup omp
cmux hooks setup --agent opencode

cmux hooks setup ដំឡើង integration ដែលគាំទ្រទាំងអស់ដែលរកឃើញ ហើយបង្ហាញសង្ខេប agent ដែលបានរំលង។ ប្រើឈ្មោះ agent បើចង់បាន integration តែមួយ។

command surface resume ផ្ទាល់ខ្លួន

អ្នកប្រើប្រាស់កម្រិតខ្ពស់ និង integration អាច bind terminal surface ណាមួយទៅ restart command។ cmux រក្សាទុក binding ដែលបង្កើតដោយ public CLI ឬ socket សម្រាប់ពិនិត្យ និង resume ដោយដៃ។

cmux surface resume set --kind tmux --checkpoint work --shell "tmux attach -t work"
cmux surface resume show --json
cmux surface resume clear --checkpoint work

prefix ដែលបាន approve អាចពិនិត្យ ឬកែបាននៅ Settings > Terminal > Resume Commands។ cmux auto-run តែ resume binding ដែលវាសម្គាល់ថា trusted ប៉ុណ្ណោះ ដូចជា tmux binding ដែលរកឃើញពី live process ឬ prefix ដែល user បាន approve។ cmux នៅតែមិន checkpoint process memory ទូទៅទេ។ environment key ដែលមានភាពរសើប ដូចជា token, password, secret និង API key នឹងត្រូវបានដកចេញ មុនពេលរក្សាទុក resume binding។ Approval ក៏ភ្ជាប់ជាមួយ working directory និងតម្លៃ environment ពិតប្រាកដ ប្រសិនបើមាន។

agent ដែលគាំទ្រ

AgentBinaryResume commandFeed bridge
Claude Codeclaudeclaude --resume <id>PermissionRequest
Codexcodexcodex resume <id>PreToolUse, PermissionRequest
Grok / Grok Build CLIgrokgrok -r <id>PreToolUse
OpenCodeopencodeopencode --session <id>plugin event bus
Pipipi --session <id>គ្មាន
OMPompomp --session <id>គ្មាន
Ampampamp threads continue <id>គ្មាន
Cursor CLIcursor-agentcursor-agent --resume <id>beforeShellExecution
Geminigeminigemini --resume <id>PreToolUse
Antigravity CLIagyagy --conversation <id>PreToolUse, PostToolUse
Rovo Devacliacli rovodev run --restore <id>គ្មាន
Hermes Agenthermeshermes --resume <id>pre_tool_call, post_tool_call, pre_approval_request, post_approval_response
Copilotcopilotcopilot --resume <id>PreToolUse
CodeBuddycodebuddycodebuddy --resume <id>PreToolUse
Factorydroiddroid --resume <id>PreToolUse
Qoderqodercliqodercli --resume <id>PreToolUse

Claude Code ត្រូវបានគ្រប់គ្រងដោយ cmux Claude wrapper នៅពេលបើក Claude integration ក្នុង Settings។ Antigravity ក៏ទទួល agy ជា setup alias ហើយ Rovo Dev ទទួល rovo។

ស្ដារដោយដៃ

cmux ស្ដារ snapshot ចុងក្រោយដែលបានរក្សាទុក ពេលបើកធម្មតា។ អ្នកក៏អាច apply snapshot មុនដោយដៃបាន៖

  • History > Restore Previous App Launch
  • ⌘ ⇧ O
  • cmux restore-session

បិទ automatic agent resume

ដើម្បីស្ដារ pane ដោយមិនបើក command resume របស់ agent ដែលបានរក្សាទុក សូមបិទ Settings > Terminal > Resume Agent Sessions on Reopen ឬកំណត់៖

~/.config/cmux/cmux.json
{
  "terminal": {
    "autoResumeAgentSessions": false
  }
}

វាបិទតែ command resume របស់ agent ប៉ុណ្ណោះ។ cmux នៅតែស្ដារ layout, working directory, scrollback និង browser history។

របៀបដំណើរការ

  1. cmux សរសេរ JSON snapshot មាន version ទៅ ~/Library/Application Support/cmux/session-<bundle-id>.json និង previous-session cache សម្រាប់ reopen ដោយដៃ។
  2. Terminal scrollback ត្រូវបានរក្សាទុកជាអត្ថបទមានដែនកំណត់ ហើយ replay តាម temporary file ពេលស្ដារ។ វាជា best effort ព្រោះ terminal app អាច redraw ឬ clear អេក្រង់បាន។
  3. Agent hooks សរសេរ ~/.cmuxterm/<agent>-hook-sessions.json ជាមួយ agent session ID, cmux workspace ID, surface ID, cwd, process ID បើមាន និង sanitized launch command។
  4. ពេលស្ដារ cmux សាងសង់ window និង pane មុន។ បើ automatic agent resume បើក វាបើក one-shot shell command ដែលរត់ native resume command របស់ agent ជាមួយ session ID ដែលបានរក្សាទុក។

ឯកសារ configuration ធម្មតាគ្របដណ្តប់ cmux.json។ Session restore រក្សា app layout ផ្សេងពី Ghostty terminal rendering settings។