Persist agent chat sessions and protect manual titles
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user