feat(agent): 新增智能体应用功能

- 添加智能体列表页面和相关API
- 实现聊天功能,包括历史对话和当前对话
- 新增工作流功能,包括表单提交和结果展示- 优化路由配置,增加智能体相关路由
- 添加全局常量和枚举,用于智能体类型区分
This commit is contained in:
林志军
2025-07-15 15:16:03 +08:00
parent c4b074b775
commit 616665d219
20 changed files with 869 additions and 28 deletions

View File

@ -1,12 +1,13 @@
<template>
<a-layout-sider width="250" style="background: #fff">
<div class="logo" style="text-align: center; padding: 20px">
<img :src="props?.icon_url" alt="Logo" style="width: 100px" />
<div class="logo">
<img :src="cozeInfo?.icon_url" style="width: 100%; height: 70%" />
</div>
<a-menu mode="inline" theme="light">
<a-menu-item key="1">
<span>舆情脉络整理</span>
<span style="color: #8492ff; font-size: 12px">对话式</span>
<span>{{ cozeInfo.title }}</span>
<span style="color: #8492ff; font-size: 12px">{{ cozeInfo.type == 1 ? '智能体' : '对话式' }}</span>
<span style="float: right">{{ cozeInfo.views }}次使用</span>
</a-menu-item>
<a-menu-item key="2">历史对话</a-menu-item>
<a-menu-item key="3">梳理这次舆情的时间线和关键节点</a-menu-item>
@ -20,17 +21,27 @@
</template>
<script lang="ts" setup>
import { defineComponent } from 'vue';
import { defineProps } from 'vue';
const props = defineComponent({
props: {
info: {
type: Object,
default: {},
},
const props = defineProps({
cozeInfo: {
type: Object as () => any,
default: () => ({}),
},
botId: {
type: String,
default: '',
},
});
console.log(props.info, 'props.info');
const getHistoryChat = async () => {
const { code, data } = await getHistoryChat({ botId: props.botId });
console.log(data, 'data');
// 获取历史对话
};
onMounted(() => {
getHistoryChat();
});
</script>
<style scoped>