Design pattern & component consistency governance across 120 files: ESLint governance (eslint.config.mjs): - Enforce ui/ components over native HTML controls (warn) - Ban Lucide imports (error), require Phosphor via ui/icon.tsx (warn) - Component file size limit 500 lines (warn, skip blanks+comments) - Patterns layer isolation (error: no hooks/lib imports) - Exclude 资料/ from lint scope Icon unification (ui/icon.tsx): - Unified barrel export with 86+ Phosphor icons - Decoupled types/index.ts from icon library (generic IconComponent type) - Separated command data (lib/constants/commands.ts) from icons (command-icons.ts) Color token system (globals.css): - Added semantic status tokens: success/warning/error/info with muted/foreground/border variants - Migrated 39 files from raw green/red/orange/amber/blue to semantic tokens - grep-based lint:colors script covers green/emerald/red/orange/yellow/amber/blue Component splits (all under 500 lines): - MessageInput 1659→444: MessageInputParts, SlashCommandPopover, 7 hooks, 2 libs - ChatView ~850→419: useStreamSubscription, useAssistantTrigger - ProviderManager 1081→406: provider-presets, PresetConnectDialog, useProviderModels - AppShell 527→470: useUpdateChecker - AssistantWorkspaceSection 908→499: WorkspaceTabPanels/ConfirmDialogs/StatusCards - ChatListPanel 677→484: SessionListItem, ProjectGroupHeader, chat-list-utils Other: - Migrated 80 native HTML controls to ui/ components across 38 files - Fixed 22 hook dependency / set-state-in-effect issues - Cleaned 7 dead code warnings - Rebuilt better-sqlite3 for ARM architecture - Added handover doc: docs/handover/ui-governance.md Lint status: 0 errors 0 warnings on touched files; typecheck pass; 374/374 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
111 lines
3.7 KiB
JSON
111 lines
3.7 KiB
JSON
{
|
|
"name": "codepilot",
|
|
"version": "0.32.0",
|
|
"private": true,
|
|
"workspaces": [
|
|
"apps/*",
|
|
"packages/*"
|
|
],
|
|
"author": {
|
|
"name": "op7418",
|
|
"email": "7418@openclaw.ai"
|
|
},
|
|
"description": "A native desktop GUI client for Claude Code",
|
|
"main": "dist-electron/main.js",
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test:unit": "tsx --test src/__tests__/unit/*.test.ts",
|
|
"test:smoke": "npx playwright test --grep @smoke",
|
|
"test:e2e": "npx playwright test",
|
|
"test:visual": "npx playwright test --grep @visual",
|
|
"test": "npm run typecheck && npm run test:unit",
|
|
"lint:colors": "! grep -rn --include='*.tsx' --include='*.ts' -E '(bg|text|border)-(green|emerald|red|orange|yellow|amber|blue)-(400|500|600|700)' src/components/ src/app/ --exclude-dir=ui --exclude-dir=ai-elements | grep -v 'lint-allow-raw-color'",
|
|
"prepare": "node -e \"try{require('husky')()}catch(e){}\"",
|
|
"electron:dev": "concurrently -k \"next dev\" \"wait-on http://localhost:3000 && electron .\"",
|
|
"electron:build": "next build && node scripts/build-electron.mjs",
|
|
"electron:pack": "npm run electron:build && electron-builder --config electron-builder.yml",
|
|
"electron:pack:mac": "npm run electron:build && electron-builder --mac --config electron-builder.yml",
|
|
"electron:pack:win": "npm run electron:build && electron-builder --win --config electron-builder.yml",
|
|
"electron:pack:linux": "npm run electron:build && electron-builder --linux --config electron-builder.yml"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,tsx}": [
|
|
"eslint --fix"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/amazon-bedrock": "^4.0.77",
|
|
"@ai-sdk/anthropic": "^3.0.47",
|
|
"@ai-sdk/google": "^3.0.31",
|
|
"@ai-sdk/google-vertex": "^4.0.80",
|
|
"@ai-sdk/openai": "^3.0.34",
|
|
"@anthropic-ai/claude-agent-sdk": "^0.2.62",
|
|
"@google/genai": "^1.43.0",
|
|
"@larksuiteoapi/node-sdk": "^1.59.0",
|
|
"@lobehub/icons": "^4.6.0",
|
|
"@phosphor-icons/react": "^2.1.10",
|
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
"@streamdown/cjk": "^1.0.1",
|
|
"@streamdown/code": "^1.0.1",
|
|
"@streamdown/math": "^1.0.1",
|
|
"@streamdown/mermaid": "^1.0.1",
|
|
"ai": "^6.0.73",
|
|
"ansi-to-react": "^6.2.6",
|
|
"better-sqlite3": "^12.6.2",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"discord.js": "^14.25.1",
|
|
"electron-updater": "^6.8.3",
|
|
"markdown-it": "^14.1.1",
|
|
"motion": "^12.33.0",
|
|
"nanoid": "^5.1.6",
|
|
"next": "16.1.6",
|
|
"next-themes": "^0.4.6",
|
|
"radix-ui": "^1.4.3",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"react-markdown": "^10.1.0",
|
|
"react-syntax-highlighter": "^16.1.0",
|
|
"recharts": "^3.7.0",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"shiki": "^3.22.0",
|
|
"streamdown": "^2.1.0",
|
|
"tailwind-merge": "^3.4.0",
|
|
"use-stick-to-bottom": "^1.1.2",
|
|
"uuid": "^13.0.0",
|
|
"ws": "^8.19.0",
|
|
"zlib-sync": "^0.1.10"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.58.1",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/markdown-it": "^14.1.2",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
"@types/uuid": "^10.0.0",
|
|
"@types/ws": "^8.18.1",
|
|
"concurrently": "^9.2.1",
|
|
"electron": "^40.2.1",
|
|
"electron-builder": "^26.7.0",
|
|
"esbuild": "^0.27.3",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.1.6",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.3.2",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.21.0",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "^5",
|
|
"wait-on": "^9.0.3"
|
|
}
|
|
}
|