diff --git a/desktop/src/renderer/src/i18n.ts b/desktop/src/renderer/src/i18n.ts index 3daf95f9..aa8ca094 100644 --- a/desktop/src/renderer/src/i18n.ts +++ b/desktop/src/renderer/src/i18n.ts @@ -142,7 +142,7 @@ const translations: Record> = { example_task_title: '定时任务', example_task_text: '1分钟后提醒我检查服务器', example_code_title: '编程助手', - example_code_text: '搜索AI资讯并生成可视化网页报告', + example_code_text: '搜索AI资讯生成可视化网页报告', example_knowledge_title: '知识库', example_knowledge_text: '查看知识库当前文档情况', example_skill_title: '技能系统', diff --git a/desktop/src/renderer/src/pages/ChatPage.tsx b/desktop/src/renderer/src/pages/ChatPage.tsx index df3d0c19..837e5138 100644 --- a/desktop/src/renderer/src/pages/ChatPage.tsx +++ b/desktop/src/renderer/src/pages/ChatPage.tsx @@ -1,5 +1,15 @@ import React, { useEffect, useRef, useCallback, useState } from 'react' -import { ChevronUp, Loader2 } from 'lucide-react' +import { + ChevronUp, + Loader2, + FolderOpen, + Clock, + Code2, + BookOpen, + Puzzle, + Terminal, + type LucideIcon, +} from 'lucide-react' import MessageBubble from '../components/MessageBubble' import ChatInput, { type ChatInputHandle } from '../components/ChatInput' import { t } from '../i18n' @@ -15,13 +25,20 @@ interface ChatPageProps { // Welcome-screen suggestion cards (aligned with the web console: 6 cards). // `send` overrides the text dropped into the input (e.g. show "查看全部命令" // but fill "/help"); otherwise the card's *_text is used. -const SUGGESTIONS: { key: string; send?: string }[] = [ - { key: 'example_sys' }, - { key: 'example_task' }, - { key: 'example_code' }, - { key: 'example_knowledge' }, - { key: 'example_skill' }, - { key: 'example_web', send: '/help' }, +// Icon + accent color per card, aligned with the web console palette. +const SUGGESTIONS: { + key: string + send?: string + icon: LucideIcon + iconClass: string + bgClass: string +}[] = [ + { key: 'example_sys', icon: FolderOpen, iconClass: 'text-blue-500', bgClass: 'bg-blue-500/10' }, + { key: 'example_task', icon: Clock, iconClass: 'text-amber-500', bgClass: 'bg-amber-500/10' }, + { key: 'example_code', icon: Code2, iconClass: 'text-emerald-500', bgClass: 'bg-emerald-500/10' }, + { key: 'example_knowledge', icon: BookOpen, iconClass: 'text-violet-500', bgClass: 'bg-violet-500/10' }, + { key: 'example_skill', icon: Puzzle, iconClass: 'text-rose-500', bgClass: 'bg-rose-500/10' }, + { key: 'example_web', send: '/help', icon: Terminal, iconClass: 'text-content-tertiary', bgClass: 'bg-content-tertiary/10' }, ] const ChatPage: React.FC = ({ baseUrl }) => { @@ -228,7 +245,7 @@ const ChatPage: React.FC = ({ baseUrl }) => {

{t('chat_empty_hint')}

- {SUGGESTIONS.map(({ key, send }) => ( + {SUGGESTIONS.map(({ key, send, icon: Icon, iconClass, bgClass }) => (