diff --git a/src/views/doc/agent.vue b/src/views/doc/agent.vue index 1942a07..0a206fe 100644 --- a/src/views/doc/agent.vue +++ b/src/views/doc/agent.vue @@ -27,6 +27,7 @@ const inputState=ref(true) const conversations=ref([]) const centHoverItem=ref("") const currentAgent=ref<{name:string,uuid:string}>({}) +const queryUrl=ref("") const interact_msg=ref<{ask:boolean,think:string,content:string,docinfo?:any[]}[]>([]) const props = withDefaults(defineProps<{ @@ -69,12 +70,20 @@ async function onSendTextToAI(){ const params={ "onlineSearch":"否", - "useDataset":"否" + "useDataset":"否", + "queryUrl":"" } for (let item of checkedModel.value){ - if(item==="onlineSearch") params.onlineSearch="是" + if(item==="onlineSearch"){ + params.onlineSearch="是" + if(queryUrl.value!="") { + params.queryUrl=queryUrl.value + //queryUrl.value="" //立即清理 + } + } if(item==="useDataset") params.useDataset="是" } + if (conversation.value==""){ //开启新对话 interact_msg.value=[{ask:true,think:"", content:myquestion.value}] @@ -325,6 +334,9 @@ onMounted(() => { {{ mod.name }} +
+ +
diff --git a/src/views/doc/space.vue b/src/views/doc/space.vue index 0551413..3893341 100644 --- a/src/views/doc/space.vue +++ b/src/views/doc/space.vue @@ -332,6 +332,8 @@ function handleDoubleClick(row:matterInfo,ind?:number){ if(row.agent){ currentAgent.value={name:row.name,model:false,uuid:row.uuid,path:row.path} + }else if(row.uuid=="root"){ + currentAgent.value={name:"通用AI",model:false,uuid:defaultAiAgent,path:"root"} } isNewNode=true //1:如果是当前目录的父组件没必要更新目录树 @@ -752,7 +754,7 @@ function isOwner(){ - +