Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

release-app refactor main page UI

Louis Beaumont7b85fe443626
diff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsx
index 6054fb6e1..ffae4d1eb 100644
--- a/screenpipe-app-tauri/app/page.tsx
+++ b/screenpipe-app-tauri/app/page.tsx
@@ -53,7 +53,8 @@ export default function Home() {
{showOnboarding && <Onboarding />}
<ChangelogDialog />
<Header />
- <div className="p-8">
+ <div className="h-[32px]"/>
+ <div className=" w-[90%]">
<PipeStore />
</div>
</div>
diff --git a/screenpipe-app-tauri/bun.lockb b/screenpipe-app-tauri/bun.lockb
index 257a0cb4d..3bd3e9ce9 100755
Binary files a/screenpipe-app-tauri/bun.lockb and b/screenpipe-app-tauri/bun.lockb differ
diff --git a/screenpipe-app-tauri/components/auth.tsx b/screenpipe-app-tauri/components/auth.tsx
index 9f487934a..18b464ac2 100644
--- a/screenpipe-app-tauri/components/auth.tsx
+++ b/screenpipe-app-tauri/components/auth.tsx
@@ -6,6 +6,8 @@ import { useEffect, useState } from "react";
import { useUser } from "@/lib/hooks/use-user";
import { Avatar, AvatarFallback } from "./ui/avatar";
import posthog from "posthog-js";
+import { DropdownMenuItem } from "./ui/dropdown-menu";
+import { LogIn } from "lucide-react";
export function AuthButton() {
const { isSignedIn, user } = useUser();
@@ -27,17 +29,14 @@ export function AuthButton() {
return (
<div>
{isSignedIn ? (
- <Button variant="ghost" onClick={handleSignIn}>
- <Avatar>
- <AvatarFallback>
- {user?.email.charAt(0).toUpperCase()}
- </AvatarFallback>
- </Avatar>
- </Button>
+ <span className="p-2 text-sm text-muted-foreground select-none [-webkit-user-select:none]">
+ {user?.email}
+ </span>
) : (
- <Button variant="outline" onClick={handleSignIn}>
- sign in
- </Button>
+ <DropdownMenuItem className="cursor-pointer" onClick={handleSignIn}>
+ <LogIn className="mr-2 h-4 w-4" />
+ <span>sign in</span>
+ </DropdownMenuItem>
)}
</div>
);
diff --git a/screenpipe-app-tauri/components/dev-mode-settings.tsx b/screenpipe-app-tauri/components/dev-mode-settings.tsx
index 64ed1da49..e779c0192 100644
--- a/screenpipe-app-tauri/components/dev-mode-settings.tsx
+++ b/screenpipe-app-tauri/components/dev-mode-settings.tsx
@@ -231,9 +231,7 @@ export const DevModeSettings = ({ localDataDir }: { localDataDir: string }) => {
</Card>
<div className="relative">
- <Badge className="bg-white text-gray-800 hover:bg-white/80 text-xs absolute -top-3 left-1/2 transform -translate-x-1/2 z-10">
- expert only
- </Badge>
+
<Card className="p-8">
<CardContent>
<div className="flex items-center space-x-2">
diff --git a/screenpipe-app-tauri/components/header.tsx b/screenpipe-app-tauri/components/header.tsx
index 9474456c2..ad93ff82c 100644
--- a/screenpipe-app-tauri/components/header.tsx
+++ b/screenpipe-app-tauri/components/header.tsx
@@ -12,6 +12,9 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuGroup,
} from "@/components/ui/dropdown-menu";
import {
MessageSquare,
@@ -21,6 +24,7 @@ import {
Play,
Folder,
Search,
+ Book,
} from "lucide-react";
import { open } from "@tauri-apps/plugin-shell";
import {
@@ -46,12 +50,16 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { Calendar } from "lucide-react";
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { useUser } from "@/lib/hooks/use-user";
+import { AuthButton } from "./auth";
export default function Header() {
const [showInbox, setShowInbox] = useState(false);
const [messages, setMessages] = useState<Message[]>([]);
const { health } = useHealthCheck();
const { settings } = useSettings();
+ const { user } = useUser();
// const isLoading = !health;
const isLoading = false; // ! testing - had issue with this before
@@ -136,83 +144,124 @@ export default function Header() {
</div>
<div className="flex space-x-4 absolute top-4 right-4">
<HealthStatus className="mt-3 cursor-pointer" />
- <Settings />
<Button
variant="ghost"
size="icon"
className="cursor-pointer"
onClick={() => setShowInbox(!showInbox)}
>
- <Bell className="h-[1.2rem] w-[1.2rem]" />
+ <Bell className="h-4 w-4" />
<span className="sr-only">notifications</span>
</Button>
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="cursor-pointer">
- <Menu className="h-[1.2rem] w-[1.2rem]" />
- <span className="sr-only">menu</span>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="cursor-pointer rounded-full h-8 w-8 p-0"
+ >
+ <Avatar>
+ <AvatarImage
+ src={user?.photoURL || "/avatar-placeholder.png"}
+ alt={user?.displayName || "user avatar"}
+ />
+ <AvatarFallback>
+ {user?.displayName
+ ? user.displayName
+ .split(" ")
+ .map((n) => n[0])
+ .join("")
+ .toUpperCase()
+ .slice(0, 2)
+ : "SP"}
+ </AvatarFallback>
+ </Avatar>
+ <span className="sr-only">user menu</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="mr-4" align="end">
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={handleShowSearch}
- disabled={!health || health.status === "error"}
- >
- <Search className="mr-2 h-4 w-4" />
- <span>search</span>
- </DropdownMenuItem>
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={handleShowTimeline}
- disabled={
- !settings.enableFrameCache ||
- !health ||
- health.status === "error"
- }
- >
- <Clock className="mr-2 h-4 w-4" />
- <span>timeline</span>
- </DropdownMenuItem>
- <DropdownMenuItem className="cursor-pointer p-0">
- <MeetingHistory />
- </DropdownMenuItem>
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={() =>
- open(
- "mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe"
- )
- }
- >
- <MessageSquare className="mr-2 h-4 w-4" />
- <span>send feedback</span>
- </DropdownMenuItem>
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={() =>
- open(
- "https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20..."
- )
- }
- >
- <Heart className="mr-2 h-4 w-4" />
- <span>support us</span>
- </DropdownMenuItem>
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={() => setShowOnboarding(true)}
- >
- <Play className="mr-2 h-4 w-4" />
- <span>show onboarding</span>
- </DropdownMenuItem>
- <DropdownMenuItem
- className="cursor-pointer"
- onClick={() => setShowChangelogDialog(true)}
- >
- <Folder className="mr-2 h-4 w-4" />
- <span>show changelog</span>
- </DropdownMenuItem>
+ <DropdownMenuLabel>account</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuGroup>
+ <AuthButton />
+ <DropdownMenuSeparator />
+ <Settings />
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuGroup>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={handleShowSearch}
+ disabled={!health || health.status === "error"}
+ >
+ <Search className="mr-2 h-4 w-4" />
+ <span>search</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={handleShowTimeline}
+ disabled={
+ !settings.enableFrameCache ||
+ !health ||
+ health.status === "error"
+ }
+ >
+ <Clock className="mr-2 h-4 w-4" />
+ <span>timeline</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem className="cursor-pointer p-0">
+ <MeetingHistory />
+ </DropdownMenuItem>
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuGroup>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() => open("https://docs.screenpi.pe")}
+ >
+ <Book className="mr-2 h-4 w-4" />
+ <span>check docs</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() =>
+ open(
+ "mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe"
+ )
+ }
+ >
+ <MessageSquare className="mr-2 h-4 w-4" />
+ <span>send feedback</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() =>
+ open(
+ "https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20..."
+ )
+ }
+ >
+ <Heart className="mr-2 h-4 w-4" />
+ <span>support us</span>
+ </DropdownMenuItem>
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuGroup>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() => setShowOnboarding(true)}
+ >
+ <Play className="mr-2 h-4 w-4" />
+ <span>show onboarding</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() => setShowChangelogDialog(true)}
+ >
+ <Folder className="mr-2 h-4 w-4" />
+ <span>show changelog</span>
+ </DropdownMenuItem>
+ </DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
</div>
diff --git a/screenpipe-app-tauri/components/inbox-messages.tsx b/screenpipe-app-tauri/components/inbox-messages.tsx
index aa6bbb8af..327f2ef5d 100644
--- a/screenpipe-app-tauri/components/inbox-messages.tsx
+++ b/screenpipe-app-tauri/components/inbox-messages.tsx
@@ -1,6 +1,14 @@
-import React, { useState, useRef, useEffect } from "react";
+import React, {
+ useState,
+ useRef,
+ useEffect,
+ useCallback,
+ lazy,
+ Suspense,
+} from "react";
import { ScrollArea } from "@/components/ui/scroll-area";
import { Button } from "@/components/ui/button";
+import { useVirtualizer } from "@tanstack/react-virtual";
import {
X,
ChevronDown,
@@ -50,6 +58,125 @@ interface InboxMessagesProps {
onClose: () => void;
}
+const MessageCard = React.memo(
+ ({
+ message,
+ onDelete,
+ onExpand,
+ expandedMessages,
+ toggleMessageExpansion,
+ handleAction,
+ formatDate,
+ }: any) => (
+ <Card
+ className={`mb-4 w-full ${
+ message.read ? "bg-secondary/50" : "bg-background"
+ }`}
+ >
+ <CardHeader className="flex flex-row items-center justify-between py-2">
+ <div className="flex items-center space-x-2 flex-1 mr-2 max-w-[70%]">
+ <Bot className="h-4 w-4 flex-shrink-0 text-muted-foreground" />
+ <h3 className="text-sm font-semibold truncate" title={message.title}>
+ {message.title}
+ </h3>
+ </div>
+ <span className="text-xs text-muted-foreground whitespace-nowrap">
+ {formatDate(message.date)}
+ </span>
+ </CardHeader>
+ <CardContent className="py-2">
+ <div className="w-full overflow-hidden">
+ <Suspense fallback={<div>loading...</div>}>
+ <MemoizedReactMarkdown
+ className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 w-[35vw] text-sm"
+ remarkPlugins={[remarkGfm, remarkMath]}
+ components={{
+ p: ({ children }) => (
+ <p className="mb-2 last:mb-0">{children}</p>
+ ),
+ a: ({ href, children, ...props }) => {
+ const isExternal =
+ href?.startsWith("http") || href?.startsWith("https");
+ return (
+ <a
+ href={href}
+ target={isExternal ? "_blank" : undefined}
+ rel={isExternal ? "noopener noreferrer" : undefined}
+ className="break-all text-blue-500 hover:underline"
+ {...props}
+ >
+ {children}
+ </a>
+ );
+ },
+ }}
+ >
+ {expandedMessages.has(message.id)
+ ? message.body || ""
+ : message.body?.length > 150
+ ? `${message.body.slice(0, 150)}...`
+ : message.body || ""}
+ </MemoizedReactMarkdown>
+ </Suspense>
+ </div>
+ {message.body && message.body.length > 150 && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => toggleMessageExpansion(message.id)}
+ className="text-xs mt-2"
+ >
+ {expandedMessages.has(message.id) ? (
+ <>
+ <ChevronUp className="mr-1 h-4 w-4" />
+ show less
+ </>
+ ) : (
+ <>
+ <ChevronDown className="mr-1 h-4 w-4" />
+ show more
+ </>
+ )}
+ </Button>
+ )}
+ </CardContent>
+ <CardFooter className="flex justify-end space-x-2 py-2">
+ {message.actions?.map((action: InboxMessageAction) => (
+ <Button
+ key={`${message.id}-${action.action}`}
+ variant="outline"
+ size="sm"
+ onClick={() => handleAction(action.action, action.port)}
+ className="text-xs"
+ >
+ {action.label}
+ </Button>
+ ))}
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => onDelete(message.id)}
+ className="text-xs"
+ >
+ <X className="mr-1 h-4 w-4" />
+ dismiss
+ </Button>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => onExpand(message)}
+ className="text-xs"
+ >
+ <Maximize2 className="mr-1 h-4 w-4" />
+ expand
+ </Button>
+ </CardFooter>
+ </Card>
+ )
+);
+
+MessageCard.displayName = "MessageCard";
+
export function InboxMessages({
messages,
onMessageRead,
@@ -62,18 +189,26 @@ export function InboxMessages({
const [dialogMessage, setDialogMessage] = useState<Message | null>(null);
const [dialogOpen, setDialogOpen] = useState(false);
const inboxRef = useRef<HTMLDivElement>(null);
+ const parentRef = useRef<HTMLDivElement>(null);
+
+ const unreadMessages = messages.filter((msg) => !msg.read);
- console.log("messages", messages);
+ const virtualizer = useVirtualizer({
+ count: unreadMessages.length,
+ getScrollElement: () => parentRef.current,
+ estimateSize: () => 200,
+ overscan: 5,
+ });
- const handleMarkAllAsRead = () => {
+ const handleMarkAllAsRead = useCallback(() => {
messages.forEach((msg) => {
if (!msg.read) {
onMessageRead(msg.id);
}
});
- };
+ }, [messages, onMessageRead]);
- const toggleMessageExpansion = (id: string) => {
+ const toggleMessageExpansion = useCallback((id: string) => {
setExpandedMessages((prev) => {
const newSet = new Set(prev);
if (newSet.has(id)) {
@@ -83,39 +218,36 @@ export function InboxMessages({
}
return newSet;
});
- };
+ }, []);
- const truncateContent = (content: string | undefined, maxLength: number) => {
- if (!content) return "";
- if (content.length <= maxLength) return content;
- return content.slice(0, maxLength) + "...";
- };
-
- const formatDate = (dateString: string) => {
+ const formatDate = useCallback((dateString: string) => {
const date = new Date(dateString);
return format(date, "MMM d, yyyy 'at' h:mm a");
- };
+ }, []);
- const openDialog = (message: Message) => {
- setDialogMessage(message);
- setDialogOpen(true);
- if (!message.read) {
- onMessageRead(message.id);
- }
- };
+ const openDialog = useCallback(
+ (message: Message) => {
+ setDialogMessage(message);
+ setDialogOpen(true);
+ if (!message.read) {
+ onMessageRead(message.id);
+ }
+ },
+ [onMessageRead]
+ );
- const closeDialog = () => {
+ const closeDialog = useCallback(() => {
setDialogOpen(false);
- };
+ }, []);
- const handleDeleteAndClose = () => {
+ const handleDeleteAndClose = useCallback(() => {
if (dialogMessage) {
onMessageDelete(dialogMessage.id);
closeDialog();
}
- };
+ }, [dialogMessage, onMessageDelete, closeDialog]);
- const handleAction = async (actionId: string, port: number) => {
+ const handleAction = useCallback(async (actionId: string, port: number) => {
try {
const response = await fetch(`http://localhost:${port}/action`, {
method: "POST",
@@ -129,10 +261,9 @@ export function InboxMessages({
} catch (error) {
console.error("failed to send action callback:", error);
}
- };
+ }, []);
useEffect(() => {
- // Trigger PostHog event when the inbox is opened
posthog.capture("inbox opened");
function handleClickOutside(event: MouseEvent) {
@@ -158,7 +289,7 @@ export function InboxMessages({
<Card className="w-full">
<CardHeader className="flex flex-row items-center justify-between">
<h2 className="text-lg font-semibold">inbox messages</h2>
- {messages.filter((msg) => !msg.read).length > 0 && (
+ {unreadMessages.length > 0 && (
<Button
variant="outline"
size="sm"
@@ -170,127 +301,46 @@ export function InboxMessages({
</Button>
)}
</CardHeader>
- <CardContent className="min-h-[200px] w-[45vw]">
- {messages.filter((msg) => !msg.read).length === 0 ? (
+ <CardContent className="min-h-[200px] w-[45vw]" ref={parentRef}>
+ {unreadMessages.length === 0 ? (
<div className="flex h-full w-full items-center justify-center text-sm text-gray-500">
no new messages
</div>
) : (
- messages
- .filter((msg) => !msg.read)
- .map((message) => (
- <Card
- key={message.id}
- className={`mb-4 w-full ${
- message.read ? "bg-secondary/50" : "bg-background"
- }`}
- >
- <CardHeader className="flex flex-row items-center justify-between py-2">
- <div className="flex items-center space-x-2 flex-1 mr-2 max-w-[70%]">
- <Bot className="h-4 w-4 flex-shrink-0 text-muted-foreground" />
- <h3
- className="text-sm font-semibold truncate"
- title={message.title}
- >
- {message.title}
- </h3>
- </div>
- <span className="text-xs text-muted-foreground whitespace-nowrap">
- {formatDate(message.date)}
- </span>
- </CardHeader>
- <CardContent className="py-2">
- <div className="w-full overflow-hidden">
- <MemoizedReactMarkdown
- className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 w-[35vw] text-sm"
- remarkPlugins={[remarkGfm, remarkMath]}
- components={{
- p: ({ children }) => (
- <p className="mb-2 last:mb-0">{children}</p>
- ),
- a: ({ node, href, children, ...props }) => {
- const isExternal =
- href?.startsWith("http") ||
- href?.startsWith("https");
- return (
- <a
- href={href}
- target={isExternal ? "_blank" : undefined}
- rel={
- isExternal
- ? "noopener noreferrer"
- : undefined
- }
- className="break-all text-blue-500 hover:underline"
- {...props}
- >
- {children}
- </a>
- );
- },
- }}
- >
- {expandedMessages.has(message.id)
- ? message.body || ""
- : truncateContent(message.body, 150)}
- </MemoizedReactMarkdown>
- </div>
- {message.body && message.body.length > 150 && (
- <Button
- variant="ghost"
- size="sm"
- onClick={() => toggleMessageExpansion(message.id)}
- className="text-xs mt-2"
- >
- {expandedMessages.has(message.id) ? (
- <>
- <ChevronUp className="mr-1 h-4 w-4" />
- show less
- </>
- ) : (
- <>
- <ChevronDown className="mr-1 h-4 w-4" />
- show more
- </>
- )}
- </Button>
- )}
- </CardContent>
- <CardFooter className="flex justify-end space-x-2 py-2">
- {message.actions?.map((action) => (
- <Button
- key={`${message.id}-${action.action}`}
- variant="outline"
- size="sm"
- onClick={() => {
- handleAction(action.action, action.port);
- }}
- className="text-xs"
- >
- {action.label}
- </Button>
- ))}
- <Button
- variant="ghost"
- size="sm"
- onClick={() => onMessageDelete(message.id)}
- className="text-xs"
- >
- <X className="mr-1 h-4 w-4" />
- dismiss
- </Button>
- <Button
- variant="ghost"
- size="sm"
- onClick={() => openDialog(message)}
- className="text-xs"
- >
- <Maximize2 className="mr-1 h-4 w-4" />
- expand
- </Button>
- </CardFooter>
- </Card>
- ))
+ <div
+ style={{
+ height: `${virtualizer.getTotalSize()}px`,
+ width: "100%",
+ position: "relative",
+ }}
+ >
+ {virtualizer.getVirtualItems().map((virtualRow) => {
+ const message = unreadMessages[virtualRow.index];
+ return (
+ <div
+ key={message.id}
+ style={{
+ position: "absolute",
+ top: 0,
+ left: 0,
+ width: "100%",
+ height: `${virtualRow.size}px`,
+ transform: `translateY(${virtualRow.start}px)`,
+ }}
+ >
+ <MessageCard
+ message={message}
+ onDelete={onMessageDelete}
+ onExpand={openDialog}
+ expandedMessages={expandedMessages}
+ toggleMessageExpansion={toggleMessageExpansion}
+ handleAction={handleAction}
+ formatDate={formatDate}
+ />
+ </div>
+ );
+ })}
+ </div>
)}
</CardContent>
</Card>
@@ -311,37 +361,37 @@ export function InboxMessages({
<DialogTitle>{dialogMessage?.title}</DialogTitle>
</DialogHeader>
<div className="mt-4">
- <MemoizedReactMarkdown
- className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0"
- remarkPlugins={[remarkGfm, remarkMath]}
- components={{
- p: ({ children }) => (
- <p className="mb-2 last:mb-0">{children}</p>
- ),
- a: ({ node, href, children, ...props }) => (
- <a
- href={href}
- target="_blank"
- rel="noopener noreferrer"
- className="break-all"
- {...props}
- >
- {children}
- </a>
- ),
- }}
- >
- {dialogMessage?.body || ""}
- </MemoizedReactMarkdown>
+ <Suspense fallback={<div>loading...</div>}>
+ <MemoizedReactMarkdown
+ className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0"
+ remarkPlugins={[remarkGfm, remarkMath]}
+ components={{
+ p: ({ children }) => (
+ <p className="mb-2 last:mb-0">{children}</p>
+ ),
+ a: ({ href, children, ...props }) => (
+ <a
+ href={href}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="break-all"
+ {...props}
+ >
+ {children}
+ </a>
+ ),
+ }}
+ >
+ {dialogMessage?.body || ""}
+ </MemoizedReactMarkdown>
+ </Suspense>
</div>
<div className="flex justify-end space-x-2 mt-4">
{dialogMessage?.actions?.map((action) => (
<Button
key={`dialog-${dialogMessage.id}-${action.action}`}
variant="outline"
- onClick={() => {
- console.log(`Dialog action clicked: ${action.label}`);
- }}
+ onClick={() => handleAction(action.action, action.port)}
>
{action.label}
</Button>
diff --git a/screenpipe-app-tauri/components/meeting-history.tsx b/screenpipe-app-tauri/components/meeting-history.tsx
index 6eb11f753..508d2ea2b 100644
--- a/screenpipe-app-tauri/components/meeting-history.tsx
+++ b/screenpipe-app-tauri/components/meeting-history.tsx
@@ -48,6 +48,7 @@ import {
import { ValueOf } from "next/dist/shared/lib/constants";
import { Checkbox } from "./ui/checkbox";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
+import { DropdownMenuItem } from "./ui/dropdown-menu";
function formatDate(date: string): string {
const dateObj = new Date(date);
@@ -123,7 +124,7 @@ interface AudioTranscription {
content: AudioContent;
}
-export default function MeetingHistory() {
+export default function MeetingHistory({ className }: { className?: string }) {
const posthog = usePostHog();
const { settings } = useSettings();
const [meetings, setMeetings] = useState<Meeting[]>([]);
@@ -663,18 +664,14 @@ export default function MeetingHistory() {
return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
- <Button
- variant="ghost"
- className="pl-2"
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={() => setIsOpen(true)}
disabled={!health || health.status === "error"}
- onClick={(e) => {
- e.stopPropagation();
- setIsOpen(true);
- }}
>
<Calendar className="mr-2 h-4 w-4" />
- meetings
- </Button>
+ <span>meetings</span>
+ </DropdownMenuItem>
</DialogTrigger>
<DialogContent
className="max-w-[90vw] w-full max-h-[90vh] h-full"
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index 1eef46dec..8c5748fc7 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -580,7 +580,7 @@ const PipeStore: React.FC = () => {
</div>
<main className="flex-1 overflow-y-auto">
- <div className="max-w-3xl mx-auto p-8">
+ <div className="max-w-3xl mx-auto p-8 ">
{selectedPipe.enabled && selectedPipe?.config?.port && (
<div>
<div className="flex justify-between items-center mb-4">
@@ -687,16 +687,15 @@ const PipeStore: React.FC = () => {
}
};
- console.log("selectedPipe", selectedPipe);
if (selectedPipe) {
return renderPipeDetails();
}
return (
- <div className="overflow-hidden flex flex-col space-y-4">
- <div className="flex flex-col flex-1 overflow-hidden space-y-4 p-4">
- <div className="space-y-4">
+ <div className="overflow-hidden flex flex-col space-y-4 min-w-[800px]">
+ <div className="flex flex-col flex-1 overflow-hidden space-y-4 p-4 min-w-[800px]">
+ <div className="space-y-4 min-w-[800px]">
<div className="flex flex-col gap-4 w-[50%]">
<div className="flex-1 relative">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" />
@@ -734,13 +733,9 @@ const PipeStore: React.FC = () => {
</TooltipProvider>
</div>
</div>
-
- <div className="text-sm text-gray-500">
- showing {filteredPipes.length} pipes:
- </div>
</div>
- <div className="flex-1 overflow-y-auto px-6">
+ <div className="flex-1 overflow-y-auto ">
<div className="space-y-6">
<div className="grid grid-cols-2 gap-4">
{filteredPipes.map((pipe) => (
diff --git a/screenpipe-app-tauri/components/recording-settings.tsx b/screenpipe-app-tauri/components/recording-settings.tsx
index af8475be1..b247633d0 100644
--- a/screenpipe-app-tauri/components/recording-settings.tsx
+++ b/screenpipe-app-tauri/components/recording-settings.tsx
@@ -68,8 +68,8 @@ import posthog from "posthog-js";
import { trace } from "@opentelemetry/api";
import { initOpenTelemetry } from "@/lib/opentelemetry";
import { Language } from "@/lib/language";
-import { open } from '@tauri-apps/plugin-dialog';
-import { exists } from '@tauri-apps/plugin-fs';
+import { open } from "@tauri-apps/plugin-dialog";
+import { exists } from "@tauri-apps/plugin-fs";
import { Command as ShellCommand } from "@tauri-apps/plugin-shell";
import { CliCommandDialog } from "./cli-command-dialog";
import { ToastAction } from "@/components/ui/toast";
@@ -99,7 +99,9 @@ export function RecordingSettings({
const [openMonitors, setOpenMonitors] = React.useState(false);
const [openLanguages, setOpenLanguages] = React.useState(false);
const [dataDirInputVisible, setDataDirInputVisible] = React.useState(false);
- const [clickTimeout, setClickTimeout] = useState<ReturnType<typeof setTimeout> | null>(null);
+ const [clickTimeout, setClickTimeout] = useState<ReturnType<
+ typeof setTimeout
+ > | null>(null);
const [windowsForIgnore, setWindowsForIgnore] = useState("");
const [windowsForInclude, setWindowsForInclude] = useState("");
@@ -448,11 +450,11 @@ export function RecordingSettings({
// Double Click
clearTimeout(clickTimeout);
setClickTimeout(null);
- setDataDirInputVisible(true)
+ setDataDirInputVisible(true);
} else {
const timeout = setTimeout(() => {
// Single Click
- selectDataDir()
+ selectDataDir();
setClickTimeout(null);
}, 250);
setClickTimeout(timeout);
@@ -460,19 +462,19 @@ export function RecordingSettings({
async function selectDataDir() {
try {
- const dataDir = await getDataDir()
+ const dataDir = await getDataDir();
const selected = await open({
directory: true,
multiple: false,
- defaultPath: dataDir
+ defaultPath: dataDir,
});
// TODO: check permission of selected dir for server to write into
if (selected) {
- setLocalSettings({ ...localSettings, dataDir: selected })
+ setLocalSettings({ ...localSettings, dataDir: selected });
} else {
- console.log('canceled');
+ console.log("canceled");
}
} catch (error) {
console.error("failed to change data directory:", error);
@@ -484,33 +486,36 @@ export function RecordingSettings({
});
}
}
- }
+ };
- const handleDataDirInputChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
+ const handleDataDirInputChange = async (
+ e: React.ChangeEvent<HTMLInputElement>
+ ) => {
const newValue = e.target.value;
setLocalSettings({ ...localSettings, dataDir: newValue });
- }
+ };
const handleDataDirInputBlur = () => {
- console.log('wcw blur');
- setDataDirInputVisible(false)
- validateDataDirInput()
- }
-
- const handleDataDirInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
- if (e.key === 'Enter') {
- setDataDirInputVisible(false)
- validateDataDirInput()
+ console.log("wcw blur");
+ setDataDirInputVisible(false);
+ validateDataDirInput();
+ };
+
+ const handleDataDirInputKeyDown = (
+ e: React.KeyboardEvent<HTMLInputElement>
+ ) => {
+ if (e.key === "Enter") {
+ setDataDirInputVisible(false);
+ validateDataDirInput();
}
- }
+ };
const validateDataDirInput = async () => {
try {
if (await exists(localSettings.dataDir)) {
- return
+ return;
}
- } catch (err) {
- }
+ } catch (err) {}
toast({
title: "error",
@@ -520,7 +525,7 @@ export function RecordingSettings({
});
setLocalSettings({ ...localSettings, dataDir: settings.dataDir });
- }
+ };
const runSetup = async () => {
setIsSetupRunning(true);
@@ -577,63 +582,6 @@ export function RecordingSettings({
}
};
- const handleEnableBetaToggle = async (checked: boolean) => {
- setLocalSettings({ ...localSettings, enableBeta: checked });
-
- if (checked) {
- try {
- const command = ShellCommand.sidecar("screenpipe", ["setup"]);
- const child = await command.spawn();
-
- toast({
- title: "setting up beta features",
- description: "this may take a few minutes...",
- });
-
- const outputPromise = new Promise<string>((resolve, reject) => {
- command.on("close", (data) => {
- if (data.code !== 0) {
- reject(new Error(`command failed with code ${data.code}`));
- }
- });
- command.on("error", (error) => reject(new Error(error)));
- command.stdout.on("data", (line) => {
- console.log(line);
- if (line.includes("screenpipe setup complete")) {
- resolve("ok");
- }
- });
- });
-
- const timeoutPromise = new Promise(
- (_, reject) =>
- setTimeout(() => reject(new Error("setup timed out")), 900000) // 15 minutes
- );
-
- const result = await Promise.race([outputPromise, timeoutPromise]);
-
- if (result === "ok") {
- toast({
- title: "beta features setup complete",
- description: "you can now use the beta features.",
- });
- } else {
- throw new Error("setup failed or timed out");
- }
- } catch (error) {
- console.error("error setting up beta features:", error);
- toast({
- title: "error setting up beta features",
- description:
- "please try again or check the logs for more information.",
- variant: "destructive",
- });
- // Revert the toggle if setup fails
- setLocalSettings({ ...localSettings, enableBeta: false });
- }
- }
- };
-
const handleFrameCacheToggle = (checked: boolean) => {
setLocalSettings({
...localSettings,
@@ -641,10 +589,6 @@ export function RecordingSettings({
});
};
- const handleShowTimeline = async () => {
- await invoke("show_timeline");
- };
-
const handleUiMonitoringToggle = async (checked: boolean) => {
try {
if (checked) {
@@ -983,35 +927,43 @@ export function RecordingSettings({
<span>data directory</span>
</Label>
- {
- !dataDirInputVisible
- ?
- <Button
- variant="outline"
- role="combobox"
- className="w-full justify-between"
- onClick={handleDataDirChange}
- >
- <div className="inline-block flex gap-4">
- {!!settings.dataDir ? "change directory" : "select directory"}
- {localSettings.dataDir === settings.dataDir ?
- <span className="text-muted-foreground text-sm"> current at: {settings.dataDir || "default directory"}</span> :
- <span className="text-muted-foreground text-sm"> change to: {localSettings.dataDir || "default directory"}</span>
- }
- </div>
- <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
- </Button>
- : <Input
- id="dataDir"
- type="text"
- autoFocus={true}
- value={localSettings.dataDir}
- onChange={handleDataDirInputChange}
- onBlur={handleDataDirInputBlur}
- onKeyDown={handleDataDirInputKeyDown}
- >
- </Input>
- }
+ {!dataDirInputVisible ? (
+ <Button
+ variant="outline"
+ role="combobox"
+ className="w-full justify-between"
+ onClick={handleDataDirChange}
+ >
+ <div className="inline-block flex gap-4">
+ {!!settings.dataDir
+ ? "change directory"
+ : "select directory"}
+ {localSettings.dataDir === settings.dataDir ? (
+ <span className="text-muted-foreground text-sm">
+ {" "}
+ current at: {settings.dataDir || "default directory"}
+ </span>
+ ) : (
+ <span className="text-muted-foreground text-sm">
+ {" "}
+ change to:{" "}
+ {localSettings.dataDir || "default directory"}
+ </span>
+ )}
+ </div>
+ <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
+ </Button>
+ ) : (
+ <Input
+ id="dataDir"
+ type="text"
+ autoFocus={true}
+ value={localSettings.dataDir}
+ onChange={handleDataDirInputChange}
+ onBlur={handleDataDirInputBlur}
+ onKeyDown={handleDataDirInputKeyDown}
+ ></Input>
+ )}
</div>
<div className="flex flex-col space-y-2">
diff --git a/screenpipe-app-tauri/components/screenpipe-status.tsx b/screenpipe-app-tauri/components/screenpipe-status.tsx
index 7fc52fdaa..06a9d2486 100644
--- a/screenpipe-app-tauri/components/screenpipe-status.tsx
+++ b/screenpipe-app-tauri/components/screenpipe-status.tsx
@@ -55,9 +55,9 @@ import { cn } from "@/lib/utils";
import { Check, X } from "lucide-react";
type PermissionsStatus = {
- screen_capture: boolean;
- microphone: boolean;
- accessibility: boolean;
+ screenRecording: string;
+ microphone: string;
+ accessibility: string;
};
const HealthStatus = ({ className }: { className?: string }) => {
@@ -76,7 +76,9 @@ const HealthStatus = ({ className }: { className?: string }) => {
const [isTroubleshootOpen, setIsTroubleshootOpen] = useState(false);
const [currentStep, setCurrentStep] = useState(0);
const [isDialogLoading, setIsDialogLoading] = useState(false);
- const [permissions, setPermissions] = useState<PermissionsStatus | null>(null);
+ const [permissions, setPermissions] = useState<PermissionsStatus | null>(
+ null
+ );
useEffect(() => {
setIsMac(platform() === "macos");
@@ -97,9 +99,15 @@ const HealthStatus = ({ className }: { className?: string }) => {
useEffect(() => {
const checkPermissions = async () => {
try {
- const perms = await invoke<PermissionsStatus>("check_all_permissions");
- console.log("perms", perms);
- setPermissions(perms);
+ const perms = await invoke<PermissionsStatus>("do_permissions_check", {
+ initialCheck: true
+ });
+
+ setPermissions({
+ screenRecording: perms.screenRecording,
+ microphone: perms.microphone,
+ accessibility: perms.accessibility,
+ });
} catch (error) {
console.error("Failed to check permissions:", error);
}
@@ -443,7 +451,7 @@ const HealthStatus = ({ className }: { className?: string }) => {
}
};
- const handlePermissionButton = async (type: 'screen' | 'audio' | 'accessibility') => {
+ const handlePermissionButton = async (type: "screen" | "audio" | "accessibility") => {
const toastId = toast({
title: `checking ${type} permissions`,
description: "please wait...",
@@ -451,40 +459,40 @@ const HealthStatus = ({ className }: { className?: string }) => {
});
try {
- // Trigger the permission dialog
- if (type === 'screen') {
- await invoke("open_screen_capture_preferences");
- } else if (type === 'audio') {
- await invoke("trigger_audio_permission");
- } else {
- await invoke("open_accessibility_preferences");
- }
+ const permissionType = type === "screen"
+ ? "screenRecording"
+ : type === "audio"
+ ? "microphone"
+ : "accessibility";
+
+ await invoke("request_permission", {
+ permission: permissionType
+ });
- // Start polling permissions for 30 seconds
- const permissionResults = await invoke<PermissionsStatus[]>("poll_permissions", {
- duration_secs: 30
+ const perms = await invoke<PermissionsStatus>("do_permissions_check", {
+ initialCheck: false
});
- // Get the last result
- const finalStatus = permissionResults[permissionResults.length - 1];
-
- // Update permissions state
- setPermissions(finalStatus);
+ setPermissions({
+ screenRecording: perms.screenRecording,
+ microphone: perms.microphone,
+ accessibility: perms.accessibility
+ });
- // Update toast based on result
- const granted = type === 'screen' ? finalStatus.screen_capture :
- type === 'audio' ? finalStatus.microphone :
- finalStatus.accessibility;
+ const granted = type === "screen"
+ ? perms.screenRecording === "Granted"
+ : type === "audio"
+ ? perms.microphone === "Granted"
+ : perms.accessibility === "Granted";
toastId.update({
id: toastId.id,
title: granted ? "permission granted" : "permission check complete",
- description: granted ?
- `${type} permission was successfully granted` :
- `please try granting ${type} permission again if needed`,
+ description: granted
+ ? `${type} permission was successfully granted`
+ : `please try granting ${type} permission again if needed`,
duration: 3000,
});
-
} catch (error) {
console.error(`failed to handle ${type} permission:`, error);
toastId.update({
@@ -551,24 +559,33 @@ const HealthStatus = ({ className }: { className?: string }) => {
{/* Screen Recording Status */}
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
- <div className={`w-2 h-2 rounded-full ${health.frame_status === "ok" ? "bg-green-500" : "bg-red-500"}`} />
+ <div
+ className={`w-2 h-2 rounded-full ${
+ health.frame_status === "ok"
+ ? "bg-green-500"
+ : "bg-red-500"
+ }`}
+ />
<span className="text-sm">screen recording</span>
<span className="text-sm text-muted-foreground">
- status: {health.frame_status},
- last update: {formatTimestamp(health.last_frame_timestamp)}
+ status: {health.frame_status}, last update:{" "}
+ {formatTimestamp(health.last_frame_timestamp)}
</span>
</div>
<div className="flex items-center gap-2">
{permissions && (
- <span>{permissions.screen_capture ?
- <Check className="h-4 w-4 text-green-500" /> :
- <X className="h-4 w-4 text-red-500" />}
+ <span>
+ {permissions.screenRecording ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
</span>
)}
- <Button
- variant="outline"
+ <Button
+ variant="outline"
className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton('screen')}
+ onClick={() => handlePermissionButton("screen")}
>
<Lock className="h-4 w-4 mr-2" />
grant screen permission
@@ -579,27 +596,39 @@ const HealthStatus = ({ className }: { className?: string }) => {
{/* Audio Recording Status */}
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
- <div className={`w-2 h-2 rounded-full ${
- settings.disableAudio ? "bg-gray-400" :
- health.audio_status === "ok" ? "bg-green-500" : "bg-red-500"
- }`} />
+ <div
+ className={`w-2 h-2 rounded-full ${
+ settings.disableAudio
+ ? "bg-gray-400"
+ : health.audio_status === "ok"
+ ? "bg-green-500"
+ : "bg-red-500"
+ }`}
+ />
<span className="text-sm">audio recording</span>
<span className="text-sm text-muted-foreground">
- status: {settings.disableAudio ? "turned off" : health.audio_status},
- last update: {settings.disableAudio ? "n/a" : formatTimestamp(health.last_audio_timestamp)}
+ status:{" "}
+ {settings.disableAudio ? "turned off" : health.audio_status}
+ , last update:{" "}
+ {settings.disableAudio
+ ? "n/a"
+ : formatTimestamp(health.last_audio_timestamp)}
</span>
</div>
<div className="flex items-center gap-2">
{permissions && (
- <span>{permissions.microphone ?
- <Check className="h-4 w-4 text-green-500" /> :
- <X className="h-4 w-4 text-red-500" />}
+ <span>
+ {permissions.microphone ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
</span>
)}
- <Button
+ <Button
variant="outline"
className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton('audio')}
+ onClick={() => handlePermissionButton("audio")}
disabled={settings.disableAudio}
>
<Lock className="h-4 w-4 mr-2" />
@@ -612,24 +641,33 @@ const HealthStatus = ({ className }: { className?: string }) => {
{settings.enableUiMonitoring && (
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
- <div className={`w-2 h-2 rounded-full ${health.ui_status === "ok" ? "bg-green-500" : "bg-red-500"}`} />
+ <div
+ className={`w-2 h-2 rounded-full ${
+ health.ui_status === "ok"
+ ? "bg-green-500"
+ : "bg-red-500"
+ }`}
+ />
<span className="text-sm">ui monitoring</span>
<span className="text-sm text-muted-foreground">
- status: {health.ui_status},
- last update: {formatTimestamp(health.last_ui_timestamp)}
+ status: {health.ui_status}, last update:{" "}
+ {formatTimestamp(health.last_ui_timestamp)}
</span>
</div>
<div className="flex items-center gap-2">
{permissions && (
- <span>{permissions.accessibility ?
- <Check className="h-4 w-4 text-green-500" /> :
- <X className="h-4 w-4 text-red-500" />}
+ <span>
+ {permissions.accessibility ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <X className="h-4 w-4 text-red-500" />
+ )}
</span>
)}
- <Button
+ <Button
variant="outline"
className="w-[260px] text-sm justify-start"
- onClick={() => handlePermissionButton('accessibility')}
+ onClick={() => handlePermissionButton("accessibility")}
>
<Lock className="h-4 w-4 mr-2" />
grant accessibility permission
diff --git a/screenpipe-app-tauri/components/settings.tsx b/screenpipe-app-tauri/components/settings.tsx
index 50f040457..5b94fa8bf 100644
--- a/screenpipe-app-tauri/components/settings.tsx
+++ b/screenpipe-app-tauri/components/settings.tsx
@@ -23,7 +23,13 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { Separator } from "@/components/ui/separator";
-import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
import { Textarea } from "./ui/textarea";
import { Slider } from "@/components/ui/slider"; // Add this import
import { Badge } from "@/components/ui/badge"; // Add this import
@@ -61,9 +67,11 @@ import {
import { useInterval } from "@/lib/hooks/use-interval";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
import { AuthButton } from "./auth";
+import { DropdownMenuItem } from "./ui/dropdown-menu";
export function Settings({ className }: { className?: string }) {
- const { settings, updateSettings, resetSetting, resetSettings } = useSettings();
+ const { settings, updateSettings, resetSetting, resetSettings } =
+ useSettings();
const { debouncedFetchHealth } = useHealthCheck();
const [localSettings, setLocalSettings] = React.useState(settings);
const [showApiKey, setShowApiKey] = React.useState(false);
@@ -523,50 +531,35 @@ export function Settings({ className }: { className?: string }) {
}, [debouncedFetchHealth]);
const handleResetSettings = async () => {
- try{
- await resetSettings()
+ try {
+ await resetSettings();
toast({
title: "settings were reset successfully",
});
- }catch(e){
- console.log(e)
+ } catch (e) {
+ console.log(e);
toast({
title: "can't reset your settings",
variant: "destructive",
});
}
- }
+ };
return (
- <Dialog
- onOpenChange={(open) => {
- if (!open) {
- // Use a more reliable state update mechanism
- const event = new CustomEvent("settings-updated");
- window.dispatchEvent(event);
-
- // Add a small delay before refetching health
- setTimeout(() => {
- debouncedFetchHealth();
- }, 500);
-
- window.location.reload();
- }
- }}
- >
+ <Dialog>
<DialogTrigger asChild>
- <Button variant="ghost" size="icon" className={className}>
- <Settings2 className="h-5 w-5" />
- <span className="sr-only">settings</span>
- </Button>
+ <DropdownMenuItem className="cursor-pointer" onSelect={(e) => e.preventDefault()}>
+ <div className="flex items-center">
+ <Settings2 className="mr-2 h-4 w-4" />
+ <span>settings</span>
+ </div>
+ </DropdownMenuItem>
</DialogTrigger>
+
<DialogContent className="max-w-[80vw] w-full max-h-[80vh] h-full overflow-y-auto">
<DialogHeader>
<DialogTitle>
- <div className="flex items-center gap-4">
- settings
- <AuthButton />
- </div>
+ <div className="flex items-center gap-4">settings</div>
</DialogTitle>
<DialogDescription>
choose your AI provider, enter necessary credentials, and more.
@@ -1080,30 +1073,27 @@ export function Settings({ className }: { className?: string }) {
</div>
</CardContent>
</Card>
- <Card
- className="border border-[#fab1b6] overflow-hidden"
- >
- <CardHeader>
- <CardTitle className="text-center">reset settings</CardTitle>
- </CardHeader>
- <CardContent className="flex flex-col items-center">
- <p className="text-sm text-muted-foreground mb-4">
- permanently reset settings to their default values.
- </p>
- </CardContent>
- <CardFooter className="bg-[#fdedee] border-t border-[#fab1b6] flex justify-between items-center p-5">
- <p className="text-sm text-muted-foreground">
- this action is not reversible — please continue with caution.
- </p>
- <Button
- variant={'destructive'}
- onClick={()=>handleResetSettings()}
- disabled={false}
- >
- reset settings
- </Button>
- </CardFooter>
-
+ <Card className="border border-[#fab1b6] overflow-hidden">
+ <CardHeader>
+ <CardTitle className="text-center">reset settings</CardTitle>
+ </CardHeader>
+ <CardContent className="flex flex-col items-center">
+ <p className="text-sm text-muted-foreground mb-4">
+ permanently reset settings to their default values.
+ </p>
+ </CardContent>
+ <CardFooter className="bg-[#fdedee] border-t border-[#fab1b6] flex justify-between items-center p-5">
+ <p className="text-sm text-muted-foreground">
+ this action is not reversible — please continue with caution.
+ </p>
+ <Button
+ variant={"destructive"}
+ onClick={() => handleResetSettings()}
+ disabled={false}
+ >
+ reset settings
+ </Button>
+ </CardFooter>
</Card>
</div>
</DialogContent>
diff --git a/screenpipe-app-tauri/components/stripe-subscription-button.tsx b/screenpipe-app-tauri/components/stripe-subscription-button.tsx
index edf7ea7d3..661fb9e16 100644
--- a/screenpipe-app-tauri/components/stripe-subscription-button.tsx
+++ b/screenpipe-app-tauri/components/stripe-subscription-button.tsx
@@ -17,11 +17,6 @@ export function StripeSubscriptionButton({
const { isSignedIn, user } = useUser();
const [isSubscribed, setIsSubscribed] = useState(false);
- useEffect(() => {
- const subscribed = localStorage.getItem("loom_pipe_subscribed") === "true";
- setIsSubscribed(subscribed);
- }, []);
-
const handleSubscribe = async () => {
posthog.capture("subscribe_button_clicked", {
email: user?.email,
@@ -43,7 +38,6 @@ export function StripeSubscriptionButton({
await open(checkoutUrl);
// Store subscription locally
- localStorage.setItem("loom_pipe_subscribed", "true");
setIsSubscribed(true);
if (onSubscriptionComplete) {
@@ -63,7 +57,7 @@ export function StripeSubscriptionButton({
<Button
onClick={handleSubscribe}
variant="outline"
- className="min-w-[100px]"
+ className="h-8 min-w-[100px]"
disabled={isSubscribed}
>
{isSubscribed ? "subscribed" : "subscribe - $10/month"}
diff --git a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx b/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
index 337de5053..a9c1af981 100644
--- a/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
+++ b/screenpipe-app-tauri/lib/hooks/use-health-check.tsx
@@ -83,7 +83,6 @@ export function useHealthCheck() {
// console.log("set healthy icon:");
// }
-
if (isHealthChanged(healthRef.current, data)) {
setHealth(data);
healthRef.current = data;
@@ -95,7 +94,7 @@ export function useHealthCheck() {
return;
}
- console.error("Health check error:", error);
+ // console.error("Health check error:", error);
if (!isServerDown) {
setIsServerDown(true);
// await invoke("set_tray_unhealth_icon");
diff --git a/screenpipe-app-tauri/lib/hooks/use-user.ts b/screenpipe-app-tauri/lib/hooks/use-user.ts
index 6d5669436..797102730 100644
--- a/screenpipe-app-tauri/lib/hooks/use-user.ts
+++ b/screenpipe-app-tauri/lib/hooks/use-user.ts
@@ -6,15 +6,11 @@ interface UserData {
token: string;
email: string;
user_id: string;
+ displayName: string;
+ photoURL: string;
}
-interface UserState {
- isSignedIn: boolean;
- isLoading: boolean;
- error: string | null;
- user: UserData | null;
- checkLoomSubscription: () => Promise<boolean>;
-}
+
let store: Awaited<ReturnType<typeof createStore>> | null = null;
diff --git a/screenpipe-app-tauri/package.json b/screenpipe-app-tauri/package.json
index e2f899bad..563db5cec 100644
--- a/screenpipe-app-tauri/package.json
+++ b/screenpipe-app-tauri/package.json
@@ -39,6 +39,7 @@
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-tooltip": "^1.1.3",
+ "@tanstack/react-virtual": "^3.11.0",
"@tauri-apps/api": "^2.1.1",
"@tauri-apps/plugin-cli": "2.0.0",
"@tauri-apps/plugin-dialog": "2.0.0",
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 58d9e287b..59d88ba1b 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -68,6 +68,16 @@ dependencies = [
"libc",
]
+[[package]]
+name = "annotate-snippets"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e"
+dependencies = [
+ "unicode-width",
+ "yansi-term",
+]
+
[[package]]
name = "anstream"
version = "0.6.14"
@@ -85,9 +95,9 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.7"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
@@ -140,7 +150,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -225,7 +235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964"
dependencies = [
"async-lock",
- "cfg-if",
+ "cfg-if 1.0.0",
"concurrent-queue",
"futures-io",
"futures-lite",
@@ -260,7 +270,7 @@ dependencies = [
"async-signal",
"async-task",
"blocking",
- "cfg-if",
+ "cfg-if 1.0.0",
"event-listener",
"futures-lite",
"rustix",
@@ -276,7 +286,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -288,7 +298,7 @@ dependencies = [
"async-io",
"async-lock",
"atomic-waker",
- "cfg-if",
+ "cfg-if 1.0.0",
"futures-core",
"futures-io",
"rustix",
@@ -311,7 +321,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -350,7 +360,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f012b8cc0c850f34117ec8252a44418f2e34a2cf501de89e29b241ae5f79471"
dependencies = [
"dirs 4.0.0",
- "thiserror",
+ "thiserror 1.0.69",
"winreg 0.10.1",
]
@@ -440,7 +450,7 @@ checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
dependencies = [
"addr2line",
"cc",
- "cfg-if",
+ "cfg-if 1.0.0",
"libc",
"miniz_oxide 0.7.4",
"object",
@@ -459,6 +469,27 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+[[package]]
+name = "bindgen"
+version = "0.69.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
+dependencies = [
+ "annotate-snippets",
+ "bitflags 2.6.0",
+ "cexpr",
+ "clang-sys",
+ "itertools",
+ "lazy_static",
+ "lazycell",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "rustc-hash",
+ "shlex",
+ "syn 2.0.90",
+]
+
[[package]]
name = "bit_field"
version = "0.10.2"
@@ -525,9 +556,9 @@ dependencies = [
[[package]]
name = "brotli"
-version = "6.0.0"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b"
+checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -594,7 +625,7 @@ dependencies = [
"glib",
"libc",
"once_cell",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -637,7 +668,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -666,6 +697,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+[[package]]
+name = "cexpr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
+dependencies = [
+ "nom",
+]
+
[[package]]
name = "cfb"
version = "0.7.3"
@@ -687,6 +727,12 @@ dependencies = [
"target-lexicon",
]
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+
[[package]]
name = "cfg-if"
version = "1.0.0"
@@ -712,20 +758,32 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "clang-sys"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
+dependencies = [
+ "glob",
+ "libc",
+ "libloading 0.8.6",
+]
+
[[package]]
name = "clap"
-version = "4.5.9"
+version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
+checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
dependencies = [
"clap_builder",
+ "clap_derive",
]
[[package]]
name = "clap_builder"
-version = "4.5.9"
+version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
+checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
dependencies = [
"anstream",
"anstyle",
@@ -733,11 +791,38 @@ dependencies = [
"strsim",
]
+[[package]]
+name = "clap_derive"
+version = "4.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
[[package]]
name = "clap_lex"
-version = "0.7.1"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+
+[[package]]
+name = "cocoa"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c49e86fc36d5704151f5996b7b3795385f50ce09e3be0f47a0cfde869681cf8"
+dependencies = [
+ "bitflags 1.3.2",
+ "block",
+ "core-foundation 0.7.0",
+ "core-graphics 0.19.2",
+ "foreign-types 0.3.2",
+ "libc",
+ "objc",
+]
[[package]]
name = "cocoa"
@@ -836,13 +921,51 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+[[package]]
+name = "convert_case"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "cookie"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
+dependencies = [
+ "time",
+ "version_check",
+]
+
+[[package]]
+name = "cookie-factory"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2"
+dependencies = [
+ "futures",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
+dependencies = [
+ "core-foundation-sys 0.7.0",
+ "libc",
+]
+
[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"libc",
]
@@ -852,16 +975,34 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
dependencies = [
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"libc",
]
+[[package]]
+name = "core-foundation-sys"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
+
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+[[package]]
+name = "core-graphics"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation 0.7.0",
+ "foreign-types 0.3.2",
+ "libc",
+]
+
[[package]]
name = "core-graphics"
version = "0.23.2"
@@ -888,6 +1029,19 @@ dependencies = [
"libc",
]
+[[package]]
+name = "core-graphics-helmer-fork"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32eb7c354ae9f6d437a6039099ce7ecd049337a8109b23d73e48e8ffba8e9cd5"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.9.4",
+ "core-graphics-types 0.1.3",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
[[package]]
name = "core-graphics-types"
version = "0.1.3"
@@ -910,6 +1064,31 @@ dependencies = [
"libc",
]
+[[package]]
+name = "core-media-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "273bf3fc5bf51fd06a7766a84788c1540b6527130a0bce39e00567d6ab9f31f1"
+dependencies = [
+ "cfg-if 0.1.10",
+ "core-foundation-sys 0.7.0",
+ "libc",
+]
+
+[[package]]
+name = "core-video-sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828"
+dependencies = [
+ "cfg-if 0.1.10",
+ "core-foundation-sys 0.7.0",
+ "core-graphics 0.19.2",
+ "libc",
+ "metal",
+ "objc",
+]
+
[[package]]
name = "cpufeatures"
version = "0.2.12"
@@ -925,7 +1104,7 @@ version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
]
[[package]]
@@ -1002,7 +1181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1012,7 +1191,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "ctrlc"
+version = "3.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3"
+dependencies = [
+ "nix 0.29.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1036,7 +1225,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1047,7 +1236,18 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "dbus"
+version = "0.9.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b"
+dependencies = [
+ "libc",
+ "libdbus-sys",
+ "winapi",
]
[[package]]
@@ -1079,7 +1279,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1088,11 +1288,11 @@ version = "0.99.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
dependencies = [
- "convert_case",
+ "convert_case 0.4.0",
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1129,7 +1329,7 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"dirs-sys-next",
]
@@ -1181,7 +1381,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1190,7 +1390,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [
- "libloading",
+ "libloading 0.8.6",
]
[[package]]
@@ -1213,7 +1413,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1290,7 +1490,7 @@ version = "0.8.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
]
[[package]]
@@ -1317,7 +1517,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1413,7 +1613,7 @@ version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"libc",
"redox_syscall 0.4.1",
"windows-sys 0.52.0",
@@ -1425,7 +1625,7 @@ version = "0.0.0"
source = "git+https://github.com/tauri-apps/fix-path-env-rs#8481725b7ebfc56cdb052d522517421242eac36b"
dependencies = [
"strip-ansi-escapes",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1439,12 +1639,16 @@ dependencies = [
]
[[package]]
-name = "fluent-uri"
-version = "0.1.4"
+name = "flume"
+version = "0.10.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d"
+checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
dependencies = [
- "bitflags 1.3.2",
+ "futures-core",
+ "futures-sink",
+ "nanorand",
+ "pin-project",
+ "spin",
]
[[package]]
@@ -1480,7 +1684,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1514,6 +1718,21 @@ dependencies = [
"new_debug_unreachable",
]
+[[package]]
+name = "futures"
+version = "0.3.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
[[package]]
name = "futures-channel"
version = "0.3.30"
@@ -1521,6 +1740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
dependencies = [
"futures-core",
+ "futures-sink",
]
[[package]]
@@ -1567,7 +1787,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1588,6 +1808,7 @@ version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
dependencies = [
+ "futures-channel",
"futures-core",
"futures-io",
"futures-macro",
@@ -1733,7 +1954,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
@@ -1744,9 +1965,11 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
+ "js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
]
[[package]]
@@ -1781,7 +2004,7 @@ dependencies = [
"once_cell",
"pin-project-lite",
"smallvec",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1817,7 +2040,7 @@ dependencies = [
"memchr",
"once_cell",
"smallvec",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1831,7 +2054,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1862,7 +2085,7 @@ dependencies = [
"objc2-app-kit",
"once_cell",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
"x11-dl",
]
@@ -1927,7 +2150,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -1955,7 +2178,7 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"crunchy",
]
@@ -2071,6 +2294,12 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "http-range"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
+
[[package]]
name = "http-range-header"
version = "0.3.1"
@@ -2193,7 +2422,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
dependencies = [
"android_system_properties",
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
@@ -2235,6 +2464,18 @@ dependencies = [
"unicode-normalization",
]
+[[package]]
+name = "image"
+version = "0.24.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "num-traits",
+]
+
[[package]]
name = "image"
version = "0.25.1"
@@ -2311,7 +2552,7 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
]
[[package]]
@@ -2322,7 +2563,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -2407,11 +2648,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
dependencies = [
"cesu8",
- "cfg-if",
+ "cfg-if 1.0.0",
"combine",
"jni-sys",
"log",
- "thiserror",
+ "thiserror 1.0.69",
"walkdir",
"windows-sys 0.45.0",
]
@@ -2448,23 +2689,22 @@ dependencies = [
[[package]]
name = "json-patch"
-version = "2.0.0"
+version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc"
+checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
dependencies = [
"jsonptr",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
name = "jsonptr"
-version = "0.4.7"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627"
+checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"
dependencies = [
- "fluent-uri",
"serde",
"serde_json",
]
@@ -2499,6 +2739,12 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+[[package]]
+name = "lazycell"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+
[[package]]
name = "lebe"
version = "0.5.2"
@@ -2525,7 +2771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"
dependencies = [
"gtk-sys",
- "libloading",
+ "libloading 0.7.4",
"once_cell",
]
@@ -2535,6 +2781,15 @@ version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
+[[package]]
+name = "libdbus-sys"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72"
+dependencies = [
+ "pkg-config",
+]
+
[[package]]
name = "libfuzzer-sys"
version = "0.4.8"
@@ -2551,10 +2806,20 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"winapi",
]
+[[package]]
+name = "libloading"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
+dependencies = [
+ "cfg-if 1.0.0",
+ "windows-targets 0.52.6",
+]
+
[[package]]
name = "libredox"
version = "0.1.3"
@@ -2565,6 +2830,34 @@ dependencies = [
"libc",
]
+[[package]]
+name = "libspa"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65f3a4b81b2a2d8c7f300643676202debd1b7c929dbf5c9bb89402ea11d19810"
+dependencies = [
+ "bitflags 2.6.0",
+ "cc",
+ "convert_case 0.6.0",
+ "cookie-factory",
+ "libc",
+ "libspa-sys",
+ "nix 0.27.1",
+ "nom",
+ "system-deps",
+]
+
+[[package]]
+name = "libspa-sys"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf0d9716420364790e85cbb9d3ac2c950bde16a7dd36f3209b7dfdfc4a24d01f"
+dependencies = [
+ "bindgen",
+ "cc",
+ "system-deps",
+]
+
[[package]]
name = "linux-raw-sys"
version = "0.4.14"
@@ -2665,7 +2958,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
]
[[package]]
@@ -2683,6 +2976,21 @@ dependencies = [
"autocfg",
]
+[[package]]
+name = "metal"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e198a0ee42bdbe9ef2c09d0b9426f3b2b47d90d93a4a9b0395c4cea605e92dc0"
+dependencies = [
+ "bitflags 1.3.2",
+ "block",
+ "cocoa 0.20.2",
+ "core-graphics 0.19.2",
+ "foreign-types 0.3.2",
+ "log",
+ "objc",
+]
+
[[package]]
name = "mime"
version = "0.3.17"
@@ -2747,10 +3055,19 @@ dependencies = [
"once_cell",
"png",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
]
+[[package]]
+name = "nanorand"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+dependencies = [
+ "getrandom 0.2.15",
+]
+
[[package]]
name = "native-tls"
version = "0.2.12"
@@ -2780,7 +3097,7 @@ dependencies = [
"ndk-sys",
"num_enum",
"raw-window-handle",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -2811,17 +3128,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
"bitflags 2.6.0",
- "cfg-if",
+ "cfg-if 1.0.0",
"libc",
"memoffset",
]
+[[package]]
+name = "nix"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
+dependencies = [
+ "bitflags 2.6.0",
+ "cfg-if 1.0.0",
+ "cfg_aliases",
+ "libc",
+]
+
[[package]]
name = "nodrop"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+[[package]]
+name = "nokhwa-bindings-macos"
+version = "0.2.0"
+source = "git+https://github.com/CapSoftware/nokhwa?rev=0d3d1f30a78b#0d3d1f30a78bb4616b4a4d0939a29ad0c1a8e14f"
+dependencies = [
+ "block",
+ "cocoa-foundation 0.1.2",
+ "core-media-sys",
+ "core-video-sys",
+ "flume",
+ "nokhwa-core",
+ "objc",
+ "once_cell",
+]
+
+[[package]]
+name = "nokhwa-core"
+version = "0.1.0"
+source = "git+https://github.com/CapSoftware/nokhwa?rev=0d3d1f30a78b#0d3d1f30a78bb4616b4a4d0939a29ad0c1a8e14f"
+dependencies = [
+ "bytes",
+ "image 0.24.9",
+ "thiserror 1.0.69",
+]
+
[[package]]
name = "nom"
version = "7.1.3"
@@ -2894,7 +3248,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -2954,7 +3308,7 @@ dependencies = [
"proc-macro-crate 2.0.2",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -2983,6 +3337,9 @@ name = "objc-sys"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+dependencies = [
+ "cc",
+]
[[package]]
name = "objc2"
@@ -3010,6 +3367,30 @@ dependencies = [
"objc2-quartz-core",
]
+[[package]]
+name = "objc2-cloud-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-contacts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
[[package]]
name = "objc2-core-data"
version = "0.2.2"
@@ -3034,6 +3415,18 @@ dependencies = [
"objc2-metal",
]
+[[package]]
+name = "objc2-core-location"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-contacts",
+ "objc2-foundation",
+]
+
[[package]]
name = "objc2-encode"
version = "4.0.3"
@@ -3053,6 +3446,18 @@ dependencies = [
"objc2",
]
+[[package]]
+name = "objc2-link-presentation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
[[package]]
name = "objc2-metal"
version = "0.2.2"
@@ -3078,6 +3483,74 @@ dependencies = [
"objc2-metal",
]
+[[package]]
+name = "objc2-symbols"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
+dependencies = [
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-ui-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-cloud-kit",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-core-location",
+ "objc2-foundation",
+ "objc2-link-presentation",
+ "objc2-quartz-core",
+ "objc2-symbols",
+ "objc2-uniform-type-identifiers",
+ "objc2-user-notifications",
+]
+
+[[package]]
+name = "objc2-uniform-type-identifiers"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-user-notifications"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-web-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
[[package]]
name = "objc_exception"
version = "0.1.2"
@@ -3129,7 +3602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f"
dependencies = [
"bitflags 2.6.0",
- "cfg-if",
+ "cfg-if 1.0.0",
"foreign-types 0.3.2",
"libc",
"once_cell",
@@ -3145,7 +3618,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -3256,7 +3729,7 @@ version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"libc",
"redox_syscall 0.5.3",
"smallvec",
@@ -3385,7 +3858,7 @@ dependencies = [
"phf_shared 0.11.2",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -3432,7 +3905,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -3458,6 +3931,34 @@ dependencies = [
"futures-io",
]
+[[package]]
+name = "pipewire"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08e645ba5c45109106d56610b3ee60eb13a6f2beb8b74f8dc8186cf261788dda"
+dependencies = [
+ "anyhow",
+ "bitflags 2.6.0",
+ "libc",
+ "libspa",
+ "libspa-sys",
+ "nix 0.27.1",
+ "once_cell",
+ "pipewire-sys",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "pipewire-sys"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "849e188f90b1dda88fe2bfe1ad31fe5f158af2c98f80fb5d13726c44f3f01112"
+dependencies = [
+ "bindgen",
+ "libspa-sys",
+ "system-deps",
+]
+
[[package]]
name = "pkg-config"
version = "0.3.30"
@@ -3496,7 +3997,7 @@ version = "3.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
@@ -3575,9 +4076,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]]
name = "proc-macro2"
-version = "1.0.86"
+version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [
"unicode-ident",
]
@@ -3598,7 +4099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
dependencies = [
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -3655,7 +4156,7 @@ dependencies = [
"quinn-udp",
"rustc-hash",
"rustls",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tracing",
]
@@ -3672,7 +4173,7 @@ dependencies = [
"rustc-hash",
"rustls",
"slab",
- "thiserror",
+ "thiserror 1.0.69",
"tinyvec",
"tracing",
]
@@ -3791,7 +4292,7 @@ dependencies = [
"av1-grain",
"bitstream-io",
"built",
- "cfg-if",
+ "cfg-if 1.0.0",
"interpolate_name",
"itertools",
"libc",
@@ -3809,7 +4310,7 @@ dependencies = [
"rand_chacha 0.3.1",
"simd_helpers",
"system-deps",
- "thiserror",
+ "thiserror 1.0.69",
"v_frame",
"wasm-bindgen",
]
@@ -3880,7 +4381,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
dependencies = [
"getrandom 0.2.15",
"libredox",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -4016,7 +4517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
dependencies = [
"cc",
- "cfg-if",
+ "cfg-if 1.0.0",
"getrandom 0.2.15",
"libc",
"spin",
@@ -4120,6 +4621,25 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "scap"
+version = "0.0.7"
+source = "git+https://github.com/CapSoftware/scap?rev=58d4410bf52f#58d4410bf52fb8033be99dcc62a27369a4cbaf32"
+dependencies = [
+ "cocoa 0.25.0",
+ "core-graphics-helmer-fork",
+ "dbus",
+ "objc",
+ "pipewire",
+ "rand 0.8.5",
+ "screencapturekit",
+ "screencapturekit-sys",
+ "sysinfo 0.30.13",
+ "tao-core-video-sys",
+ "windows 0.58.0",
+ "windows-capture",
+]
+
[[package]]
name = "schannel"
version = "0.1.23"
@@ -4153,7 +4673,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -4168,6 +4688,29 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+[[package]]
+name = "screencapturekit"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5eeeb57ac94960cfe5ff4c402be6585ae4c8d29a2cf41b276048c2e849d64e"
+dependencies = [
+ "screencapturekit-sys",
+]
+
+[[package]]
+name = "screencapturekit-sys"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22411b57f7d49e7fe08025198813ee6fd65e1ee5eff4ebc7880c12c82bde4c60"
+dependencies = [
+ "block",
+ "dispatch",
+ "objc",
+ "objc-foundation",
+ "objc_id",
+ "once_cell",
+]
+
[[package]]
name = "screenpipe-app"
version = "0.14.26"
@@ -4184,14 +4727,17 @@ dependencies = [
"lazy_static",
"libc",
"log",
+ "nokhwa-bindings-macos",
"objc",
"reqwest",
+ "scap",
"serde",
"serde_derive",
"serde_json",
- "sysinfo",
+ "sysinfo 0.29.0",
"tauri",
"tauri-build",
+ "tauri-nspanel",
"tauri-plugin-autostart",
"tauri-plugin-cli",
"tauri-plugin-dialog",
@@ -4205,6 +4751,7 @@ dependencies = [
"tauri-plugin-store",
"tauri-plugin-updater",
"tauri-utils",
+ "thiserror 1.0.69",
"tokio",
"tower-http",
"tracing",
@@ -4223,7 +4770,7 @@ checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
"bitflags 2.6.0",
"core-foundation 0.9.4",
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"libc",
"security-framework-sys",
]
@@ -4234,7 +4781,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf"
dependencies = [
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"libc",
]
@@ -4295,7 +4842,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -4306,7 +4853,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -4338,7 +4885,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -4389,7 +4936,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -4430,7 +4977,7 @@ version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"cpufeatures",
"digest",
]
@@ -4441,7 +4988,7 @@ version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"cpufeatures",
"digest",
]
@@ -4465,6 +5012,12 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "signal-hook-registry"
version = "1.4.2"
@@ -4574,6 +5127,9 @@ name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
[[package]]
name = "stable_deref_trait"
@@ -4658,9 +5214,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.71"
+version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [
"proc-macro2",
"quote",
@@ -4694,8 +5250,8 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02f1dc6930a439cc5d154221b5387d153f8183529b07c19aca24ea31e0a167e1"
dependencies = [
- "cfg-if",
- "core-foundation-sys",
+ "cfg-if 1.0.0",
+ "core-foundation-sys 0.8.7",
"libc",
"ntapi",
"once_cell",
@@ -4703,6 +5259,21 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "sysinfo"
+version = "0.30.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3"
+dependencies = [
+ "cfg-if 1.0.0",
+ "core-foundation-sys 0.8.7",
+ "libc",
+ "ntapi",
+ "once_cell",
+ "rayon",
+ "windows 0.52.0",
+]
+
[[package]]
name = "system-configuration"
version = "0.5.1"
@@ -4720,7 +5291,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
- "core-foundation-sys",
+ "core-foundation-sys 0.8.7",
"libc",
]
@@ -4739,9 +5310,9 @@ dependencies = [
[[package]]
name = "tao"
-version = "0.30.2"
+version = "0.30.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06e48d7c56b3f7425d061886e8ce3b6acfab1993682ed70bef50fd133d721ee6"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
dependencies = [
"bitflags 2.6.0",
"cocoa 0.26.0",
@@ -4776,6 +5347,18 @@ dependencies = [
"x11-dl",
]
+[[package]]
+name = "tao-core-video-sys"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271450eb289cb4d8d0720c6ce70c72c8c858c93dd61fc625881616752e6b98f6"
+dependencies = [
+ "cfg-if 1.0.0",
+ "core-foundation-sys 0.8.7",
+ "libc",
+ "objc",
+]
+
[[package]]
name = "tao-macros"
version = "0.1.2"
@@ -4806,9 +5389,9 @@ checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
[[package]]
name = "tauri"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c9c08beea86d5095b6f5fb1c788fe8759b23c3f71927c66a69e725a91d089cd"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
dependencies = [
"anyhow",
"bytes",
@@ -4821,7 +5404,8 @@ dependencies = [
"gtk",
"heck 0.5.0",
"http 1.1.0",
- "image",
+ "http-range",
+ "image 0.25.1",
"jni",
"libc",
"log",
@@ -4844,7 +5428,7 @@ dependencies = [
"tauri-runtime",
"tauri-runtime-wry",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.4",
"tokio",
"tray-icon",
"url",
@@ -4857,9 +5441,9 @@ dependencies = [
[[package]]
name = "tauri-build"
-version = "2.0.0"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93bb649a284aec2ab43e8df6831b8c8060d231ec8ddf05bf021d58cb67570e1f"
+checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
dependencies = [
"anyhow",
"cargo_toml",
@@ -4879,9 +5463,9 @@ dependencies = [
[[package]]
name = "tauri-codegen"
-version = "2.0.0"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4511912612ba0da11aeb300e18e18b2c7067fd14aa886eac46bdcc43b4fa3ee"
+checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf"
dependencies = [
"base64 0.22.1",
"brotli",
@@ -4895,9 +5479,9 @@ dependencies = [
"serde",
"serde_json",
"sha2",
- "syn 2.0.71",
+ "syn 2.0.90",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.4",
"time",
"url",
"uuid",
@@ -4906,18 +5490,34 @@ dependencies = [
[[package]]
name = "tauri-macros"
-version = "2.0.0"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62ee976578a14b779996d7b6879d7e625c8ce674bc87e223953664f37def2eef"
+checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
"tauri-codegen",
"tauri-utils",
]
+[[package]]
+name = "tauri-nspanel"
+version = "2.0.0"
+source = "git+https://github.com/ahkohd/tauri-nspanel?branch=v2#e38d989c5e97c5a55d90277765e2508b4f296832"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "cocoa 0.26.0",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "objc",
+ "objc-foundation",
+ "objc_id",
+ "tauri",
+]
+
[[package]]
name = "tauri-plugin"
version = "2.0.0"
@@ -4947,7 +5547,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -4962,7 +5562,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -4979,7 +5579,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-plugin-fs",
- "thiserror",
+ "thiserror 1.0.69",
"url",
]
@@ -4999,7 +5599,7 @@ dependencies = [
"serde_repr",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
"url",
"uuid",
]
@@ -5016,7 +5616,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -5033,7 +5633,7 @@ dependencies = [
"serde_repr",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
"time",
"url",
]
@@ -5053,7 +5653,7 @@ dependencies = [
"sys-locale",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -5083,7 +5683,7 @@ dependencies = [
"shared_child",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
]
@@ -5097,7 +5697,7 @@ dependencies = [
"serde",
"serde_json",
"tauri",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
"zbus",
]
@@ -5114,7 +5714,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
]
@@ -5140,7 +5740,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tempfile",
- "thiserror",
+ "thiserror 1.0.69",
"time",
"tokio",
"url",
@@ -5150,9 +5750,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
-version = "2.0.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2570e1f33f332a2d2d9967ebb3903bc4e1f92b9c47e4d1b302c10ea4153fcdbb"
+checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958"
dependencies = [
"dpi",
"gtk",
@@ -5162,16 +5762,16 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.4",
"url",
"windows 0.58.0",
]
[[package]]
name = "tauri-runtime-wry"
-version = "2.0.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8147d8f9ed418d83a90af3d64fbdca5e0e924ae28e5351da88f9568169db8665"
+checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2"
dependencies = [
"gtk",
"http 1.1.0",
@@ -5195,9 +5795,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f87856e9d7fa91fd710362f3c73fccbf6bfd036934908791e65bd803d54dc8a8"
+checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54"
dependencies = [
"brotli",
"cargo_metadata",
@@ -5205,6 +5805,7 @@ dependencies = [
"dunce",
"glob",
"html5ever",
+ "http 1.1.0",
"infer",
"json-patch",
"kuchikiki",
@@ -5221,7 +5822,7 @@ dependencies = [
"serde_json",
"serde_with",
"swift-rs",
- "thiserror",
+ "thiserror 2.0.4",
"toml 0.8.2",
"url",
"urlpattern",
@@ -5256,7 +5857,7 @@ version = "3.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"fastrand",
"rustix",
"windows-sys 0.52.0",
@@ -5281,22 +5882,42 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
[[package]]
name = "thiserror"
-version = "1.0.62"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490"
+dependencies = [
+ "thiserror-impl 2.0.4",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
- "thiserror-impl",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.62"
+version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c"
+checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -5305,7 +5926,7 @@ version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"once_cell",
]
@@ -5394,7 +6015,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -5556,7 +6177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf"
dependencies = [
"crossbeam-channel",
- "thiserror",
+ "thiserror 1.0.69",
"time",
"tracing-subscriber",
]
@@ -5569,7 +6190,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -5628,7 +6249,7 @@ dependencies = [
"once_cell",
"png",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
]
@@ -5729,6 +6350,12 @@ version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
+[[package]]
+name = "unicode-width"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
+
[[package]]
name = "untrusted"
version = "0.9.0"
@@ -5893,7 +6520,7 @@ version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"wasm-bindgen-macro",
]
@@ -5908,7 +6535,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
"wasm-bindgen-shared",
]
@@ -5918,7 +6545,7 @@ version = "0.4.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"js-sys",
"wasm-bindgen",
"web-sys",
@@ -5942,7 +6569,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -6111,7 +6738,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -6120,7 +6747,7 @@ version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
dependencies = [
- "thiserror",
+ "thiserror 1.0.69",
"windows 0.58.0",
"windows-core 0.58.0",
]
@@ -6175,6 +6802,16 @@ dependencies = [
"windows-version",
]
+[[package]]
+name = "windows"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
+dependencies = [
+ "windows-core 0.52.0",
+ "windows-targets 0.52.6",
+]
+
[[package]]
name = "windows"
version = "0.56.0"
@@ -6195,6 +6832,20 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "windows-capture"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6001b777f61cafce437201de46a019ed7f4afed3b669f02e5ce4e0759164cb3e"
+dependencies = [
+ "clap",
+ "ctrlc",
+ "parking_lot",
+ "rayon",
+ "thiserror 1.0.69",
+ "windows 0.58.0",
+]
+
[[package]]
name = "windows-core"
version = "0.52.0"
@@ -6235,7 +6886,7 @@ version = "0.1.1"
source = "git+https://github.com/tribhuwan-kumar/windows-icons.git#f7db8e815b2d71c3b57bc6084b3451268be0d84a"
dependencies = [
"base64 0.22.1",
- "image",
+ "image 0.25.1",
"regex",
"tokio",
"winapi",
@@ -6250,7 +6901,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -6261,7 +6912,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -6272,7 +6923,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -6283,7 +6934,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.71",
+ "syn 2.0.90",
]
[[package]]
@@ -6561,20 +7212,19 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
dependencies = [
- "cfg-if",
+ "cfg-if 1.0.0",
"windows-sys 0.48.0",
]
[[package]]
name = "wry"
-version = "0.44.1"
+version = "0.47.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "440600584cfbd8b0d28eace95c1f2c253db05dae43780b79380aa1e868f04c73"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
dependencies = [
"base64 0.22.1",
- "block",
- "cocoa 0.26.0",
- "core-graphics 0.24.0",
+ "block2",
+ "cookie",
"crossbeam-channel",
"dpi",
"dunce",
@@ -6587,15 +7237,19 @@ dependencies = [
"kuchikiki",
"libc",
"ndk",
- "objc",
- "objc_id",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "objc2-ui-kit",
+ "objc2-web-kit",
"once_cell",
"percent-encoding",
"raw-window-handle",
"sha2",
"soup3",
"tao-macros",
- "thiserror",
+ "thiserror 1.0.69",
+ "url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
@@ -6647,6 +7301,15 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "yansi-term"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1"
+dependencies = [
+ "winapi",
+]
+
[[package]]
name = "zbus"
version = "4.0.1"
@@ -6670,7 +7333,7 @@ dependencies = [
"futures-sink",
"futures-util",
"hex",
- "nix",
+ "nix 0.27.1",
"ordered-stream",
"rand 0.8.5",
"serde",
@@ -6730,7 +7393,7 @@ dependencies = [
"displaydoc",
"indexmap 2.2.6",
"memchr",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 2a5f30f5d..6178426af 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -12,17 +12,17 @@ rust-version = "1.75"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
-tauri-build = { version = "=2.0.0", features = [] }
+tauri-build = { version = "=2.0.3", features = [] }
[dependencies]
-tauri = { version = "=2.0.0", features = [
+tauri = { version = "=2.1.1", features = [ "protocol-asset",
"macos-private-api",
"tray-icon",
"devtools",
"image-png",
"image-ico",
] }
-tauri-utils = { version = "=2.0.0", features = [] }
+tauri-utils = { version = "=2.1.0", features = [] }
# plugins
tauri-plugin-fs = "2.0.0"
@@ -69,6 +69,7 @@ anyhow = "1.0.71"
sysinfo = "=0.29.0"
# hakc
+thiserror = "1.0.63"
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }
# server
@@ -77,7 +78,10 @@ axum = "0.6.0" # or your current version
dirs = "5.0.1"
-
+# bunch of hack for permissions
+scap = { git = "https://github.com/CapSoftware/scap", rev = "58d4410bf52f" }
+nokhwa-bindings-macos = { git = "https://github.com/CapSoftware/nokhwa", rev = "0d3d1f30a78b" }
+tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2" }
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-cli = "2.0.0"
diff --git a/screenpipe-app-tauri/src-tauri/gen/schemas/desktop-schema.json b/screenpipe-app-tauri/src-tauri/gen/schemas/desktop-schema.json
index 7c1f7749f..988384384 100644
--- a/screenpipe-app-tauri/src-tauri/gen/schemas/desktop-schema.json
+++ b/screenpipe-app-tauri/src-tauri/gen/schemas/desktop-schema.json
@@ -37,7 +37,7 @@
],
"definitions": {
"Capability": {
- "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```",
+ "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
"type": "object",
"required": [
"identifier",
@@ -84,7 +84,7 @@
}
},
"permissions": {
- "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```",
+ "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```",
"type": "array",
"items": {
"$ref": "#/definitions/PermissionEntry"
diff --git a/screenpipe-app-tauri/src-tauri/gen/schemas/macOS-schema.json b/screenpipe-app-tauri/src-tauri/gen/schemas/macOS-schema.json
index 7c1f7749f..988384384 100644
--- a/screenpipe-app-tauri/src-tauri/gen/schemas/macOS-schema.json
+++ b/screenpipe-app-tauri/src-tauri/gen/schemas/macOS-schema.json
@@ -37,7 +37,7 @@
],
"definitions": {
"Capability": {
- "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```",
+ "description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
"type": "object",
"required": [
"identifier",
@@ -84,7 +84,7 @@
}
},
"permissions": {
- "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```",
+ "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```",
"type": "array",
"items": {
"$ref": "#/definitions/PermissionEntry"
diff --git a/screenpipe-app-tauri/src-tauri/src/commands.rs b/screenpipe-app-tauri/src-tauri/src/commands.rs
index 6327242ad..8fd53fd0f 100644
--- a/screenpipe-app-tauri/src-tauri/src/commands.rs
+++ b/screenpipe-app-tauri/src-tauri/src/commands.rs
@@ -22,28 +22,6 @@ pub fn set_tray_health_icon(app_handle: tauri::AppHandle<tauri::Wry>) {
}
}
-#[cfg(target_os = "macos")]
-use core_foundation::{base::TCFType, boolean::CFBoolean, string::CFString};
-
-#[tauri::command]
-pub fn open_screen_capture_preferences() {
- #[cfg(target_os = "macos")]
- std::process::Command::new("open")
- .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture")
- .spawn()
- .expect("failed to open system preferences");
-}
-
-#[allow(dead_code)]
-#[tauri::command]
-pub fn open_mic_preferences() {
- #[cfg(target_os = "macos")]
- std::process::Command::new("open")
- .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone")
- .spawn()
- .expect("failed to open system preferences");
-}
-
#[tauri::command]
pub async fn load_pipe_config(
app_handle: tauri::AppHandle<tauri::Wry>,
@@ -227,44 +205,9 @@ pub fn update_show_screenpipe_shortcut(
Ok(())
}
-#[tauri::command]
-pub fn open_accessibility_preferences() {
- #[cfg(target_os = "macos")]
- std::process::Command::new("open")
- .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")
- .spawn()
- .expect("failed to open system preferences");
-}
-#[tauri::command]
-pub fn check_accessibility_permissions() -> bool {
- #[cfg(target_os = "macos")]
- {
- // Check if the app has accessibility permissions
- let options = {
- let key = CFString::new("AXTrustedCheckOptionPrompt");
- let value = CFBoolean::false_value();
- let pairs = &[(key, value)];
- core_foundation::dictionary::CFDictionary::from_CFType_pairs(pairs)
- };
-
- let trusted = unsafe {
- let accessibility = CFString::new("AXIsProcessTrustedWithOptions");
- let func: extern "C" fn(*const core_foundation::dictionary::CFDictionary) -> bool =
- std::mem::transmute(libc::dlsym(
- libc::RTLD_DEFAULT,
- accessibility.to_string().as_ptr() as *const _,
- ));
- func(options.as_concrete_TypeRef() as *const _)
- };
-
- return trusted;
- }
- #[cfg(not(target_os = "macos"))]
- {
- return true;
- }
-}
+
+
// Add these new structs
#[derive(Debug, Serialize)]
@@ -311,128 +254,12 @@ pub async fn open_auth_window(app_handle: tauri::AppHandle<tauri::Wry>) -> Resul
Ok(())
}
-#[derive(Debug, Serialize, Clone)]
-pub struct PermissionsStatus {
- screen_capture: bool,
- microphone: bool,
- accessibility: bool,
-}
-#[tauri::command]
-pub fn check_all_permissions() -> PermissionsStatus {
- PermissionsStatus {
- screen_capture: check_screen_capture_permissions(),
- microphone: check_microphone_permissions(),
- accessibility: check_accessibility_permissions(),
- }
-}
-
-#[tauri::command]
-pub fn trigger_audio_permission() -> Result<(), String> {
- #[cfg(target_os = "macos")]
- {
- use core_foundation::{base::TCFType, string::CFString};
-
- unsafe {
- // First try to load the AVFoundation framework
- let framework = libc::dlopen(
- "/System/Library/Frameworks/AVFoundation.framework/AVFoundation\0".as_ptr() as *const _,
- libc::RTLD_LAZY,
- );
- if framework.is_null() {
- return Err("Could not load AVFoundation framework".to_string());
- }
- let av_media_type = CFString::new("avfa"); // Audio media type
- let func_ptr = libc::dlsym(
- framework,
- "AVCaptureDevice_requestAccessForMediaType\0".as_ptr() as *const _,
- );
- if func_ptr.is_null() {
- libc::dlclose(framework);
- return Err("Could not find AVCaptureDevice API".to_string());
- }
- let func: extern "C" fn(*const core_foundation::string::__CFString) -> bool =
- std::mem::transmute(func_ptr);
-
- match std::panic::catch_unwind(|| func(av_media_type.as_concrete_TypeRef())) {
- Ok(_) => {
- libc::dlclose(framework);
- Ok(())
- }
- Err(_) => {
- libc::dlclose(framework);
- Err("Failed to request audio permission".to_string())
- }
- }
- }
- }
-
- #[cfg(not(target_os = "macos"))]
- {
- Ok(()) // Windows and Linux don't require explicit microphone permissions
- }
-}
-
-#[tauri::command]
-pub fn check_microphone_permissions() -> bool {
- #[cfg(target_os = "macos")]
- {
- use core_foundation::{base::TCFType, string::CFString};
-
- unsafe {
- let av_media_type = CFString::new("avfa");
- // Use authorizationStatus instead of requesting
- let func_ptr = libc::dlsym(
- libc::RTLD_DEFAULT,
- "AVCaptureDevice_authorizationStatusForMediaType\0".as_ptr() as *const _,
- );
-
- if !func_ptr.is_null() {
- let func: extern "C" fn(*const core_foundation::string::__CFString) -> i32 =
- std::mem::transmute(func_ptr);
- let status = func(av_media_type.as_concrete_TypeRef());
- // 3 = AVAuthorizationStatusAuthorized
- return status == 3;
- }
- false
- }
- }
-
- #[cfg(not(target_os = "macos"))]
- {
- true
- }
-}
-
-#[tauri::command]
-pub fn check_screen_capture_permissions() -> bool {
- #[cfg(target_os = "macos")]
- {
- unsafe {
- // Only check status without requesting
- let func_ptr = libc::dlsym(
- libc::RTLD_DEFAULT,
- "CGPreflightScreenCaptureAccess\0".as_ptr() as *const _,
- );
-
- if !func_ptr.is_null() {
- let func: extern "C" fn() -> bool = std::mem::transmute(func_ptr);
- return func();
- }
- false
- }
- }
-
- #[cfg(not(target_os = "macos"))]
- {
- true
- }
-}
#[tauri::command]
pub fn show_search(app_handle: tauri::AppHandle<tauri::Wry>) {
@@ -458,25 +285,3 @@ pub fn show_search(app_handle: tauri::AppHandle<tauri::Wry>) {
}
}
-// Add this new command
-#[tauri::command]
-pub async fn poll_permissions(duration_secs: u64) -> Result<Vec<PermissionsStatus>, String> {
- let mut results = Vec::new();
- let start = std::time::Instant::now();
- let duration = std::time::Duration::from_secs(duration_secs);
-
- while start.elapsed() < duration {
- let status = check_all_permissions();
- results.push(status.clone());
-
- // If all permissions are granted, we can stop polling
- if status.screen_capture && status.microphone && status.accessibility {
- break;
- }
-
- // Sleep for 1 second between checks
- tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
- }
-
- Ok(results)
-}
diff --git a/screenpipe-app-tauri/src-tauri/src/main.rs b/screenpipe-app-tauri/src-tauri/src/main.rs
index 83d71dfa9..dafd53b83 100755
--- a/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -42,9 +42,7 @@ mod llm_sidecar;
mod server;
mod sidecar;
mod updates;
-pub use commands::check_accessibility_permissions;
-pub use commands::open_accessibility_preferences;
-pub use commands::open_screen_capture_preferences;
+mod permissions;
pub use commands::reset_all_pipes;
pub use commands::set_tray_health_icon;
pub use commands::set_tray_unhealth_icon;
@@ -53,6 +51,11 @@ pub use sidecar::kill_all_sreenpipes;
pub use sidecar::spawn_screenpipe;
+pub use permissions::open_permission_settings;
+pub use permissions::request_permission;
+pub use permissions::do_permissions_check;
+
+
pub struct SidecarState(Arc<tokio::sync::Mutex<Option<SidecarManager>>>);
fn get_base_dir(app: &tauri::AppHandle, custom_path: Option<String>) -> anyhow::Result<PathBuf> {
@@ -148,7 +151,9 @@ async fn main() {
.invoke_handler(tauri::generate_handler![
spawn_screenpipe,
kill_all_sreenpipes,
- open_screen_capture_preferences,
+ permissions::open_permission_settings,
+ permissions::request_permission,
+ permissions::do_permissions_check,
load_pipe_config,
save_pipe_config,
reset_all_pipes,
@@ -158,15 +163,9 @@ async fn main() {
llm_sidecar::stop_ollama_sidecar,
commands::update_show_screenpipe_shortcut,
commands::show_timeline,
- commands::open_accessibility_preferences,
- commands::check_accessibility_permissions,
icons::get_app_icon,
commands::open_auth_window,
- commands::check_all_permissions,
- commands::trigger_audio_permission,
- commands::check_microphone_permissions,
commands::show_search,
- commands::poll_permissions,
])
.setup(|app| {
// Logging setup
diff --git a/screenpipe-app-tauri/src-tauri/src/permissions.rs b/screenpipe-app-tauri/src-tauri/src/permissions.rs
new file mode 100644
index 000000000..fcdca9421
--- /dev/null
+++ b/screenpipe-app-tauri/src-tauri/src/permissions.rs
@@ -0,0 +1,201 @@
+use serde::{Deserialize, Serialize};
+
+#[cfg(target_os = "macos")]
+#[link(name = "ApplicationServices", kind = "framework")]
+extern "C" {
+ fn AXIsProcessTrusted() -> bool;
+ fn AXIsProcessTrustedWithOptions(options: core_foundation::dictionary::CFDictionaryRef)
+ -> bool;
+}
+
+#[derive(Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub enum OSPermission {
+ ScreenRecording,
+ Camera,
+ Microphone,
+ Accessibility,
+}
+
+#[tauri::command(async)]
+pub fn open_permission_settings(permission: OSPermission) {
+ #[cfg(target_os = "macos")]
+ {
+ use std::process::Command;
+
+ match permission {
+ OSPermission::ScreenRecording => {
+ Command::new("open")
+ .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture")
+ .spawn()
+ .expect("Failed to open Screen Recording settings");
+ }
+ OSPermission::Camera => {
+ Command::new("open")
+ .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_Camera")
+ .spawn()
+ .expect("Failed to open Camera settings");
+ }
+ OSPermission::Microphone => {
+ Command::new("open")
+ .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone")
+ .spawn()
+ .expect("Failed to open Microphone settings");
+ }
+ OSPermission::Accessibility => {
+ Command::new("open")
+ .arg("x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")
+ .spawn()
+ .expect("Failed to open Accessibility settings");
+ }
+ }
+ }
+}
+
+#[tauri::command]
+pub async fn request_permission(permission: OSPermission) {
+ #[cfg(target_os = "macos")]
+ {
+ use nokhwa_bindings_macos::AVMediaType;
+ match permission {
+ OSPermission::ScreenRecording => {
+ scap::request_permission();
+ }
+ OSPermission::Camera => request_av_permission(AVMediaType::Video),
+ OSPermission::Microphone => request_av_permission(AVMediaType::Audio),
+ OSPermission::Accessibility => request_accessibility_permission(),
+ }
+ }
+}
+
+#[cfg(target_os = "macos")]
+fn request_av_permission(media_type: nokhwa_bindings_macos::AVMediaType) {
+ use objc::{runtime::*, *};
+ use tauri_nspanel::block::ConcreteBlock;
+
+ let callback = move |_: BOOL| {};
+ let cls = class!(AVCaptureDevice);
+ let objc_fn_block: ConcreteBlock<(BOOL,), (), _> = ConcreteBlock::new(callback);
+ let objc_fn_pass = objc_fn_block.copy();
+ unsafe {
+ let _: () = msg_send![cls, requestAccessForMediaType:media_type.into_ns_str() completionHandler:objc_fn_pass];
+ };
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+#[serde(rename_all = "camelCase")]
+pub enum OSPermissionStatus {
+ // This platform does not require this permission
+ NotNeeded,
+ // The user has neither granted nor denied permission
+ Empty,
+ // The user has explicitly granted permission
+ Granted,
+ // The user has denied permission, or has granted it but not yet restarted
+ Denied,
+}
+
+impl OSPermissionStatus {
+ pub fn permitted(&self) -> bool {
+ match self {
+ Self::NotNeeded | Self::Granted => true,
+ _ => false,
+ }
+ }
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+#[serde(rename_all = "camelCase")]
+pub struct OSPermissionsCheck {
+ pub screen_recording: OSPermissionStatus,
+ pub microphone: OSPermissionStatus,
+ pub camera: OSPermissionStatus,
+ pub accessibility: OSPermissionStatus,
+}
+
+impl OSPermissionsCheck {
+ pub fn necessary_granted(&self) -> bool {
+ self.screen_recording.permitted() && self.accessibility.permitted()
+ }
+}
+
+#[tauri::command(async)]
+pub fn do_permissions_check(initial_check: bool) -> OSPermissionsCheck {
+ #[cfg(target_os = "macos")]
+ {
+ use nokhwa_bindings_macos::AVMediaType;
+
+ fn check_av_permission(media_type: AVMediaType) -> OSPermissionStatus {
+ use nokhwa_bindings_macos::AVAuthorizationStatus;
+ use objc::*;
+
+ let cls = objc::class!(AVCaptureDevice);
+ let status: AVAuthorizationStatus =
+ unsafe { msg_send![cls, authorizationStatusForMediaType:media_type.into_ns_str()] };
+ match status {
+ AVAuthorizationStatus::NotDetermined => OSPermissionStatus::Empty,
+ AVAuthorizationStatus::Authorized => OSPermissionStatus::Granted,
+ _ => OSPermissionStatus::Denied,
+ }
+ }
+
+ OSPermissionsCheck {
+ screen_recording: {
+ let result = scap::has_permission();
+ match (result, initial_check) {
+ (true, _) => OSPermissionStatus::Granted,
+ (false, true) => OSPermissionStatus::Empty,
+ (false, false) => OSPermissionStatus::Denied,
+ }
+ },
+ microphone: check_av_permission(AVMediaType::Audio),
+ camera: check_av_permission(AVMediaType::Video),
+ accessibility: { check_accessibility_permission() },
+ }
+ }
+
+ #[cfg(not(target_os = "macos"))]
+ {
+ OSPermissionsCheck {
+ screen_recording: OSPermissionStatus::NotNeeded,
+ microphone: OSPermissionStatus::NotNeeded,
+ camera: OSPermissionStatus::NotNeeded,
+ accessibility: OSPermissionStatus::NotNeeded,
+ }
+ }
+}
+
+pub fn check_accessibility_permission() -> OSPermissionStatus {
+ #[cfg(target_os = "macos")]
+ {
+ if unsafe { AXIsProcessTrusted() } {
+ OSPermissionStatus::Granted
+ } else {
+ OSPermissionStatus::Denied
+ }
+ }
+ #[cfg(not(target_os = "macos"))]
+ {
+ // For non-macOS platforms, assume permission is granted
+ OSPermissionStatus::NotNeeded
+ }
+}
+
+pub fn request_accessibility_permission() {
+ #[cfg(target_os = "macos")]
+ {
+ use core_foundation::base::TCFType;
+ use core_foundation::dictionary::CFDictionary; // Import CFDictionaryRef
+ use core_foundation::string::CFString;
+
+ let prompt_key = CFString::new("AXTrustedCheckOptionPrompt");
+ let prompt_value = core_foundation::boolean::CFBoolean::true_value();
+
+ let options =
+ CFDictionary::from_CFType_pairs(&[(prompt_key.as_CFType(), prompt_value.as_CFType())]);
+
+ unsafe {
+ AXIsProcessTrustedWithOptions(options.as_concrete_TypeRef());
+ }
+ }
+}
\ No newline at end of file
diff --git a/screenpipe-app-tauri/src-tauri/tauri.conf.json b/screenpipe-app-tauri/src-tauri/tauri.conf.json
index 16673e1ca..38e384d9b 100644
--- a/screenpipe-app-tauri/src-tauri/tauri.conf.json
+++ b/screenpipe-app-tauri/src-tauri/tauri.conf.json
@@ -117,89 +117,12 @@
],
"security": {
"assetProtocol": {
- "enable": false
- },
- "csp": {
- "default-src": "'self' customprotocol: asset: http://localhost:* https://*.clerk.dev https://clerk.dev",
- "connect-src": [
- "ipc:",
- "http://ipc.localhost",
- "http://localhost:*",
- "https://*.clerk.dev",
- "https://clerk.dev",
- "https://*.clerk.com",
- "https://clerk.com",
- "https://youtube.com",
- "https://api.openai.com",
- "http://localhost:3030",
- "https://web.crabnebula.cloud",
- "https://api.github.com",
- "https://eu.i.posthog.com",
- "https://github.com",
- "https://*.githubusercontent.com",
- "https://*.github.com",
- "http://*:11434",
- "http://*:9000",
- "https://ai-proxy.i-f9f.workers.dev",
- "https://*.clerk.com",
- "https://*.screenpi.pe",
- "https://openrouter.ai",
- "http://tauri.localhost"
- ],
- "font-src": [
- "https://fonts.gstatic.com",
- "tauri://localhost",
- "http://tauri.localhost"
- ],
- "media-src": "'self' mediadevices: asset: http://asset.localhost file: blob: tauri://localhost file: blob: https://youtube.com https://github.com https://youtu.be",
- "img-src": [
- "'self'",
- "data:",
- "https://*.clerk.dev",
- "https://clerk.dev",
- "https://*.clerk.com",
- "https://clerk.com",
- "https://*.githubusercontent.com",
- "https://*.github.com",
- "https://github.com",
- "https://*.s3.amazonaws.com"
- ],
- "style-src": [
- "'unsafe-inline'",
- "'self'",
- "https://fonts.googleapis.com",
- "tauri://localhost",
- "http://tauri.localhost",
- "http://localhost:*",
- "data:",
- "*"
- ],
- "frame-src": [
- "http://localhost:*",
- "https://*.clerk.dev",
- "https://clerk.dev",
- "https://*.clerk.com",
- "https://clerk.com",
- "https://www.youtube.com"
- ],
- "script-src": [
- "'unsafe-eval'",
- "'unsafe-inline'",
- "'self'",
- "http://localhost:*",
- "https://*.clerk.dev",
- "https://clerk.dev",
- "https://*.clerk.com",
- "https://clerk.com",
- "tauri://localhost",
- "https://*.githubusercontent.com",
- "https://*.github.com",
- "https://*.s3.amazonaws.com",
- "https://*.clerk.com",
- "https://*.screenpi.pe",
- "https://ai-proxy.i-f9f.workers.dev"
+ "enable": true,
+ "scope": [
+ "$APPDATA/**"
]
- }
+ },
+ "csp": null
},
"macOSPrivateApi": true
}