feat(chat): show playful teacher introductions on hover

This commit is contained in:
鲨鱼辣椒 committed 2026-09-28 12:12:10 +08:00
1 parent b26e25c9ed
commit 772da4f8e4
16 files changed
+433 -62

No files matched your search

+3 -1
View File
@@ -47,6 +47,7 @@ export interface AgentBrowserPanelProps {
onOpenChange(open: boolean): void;
embedded?: boolean;
teacherBubble?: HTMLElement | null;
teacherIntroduction?: HTMLElement | null;
conversationId?: string | null;
onWorkConversation?(conversation: CodingConversationMetadata): void;
workRevision?: number;
@@ -133,6 +134,7 @@ export function AgentBrowserPanel({
onOpenChange,
embedded = false,
teacherBubble,
teacherIntroduction,
conversationId,
onWorkConversation,
workRevision,
@@ -149,7 +151,7 @@ export function AgentBrowserPanel({
const [events, setEvents] = useState<AgentBrowserCdpEvent[]>([]);
const viewportRef = useRef<HTMLDivElement | null>(null);
const panelRef = useRef<HTMLElement | null>(null);
usePreviewClearance(panelRef, viewportRef, teacherBubble, embedded && open);
usePreviewClearance(panelRef, viewportRef, teacherBubble, embedded && open, teacherIntroduction);
const addressInputRef = useRef<HTMLInputElement | null>(null);
const eventCursorRef = useRef(0);
const snapshotGenerationRef = useRef(0);