| | |
| | | </div> |
| | | <div class="myAgentLine___Isl6E" style="margin-top: 4px;"></div> |
| | | <div id="myAgentBox"> |
| | | <div class="myAgentBox___zrCit"> |
| | | <div class="myAgentBoxImg___Mgu9e"> |
| | | <!-- <div class="myAgentBox___zrCit">--> |
| | | <!-- <div class="myAgentBoxImg___Mgu9e">--> |
| | | <!-- <div class="myAgentBoxImgLayout___u69B_">--> |
| | | <!-- <div class="MuiBox-root css-5nczy5"><img--> |
| | | <!-- src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/academic.png" alt=""--> |
| | | <!-- style="border-radius: 50%; width: 100%; height: 100%;"></div>--> |
| | | <!-- <span class="myAgentBoxImgLayoutTip___xHV4m">学术搜索</span></div>--> |
| | | <!-- <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">--> |
| | | <!-- <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="myAgentBox___zrCit">--> |
| | | <!-- <div class="myAgentBoxImg___Mgu9e">--> |
| | | <!-- <div class="myAgentBoxImgLayout___u69B_">--> |
| | | <!-- <div class="MuiBox-root css-5nczy5"><img--> |
| | | <!-- src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/paper_rewrite.png" alt=""--> |
| | | <!-- style="border-radius: 50%; width: 100%; height: 100%;"></div>--> |
| | | <!-- <span class="myAgentBoxImgLayoutTip___xHV4m">论文改写</span></div>--> |
| | | <!-- <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">--> |
| | | <!-- <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="myAgentBox___zrCit">--> |
| | | <!-- <div class="myAgentBoxImg___Mgu9e">--> |
| | | <!-- <div class="myAgentBoxImgLayout___u69B_">--> |
| | | <!-- <div class="MuiBox-root css-5nczy5"><img--> |
| | | <!-- src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/prompt.png" alt=""--> |
| | | <!-- style="border-radius: 50%; width: 100%; height: 100%;"></div>--> |
| | | <!-- <span class="myAgentBoxImgLayoutTip___xHV4m">提示词专家</span></div>--> |
| | | <!-- <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">--> |
| | | <!-- <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="myAgentBox___zrCit">--> |
| | | <!-- <div class="myAgentBoxImg___Mgu9e">--> |
| | | <!-- <div class="myAgentBoxImgLayout___u69B_">--> |
| | | <!-- <div class="MuiBox-root css-5nczy5"><img--> |
| | | <!-- src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/taro.png" alt=""--> |
| | | <!-- style="border-radius: 50%; width: 100%; height: 100%;"></div>--> |
| | | <!-- <span class="myAgentBoxImgLayoutTip___xHV4m">塔罗师</span></div>--> |
| | | <!-- <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq">--> |
| | | <!-- <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="myAgentBox___zrCit" v-for="item in sessionList"> |
| | | <div class="myAgentBoxImg___Mgu9e" @click="createNewSession(item)"> |
| | | <div class="myAgentBoxImgLayout___u69B_"> |
| | | <div class="MuiBox-root css-5nczy5"><img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/academic.png" alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"></div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">学术搜索</span></div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div> |
| | | <div class="MuiBox-root css-5nczy5"> |
| | | <img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" |
| | | alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"> |
| | | </div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">{{item.name}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="myAgentBox___zrCit"> |
| | | <div class="myAgentBoxImg___Mgu9e"> |
| | | <div class="myAgentBoxImgLayout___u69B_"> |
| | | <div class="MuiBox-root css-5nczy5"><img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/paper_rewrite.png" alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"></div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">论文改写</span></div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="myAgentBox___zrCit"> |
| | | <div class="myAgentBoxImg___Mgu9e"> |
| | | <div class="myAgentBoxImgLayout___u69B_"> |
| | | <div class="MuiBox-root css-5nczy5"><img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/prompt.png" alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"></div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">提示词专家</span></div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="myAgentBox___zrCit"> |
| | | <div class="myAgentBoxImg___Mgu9e"> |
| | | <div class="myAgentBoxImgLayout___u69B_"> |
| | | <div class="MuiBox-root css-5nczy5"><img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/taro.png" alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"></div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">塔罗师</span></div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="myAgentBox___zrCit"> |
| | | <div class="myAgentBoxImg___Mgu9e"> |
| | | <div class="myAgentBoxImgLayout___u69B_"> |
| | | <div class="MuiBox-root css-5nczy5"><img |
| | | src="https://kimi-img.moonshot.cn/prod-chat-kimi/avatar/kimiplus/guess.png" alt="" |
| | | style="border-radius: 50%; width: 100%; height: 100%;"></div> |
| | | <span class="myAgentBoxImgLayoutTip___xHV4m">猜猜我在想谁</span></div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc">从侧边栏移除</div> |
| | | <div data-testid="msh-sidebar-bot-delete" class="myAgentBoxImgDelete___qXZuq" @click="deleteSession(item)"> |
| | | <div class="myAgentBoxImgDeleteInner____Hawc" >从侧边栏移除</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | IconTiktokColor |
| | | } from "@arco-design/web-vue/es/icon"; |
| | | import { useAppStore, useUserStore } from "@/store"; |
| | | import { computed, nextTick, onMounted, watch, reactive, ref } from "vue"; |
| | | |
| | | import { computed, nextTick, onMounted, watch, reactive, ref, onBeforeMount, onBeforeUnmount } from "vue"; |
| | | import { |
| | | addSessionApi, |
| | | chatApi, |
| | | getDialogListApi, |
| | | getSessionDetailsApi, |
| | | deleteSessionApi, |
| | | sessionListApi |
| | | } from "@/api/session"; |
| | | import { Message } from "@arco-design/web-vue"; |
| | | import EventBus from '@/utils/EventBus'; |
| | | const emit = defineEmits(["querySessionDetail","changeAgentType","createSession"]); |
| | | import logo from "@/assets/images/model.png"; |
| | | const activeSessionId = ref(""); |
| | | const fieldNames = { value: "id", label: "name" }; |
| | | const dialogs = ref([]); |
| | | const dialogObj = reactive({}); |
| | | const agentObj = reactive({}); |
| | | const agentList = ref([]); |
| | | const searchValue = ref(""); |
| | | const selectValue = ref(""); |
| | | const sectionList = ref({}); |
| | | const sessionList = ref([]); //用户操作会话列表 |
| | | |
| | | |
| | | |
| | | |
| | | // 查询历史用户习惯会话列表 |
| | | const querySessionList = async (id) => { |
| | | const { code, data } = await sessionListApi(id); |
| | | if (code === 200) { |
| | | sessionList.value = data.map((item) => { |
| | | return { |
| | | ...item, |
| | | showtype: 1 |
| | | } |
| | | }); |
| | | sessionList.value.splice(0, 5); |
| | | console.log(sessionList.value); |
| | | } else { |
| | | Message.warning("查询失败"); |
| | | } |
| | | }; |
| | | |
| | | |
| | | // 新增会话 |
| | | const createNewSession = async (session) => { |
| | | console.log(session, 'session'); |
| | | // 查询历史记录 |
| | | // if (session.type == '1') { |
| | | // // 生成智能体新的对话 |
| | | // emit('createSession',session.id); |
| | | // emit('changeAgentType','1'); |
| | | // } else { |
| | | // // 生成agent新的对话 |
| | | // EventBus.emit("createAgent",session); |
| | | // emit('changeAgentType','2'); |
| | | // } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //根据会话id删除会话 |
| | | const deleteSession = async (session) => { |
| | | const { code } = await deleteSessionApi([session.id]); |
| | | if (code === 200) { |
| | | // Message.success('删除成功'); |
| | | querySessionList(''); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | onBeforeMount(()=>{ |
| | | querySessionList(''); |
| | | }) |
| | | |
| | | onMounted(() => { |
| | | |
| | | }) |
| | | onBeforeUnmount(() => { |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | </script> |