feat: add Gemini CLI, OpenCode, and Windsurf IDE integrations
Gemini CLI: platform adapter mapping 6 of 11 hooks, settings.json deep-merge installer, GEMINI.md context injection. OpenCode: plugin with tool.execute.after interceptor, bus events for session lifecycle, claude_mem_search custom tool, AGENTS.md context. Windsurf: platform adapter for tool_info envelope format, hooks.json installer for 5 post-action hooks, .windsurf/rules context injection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ function enablePluginInClaudeSettings(): void {
|
||||
// IDE setup dispatcher
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function setupIDEs(selectedIDEs: string[]): void {
|
||||
async function setupIDEs(selectedIDEs: string[]): Promise<void> {
|
||||
for (const ideId of selectedIDEs) {
|
||||
switch (ideId) {
|
||||
case 'claude-code':
|
||||
@@ -99,6 +99,39 @@ function setupIDEs(selectedIDEs: string[]): void {
|
||||
p.log.info(` Run: npx claude-mem cursor-setup (coming soon)`);
|
||||
break;
|
||||
|
||||
case 'gemini-cli': {
|
||||
const { installGeminiCliHooks } = await import('../../services/integrations/GeminiCliHooksInstaller.js');
|
||||
const geminiResult = await installGeminiCliHooks();
|
||||
if (geminiResult === 0) {
|
||||
p.log.success('Gemini CLI: hooks installed.');
|
||||
} else {
|
||||
p.log.error('Gemini CLI: hook installation failed.');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'opencode': {
|
||||
const { installOpenCodeIntegration } = await import('../../services/integrations/OpenCodeInstaller.js');
|
||||
const openCodeResult = await installOpenCodeIntegration();
|
||||
if (openCodeResult === 0) {
|
||||
p.log.success('OpenCode: plugin installed.');
|
||||
} else {
|
||||
p.log.error('OpenCode: plugin installation failed.');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'windsurf': {
|
||||
const { installWindsurfHooks } = await import('../../services/integrations/WindsurfHooksInstaller.js');
|
||||
const windsurfResult = await installWindsurfHooks();
|
||||
if (windsurfResult === 0) {
|
||||
p.log.success('Windsurf: hooks installed.');
|
||||
} else {
|
||||
p.log.error('Windsurf: hook installation failed.');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
const allIDEs = detectInstalledIDEs();
|
||||
const ide = allIDEs.find((i) => i.id === ideId);
|
||||
@@ -350,7 +383,7 @@ export async function runInstallCommand(options: InstallOptions = {}): Promise<v
|
||||
]);
|
||||
|
||||
// IDE-specific setup
|
||||
setupIDEs(selectedIDEs);
|
||||
await setupIDEs(selectedIDEs);
|
||||
|
||||
// Summary
|
||||
const summaryLines = [
|
||||
|
||||
Reference in New Issue
Block a user