From 6984a09737353e0579cca2f031337c1a0e481730 Mon Sep 17 00:00:00 2001 From: SuperManTouX <93423476+SuperManTouX@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:23:39 +0800 Subject: [PATCH] =?UTF-8?q?perf(code):=20=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BB=A5=E6=8F=90=E5=8D=87=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7=E4=B8=8E=E4=B8=80=E8=87=B4=E6=80=A7=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC=20[=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=9A=E4=BD=BF=E7=94=A8=20Prettier=20=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=A0=BC=E5=BC=8F=E5=8C=96]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 17 + package.json | 1 + src/App.vue | 447 ++-- src/components/chat/ChatHeader.vue | 1060 ++++----- src/components/chat/ChatMain.vue | 836 +++---- src/components/chat/MessageList.vue | 794 +++--- src/components/chat/WelcomeScreen.vue | 752 +++--- src/components/icons/index.ts | 266 +-- src/components/input/AttachmentPreview.vue | 535 ++--- src/components/input/ChatInput.vue | 1348 ++++++----- src/components/message/CodeBlock.vue | 444 ++-- src/components/message/MessageActions.vue | 640 ++--- src/components/message/MessageBubble.vue | 1676 ++++++------- .../components/EChartsContainerNode.vue | 180 +- src/components/message/components/Loading.vue | 140 +- .../message/components/ThinkingNode.vue | 431 ++-- .../modals/ConversationSettingsModal.vue | 1526 ++++++------ src/components/modals/SearchModal.vue | 740 +++--- src/components/modals/SettingsModal.vue | 2120 ++++++++--------- src/components/modals/ShortcutsModal.vue | 616 ++--- src/components/sidebar/ChatSidebar.vue | 990 ++++---- src/components/sidebar/ConversationItem.vue | 555 +++-- src/components/ui/FormSelect.vue | 484 ++-- src/components/ui/FormSlider.vue | 235 +- src/components/ui/FormSwitch.vue | 162 +- src/composables/useKeyboard.ts | 261 +- src/main.ts | 52 +- src/services/api.ts | 605 ++--- src/stores/chat.ts | 570 ++--- src/stores/settings.ts | 614 ++--- src/style.css | 158 +- src/styles/main.scss | 162 +- src/types/chat.ts | 294 +-- src/utils/helpers.ts | 296 +-- 34 files changed, 10043 insertions(+), 9964 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8b708a..6573518 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "@vue/tsconfig": "^0.8.1", "autoprefixer": "^10.4.24", "postcss": "^8.5.6", + "prettier": "^3.8.1", "sass": "^1.97.3", "tailwindcss": "^4.1.18", "typescript": "~5.9.3", @@ -4363,6 +4364,22 @@ "dev": true, "license": "MIT" }, + "node_modules/prettier": { + "version": "3.8.1", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/property-information": { "version": "7.1.0", "resolved": "https://registry.npmmirror.com/property-information/-/property-information-7.1.0.tgz", diff --git a/package.json b/package.json index 0be05b6..a2b929e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@vue/tsconfig": "^0.8.1", "autoprefixer": "^10.4.24", "postcss": "^8.5.6", + "prettier": "^3.8.1", "sass": "^1.97.3", "tailwindcss": "^4.1.18", "typescript": "~5.9.3", diff --git a/src/App.vue b/src/App.vue index e033c26..c33840c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,225 +1,222 @@ - - - - - \ No newline at end of file + + + + + diff --git a/src/components/chat/ChatHeader.vue b/src/components/chat/ChatHeader.vue index 105001b..8119f81 100644 --- a/src/components/chat/ChatHeader.vue +++ b/src/components/chat/ChatHeader.vue @@ -1,530 +1,530 @@ - - - - - + + + + + diff --git a/src/components/chat/ChatMain.vue b/src/components/chat/ChatMain.vue index 4e197c8..fe7d170 100644 --- a/src/components/chat/ChatMain.vue +++ b/src/components/chat/ChatMain.vue @@ -1,418 +1,418 @@ - - - - - + + + + + diff --git a/src/components/chat/MessageList.vue b/src/components/chat/MessageList.vue index 2645778..05f39b4 100644 --- a/src/components/chat/MessageList.vue +++ b/src/components/chat/MessageList.vue @@ -1,397 +1,397 @@ - - - - - + + + + + diff --git a/src/components/chat/WelcomeScreen.vue b/src/components/chat/WelcomeScreen.vue index 406866a..c70e4a1 100644 --- a/src/components/chat/WelcomeScreen.vue +++ b/src/components/chat/WelcomeScreen.vue @@ -1,374 +1,378 @@ - - - - - \ No newline at end of file + + + + + diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts index b036a06..4c474aa 100644 --- a/src/components/icons/index.ts +++ b/src/components/icons/index.ts @@ -1,133 +1,133 @@ -export { - // 通用图标 - Menu, - X, - Check, - Plus, - Minus, - Search, - Settings, - Info, - AlertCircle, - AlertTriangle, - Loader2, - MoreHorizontal, - MoreVertical, - - // 主题图标 - Moon, - Sun, - Monitor, - - // 用户/角色 - User, - Bot, - Users, - - // 消息/对话 - MessageSquare, - MessageCircle, - MessagesSquare, - Send, - SendHorizontal, - - // 操作图标 - Copy, - Clipboard, - ClipboardCheck, - Edit3, - Pencil, - Trash2, - Download, - Upload, - ExternalLink, - Link, - Share2, - RefreshCw, - RotateCcw, - Brain, - - // 反馈图标 - ThumbsUp, - ThumbsDown, - Heart, - Star, - - // 导航图标 - ChevronLeft, - ChevronRight, - ChevronDown, - ChevronUp, - ArrowLeft, - ArrowRight, - ArrowUp, - ArrowDown, - - // 状态/标记 - Pin, - PinOff, - Archive, - Bookmark, - Flag, - Clock, - Calendar, - History, - - // 文件夹/文件 - Folder, - FolderOpen, - File, - FileText, - FileCode, - FileImage, - Paperclip, - - // 媒体图标 - Image, - Video, - Play, - Pause, - Square, - StopCircle, - Mic, - MicOff, - Volume2, - VolumeX, - Camera, - - // 功能图标 - Sparkles, - Wand2, - Zap, - Globe, - Wifi, - Code, - Terminal, - Keyboard, - Command, - Hash, - AtSign, - Lightbulb, - PenTool, - Palette, - - // 布局图标 - Maximize2, - Minimize2, - Expand, - Shrink, - PanelLeft, - PanelRight, - LayoutGrid, - List, - - // 其他 - HelpCircle, - Eye, - EyeOff, - Lock, - Unlock, - Shield, - Bell, - BellOff, -} from "lucide-vue-next"; +export { + // 通用图标 + Menu, + X, + Check, + Plus, + Minus, + Search, + Settings, + Info, + AlertCircle, + AlertTriangle, + Loader2, + MoreHorizontal, + MoreVertical, + + // 主题图标 + Moon, + Sun, + Monitor, + + // 用户/角色 + User, + Bot, + Users, + + // 消息/对话 + MessageSquare, + MessageCircle, + MessagesSquare, + Send, + SendHorizontal, + + // 操作图标 + Copy, + Clipboard, + ClipboardCheck, + Edit3, + Pencil, + Trash2, + Download, + Upload, + ExternalLink, + Link, + Share2, + RefreshCw, + RotateCcw, + Brain, + + // 反馈图标 + ThumbsUp, + ThumbsDown, + Heart, + Star, + + // 导航图标 + ChevronLeft, + ChevronRight, + ChevronDown, + ChevronUp, + ArrowLeft, + ArrowRight, + ArrowUp, + ArrowDown, + + // 状态/标记 + Pin, + PinOff, + Archive, + Bookmark, + Flag, + Clock, + Calendar, + History, + + // 文件夹/文件 + Folder, + FolderOpen, + File, + FileText, + FileCode, + FileImage, + Paperclip, + + // 媒体图标 + Image, + Video, + Play, + Pause, + Square, + StopCircle, + Mic, + MicOff, + Volume2, + VolumeX, + Camera, + + // 功能图标 + Sparkles, + Wand2, + Zap, + Globe, + Wifi, + Code, + Terminal, + Keyboard, + Command, + Hash, + AtSign, + Lightbulb, + PenTool, + Palette, + + // 布局图标 + Maximize2, + Minimize2, + Expand, + Shrink, + PanelLeft, + PanelRight, + LayoutGrid, + List, + + // 其他 + HelpCircle, + Eye, + EyeOff, + Lock, + Unlock, + Shield, + Bell, + BellOff, +} from "lucide-vue-next"; diff --git a/src/components/input/AttachmentPreview.vue b/src/components/input/AttachmentPreview.vue index 7a689c2..d23f687 100644 --- a/src/components/input/AttachmentPreview.vue +++ b/src/components/input/AttachmentPreview.vue @@ -1,266 +1,269 @@ - - - - - \ No newline at end of file + + + + + diff --git a/src/components/input/ChatInput.vue b/src/components/input/ChatInput.vue index ba2d560..45034bb 100644 --- a/src/components/input/ChatInput.vue +++ b/src/components/input/ChatInput.vue @@ -1,675 +1,673 @@ -