@@ -4,7 +4,7 @@ import { browser } from '$app/environment';
44
55const conversationKey = "conversation" ;
66const conversationUserStatesKey = "conversation_user_states" ;
7- const conversationSearchStatesKey = "conversation_search_states " ;
7+ const conversationSearchOptionKey = "conversation_search_option " ;
88const conversationUserMessageKey = "conversation_user_messages" ;
99
1010/** @type {Writable<import('$types').UserModel> } */
@@ -95,22 +95,22 @@ const createConversationUserStateStore = () => {
9595
9696export const conversationUserStateStore = createConversationUserStateStore ( ) ;
9797
98- const createConversationSearchStateStore = ( ) => {
98+ const createConversationSearchOptionStore = ( ) => {
9999 return {
100100 reset : ( ) => {
101- localStorage . removeItem ( conversationSearchStatesKey ) ;
101+ localStorage . removeItem ( conversationSearchOptionKey ) ;
102102 } ,
103103 get : ( ) => {
104- const json = localStorage . getItem ( conversationSearchStatesKey ) ;
105- return json ? JSON . parse ( json ) : [ ] ;
104+ const json = localStorage . getItem ( conversationSearchOptionKey ) ;
105+ return json ? JSON . parse ( json ) : { } ;
106106 } ,
107107 put : ( value ) => {
108- localStorage . setItem ( conversationSearchStatesKey , JSON . stringify ( value ) ) ;
108+ localStorage . setItem ( conversationSearchOptionKey , JSON . stringify ( value ) ) ;
109109 }
110110 }
111111} ;
112112
113- export const conversationSearchStateStore = createConversationSearchStateStore ( ) ;
113+ export const conversationSearchOptionStore = createConversationSearchOptionStore ( ) ;
114114
115115
116116const createConversationUserMessageStore = ( ) => {
0 commit comments