Files
496b84ac59 feat(adapter): add JetBrains Copilot adapter (#321)
Full HookAdapter implementation for JetBrains IDEs (IntelliJ IDEA,
PyCharm, WebStorm, GoLand, etc.) with GitHub Copilot plugin.

Shares the same Copilot agent runtime as VS Code Copilot — same hook
events (PreToolUse, PostToolUse, PreCompact, SessionStart), same
hookSpecificOutput wrapper format, same .github/hooks/ config location.

Key differences from VS Code Copilot:
- Session storage: ~/.config/JetBrains/context-mode/sessions/
- MCP config: via Settings UI (not .vscode/mcp.json)
- Detection: IDEA_INITIAL_DIRECTORY, IDEA_HOME, JETBRAINS_CLIENT_ID
- Client map: JetBrains Client, IntelliJ IDEA, PyCharm

All 4 blockers from PR #327 review fixed:
1. CLI HOOK_MAP registered (setup/upgrade/doctor work)
2. Hook scripts use parseStdin (not JSON.parse)
3. JETBRAINS_OPTS has configDirEnv field
4. No bundle files committed

26 files changed: 3 adapter source, 4 hook scripts, 6 test files,
4 docs, 2 configs, CLI + formatters + tool-naming + session-helpers.
1794 tests pass, typecheck clean.

Closes #321

Co-Authored-By: Murat Aslan <murataslan1@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 21:37:50 +03:00

17 lines
490 B
JSON

{
"hooks": {
"PreToolUse": [
{ "type": "command", "command": "context-mode hook jetbrains-copilot pretooluse" }
],
"PostToolUse": [
{ "type": "command", "command": "context-mode hook jetbrains-copilot posttooluse" }
],
"PreCompact": [
{ "type": "command", "command": "context-mode hook jetbrains-copilot precompact" }
],
"SessionStart": [
{ "type": "command", "command": "context-mode hook jetbrains-copilot sessionstart" }
]
}
}