Persist agent chat sessions and protect manual titles
Agent CI/CD / docker-image (push) Successful in 28s
Agent CI/CD / deploy-fallback-log (push) Has been skipped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-21 17:33:48 +08:00
parent 5d80961930
commit f7122d1260
7 changed files with 318 additions and 6 deletions
+5
View File
@@ -75,6 +75,11 @@ const normalizeGeneratedTitle = (rawTitle: string, fallback: string) => {
return normalized.length > 24 ? `${normalized.slice(0, 24)}...` : normalized;
};
export const shouldGenerateSessionTitle = (options: {
recentTurnCount: number;
isTitleManuallyEdited: boolean;
}) => options.recentTurnCount <= 1 && !options.isTitleManuallyEdited;
export const generateSessionTitle = async (
runtime: OpencodeRuntimeAdapter,
options: {