Skip to content

Commit

Permalink
fix: don't clear changedPrompt #1419 (#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikbry authored Dec 18, 2024
1 parent 6d46a4f commit a3ba1c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/features/Threads/Prompt/PromptContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ function PromptProvider({
const handleUpdatePrompt = useCallback(
async (prompt: ParsedPrompt | undefined, conversationName = getDefaultConversationName(t)) => {
if (prompt?.raw === '' && tempConversationId) {
setChangedPrompt(undefined);
// setChangedPrompt(undefined);
await updateConversations(conversations.filter((c) => !c.temp));
onUpdateTempConversation(undefined);
return;
}
const conversation = getConversation(conversationId, conversations) as Conversation;
if (conversation && comparePrompts(conversation.currentPrompt, prompt)) {
setChangedPrompt(undefined);
// setChangedPrompt(undefined);
return;
}
let updatedConversations: Conversation[] | undefined;
Expand Down Expand Up @@ -252,7 +252,7 @@ function PromptProvider({
if (updatedConversations) {
await updateConversations(updatedConversations);
}
setChangedPrompt(undefined);
// setChangedPrompt(undefined);
},
[
t,
Expand Down

0 comments on commit a3ba1c9

Please sign in to comment.