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
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
export const WS = {
|
|
// Client → Server
|
|
QUERY: 'query',
|
|
PERMISSION_RESPONSE: 'permission-response',
|
|
ASK_RESPONSE: 'ask-response',
|
|
ABORT: 'abort',
|
|
RECONNECT: 'reconnect',
|
|
SET_PERMISSION_MODE: 'set-permission-mode',
|
|
SET_MODEL: 'set-model',
|
|
PLAN_RESPONSE: 'plan-response',
|
|
// Server → Client
|
|
SESSION_STATE: 'session-state',
|
|
SESSION_CREATED: 'session-created',
|
|
TEXT_DELTA: 'text-delta',
|
|
THINKING: 'thinking',
|
|
TOOL_START: 'tool-start',
|
|
TOOL_DONE: 'tool-done',
|
|
MESSAGE_COMPLETE: 'message-complete',
|
|
TOOL_UPDATES: 'tool-updates',
|
|
TURN_COMPLETE: 'turn-complete',
|
|
PERMISSION_REQUEST: 'permission-request',
|
|
PERMISSION_DISMISSED: 'permission-dismissed',
|
|
HISTORY_LOAD: 'history-load',
|
|
STATUS_UPDATE: 'status-update',
|
|
MODE_UPDATED: 'mode-updated',
|
|
COMPACTING: 'compacting',
|
|
COMPACT_DONE: 'compact-done',
|
|
SESSION_ERROR: 'session-error',
|
|
SESSION_ENDED: 'session-ended',
|
|
CLIENT_ID: 'client-id',
|
|
PENDING_NOTIFICATIONS: 'pending-notifications',
|
|
ERROR: 'error',
|
|
// Cross-AI Review
|
|
REVIEW_STARTED: 'review-started',
|
|
REVIEW_ENDED: 'review-ended',
|
|
} as const;
|
|
|
|
export type WsType = typeof WS[keyof typeof WS];
|
|
|
|
/**
|
|
* CLI plan approval selector option indices (ExitPlanMode).
|
|
* Claude Code v2.1.x shows 3 options:
|
|
* 0: "Yes, auto-accept edits" → BYPASS
|
|
* 1: "Yes, manually approve edits" → MANUALLY_APPROVE
|
|
* 2: "Type here to tell Claude what to change" → TEXT_FEEDBACK
|
|
*/
|
|
export const PLAN_OPTION = {
|
|
BYPASS: 0,
|
|
MANUALLY_APPROVE: 1,
|
|
TEXT_FEEDBACK: 2,
|
|
} as const;
|