mirror of
https://github.com/mksglu/context-mode.git
synced 2026-09-19 03:27:16 +08:00
c56afc99e4
Replace `node ./node_modules/context-mode/hooks/...` with `context-mode hook <platform> <event>`. All platforms now use `npm install -g context-mode` as prerequisite. MCP server configs use `context-mode` directly instead of `npx -y context-mode`. This ensures ctx-upgrade persists across sessions (no ephemeral npx cache). - Add `hook` subcommand to CLI with HOOK_MAP dispatcher - Update all adapter buildHookCommand() to use CLI dispatcher - Update all adapter configureAllHooks() and generateHookConfig() - Update all config templates (gemini-cli, vscode-copilot, opencode, codex) - Update README install instructions for all platforms Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1010 B
JSON
50 lines
1010 B
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/google-gemini/gemini-cli/main/packages/core/src/schema/settings-schema.json",
|
|
"hooks": {
|
|
"BeforeTool": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "context-mode hook gemini-cli beforetool"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"AfterTool": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "context-mode hook gemini-cli aftertool"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PreCompress": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "context-mode hook gemini-cli precompress"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"SessionStart": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "context-mode hook gemini-cli sessionstart"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|