|
|
@ -1,6 +1,10 @@ |
|
|
|
<script lang="ts"> |
|
|
|
import { createEventDispatcher } from 'svelte'; |
|
|
|
import { goto } from '$app/navigation'; |
|
|
|
const dispatch = createEventDispatcher(); |
|
|
|
import { |
|
|
|
showSidebar, |
|
|
|
} from '$lib/stores'; |
|
|
|
let list = [ |
|
|
|
{ |
|
|
|
title: '工作', |
|
|
@ -15,22 +19,16 @@ |
|
|
|
placeholder: |
|
|
|
'<p>帮我写一份用于 例如<span style="color:#2c77f1 !important">项目进度、本周工作等</span> 的工作总结,包括<span style="color:#2c77f1 !important">工作内容、成果、风险点等。</span></p>' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '文档生成', |
|
|
|
img: '/img/icon/document.png', |
|
|
|
imgActive: '/img/icon/document_active.png', |
|
|
|
active: false |
|
|
|
} |
|
|
|
// { |
|
|
|
// label: '文档生成', |
|
|
|
// img: '/img/icon/document.png', |
|
|
|
// imgActive: '/img/icon/document_active.png', |
|
|
|
// active: false |
|
|
|
// } |
|
|
|
], |
|
|
|
introduce: [ |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
label: '可以为您生成12345热线办理、社区活动开展等内容的工作总结。' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
@ -48,13 +46,7 @@ |
|
|
|
], |
|
|
|
introduce: [ |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
label: '可以对平台维护的知识库(含共享空间)文档内容进行检索,您可以说出您的问题,我会尽力为您查找答案。' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
@ -72,13 +64,7 @@ |
|
|
|
], |
|
|
|
introduce: [ |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '介绍' |
|
|
|
label: '我还会记忆您之前问过的问题哦,点击可以查看您之前的历史会话。' |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
@ -108,7 +94,7 @@ |
|
|
|
<div class="flex mt-5.5"> |
|
|
|
{#each item.buttons as but, index (index)} |
|
|
|
<button |
|
|
|
class="font-medium text-black text-base mr-4 bg-white rounded-2xl px-6 py-1 box-border flex items-center border {but.active |
|
|
|
class="font-medium text-black text-base mr-4 bg-white rounded-2xl px-6 py-1 box-border flex items-center border {but.label === '历史消息'||but.label === '工作总结'?'mt-4.5':''} {but.active |
|
|
|
? 'border-blue-500 text-blue-500' |
|
|
|
: ''}" |
|
|
|
on:click={() => { |
|
|
@ -117,11 +103,21 @@ |
|
|
|
if (c.active === true && c.label !== but.label) { |
|
|
|
c.active = false; |
|
|
|
} else if (c.label === but.label) { |
|
|
|
c.active = true; |
|
|
|
if(but.label === '历史消息'){ |
|
|
|
c.active = !c.active |
|
|
|
}else { |
|
|
|
c.active = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
list = [...list]; |
|
|
|
if(but.label === '检索知识库'){ |
|
|
|
goto('/workspace/knowledge'); |
|
|
|
}else if(but.label === '历史消息'){ |
|
|
|
showSidebar.set(!$showSidebar); |
|
|
|
} |
|
|
|
dispatch('savePlaceholder',but.placeholder || null) |
|
|
|
}} |
|
|
|
> |
|
|
|