feat: send session prompt once

This commit is contained in:
Peter Steinberger
2025-11-25 23:52:38 +01:00
parent d924b7d283
commit 2e3b8a03aa
7 changed files with 121 additions and 13 deletions

View File

@@ -17,6 +17,8 @@ export type SessionConfig = {
sessionArgNew?: string[];
sessionArgResume?: string[];
sessionArgBeforeBody?: boolean;
sendSystemOnce?: boolean;
sessionIntro?: string;
};
export type LoggingConfig = {
@@ -73,6 +75,8 @@ const ReplySchema = z
sessionArgNew: z.array(z.string()).optional(),
sessionArgResume: z.array(z.string()).optional(),
sessionArgBeforeBody: z.boolean().optional(),
sendSystemOnce: z.boolean().optional(),
sessionIntro: z.string().optional(),
})
.optional(),
claudeOutputFormat: z

View File

@@ -8,7 +8,11 @@ import { CONFIG_DIR, normalizeE164 } from "../utils.js";
export type SessionScope = "per-sender" | "global";
export type SessionEntry = { sessionId: string; updatedAt: number };
export type SessionEntry = {
sessionId: string;
updatedAt: number;
systemSent?: boolean;
};
export const SESSION_STORE_DEFAULT = path.join(CONFIG_DIR, "sessions.json");
export const DEFAULT_RESET_TRIGGER = "/new";