Skip to content

Commit

Permalink
fix: disable chat history
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Nov 8, 2024
1 parent 67b10ff commit 9919660
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 338 deletions.
26 changes: 13 additions & 13 deletions screenpipe-app-tauri/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ export default function Home() {
};

return (
<SidebarProvider defaultOpen={false}>
{settings.aiUrl && (
<AppSidebar
searches={searches}
currentSearchId={currentSearchId}
onSelectSearch={setCurrentSearchId}
onDeleteSearch={deleteSearch}
/>
)}
<SidebarInset>
// <SidebarProvider defaultOpen={false}>
// {settings.aiUrl && (
// <AppSidebar
// searches={searches}
// currentSearchId={currentSearchId}
// onSelectSearch={setCurrentSearchId}
// onDeleteSearch={deleteSearch}
// />
// )}
// <SidebarInset>
<div className="flex flex-col items-center flex-1">
<div className="fixed top-4 left-4 z-50 flex items-center gap-2">
<SidebarTrigger className="h-8 w-8" />
{/* <SidebarTrigger className="h-8 w-8" /> */}
<Button
variant="ghost"
size="icon"
Expand Down Expand Up @@ -176,7 +176,7 @@ export default function Home() {
</div>
)}
</div>
</SidebarInset>
</SidebarProvider>
// </SidebarInset>
// </SidebarProvider>
);
}
49 changes: 2 additions & 47 deletions screenpipe-app-tauri/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { Button } from "@/components/ui/button";
import { Settings } from "@/components/settings";
import { PrettyLink } from "@/components/pretty-link";
import HealthStatus from "@/components/screenpipe-status";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";

import React from "react";
import PipeDialog from "@/components/pipe-store";
import MeetingHistory from "@/components/meeting-history";
Expand All @@ -31,24 +26,7 @@ import { useHealthCheck } from "@/lib/hooks/use-health-check";
import { Skeleton } from "@/components/ui/skeleton";
import { useChangelogDialog } from "@/lib/hooks/use-changelog-dialog";

function IconNewChat() {
return (
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z"
fill="currentColor"
fillRule="evenodd"
clipRule="evenodd"
></path>
</svg>
);
}


export default function Header() {
const [showInbox, setShowInbox] = useState(false);
Expand Down Expand Up @@ -120,26 +98,6 @@ export default function Header() {
<HeaderSkeleton />
) : (
<>
<div className="absolute left-8 top-4">
{/* <TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="secondary"
className="cursor-pointer"
onClick={() => {
location.reload();
}}
>
<IconNewChat />
</Button>
</TooltipTrigger>
<TooltipContent>
<p>New chat</p>
</TooltipContent>
</Tooltip>
</TooltipProvider> */}
</div>
<div className="relative z-[-1] flex flex-col items-center">
<div className="relative flex flex-col items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px] gap-4">
<div className="w-[180px] h-[50px]" />
Expand Down Expand Up @@ -226,9 +184,6 @@ export default function Header() {
function HeaderSkeleton() {
return (
<div className="w-full">
<div className="absolute left-8 top-4">
<Skeleton className="w-10 h-10 rounded-md" />
</div>
<div className="flex justify-center">
<Skeleton className="w-[180px] h-[50px] mt-4" />
</div>
Expand Down

This file was deleted.

48 changes: 0 additions & 48 deletions screenpipe-app-tauri/components/timeline/time-labels.tsx

This file was deleted.

35 changes: 26 additions & 9 deletions screenpipe-app-tauri/components/timeline/timeline-dock-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { platform } from "@tauri-apps/plugin-os";
import { invoke } from "@tauri-apps/api/core";
import { StreamTimeSeriesResponse } from "@/app/timeline/page";
import { stringToColor } from "@/lib/utils";
import { motion, useAnimation } from "framer-motion";

interface ProcessedBlock {
appName: string;
Expand All @@ -17,6 +18,7 @@ export function TimelineIconsSection({
blocks: StreamTimeSeriesResponse[];
}) {
const [iconCache, setIconCache] = useState<{ [key: string]: string }>({});
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);

// Get the visible time range
const timeRange = useMemo(() => {
Expand Down Expand Up @@ -153,23 +155,38 @@ export function TimelineIconsSection({
}, [processedBlocks, loadAppIcon]);

return (
<div className="absolute -top-8 inset-x-0 pointer-events-none h-8">
<div className="absolute -top-8 inset-x-0 h-8">
{processedBlocks.map((block, i) => {
const bgColor = stringToColor(block.appName);

return (
<div
<motion.div
key={`${block.appName}-${i}`}
className="absolute top-0 h-full w-full"
className="absolute top-0 h-full pointer-events-auto cursor-pointer"
style={{
left: `${block.percentThroughDay}%`,
transform: "translateX(-50%)",
transform: 'translateX(-50%)',
border: '1px solid red',
zIndex: 50,
}}
onMouseEnter={() => {
console.log('hover on:', block.appName);
}}
whileHover={{
scale: 1.5,
backgroundColor: 'red',
}}
transition={{
type: "spring",
stiffness: 300,
damping: 30
}}
>
{block.iconSrc ? (
<div
<motion.div
className="w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full"
style={{
backgroundColor: `${bgColor}40`, // 40 is for 25% opacity
backgroundColor: `${bgColor}40`,
padding: "2px",
}}
>
Expand All @@ -180,14 +197,14 @@ export function TimelineIconsSection({
loading="lazy"
decoding="async"
/>
</div>
</motion.div>
) : (
<div
<motion.div
className="w-5 h-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full"
style={{ backgroundColor: bgColor }}
/>
)}
</div>
</motion.div>
);
})}
</div>
Expand Down
Loading

0 comments on commit 9919660

Please sign in to comment.