提交 361a97ec authored 作者: lhh's avatar lhh

update

上级 b1acbeb4
......@@ -5,7 +5,13 @@ import { useMapStore } from '@/stores/map'
import { useUserStore } from '@/stores/user'
import { useConnection } from '../composables/useConnection'
import { useIndustry } from '../composables/useIndustry'
import { getNameByValue, materialMethodList, materialUsageList, materialUsersList, materialPictureStyleList } from '@/utils/dictionary'
import {
getNameByValue,
materialMethodList,
materialUsageList,
materialUsersList,
materialPictureStyleList
} from '@/utils/dictionary'
import IconComputer from './IconComputer.vue'
import IconUser from './IconUser.vue'
import IconAI from './IconAI.vue'
......@@ -92,11 +98,17 @@ async function handleSendType(type, content) {
content = `${content}`
break
case 3:
content = `我是${userName},请帮我润色以下内容:${content.replace('请帮我创作一个', '')}`
content = `我是${userName},请帮我改写以下内容:${content.replace('请帮我创作一个', '')}`
break
case 4:
content = `我是${userName},请帮我扩写以下内容:${content.replace('请帮我创作一个', '')}`
break
case 7:
content = `我是${userName},请帮我缩写以下内容:${content.replace('请帮我创作一个', '')}`
break
case 8:
content = `我是${userName},请帮我总结以下内容:${content.replace('请帮我创作一个', '')}`
break
}
post({ type, content })
......@@ -151,18 +163,28 @@ async function handleSave(message) {
<!-- 文本 -->
<template v-if="form.type == 1 && item.role !== 'user'">
<el-button size="small" type="primary" @click="handleCopy(item.content)">复制</el-button>
<el-button size="small" type="primary" @click="handleSendType(5, item.input || item.content)" v-if="item.role == 'bot'"
<el-button
size="small"
type="primary"
@click="handleSendType(5, item.input || item.content)"
v-if="item.role == 'bot'"
>刷新({{ usages.ai_refresh_count }}/{{ usages.ai_refresh_max_count }})</el-button
>
<el-button size="small" type="primary" @click="handleSendType(2, item.content)"
>AI创作({{ usages.ai_creation_count }}/{{ usages.ai_creation_max_count }})</el-button
>
<el-button size="small" type="primary" @click="handleSendType(3, item.content)"
>AI润色({{ usages.ai_polish_count }}/{{ usages.ai_polish_max_count }})</el-button
>AI改写({{ usages.ai_polish_count }}/{{ usages.ai_polish_max_count }})</el-button
>
<el-button size="small" type="primary" @click="handleSendType(4, item.content)"
>AI扩写({{ usages.ai_expand_count }}/{{ usages.ai_expand_max_count }})</el-button
>
<el-button size="small" type="primary" @click="handleSendType(7, item.content)"
>AI缩写({{ usages.ai_abbr_count }}/{{ usages.ai_abbr_max_count }})</el-button
>
<el-button size="small" type="primary" @click="handleSendType(8, item.content)"
>AI总结({{ usages.ai_summary_count }}/{{ usages.ai_summary_max_count }})</el-button
>
</template>
<!-- 图片 -->
<template v-if="form.type == 2">
......@@ -190,7 +212,13 @@ async function handleSave(message) {
</div>
</div>
<div class="chat-footer">
<el-input type="textarea" :autosize="{ minRows: 1, maxRows: 12 }" placeholder="发消息" v-model="content" @keydown.enter="handleSend"></el-input>
<el-input
type="textarea"
:autosize="{ minRows: 1, maxRows: 12 }"
placeholder="发消息"
v-model="content"
@keydown.enter="handleSend"
></el-input>
<el-button text type="primary" @click="handleSend">发送</el-button>
</div>
</template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论