mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-28 19:05:31 +02:00
fix build isues
This commit is contained in:
parent
4db42d17cf
commit
6094ac508a
3 changed files with 4 additions and 76 deletions
|
|
@ -5302,9 +5302,6 @@ function App() {
|
||||||
onOpenNote={(path) => navigateToFile(path)}
|
onOpenNote={(path) => navigateToFile(path)}
|
||||||
onOpenRun={(rid) => void navigateToView({ type: 'chat', runId: rid })}
|
onOpenRun={(rid) => void navigateToView({ type: 'chat', runId: rid })}
|
||||||
onTakeMeetingNotes={() => { void handleToggleMeeting() }}
|
onTakeMeetingNotes={() => { void handleToggleMeeting() }}
|
||||||
onVoiceNoteCreated={handleVoiceNoteCreated}
|
|
||||||
onRunBrowserTask={handleToggleBrowser}
|
|
||||||
onStartResearch={() => submitFromPalette('Do deep, extreme research on a topic and build me a local website that summarizes the findings. Ask me what topic to research.', null)}
|
|
||||||
onOpenChat={handleNewChatTab}
|
onOpenChat={handleNewChatTab}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||||
import { ArrowRight, Bot, Calendar, Clock, FileText, Globe, Mail, MessageSquare, Mic, Plus, Telescope, Video } from 'lucide-react'
|
import { ArrowRight, Bot, Calendar, Clock, FileText, Mail, MessageSquare, Mic, Plus, Video } from 'lucide-react'
|
||||||
|
|
||||||
import { VoiceNoteButton } from '@/components/sidebar-content'
|
|
||||||
import { extractConferenceLink } from '@/lib/calendar-event'
|
import { extractConferenceLink } from '@/lib/calendar-event'
|
||||||
|
|
||||||
interface TreeNode {
|
interface TreeNode {
|
||||||
|
|
@ -26,9 +24,6 @@ type HomeViewProps = {
|
||||||
onOpenNote: (path: string) => void
|
onOpenNote: (path: string) => void
|
||||||
onOpenRun: (runId: string) => void
|
onOpenRun: (runId: string) => void
|
||||||
onTakeMeetingNotes: () => void
|
onTakeMeetingNotes: () => void
|
||||||
onVoiceNoteCreated?: (path: string) => void
|
|
||||||
onRunBrowserTask?: () => void
|
|
||||||
onStartResearch?: () => void
|
|
||||||
onOpenChat?: () => void
|
onOpenChat?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,9 +164,6 @@ export function HomeView({
|
||||||
onOpenNote,
|
onOpenNote,
|
||||||
onOpenRun,
|
onOpenRun,
|
||||||
onTakeMeetingNotes,
|
onTakeMeetingNotes,
|
||||||
onVoiceNoteCreated,
|
|
||||||
onRunBrowserTask,
|
|
||||||
onStartResearch,
|
|
||||||
onOpenChat,
|
onOpenChat,
|
||||||
}: HomeViewProps) {
|
}: HomeViewProps) {
|
||||||
const [events, setEvents] = useState<CalEvent[]>([])
|
const [events, setEvents] = useState<CalEvent[]>([])
|
||||||
|
|
@ -472,67 +464,6 @@ export function HomeView({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
type DiscoveryTip = {
|
|
||||||
icon: typeof Mic
|
|
||||||
title: string
|
|
||||||
desc: string
|
|
||||||
/** Provide one of: an action node (e.g. VoiceNoteButton) or an onAction handler. */
|
|
||||||
action?: React.ReactNode
|
|
||||||
onAction?: () => void
|
|
||||||
}
|
|
||||||
|
|
||||||
function DiscoveryCarousel({ tips }: { tips: DiscoveryTip[] }) {
|
|
||||||
const [index, setIndex] = useState(0)
|
|
||||||
const [paused, setPaused] = useState(false)
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (paused || tips.length <= 1) return
|
|
||||||
const id = setInterval(() => setIndex((i) => (i + 1) % tips.length), 7000)
|
|
||||||
return () => clearInterval(id)
|
|
||||||
}, [paused, tips.length])
|
|
||||||
|
|
||||||
const safeIndex = index % tips.length
|
|
||||||
const tip = tips[safeIndex]
|
|
||||||
const Icon = tip.icon
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={`${CARD} flex items-center gap-3.5 border-dashed bg-transparent`}
|
|
||||||
onMouseEnter={() => setPaused(true)}
|
|
||||||
onMouseLeave={() => setPaused(false)}
|
|
||||||
>
|
|
||||||
<div className="flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-card">
|
|
||||||
<Icon className="size-[15px]" />
|
|
||||||
</div>
|
|
||||||
<div className="flex-1 text-[13.5px] leading-snug">
|
|
||||||
<span className="font-medium">{tip.title}</span>
|
|
||||||
<span className="text-muted-foreground"> — {tip.desc}</span>
|
|
||||||
</div>
|
|
||||||
{tip.action ?? (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => tip.onAction?.()}
|
|
||||||
aria-label={tip.title}
|
|
||||||
className="flex size-9 shrink-0 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
|
|
||||||
>
|
|
||||||
<ArrowRight className="size-[15px]" />
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
<div className="ml-1 flex shrink-0 items-center gap-1">
|
|
||||||
{tips.map((_, i) => (
|
|
||||||
<button
|
|
||||||
key={i}
|
|
||||||
type="button"
|
|
||||||
onClick={() => setIndex(i)}
|
|
||||||
aria-label={`Show tip ${i + 1}`}
|
|
||||||
className={`size-1.5 rounded-full transition-colors ${i === safeIndex ? 'bg-foreground' : 'bg-border hover:bg-muted-foreground/40'}`}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatFrom(from: string): string {
|
function formatFrom(from: string): string {
|
||||||
const m = /^\s*"?([^"<]+?)"?\s*<.+>\s*$/.exec(from)
|
const m = /^\s*"?([^"<]+?)"?\s*<.+>\s*$/.exec(from)
|
||||||
return (m ? m[1] : from).trim()
|
return (m ? m[1] : from).trim()
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ import { cn } from "@/lib/utils"
|
||||||
import { SettingsDialog } from "@/components/settings-dialog"
|
import { SettingsDialog } from "@/components/settings-dialog"
|
||||||
import { extractConferenceLink } from "@/lib/calendar-event"
|
import { extractConferenceLink } from "@/lib/calendar-event"
|
||||||
import { useBilling } from "@/hooks/useBilling"
|
import { useBilling } from "@/hooks/useBilling"
|
||||||
|
import { toast } from "@/lib/toast"
|
||||||
import { ServiceEvent } from "@x/shared/src/service-events.js"
|
import { ServiceEvent } from "@x/shared/src/service-events.js"
|
||||||
import z from "zod"
|
import z from "zod"
|
||||||
|
|
||||||
|
|
@ -472,7 +473,7 @@ export function SidebarContentPanel({
|
||||||
const loadNext = async () => {
|
const loadNext = async () => {
|
||||||
try {
|
try {
|
||||||
const exists = await window.ipc.invoke('workspace:exists', { path: 'calendar_sync' })
|
const exists = await window.ipc.invoke('workspace:exists', { path: 'calendar_sync' })
|
||||||
if (!exists.exists) { if (!cancelled) setNextMeetingLabel(null); return }
|
if (!exists.exists) { if (!cancelled) setMeetings([]); return }
|
||||||
const entries = await window.ipc.invoke('workspace:readdir', {
|
const entries = await window.ipc.invoke('workspace:readdir', {
|
||||||
path: 'calendar_sync',
|
path: 'calendar_sync',
|
||||||
opts: { recursive: false, includeHidden: false, includeStats: false },
|
opts: { recursive: false, includeHidden: false, includeStats: false },
|
||||||
|
|
@ -998,7 +999,7 @@ export function SidebarContentPanel({
|
||||||
<AlertDialogFooter>
|
<AlertDialogFooter>
|
||||||
<AlertDialogCancel
|
<AlertDialogCancel
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setOpenConnectorsAfterClose(false)
|
setOpenConnectionsAfterClose(false)
|
||||||
setShowOauthAlert(false)
|
setShowOauthAlert(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -1410,4 +1411,3 @@ function formatEmailFrom(from: string): string {
|
||||||
if (match) return match[1].trim()
|
if (match) return match[1].trim()
|
||||||
return from
|
return from
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue