diff --git a/.flow/tasks/fn-1.6.json b/.flow/tasks/fn-1.6.json index d9a59d0a..55af1c0d 100644 --- a/.flow/tasks/fn-1.6.json +++ b/.flow/tasks/fn-1.6.json @@ -1,14 +1,23 @@ { - "assignee": null, + "assignee": "igor.loskutoff@gmail.com", "claim_note": "", - "claimed_at": null, + "claimed_at": "2026-01-13T00:52:01.366013Z", "created_at": "2026-01-12T22:41:17.835044Z", "depends_on": [], "epic": "fn-1", + "evidence": { + "commits": [ + "d5a77087594b3b54150e78466132f2dfa001901b" + ], + "prs": [], + "tests": [ + "pnpm tsc --noEmit" + ] + }, "id": "fn-1.6", "priority": null, "spec_path": ".flow/tasks/fn-1.6.md", - "status": "todo", + "status": "done", "title": "Chat dialog component", - "updated_at": "2026-01-12T22:41:17.835218Z" + "updated_at": "2026-01-13T00:58:52.502248Z" } diff --git a/.flow/tasks/fn-1.6.md b/.flow/tasks/fn-1.6.md index fac31e49..98b46255 100644 --- a/.flow/tasks/fn-1.6.md +++ b/.flow/tasks/fn-1.6.md @@ -7,9 +7,11 @@ TBD - [ ] TBD ## Done summary -TBD - +- Created TranscriptChatModal component with Dialog UI +- Added TranscriptChatButton floating action button +- Implemented message display with streaming indicator +- Added input field with Enter key support ## Evidence -- Commits: -- Tests: -- PRs: +- Commits: d5a77087594b3b54150e78466132f2dfa001901b +- Tests: pnpm tsc --noEmit +- PRs: \ No newline at end of file diff --git a/www/app/(app)/transcripts/TranscriptChatModal.tsx b/www/app/(app)/transcripts/TranscriptChatModal.tsx new file mode 100644 index 00000000..93872dae --- /dev/null +++ b/www/app/(app)/transcripts/TranscriptChatModal.tsx @@ -0,0 +1,93 @@ +"use client"; + +import { useState } from "react"; +import { Box, Dialog, Input, IconButton } from "@chakra-ui/react"; +import { MessageCircle } from "lucide-react"; +import type { Message } from "./useTranscriptChat"; + +interface TranscriptChatModalProps { + open: boolean; + onClose: () => void; + messages: Message[]; + sendMessage: (text: string) => void; + isStreaming: boolean; + currentStreamingText: string; +} + +export function TranscriptChatModal({ + open, + onClose, + messages, + sendMessage, + isStreaming, + currentStreamingText, +}: TranscriptChatModalProps) { + const [input, setInput] = useState(""); + + const handleSend = () => { + if (!input.trim()) return; + sendMessage(input); + setInput(""); + }; + + return ( + !e.open && onClose()}> + + + + Transcript Chat + + + {messages.map((msg) => ( + + {msg.text} + + ))} + + {isStreaming && ( + + {currentStreamingText} + + ▊ + + + )} + + + + setInput(e.target.value)} + onKeyDown={(e) => e.key === "Enter" && handleSend()} + placeholder="Ask about transcript..." + disabled={isStreaming} + /> + + + + + ); +} + +export function TranscriptChatButton({ onClick }: { onClick: () => void }) { + return ( + + + + ); +}