From f818469d226f4cfb7307b5d690ee929cae4ea084 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 21 Oct 2025 11:48:35 +0800 Subject: [PATCH] feat(ChatInput): enhance placeholder to reflect entry context and add missing import --- .../src/modules/ai-chat/components/layouts/ChatInput.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInput.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInput.tsx index 4af6b940b..b4af6df49 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInput.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInput.tsx @@ -16,6 +16,7 @@ import { getCommand } from "~/modules/command/hooks/use-command" import { useCommandShortcut } from "~/modules/command/hooks/use-command-binding" import { FileUploadPlugin, MentionPlugin, ShortcutPlugin } from "../../editor" +import { useMainEntryId } from "../../hooks/useMainEntryId" import { AIPanelRefsContext } from "../../store/AIChatContext" import { useChatActions, useChatScene, useChatStatus } from "../../store/hooks" import { AIChatSendButton } from "./AIChatSendButton" @@ -48,6 +49,7 @@ interface ChatInputProps extends VariantProps { export const ChatInput = memo(({ onSend, variant, ref: forwardedRef }: ChatInputProps) => { const status = useChatStatus() const chatActions = useChatActions() + const mainEntryId = useMainEntryId() const stop = useCallback(() => { chatActions.stop() @@ -141,7 +143,11 @@ export const ChatInput = memo(({ onSend, variant, ref: forwardedRef }: ChatInput