@ckeditor/ckeditor5-ai 46.1.1-alpha.3 → 47.0.0-alpha.0
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 +2648 -0
- package/dist/index.css +3047 -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 +162 -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/aiassistant/legacyerrors.js +23 -0
- 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 +82 -31
- 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 +101 -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 +19 -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 +154 -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/legacyerrors.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,360 @@
|
|
|
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 AIUserMessage } from '../../aicore/aiconnector.js';
|
|
6
|
+
import { AIContextItemType, AIContextTextResourceType, type AIContextItem, type AIContextItemRequestData } from '../../aicore/model/aicontext.js';
|
|
7
|
+
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
|
+
/**
|
|
233
|
+
* The configuration of the AI Chat menu for adding resources to the prompt context.
|
|
234
|
+
*
|
|
235
|
+
* This menu allows users to attach additional resources (files, documents, URLs) to their AI chat prompts,
|
|
236
|
+
* providing the AI with more context for generating responses. The properties defined in this config are set
|
|
237
|
+
* in the `config.ai.chat.context` namespace.
|
|
238
|
+
*
|
|
239
|
+
* ```ts
|
|
240
|
+
* ClassicEditor
|
|
241
|
+
* .create( editorElement, {
|
|
242
|
+
* ai: {
|
|
243
|
+
* chat: {
|
|
244
|
+
* context: {
|
|
245
|
+
* document: { enabled: true },
|
|
246
|
+
* urls: { enabled: false },
|
|
247
|
+
* files: { enabled: true },
|
|
248
|
+
* sources: [
|
|
249
|
+
* {
|
|
250
|
+
* id: 'my-docs',
|
|
251
|
+
* label: 'My Documents',
|
|
252
|
+
* getResources: ( query?: string ) => fetchMyDocuments( query ),
|
|
253
|
+
* getData: ( id ) => fetchDocumentContent( id )
|
|
254
|
+
* }
|
|
255
|
+
* ]
|
|
256
|
+
* }
|
|
257
|
+
* }
|
|
258
|
+
* }
|
|
259
|
+
* } )
|
|
260
|
+
* .then( ... )
|
|
261
|
+
* .catch( ... );
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
* The `document`, `urls`, and `files` properties control the built-in options in the context menu.
|
|
265
|
+
* Each option can be enabled or disabled using the `enabled` boolean property.
|
|
266
|
+
*
|
|
267
|
+
* The `sources` property is an array where each element represents a custom option in the context menu.
|
|
268
|
+
* When a user clicks on a custom source option, it will display a list of available resources returned by the
|
|
269
|
+
* `getResources` callback. If a resource doesn't have content provided in the `getResources` response, the content
|
|
270
|
+
* will be retrieved using the `getData` callback when the resource is selected.
|
|
271
|
+
*
|
|
272
|
+
* See {@link module:ai/aichat/model/aichatcontext~AIContextProvider} and
|
|
273
|
+
* {@link module:ai/aichat/model/aichatcontext~AIContextResource}.
|
|
274
|
+
*/
|
|
275
|
+
export type AIChatContextConfig = {
|
|
276
|
+
document?: {
|
|
277
|
+
enabled: boolean;
|
|
278
|
+
};
|
|
279
|
+
urls?: {
|
|
280
|
+
enabled: boolean;
|
|
281
|
+
};
|
|
282
|
+
files?: {
|
|
283
|
+
enabled: boolean;
|
|
284
|
+
};
|
|
285
|
+
sources?: Array<AIContextProvider>;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* The configuration of a custom option in the AI Chat menu for adding resources to the prompt context.
|
|
289
|
+
*
|
|
290
|
+
* Each `AIContextProvider` represents a single menu option that, when clicked, displays a list of available
|
|
291
|
+
* resources that can be attached to the AI prompt. The `label` is displayed as the menu option text, and the
|
|
292
|
+
* optional `icon` can be used to provide a visual representation.
|
|
293
|
+
*
|
|
294
|
+
* The `getResources` callback is called when the user clicks on the menu option and should return an array of
|
|
295
|
+
* available resources. If a resource doesn't have content provided in the `getResources` response (i.e., the `data`
|
|
296
|
+
* property is undefined), the content will be retrieved using the `getData` callback when the resource is selected
|
|
297
|
+
* to be included in the prompt context.
|
|
298
|
+
*
|
|
299
|
+
* The optional `useDefaultFiltering` property controls whether the built-in search filtering should be applied
|
|
300
|
+
* to the resources returned by `getResources`. When set to `true`, the resources will be filtered
|
|
301
|
+
* based on the user's search query. When set to `false`, all resources will be displayed regardless of the search query,
|
|
302
|
+
* allowing the provider to handle filtering internally within the `getResources` callback.
|
|
303
|
+
*
|
|
304
|
+
* ```ts
|
|
305
|
+
* {
|
|
306
|
+
* id: 'knowledge-base',
|
|
307
|
+
* label: 'Knowledge Base',
|
|
308
|
+
* icon: 'book',
|
|
309
|
+
* useDefaultFiltering: false,
|
|
310
|
+
* getResources: async ( query?: string ) => [
|
|
311
|
+
* { id: 'doc1', type: AIContextItemType.DOCUMENT, label: 'User Guide' },
|
|
312
|
+
* { id: 'doc2', type: AIContextItemType.DOCUMENT, label: 'API Reference', data: 'content...' }
|
|
313
|
+
* ],
|
|
314
|
+
* getData: async ( id ) => fetchDocumentContent( id )
|
|
315
|
+
* }
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
export type AIContextProvider = {
|
|
319
|
+
id: string;
|
|
320
|
+
icon?: string;
|
|
321
|
+
label: string;
|
|
322
|
+
useDefaultFiltering?: boolean;
|
|
323
|
+
getResources: (query?: string) => Promise<Array<AIContextResource>>;
|
|
324
|
+
getData?: (id: string) => Promise<string>;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* An individual resource item within a {@link module:ai/aichat/model/aichatcontext~AIContextProvider}.
|
|
328
|
+
*
|
|
329
|
+
* Represents a single selectable item in the resources list displayed when a user clicks on a custom
|
|
330
|
+
* context menu option. The `label` is displayed to the user as the resource name, and the `type`
|
|
331
|
+
* indicates what kind of context item this represents (file, document, or URL).
|
|
332
|
+
*
|
|
333
|
+
* When selected, the resource will be attached to the AI prompt to provide additional context for
|
|
334
|
+
* generating responses. If the `data` property is provided, it contains the content of the resource.
|
|
335
|
+
* If `data` is undefined, the content will be retrieved using the `getData` callback from the parent
|
|
336
|
+
* `AIContextProvider` when the resource is selected.
|
|
337
|
+
*
|
|
338
|
+
* ```ts
|
|
339
|
+
* {
|
|
340
|
+
* id: 'user-guide-intro',
|
|
341
|
+
* type: AIContextItemType.DOCUMENT,
|
|
342
|
+
* label: 'User Guide - Introduction',
|
|
343
|
+
* data: 'This is the introduction to our user guide...'
|
|
344
|
+
* }
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
export type AIContextResource = {
|
|
348
|
+
id: string;
|
|
349
|
+
type: AIContextItemType;
|
|
350
|
+
label: string;
|
|
351
|
+
data?: string | File | AIContextTextResource;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* A text resource that can be used as a context item.
|
|
355
|
+
*/
|
|
356
|
+
export type AIContextTextResource = {
|
|
357
|
+
content: string;
|
|
358
|
+
type: AIContextTextResourceType;
|
|
359
|
+
};
|
|
360
|
+
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 _0x224eff=_0x438b;(function(_0x3ccefb,_0x22a108){const _0x25389f=_0x438b,_0x2f9a3d=_0x3ccefb();while(!![]){try{const _0x52b1a3=parseInt(_0x25389f(0xb3))/0x1*(parseInt(_0x25389f(0xc6))/0x2)+-parseInt(_0x25389f(0x110))/0x3+parseInt(_0x25389f(0xcc))/0x4+-parseInt(_0x25389f(0x10f))/0x5+-parseInt(_0x25389f(0x123))/0x6*(parseInt(_0x25389f(0xc4))/0x7)+-parseInt(_0x25389f(0xb0))/0x8+parseInt(_0x25389f(0x119))/0x9;if(_0x52b1a3===_0x22a108)break;else _0x2f9a3d['push'](_0x2f9a3d['shift']());}catch(_0x40b898){_0x2f9a3d['push'](_0x2f9a3d['shift']());}}}(_0x23f6,0xb12fb));function _0x438b(_0x4cec86,_0x2bbdd9){const _0x23f614=_0x23f6();return _0x438b=function(_0x438b07,_0x4af46f){_0x438b07=_0x438b07-0xaa;let _0x41fe4f=_0x23f614[_0x438b07];return _0x41fe4f;},_0x438b(_0x4cec86,_0x2bbdd9);}import{CKEditorError as _0x1475c7,ObservableMixin as _0xccae57,uid as _0x4f4cdc}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x21f3ea,AIContextTextResourceType as _0x11aa8c}from'../../aicore/model/aicontext.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x224eff(0x127),_0x224eff(0xac),_0x224eff(0xd5),_0x224eff(0xce),_0x224eff(0x12f),_0x224eff(0xeb),_0x224eff(0xf1),_0x224eff(0xf0),_0x224eff(0x111)];function _0x23f6(){const _0xc9fa7b=['fire','object\x20with\x20content\x20and\x20type\x20properties','string','getSentContextItems','populateFromMessage','map','_startUploadOperation','addContextOptionsChanged','version','_createContextItemFromContent','addFilesToContext','isCurrentDocumentInConversation','resourceStateChanged','sourceResourcesLoaded','MARKDOWN','_setAddContextOptionsDefaultState','_removeContextItem','_toggleAddCurrentDocumentOptionVisibility','file-','data','type','files','forEach','end','Current\x20document','document','_convertTextResourceToFile','TEXT','url','current-document','_finishUploadOperation','_addContextOptionsState','_mapContextItemToRequestData','removeFromContext','getDocument','isHidden','ai-request-aborted','ai-chat-file-upload-failed','abortController','File','find','sources','ai-chat-context-invalid-data','7089620mrspqI','2969412CXiosz','uploadProgressChanged','_config','text/html','set','from','ai-chat-url-upload-failed','url-','loadSourceResources','31306041QupsKA','files-','sessionId','ai-chat-document-upload-failed','startsWith','ai-chat-source-not-found','object','label','resourceId','uploadUrl','5687544bMWvFO','isReadOnly','addToConversationContext','stack','contextItemAdded','content','size','_updateResourceInContextState','get','all','selection','SELECTION','error','text/plain','filter','ai-chat-resource-load-failed','DOCUMENT','addCurrentDocumentToContext','uiId','addSelectionToContext','_ongoingUploadOperations','clearPendingContextItems','contextItemRemoved','text/markdown','urls','getResources','5349832ttfehi','_addToConversationContextItem','uploadFile','205661GkQMpQ','getData','FILE','isSelectionInContext','start','ai-chat-resource-no-data','_finishContextItemLoading','_ongoingUploads','_getCustomSourcesInitialState','resources','push','getId','attributes','_findSourceIdsByResourceId','updateCurrentDocument','message','URL','7ajnIqB','enabled','4BbHkPn','name','length','ai-chat-source-resources-load-failed','getPendingContextItems','_conversationContextItems','3441460VTFHTR','mapContextItemsToRequestData','contextSent','fetchDocument','_addContextItem','hidden','_pendingContextItems','has','_connector','contextItemLoadingEnded','_isResourceInContext','values','addUrlToContext','isCurrentDocumentInContext','removeSelectionFromContext','addResourceToContext','uploadDocument','HTML','abort','_ownerId','ai-chat-context-unsupported-type','delete','isInContext','init'];_0x23f6=function(){return _0xc9fa7b;};return _0x23f6();}export class AIChatContext extends _0xccae57(){[_0x224eff(0xd4)];[_0x224eff(0x112)];[_0x224eff(0xdf)];constructor({connector:_0x292780,config:_0x3413f5,ownerId:_0x11ccf1}){const _0x19419b=_0x224eff;super(),this[_0x19419b(0xd4)]=_0x292780,this[_0x19419b(0x112)]=_0x3413f5,this[_0x19419b(0xdf)]=_0x11ccf1;}[_0x224eff(0xe3)](){const _0x3392ee=_0x224eff;this[_0x3392ee(0xd2)]=new Map(),this[_0x3392ee(0xcb)]=new Map(),this[_0x3392ee(0xba)]=new Map(),this[_0x3392ee(0xaa)]=new Map(),this[_0x3392ee(0xf3)]();}[_0x224eff(0xca)](){const _0x22a9c8=_0x224eff;return this[_0x22a9c8(0xd2)];}async[_0x224eff(0xe8)](_0x196cd6){const _0x29eff9=_0x224eff,_0x29d178=await this[_0x29eff9(0xed)](_0x196cd6);return this[_0x29eff9(0xb1)](_0x29d178),_0x29eff9(0x101)===_0x29d178[_0x29eff9(0x135)]&&this[_0x29eff9(0xf5)](),_0x29d178;}async[_0x224eff(0xed)](_0x1f0818){const _0x1b1ea0=_0x224eff;if(_0x1f0818[_0x1b1ea0(0xf8)]===_0x21f3ea[_0x1b1ea0(0x133)]){const _0x3ae112=await this[_0x1b1ea0(0xd4)][_0x1b1ea0(0xcf)](this[_0x1b1ea0(0xdf)],_0x1f0818['id'])[_0x1b1ea0(0x106)]();return{'id':_0x1b1ea0(0x101),'uiId':_0x1b1ea0(0x101),'label':_0x1b1ea0(0xfc),'type':_0x1f0818[_0x1b1ea0(0xf8)],'content':_0x3ae112[_0x1b1ea0(0x128)],'hidden':this[_0x1b1ea0(0xcb)][_0x1b1ea0(0xd3)](_0x1b1ea0(0x101)),'version':_0x3ae112[_0x1b1ea0(0xbf)]?.[_0x1b1ea0(0xec)],'sessionId':_0x3ae112[_0x1b1ea0(0xbf)]?.[_0x1b1ea0(0x11b)]};}return{'id':_0x1f0818['id'],'uiId':_0x1f0818['id'],'label':_0x1f0818[_0x1b1ea0(0xbf)]?.[_0x1b1ea0(0x120)]||_0x1f0818[_0x1b1ea0(0xc7)]||_0x1f0818[_0x1b1ea0(0x100)]||_0x1f0818['id'],'type':_0x1f0818[_0x1b1ea0(0xf8)],..._0x1f0818?.[_0x1b1ea0(0xbf)]?.[_0x1b1ea0(0x121)]?{'resourceId':_0x1f0818[_0x1b1ea0(0xbf)]?.[_0x1b1ea0(0x121)]}:{}};}[_0x224eff(0xe7)](){const _0xe8dff1=_0x224eff;return new Map(this[_0xe8dff1(0xcb)]);}[_0x224eff(0x105)](_0x1ab242){const _0x3bc357=_0x224eff,_0x37e80d=this[_0x3bc357(0xd2)][_0x3bc357(0x12b)](_0x1ab242);_0x37e80d?.[_0x3bc357(0x124)]||this[_0x3bc357(0xf4)](_0x1ab242);}[_0x224eff(0xab)](){const _0x59b7c1=_0x224eff;if(0x0===this[_0x59b7c1(0xd2)][_0x59b7c1(0x129)])return;for(const _0x3355d4 of this[_0x59b7c1(0xd2)][_0x59b7c1(0xd7)]())this[_0x59b7c1(0xf4)](_0x3355d4[_0x59b7c1(0x135)]);const _0x10a378=this[_0x59b7c1(0xcb)][_0x59b7c1(0x12b)](_0x59b7c1(0x101))||this[_0x59b7c1(0xd2)][_0x59b7c1(0x12b)](_0x59b7c1(0x101));_0x10a378&&this[_0x59b7c1(0xd0)]({..._0x10a378,'isReadOnly':!0x0,'hidden':!0x0});}[_0x224eff(0x125)](_0x5d04a4){const _0x32b0ac=_0x224eff;for(const _0x499f13 of _0x5d04a4[_0x32b0ac(0xd7)]())this[_0x32b0ac(0xb1)](_0x499f13);this[_0x32b0ac(0xab)](),this[_0x32b0ac(0xe4)](_0x32b0ac(0xce),{'contextItems':Array[_0x32b0ac(0x115)](this[_0x32b0ac(0xe7)]()[_0x32b0ac(0xd7)]())});}[_0x224eff(0xd9)](){const _0x5b13cf=_0x224eff;return this[_0x5b13cf(0xd2)][_0x5b13cf(0xd3)](_0x5b13cf(0x101));}[_0x224eff(0xb6)](){const _0x58d072=_0x224eff;return this[_0x58d072(0xd2)][_0x58d072(0xd3)](_0x58d072(0x12d));}[_0x224eff(0xef)](){const _0x238aba=_0x224eff;return this[_0x238aba(0xcb)][_0x238aba(0xd3)](_0x238aba(0x101));}static[_0x224eff(0xcd)](_0x268dc7){const _0x5e1f35=_0x224eff;return Array[_0x5e1f35(0x115)](_0x268dc7[_0x5e1f35(0xd7)]())[_0x5e1f35(0xe9)](_0x9076d2=>this[_0x5e1f35(0x104)](_0x9076d2))[_0x5e1f35(0x131)](_0x42e2ff=>null!==_0x42e2ff);}async[_0x224eff(0xee)](_0x560112,_0x33a26e,_0x35fbcd=_0x21f3ea[_0x224eff(0xb5)]){const _0x563910=_0x224eff,_0x415a32=_0x563910(0x11a)+_0x4f4cdc();this[_0x563910(0xea)](_0x415a32);try{await Promise[_0x563910(0x12c)](_0x560112[_0x563910(0xe9)](async _0x565932=>{const _0x18c552=_0x563910,_0x55fa7d=_0x18c552(0xf6)+_0x4f4cdc();try{this[_0x18c552(0xd0)]({'type':_0x35fbcd,'label':_0x33a26e?.[_0x18c552(0x120)]||_0x565932[_0x18c552(0xc7)],'uiId':_0x55fa7d,'resourceId':_0x33a26e?.[_0x18c552(0x121)]},!0x0);const _0x4b0a4e=this[_0x18c552(0xd4)][_0x18c552(0xb2)](this[_0x18c552(0xdf)],_0x565932,_0x33a26e);this[_0x18c552(0xba)][_0x18c552(0x114)](_0x55fa7d,_0x4b0a4e[_0x18c552(0x10a)]);const {id:_0x2068c5}=await _0x4b0a4e[_0x18c552(0xbe)]();this[_0x18c552(0xba)][_0x18c552(0xe1)](_0x55fa7d),this[_0x18c552(0xb9)]({'type':_0x35fbcd,'id':_0x2068c5,'label':_0x33a26e?.[_0x18c552(0x120)]||_0x565932[_0x18c552(0xc7)],'uiId':_0x55fa7d,'resourceId':_0x33a26e?.[_0x18c552(0x121)]},!0x1);}catch(_0x1fc32b){this[_0x18c552(0xba)][_0x18c552(0xe1)](_0x55fa7d);if(!_0x1fc32b[_0x18c552(0xc2)][_0x18c552(0x11d)](_0x18c552(0x108))){const _0x49c049=new _0x1475c7(_0x18c552(0x109),null,{'fileName':_0x565932[_0x18c552(0xc7)]});_0x49c049[_0x18c552(0x126)]=_0x1fc32b[_0x18c552(0x126)],this[_0x18c552(0xe4)](_0x18c552(0x12f),{'error':_0x49c049,'fileName':_0x565932[_0x18c552(0xc7)]});}this[_0x18c552(0xf4)](_0x55fa7d);}}));}finally{this[_0x563910(0x102)](_0x415a32);}}[_0x224eff(0x134)](_0x3b36bf){const _0x3ed9e4=_0x224eff;if(this[_0x3ed9e4(0xd9)]())return;const _0x2581c1={'type':_0x21f3ea[_0x3ed9e4(0x133)],'uiId':_0x3ed9e4(0x101),'label':_0x3b36bf,'isReadOnly':this[_0x3ed9e4(0xcb)][_0x3ed9e4(0xd3)](_0x3ed9e4(0x101)),'hidden':this[_0x3ed9e4(0xcb)][_0x3ed9e4(0xd3)](_0x3ed9e4(0x101))};this[_0x3ed9e4(0xd0)](_0x2581c1);}async[_0x224eff(0xc1)](_0x26f51b,_0x4d0537,_0x2040ab,_0x47f72b){const _0x59b151=_0x224eff,_0x217c4e=this[_0x59b151(0xd2)][_0x59b151(0x12b)](_0x59b151(0x101));if(_0x217c4e&&_0x26f51b){_0x217c4e[_0x59b151(0x12d)]=_0x47f72b?_0x47f72b[_0x59b151(0xe9)](_0x11d1e4=>({'start':_0x11d1e4[_0x59b151(0xb7)],'end':_0x11d1e4[_0x59b151(0xfb)]})):[];try{if(_0x217c4e[_0x59b151(0xec)]===_0x4d0537)return;const {id:_0x4d8617}=await this[_0x59b151(0xd4)][_0x59b151(0xdc)](this[_0x59b151(0xdf)],_0x26f51b,{'version':_0x4d0537,'sessionId':_0x2040ab})[_0x59b151(0xbe)]();_0x217c4e['id']=_0x4d8617,_0x217c4e[_0x59b151(0x128)]=_0x26f51b,_0x217c4e[_0x59b151(0xec)]=_0x4d0537,_0x217c4e[_0x59b151(0x11b)]=_0x2040ab;}catch(_0x1e5330){const _0x447354=new _0x1475c7(_0x59b151(0x11c),null);_0x447354[_0x59b151(0x126)]=_0x1e5330[_0x59b151(0x126)],this[_0x59b151(0xe4)](_0x59b151(0x12f),{'error':_0x447354});}}}[_0x224eff(0x136)](_0x109b6d){const _0x136e78=_0x224eff;this[_0x136e78(0xd0)]({'type':_0x21f3ea[_0x136e78(0x12e)],'label':_0x109b6d,'uiId':_0x136e78(0x12d),'content':_0x109b6d});}[_0x224eff(0xda)](){const _0x326b03=_0x224eff;this[_0x326b03(0xf4)](_0x326b03(0x12d));}async[_0x224eff(0xd8)](_0x46c605,_0x47a250){const _0x2c890d=_0x224eff,_0x14d388=_0x2c890d(0x117)+_0x4f4cdc();this[_0x2c890d(0xea)](_0x14d388);const _0x801de=_0x2c890d(0x117)+_0x4f4cdc();try{this[_0x2c890d(0xd0)]({'type':_0x21f3ea[_0x2c890d(0xc3)],'label':_0x47a250?.[_0x2c890d(0x120)]||_0x46c605,'uiId':_0x801de,'resourceId':_0x47a250?.[_0x2c890d(0x121)]},!0x0);const _0x45efa0=this[_0x2c890d(0xd4)][_0x2c890d(0x122)](this[_0x2c890d(0xdf)],_0x46c605,_0x47a250);this[_0x2c890d(0xba)][_0x2c890d(0x114)](_0x801de,_0x45efa0[_0x2c890d(0x10a)]);const {id:_0x1b2755}=await _0x45efa0[_0x2c890d(0xbe)]();this[_0x2c890d(0xba)][_0x2c890d(0xe1)](_0x801de),this[_0x2c890d(0xb9)]({'type':_0x21f3ea[_0x2c890d(0xc3)],'id':_0x1b2755,'label':_0x47a250?.[_0x2c890d(0x120)]||_0x46c605,'uiId':_0x801de,'resourceId':_0x47a250?.[_0x2c890d(0x121)]},!0x1);}catch(_0xc96345){this[_0x2c890d(0xba)][_0x2c890d(0xe1)](_0x801de),(_0xc96345[_0x2c890d(0xc2)][_0x2c890d(0x11d)](_0x2c890d(0x108))||this[_0x2c890d(0xe4)](_0x2c890d(0x12f),{'error':new _0x1475c7(_0x2c890d(0x116),this,{'url':_0x46c605,'originalError':_0xc96345}),'url':_0x46c605}),this[_0x2c890d(0xf4)](_0x801de));}finally{this[_0x2c890d(0x102)](_0x14d388);}}async[_0x224eff(0x118)](_0x3de227,_0x15f422,_0x389303){const _0x574c73=_0x224eff,_0x5ca9ca=this[_0x574c73(0x103)][_0x574c73(0x10d)][_0x574c73(0x10c)](_0x34e613=>_0x34e613['id']===_0x3de227);if(!_0x5ca9ca)return this[_0x574c73(0xe4)](_0x574c73(0x12f),{'error':new _0x1475c7(_0x574c73(0x11e),this,{'sourceId':_0x3de227}),'sourceId':_0x3de227}),[];try{const _0x5594c0=(await _0x5ca9ca[_0x574c73(0xaf)](_0x15f422))[_0x574c73(0xe9)](_0x79900f=>{const _0x553049=_0x574c73,_0x256c67=this[_0x553049(0xd6)](_0x79900f['id']);return{..._0x79900f,'isInContext':_0x256c67};});return _0x5ca9ca[_0x574c73(0xbc)]=_0x5594c0,this[_0x574c73(0xe4)](_0x574c73(0xf1),{'sourceId':_0x3de227,'source':_0x5ca9ca,'resources':_0x5594c0,'uid':_0x389303}),_0x5594c0;}catch(_0xaebd23){return this[_0x574c73(0xe4)](_0x574c73(0x12f),{'error':new _0x1475c7(_0x574c73(0xc9),this,{'sourceId':_0x3de227,'originalError':_0xaebd23}),'sourceId':_0x3de227,'sourceLabel':_0x5ca9ca[_0x574c73(0x120)]}),[];}}async[_0x224eff(0xdb)](_0x33d7a4,_0x3ce9db){const _0x27d5cf=_0x224eff;if(this[_0x27d5cf(0xd6)](_0x3ce9db['id']))return;let _0x4aaf8c=_0x3ce9db[_0x27d5cf(0xf7)];if(!_0x4aaf8c&&_0x33d7a4[_0x27d5cf(0xb4)])try{_0x4aaf8c=await _0x33d7a4[_0x27d5cf(0xb4)](_0x3ce9db['id']);}catch(_0x281b9c){return void this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0x132),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id'],'originalError':_0x281b9c}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});}if(_0x4aaf8c)switch(_0x3ce9db[_0x27d5cf(0xf8)]){case _0x21f3ea[_0x27d5cf(0xc3)]:if(_0x27d5cf(0xe6)!=typeof _0x4aaf8c)return void this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0x10e),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id'],'expectedType':_0x27d5cf(0xe6),'actualType':typeof _0x4aaf8c}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});await this[_0x27d5cf(0xd8)](_0x4aaf8c,{'label':_0x3ce9db[_0x27d5cf(0x120)],'resourceId':_0x3ce9db['id']});break;case _0x21f3ea[_0x27d5cf(0xb5)]:if(!(_0x4aaf8c instanceof File))return void this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0x10e),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id'],'expectedType':_0x27d5cf(0x10b),'actualType':typeof _0x4aaf8c}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});await this[_0x27d5cf(0xee)]([_0x4aaf8c],{'label':_0x3ce9db[_0x27d5cf(0x120)],'resourceId':_0x3ce9db['id']});break;case _0x21f3ea[_0x27d5cf(0xff)]:if(_0x27d5cf(0x11f)!=typeof _0x4aaf8c||!(_0x27d5cf(0x128)in _0x4aaf8c)||!(_0x27d5cf(0xf8)in _0x4aaf8c))return void this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0x10e),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id'],'expectedType':_0x27d5cf(0xe5),'actualType':typeof _0x4aaf8c}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});_0x4aaf8c=AIChatContext[_0x27d5cf(0xfe)](_0x4aaf8c,_0x3ce9db[_0x27d5cf(0x120)]),await this[_0x27d5cf(0xee)]([_0x4aaf8c],{'label':_0x3ce9db[_0x27d5cf(0x120)],'resourceId':_0x3ce9db['id']},_0x21f3ea[_0x27d5cf(0xff)]);break;default:this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0xe0),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id'],'resourceType':_0x3ce9db[_0x27d5cf(0xf8)]}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});}else this[_0x27d5cf(0xe4)](_0x27d5cf(0x12f),{'error':new _0x1475c7(_0x27d5cf(0xb8),this,{'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']}),'resourceId':_0x3ce9db['id'],'sourceId':_0x33d7a4['id']});}static[_0x224eff(0xfe)](_0x9e1128,_0x1092dd){const _0x316718=_0x224eff;switch(_0x9e1128[_0x316718(0xf8)]){case _0x11aa8c[_0x316718(0xf2)]:return new File([_0x9e1128[_0x316718(0x128)]],_0x1092dd,{'type':_0x316718(0xad)});case _0x11aa8c[_0x316718(0xdd)]:return new File([_0x9e1128[_0x316718(0x128)]],_0x1092dd,{'type':_0x316718(0x113)});default:return new File([_0x9e1128[_0x316718(0x128)]],_0x1092dd,{'type':_0x316718(0x130)});}}static[_0x224eff(0x104)](_0x3d1c99){const _0x28fc7b=_0x224eff;switch(_0x3d1c99[_0x28fc7b(0xf8)]){case _0x21f3ea[_0x28fc7b(0xb5)]:return{'type':_0x21f3ea[_0x28fc7b(0xb5)],'id':_0x3d1c99['id']};case _0x21f3ea[_0x28fc7b(0xc3)]:return{'type':_0x21f3ea[_0x28fc7b(0xc3)],'id':_0x3d1c99['id']};case _0x21f3ea[_0x28fc7b(0x133)]:return{'type':_0x21f3ea[_0x28fc7b(0x133)],'id':_0x3d1c99['id'],..._0x3d1c99[_0x28fc7b(0x12d)]?.[_0x28fc7b(0xc8)]&&{'selection':_0x3d1c99[_0x28fc7b(0x12d)]}};case _0x21f3ea[_0x28fc7b(0xff)]:return{'type':_0x21f3ea[_0x28fc7b(0xb5)],'id':_0x3d1c99['id']};default:return null;}}[_0x224eff(0xd0)](_0x9e3e17,_0x4d81a4=!0x1){const _0x4210d7=_0x224eff;if(this[_0x4210d7(0xd2)][_0x4210d7(0x114)](_0x9e3e17[_0x4210d7(0x135)],_0x9e3e17),_0x9e3e17[_0x4210d7(0xd1)]||this[_0x4210d7(0xe4)](_0x4210d7(0x127),{'contextItem':_0x9e3e17,'isLoading':_0x4d81a4}),_0x4210d7(0x101)===_0x9e3e17[_0x4210d7(0x135)]&&this[_0x4210d7(0xf5)](),_0x9e3e17[_0x4210d7(0x121)]){const _0x316314=this[_0x4210d7(0xc0)](_0x9e3e17[_0x4210d7(0x121)]);_0x316314&&_0x316314[_0x4210d7(0xfa)](_0x422c70=>{const _0x53102f=_0x4210d7;this[_0x53102f(0x12a)](_0x422c70,_0x9e3e17[_0x53102f(0x121)],!0x0);});}}[_0x224eff(0xf4)](_0x4ff32c){const _0x26f75e=_0x224eff,_0x4a37f2=this[_0x26f75e(0xd2)][_0x26f75e(0x12b)](_0x4ff32c),_0x5c1cfb=this[_0x26f75e(0xba)][_0x26f75e(0x12b)](_0x4ff32c);if(_0x5c1cfb&&(_0x5c1cfb[_0x26f75e(0xde)](),this[_0x26f75e(0xba)][_0x26f75e(0xe1)](_0x4ff32c)),_0x4a37f2?.[_0x26f75e(0x121)]){const _0x5540e3=this[_0x26f75e(0xc0)](_0x4a37f2[_0x26f75e(0x121)]);_0x5540e3&&_0x5540e3[_0x26f75e(0xfa)](_0xd09515=>{const _0x4c3411=_0x26f75e;this[_0x4c3411(0x12a)](_0xd09515,_0x4a37f2[_0x4c3411(0x121)],!0x1);});}this[_0x26f75e(0xd2)][_0x26f75e(0xe1)](_0x4ff32c),this[_0x26f75e(0xe4)](_0x26f75e(0xac),{'uiId':_0x4ff32c,'type':_0x4a37f2?.[_0x26f75e(0xf8)]}),_0x26f75e(0x101)===_0x4ff32c&&this[_0x26f75e(0xf5)]();}[_0x224eff(0xb9)](_0x3bf9a5,_0x2cdb98){const _0x3aa8de=_0x224eff;if(this[_0x3aa8de(0xd2)][_0x3aa8de(0xd3)](_0x3bf9a5[_0x3aa8de(0x135)])&&(this[_0x3aa8de(0xd2)][_0x3aa8de(0x114)](_0x3bf9a5[_0x3aa8de(0x135)],_0x3bf9a5),this[_0x3aa8de(0xe4)](_0x3aa8de(0xd5),{'contextItem':_0x3bf9a5,'isLoading':_0x2cdb98}),_0x3bf9a5[_0x3aa8de(0x121)])){const _0x3a058b=this[_0x3aa8de(0xc0)](_0x3bf9a5[_0x3aa8de(0x121)]);_0x3a058b&&_0x3a058b[_0x3aa8de(0xfa)](_0x20a160=>{const _0x58ebfd=_0x3aa8de;this[_0x58ebfd(0x12a)](_0x20a160,_0x3bf9a5[_0x58ebfd(0x121)],!0x0);});}}[_0x224eff(0xb1)](_0x1fc15f){const _0x3593f2=_0x224eff;this[_0x3593f2(0xcb)][_0x3593f2(0x114)](_0x1fc15f[_0x3593f2(0x135)],_0x1fc15f);}[_0x224eff(0xf3)](){const _0x5d90fa=_0x224eff;this[_0x5d90fa(0x103)]={'document':{'enabled':!0x1!==this[_0x5d90fa(0x112)]?.[_0x5d90fa(0xfd)]?.[_0x5d90fa(0xc5)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x5d90fa(0x112)]?.[_0x5d90fa(0xae)]?.[_0x5d90fa(0xc5)]},'files':{'enabled':!0x1!==this[_0x5d90fa(0x112)]?.[_0x5d90fa(0xf9)]?.[_0x5d90fa(0xc5)]},'sources':this[_0x5d90fa(0xbb)]()},this[_0x5d90fa(0xe4)](_0x5d90fa(0xeb),{'options':this[_0x5d90fa(0x103)]});}[_0x224eff(0xbb)](){const _0x44f9a3=_0x224eff;return this[_0x44f9a3(0x112)]?.[_0x44f9a3(0x10d)]?.[_0x44f9a3(0xe9)](_0x56e4aa=>({..._0x56e4aa,'resources':[]}))??[];}[_0x224eff(0xf5)](){const _0xa2ecbd=_0x224eff,_0x5260c2=this[_0xa2ecbd(0xd9)]()||this[_0xa2ecbd(0xef)]();this[_0xa2ecbd(0x103)][_0xa2ecbd(0xfd)][_0xa2ecbd(0x107)]=_0x5260c2,this[_0xa2ecbd(0xe4)](_0xa2ecbd(0xeb),{'options':this[_0xa2ecbd(0x103)]});}[_0x224eff(0xd6)](_0xaa6e10){const _0x395c0a=_0x224eff;for(const _0x44177b of this[_0x395c0a(0xd2)][_0x395c0a(0xd7)]())if(_0x44177b[_0x395c0a(0x121)]===_0xaa6e10)return!0x0;for(const _0x5e45cb of this[_0x395c0a(0xcb)][_0x395c0a(0xd7)]())if(_0x5e45cb[_0x395c0a(0x121)]===_0xaa6e10)return!0x0;return!0x1;}[_0x224eff(0xc0)](_0xa9c22a){const _0x3d9666=_0x224eff,_0x1d61d4=[];for(const _0x205fdd of this[_0x3d9666(0x103)][_0x3d9666(0x10d)]){_0x205fdd[_0x3d9666(0xbc)][_0x3d9666(0x10c)](_0x262efd=>_0x262efd['id']===_0xa9c22a)&&_0x1d61d4[_0x3d9666(0xbd)](_0x205fdd['id']);}return 0x0===_0x1d61d4[_0x3d9666(0xc8)]?null:_0x1d61d4;}[_0x224eff(0x12a)](_0x9aed59,_0x4e756a,_0xe2ef46){const _0x424a0d=_0x224eff,_0x1281a8=this[_0x424a0d(0x103)][_0x424a0d(0x10d)][_0x424a0d(0x10c)](_0x4aa9df=>_0x4aa9df['id']===_0x9aed59);if(!_0x1281a8)return;const _0x4368a0=_0x1281a8[_0x424a0d(0xbc)][_0x424a0d(0x10c)](_0x3592b0=>_0x3592b0['id']===_0x4e756a);_0x4368a0&&(_0x4368a0[_0x424a0d(0xe2)]=_0xe2ef46,this[_0x424a0d(0xe4)](_0x424a0d(0xf0),{'sourceId':_0x9aed59,'resourceId':_0x4e756a,'isInContext':_0xe2ef46}));}[_0x224eff(0xea)](_0x2e3a33){const _0x5f17bd=_0x224eff;this[_0x5f17bd(0xaa)][_0x5f17bd(0x114)](_0x2e3a33,!0x0),this[_0x5f17bd(0xaa)][_0x5f17bd(0x129)]&&this[_0x5f17bd(0xe4)](_0x5f17bd(0x111),{'isUploadInProgress':!0x0});}[_0x224eff(0x102)](_0x196027){const _0x3b781e=_0x224eff;this[_0x3b781e(0xaa)][_0x3b781e(0xe1)](_0x196027),0x0===this[_0x3b781e(0xaa)][_0x3b781e(0x129)]&&this[_0x3b781e(0xe4)](_0x3b781e(0x111),{'isUploadInProgress':!0x1});}}
|