Skip to content

Commit 7464ff5

Browse files
bennyliiclaude
andcommitted
feat: add session continuation fields to type definitions
Add providerSessionId, parentMessageId, historyHash to SessionRecord. Add providerSessionId, parentMessageId to ChatCompletionRequest. Sync renderer-side SessionRecord types. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 7261867 commit 7464ff5

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/main/proxy/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ export interface ChatCompletionRequest {
102102
tool_choice?: ChatCompletionToolChoice
103103
/** Tool format - determines response format for tool calls */
104104
tool_format?: 'native' | 'json' | 'auto'
105+
/** Provider-side session ID (for multi-turn conversation continuation) */
106+
providerSessionId?: string
107+
/** Provider-side last message ID (for parent_message_id injection) */
108+
parentMessageId?: string
105109
}
106110

107111
/**

src/main/store/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ export interface SessionRecord {
326326
title?: string
327327
tokenCount?: number
328328
}
329+
/** Provider-side session/conversation ID */
330+
providerSessionId?: string
331+
/** Provider-side last message ID (for parent_message_id) */
332+
parentMessageId?: string
333+
/** History fingerprint for session lookup */
334+
historyHash?: string
329335
}
330336

331337
/**

src/renderer/src/types/electron.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,19 @@ interface SessionRecord {
299299
id: string
300300
providerId: string
301301
accountId: string
302-
providerSessionId: string
302+
providerSessionId?: string
303303
parentMessageId?: string
304+
historyHash?: string
304305
sessionType: 'chat' | 'agent'
305306
messages: any[]
306307
createdAt: number
307308
lastActiveAt: number
308309
status: 'active' | 'expired' | 'deleted'
309310
model?: string
311+
metadata?: {
312+
title?: string
313+
tokenCount?: number
314+
}
310315
}
311316

312317
interface SessionAPI {

0 commit comments

Comments
 (0)