mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(codex): defer session persistence until user activity
This commit is contained in:
+13
-11
@@ -15,17 +15,6 @@ import type {
|
||||
} from './schemas'
|
||||
import type { SessionSummary } from './sessionSummary'
|
||||
|
||||
export const CreateOrLoadSessionRequestSchema = z.object({
|
||||
tag: z.string().min(1),
|
||||
metadata: z.unknown(),
|
||||
agentState: z.unknown().nullable().optional(),
|
||||
model: z.string().optional(),
|
||||
modelReasoningEffort: z.string().optional(),
|
||||
effort: z.string().optional()
|
||||
})
|
||||
|
||||
export type CreateOrLoadSessionRequest = z.infer<typeof CreateOrLoadSessionRequestSchema>
|
||||
|
||||
export const CreateOrLoadMachineRequestSchema = z.object({
|
||||
id: z.string().min(1),
|
||||
metadata: z.unknown(),
|
||||
@@ -34,6 +23,19 @@ export const CreateOrLoadMachineRequestSchema = z.object({
|
||||
|
||||
export type CreateOrLoadMachineRequest = z.infer<typeof CreateOrLoadMachineRequestSchema>
|
||||
|
||||
export const CreateOrLoadSessionRequestSchema = z.object({
|
||||
id: z.string().uuid().optional(),
|
||||
tag: z.string().min(1),
|
||||
metadata: z.unknown(),
|
||||
agentState: z.unknown().nullable().optional(),
|
||||
model: z.string().optional(),
|
||||
modelReasoningEffort: z.string().optional(),
|
||||
effort: z.string().optional(),
|
||||
machine: CreateOrLoadMachineRequestSchema.optional()
|
||||
})
|
||||
|
||||
export type CreateOrLoadSessionRequest = z.infer<typeof CreateOrLoadSessionRequestSchema>
|
||||
|
||||
export const CliMessagesResponseSchema = z.object({
|
||||
messages: z.array(z.object({
|
||||
id: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user