chore: 移除未使用的导入和变量

- ChatHeader.vue: 移除未使用的 Download 图标
- MessageList.vue: 移除未使用的 boxRef 变量
- ChatInput.vue: 移除未使用的 AttachmentPreview 组件导入
- MessageBubble.vue: 移除未使用的 Download 图标
- ConversationSettingsModal.vue: 移除未使用的 chatApi 导入
- SettingsModal.vue: 移除未使用的 chatApi 导入
- ChatSidebar.vue: 移除未使用的图标导入和注释代码对应的函数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
肖应宇 2026-03-11 16:21:28 +08:00
parent 0da4e06050
commit 5232b1482f
7 changed files with 2 additions and 30 deletions

View File

@ -90,7 +90,6 @@ import { ref } from "vue";
import { import {
Menu, Menu,
Trash2, Trash2,
Download,
ChevronLeft, ChevronLeft,
ExternalLink, ExternalLink,
Pin, Pin,

View File

@ -1,5 +1,5 @@
<template> <template>
<div ref="boxRef" class="message-list-container"> <div class="message-list-container">
<div ref="containerRef" class="message-list" @scroll="handleScroll"> <div ref="containerRef" class="message-list" @scroll="handleScroll">
<!-- 欢迎界面 --> <!-- 欢迎界面 -->
<WelcomeScreen <WelcomeScreen
@ -103,8 +103,7 @@ const emit = defineEmits<{
const chatStore = useChatStore(); const chatStore = useChatStore();
// //
const boxRef: any = ref<HTMLElement | null>(null); const containerRef = ref<HTMLElement | null>(null);
const containerRef: any = ref<HTMLElement | null>(null);
const showScrollButton = ref(false); const showScrollButton = ref(false);
const newMessageCount = ref(0); const newMessageCount = ref(0);
const isAutoScrolling = ref(true); const isAutoScrolling = ref(true);

View File

@ -162,7 +162,6 @@ import {
Brain, Brain,
Loader2, Loader2,
} from "@/components/icons"; } from "@/components/icons";
import AttachmentPreview from "./AttachmentPreview.vue";
import { generateId } from "@/utils/helpers"; import { generateId } from "@/utils/helpers";
import type { Attachment } from "@/types/chat"; import type { Attachment } from "@/types/chat";
import { chatApi } from "@/services/api"; import { chatApi } from "@/services/api";

View File

@ -195,7 +195,6 @@ import {
Zap, Zap,
Maximize2, Maximize2,
Play, Play,
Download,
} from "@/components/icons"; } from "@/components/icons";
import MessageActions from "./MessageActions.vue"; import MessageActions from "./MessageActions.vue";
import { formatTimestamp, formatFileSize, getFileIcon } from "@/utils/helpers"; import { formatTimestamp, formatFileSize, getFileIcon } from "@/utils/helpers";

View File

@ -200,7 +200,6 @@ import FormSwitch from "@/components/ui/FormSwitch.vue";
import FormSlider from "@/components/ui/FormSlider.vue"; import FormSlider from "@/components/ui/FormSlider.vue";
import FormSelect from "@/components/ui/FormSelect.vue"; import FormSelect from "@/components/ui/FormSelect.vue";
import { MessageSquare, X, Check, Trash2 } from "@/components/icons"; import { MessageSquare, X, Check, Trash2 } from "@/components/icons";
import { chatApi } from "@/services/api.ts";
import type { ConversationSettings } from "@/types/chat"; import type { ConversationSettings } from "@/types/chat";
import { MessageRole, MessageType } from "@/types/chat"; import { MessageRole, MessageType } from "@/types/chat";

View File

@ -400,7 +400,6 @@ import {
RotateCcw, RotateCcw,
} from "@/components/icons"; } from "@/components/icons";
import type { AppSettings } from "@/types/chat"; import type { AppSettings } from "@/types/chat";
import { chatApi } from "@/services/api.ts";
const settingsStore = useSettingsStore(); const settingsStore = useSettingsStore();

View File

@ -154,18 +154,12 @@ import { useSettingsStore } from "@/stores/settings";
import { chatApi } from "@/services/api.ts"; import { chatApi } from "@/services/api.ts";
import ConversationItem from "./ConversationItem.vue"; import ConversationItem from "./ConversationItem.vue";
import { import {
Bot,
Plus, Plus,
Search,
Pin, Pin,
Clock,
MessageSquare, MessageSquare,
Sun, Sun,
Moon, Moon,
Monitor, Monitor,
Keyboard,
Settings,
ChevronLeft,
Sparkles, Sparkles,
ChevronDown, ChevronDown,
Check, Check,
@ -240,26 +234,10 @@ function togglePinConversation(id: string) {
chatStore.togglePinConversation(id); chatStore.togglePinConversation(id);
} }
function toggleSidebar() {
settingsStore.toggleSidebar();
}
function toggleTheme() { function toggleTheme() {
settingsStore.toggleTheme(); settingsStore.toggleTheme();
} }
function openShortcuts() {
settingsStore.openShortcutsModal();
}
function openSettings() {
settingsStore.openSettingsModal();
}
function openSearch() {
settingsStore.openSearchModal();
}
// //
const isResizing = ref(false); const isResizing = ref(false);