@ckeditor/ckeditor5-ai 47.0.0-alpha.6 → 47.0.0-alpha.8
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 +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/dist/index-editor.css +147 -23
- package/dist/index.css +182 -24
- 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/lang/translations/af.po +224 -0
- package/lang/translations/ar.po +232 -0
- package/lang/translations/ast.po +224 -0
- package/lang/translations/az.po +224 -0
- package/lang/translations/be.po +226 -0
- package/lang/translations/bg.po +224 -0
- package/lang/translations/bn.po +224 -0
- package/lang/translations/bs.po +226 -0
- package/lang/translations/ca.po +224 -0
- package/lang/translations/cs.po +226 -0
- package/lang/translations/da.po +224 -0
- package/lang/translations/de-ch.po +224 -0
- package/lang/translations/de.po +224 -0
- package/lang/translations/el.po +224 -0
- package/lang/translations/en-au.po +224 -0
- package/lang/translations/en-gb.po +224 -0
- package/lang/translations/en.po +224 -0
- package/lang/translations/eo.po +224 -0
- package/lang/translations/es-co.po +224 -0
- package/lang/translations/es.po +224 -0
- package/lang/translations/et.po +224 -0
- package/lang/translations/eu.po +224 -0
- package/lang/translations/fa.po +222 -0
- package/lang/translations/fi.po +224 -0
- package/lang/translations/fr.po +224 -0
- package/lang/translations/gl.po +224 -0
- package/lang/translations/gu.po +224 -0
- package/lang/translations/he.po +224 -0
- package/lang/translations/hi.po +224 -0
- package/lang/translations/hr.po +226 -0
- package/lang/translations/hu.po +224 -0
- package/lang/translations/hy.po +224 -0
- package/lang/translations/id.po +222 -0
- package/lang/translations/it.po +224 -0
- package/lang/translations/ja.po +222 -0
- package/lang/translations/jv.po +224 -0
- package/lang/translations/kk.po +224 -0
- package/lang/translations/km.po +222 -0
- package/lang/translations/kn.po +224 -0
- package/lang/translations/ko.po +222 -0
- package/lang/translations/ku.po +224 -0
- package/lang/translations/lt.po +226 -0
- package/lang/translations/lv.po +226 -0
- package/lang/translations/ms.po +222 -0
- package/lang/translations/nb.po +224 -0
- package/lang/translations/ne.po +224 -0
- package/lang/translations/nl.po +224 -0
- package/lang/translations/no.po +224 -0
- package/lang/translations/oc.po +224 -0
- package/lang/translations/pl.po +226 -0
- package/lang/translations/pt-br.po +224 -0
- package/lang/translations/pt.po +224 -0
- package/lang/translations/ro.po +226 -0
- package/lang/translations/ru.po +226 -0
- package/lang/translations/si.po +224 -0
- package/lang/translations/sk.po +226 -0
- package/lang/translations/sl.po +228 -0
- package/lang/translations/sq.po +224 -0
- package/lang/translations/sr-latn.po +226 -0
- package/lang/translations/sr.po +226 -0
- package/lang/translations/sv.po +224 -0
- package/lang/translations/th.po +222 -0
- package/lang/translations/ti.po +224 -0
- package/lang/translations/tk.po +224 -0
- package/lang/translations/tr.po +224 -0
- package/lang/translations/tt.po +222 -0
- package/lang/translations/ug.po +222 -0
- package/lang/translations/uk.po +226 -0
- package/lang/translations/ur.po +224 -0
- package/lang/translations/uz.po +224 -0
- package/lang/translations/vi.po +222 -0
- package/lang/translations/zh-cn.po +222 -0
- package/lang/translations/zh.po +222 -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.d.ts +12 -4
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.d.ts +0 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.d.ts +7 -3
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.d.ts +1 -227
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.d.ts +3 -0
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.d.ts +0 -30
- 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.d.ts +0 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.d.ts +0 -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 +64 -9
- package/src/aicore/aiconnector.d.ts +13 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.d.ts +0 -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.d.ts +0 -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.d.ts +1 -0
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.d.ts +164 -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.d.ts +0 -49
- 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.d.ts +0 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.d.ts +29 -0
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.d.ts +0 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.d.ts +1 -2
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.d.ts +0 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.d.ts +0 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +0 -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.d.ts +0 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewmodels.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +0 -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.d.ts +6 -16
- 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/aichat.css +1 -0
- package/theme/aichat/aichatfeed.css +39 -0
- package/theme/aichat/aichathistory.css +26 -9
- package/theme/aichat/aiminitoolbar.css +8 -0
- package/theme/aichat/aisuggestioncontainer.css +6 -0
- package/theme/aieditorintegration/aitogglebutton.css +23 -0
- package/theme/aiquickactions/aiquickactions.css +23 -4
- package/theme/aireviewmode/aireviewmode-check-run-result.css +3 -2
- package/theme/aireviewmode/aireviewmode.css +23 -0
- package/theme/aitabs/aitabsview.css +6 -1
- package/theme/common/aibutton.css +1 -5
- package/theme/common/aiheader.css +1 -0
- package/theme/common/aitrackchanges.css +13 -0
- package/src/aiquickactions/utils/common-translations.d.ts +0 -9
- package/src/aiquickactions/utils/common-translations.js +0 -23
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x111335=_0x5d33;(function(_0x833c49,_0x1b5260){const _0x5d5dc4=_0x5d33,_0x328527=_0x833c49();while(!![]){try{const _0xc1358f=parseInt(_0x5d5dc4(0x171))/0x1*(-parseInt(_0x5d5dc4(0x13d))/0x2)+parseInt(_0x5d5dc4(0x150))/0x3+-parseInt(_0x5d5dc4(0x180))/0x4+-parseInt(_0x5d5dc4(0xfe))/0x5*(-parseInt(_0x5d5dc4(0x132))/0x6)+parseInt(_0x5d5dc4(0x14b))/0x7*(parseInt(_0x5d5dc4(0x156))/0x8)+-parseInt(_0x5d5dc4(0x148))/0x9+parseInt(_0x5d5dc4(0x12c))/0xa;if(_0xc1358f===_0x1b5260)break;else _0x328527['push'](_0x328527['shift']());}catch(_0x420ed7){_0x328527['push'](_0x328527['shift']());}}}(_0xd2e9,0x8d281));import{ContextPlugin as _0x13564b}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x348b65}from'ckeditor5/src/utils.js';import{AIChatView as _0x4956fc}from'./ui/aichatview.js';import{AITabs as _0x209546}from'../aitabs/aitabs.js';import{getTranslation as _0x57e3d5}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x1ea53f}from'ckeditor5/src/icons.js';function _0xd2e9(){const _0x1305cc=['setFeedItemRenderingStrategy','scrollToSuggestion','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','forEach','updateWebSources','resetMessageInput','config','then','removeItem','_titleAnimationInterval','clearConversationContextUI','filter','stopInteraction','<p>','focusPromptInput','chat','setModelList','set','queueEmptyPromise','createConversation','addFeedItemUserMessage','error-message','destroy','updateFeedItemAIReplySuggestionContent','updateCapabilities','addFeedItemAIReply','addFeedItemError','updateResourceState','enqueue','_getInputPlaceholder','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','AITabs','isLoading','chatControls','chatHeader','setConversationTitle','isWebSearchEnabled','setIsUploadInProgress','userMessage','isMaximized','removeContextItem','</p>','getItemIds','setSelectedModel','delegate','4766060LNfNes','isPending','view','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','startInteraction','isBusy','12TgRkbV','enableModelSelector','addTab','stopAutoScroll','quickActionData','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','toggleLoadingSkeleton','ai-reply','disableModelSelector','pluginName','setAddContextOptions','80NuPFTL','_getLoadingMessage','isDisabled','_promiseQueue','setContextItemLoading','context','updateFeedInteractionHeader','startsWith','availableModels','AIChatUI','closeSourceResourceBalloon','6837399icqbmG','setConversationContext','updateSuggestionPartState','22813puXnKO','setWebSearch','clear','ai-suggestion-reply','populateSourceResourceBalloon','1860057dRibQY','setReasoning','updateFeedItemAIReplySuggestionPartState','children','areActionsDisabled','updateReplyItem','2744XLKkJA','capabilities','from','updateFeedItemAIReplyContent','user-message','setLoadingMessage','find','renderingStrategy','addContextItem','chatFeed','removeFeedInteraction','setModel','interactionId','displayedPrompt','showDiff','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','isOfficialPlugin','updateSuggestionItem','interaction-header','requires','AI_CHAT_WELCOME_MESSAGE','startAutoScroll','resetConversationTitle','setIsMaximized','values','_animateConversationTitle','plugins','14662KuGszP','AI_CHAT_HEADING','isPremiumPlugin','options','abort','locale','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','bind','length','finishInteraction','get','addItem','label','enableControls','addFeedItemStaticMessage','1797368vtbaGv','showResizeButton','streaming','_view','setInputPlaceholder','isVisible','addFeedItemAISuggestion','clearPendingContextUI','markItemAsDone','contextItems','disableControls','addFeedInteractionHeader','updateFeedItemAIReplySources','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','toggleSuggestionDisplayMode','isDone','scrollFeedToSuggestion','conversation-start','markFeedItemAsDone','feedItemRenderingStrategy','isReasoningEnabled','_interactionPromiseResolver','ai.chat.models.modelSelectorAlwaysVisible','398120tcLQUy'];_0xd2e9=function(){return _0x1305cc;};return _0xd2e9();}import{AIChatFeedInteractionHeaderView as _0x5bf630}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x889a5b}from'./utils/promisequeue.js';function _0x5d33(_0x1f8918,_0x3ccb47){const _0xd2e943=_0xd2e9();return _0x5d33=function(_0x5d3330,_0x8a8b46){_0x5d3330=_0x5d3330-0xef;let _0x1bea47=_0xd2e943[_0x5d3330];return _0x1bea47;},_0x5d33(_0x1f8918,_0x3ccb47);}import{AI_CHAT_UI_EVENT_NAMES as _0x6018fe}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';export class AIChatUI extends _0x13564b{static get[_0x111335(0x169)](){return[_0x209546];}[_0x111335(0x183)];static get[_0x111335(0x13b)](){const _0x23ff2b=_0x111335;return _0x23ff2b(0x146);}static get[_0x111335(0x166)](){return!0x0;}static get[_0x111335(0x173)](){return!0x0;}[_0x111335(0xfa)]=_0x111335(0x182);[_0x111335(0x164)]=!0x0;[_0x111335(0x140)];[_0x111335(0xfc)];[_0x111335(0x108)]=void 0x0;constructor(_0x407b6f){const _0x22384e=_0x111335;super(_0x407b6f);const _0x210d45=this[_0x22384e(0x142)][_0x22384e(0x170)][_0x22384e(0x17b)](_0x22384e(0x11e));this[_0x22384e(0x110)](_0x22384e(0x131),!0x1),this[_0x22384e(0x140)]=new _0x889a5b(),this[_0x22384e(0x183)]=new _0x4956fc(this[_0x22384e(0x142)][_0x22384e(0x176)],_0x210d45[_0x22384e(0x181)]),this[_0x22384e(0x183)][_0x22384e(0x12b)](..._0x6018fe)['to'](this),this[_0x22384e(0x183)]['on'](_0x22384e(0xf5),(_0x2e1e5b,{showDiff:_0xcc722a})=>{const _0x3a5d76=_0x22384e;this[_0x3a5d76(0x164)]=_0xcc722a;}),_0x210d45[_0x22384e(0x12e)][_0x22384e(0x134)]({'id':_0x22384e(0x10e),'buttonLabel':_0x57e3d5(this[_0x22384e(0x142)][_0x22384e(0x176)],_0x22384e(0x172)),'buttonIcon':_0x1ea53f,'order':0x0,'content':this[_0x22384e(0x183)]}),this[_0x22384e(0x183)][_0x22384e(0x120)][_0x22384e(0x178)](_0x22384e(0x11f))['to'](this,_0x22384e(0x131),_0x285c90=>_0x285c90),this[_0x22384e(0x183)][_0x22384e(0x15f)][_0x22384e(0x178)](_0x22384e(0x12d))['to'](this,_0x22384e(0x131),_0x4cb4f1=>_0x4cb4f1),this[_0x22384e(0x183)][_0x22384e(0x120)][_0x22384e(0x184)](this[_0x22384e(0x11c)]());}[_0x111335(0x115)](){const _0x179e5f=_0x111335;super[_0x179e5f(0x115)](),this[_0x179e5f(0x108)]&&clearInterval(this[_0x179e5f(0x108)]);}[_0x111335(0x112)](_0x20d2ab){const _0x384933=_0x111335;this[_0x384933(0x183)][_0x384933(0x15f)][_0x384933(0x14d)](),this[_0x384933(0x183)][_0x384933(0x120)][_0x384933(0x133)](),this[_0x384933(0x183)][_0x384933(0x120)][_0x384933(0x10f)](_0x20d2ab[_0x384933(0x145)],!this[_0x384933(0x142)][_0x384933(0x105)][_0x384933(0x17b)](_0x384933(0xfd))),this[_0x384933(0x17f)]({'id':_0x384933(0xf8),'staticMessage':_0x57e3d5(this[_0x384933(0x142)][_0x384933(0x176)],_0x384933(0x16a))});}[_0x111335(0x17f)]({id:_0x59aecf,staticMessage:_0x22204f}){const _0x260f06=_0x111335;this[_0x260f06(0x183)][_0x260f06(0x15f)][_0x260f06(0x17c)](_0x260f06(0x139),{'id':_0x59aecf,'initialContent':_0x260f06(0x10c)+_0x22204f+_0x260f06(0x128)});}[_0x111335(0x113)](_0x551193){const _0x2f09e1=_0x111335,_0x45b7b8=_0x551193[_0x2f09e1(0x136)]?.[_0x2f09e1(0x163)]||_0x551193[_0x2f09e1(0x125)];this[_0x2f09e1(0x183)][_0x2f09e1(0x15f)][_0x2f09e1(0x17c)](_0x2f09e1(0x15a),{'contextItems':Array[_0x2f09e1(0x158)](_0x551193[_0x2f09e1(0xef)][_0x2f09e1(0x16e)]()),'initialContent':_0x2f09e1(0x10c)+_0x45b7b8+_0x2f09e1(0x128),'id':_0x551193['id']});}[_0x111335(0x119)]({errorMessage:_0x31d94d,id:_0x433259}){const _0x361545=_0x111335;this[_0x361545(0x183)][_0x361545(0x15f)][_0x361545(0x17c)](_0x361545(0x114),{'initialContent':_0x361545(0x10c)+_0x31d94d+_0x361545(0x128),'id':_0x433259});}[_0x111335(0x118)](_0x329ce8){const _0xb13ce9=_0x111335;return this[_0xb13ce9(0x140)][_0xb13ce9(0x11b)](async()=>{const _0x28a250=_0xb13ce9;this[_0x28a250(0x183)][_0x28a250(0x15f)][_0x28a250(0x17c)](_0x28a250(0x139),{'id':_0x329ce8[_0x28a250(0x162)]+':'+_0x329ce8['id']}),this[_0x28a250(0x183)][_0x28a250(0x15f)][_0x28a250(0x15b)]('');});}async[_0x111335(0x186)](_0x11643f){const _0x31c6f3=_0x111335;return this[_0x31c6f3(0x140)][_0x31c6f3(0x11b)](async()=>{const _0x2cef30=_0x31c6f3;this[_0x2cef30(0x183)][_0x2cef30(0x15f)][_0x2cef30(0x17c)](_0x2cef30(0x14e),{'id':_0x11643f[_0x2cef30(0x162)]+':'+_0x11643f['id'],'areActionsDisabled':_0x11643f[_0x2cef30(0x154)],'showDiff':this[_0x2cef30(0x164)]}),this[_0x2cef30(0x183)][_0x2cef30(0x15f)][_0x2cef30(0x15b)]('');});}[_0x111335(0xf1)](_0x2c93c7){const _0x1014fe=_0x111335;this[_0x1014fe(0x183)][_0x1014fe(0x15f)][_0x1014fe(0x17c)](_0x1014fe(0x168),{'id':_0x2c93c7['id'],'capabilities':_0x2c93c7[_0x1014fe(0x157)]});}[_0x111335(0x143)](_0x29d1ea){const _0x2e9a35=_0x111335,_0xa734a=this[_0x2e9a35(0x183)][_0x2e9a35(0x15f)][_0x2e9a35(0x153)][_0x2e9a35(0x15c)](_0x4a9faa=>_0x4a9faa[_0x2e9a35(0x174)]['id']==_0x29d1ea['id']&&_0x4a9faa instanceof _0x5bf630);_0xa734a&&_0xa734a[_0x2e9a35(0x110)](_0x2e9a35(0x185),_0x29d1ea[_0x2e9a35(0x185)]);}async[_0x111335(0x159)](_0x5f07fd){const _0x5e56d8=_0x111335,_0x34b03a=_0x5f07fd[_0x5e56d8(0x15d)]||this[_0x5e56d8(0xfa)];return this[_0x5e56d8(0x140)][_0x5e56d8(0x11b)](async _0x592b9b=>{const _0x32b754=_0x5e56d8;await this[_0x32b754(0x183)][_0x32b754(0x15f)][_0x32b754(0x155)]({..._0x5f07fd,'abortSignal':_0x592b9b,'renderingStrategy':_0x34b03a}),_0x5f07fd[_0x32b754(0xf6)]&&this[_0x32b754(0xf9)](_0x5f07fd['id']);});}[_0x111335(0xf2)](_0x3b0f02,_0x480701){const _0x28e686=_0x111335;this[_0x28e686(0x183)][_0x28e686(0x15f)][_0x28e686(0x103)](_0x3b0f02,_0x480701);}async[_0x111335(0x116)](_0xb14e42){const _0x4d3dfa=_0x111335,_0x4bc816=_0xb14e42[_0x4d3dfa(0x15d)]||this[_0x4d3dfa(0xfa)];return this[_0x4d3dfa(0x140)][_0x4d3dfa(0x11b)](async _0x5a94c6=>{const _0x339c99=_0x4d3dfa;await this[_0x339c99(0x183)][_0x339c99(0x15f)][_0x339c99(0x167)]({..._0xb14e42,'abortSignal':_0x5a94c6,'renderingStrategy':_0x4bc816}),_0xb14e42[_0x339c99(0xf6)]&&this[_0x339c99(0xf9)](_0xb14e42['id']);});}[_0x111335(0x152)](_0x438bab){const _0x34ce84=_0x111335;this[_0x34ce84(0x183)][_0x34ce84(0x15f)][_0x34ce84(0x14a)](_0x438bab);}[_0x111335(0xf9)](_0x29ff66){const _0x540396=_0x111335;this[_0x540396(0x183)][_0x540396(0x15f)][_0x540396(0x188)](_0x29ff66);}[_0x111335(0x160)](_0xc808ec){const _0x3cd9fa=_0x111335;this[_0x3cd9fa(0x183)][_0x3cd9fa(0x15f)][_0x3cd9fa(0x129)]()[_0x3cd9fa(0x10a)](_0x456757=>_0x456757[_0x3cd9fa(0x144)](_0xc808ec))[_0x3cd9fa(0x102)](_0x5505e1=>this[_0x3cd9fa(0x183)][_0x3cd9fa(0x15f)][_0x3cd9fa(0x107)](_0x5505e1));}[_0x111335(0x130)](_0x5dde9e){const _0x1cde9b=_0x111335;this[_0x1cde9b(0x183)][_0x1cde9b(0x15f)][_0x1cde9b(0x15b)](this[_0x1cde9b(0x13e)](_0x5dde9e)),this[_0x1cde9b(0x183)][_0x1cde9b(0x120)][_0x1cde9b(0x13a)](!this[_0x1cde9b(0x142)][_0x1cde9b(0x105)][_0x1cde9b(0x17b)](_0x1cde9b(0xfd))),this[_0x1cde9b(0x131)]=!0x0,this[_0x1cde9b(0x183)][_0x1cde9b(0x15f)][_0x1cde9b(0x16b)]();}[_0x111335(0x10b)](_0x57bef7){const _0x3a3ff3=_0x111335;this[_0x3a3ff3(0x140)][_0x3a3ff3(0x175)](),this[_0x3a3ff3(0x183)][_0x3a3ff3(0x15f)][_0x3a3ff3(0x129)]()[_0x3a3ff3(0x10a)](_0x54b1a9=>_0x54b1a9[_0x3a3ff3(0x144)](_0x57bef7['id']))[_0x3a3ff3(0x102)](_0x32f242=>this[_0x3a3ff3(0xf9)](_0x32f242)),this[_0x3a3ff3(0x131)]=!0x1,this[_0x3a3ff3(0x183)][_0x3a3ff3(0x15f)][_0x3a3ff3(0x135)]();}async[_0x111335(0x17a)](){const _0x6273f6=_0x111335;return this[_0x6273f6(0x140)][_0x6273f6(0x111)][_0x6273f6(0x106)](()=>{const _0x5c85ed=_0x6273f6;this[_0x5c85ed(0x131)]=!0x1,this[_0x5c85ed(0x183)][_0x5c85ed(0x15f)][_0x5c85ed(0x135)]();});}[_0x111335(0x15e)](_0x43c10e,_0x3ff636){const _0x5c67b1=_0x111335;this[_0x5c67b1(0x183)][_0x5c67b1(0x120)][_0x5c67b1(0x15e)](_0x43c10e,_0x3ff636);}[_0x111335(0x127)](_0x415307){const _0x153386=_0x111335;this[_0x153386(0x183)][_0x153386(0x120)][_0x153386(0x127)](_0x415307);}[_0x111335(0x141)](_0x1d455e,_0x4bff2f){const _0x278c8b=_0x111335;this[_0x278c8b(0x183)][_0x278c8b(0x120)][_0x278c8b(0x141)](_0x1d455e,_0x4bff2f);}[_0x111335(0x124)](_0x200e95){const _0x101746=_0x111335;this[_0x101746(0x183)][_0x101746(0x120)][_0x101746(0x124)](_0x200e95);}[_0x111335(0x149)](_0x23fd7b){const _0x131fe1=_0x111335;this[_0x131fe1(0x183)][_0x131fe1(0x120)][_0x131fe1(0x149)](_0x23fd7b);}[_0x111335(0x187)](){const _0x3275cd=_0x111335;this[_0x3275cd(0x183)][_0x3275cd(0x120)][_0x3275cd(0x187)]();}[_0x111335(0x109)](){const _0x397820=_0x111335;this[_0x397820(0x183)][_0x397820(0x120)][_0x397820(0x109)]();}[_0x111335(0x11a)](_0x7bc645,_0x6d1067,_0x423948){const _0x16dddc=_0x111335;this[_0x16dddc(0x183)][_0x16dddc(0x120)][_0x16dddc(0x11a)](_0x7bc645,_0x6d1067,_0x423948);}[_0x111335(0x104)](){const _0x92b849=_0x111335;this[_0x92b849(0x183)][_0x92b849(0x120)][_0x92b849(0x104)](),this[_0x92b849(0x183)][_0x92b849(0x120)][_0x92b849(0x184)](this[_0x92b849(0x11c)]());}[_0x111335(0x13c)](_0x2b2719){const _0x3ddc40=_0x111335;this[_0x3ddc40(0x183)][_0x3ddc40(0x120)][_0x3ddc40(0x13c)](_0x2b2719);}[_0x111335(0x117)](_0x5ee989){const _0x1b83e8=_0x111335;this[_0x1b83e8(0x183)][_0x1b83e8(0x120)][_0x1b83e8(0x14c)](_0x5ee989[_0x1b83e8(0x123)]),this[_0x1b83e8(0x183)][_0x1b83e8(0x120)][_0x1b83e8(0x151)](_0x5ee989[_0x1b83e8(0xfb)]),this[_0x1b83e8(0x183)][_0x1b83e8(0x120)][_0x1b83e8(0x184)](this[_0x1b83e8(0x11c)](_0x5ee989));}[_0x111335(0x12a)](_0xae4096,_0xc3facb){const _0x5acea7=_0x111335;this[_0x5acea7(0x183)][_0x5acea7(0x120)][_0x5acea7(0x161)](_0xae4096),_0xc3facb&&this[_0x5acea7(0x183)][_0x5acea7(0x120)][_0x5acea7(0x13a)](!0x1);}[_0x111335(0xff)](_0x2aca49){const _0x2ecc8f=_0x111335;this[_0x2ecc8f(0xfa)]=_0x2aca49;}[_0x111335(0x138)](_0xa8cabd){const _0xad22c7=_0x111335;this[_0xad22c7(0x183)][_0xad22c7(0x15f)][_0xad22c7(0x138)](_0xa8cabd);}[_0x111335(0x16c)](){const _0x28b865=_0x111335;this[_0x28b865(0x122)](_0x57e3d5(this[_0x28b865(0x142)][_0x28b865(0x176)],_0x28b865(0x172)));}[_0x111335(0x122)](_0x5a6874,_0x104d15=!0x1){const _0x20670e=_0x111335;if(_0x104d15&&!_0x348b65()&&_0x5a6874[_0x20670e(0x179)])return this[_0x20670e(0x183)][_0x20670e(0x121)][_0x20670e(0x17d)]='',void this[_0x20670e(0x16f)](_0x5a6874);this[_0x20670e(0x183)][_0x20670e(0x121)][_0x20670e(0x17d)]=_0x5a6874;}[_0x111335(0x16f)](_0x382738){const _0x51f52d=_0x111335;let _0x53c7fa=0x0;clearInterval(this[_0x51f52d(0x108)]),this[_0x51f52d(0x108)]=setInterval(()=>{const _0x35999d=_0x51f52d;this[_0x35999d(0x183)][_0x35999d(0x121)][_0x35999d(0x17d)]=this[_0x35999d(0x183)][_0x35999d(0x121)][_0x35999d(0x17d)]+_0x382738[_0x53c7fa],_0x53c7fa++,_0x53c7fa===_0x382738[_0x35999d(0x179)]&&clearInterval(this[_0x35999d(0x108)]);},0x1e);}[_0x111335(0x16d)](_0x14b48d){const _0x3da802=_0x111335;this[_0x3da802(0x183)][_0x3da802(0x121)][_0x3da802(0x126)]=_0x14b48d;}[_0x111335(0x13e)](_0x168b43){const _0x5591e3=_0x111335,_0x5c8209=_0x168b43[_0x5591e3(0x157)];return _0x5c8209[_0x5591e3(0x123)]&&_0x5c8209[_0x5591e3(0xfb)]?_0x57e3d5(this[_0x5591e3(0x142)][_0x5591e3(0x176)],_0x5591e3(0xf3)):_0x5c8209[_0x5591e3(0x123)]?_0x57e3d5(this[_0x5591e3(0x142)][_0x5591e3(0x176)],_0x5591e3(0x11d)):_0x5c8209[_0x5591e3(0xfb)]?_0x57e3d5(this[_0x5591e3(0x142)][_0x5591e3(0x176)],_0x5591e3(0x101)):_0x57e3d5(this[_0x5591e3(0x142)][_0x5591e3(0x176)],_0x5591e3(0x177));}[_0x111335(0x11c)](_0x13470d){const _0x3cc536=_0x111335;return _0x13470d?_0x13470d[_0x3cc536(0x123)]&&_0x13470d[_0x3cc536(0xfb)]?_0x57e3d5(this[_0x3cc536(0x142)][_0x3cc536(0x176)],_0x3cc536(0x137)):_0x13470d[_0x3cc536(0x123)]?_0x57e3d5(this[_0x3cc536(0x142)][_0x3cc536(0x176)],_0x3cc536(0xf4)):_0x13470d[_0x3cc536(0xfb)]?_0x57e3d5(this[_0x3cc536(0x142)][_0x3cc536(0x176)],_0x3cc536(0x165)):_0x57e3d5(this[_0x3cc536(0x142)][_0x3cc536(0x176)],_0x3cc536(0x12f)):_0x57e3d5(this[_0x3cc536(0x142)][_0x3cc536(0x176)],_0x3cc536(0x12f));}[_0x111335(0x14f)](_0x5e63c6,_0x41b1c9,_0x14b15c,_0x549f60){const _0x489ea6=_0x111335;this[_0x489ea6(0x183)][_0x489ea6(0x14f)](_0x5e63c6,_0x41b1c9,_0x14b15c,_0x549f60);}[_0x111335(0x147)](_0x4855a1){const _0x576cf2=_0x111335;this[_0x576cf2(0x183)][_0x576cf2(0x147)](_0x4855a1);}[_0x111335(0x10d)](){const _0x490389=_0x111335;this[_0x490389(0x183)][_0x490389(0x120)][_0x490389(0x10d)]();}[_0x111335(0xf7)](_0x2353f3,_0x1254e0){const _0x8fa3a5=_0x111335;this[_0x8fa3a5(0x183)][_0x8fa3a5(0x15f)][_0x8fa3a5(0x100)](_0x2353f3,_0x1254e0);}[_0x111335(0xf0)](){const _0xace2a5=_0x111335;this[_0xace2a5(0x183)][_0xace2a5(0x120)][_0xace2a5(0x13f)]=!0x0;}[_0x111335(0x17e)](){const _0x22cb01=_0x111335;this[_0x22cb01(0x183)][_0x22cb01(0x120)][_0x22cb01(0x13f)]=!0x1;}}
|
|
23
|
+
const _0x2f9983=_0x572b;function _0x572b(_0x5739a9,_0x348283){const _0x2ee647=_0x2ee6();return _0x572b=function(_0x572bc2,_0x105609){_0x572bc2=_0x572bc2-0x88;let _0xa3c0f=_0x2ee647[_0x572bc2];return _0xa3c0f;},_0x572b(_0x5739a9,_0x348283);}(function(_0x1b6c09,_0x4355d8){const _0x4dd359=_0x572b,_0x2ced72=_0x1b6c09();while(!![]){try{const _0x46dd20=-parseInt(_0x4dd359(0x96))/0x1*(-parseInt(_0x4dd359(0xfd))/0x2)+-parseInt(_0x4dd359(0x124))/0x3*(-parseInt(_0x4dd359(0xe7))/0x4)+-parseInt(_0x4dd359(0xb2))/0x5*(parseInt(_0x4dd359(0xb8))/0x6)+-parseInt(_0x4dd359(0xe5))/0x7+parseInt(_0x4dd359(0xf6))/0x8+-parseInt(_0x4dd359(0xe4))/0x9+parseInt(_0x4dd359(0x10b))/0xa*(parseInt(_0x4dd359(0xde))/0xb);if(_0x46dd20===_0x4355d8)break;else _0x2ced72['push'](_0x2ced72['shift']());}catch(_0x43a9ae){_0x2ced72['push'](_0x2ced72['shift']());}}}(_0x2ee6,0x750ec));import{ContextPlugin as _0x19876f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x54cab1}from'ckeditor5/src/utils.js';import{AIChatView as _0x43041c}from'./ui/aichatview.js';import{AITabs as _0x33aa86}from'../aitabs/aitabs.js';import{getTranslation as _0x2343bc}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x5db672}from'ckeditor5/src/icons.js';function _0x2ee6(){const _0xe60033=['startAutoScroll','updateCapabilities','addFeedItemError','children','setSelectedModel','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','AIChatUI','setModelList','isLoading','config','showResizeButton','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','delegate','user-message','disableControls','addFeedItemStaticMessage','_isTrackChangesCommandValueBound','chatControls','5RNithZ','set','chatFeed','updateFeedItemAIReplySources','then','addContextItem','4609482SFmzrD','ai.availableReplyActions','isVisible','find','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','label','setConversationContext','isDone','addTab','updateWebSources','setFeedItemRenderingStrategy','updateFeedItemAIReplyContent','ai.chat.models.modelSelectorAlwaysVisible','interactionId','queueEmptyPromise','forEach','abort','filter','addItem','setIsUploadInProgress','removeItem','value','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','renderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','removeFeedInteraction','focusPromptInput','setReasoning','pluginName','availableModels','toggleLoadingSkeleton','clear','clearConversationContextUI','view','isReasoningEnabled','isBusy','chatHeader','removeContextItem','1584nQcQrp','displayedPrompt','setConversationTitle','addFeedInteractionHeader','_promiseQueue','resetMessageInput','5652333YWCyTw','5224576IlxfJU','enableModelSelector','19892yFkVKZ','setWebSearch','stopAutoScroll','updateSuggestionItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','requires','addFeedItemAISuggestion','ai-reply','get','streaming','updateSuggestionPartState','isDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','scrollFeedToSuggestion','ai-suggestion-reply','1114656sBOcpR','AI_CHAT_HEADING','trackChanges','locale','setModel','areActionsDisabled','closeSourceResourceBalloon','46yIIxSL','_animateConversationTitle','isPremiumPlugin','interaction-header','_view','conversation-start','bind','AITabs','startsWith','finishInteraction','updateFeedInteractionHeader','destroy','context','remove','166760pwYpjH','toggleSuggestionDisplayMode','options','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','setIsMaximized','populateSourceResourceBalloon','values','scrollToSuggestion','_titleAnimationInterval','<p>','resetConversationTitle','enqueue','chat','_getLoadingMessage','quickActionData','isOfficialPlugin','setInputPlaceholder','isMaximized','getItemIds','commands','updateResourceState','stopInteraction','capabilities','isPending','showDiff','42TJexUv','updateFeedItemAIReplySuggestionPartState','markFeedItemAsDone','createConversation','_getInputPlaceholder','addFeedItemAIReply','updateReplyItem','isWebSearchEnabled','clearPendingContextUI','startInteraction','enableControls','setContextItemLoading','addFeedItemUserMessage','setAddContextOptions','AI_CHAT_WELCOME_MESSAGE','contextItems','userMessage','isTrackChangesOn','markItemAsDone','setLoadingMessage','length','514JDAQmZ','plugins','updateFeedItemAIReplySuggestionContent','feedItemRenderingStrategy','last','_interactionPromiseResolver','from','disableModelSelector','</p>','error-message'];_0x2ee6=function(){return _0xe60033;};return _0x2ee6();}import{AIChatFeedInteractionHeaderView as _0x1ec2e3}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x5b6e0a}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x261911}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x4b209a}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x19876f{static get[_0x2f9983(0xec)](){return[_0x33aa86];}[_0x2f9983(0x101)];static get[_0x2f9983(0xd4)](){const _0x85df86=_0x2f9983;return _0x85df86(0xa6);}static get[_0x2f9983(0x11a)](){return!0x0;}static get[_0x2f9983(0xff)](){return!0x0;}[_0x2f9983(0x99)]=_0x2f9983(0xf0);[_0x2f9983(0x123)]=!0x0;[_0x2f9983(0xe2)];[_0x2f9983(0x9b)];[_0x2f9983(0x113)]=void 0x0;[_0x2f9983(0xb0)]=!0x1;constructor(_0x5f5a08){const _0x1a5617=_0x2f9983;super(_0x5f5a08);const _0x22c989=this[_0x1a5617(0x109)][_0x1a5617(0x97)][_0x1a5617(0xef)](_0x1a5617(0x104));this[_0x1a5617(0xb3)](_0x1a5617(0xdb),!0x1),this[_0x1a5617(0xe2)]=new _0x5b6e0a(),this[_0x1a5617(0x101)]=new _0x43041c(this[_0x1a5617(0x109)][_0x1a5617(0xf9)],_0x22c989[_0x1a5617(0xaa)]),this[_0x1a5617(0x101)][_0x1a5617(0xac)](..._0x261911)['to'](this),this[_0x1a5617(0x101)]['on'](_0x1a5617(0x10c),(_0x58d8b3,{showDiff:_0x36b91e})=>{const _0x12eafe=_0x1a5617;this[_0x12eafe(0x123)]=_0x36b91e;}),_0x22c989[_0x1a5617(0xd9)][_0x1a5617(0xc0)]({'id':_0x1a5617(0x117),'buttonLabel':_0x2343bc(this[_0x1a5617(0x109)][_0x1a5617(0xf9)],_0x1a5617(0xf7)),'buttonIcon':_0x5db672,'order':0x0,'content':this[_0x1a5617(0x101)]}),this[_0x1a5617(0x101)][_0x1a5617(0xb1)][_0x1a5617(0x103)](_0x1a5617(0xa8))['to'](this,_0x1a5617(0xdb),_0x41c93a=>_0x41c93a),this[_0x1a5617(0x101)][_0x1a5617(0xb4)][_0x1a5617(0x103)](_0x1a5617(0x122))['to'](this,_0x1a5617(0xdb),_0x3713d2=>_0x3713d2),this[_0x1a5617(0x101)][_0x1a5617(0xb1)][_0x1a5617(0x11b)](this[_0x1a5617(0x128)]());}[_0x2f9983(0x108)](){const _0x2812e7=_0x2f9983;super[_0x2812e7(0x108)](),this[_0x2812e7(0x113)]&&clearInterval(this[_0x2812e7(0x113)]);}[_0x2f9983(0x127)](_0x8a8c9e){const _0x97dd34=_0x2f9983;this[_0x97dd34(0x101)][_0x97dd34(0xb4)][_0x97dd34(0xd7)](),this[_0x97dd34(0x101)][_0x97dd34(0xb1)][_0x97dd34(0xe6)](),this[_0x97dd34(0x101)][_0x97dd34(0xb1)][_0x97dd34(0xa7)](_0x8a8c9e[_0x97dd34(0xd5)],!this[_0x97dd34(0x109)][_0x97dd34(0xa9)][_0x97dd34(0xef)](_0x97dd34(0xc4))),this[_0x97dd34(0xaf)]({'id':_0x97dd34(0x102),'staticMessage':_0x2343bc(this[_0x97dd34(0x109)][_0x97dd34(0xf9)],_0x97dd34(0x8f))});}[_0x2f9983(0xaf)]({id:_0x32b6e4,staticMessage:_0x2fed9c}){const _0x2e8312=_0x2f9983;this[_0x2e8312(0x101)][_0x2e8312(0xb4)][_0x2e8312(0xca)](_0x2e8312(0xee),{'id':_0x32b6e4,'initialContent':_0x2e8312(0x114)+_0x2fed9c+_0x2e8312(0x9e)});}[_0x2f9983(0x8d)](_0xac7984){const _0x5b974f=_0x2f9983,_0x491f26=_0xac7984[_0x5b974f(0x119)]?.[_0x5b974f(0xdf)]||_0xac7984[_0x5b974f(0x91)];this[_0x5b974f(0x101)][_0x5b974f(0xb4)][_0x5b974f(0xca)](_0x5b974f(0xad),{'contextItems':Array[_0x5b974f(0x9c)](_0xac7984[_0x5b974f(0x90)][_0x5b974f(0x111)]()),'initialContent':_0x5b974f(0x114)+_0x491f26+_0x5b974f(0x9e),'id':_0xac7984['id']});}[_0x2f9983(0xa2)]({errorMessage:_0x463cf9,id:_0x17893d}){const _0x16804b=_0x2f9983;this[_0x16804b(0x101)][_0x16804b(0xb4)][_0x16804b(0xca)](_0x16804b(0x9f),{'initialContent':_0x16804b(0x114)+_0x463cf9+_0x16804b(0x9e),'id':_0x17893d});}[_0x2f9983(0x129)](_0x39504e){const _0x4ef87e=_0x2f9983;return this[_0x4ef87e(0xe2)][_0x4ef87e(0x116)](async()=>{const _0x49313b=_0x4ef87e;this[_0x49313b(0x101)][_0x49313b(0xb4)][_0x49313b(0xca)](_0x49313b(0xee),{'id':_0x39504e[_0x49313b(0xc5)]+':'+_0x39504e['id']}),this[_0x49313b(0x94)](null);});}async[_0x2f9983(0xed)](_0x504e84){const _0x1b44f2=_0x2f9983,_0x2d35dc=_0x4b209a(this[_0x1b44f2(0x109)]);if(_0x2d35dc){const _0x18b9c6=_0x2d35dc[_0x1b44f2(0x11e)][_0x1b44f2(0xef)](_0x1b44f2(0xf8));_0x18b9c6&&!this[_0x1b44f2(0xb0)]&&(this[_0x1b44f2(0xb0)]=!0x0,this[_0x1b44f2(0x101)][_0x1b44f2(0xb4)][_0x1b44f2(0x103)](_0x1b44f2(0x92))['to'](_0x18b9c6,_0x1b44f2(0xcd)));}return this[_0x1b44f2(0xe2)][_0x1b44f2(0x116)](async()=>{const _0xaca768=_0x1b44f2;this[_0xaca768(0x101)][_0xaca768(0xb4)][_0xaca768(0xca)](_0xaca768(0xf5),{'id':_0x504e84[_0xaca768(0xc5)]+':'+_0x504e84['id'],'areActionsDisabled':_0x504e84[_0xaca768(0xfb)],'showDiff':this[_0xaca768(0x123)],'dropdownConfig':this[_0xaca768(0x109)][_0xaca768(0xa9)][_0xaca768(0xef)](_0xaca768(0xb9))}),this[_0xaca768(0x94)](null);});}[_0x2f9983(0xe1)](_0x53e27c,_0x48b47d){const _0x2d53b5=_0x2f9983,_0xe55cbc=this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xa3)][_0x2d53b5(0x9a)];if(_0xe55cbc instanceof _0x1ec2e3)return this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xa3)][_0x2d53b5(0x10a)](_0xe55cbc),void this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xca)](_0x2d53b5(0x100),{'id':_0x53e27c['id'],'capabilities':{'isWebSearchEnabled':_0xe55cbc[_0x2d53b5(0x121)][_0x2d53b5(0x88)]||_0x48b47d[_0x2d53b5(0x88)],'isReasoningEnabled':_0xe55cbc[_0x2d53b5(0x121)][_0x2d53b5(0xda)]||_0x48b47d[_0x2d53b5(0xda)]}});this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xca)](_0x2d53b5(0x100),{'id':_0x53e27c['id'],'capabilities':_0x48b47d});}[_0x2f9983(0x107)](_0x470db6){const _0x3c0515=_0x2f9983,_0xa938fc=this[_0x3c0515(0x101)][_0x3c0515(0xb4)][_0x3c0515(0xa3)][_0x3c0515(0xbb)](_0x197b1a=>_0x197b1a[_0x3c0515(0x10d)]['id']==_0x470db6['id']&&_0x197b1a instanceof _0x1ec2e3);_0xa938fc&&_0xa938fc[_0x3c0515(0xb3)](_0x3c0515(0xba),_0x470db6[_0x3c0515(0xba)]);}async[_0x2f9983(0xc3)](_0x4c652f){const _0x51f921=_0x2f9983,_0x1c2628=_0x4c652f[_0x51f921(0xcf)]||this[_0x51f921(0x99)];return this[_0x51f921(0xe2)][_0x51f921(0x116)](async _0x20f27a=>{const _0x16fe01=_0x51f921;await this[_0x16fe01(0x101)][_0x16fe01(0xb4)][_0x16fe01(0x12a)]({..._0x4c652f,'abortSignal':_0x20f27a,'renderingStrategy':_0x1c2628}),_0x4c652f[_0x16fe01(0xbf)]&&this[_0x16fe01(0x126)](_0x4c652f['id']);});}[_0x2f9983(0xb5)](_0x58b3f0,_0x1a3dcf){const _0x4463a7=_0x2f9983;this[_0x4463a7(0x101)][_0x4463a7(0xb4)][_0x4463a7(0xc1)](_0x58b3f0,_0x1a3dcf);}async[_0x2f9983(0x98)](_0x18730c){const _0x3538f2=_0x2f9983,_0x29cdd2=_0x18730c[_0x3538f2(0xcf)]||this[_0x3538f2(0x99)];return this[_0x3538f2(0xe2)][_0x3538f2(0x116)](async _0x111d4b=>{const _0x5120bf=_0x3538f2;await this[_0x5120bf(0x101)][_0x5120bf(0xb4)][_0x5120bf(0xea)]({..._0x18730c,'abortSignal':_0x111d4b,'renderingStrategy':_0x29cdd2}),_0x18730c[_0x5120bf(0xbf)]&&this[_0x5120bf(0x126)](_0x18730c['id']);});}[_0x2f9983(0x125)](_0x24f064){const _0x10123b=_0x2f9983;this[_0x10123b(0x101)][_0x10123b(0xb4)][_0x10123b(0xf1)](_0x24f064);}[_0x2f9983(0x126)](_0x2d4285){const _0x4d1f90=_0x2f9983;this[_0x4d1f90(0x101)][_0x4d1f90(0xb4)][_0x4d1f90(0x93)](_0x2d4285);}[_0x2f9983(0xd1)](_0x5477b2){const _0x474ec6=_0x2f9983;this[_0x474ec6(0x101)][_0x474ec6(0xb4)][_0x474ec6(0x11d)]()[_0x474ec6(0xc9)](_0x679dd8=>_0x679dd8[_0x474ec6(0x105)](_0x5477b2))[_0x474ec6(0xc7)](_0x372285=>this[_0x474ec6(0x101)][_0x474ec6(0xb4)][_0x474ec6(0xcc)](_0x372285));}[_0x2f9983(0x8a)](){const _0x1a670a=_0x2f9983;this[_0x1a670a(0x94)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x1a670a(0x101)][_0x1a670a(0xb1)][_0x1a670a(0x9d)](!this[_0x1a670a(0x109)][_0x1a670a(0xa9)][_0x1a670a(0xef)](_0x1a670a(0xc4))),this[_0x1a670a(0xdb)]=!0x0,this[_0x1a670a(0x101)][_0x1a670a(0xb4)][_0x1a670a(0xa0)]();}[_0x2f9983(0x120)](_0x45fd56){const _0x5eef4d=_0x2f9983;this[_0x5eef4d(0xe2)][_0x5eef4d(0xc8)](),this[_0x5eef4d(0x101)][_0x5eef4d(0xb4)][_0x5eef4d(0x11d)]()[_0x5eef4d(0xc9)](_0x5b0da4=>_0x5b0da4[_0x5eef4d(0x105)](_0x45fd56['id']))[_0x5eef4d(0xc7)](_0x21461a=>this[_0x5eef4d(0x126)](_0x21461a)),this[_0x5eef4d(0xdb)]=!0x1,this[_0x5eef4d(0x101)][_0x5eef4d(0xb4)][_0x5eef4d(0xe9)]();}async[_0x2f9983(0x106)](){const _0x57d55d=_0x2f9983;return this[_0x57d55d(0xe2)][_0x57d55d(0xc6)][_0x57d55d(0xb6)](()=>{const _0x50866d=_0x57d55d;this[_0x50866d(0xdb)]=!0x1,this[_0x50866d(0x101)][_0x50866d(0xb4)][_0x50866d(0xe9)]();});}[_0x2f9983(0xb7)](_0x2997bd,_0x37b3a1){const _0x51ef41=_0x2f9983;this[_0x51ef41(0x101)][_0x51ef41(0xb1)][_0x51ef41(0xb7)](_0x2997bd,_0x37b3a1);}[_0x2f9983(0xdd)](_0x1e37e2){const _0x3ece3a=_0x2f9983;this[_0x3ece3a(0x101)][_0x3ece3a(0xb1)][_0x3ece3a(0xdd)](_0x1e37e2);}[_0x2f9983(0x8c)](_0xabfb8b,_0x1a3e88){const _0x287def=_0x2f9983;this[_0x287def(0x101)][_0x287def(0xb1)][_0x287def(0x8c)](_0xabfb8b,_0x1a3e88);}[_0x2f9983(0xcb)](_0x19026){const _0x10b68b=_0x2f9983;this[_0x10b68b(0x101)][_0x10b68b(0xb1)][_0x10b68b(0xcb)](_0x19026);}[_0x2f9983(0xbe)](_0x51621f){const _0x4b6818=_0x2f9983;this[_0x4b6818(0x101)][_0x4b6818(0xb1)][_0x4b6818(0xbe)](_0x51621f);}[_0x2f9983(0x89)](){const _0x2607e7=_0x2f9983;this[_0x2607e7(0x101)][_0x2607e7(0xb1)][_0x2607e7(0x89)]();}[_0x2f9983(0xd8)](){const _0x12eb72=_0x2f9983;this[_0x12eb72(0x101)][_0x12eb72(0xb1)][_0x12eb72(0xd8)]();}[_0x2f9983(0x11f)](_0x500c9e,_0x6ff35,_0x4e6afd){const _0x2a55d5=_0x2f9983;this[_0x2a55d5(0x101)][_0x2a55d5(0xb1)][_0x2a55d5(0x11f)](_0x500c9e,_0x6ff35,_0x4e6afd);}[_0x2f9983(0xe3)](){const _0x1ac5f1=_0x2f9983;this[_0x1ac5f1(0x101)][_0x1ac5f1(0xb1)][_0x1ac5f1(0xe3)](),this[_0x1ac5f1(0x101)][_0x1ac5f1(0xb1)][_0x1ac5f1(0x11b)](this[_0x1ac5f1(0x128)]());}[_0x2f9983(0x8e)](_0x1dacf4){const _0x499adf=_0x2f9983;this[_0x499adf(0x101)][_0x499adf(0xb1)][_0x499adf(0x8e)](_0x1dacf4);}[_0x2f9983(0xa1)](_0x27e28e){const _0x44a20d=_0x2f9983;this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0xe8)](_0x27e28e[_0x44a20d(0x88)]),this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0xd3)](_0x27e28e[_0x44a20d(0xda)]),this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0x11b)](this[_0x44a20d(0x128)](_0x27e28e));}[_0x2f9983(0xa4)](_0x2f3718,_0x2f5bf8){const _0x825956=_0x2f9983;this[_0x825956(0x101)][_0x825956(0xb1)][_0x825956(0xfa)](_0x2f3718),_0x2f5bf8&&this[_0x825956(0x101)][_0x825956(0xb1)][_0x825956(0x9d)](!0x1);}[_0x2f9983(0xc2)](_0x366e34){const _0x7da7e=_0x2f9983;this[_0x7da7e(0x99)]=_0x366e34;}[_0x2f9983(0xd6)](_0x1b8b9a){const _0x502fcd=_0x2f9983;this[_0x502fcd(0x101)][_0x502fcd(0xb4)][_0x502fcd(0xd6)](_0x1b8b9a);}[_0x2f9983(0x115)](){const _0x34d448=_0x2f9983;this[_0x34d448(0xe0)](_0x2343bc(this[_0x34d448(0x109)][_0x34d448(0xf9)],_0x34d448(0xf7)));}[_0x2f9983(0xe0)](_0x54e0db,_0x6c41f=!0x1){const _0x5c6ed7=_0x2f9983;if(_0x6c41f&&!_0x54cab1()&&_0x54e0db[_0x5c6ed7(0x95)])return this[_0x5c6ed7(0x101)][_0x5c6ed7(0xdc)][_0x5c6ed7(0xbd)]='',void this[_0x5c6ed7(0xfe)](_0x54e0db);this[_0x5c6ed7(0x101)][_0x5c6ed7(0xdc)][_0x5c6ed7(0xbd)]=_0x54e0db;}[_0x2f9983(0x94)](_0x4db87d){const _0x2ab656=_0x2f9983,_0x3cf7cd=this[_0x2ab656(0x118)](_0x4db87d);this[_0x2ab656(0x101)][_0x2ab656(0xb4)][_0x2ab656(0x94)](_0x3cf7cd);}[_0x2f9983(0xfe)](_0x5008d7){const _0x485ba0=_0x2f9983;let _0x38dd6b=0x0;clearInterval(this[_0x485ba0(0x113)]),this[_0x485ba0(0x113)]=setInterval(()=>{const _0x19383c=_0x485ba0;this[_0x19383c(0x101)][_0x19383c(0xdc)][_0x19383c(0xbd)]=this[_0x19383c(0x101)][_0x19383c(0xdc)][_0x19383c(0xbd)]+_0x5008d7[_0x38dd6b],_0x38dd6b++,_0x38dd6b===_0x5008d7[_0x19383c(0x95)]&&clearInterval(this[_0x19383c(0x113)]);},0x1e);}[_0x2f9983(0x10f)](_0x5e945c){const _0xadd68f=_0x2f9983;this[_0xadd68f(0x101)][_0xadd68f(0xdc)][_0xadd68f(0x11c)]=_0x5e945c;}[_0x2f9983(0x118)](_0x39a36d){const _0x3070ca=_0x2f9983;return _0x39a36d?_0x39a36d[_0x3070ca(0x88)]&&_0x39a36d[_0x3070ca(0xda)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xa5)):_0x39a36d[_0x3070ca(0x88)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xab)):_0x39a36d[_0x3070ca(0xda)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0x10e)):_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xbc)):'';}[_0x2f9983(0x128)](_0x40aa09){const _0x393a2b=_0x2f9983;return _0x40aa09?_0x40aa09[_0x393a2b(0x88)]&&_0x40aa09[_0x393a2b(0xda)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xf3)):_0x40aa09[_0x393a2b(0x88)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xd0)):_0x40aa09[_0x393a2b(0xda)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xeb)):_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xce)):_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xce));}[_0x2f9983(0x110)](_0x437b22,_0x28c818,_0x2f1159,_0x157346){const _0x5707a9=_0x2f9983;this[_0x5707a9(0x101)][_0x5707a9(0x110)](_0x437b22,_0x28c818,_0x2f1159,_0x157346);}[_0x2f9983(0xfc)](_0x21c0dd){const _0x205a02=_0x2f9983;this[_0x205a02(0x101)][_0x205a02(0xfc)](_0x21c0dd);}[_0x2f9983(0xd2)](){const _0x3a2afe=_0x2f9983;this[_0x3a2afe(0x101)][_0x3a2afe(0xb1)][_0x3a2afe(0xd2)]();}[_0x2f9983(0xf4)](_0x4db056,_0x1685ab){const _0x3b2f2e=_0x2f9983;this[_0x3b2f2e(0x101)][_0x3b2f2e(0xb4)][_0x3b2f2e(0x112)](_0x4db056,_0x1685ab);}[_0x2f9983(0xae)](){const _0x4ff6b8=_0x2f9983;this[_0x4ff6b8(0x101)][_0x4ff6b8(0xb1)][_0x4ff6b8(0xf2)]=!0x0;}[_0x2f9983(0x8b)](){const _0x1ed7b4=_0x2f9983;this[_0x1ed7b4(0x101)][_0x1ed7b4(0xb1)][_0x1ed7b4(0xf2)]=!0x1;}}
|
|
@@ -2,233 +2,8 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { AIContextItemType, AIContextTextResourceType, type AIContextItem, type AIContextItemRequestData } from '../../aicore/model/aicontext.js';
|
|
5
|
+
import { AIContextItemType, AIContextTextResourceType } from '../../aicore/model/aicontext.js';
|
|
7
6
|
export declare const AI_CONTEXT_MODEL_EVENT_NAMES: readonly ["contextItemAdded", "contextItemRemoved", "contextItemLoadingEnded", "contextSent", "error", "addContextOptionsChanged", "sourceResourcesLoaded", "resourceStateChanged", "uploadProgressChanged"];
|
|
8
|
-
declare const AIChatContext_base: {
|
|
9
|
-
new (): import("ckeditor5/src/utils.js").Observable;
|
|
10
|
-
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Manages the context of the current conversation.
|
|
14
|
-
*/
|
|
15
|
-
export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
16
|
-
constructor({ connector, config, ownerId }: {
|
|
17
|
-
connector: AIConnector;
|
|
18
|
-
config?: AIChatContextConfig;
|
|
19
|
-
ownerId: string;
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Initializes the context.
|
|
23
|
-
*/
|
|
24
|
-
init(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Returns the pending context items that will be sent to the AI endpoint in the next interaction.
|
|
27
|
-
*
|
|
28
|
-
* @returns Map of pending context items keyed by their uiId
|
|
29
|
-
*/
|
|
30
|
-
getPendingContextItems(): Map<string, AIContextItem>;
|
|
31
|
-
/**
|
|
32
|
-
* Populates context items from message data.
|
|
33
|
-
* This method converts user message content to context items and adds them to the conversation context.
|
|
34
|
-
*/
|
|
35
|
-
populateFromMessage(content: AIUserMessage['content'][0]): Promise<AIContextItem>;
|
|
36
|
-
/**
|
|
37
|
-
* Creates a context item from conversation content.
|
|
38
|
-
*/
|
|
39
|
-
private _createContextItemFromContent;
|
|
40
|
-
/**
|
|
41
|
-
* Returns all context items that have been sent to the AI endpoint in the current conversation.
|
|
42
|
-
*
|
|
43
|
-
* @returns Map of sent context items keyed by their uiId
|
|
44
|
-
*/
|
|
45
|
-
getSentContextItems(): Map<string, AIContextItem>;
|
|
46
|
-
/**
|
|
47
|
-
* Removes a context item from the pending context.
|
|
48
|
-
* Read-only items cannot be removed and the method returns early.
|
|
49
|
-
*
|
|
50
|
-
* @param uiId The unique identifier of the context item to remove
|
|
51
|
-
*/
|
|
52
|
-
removeFromContext(uiId: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Clears all pending context items and adds the current document to the conversation context if it exists.
|
|
55
|
-
*/
|
|
56
|
-
clearPendingContextItems(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Adds context items to the conversation context and clears the pending context items.
|
|
59
|
-
*/
|
|
60
|
-
addToConversationContext(contextItems: Map<string, AIContextItem>): void;
|
|
61
|
-
/**
|
|
62
|
-
* Checks if the current document is in the pending context.
|
|
63
|
-
*
|
|
64
|
-
* @returns True if the current document is in pending context, false otherwise
|
|
65
|
-
*/
|
|
66
|
-
isCurrentDocumentInContext(): boolean;
|
|
67
|
-
isSelectionInContext(): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Checks if the current document is in the conversation context.
|
|
70
|
-
*
|
|
71
|
-
* @returns True if the current document is in conversation context, false otherwise
|
|
72
|
-
*/
|
|
73
|
-
isCurrentDocumentInConversation(): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Converts context items to request data format for API endpoint.
|
|
76
|
-
* This static method transforms the internal context item format to the format expected by the AI connector.
|
|
77
|
-
*
|
|
78
|
-
* @param contextItems Map of context items to convert
|
|
79
|
-
* @returns Array of context items in API request format
|
|
80
|
-
*/
|
|
81
|
-
static mapContextItemsToRequestData(contextItems: Map<string, AIContextItem>): Array<AIContextItemRequestData>;
|
|
82
|
-
/**
|
|
83
|
-
* Adds files to the context by uploading them and creating context items.
|
|
84
|
-
* This method handles multiple files concurrently and tracks upload progress.
|
|
85
|
-
*
|
|
86
|
-
* @param files Array of File objects to upload and add to context
|
|
87
|
-
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
88
|
-
* @param [type] Context item type, defaults to AIContextItemType.FILE to indicate that the file is being added as a file or text
|
|
89
|
-
* @returns Promise that resolves when all files are processed
|
|
90
|
-
*/
|
|
91
|
-
addFilesToContext(files: Array<File>, attributes?: {
|
|
92
|
-
resourceId: string;
|
|
93
|
-
label: string;
|
|
94
|
-
}, type?: AIContextItemType.FILE | AIContextItemType.TEXT): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Adds the current document to the pending context.
|
|
97
|
-
* If the document is already in context, this method returns early without changes.
|
|
98
|
-
*
|
|
99
|
-
* @param label Display label for the current document
|
|
100
|
-
*/
|
|
101
|
-
addCurrentDocumentToContext(label: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Updates the current document in the pending context with new content and version.
|
|
104
|
-
* This method uploads the document content and updates the context item accordingly.
|
|
105
|
-
*
|
|
106
|
-
* @param content The document content to upload, or undefined to skip
|
|
107
|
-
* @param version Version number of the document for change tracking
|
|
108
|
-
* @returns Promise that resolves when the document is updated
|
|
109
|
-
*/
|
|
110
|
-
updateCurrentDocument(content: string | undefined, version: number, sessionId: string | null, selections: Array<{
|
|
111
|
-
start: number;
|
|
112
|
-
end: number;
|
|
113
|
-
htmlFragment: string;
|
|
114
|
-
}>): Promise<void>;
|
|
115
|
-
addSelectionToContext(selection: string): void;
|
|
116
|
-
removeSelectionFromContext(): void;
|
|
117
|
-
/**
|
|
118
|
-
* Adds a URL to the context by uploading it and creating a context item.
|
|
119
|
-
* This method handles URL upload with proper error handling and progress tracking.
|
|
120
|
-
*
|
|
121
|
-
* @param url The URL to upload and add to context
|
|
122
|
-
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
123
|
-
* @returns Promise that resolves when the URL is processed
|
|
124
|
-
*/
|
|
125
|
-
addUrlToContext(url: string, attributes?: {
|
|
126
|
-
resourceId: string;
|
|
127
|
-
label: string;
|
|
128
|
-
}): Promise<void>;
|
|
129
|
-
/**
|
|
130
|
-
* Loads resources for a given source provider with the specified query.
|
|
131
|
-
* This method calls the source's getResources callback and updates resource states.
|
|
132
|
-
*
|
|
133
|
-
* @param sourceId The unique identifier of the source provider
|
|
134
|
-
* @param query Search query to filter resources
|
|
135
|
-
* @param uid Unique identifier for the request to prevent race conditions
|
|
136
|
-
* @returns Promise resolving to array of resources with context state
|
|
137
|
-
*/
|
|
138
|
-
loadSourceResources(sourceId: string, query: string, uid: string): Promise<Array<AIContextResourceState>>;
|
|
139
|
-
addResourceToContext(source: AIContextProvider, resource: AIContextResource): Promise<void>;
|
|
140
|
-
}
|
|
141
|
-
export type AIChatContextItemAddedEvent = {
|
|
142
|
-
name: 'contextItemAdded';
|
|
143
|
-
args: [
|
|
144
|
-
{
|
|
145
|
-
contextItem: AIContextItem;
|
|
146
|
-
isLoading: boolean;
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
};
|
|
150
|
-
export type AIChatContextItemRemovedEvent = {
|
|
151
|
-
name: 'contextItemRemoved';
|
|
152
|
-
args: [
|
|
153
|
-
{
|
|
154
|
-
uiId: string;
|
|
155
|
-
type?: AIContextItemType;
|
|
156
|
-
}
|
|
157
|
-
];
|
|
158
|
-
};
|
|
159
|
-
export type AIChatContextItemLoadingEndedEvent = {
|
|
160
|
-
name: 'contextItemLoadingEnded';
|
|
161
|
-
args: [
|
|
162
|
-
{
|
|
163
|
-
contextItem: AIContextItem;
|
|
164
|
-
isLoading: boolean;
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
};
|
|
168
|
-
export type AIChatContextSentEvent = {
|
|
169
|
-
name: 'contextSent';
|
|
170
|
-
args: [
|
|
171
|
-
{
|
|
172
|
-
contextItems: Array<AIContextItem>;
|
|
173
|
-
}
|
|
174
|
-
];
|
|
175
|
-
};
|
|
176
|
-
export type AIChatContextAddContextOptionsChangedEvent = {
|
|
177
|
-
name: 'addContextOptionsChanged';
|
|
178
|
-
args: [
|
|
179
|
-
{
|
|
180
|
-
options: AIAddContextOptionsState;
|
|
181
|
-
}
|
|
182
|
-
];
|
|
183
|
-
};
|
|
184
|
-
export type AIChatContextSourceResourcesLoadedEvent = {
|
|
185
|
-
name: 'sourceResourcesLoaded';
|
|
186
|
-
args: [
|
|
187
|
-
{
|
|
188
|
-
sourceId: string;
|
|
189
|
-
source: AIContextProvider;
|
|
190
|
-
resources: Array<AIContextResourceState>;
|
|
191
|
-
uid: string;
|
|
192
|
-
}
|
|
193
|
-
];
|
|
194
|
-
};
|
|
195
|
-
export type AIChatContextResourceStateChangedEvent = {
|
|
196
|
-
name: 'resourceStateChanged';
|
|
197
|
-
args: [
|
|
198
|
-
{
|
|
199
|
-
sourceId: string;
|
|
200
|
-
resourceId: string;
|
|
201
|
-
isInContext: boolean;
|
|
202
|
-
}
|
|
203
|
-
];
|
|
204
|
-
};
|
|
205
|
-
export type AIChatContextUploadProgressChangedEvent = {
|
|
206
|
-
name: 'uploadProgressChanged';
|
|
207
|
-
args: [
|
|
208
|
-
{
|
|
209
|
-
isUploadInProgress: boolean;
|
|
210
|
-
}
|
|
211
|
-
];
|
|
212
|
-
};
|
|
213
|
-
export type AIAddContextOptionsState = {
|
|
214
|
-
document: {
|
|
215
|
-
enabled: boolean;
|
|
216
|
-
isHidden: boolean;
|
|
217
|
-
};
|
|
218
|
-
urls: {
|
|
219
|
-
enabled: boolean;
|
|
220
|
-
};
|
|
221
|
-
files: {
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
};
|
|
224
|
-
sources: Array<AIContextProviderState>;
|
|
225
|
-
};
|
|
226
|
-
export type AIContextProviderState = AIContextProvider & {
|
|
227
|
-
resources: Array<AIContextResourceState>;
|
|
228
|
-
};
|
|
229
|
-
export type AIContextResourceState = AIContextResource & {
|
|
230
|
-
isInContext?: boolean;
|
|
231
|
-
};
|
|
232
7
|
/**
|
|
233
8
|
* The configuration of the AI Chat menu for adding resources to the prompt context.
|
|
234
9
|
*
|
|
@@ -357,4 +132,3 @@ export type AIContextTextResource = {
|
|
|
357
132
|
content: string;
|
|
358
133
|
type: AIContextTextResourceType;
|
|
359
134
|
};
|
|
360
|
-
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x51d86b=_0x5812;(function(_0x1abeb5,_0x340aaa){const _0x4557a6=_0x5812,_0x2a9f6e=_0x1abeb5();while(!![]){try{const _0x5b8351=-parseInt(_0x4557a6(0x1e9))/0x1+-parseInt(_0x4557a6(0x1f4))/0x2*(-parseInt(_0x4557a6(0x239))/0x3)+-parseInt(_0x4557a6(0x1f0))/0x4+-parseInt(_0x4557a6(0x1c4))/0x5+parseInt(_0x4557a6(0x212))/0x6*(-parseInt(_0x4557a6(0x21a))/0x7)+-parseInt(_0x4557a6(0x204))/0x8*(parseInt(_0x4557a6(0x22a))/0x9)+parseInt(_0x4557a6(0x1d0))/0xa;if(_0x5b8351===_0x340aaa)break;else _0x2a9f6e['push'](_0x2a9f6e['shift']());}catch(_0x2ee8db){_0x2a9f6e['push'](_0x2a9f6e['shift']());}}}(_0x59cb,0xb2812));import{CKEditorError as _0x13f7d3,ObservableMixin as _0x45da12,uid as _0xddbaee}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x22fe05,AIContextTextResourceType as _0x362fe0}from'../../aicore/model/aicontext.js';function _0x5812(_0x35cff8,_0x83933c){const _0x59cbc5=_0x59cb();return _0x5812=function(_0x581248,_0x2373f2){_0x581248=_0x581248-0x1bf;let _0x118258=_0x59cbc5[_0x581248];return _0x118258;},_0x5812(_0x35cff8,_0x83933c);}function _0x59cb(){const _0x2d26a9=['content','_addToConversationContextItem','set','401167QNBVKr','isSelectionInContext','forEach','TEXT','resourceStateChanged','push','abortController','3105560IFAeYY','delete','string','_ongoingUploadOperations','21626kZJOfI','ai-chat-context-unsupported-type','uploadProgressChanged','fetchDocument','_ongoingUploads','find','_finishUploadOperation','_toggleAddCurrentDocumentOptionVisibility','abort','resources','addFilesToContext','isHidden','document','startsWith','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-resource-load-failed','10343272RcROqb','isInContext','ai-chat-context-invalid-data','enabled','resourceId','hidden','addSelectionToContext','length','SELECTION','attributes','ai-chat-document-upload-failed','_isResourceInContext','_addContextItem','ai-chat-source-not-found','6OFEjrb','_mapContextItemToRequestData','Current\x20document','uploadDocument','_findSourceIdsByResourceId','size','getDocument','current-document','3004323uiEVRQ','_createContextItemFromContent','sessionId','isReadOnly','DOCUMENT','contextItemAdded','text/html','getSentContextItems','all','files-','getPendingContextItems','urls','uploadFile','addToConversationContext','uploadUrl','_pendingContextItems','9VdVfzu','_updateResourceInContextState','text/plain','MARKDOWN','from','_removeContextItem','init','uiId','isCurrentDocumentInConversation','message','_setAddContextOptionsDefaultState','updateCurrentDocument','ai-chat-file-upload-failed','sources','stack','159iyJLVF','_convertTextResourceToFile','clearPendingContextItems','_getCustomSourcesInitialState','addUrlToContext','ai-chat-source-resources-load-failed','getId','name','contextItemLoadingEnded','_connector','map','File','populateFromMessage','label','has','addCurrentDocumentToContext','url','fire','_ownerId','data','object','addResourceToContext','type','ai-chat-url-upload-failed','HTML','1866510iIcUSE','start','removeFromContext','filter','sourceResourcesLoaded','error','ai-chat-resource-no-data','_config','_finishContextItemLoading','text/markdown','FILE','mapContextItemsToRequestData','34310220MAnsdy','get','url-','_addContextOptionsState','_startUploadOperation','_conversationContextItems','values','files','addContextOptionsChanged','file-','getData','ai-request-aborted','isCurrentDocumentInContext','contextSent','contextItemRemoved','getResources','end','URL','loadSourceResources','selection','version','removeSelectionFromContext'];_0x59cb=function(){return _0x2d26a9;};return _0x59cb();}import{escape as _0x308893}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x51d86b(0x21f),_0x51d86b(0x1de),_0x51d86b(0x241),_0x51d86b(0x1dd),_0x51d86b(0x1c9),_0x51d86b(0x1d8),_0x51d86b(0x1c8),_0x51d86b(0x1ed),_0x51d86b(0x1f6)];export class AIChatContext extends _0x45da12(){[_0x51d86b(0x242)];[_0x51d86b(0x1cb)];[_0x51d86b(0x24b)];constructor({connector:_0x28ccbb,config:_0x27ae87,ownerId:_0xee569a}){const _0x4b57ba=_0x51d86b;super(),this[_0x4b57ba(0x242)]=_0x28ccbb,this[_0x4b57ba(0x1cb)]=_0x27ae87,this[_0x4b57ba(0x24b)]=_0xee569a;}[_0x51d86b(0x230)](){const _0x53d6f1=_0x51d86b;this[_0x53d6f1(0x229)]=new Map(),this[_0x53d6f1(0x1d5)]=new Map(),this[_0x53d6f1(0x1f8)]=new Map(),this[_0x53d6f1(0x1f3)]=new Map(),this[_0x53d6f1(0x234)]();}[_0x51d86b(0x224)](){const _0x387dbb=_0x51d86b;return this[_0x387dbb(0x229)];}async[_0x51d86b(0x245)](_0x1eae1e){const _0x3cd4f2=_0x51d86b,_0x14de3d=await this[_0x3cd4f2(0x21b)](_0x1eae1e);return this[_0x3cd4f2(0x1e7)](_0x14de3d),_0x3cd4f2(0x219)===_0x14de3d[_0x3cd4f2(0x231)]&&this[_0x3cd4f2(0x1fb)](),_0x14de3d;}async[_0x51d86b(0x21b)](_0x5b740c){const _0x2dcee5=_0x51d86b;if(_0x5b740c[_0x2dcee5(0x1c1)]===_0x22fe05[_0x2dcee5(0x21e)]){const _0x202699=await this[_0x2dcee5(0x242)][_0x2dcee5(0x1f7)](this[_0x2dcee5(0x24b)],_0x5b740c['id'])[_0x2dcee5(0x218)]();return{'id':_0x2dcee5(0x219),'uiId':_0x2dcee5(0x219),'label':_0x2dcee5(0x214),'type':_0x5b740c[_0x2dcee5(0x1c1)],'content':_0x202699[_0x2dcee5(0x1e6)],'hidden':this[_0x2dcee5(0x1d5)][_0x2dcee5(0x247)](_0x2dcee5(0x219)),'version':_0x202699[_0x2dcee5(0x20d)]?.[_0x2dcee5(0x1e4)],'sessionId':_0x202699[_0x2dcee5(0x20d)]?.[_0x2dcee5(0x21c)]};}return{'id':_0x5b740c['id'],'uiId':_0x5b740c['id'],'label':_0x5b740c[_0x2dcee5(0x20d)]?.[_0x2dcee5(0x246)]||_0x5b740c[_0x2dcee5(0x240)]||_0x5b740c[_0x2dcee5(0x249)]||_0x5b740c['id'],'type':_0x5b740c[_0x2dcee5(0x1c1)],..._0x5b740c?.[_0x2dcee5(0x20d)]?.[_0x2dcee5(0x208)]?{'resourceId':_0x5b740c[_0x2dcee5(0x20d)]?.[_0x2dcee5(0x208)]}:{}};}[_0x51d86b(0x221)](){const _0x2f2716=_0x51d86b;return new Map(this[_0x2f2716(0x1d5)]);}[_0x51d86b(0x1c6)](_0x3c620d){const _0x33a516=_0x51d86b,_0x1e2deb=this[_0x33a516(0x229)][_0x33a516(0x1d1)](_0x3c620d);_0x1e2deb?.[_0x33a516(0x21d)]||this[_0x33a516(0x22f)](_0x3c620d);}[_0x51d86b(0x23b)](){const _0x510c77=_0x51d86b;if(0x0===this[_0x510c77(0x229)][_0x510c77(0x217)])return;for(const _0x42b51a of this[_0x510c77(0x229)][_0x510c77(0x1d6)]())this[_0x510c77(0x22f)](_0x42b51a[_0x510c77(0x231)]);const _0x18234d=this[_0x510c77(0x1d5)][_0x510c77(0x1d1)](_0x510c77(0x219))||this[_0x510c77(0x229)][_0x510c77(0x1d1)](_0x510c77(0x219));_0x18234d&&this[_0x510c77(0x210)]({..._0x18234d,'isReadOnly':!0x0,'hidden':!0x0});}[_0x51d86b(0x227)](_0x2372cd){const _0x39336f=_0x51d86b;for(const _0x3941c1 of _0x2372cd[_0x39336f(0x1d6)]())this[_0x39336f(0x1e7)](_0x3941c1);this[_0x39336f(0x23b)](),this[_0x39336f(0x24a)](_0x39336f(0x1dd),{'contextItems':Array[_0x39336f(0x22e)](this[_0x39336f(0x221)]()[_0x39336f(0x1d6)]())});}[_0x51d86b(0x1dc)](){const _0x2df91e=_0x51d86b;return this[_0x2df91e(0x229)][_0x2df91e(0x247)](_0x2df91e(0x219));}[_0x51d86b(0x1ea)](){const _0x41b768=_0x51d86b;return this[_0x41b768(0x229)][_0x41b768(0x247)](_0x41b768(0x1e3));}[_0x51d86b(0x232)](){const _0x252b1b=_0x51d86b;return this[_0x252b1b(0x1d5)][_0x252b1b(0x247)](_0x252b1b(0x219));}static[_0x51d86b(0x1cf)](_0x69d608){const _0x5e9c21=_0x51d86b;return Array[_0x5e9c21(0x22e)](_0x69d608[_0x5e9c21(0x1d6)]())[_0x5e9c21(0x243)](_0xc454cc=>this[_0x5e9c21(0x213)](_0xc454cc))[_0x5e9c21(0x1c7)](_0x393b5b=>null!==_0x393b5b);}async[_0x51d86b(0x1fe)](_0x3c84ea,_0x2aa404,_0x1c3b03=_0x22fe05[_0x51d86b(0x1ce)]){const _0x584990=_0x51d86b,_0x378e2e=_0x584990(0x223)+_0xddbaee();this[_0x584990(0x1d4)](_0x378e2e);try{await Promise[_0x584990(0x222)](_0x3c84ea[_0x584990(0x243)](async _0x10b96c=>{const _0x5f1845=_0x584990,_0x312b60=_0x5f1845(0x1d9)+_0xddbaee(),_0x875c4c=_0x308893(_0x10b96c[_0x5f1845(0x240)]);try{this[_0x5f1845(0x210)]({'type':_0x1c3b03,'label':_0x2aa404?.[_0x5f1845(0x246)]||_0x875c4c,'uiId':_0x312b60,'resourceId':_0x2aa404?.[_0x5f1845(0x208)]},!0x0);const _0x4bb389=this[_0x5f1845(0x242)][_0x5f1845(0x226)](this[_0x5f1845(0x24b)],_0x10b96c,_0x2aa404);this[_0x5f1845(0x1f8)][_0x5f1845(0x1e8)](_0x312b60,_0x4bb389[_0x5f1845(0x1ef)]);const {id:_0x1684d0}=await _0x4bb389[_0x5f1845(0x23f)]();this[_0x5f1845(0x1f8)][_0x5f1845(0x1f1)](_0x312b60),this[_0x5f1845(0x1cc)]({'type':_0x1c3b03,'id':_0x1684d0,'label':_0x2aa404?.[_0x5f1845(0x246)]||_0x875c4c,'uiId':_0x312b60,'resourceId':_0x2aa404?.[_0x5f1845(0x208)]},!0x1);}catch(_0xc76b18){this[_0x5f1845(0x1f8)][_0x5f1845(0x1f1)](_0x312b60);if(!_0xc76b18[_0x5f1845(0x233)][_0x5f1845(0x201)](_0x5f1845(0x1db))){const _0x373f66=new _0x13f7d3(_0x5f1845(0x236),null,{'fileName':_0x875c4c});_0x373f66[_0x5f1845(0x238)]=_0xc76b18[_0x5f1845(0x238)],this[_0x5f1845(0x24a)](_0x5f1845(0x1c9),{'error':_0x373f66,'fileName':_0x875c4c});}this[_0x5f1845(0x22f)](_0x312b60);}}));}finally{this[_0x584990(0x1fa)](_0x378e2e);}}[_0x51d86b(0x248)](_0x4029d8){const _0x2e96c5=_0x51d86b;if(this[_0x2e96c5(0x1dc)]())return;const _0x5d7d36={'type':_0x22fe05[_0x2e96c5(0x21e)],'uiId':_0x2e96c5(0x219),'label':_0x4029d8,'isReadOnly':this[_0x2e96c5(0x1d5)][_0x2e96c5(0x247)](_0x2e96c5(0x219)),'hidden':this[_0x2e96c5(0x1d5)][_0x2e96c5(0x247)](_0x2e96c5(0x219))};this[_0x2e96c5(0x210)](_0x5d7d36);}async[_0x51d86b(0x235)](_0x3f97d5,_0x2cc947,_0x202d81,_0x10cbca){const _0x5e2150=_0x51d86b,_0x1eea83=this[_0x5e2150(0x229)][_0x5e2150(0x1d1)](_0x5e2150(0x219));if(_0x1eea83&&_0x3f97d5){_0x1eea83[_0x5e2150(0x1e3)]=_0x10cbca?_0x10cbca[_0x5e2150(0x243)](_0x600782=>({'start':_0x600782[_0x5e2150(0x1c5)],'end':_0x600782[_0x5e2150(0x1e0)]})):[];try{if(_0x1eea83[_0x5e2150(0x1e4)]===_0x2cc947)return;const {id:_0x38a9fb}=await this[_0x5e2150(0x242)][_0x5e2150(0x215)](this[_0x5e2150(0x24b)],_0x3f97d5,{'version':_0x2cc947,'sessionId':_0x202d81})[_0x5e2150(0x23f)]();_0x1eea83['id']=_0x38a9fb,_0x1eea83[_0x5e2150(0x1e6)]=_0x3f97d5,_0x1eea83[_0x5e2150(0x1e4)]=_0x2cc947,_0x1eea83[_0x5e2150(0x21c)]=_0x202d81;}catch(_0x4e3e22){const _0x299d4a=new _0x13f7d3(_0x5e2150(0x20e),null);_0x299d4a[_0x5e2150(0x238)]=_0x4e3e22[_0x5e2150(0x238)],this[_0x5e2150(0x24a)](_0x5e2150(0x1c9),{'error':_0x299d4a});}}}[_0x51d86b(0x20a)](_0x3ba228){const _0x109e24=_0x51d86b;this[_0x109e24(0x210)]({'type':_0x22fe05[_0x109e24(0x20c)],'label':_0x3ba228,'uiId':_0x109e24(0x1e3),'content':_0x3ba228});}[_0x51d86b(0x1e5)](){const _0x1af1af=_0x51d86b;this[_0x1af1af(0x22f)](_0x1af1af(0x1e3));}async[_0x51d86b(0x23d)](_0x455deb,_0x14af9c){const _0x5c77bc=_0x51d86b,_0x2d8c99=_0x5c77bc(0x1d2)+_0xddbaee();this[_0x5c77bc(0x1d4)](_0x2d8c99);const _0x49cb84=_0x5c77bc(0x1d2)+_0xddbaee();try{this[_0x5c77bc(0x210)]({'type':_0x22fe05[_0x5c77bc(0x1e1)],'label':_0x14af9c?.[_0x5c77bc(0x246)]||_0x455deb,'uiId':_0x49cb84,'resourceId':_0x14af9c?.[_0x5c77bc(0x208)]},!0x0);const _0x3145ba=this[_0x5c77bc(0x242)][_0x5c77bc(0x228)](this[_0x5c77bc(0x24b)],_0x455deb,_0x14af9c);this[_0x5c77bc(0x1f8)][_0x5c77bc(0x1e8)](_0x49cb84,_0x3145ba[_0x5c77bc(0x1ef)]);const {id:_0x581784}=await _0x3145ba[_0x5c77bc(0x23f)]();this[_0x5c77bc(0x1f8)][_0x5c77bc(0x1f1)](_0x49cb84),this[_0x5c77bc(0x1cc)]({'type':_0x22fe05[_0x5c77bc(0x1e1)],'id':_0x581784,'label':_0x14af9c?.[_0x5c77bc(0x246)]||_0x455deb,'uiId':_0x49cb84,'resourceId':_0x14af9c?.[_0x5c77bc(0x208)]},!0x1);}catch(_0x51ae20){this[_0x5c77bc(0x1f8)][_0x5c77bc(0x1f1)](_0x49cb84),(_0x51ae20[_0x5c77bc(0x233)][_0x5c77bc(0x201)](_0x5c77bc(0x1db))||this[_0x5c77bc(0x24a)](_0x5c77bc(0x1c9),{'error':new _0x13f7d3(_0x5c77bc(0x1c2),this,{'url':_0x455deb,'originalError':_0x51ae20}),'url':_0x455deb}),this[_0x5c77bc(0x22f)](_0x49cb84));}finally{this[_0x5c77bc(0x1fa)](_0x2d8c99);}}async[_0x51d86b(0x1e2)](_0x4fbd8,_0x349c91,_0xeb456b){const _0x5f51d7=_0x51d86b,_0x33b861=this[_0x5f51d7(0x1d3)][_0x5f51d7(0x237)][_0x5f51d7(0x1f9)](_0xc20fe8=>_0xc20fe8['id']===_0x4fbd8);if(!_0x33b861)return this[_0x5f51d7(0x24a)](_0x5f51d7(0x1c9),{'error':new _0x13f7d3(_0x5f51d7(0x211),this,{'sourceId':_0x4fbd8}),'sourceId':_0x4fbd8}),[];try{const _0x155b10=(await _0x33b861[_0x5f51d7(0x1df)](_0x349c91))[_0x5f51d7(0x243)](_0x641fcc=>{const _0x4b619f=_0x5f51d7,_0x165eaf=this[_0x4b619f(0x20f)](_0x641fcc['id']);return{..._0x641fcc,'isInContext':_0x165eaf};});return _0x33b861[_0x5f51d7(0x1fd)]=_0x155b10,this[_0x5f51d7(0x24a)](_0x5f51d7(0x1c8),{'sourceId':_0x4fbd8,'source':_0x33b861,'resources':_0x155b10,'uid':_0xeb456b}),_0x155b10;}catch(_0x757d64){return this[_0x5f51d7(0x24a)](_0x5f51d7(0x1c9),{'error':new _0x13f7d3(_0x5f51d7(0x23e),this,{'sourceId':_0x4fbd8,'originalError':_0x757d64}),'sourceId':_0x4fbd8,'sourceLabel':_0x33b861[_0x5f51d7(0x246)]}),[];}}async[_0x51d86b(0x1c0)](_0x32587e,_0x4038f1){const _0x4e8124=_0x51d86b;if(this[_0x4e8124(0x20f)](_0x4038f1['id']))return;let _0x4f55da=_0x4038f1[_0x4e8124(0x24c)];if(!_0x4f55da&&_0x32587e[_0x4e8124(0x1da)])try{_0x4f55da=await _0x32587e[_0x4e8124(0x1da)](_0x4038f1['id']);}catch(_0x59d7c7){return void this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x203),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id'],'originalError':_0x59d7c7}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});}if(_0x4f55da)switch(_0x4038f1[_0x4e8124(0x1c1)]){case _0x22fe05[_0x4e8124(0x1e1)]:if(_0x4e8124(0x1f2)!=typeof _0x4f55da)return void this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x206),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id'],'expectedType':_0x4e8124(0x1f2),'actualType':typeof _0x4f55da}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});await this[_0x4e8124(0x23d)](_0x4f55da,{'label':_0x4038f1[_0x4e8124(0x246)],'resourceId':_0x4038f1['id']});break;case _0x22fe05[_0x4e8124(0x1ce)]:if(!(_0x4f55da instanceof File))return void this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x206),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id'],'expectedType':_0x4e8124(0x244),'actualType':typeof _0x4f55da}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});await this[_0x4e8124(0x1fe)]([_0x4f55da],{'label':_0x4038f1[_0x4e8124(0x246)],'resourceId':_0x4038f1['id']});break;case _0x22fe05[_0x4e8124(0x1ec)]:if(_0x4e8124(0x1bf)!=typeof _0x4f55da||!(_0x4e8124(0x1e6)in _0x4f55da)||!(_0x4e8124(0x1c1)in _0x4f55da))return void this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x206),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id'],'expectedType':_0x4e8124(0x202),'actualType':typeof _0x4f55da}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});_0x4f55da=AIChatContext[_0x4e8124(0x23a)](_0x4f55da,_0x4038f1[_0x4e8124(0x246)]),await this[_0x4e8124(0x1fe)]([_0x4f55da],{'label':_0x4038f1[_0x4e8124(0x246)],'resourceId':_0x4038f1['id']},_0x22fe05[_0x4e8124(0x1ec)]);break;default:this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x1f5),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id'],'resourceType':_0x4038f1[_0x4e8124(0x1c1)]}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});}else this[_0x4e8124(0x24a)](_0x4e8124(0x1c9),{'error':new _0x13f7d3(_0x4e8124(0x1ca),this,{'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']}),'resourceId':_0x4038f1['id'],'sourceId':_0x32587e['id']});}static[_0x51d86b(0x23a)](_0x2c4794,_0x1160cf){const _0xb31a3d=_0x51d86b;switch(_0x2c4794[_0xb31a3d(0x1c1)]){case _0x362fe0[_0xb31a3d(0x22d)]:return new File([_0x2c4794[_0xb31a3d(0x1e6)]],_0x1160cf,{'type':_0xb31a3d(0x1cd)});case _0x362fe0[_0xb31a3d(0x1c3)]:return new File([_0x2c4794[_0xb31a3d(0x1e6)]],_0x1160cf,{'type':_0xb31a3d(0x220)});default:return new File([_0x2c4794[_0xb31a3d(0x1e6)]],_0x1160cf,{'type':_0xb31a3d(0x22c)});}}static[_0x51d86b(0x213)](_0x26f197){const _0x54cc02=_0x51d86b;switch(_0x26f197[_0x54cc02(0x1c1)]){case _0x22fe05[_0x54cc02(0x1ce)]:return{'type':_0x22fe05[_0x54cc02(0x1ce)],'id':_0x26f197['id']};case _0x22fe05[_0x54cc02(0x1e1)]:return{'type':_0x22fe05[_0x54cc02(0x1e1)],'id':_0x26f197['id']};case _0x22fe05[_0x54cc02(0x21e)]:return{'type':_0x22fe05[_0x54cc02(0x21e)],'id':_0x26f197['id'],..._0x26f197[_0x54cc02(0x1e3)]?.[_0x54cc02(0x20b)]&&{'selection':_0x26f197[_0x54cc02(0x1e3)]}};case _0x22fe05[_0x54cc02(0x1ec)]:return{'type':_0x22fe05[_0x54cc02(0x1ce)],'id':_0x26f197['id']};default:return null;}}[_0x51d86b(0x210)](_0xb95f3e,_0x5c8722=!0x1){const _0x43b8e6=_0x51d86b;if(this[_0x43b8e6(0x229)][_0x43b8e6(0x1e8)](_0xb95f3e[_0x43b8e6(0x231)],_0xb95f3e),_0xb95f3e[_0x43b8e6(0x209)]||this[_0x43b8e6(0x24a)](_0x43b8e6(0x21f),{'contextItem':_0xb95f3e,'isLoading':_0x5c8722}),_0x43b8e6(0x219)===_0xb95f3e[_0x43b8e6(0x231)]&&this[_0x43b8e6(0x1fb)](),_0xb95f3e[_0x43b8e6(0x208)]){const _0x59bd99=this[_0x43b8e6(0x216)](_0xb95f3e[_0x43b8e6(0x208)]);_0x59bd99&&_0x59bd99[_0x43b8e6(0x1eb)](_0x2d777b=>{const _0x539f19=_0x43b8e6;this[_0x539f19(0x22b)](_0x2d777b,_0xb95f3e[_0x539f19(0x208)],!0x0);});}}[_0x51d86b(0x22f)](_0x4545ec){const _0x260034=_0x51d86b,_0x209a5b=this[_0x260034(0x229)][_0x260034(0x1d1)](_0x4545ec),_0x1e99a1=this[_0x260034(0x1f8)][_0x260034(0x1d1)](_0x4545ec);if(_0x1e99a1&&(_0x1e99a1[_0x260034(0x1fc)](),this[_0x260034(0x1f8)][_0x260034(0x1f1)](_0x4545ec)),_0x209a5b?.[_0x260034(0x208)]){const _0x4607bd=this[_0x260034(0x216)](_0x209a5b[_0x260034(0x208)]);_0x4607bd&&_0x4607bd[_0x260034(0x1eb)](_0x232fa9=>{const _0x2d6c26=_0x260034;this[_0x2d6c26(0x22b)](_0x232fa9,_0x209a5b[_0x2d6c26(0x208)],!0x1);});}this[_0x260034(0x229)][_0x260034(0x1f1)](_0x4545ec),this[_0x260034(0x24a)](_0x260034(0x1de),{'uiId':_0x4545ec,'type':_0x209a5b?.[_0x260034(0x1c1)]}),_0x260034(0x219)===_0x4545ec&&this[_0x260034(0x1fb)]();}[_0x51d86b(0x1cc)](_0x7edfa1,_0xef93cc){const _0x12f4c6=_0x51d86b;if(this[_0x12f4c6(0x229)][_0x12f4c6(0x247)](_0x7edfa1[_0x12f4c6(0x231)])&&(this[_0x12f4c6(0x229)][_0x12f4c6(0x1e8)](_0x7edfa1[_0x12f4c6(0x231)],_0x7edfa1),this[_0x12f4c6(0x24a)](_0x12f4c6(0x241),{'contextItem':_0x7edfa1,'isLoading':_0xef93cc}),_0x7edfa1[_0x12f4c6(0x208)])){const _0x1552c1=this[_0x12f4c6(0x216)](_0x7edfa1[_0x12f4c6(0x208)]);_0x1552c1&&_0x1552c1[_0x12f4c6(0x1eb)](_0x110b3d=>{const _0x5086fc=_0x12f4c6;this[_0x5086fc(0x22b)](_0x110b3d,_0x7edfa1[_0x5086fc(0x208)],!0x0);});}}[_0x51d86b(0x1e7)](_0x598f99){const _0x1b36bd=_0x51d86b;this[_0x1b36bd(0x1d5)][_0x1b36bd(0x1e8)](_0x598f99[_0x1b36bd(0x231)],_0x598f99);}[_0x51d86b(0x234)](){const _0x3bb043=_0x51d86b;this[_0x3bb043(0x1d3)]={'document':{'enabled':!0x1!==this[_0x3bb043(0x1cb)]?.[_0x3bb043(0x200)]?.[_0x3bb043(0x207)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x3bb043(0x1cb)]?.[_0x3bb043(0x225)]?.[_0x3bb043(0x207)]},'files':{'enabled':!0x1!==this[_0x3bb043(0x1cb)]?.[_0x3bb043(0x1d7)]?.[_0x3bb043(0x207)]},'sources':this[_0x3bb043(0x23c)]()},this[_0x3bb043(0x24a)](_0x3bb043(0x1d8),{'options':this[_0x3bb043(0x1d3)]});}[_0x51d86b(0x23c)](){const _0x3c2964=_0x51d86b;return this[_0x3c2964(0x1cb)]?.[_0x3c2964(0x237)]?.[_0x3c2964(0x243)](_0x5907c7=>({..._0x5907c7,'resources':[]}))??[];}[_0x51d86b(0x1fb)](){const _0x2b805d=_0x51d86b,_0x47213b=this[_0x2b805d(0x1dc)]()||this[_0x2b805d(0x232)]();this[_0x2b805d(0x1d3)][_0x2b805d(0x200)][_0x2b805d(0x1ff)]=_0x47213b,this[_0x2b805d(0x24a)](_0x2b805d(0x1d8),{'options':this[_0x2b805d(0x1d3)]});}[_0x51d86b(0x20f)](_0x44c101){const _0x456ab7=_0x51d86b;for(const _0x4adaf3 of this[_0x456ab7(0x229)][_0x456ab7(0x1d6)]())if(_0x4adaf3[_0x456ab7(0x208)]===_0x44c101)return!0x0;for(const _0x8ce5e3 of this[_0x456ab7(0x1d5)][_0x456ab7(0x1d6)]())if(_0x8ce5e3[_0x456ab7(0x208)]===_0x44c101)return!0x0;return!0x1;}[_0x51d86b(0x216)](_0x5e5087){const _0x29c000=_0x51d86b,_0x1aab83=[];for(const _0x3b44eb of this[_0x29c000(0x1d3)][_0x29c000(0x237)]){_0x3b44eb[_0x29c000(0x1fd)][_0x29c000(0x1f9)](_0x3e71e2=>_0x3e71e2['id']===_0x5e5087)&&_0x1aab83[_0x29c000(0x1ee)](_0x3b44eb['id']);}return 0x0===_0x1aab83[_0x29c000(0x20b)]?null:_0x1aab83;}[_0x51d86b(0x22b)](_0x169fc1,_0x44c1fc,_0x53ed8f){const _0xc6fe2c=_0x51d86b,_0x5003a1=this[_0xc6fe2c(0x1d3)][_0xc6fe2c(0x237)][_0xc6fe2c(0x1f9)](_0x2cbf84=>_0x2cbf84['id']===_0x169fc1);if(!_0x5003a1)return;const _0x358bf4=_0x5003a1[_0xc6fe2c(0x1fd)][_0xc6fe2c(0x1f9)](_0x32ec1f=>_0x32ec1f['id']===_0x44c1fc);_0x358bf4&&(_0x358bf4[_0xc6fe2c(0x205)]=_0x53ed8f,this[_0xc6fe2c(0x24a)](_0xc6fe2c(0x1ed),{'sourceId':_0x169fc1,'resourceId':_0x44c1fc,'isInContext':_0x53ed8f}));}[_0x51d86b(0x1d4)](_0x514d7b){const _0x486b81=_0x51d86b;this[_0x486b81(0x1f3)][_0x486b81(0x1e8)](_0x514d7b,!0x0),this[_0x486b81(0x1f3)][_0x486b81(0x217)]&&this[_0x486b81(0x24a)](_0x486b81(0x1f6),{'isUploadInProgress':!0x0});}[_0x51d86b(0x1fa)](_0x591e91){const _0x50f074=_0x51d86b;this[_0x50f074(0x1f3)][_0x50f074(0x1f1)](_0x591e91),0x0===this[_0x50f074(0x1f3)][_0x50f074(0x217)]&&this[_0x50f074(0x24a)](_0x50f074(0x1f6),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
function _0x3030(){const _0x3c0484=['isHidden','end','addCurrentDocumentToContext','addFilesToContext','_config','50067RPGEhU','isCurrentDocumentInContext','getResources','isInContext','delete','_createContextItemFromContent','url-','length','30964vvMHjc','init','_toggleAddCurrentDocumentOptionVisibility','sessionId','resources','document','isCurrentDocumentInConversation','HTML','getId','uploadProgressChanged','3255195imcdcs','fetchDocument','_findSourceIdsByResourceId','uiId','uploadUrl','ai-chat-source-not-found','fire','stack','1640368ewuXQQ','DOCUMENT','Current\x20document','url','removeSelectionFromContext','object','uploadFile','resourceStateChanged','addUrlToContext','mapContextItemsToRequestData','67drSFRJ','SELECTION','URL','text/markdown','addSelectionToContext','resourceId','_getCustomSourcesInitialState','_mapContextItemToRequestData','attributes','message','addResourceToContext','MARKDOWN','ai-chat-url-upload-failed','from','isReadOnly','5WFmbqz','_isResourceInContext','_updateResourceInContextState','getDocument','TEXT','ai-chat-context-unsupported-type','3880002utcgzq','contextSent','set','isSelectionInContext','has','type','_startUploadOperation','_addContextOptionsState','files-','ai-chat-source-resources-load-failed','get','selection','push','addContextOptionsChanged','_setAddContextOptionsDefaultState','_removeContextItem','name','ai-request-aborted','removeFromContext','_pendingContextItems','file-','loadSourceResources','files','sourceResourcesLoaded','contextItemLoadingEnded','_ongoingUploads','label','object\x20with\x20content\x20and\x20type\x20properties','16484490mpytOy','_conversationContextItems','abortController','abort','hidden','getPendingContextItems','File','_connector','contextItemAdded','FILE','10726092qGNMQC','addToConversationContext','startsWith','string','ai-chat-resource-no-data','_ongoingUploadOperations','contextItemRemoved','text/plain','clearPendingContextItems','text/html','filter','getData','size','ai-chat-context-invalid-data','ai-chat-resource-load-failed','_finishContextItemLoading','populateFromMessage','forEach','error','sources','start','urls','content','ai-chat-file-upload-failed','ai-chat-document-upload-failed','all','_addToConversationContextItem','_ownerId','updateCurrentDocument','_addContextItem','map','current-document','data','_finishUploadOperation','values','find','version','enabled','528tMnrse','_convertTextResourceToFile','getSentContextItems','uploadDocument'];_0x3030=function(){return _0x3c0484;};return _0x3030();}const _0x359cd1=_0x70ce;function _0x70ce(_0x50c3e5,_0x54ce80){const _0x30309f=_0x3030();return _0x70ce=function(_0x70cea2,_0x1f226f){_0x70cea2=_0x70cea2-0x1af;let _0x36707e=_0x30309f[_0x70cea2];return _0x36707e;},_0x70ce(_0x50c3e5,_0x54ce80);}(function(_0xed2c6d,_0x33044e){const _0x18eef2=_0x70ce,_0x2e9af1=_0xed2c6d();while(!![]){try{const _0x4925b9=-parseInt(_0x18eef2(0x1d2))/0x1*(-parseInt(_0x18eef2(0x1b6))/0x2)+parseInt(_0x18eef2(0x1c0))/0x3+parseInt(_0x18eef2(0x1c8))/0x4*(-parseInt(_0x18eef2(0x1e1))/0x5)+parseInt(_0x18eef2(0x20d))/0x6+-parseInt(_0x18eef2(0x1e7))/0x7+parseInt(_0x18eef2(0x233))/0x8*(-parseInt(_0x18eef2(0x23c))/0x9)+-parseInt(_0x18eef2(0x203))/0xa;if(_0x4925b9===_0x33044e)break;else _0x2e9af1['push'](_0x2e9af1['shift']());}catch(_0x22f9e4){_0x2e9af1['push'](_0x2e9af1['shift']());}}}(_0x3030,0xe3108));import{CKEditorError as _0x43430a,ObservableMixin as _0x528a67,uid as _0x27f280}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x4aeaa9,AIContextTextResourceType as _0x266f74}from'../../aicore/model/aicontext.js';import{escape as _0x34f5aa}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x359cd1(0x20b),_0x359cd1(0x213),_0x359cd1(0x1ff),_0x359cd1(0x1e8),_0x359cd1(0x21f),_0x359cd1(0x1f4),_0x359cd1(0x1fe),_0x359cd1(0x1cf),_0x359cd1(0x1bf)];export class AIChatContext extends _0x528a67(){[_0x359cd1(0x20a)];[_0x359cd1(0x23b)];[_0x359cd1(0x228)];constructor({connector:_0x434962,config:_0x27a3b2,ownerId:_0x5888a4}){const _0x5a8c62=_0x359cd1;super(),this[_0x5a8c62(0x20a)]=_0x434962,this[_0x5a8c62(0x23b)]=_0x27a3b2,this[_0x5a8c62(0x228)]=_0x5888a4;}[_0x359cd1(0x1b7)](){const _0x39ffa7=_0x359cd1;this[_0x39ffa7(0x1fa)]=new Map(),this[_0x39ffa7(0x204)]=new Map(),this[_0x39ffa7(0x200)]=new Map(),this[_0x39ffa7(0x212)]=new Map(),this[_0x39ffa7(0x1f5)]();}[_0x359cd1(0x208)](){const _0x5accaf=_0x359cd1;return this[_0x5accaf(0x1fa)];}async[_0x359cd1(0x21d)](_0x52b99a){const _0x41f530=_0x359cd1,_0x2cf808=await this[_0x41f530(0x1b3)](_0x52b99a);return this[_0x41f530(0x227)](_0x2cf808),_0x41f530(0x22c)===_0x2cf808[_0x41f530(0x1c3)]&&this[_0x41f530(0x1b8)](),_0x2cf808;}async[_0x359cd1(0x1b3)](_0x54794c){const _0x399b51=_0x359cd1;if(_0x54794c[_0x399b51(0x1ec)]===_0x4aeaa9[_0x399b51(0x1c9)]){const _0x12ffe7=await this[_0x399b51(0x20a)][_0x399b51(0x1c1)](this[_0x399b51(0x228)],_0x54794c['id'])[_0x399b51(0x1e4)]();return{'id':_0x399b51(0x22c),'uiId':_0x399b51(0x22c),'label':_0x399b51(0x1ca),'type':_0x54794c[_0x399b51(0x1ec)],'content':_0x12ffe7[_0x399b51(0x223)],'hidden':this[_0x399b51(0x204)][_0x399b51(0x1eb)](_0x399b51(0x22c)),'version':_0x12ffe7[_0x399b51(0x1da)]?.[_0x399b51(0x231)],'sessionId':_0x12ffe7[_0x399b51(0x1da)]?.[_0x399b51(0x1b9)]};}return{'id':_0x54794c['id'],'uiId':_0x54794c['id'],'label':_0x54794c[_0x399b51(0x1da)]?.[_0x399b51(0x201)]||_0x54794c[_0x399b51(0x1f7)]||_0x54794c[_0x399b51(0x1cb)]||_0x54794c['id'],'type':_0x54794c[_0x399b51(0x1ec)],..._0x54794c?.[_0x399b51(0x1da)]?.[_0x399b51(0x1d7)]?{'resourceId':_0x54794c[_0x399b51(0x1da)]?.[_0x399b51(0x1d7)]}:{}};}[_0x359cd1(0x235)](){const _0x3d0cd2=_0x359cd1;return new Map(this[_0x3d0cd2(0x204)]);}[_0x359cd1(0x1f9)](_0x3a8043){const _0x4eb52a=_0x359cd1,_0x234a43=this[_0x4eb52a(0x1fa)][_0x4eb52a(0x1f1)](_0x3a8043);_0x234a43?.[_0x4eb52a(0x1e0)]||this[_0x4eb52a(0x1f6)](_0x3a8043);}[_0x359cd1(0x215)](){const _0x36ed11=_0x359cd1;if(0x0===this[_0x36ed11(0x1fa)][_0x36ed11(0x219)])return;for(const _0x1a5c93 of this[_0x36ed11(0x1fa)][_0x36ed11(0x22f)]())this[_0x36ed11(0x1f6)](_0x1a5c93[_0x36ed11(0x1c3)]);const _0x545a12=this[_0x36ed11(0x204)][_0x36ed11(0x1f1)](_0x36ed11(0x22c))||this[_0x36ed11(0x1fa)][_0x36ed11(0x1f1)](_0x36ed11(0x22c));_0x545a12&&this[_0x36ed11(0x22a)]({..._0x545a12,'isReadOnly':!0x0,'hidden':!0x0});}[_0x359cd1(0x20e)](_0x3668f4){const _0x1f35f7=_0x359cd1;for(const _0x5c6a48 of _0x3668f4[_0x1f35f7(0x22f)]())this[_0x1f35f7(0x227)](_0x5c6a48);this[_0x1f35f7(0x215)](),this[_0x1f35f7(0x1c6)](_0x1f35f7(0x1e8),{'contextItems':Array[_0x1f35f7(0x1df)](this[_0x1f35f7(0x235)]()[_0x1f35f7(0x22f)]())});}[_0x359cd1(0x1af)](){const _0x506d72=_0x359cd1;return this[_0x506d72(0x1fa)][_0x506d72(0x1eb)](_0x506d72(0x22c));}[_0x359cd1(0x1ea)](){const _0x529669=_0x359cd1;return this[_0x529669(0x1fa)][_0x529669(0x1eb)](_0x529669(0x1f2));}[_0x359cd1(0x1bc)](){const _0x253533=_0x359cd1;return this[_0x253533(0x204)][_0x253533(0x1eb)](_0x253533(0x22c));}static[_0x359cd1(0x1d1)](_0x4267d8){const _0x47dcca=_0x359cd1;return Array[_0x47dcca(0x1df)](_0x4267d8[_0x47dcca(0x22f)]())[_0x47dcca(0x22b)](_0x407e0a=>this[_0x47dcca(0x1d9)](_0x407e0a))[_0x47dcca(0x217)](_0x34dfee=>null!==_0x34dfee);}async[_0x359cd1(0x23a)](_0x590813,_0x411b04,_0x2fabfb=_0x4aeaa9[_0x359cd1(0x20c)]){const _0xb66c25=_0x359cd1,_0x55531f=_0xb66c25(0x1ef)+_0x27f280();this[_0xb66c25(0x1ed)](_0x55531f);try{await Promise[_0xb66c25(0x226)](_0x590813[_0xb66c25(0x22b)](async _0x2ee57c=>{const _0x437975=_0xb66c25,_0x54d036=_0x437975(0x1fb)+_0x27f280(),_0x2c68f8=_0x34f5aa(_0x2ee57c[_0x437975(0x1f7)]);try{this[_0x437975(0x22a)]({'type':_0x2fabfb,'label':_0x411b04?.[_0x437975(0x201)]||_0x2c68f8,'uiId':_0x54d036,'resourceId':_0x411b04?.[_0x437975(0x1d7)]},!0x0);const _0x588f6e=this[_0x437975(0x20a)][_0x437975(0x1ce)](this[_0x437975(0x228)],_0x2ee57c,_0x411b04);this[_0x437975(0x200)][_0x437975(0x1e9)](_0x54d036,_0x588f6e[_0x437975(0x205)]);const {id:_0x13acf2}=await _0x588f6e[_0x437975(0x1be)]();this[_0x437975(0x200)][_0x437975(0x1b2)](_0x54d036),this[_0x437975(0x21c)]({'type':_0x2fabfb,'id':_0x13acf2,'label':_0x411b04?.[_0x437975(0x201)]||_0x2c68f8,'uiId':_0x54d036,'resourceId':_0x411b04?.[_0x437975(0x1d7)]},!0x1);}catch(_0x576ad6){this[_0x437975(0x200)][_0x437975(0x1b2)](_0x54d036);if(!_0x576ad6[_0x437975(0x1db)][_0x437975(0x20f)](_0x437975(0x1f8))){const _0x45a77e=new _0x43430a(_0x437975(0x224),null,{'fileName':_0x2c68f8});_0x45a77e[_0x437975(0x1c7)]=_0x576ad6[_0x437975(0x1c7)],this[_0x437975(0x1c6)](_0x437975(0x21f),{'error':_0x45a77e,'fileName':_0x2c68f8});}this[_0x437975(0x1f6)](_0x54d036);}}));}finally{this[_0xb66c25(0x22e)](_0x55531f);}}[_0x359cd1(0x239)](_0x14a188){const _0xc20320=_0x359cd1;if(this[_0xc20320(0x1af)]())return;const _0x120b1c={'type':_0x4aeaa9[_0xc20320(0x1c9)],'uiId':_0xc20320(0x22c),'label':_0x14a188,'isReadOnly':this[_0xc20320(0x204)][_0xc20320(0x1eb)](_0xc20320(0x22c)),'hidden':this[_0xc20320(0x204)][_0xc20320(0x1eb)](_0xc20320(0x22c))};this[_0xc20320(0x22a)](_0x120b1c);}async[_0x359cd1(0x229)](_0x53f6fe,_0x54f41f,_0x3faf58,_0x2aef67){const _0x140adc=_0x359cd1,_0x15f3d5=this[_0x140adc(0x1fa)][_0x140adc(0x1f1)](_0x140adc(0x22c));if(_0x15f3d5&&_0x53f6fe){_0x15f3d5[_0x140adc(0x1f2)]=_0x2aef67?_0x2aef67[_0x140adc(0x22b)](_0x1b2e62=>({'start':_0x1b2e62[_0x140adc(0x221)],'end':_0x1b2e62[_0x140adc(0x238)]})):[];try{if(_0x15f3d5[_0x140adc(0x231)]===_0x54f41f)return;const {id:_0x405ac8}=await this[_0x140adc(0x20a)][_0x140adc(0x236)](this[_0x140adc(0x228)],_0x53f6fe,{'version':_0x54f41f,'sessionId':_0x3faf58})[_0x140adc(0x1be)]();_0x15f3d5['id']=_0x405ac8,_0x15f3d5[_0x140adc(0x223)]=_0x53f6fe,_0x15f3d5[_0x140adc(0x231)]=_0x54f41f,_0x15f3d5[_0x140adc(0x1b9)]=_0x3faf58;}catch(_0xb94890){const _0x3112fe=new _0x43430a(_0x140adc(0x225),null);_0x3112fe[_0x140adc(0x1c7)]=_0xb94890[_0x140adc(0x1c7)],this[_0x140adc(0x1c6)](_0x140adc(0x21f),{'error':_0x3112fe});}}}[_0x359cd1(0x1d6)](_0x57db46){const _0x2658a4=_0x359cd1;this[_0x2658a4(0x22a)]({'type':_0x4aeaa9[_0x2658a4(0x1d3)],'label':_0x57db46,'uiId':_0x2658a4(0x1f2),'content':_0x57db46});}[_0x359cd1(0x1cc)](){const _0x402a9a=_0x359cd1;this[_0x402a9a(0x1f6)](_0x402a9a(0x1f2));}async[_0x359cd1(0x1d0)](_0x493ba2,_0x206c2a){const _0x2fe6bb=_0x359cd1,_0x56d858=_0x2fe6bb(0x1b4)+_0x27f280();this[_0x2fe6bb(0x1ed)](_0x56d858);const _0x21f94c=_0x2fe6bb(0x1b4)+_0x27f280();try{this[_0x2fe6bb(0x22a)]({'type':_0x4aeaa9[_0x2fe6bb(0x1d4)],'label':_0x206c2a?.[_0x2fe6bb(0x201)]||_0x493ba2,'uiId':_0x21f94c,'resourceId':_0x206c2a?.[_0x2fe6bb(0x1d7)]},!0x0);const _0x3ef206=this[_0x2fe6bb(0x20a)][_0x2fe6bb(0x1c4)](this[_0x2fe6bb(0x228)],_0x493ba2,_0x206c2a);this[_0x2fe6bb(0x200)][_0x2fe6bb(0x1e9)](_0x21f94c,_0x3ef206[_0x2fe6bb(0x205)]);const {id:_0x8e90e1}=await _0x3ef206[_0x2fe6bb(0x1be)]();this[_0x2fe6bb(0x200)][_0x2fe6bb(0x1b2)](_0x21f94c),this[_0x2fe6bb(0x21c)]({'type':_0x4aeaa9[_0x2fe6bb(0x1d4)],'id':_0x8e90e1,'label':_0x206c2a?.[_0x2fe6bb(0x201)]||_0x493ba2,'uiId':_0x21f94c,'resourceId':_0x206c2a?.[_0x2fe6bb(0x1d7)]},!0x1);}catch(_0x2b8805){this[_0x2fe6bb(0x200)][_0x2fe6bb(0x1b2)](_0x21f94c),(_0x2b8805[_0x2fe6bb(0x1db)][_0x2fe6bb(0x20f)](_0x2fe6bb(0x1f8))||this[_0x2fe6bb(0x1c6)](_0x2fe6bb(0x21f),{'error':new _0x43430a(_0x2fe6bb(0x1de),this,{'url':_0x493ba2,'originalError':_0x2b8805}),'url':_0x493ba2}),this[_0x2fe6bb(0x1f6)](_0x21f94c));}finally{this[_0x2fe6bb(0x22e)](_0x56d858);}}async[_0x359cd1(0x1fc)](_0x268abf,_0x27d727,_0x5f58df){const _0x79e9d5=_0x359cd1,_0x389c4d=this[_0x79e9d5(0x1ee)][_0x79e9d5(0x220)][_0x79e9d5(0x230)](_0x8bd45a=>_0x8bd45a['id']===_0x268abf);if(!_0x389c4d)return this[_0x79e9d5(0x1c6)](_0x79e9d5(0x21f),{'error':new _0x43430a(_0x79e9d5(0x1c5),this,{'sourceId':_0x268abf}),'sourceId':_0x268abf}),[];try{const _0x1176e8=(await _0x389c4d[_0x79e9d5(0x1b0)](_0x27d727))[_0x79e9d5(0x22b)](_0x328fb7=>{const _0x4e0e0e=_0x79e9d5,_0x42d0b2=this[_0x4e0e0e(0x1e2)](_0x328fb7['id']);return{..._0x328fb7,'isInContext':_0x42d0b2};});return _0x389c4d[_0x79e9d5(0x1ba)]=_0x1176e8,this[_0x79e9d5(0x1c6)](_0x79e9d5(0x1fe),{'sourceId':_0x268abf,'source':_0x389c4d,'resources':_0x1176e8,'uid':_0x5f58df}),_0x1176e8;}catch(_0x379332){return this[_0x79e9d5(0x1c6)](_0x79e9d5(0x21f),{'error':new _0x43430a(_0x79e9d5(0x1f0),this,{'sourceId':_0x268abf,'originalError':_0x379332}),'sourceId':_0x268abf,'sourceLabel':_0x389c4d[_0x79e9d5(0x201)]}),[];}}async[_0x359cd1(0x1dc)](_0x21086e,_0x499953){const _0x355dea=_0x359cd1;if(this[_0x355dea(0x1e2)](_0x499953['id']))return;let _0x23c55=_0x499953[_0x355dea(0x22d)];if(!_0x23c55&&_0x21086e[_0x355dea(0x218)])try{_0x23c55=await _0x21086e[_0x355dea(0x218)](_0x499953['id']);}catch(_0xa8a0c7){return void this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x21b),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id'],'originalError':_0xa8a0c7}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});}if(_0x23c55)switch(_0x499953[_0x355dea(0x1ec)]){case _0x4aeaa9[_0x355dea(0x1d4)]:if(_0x355dea(0x210)!=typeof _0x23c55)return void this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x21a),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id'],'expectedType':_0x355dea(0x210),'actualType':typeof _0x23c55}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});await this[_0x355dea(0x1d0)](_0x23c55,{'label':_0x499953[_0x355dea(0x201)],'resourceId':_0x499953['id']});break;case _0x4aeaa9[_0x355dea(0x20c)]:if(!(_0x23c55 instanceof File))return void this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x21a),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id'],'expectedType':_0x355dea(0x209),'actualType':typeof _0x23c55}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});await this[_0x355dea(0x23a)]([_0x23c55],{'label':_0x499953[_0x355dea(0x201)],'resourceId':_0x499953['id']});break;case _0x4aeaa9[_0x355dea(0x1e5)]:if(_0x355dea(0x1cd)!=typeof _0x23c55||!(_0x355dea(0x223)in _0x23c55)||!(_0x355dea(0x1ec)in _0x23c55))return void this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x21a),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id'],'expectedType':_0x355dea(0x202),'actualType':typeof _0x23c55}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});_0x23c55=AIChatContext[_0x355dea(0x234)](_0x23c55,_0x499953[_0x355dea(0x201)]),await this[_0x355dea(0x23a)]([_0x23c55],{'label':_0x499953[_0x355dea(0x201)],'resourceId':_0x499953['id']},_0x4aeaa9[_0x355dea(0x1e5)]);break;default:this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x1e6),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id'],'resourceType':_0x499953[_0x355dea(0x1ec)]}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});}else this[_0x355dea(0x1c6)](_0x355dea(0x21f),{'error':new _0x43430a(_0x355dea(0x211),this,{'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']}),'resourceId':_0x499953['id'],'sourceId':_0x21086e['id']});}static[_0x359cd1(0x234)](_0x4998e8,_0x2124f8){const _0x27ec25=_0x359cd1;switch(_0x4998e8[_0x27ec25(0x1ec)]){case _0x266f74[_0x27ec25(0x1dd)]:return new File([_0x4998e8[_0x27ec25(0x223)]],_0x2124f8,{'type':_0x27ec25(0x1d5)});case _0x266f74[_0x27ec25(0x1bd)]:return new File([_0x4998e8[_0x27ec25(0x223)]],_0x2124f8,{'type':_0x27ec25(0x216)});default:return new File([_0x4998e8[_0x27ec25(0x223)]],_0x2124f8,{'type':_0x27ec25(0x214)});}}static[_0x359cd1(0x1d9)](_0x32c8a9){const _0x35b347=_0x359cd1;switch(_0x32c8a9[_0x35b347(0x1ec)]){case _0x4aeaa9[_0x35b347(0x20c)]:return{'type':_0x4aeaa9[_0x35b347(0x20c)],'id':_0x32c8a9['id']};case _0x4aeaa9[_0x35b347(0x1d4)]:return{'type':_0x4aeaa9[_0x35b347(0x1d4)],'id':_0x32c8a9['id']};case _0x4aeaa9[_0x35b347(0x1c9)]:return{'type':_0x4aeaa9[_0x35b347(0x1c9)],'id':_0x32c8a9['id'],..._0x32c8a9[_0x35b347(0x1f2)]?.[_0x35b347(0x1b5)]&&{'selection':_0x32c8a9[_0x35b347(0x1f2)]}};case _0x4aeaa9[_0x35b347(0x1e5)]:return{'type':_0x4aeaa9[_0x35b347(0x20c)],'id':_0x32c8a9['id']};default:return null;}}[_0x359cd1(0x22a)](_0x596b81,_0x9a0b13=!0x1){const _0x4b8071=_0x359cd1;if(this[_0x4b8071(0x1fa)][_0x4b8071(0x1e9)](_0x596b81[_0x4b8071(0x1c3)],_0x596b81),_0x596b81[_0x4b8071(0x207)]||this[_0x4b8071(0x1c6)](_0x4b8071(0x20b),{'contextItem':_0x596b81,'isLoading':_0x9a0b13}),_0x4b8071(0x22c)===_0x596b81[_0x4b8071(0x1c3)]&&this[_0x4b8071(0x1b8)](),_0x596b81[_0x4b8071(0x1d7)]){const _0x5527cf=this[_0x4b8071(0x1c2)](_0x596b81[_0x4b8071(0x1d7)]);_0x5527cf&&_0x5527cf[_0x4b8071(0x21e)](_0x51bba1=>{const _0x4440f2=_0x4b8071;this[_0x4440f2(0x1e3)](_0x51bba1,_0x596b81[_0x4440f2(0x1d7)],!0x0);});}}[_0x359cd1(0x1f6)](_0x4d6cac){const _0x435d98=_0x359cd1,_0x19a803=this[_0x435d98(0x1fa)][_0x435d98(0x1f1)](_0x4d6cac),_0x343cfd=this[_0x435d98(0x200)][_0x435d98(0x1f1)](_0x4d6cac);if(_0x343cfd&&(_0x343cfd[_0x435d98(0x206)](),this[_0x435d98(0x200)][_0x435d98(0x1b2)](_0x4d6cac)),_0x19a803?.[_0x435d98(0x1d7)]){const _0x5c37ab=this[_0x435d98(0x1c2)](_0x19a803[_0x435d98(0x1d7)]);_0x5c37ab&&_0x5c37ab[_0x435d98(0x21e)](_0x12dabb=>{const _0x11a0d9=_0x435d98;this[_0x11a0d9(0x1e3)](_0x12dabb,_0x19a803[_0x11a0d9(0x1d7)],!0x1);});}this[_0x435d98(0x1fa)][_0x435d98(0x1b2)](_0x4d6cac),this[_0x435d98(0x1c6)](_0x435d98(0x213),{'uiId':_0x4d6cac,'type':_0x19a803?.[_0x435d98(0x1ec)]}),_0x435d98(0x22c)===_0x4d6cac&&this[_0x435d98(0x1b8)]();}[_0x359cd1(0x21c)](_0x51f7ad,_0x41ba17){const _0xe41e68=_0x359cd1;if(this[_0xe41e68(0x1fa)][_0xe41e68(0x1eb)](_0x51f7ad[_0xe41e68(0x1c3)])&&(this[_0xe41e68(0x1fa)][_0xe41e68(0x1e9)](_0x51f7ad[_0xe41e68(0x1c3)],_0x51f7ad),this[_0xe41e68(0x1c6)](_0xe41e68(0x1ff),{'contextItem':_0x51f7ad,'isLoading':_0x41ba17}),_0x51f7ad[_0xe41e68(0x1d7)])){const _0x46725f=this[_0xe41e68(0x1c2)](_0x51f7ad[_0xe41e68(0x1d7)]);_0x46725f&&_0x46725f[_0xe41e68(0x21e)](_0x22bd11=>{const _0x18d27c=_0xe41e68;this[_0x18d27c(0x1e3)](_0x22bd11,_0x51f7ad[_0x18d27c(0x1d7)],!0x0);});}}[_0x359cd1(0x227)](_0x36ae6c){const _0x3ac2bd=_0x359cd1;this[_0x3ac2bd(0x204)][_0x3ac2bd(0x1e9)](_0x36ae6c[_0x3ac2bd(0x1c3)],_0x36ae6c);}[_0x359cd1(0x1f5)](){const _0x78a2a1=_0x359cd1;this[_0x78a2a1(0x1ee)]={'document':{'enabled':!0x1!==this[_0x78a2a1(0x23b)]?.[_0x78a2a1(0x1bb)]?.[_0x78a2a1(0x232)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x78a2a1(0x23b)]?.[_0x78a2a1(0x222)]?.[_0x78a2a1(0x232)]},'files':{'enabled':!0x1!==this[_0x78a2a1(0x23b)]?.[_0x78a2a1(0x1fd)]?.[_0x78a2a1(0x232)]},'sources':this[_0x78a2a1(0x1d8)]()},this[_0x78a2a1(0x1c6)](_0x78a2a1(0x1f4),{'options':this[_0x78a2a1(0x1ee)]});}[_0x359cd1(0x1d8)](){const _0x152db1=_0x359cd1;return this[_0x152db1(0x23b)]?.[_0x152db1(0x220)]?.[_0x152db1(0x22b)](_0x235c20=>({..._0x235c20,'resources':[]}))??[];}[_0x359cd1(0x1b8)](){const _0x83cea3=_0x359cd1,_0x2338a7=this[_0x83cea3(0x1af)]()||this[_0x83cea3(0x1bc)]();this[_0x83cea3(0x1ee)][_0x83cea3(0x1bb)][_0x83cea3(0x237)]=_0x2338a7,this[_0x83cea3(0x1c6)](_0x83cea3(0x1f4),{'options':this[_0x83cea3(0x1ee)]});}[_0x359cd1(0x1e2)](_0x3dcdb4){const _0x32d84=_0x359cd1;for(const _0x135001 of this[_0x32d84(0x1fa)][_0x32d84(0x22f)]())if(_0x135001[_0x32d84(0x1d7)]===_0x3dcdb4)return!0x0;for(const _0x830c09 of this[_0x32d84(0x204)][_0x32d84(0x22f)]())if(_0x830c09[_0x32d84(0x1d7)]===_0x3dcdb4)return!0x0;return!0x1;}[_0x359cd1(0x1c2)](_0x2f6186){const _0x2a70c4=_0x359cd1,_0xdfa1ce=[];for(const _0x6488f of this[_0x2a70c4(0x1ee)][_0x2a70c4(0x220)]){_0x6488f[_0x2a70c4(0x1ba)][_0x2a70c4(0x230)](_0x56ccf8=>_0x56ccf8['id']===_0x2f6186)&&_0xdfa1ce[_0x2a70c4(0x1f3)](_0x6488f['id']);}return 0x0===_0xdfa1ce[_0x2a70c4(0x1b5)]?null:_0xdfa1ce;}[_0x359cd1(0x1e3)](_0x708560,_0x5c4d9e,_0x5e2fab){const _0x75756b=_0x359cd1,_0x1a5664=this[_0x75756b(0x1ee)][_0x75756b(0x220)][_0x75756b(0x230)](_0x267d8c=>_0x267d8c['id']===_0x708560);if(!_0x1a5664)return;const _0x4ffdc5=_0x1a5664[_0x75756b(0x1ba)][_0x75756b(0x230)](_0x4db52f=>_0x4db52f['id']===_0x5c4d9e);_0x4ffdc5&&(_0x4ffdc5[_0x75756b(0x1b1)]=_0x5e2fab,this[_0x75756b(0x1c6)](_0x75756b(0x1cf),{'sourceId':_0x708560,'resourceId':_0x5c4d9e,'isInContext':_0x5e2fab}));}[_0x359cd1(0x1ed)](_0x4b3132){const _0x2847e0=_0x359cd1;this[_0x2847e0(0x212)][_0x2847e0(0x1e9)](_0x4b3132,!0x0),this[_0x2847e0(0x212)][_0x2847e0(0x219)]&&this[_0x2847e0(0x1c6)](_0x2847e0(0x1bf),{'isUploadInProgress':!0x0});}[_0x359cd1(0x22e)](_0x5c2ec2){const _0x2e6ad5=_0x359cd1;this[_0x2e6ad5(0x212)][_0x2e6ad5(0x1b2)](_0x5c2ec2),0x0===this[_0x2e6ad5(0x212)][_0x2e6ad5(0x219)]&&this[_0x2e6ad5(0x1c6)](_0x2e6ad5(0x1bf),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x125b94=_0x573a;function _0x573a(_0x2dc29c,_0x290adb){const _0x5dad54=_0x5dad();return _0x573a=function(_0x573a0a,_0x229c07){_0x573a0a=_0x573a0a-0x1b1;let _0x4d758d=_0x5dad54[_0x573a0a];return _0x4d758d;},_0x573a(_0x2dc29c,_0x290adb);}(function(_0x570d8b,_0x1c2206){const _0x367247=_0x573a,_0x57af42=_0x570d8b();while(!![]){try{const _0x308bea=-parseInt(_0x367247(0x1d2))/0x1*(-parseInt(_0x367247(0x1d1))/0x2)+-parseInt(_0x367247(0x1ec))/0x3*(-parseInt(_0x367247(0x1e1))/0x4)+parseInt(_0x367247(0x21d))/0x5+parseInt(_0x367247(0x204))/0x6+-parseInt(_0x367247(0x1c9))/0x7*(-parseInt(_0x367247(0x1e3))/0x8)+-parseInt(_0x367247(0x219))/0x9*(-parseInt(_0x367247(0x1ba))/0xa)+parseInt(_0x367247(0x200))/0xb*(-parseInt(_0x367247(0x208))/0xc);if(_0x308bea===_0x1c2206)break;else _0x57af42['push'](_0x57af42['shift']());}catch(_0x56e7e7){_0x57af42['push'](_0x57af42['shift']());}}}(_0x5dad,0xbe52a));import{CKEditorError as _0x3b6223,EmitterMixin as _0x2610fb}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x39a293}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x437fe7,AI_CONTEXT_MODEL_EVENT_NAMES as _0x473397}from'./aichatcontext.js';function _0x5dad(){const _0x209fc5=['webSearch','34929VYIqHQ','_extractContextItems','reset','isCurrentDocumentInConversation','6542780ioWIMn','selectedModel','currentInteraction','init','assistant','model','addToConversationContext','chatModels','push','ai-chat-conversation-already-started','contextItems','getEditor','role','type','getCapabilitiesConfig','stack','chatContext','730dwDaBZ','populateFromMessage','error','getCurrentDocumentContext','load','addCurrentDocumentToContext','ai-chat-conversation-init-from-id-failed','toLowerCase','removeInteraction','setModel','isAvailable','getDefault','lastInteraction','toggleReasoning','appendContent','219583xfqlBn','message','currentReply','handleUserInteraction','addUrlToContext','getMessages','title','updateCurrentDocumentInContext','2JFpBHC','1446919jMUmwc','defaultModelId','ai-chat-conversation-start-failed','destroy','updateCurrentDocument','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-interaction-already-in-progress','createInteraction','getAll','_processMessagesToInteractions','modelSelected','setConversationTitle','removeSelectionFromContext','hasOwn','getPendingContextItems','12LIdyYb','sessionId','136shWfLe','isStarted','prompt','user','splice','set','toggleWebSearch','addSelectionToContext','fire','1180425lTpuoY','stop','getConversation','interactions','fetchConversationMessages','indexOf','modification-delta','createReply','start','find','ai-chat-conversation-init-failed','isCurrentDocumentInContext','addResourceToContext','conversationId','conversationInitialized','content','startConversation','removeFromContext','chatCapabilities','connector','53093579nFdtWb','ai-chat-conversation-set-model-null','ai-chat-handle-user-conversation-not-initialized','fetchConversation','5122590EsyZKW','isSelectionInContext','addFilesToContext','capabilities','12glqchJ','attributes','delegate','getInteraction','options','ai-chat-conversation-set-model-not-available','text','getDocumentContext','interactionCreated','group','text-delta','reasoning','quickActionData','length','loadSourceResources','conversationStarted'];_0x5dad=function(){return _0x209fc5;};return _0x5dad();}import{AICapabilities as _0x5ed96f,CAPABILITIES_MODEL_EVENT_NAMES as _0x12c4bd}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x464ead}from'./aichatinteraction.js';export class AIChatConversation extends _0x2610fb(){['id'];[_0x125b94(0x1e4)]=!0x1;[_0x125b94(0x1ef)]=[];[_0x125b94(0x21f)];[_0x125b94(0x21e)];[_0x125b94(0x1ff)];[_0x125b94(0x20c)];constructor(_0x1c2d2e){const _0xa309ac=_0x125b94;super(),this[_0xa309ac(0x20c)]=_0x1c2d2e,this[_0xa309ac(0x1ff)]=_0x1c2d2e[_0xa309ac(0x1ff)],this[_0xa309ac(0x224)]=_0x1c2d2e[_0xa309ac(0x224)],this['id']=_0x1c2d2e[_0xa309ac(0x1f9)];}async[_0x125b94(0x220)](_0xf53a3c){const _0x4298e0=_0x125b94;try{this[_0x4298e0(0x1b9)]=new _0x437fe7({'connector':this[_0x4298e0(0x1ff)],'config':_0xf53a3c,'ownerId':this['id']}),this[_0x4298e0(0x1b9)][_0x4298e0(0x20a)](..._0x473397)['to'](this),this[_0x4298e0(0x1b9)][_0x4298e0(0x220)](),this[_0x4298e0(0x1fe)]=new _0x5ed96f(),this[_0x4298e0(0x1fe)][_0x4298e0(0x20a)](..._0x12c4bd)['to'](this),this[_0x4298e0(0x1fe)][_0x4298e0(0x220)]();const _0x5491c0=await this[_0x4298e0(0x224)][_0x4298e0(0x1da)]();this[_0x4298e0(0x1eb)](_0x4298e0(0x1fa),{'availableModels':_0x5491c0});const _0x59e66b=await this[_0x4298e0(0x224)][_0x4298e0(0x1c5)](this[_0x4298e0(0x20c)][_0x4298e0(0x1d3)]);_0x59e66b&&await this[_0x4298e0(0x1c3)](_0x59e66b);}catch(_0x48788d){const _0x3367a4=new _0x3b6223(_0x4298e0(0x1f6),null,{'message':_0x48788d[_0x4298e0(0x1ca)]});_0x3367a4[_0x4298e0(0x1b8)]=_0x48788d[_0x4298e0(0x1b8)],this[_0x4298e0(0x1eb)](_0x4298e0(0x1bc),{'error':_0x3367a4});}}async[_0x125b94(0x1f4)](){const _0x4fe2d5=_0x125b94;if(this[_0x4fe2d5(0x1e4)])throw new _0x3b6223(_0x4fe2d5(0x1b2),null,{'conversation':this});if(!this[_0x4fe2d5(0x21e)])throw new _0x3b6223(_0x4fe2d5(0x1d7),null,{'conversation':this});try{const {id:_0x58af17}=await this[_0x4fe2d5(0x1ff)][_0x4fe2d5(0x1fc)](this['id'],this[_0x4fe2d5(0x20c)][_0x4fe2d5(0x211)])[_0x4fe2d5(0x1ee)]();this['id']=_0x58af17,this[_0x4fe2d5(0x1e4)]=!0x0,this[_0x4fe2d5(0x1eb)](_0x4fe2d5(0x217),{'conversationId':this['id'],'selectedModel':this[_0x4fe2d5(0x21e)]});}catch(_0x2b32a9){const _0x296bdc=new _0x3b6223(_0x4fe2d5(0x1d4),null,{'message':_0x2b32a9[_0x4fe2d5(0x1ca)]});_0x296bdc[_0x4fe2d5(0x1b8)]=_0x2b32a9[_0x4fe2d5(0x1b8)],this[_0x4fe2d5(0x1eb)](_0x4fe2d5(0x1bc),{'error':_0x296bdc});}}async[_0x125b94(0x1be)](_0x138e8,_0x49e5ec){const _0x38c01e=_0x125b94;try{const _0x2632d7=await this[_0x38c01e(0x1ff)][_0x38c01e(0x203)](_0x138e8)[_0x38c01e(0x1ee)](),_0x4867f1=await this[_0x38c01e(0x1ff)][_0x38c01e(0x1f0)](_0x138e8)[_0x38c01e(0x1ce)](),_0x235188=_0x4867f1[0x0][_0x38c01e(0x222)];this[_0x38c01e(0x1e4)]=!0x0,this['id']=_0x2632d7['id'],_0x38c01e(0x1cf)in _0x2632d7?this[_0x38c01e(0x1eb)](_0x38c01e(0x1dd),_0x2632d7[_0x38c01e(0x1cf)],!0x0):this[_0x38c01e(0x1eb)](_0x38c01e(0x1dd),'',!0x0);const _0x2585bc=(await this[_0x38c01e(0x224)][_0x38c01e(0x1da)]())[_0x38c01e(0x1f5)](_0x1ea304=>_0x1ea304['id'][_0x38c01e(0x1c1)]()===_0x235188[_0x38c01e(0x1c1)]());return this[_0x38c01e(0x21e)]=_0x2585bc,this[_0x38c01e(0x1eb)](_0x38c01e(0x1dc),{'selectedModel':_0x2585bc,'isDisabled':!0x0}),await this[_0x38c01e(0x1db)](_0x4867f1,_0x49e5ec,_0x235188),this[_0x38c01e(0x21f)]=void 0x0,this;}catch(_0x36f07e){const _0x405fb6=new _0x3b6223(_0x38c01e(0x1c0),null,{'message':_0x36f07e[_0x38c01e(0x1ca)],'conversationId':_0x138e8});throw _0x405fb6[_0x38c01e(0x1b8)]=_0x36f07e[_0x38c01e(0x1b8)],this[_0x38c01e(0x1eb)](_0x38c01e(0x1bc),{'error':_0x405fb6}),_0x405fb6;}}async[_0x125b94(0x1db)](_0x1b7c8f,_0x1bebaf,_0x4d96a2){const _0x35d308=_0x125b94;let _0x4cafe1;for(const _0x4f20e6 of _0x1b7c8f)if(_0x35d308(0x1e6)===_0x4f20e6[_0x35d308(0x1b5)]){const _0x5cbbdc=await this[_0x35d308(0x21a)](_0x4f20e6),_0x57882f={'isReasoningEnabled':Object[_0x35d308(0x1df)](_0x4f20e6[_0x35d308(0x207)],_0x35d308(0x213)),'isWebSearchEnabled':Object[_0x35d308(0x1df)](_0x4f20e6[_0x35d308(0x207)],_0x35d308(0x218))};_0x4cafe1=this[_0x35d308(0x1d9)]({'userMessage':_0x4f20e6[_0x35d308(0x1e5)],'contextItems':_0x5cbbdc,'capabilities':_0x57882f,'modelId':_0x4d96a2,'quickActionData':_0x4f20e6[_0x35d308(0x209)]?.[_0x35d308(0x214)]}),this[_0x35d308(0x21f)]=_0x4cafe1,this[_0x35d308(0x1b9)][_0x35d308(0x223)](this[_0x35d308(0x21f)][_0x35d308(0x1b3)]);}else{if(_0x35d308(0x221)===_0x4f20e6[_0x35d308(0x1b5)]&&_0x4cafe1)for(const _0x176493 of _0x4f20e6[_0x35d308(0x1fb)]){const _0x5f54e4=_0x35d308(0x20e)===_0x176493[_0x35d308(0x1b6)]?_0x35d308(0x212):_0x35d308(0x1f2),_0x195f14=_0x4cafe1[_0x35d308(0x20f)]()?.[_0x35d308(0x1e2)]!==_0x1bebaf;_0x4cafe1[_0x35d308(0x1cb)]=_0x4cafe1[_0x35d308(0x1f3)]({'type':_0x5f54e4,'isDone':!0x0,'interactionId':_0x4cafe1['id'],'areActionsDisabled':_0x195f14}),_0x4cafe1[_0x35d308(0x1cb)][_0x35d308(0x1c8)](_0x176493[_0x35d308(0x1fb)]);}}}async[_0x125b94(0x21a)](_0x572fa7){const _0x12237e=_0x125b94,_0x545809=new Map();if(!_0x572fa7[_0x12237e(0x1fb)])return _0x545809;for(const _0x277b49 of _0x572fa7[_0x12237e(0x1fb)]){const _0x28fcb3=await this[_0x12237e(0x1b9)][_0x12237e(0x1bb)](_0x277b49);_0x28fcb3&&_0x545809[_0x12237e(0x1e8)](_0x28fcb3['id'],_0x28fcb3);}return _0x545809;}async[_0x125b94(0x1cc)]({userMessage:_0x4ef7be,quickActionData:_0x47b549}){const _0x4079a6=_0x125b94;if(!this[_0x4079a6(0x1e4)])throw new _0x3b6223(_0x4079a6(0x202),null,{'conversation':this});if(this[_0x4079a6(0x21f)])throw new _0x3b6223(_0x4079a6(0x1d8),null,{'conversation':this});try{const _0x3a3d42=this[_0x4079a6(0x1b9)][_0x4079a6(0x1e0)](),_0x11f73e=this[_0x4079a6(0x1fe)][_0x4079a6(0x1b7)](),_0x134141=this[_0x4079a6(0x21e)]['id'];this[_0x4079a6(0x21f)]=this[_0x4079a6(0x1d9)]({'userMessage':_0x4ef7be,'contextItems':_0x3a3d42,'capabilities':_0x11f73e,'modelId':_0x134141,'quickActionData':_0x47b549}),await this[_0x4079a6(0x21f)][_0x4079a6(0x1f4)](),this[_0x4079a6(0x1b9)][_0x4079a6(0x223)](this[_0x4079a6(0x21f)][_0x4079a6(0x1b3)]);}catch(_0x1ad71e){this[_0x4079a6(0x1eb)](_0x4079a6(0x1bc),{'interactionId':this[_0x4079a6(0x21f)]?this[_0x4079a6(0x21f)]['id']:void 0x0,'error':_0x1ad71e});}finally{this[_0x4079a6(0x21f)]?.[_0x4079a6(0x1ed)](),this[_0x4079a6(0x21f)]=void 0x0;}}[_0x125b94(0x1d9)]({userMessage:_0x55cb5c,contextItems:_0x44bb61,capabilities:_0x5d1a51,modelId:_0x3ae774,quickActionData:_0xf6dfe9}){const _0x39c302=_0x125b94,_0x59c364=new _0x464ead({'userMessage':_0x55cb5c,'contextItems':_0x44bb61,'capabilities':_0x5d1a51,'conversationId':this['id'],'connector':this[_0x39c302(0x1ff)],'editor':this[_0x39c302(0x20c)][_0x39c302(0x1b4)]&&this[_0x39c302(0x20c)][_0x39c302(0x1b4)](),'model':_0x3ae774,'quickActionData':_0xf6dfe9});return _0x59c364[_0x39c302(0x20a)](..._0x39a293)['to'](this),this[_0x39c302(0x1ef)][_0x39c302(0x1b1)](_0x59c364),this[_0x39c302(0x1eb)](_0x39c302(0x210),_0x59c364),_0x59c364;}[_0x125b94(0x20b)](_0x59edff){const _0x5cf8ac=_0x125b94;return this[_0x5cf8ac(0x1ef)][_0x5cf8ac(0x1f5)](_0x3de3c3=>_0x3de3c3['id']===_0x59edff);}[_0x125b94(0x1c2)](_0x475e34){const _0x1a8374=_0x125b94,_0x184a25=this[_0x1a8374(0x20b)](_0x475e34);_0x184a25&&(_0x184a25[_0x1a8374(0x1d5)](),this[_0x1a8374(0x1ef)][_0x1a8374(0x1e7)](this[_0x1a8374(0x1ef)][_0x1a8374(0x1f1)](_0x184a25),0x1));}get[_0x125b94(0x1c6)](){const _0x220a66=_0x125b94;return this[_0x220a66(0x1ef)][this[_0x220a66(0x1ef)][_0x220a66(0x215)]-0x1];}[_0x125b94(0x1bf)](_0x1438d9){const _0x3ebfc5=_0x125b94;this[_0x3ebfc5(0x1b9)][_0x3ebfc5(0x1bf)](_0x1438d9);}async[_0x125b94(0x1d0)]({content:_0x10976a,version:_0x8b5de7,sessionId:_0x4f6337,selections:_0x28302a}){const _0x3a9609=_0x125b94;await this[_0x3a9609(0x1b9)][_0x3a9609(0x1d6)](_0x10976a,_0x8b5de7,_0x4f6337,_0x28302a);}[_0x125b94(0x1bd)](){const _0x5c550e=_0x125b94;return this[_0x5c550e(0x21f)]?.[_0x5c550e(0x20f)]()?.[_0x5c550e(0x1fb)]||'';}[_0x125b94(0x1ea)](_0x26a5e9){const _0x3a429c=_0x125b94;this[_0x3a429c(0x1b9)][_0x3a429c(0x1ea)](_0x26a5e9);}[_0x125b94(0x1de)](){const _0x3af4e9=_0x125b94;this[_0x3af4e9(0x1b9)][_0x3af4e9(0x1de)]();}[_0x125b94(0x206)](_0x3e3d1c){const _0x207d58=_0x125b94;this[_0x207d58(0x1b9)][_0x207d58(0x206)](_0x3e3d1c);}[_0x125b94(0x1cd)](_0x2a13c1){const _0x2f0647=_0x125b94;this[_0x2f0647(0x1b9)][_0x2f0647(0x1cd)](_0x2a13c1);}[_0x125b94(0x1f8)](_0x52a7c1,_0x3a03d6){const _0x21ae73=_0x125b94;this[_0x21ae73(0x1b9)][_0x21ae73(0x1f8)](_0x52a7c1,_0x3a03d6);}[_0x125b94(0x216)](_0x294f9a,_0x38c2b6,_0x2c6fba){const _0x1f7132=_0x125b94;return this[_0x1f7132(0x1b9)][_0x1f7132(0x216)](_0x294f9a,_0x38c2b6,_0x2c6fba);}[_0x125b94(0x1fd)](_0x55ff0b){const _0x128012=_0x125b94;this[_0x128012(0x1b9)][_0x128012(0x1fd)](_0x55ff0b);}[_0x125b94(0x1e9)](){const _0x29a1b=_0x125b94;this[_0x29a1b(0x1fe)][_0x29a1b(0x1e9)]();}[_0x125b94(0x1c7)](){const _0x50729a=_0x125b94;this[_0x50729a(0x1fe)][_0x50729a(0x1c7)]();}[_0x125b94(0x1f7)](){const _0xeaf54f=_0x125b94;return this[_0xeaf54f(0x1b9)][_0xeaf54f(0x1f7)]();}[_0x125b94(0x21c)](){const _0x44f207=_0x125b94;return this[_0x44f207(0x1b9)][_0x44f207(0x21c)]();}[_0x125b94(0x205)](){const _0x3bbe16=_0x125b94;return this[_0x3bbe16(0x1b9)][_0x3bbe16(0x205)]();}async[_0x125b94(0x1c3)](_0x23845a){const _0x3d260b=_0x125b94;if(!_0x23845a)throw new _0x3b6223(_0x3d260b(0x201),null,{'conversation':this});if(!0x1===await this[_0x3d260b(0x224)][_0x3d260b(0x1c4)](_0x23845a))throw new _0x3b6223(_0x3d260b(0x20d),null,{'conversation':this,'model':_0x23845a});_0x23845a['id']!==this[_0x3d260b(0x21e)]?.['id']&&(this[_0x3d260b(0x21e)]=_0x23845a,this[_0x3d260b(0x1fe)][_0x3d260b(0x21b)](),this[_0x3d260b(0x1eb)](_0x3d260b(0x1dc),{'selectedModel':_0x23845a}));}}
|
|
23
|
+
const _0x572b21=_0x585f;(function(_0x30be62,_0x56c082){const _0x137836=_0x585f,_0x20dc7f=_0x30be62();while(!![]){try{const _0x40c7a6=parseInt(_0x137836(0x16c))/0x1*(-parseInt(_0x137836(0x189))/0x2)+-parseInt(_0x137836(0x183))/0x3*(parseInt(_0x137836(0x139))/0x4)+-parseInt(_0x137836(0x16b))/0x5*(parseInt(_0x137836(0x15a))/0x6)+parseInt(_0x137836(0x179))/0x7+-parseInt(_0x137836(0x156))/0x8+parseInt(_0x137836(0x152))/0x9+parseInt(_0x137836(0x143))/0xa*(parseInt(_0x137836(0x13d))/0xb);if(_0x40c7a6===_0x56c082)break;else _0x20dc7f['push'](_0x20dc7f['shift']());}catch(_0x2e56cb){_0x20dc7f['push'](_0x20dc7f['shift']());}}}(_0x2912,0x7e039));import{CKEditorError as _0x42ec1f,EmitterMixin as _0x2192b3}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x885203}from'../../aicore/model/aiinteraction.js';function _0x2912(){const _0x1ba772=['_processMessagesToInteractions','9338870fllCAQ','contextItems','ai-chat-conversation-start-failed','isCurrentDocumentInContext','set','text-delta','defaultModelId','currentReply','ai-chat-conversation-set-model-null','model','modelSelected','getAll','setConversationTitle','removeInteraction','options','1541646TQZDTF','fetchConversation','message','addFilesToContext','788728dKTSss','hasOwn','splice','addResourceToContext','6GDmVlQ','text','isAvailable','reset','addCurrentDocumentToContext','getMessages','setModel','ai-chat-conversation-init-from-id-failed','reasoning','createInteraction','conversationStarted','addToConversationContext','init','assistant','attributes','stack','stop','1198970ZyDTIW','9130BydadG','getCurrentDocumentContext','ai-chat-conversation-start-no-model-selected','getDocumentContext','getDefault','updateCurrentDocumentInContext','delegate','fetchConversationMessages','ai-chat-conversation-set-model-not-available','user','getInteraction','content','getConversation','6587539fiVatn','length','_extractContextItems','webSearch','quickActionData','toggleReasoning','getCapabilitiesConfig','type','push','title','6165VSZiGT','conversationId','interactionCreated','getPendingContextItems','isSelectionInContext','error','108rJKoOk','chatModels','ai-chat-handle-user-conversation-not-initialized','selectedModel','chatContext','createReply','updateCurrentDocument','sessionId','role','toLowerCase','prompt','currentInteraction','ai-chat-conversation-already-started','loadSourceResources','ai-chat-handle-user-interaction-already-in-progress','fire','toggleWebSearch','connector','removeSelectionFromContext','addSelectionToContext','addUrlToContext','getEditor','destroy','modification-delta','removeFromContext','group','handleUserInteraction','ai-chat-conversation-init-failed','lastInteraction','find','interactions','isCurrentDocumentInConversation','chatCapabilities','start','isStarted','1360UWISUe','conversationInitialized','appendContent','load','11iBKLCF','indexOf','startConversation','populateFromMessage','capabilities'];_0x2912=function(){return _0x1ba772;};return _0x2912();}import{AIChatContext as _0x3d9b40,AI_CONTEXT_MODEL_EVENT_NAMES as _0x350d33}from'./aichatcontext.js';function _0x585f(_0x57fdc7,_0x494d01){const _0x291200=_0x2912();return _0x585f=function(_0x585f32,_0x597c2c){_0x585f32=_0x585f32-0x134;let _0x5b1b64=_0x291200[_0x585f32];return _0x5b1b64;},_0x585f(_0x57fdc7,_0x494d01);}import{AICapabilities as _0x5eaf95,CAPABILITIES_MODEL_EVENT_NAMES as _0x3790a0}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x408ece}from'./aichatinteraction.js';export class AIChatConversation extends _0x2192b3(){['id'];[_0x572b21(0x138)]=!0x1;[_0x572b21(0x134)]=[];[_0x572b21(0x194)];[_0x572b21(0x18c)];[_0x572b21(0x19a)];[_0x572b21(0x151)];constructor(_0x3fda16){const _0x5c0c94=_0x572b21;super(),this[_0x5c0c94(0x151)]=_0x3fda16,this[_0x5c0c94(0x19a)]=_0x3fda16[_0x5c0c94(0x19a)],this[_0x5c0c94(0x18a)]=_0x3fda16[_0x5c0c94(0x18a)],this['id']=_0x3fda16[_0x5c0c94(0x184)];}async[_0x572b21(0x166)](_0x60ab66){const _0x10c58e=_0x572b21;try{this[_0x10c58e(0x18d)]=new _0x3d9b40({'connector':this[_0x10c58e(0x19a)],'config':_0x60ab66,'ownerId':this['id']}),this[_0x10c58e(0x18d)][_0x10c58e(0x172)](..._0x350d33)['to'](this),this[_0x10c58e(0x18d)][_0x10c58e(0x166)](),this[_0x10c58e(0x136)]=new _0x5eaf95(),this[_0x10c58e(0x136)][_0x10c58e(0x172)](..._0x3790a0)['to'](this),this[_0x10c58e(0x136)][_0x10c58e(0x166)]();const _0x5494da=await this[_0x10c58e(0x18a)][_0x10c58e(0x14e)]();this[_0x10c58e(0x198)](_0x10c58e(0x13a),{'availableModels':_0x5494da});const _0xc8ed70=await this[_0x10c58e(0x18a)][_0x10c58e(0x170)](this[_0x10c58e(0x151)][_0x10c58e(0x149)]);_0xc8ed70&&await this[_0x10c58e(0x160)](_0xc8ed70);}catch(_0x3848da){const _0x5be35c=new _0x42ec1f(_0x10c58e(0x1a4),null,{'message':_0x3848da[_0x10c58e(0x154)]});_0x5be35c[_0x10c58e(0x169)]=_0x3848da[_0x10c58e(0x169)],this[_0x10c58e(0x198)](_0x10c58e(0x188),{'error':_0x5be35c});}}async[_0x572b21(0x137)](){const _0x431655=_0x572b21;if(this[_0x431655(0x138)])throw new _0x42ec1f(_0x431655(0x195),null,{'conversation':this});if(!this[_0x431655(0x18c)])throw new _0x42ec1f(_0x431655(0x16e),null,{'conversation':this});try{const {id:_0x21a4c4}=await this[_0x431655(0x19a)][_0x431655(0x13f)](this['id'],this[_0x431655(0x151)][_0x431655(0x1a2)])[_0x431655(0x178)]();this['id']=_0x21a4c4,this[_0x431655(0x138)]=!0x0,this[_0x431655(0x198)](_0x431655(0x164),{'conversationId':this['id'],'selectedModel':this[_0x431655(0x18c)]});}catch(_0x698370){const _0x59d31c=new _0x42ec1f(_0x431655(0x145),null,{'message':_0x698370[_0x431655(0x154)]});_0x59d31c[_0x431655(0x169)]=_0x698370[_0x431655(0x169)],this[_0x431655(0x198)](_0x431655(0x188),{'error':_0x59d31c});}}async[_0x572b21(0x13c)](_0x5bc08c,_0x4c6d36){const _0x4784f1=_0x572b21;try{const _0xa4da99=await this[_0x4784f1(0x19a)][_0x4784f1(0x153)](_0x5bc08c)[_0x4784f1(0x178)](),_0x3d824a=await this[_0x4784f1(0x19a)][_0x4784f1(0x173)](_0x5bc08c)[_0x4784f1(0x15f)](),_0x515506=_0x3d824a[0x0][_0x4784f1(0x14c)];this[_0x4784f1(0x138)]=!0x0,this['id']=_0xa4da99['id'],_0x4784f1(0x182)in _0xa4da99?this[_0x4784f1(0x198)](_0x4784f1(0x14f),_0xa4da99[_0x4784f1(0x182)],!0x0):this[_0x4784f1(0x198)](_0x4784f1(0x14f),'',!0x0);const _0x2b1b22=(await this[_0x4784f1(0x18a)][_0x4784f1(0x14e)]())[_0x4784f1(0x1a6)](_0x29369f=>_0x29369f['id'][_0x4784f1(0x192)]()===_0x515506[_0x4784f1(0x192)]());return this[_0x4784f1(0x18c)]=_0x2b1b22,this[_0x4784f1(0x198)](_0x4784f1(0x14d),{'selectedModel':_0x2b1b22,'isDisabled':!0x0}),await this[_0x4784f1(0x142)](_0x3d824a,_0x4c6d36,_0x515506),this[_0x4784f1(0x194)]=void 0x0,this;}catch(_0x4be8be){const _0x5c5439=new _0x42ec1f(_0x4784f1(0x161),null,{'message':_0x4be8be[_0x4784f1(0x154)],'conversationId':_0x5bc08c});throw _0x5c5439[_0x4784f1(0x169)]=_0x4be8be[_0x4784f1(0x169)],this[_0x4784f1(0x198)](_0x4784f1(0x188),{'error':_0x5c5439}),_0x5c5439;}}async[_0x572b21(0x142)](_0x4cec24,_0x407107,_0x42f170){const _0x32a100=_0x572b21;let _0x3c01c9;for(const _0x4d1d84 of _0x4cec24)if(_0x32a100(0x175)===_0x4d1d84[_0x32a100(0x191)]){const _0xfdf64e=await this[_0x32a100(0x17b)](_0x4d1d84),_0x59e5f9={'isReasoningEnabled':Object[_0x32a100(0x157)](_0x4d1d84[_0x32a100(0x141)],_0x32a100(0x162)),'isWebSearchEnabled':Object[_0x32a100(0x157)](_0x4d1d84[_0x32a100(0x141)],_0x32a100(0x17c))};_0x3c01c9=this[_0x32a100(0x163)]({'userMessage':_0x4d1d84[_0x32a100(0x193)],'contextItems':_0xfdf64e,'capabilities':_0x59e5f9,'modelId':_0x42f170,'quickActionData':_0x4d1d84[_0x32a100(0x168)]?.[_0x32a100(0x17d)]}),this[_0x32a100(0x194)]=_0x3c01c9,this[_0x32a100(0x18d)][_0x32a100(0x165)](this[_0x32a100(0x194)][_0x32a100(0x144)]);}else{if(_0x32a100(0x167)===_0x4d1d84[_0x32a100(0x191)]&&_0x3c01c9)for(const _0x25a489 of _0x4d1d84[_0x32a100(0x177)]){const _0x522c3e=_0x32a100(0x15b)===_0x25a489[_0x32a100(0x180)]?_0x32a100(0x148):_0x32a100(0x1a0),_0x2d0d75=_0x3c01c9[_0x32a100(0x16f)]()?.[_0x32a100(0x190)]!==_0x407107;_0x3c01c9[_0x32a100(0x14a)]=_0x3c01c9[_0x32a100(0x18e)]({'type':_0x522c3e,'isDone':!0x0,'interactionId':_0x3c01c9['id'],'areActionsDisabled':_0x2d0d75}),_0x3c01c9[_0x32a100(0x14a)][_0x32a100(0x13b)](_0x25a489[_0x32a100(0x177)]);}}}async[_0x572b21(0x17b)](_0x3015a4){const _0x321c4f=_0x572b21,_0x1e34ce=new Map();if(!_0x3015a4[_0x321c4f(0x177)])return _0x1e34ce;for(const _0x252136 of _0x3015a4[_0x321c4f(0x177)]){const _0x350c46=await this[_0x321c4f(0x18d)][_0x321c4f(0x140)](_0x252136);_0x350c46&&_0x1e34ce[_0x321c4f(0x147)](_0x350c46['id'],_0x350c46);}return _0x1e34ce;}async[_0x572b21(0x1a3)]({userMessage:_0x1bcdde,quickActionData:_0x8c0fc2}){const _0x275768=_0x572b21;if(!this[_0x275768(0x138)])throw new _0x42ec1f(_0x275768(0x18b),null,{'conversation':this});if(this[_0x275768(0x194)])throw new _0x42ec1f(_0x275768(0x197),null,{'conversation':this});try{const _0x4de5e4=this[_0x275768(0x18d)][_0x275768(0x186)](),_0x23ad04=this[_0x275768(0x136)][_0x275768(0x17f)](),_0x539185=this[_0x275768(0x18c)]['id'];this[_0x275768(0x194)]=this[_0x275768(0x163)]({'userMessage':_0x1bcdde,'contextItems':_0x4de5e4,'capabilities':_0x23ad04,'modelId':_0x539185,'quickActionData':_0x8c0fc2}),await this[_0x275768(0x194)][_0x275768(0x137)](),this[_0x275768(0x18d)][_0x275768(0x165)](this[_0x275768(0x194)][_0x275768(0x144)]);}catch(_0x221f5d){this[_0x275768(0x198)](_0x275768(0x188),{'interactionId':this[_0x275768(0x194)]?this[_0x275768(0x194)]['id']:void 0x0,'error':_0x221f5d});}finally{this[_0x275768(0x194)]?.[_0x275768(0x16a)](),this[_0x275768(0x194)]=void 0x0;}}[_0x572b21(0x163)]({userMessage:_0x33b612,contextItems:_0xa96415,capabilities:_0x2a3e6e,modelId:_0x3bb28b,quickActionData:_0x1dbb4e}){const _0x2a926b=_0x572b21,_0x4c8237=new _0x408ece({'userMessage':_0x33b612,'contextItems':_0xa96415,'capabilities':_0x2a3e6e,'conversationId':this['id'],'connector':this[_0x2a926b(0x19a)],'editor':this[_0x2a926b(0x151)][_0x2a926b(0x19e)]&&this[_0x2a926b(0x151)][_0x2a926b(0x19e)](),'model':_0x3bb28b,'quickActionData':_0x1dbb4e});return _0x4c8237[_0x2a926b(0x172)](..._0x885203)['to'](this),this[_0x2a926b(0x134)][_0x2a926b(0x181)](_0x4c8237),this[_0x2a926b(0x198)](_0x2a926b(0x185),_0x4c8237),_0x4c8237;}[_0x572b21(0x176)](_0x3d92cb){const _0xd8683d=_0x572b21;return this[_0xd8683d(0x134)][_0xd8683d(0x1a6)](_0x36ade1=>_0x36ade1['id']===_0x3d92cb);}[_0x572b21(0x150)](_0x5c54f8){const _0x34d50c=_0x572b21,_0x323329=this[_0x34d50c(0x176)](_0x5c54f8);_0x323329&&(_0x323329[_0x34d50c(0x19f)](),this[_0x34d50c(0x134)][_0x34d50c(0x158)](this[_0x34d50c(0x134)][_0x34d50c(0x13e)](_0x323329),0x1));}get[_0x572b21(0x1a5)](){const _0x480b2c=_0x572b21;return this[_0x480b2c(0x134)][this[_0x480b2c(0x134)][_0x480b2c(0x17a)]-0x1];}[_0x572b21(0x15e)](_0x978983){const _0x478f01=_0x572b21;this[_0x478f01(0x18d)][_0x478f01(0x15e)](_0x978983);}async[_0x572b21(0x171)]({content:_0xd11ead,version:_0x48ea17,sessionId:_0x5cd8fc,selections:_0x1f979c}){const _0x34d744=_0x572b21;await this[_0x34d744(0x18d)][_0x34d744(0x18f)](_0xd11ead,_0x48ea17,_0x5cd8fc,_0x1f979c);}[_0x572b21(0x16d)](){const _0x2e1aa9=_0x572b21;return this[_0x2e1aa9(0x194)]?.[_0x2e1aa9(0x16f)]()?.[_0x2e1aa9(0x177)]||'';}[_0x572b21(0x19c)](_0x1fda03){const _0x311854=_0x572b21;this[_0x311854(0x18d)][_0x311854(0x19c)](_0x1fda03);}[_0x572b21(0x19b)](){const _0x27c183=_0x572b21;this[_0x27c183(0x18d)][_0x27c183(0x19b)]();}[_0x572b21(0x155)](_0x5c2d10){const _0x3921bb=_0x572b21;this[_0x3921bb(0x18d)][_0x3921bb(0x155)](_0x5c2d10);}[_0x572b21(0x19d)](_0x6380c){const _0x116480=_0x572b21;this[_0x116480(0x18d)][_0x116480(0x19d)](_0x6380c);}[_0x572b21(0x159)](_0x564059,_0x242a87){const _0x334ce8=_0x572b21;this[_0x334ce8(0x18d)][_0x334ce8(0x159)](_0x564059,_0x242a87);}[_0x572b21(0x196)](_0x318806,_0x3e4400,_0x207fa7){const _0x55bba4=_0x572b21;return this[_0x55bba4(0x18d)][_0x55bba4(0x196)](_0x318806,_0x3e4400,_0x207fa7);}[_0x572b21(0x1a1)](_0xf9adda){const _0x3c02b2=_0x572b21;this[_0x3c02b2(0x18d)][_0x3c02b2(0x1a1)](_0xf9adda);}[_0x572b21(0x199)](){const _0x2fc6f1=_0x572b21;this[_0x2fc6f1(0x136)][_0x2fc6f1(0x199)]();}[_0x572b21(0x17e)](){const _0x403b58=_0x572b21;this[_0x403b58(0x136)][_0x403b58(0x17e)]();}[_0x572b21(0x146)](){const _0x451ab2=_0x572b21;return this[_0x451ab2(0x18d)][_0x451ab2(0x146)]();}[_0x572b21(0x135)](){const _0x406834=_0x572b21;return this[_0x406834(0x18d)][_0x406834(0x135)]();}[_0x572b21(0x187)](){const _0x56076c=_0x572b21;return this[_0x56076c(0x18d)][_0x56076c(0x187)]();}async[_0x572b21(0x160)](_0x2001fe){const _0x2643a0=_0x572b21;if(!_0x2001fe)throw new _0x42ec1f(_0x2643a0(0x14b),null,{'conversation':this});if(!0x1===await this[_0x2643a0(0x18a)][_0x2643a0(0x15c)](_0x2001fe))throw new _0x42ec1f(_0x2643a0(0x174),null,{'conversation':this,'model':_0x2001fe});_0x2001fe['id']!==this[_0x2643a0(0x18c)]?.['id']&&(this[_0x2643a0(0x18c)]=_0x2001fe,this[_0x2643a0(0x136)][_0x2643a0(0x15d)](),this[_0x2643a0(0x198)](_0x2643a0(0x14d),{'selectedModel':_0x2001fe}));}}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/model/aichatinteraction
|
|
7
|
+
*/
|
|
5
8
|
import { type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
6
9
|
import { AIInteraction, type AIInteractionOptions } from '../../aicore/model/aiinteraction.js';
|
|
7
10
|
import { type AIConnectorRequest } from '../../aicore/aiconnector.js';
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
var _0x4f8b5a=_0x3734;(function(_0x52aa92,_0x3265ac){var _0x4a68d0=_0x3734,_0x101180=_0x52aa92();while(!![]){try{var _0x504d91=parseInt(_0x4a68d0(0x76))/0x1+-parseInt(_0x4a68d0(0x73))/0x2+-parseInt(_0x4a68d0(0x78))/0x3+parseInt(_0x4a68d0(0x83))/0x4*(parseInt(_0x4a68d0(0x7a))/0x5)+-parseInt(_0x4a68d0(0x74))/0x6+parseInt(_0x4a68d0(0x82))/0x7*(parseInt(_0x4a68d0(0x70))/0x8)+-parseInt(_0x4a68d0(0x7e))/0x9;if(_0x504d91===_0x3265ac)break;else _0x101180['push'](_0x101180['shift']());}catch(_0x104e2d){_0x101180['push'](_0x101180['shift']());}}}(_0x4ff0,0xd9722));import{AICapabilities as _0x4bb99b}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x1c05cc}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x103135}from'./aichatcontext.js';function _0x3734(_0x21c69c,_0x31a411){var _0x4ff08d=_0x4ff0();return _0x3734=function(_0x3734ba,_0x53e0ab){_0x3734ba=_0x3734ba-0x6d;var _0x5c6d4f=_0x4ff08d[_0x3734ba];return _0x5c6d4f;},_0x3734(_0x21c69c,_0x31a411);}function _0x4ff0(){var _0x429631=['current-document','getCapabilitiesRequestData','sendRequest','5772708VZDwIv','conversationId','getDocumentContext','contextItems','77LZwRDL','5484LcgQkN','mapContextItemsToRequestData','connector','queryAssistant','777800BUfGyK','model','get','2510146PQlRfP','4933128dSxFVR','quickActionData','1716639jAmTou','userMessage','450579aCtKan','capabilities','3550ewVCen'];_0x4ff0=function(){return _0x429631;};return _0x4ff0();}export class AIChatInteraction extends _0x1c05cc{[_0x4f8b5a(0x77)];[_0x4f8b5a(0x7f)];[_0x4f8b5a(0x81)]=new Map();[_0x4f8b5a(0x71)];[_0x4f8b5a(0x75)];constructor(_0x507893){var _0x23dc5f=_0x4f8b5a;super(_0x507893),this[_0x23dc5f(0x7f)]=_0x507893[_0x23dc5f(0x7f)],this[_0x23dc5f(0x81)]=_0x507893[_0x23dc5f(0x81)],this[_0x23dc5f(0x79)]=_0x507893[_0x23dc5f(0x79)],this[_0x23dc5f(0x77)]=_0x507893[_0x23dc5f(0x77)],this[_0x23dc5f(0x71)]=_0x507893[_0x23dc5f(0x71)],this[_0x23dc5f(0x75)]=_0x507893[_0x23dc5f(0x75)];}async[_0x4f8b5a(0x7d)](){var _0x2efab4=_0x4f8b5a;return this[_0x2efab4(0x6e)][_0x2efab4(0x6f)]({'message':this[_0x2efab4(0x77)],'conversationId':this[_0x2efab4(0x7f)],'parts':_0x103135[_0x2efab4(0x6d)](this[_0x2efab4(0x81)]),'capabilities':_0x4bb99b[_0x2efab4(0x7c)](this[_0x2efab4(0x79)]),'model':this[_0x2efab4(0x71)],'quickActionData':this[_0x2efab4(0x75)]});}[_0x4f8b5a(0x80)](){var _0x201c30=_0x4f8b5a;return this[_0x201c30(0x81)][_0x201c30(0x72)](_0x201c30(0x7b));}}
|
|
@@ -2,35 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import { type AIConnector, type AIModelData } from '../../aicore/aiconnector.js';
|
|
6
|
-
declare const AIChatModels_base: {
|
|
7
|
-
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
8
|
-
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Stores the list of available AI chat models.
|
|
12
|
-
*/
|
|
13
|
-
export declare class AIChatModels extends /* #__PURE__ */ AIChatModels_base {
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
constructor({ connector }: {
|
|
18
|
-
connector: AIConnector;
|
|
19
|
-
});
|
|
20
|
-
/**
|
|
21
|
-
* Returns a list of available AI chat models.
|
|
22
|
-
*/
|
|
23
|
-
getAll(): Promise<Array<AIChatModel>>;
|
|
24
|
-
/**
|
|
25
|
-
* Returns default AI chat model.
|
|
26
|
-
*/
|
|
27
|
-
getDefault(defaultModelId?: string): Promise<AIChatModel | null>;
|
|
28
|
-
/**
|
|
29
|
-
* Checks whether the given model is available.
|
|
30
|
-
*/
|
|
31
|
-
isAvailable(model: AIChatModel): Promise<boolean>;
|
|
32
|
-
}
|
|
33
|
-
export type AIChatModel = AIModelData;
|
|
34
5
|
/**
|
|
35
6
|
* The configuration of the AI Chat models feature.
|
|
36
7
|
*
|
|
@@ -74,4 +45,3 @@ export type AIChatModelsConfig = {
|
|
|
74
45
|
*/
|
|
75
46
|
displayedModels?: string | Array<string>;
|
|
76
47
|
};
|
|
77
|
-
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x186721=_0x9747;(function(_0x227838,_0x3b5a1d){const _0x2e1ef1=_0x9747,_0x4bfe75=_0x227838();while(!![]){try{const _0x5d697b=parseInt(_0x2e1ef1(0x102))/0x1+-parseInt(_0x2e1ef1(0xf3))/0x2+-parseInt(_0x2e1ef1(0xec))/0x3*(-parseInt(_0x2e1ef1(0xfb))/0x4)+parseInt(_0x2e1ef1(0x101))/0x5+parseInt(_0x2e1ef1(0xef))/0x6*(-parseInt(_0x2e1ef1(0xeb))/0x7)+-parseInt(_0x2e1ef1(0x106))/0x8*(-parseInt(_0x2e1ef1(0xf2))/0x9)+-parseInt(_0x2e1ef1(0xf9))/0xa;if(_0x5d697b===_0x3b5a1d)break;else _0x4bfe75['push'](_0x4bfe75['shift']());}catch(_0x1ab01d){_0x4bfe75['push'](_0x4bfe75['shift']());}}}(_0x1c46,0xcea11));import{EmitterMixin as _0x3e9ba1,logWarning as _0x2fc6b0}from'ckeditor5/src/utils.js';function _0x1c46(){const _0x162542=['319737ACITOI','items','enabled','1164DWdIAz','ai-chat-default-model-id-unrecognized','find','223281RKAtRg','488938Yrorhz','capabilities','list','provider','sort','filter','7901770kYHElX','values','32nRAkve','getDefault','name','getModels','isAvailable','some','2015765TAFIXU','1588062isAJdn','_modelList','_connector','getAll','144tZsiuZ','length','50855YswEMl'];_0x1c46=function(){return _0x162542;};return _0x1c46();}function _0x9747(_0x12a145,_0x363921){const _0x1c467c=_0x1c46();return _0x9747=function(_0x974789,_0xdad840){_0x974789=_0x974789-0xeb;let _0x17d9ac=_0x1c467c[_0x974789];return _0x17d9ac;},_0x9747(_0x12a145,_0x363921);}export class AIChatModels extends _0x3e9ba1(){[_0x186721(0x103)]=[];[_0x186721(0x104)];constructor({connector:_0x2bd2b7}){const _0x8061e6=_0x186721;super(),this[_0x8061e6(0x104)]=_0x2bd2b7;}async[_0x186721(0x105)](){const _0x1e3489=_0x186721;if(!this[_0x1e3489(0x103)][_0x1e3489(0x107)]){const _0x58543d=this[_0x1e3489(0x104)][_0x1e3489(0xfe)](),_0x128f22=(await _0x58543d[_0x1e3489(0xf5)]())[_0x1e3489(0xed)][_0x1e3489(0xf7)]((_0x13f13e,_0x363deb)=>{const _0xf3df93=_0x1e3489,_0x444fe5=Object[_0xf3df93(0xfa)](_0x13f13e[_0xf3df93(0xf4)])[_0xf3df93(0xf8)](_0x1cc193=>_0x1cc193[_0xf3df93(0xee)])[_0xf3df93(0x107)];return Object[_0xf3df93(0xfa)](_0x363deb[_0xf3df93(0xf4)])[_0xf3df93(0xf8)](_0x188d8f=>_0x188d8f[_0xf3df93(0xee)])[_0xf3df93(0x107)]-_0x444fe5;});this[_0x1e3489(0x103)]=_0x128f22;}return this[_0x1e3489(0x103)];}async[_0x186721(0xfc)](_0x48b66a){const _0x5c833b=_0x186721,_0x3de95c=await this[_0x5c833b(0x105)]();if(!_0x3de95c[_0x5c833b(0x107)])return null;if(_0x48b66a){const _0x2fb096=_0x3de95c[_0x5c833b(0xf1)](_0x43a68b=>_0x43a68b['id']===_0x48b66a);if(_0x2fb096)return _0x2fb096;_0x2fc6b0(_0x5c833b(0xf0),{'defaultModelId':_0x48b66a,'fallBackModelId':_0x3de95c[0x0]['id']});}return _0x3de95c[0x0];}async[_0x186721(0xff)](_0x1a55e6){const _0x3bb3e5=_0x186721;return(await this[_0x3bb3e5(0x105)]())[_0x3bb3e5(0x100)](_0x3e97e0=>_0x3e97e0[_0x3bb3e5(0xfd)]===_0x1a55e6[_0x3bb3e5(0xfd)]&&_0x3e97e0[_0x3bb3e5(0xf6)]===_0x1a55e6[_0x3bb3e5(0xf6)]);}}
|