perf: Generate prompt words to add copy
parent
42de3e0bd6
commit
42d7aeb5bf
|
|
@ -32,10 +32,14 @@
|
||||||
{{ $t('views.application.generateDialog.title') }}
|
{{ $t('views.application.generateDialog.title') }}
|
||||||
</p>
|
</p>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
|
||||||
<div v-if="answer && !loading && !isStreaming && !showContinueButton" class="mt-8">
|
<div v-if="answer && !loading && !isStreaming && !showContinueButton" class="mt-8">
|
||||||
<el-button type="primary" @click="() => emit('replace', answer)">
|
<el-button type="primary" @click="() => emit('replace', answer)">
|
||||||
{{ $t('views.application.generateDialog.replace') }}
|
{{ $t('views.application.generateDialog.replace') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button @click="copyClick(answer)">
|
||||||
|
{{ $t('common.copy') }}
|
||||||
|
</el-button>
|
||||||
<el-button @click="reAnswerClick" :disabled="!answer || loading" :loading="loading">
|
<el-button @click="reAnswerClick" :disabled="!answer || loading" :loading="loading">
|
||||||
{{ $t('views.application.generateDialog.remake') }}
|
{{ $t('views.application.generateDialog.remake') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -101,6 +105,7 @@ import { t } from '@/locales'
|
||||||
import systemGeneratePromptAPI from '@/api/system-resource-management/application'
|
import systemGeneratePromptAPI from '@/api/system-resource-management/application'
|
||||||
import generatePromptAPI from '@/api/application/application'
|
import generatePromptAPI from '@/api/application/application'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
|
import { copyClick } from '@/utils/clipboard'
|
||||||
const emit = defineEmits(['replace'])
|
const emit = defineEmits(['replace'])
|
||||||
const { user } = useStore()
|
const { user } = useStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
@ -397,7 +402,9 @@ function generatePrompt(inputValue: any) {
|
||||||
// 重新生成点击
|
// 重新生成点击
|
||||||
const reAnswerClick = () => {
|
const reAnswerClick = () => {
|
||||||
if (originalUserInput.value) {
|
if (originalUserInput.value) {
|
||||||
generatePrompt(`上一次回答不满意。请针对原始问题"${originalUserInput.value}"并结合对话记录,严格按照格式规范重新生成。`)
|
generatePrompt(
|
||||||
|
`上一次回答不满意。请针对原始问题"${originalUserInput.value}"并结合对话记录,严格按照格式规范重新生成。`,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue