ForcePilot/web/src/utils/mention_icon_utils.js
Wenjie Zhang a5663a8bb2 refactor(web): 文件/文件夹图标统一改用 FileTypeIcon
- 文件预览、工作区文件列表、侧边栏文件树、知识库 FileTable、上传弹窗、
  @mention、附件预览等处统一渲染彩色文件/文件夹图标
- 移除 file_utils 旧的 Ant 单色图标映射与 mention_icon_utils 的 file 分支
- 清理各组件因替换产生的孤儿图标导入;按钮图标保持不变
2026-06-05 01:29:34 +08:00

17 lines
513 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { BookMarked, BookOpen, Bot, Plug } from 'lucide-vue-next'
export const MENTION_ICON_SIZE = 15
export const MENTION_ICON_STROKE_WIDTH = 2.2
// 注意file 类型的图标由 FileTypeIcon 组件直接渲染,此处仅处理其余 mention 类型。
const MENTION_TYPE_ICON_COMPONENTS = {
knowledge: BookOpen,
skill: BookMarked,
mcp: Plug,
subagent: Bot
}
export const getMentionIconComponent = (type) => MENTION_TYPE_ICON_COMPONENTS[type] || Plug
export const getMentionIconStyle = () => null