Merge pull request #570 from azade-c/feat/sessions-label

feat(sessions): expose label in sessions.list and support label lookup in sessions_send
This commit is contained in:
Peter Steinberger
2026-01-09 14:44:23 +00:00
committed by GitHub
24 changed files with 396 additions and 58 deletions

View File

@@ -1010,6 +1010,10 @@ export async function persistInlineDirectives(params: {
agentCfg,
} = params;
let { provider, model } = params;
const activeAgentId = sessionKey
? resolveAgentIdFromSessionKey(sessionKey)
: resolveDefaultAgentId(cfg);
const agentDir = resolveAgentDir(cfg, activeAgentId);
if (sessionEntry && sessionStore && sessionKey) {
let updated = false;

View File

@@ -91,7 +91,7 @@ export async function ensureSkillSnapshot(params: {
systemSent: true,
skillsSnapshot: skillSnapshot,
};
sessionStore[sessionKey] = nextEntry;
sessionStore[sessionKey] = { ...sessionStore[sessionKey], ...nextEntry };
if (storePath) {
await saveSessionStore(storePath, sessionStore);
}
@@ -123,7 +123,7 @@ export async function ensureSkillSnapshot(params: {
updatedAt: Date.now(),
skillsSnapshot,
};
sessionStore[sessionKey] = nextEntry;
sessionStore[sessionKey] = { ...sessionStore[sessionKey], ...nextEntry };
if (storePath) {
await saveSessionStore(storePath, sessionStore);
}

View File

@@ -264,7 +264,7 @@ export async function initSessionState(params: {
ctx.MessageThreadId,
);
}
sessionStore[sessionKey] = sessionEntry;
sessionStore[sessionKey] = { ...sessionStore[sessionKey], ...sessionEntry };
await saveSessionStore(storePath, sessionStore);
const sessionCtx: TemplateContext = {