diff options
Diffstat (limited to 'src/components/PromptAI.tsx')
| -rw-r--r-- | src/components/PromptAI.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/PromptAI.tsx b/src/components/PromptAI.tsx index 5fb9942..6b4616d 100644 --- a/src/components/PromptAI.tsx +++ b/src/components/PromptAI.tsx @@ -4,7 +4,7 @@ import { Input } from '@/components/ui/input'; export const PromptAI = ({ type, theme }: { type: string, theme: string }) => { - const placeholder = type === 'ask ai' ? "Prompt..." : "Define..." + const placeholder = type.startsWith('ask') ? "Prompt..." : "Define..." const [inputValue, setInputValue] = useState(''); const [hitEnter, setHitEnter] = useState(false) @@ -15,8 +15,10 @@ export const PromptAI = ({ type, theme }: { type: string, theme: string }) => { askAI(inputValue, "") } else if (type === 'define') { defineWord(inputValue) - } else if (type === 'ask with context') { - askWithContext(inputValue) + } else if (type === 'ask with page context') { + askWithContext(inputValue, 'page') + } else if (type === 'ask with block context') { + askWithContext(inputValue, 'block') } } }, [hitEnter]) |
