@ckeditor/ckeditor5-ai 47.0.0-alpha.6 → 47.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +4 -0
- package/build/ai.js +1 -1
- package/dist/index-editor.css +54 -18
- package/dist/index.css +64 -19
- package/dist/index.js +4 -4
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/contexts.json +5 -0
- package/package.json +15 -15
- package/src/aiactions/aiactions.d.ts +0 -2
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsinteraction.d.ts +1 -0
- package/src/aiactions/model/aiactionsinteraction.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/legacyerrors.js +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiassistant/utils/common-translations.js +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
- package/src/aiballoon/ui/aiballoonview.d.ts +3 -1
- package/src/aiballoon/ui/aiballoonview.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.d.ts +7 -2
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatfeedview.d.ts +4 -0
- package/src/aichat/ui/aichatfeedview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +1 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +8 -2
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +9 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
- package/src/aichat/utils/eventnames.js +1 -1
- package/src/aichat/utils/promisequeue.js +1 -1
- package/src/aichat/utils/scrollmanager.js +1 -1
- package/src/aichathistory/aichathistory.js +1 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.js +1 -1
- package/src/aichathistory/model/aichathistoryconversations.js +1 -1
- package/src/aichathistory/model/aichathistoryitem.js +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +1 -1
- package/src/aichathistory/ui/aichathistorylistview.js +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aiconfig.d.ts +17 -0
- package/src/aicore/aiconnector.d.ts +13 -0
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aicapabilities.js +1 -1
- package/src/aicore/model/aicontext.js +1 -1
- package/src/aicore/model/aiinteraction.d.ts +41 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aireply.d.ts +2 -2
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/aiskeleton.js +1 -1
- package/src/aicore/ui/aispinner.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +16 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/utils/common-translations.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/eventnames.js +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +4 -0
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewmodels.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/aitabsmainview.js +1 -1
- package/src/aitabs/tabs/aitabsview.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitabs/tabs/tabpanelview.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +17 -4
- package/theme/aichat/aichathistory.css +26 -9
- package/theme/aichat/aiminitoolbar.css +8 -0
- package/theme/aichat/aisuggestioncontainer.css +6 -0
- package/theme/aireviewmode/aireviewmode-check-run-result.css +3 -2
- package/theme/aitabs/aitabsview.css +6 -1
- package/theme/common/aibutton.css +0 -4
- package/theme/common/aiheader.css +1 -0
- package/src/aiquickactions/utils/common-translations.d.ts +0 -9
- package/src/aiquickactions/utils/common-translations.js +0 -23
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5c3cb6=_0x4247;(function(_0x493d75,_0x1f6b24){const _0x4ddb8f=_0x4247,_0x577fc1=_0x493d75();while(!![]){try{const _0x35df46=parseInt(_0x4ddb8f(0xff))/0x1+-parseInt(_0x4ddb8f(0xe7))/0x2+-parseInt(_0x4ddb8f(0xe6))/0x3*(-parseInt(_0x4ddb8f(0xf1))/0x4)+parseInt(_0x4ddb8f(0x10f))/0x5+parseInt(_0x4ddb8f(0x124))/0x6*(-parseInt(_0x4ddb8f(0x100))/0x7)+-parseInt(_0x4ddb8f(0x107))/0x8+parseInt(_0x4ddb8f(0x11b))/0x9;if(_0x35df46===_0x1f6b24)break;else _0x577fc1['push'](_0x577fc1['shift']());}catch(_0x2c9fd0){_0x577fc1['push'](_0x577fc1['shift']());}}}(_0x2da6,0x5a501));function _0x4247(_0x3bf7d9,_0x455119){const _0x2da603=_0x2da6();return _0x4247=function(_0x424709,_0x35299c){_0x424709=_0x424709-0xe5;let _0x2c0eb6=_0x2da603[_0x424709];return _0x2c0eb6;},_0x4247(_0x3bf7d9,_0x455119);}import{View as _0x20742c,SearchTextView as _0x29e9db,FormHeaderView as _0x41e7c1,ButtonView as _0x28588b}from'ckeditor5/src/ui.js';import{IconAIHistory as _0x1361af,IconCancel as _0x11c6d3,IconPlus as _0x393a37}from'ckeditor5/src/icons.js';import{AIChatHistorySectionListView as _0x222660}from'./aichathistorysectionlistview.js';import{AIChatHistoryListView as _0x3bf649}from'./aichathistorylistview.js';import{AIChatHistoryListItemView as _0x5a9464}from'./aichathistorylistitemview.js';import{AI_CHAT_HISTORY_UI_EVENT_NAMES as _0x1fcac4}from'../aichathistoryui.js';import{AISkeletonView as _0x47f0d9,SKELETON_DEFINITIONS as _0x3d52f5}from'../../aicore/ui/aiskeleton.js';import{createResizeButton as _0x41953d}from'../../aicore/utils/createresizebutton.js';function _0x2da6(){const _0x48e31a=['openChat','bind','updateTitle','updateLoadingState','4192569cHhIYY','remove','getItem','AI_CHAT_HISTORY_SEARCH_LABEL','itemsViews','errorMessage','AI_CHAT_HISTORY_SEARCH_NOT_FOUND_PRIMARY','aiHistory','updateItemLoadingState','6DRKvUp','set','ck-ai-chat-history__empty','_createListItemViews','bindTemplate','execute','locale','element','isMaximized','search','indexOf','render','_createEmptyStateView','title','_createErrorView','push','AI_CHAT_HISTORY_EMPTY_MESSAGE','searchView','sections','isLoading','emptyView','delegate','length','skeletonView','resizeButton','isEmptyViewVisible','ck-ai-chat-history__empty-message','ck-ai-chat-history__content','136281bqbHRe','1042188PCHjap','hasItems','setTemplate','queryView','some','updateItemTitle','ck-ai-chat-error','fire','ltr','clear','20PuPvqi','_createSearchView','ck-hidden','splice','sectionsView','ck-ai-chat-error__dismiss-button','removeItem','isSearchViewVisible','items','value','ck-ai-chat__start-conversation','ck-rounded-corners','isVisible','AI_CHAT_HISTORY_HEADING','595952KBvBXR','3110443GdqzDc','ck-ai-chat-history','_updateViewVisibility','fieldView','extendTemplate','div','errorView','1441688NjysDG','change:errorMessage','updateHistoryItemsWithCategories','add','addMany','ck-reset_all','children','AI_CHAT_LABEL_NEW_CHAT','1133235VtFZrU','_createSkeletonView','change:hasItems','ck-ai-header\x20ck-ai-header_history','AI_CHAT_HISTORY_SEARCH_NOT_FOUND_SECONDARY','removeHistoryItem','_refreshSearch','change:isLoading'];_0x2da6=function(){return _0x48e31a;};return _0x2da6();}import{getTranslation as _0x243ea6}from'../../aicore/utils/common-translations.js';export class AIChatHistoryView extends _0x20742c{[_0x5c3cb6(0x135)];[_0x5c3cb6(0x106)];[_0x5c3cb6(0x13b)];[_0x5c3cb6(0x138)];[_0x5c3cb6(0xf5)];[_0x5c3cb6(0x13c)];constructor(_0x3fde89,_0x53e1e5){const _0x1f24b6=_0x5c3cb6;super(_0x3fde89),this[_0x1f24b6(0x125)](_0x1f24b6(0xe8),!0x1),this[_0x1f24b6(0x125)](_0x1f24b6(0x137),!0x0),this[_0x1f24b6(0x125)](_0x1f24b6(0x120),''),this[_0x1f24b6(0x125)](_0x1f24b6(0x12c),!0x1),this[_0x1f24b6(0x125)](_0x1f24b6(0xf8),!0x1),this[_0x1f24b6(0x125)](_0x1f24b6(0x13d),!0x1);const _0x1aa6aa=new _0x41e7c1(_0x3fde89,{'label':_0x243ea6(_0x3fde89,_0x1f24b6(0xfe)),'icon':_0x1361af,'class':_0x1f24b6(0x112)});_0x53e1e5&&(this[_0x1f24b6(0x13c)]=_0x41953d(_0x3fde89,this),_0x1aa6aa[_0x1f24b6(0x10d)][_0x1f24b6(0x10a)](this[_0x1f24b6(0x13c)])),this[_0x1f24b6(0xf5)]=new _0x222660(_0x3fde89,[]),this[_0x1f24b6(0xf5)][_0x1f24b6(0x139)](..._0x1fcac4)['to'](this),this[_0x1f24b6(0x106)]=this[_0x1f24b6(0x132)](),this[_0x1f24b6(0x13b)]=this[_0x1f24b6(0x110)](),this[_0x1f24b6(0x138)]=this[_0x1f24b6(0x130)](),this[_0x1f24b6(0x135)]=this[_0x1f24b6(0xf2)](),this['on'](_0x1f24b6(0x116),()=>this[_0x1f24b6(0x102)]()),this['on'](_0x1f24b6(0x111),()=>this[_0x1f24b6(0x102)]()),this['on'](_0x1f24b6(0x108),()=>this[_0x1f24b6(0x102)]()),this[_0x1f24b6(0xe9)]({'tag':_0x1f24b6(0x105),'attributes':{'class':['ck',_0x1f24b6(0x10c),_0x1f24b6(0x101),_0x1f24b6(0xfc)],'dir':_0x1f24b6(0xef)},'children':[_0x1aa6aa,{'tag':_0x1f24b6(0x105),'attributes':{'class':[_0x1f24b6(0xe5)]},'children':[this[_0x1f24b6(0x13b)],this[_0x1f24b6(0x106)],this[_0x1f24b6(0x138)],this[_0x1f24b6(0x135)]]}]});}[_0x5c3cb6(0x102)](){const _0x129bcb=_0x5c3cb6;this[_0x129bcb(0xf8)]=!this[_0x129bcb(0x137)]&&this[_0x129bcb(0xe8)]&&!this[_0x129bcb(0x120)],this[_0x129bcb(0x13d)]=!this[_0x129bcb(0x137)]&&!this[_0x129bcb(0xe8)]&&!this[_0x129bcb(0x120)];}[_0x5c3cb6(0xf2)](){const _0x1bfc95=_0x5c3cb6,_0x42dd37=new _0x29e9db(this[_0x1bfc95(0x12a)],{'filteredView':this[_0x1bfc95(0xf5)],'queryView':{'label':_0x243ea6(this[_0x1bfc95(0x12a)],_0x1bfc95(0x11e))},'infoView':{'text':{'notFound':{'primary':_0x18b680=>_0x243ea6(this[_0x1bfc95(0x12a)],_0x1bfc95(0x121),_0x18b680),'secondary':_0x243ea6(this[_0x1bfc95(0x12a)],_0x1bfc95(0x113))}}}});return _0x42dd37['on'](_0x1bfc95(0x12f),()=>{const _0x35bca7=_0x1bfc95;this[_0x35bca7(0x135)][_0x35bca7(0x10d)][_0x35bca7(0x10a)](this[_0x35bca7(0x106)],0x1);}),_0x42dd37[_0x1bfc95(0x104)]({'attributes':{'class':[this[_0x1bfc95(0x128)]['if'](_0x1bfc95(0xf8),_0x1bfc95(0xf3),_0x362e76=>!_0x362e76)]}}),_0x42dd37;}[_0x5c3cb6(0x110)](){const _0x194b85=_0x5c3cb6,_0x23011c=new _0x47f0d9(this[_0x194b85(0x12a)],_0x3d52f5[_0x194b85(0x122)]);return _0x23011c[_0x194b85(0x104)]({'attributes':{'class':[this[_0x194b85(0x128)]['if'](_0x194b85(0x137),_0x194b85(0xf3),_0x22109c=>!_0x22109c)]}}),_0x23011c;}[_0x5c3cb6(0x132)](){const _0x411519=_0x5c3cb6,_0x4c0d0a=new _0x20742c(this[_0x411519(0x12a)]),_0x4ab52c=new _0x28588b(this[_0x411519(0x12a)]);return _0x4ab52c[_0x411519(0x125)]({'withText':!0x1,'icon':_0x11c6d3,'class':_0x411519(0xf6)}),_0x4ab52c[_0x411519(0x118)](_0x411519(0xfd))['to'](this,_0x411519(0xe8),_0x3b75e1=>!!_0x3b75e1),_0x4ab52c['on'](_0x411519(0x129),()=>{const _0x45d8e8=_0x411519;this[_0x45d8e8(0x120)]='';}),_0x4c0d0a[_0x411519(0xe9)]({'tag':_0x411519(0x105),'attributes':{'class':['ck',_0x411519(0xed),this[_0x411519(0x128)]['if'](_0x411519(0x120),_0x411519(0xf3),_0x41308d=>!_0x41308d)]},'children':[{'tag':'p','children':[{'text':this[_0x411519(0x128)]['to'](_0x411519(0x120))}]},_0x4ab52c]}),_0x4c0d0a;}[_0x5c3cb6(0x130)](){const _0x1216fe=_0x5c3cb6,_0x2da27f=new _0x28588b(this[_0x1216fe(0x12a)]);_0x2da27f[_0x1216fe(0x125)]({'label':_0x243ea6(this[_0x1216fe(0x12a)],_0x1216fe(0x10e)),'withText':!0x0,'icon':_0x393a37,'class':_0x1216fe(0xfb)}),_0x2da27f['on'](_0x1216fe(0x129),()=>{const _0x356eac=_0x1216fe;this[_0x356eac(0xee)](_0x356eac(0x117));});const _0x1f35ce=new _0x20742c(this[_0x1216fe(0x12a)]);return _0x1f35ce[_0x1216fe(0xe9)]({'tag':_0x1216fe(0x105),'attributes':{'class':[_0x1216fe(0x126),this[_0x1216fe(0x128)]['if'](_0x1216fe(0x13d),_0x1216fe(0xf3),_0x369643=>!_0x369643)]},'children':[{'tag':'p','attributes':{'class':[_0x1216fe(0x13e)]},'children':[_0x243ea6(this[_0x1216fe(0x12a)],_0x1216fe(0x134))]},_0x2da27f]}),_0x1f35ce;}[_0x5c3cb6(0x127)](_0x39f8b0,_0xdb4405){const _0x24f363=_0x5c3cb6,_0x1b4ce1=[];for(const _0xf560b of _0x39f8b0){const _0x6df1e=new _0x5a9464(_0xdb4405,_0xf560b);_0x6df1e[_0x24f363(0x139)](..._0x1fcac4)['to'](this),_0x1b4ce1[_0x24f363(0x133)](_0x6df1e);}return _0x1b4ce1;}[_0x5c3cb6(0x109)](_0x18408e){const _0x4151a7=_0x5c3cb6,_0x14bd9f=this[_0x4151a7(0x12a)]||'en',_0x2185fd=[];for(const _0xa66f2d of _0x18408e){const _0x4ad93e=this[_0x4151a7(0x127)](_0xa66f2d[_0x4151a7(0xf9)],_0x14bd9f);_0x2185fd[_0x4151a7(0x133)](new _0x3bf649(_0x14bd9f,{'title':_0xa66f2d[_0x4151a7(0x131)],'items':_0x4ad93e}));}this[_0x4151a7(0xf5)][_0x4151a7(0x136)]=_0x2185fd,this[_0x4151a7(0xf5)][_0x4151a7(0xf9)][_0x4151a7(0xf0)](),this[_0x4151a7(0xf5)][_0x4151a7(0xf9)][_0x4151a7(0x10b)](_0x2185fd),this[_0x4151a7(0xe8)]=_0x18408e[_0x4151a7(0xeb)](_0x3d3d39=>_0x3d3d39[_0x4151a7(0xf9)][_0x4151a7(0x13a)]>0x0),this[_0x4151a7(0x115)]();}[_0x5c3cb6(0x114)](_0x327281){const _0x19da11=_0x5c3cb6;for(const _0x24c225 of this[_0x19da11(0xf5)][_0x19da11(0x136)]){const _0x1659ff=_0x24c225[_0x19da11(0x11d)](_0x327281);if(_0x1659ff){if(_0x24c225[_0x19da11(0xf7)](_0x1659ff),0x0===_0x24c225[_0x19da11(0x11f)][_0x19da11(0x13a)]){const _0x4b14f0=this[_0x19da11(0xf5)][_0x19da11(0x136)][_0x19da11(0x12e)](_0x24c225);-0x1!==_0x4b14f0&&(this[_0x19da11(0xf5)][_0x19da11(0x136)][_0x19da11(0xf4)](_0x4b14f0,0x1),this[_0x19da11(0xf5)][_0x19da11(0xf9)][_0x19da11(0x11c)](_0x24c225));}this[_0x19da11(0xe8)]=this[_0x19da11(0xf5)][_0x19da11(0x136)][_0x19da11(0x13a)]>0x0,this[_0x19da11(0x115)]();break;}}}[_0x5c3cb6(0xec)](_0x1165d6,_0x57ea28){const _0x5bb6a1=_0x5c3cb6;for(const _0x3cb8f5 of this[_0x5bb6a1(0xf5)][_0x5bb6a1(0x136)]){const _0x3db443=_0x3cb8f5[_0x5bb6a1(0x11d)](_0x1165d6);if(_0x3db443){_0x3db443[_0x5bb6a1(0x119)](_0x57ea28);break;}}}[_0x5c3cb6(0x123)](_0x4926c1,_0x427568,_0x4adf72){const _0x209f91=_0x5c3cb6;for(const _0x2797f3 of this[_0x209f91(0xf5)][_0x209f91(0x136)]){const _0x4c19a6=_0x2797f3[_0x209f91(0x11d)](_0x4926c1);if(_0x4c19a6){_0x4c19a6[_0x209f91(0x11a)](_0x427568,_0x4adf72);break;}}}[_0x5c3cb6(0x115)](){const _0x28a47e=_0x5c3cb6;if(this[_0x28a47e(0xe8)]){const _0x122527=this[_0x28a47e(0x135)][_0x28a47e(0xea)][_0x28a47e(0x103)]?.[_0x28a47e(0x12b)]?.[_0x28a47e(0xfa)]||'';this[_0x28a47e(0x135)][_0x28a47e(0x12d)](_0x122527);}}}
|
package/src/aiconfig.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { AIAssistantConfig } from './aiassistant/aiassistant.js';
|
|
10
10
|
import { type AIChatConfig } from './aichat/aichat.js';
|
|
11
|
+
import { type AISuggestionActionName } from './aichat/ui/feed/aichatfeedsuggestionitemactionsview.js';
|
|
11
12
|
import { type AIQuickActionsConfig } from './aiquickactions/aiquickactions.js';
|
|
12
13
|
import { type AIReviewModeConfig } from './aireviewmode/aireviewmode.js';
|
|
13
14
|
/**
|
|
@@ -64,6 +65,22 @@ export interface AIConfig {
|
|
|
64
65
|
* The configuration of the {@link module:ai/aireviewmode/aireviewmode~AIReviewMode AI Review Mode feature}.
|
|
65
66
|
*/
|
|
66
67
|
reviewMode?: AIReviewModeConfig;
|
|
68
|
+
/**
|
|
69
|
+
* The configuration of the advanced reply dropdown in the AI chat feed. It also affects the buttons in quick actions balloon.
|
|
70
|
+
*
|
|
71
|
+
* It defines which actions and in which order will be displayed in the dropdown in the AI chat feed.
|
|
72
|
+
* The first action is used as the default action for the dropdown button.
|
|
73
|
+
* By default, it contains the following actions:
|
|
74
|
+
*
|
|
75
|
+
* Note, that the quick actions balloon does not display `'showChangeInText'` button.
|
|
76
|
+
*
|
|
77
|
+
* Note, that the `'applySuggestion'` button is hidden when track changes feature is turned on.
|
|
78
|
+
*
|
|
79
|
+
* ```ts
|
|
80
|
+
* [ 'applySuggestion', 'insertSuggestion', 'showChangeInText' ]
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
availableReplyActions?: Array<AISuggestionActionName>;
|
|
67
84
|
}
|
|
68
85
|
export type AIContainerType = 'sidebar' | 'overlay' | 'custom';
|
|
69
86
|
export type AIContainerSide = 'left' | 'right';
|
|
@@ -131,6 +131,11 @@ export declare class AIConnector extends ContextPlugin {
|
|
|
131
131
|
* Sends a request to the AI API '/reviews/custom/calls' endpoint and returns a response stream reader.
|
|
132
132
|
*/
|
|
133
133
|
callCustomReview({ content, prompt, model }: AIConnectorCustomReviewData): AIConnectorRequest;
|
|
134
|
+
upsertAIChatRating(conversationId: string, messageId: string, rating: AIRating): AIUpdateRating;
|
|
135
|
+
upsertAIActionRating(actionName: string, callId: string, rating: AIRating): AIUpdateRating;
|
|
136
|
+
upsertCustomAIActionRating(callId: string, rating: AIRating): AIUpdateRating;
|
|
137
|
+
upsertAIReviewRating(reviewName: string, callId: string, rating: AIRating): AIUpdateRating;
|
|
138
|
+
upsertCustomAIReviewRating(callId: string, rating: AIRating): AIUpdateRating;
|
|
134
139
|
}
|
|
135
140
|
export type AIGenericRequest = {
|
|
136
141
|
request: Promise<Response>;
|
|
@@ -300,3 +305,11 @@ export type AIConnectorCustomReviewData = {
|
|
|
300
305
|
prompt: string;
|
|
301
306
|
model: string;
|
|
302
307
|
};
|
|
308
|
+
export type AIUpdateRating = {
|
|
309
|
+
execute: () => Promise<void>;
|
|
310
|
+
abortController: AbortController;
|
|
311
|
+
};
|
|
312
|
+
export type AIRating = {
|
|
313
|
+
positiveCount: number;
|
|
314
|
+
totalCount: number;
|
|
315
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x1257(_0x287869,_0x35e36d){const _0xc63f4e=_0xc63f();return _0x1257=function(_0x125724,_0x5db24c){_0x125724=_0x125724-0x13f;let _0x470d42=_0xc63f4e[_0x125724];return _0x470d42;},_0x1257(_0x287869,_0x35e36d);}const _0x4b09db=_0x1257;(function(_0x3649e9,_0x2ae105){const _0x5bbd05=_0x1257,_0x5eaa6e=_0x3649e9();while(!![]){try{const _0x34aa31=-parseInt(_0x5bbd05(0x1bf))/0x1+-parseInt(_0x5bbd05(0x14b))/0x2+-parseInt(_0x5bbd05(0x1aa))/0x3+-parseInt(_0x5bbd05(0x1b3))/0x4+-parseInt(_0x5bbd05(0x16b))/0x5*(parseInt(_0x5bbd05(0x168))/0x6)+-parseInt(_0x5bbd05(0x150))/0x7*(-parseInt(_0x5bbd05(0x172))/0x8)+parseInt(_0x5bbd05(0x146))/0x9*(parseInt(_0x5bbd05(0x188))/0xa);if(_0x34aa31===_0x2ae105)break;else _0x5eaa6e['push'](_0x5eaa6e['shift']());}catch(_0x287e42){_0x5eaa6e['push'](_0x5eaa6e['shift']());}}}(_0xc63f,0xa05bc));import{createParser as _0x58b8b9}from'eventsource-parser';function _0xc63f(){const _0x2e8fac=['fetchConversation','/actions/system/','/models/1','catch','fetchConversationMessages','374909ObzVvd','fetchConversations','Content-Type','isPremiumPlugin','name','https://ai.cke-cs.com/v1','application/json','/conversations?','data','/documents/','search','621ZpnqzL','reset','read','/calls','AIConnector','1415504UyrBjW','deleteFile','MAKE_SHORTER','PATCH','attributes','64099NiVHYS','body','/conversations','/files','ai-request-failed','json','ai-request-aborted','CloudServices','_token','Bearer\x20','get','queryAssistant','pluginName','getModels','continue','MAKE_LONGER','fetchDocument','/reviews/custom/calls','then','requires','executeCustomAction','map','deleteDocument','push','5790jownru','startConversation','uploadFile','6140xLtrGt','stringify','uploadDocument','locale','parse','improve-writing','AI_MODEL_DESCRIPTION_','752QbntSL','statusText','keys','deleteWebResource','/actions/custom/calls','status','limit','plugins','deleteConversation','make-shorter','_sendApiRequest','init','uploadUrl','AbortError','config','toString','releaseLock','toUpperCase','fix-grammar','make-tone-casual','/documents','group','542820iIUarQ','DELETE','/reviews/system/','make-longer','IMPROVE_WRITING','TRANSLATE','excludeEmpty','getReader','/web-resources/','executeAction','abortController','context','translate','/messages','ai.serviceUrl','ai-missing-token','updateConversation','CONTINUE','callSystemReview','append','items','decode','_getStreamReader','100','/conversations/','_handleError','true','MAKE_TONE_FORMAL','value','POST','length','signal','request','file','1908819VJDFjO','/web-resources','GET','FIX_GRAMMAR','_decoder','callCustomReview','/files/','isOfficialPlugin','token','4181736DrWjnr','MAKE_TONE_CASUAL','feed','text','make-tone-formal','define','_apiUrl'];_0xc63f=function(){return _0x2e8fac;};return _0xc63f();}import{ContextPlugin as _0x4d729b}from'ckeditor5/src/core.js';import{CKEditorError as _0x44c60c}from'ckeditor5/src/utils.js';import{getTranslation as _0x4d3c15}from'./utils/common-translations.js';export var AIActionsNames;!function(_0x1ca0f6){const _0x2bab08=_0x1257;_0x1ca0f6[_0x2bab08(0x199)]=_0x2bab08(0x15e),_0x1ca0f6[_0x2bab08(0x1ad)]=_0x2bab08(0x184),_0x1ca0f6[_0x2bab08(0x18c)]=_0x2bab08(0x170),_0x1ca0f6[_0x2bab08(0x15f)]=_0x2bab08(0x18b),_0x1ca0f6[_0x2bab08(0x14d)]=_0x2bab08(0x17b),_0x1ca0f6[_0x2bab08(0x1b4)]=_0x2bab08(0x185),_0x1ca0f6[_0x2bab08(0x1a3)]=_0x2bab08(0x1b7),_0x1ca0f6[_0x2bab08(0x18d)]=_0x2bab08(0x194);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x4d729b{[_0x4b09db(0x1b9)];[_0x4b09db(0x158)];[_0x4b09db(0x1ae)];static get[_0x4b09db(0x163)](){const _0x35eac1=_0x4b09db;return[_0x35eac1(0x157)];}static get[_0x4b09db(0x15c)](){const _0x59f5d7=_0x4b09db;return _0x59f5d7(0x14a);}static get[_0x4b09db(0x1b1)](){return!0x0;}static get[_0x4b09db(0x1c2)](){return!0x0;}constructor(_0x8a26e9){const _0x5d5ba8=_0x4b09db;super(_0x8a26e9),this[_0x5d5ba8(0x193)][_0x5d5ba8(0x180)][_0x5d5ba8(0x1b8)](_0x5d5ba8(0x196),_0x5d5ba8(0x140)),this[_0x5d5ba8(0x1b9)]=this[_0x5d5ba8(0x193)][_0x5d5ba8(0x180)][_0x5d5ba8(0x15a)](_0x5d5ba8(0x196)),this[_0x5d5ba8(0x158)]=null,this[_0x5d5ba8(0x1ae)]=new TextDecoder();}[_0x4b09db(0x17d)](){const _0x43047b=_0x4b09db,_0x24e877=this[_0x43047b(0x193)][_0x43047b(0x179)][_0x43047b(0x15a)](_0x43047b(0x157));if(!_0x24e877[_0x43047b(0x1b2)])throw new _0x44c60c(_0x43047b(0x197),this);this[_0x43047b(0x158)]=_0x24e877[_0x43047b(0x1b2)];}[_0x4b09db(0x169)](_0x18c8c3,_0x398bd4){const _0x10308a=_0x4b09db,_0x3411d2=this[_0x10308a(0x17c)](_0x10308a(0x152),_0x10308a(0x1a5),{'id':_0x18c8c3,'group':_0x398bd4});return{'getConversation':async()=>(await _0x3411d2[_0x10308a(0x1a8)])[_0x10308a(0x155)](),'abortController':_0x3411d2[_0x10308a(0x192)]};}[_0x4b09db(0x15b)]({message:_0x1baca4,conversationId:_0xa34248,parts:_0x573e38,capabilities:_0x382c91,model:_0x32d645,quickActionData:_0x18a9b7}){const _0x5fdcf9=_0x4b09db,_0x3ed37a={..._0x18a9b7&&{'quickActionData':_0x18a9b7}},_0x1830fb={'prompt':_0x1baca4,'content':_0x573e38,'model':_0x32d645,..._0x382c91&&{'capabilities':_0x382c91},...Object[_0x5fdcf9(0x174)](_0x3ed37a)[_0x5fdcf9(0x1a6)]>0x0&&{'attributes':_0x3ed37a}},_0x99ee8a=this[_0x5fdcf9(0x17c)](_0x5fdcf9(0x1a0)+_0xa34248+_0x5fdcf9(0x195),_0x5fdcf9(0x1a5),_0x1830fb);return{'getStream':async()=>{const _0x4a1852=_0x5fdcf9,_0x3753ca=(await _0x99ee8a[_0x4a1852(0x1a8)])[_0x4a1852(0x151)];return this[_0x4a1852(0x19e)](_0x3753ca);},'abortController':_0x99ee8a[_0x5fdcf9(0x192)]};}[_0x4b09db(0x164)]({content:_0x47e31e,message:_0x63d180,model:_0x2ce474,outputFormat:_0x3ea86b}){const _0x2a1796=_0x4b09db,_0x560961={'content':[{'type':_0x2a1796(0x1b6),'content':_0x47e31e}],'prompt':_0x63d180,'model':_0x2ce474,'outputFormat':_0x3ea86b},_0x182b1a=this[_0x2a1796(0x17c)](_0x2a1796(0x176),_0x2a1796(0x1a5),_0x560961);return{'getStream':async()=>{const _0x49bbb6=_0x2a1796,_0x20599a=(await _0x182b1a[_0x49bbb6(0x1a8)])[_0x49bbb6(0x151)];return this[_0x49bbb6(0x19e)](_0x20599a);},'abortController':_0x182b1a[_0x2a1796(0x192)]};}[_0x4b09db(0x191)]({actionName:_0x24f70d,content:_0x26b8d5,args:_0x5dd61c}){const _0x3fab0a=_0x4b09db,_0x2edf61={'content':[{'type':_0x3fab0a(0x1b6),'content':_0x26b8d5}],'args':_0x5dd61c},_0x4e5597=this[_0x3fab0a(0x17c)](_0x3fab0a(0x1bb)+_0x24f70d+_0x3fab0a(0x149),_0x3fab0a(0x1a5),_0x2edf61);return{'getStream':async()=>{const _0x231f2c=_0x3fab0a,_0x4e187b=(await _0x4e5597[_0x231f2c(0x1a8)])[_0x231f2c(0x151)];return this[_0x231f2c(0x19e)](_0x4e187b);},'abortController':_0x4e5597[_0x3fab0a(0x192)]};}[_0x4b09db(0x16a)](_0x4287f0,_0x39d8fa,_0x382e30){const _0x4581e8=_0x4b09db,_0x2328c3=new FormData();_0x2328c3[_0x4581e8(0x19b)](_0x4581e8(0x1a9),_0x39d8fa,_0x39d8fa[_0x4581e8(0x13f)]),_0x382e30&&_0x2328c3[_0x4581e8(0x19b)](_0x4581e8(0x14f),JSON[_0x4581e8(0x16c)](_0x382e30));const _0x3ba93e=this[_0x4581e8(0x17c)](_0x4581e8(0x1a0)+_0x4287f0+_0x4581e8(0x153),_0x4581e8(0x1a5),_0x2328c3);return{'getId':async()=>(await _0x3ba93e[_0x4581e8(0x1a8)])[_0x4581e8(0x155)](),'abortController':_0x3ba93e[_0x4581e8(0x192)]};}[_0x4b09db(0x160)](_0x5e0f41,_0x2afa8f){const _0x16e3ee=_0x4b09db,_0x1f5071=this[_0x16e3ee(0x17c)](_0x16e3ee(0x1a0)+_0x5e0f41+_0x16e3ee(0x144)+_0x2afa8f,_0x16e3ee(0x1ac));return{'getDocument':async()=>(await _0x1f5071[_0x16e3ee(0x1a8)])[_0x16e3ee(0x155)](),'abortController':_0x1f5071[_0x16e3ee(0x192)]};}[_0x4b09db(0x16d)](_0x21b9e3,_0x211b8c,_0x42b708){const _0x197013=_0x4b09db,_0x1bd5b4={'content':_0x211b8c};_0x42b708&&(_0x1bd5b4[_0x197013(0x14f)]=_0x42b708);const _0x4c1fc9=this[_0x197013(0x17c)](_0x197013(0x1a0)+_0x21b9e3+_0x197013(0x186),_0x197013(0x1a5),_0x1bd5b4);return{'getId':async()=>(await _0x4c1fc9[_0x197013(0x1a8)])[_0x197013(0x155)](),'abortController':_0x4c1fc9[_0x197013(0x192)]};}[_0x4b09db(0x1c0)](_0x2eb72c,_0x414466){const _0x55ed1c=_0x4b09db,_0x5204f5=new URLSearchParams();_0x5204f5[_0x55ed1c(0x19b)](_0x55ed1c(0x18e),_0x55ed1c(0x1a2)),_0x5204f5[_0x55ed1c(0x19b)](_0x55ed1c(0x178),_0x55ed1c(0x19f)),_0x5204f5[_0x55ed1c(0x19b)](_0x55ed1c(0x187),_0x2eb72c),_0x414466&&_0x5204f5[_0x55ed1c(0x19b)](_0x55ed1c(0x145),_0x414466);const _0x5311f3=this[_0x55ed1c(0x17c)](_0x55ed1c(0x142)+_0x5204f5[_0x55ed1c(0x181)](),_0x55ed1c(0x1ac));return{'getConversations':async()=>{const _0x17e795=_0x55ed1c,_0xbef52=await _0x5311f3[_0x17e795(0x1a8)];return(await _0xbef52[_0x17e795(0x155)]())[_0x17e795(0x19c)];},'abortController':_0x5311f3[_0x55ed1c(0x192)]};}[_0x4b09db(0x17a)](_0x408398){const _0x251095=_0x4b09db,_0x45fb96=this[_0x251095(0x17c)](_0x251095(0x1a0)+_0x408398,_0x251095(0x189));return{'execute':async()=>{const _0x4d2cfe=_0x251095;await _0x45fb96[_0x4d2cfe(0x1a8)];},'abortController':_0x45fb96[_0x251095(0x192)]};}[_0x4b09db(0x198)](_0x5cbe2d,_0x5e8c58){const _0x1e538b=_0x4b09db,_0x28be61=this[_0x1e538b(0x17c)](_0x1e538b(0x1a0)+_0x5cbe2d,_0x1e538b(0x14e),_0x5e8c58);return{'getResult':async()=>(await _0x28be61[_0x1e538b(0x1a8)],_0x5e8c58),'abortController':_0x28be61[_0x1e538b(0x192)]};}[_0x4b09db(0x1ba)](_0x1cddaf){const _0xfebbaf=_0x4b09db,_0x592bbf=this[_0xfebbaf(0x17c)](_0xfebbaf(0x1a0)+_0x1cddaf,_0xfebbaf(0x1ac));return{'getConversation':async()=>(await _0x592bbf[_0xfebbaf(0x1a8)])[_0xfebbaf(0x155)](),'abortController':_0x592bbf[_0xfebbaf(0x192)]};}[_0x4b09db(0x1be)](_0x573376){const _0x43a816=_0x4b09db,_0x7a73e9=this[_0x43a816(0x17c)](_0x43a816(0x1a0)+_0x573376+_0x43a816(0x195),_0x43a816(0x1ac));return{'getMessages':async()=>{const _0x3577d9=_0x43a816,_0x438919=await _0x7a73e9[_0x3577d9(0x1a8)];return(await _0x438919[_0x3577d9(0x155)]())[_0x3577d9(0x19c)];},'abortController':_0x7a73e9[_0x43a816(0x192)]};}[_0x4b09db(0x17e)](_0x1b0efd,_0x20f17b,_0x47b752){const _0x2823ea=_0x4b09db,_0x4cfad7=this[_0x2823ea(0x17c)](_0x2823ea(0x1a0)+_0x1b0efd+_0x2823ea(0x1ab),_0x2823ea(0x1a5),{'url':_0x20f17b,'attributes':_0x47b752});return{'getId':async()=>(await _0x4cfad7[_0x2823ea(0x1a8)])[_0x2823ea(0x155)](),'abortController':_0x4cfad7[_0x2823ea(0x192)]};}[_0x4b09db(0x15d)](){const _0x57820b=_0x4b09db,_0x21bafc=this[_0x57820b(0x17c)](_0x57820b(0x1bc),_0x57820b(0x1ac));return{'list':async()=>{const _0xa88c2c=_0x57820b,_0x596551=await(await _0x21bafc[_0xa88c2c(0x1a8)])[_0xa88c2c(0x155)](),_0x179508=_0x596551[_0xa88c2c(0x19c)][_0xa88c2c(0x165)](_0x4dd29a=>({..._0x4dd29a,'description':_0x4d3c15(this[_0xa88c2c(0x193)][_0xa88c2c(0x16e)],_0xa88c2c(0x171)+_0x4dd29a['id'][_0xa88c2c(0x183)]())}));return{..._0x596551,'items':_0x179508};},'abortController':_0x21bafc[_0x57820b(0x192)]};}[_0x4b09db(0x14c)](_0x3f4f2f,_0x14dda2){const _0x5ec7db=_0x4b09db,_0x147877=this[_0x5ec7db(0x17c)](_0x5ec7db(0x1a0)+_0x3f4f2f+_0x5ec7db(0x1b0)+_0x14dda2,_0x5ec7db(0x189));return{'execute':async()=>{const _0x27c14e=_0x5ec7db;await _0x147877[_0x27c14e(0x1a8)];},'abortController':_0x147877[_0x5ec7db(0x192)]};}[_0x4b09db(0x166)](_0x53b194,_0x434bd2){const _0xc1faab=_0x4b09db,_0x5a22fd=this[_0xc1faab(0x17c)](_0xc1faab(0x1a0)+_0x53b194+_0xc1faab(0x144)+_0x434bd2,_0xc1faab(0x189));return{'execute':async()=>{const _0x5e28b0=_0xc1faab;await _0x5a22fd[_0x5e28b0(0x1a8)];},'abortController':_0x5a22fd[_0xc1faab(0x192)]};}[_0x4b09db(0x175)](_0x67eebc,_0xc55bad){const _0x2eae1b=_0x4b09db,_0x44cf43=this[_0x2eae1b(0x17c)](_0x2eae1b(0x1a0)+_0x67eebc+_0x2eae1b(0x190)+_0xc55bad,_0x2eae1b(0x189));return{'execute':async()=>{const _0x32f91a=_0x2eae1b;await _0x44cf43[_0x32f91a(0x1a8)];},'abortController':_0x44cf43[_0x2eae1b(0x192)]};}[_0x4b09db(0x19a)]({reviewName:_0x3c8d04,content:_0xb60ad9,args:_0x2f10b5}){const _0x27abfe=_0x4b09db,_0x8e5c68=this[_0x27abfe(0x17c)](_0x27abfe(0x18a)+_0x3c8d04+_0x27abfe(0x149),_0x27abfe(0x1a5),{'content':[{'type':_0x27abfe(0x1b6),'content':_0xb60ad9}],'args':_0x2f10b5});return{'getStream':async()=>{const _0x5b27a8=_0x27abfe,_0x3a755a=(await _0x8e5c68[_0x5b27a8(0x1a8)])[_0x5b27a8(0x151)];return this[_0x5b27a8(0x19e)](_0x3a755a);},'abortController':_0x8e5c68[_0x27abfe(0x192)]};}[_0x4b09db(0x1af)]({content:_0x2550fb,prompt:_0x5659c1,model:_0x2c46db}){const _0x3b7c8e=_0x4b09db,_0x484b0d=this[_0x3b7c8e(0x17c)](_0x3b7c8e(0x161),_0x3b7c8e(0x1a5),{'content':[{'type':_0x3b7c8e(0x1b6),'content':_0x2550fb}],'prompt':_0x5659c1,'model':_0x2c46db});return{'getStream':async()=>{const _0x275297=_0x3b7c8e,_0x27ba91=(await _0x484b0d[_0x275297(0x1a8)])[_0x275297(0x151)];return this[_0x275297(0x19e)](_0x27ba91);},'abortController':_0x484b0d[_0x3b7c8e(0x192)]};}[_0x4b09db(0x17c)](_0x1377d4,_0x372dda,_0x4d868a){const _0x51f990=_0x4b09db,_0x441564=new AbortController(),_0x43f3a4=_0x4d868a instanceof FormData,_0x59d463={'Authorization':_0x51f990(0x159)+this[_0x51f990(0x158)]?.[_0x51f990(0x1a4)]};_0x4d868a&&!_0x43f3a4&&(_0x59d463[_0x51f990(0x1c1)]=_0x51f990(0x141));const _0x422463={'method':_0x372dda,'headers':_0x59d463,'signal':_0x441564[_0x51f990(0x1a7)]};return _0x4d868a&&(_0x422463[_0x51f990(0x151)]=_0x43f3a4?_0x4d868a:JSON[_0x51f990(0x16c)](_0x4d868a)),{'request':fetch(''+this[_0x51f990(0x1b9)]+_0x1377d4,_0x422463)[_0x51f990(0x1bd)](_0x53aa32=>{const _0x586b15=_0x51f990;this[_0x586b15(0x1a1)](_0x53aa32);})[_0x51f990(0x162)](_0x3c084b=>{const _0x325a56=_0x51f990;if(!_0x3c084b['ok'])throw new _0x44c60c(_0x325a56(0x154),this,{'url':this[_0x325a56(0x1b9)],'path':_0x1377d4,'method':_0x372dda,'body':_0x4d868a,'status':(_0x3c084b||{})[_0x325a56(0x177)],'statusText':(_0x3c084b||{})[_0x325a56(0x173)]});return _0x3c084b;}),'abortController':_0x441564};}async*[_0x4b09db(0x19e)](_0x24ef35){const _0x3ca5da=_0x4b09db,_0x2efbb7=[],_0x442084=_0x24ef35[_0x3ca5da(0x18f)](),_0xd49bd9=_0x58b8b9({'onError':_0x32d751=>{const _0x166335=_0x3ca5da;this[_0x166335(0x1a1)](_0x32d751);},'onEvent':_0x1e3da5=>{const _0x517745=_0x3ca5da;_0x1e3da5[_0x517745(0x143)]=JSON[_0x517745(0x16f)](_0x1e3da5[_0x517745(0x143)]),_0x2efbb7[_0x517745(0x167)](_0x1e3da5);}});try{let _0x97b6d6=!0x1;for(;!_0x97b6d6;){const {done:_0x321fe9,value:_0x262fdf}=await _0x442084[_0x3ca5da(0x148)]();_0x321fe9&&(_0x97b6d6=!0x0),_0xd49bd9[_0x3ca5da(0x1b5)](this[_0x3ca5da(0x1ae)][_0x3ca5da(0x19d)](_0x262fdf,{'stream':!0x0})),yield*_0x2efbb7,_0x2efbb7[_0x3ca5da(0x1a6)]=0x0;}}catch(_0x4f478d){this[_0x3ca5da(0x1a1)](_0x4f478d);}finally{_0x442084[_0x3ca5da(0x182)](),_0xd49bd9[_0x3ca5da(0x147)]();}}[_0x4b09db(0x1a1)](_0x48eecf){const _0x323144=_0x4b09db;if(_0x48eecf instanceof _0x44c60c)throw _0x48eecf;if(_0x48eecf instanceof Error&&_0x323144(0x17f)===_0x48eecf[_0x323144(0x13f)])throw new _0x44c60c(_0x323144(0x156),this,{'originalError':_0x48eecf});throw new _0x44c60c(_0x323144(0x154),this,{'originalError':_0x48eecf});}}
|
|
23
|
+
function _0x13ba(_0x446869,_0xc41fca){const _0x2a72fe=_0x2a72();return _0x13ba=function(_0x13bab2,_0x538faa){_0x13bab2=_0x13bab2-0x1e7;let _0x435d36=_0x2a72fe[_0x13bab2];return _0x435d36;},_0x13ba(_0x446869,_0xc41fca);}const _0x1ca519=_0x13ba;(function(_0x1bae5e,_0x574c15){const _0x36b157=_0x13ba,_0xea3e07=_0x1bae5e();while(!![]){try{const _0x180195=parseInt(_0x36b157(0x22d))/0x1+parseInt(_0x36b157(0x230))/0x2+-parseInt(_0x36b157(0x1ed))/0x3+-parseInt(_0x36b157(0x258))/0x4*(parseInt(_0x36b157(0x220))/0x5)+-parseInt(_0x36b157(0x215))/0x6+-parseInt(_0x36b157(0x228))/0x7+-parseInt(_0x36b157(0x264))/0x8*(-parseInt(_0x36b157(0x23c))/0x9);if(_0x180195===_0x574c15)break;else _0xea3e07['push'](_0xea3e07['shift']());}catch(_0x3edb48){_0xea3e07['push'](_0xea3e07['shift']());}}}(_0x2a72,0x57c87));import{createParser as _0x179dfe}from'eventsource-parser';function _0x2a72(){const _0x30949b=['/calls/','define','releaseLock','/documents','signal','PATCH','startConversation','get','make-tone-formal','/actions/custom/calls','decode','IMPROVE_WRITING','ai-request-aborted','CloudServices','ai-request-failed','name','_apiUrl','stringify','attributes','parse','callSystemReview','translate','/actions/custom/calls/','fetchConversation','context','token','FIX_GRAMMAR','positiveCount','uploadFile','GET','locale','isOfficialPlugin','MAKE_LONGER','body','1523694MJXFcH','_sendApiRequest','true','_token','data','map','upsertCustomAIReviewRating','continue','CONTINUE','make-tone-casual','/conversations?','2166870YBBtIa','uploadDocument','pluginName','executeCustomAction','_handleError','/web-resources','status','file','1484049TgyAIC','read','reset','json','getModels','121423lOHJYp','/files/','AbortError','299580yrsXAx','fetchConversationMessages','/messages','make-longer','group','deleteDocument','fetchConversations','/documents/','search','/files','/actions/system/','/reviews/custom/calls/','909eYYHrb','Bearer\x20','limit','length','catch','/conversations/','totalCount','feed','/ratings','request','_getStreamReader','ai.serviceUrl','keys','updateConversation','/conversations','init','/models/1','getReader','MAKE_TONE_FORMAL','/web-resources/','queryAssistant','DELETE','upsertAIChatRating','100','then','application/json','requires','excludeEmpty','4AMpRSD','_decoder','text','toUpperCase','/reviews/custom/calls','abortController','AIConnector','upsertAIReviewRating','fetchDocument','MAKE_TONE_CASUAL','fix-grammar','ai-missing-token','89608lZPETg','upsertCustomAIActionRating','deleteWebResource','toString','https://ai.cke-cs.com/v1','/reviews/system/','/messages/','plugins','isPremiumPlugin','AI_MODEL_DESCRIPTION_','/calls','POST','deleteConversation','uploadUrl','MAKE_SHORTER','deleteFile','config','improve-writing','Content-Type','append','callCustomReview','value','executeAction','upsertAIActionRating','PUT','430875WJxZrd','statusText','make-shorter','TRANSLATE','items','push'];_0x2a72=function(){return _0x30949b;};return _0x2a72();}import{ContextPlugin as _0x1f47e9}from'ckeditor5/src/core.js';import{CKEditorError as _0x2debc9}from'ckeditor5/src/utils.js';import{getTranslation as _0x1a55b9}from'./utils/common-translations.js';export var AIActionsNames;!function(_0x194921){const _0x4e0c41=_0x13ba;_0x194921[_0x4e0c41(0x21d)]=_0x4e0c41(0x21c),_0x194921[_0x4e0c41(0x20d)]=_0x4e0c41(0x262),_0x194921[_0x4e0c41(0x1fe)]=_0x4e0c41(0x275),_0x194921[_0x4e0c41(0x213)]=_0x4e0c41(0x233),_0x194921[_0x4e0c41(0x272)]=_0x4e0c41(0x1ef),_0x194921[_0x4e0c41(0x261)]=_0x4e0c41(0x21e),_0x194921[_0x4e0c41(0x24e)]=_0x4e0c41(0x1fb),_0x194921[_0x4e0c41(0x1f0)]=_0x4e0c41(0x208);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x1f47e9{[_0x1ca519(0x203)];[_0x1ca519(0x218)];[_0x1ca519(0x259)];static get[_0x1ca519(0x256)](){const _0x16162f=_0x1ca519;return[_0x16162f(0x200)];}static get[_0x1ca519(0x222)](){const _0x3a0cda=_0x1ca519;return _0x3a0cda(0x25e);}static get[_0x1ca519(0x212)](){return!0x0;}static get[_0x1ca519(0x26c)](){return!0x0;}constructor(_0x3b2d55){const _0xf25b59=_0x1ca519;super(_0x3b2d55),this[_0xf25b59(0x20b)][_0xf25b59(0x274)][_0xf25b59(0x1f4)](_0xf25b59(0x247),_0xf25b59(0x268)),this[_0xf25b59(0x203)]=this[_0xf25b59(0x20b)][_0xf25b59(0x274)][_0xf25b59(0x1fa)](_0xf25b59(0x247)),this[_0xf25b59(0x218)]=null,this[_0xf25b59(0x259)]=new TextDecoder();}[_0x1ca519(0x24b)](){const _0x367c2a=_0x1ca519,_0xb222eb=this[_0x367c2a(0x20b)][_0x367c2a(0x26b)][_0x367c2a(0x1fa)](_0x367c2a(0x200));if(!_0xb222eb[_0x367c2a(0x20c)])throw new _0x2debc9(_0x367c2a(0x263),this);this[_0x367c2a(0x218)]=_0xb222eb[_0x367c2a(0x20c)];}[_0x1ca519(0x1f9)](_0x1de1b4,_0x386714){const _0x436479=_0x1ca519,_0x3f6f57=this[_0x436479(0x216)](_0x436479(0x24a),_0x436479(0x26f),{'id':_0x1de1b4,'group':_0x386714});return{'getConversation':async()=>(await _0x3f6f57[_0x436479(0x245)])[_0x436479(0x22b)](),'abortController':_0x3f6f57[_0x436479(0x25d)]};}[_0x1ca519(0x250)]({message:_0x328732,conversationId:_0x17906c,parts:_0x45f919,capabilities:_0x1e43f2,model:_0xd1de1e,quickActionData:_0x1b3904}){const _0x1ae337=_0x1ca519,_0x3372ac={..._0x1b3904&&{'quickActionData':_0x1b3904}},_0x29ac92={'prompt':_0x328732,'content':_0x45f919,'model':_0xd1de1e,..._0x1e43f2&&{'capabilities':_0x1e43f2},...Object[_0x1ae337(0x248)](_0x3372ac)[_0x1ae337(0x23f)]>0x0&&{'attributes':_0x3372ac}},_0x35c5f9=this[_0x1ae337(0x216)](_0x1ae337(0x241)+_0x17906c+_0x1ae337(0x232),_0x1ae337(0x26f),_0x29ac92);return{'getStream':async()=>{const _0x33ca8b=_0x1ae337,_0x4a0352=(await _0x35c5f9[_0x33ca8b(0x245)])[_0x33ca8b(0x214)];return this[_0x33ca8b(0x246)](_0x4a0352);},'abortController':_0x35c5f9[_0x1ae337(0x25d)]};}[_0x1ca519(0x223)]({content:_0x17a0c7,message:_0x2b3a4f,model:_0xec7ddc,outputFormat:_0x5b1ab2}){const _0x1bcddf=_0x1ca519,_0x11b1df={'content':[{'type':_0x1bcddf(0x25a),'content':_0x17a0c7}],'prompt':_0x2b3a4f,'model':_0xec7ddc,'outputFormat':_0x5b1ab2},_0xdf82c4=this[_0x1bcddf(0x216)](_0x1bcddf(0x1fc),_0x1bcddf(0x26f),_0x11b1df);return{'getStream':async()=>{const _0x56176b=_0x1bcddf,_0x1cdfab=(await _0xdf82c4[_0x56176b(0x245)])[_0x56176b(0x214)];return this[_0x56176b(0x246)](_0x1cdfab);},'abortController':_0xdf82c4[_0x1bcddf(0x25d)]};}[_0x1ca519(0x1ea)]({actionName:_0x256f3d,content:_0x523d6f,args:_0x21615a}){const _0x163371=_0x1ca519,_0x3c81f3={'content':[{'type':_0x163371(0x25a),'content':_0x523d6f}],'args':_0x21615a},_0x5b234b=this[_0x163371(0x216)](_0x163371(0x23a)+_0x256f3d+_0x163371(0x26e),_0x163371(0x26f),_0x3c81f3);return{'getStream':async()=>{const _0x211a04=_0x163371,_0x3c9918=(await _0x5b234b[_0x211a04(0x245)])[_0x211a04(0x214)];return this[_0x211a04(0x246)](_0x3c9918);},'abortController':_0x5b234b[_0x163371(0x25d)]};}[_0x1ca519(0x20f)](_0x48f119,_0x1bbaab,_0x344af9){const _0x34dcbc=_0x1ca519,_0x147016=new FormData();_0x147016[_0x34dcbc(0x1e7)](_0x34dcbc(0x227),_0x1bbaab,_0x1bbaab[_0x34dcbc(0x202)]),_0x344af9&&_0x147016[_0x34dcbc(0x1e7)](_0x34dcbc(0x205),JSON[_0x34dcbc(0x204)](_0x344af9));const _0x4844cc=this[_0x34dcbc(0x216)](_0x34dcbc(0x241)+_0x48f119+_0x34dcbc(0x239),_0x34dcbc(0x26f),_0x147016);return{'getId':async()=>(await _0x4844cc[_0x34dcbc(0x245)])[_0x34dcbc(0x22b)](),'abortController':_0x4844cc[_0x34dcbc(0x25d)]};}[_0x1ca519(0x260)](_0x167958,_0x4befcf){const _0x5441a3=_0x1ca519,_0x5e19da=this[_0x5441a3(0x216)](_0x5441a3(0x241)+_0x167958+_0x5441a3(0x237)+_0x4befcf,_0x5441a3(0x210));return{'getDocument':async()=>(await _0x5e19da[_0x5441a3(0x245)])[_0x5441a3(0x22b)](),'abortController':_0x5e19da[_0x5441a3(0x25d)]};}[_0x1ca519(0x221)](_0x22a4d6,_0x255ddd,_0x1ad5ea){const _0x54d193=_0x1ca519,_0x2b0f32={'content':_0x255ddd};_0x1ad5ea&&(_0x2b0f32[_0x54d193(0x205)]=_0x1ad5ea);const _0x31f933=this[_0x54d193(0x216)](_0x54d193(0x241)+_0x22a4d6+_0x54d193(0x1f6),_0x54d193(0x26f),_0x2b0f32);return{'getId':async()=>(await _0x31f933[_0x54d193(0x245)])[_0x54d193(0x22b)](),'abortController':_0x31f933[_0x54d193(0x25d)]};}[_0x1ca519(0x236)](_0x290eb0,_0x3539eb){const _0x41dac1=_0x1ca519,_0xa7ed2=new URLSearchParams();_0xa7ed2[_0x41dac1(0x1e7)](_0x41dac1(0x257),_0x41dac1(0x217)),_0xa7ed2[_0x41dac1(0x1e7)](_0x41dac1(0x23e),_0x41dac1(0x253)),_0xa7ed2[_0x41dac1(0x1e7)](_0x41dac1(0x234),_0x290eb0),_0x3539eb&&_0xa7ed2[_0x41dac1(0x1e7)](_0x41dac1(0x238),_0x3539eb);const _0x4f766b=this[_0x41dac1(0x216)](_0x41dac1(0x21f)+_0xa7ed2[_0x41dac1(0x267)](),_0x41dac1(0x210));return{'getConversations':async()=>{const _0x23d67b=_0x41dac1,_0x3a657b=await _0x4f766b[_0x23d67b(0x245)];return(await _0x3a657b[_0x23d67b(0x22b)]())[_0x23d67b(0x1f1)];},'abortController':_0x4f766b[_0x41dac1(0x25d)]};}[_0x1ca519(0x270)](_0x12bac7){const _0xdbe30d=_0x1ca519,_0x3b8db1=this[_0xdbe30d(0x216)](_0xdbe30d(0x241)+_0x12bac7,_0xdbe30d(0x251));return{'execute':async()=>{const _0x3aaca2=_0xdbe30d;await _0x3b8db1[_0x3aaca2(0x245)];},'abortController':_0x3b8db1[_0xdbe30d(0x25d)]};}[_0x1ca519(0x249)](_0x11656f,_0x4b7caa){const _0x250210=_0x1ca519,_0x3f2c59=this[_0x250210(0x216)](_0x250210(0x241)+_0x11656f,_0x250210(0x1f8),_0x4b7caa);return{'getResult':async()=>(await _0x3f2c59[_0x250210(0x245)],_0x4b7caa),'abortController':_0x3f2c59[_0x250210(0x25d)]};}[_0x1ca519(0x20a)](_0x3a9821){const _0x14864f=_0x1ca519,_0x58bb73=this[_0x14864f(0x216)](_0x14864f(0x241)+_0x3a9821,_0x14864f(0x210));return{'getConversation':async()=>(await _0x58bb73[_0x14864f(0x245)])[_0x14864f(0x22b)](),'abortController':_0x58bb73[_0x14864f(0x25d)]};}[_0x1ca519(0x231)](_0x1fab27){const _0x252a2e=_0x1ca519,_0x23c1f2=this[_0x252a2e(0x216)](_0x252a2e(0x241)+_0x1fab27+_0x252a2e(0x232),_0x252a2e(0x210));return{'getMessages':async()=>{const _0x3089dd=_0x252a2e,_0xcea7=await _0x23c1f2[_0x3089dd(0x245)];return(await _0xcea7[_0x3089dd(0x22b)]())[_0x3089dd(0x1f1)];},'abortController':_0x23c1f2[_0x252a2e(0x25d)]};}[_0x1ca519(0x271)](_0x34329d,_0x54b812,_0x4a7020){const _0x3ac951=_0x1ca519,_0x3dabfd=this[_0x3ac951(0x216)](_0x3ac951(0x241)+_0x34329d+_0x3ac951(0x225),_0x3ac951(0x26f),{'url':_0x54b812,'attributes':_0x4a7020});return{'getId':async()=>(await _0x3dabfd[_0x3ac951(0x245)])[_0x3ac951(0x22b)](),'abortController':_0x3dabfd[_0x3ac951(0x25d)]};}[_0x1ca519(0x22c)](){const _0x21e1f6=_0x1ca519,_0x267c43=this[_0x21e1f6(0x216)](_0x21e1f6(0x24c),_0x21e1f6(0x210));return{'list':async()=>{const _0x78c91b=_0x21e1f6,_0x5a98a7=await(await _0x267c43[_0x78c91b(0x245)])[_0x78c91b(0x22b)](),_0x1aaf05=_0x5a98a7[_0x78c91b(0x1f1)][_0x78c91b(0x21a)](_0x5e833b=>({..._0x5e833b,'description':_0x1a55b9(this[_0x78c91b(0x20b)][_0x78c91b(0x211)],_0x78c91b(0x26d)+_0x5e833b['id'][_0x78c91b(0x25b)]())}));return{..._0x5a98a7,'items':_0x1aaf05};},'abortController':_0x267c43[_0x21e1f6(0x25d)]};}[_0x1ca519(0x273)](_0x490d4f,_0x432469){const _0xd1b35a=_0x1ca519,_0x4679d6=this[_0xd1b35a(0x216)](_0xd1b35a(0x241)+_0x490d4f+_0xd1b35a(0x22e)+_0x432469,_0xd1b35a(0x251));return{'execute':async()=>{const _0x2a2ab3=_0xd1b35a;await _0x4679d6[_0x2a2ab3(0x245)];},'abortController':_0x4679d6[_0xd1b35a(0x25d)]};}[_0x1ca519(0x235)](_0x45b929,_0x21506e){const _0x251d58=_0x1ca519,_0x35c194=this[_0x251d58(0x216)](_0x251d58(0x241)+_0x45b929+_0x251d58(0x237)+_0x21506e,_0x251d58(0x251));return{'execute':async()=>{const _0x30d612=_0x251d58;await _0x35c194[_0x30d612(0x245)];},'abortController':_0x35c194[_0x251d58(0x25d)]};}[_0x1ca519(0x266)](_0x2392a0,_0x52ca25){const _0x2b0590=_0x1ca519,_0x151dfc=this[_0x2b0590(0x216)](_0x2b0590(0x241)+_0x2392a0+_0x2b0590(0x24f)+_0x52ca25,_0x2b0590(0x251));return{'execute':async()=>{const _0x38e9b6=_0x2b0590;await _0x151dfc[_0x38e9b6(0x245)];},'abortController':_0x151dfc[_0x2b0590(0x25d)]};}[_0x1ca519(0x207)]({reviewName:_0x39789b,content:_0x5cc5ac,args:_0x993600}){const _0x3d01d1=_0x1ca519,_0x296d70=this[_0x3d01d1(0x216)](_0x3d01d1(0x269)+_0x39789b+_0x3d01d1(0x26e),_0x3d01d1(0x26f),{'content':[{'type':_0x3d01d1(0x25a),'content':_0x5cc5ac}],'args':_0x993600});return{'getStream':async()=>{const _0x16e966=_0x3d01d1,_0xcf024d=(await _0x296d70[_0x16e966(0x245)])[_0x16e966(0x214)];return this[_0x16e966(0x246)](_0xcf024d);},'abortController':_0x296d70[_0x3d01d1(0x25d)]};}[_0x1ca519(0x1e8)]({content:_0x3aa76c,prompt:_0x339b3c,model:_0x222b1b}){const _0x1b5bac=_0x1ca519,_0x9e9c54=this[_0x1b5bac(0x216)](_0x1b5bac(0x25c),_0x1b5bac(0x26f),{'content':[{'type':_0x1b5bac(0x25a),'content':_0x3aa76c}],'prompt':_0x339b3c,'model':_0x222b1b});return{'getStream':async()=>{const _0x1d1baa=_0x1b5bac,_0x41f1cb=(await _0x9e9c54[_0x1d1baa(0x245)])[_0x1d1baa(0x214)];return this[_0x1d1baa(0x246)](_0x41f1cb);},'abortController':_0x9e9c54[_0x1b5bac(0x25d)]};}[_0x1ca519(0x252)](_0x580943,_0x168fa9,_0x3e992f){const _0x2cd18e=_0x1ca519,_0x1a873c=this[_0x2cd18e(0x216)](_0x2cd18e(0x241)+_0x580943+_0x2cd18e(0x26a)+_0x168fa9+_0x2cd18e(0x244),_0x2cd18e(0x1ec),{'positiveCount':_0x3e992f[_0x2cd18e(0x20e)],'totalCount':_0x3e992f[_0x2cd18e(0x242)]});return{'execute':async()=>{const _0x36931d=_0x2cd18e;await _0x1a873c[_0x36931d(0x245)];},'abortController':_0x1a873c[_0x2cd18e(0x25d)]};}[_0x1ca519(0x1eb)](_0x5b5c1e,_0x4d6a3b,_0x47d89c){const _0x4df6bc=_0x1ca519,_0x2cb3b4=this[_0x4df6bc(0x216)](_0x4df6bc(0x23a)+_0x5b5c1e+_0x4df6bc(0x1f3)+_0x4d6a3b+_0x4df6bc(0x244),_0x4df6bc(0x1ec),{'positiveCount':_0x47d89c[_0x4df6bc(0x20e)],'totalCount':_0x47d89c[_0x4df6bc(0x242)]});return{'execute':async()=>{const _0x27fd16=_0x4df6bc;await _0x2cb3b4[_0x27fd16(0x245)];},'abortController':_0x2cb3b4[_0x4df6bc(0x25d)]};}[_0x1ca519(0x265)](_0x3239db,_0xe4e83b){const _0x43c892=_0x1ca519,_0x5a074d=this[_0x43c892(0x216)](_0x43c892(0x209)+_0x3239db+_0x43c892(0x244),_0x43c892(0x1ec),{'positiveCount':_0xe4e83b[_0x43c892(0x20e)],'totalCount':_0xe4e83b[_0x43c892(0x242)]});return{'execute':async()=>{const _0x49da39=_0x43c892;await _0x5a074d[_0x49da39(0x245)];},'abortController':_0x5a074d[_0x43c892(0x25d)]};}[_0x1ca519(0x25f)](_0x2aabdc,_0x57a962,_0x54a870){const _0x4dc116=_0x1ca519,_0x5533df=this[_0x4dc116(0x216)](_0x4dc116(0x269)+_0x2aabdc+_0x4dc116(0x1f3)+_0x57a962+_0x4dc116(0x244),_0x4dc116(0x1ec),{'positiveCount':_0x54a870[_0x4dc116(0x20e)],'totalCount':_0x54a870[_0x4dc116(0x242)]});return{'execute':async()=>{const _0x4907b8=_0x4dc116;await _0x5533df[_0x4907b8(0x245)];},'abortController':_0x5533df[_0x4dc116(0x25d)]};}[_0x1ca519(0x21b)](_0x547070,_0x25ece7){const _0x12a87b=_0x1ca519,_0x5c7c3e=this[_0x12a87b(0x216)](_0x12a87b(0x23b)+_0x547070+_0x12a87b(0x244),_0x12a87b(0x1ec),{'positiveCount':_0x25ece7[_0x12a87b(0x20e)],'totalCount':_0x25ece7[_0x12a87b(0x242)]});return{'execute':async()=>{const _0x527f3e=_0x12a87b;await _0x5c7c3e[_0x527f3e(0x245)];},'abortController':_0x5c7c3e[_0x12a87b(0x25d)]};}[_0x1ca519(0x216)](_0x377c51,_0x2d054e,_0x3db215){const _0x2084ae=_0x1ca519,_0x3d88f5=new AbortController(),_0x46116e=_0x3db215 instanceof FormData,_0x35b109={'Authorization':_0x2084ae(0x23d)+this[_0x2084ae(0x218)]?.[_0x2084ae(0x1e9)]};_0x3db215&&!_0x46116e&&(_0x35b109[_0x2084ae(0x276)]=_0x2084ae(0x255));const _0x418f37={'method':_0x2d054e,'headers':_0x35b109,'signal':_0x3d88f5[_0x2084ae(0x1f7)]};return _0x3db215&&(_0x418f37[_0x2084ae(0x214)]=_0x46116e?_0x3db215:JSON[_0x2084ae(0x204)](_0x3db215)),{'request':fetch(''+this[_0x2084ae(0x203)]+_0x377c51,_0x418f37)[_0x2084ae(0x240)](_0x47222f=>{const _0x7de4f1=_0x2084ae;this[_0x7de4f1(0x224)](_0x47222f);})[_0x2084ae(0x254)](_0x441672=>{const _0x23f2b7=_0x2084ae;if(!_0x441672['ok'])throw new _0x2debc9(_0x23f2b7(0x201),this,{'url':this[_0x23f2b7(0x203)],'path':_0x377c51,'method':_0x2d054e,'body':_0x3db215,'status':(_0x441672||{})[_0x23f2b7(0x226)],'statusText':(_0x441672||{})[_0x23f2b7(0x1ee)]});return _0x441672;}),'abortController':_0x3d88f5};}async*[_0x1ca519(0x246)](_0xa9ab35){const _0x4b3a4a=_0x1ca519,_0x232e55=[],_0x4a7bfb=_0xa9ab35[_0x4b3a4a(0x24d)](),_0x3d4413=_0x179dfe({'onError':_0xa3538c=>{const _0x1f40cc=_0x4b3a4a;this[_0x1f40cc(0x224)](_0xa3538c);},'onEvent':_0x4867cc=>{const _0x249148=_0x4b3a4a;_0x4867cc[_0x249148(0x219)]=JSON[_0x249148(0x206)](_0x4867cc[_0x249148(0x219)]),_0x232e55[_0x249148(0x1f2)](_0x4867cc);}});try{let _0x5851b2=!0x1;for(;!_0x5851b2;){const {done:_0x148731,value:_0x2ff67b}=await _0x4a7bfb[_0x4b3a4a(0x229)]();_0x148731&&(_0x5851b2=!0x0),_0x3d4413[_0x4b3a4a(0x243)](this[_0x4b3a4a(0x259)][_0x4b3a4a(0x1fd)](_0x2ff67b,{'stream':!0x0})),yield*_0x232e55,_0x232e55[_0x4b3a4a(0x23f)]=0x0;}}catch(_0x2c06c3){this[_0x4b3a4a(0x224)](_0x2c06c3);}finally{_0x4a7bfb[_0x4b3a4a(0x1f5)](),_0x3d4413[_0x4b3a4a(0x22a)]();}}[_0x1ca519(0x224)](_0x5b2f27){const _0x5ef8a0=_0x1ca519;if(_0x5b2f27 instanceof _0x2debc9)throw _0x5b2f27;if(_0x5b2f27 instanceof Error&&_0x5ef8a0(0x22f)===_0x5b2f27[_0x5ef8a0(0x202)])throw new _0x2debc9(_0x5ef8a0(0x1ff),this,{'originalError':_0x5b2f27});throw new _0x2debc9(_0x5ef8a0(0x201),this,{'originalError':_0x5b2f27});}}
|
package/src/aicore/aiediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4183c7=_0x1246;function _0x3a57(){const _0x19b56b=['end',':start>','_setDataIdsOnChildren','view','plugins','push','data','start','_displayedFakeSelectionLocked','getChildren','ai-selection','editing','conversion','isBefore','element','ck-fake-ai-selection','context','random','ck-ai-assistant-ui_theme','hideFakeVisualSelection','ai-selection:','_nextDataId','name','95543VefoiN','getSelection','fromCharCode','_displayedFakeSelectionId','isContent','getLastMatchingPosition','data-id','RealTimeCollaborationClient','isPremiumPlugin','454148rkdpwH','getRoot','containerElement','ready','$textProxy','sessionId','createUIElement',':start></','modelToViewWithIds','document','9530KMmeai','368PyOTWD','1432416GidPhR','length','_getMarkersInDocumentOrder','isAtEnd','floor','495978uWNahc','dataDowncast','editingDowncast','removeMarker','join','isOpening','pluginName','selection','listenTo','getSelectionText','markerToElement','getStart','setAttribute','emptyElement','for','1249428hVxegU','markerName','getMarkersGroup','model','add','showFakeVisualSelection','addMarker','createRangeIn','AIEditing','toData','_integrateEditor','schema',':end></','isOfficialPlugin','_sessionId','getWalker','isAfter','removeAllRanges','indexOf','sort','getSelectedContent','processor','change',':end>','editors','get','convertAiChatSelectionMarker','toView','createRange','trim','from','version','763392IFHGWC','has','substring','afterInit','markerToHighlight','markers','getDocumentData'];_0x3a57=function(){return _0x19b56b;};return _0x3a57();}(function(_0x453add,_0x3bfeb4){const _0x5f376d=_0x1246,_0x55f4fd=_0x453add();while(!![]){try{const _0x3c2e75=-parseInt(_0x5f376d(0x11a))/0x1+-parseInt(_0x5f376d(0x123))/0x2+parseInt(_0x5f376d(0xfc))/0x3+-parseInt(_0x5f376d(0x12e))/0x4*(-parseInt(_0x5f376d(0x12d))/0x5)+-parseInt(_0x5f376d(0x143))/0x6+parseInt(_0x5f376d(0x134))/0x7+parseInt(_0x5f376d(0x12f))/0x8;if(_0x3c2e75===_0x3bfeb4)break;else _0x55f4fd['push'](_0x55f4fd['shift']());}catch(_0x152a18){_0x55f4fd['push'](_0x55f4fd['shift']());}}}(_0x3a57,0x24583));function _0x1246(_0x281c8c,_0x48cf3a){const _0x3a5715=_0x3a57();return _0x1246=function(_0x1246fa,_0x4aa217){_0x1246fa=_0x1246fa-0xe8;let _0x425ec1=_0x3a5715[_0x1246fa];return _0x425ec1;},_0x1246(_0x281c8c,_0x48cf3a);}import{ViewDowncastWriter as _0x16ae4f}from'ckeditor5/src/engine.js';import{ContextPlugin as _0x1ae342,Editor as _0x486066}from'ckeditor5/src/core.js';import{uid as _0x1ffdf}from'ckeditor5/src/utils.js';import{getEditorFromContext as _0x535ba5}from'./utils/geteditorfromcontext.js';export const AI_VISUAL_SELECTION_MARKER_NAME=_0x4183c7(0x10d);export class AIEditing extends _0x1ae342{[_0x4183c7(0x11d)]=null;[_0x4183c7(0x10b)]=!0x1;[_0x4183c7(0xea)];static get[_0x4183c7(0x13a)](){const _0x4dc730=_0x4183c7;return _0x4dc730(0x14b);}static get[_0x4183c7(0xe9)](){return!0x0;}static get[_0x4183c7(0x122)](){return!0x0;}get[_0x4183c7(0x128)](){const _0x272ff6=_0x4183c7;if(!this[_0x272ff6(0xea)]){const _0x387f89=_0x535ba5(this[_0x272ff6(0x113)]),_0x4a0988=_0x387f89[_0x272ff6(0x107)][_0x272ff6(0xfd)](_0x272ff6(0x121))&&_0x387f89[_0x272ff6(0x107)][_0x272ff6(0xf5)](_0x272ff6(0x121))[_0x272ff6(0x128)];this[_0x272ff6(0xea)]=_0x4a0988||_0x1ffdf();}return this[_0x272ff6(0xea)];}[_0x4183c7(0x102)](){const _0xf34335=_0x4183c7,_0x3981f9=_0x535ba5(this[_0xf34335(0x113)]),_0x390dae=_0x3981f9[_0xf34335(0x146)],_0x1f845d=_0x3981f9[_0xf34335(0x109)][_0xf34335(0xf7)](_0x390dae[_0xf34335(0x12c)][_0xf34335(0x124)](),{'convertAiChatSelectionMarker':!0x0}),_0x205aa0=new _0x16ae4f(_0x3981f9[_0xf34335(0x10e)][_0xf34335(0x106)][_0xf34335(0x12c)]);this[_0xf34335(0x105)](_0x1f845d,_0x205aa0);let _0x3ad2ea=_0x3981f9[_0xf34335(0x109)][_0xf34335(0xf1)][_0xf34335(0x14c)](_0x1f845d);const _0x1bb8ef=this[_0xf34335(0x131)](),_0x3cfedb=[];for(const _0x2c4c53 of _0x1bb8ef){const _0x22eb75='<'+_0x2c4c53[_0xf34335(0x119)]+_0xf34335(0x12a)+_0x2c4c53[_0xf34335(0x119)]+_0xf34335(0x104),_0x3eb3ba=_0x3ad2ea[_0xf34335(0xee)](_0x22eb75);_0x3ad2ea=_0x3ad2ea[_0xf34335(0xfe)](0x0,_0x3eb3ba)+_0x3ad2ea[_0xf34335(0xfe)](_0x3eb3ba+_0x22eb75[_0xf34335(0x130)]);const _0x21ce97='<'+_0x2c4c53[_0xf34335(0x119)]+_0xf34335(0xe8)+_0x2c4c53[_0xf34335(0x119)]+_0xf34335(0xf3),_0x36e2da=_0x3ad2ea[_0xf34335(0xee)](_0x21ce97);_0x3ad2ea=_0x3ad2ea[_0xf34335(0xfe)](0x0,_0x36e2da)+_0x3ad2ea[_0xf34335(0xfe)](_0x36e2da+_0x21ce97[_0xf34335(0x130)]),_0x3cfedb[_0xf34335(0x108)]({'markerName':_0x2c4c53[_0xf34335(0x119)],'start':_0x3eb3ba,'end':_0x36e2da,'htmlFragment':_0x3ad2ea[_0xf34335(0xfe)](_0x3eb3ba,_0x36e2da)});}return{'content':_0x3ad2ea,'version':_0x3981f9[_0xf34335(0x146)][_0xf34335(0x12c)][_0xf34335(0xfb)],'sessionId':this[_0xf34335(0x128)],'selections':_0x3cfedb};}async[_0x4183c7(0xff)](){const _0x8afd55=_0x4183c7;this[_0x8afd55(0x113)]instanceof _0x486066?this[_0x8afd55(0x14d)](this[_0x8afd55(0x113)]):this[_0x8afd55(0x13c)](this[_0x8afd55(0x113)][_0x8afd55(0xf4)],_0x8afd55(0x147),(_0x3bb71a,_0x3cfd6f)=>{const _0x21295f=_0x8afd55;_0x3cfd6f['on'](_0x21295f(0x126),()=>{const _0x1e867a=_0x21295f;this[_0x1e867a(0x14d)](_0x3cfd6f);});});}[_0x4183c7(0x14d)](_0x40d8dd){const _0x179afb=_0x4183c7;_0x40d8dd[_0x179afb(0x10f)][_0x179afb(0x142)](_0x179afb(0x136))[_0x179afb(0x100)]({'model':_0x179afb(0x10d),'view':{'classes':[_0x179afb(0x112),_0x179afb(0x115)],'priority':0xc}}),_0x40d8dd[_0x179afb(0x10f)][_0x179afb(0x142)](_0x179afb(0x135))[_0x179afb(0x13e)]({'model':_0x179afb(0x10d),'view':(_0x5ec91d,{writer:_0x40d030,options:_0x570f69})=>_0x570f69[_0x179afb(0xf6)]?_0x40d030[_0x179afb(0x129)](_0x5ec91d[_0x179afb(0x144)]+':'+(_0x5ec91d[_0x179afb(0x139)]?_0x179afb(0x10a):_0x179afb(0x103))):null});}[_0x4183c7(0x148)](_0x1d56b1,_0x33e541,_0x2e1344=!0x1,_0x39bcb4=!0x1){const _0xae7d48=_0x4183c7;if(this[_0xae7d48(0x10b)]&&!_0x39bcb4)return!0x1;this[_0xae7d48(0x11d)]&&this[_0xae7d48(0x116)](this[_0xae7d48(0x11d)]),this[_0xae7d48(0x11d)]=_0x33e541,this[_0xae7d48(0x10b)]=_0x2e1344;const _0x2fbad2=_0x535ba5(this[_0xae7d48(0x113)])[_0xae7d48(0x146)];return _0x2fbad2[_0xae7d48(0xf2)](_0x1444ed=>{const _0x2f6865=_0xae7d48;let _0x31fa1f=0x0;for(let _0xee2177 of _0x1d56b1){const _0x48fbcc=_0x2f6865(0x117)+_0x31fa1f;if(_0xee2177[_0x2f6865(0x10a)][_0x2f6865(0x132)]){const _0x4b38ce=_0xee2177[_0x2f6865(0x10a)][_0x2f6865(0x11f)](({item:_0x10023a})=>!_0x2fbad2[_0x2f6865(0x14e)][_0x2f6865(0x11e)](_0x10023a),{'boundaries':_0xee2177});_0xee2177=_0x1444ed[_0x2f6865(0xf8)](_0x4b38ce,_0xee2177[_0x2f6865(0x103)]);}_0x1444ed[_0x2f6865(0x149)](_0x48fbcc,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xee2177}),_0x31fa1f++;}}),window[_0xae7d48(0x11b)]()?.[_0xae7d48(0xed)](),!0x0;}[_0x4183c7(0x116)](_0x1fbc9c){const _0x539a9a=_0x4183c7;if(this[_0x539a9a(0x11d)]!=_0x1fbc9c)return!0x1;this[_0x539a9a(0x11d)]=null,this[_0x539a9a(0x10b)]=!0x1;const _0x34e7f5=_0x535ba5(this[_0x539a9a(0x113)]),_0x5c3984=_0x34e7f5[_0x539a9a(0x146)][_0x539a9a(0x101)][_0x539a9a(0x145)](_0x539a9a(0x10d));return _0x34e7f5[_0x539a9a(0x146)][_0x539a9a(0xf2)](_0x3642cf=>{const _0x2f7d47=_0x539a9a;for(const _0x59cdc7 of _0x5c3984)_0x3642cf[_0x2f7d47(0x137)](_0x59cdc7);}),!0x0;}[_0x4183c7(0x12b)](_0x53aa04){const _0xec27c1=_0x4183c7,_0x2764ff=_0x535ba5(this[_0xec27c1(0x113)]),_0x205878=_0x2764ff[_0xec27c1(0x109)][_0xec27c1(0xf7)](_0x53aa04),_0x3b93ff=new _0x16ae4f(_0x2764ff[_0xec27c1(0x10e)][_0xec27c1(0x106)][_0xec27c1(0x12c)]);return this[_0xec27c1(0x105)](_0x205878,_0x3b93ff),_0x205878;}[_0x4183c7(0x105)](_0x1b1bd0,_0xc306bc){const _0x724795=_0x4183c7;let _0x2f07ab=!0x1;const _0x28b018=new Set();for(const _0x3ec406 of _0x1b1bd0[_0x724795(0x10c)]()){const _0x548204=_0x3ec406['is'](_0x724795(0x141))||_0x3ec406['is'](_0x724795(0x125));if(!_0x3ec406['is'](_0x724795(0x111)))continue;(this[_0x724795(0x105)](_0x3ec406,_0xc306bc)||_0x548204)&&(_0xc306bc[_0x724795(0x140)](_0x724795(0x120),this[_0x724795(0x118)](_0x28b018),_0x3ec406),_0x2f07ab=!0x0);}return _0x2f07ab;}[_0x4183c7(0x118)](_0x41a691){const _0x29a1dc=_0x4183c7;let _0x5262ad;do{_0x5262ad='';for(let _0x20b454=0x0;_0x20b454<0x4;_0x20b454++)_0x5262ad+=String[_0x29a1dc(0x11c)](0x61+Math[_0x29a1dc(0x133)](0x1a*Math[_0x29a1dc(0x114)]()));}while(_0x41a691[_0x29a1dc(0xfd)](_0x5262ad));return _0x41a691[_0x29a1dc(0x147)](_0x5262ad),_0x5262ad;}[_0x4183c7(0x13d)](){const _0x197e6f=_0x4183c7,{model:_0x3a63bb}=_0x535ba5(this[_0x197e6f(0x113)]),_0xf6d04f=_0x3a63bb[_0x197e6f(0x12c)][_0x197e6f(0x13b)],_0x590c5a=_0x3a63bb[_0x197e6f(0xf0)](_0xf6d04f),_0x5392dc=[],_0x1ce648=_0x3a63bb[_0x197e6f(0x14a)](_0x590c5a)[_0x197e6f(0xeb)]();for(const {item:_0x4ff63e}of _0x1ce648)_0x4ff63e['is'](_0x197e6f(0x127))?_0x5392dc[_0x197e6f(0x108)](_0x4ff63e[_0x197e6f(0x109)]):_0x4ff63e['is'](_0x197e6f(0x111))&&_0x5392dc[_0x197e6f(0x130)]>0x0&&'\x20'!==_0x5392dc[_0x5392dc[_0x197e6f(0x130)]-0x1]&&_0x5392dc[_0x197e6f(0x108)]('\x20');return'\x22'+_0x5392dc[_0x197e6f(0x138)]('')[_0x197e6f(0xf9)]()+'\x22';}[_0x4183c7(0x131)](){const _0x3eb670=_0x4183c7,_0x31fad2=_0x535ba5(this[_0x3eb670(0x113)])[_0x3eb670(0x146)];return Array[_0x3eb670(0xfa)](_0x31fad2[_0x3eb670(0x101)][_0x3eb670(0x145)](_0x3eb670(0x10d)))[_0x3eb670(0xef)]((_0x45b58c,_0x23ccd8)=>_0x45b58c[_0x3eb670(0x13f)]()[_0x3eb670(0x110)](_0x23ccd8[_0x3eb670(0x13f)]())?-0x1:_0x45b58c[_0x3eb670(0x13f)]()[_0x3eb670(0xec)](_0x23ccd8[_0x3eb670(0x13f)]())?0x1:0x0);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x3ab61f=_0x15f4;function _0x58a3(){const _0x5dce76=['_isReasoningEnabled','reset','reasoning','getCapabilitiesRequestData','webSearch','toggleWebSearch','fire','9JIVbNJ','isWebSearchEnabled','capabilitiesUpdated','setWebSearch','42AkAJCo','4378336oFpFUq','isReasoningEnabled','1016840xZaMfS','1147430FojDHO','toggleReasoning','setReasoning','2470482DTGMaq','12808UVEugs','getCapabilitiesConfig','_isWebSearchEnabled','79456zjlJAq','100565EBdMfF','init','132xxKorG'];_0x58a3=function(){return _0x5dce76;};return _0x58a3();}(function(_0x50baba,_0x42fbe1){const _0x835698=_0x15f4,_0x4cec03=_0x50baba();while(!![]){try{const _0x44b136=parseInt(_0x835698(0x127))/0x1+-parseInt(_0x835698(0x124))/0x2*(-parseInt(_0x835698(0x12a))/0x3)+-parseInt(_0x835698(0x11f))/0x4+-parseInt(_0x835698(0x128))/0x5*(parseInt(_0x835698(0x11c))/0x6)+-parseInt(_0x835698(0x123))/0x7+parseInt(_0x835698(0x11d))/0x8+-parseInt(_0x835698(0x118))/0x9*(-parseInt(_0x835698(0x120))/0xa);if(_0x44b136===_0x42fbe1)break;else _0x4cec03['push'](_0x4cec03['shift']());}catch(_0x112899){_0x4cec03['push'](_0x4cec03['shift']());}}}(_0x58a3,0x4338c));function _0x15f4(_0x32ac71,_0x59c8c2){const _0x58a388=_0x58a3();return _0x15f4=function(_0x15f46c,_0x2d53f4){_0x15f46c=_0x15f46c-0x114;let _0x4cc6b6=_0x58a388[_0x15f46c];return _0x4cc6b6;},_0x15f4(_0x32ac71,_0x59c8c2);}import{EmitterMixin as _0x59d89a}from'ckeditor5/src/utils.js';export const CAPABILITIES_MODEL_EVENT_NAMES=[_0x3ab61f(0x11a)];export class AICapabilities extends _0x59d89a(){[_0x3ab61f(0x126)];[_0x3ab61f(0x12b)];constructor(){const _0x58f939=_0x3ab61f;super(),this[_0x58f939(0x126)]=!0x1,this[_0x58f939(0x12b)]=!0x1;}[_0x3ab61f(0x129)](){const _0x5ba865=_0x3ab61f;this[_0x5ba865(0x12c)]();}[_0x3ab61f(0x12c)](){const _0x1fba3f=_0x3ab61f;this[_0x1fba3f(0x11b)](!0x1),this[_0x1fba3f(0x122)](!0x1);}[_0x3ab61f(0x125)](){const _0x3a8fe3=_0x3ab61f;return{'isWebSearchEnabled':this[_0x3a8fe3(0x126)],'isReasoningEnabled':this[_0x3a8fe3(0x12b)]};}static[_0x3ab61f(0x114)](_0x5bc23c){const _0x39a9a1=_0x3ab61f,_0x44e0d9={};return _0x5bc23c&&_0x5bc23c[_0x39a9a1(0x119)]&&(_0x44e0d9[_0x39a9a1(0x115)]={}),_0x5bc23c&&_0x5bc23c[_0x39a9a1(0x11e)]&&(_0x44e0d9[_0x39a9a1(0x12d)]={}),_0x44e0d9;}[_0x3ab61f(0x116)](){const _0x25aa36=_0x3ab61f;this[_0x25aa36(0x11b)](!this[_0x25aa36(0x126)]);}[_0x3ab61f(0x121)](){const _0xba29f3=_0x3ab61f;this[_0xba29f3(0x122)](!this[_0xba29f3(0x12b)]);}[_0x3ab61f(0x11b)](_0xe738a9){const _0x404d1c=_0x3ab61f;_0xe738a9!==this[_0x404d1c(0x126)]&&(this[_0x404d1c(0x126)]=_0xe738a9,this[_0x404d1c(0x117)](_0x404d1c(0x11a),this[_0x404d1c(0x125)]()));}[_0x3ab61f(0x122)](_0x23b0ce){const _0x43febd=_0x3ab61f;_0x23b0ce!==this[_0x43febd(0x12b)]&&(this[_0x43febd(0x12b)]=_0x23b0ce,this[_0x43febd(0x117)](_0x43febd(0x11a),this[_0x43febd(0x125)]()));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x5e5714,_0x973bb0){var _0x5e40b9=_0x3325,_0x4df101=_0x5e5714();while(!![]){try{var _0x1e3fe3=parseInt(_0x5e40b9(0x197))/0x1*(parseInt(_0x5e40b9(0x190))/0x2)+parseInt(_0x5e40b9(0x195))/0x3*(parseInt(_0x5e40b9(0x192))/0x4)+parseInt(_0x5e40b9(0x18e))/0x5+-parseInt(_0x5e40b9(0x18a))/0x6*(-parseInt(_0x5e40b9(0x199))/0x7)+parseInt(_0x5e40b9(0x188))/0x8+parseInt(_0x5e40b9(0x198))/0x9+-parseInt(_0x5e40b9(0x19a))/0xa;if(_0x1e3fe3===_0x973bb0)break;else _0x4df101['push'](_0x4df101['shift']());}catch(_0x558a36){_0x4df101['push'](_0x4df101['shift']());}}}(_0x29f7,0xcd920));function _0x3325(_0x532ca4,_0x2c3582){var _0x29f7da=_0x29f7();return _0x3325=function(_0x332558,_0x4ff248){_0x332558=_0x332558-0x186;var _0x343ce2=_0x29f7da[_0x332558];return _0x343ce2;},_0x3325(_0x532ca4,_0x2c3582);}function _0x29f7(){var _0xadcea3=['selection','FILE','TEXT','3491745JeNENf','URL','1040362jFriNY','html','4IEWmPC','document','SELECTION','3822495UBmECt','markdown','2ORkpYQ','2473092BcDwSn','21byhATP','42357670qmSGxv','HTML','file','MARKDOWN','text','DOCUMENT','2421104RFiieJ','web-resource','2974962zdMDjz'];_0x29f7=function(){return _0xadcea3;};return _0x29f7();}export var AIContextItemType;!function(_0x4ae26c){var _0x30b1a5=_0x3325;_0x4ae26c[_0x30b1a5(0x18c)]=_0x30b1a5(0x19c),_0x4ae26c[_0x30b1a5(0x187)]=_0x30b1a5(0x193),_0x4ae26c[_0x30b1a5(0x18f)]=_0x30b1a5(0x189),_0x4ae26c[_0x30b1a5(0x18d)]=_0x30b1a5(0x186),_0x4ae26c[_0x30b1a5(0x194)]=_0x30b1a5(0x18b);}(AIContextItemType||(AIContextItemType={}));export var AIContextTextResourceType;!function(_0x2091c0){var _0x2caa41=_0x3325;_0x2091c0[_0x2caa41(0x18d)]=_0x2caa41(0x186),_0x2091c0[_0x2caa41(0x19d)]=_0x2caa41(0x196),_0x2091c0[_0x2caa41(0x19b)]=_0x2caa41(0x191);}(AIContextTextResourceType||(AIContextTextResourceType={}));
|
|
@@ -6,7 +6,7 @@ import { type AIConnectorRequest, type AIConnector } from '../aiconnector.js';
|
|
|
6
6
|
import { AIReply } from './aireply.js';
|
|
7
7
|
import { type Editor } from 'ckeditor5/src/core.js';
|
|
8
8
|
import { type AIContextItem } from './aicontext.js';
|
|
9
|
-
export declare const AI_MODEL_EVENT_NAMES: readonly ["interactionCreated", "interactionStarted", "interactionStopped", "interactionFinished", "interactionDestroyed", "replyCreated", "replyContentUpdated", "replyChangeGroupStateUpdated", "setConversationTitle", "error"];
|
|
9
|
+
export declare const AI_MODEL_EVENT_NAMES: readonly ["interactionCreated", "interactionStarted", "interactionStopped", "interactionFinished", "interactionDestroyed", "replyCreated", "replyContentUpdated", "replyChangeGroupStateUpdated", "setConversationTitle", "webSearchStarted", "webSearchFinished", "reasoningStarted", "reasoningFinished", "error"];
|
|
10
10
|
declare const AIInteraction_base: {
|
|
11
11
|
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
12
12
|
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
@@ -29,6 +29,14 @@ export declare abstract class AIInteraction extends /* #__PURE__ */ AIInteractio
|
|
|
29
29
|
* The AI endpoint replies to the user message.
|
|
30
30
|
*/
|
|
31
31
|
replies: Array<AIReply>;
|
|
32
|
+
/**
|
|
33
|
+
* Message ID returned by the AI endpoint used for rating requests.
|
|
34
|
+
*/
|
|
35
|
+
messageId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Action call ID returned by the AI endpoint used for rating requests.
|
|
38
|
+
*/
|
|
39
|
+
actionCallId?: string;
|
|
32
40
|
constructor({ connector, editor }: AIInteractionOptions);
|
|
33
41
|
/**
|
|
34
42
|
* Sends the request to the AI endpoint.
|
|
@@ -132,4 +140,36 @@ export type AISetConversationTitleEvent = {
|
|
|
132
140
|
name: 'setConversationTitle';
|
|
133
141
|
args: [title: string, shouldAnimate?: boolean];
|
|
134
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
|
|
145
|
+
* the web search was performed.
|
|
146
|
+
*/
|
|
147
|
+
export type AIWebSearchStartedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
148
|
+
name: 'webSearchStarted';
|
|
149
|
+
args: [interaction: TInteraction];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
|
|
153
|
+
* the web search was performed.
|
|
154
|
+
*/
|
|
155
|
+
export type AIWebSearchFinishedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
156
|
+
name: 'webSearchFinished';
|
|
157
|
+
args: [interaction: TInteraction];
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
|
|
161
|
+
* the reasoning was performed.
|
|
162
|
+
*/
|
|
163
|
+
export type AIReasoningStartedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
164
|
+
name: 'reasoningStarted';
|
|
165
|
+
args: [interaction: TInteraction];
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
|
|
169
|
+
* the reasoning was performed.
|
|
170
|
+
*/
|
|
171
|
+
export type AIReasoningFinishedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
172
|
+
name: 'reasoningFinished';
|
|
173
|
+
args: [interaction: TInteraction];
|
|
174
|
+
};
|
|
135
175
|
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x1f8e1e=_0x3ad7;(function(_0x17f245,_0x50ae31){const _0x3d15ae=_0x3ad7,_0x5de641=_0x17f245();while(!![]){try{const _0x2a6c0b=-parseInt(_0x3d15ae(0x1a2))/0x1*(-parseInt(_0x3d15ae(0x199))/0x2)+-parseInt(_0x3d15ae(0x1a0))/0x3*(parseInt(_0x3d15ae(0x19a))/0x4)+-parseInt(_0x3d15ae(0x1bd))/0x5*(-parseInt(_0x3d15ae(0x1d6))/0x6)+parseInt(_0x3d15ae(0x1a8))/0x7*(parseInt(_0x3d15ae(0x1aa))/0x8)+-parseInt(_0x3d15ae(0x1c7))/0x9*(-parseInt(_0x3d15ae(0x1ab))/0xa)+parseInt(_0x3d15ae(0x1a3))/0xb+-parseInt(_0x3d15ae(0x192))/0xc;if(_0x2a6c0b===_0x50ae31)break;else _0x5de641['push'](_0x5de641['shift']());}catch(_0x5e7a7b){_0x5de641['push'](_0x5de641['shift']());}}}(_0xde5e,0xe9767));function _0x3ad7(_0x555712,_0x4ba4a1){const _0xde5e58=_0xde5e();return _0x3ad7=function(_0x3ad7cf,_0x2b288c){_0x3ad7cf=_0x3ad7cf-0x18e;let _0x471b84=_0xde5e58[_0x3ad7cf];return _0x471b84;},_0x3ad7(_0x555712,_0x4ba4a1);}import{CKEditorError as _0x4a42d2,EmitterMixin as _0x4fb59a,logWarning as _0x27176a,uid as _0x1e72a4}from'ckeditor5/src/utils.js';function _0xde5e(){const _0x494ac3=['callId','replyChangeGroupStateUpdated','ai-interaction-invalid-event-type','getReply','abortController','webSearchStarted','currentRequest','find','replyCreated','editor','getStream','reasoningStarted','action-metadata','textDelta','96PsizKC','stop','push','isDestroyed','connector','41782596HQGsvV','stopListening','currentReply','content','_isWebSearching','modification-delta','messageId','2JQPWgE','8CleLsP','message-metadata','interactionStopped','interactionFinished','reasoningFinished','_finalizeInteraction','45987enLwjg','interactionDestroyed','675079kNdwAl','5666199IBkulN','sendRequest','createReply','replyContentUpdated','actionCallId','49903VCrYlw','done','1432XXXOXk','10PXSouk','replies','destroy','fire','isStopped','splice','web-search','interactionStarted','sources','length','webSearchFinished','delegate','ai-chat-interaction-error','abort','error','getDocumentContext','forEach','setConversationTitle','179405SxJPss','_isReasoning','start','conversationTitle','event','reasoning','data','interactionCreated','appendContent','source','12855861OyxPXJ'];_0xde5e=function(){return _0x494ac3;};return _0xde5e();}import{AIReply as _0x4e4328,isIgnoredReplyType as _0x57099b,isValidReplyType as _0x50190e,isReplyTitleType as _0xbf6b22,isSourceType as _0x276ee0}from'./aireply.js';export const AI_MODEL_EVENT_NAMES=[_0x1f8e1e(0x1c4),_0x1f8e1e(0x1b2),_0x1f8e1e(0x19c),_0x1f8e1e(0x19d),_0x1f8e1e(0x1a1),_0x1f8e1e(0x1d0),_0x1f8e1e(0x1a6),_0x1f8e1e(0x1c9),_0x1f8e1e(0x1bc),_0x1f8e1e(0x1cd),_0x1f8e1e(0x1b5),_0x1f8e1e(0x1d3),_0x1f8e1e(0x19e),_0x1f8e1e(0x1b9)];export class AIInteraction extends _0x4fb59a(){['id'];[_0x1f8e1e(0x1ac)]=[];[_0x1f8e1e(0x194)];[_0x1f8e1e(0x198)];[_0x1f8e1e(0x1a7)];[_0x1f8e1e(0x1ce)];[_0x1f8e1e(0x191)];[_0x1f8e1e(0x1af)]=!0x1;[_0x1f8e1e(0x190)]=!0x1;[_0x1f8e1e(0x1d1)];[_0x1f8e1e(0x1be)]=!0x1;[_0x1f8e1e(0x196)]=!0x1;constructor({connector:_0x26d653,editor:_0xa2a4f0}){const _0x45428d=_0x1f8e1e;super(),this['id']=_0x1e72a4(),this[_0x45428d(0x191)]=_0x26d653,this[_0x45428d(0x1af)]=!0x0,this[_0x45428d(0x1d1)]=_0xa2a4f0;}async[_0x1f8e1e(0x1bf)](){const _0x1b6025=_0x1f8e1e;let _0x4f2a2a;const _0x3b1a30=[];this[_0x1b6025(0x1af)]=!0x1;try{this[_0x1b6025(0x1ce)]=await this[_0x1b6025(0x1a4)](),this[_0x1b6025(0x1ae)](_0x1b6025(0x1b2),this);const _0x2de625=await this[_0x1b6025(0x1ce)][_0x1b6025(0x1d2)]();for await(const _0xcdd357 of _0x2de625){if(this[_0x1b6025(0x1af)])return;if(_0x1b6025(0x1b9)===_0xcdd357[_0x1b6025(0x1c1)])return void this[_0x1b6025(0x1ae)](_0x1b6025(0x1b9),{'error':new _0x4a42d2(_0x1b6025(0x1b7),this)});if(_0x1b6025(0x19b)!==_0xcdd357[_0x1b6025(0x1c1)]){if(_0x1b6025(0x1d4)!==_0xcdd357[_0x1b6025(0x1c1)]){if(_0xbf6b22(_0xcdd357[_0x1b6025(0x1c1)])&&this[_0x1b6025(0x1bc)](_0xcdd357[_0x1b6025(0x1c3)][_0x1b6025(0x1c0)],!0x0),_0x276ee0(_0xcdd357[_0x1b6025(0x1c1)]))_0x3b1a30[_0x1b6025(0x18f)](_0xcdd357[_0x1b6025(0x1c3)][_0x1b6025(0x1c6)]);else{if(_0x50190e(_0xcdd357[_0x1b6025(0x1c1)])){if(_0xcdd357[_0x1b6025(0x1c1)]!==_0x4f2a2a){if(_0x4f2a2a=_0xcdd357[_0x1b6025(0x1c1)],_0x1b6025(0x1b1)===_0xcdd357[_0x1b6025(0x1c1)]){this[_0x1b6025(0x196)]||(this[_0x1b6025(0x196)]=!0x0,this[_0x1b6025(0x1ae)](_0x1b6025(0x1cd),this));continue;}if(_0x1b6025(0x1c2)===_0xcdd357[_0x1b6025(0x1c1)]){this[_0x1b6025(0x1be)]||(this[_0x1b6025(0x1be)]=!0x0,this[_0x1b6025(0x1ae)](_0x1b6025(0x1d3),this));continue;}this[_0x1b6025(0x1be)]&&(this[_0x1b6025(0x1be)]=!0x1,this[_0x1b6025(0x1ae)](_0x1b6025(0x19e),this)),this[_0x1b6025(0x196)]&&(this[_0x1b6025(0x196)]=!0x1,this[_0x1b6025(0x1ae)](_0x1b6025(0x1b5),this)),this[_0x1b6025(0x194)]&&this[_0x1b6025(0x194)][_0x1b6025(0x1a9)](),this[_0x1b6025(0x194)]=this[_0x1b6025(0x1a5)]({'type':_0xcdd357[_0x1b6025(0x1c1)],'interactionId':this['id']}),_0x3b1a30[_0x1b6025(0x1b4)]>0x0&&_0x1b6025(0x197)===_0xcdd357[_0x1b6025(0x1c1)]&&(this[_0x1b6025(0x194)][_0x1b6025(0x1b3)]=_0x3b1a30[_0x1b6025(0x1b0)](0x0));}_0xcdd357[_0x1b6025(0x1c3)][_0x1b6025(0x1d5)]&&this[_0x1b6025(0x194)][_0x1b6025(0x1c5)](_0xcdd357[_0x1b6025(0x1c3)][_0x1b6025(0x1d5)]);}else _0x57099b(_0xcdd357[_0x1b6025(0x1c1)])||_0x27176a(_0x1b6025(0x1ca),{'chunk':_0xcdd357});}}else this[_0x1b6025(0x1a7)]=_0xcdd357[_0x1b6025(0x1c3)][_0x1b6025(0x1c8)];}else this[_0x1b6025(0x198)]=_0xcdd357[_0x1b6025(0x1c3)]['id'];}}finally{this[_0x1b6025(0x1af)]||(_0x3b1a30[_0x1b6025(0x1b4)]>0x0&&(this[_0x1b6025(0x194)][_0x1b6025(0x1b3)]=_0x3b1a30[_0x1b6025(0x1b0)](0x0)),this[_0x1b6025(0x19f)](),this[_0x1b6025(0x1ae)](_0x1b6025(0x19d),this));}}[_0x1f8e1e(0x18e)](){const _0xaa3ed9=_0x1f8e1e;this[_0xaa3ed9(0x1af)]||(this[_0xaa3ed9(0x19f)](),this[_0xaa3ed9(0x1ae)](_0xaa3ed9(0x19c),this));}[_0x1f8e1e(0x1cb)](_0x137794){const _0x2e7071=_0x1f8e1e;return this[_0x2e7071(0x1ac)][_0x2e7071(0x1cf)](_0x448a4f=>_0x448a4f['id']===_0x137794);}[_0x1f8e1e(0x1ad)](){const _0x55e796=_0x1f8e1e;this[_0x55e796(0x190)]||(this[_0x55e796(0x18e)](),this[_0x55e796(0x1ac)][_0x55e796(0x1bb)](_0x3c0423=>_0x3c0423[_0x55e796(0x1ad)]()),this[_0x55e796(0x1ac)]=[],this[_0x55e796(0x190)]=!0x0,this[_0x55e796(0x1ae)](_0x55e796(0x1a1),this),this[_0x55e796(0x193)]());}[_0x1f8e1e(0x1a5)](_0xcc2611){const _0x27f003=_0x1f8e1e,_0x58c3db=new _0x4e4328({'editor':this[_0x27f003(0x1d1)],'documentContextContent':this[_0x27f003(0x1ba)]()?.[_0x27f003(0x195)],..._0xcc2611});return this[_0x27f003(0x1ac)][_0x27f003(0x18f)](_0x58c3db),_0x58c3db[_0x27f003(0x1b6)](...AI_MODEL_EVENT_NAMES)['to'](this),this[_0x27f003(0x1ae)](_0x27f003(0x1d0),_0x58c3db),_0x58c3db;}[_0x1f8e1e(0x1bc)](_0x4f5b41,_0x28abdb=!0x1){const _0x57f51c=_0x1f8e1e;this[_0x57f51c(0x1ae)](_0x57f51c(0x1bc),_0x4f5b41,_0x28abdb);}[_0x1f8e1e(0x19f)](){const _0x3f2f1a=_0x1f8e1e;this[_0x3f2f1a(0x1af)]=!0x0,this[_0x3f2f1a(0x1ce)]&&this[_0x3f2f1a(0x1ce)][_0x3f2f1a(0x1cc)][_0x3f2f1a(0x1b8)](),this[_0x3f2f1a(0x194)]&&this[_0x3f2f1a(0x194)][_0x3f2f1a(0x1a9)](),this[_0x3f2f1a(0x1ce)]=this[_0x3f2f1a(0x194)]=void 0x0;}}
|
|
@@ -8,11 +8,11 @@ import { type AISuggestionContentPartDefinition } from '../utils/getsuggestionpa
|
|
|
8
8
|
/**
|
|
9
9
|
* The reply types that are provided by the AI endpoint.
|
|
10
10
|
*/
|
|
11
|
-
export declare const AI_REPLY_TYPES: readonly ["modification-delta", "text-delta"];
|
|
11
|
+
export declare const AI_REPLY_TYPES: readonly ["modification-delta", "text-delta", "web-search", "reasoning"];
|
|
12
12
|
/**
|
|
13
13
|
* The reply types that are intentionally ignored.
|
|
14
14
|
*/
|
|
15
|
-
export declare const AI_REPLY_TYPES_IGNORED: readonly ["
|
|
15
|
+
export declare const AI_REPLY_TYPES_IGNORED: readonly ["conversation-title"];
|
|
16
16
|
/**
|
|
17
17
|
* The type of the reply that is responsible for the conversation title.
|
|
18
18
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x38d392=_0x2c56;(function(_0x285fd8,_0x537f3e){const _0xcde2c0=_0x2c56,_0x356ada=_0x285fd8();while(!![]){try{const _0x1c9fc3=parseInt(_0xcde2c0(0x77))/0x1*(parseInt(_0xcde2c0(0xb5))/0x2)+parseInt(_0xcde2c0(0xb9))/0x3*(-parseInt(_0xcde2c0(0xb2))/0x4)+parseInt(_0xcde2c0(0x9c))/0x5*(-parseInt(_0xcde2c0(0x7d))/0x6)+-parseInt(_0xcde2c0(0x7f))/0x7*(-parseInt(_0xcde2c0(0x78))/0x8)+parseInt(_0xcde2c0(0x7a))/0x9+-parseInt(_0xcde2c0(0x9f))/0xa+-parseInt(_0xcde2c0(0x7e))/0xb*(parseInt(_0xcde2c0(0xab))/0xc);if(_0x1c9fc3===_0x537f3e)break;else _0x356ada['push'](_0x356ada['shift']());}catch(_0x689fbf){_0x356ada['push'](_0x356ada['shift']());}}}(_0x1864,0xdc95e));function _0x2c56(_0x1ad097,_0x28fa46){const _0x1864b4=_0x1864();return _0x2c56=function(_0x2c56b8,_0x213733){_0x2c56b8=_0x2c56b8-0x72;let _0x54b6ff=_0x1864b4[_0x2c56b8];return _0x54b6ff;},_0x2c56(_0x1ad097,_0x28fa46);}import{ObservableMixin as _0x39cc7f,uid as _0x326c5f}from'ckeditor5/src/utils.js';import{Element as _0x35fbbb,findAll as _0x4bb407,getAttribute as _0x26c7bf,getParents as _0x4eb5ea,Document as _0x4f034e,parse as _0xcaf1c9,Text as _0x1ef4b0}from'../utils/htmlparser.js';import{AIResponseParser as _0x5ebe39}from'../pipeline/airesponseparser.js';import{AIResponseApplier as _0x3b8401}from'../pipeline/airesponseapplier.js';export const AI_REPLY_TYPES=[_0x38d392(0x98),_0x38d392(0xa2),_0x38d392(0x84),_0x38d392(0xb8)];function _0x1864(){const _0x294484=['aiResponseParser','data-id','Removed\x20content.\x20Use\x20\x22Show\x20changes\x22\x20to\x20learn\x20more.','2426084yAgigY','previousSibling','index','2xiUaaA','stopListening','fire','reasoning','6miHZxU','source','cloneNode','documentContextContent','context','data-unstable','appendContent','changes','state','parseAndNormalizeHTML','1466274FSoTVb','7266104BFTJbA','replyContentUpdated','12407976NrPtda','forEach','unshift','49014puEelO','11yWYDTr','7DvPwnT','parsedContent','change:content','pending','length','web-search','modified','node','aiResponseApplier','newNodeIds','map','set','setChangeGroupState','type','sources','areActionsDisabled','updateChangeGroups','replyChangeGroupStateUpdated','content','changeGroups','interactionId','span','nextSibling','parsedMergedContent','convertMarkdownToHTML','modification-delta','editor','values','isDone','970OwcqOv','merge','modifiedNodeIds','451460wXbkHB','color:\x20#808080;\x20font-style:\x20italic','onContentChange','text-delta','push','new','destroy','filter','removedNodeIds','includes','done','_getDifferentChangeGroups','80508oeDvUB','conversation-title','removed','every'];_0x1864=function(){return _0x294484;};return _0x1864();}export const AI_REPLY_TYPES_IGNORED=[_0x38d392(0xac)];export const AI_REPLY_TITLE_TYPE=_0x38d392(0xac);export class AIReply extends _0x39cc7f(){['id'];[_0x38d392(0x93)];[_0x38d392(0x8c)];[_0x38d392(0x8d)]=[];[_0x38d392(0x80)]=new _0x4f034e([]);[_0x38d392(0x96)]=new _0x4f034e([]);[_0x38d392(0x92)]=[];[_0x38d392(0x8e)]=!0x1;[_0x38d392(0xbc)];[_0x38d392(0xaf)];[_0x38d392(0x87)];[_0x38d392(0x99)];constructor({type:_0x427890,content:_0x54d1e0='',isDone:_0x10ed38=!0x1,interactionId:_0x1ffe0b,areActionsDisabled:_0x279307,documentContextContent:_0x5bb405,editor:_0x3c9c01}){const _0x4eae3d=_0x38d392;super(),this['id']=_0x326c5f(),this[_0x4eae3d(0x93)]=_0x1ffe0b,this[_0x4eae3d(0x8c)]=_0x427890,this[_0x4eae3d(0x8e)]=!!_0x279307,this[_0x4eae3d(0x99)]=_0x3c9c01,this[_0x4eae3d(0xaf)]=new _0x5ebe39(),this[_0x4eae3d(0x87)]=new _0x3b8401(),this[_0x4eae3d(0xbc)]=_0xcaf1c9(_0x5bb405||''),this[_0x4eae3d(0x8a)](_0x4eae3d(0x9b),_0x10ed38),this['on'](_0x4eae3d(0x81),()=>{const _0x37b3f4=_0x4eae3d;this[_0x37b3f4(0xa1)]();}),this[_0x4eae3d(0x8a)](_0x4eae3d(0x91),_0x54d1e0);}[_0x38d392(0x73)](_0x2c2730){const _0x130d9a=_0x38d392;this[_0x130d9a(0x8a)](_0x130d9a(0x91),this[_0x130d9a(0x91)]+_0x2c2730);}[_0x38d392(0xa9)](){const _0x2663bb=_0x38d392;this[_0x2663bb(0x9b)]||(this[_0x2663bb(0x8a)](_0x2663bb(0x9b),!0x0),this[_0x2663bb(0xa1)]());}[_0x38d392(0xa5)](){const _0x5815c5=_0x38d392;this[_0x5815c5(0xb6)]();}[_0x38d392(0x8b)](_0x3f35ba,_0x549d1c){const _0x305a77=_0x38d392;this[_0x305a77(0x92)][_0x3f35ba][_0x305a77(0x75)]=_0x549d1c,this[_0x305a77(0xb7)](_0x305a77(0x90),{'reply':this,'index':_0x3f35ba,'state':_0x549d1c});}[_0x38d392(0xa1)](){const _0x5dd80d=_0x38d392;if(_0x5dd80d(0x98)===this[_0x5dd80d(0x8c)]){this[_0x5dd80d(0x80)]=this[_0x5dd80d(0xaf)][_0x5dd80d(0x76)](this[_0x5dd80d(0x91)]);const _0x189ac2=this[_0x5dd80d(0x92)];this[_0x5dd80d(0x8f)]();const _0xd9fd2c=this[_0x5dd80d(0xaa)](_0x189ac2,this[_0x5dd80d(0x92)]);(_0xd9fd2c[_0x5dd80d(0x83)]||this[_0x5dd80d(0x9b)])&&this[_0x5dd80d(0xb7)](_0x5dd80d(0x79),this,_0xd9fd2c);}else this[_0x5dd80d(0x80)]=this[_0x5dd80d(0xaf)][_0x5dd80d(0x97)](this[_0x5dd80d(0x91)]),this[_0x5dd80d(0xb7)](_0x5dd80d(0x79),this);}[_0x38d392(0xaa)](_0x423806,_0x170ad1){const _0x49cbc7=_0x38d392,_0x2f3549=[];for(const _0x38d5eb of _0x170ad1){const _0x8c1dda=_0x423806[_0x38d5eb[_0x49cbc7(0xb4)]];_0x8c1dda?_0x8c1dda[_0x49cbc7(0x74)][_0x49cbc7(0x83)]!==_0x38d5eb[_0x49cbc7(0x74)][_0x49cbc7(0x83)]?_0x2f3549[_0x49cbc7(0xa3)](_0x38d5eb):_0x8c1dda[_0x49cbc7(0x74)][_0x49cbc7(0x7b)]((_0x5a2504,_0x1911ab)=>{const _0xbbb8f=_0x49cbc7,_0x22d8ab=_0x38d5eb[_0xbbb8f(0x74)][_0x1911ab];_0x5a2504['id']!==_0x22d8ab['id']&&_0x2f3549[_0xbbb8f(0xa3)](_0x38d5eb);}):_0x2f3549[_0x49cbc7(0xa3)](_0x38d5eb);}return _0x2f3549;}[_0x38d392(0x8f)](){const _0x1bbb51=_0x38d392,_0x14fece=new _0x35fbbb('p',{},[new _0x35fbbb(_0x1bbb51(0x94),{'style':_0x1bbb51(0xa0)},[new _0x1ef4b0(_0x1bbb51(0xb1))])]),_0x4a7268=this[_0x1bbb51(0x87)][_0x1bbb51(0x9d)](this[_0x1bbb51(0x80)],this[_0x1bbb51(0xbc)][_0x1bbb51(0xbb)](!0x0),{'markUnstableElements':!this[_0x1bbb51(0x9b)],'replaceRemovedWith':_0x14fece,'cutAfterLastChange':!this[_0x1bbb51(0x9b)]});if(!_0x4a7268[_0x1bbb51(0x9e)][_0x1bbb51(0x83)]&&!this[_0x1bbb51(0x9b)])return;this[_0x1bbb51(0x96)]=_0x4a7268[_0x1bbb51(0x80)];let _0x4f656e=[];if(_0x4bb407(_0x5a23f4=>{const _0x3d0861=_0x1bbb51,_0x5a8cbd=_0x26c7bf(_0x5a23f4,_0x3d0861(0xb0));if(!_0x5a8cbd||!_0x55e540(_0x5a8cbd))return!0x1;const _0x5777e0=[_0x5a23f4,..._0x4eb5ea(_0x5a23f4)]['at'](-0x2);if(_0x5a23f4!=_0x5777e0){const _0x20b78a=_0x26c7bf(_0x5777e0,_0x3d0861(0xb0));_0x55e540(_0x20b78a)||(_0x4f656e[_0x3d0861(0xa3)]({'node':_0x5777e0,'id':_0x20b78a,'type':_0x3d0861(0x85)}),_0x4a7268[_0x3d0861(0x9e)][_0x3d0861(0xa3)](_0x20b78a));}else _0x4a7268[_0x3d0861(0x9e)][_0x3d0861(0xa8)](_0x5a8cbd)?_0x4f656e[_0x3d0861(0xa3)]({'node':_0x5a23f4,'type':_0x3d0861(0x85),'id':_0x5a8cbd}):_0x4a7268[_0x3d0861(0x88)][_0x3d0861(0xa8)](_0x5a8cbd)?_0x4f656e[_0x3d0861(0xa3)]({'node':_0x5a23f4,'type':_0x3d0861(0xa4),'id':_0x5a8cbd,'anchorId':_0x26c7bf(_0x5a23f4[_0x3d0861(0xb3)],_0x3d0861(0xb0))}):_0x4f656e[_0x3d0861(0xa3)]({'node':_0x5a23f4,'type':_0x3d0861(0xad),'id':_0x5a8cbd});return!0x0;},this[_0x1bbb51(0x96)]),_0x4f656e=_0x4f656e[_0x1bbb51(0xa6)](({node:_0x375af0})=>[..._0x4eb5ea(_0x375af0),_0x375af0][_0x1bbb51(0xae)](_0x3d31c7=>!_0x26c7bf(_0x3d31c7,_0x1bbb51(0x72)))),0x0==_0x4f656e[_0x1bbb51(0x83)])return;const _0x47b6a7=[[_0x4f656e[0x0]]];for(let _0x117a8a=0x1;_0x117a8a<_0x4f656e[_0x1bbb51(0x83)];_0x117a8a++){const _0x5e9149=_0x47b6a7[_0x47b6a7[_0x1bbb51(0x83)]-0x1],_0x1d269f=_0x5e9149[_0x5e9149[_0x1bbb51(0x83)]-0x1];_0x4f656e[_0x117a8a][_0x1bbb51(0x86)][_0x1bbb51(0xb3)]==_0x1d269f[_0x1bbb51(0x86)]&&_0x1bbb51(0x85)!=_0x4f656e[_0x117a8a][_0x1bbb51(0x8c)]&&_0x1bbb51(0x85)!=_0x1d269f[_0x1bbb51(0x8c)]?_0x5e9149[_0x1bbb51(0xa3)](_0x4f656e[_0x117a8a]):_0x47b6a7[_0x1bbb51(0xa3)]([_0x4f656e[_0x117a8a]]);}for(const _0x36f69d of _0x47b6a7){const _0x70b55f=_0x36f69d[0x0],_0xc05870=_0x36f69d[_0x36f69d[_0x1bbb51(0x83)]-0x1],_0x3f5ab6=_0x4219d6(_0x70b55f[_0x1bbb51(0x86)][_0x1bbb51(0xb3)]);_0x3f5ab6&&_0x36f69d[_0x1bbb51(0x7c)](_0x3f5ab6);const _0x2365ec=_0x4219d6(_0xc05870[_0x1bbb51(0x86)][_0x1bbb51(0x95)]);_0x2365ec&&_0x36f69d[_0x1bbb51(0xa3)](_0x2365ec);}function _0x55e540(_0x2af61f){const _0x49f646=_0x1bbb51;return _0x4a7268[_0x49f646(0x9e)][_0x49f646(0xa8)](_0x2af61f)||_0x4a7268[_0x49f646(0x88)][_0x49f646(0xa8)](_0x2af61f)||_0x4a7268[_0x49f646(0xa7)][_0x49f646(0xa8)](_0x2af61f);}function _0x4219d6(_0x32d12e){const _0x459c18=_0x1bbb51;if(_0x32d12e&&_0x26c7bf(_0x32d12e,_0x459c18(0xb0))&&!_0x26c7bf(_0x32d12e,_0x459c18(0x72))){const _0x5cee59=_0x26c7bf(_0x32d12e,_0x459c18(0xb0));if(!_0x55e540(_0x5cee59))return{'node':_0x32d12e,'type':_0x459c18(0xbd),'id':_0x5cee59};}return null;}this[_0x1bbb51(0x92)]=_0x47b6a7[_0x1bbb51(0x89)]((_0xa5fad,_0x5c04ca)=>({'changes':_0xa5fad,'state':_0x1bbb51(0x82),'index':_0x5c04ca}));}}export function isValidReplyType(_0x573a8a){const _0x5cd8aa=_0x38d392;return Object[_0x5cd8aa(0x9a)](AI_REPLY_TYPES)[_0x5cd8aa(0xa8)](_0x573a8a);}export function isIgnoredReplyType(_0x1e984e){const _0x2295cb=_0x38d392;return AI_REPLY_TYPES_IGNORED[_0x2295cb(0xa8)](_0x1e984e);}export function isReplyTitleType(_0xc30e80){return _0xc30e80===AI_REPLY_TITLE_TYPE;}export function isSourceType(_0x19137c){const _0x22bdd6=_0x38d392;return _0x22bdd6(0xba)===_0x19137c;}
|