diff --git a/apps/common/main/lib/view/MacrosAiDialog.js b/apps/common/main/lib/view/MacrosAiDialog.js index 9eac284e10..27e4041932 100644 --- a/apps/common/main/lib/view/MacrosAiDialog.js +++ b/apps/common/main/lib/view/MacrosAiDialog.js @@ -36,7 +36,9 @@ * */ -define([], function () { 'use strict'; +define([ + 'common/main/lib/component/TextareaField', +], function () { 'use strict'; Common.Views.MacrosAiDialog = Common.UI.Window.extend(_.extend({ diff --git a/apps/common/main/lib/view/MacrosDialog.js b/apps/common/main/lib/view/MacrosDialog.js index 4d0286837a..60d685dbcf 100644 --- a/apps/common/main/lib/view/MacrosDialog.js +++ b/apps/common/main/lib/view/MacrosDialog.js @@ -768,10 +768,15 @@ define([], function () { langName = null; } + var editorName = 'Document Editor'; + if(window.PE) editorName = 'Presentation Editor'; + if(window.SSE) editorName = 'Spreadsheet Editor'; + if(item.value == 'create') { title = this.textCreateMacrosFromDesc; instruction = '' + 'Create a macro for OnlyOffice. ' + + 'The macro should be written specifically for the OnlyOffice ' + editorName + '. ' + 'Return only code with comments, as plain text without markdown. ' + 'The format of the code is JavaScript. ' + 'Write comments in the same language as the user prompt. ' + @@ -780,6 +785,7 @@ define([], function () { title = this.textConvertMacrosFromVBA; instruction = '' + 'Convert macro for OnlyOffice from VBA. ' + + 'The macro should be written specifically for the OnlyOffice ' + editorName + '. ' + 'Return only code with comments, as plain text without markdown. ' + 'The code format is JavaScript. ' + 'Write comments in ' + langCode + (langName ? '(' + langName + ')' : '') + ' language. ' +