├── src ├── vite-env.d.ts ├── components │ ├── ErrorsToastText.ts │ ├── SimplePagination.tsx │ ├── ui │ │ ├── label.tsx │ │ ├── collapsible.tsx │ │ ├── sonner.tsx │ │ ├── textarea.tsx │ │ ├── switch.tsx │ │ ├── input.tsx │ │ ├── toggle.tsx │ │ ├── badge.tsx │ │ ├── popover.tsx │ │ ├── card.tsx │ │ ├── alert.tsx │ │ ├── tabs.tsx │ │ ├── tooltip.tsx │ │ ├── button.tsx │ │ ├── resizable.tsx │ │ ├── drawer.tsx │ │ ├── form.tsx │ │ ├── dialog.tsx │ │ ├── alert-dialog.tsx │ │ └── command.tsx │ ├── RelativeTime.tsx │ ├── SearchApisContext.tsx │ ├── SettingsFeatureToggle.tsx │ ├── ReasoningDisplay.tsx │ ├── ScrollToBottom.tsx │ ├── NavigationDescription.tsx │ ├── CodeBlock.tsx │ ├── ToolCallDisplay.tsx │ ├── Markdown.tsx │ ├── AIProvidersContext.tsx │ ├── ChatHistory.tsx │ └── ModelSelectorContext.tsx ├── routes │ ├── index.tsx │ ├── translate.tsx │ ├── _settingsLayout.settings.index.tsx │ ├── _settingsLayout.theme-configure.tsx │ ├── _settingsLayout.settings.manage-search-apis.tsx │ ├── _settingsLayout.settings.manage-default-models.tsx │ ├── chat.$chatId.tsx │ └── _settingsLayout.tsx ├── lib │ ├── relative-time.ts │ ├── chat-path-store.ts │ ├── search-api-store.ts │ ├── common-ai-tools.ts │ ├── default-model-store.ts │ ├── consts.ts │ ├── utils.ts │ ├── search-ai-tools.ts │ ├── github-get-latest-release-response-schema.d.ts │ ├── chat-store.ts │ └── updater.ts ├── hooks │ └── useIsDark.ts ├── main.tsx ├── assets │ └── react.svg ├── features │ ├── search-api-management.tsx │ └── default-model-management.tsx └── App.css ├── app-icon.png ├── src-tauri ├── build.rs ├── icons │ ├── icon.ico │ ├── icon.png │ ├── 128x128.png │ ├── 32x32.png │ ├── 64x64.png │ ├── icon.icns │ ├── StoreLogo.png │ ├── 128x128@2x.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ └── ios │ │ ├── AppIcon-512@2x.png │ │ ├── AppIcon-20x20@1x.png │ │ ├── AppIcon-20x20@2x-1.png │ │ ├── AppIcon-20x20@2x.png │ │ ├── AppIcon-20x20@3x.png │ │ ├── AppIcon-29x29@1x.png │ │ ├── AppIcon-29x29@2x-1.png │ │ ├── AppIcon-29x29@2x.png │ │ ├── AppIcon-29x29@3x.png │ │ ├── AppIcon-40x40@1x.png │ │ ├── AppIcon-40x40@2x-1.png │ │ ├── AppIcon-40x40@2x.png │ │ ├── AppIcon-40x40@3x.png │ │ ├── AppIcon-60x60@2x.png │ │ ├── AppIcon-60x60@3x.png │ │ ├── AppIcon-76x76@1x.png │ │ ├── AppIcon-76x76@2x.png │ │ └── AppIcon-83.5x83.5@2x.png ├── gen │ └── android │ │ ├── settings.gradle │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── app │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── themes.xml │ │ │ │ │ └── colors.xml │ │ │ │ ├── xml │ │ │ │ │ └── file_paths.xml │ │ │ │ ├── values-night │ │ │ │ │ └── themes.xml │ │ │ │ ├── layout │ │ │ │ │ └── activity_main.xml │ │ │ │ ├── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ └── drawable │ │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── xyz │ │ │ │ └── lightm │ │ │ │ └── taiga │ │ │ │ └── app │ │ │ │ └── MainActivity.kt │ │ ├── .gitignore │ │ ├── proguard-rules.pro │ │ └── build.gradle.kts │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── buildSrc │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── xyz │ │ │ └── lightm │ │ │ └── taiga │ │ │ └── app │ │ │ └── kotlin │ │ │ ├── BuildTask.kt │ │ │ └── RustPlugin.kt │ │ ├── build.gradle.kts │ │ ├── gradle.properties │ │ ├── gradlew.bat │ │ └── gradlew ├── .gitignore ├── src │ ├── main.rs │ └── lib.rs ├── capabilities │ └── default.json ├── Cargo.toml └── tauri.conf.json ├── .eslintignore ├── public ├── 310x310Logo.png ├── screenshot-1.jpg ├── screenshot-2.jpg ├── fonts │ ├── Aeche-bold.woff2 │ ├── Aeche-black.woff2 │ ├── Aeche-light.woff2 │ ├── Aeche-regular.woff2 │ └── Aeche-extrabold.woff2 ├── vite.svg ├── preset-themes │ └── taiga.css └── tauri.svg ├── .vscode └── extensions.json ├── tsconfig.node.json ├── .swcrc ├── .gitignore ├── index.html ├── components.json ├── lingui.config.js ├── .eslintrc ├── tsconfig.json ├── prettier.config.cjs ├── vite.config.ts ├── package.json └── README.md /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/app-icon.png -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | .cache 3 | public 4 | node_modules 5 | *.esm.js 6 | -------------------------------------------------------------------------------- /public/310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/310x310Logo.png -------------------------------------------------------------------------------- /public/screenshot-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/screenshot-1.jpg -------------------------------------------------------------------------------- /public/screenshot-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/screenshot-2.jpg -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/gen/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | apply from: 'tauri.settings.gradle' 4 | -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/64x64.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /public/fonts/Aeche-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/fonts/Aeche-bold.woff2 -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /public/fonts/Aeche-black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/fonts/Aeche-black.woff2 -------------------------------------------------------------------------------- /public/fonts/Aeche-light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/fonts/Aeche-light.woff2 -------------------------------------------------------------------------------- /public/fonts/Aeche-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/fonts/Aeche-regular.woff2 -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /public/fonts/Aeche-extrabold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/public/fonts/Aeche-extrabold.woff2 -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Taiga 3 | Taiga 4 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src/components/ErrorsToastText.ts: -------------------------------------------------------------------------------- 1 | import { t } from "@lingui/core/macro" 2 | 3 | export const ErrorsToastText = { 4 | TimeoutError: t`Request timeout`, 5 | unknown: t`Unknown error`, 6 | } 7 | -------------------------------------------------------------------------------- /src/routes/index.tsx: -------------------------------------------------------------------------------- 1 | import Chat from '@/features/chat' 2 | import { createFileRoute } from '@tanstack/react-router' 3 | 4 | export const Route = createFileRoute('/')({ 5 | component: Chat, 6 | }) -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ayuilos/Taiga/HEAD/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /src/main/java/xyz/lightm/taiga/app/generated 2 | /src/main/jniLibs/**/*.so 3 | /src/main/assets/tauri.conf.json 4 | /tauri.build.gradle.kts 5 | /proguard-tauri.pro 6 | /tauri.properties -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | taiga_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /src/routes/translate.tsx: -------------------------------------------------------------------------------- 1 | import Translator from "@/features/translator" 2 | import { createFileRoute } from "@tanstack/react-router" 3 | 4 | export const Route = createFileRoute("/translate")({ 5 | component: Translator, 6 | }) 7 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/lib/relative-time.ts: -------------------------------------------------------------------------------- 1 | import dayjs from "dayjs" 2 | import relativeTime from "dayjs/plugin/relativeTime" 3 | 4 | dayjs.extend(relativeTime) 5 | 6 | export function getRelativeTime(date: Date) { 7 | const targetDate = dayjs(date) 8 | 9 | return targetDate.fromNow() 10 | } 11 | -------------------------------------------------------------------------------- /src/routes/_settingsLayout.settings.index.tsx: -------------------------------------------------------------------------------- 1 | import ProviderManagement from "@/features/provider-management" 2 | import { createFileRoute } from "@tanstack/react-router" 3 | 4 | export const Route = createFileRoute("/_settingsLayout/settings/")({ 5 | component: ProviderManagement, 6 | }) 7 | -------------------------------------------------------------------------------- /src/routes/_settingsLayout.theme-configure.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeConfigure } from "@/features/theme-configure" 2 | import { createFileRoute } from "@tanstack/react-router" 3 | 4 | export const Route = createFileRoute("/_settingsLayout/theme-configure")({ 5 | component: ThemeConfigure, 6 | }) 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 10 19:22:52 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /src/routes/_settingsLayout.settings.manage-search-apis.tsx: -------------------------------------------------------------------------------- 1 | import { SearchAPIManagement } from "@/features/search-api-management" 2 | import { createFileRoute } from "@tanstack/react-router" 3 | 4 | export const Route = createFileRoute("/_settingsLayout/settings/manage-search-apis")({ 5 | component: SearchAPIManagement, 6 | }) 7 | -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "jsc": { 4 | "experimental": { 5 | "plugins": [ 6 | [ 7 | "@lingui/swc-plugin", 8 | { 9 | // Additional Configuration 10 | } 11 | ] 12 | ] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/routes/_settingsLayout.settings.manage-default-models.tsx: -------------------------------------------------------------------------------- 1 | import { DefaultModelManagement } from "@/features/default-model-management" 2 | import { createFileRoute } from "@tanstack/react-router" 3 | 4 | export const Route = createFileRoute("/_settingsLayout/settings/manage-default-models")( 5 | { 6 | component: DefaultModelManagement, 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /src-tauri/gen/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | key.properties 17 | 18 | /.tauri 19 | /tauri.settings.gradle -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | keystore.properties 15 | 16 | # Editor directories and files 17 | .vscode/* 18 | !.vscode/extensions.json 19 | .idea 20 | .DS_Store 21 | *.suo 22 | *.ntvs* 23 | *.njsproj 24 | *.sln 25 | *.sw? 26 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + React + Typescript 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | gradlePlugin { 6 | plugins { 7 | create("pluginsForCoolKids") { 8 | id = "rust" 9 | implementationClass = "RustPlugin" 10 | } 11 | } 12 | } 13 | 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | 19 | dependencies { 20 | compileOnly(gradleApi()) 21 | implementation("com.android.tools.build:gradle:8.5.1") 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src-tauri/gen/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath("com.android.tools.build:gradle:8.5.1") 8 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | tasks.register("clean").configure { 20 | delete("build") 21 | } 22 | 23 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/App.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /src/components/SimplePagination.tsx: -------------------------------------------------------------------------------- 1 | export function SimplePagination({ 2 | page, 3 | setPage, 4 | totalPages, 5 | }: { 6 | page: number 7 | setPage: (page: number) => void 8 | totalPages: number 9 | }) { 10 | return ( 11 |
12 | {page > 1 && setPage(page - 1)}>{"<"}} 13 | 14 | {page} / {totalPages} 15 | 16 | {page < totalPages && ( 17 | setPage(page + 1)}>{">"} 18 | )} 19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/routes/chat.$chatId.tsx: -------------------------------------------------------------------------------- 1 | import Chat from '@/features/chat' 2 | import { LastChatIDStore, TChatID } from '@/lib/chat-store' 3 | import { createFileRoute } from '@tanstack/react-router' 4 | import { useEffect } from 'react' 5 | 6 | export const Route = createFileRoute('/chat/$chatId')({ 7 | component: RouteComponent, 8 | }) 9 | 10 | function RouteComponent() { 11 | const { chatId } = Route.useParams() 12 | 13 | useEffect(() => { 14 | LastChatIDStore.setLastChatID(chatId as TChatID) 15 | }, [chatId]) 16 | 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /lingui.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "@lingui/cli" 2 | 3 | export default defineConfig({ 4 | sourceLocale: "en", 5 | locales: [ 6 | "ar-AE", 7 | "bn-BD", 8 | "de-DE", 9 | "en", 10 | "en-US", 11 | "es-ES", 12 | "fr-FR", 13 | "hi-IN", 14 | "id-ID", 15 | "ja-JP", 16 | "ko-KR", 17 | "pt-BR", 18 | "ru-RU", 19 | "th-TH", 20 | "ur-PK", 21 | "vi-VN", 22 | "zh-CN", 23 | "zh-HK", 24 | "zh-TW", 25 | ], 26 | catalogs: [ 27 | { 28 | path: "/src/locales/{locale}/messages", 29 | include: ["src"], 30 | }, 31 | ], 32 | }) 33 | -------------------------------------------------------------------------------- /src/lib/chat-path-store.ts: -------------------------------------------------------------------------------- 1 | import { load } from "@tauri-apps/plugin-store" 2 | 3 | const chatPathStoreKey = "chat-path-store.json" 4 | 5 | export class ChatPathStore { 6 | static async getChatPath(id: string) { 7 | const store = await load(chatPathStoreKey) 8 | const chatPath = await store.get(id) 9 | if (!chatPath) { 10 | throw new Error(`Chat path for chat with id ${id} not found`) 11 | } 12 | return chatPath as number[] 13 | } 14 | 15 | static async setChatPath(id: string, chatPath: number[]) { 16 | const store = await load(chatPathStoreKey) 17 | await store.set(id, chatPath) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/eslintrc", 3 | "root": true, 4 | // Waiting tailwindcss plugin to support tailwind v4 5 | "extends": ["plugin:react-hooks/recommended"], 6 | "rules": { 7 | "react/jsx-key": "off", 8 | "react/no-unescaped-entities": "off", 9 | "tailwindcss/no-custom-classname": "off", 10 | }, 11 | "settings": { 12 | "tailwindcss": { 13 | "callees": ["cn"], 14 | "config": "tailwind.config.js", 15 | }, 16 | }, 17 | "overrides": [ 18 | { 19 | "files": ["*.ts", "*.tsx", "*.jsx"], 20 | "parser": "@typescript-eslint/parser", 21 | }, 22 | ], 23 | } 24 | -------------------------------------------------------------------------------- /src/hooks/useIsDark.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react" 2 | 3 | export function useIsDark() { 4 | const [isDark, setIsDark] = useState( 5 | window.matchMedia("(prefers-color-scheme: dark)").matches 6 | ) 7 | 8 | useEffect(() => { 9 | const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)") 10 | 11 | const handleSystemThemeChange = (e: MediaQueryListEvent) => { 12 | setIsDark(e.matches) 13 | } 14 | 15 | mediaQuery.addEventListener("change", handleSystemThemeChange) 16 | 17 | return () => { 18 | mediaQuery.removeEventListener("change", handleSystemThemeChange) 19 | } 20 | }, []) 21 | 22 | return isDark 23 | } 24 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | function Label({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 21 | ) 22 | } 23 | 24 | export { Label } 25 | -------------------------------------------------------------------------------- /src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 2 | #[tauri::command] 3 | fn greet(name: &str) -> String { 4 | format!("Hello, {}! You've been greeted from Rust!", name) 5 | } 6 | 7 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 8 | pub fn run() { 9 | tauri::Builder::default() 10 | .plugin(tauri_plugin_fs::init()) 11 | .plugin(tauri_plugin_http::init()) 12 | .plugin(tauri_plugin_store::Builder::new().build()) 13 | .plugin(tauri_plugin_opener::init()) 14 | .invoke_handler(tauri::generate_handler![greet]) 15 | .run(tauri::generate_context!()) 16 | .expect("error while running tauri application"); 17 | } 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "allowJs": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | "baseUrl": ".", 10 | "paths": { 11 | "@/*": ["./src/*"] 12 | }, 13 | 14 | /* Bundler mode */ 15 | "moduleResolution": "bundler", 16 | "allowImportingTsExtensions": true, 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "noEmit": true, 20 | "jsx": "react-jsx", 21 | 22 | /* Linting */ 23 | "strict": true, 24 | "noUnusedLocals": true, 25 | "noUnusedParameters": true, 26 | "noFallthroughCasesInSwitch": true 27 | }, 28 | "include": ["src"], 29 | "references": [{ "path": "./tsconfig.node.json" }] 30 | } 31 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config} */ 2 | module.exports = { 3 | endOfLine: "lf", 4 | semi: false, 5 | singleQuote: false, 6 | tabWidth: 2, 7 | trailingComma: "es5", 8 | importOrder: [ 9 | "^(react/(.*)$)|^(react$)", 10 | "^(next/(.*)$)|^(next$)", 11 | "", 12 | "", 13 | "^types$", 14 | "^@/types/(.*)$", 15 | "^@/config/(.*)$", 16 | "^@/lib/(.*)$", 17 | "^@/components/(.*)$", 18 | "^@/styles/(.*)$", 19 | "^[./]", 20 | ], 21 | importOrderSeparation: false, 22 | importOrderSortSpecifiers: true, 23 | importOrderBuiltinModulesToTop: true, 24 | importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], 25 | importOrderMergeDuplicateImports: true, 26 | importOrderCombineTypeAndValueImports: true, 27 | plugins: ["@ianvs/prettier-plugin-sort-imports"], 28 | }; 29 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /src/lib/search-api-store.ts: -------------------------------------------------------------------------------- 1 | import { load } from "@tauri-apps/plugin-store" 2 | import { z } from "zod" 3 | 4 | const searchAPIStoreKey = "search-api-store.json" 5 | 6 | export const SearchApiSchema = z.object({ 7 | name: z.string().min(1), 8 | apiKey: z.string().optional(), 9 | searchURL: z.string().url(), 10 | }) 11 | 12 | export type TBaseSearchAPI = z.infer 13 | 14 | export class SearchApiStore { 15 | static async getSearchApi(name: string) { 16 | const store = await load(searchAPIStoreKey) 17 | return store.get(name) 18 | } 19 | 20 | static async getAllSearchApis() { 21 | const store = await load(searchAPIStoreKey) 22 | 23 | return store.values() 24 | } 25 | 26 | static async setSearchApi(api: TBaseSearchAPI) { 27 | const store = await load(searchAPIStoreKey) 28 | await store.set(api.name, api) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | function Collapsible({ 4 | ...props 5 | }: React.ComponentProps) { 6 | return 7 | } 8 | 9 | function CollapsibleTrigger({ 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 17 | ) 18 | } 19 | 20 | function CollapsibleContent({ 21 | ...props 22 | }: React.ComponentProps) { 23 | return ( 24 | 28 | ) 29 | } 30 | 31 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 32 | -------------------------------------------------------------------------------- /src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": [ 6 | "main" 7 | ], 8 | "permissions": [ 9 | "core:default", 10 | "opener:default", 11 | "store:default", 12 | { 13 | "identifier": "http:default", 14 | "allow": [ 15 | { 16 | "url": "https://*" 17 | }, 18 | { 19 | "url": "http://localhost:*" 20 | }, 21 | { 22 | "url": "http://127.0.0.1:*" 23 | }, 24 | { 25 | "url": "http://*.localhost:*" 26 | }, 27 | { 28 | "url": "http://(192\\.168).*:*" 29 | } 30 | ] 31 | }, 32 | "opener:default", 33 | "fs:default", 34 | "fs:allow-exists", 35 | "fs:allow-app-read-recursive", 36 | "fs:allow-app-write-recursive", 37 | "fs:allow-watch" 38 | ] 39 | } -------------------------------------------------------------------------------- /src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Taiga" 3 | version = "0.1.0-rc.10" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "taiga_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = ["protocol-asset"] } 22 | tauri-plugin-opener = "2" 23 | serde = { version = "1", features = ["derive"] } 24 | serde_json = "1" 25 | tauri-plugin-store = "2" 26 | tauri-plugin-http = "2" 27 | tauri-plugin-fs = { version = "2.2.1", features = ["watch"] } 28 | 29 | -------------------------------------------------------------------------------- /src/lib/common-ai-tools.ts: -------------------------------------------------------------------------------- 1 | import { calculator } from "@agentic/calculator" 2 | import { AIFunctionSet, createAIFunction } from "@agentic/core" 3 | import { z } from "zod" 4 | 5 | // TODO: ensure `expr` is sanitized to not run arbitrary code 6 | export const CurrentTimeInputSchema = z.object({ 7 | iso: z.boolean().optional(), 8 | utc: z.boolean().optional(), 9 | }) 10 | export type CalculatorInput = z.infer 11 | 12 | const currentTime = createAIFunction( 13 | { 14 | name: "CurrentTime", 15 | description: 16 | "Get current time in ISO 8601 Extended Format(YYYY-MM-DDTHH:mm:ss.sssZ) or UTC string format. Will use ISO by default.", 17 | inputSchema: CurrentTimeInputSchema, 18 | }, 19 | async ({ iso, utc }: CalculatorInput) => { 20 | return new Date()[ 21 | iso ? "toISOString" : utc ? "toUTCString" : "toISOString" 22 | ]() 23 | } 24 | ) 25 | 26 | export const commonAITools = new AIFunctionSet([calculator, currentTime]) 27 | -------------------------------------------------------------------------------- /src/components/ui/sonner.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from "next-themes" 2 | import { Toaster as Sonner, ToasterProps } from "sonner" 3 | 4 | const Toaster = ({ ...props }: ToasterProps) => { 5 | const { theme = "system" } = useTheme() 6 | 7 | return ( 8 | 26 | ) 27 | } 28 | 29 | export { Toaster } 30 | -------------------------------------------------------------------------------- /src/lib/default-model-store.ts: -------------------------------------------------------------------------------- 1 | import { load } from "@tauri-apps/plugin-store" 2 | 3 | const defaultModelStoreKey = "default-model.json" 4 | 5 | export type TDefaultModel = [string, string] | null 6 | export type TDefaultModels = Record< 7 | "translate" | "chat" | "summarize", 8 | TDefaultModel 9 | > 10 | 11 | export class DefaultModelStore { 12 | static async getDefaultModels() { 13 | const store = await load(defaultModelStoreKey) 14 | const models: TDefaultModels = { 15 | translate: null, 16 | chat: null, 17 | summarize: null, 18 | } 19 | const saveddefaultModels = (await store.entries()) as [ 20 | keyof TDefaultModels, 21 | TDefaultModel, 22 | ][] 23 | 24 | for (const [key, value] of saveddefaultModels) { 25 | models[key] = value 26 | } 27 | 28 | return models 29 | } 30 | 31 | static async setDefaultModel(type: keyof TDefaultModels, model: TDefaultModel) { 32 | const store = await load(defaultModelStoreKey) 33 | await store.set(type, model) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "Taiga", 4 | "version": "0.1.0-rc.10", 5 | "identifier": "xyz.lightm.taiga.app", 6 | "build": { 7 | "beforeDevCommand": "yarn dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "yarn build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "windows": [ 14 | { 15 | "title": "taiga", 16 | "width": 800, 17 | "height": 600 18 | } 19 | ], 20 | "security": { 21 | "csp": null, 22 | "assetProtocol": { 23 | "enable": true, 24 | "scope": { 25 | "requireLiteralLeadingDot": false, 26 | "allow": ["**/*"] 27 | } 28 | } 29 | } 30 | }, 31 | "bundle": { 32 | "active": true, 33 | "targets": "all", 34 | "icon": [ 35 | "icons/32x32.png", 36 | "icons/64x64.png", 37 | "icons/128x128.png", 38 | "icons/128x128@2x.png", 39 | "icons/icon.icns", 40 | "icons/icon.ico" 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/routes/_settingsLayout.tsx: -------------------------------------------------------------------------------- 1 | import { SiGithub } from "@icons-pack/react-simple-icons" 2 | import { createFileRoute, Outlet } from "@tanstack/react-router" 3 | import { openUrl } from "@tauri-apps/plugin-opener" 4 | 5 | import { getCurrentVersion, TAIGA_GITHUB_URL } from "@/lib/updater" 6 | 7 | export const Route = createFileRoute("/_settingsLayout")({ 8 | component: SettingsLayout, 9 | }) 10 | 11 | function SettingsLayout() { 12 | const currentVersion = getCurrentVersion() 13 | 14 | return ( 15 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { 6 | return ( 7 |