mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(codex): import and resume sessions from runners (#1088)
* fix codex import resume flow * fix hub restart session active state * fix codex transcript workspace scoping * Address Codex import review findings * Fix Codex import machine selection * Update Codex sessions error test * Address Codex import review findings * Preserve forked Codex session id on sync * Make Codex duplicate cleanup source-aware * Handle Codex archive failures * Limit existing session flag to Codex * Preserve Codex import machine binding * fix: rebase runner Codex import onto current main * fix: preserve runner-scoped Codex import behavior --------- Co-authored-by: syy <815728149@qq.com>
This commit is contained in:
@@ -171,6 +171,7 @@ export type CodexDesktopScriptResponse = {
|
||||
syncedCount?: number
|
||||
// 中文注释:这里存放本次导入对应的 Codex thread ID 列表,方便日志和排查 direct import 结果。
|
||||
sessionIds?: string[]
|
||||
hapiSessionIds?: string[]
|
||||
}
|
||||
|
||||
export type CodexLocalSessionSummary = {
|
||||
@@ -182,16 +183,41 @@ export type CodexLocalSessionSummary = {
|
||||
modifiedAt: number
|
||||
originator?: string | null
|
||||
cliVersion?: string | null
|
||||
source?: string | null
|
||||
threadSource?: string | null
|
||||
forkedFromId?: string | null
|
||||
}
|
||||
|
||||
export type CodexLocalSessionsResponse = {
|
||||
success: true
|
||||
sessions: CodexLocalSessionSummary[]
|
||||
machineId?: string
|
||||
} | {
|
||||
success: false
|
||||
error: string
|
||||
sessions: []
|
||||
machineId?: string
|
||||
}
|
||||
|
||||
|
||||
export type CodexArchiveSessionResponse = {
|
||||
success: true
|
||||
archivedPath: string
|
||||
machineId?: string
|
||||
} | {
|
||||
success: false
|
||||
error: string
|
||||
machineId?: string
|
||||
}
|
||||
|
||||
export type CodexDesktopSyncRequest = {
|
||||
// 中文注释:前端弹窗直接提交 Codex thread ID,后端会按这些 transcript 直接导入到 Hapi。
|
||||
sessionIds: string[]
|
||||
cwd?: string | null
|
||||
machineId?: string | null
|
||||
model?: string | null
|
||||
modelReasoningEffort?: string | null
|
||||
yolo?: boolean
|
||||
}
|
||||
|
||||
export type CodexDesktopStatusResponse = {
|
||||
|
||||
Reference in New Issue
Block a user