feat: 先进智能体功能上线

- 基于 agent-runtime 打造,默认 ReAct agent
- 支持 agent 能力对接,已对接工作流、插件、知识库等 tool 能力
- 全新 agent 编排界面,支持可视化便捷配置 agent
- 全新 agent 聊天界面,支持快捷操作、额外知识库选择等
This commit is contained in:
2026-05-28 11:29:18 +08:00
parent 11e595b088
commit 1c205c3720
39 changed files with 3546 additions and 217 deletions

View File

@@ -1,19 +1,14 @@
<script setup lang="ts">
import type {AgentCapabilityKind} from '../types';
import {onBeforeUnmount, onMounted, ref} from 'vue';
import {computed, onBeforeUnmount, onMounted, ref} from 'vue';
import {
Connection,
Files,
Loading,
Plus,
Promotion,
Share,
VideoPlay,
} from '@element-plus/icons-vue';
import {Connection, Files, Loading, Plus, Share, VideoPlay,} from '@element-plus/icons-vue';
defineProps<{
const props = defineProps<{
offlineDisabled?: boolean;
offlineLoading?: boolean;
offlineVisible?: boolean;
publishDisabled?: boolean;
publishLoading?: boolean;
publishText: string;
@@ -21,8 +16,11 @@ defineProps<{
tryoutDisabled?: boolean;
}>();
const isRepublish = computed(() => props.publishText === '重新发布');
const emit = defineEmits<{
add: [kind: AgentCapabilityKind];
offline: [];
publish: [];
save: [];
tryout: [];
@@ -120,13 +118,23 @@ onBeforeUnmount(() => {
</button>
<div class="agent-command-bar__divider"></div>
<button
v-if="offlineVisible"
class="agent-command-bar__button agent-command-bar__button--ghost"
type="button"
:disabled="offlineDisabled || offlineLoading || publishLoading"
@click="emit('offline')"
>
<Loading v-if="offlineLoading" class="is-loading" />
<span>下线</span>
</button>
<button
class="agent-command-bar__button agent-command-bar__button--ghost"
:class="{ 'agent-command-bar__button--republish': isRepublish }"
type="button"
:disabled="publishDisabled || publishLoading"
@click="emit('publish')"
>
<Loading v-if="publishLoading" class="is-loading" />
<Promotion v-else />
<span>{{ publishText }}</span>
</button>
</div>
@@ -280,11 +288,21 @@ onBeforeUnmount(() => {
color: var(--el-text-color-secondary);
}
.agent-command-bar__button--republish {
color: var(--el-color-warning);
background: var(--el-color-warning-light-9);
}
.agent-command-bar__button:hover:not(:disabled) {
color: var(--el-text-color-primary);
background: var(--el-fill-color-light);
}
.agent-command-bar__button--republish:hover:not(:disabled) {
color: var(--el-color-warning);
background: var(--el-color-warning-light-8);
}
.agent-command-bar__button--primary:hover:not(:disabled) {
color: var(--el-color-primary);
background: var(--el-color-primary-light-8);