Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 search #346

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions screenpipe-app-tauri/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export default function Home() {
</div>
) : settings.aiUrl ? (
<>
<h1 className="text-2xl font-bold mb-8 text-center mb-12">
where pixels become magic
</h1>
<SearchChat />

<div className="h-[calc(100vh-200px)]">
<SearchChat />
</div>
</>
) : (
// <Tabs
Expand Down
Binary file modified screenpipe-app-tauri/bun.lockb
Binary file not shown.
78 changes: 78 additions & 0 deletions screenpipe-app-tauri/components/natural-language-input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React, { useState } from "react";
import { motion } from "framer-motion";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Loader2 } from "lucide-react";

const useCases = [
{ id: 1, text: "summarize my last meeting" },
{ id: 2, text: "find that chart i saw yesterday" },
{ id: 3, text: "what did i work on this week?" },
{ id: 4, text: "generate a report of today's activities" },
{ id: 5, text: "remind me what john said about the project" },
{ id: 6, text: "find the website i visited about machine learning" },
];

interface NaturalLanguageInputProps {
onSubmit: (query: string) => void;
isLoading: boolean;
}

export function NaturalLanguageInput({
onSubmit,
isLoading,
}: NaturalLanguageInputProps) {
const [query, setQuery] = useState("");

const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
onSubmit(query);
};

const handleUseCaseClick = (text: string) => {
setQuery(text);
};

return (
<div className="space-y-4">
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 mb-4">
{useCases.map((useCase) => (
<motion.div
key={useCase.id}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
<Card
className="cursor-pointer h-full"
onClick={() => handleUseCaseClick(useCase.text)}
>
<CardContent className="flex items-center justify-center h-full p-4">
<p className="text-center text-sm">{useCase.text}</p>
</CardContent>
</Card>
</motion.div>
))}
</div>
<form onSubmit={handleSubmit} className="space-y-4">
<Input
type="text"
placeholder="e.g., find all zoom meetings from last week where we discussed the new product launch"
value={query}
onChange={(e) => setQuery(e.target.value)}
className="w-full"
/>
<Button type="submit" disabled={isLoading} className="w-full">
{isLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
asking...
</>
) : (
"ask"
)}
</Button>
</form>
</div>
);
}
4 changes: 1 addition & 3 deletions screenpipe-app-tauri/components/recording-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export function RecordingSettings({
const [isUpdating, setIsUpdating] = useState(false);
const { health } = useHealthCheck();
const isDisabled = health?.status_code === 500;
console.log("localSettings", localSettings);
console.log("settings", settings);
console.log("availableMonitors", availableMonitors);

useEffect(() => {
const loadDevices = async () => {
try {
Expand Down
Loading
Loading