fix(chat): restore forked context
This commit is contained in:
@@ -212,6 +212,11 @@ export const buildPromptWithLearningContext = async (
|
||||
.join("\n\n");
|
||||
};
|
||||
|
||||
export const shouldRestoreConversationForRuntime = (options: {
|
||||
hadExistingSessionRecord: boolean;
|
||||
runtimeHasConversation: boolean;
|
||||
}) => !options.hadExistingSessionRecord || !options.runtimeHasConversation;
|
||||
|
||||
const buildRestoredConversationContext = (recentTurns: SessionTurnRecord[]) => {
|
||||
const formattedTurns = recentTurns
|
||||
.slice(-RESTORE_TURN_LIMIT)
|
||||
|
||||
Reference in New Issue
Block a user