mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-24 22:10:59 +00:00
refactor(codex): extract session management and launcher logic into separate modules
Reorganized runCodex.ts to improve maintainability by extracting: - CodexSession class for session lifecycle management - CodexLocalLauncher and CodexRemoteLauncher for mode-specific initialization - CodexEventConverter for MCP message handling and UI buffer updates - CodexSessionScanner for resume file discovery - emitReadyIfIdle utility for ready event emission Added codexSessionId field to metadata schema for session tracking. Updated UI components to work with refactored architecture.
This commit is contained in:
@@ -16,6 +16,7 @@ export type Metadata = {
|
||||
}
|
||||
machineId?: string
|
||||
claudeSessionId?: string
|
||||
codexSessionId?: string
|
||||
tools?: string[]
|
||||
slashCommands?: string[]
|
||||
homeDir: string
|
||||
@@ -44,6 +45,7 @@ export const MetadataSchema = z.object({
|
||||
}).optional(),
|
||||
machineId: z.string().optional(),
|
||||
claudeSessionId: z.string().optional(),
|
||||
codexSessionId: z.string().optional(),
|
||||
tools: z.array(z.string()).optional(),
|
||||
slashCommands: z.array(z.string()).optional(),
|
||||
homeDir: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user