@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1
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 +18 -5
- package/README.md +10 -9
- 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/ckeditor5-metadata.json +24 -3
- package/dist/index-content.css +0 -1
- package/dist/index-editor.css +2742 -0
- package/dist/index.css +3141 -0
- package/dist/index.js +4 -2
- 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 +163 -1
- package/lang/translations/af.po +612 -0
- package/lang/translations/ar.po +628 -0
- package/lang/translations/ast.po +612 -0
- package/lang/translations/az.po +612 -0
- package/lang/translations/be.po +616 -0
- package/lang/translations/bg.po +612 -0
- package/lang/translations/bn.po +612 -0
- package/lang/translations/bs.po +616 -0
- package/lang/translations/ca.po +612 -0
- package/lang/translations/cs.po +616 -0
- package/lang/translations/da.po +612 -0
- package/lang/translations/de-ch.po +612 -0
- package/lang/translations/de.po +612 -0
- package/lang/translations/el.po +612 -0
- package/lang/translations/en-au.po +612 -0
- package/lang/translations/en-gb.po +612 -0
- package/lang/translations/en.po +612 -0
- package/lang/translations/eo.po +612 -0
- package/lang/translations/es-co.po +612 -0
- package/lang/translations/es.po +612 -0
- package/lang/translations/et.po +612 -0
- package/lang/translations/eu.po +612 -0
- package/lang/translations/fa.po +608 -0
- package/lang/translations/fi.po +612 -0
- package/lang/translations/fr.po +612 -0
- package/lang/translations/gl.po +612 -0
- package/lang/translations/gu.po +612 -0
- package/lang/translations/he.po +612 -0
- package/lang/translations/hi.po +612 -0
- package/lang/translations/hr.po +616 -0
- package/lang/translations/hu.po +612 -0
- package/lang/translations/hy.po +612 -0
- package/lang/translations/id.po +608 -0
- package/lang/translations/it.po +612 -0
- package/lang/translations/ja.po +608 -0
- package/lang/translations/jv.po +612 -0
- package/lang/translations/kk.po +612 -0
- package/lang/translations/km.po +608 -0
- package/lang/translations/kn.po +612 -0
- package/lang/translations/ko.po +608 -0
- package/lang/translations/ku.po +612 -0
- package/lang/translations/lt.po +616 -0
- package/lang/translations/lv.po +616 -0
- package/lang/translations/ms.po +608 -0
- package/lang/translations/nb.po +612 -0
- package/lang/translations/ne.po +612 -0
- package/lang/translations/nl.po +612 -0
- package/lang/translations/no.po +612 -0
- package/lang/translations/oc.po +612 -0
- package/lang/translations/pl.po +616 -0
- package/lang/translations/pt-br.po +612 -0
- package/lang/translations/pt.po +612 -0
- package/lang/translations/ro.po +616 -0
- package/lang/translations/ru.po +616 -0
- package/lang/translations/si.po +612 -0
- package/lang/translations/sk.po +616 -0
- package/lang/translations/sl.po +620 -0
- package/lang/translations/sq.po +612 -0
- package/lang/translations/sr-latn.po +616 -0
- package/lang/translations/sr.po +616 -0
- package/lang/translations/sv.po +612 -0
- package/lang/translations/th.po +608 -0
- package/lang/translations/ti.po +612 -0
- package/lang/translations/tk.po +612 -0
- package/lang/translations/tr.po +612 -0
- package/lang/translations/tt.po +608 -0
- package/lang/translations/ug.po +608 -0
- package/lang/translations/uk.po +616 -0
- package/lang/translations/ur.po +612 -0
- package/lang/translations/uz.po +612 -0
- package/lang/translations/vi.po +608 -0
- package/lang/translations/zh-cn.po +608 -0
- package/lang/translations/zh.po +608 -0
- package/package.json +23 -11
- package/src/aiactions/aiactions.d.ts +48 -0
- package/src/aiactions/aiactions.js +23 -0
- package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
- package/src/aiactions/model/aiactionsinteraction.js +23 -0
- package/src/aiactions/model/aiactionsreply.d.ts +15 -0
- package/src/aiactions/model/aiactionsreply.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aiadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
- package/src/aiassistant/adapters/aitextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
- package/src/aiassistant/adapters/awstextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
- package/src/aiassistant/adapters/openaitextadapter.js +23 -0
- package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
- package/src/aiassistant/aiassistant.js +23 -0
- package/src/aiassistant/aiassistantediting.js +23 -0
- package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
- package/src/aiassistant/aiassistantui.js +23 -0
- package/src/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
- package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
- package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
- package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
- package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
- package/src/aiassistant/ui/form/prompthistory.js +23 -0
- package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
- package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
- package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
- package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.d.ts +72 -0
- package/src/aiballoon/aiballoon.js +23 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
- package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
- package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
- package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
- package/src/aiballoon/ui/aiballoonview.js +23 -0
- package/src/aichat/aichat.d.ts +79 -0
- package/src/aichat/aichat.js +23 -0
- package/src/aichat/aichatcontroller.d.ts +68 -0
- package/src/aichat/aichatcontroller.js +23 -0
- package/src/aichat/aichatui.d.ts +297 -0
- package/src/aichat/aichatui.js +23 -0
- package/src/aichat/model/aichatcontext.d.ts +360 -0
- package/src/aichat/model/aichatcontext.js +23 -0
- package/src/aichat/model/aichatconversation.d.ts +270 -0
- package/src/aichat/model/aichatconversation.js +23 -0
- package/src/aichat/model/aichatinteraction.d.ts +46 -0
- package/src/aichat/model/aichatinteraction.js +23 -0
- package/src/aichat/model/aichatmodels.d.ts +77 -0
- package/src/aichat/model/aichatmodels.js +23 -0
- package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
- package/src/aichat/ui/aichatcontrolsview.js +23 -0
- package/src/aichat/ui/aichatfeedview.d.ts +114 -0
- package/src/aichat/ui/aichatfeedview.js +23 -0
- package/src/aichat/ui/aichatheaderview.d.ts +29 -0
- package/src/aichat/ui/aichatheaderview.js +23 -0
- package/src/aichat/ui/aichatview.d.ts +37 -0
- package/src/aichat/ui/aichatview.js +23 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
- package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
- package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
- package/src/aichat/utils/eventnames.d.ts +5 -0
- package/src/aichat/utils/eventnames.js +23 -0
- package/src/aichat/utils/promisequeue.d.ts +32 -0
- package/src/aichat/utils/promisequeue.js +23 -0
- package/src/aichat/utils/scrollmanager.d.ts +23 -0
- package/src/aichat/utils/scrollmanager.js +23 -0
- package/src/aichathistory/aichathistory.d.ts +30 -0
- package/src/aichathistory/aichathistory.js +23 -0
- package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
- package/src/aichathistory/aichathistorycontroller.js +23 -0
- package/src/aichathistory/aichathistoryui.d.ts +112 -0
- package/src/aichathistory/aichathistoryui.js +23 -0
- package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
- package/src/aichathistory/model/aichathistoryconversations.js +23 -0
- package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
- package/src/aichathistory/model/aichathistoryitem.js +23 -0
- package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
- package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
- package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
- package/src/aichathistory/ui/aichathistorylistview.js +23 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
- package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
- package/src/aichathistory/ui/aichathistoryview.js +23 -0
- package/src/aiconfig.d.ts +92 -30
- package/src/aicore/aiconnector.d.ts +302 -0
- package/src/aicore/aiconnector.js +23 -0
- package/src/aicore/aiediting.d.ts +61 -0
- package/src/aicore/aiediting.js +23 -0
- package/src/aicore/model/aicapabilities.d.ts +55 -0
- package/src/aicore/model/aicapabilities.js +23 -0
- package/src/aicore/model/aicontext.d.ts +53 -0
- package/src/aicore/model/aicontext.js +23 -0
- package/src/aicore/model/aiinteraction.d.ts +135 -0
- package/src/aicore/model/aiinteraction.js +23 -0
- package/src/aicore/model/aireply.d.ts +178 -0
- package/src/aicore/model/aireply.js +23 -0
- package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
- package/src/aicore/pipeline/airesponseapplier.js +24 -0
- package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
- package/src/aicore/pipeline/airesponseparser.js +24 -0
- package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
- package/src/aicore/ui/aidisclaimerview.js +23 -0
- package/src/aicore/ui/aiskeleton.d.ts +37 -0
- package/src/aicore/ui/aiskeleton.js +23 -0
- package/src/aicore/ui/aispinner.d.ts +14 -0
- package/src/aicore/ui/aispinner.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
- package/src/aicore/utils/common-translations.d.ts +9 -0
- package/src/aicore/utils/common-translations.js +23 -0
- package/src/aicore/utils/createresizebutton.d.ts +12 -0
- package/src/aicore/utils/createresizebutton.js +23 -0
- package/src/aicore/utils/documentposition.d.ts +41 -0
- package/src/aicore/utils/documentposition.js +23 -0
- package/src/aicore/utils/documentrange.d.ts +46 -0
- package/src/aicore/utils/documentrange.js +23 -0
- package/src/aicore/utils/eventnames.d.ts +9 -0
- package/src/aicore/utils/eventnames.js +23 -0
- package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
- package/src/aicore/utils/geteditorfromcontext.js +23 -0
- package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
- package/src/aicore/utils/getoperationsfromreply.js +23 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
- package/src/aicore/utils/htmlparser.d.ts +35 -0
- package/src/aicore/utils/htmlparser.js +23 -0
- package/src/aicore/utils/htmlstreamer.d.ts +123 -0
- package/src/aicore/utils/htmlstreamer.js +23 -0
- package/src/aiquickactions/aiquickactions.d.ts +41 -0
- package/src/aiquickactions/aiquickactions.js +23 -0
- package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
- package/src/aiquickactions/aiquickactionscommand.js +23 -0
- package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
- package/src/aiquickactions/aiquickactionsediting.js +23 -0
- package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
- package/src/aiquickactions/aiquickactionsui.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
- package/src/aiquickactions/utils/common-translations.d.ts +9 -0
- package/src/aiquickactions/utils/common-translations.js +23 -0
- package/src/aireviewmode/aireviewmode.d.ts +30 -0
- package/src/aireviewmode/aireviewmode.js +23 -0
- package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
- package/src/aireviewmode/aireviewmodecontroller.js +23 -0
- package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
- package/src/aireviewmode/aireviewmodeediting.js +23 -0
- package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
- package/src/aireviewmode/aireviewmodeui.js +23 -0
- package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
- package/src/aireviewmode/model/aireviewcheck.js +23 -0
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
- package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
- package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
- package/src/aireviewmode/model/aireviewchecklist.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
- package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +102 -0
- package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
- package/src/aireviewmode/model/aireviewmodels.js +23 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
- package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
- package/src/aireviewmode/utils/common-translations.d.ts +9 -0
- package/src/aireviewmode/utils/common-translations.js +23 -0
- package/src/aitabs/aitabs.d.ts +92 -0
- package/src/aitabs/aitabs.js +23 -0
- package/src/aitabs/aitabsmainview.d.ts +45 -0
- package/src/aitabs/aitabsmainview.js +23 -0
- package/src/aitabs/tabs/aitabsview.d.ts +147 -0
- package/src/aitabs/tabs/aitabsview.js +23 -0
- package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
- package/src/aitabs/tabs/tabbuttonview.js +23 -0
- package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
- package/src/aitabs/tabs/tabpanelview.js +23 -0
- package/src/augmentation.d.ts +22 -6
- package/src/index.d.ts +40 -9
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +207 -0
- package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
- package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
- package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
- package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
- package/theme/aichat/aichat-controls/prompt-input.css +55 -0
- package/theme/aichat/aichat-controls.css +154 -0
- package/theme/aichat/aichat.css +68 -0
- package/theme/aichat/aichatfeed.css +376 -0
- package/theme/aichat/aichathistory.css +235 -0
- package/theme/aichat/aiminitoolbar.css +94 -0
- package/theme/aichat/aisuggestioncontainer.css +203 -0
- package/theme/aiquickactions/aiquickactions.css +43 -0
- package/theme/aireviewmode/aireviewmode-check-list.css +255 -0
- package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
- package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
- package/theme/aireviewmode/aireviewmode.css +73 -0
- package/theme/aitabs/aitabsview.css +64 -0
- package/theme/aitabs/tabs/tabbuttonview.css +74 -0
- package/theme/aitabs/tabs/tabsview.css +78 -0
- package/theme/common/aibutton.css +145 -0
- package/theme/common/aichaterror.css +61 -0
- package/theme/common/aidisclaimer.css +29 -0
- package/theme/common/aiheader.css +88 -0
- package/theme/common/aiskeleton.css +54 -0
- package/theme/common/aispinner.css +58 -0
- package/src/adapters/aiadapter.js +0 -23
- package/src/adapters/aitextadapter.js +0 -23
- package/src/adapters/awstextadapter.js +0 -23
- package/src/adapters/openaitextadapter.js +0 -23
- package/src/aiassistant.js +0 -23
- package/src/aiassistantediting.js +0 -23
- package/src/aiassistantui.js +0 -23
- package/src/ui/aiassistantcontroller.js +0 -24
- package/src/ui/form/aiformcontentarea.js +0 -23
- package/src/ui/form/aiformerrorview.js +0 -23
- package/src/ui/form/aiformpromptview.js +0 -23
- package/src/ui/form/aiformtoolbarview.js +0 -23
- package/src/ui/form/aiformview.js +0 -23
- package/src/ui/form/aihistorylistitemview.js +0 -23
- package/src/ui/form/aihistorylistview.js +0 -23
- package/src/ui/form/prompthistory.js +0 -23
- package/src/ui/showaiassistantcommand.js +0 -23
- /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
- /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
- /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
- /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
- /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
- /package/theme/{ai.css → aiassistant/ai.css} +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/model/aichatconversation
|
|
7
|
+
*/
|
|
8
|
+
import { CKEditorError } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { type AIConnector } from '../../aicore/aiconnector.js';
|
|
10
|
+
import { AIChatContext, type AIChatContextConfig, type AIContextProvider, type AIContextResource, type AIContextResourceState } from './aichatcontext.js';
|
|
11
|
+
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
|
+
import { AICapabilities, type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
13
|
+
import type { AIChatModel, AIChatModels } from './aichatmodels.js';
|
|
14
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
15
|
+
import { AIChatInteraction } from './aichatinteraction.js';
|
|
16
|
+
import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
|
|
17
|
+
declare const AIChatConversation_base: {
|
|
18
|
+
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
19
|
+
prototype: import("ckeditor5/src/utils.js").Emitter; /**
|
|
20
|
+
* The current interaction in the conversation. Set and unset by {@link #handleUserInteraction}.
|
|
21
|
+
*/
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Represents a conversation between the user and the AI endpoint on top of the
|
|
25
|
+
* {@link module:ai/aichat/model/aichatconnector~AIChatConnector} in the network layer.
|
|
26
|
+
*
|
|
27
|
+
* A conversation hosts a collection of {@link module:ai/aichat/model/aichatinteraction~AIChatInteraction user interactions}.
|
|
28
|
+
*
|
|
29
|
+
* The {@link module:ai/aichat/model/aichatconversation~AIChatConversation#currentInteraction current interaction} in the conversation
|
|
30
|
+
* is the one that is currently being processed by the AI.
|
|
31
|
+
*
|
|
32
|
+
* Note: The conversation funnels (delegates) all events from the
|
|
33
|
+
* {@link module:ai/aichat/model/aichatconversation~AIChatConversation#interactions} and their
|
|
34
|
+
* {@link module:ai/aichat/model/aichatinteraction~AIChatInteraction#replies replies}.
|
|
35
|
+
*/
|
|
36
|
+
export declare class AIChatConversation extends /* #__PURE__ */ AIChatConversation_base {
|
|
37
|
+
/**
|
|
38
|
+
* The unique conversation ID.
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether the conversation has been started.
|
|
43
|
+
*
|
|
44
|
+
* This is set to `true` when {@link #start} is called and the conversation is successfully started.
|
|
45
|
+
*/
|
|
46
|
+
isStarted: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The interactions in the conversation.
|
|
49
|
+
*/
|
|
50
|
+
interactions: Array<AIChatInteraction>;
|
|
51
|
+
/**
|
|
52
|
+
* The current interaction in the conversation. Set and unset by {@link #handleUserInteraction}.
|
|
53
|
+
*/
|
|
54
|
+
currentInteraction?: AIChatInteraction;
|
|
55
|
+
/**
|
|
56
|
+
* The selected AI chat model for the conversation.
|
|
57
|
+
*
|
|
58
|
+
* This is set when the user selects a model from the list of available models.
|
|
59
|
+
* If not set, the default model will be used.
|
|
60
|
+
*/
|
|
61
|
+
selectedModel?: AIChatModel;
|
|
62
|
+
/**
|
|
63
|
+
* Service for managing the conversation context.
|
|
64
|
+
*/
|
|
65
|
+
chatContext: AIChatContext;
|
|
66
|
+
/**
|
|
67
|
+
* Service for managing the conversation capabilities.
|
|
68
|
+
*/
|
|
69
|
+
chatCapabilities: AICapabilities;
|
|
70
|
+
/**
|
|
71
|
+
* Service for providing the list of available AI chat models.
|
|
72
|
+
*/
|
|
73
|
+
chatModels: AIChatModels;
|
|
74
|
+
/**
|
|
75
|
+
* @inheritDoc
|
|
76
|
+
*/
|
|
77
|
+
constructor(options: AIChatConversationOptions);
|
|
78
|
+
/**
|
|
79
|
+
* Initializes the conversation.
|
|
80
|
+
*/
|
|
81
|
+
init(contextConfig?: AIChatContextConfig): Promise<void>;
|
|
82
|
+
start(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Loads a conversation from the backend using the provided conversation ID.
|
|
85
|
+
*/
|
|
86
|
+
load(conversationId: string, sessionId: string): Promise<AIChatConversation>;
|
|
87
|
+
/**
|
|
88
|
+
* Processes messages to create interactions and replies.
|
|
89
|
+
*/
|
|
90
|
+
private _processMessagesToInteractions;
|
|
91
|
+
/**
|
|
92
|
+
* Handles a user interaction by creating a new interaction and starting it.
|
|
93
|
+
*/
|
|
94
|
+
handleUserInteraction({ userMessage, quickActionData }: {
|
|
95
|
+
userMessage: string;
|
|
96
|
+
quickActionData?: AIQuickActionRequestData;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new interaction and stores it in the conversation.
|
|
100
|
+
*/
|
|
101
|
+
createInteraction({ userMessage, contextItems, capabilities, modelId, quickActionData }: {
|
|
102
|
+
userMessage: string;
|
|
103
|
+
contextItems: Map<string, AIContextItem>;
|
|
104
|
+
capabilities: AICapabilitiesConfig;
|
|
105
|
+
modelId: string;
|
|
106
|
+
quickActionData?: AIQuickActionRequestData;
|
|
107
|
+
}): AIChatInteraction;
|
|
108
|
+
/**
|
|
109
|
+
* Gets an interaction in the conversation by its ID.
|
|
110
|
+
*/
|
|
111
|
+
getInteraction(id: string): AIChatInteraction | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Removes an interaction from the conversation by its ID.
|
|
114
|
+
*/
|
|
115
|
+
removeInteraction(id: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* Gets the last of {@link #interactions} in the conversation.
|
|
118
|
+
*/
|
|
119
|
+
get lastInteraction(): AIChatInteraction | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Adds a current document to the context.
|
|
122
|
+
*/
|
|
123
|
+
addCurrentDocumentToContext(label: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* Updates the current document in the context to contain the provided content and version.
|
|
126
|
+
*/
|
|
127
|
+
updateCurrentDocumentInContext({ content, version, sessionId, selections }: {
|
|
128
|
+
content: string | undefined;
|
|
129
|
+
version: number;
|
|
130
|
+
sessionId: string | null;
|
|
131
|
+
selections: Array<{
|
|
132
|
+
start: number;
|
|
133
|
+
end: number;
|
|
134
|
+
htmlFragment: string;
|
|
135
|
+
}>;
|
|
136
|
+
}): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* Returns the content of the current interaction's document.
|
|
139
|
+
*/
|
|
140
|
+
getCurrentDocumentContext(): string;
|
|
141
|
+
/**
|
|
142
|
+
* Adds a selection to the context.
|
|
143
|
+
*/
|
|
144
|
+
addSelectionToContext(selection: string): void;
|
|
145
|
+
removeSelectionFromContext(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Adds files to the context.
|
|
148
|
+
*/
|
|
149
|
+
addFilesToContext(files: Array<File>): void;
|
|
150
|
+
/**
|
|
151
|
+
* Adds a URL to the context.
|
|
152
|
+
*/
|
|
153
|
+
addUrlToContext(url: string): void;
|
|
154
|
+
/**
|
|
155
|
+
* Adds a resource from a source provider to the context.
|
|
156
|
+
*/
|
|
157
|
+
addResourceToContext(source: AIContextProvider, resource: AIContextResource): void;
|
|
158
|
+
/**
|
|
159
|
+
* Loads resources for a given source provider.
|
|
160
|
+
*/
|
|
161
|
+
loadSourceResources(sourceId: string, query: string, uid: string): Promise<Array<AIContextResourceState>>;
|
|
162
|
+
/**
|
|
163
|
+
* Removes an item from the conversation context by its ID.
|
|
164
|
+
*/
|
|
165
|
+
removeFromContext(id: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Toggles the web search functionality on or off.
|
|
168
|
+
*/
|
|
169
|
+
toggleWebSearch(): void;
|
|
170
|
+
/**
|
|
171
|
+
* Toggles the reasoning functionality on or off.
|
|
172
|
+
*/
|
|
173
|
+
toggleReasoning(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Checks if the current document is already in the conversation context.
|
|
176
|
+
*/
|
|
177
|
+
isCurrentDocumentInContext(): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Checks if the current document is already in the conversation context.
|
|
180
|
+
*/
|
|
181
|
+
isCurrentDocumentInConversation(): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Checks if the selection is already in the conversation context.
|
|
184
|
+
*/
|
|
185
|
+
isSelectionInContext(): boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Sets the AI model for the conversation.
|
|
188
|
+
*/
|
|
189
|
+
setModel(model: AIChatModel): Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation} when a new interaction is created.
|
|
193
|
+
*
|
|
194
|
+
* @eventName ~AIChatConversation#interactionCreated
|
|
195
|
+
*/
|
|
196
|
+
export type AIChatInteractionCreatedEvent = {
|
|
197
|
+
name: 'interactionCreated';
|
|
198
|
+
args: [interaction: AIChatInteraction];
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation} when an error occurs.
|
|
202
|
+
*
|
|
203
|
+
* @eventName ~AIChatConversation#error
|
|
204
|
+
*/
|
|
205
|
+
export type AIChatConversationError = {
|
|
206
|
+
name: 'error';
|
|
207
|
+
args: [
|
|
208
|
+
{
|
|
209
|
+
interactionId?: string;
|
|
210
|
+
error: CKEditorError;
|
|
211
|
+
fileName?: string;
|
|
212
|
+
url?: string;
|
|
213
|
+
sourceId?: string;
|
|
214
|
+
sourceLabel?: string;
|
|
215
|
+
}
|
|
216
|
+
];
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation#init} once the conversation was initialized.
|
|
220
|
+
*
|
|
221
|
+
* @eventName ~AIChatConversation#conversationInitialized
|
|
222
|
+
*/
|
|
223
|
+
export type AIChatConversationInitializedEvent = {
|
|
224
|
+
name: 'conversationInitialized';
|
|
225
|
+
args: [
|
|
226
|
+
{
|
|
227
|
+
availableModels: Array<AIChatModel>;
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation#start} once the conversation was started.
|
|
233
|
+
*
|
|
234
|
+
* @eventName ~AIChatConversation#conversationStarted
|
|
235
|
+
*/
|
|
236
|
+
export type AIChatConversationStartedEvent = {
|
|
237
|
+
name: 'conversationStarted';
|
|
238
|
+
args: [
|
|
239
|
+
{
|
|
240
|
+
conversationId: string;
|
|
241
|
+
selectedModel: AIChatModel;
|
|
242
|
+
}
|
|
243
|
+
];
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation} when a model is selected.
|
|
247
|
+
*
|
|
248
|
+
* @eventName ~AIChatConversation#modelSelected
|
|
249
|
+
*/
|
|
250
|
+
export type AIChatConversationModelSelectedEvent = {
|
|
251
|
+
name: 'modelSelected';
|
|
252
|
+
args: [
|
|
253
|
+
{
|
|
254
|
+
selectedModel: AIChatModel;
|
|
255
|
+
isDisabled?: boolean;
|
|
256
|
+
}
|
|
257
|
+
];
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Options for the AI chat conversation.
|
|
261
|
+
*/
|
|
262
|
+
export type AIChatConversationOptions = {
|
|
263
|
+
connector: AIConnector;
|
|
264
|
+
chatModels: AIChatModels;
|
|
265
|
+
getEditor?: () => Editor;
|
|
266
|
+
conversationId: string;
|
|
267
|
+
group: string;
|
|
268
|
+
defaultModelId?: string;
|
|
269
|
+
};
|
|
270
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x3cf3(){const _0x1161dd=['ai-chat-conversation-init-failed','removeInteraction','1840890PoNgNS','conversationInitialized','webSearch','text','lastInteraction','push','updateCurrentDocument','getCurrentDocumentContext','stack','getPendingContextItems','stop','ai-chat-handle-user-conversation-not-initialized','modification-delta','populateFromMessage','currentReply','_processMessagesToInteractions','toLowerCase','conversationStarted','startConversation','addFilesToContext','ai-chat-conversation-init-from-id-failed','indexOf','toggleReasoning','fetchConversation','getDocumentContext','isStarted','getAll','interactions','assistant','isCurrentDocumentInContext','ai-chat-conversation-set-model-null','user','group','setModel','666700GaMNcI','toggleWebSearch','ai-chat-conversation-set-model-not-available','addCurrentDocumentToContext','text-delta','modelSelected','quickActionData','role','currentInteraction','reset','set','createReply','getInteraction','model','fetchConversationMessages','selectedModel','removeFromContext','type','2205705WBSyUt','connector','appendContent','chatModels','error','329975JpDHJN','handleUserInteraction','isCurrentDocumentInConversation','_extractContextItems','ai-chat-conversation-start-no-model-selected','destroy','ai-chat-conversation-start-failed','getCapabilitiesConfig','contextItems','attributes','addToConversationContext','addUrlToContext','638982woLWjp','delegate','ai-chat-conversation-already-started','loadSourceResources','init','conversationId','reasoning','addSelectionToContext','removeSelectionFromContext','prompt','isAvailable','chatCapabilities','content','load','1778433hokdqB','message','chatContext','getConversation','setConversationTitle','capabilities','splice','interactionCreated','updateCurrentDocumentInContext','start','getDefault','defaultModelId','hasOwn','getEditor','title','isSelectionInContext','length','find','ai-chat-handle-user-interaction-already-in-progress','createInteraction','getMessages','fire','sessionId','addResourceToContext','1973475pcocPX','options'];_0x3cf3=function(){return _0x1161dd;};return _0x3cf3();}const _0x4d277a=_0x1293;(function(_0x33ec20,_0x39cc91){const _0x4916f7=_0x1293,_0xa824f2=_0x33ec20();while(!![]){try{const _0x156137=parseInt(_0x4916f7(0xea))/0x1+-parseInt(_0x4916f7(0xf6))/0x2+parseInt(_0x4916f7(0x104))/0x3+parseInt(_0x4916f7(0xd3))/0x4+-parseInt(_0x4916f7(0xe5))/0x5+-parseInt(_0x4916f7(0xb1))/0x6+parseInt(_0x4916f7(0xad))/0x7;if(_0x156137===_0x39cc91)break;else _0xa824f2['push'](_0xa824f2['shift']());}catch(_0x5ea23e){_0xa824f2['push'](_0xa824f2['shift']());}}}(_0x3cf3,0x4a343));function _0x1293(_0xb56632,_0x4ba8e5){const _0x3cf3ab=_0x3cf3();return _0x1293=function(_0x12937f,_0x462087){_0x12937f=_0x12937f-0xab;let _0x414eeb=_0x3cf3ab[_0x12937f];return _0x414eeb;},_0x1293(_0xb56632,_0x4ba8e5);}import{CKEditorError as _0x19919e,EmitterMixin as _0x251e58}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x13788c}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x399914,AI_CONTEXT_MODEL_EVENT_NAMES as _0x53e23}from'./aichatcontext.js';import{AICapabilities as _0x31d052,CAPABILITIES_MODEL_EVENT_NAMES as _0x30c301}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x4ee9e5}from'./aichatinteraction.js';export class AIChatConversation extends _0x251e58(){['id'];[_0x4d277a(0xca)]=!0x1;[_0x4d277a(0xcc)]=[];[_0x4d277a(0xdb)];[_0x4d277a(0xe2)];[_0x4d277a(0xe6)];[_0x4d277a(0xae)];constructor(_0x3ff07e){const _0x27b896=_0x4d277a;super(),this[_0x27b896(0xae)]=_0x3ff07e,this[_0x27b896(0xe6)]=_0x3ff07e[_0x27b896(0xe6)],this[_0x27b896(0xe8)]=_0x3ff07e[_0x27b896(0xe8)],this['id']=_0x3ff07e[_0x27b896(0xfb)];}async[_0x4d277a(0xfa)](_0x307ae2){const _0x319eaa=_0x4d277a;try{this[_0x319eaa(0x106)]=new _0x399914({'connector':this[_0x319eaa(0xe6)],'config':_0x307ae2,'ownerId':this['id']}),this[_0x319eaa(0x106)][_0x319eaa(0xf7)](..._0x53e23)['to'](this),this[_0x319eaa(0x106)][_0x319eaa(0xfa)](),this[_0x319eaa(0x101)]=new _0x31d052(),this[_0x319eaa(0x101)][_0x319eaa(0xf7)](..._0x30c301)['to'](this),this[_0x319eaa(0x101)][_0x319eaa(0xfa)]();const _0x2ab149=await this[_0x319eaa(0xe8)][_0x319eaa(0xcb)]();this[_0x319eaa(0x119)](_0x319eaa(0xb2),{'availableModels':_0x2ab149});const _0xaff125=await this[_0x319eaa(0xe8)][_0x319eaa(0x10e)](this[_0x319eaa(0xae)][_0x319eaa(0x10f)]);_0xaff125&&await this[_0x319eaa(0xd2)](_0xaff125);}catch(_0x1e9f3b){const _0x489dd1=new _0x19919e(_0x319eaa(0xaf),null,{'message':_0x1e9f3b[_0x319eaa(0x105)]});_0x489dd1[_0x319eaa(0xb9)]=_0x1e9f3b[_0x319eaa(0xb9)],this[_0x319eaa(0x119)](_0x319eaa(0xe9),{'error':_0x489dd1});}}async[_0x4d277a(0x10d)](){const _0x42a0e6=_0x4d277a;if(this[_0x42a0e6(0xca)])throw new _0x19919e(_0x42a0e6(0xf8),null,{'conversation':this});if(!this[_0x42a0e6(0xe2)])throw new _0x19919e(_0x42a0e6(0xee),null,{'conversation':this});try{const {id:_0x3ffb95}=await this[_0x42a0e6(0xe6)][_0x42a0e6(0xc3)](this['id'],this[_0x42a0e6(0xae)][_0x42a0e6(0xd1)])[_0x42a0e6(0x107)]();this['id']=_0x3ffb95,this[_0x42a0e6(0xca)]=!0x0,this[_0x42a0e6(0x119)](_0x42a0e6(0xc2),{'conversationId':this['id'],'selectedModel':this[_0x42a0e6(0xe2)]});}catch(_0x125e82){const _0x3e8656=new _0x19919e(_0x42a0e6(0xf0),null,{'message':_0x125e82[_0x42a0e6(0x105)]});_0x3e8656[_0x42a0e6(0xb9)]=_0x125e82[_0x42a0e6(0xb9)],this[_0x42a0e6(0x119)](_0x42a0e6(0xe9),{'error':_0x3e8656});}}async[_0x4d277a(0x103)](_0x30bb3c,_0x9b30c3){const _0x1b4501=_0x4d277a;try{const _0x3b0449=await this[_0x1b4501(0xe6)][_0x1b4501(0xc8)](_0x30bb3c)[_0x1b4501(0x107)](),_0x34a0f1=await this[_0x1b4501(0xe6)][_0x1b4501(0xe1)](_0x30bb3c)[_0x1b4501(0x118)](),_0x19ec0d=_0x34a0f1[0x0][_0x1b4501(0xe0)];this[_0x1b4501(0xca)]=!0x0,this['id']=_0x3b0449['id'],_0x1b4501(0x112)in _0x3b0449?this[_0x1b4501(0x119)](_0x1b4501(0x108),_0x3b0449[_0x1b4501(0x112)],!0x0):this[_0x1b4501(0x119)](_0x1b4501(0x108),'',!0x0);const _0xdf2e14=(await this[_0x1b4501(0xe8)][_0x1b4501(0xcb)]())[_0x1b4501(0x115)](_0x256d82=>_0x256d82['id'][_0x1b4501(0xc1)]()===_0x19ec0d[_0x1b4501(0xc1)]());return this[_0x1b4501(0xe2)]=_0xdf2e14,this[_0x1b4501(0x119)](_0x1b4501(0xd8),{'selectedModel':_0xdf2e14,'isDisabled':!0x0}),await this[_0x1b4501(0xc0)](_0x34a0f1,_0x9b30c3,_0x19ec0d),this[_0x1b4501(0xdb)]=void 0x0,this;}catch(_0x177039){const _0xf24201=new _0x19919e(_0x1b4501(0xc5),null,{'message':_0x177039[_0x1b4501(0x105)],'conversationId':_0x30bb3c});throw _0xf24201[_0x1b4501(0xb9)]=_0x177039[_0x1b4501(0xb9)],this[_0x1b4501(0x119)](_0x1b4501(0xe9),{'error':_0xf24201}),_0xf24201;}}async[_0x4d277a(0xc0)](_0x58b306,_0x8b5a4a,_0x34f464){const _0x527eb4=_0x4d277a;let _0x1de38e;for(const _0x112de7 of _0x58b306)if(_0x527eb4(0xd0)===_0x112de7[_0x527eb4(0xda)]){const _0x370abd=await this[_0x527eb4(0xed)](_0x112de7),_0x14c33e={'isReasoningEnabled':Object[_0x527eb4(0x110)](_0x112de7[_0x527eb4(0x109)],_0x527eb4(0xfc)),'isWebSearchEnabled':Object[_0x527eb4(0x110)](_0x112de7[_0x527eb4(0x109)],_0x527eb4(0xb3))};_0x1de38e=this[_0x527eb4(0x117)]({'userMessage':_0x112de7[_0x527eb4(0xff)],'contextItems':_0x370abd,'capabilities':_0x14c33e,'modelId':_0x34f464,'quickActionData':_0x112de7[_0x527eb4(0xf3)]?.[_0x527eb4(0xd9)]}),this[_0x527eb4(0xdb)]=_0x1de38e,this[_0x527eb4(0x106)][_0x527eb4(0xf4)](this[_0x527eb4(0xdb)][_0x527eb4(0xf2)]);}else{if(_0x527eb4(0xcd)===_0x112de7[_0x527eb4(0xda)]&&_0x1de38e)for(const _0x231c8f of _0x112de7[_0x527eb4(0x102)]){const _0x261a18=_0x527eb4(0xb4)===_0x231c8f[_0x527eb4(0xe4)]?_0x527eb4(0xd7):_0x527eb4(0xbd),_0x7e2bd8=_0x1de38e[_0x527eb4(0xc9)]()?.[_0x527eb4(0xab)]!==_0x8b5a4a;_0x1de38e[_0x527eb4(0xbf)]=_0x1de38e[_0x527eb4(0xde)]({'type':_0x261a18,'isDone':!0x0,'interactionId':_0x1de38e['id'],'areActionsDisabled':_0x7e2bd8}),_0x1de38e[_0x527eb4(0xbf)][_0x527eb4(0xe7)](_0x231c8f[_0x527eb4(0x102)]);}}}async[_0x4d277a(0xed)](_0x801221){const _0x3eefd5=_0x4d277a,_0x2539fc=new Map();if(!_0x801221[_0x3eefd5(0x102)])return _0x2539fc;for(const _0x4d9f69 of _0x801221[_0x3eefd5(0x102)]){const _0x1ca674=await this[_0x3eefd5(0x106)][_0x3eefd5(0xbe)](_0x4d9f69);_0x1ca674&&_0x2539fc[_0x3eefd5(0xdd)](_0x1ca674['id'],_0x1ca674);}return _0x2539fc;}async[_0x4d277a(0xeb)]({userMessage:_0x415a7c,quickActionData:_0x13dab3}){const _0x512746=_0x4d277a;if(!this[_0x512746(0xca)])throw new _0x19919e(_0x512746(0xbc),null,{'conversation':this});if(this[_0x512746(0xdb)])throw new _0x19919e(_0x512746(0x116),null,{'conversation':this});try{const _0x124426=this[_0x512746(0x106)][_0x512746(0xba)](),_0x1dc5ba=this[_0x512746(0x101)][_0x512746(0xf1)](),_0x2b73c9=this[_0x512746(0xe2)]['id'];this[_0x512746(0xdb)]=this[_0x512746(0x117)]({'userMessage':_0x415a7c,'contextItems':_0x124426,'capabilities':_0x1dc5ba,'modelId':_0x2b73c9,'quickActionData':_0x13dab3}),await this[_0x512746(0xdb)][_0x512746(0x10d)](),this[_0x512746(0x106)][_0x512746(0xf4)](this[_0x512746(0xdb)][_0x512746(0xf2)]);}catch(_0x58f949){this[_0x512746(0x119)](_0x512746(0xe9),{'interactionId':this[_0x512746(0xdb)]?this[_0x512746(0xdb)]['id']:void 0x0,'error':_0x58f949});}finally{this[_0x512746(0xdb)]?.[_0x512746(0xbb)](),this[_0x512746(0xdb)]=void 0x0;}}[_0x4d277a(0x117)]({userMessage:_0x14065c,contextItems:_0x1369dd,capabilities:_0x463710,modelId:_0x5c77db,quickActionData:_0x1a9858}){const _0x466f60=_0x4d277a,_0x309e8b=new _0x4ee9e5({'userMessage':_0x14065c,'contextItems':_0x1369dd,'capabilities':_0x463710,'conversationId':this['id'],'connector':this[_0x466f60(0xe6)],'editor':this[_0x466f60(0xae)][_0x466f60(0x111)]&&this[_0x466f60(0xae)][_0x466f60(0x111)](),'model':_0x5c77db,'quickActionData':_0x1a9858});return _0x309e8b[_0x466f60(0xf7)](..._0x13788c)['to'](this),this[_0x466f60(0xcc)][_0x466f60(0xb6)](_0x309e8b),this[_0x466f60(0x119)](_0x466f60(0x10b),_0x309e8b),_0x309e8b;}[_0x4d277a(0xdf)](_0x1482a5){const _0x55caf2=_0x4d277a;return this[_0x55caf2(0xcc)][_0x55caf2(0x115)](_0x480377=>_0x480377['id']===_0x1482a5);}[_0x4d277a(0xb0)](_0x85c342){const _0x51a635=_0x4d277a,_0x5cb8ef=this[_0x51a635(0xdf)](_0x85c342);_0x5cb8ef&&(_0x5cb8ef[_0x51a635(0xef)](),this[_0x51a635(0xcc)][_0x51a635(0x10a)](this[_0x51a635(0xcc)][_0x51a635(0xc6)](_0x5cb8ef),0x1));}get[_0x4d277a(0xb5)](){const _0x21a9dc=_0x4d277a;return this[_0x21a9dc(0xcc)][this[_0x21a9dc(0xcc)][_0x21a9dc(0x114)]-0x1];}[_0x4d277a(0xd6)](_0xc9b058){const _0x6c3568=_0x4d277a;this[_0x6c3568(0x106)][_0x6c3568(0xd6)](_0xc9b058);}async[_0x4d277a(0x10c)]({content:_0x265e3a,version:_0x59af22,sessionId:_0x367131,selections:_0x51413a}){const _0x43fc17=_0x4d277a;await this[_0x43fc17(0x106)][_0x43fc17(0xb7)](_0x265e3a,_0x59af22,_0x367131,_0x51413a);}[_0x4d277a(0xb8)](){const _0x1472bd=_0x4d277a;return this[_0x1472bd(0xdb)]?.[_0x1472bd(0xc9)]()?.[_0x1472bd(0x102)]||'';}[_0x4d277a(0xfd)](_0x288388){const _0x2d6129=_0x4d277a;this[_0x2d6129(0x106)][_0x2d6129(0xfd)](_0x288388);}[_0x4d277a(0xfe)](){const _0x5e16aa=_0x4d277a;this[_0x5e16aa(0x106)][_0x5e16aa(0xfe)]();}[_0x4d277a(0xc4)](_0x442112){const _0x165d36=_0x4d277a;this[_0x165d36(0x106)][_0x165d36(0xc4)](_0x442112);}[_0x4d277a(0xf5)](_0x16be80){const _0x220971=_0x4d277a;this[_0x220971(0x106)][_0x220971(0xf5)](_0x16be80);}[_0x4d277a(0xac)](_0x4e5b2d,_0x189b17){const _0x1cd3d0=_0x4d277a;this[_0x1cd3d0(0x106)][_0x1cd3d0(0xac)](_0x4e5b2d,_0x189b17);}[_0x4d277a(0xf9)](_0x56e9df,_0x1938a6,_0x2a0159){const _0x215b9d=_0x4d277a;return this[_0x215b9d(0x106)][_0x215b9d(0xf9)](_0x56e9df,_0x1938a6,_0x2a0159);}[_0x4d277a(0xe3)](_0xbafa26){const _0x1e122e=_0x4d277a;this[_0x1e122e(0x106)][_0x1e122e(0xe3)](_0xbafa26);}[_0x4d277a(0xd4)](){const _0x1cb734=_0x4d277a;this[_0x1cb734(0x101)][_0x1cb734(0xd4)]();}[_0x4d277a(0xc7)](){const _0x513b89=_0x4d277a;this[_0x513b89(0x101)][_0x513b89(0xc7)]();}[_0x4d277a(0xce)](){const _0x21aee6=_0x4d277a;return this[_0x21aee6(0x106)][_0x21aee6(0xce)]();}[_0x4d277a(0xec)](){const _0x1285c9=_0x4d277a;return this[_0x1285c9(0x106)][_0x1285c9(0xec)]();}[_0x4d277a(0x113)](){const _0x31cd72=_0x4d277a;return this[_0x31cd72(0x106)][_0x31cd72(0x113)]();}async[_0x4d277a(0xd2)](_0x916f71){const _0x12bf83=_0x4d277a;if(!_0x916f71)throw new _0x19919e(_0x12bf83(0xcf),null,{'conversation':this});if(!0x1===await this[_0x12bf83(0xe8)][_0x12bf83(0x100)](_0x916f71))throw new _0x19919e(_0x12bf83(0xd5),null,{'conversation':this,'model':_0x916f71});_0x916f71['id']!==this[_0x12bf83(0xe2)]?.['id']&&(this[_0x12bf83(0xe2)]=_0x916f71,this[_0x12bf83(0x101)][_0x12bf83(0xdc)](),this[_0x12bf83(0x119)](_0x12bf83(0xd8),{'selectedModel':_0x916f71}));}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
6
|
+
import { AIInteraction, type AIInteractionOptions } from '../../aicore/model/aiinteraction.js';
|
|
7
|
+
import { type AIConnectorRequest } from '../../aicore/aiconnector.js';
|
|
8
|
+
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
9
|
+
import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
|
|
10
|
+
export declare class AIChatInteraction extends AIInteraction {
|
|
11
|
+
/**
|
|
12
|
+
* The user message that was sent to the AI endpoint.
|
|
13
|
+
*/
|
|
14
|
+
readonly userMessage: string;
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the {@link module:ai/aichat/model/aichatconversation~AIChatConversation conversation} that the interaction belongs to.
|
|
17
|
+
*/
|
|
18
|
+
readonly conversationId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The context items that were sent to the AI endpoint.
|
|
21
|
+
*/
|
|
22
|
+
readonly contextItems: Map<string, AIContextItem>;
|
|
23
|
+
/**
|
|
24
|
+
* The capabilities settings that were sent to the AI endpoint.
|
|
25
|
+
*/
|
|
26
|
+
readonly capabilities: AICapabilitiesConfig;
|
|
27
|
+
/**
|
|
28
|
+
* The model of the interaction.
|
|
29
|
+
*/
|
|
30
|
+
readonly model: string;
|
|
31
|
+
/**
|
|
32
|
+
* The quick action data that was sent to the AI endpoint.
|
|
33
|
+
*/
|
|
34
|
+
readonly quickActionData?: AIQuickActionRequestData;
|
|
35
|
+
constructor(options: AIChatInteractionOptions);
|
|
36
|
+
sendRequest(): Promise<AIConnectorRequest>;
|
|
37
|
+
getDocumentContext(): AIContextItem | undefined;
|
|
38
|
+
}
|
|
39
|
+
export type AIChatInteractionOptions = {
|
|
40
|
+
conversationId: string;
|
|
41
|
+
contextItems: Map<string, AIContextItem>;
|
|
42
|
+
capabilities: AICapabilitiesConfig;
|
|
43
|
+
userMessage: string;
|
|
44
|
+
model: string;
|
|
45
|
+
quickActionData?: AIQuickActionRequestData;
|
|
46
|
+
} & AIInteractionOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x5599(_0x382109,_0x2ded19){var _0x1d7366=_0x1d73();return _0x5599=function(_0x559902,_0x341fb9){_0x559902=_0x559902-0x70;var _0x9a4a5c=_0x1d7366[_0x559902];return _0x9a4a5c;},_0x5599(_0x382109,_0x2ded19);}var _0x205ad8=_0x5599;(function(_0x498ed6,_0x2f1d81){var _0x463301=_0x5599,_0x7edda6=_0x498ed6();while(!![]){try{var _0x286f21=parseInt(_0x463301(0x85))/0x1+-parseInt(_0x463301(0x7c))/0x2+parseInt(_0x463301(0x81))/0x3*(-parseInt(_0x463301(0x84))/0x4)+parseInt(_0x463301(0x76))/0x5*(-parseInt(_0x463301(0x75))/0x6)+-parseInt(_0x463301(0x80))/0x7*(parseInt(_0x463301(0x82))/0x8)+parseInt(_0x463301(0x86))/0x9+parseInt(_0x463301(0x77))/0xa;if(_0x286f21===_0x2f1d81)break;else _0x7edda6['push'](_0x7edda6['shift']());}catch(_0x294db8){_0x7edda6['push'](_0x7edda6['shift']());}}}(_0x1d73,0xb3dca));import{AICapabilities as _0x28a716}from'../../aicore/model/aicapabilities.js';function _0x1d73(){var _0x451a94=['quickActionData','model','2270586imdGwq','userMessage','sendRequest','connector','8850233lRIGKm','258fuCvEK','8ERoyhy','getDocumentContext','8852hhLkAI','932343BKPwIo','3404115gLEjMY','conversationId','contextItems','getCapabilitiesRequestData','mapContextItemsToRequestData','get','current-document','31938ognQQC','20CJfoCN','20373580BcvACs','queryAssistant','capabilities'];_0x1d73=function(){return _0x451a94;};return _0x1d73();}import{AIInteraction as _0x354d9d}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x2db3ce}from'./aichatcontext.js';export class AIChatInteraction extends _0x354d9d{[_0x205ad8(0x7d)];[_0x205ad8(0x87)];[_0x205ad8(0x70)]=new Map();[_0x205ad8(0x7b)];[_0x205ad8(0x7a)];constructor(_0x450469){var _0x1bfb40=_0x205ad8;super(_0x450469),this[_0x1bfb40(0x87)]=_0x450469[_0x1bfb40(0x87)],this[_0x1bfb40(0x70)]=_0x450469[_0x1bfb40(0x70)],this[_0x1bfb40(0x79)]=_0x450469[_0x1bfb40(0x79)],this[_0x1bfb40(0x7d)]=_0x450469[_0x1bfb40(0x7d)],this[_0x1bfb40(0x7b)]=_0x450469[_0x1bfb40(0x7b)],this[_0x1bfb40(0x7a)]=_0x450469[_0x1bfb40(0x7a)];}async[_0x205ad8(0x7e)](){var _0x7e5af8=_0x205ad8;return this[_0x7e5af8(0x7f)][_0x7e5af8(0x78)]({'message':this[_0x7e5af8(0x7d)],'conversationId':this[_0x7e5af8(0x87)],'parts':_0x2db3ce[_0x7e5af8(0x72)](this[_0x7e5af8(0x70)]),'capabilities':_0x28a716[_0x7e5af8(0x71)](this[_0x7e5af8(0x79)]),'model':this[_0x7e5af8(0x7b)],'quickActionData':this[_0x7e5af8(0x7a)]});}[_0x205ad8(0x83)](){var _0x27740c=_0x205ad8;return this[_0x27740c(0x70)][_0x27740c(0x73)](_0x27740c(0x74));}}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
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
|
+
/**
|
|
35
|
+
* The configuration of the AI Chat models feature.
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* ClassicEditor.create( {
|
|
39
|
+
* ai: {
|
|
40
|
+
* chat: {
|
|
41
|
+
* models: {
|
|
42
|
+
* defaultModelId: ...,
|
|
43
|
+
* modelSelectorAlwaysVisible: ...,
|
|
44
|
+
* displayedModels: ...
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
* } )
|
|
49
|
+
* .then( ... )
|
|
50
|
+
* .catch( ... );
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
54
|
+
*/
|
|
55
|
+
export type AIChatModelsConfig = {
|
|
56
|
+
/**
|
|
57
|
+
* Decides which model is selected by default when the AI Chat is initialized or when user starts a new conversation.
|
|
58
|
+
*/
|
|
59
|
+
defaultModelId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Decides whether the model selector dropdown is always visible. It is `true` by default, which means
|
|
62
|
+
* the selector will be always visible in the UI. Setting it to `false`, hides the model selector dropdown when:
|
|
63
|
+
*
|
|
64
|
+
* * Only one model is available.
|
|
65
|
+
* * User has selected a model and send first message (which is the point when model cannot be changed).
|
|
66
|
+
*/
|
|
67
|
+
modelSelectorAlwaysVisible?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Decides which models are visible in the model selector dropdown. It can be a string or an array of strings.
|
|
70
|
+
* It is optional and if not provided, all models are supported.
|
|
71
|
+
*
|
|
72
|
+
* If configured, editor will try to match the passed models by their ID, name or provider. Order by which the models are matched
|
|
73
|
+
* is later reflected in the model selector dropdown.
|
|
74
|
+
*/
|
|
75
|
+
displayedModels?: string | Array<string>;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x2bae7e=_0x46a9;function _0x2e21(){const _0x3e5909=['13196IGjPQt','items','length','some','find','getAll','45CHayiN','1260335KoYzzj','list','6906672stdmsQ','7EsXthu','357615JVbVyF','265546yyoPZl','getModels','isAvailable','filter','capabilities','_connector','getDefault','2881422cOJGzz','values','provider','1466356dFYdpT','enabled','ai-chat-default-model-id-unrecognized','name','_modelList','sort'];_0x2e21=function(){return _0x3e5909;};return _0x2e21();}(function(_0x1375b8,_0x217f43){const _0x174710=_0x46a9,_0x38af3a=_0x1375b8();while(!![]){try{const _0x37086a=parseInt(_0x174710(0x1d8))/0x1+parseInt(_0x174710(0x1cc))/0x2*(parseInt(_0x174710(0x1d2))/0x3)+-parseInt(_0x174710(0x1c6))/0x4+parseInt(_0x174710(0x1d3))/0x5+parseInt(_0x174710(0x1c3))/0x6*(-parseInt(_0x174710(0x1d6))/0x7)+parseInt(_0x174710(0x1d5))/0x8+-parseInt(_0x174710(0x1d7))/0x9;if(_0x37086a===_0x217f43)break;else _0x38af3a['push'](_0x38af3a['shift']());}catch(_0x1cd1c0){_0x38af3a['push'](_0x38af3a['shift']());}}}(_0x2e21,0x90dcc));function _0x46a9(_0x2a6c68,_0x523f4c){const _0x2e21fe=_0x2e21();return _0x46a9=function(_0x46a902,_0x4c2762){_0x46a902=_0x46a902-0x1c3;let _0x55a9a6=_0x2e21fe[_0x46a902];return _0x55a9a6;},_0x46a9(_0x2a6c68,_0x523f4c);}import{EmitterMixin as _0x365931,logWarning as _0x438608}from'ckeditor5/src/utils.js';export class AIChatModels extends _0x365931(){[_0x2bae7e(0x1ca)]=[];[_0x2bae7e(0x1dd)];constructor({connector:_0x261ae1}){const _0x13e85b=_0x2bae7e;super(),this[_0x13e85b(0x1dd)]=_0x261ae1;}async[_0x2bae7e(0x1d1)](){const _0x5c48fa=_0x2bae7e;if(!this[_0x5c48fa(0x1ca)][_0x5c48fa(0x1ce)]){const _0x1d3dfa=this[_0x5c48fa(0x1dd)][_0x5c48fa(0x1d9)](),_0x1631de=(await _0x1d3dfa[_0x5c48fa(0x1d4)]())[_0x5c48fa(0x1cd)][_0x5c48fa(0x1cb)]((_0xb1c9a3,_0x326e97)=>{const _0x2dd36f=_0x5c48fa,_0x326501=Object[_0x2dd36f(0x1c4)](_0xb1c9a3[_0x2dd36f(0x1dc)])[_0x2dd36f(0x1db)](_0x38ef9f=>_0x38ef9f[_0x2dd36f(0x1c7)])[_0x2dd36f(0x1ce)];return Object[_0x2dd36f(0x1c4)](_0x326e97[_0x2dd36f(0x1dc)])[_0x2dd36f(0x1db)](_0x4a507f=>_0x4a507f[_0x2dd36f(0x1c7)])[_0x2dd36f(0x1ce)]-_0x326501;});this[_0x5c48fa(0x1ca)]=_0x1631de;}return this[_0x5c48fa(0x1ca)];}async[_0x2bae7e(0x1de)](_0xf2dd79){const _0x28ea35=_0x2bae7e,_0x5d824c=await this[_0x28ea35(0x1d1)]();if(!_0x5d824c[_0x28ea35(0x1ce)])return null;if(_0xf2dd79){const _0x377711=_0x5d824c[_0x28ea35(0x1d0)](_0x55575f=>_0x55575f['id']===_0xf2dd79);if(_0x377711)return _0x377711;_0x438608(_0x28ea35(0x1c8),{'defaultModelId':_0xf2dd79,'fallBackModelId':_0x5d824c[0x0]['id']});}return _0x5d824c[0x0];}async[_0x2bae7e(0x1da)](_0x2379e1){const _0x29aa28=_0x2bae7e;return(await this[_0x29aa28(0x1d1)]())[_0x29aa28(0x1cf)](_0x48f252=>_0x48f252[_0x29aa28(0x1c9)]===_0x2379e1[_0x29aa28(0x1c9)]&&_0x48f252[_0x29aa28(0x1c5)]===_0x2379e1[_0x29aa28(0x1c5)]);}}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aichat/ui/aichatcontrolsview
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View, type BodyCollection } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { type AIAddContextOptionsState, type AIContextProvider, type AIContextResourceState } from '../model/aichatcontext.js';
|
|
11
|
+
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
|
+
import { type AIChatModel } from '../model/aichatmodels.js';
|
|
13
|
+
export declare class AIChatControlsView extends View {
|
|
14
|
+
/**
|
|
15
|
+
* The loading state of the controls.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
constructor(locale: Locale, bodyCollection: BodyCollection);
|
|
21
|
+
/**
|
|
22
|
+
* Adds an item chip to the current context list.
|
|
23
|
+
*/
|
|
24
|
+
addContextItem(contextItem: AIContextItem, isLoading: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Removes an item from the context as chip.
|
|
27
|
+
*/
|
|
28
|
+
removeContextItem(id: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the loading state of an item chip in the current context list.
|
|
31
|
+
*/
|
|
32
|
+
setContextItemLoading(uiId: string, isLoading: boolean): void;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the upload in progress state.
|
|
35
|
+
*/
|
|
36
|
+
setIsUploadInProgress(isUploadInProgress: boolean): void;
|
|
37
|
+
/**
|
|
38
|
+
* Sets the conversation context chips.
|
|
39
|
+
*/
|
|
40
|
+
setConversationContext(contextItems: Array<AIContextItem>): void;
|
|
41
|
+
/**
|
|
42
|
+
* Clears the pending context UI.
|
|
43
|
+
*/
|
|
44
|
+
clearPendingContextUI(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Clears the conversation context UI.
|
|
47
|
+
*/
|
|
48
|
+
clearConversationContextUI(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Updates the state of a specific resource in the balloon views.
|
|
51
|
+
*/
|
|
52
|
+
updateResourceState(sourceId: string, resourceId: string, isInContext: boolean): void;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the web search state.
|
|
55
|
+
*/
|
|
56
|
+
setWebSearch(isWebSearchEnabled: boolean): void;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the reasoning state.
|
|
59
|
+
*/
|
|
60
|
+
setReasoning(isReasoningEnabled: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
* Resets the message input.
|
|
63
|
+
*/
|
|
64
|
+
resetMessageInput(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Sets the add context options.
|
|
67
|
+
*/
|
|
68
|
+
setAddContextOptions(options: AIAddContextOptionsState): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets the placeholder text for the prompt input.
|
|
71
|
+
*/
|
|
72
|
+
setInputPlaceholder(placeholder: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Sets model list dropdown.
|
|
75
|
+
*/
|
|
76
|
+
setModelList(models: Array<AIChatModel>, hideIfSingleModel: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Sets the selected model in the model list dropdown.
|
|
79
|
+
*/
|
|
80
|
+
setModel(model: AIChatModel | null): void;
|
|
81
|
+
/**
|
|
82
|
+
* Enables the model selector in the prompt capabilities view.
|
|
83
|
+
*/
|
|
84
|
+
enableModelSelector(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Disables the model selector in the prompt capabilities view.
|
|
87
|
+
*/
|
|
88
|
+
disableModelSelector(hideSelector: boolean): void;
|
|
89
|
+
/**
|
|
90
|
+
* Populates a source resource balloon with loaded resources.
|
|
91
|
+
*/
|
|
92
|
+
populateSourceResourceBalloon(sourceId: string, source: AIContextProvider, resources: Array<AIContextResourceState>, uid: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* Closes the source resource balloon and cleans up its state.
|
|
95
|
+
*/
|
|
96
|
+
closeSourceResourceBalloon(sourceId: string): void;
|
|
97
|
+
focusPromptInput(): void;
|
|
98
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x132e(_0xc9655c,_0x4145e4){const _0x413b78=_0x413b();return _0x132e=function(_0x132e78,_0x2bb0ab){_0x132e78=_0x132e78-0x1b4;let _0x7aab8b=_0x413b78[_0x132e78];return _0x7aab8b;},_0x132e(_0xc9655c,_0x4145e4);}const _0x4f094f=_0x132e;function _0x413b(){const _0x399253=['sendUserMessage','28507790bWUFbU','32LAsTGL','addContextButtonView','_createLoaderView','_createPromptCapabilitiesView','focusPromptInput','321211ZywmXr','disableModelSelector','closeSourceResourceBalloon','setWebSearch','form','focus','setContextItemLoading','element','_promptCapabilitiesView','clearPendingContextUI','clearConversationContextItems','enableModelSelector','210Rnmolr','bindTemplate','toggleReasoning','setReasoning','addContextItem','div','setInputPlaceholder','removeContextItem','_handlePromptInputFocus','_createPromptInputView','ck-hidden','isLoading','selectModel','populateSourceResourceBalloon','low','setTemplate','5143869ANRxHV','52IlJXZn','1234280oNTYVA','692258XaSmSL','clearConversationContextUI','_promptInputView','toggleWebSearch','resetMessageInput','_contextPanelView','clearCurrentContextItems','setModelList','_shouldRestorePromptInputFocus','updateResourceState','setPlaceholderText','setIsUploadInProgress','setConversationContext','delegate','105333sAIukS','setModel','_createContextPanelView','94135hlNdKf','change:isLoading','abortPromptStream','_loaderView','ck-ai-chat-controls','reset','setAddContextOptions'];_0x413b=function(){return _0x399253;};return _0x413b();}(function(_0x357682,_0x3018fb){const _0x30e859=_0x132e,_0x12547b=_0x357682();while(!![]){try{const _0x529af3=-parseInt(_0x30e859(0x1ce))/0x1+-parseInt(_0x30e859(0x1eb))/0x2*(parseInt(_0x30e859(0x1bd))/0x3)+-parseInt(_0x30e859(0x1ec))/0x4+parseInt(_0x30e859(0x1c0))/0x5*(-parseInt(_0x30e859(0x1da))/0x6)+-parseInt(_0x30e859(0x1ed))/0x7*(-parseInt(_0x30e859(0x1c9))/0x8)+-parseInt(_0x30e859(0x1ea))/0x9+parseInt(_0x30e859(0x1c8))/0xa;if(_0x529af3===_0x3018fb)break;else _0x12547b['push'](_0x12547b['shift']());}catch(_0xfd041a){_0x12547b['push'](_0x12547b['shift']());}}}(_0x413b,0x73872));import{clickOutsideHandler as _0x4d27e3,View as _0x41dc7d}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x2e9817}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x483a44}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x3f94c5,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x37e228}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x1e7103}from'./controls/aichatcontrolsloaderview.js';export class AIChatControlsView extends _0x41dc7d{[_0x4f094f(0x1b4)];[_0x4f094f(0x1ef)];[_0x4f094f(0x1d6)];[_0x4f094f(0x1c3)];[_0x4f094f(0x1b7)];constructor(_0x134c51,_0x5dee83){const _0x54d1bc=_0x4f094f;super(_0x134c51),this[_0x54d1bc(0x1b4)]=this[_0x54d1bc(0x1bf)](_0x134c51,_0x5dee83),this[_0x54d1bc(0x1ef)]=this[_0x54d1bc(0x1e3)](_0x134c51),this[_0x54d1bc(0x1d6)]=this[_0x54d1bc(0x1cc)](_0x134c51),this[_0x54d1bc(0x1c3)]=this[_0x54d1bc(0x1cb)](_0x134c51),this[_0x54d1bc(0x1b7)]=!0x1,this[_0x54d1bc(0x1ef)][_0x54d1bc(0x1bc)](_0x54d1bc(0x1c7))['to'](this),this[_0x54d1bc(0x1c3)][_0x54d1bc(0x1bc)](_0x54d1bc(0x1c2))['to'](this),this[_0x54d1bc(0x1d6)][_0x54d1bc(0x1bc)](_0x54d1bc(0x1f0))['to'](this),this[_0x54d1bc(0x1d6)][_0x54d1bc(0x1bc)](_0x54d1bc(0x1dc))['to'](this),this[_0x54d1bc(0x1d6)][_0x54d1bc(0x1bc)](_0x54d1bc(0x1e6))['to'](this),this[_0x54d1bc(0x1b4)][_0x54d1bc(0x1bc)](..._0x37e228)['to'](this);const _0x67b693=this[_0x54d1bc(0x1db)];this[_0x54d1bc(0x1e9)]({'tag':_0x54d1bc(0x1d2),'attributes':{'class':['ck',_0x54d1bc(0x1c4)]},'children':[{'tag':_0x54d1bc(0x1df),'attributes':{'class':[_0x67b693['if'](_0x54d1bc(0x1e5),_0x54d1bc(0x1e4))]},'children':[this[_0x54d1bc(0x1b4)],this[_0x54d1bc(0x1ef)],this[_0x54d1bc(0x1d6)]]},{'tag':_0x54d1bc(0x1df),'attributes':{'class':[_0x67b693['if'](_0x54d1bc(0x1e5),_0x54d1bc(0x1e4),_0x300b72=>!_0x300b72)]},'children':[this[_0x54d1bc(0x1c3)]]}]}),_0x4d27e3({'emitter':this[_0x54d1bc(0x1ef)],'activator':()=>this[_0x54d1bc(0x1e5)],'contextElements':()=>[this[_0x54d1bc(0x1d5)]],'callback':()=>{const _0x3eeeda=_0x54d1bc;this[_0x3eeeda(0x1b7)]=!0x1;}}),this['on'](_0x54d1bc(0x1c1),this[_0x54d1bc(0x1e2)],{'priority':_0x54d1bc(0x1e8)});}[_0x4f094f(0x1bf)](_0x2e934d,_0x91c8d0){return new _0x3f94c5(_0x2e934d,_0x91c8d0);}[_0x4f094f(0x1e3)](_0x4b142b){const _0xff6e28=_0x4f094f;return new _0x2e9817(_0x4b142b,this[_0xff6e28(0x1b4)][_0xff6e28(0x1ca)]);}[_0x4f094f(0x1cc)](_0x2810f5){return new _0x483a44(_0x2810f5);}[_0x4f094f(0x1cb)](_0x5a18bf){return new _0x1e7103(_0x5a18bf);}[_0x4f094f(0x1e2)](_0x174db0,_0x2e1d3a,_0x2f73b9){const _0x5a0176=_0x4f094f;_0x2f73b9?this[_0x5a0176(0x1b7)]=!0x0:this[_0x5a0176(0x1b7)]&&this[_0x5a0176(0x1ef)][_0x5a0176(0x1d3)]();}[_0x4f094f(0x1de)](_0x3e69f4,_0x67570e){const _0x52a676=_0x4f094f;this[_0x52a676(0x1b4)][_0x52a676(0x1de)](_0x3e69f4,_0x67570e);}[_0x4f094f(0x1e1)](_0x264170){const _0x16dbd9=_0x4f094f;this[_0x16dbd9(0x1b4)][_0x16dbd9(0x1e1)](_0x264170);}[_0x4f094f(0x1d4)](_0x1d75e2,_0xd7b540){const _0x2a09d3=_0x4f094f;this[_0x2a09d3(0x1b4)][_0x2a09d3(0x1d4)](_0x1d75e2,_0xd7b540);}[_0x4f094f(0x1ba)](_0x58579d){const _0x4c0e64=_0x4f094f;this[_0x4c0e64(0x1ef)][_0x4c0e64(0x1ba)](_0x58579d);}[_0x4f094f(0x1bb)](_0x4633fb){const _0x5ee38a=_0x4f094f;this[_0x5ee38a(0x1b4)][_0x5ee38a(0x1bb)](_0x4633fb);}[_0x4f094f(0x1d7)](){const _0x259350=_0x4f094f;this[_0x259350(0x1b4)][_0x259350(0x1b5)]();}[_0x4f094f(0x1ee)](){const _0x56476c=_0x4f094f;this[_0x56476c(0x1b4)][_0x56476c(0x1d8)]();}[_0x4f094f(0x1b8)](_0x59d502,_0x365a50,_0xf442ee){const _0x26d7d5=_0x4f094f;this[_0x26d7d5(0x1b4)][_0x26d7d5(0x1b8)](_0x59d502,_0x365a50,_0xf442ee);}[_0x4f094f(0x1d1)](_0x18eedc){const _0x35827f=_0x4f094f;this[_0x35827f(0x1d6)][_0x35827f(0x1d1)](_0x18eedc);}[_0x4f094f(0x1dd)](_0x49b4ef){const _0x3a67db=_0x4f094f;this[_0x3a67db(0x1d6)][_0x3a67db(0x1dd)](_0x49b4ef);}[_0x4f094f(0x1f1)](){const _0x4c9cfc=_0x4f094f;this[_0x4c9cfc(0x1ef)][_0x4c9cfc(0x1c5)]();}[_0x4f094f(0x1c6)](_0x417296){const _0x4bb37a=_0x4f094f;this[_0x4bb37a(0x1b4)][_0x4bb37a(0x1c6)](_0x417296);}[_0x4f094f(0x1e0)](_0x1ca5fc){const _0x40cfbe=_0x4f094f;this[_0x40cfbe(0x1ef)][_0x40cfbe(0x1b9)](_0x1ca5fc);}[_0x4f094f(0x1b6)](_0x3586f9,_0x10a564){const _0x2b8123=_0x4f094f;this[_0x2b8123(0x1d6)][_0x2b8123(0x1b6)](_0x3586f9,_0x10a564);}[_0x4f094f(0x1be)](_0x1988a1){const _0x52589e=_0x4f094f;this[_0x52589e(0x1d6)][_0x52589e(0x1be)](_0x1988a1);}[_0x4f094f(0x1d9)](){const _0x5380c9=_0x4f094f;this[_0x5380c9(0x1d6)][_0x5380c9(0x1d9)]();}[_0x4f094f(0x1cf)](_0x49f891){const _0x446687=_0x4f094f;this[_0x446687(0x1d6)][_0x446687(0x1cf)](_0x49f891);}[_0x4f094f(0x1e7)](_0x2733c1,_0x2e4962,_0xf746fb,_0x3f82c6){const _0xfe5f64=_0x4f094f;this[_0xfe5f64(0x1b4)][_0xfe5f64(0x1e7)](_0x2733c1,_0x2e4962,_0xf746fb,_0x3f82c6);}[_0x4f094f(0x1d0)](_0x2416f6){const _0x8fc1e3=_0x4f094f;this[_0x8fc1e3(0x1b4)][_0x8fc1e3(0x1d0)](_0x2416f6);}[_0x4f094f(0x1cd)](){const _0x4f9164=_0x4f094f;this[_0x4f9164(0x1ef)][_0x4f9164(0x1d3)]();}}
|