feat: Add ability to navigate through message history with arrows and persist message draft setting (#335)
* feat(chat): add message history navigation in ChatInput * feat: Adds settng to persist draft of messages to local storage to save work if page refreshes or crashes
This commit is contained in:
@@ -74,6 +74,7 @@ interface UIStore {
|
||||
notifyOnSubtasks: boolean;
|
||||
|
||||
showTerminalQuickKeysOnDesktop: boolean;
|
||||
persistChatDraft: boolean;
|
||||
|
||||
setTheme: (theme: 'light' | 'dark' | 'system') => void;
|
||||
toggleSidebar: () => void;
|
||||
@@ -133,6 +134,7 @@ interface UIStore {
|
||||
setNotificationMode: (mode: 'always' | 'hidden-only') => void;
|
||||
setShowTerminalQuickKeysOnDesktop: (value: boolean) => void;
|
||||
setNotifyOnSubtasks: (value: boolean) => void;
|
||||
setPersistChatDraft: (value: boolean) => void;
|
||||
openMultiRunLauncher: () => void;
|
||||
openMultiRunLauncherWithPrompt: (prompt: string) => void;
|
||||
}
|
||||
@@ -196,6 +198,7 @@ export const useUIStore = create<UIStore>()(
|
||||
notifyOnSubtasks: true,
|
||||
|
||||
showTerminalQuickKeysOnDesktop: false,
|
||||
persistChatDraft: true,
|
||||
|
||||
setTheme: (theme) => {
|
||||
set({ theme });
|
||||
@@ -681,6 +684,10 @@ export const useUIStore = create<UIStore>()(
|
||||
setNotifyOnSubtasks: (value) => {
|
||||
set({ notifyOnSubtasks: value });
|
||||
},
|
||||
|
||||
setPersistChatDraft: (value) => {
|
||||
set({ persistChatDraft: value });
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: 'ui-store',
|
||||
@@ -718,6 +725,7 @@ export const useUIStore = create<UIStore>()(
|
||||
notificationMode: state.notificationMode,
|
||||
showTerminalQuickKeysOnDesktop: state.showTerminalQuickKeysOnDesktop,
|
||||
notifyOnSubtasks: state.notifyOnSubtasks,
|
||||
persistChatDraft: state.persistChatDraft,
|
||||
})
|
||||
}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user