42861ea7fa
Multi-adapter mobile UI for AI coding assistants. Supports Claude Code, Codex CLI, and Gemini CLI through one interface. Features: - Real-time bidirectional sync via tmux + WebSocket - Cross-AI review (send one AI's output to another for review) - Multi-review tabs with minimize/expand - Push notifications (PWA) with smart session-aware filtering - Three-channel event system (hooks, file watcher, pane monitor) - Voice input, image paste, draft persistence - Terminal-native design (JetBrains Mono, dark theme, pixel art claw) - CLI with --adapter flag on every command - Zero-overhead fire-and-forget hooks
22 lines
735 B
TypeScript
22 lines
735 B
TypeScript
// server/adapters/init.ts
|
|
import { register, getAdapterConfig } from './registry.js';
|
|
|
|
const LOADERS: Record<string, () => Promise<any>> = {
|
|
claude: () => import('./claude/index.js').then(m => m.ClaudeAdapter),
|
|
codex: () => import('./codex/index.js').then(m => m.CodexAdapter),
|
|
gemini: () => import('./gemini/index.js').then(m => m.GeminiAdapter),
|
|
};
|
|
|
|
const { enabledAdapters } = getAdapterConfig();
|
|
|
|
for (const id of enabledAdapters) {
|
|
const loader = LOADERS[id];
|
|
if (!loader) { console.warn(`[init] Unknown adapter: ${id}`); continue; }
|
|
try {
|
|
const AdapterClass = await loader();
|
|
register(AdapterClass);
|
|
} catch (err) {
|
|
console.warn(`[init] Failed to load adapter ${id}: ${(err as Error).message}`);
|
|
}
|
|
}
|