format
This commit is contained in:
@@ -28,7 +28,7 @@ export const useStore = create<Store>()(
|
||||
setConversationTitle: (conversationTitle) =>
|
||||
set((stateDraft) => {
|
||||
const conversation = stateDraft.conversations.find(
|
||||
(c) => c.id === stateDraft.selectedConversationId,
|
||||
(c) => c.id === stateDraft.selectedConversationId
|
||||
);
|
||||
if (conversation) {
|
||||
conversation.title = conversationTitle;
|
||||
@@ -46,9 +46,9 @@ export const useStore = create<Store>()(
|
||||
set((stateDraft) => {
|
||||
stateDraft.conversations.splice(
|
||||
stateDraft.conversations.findIndex(
|
||||
(conversation) => conversation.id === conversationId,
|
||||
(conversation) => conversation.id === conversationId
|
||||
),
|
||||
1,
|
||||
1
|
||||
);
|
||||
}),
|
||||
setMessages: (messages) =>
|
||||
@@ -80,14 +80,14 @@ export const useStore = create<Store>()(
|
||||
set((stateDraft) => {
|
||||
stateDraft.facts.splice(
|
||||
stateDraft.facts.findIndex((fact) => fact.id === factId),
|
||||
1,
|
||||
1
|
||||
);
|
||||
}),
|
||||
removeFactTrigger: (factTriggerId) =>
|
||||
set((stateDraft) => {
|
||||
stateDraft.factTriggers.splice(
|
||||
stateDraft.factTriggers.findIndex((ft) => ft.id === factTriggerId),
|
||||
1,
|
||||
1
|
||||
);
|
||||
}),
|
||||
setLoading: (loading) =>
|
||||
@@ -102,5 +102,5 @@ export const useStore = create<Store>()(
|
||||
set((stateDraft) => {
|
||||
stateDraft.isSendingMessage = isSending;
|
||||
}),
|
||||
})),
|
||||
}))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user