├── test_models.md ├── claudeCli ├── test_models.md ├── src-tauri │ ├── .mcp.json │ ├── build.rs │ ├── src │ │ ├── process │ │ │ └── mod.rs │ │ ├── lib.rs │ │ └── commands │ │ │ └── mod.rs │ ├── icons │ │ ├── 32x32.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ ├── icon.png │ │ ├── 128x128.png │ │ └── 128x128@2x.png │ ├── .gitignore │ ├── Cargo.production.toml │ ├── capabilities │ │ └── default.json │ ├── Info.plist │ ├── entitlements.plist │ ├── tauri.conf.debug.json │ ├── Cargo.toml │ ├── tauri.conf.json │ └── tauri.conf.release.json ├── src │ ├── vite-env.d.ts │ ├── assets │ │ └── nfo │ │ │ ├── claudia-nfo.ogg │ │ │ └── asterisk-logo.png │ ├── constants │ │ └── agentIcons.ts │ ├── components │ │ ├── ToolWidgets.new.tsx │ │ ├── __tests__ │ │ │ ├── Button.test.tsx │ │ │ ├── TabManager.test.tsx │ │ │ └── ProjectList.test.tsx │ │ ├── ui │ │ │ ├── label.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── pagination.tsx │ │ │ ├── textarea.tsx │ │ │ ├── badge.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── input.tsx │ │ │ └── radio-group.tsx │ │ ├── index.ts │ │ ├── widgets │ │ │ └── index.ts │ │ ├── TokenCounter.tsx │ │ ├── I18nProvider.tsx │ │ ├── AnalyticsErrorBoundary.tsx │ │ └── LanguageSelector.tsx │ ├── contexts │ │ ├── toastUtils.ts │ │ ├── tabUtils.ts │ │ ├── contextUtils.ts │ │ ├── contexts.ts │ │ └── hooks.ts │ ├── test │ │ └── setup.ts │ ├── lib │ │ ├── utils.ts │ │ ├── __tests__ │ │ │ ├── utils.test.ts │ │ │ └── api.test.ts │ │ ├── outputCacheHook.ts │ │ └── outputCacheUtils.ts │ ├── hooks │ │ ├── useTheme.ts │ │ ├── useMessageDisplayMode.ts │ │ ├── index.ts │ │ ├── useLoadingState.ts │ │ └── useDebounce.ts │ ├── main.tsx │ └── locales │ │ └── index.ts ├── .env.production ├── .cargo │ └── config.toml ├── .env.development ├── tsconfig.node.json ├── .editorconfig ├── index.html ├── vitest.config.ts ├── .gitignore ├── .prettierignore ├── .prettierrc ├── tsconfig.json ├── scripts │ └── bump-version.sh ├── .qoder │ └── rules │ │ └── rules.md ├── vite.config.ts ├── vite.config.production.ts └── cc_agents │ └── git-commit-bot.claudia.json ├── src-tauri ├── .mcp.json ├── build.rs ├── src │ ├── process │ │ └── mod.rs │ ├── lib.rs │ └── commands │ │ └── mod.rs ├── icons │ ├── 32x32.png │ ├── 64x64.png │ ├── icon.icns │ ├── icon.ico │ ├── icon.png │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── StoreLogo.png │ ├── Square30x30Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square310x310Logo.png │ ├── ios │ │ ├── AppIcon-20x20@1x.png │ │ ├── AppIcon-20x20@2x.png │ │ ├── AppIcon-20x20@3x.png │ │ ├── AppIcon-29x29@1x.png │ │ ├── AppIcon-29x29@2x.png │ │ ├── AppIcon-29x29@3x.png │ │ ├── AppIcon-40x40@1x.png │ │ ├── AppIcon-40x40@2x.png │ │ ├── AppIcon-40x40@3x.png │ │ ├── AppIcon-512@2x.png │ │ ├── AppIcon-60x60@2x.png │ │ ├── AppIcon-60x60@3x.png │ │ ├── AppIcon-76x76@1x.png │ │ ├── AppIcon-76x76@2x.png │ │ ├── AppIcon-20x20@2x-1.png │ │ ├── AppIcon-29x29@2x-1.png │ │ ├── AppIcon-40x40@2x-1.png │ │ └── AppIcon-83.5x83.5@2x.png │ └── android │ │ ├── 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 ├── .gitignore ├── Cargo.production.toml ├── capabilities │ └── default.json ├── Info.plist ├── entitlements.plist ├── tauri.conf.debug.json ├── Cargo.toml └── tauri.conf.json ├── src ├── vite-env.d.ts ├── assets │ └── nfo │ │ ├── claudia-nfo.ogg │ │ └── asterisk-logo.png ├── constants │ └── agentIcons.ts ├── components │ ├── AnalyticsConsent.tsx │ ├── ToolWidgets.new.tsx │ ├── __tests__ │ │ ├── Button.test.tsx │ │ ├── TabManager.test.tsx │ │ └── ProjectList.test.tsx │ ├── ui │ │ ├── label.tsx │ │ ├── scroll-area.tsx │ │ ├── pagination.tsx │ │ ├── textarea.tsx │ │ ├── badge.tsx │ │ ├── tooltip.tsx │ │ ├── input.tsx │ │ └── radio-group.tsx │ ├── index.ts │ ├── widgets │ │ └── index.ts │ ├── TokenCounter.tsx │ ├── I18nProvider.tsx │ ├── AnalyticsErrorBoundary.tsx │ └── LanguageSelector.tsx ├── contexts │ ├── toastUtils.ts │ ├── tabUtils.ts │ ├── contextUtils.ts │ ├── hooks.ts │ └── contexts.ts ├── test │ └── setup.ts ├── hooks │ ├── useTheme.ts │ ├── useMessageDisplayMode.ts │ ├── index.ts │ ├── useLoadingState.ts │ ├── useConfigMonitor.ts │ └── useDebounce.ts ├── lib │ ├── __tests__ │ │ ├── utils.test.ts │ │ └── api.test.ts │ ├── outputCacheHook.ts │ ├── utils.ts │ └── outputCacheUtils.ts ├── main.tsx └── locales │ └── index.ts ├── app-icon.png ├── .env.production ├── .cargo └── config.toml ├── .env.development ├── tsconfig.node.json ├── .editorconfig ├── index.html ├── vitest.config.ts ├── .gitignore ├── .prettierignore ├── .prettierrc ├── tsconfig.json ├── scripts └── bump-version.sh ├── .qoder └── rules │ └── rules.md ├── vite.config.ts ├── vite.config.production.ts └── cc_agents └── git-commit-bot.claudia.json /test_models.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /claudeCli/test_models.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src-tauri/.mcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "mcpServers": {} 3 | } -------------------------------------------------------------------------------- /claudeCli/src-tauri/.mcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "mcpServers": {} 3 | } -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /claudeCli/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/app-icon.png -------------------------------------------------------------------------------- /claudeCli/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /src-tauri/src/process/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod registry; 2 | 3 | pub use registry::*; 4 | -------------------------------------------------------------------------------- /claudeCli/src-tauri/src/process/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod registry; 2 | 3 | pub use registry::*; 4 | -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/64x64.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src/assets/nfo/claudia-nfo.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src/assets/nfo/claudia-nfo.ogg -------------------------------------------------------------------------------- /src/assets/nfo/asterisk-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src/assets/nfo/asterisk-logo.png -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # 生产环境配置 2 | VITE_LOG_LEVEL=WARN 3 | VITE_ENABLE_CONSOLE_LOGS=false 4 | VITE_ENABLE_PERFORMANCE_LOGS=false -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /claudeCli/.env.production: -------------------------------------------------------------------------------- 1 | # 生产环境配置 2 | VITE_LOG_LEVEL=WARN 3 | VITE_ENABLE_CONSOLE_LOGS=false 4 | VITE_ENABLE_PERFORMANCE_LOGS=false -------------------------------------------------------------------------------- /claudeCli/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /claudeCli/src/assets/nfo/claudia-nfo.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src/assets/nfo/claudia-nfo.ogg -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /claudeCli/src/assets/nfo/asterisk-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/claudeCli/src/assets/nfo/asterisk-logo.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.aarch64-unknown-linux-gnu] 2 | linker = "aarch64-linux-gnu-gcc" 3 | 4 | [env] 5 | PKG_CONFIG_ALLOW_CROSS = "1" 6 | -------------------------------------------------------------------------------- /src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | # 开发环境配置 2 | NODE_ENV=development 3 | VITE_LOG_LEVEL=DEBUG 4 | VITE_ENABLE_CONSOLE_LOGS=true 5 | VITE_ENABLE_PERFORMANCE_LOGS=true -------------------------------------------------------------------------------- /claudeCli/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.aarch64-unknown-linux-gnu] 2 | linker = "aarch64-linux-gnu-gcc" 3 | 4 | [env] 5 | PKG_CONFIG_ALLOW_CROSS = "1" 6 | -------------------------------------------------------------------------------- /claudeCli/.env.development: -------------------------------------------------------------------------------- 1 | # 开发环境配置 2 | NODE_ENV=development 3 | VITE_LOG_LEVEL=DEBUG 4 | VITE_ENABLE_CONSOLE_LOGS=true 5 | VITE_ENABLE_PERFORMANCE_LOGS=true -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuemk/termiClaude/HEAD/src-tauri/icons/android/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 | -------------------------------------------------------------------------------- /claudeCli/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /claudeCli/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/constants/agentIcons.ts: -------------------------------------------------------------------------------- 1 | import { ICON_MAP } from "@/constants/iconConstants"; 2 | 3 | /** 4 | * Available icons for agents 5 | * 6 | * This constant is exported separately to avoid fast refresh warnings 7 | * when importing in React components. 8 | */ 9 | export const AGENT_ICONS = ICON_MAP; 10 | -------------------------------------------------------------------------------- /claudeCli/src/constants/agentIcons.ts: -------------------------------------------------------------------------------- 1 | import { ICON_MAP } from "@/constants/iconConstants"; 2 | 3 | /** 4 | * Available icons for agents 5 | * 6 | * This constant is exported separately to avoid fast refresh warnings 7 | * when importing in React components. 8 | */ 9 | export const AGENT_ICONS = ICON_MAP; 10 | -------------------------------------------------------------------------------- /src/components/AnalyticsConsent.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | interface AnalyticsConsentProps { 4 | open?: boolean; 5 | onOpenChange?: (open: boolean) => void; 6 | onComplete?: () => void; 7 | } 8 | 9 | export const AnalyticsConsent: React.FC = () => { 10 | return null; 11 | }; -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [*.rs] 18 | indent_size = 4 19 | 20 | [Makefile] 21 | indent_style = tab 22 | 23 | [*.{json,jsonc}] 24 | indent_size = 2 25 | 26 | [*.toml] 27 | indent_size = 2 -------------------------------------------------------------------------------- /claudeCli/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [*.rs] 18 | indent_size = 4 19 | 20 | [Makefile] 21 | indent_style = tab 22 | 23 | [*.{json,jsonc}] 24 | indent_size = 2 25 | 26 | [*.toml] 27 | indent_size = 2 -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | TermiClaude - Claude Code Session Browser 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /claudeCli/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Claudia - Claude Code Session Browser 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | import { fileURLToPath, URL } from "node:url"; 4 | 5 | export default defineConfig({ 6 | plugins: [react()], 7 | test: { 8 | environment: "jsdom", 9 | setupFiles: ["./src/test/setup.ts"], 10 | globals: true, 11 | include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": fileURLToPath(new URL("./src", import.meta.url)), 16 | }, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /claudeCli/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | import { fileURLToPath, URL } from "node:url"; 4 | 5 | export default defineConfig({ 6 | plugins: [react()], 7 | test: { 8 | environment: "jsdom", 9 | setupFiles: ["./src/test/setup.ts"], 10 | globals: true, 11 | include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], 12 | }, 13 | resolve: { 14 | alias: { 15 | "@": fileURLToPath(new URL("./src", import.meta.url)), 16 | }, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /src/components/ToolWidgets.new.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Tool widgets re-export module 3 | * 4 | * This file re-exports all widgets from the widgets directory to maintain 5 | * backward compatibility with the original ToolWidgets.tsx structure. 6 | * Provides a clean import path for all tool-specific widget components. 7 | * 8 | * @example 9 | * ```tsx 10 | * import { BashWidget, LSWidget, TodoWidget } from '@/components/ToolWidgets.new'; 11 | * ``` 12 | */ 13 | 14 | // eslint-disable-next-line react-refresh/only-export-components 15 | export * from "./widgets"; 16 | -------------------------------------------------------------------------------- /claudeCli/src/components/ToolWidgets.new.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Tool widgets re-export module 3 | * 4 | * This file re-exports all widgets from the widgets directory to maintain 5 | * backward compatibility with the original ToolWidgets.tsx structure. 6 | * Provides a clean import path for all tool-specific widget components. 7 | * 8 | * @example 9 | * ```tsx 10 | * import { BashWidget, LSWidget, TodoWidget } from '@/components/ToolWidgets.new'; 11 | * ``` 12 | */ 13 | 14 | // eslint-disable-next-line react-refresh/only-export-components 15 | export * from "./widgets"; 16 | -------------------------------------------------------------------------------- /.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 | *.bun-build 15 | 16 | # Tauri binaries (built executables) 17 | src-tauri/binaries/ 18 | 19 | # Editor directories and files 20 | .vscode/* 21 | !.vscode/extensions.json 22 | .idea 23 | .DS_Store 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | temp_lib/ 30 | 31 | .cursor/ 32 | AGENTS.md 33 | CLAUDE.md 34 | *_TASK.md 35 | 36 | # Claude project-specific files 37 | .claude/ 38 | 39 | .env -------------------------------------------------------------------------------- /claudeCli/.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 | *.bun-build 15 | 16 | # Tauri binaries (built executables) 17 | src-tauri/binaries/ 18 | 19 | # Editor directories and files 20 | .vscode/* 21 | !.vscode/extensions.json 22 | .idea 23 | .DS_Store 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | temp_lib/ 30 | 31 | .cursor/ 32 | AGENTS.md 33 | CLAUDE.md 34 | *_TASK.md 35 | 36 | # Claude project-specific files 37 | .claude/ 38 | 39 | .env -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Build outputs 2 | dist/ 3 | build/ 4 | coverage/ 5 | 6 | # Tauri build artifacts 7 | src-tauri/target/ 8 | src-tauri/Cargo.lock 9 | 10 | # Node modules 11 | node_modules/ 12 | 13 | # Generated files 14 | *.generated.* 15 | *.min.js 16 | *.min.css 17 | 18 | # Lock files 19 | package-lock.json 20 | yarn.lock 21 | bun.lockb 22 | 23 | # IDE files 24 | .vscode/ 25 | .idea/ 26 | 27 | # OS files 28 | .DS_Store 29 | Thumbs.db 30 | 31 | # Logs 32 | *.log 33 | npm-debug.log* 34 | yarn-debug.log* 35 | yarn-error.log* 36 | 37 | # Runtime data 38 | pids 39 | *.pid 40 | *.seed 41 | *.pid.lock 42 | 43 | # Temporary files 44 | *.tmp 45 | *.temp -------------------------------------------------------------------------------- /claudeCli/.prettierignore: -------------------------------------------------------------------------------- 1 | # Build outputs 2 | dist/ 3 | build/ 4 | coverage/ 5 | 6 | # Tauri build artifacts 7 | src-tauri/target/ 8 | src-tauri/Cargo.lock 9 | 10 | # Node modules 11 | node_modules/ 12 | 13 | # Generated files 14 | *.generated.* 15 | *.min.js 16 | *.min.css 17 | 18 | # Lock files 19 | package-lock.json 20 | yarn.lock 21 | bun.lockb 22 | 23 | # IDE files 24 | .vscode/ 25 | .idea/ 26 | 27 | # OS files 28 | .DS_Store 29 | Thumbs.db 30 | 31 | # Logs 32 | *.log 33 | npm-debug.log* 34 | yarn-debug.log* 35 | yarn-error.log* 36 | 37 | # Runtime data 38 | pids 39 | *.pid 40 | *.seed 41 | *.pid.lock 42 | 43 | # Temporary files 44 | *.tmp 45 | *.temp -------------------------------------------------------------------------------- /src/contexts/toastUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for toast management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Generate a unique identifier for toast notifications 8 | * 9 | * Creates a unique toast ID using timestamp and random characters 10 | * to ensure uniqueness across toast creation sessions. 11 | * 12 | * @returns Unique toast identifier string 13 | * 14 | * @example 15 | * ```typescript 16 | * const toastId = generateToastId(); 17 | * // Returns: 'toast_1703123456789_abc123def' 18 | * ``` 19 | */ 20 | export const generateToastId = (): string => { 21 | return `toast_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; 22 | }; 23 | -------------------------------------------------------------------------------- /claudeCli/src/contexts/toastUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for toast management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Generate a unique identifier for toast notifications 8 | * 9 | * Creates a unique toast ID using timestamp and random characters 10 | * to ensure uniqueness across toast creation sessions. 11 | * 12 | * @returns Unique toast identifier string 13 | * 14 | * @example 15 | * ```typescript 16 | * const toastId = generateToastId(); 17 | * // Returns: 'toast_1703123456789_abc123def' 18 | * ``` 19 | */ 20 | export const generateToastId = (): string => { 21 | return `toast_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; 22 | }; 23 | -------------------------------------------------------------------------------- /src-tauri/Cargo.production.toml: -------------------------------------------------------------------------------- 1 | # 生产环境 Cargo 配置 2 | # 使用方法: CARGO_MANIFEST_PATH=Cargo.production.toml cargo build --release 3 | 4 | [profile.release] 5 | # 启用最大优化 6 | opt-level = 3 7 | # 启用 LTO (Link Time Optimization) 8 | lto = true 9 | # 减少代码大小 10 | codegen-units = 1 11 | # 启用 panic = "abort" 以减少二进制大小 12 | panic = "abort" 13 | # 去除调试符号 14 | debug = false 15 | # 启用所有优化 16 | overflow-checks = false 17 | 18 | [profile.release.package."*"] 19 | # 对所有依赖包也启用最大优化 20 | opt-level = 3 21 | 22 | # 生产环境特定的依赖配置 23 | [dependencies.log] 24 | version = "0.4" 25 | features = ["release_max_level_warn"] # 编译时移除 debug 和 info 日志 26 | 27 | [dependencies.env_logger] 28 | version = "0.11" 29 | default-features = false 30 | features = ["color"] -------------------------------------------------------------------------------- /claudeCli/src-tauri/Cargo.production.toml: -------------------------------------------------------------------------------- 1 | # 生产环境 Cargo 配置 2 | # 使用方法: CARGO_MANIFEST_PATH=Cargo.production.toml cargo build --release 3 | 4 | [profile.release] 5 | # 启用最大优化 6 | opt-level = 3 7 | # 启用 LTO (Link Time Optimization) 8 | lto = true 9 | # 减少代码大小 10 | codegen-units = 1 11 | # 启用 panic = "abort" 以减少二进制大小 12 | panic = "abort" 13 | # 去除调试符号 14 | debug = false 15 | # 启用所有优化 16 | overflow-checks = false 17 | 18 | [profile.release.package."*"] 19 | # 对所有依赖包也启用最大优化 20 | opt-level = 3 21 | 22 | # 生产环境特定的依赖配置 23 | [dependencies.log] 24 | version = "0.4" 25 | features = ["release_max_level_warn"] # 编译时移除 debug 和 info 日志 26 | 27 | [dependencies.env_logger] 28 | version = "0.11" 29 | default-features = false 30 | features = ["color"] -------------------------------------------------------------------------------- /src/test/setup.ts: -------------------------------------------------------------------------------- 1 | import { afterEach } from "vitest"; 2 | import { cleanup } from "@testing-library/react"; 3 | import "@testing-library/jest-dom"; 4 | 5 | /** 6 | * Test setup configuration for Vitest and React Testing Library 7 | * 8 | * Configures the testing environment with Jest DOM matchers and automatic 9 | * cleanup after each test case to ensure test isolation. 10 | */ 11 | 12 | // Jest DOM matchers are automatically extended when importing '@testing-library/jest-dom' 13 | 14 | /** 15 | * Cleanup function that runs after each test case 16 | * 17 | * Ensures proper cleanup of the DOM and React components to prevent 18 | * test interference and memory leaks. 19 | */ 20 | afterEach(() => { 21 | cleanup(); 22 | }); 23 | -------------------------------------------------------------------------------- /src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 2 | 3 | // Declare modules 4 | pub mod checkpoint; 5 | pub mod claude_binary; 6 | pub mod commands; 7 | pub mod logger; 8 | pub mod process; 9 | 10 | // Logger macros are automatically exported to crate root due to #[macro_export] 11 | // No need to re-export them manually 12 | 13 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 14 | pub fn run() -> Result<(), Box> { 15 | tauri::Builder::default() 16 | .run(tauri::generate_context!()) 17 | .map_err(|e| { 18 | log::error!("Failed to run Tauri application: {}", e); 19 | e 20 | })?; 21 | 22 | Ok(()) 23 | } 24 | -------------------------------------------------------------------------------- /claudeCli/src/test/setup.ts: -------------------------------------------------------------------------------- 1 | import { afterEach } from "vitest"; 2 | import { cleanup } from "@testing-library/react"; 3 | import "@testing-library/jest-dom"; 4 | 5 | /** 6 | * Test setup configuration for Vitest and React Testing Library 7 | * 8 | * Configures the testing environment with Jest DOM matchers and automatic 9 | * cleanup after each test case to ensure test isolation. 10 | */ 11 | 12 | // Jest DOM matchers are automatically extended when importing '@testing-library/jest-dom' 13 | 14 | /** 15 | * Cleanup function that runs after each test case 16 | * 17 | * Ensures proper cleanup of the DOM and React components to prevent 18 | * test interference and memory leaks. 19 | */ 20 | afterEach(() => { 21 | cleanup(); 22 | }); 23 | -------------------------------------------------------------------------------- /claudeCli/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ 2 | 3 | // Declare modules 4 | pub mod checkpoint; 5 | pub mod claude_binary; 6 | pub mod commands; 7 | pub mod logger; 8 | pub mod process; 9 | 10 | // Logger macros are automatically exported to crate root due to #[macro_export] 11 | // No need to re-export them manually 12 | 13 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 14 | pub fn run() -> Result<(), Box> { 15 | tauri::Builder::default() 16 | .run(tauri::generate_context!()) 17 | .map_err(|e| { 18 | log::error!("Failed to run Tauri application: {}", e); 19 | e 20 | })?; 21 | 22 | Ok(()) 23 | } 24 | -------------------------------------------------------------------------------- /claudeCli/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | /** 5 | * Combines multiple class values into a single string using clsx and tailwind-merge. 6 | * This utility function helps manage dynamic class names and prevents Tailwind CSS conflicts. 7 | * 8 | * @param inputs - Array of class values that can be strings, objects, arrays, etc. 9 | * @returns A merged string of class names with Tailwind conflicts resolved 10 | * 11 | * @example 12 | * cn("px-2 py-1", condition && "bg-blue-500", { "text-white": isActive }) 13 | * // Returns: "px-2 py-1 bg-blue-500 text-white" (when condition and isActive are true) 14 | */ 15 | export function cn(...inputs: ClassValue[]) { 16 | return twMerge(clsx(inputs)); 17 | } 18 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "useTabs": false, 8 | "quoteProps": "as-needed", 9 | "jsxSingleQuote": false, 10 | "bracketSpacing": true, 11 | "bracketSameLine": false, 12 | "arrowParens": "always", 13 | "endOfLine": "lf", 14 | "embeddedLanguageFormatting": "auto", 15 | "htmlWhitespaceSensitivity": "css", 16 | "insertPragma": false, 17 | "proseWrap": "preserve", 18 | "requirePragma": false, 19 | "vueIndentScriptAndStyle": false, 20 | "overrides": [ 21 | { 22 | "files": "*.md", 23 | "options": { 24 | "printWidth": 80, 25 | "proseWrap": "always" 26 | } 27 | }, 28 | { 29 | "files": "*.json", 30 | "options": { 31 | "printWidth": 120 32 | } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /claudeCli/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 100, 6 | "tabWidth": 2, 7 | "useTabs": false, 8 | "quoteProps": "as-needed", 9 | "jsxSingleQuote": false, 10 | "bracketSpacing": true, 11 | "bracketSameLine": false, 12 | "arrowParens": "always", 13 | "endOfLine": "lf", 14 | "embeddedLanguageFormatting": "auto", 15 | "htmlWhitespaceSensitivity": "css", 16 | "insertPragma": false, 17 | "proseWrap": "preserve", 18 | "requirePragma": false, 19 | "vueIndentScriptAndStyle": false, 20 | "overrides": [ 21 | { 22 | "files": "*.md", 23 | "options": { 24 | "printWidth": 80, 25 | "proseWrap": "always" 26 | } 27 | }, 28 | { 29 | "files": "*.json", 30 | "options": { 31 | "printWidth": 120 32 | } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/contexts/tabUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for tab management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Generate a unique identifier for tabs 8 | * 9 | * Creates a unique tab ID using timestamp and random characters 10 | * to ensure uniqueness across tab creation sessions. 11 | * 12 | * @returns Unique tab identifier string 13 | * 14 | * @example 15 | * ```typescript 16 | * const tabId = generateTabId(); 17 | * // Returns: 'tab-1703123456789-abc123def' 18 | * ``` 19 | */ 20 | export const generateTabId = (): string => { 21 | return `tab-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; 22 | }; 23 | 24 | /** 25 | * Maximum number of tabs allowed to be open simultaneously 26 | * 27 | * Prevents excessive memory usage and maintains UI performance 28 | * by limiting the number of concurrent tabs. 29 | */ 30 | export const MAX_TABS = 20; 31 | -------------------------------------------------------------------------------- /claudeCli/src/contexts/tabUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for tab management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Generate a unique identifier for tabs 8 | * 9 | * Creates a unique tab ID using timestamp and random characters 10 | * to ensure uniqueness across tab creation sessions. 11 | * 12 | * @returns Unique tab identifier string 13 | * 14 | * @example 15 | * ```typescript 16 | * const tabId = generateTabId(); 17 | * // Returns: 'tab-1703123456789-abc123def' 18 | * ``` 19 | */ 20 | export const generateTabId = (): string => { 21 | return `tab-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; 22 | }; 23 | 24 | /** 25 | * Maximum number of tabs allowed to be open simultaneously 26 | * 27 | * Prevents excessive memory usage and maintains UI performance 28 | * by limiting the number of concurrent tabs. 29 | */ 30 | export const MAX_TABS = 20; 31 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | 23 | /* Testing */ 24 | "types": ["vitest/globals", "@testing-library/jest-dom"], 25 | 26 | /* Path aliases */ 27 | "baseUrl": ".", 28 | "paths": { 29 | "@/*": ["./src/*"] 30 | } 31 | }, 32 | "include": ["src"], 33 | "references": [{ "path": "./tsconfig.node.json" }] 34 | } 35 | -------------------------------------------------------------------------------- /src/hooks/useTheme.ts: -------------------------------------------------------------------------------- 1 | import { useThemeContext } from '../contexts/ThemeContext'; 2 | 3 | /** 4 | * Hook to access and control the theme system 5 | * 6 | * @returns {Object} Theme utilities and state 7 | * @returns {ThemeMode} theme - Current theme mode ('dark' | 'gray' | 'light' | 'custom') 8 | * @returns {CustomThemeColors} customColors - Custom theme color configuration 9 | * @returns {Function} setTheme - Function to change the theme mode 10 | * @returns {Function} setCustomColors - Function to update custom theme colors 11 | * @returns {boolean} isLoading - Whether theme operations are in progress 12 | * 13 | * @example 14 | * const { theme, setTheme } = useTheme(); 15 | * 16 | * // Change theme 17 | * await setTheme('light'); 18 | * 19 | * // Update custom colors 20 | * await setCustomColors({ background: 'oklch(0.98 0.01 240)' }); 21 | */ 22 | export const useTheme = () => { 23 | return useThemeContext(); 24 | }; -------------------------------------------------------------------------------- /claudeCli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | 23 | /* Testing */ 24 | "types": ["vitest/globals", "@testing-library/jest-dom"], 25 | 26 | /* Path aliases */ 27 | "baseUrl": ".", 28 | "paths": { 29 | "@/*": ["./src/*"] 30 | } 31 | }, 32 | "include": ["src"], 33 | "references": [{ "path": "./tsconfig.node.json" }] 34 | } 35 | -------------------------------------------------------------------------------- /claudeCli/src/hooks/useTheme.ts: -------------------------------------------------------------------------------- 1 | import { useThemeContext } from '../contexts/ThemeContext'; 2 | 3 | /** 4 | * Hook to access and control the theme system 5 | * 6 | * @returns {Object} Theme utilities and state 7 | * @returns {ThemeMode} theme - Current theme mode ('dark' | 'gray' | 'light' | 'custom') 8 | * @returns {CustomThemeColors} customColors - Custom theme color configuration 9 | * @returns {Function} setTheme - Function to change the theme mode 10 | * @returns {Function} setCustomColors - Function to update custom theme colors 11 | * @returns {boolean} isLoading - Whether theme operations are in progress 12 | * 13 | * @example 14 | * const { theme, setTheme } = useTheme(); 15 | * 16 | * // Change theme 17 | * await setTheme('light'); 18 | * 19 | * // Update custom colors 20 | * await setCustomColors({ background: 'oklch(0.98 0.01 240)' }); 21 | */ 22 | export const useTheme = () => { 23 | return useThemeContext(); 24 | }; -------------------------------------------------------------------------------- /claudeCli/src-tauri/src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | /// # Commands Module 2 | /// 3 | /// This module contains all Tauri command handlers for the Claudia application. 4 | /// Commands are organized by functionality and provide the bridge between the 5 | /// frontend React application and the Rust backend. 6 | /// 7 | /// ## Module Structure 8 | /// 9 | /// - `agents` - Agent management and execution commands 10 | /// - `claude` - Claude Code integration and session management 11 | /// - `mcp` - Model Context Protocol server management 12 | /// - `slash_commands` - Slash command discovery and management 13 | /// - `storage` - Database operations and data management 14 | /// - `usage` - Usage statistics and cost tracking 15 | /// 16 | /// ## Security 17 | /// 18 | /// All commands implement proper input validation and use parameterized queries 19 | /// for database operations to prevent SQL injection attacks. 20 | 21 | pub mod agents; 22 | pub mod claude; 23 | pub mod mcp; 24 | pub mod usage; 25 | pub mod storage; 26 | pub mod slash_commands; 27 | pub mod proxy; 28 | -------------------------------------------------------------------------------- /src/lib/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from "vitest"; 2 | import { cn } from "../utils"; 3 | 4 | /** 5 | * Test suite for utility functions 6 | * 7 | * Tests general utility functions including class name merging, 8 | * conditional class handling, and Tailwind CSS integration. 9 | */ 10 | describe("Utils", () => { 11 | describe("cn function", () => { 12 | it("merges class names correctly", () => { 13 | expect(cn("class1", "class2")).toBe("class1 class2"); 14 | }); 15 | 16 | it("handles conditional classes", () => { 17 | const showConditional = true; 18 | const showHidden = false; 19 | expect(cn("base", showConditional && "conditional", showHidden && "hidden")).toBe( 20 | "base conditional" 21 | ); 22 | }); 23 | 24 | it("handles undefined and null values", () => { 25 | expect(cn("base", undefined, null, "end")).toBe("base end"); 26 | }); 27 | 28 | it("merges tailwind classes correctly", () => { 29 | expect(cn("px-2 py-1", "px-4")).toBe("py-1 px-4"); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /claudeCli/src/lib/__tests__/utils.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from "vitest"; 2 | import { cn } from "../utils"; 3 | 4 | /** 5 | * Test suite for utility functions 6 | * 7 | * Tests general utility functions including class name merging, 8 | * conditional class handling, and Tailwind CSS integration. 9 | */ 10 | describe("Utils", () => { 11 | describe("cn function", () => { 12 | it("merges class names correctly", () => { 13 | expect(cn("class1", "class2")).toBe("class1 class2"); 14 | }); 15 | 16 | it("handles conditional classes", () => { 17 | const showConditional = true; 18 | const showHidden = false; 19 | expect(cn("base", showConditional && "conditional", showHidden && "hidden")).toBe( 20 | "base conditional" 21 | ); 22 | }); 23 | 24 | it("handles undefined and null values", () => { 25 | expect(cn("base", undefined, null, "end")).toBe("base end"); 26 | }); 27 | 28 | it("merges tailwind classes correctly", () => { 29 | expect(cn("px-2 py-1", "px-4")).toBe("py-1 px-4"); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /src-tauri/src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | /// # Commands Module 2 | /// 3 | /// This module contains all Tauri command handlers for the TermiClaude application. 4 | /// Commands are organized by functionality and provide the bridge between the 5 | /// frontend React application and the Rust backend. 6 | /// 7 | /// ## Module Structure 8 | /// 9 | /// - `agents` - Agent management and execution commands 10 | /// - `claude` - Claude Code integration and session management 11 | /// - `mcp` - Model Context Protocol server management 12 | /// - `settings_monitor` - Configuration monitoring and conflict detection 13 | /// - `slash_commands` - Slash command discovery and management 14 | /// - `storage` - Database operations and data management 15 | /// - `usage` - Usage statistics and cost tracking 16 | /// 17 | /// ## Security 18 | /// 19 | /// All commands implement proper input validation and use parameterized queries 20 | /// for database operations to prevent SQL injection attacks. 21 | 22 | pub mod agents; 23 | pub mod claude; 24 | pub mod mcp; 25 | pub mod settings_monitor; 26 | pub mod usage; 27 | pub mod storage; 28 | pub mod slash_commands; 29 | pub mod proxy; 30 | -------------------------------------------------------------------------------- /src/contexts/contextUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for context management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Create a standardized error for tab context usage outside provider 8 | * 9 | * @param hookName - Name of the hook that was called outside the provider 10 | * @returns Error object with descriptive message 11 | * 12 | * @example 13 | * ```typescript 14 | * if (!context) { 15 | * throw createTabContextError('useTabState'); 16 | * } 17 | * ``` 18 | */ 19 | export const createTabContextError = (hookName: string): Error => { 20 | return new Error(`${hookName} must be used within a TabProvider`); 21 | }; 22 | 23 | /** 24 | * Create a standardized error for toast context usage outside provider 25 | * 26 | * @param hookName - Name of the hook that was called outside the provider 27 | * @returns Error object with descriptive message 28 | * 29 | * @example 30 | * ```typescript 31 | * if (!context) { 32 | * throw createToastContextError('useToast'); 33 | * } 34 | * ``` 35 | */ 36 | export const createToastContextError = (hookName: string): Error => { 37 | return new Error(`${hookName} must be used within a ToastProvider`); 38 | }; 39 | -------------------------------------------------------------------------------- /claudeCli/src/contexts/contextUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility functions for context management 3 | * Separated to avoid fast refresh warnings 4 | */ 5 | 6 | /** 7 | * Create a standardized error for tab context usage outside provider 8 | * 9 | * @param hookName - Name of the hook that was called outside the provider 10 | * @returns Error object with descriptive message 11 | * 12 | * @example 13 | * ```typescript 14 | * if (!context) { 15 | * throw createTabContextError('useTabState'); 16 | * } 17 | * ``` 18 | */ 19 | export const createTabContextError = (hookName: string): Error => { 20 | return new Error(`${hookName} must be used within a TabProvider`); 21 | }; 22 | 23 | /** 24 | * Create a standardized error for toast context usage outside provider 25 | * 26 | * @param hookName - Name of the hook that was called outside the provider 27 | * @returns Error object with descriptive message 28 | * 29 | * @example 30 | * ```typescript 31 | * if (!context) { 32 | * throw createToastContextError('useToast'); 33 | * } 34 | * ``` 35 | */ 36 | export const createToastContextError = (hookName: string): Error => { 37 | return new Error(`${hookName} must be used within a ToastProvider`); 38 | }; 39 | -------------------------------------------------------------------------------- /scripts/bump-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script to bump version across all files 4 | # Usage: ./scripts/bump-version.sh 1.0.0 5 | 6 | set -e 7 | 8 | if [ -z "$1" ]; then 9 | echo "Usage: $0 " 10 | echo "Example: $0 1.0.0" 11 | exit 1 12 | fi 13 | 14 | VERSION=$1 15 | 16 | echo "Bumping version to $VERSION..." 17 | 18 | # Update package.json 19 | sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json && rm package.json.bak 20 | 21 | # Update Cargo.toml 22 | sed -i.bak "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml && rm src-tauri/Cargo.toml.bak 23 | 24 | # Update tauri.conf.json 25 | sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json && rm src-tauri/tauri.conf.json.bak 26 | 27 | # Update Info.plist 28 | sed -i.bak "s/.*<\/string>/$VERSION<\/string>/" src-tauri/Info.plist && rm src-tauri/Info.plist.bak 29 | 30 | echo "✅ Version bumped to $VERSION in all files" 31 | echo "" 32 | echo "Next steps:" 33 | echo "1. Review the changes: git diff" 34 | echo "2. Commit: git commit -am \"chore: bump version to v$VERSION\"" 35 | echo "3. Tag: git tag -a v$VERSION -m \"Release v$VERSION\"" 36 | echo "4. Push: git push && git push --tags" 37 | -------------------------------------------------------------------------------- /claudeCli/scripts/bump-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script to bump version across all files 4 | # Usage: ./scripts/bump-version.sh 1.0.0 5 | 6 | set -e 7 | 8 | if [ -z "$1" ]; then 9 | echo "Usage: $0 " 10 | echo "Example: $0 1.0.0" 11 | exit 1 12 | fi 13 | 14 | VERSION=$1 15 | 16 | echo "Bumping version to $VERSION..." 17 | 18 | # Update package.json 19 | sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json && rm package.json.bak 20 | 21 | # Update Cargo.toml 22 | sed -i.bak "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml && rm src-tauri/Cargo.toml.bak 23 | 24 | # Update tauri.conf.json 25 | sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json && rm src-tauri/tauri.conf.json.bak 26 | 27 | # Update Info.plist 28 | sed -i.bak "s/.*<\/string>/$VERSION<\/string>/" src-tauri/Info.plist && rm src-tauri/Info.plist.bak 29 | 30 | echo "✅ Version bumped to $VERSION in all files" 31 | echo "" 32 | echo "Next steps:" 33 | echo "1. Review the changes: git diff" 34 | echo "2. Commit: git commit -am \"chore: bump version to v$VERSION\"" 35 | echo "3. Tag: git tag -a v$VERSION -m \"Release v$VERSION\"" 36 | echo "4. Push: git push && git push --tags" 37 | -------------------------------------------------------------------------------- /src/components/__tests__/Button.test.tsx: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vi } from "vitest"; 2 | import { render, screen, fireEvent } from "@testing-library/react"; 3 | import { Button } from "../ui/button"; 4 | 5 | /** 6 | * Test suite for Button component 7 | * 8 | * Tests button rendering, variants, sizes, states, and accessibility features. 9 | */ 10 | describe("Button Component", () => { 11 | it("renders correctly", () => { 12 | render(); 13 | expect(screen.getByRole("button")).toBeInTheDocument(); 14 | expect(screen.getByText("Test Button")).toBeInTheDocument(); 15 | }); 16 | 17 | it("handles click events", () => { 18 | const handleClick = vi.fn(); 19 | render(); 20 | 21 | fireEvent.click(screen.getByRole("button")); 22 | expect(handleClick).toHaveBeenCalledTimes(1); 23 | }); 24 | 25 | it("applies variant classes correctly", () => { 26 | render(); 27 | const button = screen.getByRole("button"); 28 | expect(button).toHaveClass("bg-destructive"); 29 | }); 30 | 31 | it("can be disabled", () => { 32 | render(); 33 | const button = screen.getByRole("button"); 34 | expect(button).toBeDisabled(); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { cn } from "@/lib/utils"; 3 | 4 | /** 5 | * Props interface for the Label component 6 | * 7 | * Extends standard HTML label attributes for form field labeling. 8 | */ 9 | export interface LabelProps extends React.LabelHTMLAttributes {} 10 | 11 | /** 12 | * Label component for form fields 13 | * 14 | * Provides consistent styling for form field labels with proper accessibility 15 | * support and disabled state handling. 16 | * 17 | * @param htmlFor - ID of the associated form control 18 | * @param className - Additional CSS classes 19 | * @param children - Label text content 20 | * 21 | * @example 22 | * ```tsx 23 | * 24 | * 25 | * 26 | * 27 | *