From 119a46c3393cfde0bdfa097035c1e7d2bbfa8a83 Mon Sep 17 00:00:00 2001 From: haritabh-z01 Date: Sat, 28 Jun 2025 11:02:07 +0530 Subject: [PATCH] chore: formatting fixes --- .prettierignore | 1 + .vscode/launch.json | 2 +- README.md | 5 +- apps/desktop/drizzle.config.ts | 10 +- apps/desktop/forge.config.ts | 275 ++++++----- .../src/components/ShortcutIndicator.tsx | 6 +- apps/desktop/src/components/Waveform.tsx | 10 +- apps/desktop/src/components/app-sidebar.tsx | 58 ++- apps/desktop/src/components/data-table.tsx | 137 +++--- apps/desktop/src/components/models-view.tsx | 177 ++++--- apps/desktop/src/components/nav-main.tsx | 22 +- apps/desktop/src/components/nav-secondary.tsx | 26 +- apps/desktop/src/components/settings-view.tsx | 236 ++++++---- apps/desktop/src/components/site-header.tsx | 24 +- .../desktop/src/components/theme-provider.tsx | 10 +- apps/desktop/src/components/theme-toggle.tsx | 28 +- .../src/components/transcriptions-list.tsx | 140 +++--- .../src/components/transcriptions-view.tsx | 6 +- apps/desktop/src/components/ui/accordion.tsx | 20 +- .../src/components/ui/alert-dialog.tsx | 64 ++- apps/desktop/src/components/ui/alert.tsx | 34 +- .../src/components/ui/aspect-ratio.tsx | 6 +- apps/desktop/src/components/ui/avatar.tsx | 30 +- apps/desktop/src/components/ui/badge.tsx | 35 +- apps/desktop/src/components/ui/breadcrumb.tsx | 45 +- apps/desktop/src/components/ui/button.tsx | 41 +- apps/desktop/src/components/ui/calendar.tsx | 73 +-- apps/desktop/src/components/ui/card.tsx | 55 ++- apps/desktop/src/components/ui/carousel.tsx | 93 ++-- apps/desktop/src/components/ui/chart.tsx | 141 +++--- apps/desktop/src/components/ui/checkbox.tsx | 19 +- .../desktop/src/components/ui/collapsible.tsx | 20 +- apps/desktop/src/components/ui/command.tsx | 71 ++- .../src/components/ui/context-menu.tsx | 82 ++-- apps/desktop/src/components/ui/dialog.tsx | 52 ++- apps/desktop/src/components/ui/drawer.tsx | 55 ++- .../src/components/ui/dropdown-menu.tsx | 83 ++-- apps/desktop/src/components/ui/form.tsx | 56 ++- apps/desktop/src/components/ui/hover-card.tsx | 24 +- apps/desktop/src/components/ui/input-otp.tsx | 33 +- apps/desktop/src/components/ui/input.tsx | 14 +- apps/desktop/src/components/ui/label.tsx | 17 +- apps/desktop/src/components/ui/menubar.tsx | 86 ++-- .../src/components/ui/navigation-menu.tsx | 49 +- apps/desktop/src/components/ui/pagination.tsx | 63 ++- apps/desktop/src/components/ui/popover.tsx | 26 +- apps/desktop/src/components/ui/progress.tsx | 11 +- .../desktop/src/components/ui/radio-group.tsx | 16 +- apps/desktop/src/components/ui/resizable.tsx | 21 +- .../desktop/src/components/ui/scroll-area.tsx | 22 +- apps/desktop/src/components/ui/select.tsx | 63 ++- apps/desktop/src/components/ui/separator.tsx | 14 +- apps/desktop/src/components/ui/sheet.tsx | 65 +-- apps/desktop/src/components/ui/sidebar.tsx | 342 ++++++++------ apps/desktop/src/components/ui/skeleton.tsx | 6 +- apps/desktop/src/components/ui/slider.tsx | 25 +- apps/desktop/src/components/ui/sonner.tsx | 14 +- apps/desktop/src/components/ui/switch.tsx | 19 +- apps/desktop/src/components/ui/table.tsx | 70 ++- apps/desktop/src/components/ui/tabs.tsx | 38 +- apps/desktop/src/components/ui/textarea.tsx | 10 +- .../src/components/ui/toggle-group.tsx | 34 +- apps/desktop/src/components/ui/toggle.tsx | 27 +- apps/desktop/src/components/ui/tooltip.tsx | 18 +- apps/desktop/src/components/update-dialog.tsx | 67 +-- .../src/components/vocabulary-manager.tsx | 144 +++--- .../src/components/vocabulary-view.tsx | 6 +- apps/desktop/src/constants/models.ts | 92 ++-- apps/desktop/src/db/app-settings.ts | 43 +- apps/desktop/src/db/config.ts | 38 +- apps/desktop/src/db/downloaded-models.ts | 35 +- apps/desktop/src/db/migrate.ts | 10 +- apps/desktop/src/db/schema.ts | 82 ++-- apps/desktop/src/db/transcriptions.ts | 62 ++- apps/desktop/src/db/vocabulary.ts | 47 +- apps/desktop/src/hooks/use-mobile.ts | 10 +- apps/desktop/src/hooks/useRecording.ts | 132 ++++-- apps/desktop/src/lib/utils.ts | 4 +- apps/desktop/src/main/logger.ts | 84 ++-- apps/desktop/src/main/main.ts | 442 +++++++++++------- apps/desktop/src/main/menu.ts | 151 +++--- apps/desktop/src/main/preload.ts | 127 ++--- .../desktop/src/main/services/auto-updater.ts | 132 +++--- apps/desktop/src/main/swift-io-bridge.ts | 193 ++++---- apps/desktop/src/modules/ai/ai-service.ts | 12 +- .../src/modules/ai/local-whisper-client.ts | 55 ++- .../src/modules/audio/audio-capture.ts | 90 ++-- .../src/modules/formatter/formatter-client.ts | 2 +- .../modules/formatter/formatter-service.ts | 13 +- apps/desktop/src/modules/formatter/index.ts | 6 +- .../formatter/openrouter-formatter-client.ts | 14 +- .../src/modules/models/model-manager.ts | 119 +++-- apps/desktop/src/modules/settings/index.ts | 2 +- .../src/modules/settings/settings-service.ts | 40 +- .../contextual-local-whisper-client.ts | 151 +++--- .../contextual-transcription-manager.ts | 46 +- .../transcription/transcription-session.ts | 84 ++-- apps/desktop/src/renderer/fab.tsx | 108 +++-- apps/desktop/src/renderer/renderer.tsx | 60 +-- apps/desktop/src/styles/globals.css | 5 +- apps/desktop/src/trpc/react.ts | 10 +- apps/desktop/src/trpc/router.ts | 26 +- apps/desktop/src/trpc/routers/models.ts | 154 ++++-- apps/desktop/src/trpc/routers/settings.ts | 18 +- .../src/trpc/routers/transcriptions.ts | 50 +- apps/desktop/src/trpc/routers/updater.ts | 119 +++-- apps/desktop/src/trpc/routers/vocabulary.ts | 66 +-- apps/desktop/src/types/electron-api.ts | 62 ++- .../src/types/electron-squirrel-startup.d.ts | 2 +- apps/desktop/tsconfig.json | 7 +- apps/desktop/vite.main.config.mts | 29 +- apps/desktop/vite.preload.config.mts | 6 +- apps/desktop/vite.renderer.config.mts | 12 +- apps/desktop/vite.widget.config.mts | 12 +- apps/www/README.md | 1 + .../app/(home)/blog/[slug]/page.client.tsx | 16 +- apps/www/app/(home)/blog/[slug]/page.tsx | 41 +- apps/www/app/(home)/blog/page.tsx | 39 +- apps/www/app/(home)/changelog/page.tsx | 1 - apps/www/app/(home)/contact/page.tsx | 5 +- apps/www/app/(home)/layout.tsx | 68 +-- apps/www/app/(home)/page.tsx | 2 +- apps/www/app/api/search/route.ts | 6 +- apps/www/app/community/page.tsx | 6 +- apps/www/app/docs/[[...slug]]/page.tsx | 10 +- apps/www/app/docs/layout.tsx | 10 +- apps/www/app/github/page.tsx | 6 +- apps/www/app/global.css | 6 +- apps/www/app/layout.config.tsx | 14 +- apps/www/app/layout.tsx | 34 +- apps/www/app/opengraph-image.tsx | 54 +-- apps/www/components.json | 2 +- .../www/content/docs/automatic-vocabulary.mdx | 2 +- apps/www/content/docs/contributing.mdx | 3 +- apps/www/content/docs/custom-vocabulary.mdx | 1 - apps/www/content/docs/index.mdx | 123 ++--- apps/www/content/docs/inline-editing.mdx | 2 + apps/www/content/docs/meta.json | 1 - .../content/docs/multi-language-support.mdx | 2 +- apps/www/lib/cn.ts | 6 +- apps/www/lib/metadata.ts | 27 +- apps/www/lib/source.ts | 14 +- apps/www/lib/utils.ts | 6 +- apps/www/mdx-components.tsx | 4 +- apps/www/next.config.mjs | 10 +- apps/www/package.json | 2 +- apps/www/postcss.config.mjs | 2 +- apps/www/scripts/cleanup-content.mts | 32 +- apps/www/scripts/fetch-content.mts | 114 +++-- apps/www/scripts/generate-sitemap.mts | 90 ++-- apps/www/source.config.ts | 10 +- .../native-helpers/swift-helper/package.json | 2 +- .../native-helpers/swift-helper/turbo.json | 7 +- packages/types/package.json | 11 +- .../types/scripts/generate-json-schemas.ts | 115 +++-- .../types/scripts/generate-swift-models.ts | 53 +-- packages/types/src/index.ts | 16 +- .../types/src/schemas/events/key-events.ts | 20 +- .../methods/get-accessibility-context.ts | 4 +- .../methods/get-accessibility-tree-details.ts | 4 +- .../src/schemas/methods/mute-system-audio.ts | 4 +- .../types/src/schemas/methods/paste-text.ts | 4 +- .../schemas/methods/restore-system-audio.ts | 10 +- packages/types/src/schemas/rpc/request.ts | 46 +- packages/types/src/schemas/rpc/response.ts | 10 +- packages/types/tsconfig.json | 2 +- turbo.json | 19 +- 167 files changed, 4507 insertions(+), 3248 deletions(-) diff --git a/.prettierignore b/.prettierignore index efb4589..d3ebe5e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,6 +7,7 @@ out/ .vite/ dist/ build/ +.next/ # Dependencies node_modules/ diff --git a/.vscode/launch.json b/.vscode/launch.json index e1abde9..9b43d80 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -37,4 +37,4 @@ "preLaunchTask": "swift: Build Release SwiftHelper (packages/native-helpers/swift-helper)" } ] -} \ No newline at end of file +} diff --git a/README.md b/README.md index 6f376c2..9146783 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ -

PRs Welcome @@ -42,6 +41,7 @@ Open source AI Dictation and Note-taking\ Dictate hands-free, transcribe meetings, and capture notes effortlessly - powered by Gen AI ## ✨ Features + > ✔︎ - Done, ◑ - In Progress, ◯ - Planned ### 📱 Apps @@ -121,8 +121,9 @@ Contributions are welcome! Please read the [Contributing Guide][contributing] to Released under [MIT][license]. + [contributing]: https://github.com/amicalhq/amical/blob/main/CONTRIBUTING.md [license]: https://github.com/amicalhq/amical/blob/main/LICENSE [discussions]: https://discuss.amical.ai [issues]: https://github.com/amicalhq/amical/issues -[pulls]: https://github.com/amicalhq/amical/pulls "submit a pull request" \ No newline at end of file +[pulls]: https://github.com/amicalhq/amical/pulls "submit a pull request" diff --git a/apps/desktop/drizzle.config.ts b/apps/desktop/drizzle.config.ts index e424d94..f5d85e8 100644 --- a/apps/desktop/drizzle.config.ts +++ b/apps/desktop/drizzle.config.ts @@ -1,10 +1,10 @@ -import type { Config } from 'drizzle-kit'; +import type { Config } from "drizzle-kit"; export default { - schema: './src/db/schema.ts', - out: './src/db/migrations', - dialect: 'sqlite', + schema: "./src/db/schema.ts", + out: "./src/db/migrations", + dialect: "sqlite", dbCredentials: { - url: 'file:./amical.db', + url: "file:./amical.db", }, } satisfies Config; diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.ts index d6a083c..67ea994 100644 --- a/apps/desktop/forge.config.ts +++ b/apps/desktop/forge.config.ts @@ -1,46 +1,53 @@ -import type { ForgeConfig } from '@electron-forge/shared-types'; -import { MakerSquirrel } from '@electron-forge/maker-squirrel'; -import { MakerDMG } from '@electron-forge/maker-dmg'; -import { MakerDeb } from '@electron-forge/maker-deb'; -import { MakerRpm } from '@electron-forge/maker-rpm'; -import { VitePlugin } from '@electron-forge/plugin-vite'; -import { FusesPlugin } from '@electron-forge/plugin-fuses'; -import { FuseV1Options, FuseVersion } from '@electron/fuses'; -import { PublisherGithub } from '@electron-forge/publisher-github'; -import { readdirSync, rmdirSync, statSync, existsSync, mkdirSync, cpSync } from 'node:fs'; -import { join, normalize } from 'node:path'; +import type { ForgeConfig } from "@electron-forge/shared-types"; +import { MakerSquirrel } from "@electron-forge/maker-squirrel"; +import { MakerDMG } from "@electron-forge/maker-dmg"; +import { MakerDeb } from "@electron-forge/maker-deb"; +import { MakerRpm } from "@electron-forge/maker-rpm"; +import { VitePlugin } from "@electron-forge/plugin-vite"; +import { FusesPlugin } from "@electron-forge/plugin-fuses"; +import { FuseV1Options, FuseVersion } from "@electron/fuses"; +import { PublisherGithub } from "@electron-forge/publisher-github"; +import { + readdirSync, + rmdirSync, + statSync, + existsSync, + mkdirSync, + cpSync, +} from "node:fs"; +import { join, normalize } from "node:path"; // Use flora-colossus for finding all dependencies of EXTERNAL_DEPENDENCIES // flora-colossus is maintained by MarshallOfSound (a top electron-forge contributor) // already included as a dependency of electron-packager/galactus (so we do NOT have to add it to package.json) // grabs nested dependencies from tree -import { Walker, DepType, type Module } from 'flora-colossus'; +import { Walker, DepType, type Module } from "flora-colossus"; let nativeModuleDependenciesToPackage: string[] = []; export const EXTERNAL_DEPENDENCIES = [ - 'electron-squirrel-startup', - 'smart-whisper', - '@libsql/client', - '@libsql/darwin-arm64', - '@libsql/darwin-x64', - '@libsql/linux-x64-gnu', - '@libsql/linux-x64-musl', - '@libsql/win32-x64-msvc', - 'libsql', + "electron-squirrel-startup", + "smart-whisper", + "@libsql/client", + "@libsql/darwin-arm64", + "@libsql/darwin-x64", + "@libsql/linux-x64-gnu", + "@libsql/linux-x64-musl", + "@libsql/win32-x64-msvc", + "libsql", // Add any other native modules you need here ]; const config: ForgeConfig = { hooks: { prePackage: async () => { - console.error('prePackage'); + console.error("prePackage"); const projectRoot = normalize(__dirname); // In a monorepo, node_modules are typically at the root level - const monorepoRoot = join(projectRoot, '../../'); // Go up to monorepo root - + const monorepoRoot = join(projectRoot, "../../"); // Go up to monorepo root + const getExternalNestedDependencies = async ( nodeModuleNames: string[], - includeNestedDeps = true + includeNestedDeps = true, ) => { const foundModules = new Set(nodeModuleNames); if (includeNestedDeps) { @@ -52,17 +59,21 @@ const config: ForgeConfig = { modules: Module[]; walkDependenciesForModule: ( moduleRoot: string, - depType: DepType + depType: DepType, ) => Promise; }; - const moduleRoot = join(monorepoRoot, 'node_modules', external); - console.log('moduleRoot', moduleRoot); + const moduleRoot = join(monorepoRoot, "node_modules", external); + console.log("moduleRoot", moduleRoot); // Initialize Walker with monorepo root as base path - const walker = new Walker(monorepoRoot) as unknown as MyPublicWalker; + const walker = new Walker( + monorepoRoot, + ) as unknown as MyPublicWalker; walker.modules = []; await walker.walkDependenciesForModule(moduleRoot, DepType.PROD); walker.modules - .filter((dep) => (dep.nativeModuleType as number) === DepType.PROD) + .filter( + (dep) => (dep.nativeModuleType as number) === DepType.PROD, + ) // Remove the problematic name splitting that breaks scoped packages .map((dep) => dep.name) .forEach((name) => foundModules.add(name)); @@ -70,21 +81,25 @@ const config: ForgeConfig = { } return foundModules; }; - - const nativeModuleDependencies = await getExternalNestedDependencies(EXTERNAL_DEPENDENCIES); + + const nativeModuleDependencies = await getExternalNestedDependencies( + EXTERNAL_DEPENDENCIES, + ); nativeModuleDependenciesToPackage = Array.from(nativeModuleDependencies); - + // Copy external dependencies to local node_modules - console.error('Copying external dependencies to local node_modules'); - const localNodeModules = join(projectRoot, 'node_modules'); - const rootNodeModules = join(monorepoRoot, 'node_modules'); + console.error("Copying external dependencies to local node_modules"); + const localNodeModules = join(projectRoot, "node_modules"); + const rootNodeModules = join(monorepoRoot, "node_modules"); // Ensure local node_modules directory exists if (!existsSync(localNodeModules)) { mkdirSync(localNodeModules, { recursive: true }); } - console.log(`Found ${nativeModuleDependenciesToPackage.length} dependencies to copy`); + console.log( + `Found ${nativeModuleDependenciesToPackage.length} dependencies to copy`, + ); // Copy all required dependencies for (const dep of nativeModuleDependenciesToPackage) { @@ -108,7 +123,6 @@ const config: ForgeConfig = { console.log(`Copying ${dep}...`); cpSync(rootDepPath, localDepPath, { recursive: true }); console.log(`✓ Successfully copied ${dep}`); - } catch (error) { console.error(`Failed to copy ${dep}:`, error); } @@ -116,82 +130,82 @@ const config: ForgeConfig = { }, packageAfterPrune: async (_forgeConfig, buildPath) => { try { - function getItemsFromFolder( - path: string, - totalCollection: { - path: string; - type: 'directory' | 'file'; - empty: boolean; - }[] = [] - ) { - try { - const normalizedPath = normalize(path); - const childItems = readdirSync(normalizedPath); - const getItemStats = statSync(normalizedPath); - if (getItemStats.isDirectory()) { - totalCollection.push({ - path: normalizedPath, - type: 'directory', - empty: childItems.length === 0, - }); - } - childItems.forEach((childItem) => { - const childItemNormalizedPath = join(normalizedPath, childItem); - const childItemStats = statSync(childItemNormalizedPath); - if (childItemStats.isDirectory()) { - getItemsFromFolder(childItemNormalizedPath, totalCollection); - } else { + function getItemsFromFolder( + path: string, + totalCollection: { + path: string; + type: "directory" | "file"; + empty: boolean; + }[] = [], + ) { + try { + const normalizedPath = normalize(path); + const childItems = readdirSync(normalizedPath); + const getItemStats = statSync(normalizedPath); + if (getItemStats.isDirectory()) { totalCollection.push({ - path: childItemNormalizedPath, - type: 'file', - empty: false, + path: normalizedPath, + type: "directory", + empty: childItems.length === 0, }); } - }); - } catch { - return; + childItems.forEach((childItem) => { + const childItemNormalizedPath = join(normalizedPath, childItem); + const childItemStats = statSync(childItemNormalizedPath); + if (childItemStats.isDirectory()) { + getItemsFromFolder(childItemNormalizedPath, totalCollection); + } else { + totalCollection.push({ + path: childItemNormalizedPath, + type: "file", + empty: false, + }); + } + }); + } catch { + return; + } + return totalCollection; } - return totalCollection; - } - const getItems = getItemsFromFolder(buildPath) ?? []; - for (const item of getItems) { - const DELETE_EMPTY_DIRECTORIES = true; - if (item.empty === true) { - if (DELETE_EMPTY_DIRECTORIES) { - const pathToDelete = normalize(item.path); - // one last check to make sure it is a directory and is empty - const stats = statSync(pathToDelete); - if (!stats.isDirectory()) { - // SKIPPING DELETION: pathToDelete is not a directory - return; + const getItems = getItemsFromFolder(buildPath) ?? []; + for (const item of getItems) { + const DELETE_EMPTY_DIRECTORIES = true; + if (item.empty === true) { + if (DELETE_EMPTY_DIRECTORIES) { + const pathToDelete = normalize(item.path); + // one last check to make sure it is a directory and is empty + const stats = statSync(pathToDelete); + if (!stats.isDirectory()) { + // SKIPPING DELETION: pathToDelete is not a directory + return; + } + const childItems = readdirSync(pathToDelete); + if (childItems.length !== 0) { + // SKIPPING DELETION: pathToDelete is not empty + return; + } + rmdirSync(pathToDelete); } - const childItems = readdirSync(pathToDelete); - if (childItems.length !== 0) { - // SKIPPING DELETION: pathToDelete is not empty - return; - } - rmdirSync(pathToDelete); } } - } } catch (error) { - console.error('Error in packageAfterPrune:', error); + console.error("Error in packageAfterPrune:", error); throw error; } }, }, packagerConfig: { asar: true, - name: 'Amical', - executableName: 'Amical', - icon: './assets/logo', // Path to your icon file (without extension) + name: "Amical", + executableName: "Amical", + icon: "./assets/logo", // Path to your icon file (without extension) extraResource: [ - '../../packages/native-helpers/swift-helper/bin', - './src/db/migrations', + "../../packages/native-helpers/swift-helper/bin", + "./src/db/migrations", ], extendInfo: { NSMicrophoneUsageDescription: - 'This app needs access to your microphone to record audio for transcription.', + "This app needs access to your microphone to record audio for transcription.", }, // Code signing configuration for macOS (configure when ready to sign) // osxSign: { @@ -211,19 +225,21 @@ const config: ForgeConfig = { prune: false, ignore: (file: string) => { try { - const filePath = file.toLowerCase(); const KEEP_FILE = { keep: false, log: true, }; // NOTE: must return false for empty string or nothing will be packaged - if (filePath === '') KEEP_FILE.keep = true; - if (!KEEP_FILE.keep && filePath === '/package.json') KEEP_FILE.keep = true; - if (!KEEP_FILE.keep && filePath === '/node_modules') KEEP_FILE.keep = true; - if (!KEEP_FILE.keep && filePath === '/.vite') KEEP_FILE.keep = true; - if (!KEEP_FILE.keep && filePath.startsWith('/.vite/')) KEEP_FILE.keep = true; - if (!KEEP_FILE.keep && filePath.startsWith('/node_modules/')) { + if (filePath === "") KEEP_FILE.keep = true; + if (!KEEP_FILE.keep && filePath === "/package.json") + KEEP_FILE.keep = true; + if (!KEEP_FILE.keep && filePath === "/node_modules") + KEEP_FILE.keep = true; + if (!KEEP_FILE.keep && filePath === "/.vite") KEEP_FILE.keep = true; + if (!KEEP_FILE.keep && filePath.startsWith("/.vite/")) + KEEP_FILE.keep = true; + if (!KEEP_FILE.keep && filePath.startsWith("/node_modules/")) { // check if matches any of the external dependencies for (const dep of nativeModuleDependenciesToPackage) { if ( @@ -242,29 +258,31 @@ const config: ForgeConfig = { KEEP_FILE.log = false; break; } - + // Handle scoped packages: if dep is @scope/package, also keep @scope/ directory - if (dep.includes('/') && dep.startsWith('@')) { - const scopeDir = dep.split('/')[0]; // @libsql/client -> @libsql + if (dep.includes("/") && dep.startsWith("@")) { + const scopeDir = dep.split("/")[0]; // @libsql/client -> @libsql if ( filePath === `/node_modules/${scopeDir}/` || filePath === `/node_modules/${scopeDir}` || filePath.startsWith(`/node_modules/${scopeDir}/`) ) { KEEP_FILE.keep = true; - KEEP_FILE.log = filePath === `/node_modules/${scopeDir}/` || filePath === `/node_modules/${scopeDir}`; + KEEP_FILE.log = + filePath === `/node_modules/${scopeDir}/` || + filePath === `/node_modules/${scopeDir}`; break; } } } } if (KEEP_FILE.keep) { - if (KEEP_FILE.log) console.log('Keeping:', file); + if (KEEP_FILE.log) console.log("Keeping:", file); return false; } return true; } catch (error) { - console.error('Error in ignore:', error); + console.error("Error in ignore:", error); throw error; } }, @@ -272,12 +290,15 @@ const config: ForgeConfig = { rebuildConfig: {}, makers: [ new MakerSquirrel({}), - new MakerDMG({ - name: 'Amical', - icon: './assets/logo.svg' - }, ['darwin']), - new MakerRpm({}), - new MakerDeb({}) + new MakerDMG( + { + name: "Amical", + icon: "./assets/logo.svg", + }, + ["darwin"], + ), + new MakerRpm({}), + new MakerDeb({}), ], plugins: [ new VitePlugin({ @@ -286,24 +307,24 @@ const config: ForgeConfig = { build: [ { // `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`. - entry: 'src/main/main.ts', - config: 'vite.main.config.mts', - target: 'main', + entry: "src/main/main.ts", + config: "vite.main.config.mts", + target: "main", }, { - entry: 'src/main/preload.ts', - config: 'vite.preload.config.mts', - target: 'preload', + entry: "src/main/preload.ts", + config: "vite.preload.config.mts", + target: "preload", }, ], renderer: [ { - name: 'main_window', - config: 'vite.renderer.config.mts', + name: "main_window", + config: "vite.renderer.config.mts", }, { - name: 'widget_window', - config: 'vite.widget.config.mts', + name: "widget_window", + config: "vite.widget.config.mts", }, ], }), @@ -322,8 +343,8 @@ const config: ForgeConfig = { publishers: [ new PublisherGithub({ repository: { - owner: 'amicalhq', - name: 'amical', + owner: "amicalhq", + name: "amical", }, prerelease: true, draft: true, // Create draft releases first for review diff --git a/apps/desktop/src/components/ShortcutIndicator.tsx b/apps/desktop/src/components/ShortcutIndicator.tsx index 2c97a41..24ba8ef 100644 --- a/apps/desktop/src/components/ShortcutIndicator.tsx +++ b/apps/desktop/src/components/ShortcutIndicator.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState } from "react"; const ShortcutIndicator: React.FC = () => { const [isPressed, setIsPressed] = useState(false); @@ -20,9 +20,9 @@ const ShortcutIndicator: React.FC = () => { return (

- {isPressed ? 'Pressed!' : 'Alt+Space'} + {isPressed ? "Pressed!" : "Alt+Space"}
); }; diff --git a/apps/desktop/src/components/Waveform.tsx b/apps/desktop/src/components/Waveform.tsx index 0619506..dc2e55f 100644 --- a/apps/desktop/src/components/Waveform.tsx +++ b/apps/desktop/src/components/Waveform.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import { motion } from 'framer-motion'; +import React from "react"; +import { motion } from "framer-motion"; interface WaveformProps { index: number; @@ -42,11 +42,11 @@ export function Waveform({ }} transition={{ duration: voiceDetected ? 0.8 : 0.3, - ease: 'easeInOut', + ease: "easeInOut", repeat: voiceDetected ? Number.POSITIVE_INFINITY : 0, - repeatType: 'loop', + repeatType: "loop", delay: index * 0.06, - type: 'tween', + type: "tween", }} /> ); diff --git a/apps/desktop/src/components/app-sidebar.tsx b/apps/desktop/src/components/app-sidebar.tsx index 658b29f..0fddfe4 100644 --- a/apps/desktop/src/components/app-sidebar.tsx +++ b/apps/desktop/src/components/app-sidebar.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import * as React from "react"; import { IconDatabase, IconFileDescription, @@ -6,10 +6,10 @@ import { IconReport, IconSettings, IconBookFilled, -} from "@tabler/icons-react" +} from "@tabler/icons-react"; -import { NavMain } from "@/components/nav-main" -import { NavSecondary } from "@/components/nav-secondary" +import { NavMain } from "@/components/nav-main"; +import { NavSecondary } from "@/components/nav-secondary"; import { Sidebar, SidebarContent, @@ -18,16 +18,16 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, -} from "@/components/ui/sidebar" +} from "@/components/ui/sidebar"; // Custom Discord icon component const DiscordIcon = ({ className }: { className?: string }) => ( - Discord -) +); const data = { user: { @@ -88,14 +88,18 @@ const data = { icon: IconFileWord, }, ], -} +}; interface AppSidebarProps extends React.ComponentProps { onNavigate?: (item: { title: string }) => void; currentView?: string; } -export function AppSidebar({ onNavigate, currentView, ...props }: AppSidebarProps) { +export function AppSidebar({ + onNavigate, + currentView, + ...props +}: AppSidebarProps) { return (
@@ -106,8 +110,15 @@ export function AppSidebar({ onNavigate, currentView, ...props }: AppSidebarProp asChild className="data-[slot=sidebar-menu-button]:!p-1.5" > -
- Amical Logo + + Amical Logo Amical @@ -115,12 +126,19 @@ export function AppSidebar({ onNavigate, currentView, ...props }: AppSidebarProp - - + + - - {/* */} - + {/* */} - ) + ); } diff --git a/apps/desktop/src/components/data-table.tsx b/apps/desktop/src/components/data-table.tsx index 0af1fc3..d87782d 100644 --- a/apps/desktop/src/components/data-table.tsx +++ b/apps/desktop/src/components/data-table.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import * as React from "react"; import { closestCenter, DndContext, @@ -9,15 +9,15 @@ import { useSensors, type DragEndEvent, type UniqueIdentifier, -} from "@dnd-kit/core" -import { restrictToVerticalAxis } from "@dnd-kit/modifiers" +} from "@dnd-kit/core"; +import { restrictToVerticalAxis } from "@dnd-kit/modifiers"; import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy, -} from "@dnd-kit/sortable" -import { CSS } from "@dnd-kit/utilities" +} from "@dnd-kit/sortable"; +import { CSS } from "@dnd-kit/utilities"; import { IconChevronDown, IconChevronLeft, @@ -31,7 +31,7 @@ import { IconLoader, IconPlus, IconTrendingUp, -} from "@tabler/icons-react" +} from "@tabler/icons-react"; import { ColumnDef, ColumnFiltersState, @@ -46,21 +46,21 @@ import { SortingState, useReactTable, VisibilityState, -} from "@tanstack/react-table" -import { Area, AreaChart, CartesianGrid, XAxis } from "recharts" -import { toast } from "sonner" -import { z } from "zod" +} from "@tanstack/react-table"; +import { Area, AreaChart, CartesianGrid, XAxis } from "recharts"; +import { toast } from "sonner"; +import { z } from "zod"; -import { useIsMobile } from "@/hooks/use-mobile" -import { Badge } from "@/components/ui/badge" -import { Button } from "@/components/ui/button" +import { useIsMobile } from "@/hooks/use-mobile"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; import { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, -} from "@/components/ui/chart" -import { Checkbox } from "@/components/ui/checkbox" +} from "@/components/ui/chart"; +import { Checkbox } from "@/components/ui/checkbox"; import { Drawer, DrawerClose, @@ -70,7 +70,7 @@ import { DrawerHeader, DrawerTitle, DrawerTrigger, -} from "@/components/ui/drawer" +} from "@/components/ui/drawer"; import { DropdownMenu, DropdownMenuCheckboxItem, @@ -78,17 +78,17 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" -import { Input } from "@/components/ui/input" -import { Label } from "@/components/ui/label" +} from "@/components/ui/dropdown-menu"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/ui/select" -import { Separator } from "@/components/ui/separator" +} from "@/components/ui/select"; +import { Separator } from "@/components/ui/separator"; import { Table, TableBody, @@ -96,13 +96,8 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/ui/table" -import { - Tabs, - TabsContent, - TabsList, - TabsTrigger, -} from "@/components/ui/tabs" +} from "@/components/ui/table"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; export const schema = z.object({ id: z.number(), @@ -112,13 +107,13 @@ export const schema = z.object({ target: z.string(), limit: z.string(), reviewer: z.string(), -}) +}); // Create a separate component for the drag handle function DragHandle({ id }: { id: number }) { const { attributes, listeners } = useSortable({ id, - }) + }); return ( - ) + ); } const columns: ColumnDef>[] = [ @@ -170,7 +165,7 @@ const columns: ColumnDef>[] = [ accessorKey: "header", header: "Header", cell: ({ row }) => { - return + return ; }, enableHiding: false, }, @@ -205,12 +200,12 @@ const columns: ColumnDef>[] = [ cell: ({ row }) => (
{ - e.preventDefault() + e.preventDefault(); toast.promise(new Promise((resolve) => setTimeout(resolve, 1000)), { loading: `Saving ${row.original.header}`, success: "Done", error: "Error", - }) + }); }} >