feat: update Makelore modules and conversations
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export interface ChatViewPreferences {
|
||||
showThinking: boolean;
|
||||
showTimestamps: boolean;
|
||||
/** Include reasoning, tool summaries, and execution narration in exports. */
|
||||
includeExecution: boolean;
|
||||
}
|
||||
|
||||
type ChatViewPreferencePatch = Partial<ChatViewPreferences>;
|
||||
@@ -10,6 +12,7 @@ export const CHAT_VIEW_PREFERENCES_STORAGE_KEY = 'makelore.chat-view-preferences
|
||||
export const DEFAULT_CHAT_VIEW_PREFERENCES: ChatViewPreferences = {
|
||||
showThinking: true,
|
||||
showTimestamps: true,
|
||||
includeExecution: false,
|
||||
};
|
||||
|
||||
function browserStorage(): Storage | undefined {
|
||||
@@ -38,6 +41,9 @@ function readStoredPreferences(storage: Storage | undefined): StoredChatViewPref
|
||||
...(typeof record.showTimestamps === 'boolean'
|
||||
? { showTimestamps: record.showTimestamps }
|
||||
: {}),
|
||||
...(typeof record.includeExecution === 'boolean'
|
||||
? { includeExecution: record.includeExecution }
|
||||
: {}),
|
||||
};
|
||||
}
|
||||
} catch {
|
||||
@@ -59,6 +65,9 @@ export function loadChatViewPreferences(
|
||||
showTimestamps: typeof candidate?.showTimestamps === 'boolean'
|
||||
? candidate.showTimestamps
|
||||
: DEFAULT_CHAT_VIEW_PREFERENCES.showTimestamps,
|
||||
includeExecution: typeof candidate?.includeExecution === 'boolean'
|
||||
? candidate.includeExecution
|
||||
: DEFAULT_CHAT_VIEW_PREFERENCES.includeExecution,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,6 +84,9 @@ export function saveChatViewPreferences(
|
||||
showTimestamps: typeof patch.showTimestamps === 'boolean'
|
||||
? patch.showTimestamps
|
||||
: current.showTimestamps,
|
||||
includeExecution: typeof patch.includeExecution === 'boolean'
|
||||
? patch.includeExecution
|
||||
: current.includeExecution,
|
||||
};
|
||||
if (!storage) return next;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user