feat: 优化 Chat 页面和 Agents 页面
- 优化 Chat 页面交互和消息显示 - 增强 Agents 页面功能 - 改进 ChatAgentSelector 组件 - 优化 ChatMessage 和 ChatSidebar 组件 - 更新聊天逻辑 useAgents 和 chat 模块 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onUnmounted } from 'vue'
|
||||
import { Play, Pause, Edit, Trash2 } from 'lucide-vue-next'
|
||||
import { useAgents } from './agents/useAgents'
|
||||
import './agents/agents.css'
|
||||
@@ -57,8 +58,13 @@ const {
|
||||
getSkillsDisplayText,
|
||||
toggleSkillSelection,
|
||||
selectAllSkills,
|
||||
statusClass
|
||||
statusClass,
|
||||
cleanup
|
||||
} = useAgents()
|
||||
|
||||
onUnmounted(() => {
|
||||
cleanup()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -162,18 +168,18 @@ const {
|
||||
class="btn-icon"
|
||||
:title="agent.status === 'active' ? 'Deactivate' : 'Activate'"
|
||||
>
|
||||
<Pause v-if="agent.status === 'active'" class="w-4 h-4 text-gray-500 hover:text-yellow-400 transition-colors" />
|
||||
<Play v-else class="w-4 h-4 text-gray-500 hover:text-green-400 transition-colors" />
|
||||
<Pause v-if="agent.status === 'active'" class="w-4 h-4 text-gray-400 hover:text-yellow-400 transition-colors" />
|
||||
<Play v-else class="w-4 h-4 text-gray-400 hover:text-green-400 transition-colors" />
|
||||
</button>
|
||||
<button @click="openEdit(agent)" class="btn-icon" title="Edit">
|
||||
<Edit class="w-4 h-4 text-gray-500 hover:text-white transition-colors" />
|
||||
<Edit class="w-4 h-4 text-gray-400 hover:text-white transition-colors" />
|
||||
</button>
|
||||
<button
|
||||
@click.stop="deleteAgent(agent.id)"
|
||||
class="btn-icon"
|
||||
title="Delete"
|
||||
>
|
||||
<Trash2 class="w-4 h-4 text-gray-500 hover:text-red-400 transition-colors" />
|
||||
<Trash2 class="w-4 h-4 text-gray-400 hover:text-red-500 transition-colors" />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user