fix: 完成系统向智能体数据链路切换
- 切换工作台、聊天历史、资源候选与公共调用到 Agent - 加固资源绑定、删除保护及发布运行并发控制 - 隔离旧 Bot 专属服务和组件并保留兼容入口
This commit is contained in:
@@ -114,7 +114,7 @@ const trendModeOptions: Array<{ label: string; value: DashboardTrendMode }> = [
|
||||
const emptySummary: DashboardSummary = {
|
||||
activeAssistantTotal: 0,
|
||||
activeUserTotal: 0,
|
||||
botTotal: 0,
|
||||
agentTotal: 0,
|
||||
chatActiveUserTotal: 0,
|
||||
chatMessageTotal: 0,
|
||||
chatSessionTotal: 0,
|
||||
@@ -178,7 +178,7 @@ const summaryCards = computed<SummaryCardItem[]>(() => [
|
||||
chatAvailable.value,
|
||||
),
|
||||
},
|
||||
{ label: '智能体总数', value: formatCount(summary.value.botTotal) },
|
||||
{ label: '智能体总数', value: formatCount(summary.value.agentTotal) },
|
||||
{
|
||||
label: '知识库总数',
|
||||
value: formatCount(summary.value.knowledgeBaseTotal),
|
||||
@@ -330,15 +330,14 @@ async function loadOverview() {
|
||||
async function loadAssistantOptions() {
|
||||
assistantOptionsLoading.value = true;
|
||||
try {
|
||||
const bots = await requestClient.get<
|
||||
Array<{ id?: number | string; title?: string }>
|
||||
>('/api/v1/bot/list', {
|
||||
params: { status: 1 },
|
||||
});
|
||||
const agents =
|
||||
await requestClient.get<Array<{ id?: number | string; name?: string }>>(
|
||||
'/api/v1/agent/options',
|
||||
);
|
||||
const nextOptions: AssistantOptionItem[] = [
|
||||
{ label: '全部智能体', value: '' },
|
||||
...(bots || []).map((item) => ({
|
||||
label: item.title?.trim() || '未命名智能体',
|
||||
...(agents || []).map((item) => ({
|
||||
label: item.name?.trim() || '未命名智能体',
|
||||
value: item.id === undefined || item.id === null ? '' : String(item.id),
|
||||
})),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user