fix build error

This commit is contained in:
Arjun 2026-04-07 12:33:43 +05:30
parent c4ad60f884
commit 144f45a06c
3 changed files with 8 additions and 5 deletions

View file

@ -3,6 +3,7 @@
import * as React from "react"
import { Loader2, Mic, Mail, Calendar } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Separator } from "@/components/ui/separator"
import { GoogleClientIdModal } from "@/components/google-client-id-modal"
import { ComposioApiKeyModal } from "@/components/composio-api-key-modal"
import { useConnectors } from "@/hooks/useConnectors"

View file

@ -30,14 +30,14 @@ export function useAnalyticsIdentity() {
// Count notes for total_notes property
try {
const dirs = await window.ipc.invoke('workspace:readdir', { path: '/' })
const entries = await window.ipc.invoke('workspace:readdir', { path: '/' })
let totalNotes = 0
if (dirs?.entries) {
for (const entry of dirs.entries) {
if (entry.type === 'directory') {
if (entries) {
for (const entry of entries) {
if (entry.kind === 'dir') {
try {
const sub = await window.ipc.invoke('workspace:readdir', { path: `/${entry.name}` })
totalNotes += sub?.entries?.length ?? 0
totalNotes += sub?.length ?? 0
} catch {
// skip inaccessible dirs
}

View file

@ -251,6 +251,7 @@ const ipcSchemas = {
config: z.record(z.string(), z.object({
connected: z.boolean(),
error: z.string().nullable().optional(),
userId: z.string().optional(),
})),
}),
},
@ -267,6 +268,7 @@ const ipcSchemas = {
provider: z.string(),
success: z.boolean(),
error: z.string().optional(),
userId: z.string().optional(),
}),
res: z.null(),
},