feat(agent): add agent template import/export#1691
Open
liulingfeng wants to merge 1 commit into
Open
Conversation
[问题] Agent 配置无法在不同设备或用户之间共享,自定义 Agent 只能手动重建 [根因] Agent 数据仅存储在本地 SQLite,没有序列化/反序列化机制, 也没有对应的导入导出 UI 入口 [修复] - 新增 agentTemplate.ts 工具函数,支持 Agent ↔ JSON 模板互转 - 新增 AgentImportModal 组件,支持从本地文件或远程 URL 导入 - AgentSettingsPanel 底部新增「导出 Agent」按钮,点击下载 .agent.json 文件 - AgentsView 自定义 Agent 区域新增「导入 Agent」入口 - agentService 新增 getAgent() 方法,通过 IPC 获取完整 Agent 数据(含 systemPrompt/identity) - 同名 Agent 拒绝导入并给出明确提示,不自动创建副本 - 新增中英文 i18n key(agentExport/agentImport 系列,共 12 个) [复现路径] 1. 进入「我的 Agent」→ 自定义 Agent → 打开任意 Agent 设置 2. 点击底部「导出 Agent」→ 下载 .agent.json 文件 3. 点击自定义区域右上角「导入 Agent」→ 上传刚下载的文件 4. 验证:同名时弹出错误提示,不会重复创建
|
This pull request has been inactive for 30 days. It will be automatically closed in 14 days unless there is new activity. If you're still working on this, please leave a comment or push new commits to keep it open. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[问题]
Agent 配置无法在不同设备或用户之间共享,自定义 Agent 只能手动重建
[根因]
Agent 数据仅存储在本地 SQLite,没有序列化/反序列化机制,
也没有对应的导入导出 UI 入口
[修复]
[复现路径]