Add Command Code lifecycle hook plugin support#176
Conversation
- package and stage the Command Code plugin assets - install lifecycle hooks and map hook events to Lightcode intents - propagate a denylist-safe hook nonce and set optimistic working on submit - refresh Command Code terminal heuristics and add install/intent tests
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1eadbdb2f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (existing !== null || existsSync(settingsPath)) { | ||
| writeHooksJsonFile(settingsPath, removeCommandCodeHooks(existing)); |
There was a problem hiding this comment.
Avoid overwriting malformed Command Code settings on uninstall
When ~/.commandcode/settings.json exists but is invalid JSON, parseExistingHooksJson() returns null, this condition still enters because existsSync(settingsPath) is true, and removeCommandCodeHooks(null) writes {} back to the file. That means a user who clicks uninstall while their settings file is temporarily malformed loses all existing Command Code settings instead of leaving the file untouched or reporting the parse failure.
Useful? React with 👍 / 👎.
PreToolUse,PostToolUse, andStopinto Lightcode intents to keep thread status aligned with Command Code sessions.workingoptimistically on submit when the hook plugin is active so status updates feel immediate.