feat: use improve instead of rephrase

This commit is contained in:
Shivam Mishra
2025-12-16 16:54:45 +05:30
parent 04831aec00
commit 44754a98c5
6 changed files with 10 additions and 19 deletions
@@ -48,7 +48,7 @@ export default {
this.$emit('close');
},
async generateAIContent(type = 'rephrase') {
async generateAIContent(type = 'improve') {
this.isGenerating = true;
this.generatedContent = await this.processEvent(type);
this.isGenerating = false;
@@ -191,12 +191,12 @@ const imageUpload = useTemplateRef('imageUpload');
const editor = useTemplateRef('editor');
const handleCopilotAction = actionKey => {
if (actionKey === 'rephrase_selection' && editorView?.state) {
if (actionKey === 'improve_selection' && editorView?.state) {
const { from, to } = editorView.state.selection;
const selectedText = editorView.state.doc.textBetween(from, to).trim();
if (from !== to && selectedText) {
emit('executeCopilotAction', 'rephrase', selectedText);
emit('executeCopilotAction', 'improve', selectedText);
}
} else {
emit('executeCopilotAction', actionKey);