Skip to content

Commit

Permalink
fix(chat): fix prompt counter when creating new prompt (Issue #705) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kezik authored and mikitabut committed Feb 14, 2024
1 parent 9ded656 commit 5e6c705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/chat/src/store/prompts/prompts.epics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
splitEntityId,
updateMovedFolderId,
} from '@/src/utils/app/folders';
import { getRootId } from '@/src/utils/app/id';
import { getRootId, isRootId } from '@/src/utils/app/id';
import {
exportPrompt,
exportPrompts,
Expand Down Expand Up @@ -80,7 +80,7 @@ const createNewPromptEpic: AppEpic = (action$, state$) =>
const newPrompt: Prompt = addGeneratedPromptId({
name: getNextDefaultName(
DEFAULT_PROMPT_NAME,
prompts.filter((prompt) => !prompt.folderId),
prompts.filter((prompt) => isRootId(prompt.folderId)),
),
description: '',
content: '',
Expand Down

0 comments on commit 5e6c705

Please sign in to comment.