Plugins: add sessionKey to session lifecycle hooks

This commit is contained in:
tempeste
2026-02-25 18:32:58 +08:00
committed by Peter Steinberger
parent 16fd604219
commit 20c15ccc63
3 changed files with 15 additions and 8 deletions

View File

@@ -647,10 +647,12 @@ export async function initSessionState(params: {
.runSessionEnd(
{
sessionId: previousSessionEntry.sessionId,
sessionKey,
messageCount: 0,
},
{
sessionId: previousSessionEntry.sessionId,
sessionKey,
agentId: resolveSessionAgentId({ sessionKey, config: cfg }),
},
)
@@ -664,10 +666,12 @@ export async function initSessionState(params: {
.runSessionStart(
{
sessionId: effectiveSessionId,
sessionKey,
resumedFrom: previousSessionEntry?.sessionId,
},
{
sessionId: effectiveSessionId,
sessionKey,
agentId: resolveSessionAgentId({ sessionKey, config: cfg }),
},
)