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