diff --git a/src/components/Assistant.vue b/src/components/Assistant.vue index 53180b9bbdc..487448fd502 100644 --- a/src/components/Assistant.vue +++ b/src/components/Assistant.vue @@ -287,7 +287,19 @@ export default { emit('text:translate-modal:show', { content: this.selection || '' }) }, async openResult(task) { - window.OCA.Assistant.openAssistantTask(task) + window.OCA.Assistant.openAssistantTask(task, { + isInsideViewer: true, + actionButtons: [ + { + type: 'primary', + title: t('text', 'Insert result'), + label: t('text', 'Insert result'), + onClick: (lastTask) => { + this.insertResult(lastTask) + }, + }, + ], + }) }, async insertResult(task) { this.$editor.commands.insertContent(task.output.output)