diff --git a/src/components/editor/AiAssistant.vue b/src/components/editor/AiAssistant.vue index 8ed7a9b91a..e0bb72843c 100644 --- a/src/components/editor/AiAssistant.vue +++ b/src/components/editor/AiAssistant.vue @@ -35,6 +35,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { ScrollArea } from "@/components/ui/scroll-area"; @@ -368,9 +369,9 @@ async function persistConversation() { }).catch(() => {}); } -async function loadConversationList() { - conversations.value = await loadAiConversations().catch(() => []); - showConversationList.value = true; +async function setConversationListOpen(open: boolean) { + showConversationList.value = open; + if (open) conversations.value = await loadAiConversations().catch(() => []); } function selectConversation(conv: AiConversation) { @@ -467,16 +468,47 @@ function formatInlineText(text: string): string { - + + + + + +
+ {{ t("history.title") }} + +
+
+ {{ t("history.empty") }} +
+
+
+ {{ conv.title }} + +
+
+
+
@@ -488,27 +520,6 @@ function formatInlineText(text: string): string { -
-
- {{ t("history.empty") }} -
-
- {{ conv.title }} - -
-
-