feat: 更新前端页面和agent应用

- Agents.vue: 更新agent列表和创建功能
- Skill.vue: 更新skill页面
- skill.ts: 更新skill编辑逻辑
- agent/app/main.py: 更新agent应用

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 17:17:08 +08:00
parent 7795685f43
commit 19f5c79d58
4 changed files with 234 additions and 35 deletions

View File

@@ -348,12 +348,20 @@ Example 1:
}
}
// 关闭编辑第二步弹窗
const closeEditStep2 = () => {
// 返回编辑第一步
const goBackToEditStep1 = () => {
isEditingStep2.value = false
isEditing.value = true
}
// 关闭编辑第二步弹窗(完全关闭)
const closeEditStep2 = () => {
isEditingStep2.value = false
isEditing.value = false
editingSkill.value = null
editSkillContent.value = ''
}
// 切换状态
const toggleStatus = async (skill: Skill) => {
const newStatus = skill.status === 'active' ? 'inactive' : 'active'
@@ -444,11 +452,14 @@ Example 1:
const file = input.files[0]
importFile.value = file
importFileName.value = file.name
// 获取纯文件名,去除路径
const fileName = file.name.split(/[/\\]/).pop()?.replace('.md', '') || 'untitled'
importFileName.value = fileName
try {
const content = await file.text()
const { skillName, skillDesc } = parseSkillContent(content, file.name.replace('.md', ''))
const { skillName, skillDesc } = parseSkillContent(content, fileName)
importSkillName.value = skillName
importSkillDesc.value = skillDesc
@@ -577,6 +588,7 @@ Example 1:
openEdit,
closeEdit,
goToEditStep2,
goBackToEditStep1,
saveEditStep2,
closeEditStep2,
toggleStatus,