diff --git a/README.en.md b/README.en.md index 6fbe957..5ecdc46 100644 --- a/README.en.md +++ b/README.en.md @@ -11,44 +11,68 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) ![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Windows-informational) [![Release](https://img.shields.io/github/v/release/Code-MonkeyZhang/persona-agent?include_prereleases)](https://github.com/Code-MonkeyZhang/persona-agent/releases) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) + +**An open-source personal AI companion you can fully customize** + +[📥 Download](https://github.com/Code-MonkeyZhang/persona-agent/releases) · [🐛 Report a Bug](https://github.com/Code-MonkeyZhang/persona-agent/issues) · [🛒 Agent Marketplace](https://github.com/Code-MonkeyZhang/persona-agent-marketplace) +--- + Persona is an open-source personal AI Agent chat platform that lets you give your agents custom personality, voice, and portraits. Install agents, MCP tools, and Skills from the Agent Marketplace in one click. -## 📷 Preview +## 📷 Screenshots - - + + + + + + + + + + + + + +
💬 A clean chat interface with a familiar messaging-app feel🌸 Switch to the portrait view anytime, expressions follow the mood
🛒 One-click install of AI characters, skills, and tools from the built-in marketplace🎨 Open the Agent editor anytime to customize portraits, voice, and prompts
## ✨ Key Features -- **Multi-Agent Management** — Create multiple independent Agents with character settings, model configuration, MCP tools, Agent Skills, and conversation history -- **17 LLM Providers** — DeepSeek, MiniMax, Zhipu, Kimi, Moonshot, OpenAI, Anthropic, Google, OpenRouter, and more -- **Custom Agent Portraits** — Add custom character portraits and backgrounds. Agents automatically switch expressions based on conversation context -- **Voice Synthesis** — TTS voice synthesis powered by MiniMax API -- **MCP & Agent Skills** — Configure custom MCP tools and Agent Skills for each Agent, including OAuth-based MCP services (Notion, GitHub) -- **Agent Apps** — Install dedicated mini-apps for your Agent, interact via the app panel and receive app notifications -- **Remote Access** — Built-in Cloudflare Tunnel for connecting from the mobile app -## 📢 News +- **Long-Term Memory** — Conversations are summarized automatically and consolidated into long-term memory on a schedule, so agents remember you across sessions +- **Custom Character Portraits** — Assign character portraits and conversation backgrounds; agents switch expressions based on conversation mood +- **Custom Voice** — TTS replies powered by MiniMax, with preset voices and custom voice cloning from recordings +- **MCP & Agent Skills** — Assign MCP tools and Agent Skills to each agent individually, including OAuth-based MCP services (Notion, GitHub) +- **Agent Apps** — Install dedicated mini-apps for your Agent, interact via the app panel and receive app notifications +- **Mobile Remote Access** — Built-in Cloudflare Tunnel for connecting to your agent from the mobile app anytime + +## 📢 Changelog +- 2026-09-23 — **v1.10.1**: app-wide visual refresh, collapsible session sidebar with animation and width memory, cloned voice renaming, permanently active input box. +- 2026-09-19 — **v1.10.0**: global Inter font and unified type scale, per-turn assistant message bubbles, redesigned provider config panel, edge-fade scroll indicators. +- 2026-09-09 — **v1.9.2**: desktop logs persisted to the user data directory for easier troubleshooting. +- 2026-09-08 — **v1.9.1**: interjections while generating, draggable session sidebar width, project adopted the MIT License. +- 2026-08-29 — **v1.9.0**: first-launch setup wizard with a preinstalled starter Agent, GLM-5.3-Flash and GLM-5.3-Highspeed model support. - 2026-08-24 — **v1.8.0**: official brand icons for providers and models, bilingual voice preview texts, unified marketplace card heights. - 2026-08-19 — **v1.7.1**: automatic retry on transient LLM connection errors, automatic fallback for invalid workspaces, message previews in the session list, GLM-5.3 support. - 2026-08-17 — **v1.7.0**: Agent Apps — a new App tab in the marketplace for one-click install of mini-apps, with an app panel and app notifications. - 2026-07-23 — **v1.6.5**: in-app update checker, macOS code signing and notarization, companion panel rebuilt as a sliding pane, abort generation support. -- 2026-07-19 — **v1.6.4**: Intel Mac support, QR scan-to-pair remote connection, Kimi K3 support, cross-fade pose transitions, redesigned thought-process timeline. -- 2026-07-04 — **v1.6.0**: merged multi-step thinking, persistent API error messages, Git Bash on Windows, one-click uv runtime download, optimistic chat loading. -- 2026-06-28 — **v1.5.0**: new Agent Marketplace for browsing and installing skills & MCP tools; unified HTTP error handling; design system rollout. -- 2026-06-23 — **v1.4.0**: redesigned desktop UI (TitleBar + dual sidebars), agent chat with multi-session management, dedicated skill/tool assignment views.
Earlier news +- 2026-07-19 — **v1.6.4**: Intel Mac support, QR scan-to-pair remote connection, Kimi K3 support, cross-fade pose transitions, redesigned thought-process timeline. +- 2026-07-04 — **v1.6.0**: merged multi-step thinking, persistent API error messages, Git Bash on Windows, one-click uv runtime download, optimistic chat loading. +- 2026-06-28 — **v1.5.0**: new Agent Marketplace for browsing and installing skills & MCP tools; unified HTTP error handling; design system rollout. +- 2026-06-23 — **v1.4.0**: redesigned desktop UI (TitleBar + dual sidebars), agent chat with multi-session management, dedicated skill/tool assignment views. - 2026-06-04 — **v1.2.3**: fixed message leaking and cross-session voice playback on session switch; improved skill path resolution and system prompt editing. - 2026-05-24 — **v1.2.1**: Windows platform support, bilingual (CN/EN) UI. - 2026-05-20 — **v1.2.0**: agent portrait & background management, companion panel animations and window drag-region fixes. @@ -66,11 +90,11 @@ Install agents, MCP tools, and Skills from the Agent Marketplace in one click. This project supports macOS and Windows. Download the installer from [GitHub Releases](https://github.com/Code-MonkeyZhang/persona-agent/releases): -| Platform | File | -| ------------------- | --------------------------------- | -| macOS Apple Silicon | `Persona-mac-arm64-{version}.dmg` | -| macOS Intel | `Persona-mac-x64-{version}.dmg` | -| Windows x64 | `Persona-win-x64-{version}.exe` | +| Platform | Download | +| ------------------- | ---------------------------------------------------------------------------------------------------------------- | +| macOS Apple Silicon | [Download installer](https://github.com/Code-MonkeyZhang/persona-agent/releases) | +| macOS Intel | [Download installer](https://github.com/Code-MonkeyZhang/persona-agent/releases) | +| Windows x64 | [Download installer](https://github.com/Code-MonkeyZhang/persona-agent/releases) | Open the DMG file and drag the app to Applications; on Windows, run the exe installer and follow the prompts. diff --git a/README.md b/README.md index 5f3e5cf..a5d3af9 100644 --- a/README.md +++ b/README.md @@ -11,42 +11,67 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) ![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Windows-informational) [![Release](https://img.shields.io/github/v/release/Code-MonkeyZhang/persona-agent?include_prereleases)](https://github.com/Code-MonkeyZhang/persona-agent/releases) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) + +**一个完全可自定义的开源个人 AI 陪伴助手** + +[📥 下载最新版本](https://github.com/Code-MonkeyZhang/persona-agent/releases) · [🐛 报告 Bug](https://github.com/Code-MonkeyZhang/persona-agent/issues) · [🛒 Agent 商城](https://github.com/Code-MonkeyZhang/persona-agent-marketplace) +--- + Persona-agent 是一个开源的个人 AI Agent 聊天平台,让你能够完全自定义属于自己的 AI Agent,包括性格、声音和立绘形象,还支持从 Agent 商城一键安装 Agent、MCP 工具和 Skill。Persona-agent 期望创建一个适配LLM时代的人机关系的应用平台 -## 📷 预览 +## 📷 实机画面展示 - - + + + + + + + + + + + + + +
💬 清新的对话界面,模拟正常聊天App的体验🌸 随时切换到立绘界面,表情会按照对话情绪切换
🛒 从内置商城一键安装AI角色以及技能和工具🎨 随时进入Agent编辑器,从立绘、声线到提示词完全自定义
## ✨ 核心功能 -- **多 Agent 管理** — 创建多个独立 Agent, 角色设定、模型配置MCP、Agent Skill以及会话历史 -- **支持 17 家 LLM 供应商** — DeepSeek、MiniMax、智谱、Kimi、月之暗面、OpenAI、Anthropic、Google、OpenRouter 等多供应商支持 -- **自定义 Agent 形象界面** — 支持自定义Agent的角色立绘和背景,Agent 会根据对话自动切换表情 -- **自定义 Agent 语音朗读** - 支持Minimax TTS API的语音合成回复 -- **支持 MCP 与 Agent Skill** — 支持自定义给每个Agent自定义MCP工具和Agent Skill,同时支持需要OAuth的MCP服务 (Notion, Github) + +- **长期记忆** — 会话自动总结,Agent 定期整理进长期记忆,跨会话记住你的偏好与正在做的事 +- **自定义角色立绘** — 为 Agent 配置角色立绘与对话背景,Agent 根据对话情绪自动切换表情 +- **自定义语音** — MiniMax TTS 驱动的语音合成回复,支持预设音色与录音克隆 +- **MCP 与 Agent Skill** — 为每个 Agent 单独分配 MCP 工具与 Agent Skill,支持需要 OAuth 的 MCP 服务(Notion、GitHub) - **Agent App** — 为 Agent 安装专属小应用,通过应用面板交互并接收应用通知 -- **远程访问** — 内置 Cloudflare Tunnel,可以通过移动端App远程连接Agent +- **手机端远程访问** — 内置 Cloudflare Tunnel,移动端 App 可随时远程连接 Agent -## 📢 News +## 📢 更新日志 + +- 2026-09-23 — **v1.10.1**:全应用界面视觉升级、会话侧栏收合动画与宽度记忆、克隆音色重命名、输入框常驻激活态。 +- 2026-09-19 — **v1.10.0**:全局 Inter 字体与统一字号体系、对话按轮次气泡重组、供应商配置面板重设计、边缘渐隐滚动提示。 +- 2026-09-09 — **v1.9.2**:桌面端运行日志持久化到用户数据目录,问题排查有据可查。 +- 2026-09-08 — **v1.9.1**:生成中插话、会话侧边栏宽度拖拽调整、项目采用 MIT License 开源。 +- 2026-08-29 — **v1.9.0**:首次启动设置向导与预置初始 Agent、GLM-5.3-Flash 与 GLM-5.3-Highspeed 模型支持。 - 2026-08-24 — **v1.8.0**:供应商与模型官方品牌图标、语音试听文案中英双语、商城卡片高度统一。 - 2026-08-19 — **v1.7.1**:LLM 瞬时断连自动重试、无效工作空间自动回退、会话列表消息预览、GLM-5.3 支持。 - 2026-08-17 — **v1.7.0**:Agent App 体系上线 — 商城新增 App 标签页,一键安装专属小应用,支持应用面板交互与通知。 - 2026-07-23 — **v1.6.5**:应用内检查更新、macOS 安装包签名与公证、陪伴面板重构为滑出式、支持中止生成。 -- 2026-07-19 — **v1.6.4**:Intel Mac 支持、扫码配对远程连接、Kimi K3 支持、立绘切换过渡动画、思考过程时间线重设计。 -- 2026-07-04 — **v1.6.0**:思考过程合并展示、API 错误提示随会话持久化、Windows 端改用 Git Bash、uv 运行时一键下载、聊天乐观加载。 -- 2026-06-28 — **v1.5.0**:新增 Agent 市场,应用内集中浏览和安装技能与 MCP 工具;统一 HTTP 错误处理;设计系统落地。 -- 2026-06-23 — **v1.4.0**:全新桌面端 UI(TitleBar + 双侧边栏)、Agent 聊天与多会话管理、技能/工具独立分配视图。
Earlier news +- 2026-07-19 — **v1.6.4**:Intel Mac 支持、扫码配对远程连接、Kimi K3 支持、立绘切换过渡动画、思考过程时间线重设计。 +- 2026-07-04 — **v1.6.0**:思考过程合并展示、API 错误提示随会话持久化、Windows 端改用 Git Bash、uv 运行时一键下载、聊天乐观加载。 +- 2026-06-28 — **v1.5.0**:新增 Agent 市场,应用内集中浏览和安装技能与 MCP 工具;统一 HTTP 错误处理;设计系统落地。 +- 2026-06-23 — **v1.4.0**:全新桌面端 UI(TitleBar + 双侧边栏)、Agent 聊天与多会话管理、技能/工具独立分配视图。 - 2026-06-04 — **v1.2.3**:修复会话切换时消息泄漏与跨会话语音播放,改进 Skill 路径解析与系统提示词编辑体验。 - 2026-05-24 — **v1.2.1**:Windows 平台支持、中英文双语界面。 - 2026-05-20 — **v1.2.0**:Agent 立绘与背景图管理、陪伴面板动画与窗口拖拽区域全面修复。 @@ -62,13 +87,13 @@ Persona-agent 是一个开源的个人 AI Agent 聊天平台,让你能够完 ## 🚀 快速开始 -本项目支持 macOS 和 Windows 平台. 前往 [GitHub Releases](https://github.com/Code-MonkeyZhang/persona-agent/releases) 下载对应平台的安装包: +本项目支持 macOS 和 Windows 平台。前往 [GitHub Releases](https://github.com/Code-MonkeyZhang/persona-agent/releases) 下载对应平台的安装包: -| 平台 | 文件 | -| ------------------- | --------------------------------- | -| macOS Apple Silicon | `Persona-mac-arm64-{version}.dmg` | -| macOS Intel | `Persona-mac-x64-{version}.dmg` | -| Windows x64 | `Persona-win-x64-{version}.exe` | +| 平台 | 下载 | +| ------------------- | ----------------------------------------------------------------------- | +| macOS Apple Silicon | [下载安装包](https://github.com/Code-MonkeyZhang/persona-agent/releases) | +| macOS Intel | [下载安装包](https://github.com/Code-MonkeyZhang/persona-agent/releases) | +| Windows x64 | [下载安装包](https://github.com/Code-MonkeyZhang/persona-agent/releases) | macOS 打开 DMG 拖入 Applications 即可;Windows 运行 exe 安装程序按提示完成安装。 diff --git a/assets/preview-agent-editor.jpg b/assets/preview-agent-editor.jpg new file mode 100644 index 0000000..3945a5d Binary files /dev/null and b/assets/preview-agent-editor.jpg differ diff --git a/assets/preview-chat.jpg b/assets/preview-chat.jpg new file mode 100644 index 0000000..de8af06 Binary files /dev/null and b/assets/preview-chat.jpg differ diff --git a/assets/preview-companion.jpg b/assets/preview-companion.jpg new file mode 100644 index 0000000..9b4426a Binary files /dev/null and b/assets/preview-companion.jpg differ diff --git a/assets/preview-marketplace.jpg b/assets/preview-marketplace.jpg new file mode 100644 index 0000000..03f430d Binary files /dev/null and b/assets/preview-marketplace.jpg differ diff --git a/package.json b/package.json index 083acb1..805dc95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "persona-agent", - "version": "1.10.0", + "version": "1.10.1", "private": true, "license": "MIT", "workspaces": [ diff --git a/packages/desktop/package.json b/packages/desktop/package.json index f0299ec..711d21b 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,6 +1,6 @@ { "name": "persona-agent-desktop", - "version": "1.10.0", + "version": "1.10.1", "description": "Persona Desktop - Electron GUI for Persona", "type": "module", "main": "./out/main/index.js", diff --git a/packages/desktop/src/renderer/App.tsx b/packages/desktop/src/renderer/App.tsx index 3eb5124..b199caa 100644 --- a/packages/desktop/src/renderer/App.tsx +++ b/packages/desktop/src/renderer/App.tsx @@ -44,7 +44,12 @@ import { CompanionReplyBubble } from './components/companion/CompanionReplyBubbl import { AppIconBar } from './components/shell/AppIconBar'; import { AppWebViewPanel } from './components/AppWebViewPanel'; import { LandingWizard } from './components/landing/LandingWizard'; -import { Group, Panel, Separator, useGroupRef } from 'react-resizable-panels'; +import { + Group, + Panel, + ResizeSeparator, + usePanelRef, +} from './components/common/resizable'; import { ToastContainer } from './components/Toast'; import { WebSocketProvider } from './components/WebSocketProvider'; import { useChatStore } from './stores/chatStore'; @@ -56,8 +61,15 @@ import { useViewStore } from './stores/viewStore'; import { useTunnelStore } from './stores/tunnelStore'; import { useAppPanelStore } from './stores/appPanelStore'; import { logger } from './lib/logger'; +import { cn } from './lib/utils'; import { getSeedStatus } from './lib/api'; +/** + * 侧栏收合展开过渡的收尾延时,毫秒。 + * 比 animations.css 里 220ms 的 flex-grow 过渡略长,动画结束后再摘除过渡类。 + */ +const PANEL_COLLAPSE_TRANSITION_MS = 280; + /** * 主聊天界面组件,整合所有子组件并管理核心交互逻辑 */ @@ -73,12 +85,16 @@ function AppContent() { ); const sessionSidebarWidth = useViewStore((s) => s.sessionSidebarWidth); const setSessionSidebarWidth = useViewStore((s) => s.setSessionSidebarWidth); + const setSessionSidebarCollapsed = useViewStore( + (s) => s.setSessionSidebarCollapsed + ); /** - * 拖拽侧边栏 Separator 时同步宽度到 viewStore,由 zustand persist 持久化。 + * 拖拽侧边栏分隔条时同步宽度到 viewStore,由 zustand persist 持久化。 * 仅在用户实际操作后写入,避免初次挂载时把 Group 的 defaultLayout 又写回 store。 - * `LayoutChangedMeta.isUserInteraction === true` 时表示 Separator 拖拽 / 键盘调整; - * 初挂载、约束重算、defaultSize 应用等都视为 false,不回写。 + * `LayoutChangedMeta.isUserInteraction === true` 时表示分隔条拖拽与键盘调整; + * 初挂载、约束重算、defaultSize 应用、程序化收合展开都视为 false,不回写。 + * 拖到极限触发库自动收起时宽度归零,此时只同步收起态,零宽度不落盘。 */ const handleLayoutChanged = useCallback( ( @@ -87,39 +103,51 @@ function AppContent() { ) => { if (!meta.isUserInteraction) return; const next = layout['session-sidebar']; - if (typeof next === 'number' && next !== sessionSidebarWidth) { + if (typeof next !== 'number') return; + if (next <= 0.5) { + setSessionSidebarCollapsed(true); + return; + } + if (next !== sessionSidebarWidth) { setSessionSidebarWidth(next); } }, - [sessionSidebarWidth, setSessionSidebarWidth] + [sessionSidebarWidth, setSessionSidebarWidth, setSessionSidebarCollapsed] ); /** - * 折叠时不让 session-sidebar 占宽度:折叠瞬间通过 imperative API 把它的尺寸 - * 收回 0%,避免展开时按 persisted 值跳跃。展开后由 Panel 的 defaultSize - * (同样来自 store)自动应用回持久化宽度。 + * 会话侧栏走库的 collapsible 通道:Panel 常驻挂载,收起靠 collapse() 归零, + * 展开靠 expand() 恢复最近一次拖拽宽度。程序化收合展开期间给 Group 挂过渡类, + * flex-grow 由 CSS 缓动补间;手动拖拽不经过这里,保持零延迟跟手。 + * 首次挂载按持久化状态直接就位,不播动画。 */ - const groupRef = useGroupRef(); + const sessionPanelRef = usePanelRef(); + const [panelsAnimating, setPanelsAnimating] = useState(false); + const panelAnimationTimerRef = useRef(undefined); + const sessionPanelMountedRef = useRef(false); - useEffect(() => { - const api = groupRef.current; - if (!api) return; - const layout = api.getLayout(); + useLayoutEffect(() => { + const panel = sessionPanelRef.current; + if (!panel) return; + if (!sessionPanelMountedRef.current) { + sessionPanelMountedRef.current = true; + if (sessionSidebarCollapsed) panel.collapse(); + return; + } + if (sessionSidebarCollapsed === panel.isCollapsed()) return; + setPanelsAnimating(true); if (sessionSidebarCollapsed) { - if (typeof layout['session-sidebar'] === 'number') { - api.setLayout({ ...layout, 'session-sidebar': 0 }); - } - } else if ( - typeof layout['session-sidebar'] === 'number' && - Math.abs(layout['session-sidebar'] - sessionSidebarWidth) > 0.5 - ) { - // 折叠后再展开,Group 自留的 0% 需要手动写回持久化值 - api.setLayout({ - ...layout, - 'session-sidebar': sessionSidebarWidth, - }); + panel.collapse(); + } else { + panel.expand(); } - }, [sessionSidebarCollapsed, sessionSidebarWidth, groupRef]); + window.clearTimeout(panelAnimationTimerRef.current); + panelAnimationTimerRef.current = window.setTimeout( + () => setPanelsAnimating(false), + PANEL_COLLAPSE_TRANSITION_MS + ); + return () => window.clearTimeout(panelAnimationTimerRef.current); + }, [sessionSidebarCollapsed, sessionPanelRef]); const pendingProviderRef = useRef(); const messageListRef = useRef(null); @@ -475,24 +503,24 @@ function AppContent() { ) : ( <> - {!sessionSidebarCollapsed && ( - <> - - - - - - )} + + + + {!sessionSidebarCollapsed && }
{activeNav === 'chat' && ( @@ -574,7 +602,7 @@ function AppContent() { {!panelCollapsed && selectedApp && ( <> - + diff --git a/packages/desktop/src/renderer/assets/styles/animations.css b/packages/desktop/src/renderer/assets/styles/animations.css index eb36f89..9613f77 100644 --- a/packages/desktop/src/renderer/assets/styles/animations.css +++ b/packages/desktop/src/renderer/assets/styles/animations.css @@ -2,6 +2,13 @@ Animations ============================================ */ +/* 侧栏收合展开的程序化过渡:手动拖拽不挂此类,保持零延迟跟手 */ +.panels-animating [data-panel] { + transition: + flex-grow 220ms cubic-bezier(0.4, 0, 0.2, 1), + flex-shrink 220ms cubic-bezier(0.4, 0, 0.2, 1); +} + @keyframes slide-down { from { opacity: 0; diff --git a/packages/desktop/src/renderer/assets/styles/index.css b/packages/desktop/src/renderer/assets/styles/index.css index 4650a51..5adb885 100644 --- a/packages/desktop/src/renderer/assets/styles/index.css +++ b/packages/desktop/src/renderer/assets/styles/index.css @@ -8,3 +8,4 @@ @import './markdown.css'; @import './code-block.css'; @import './scrollbar.css'; +@import './settings-nav.css'; diff --git a/packages/desktop/src/renderer/assets/styles/settings-nav.css b/packages/desktop/src/renderer/assets/styles/settings-nav.css new file mode 100644 index 0000000..c091dd7 --- /dev/null +++ b/packages/desktop/src/renderer/assets/styles/settings-nav.css @@ -0,0 +1,11 @@ +/* 文件职责:设置页左侧导航的分隔线显隐规则。 */ + +.settings-item:hover > .settings-separator, +.settings-item[data-selected] > .settings-separator { + opacity: 0; +} + +.settings-item:hover + .settings-item > .settings-separator, +.settings-item[data-selected] + .settings-item > .settings-separator { + opacity: 0; +} diff --git a/packages/desktop/src/renderer/assets/styles/theme.css b/packages/desktop/src/renderer/assets/styles/theme.css index 208075b..2f0109d 100644 --- a/packages/desktop/src/renderer/assets/styles/theme.css +++ b/packages/desktop/src/renderer/assets/styles/theme.css @@ -13,7 +13,7 @@ --card-foreground: 222.2 84% 4.9%; --popover: 0 0% 100%; --popover-foreground: 222.2 84% 4.9%; - --primary: 208 80% 52%; + --primary: 212 72% 52%; --primary-foreground: 210 40% 98%; --secondary: 0 0% 96.1%; --secondary-foreground: 0 0% 9%; @@ -25,13 +25,17 @@ --destructive-foreground: 0 0% 98%; --border: 0 0% 91%; --input: 0 0% 91%; - --ring: 208 80% 52%; + --ring: 212 72% 52%; --radius: 0.75rem; --general-bg: 0 0% 96.9%; --placeholder: 0 0% 80%; --card-bg: 0 0% 98%; --card-border: 0 0% 93.3%; + /* 浮层阴影。soft 用于卡片轻投影,pop 用于弹层大范围柔投影。 */ + --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02); + --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05); + /* 字体族。Inter 覆盖西文字形与数字,中文字形由系统栈兜底。 */ --font-family-sans: 'Inter', -apple-system, 'Segoe UI', 'Roboto', sans-serif; --font-family-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace; diff --git a/packages/desktop/src/renderer/components/Toast.tsx b/packages/desktop/src/renderer/components/Toast.tsx index 8e54c76..3080357 100644 --- a/packages/desktop/src/renderer/components/Toast.tsx +++ b/packages/desktop/src/renderer/components/Toast.tsx @@ -40,10 +40,10 @@ const ToastItem: React.FC<{ )} > {iconMap[type]} - {message} + {message} diff --git a/packages/desktop/src/renderer/components/agent-editor/AgentEditor.tsx b/packages/desktop/src/renderer/components/agent-editor/AgentEditor.tsx index 2817fff..e96e02b 100644 --- a/packages/desktop/src/renderer/components/agent-editor/AgentEditor.tsx +++ b/packages/desktop/src/renderer/components/agent-editor/AgentEditor.tsx @@ -414,7 +414,7 @@ export const AgentEditor: React.FC = ({
-

+

{editingAgentId ? t('agentEditor.editAgent') : t('agentEditor.addAgent')} diff --git a/packages/desktop/src/renderer/components/agent-editor/AppearanceCard.tsx b/packages/desktop/src/renderer/components/agent-editor/AppearanceCard.tsx index 6da0102..062df21 100644 --- a/packages/desktop/src/renderer/components/agent-editor/AppearanceCard.tsx +++ b/packages/desktop/src/renderer/components/agent-editor/AppearanceCard.tsx @@ -6,7 +6,6 @@ import React, { useState } from 'react'; import { VenetianMask } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { SettingDivider } from '../common/SettingRow'; import { HoverDeleteButton } from '../ui/HoverDeleteButton'; import { ImagePreviewOverlay } from '../ui/ImagePreviewOverlay'; import { ImageAddTile } from '../ui/ImageAddTile'; @@ -47,55 +46,59 @@ export const AppearanceCard: React.FC = ({ return ( - - - - +
+
+ + +
- - {bgPreviewUrl ? ( -
-
setBgPreviewOpen(true)} - > - -
- + - {bgPreviewOpen && ( - setBgPreviewOpen(false)} - /> + {bgPreviewUrl ? ( +
+
setBgPreviewOpen(true)} + > + +
+ + {bgPreviewOpen && ( + setBgPreviewOpen(false)} + /> + )} +
+ ) : ( + )}
- ) : ( - - )} +
); }; diff --git a/packages/desktop/src/renderer/components/agent-editor/ChatConfigCard.tsx b/packages/desktop/src/renderer/components/agent-editor/ChatConfigCard.tsx index 40f4922..617ffdd 100644 --- a/packages/desktop/src/renderer/components/agent-editor/ChatConfigCard.tsx +++ b/packages/desktop/src/renderer/components/agent-editor/ChatConfigCard.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { MessageSquare } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { SettingRow, SettingDivider } from '../common/SettingRow'; +import { SettingRow } from '../common/SettingRow'; import { Card } from '../ui/Card'; import { NumberInput } from './NumberInput'; @@ -28,28 +28,29 @@ export const ChatConfigCard: React.FC = ({ return ( - - - - - - - +
+ + + + + + +
); }; diff --git a/packages/desktop/src/renderer/components/agent-editor/ModelConfigCard.tsx b/packages/desktop/src/renderer/components/agent-editor/ModelConfigCard.tsx index 55825ee..7ed4587 100644 --- a/packages/desktop/src/renderer/components/agent-editor/ModelConfigCard.tsx +++ b/packages/desktop/src/renderer/components/agent-editor/ModelConfigCard.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { Brain } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { ModelSelector } from '../common/ModelSelector'; -import { SettingRow, SettingDivider } from '../common/SettingRow'; +import { SettingRow } from '../common/SettingRow'; import { LabelWithTooltip } from '../common/LabelWithTooltip'; import { Card } from '../ui/Card'; import { NumberInput } from './NumberInput'; @@ -41,44 +41,44 @@ export const ModelConfigCard: React.FC = ({ return ( - - - - - - - - -
- -