diff --git a/screenpipe-app-tauri/components/meeting-history.tsx b/screenpipe-app-tauri/components/meeting-history.tsx index bbe758e56..559b13f73 100644 --- a/screenpipe-app-tauri/components/meeting-history.tsx +++ b/screenpipe-app-tauri/components/meeting-history.tsx @@ -12,7 +12,7 @@ import { OpenAI } from "openai"; import { useSettings } from "@/lib/hooks/use-settings"; import { useToast } from "./ui/use-toast"; import ReactMarkdown from "react-markdown"; -import { X, Activity, Copy } from "lucide-react"; // Import the X icon and Activity icon for live meetings +import { X, Activity, Copy, StopCircle } from "lucide-react"; // Import the X icon and Activity icon for live meetings import { useInterval } from "@/lib/hooks/use-interval"; // Add this import import { usePostHog } from "posthog-js/react"; import debounce from "lodash/debounce"; @@ -57,6 +57,7 @@ interface Meeting { name: string | null; participants: string | null; summary: string | null; + isStopped?: boolean; } interface AudioContent { @@ -498,7 +499,10 @@ export default function MeetingHistory() { const isLiveMeeting = (meeting: Meeting) => { const lastTranscriptionTime = new Date(meeting.meeting_end); const now = new Date(); - return now.getTime() - lastTranscriptionTime.getTime() < 1 * 60 * 1000; + return ( + now.getTime() - lastTranscriptionTime.getTime() < 1 * 60 * 1000 && + !meeting.isStopped + ); }; // Add this useInterval hook @@ -516,6 +520,33 @@ export default function MeetingHistory() { }); }; + function stopLiveMeeting(meetingGroup: number) { + const updatedMeetings = meetings.map((meeting) => { + if (meeting.meeting_group === meetingGroup) { + return { + ...meeting, + meeting_end: new Date().toISOString(), + isStopped: true, + }; + } + return meeting; + }); + + setMeetings(updatedMeetings); + + const newLiveMeetings = new Set(liveMeetings); + newLiveMeetings.delete(meetingGroup); + setLiveMeetings(newLiveMeetings); + + toast({ + title: "meeting stopped", + description: "the live meeting has been marked as ended.", + }); + + // update local storage + setItem("meetings", updatedMeetings); + } + return ( @@ -525,14 +556,14 @@ export default function MeetingHistory() { - + meeting and conversation history experimental - +

this page provides transcriptions and summaries of your daily meetings. it uses your ai settings and custom prompt to generate @@ -540,8 +571,8 @@ export default function MeetingHistory() { know" might be transcription errors. for better accuracy, consider using deepgram as the engine or adjust your custom prompt to ignore these. -
-
+

+

make sure to setup your ai settings

@@ -582,14 +613,25 @@ export default function MeetingHistory() { )}
{sortedMeetings.map((meeting, index) => ( -
+
{isLiveMeeting(meeting) && ( -
- - live +
+
+ + live +
+
)} -

+

{`meeting ${new Date( meeting.meeting_start ).toLocaleDateString()}, ${new Date( @@ -598,54 +640,23 @@ export default function MeetingHistory() { meeting.meeting_end ).toLocaleTimeString()}`}

-

- participants: {meeting.participants || ""} +

+

+ participants: {meeting.participants || "not identified"} +

{!meeting.participants && ( )} -

- {isLiveMeeting(meeting) ? ( -

- summary not available for live meetings -

- ) : meeting.summary ? ( -
-

- summary: - -

- - {meeting.summary} - -
- ) : ( - - )} -
-

+

+
+

full transcription:

-
+                      
                         {meeting.full_transcription}
                       
+ {isLiveMeeting(meeting) ? ( +

+ summary not available for live meetings +

+ ) : ( +
+

+ summary: + {meeting.summary && ( + + )} +

+ {meeting.summary ? ( + + {meeting.summary} + + ) : ( + + )} +
+ )}
))}
diff --git a/screenpipe-app-tauri/components/search-chat.tsx b/screenpipe-app-tauri/components/search-chat.tsx index 0d1cfdb1c..02554d217 100644 --- a/screenpipe-app-tauri/components/search-chat.tsx +++ b/screenpipe-app-tauri/components/search-chat.tsx @@ -612,7 +612,7 @@ ${queryParams.toString().replace(/&/g, "\\\n&")}" | jq`; setQuery(e.target.value)} autoCorrect="off"