Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "call-md",
"version": "1.0.2",
"version": "1.0.3",
"type": "commonjs",
"description": "Call.md - Record meetings with real-time transcription and AI-powered insights",
"author": {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/components/history/RecordingDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export function RecordingDetailPage({ recordingId, onBack }: RecordingDetailPage
{/* Chat with Video Button */}
<div className="flex justify-center">
<ChatWithVideoButton
title={title}
videoId={recording.videoId}
collectionId={collectionId}
disabled={!isVideoReady}
Expand Down Expand Up @@ -533,15 +534,16 @@ function VideoPlayerSection({ playerUrl, isReady }: VideoPlayerSectionProps) {
}

interface ChatWithVideoButtonProps {
title: string
videoId: string | null | undefined;
collectionId: string | null | undefined;
disabled: boolean;
}

function ChatWithVideoButton({ videoId, collectionId, disabled }: ChatWithVideoButtonProps) {
function ChatWithVideoButton({ title, videoId, collectionId, disabled }: ChatWithVideoButtonProps) {
const handleClick = () => {
if (!videoId || !collectionId) return;
const chatUrl = `https://chat.videodb.io?video_id=${videoId}&collection_id=${collectionId}`;
const chatUrl = `https://chat.videodb.io?video_id=${videoId}&collection_id=${collectionId}&prompt=${title}`;
window.electronAPI?.app.openExternalLink(chatUrl);
};

Expand Down
7 changes: 0 additions & 7 deletions src/renderer/widget/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function WidgetApp() {
});
const [sayThis, setSayThis] = useState<InsightCard[]>([]);
const [askThis, setAskThis] = useState<InsightCard[]>([]);
const [visualDescription, setVisualDescription] = useState<string>('');
const [nudge, setNudge] = useState<Nudge | null>(null);

useEffect(() => {
Expand All @@ -39,18 +38,13 @@ export function WidgetApp() {
setAskThis(data.askThis);
});

const unsubVisual = api.onVisualAnalysis((data) => {
setVisualDescription(data.description);
});

const unsubNudge = api.onNudge((n) => {
setNudge(n);
});

return () => {
unsubSession();
unsubLiveAssist();
unsubVisual();
unsubNudge();
};
}, []);
Expand Down Expand Up @@ -106,7 +100,6 @@ export function WidgetApp() {
<WidgetContent
sayThis={sayThis}
askThis={askThis}
visualDescription={visualDescription}
nudge={nudge}
onDismissCard={handleDismissCard}
onDismissNudge={handleDismissNudge}
Expand Down
29 changes: 19 additions & 10 deletions src/renderer/widget/components/WidgetContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { VisualAnalysisCard } from './VisualAnalysisCard';
import React, { useEffect, useRef } from 'react';
import { SayThisCard } from './SayThisCard';
import { AskThisCard } from './AskThisCard';
import { EmptyState } from './EmptyState';
Expand All @@ -21,7 +20,6 @@ interface Nudge {
interface WidgetContentProps {
sayThis: InsightCard[];
askThis: InsightCard[];
visualDescription: string;
nudge?: Nudge | null;
onDismissCard: (type: 'sayThis' | 'askThis', id: string) => void;
onDismissNudge?: () => void;
Expand All @@ -46,18 +44,34 @@ function getInterleavedCards(
export function WidgetContent({
sayThis,
askThis,
visualDescription,
nudge,
onDismissCard,
onDismissNudge,
}: WidgetContentProps) {
const hasCards = sayThis.length > 0 || askThis.length > 0;
const isEmpty = !hasCards && !visualDescription;
const isEmpty = !hasCards;

const interleavedCards = getInterleavedCards(sayThis, askThis);

const containerRef = useRef<HTMLDivElement>(null);
const lastScrollTimeRef = useRef<number>(0);

const handleScroll = () => {
lastScrollTimeRef.current = Date.now();
};

// Auto-scroll to top when new cards arrive (if user hasn't scrolled recently)
useEffect(() => {
const timeSinceLastScroll = Date.now() - lastScrollTimeRef.current;
if (timeSinceLastScroll > 2000 && containerRef.current) {
containerRef.current.scrollTo({ top: 0, behavior: 'smooth' });
}
}, [sayThis, askThis]);

return (
<div
ref={containerRef}
onScroll={handleScroll}
className="flex-1 min-h-0 flex flex-col overflow-y-auto"
style={{
padding: '20px 16px',
Expand All @@ -76,11 +90,6 @@ export function WidgetContent({
<EmptyState />
) : (
<>
{/* Visual Analysis - sticky at top */}
{visualDescription && (
<VisualAnalysisCard description={visualDescription} />
)}

{/* Interleaved Say This / Ask This cards */}
{interleavedCards.map(({ type, card }) =>
type === 'sayThis' ? (
Expand Down