v1.0.215
✨ New: cockpit codegraph — unified entry for all 10 graph endpoints
v1.0.214 shipped 10 CodeGraph HTTP endpoints but only exposed cock affected at the CLI surface. That asymmetry is gone — every endpoint now has a CLI subcommand under a single dispatcher:
cockpit codegraph search callers callees impact file coedit
context related risk affected
Each subcommand has full --help with Usage / Purpose / Flags / Output / Stderr / Exit codes / Examples, so an LLM agent can pre-construct grep / awk pipelines without trial-and-error. --as-jest was renamed to the generic --as-cmd <runner> (jest / "vitest run" / "pytest -v" / …) so the binary doesn't lie about being Jest-specific in mixed-language projects.
✨ New: /cc slash mode — drive the cockpit CLI from chat
Sister to /cg. Teaches the agent what cockpit / cock / cockpit-dev can do, pointing at each subcommand's --help as the canonical reference (no prompt drift). Trailing user text gets labeled 任务: / Task: to prime the action-execution mindset. Typical usage:
/cc cockpit terminal bmfb 看错误日志
/cc cockpit browser vxvk 给我截屏并描述页面
Type / in the chat to see it in the autocomplete dropdown, between /cg and /skill-name.
✨ New: cockpit-dev binary + setup-dev selective symlink
cock-dev is renamed to cockpit-dev everywhere — symmetry with the prod cockpit / cock pair (no short alias on purpose; production stability wants the prod/dev split to be loud). For CLI development, npm run setup-dev selectively symlinks only cockpit-dev to local source, leaving the npm-installed prod cockpit untouched. Unlike npm link (which clobbers both bins), this lets you edit bin/*.mjs live and still npm install -g @surething/cockpit@latest to upgrade prod without disturbing the dev symlink. No more npm unlink / install -g dance.
🐛 Fix: cockpit browser type no longer silently no-ops on React SPAs
cockpit browser <id> type <ref> "text" used to report success on contenteditable / React-controlled inputs (tiptap, ProseMirror, Lexical) even when CDP Input.dispatchKeyEvent was a no-op against the React state machine. Two fixes:
- Post-type verification. After the type call returns, the CLI evaluates
document.activeElementand checks that the live.value/.textContentactually contains what was typed. Mismatch → exit1with a copy-pasteableevaluatetemplate tailored to the input's shape (contenteditableinsertText/ React setter +inputevent dispatch / etc.). - Cheat sheet upfront.
cockpit browser <id>(no args) now opens with a "React / SPA gotchas" section + 3 evaluate templates ready to copy, and thetype/click/filllines carry inline ⚠ markers. The same task that took 15 bash calls to debug across two earlier sessions now lands in 5.
🐛 Fix: cockpit terminal <id> --help no longer rejected
cockpit terminal <id> --help used to error with Unknown flag: --help because the meta-page handler whitelisted only --json. The meta page is the help for that bubble, so <id> and <id> --help (and -h) now behave identically.
🐛 Fix: markdown — fenced blocks preserved + Prism token classes isolated
Two related fixes for chat-rendered markdown that mishandled mixed content:
- The GFM table-pipe escape pass used to run across the entire input, including ```markdown / ~~~ fenced examples. A snippet showing literal
| col1 | \a|b` |` would get its inner `|` silently rewritten — corrupting the verbatim source the user clearly meant to display. Fenced blocks are now masked before substitution and restored after. react-syntax-highlighter's Prism markdown grammar emits class names literally —<span class="token table table-header-row">— and Tailwind ships a.table { display: table }utility class with the same name. Insidelanguage-markdownblocks, every Prism token (table,code,list,title, …) was getting forced todisplay: table, breaking each cell onto its own line. A scoped reset (code[class*="language-"] .token { display: inline }) keeps Prism tokens inline without affecting other places that use Tailwind's.tableutility.
📚 Docs
README + README.zh.md were still advertising the v1.0.213-retired /review / /commit slash commands and 6 CodeGraph endpoints (v1.0.214 shipped 10). Pulled both into sync: slash-mode list is /qa /fx /ex /go /cg /cc, the CodeGraph section names the 4 new analytics endpoints (context / related / risk / affected, powered by PageRank · PPR · TF-IDF · Louvain, zero training), and ~/.claude/commands/*.md references are replaced with the current "drop a SKILL.md via the Skills sidebar" convention.
🌐 Site
opencockpit.dev got an SEO pass:
- Homepage meta description trimmed from 339 → 157 chars so it fits Google SERP without truncation; introduced a separate
hero.metaDescriptionfield so the visible Hero copy stays untouched. /docspage gained a real description + OpenGraph + Twitter card (was bare).- All per-locale routes now mirror
og:localeviaog:locale:alternate(en_US ↔ zh_CN). hreflang="x-default"added on blog list / blog post / changelog / docs.- Keywords expanded 26 → 72: CodeGraph / Code Map / per-engine GUI long-tails (Codex / DeepSeek / Kimi / Ollama) /
Cline alternative/Windsurf alternative/GitHub Copilot alternative+ the corresponding ZH variants (代码图谱/智能气泡/AI 编辑器/Codex 中文/ …).