@ckeditor/ckeditor5-ai 46.1.1 → 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,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 _0x2366b3=_0x1a9c;function _0x261c(){const _0x23569c=['9370471HeLQHo','3FozpoW','21uqPkCM','ck-ai-chat-history__sections','11734LPGhQR','3779106KvoZvy','9JrOqLe','39FmbZKo','addMany','5BBcjIs','items','filter','extendTemplate','1602252ryTKLS','82ZhFCpz','7284770TGaiQT','8615196BOTDMm','sections','1554584QdVOXF'];_0x261c=function(){return _0x23569c;};return _0x261c();}(function(_0x5e7c1f,_0x170267){const _0x544c25=_0x1a9c,_0x39e024=_0x5e7c1f();while(!![]){try{const _0x3b10e8=-parseInt(_0x544c25(0x10b))/0x1*(-parseInt(_0x544c25(0x102))/0x2)+parseInt(_0x544c25(0x108))/0x3*(-parseInt(_0x544c25(0x101))/0x4)+parseInt(_0x544c25(0x110))/0x5*(parseInt(_0x544c25(0x10c))/0x6)+parseInt(_0x544c25(0x109))/0x7*(parseInt(_0x544c25(0x106))/0x8)+parseInt(_0x544c25(0x10d))/0x9*(parseInt(_0x544c25(0x103))/0xa)+parseInt(_0x544c25(0x107))/0xb+parseInt(_0x544c25(0x104))/0xc*(-parseInt(_0x544c25(0x10e))/0xd);if(_0x3b10e8===_0x170267)break;else _0x39e024['push'](_0x39e024['shift']());}catch(_0x1309ba){_0x39e024['push'](_0x39e024['shift']());}}}(_0x261c,0xafc12));import{ListView as _0x46e702}from'ckeditor5/src/ui.js';function _0x1a9c(_0x3d2273,_0x21438e){const _0x261c88=_0x261c();return _0x1a9c=function(_0x1a9cbc,_0x36c70b){_0x1a9cbc=_0x1a9cbc-0x100;let _0x272947=_0x261c88[_0x1a9cbc];return _0x272947;},_0x1a9c(_0x3d2273,_0x21438e);}export class AIChatHistorySectionListView extends _0x46e702{[_0x2366b3(0x105)];constructor(_0x193713,_0x555c99){const _0x2961bc=_0x2366b3;super(_0x193713),this[_0x2961bc(0x105)]=_0x555c99,this[_0x2961bc(0x111)][_0x2961bc(0x10f)](this[_0x2961bc(0x105)]),this[_0x2961bc(0x100)]({'attributes':{'class':[_0x2961bc(0x10a)]}});}[_0x2366b3(0x112)](_0x330591){const _0x368837=_0x2366b3;let _0x145b9c=0x0,_0x1218c6=0x0;for(const _0x421d5f of this[_0x368837(0x105)]){const {resultsCount:_0x3e9c7b,totalItemsCount:_0x4b3b81}=_0x421d5f[_0x368837(0x112)](_0x330591);_0x145b9c+=_0x3e9c7b,_0x1218c6+=_0x4b3b81;}return{'resultsCount':_0x145b9c,'totalItemsCount':_0x1218c6};}}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 Locale } from 'ckeditor5/src/utils.js';
|
|
6
|
+
import { View, ButtonView } from 'ckeditor5/src/ui.js';
|
|
7
|
+
import { type AIChatHistoryCategoryData } from '../aichathistoryui.js';
|
|
8
|
+
export declare class AIChatHistoryView extends View {
|
|
9
|
+
/**
|
|
10
|
+
* The button to resize the chat view.
|
|
11
|
+
*/
|
|
12
|
+
readonly resizeButton?: ButtonView;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether the tabs view is maximized.
|
|
15
|
+
*
|
|
16
|
+
* @observable
|
|
17
|
+
*/
|
|
18
|
+
isMaximized: boolean;
|
|
19
|
+
hasItems: boolean;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
errorMessage: string;
|
|
22
|
+
isSearchViewVisible: boolean;
|
|
23
|
+
isEmptyViewVisible: boolean;
|
|
24
|
+
constructor(locale: Locale, showResizeButton: boolean);
|
|
25
|
+
/**
|
|
26
|
+
* Updates the chat history list with pre-categorized items from the model.
|
|
27
|
+
*/
|
|
28
|
+
updateHistoryItemsWithCategories(categories: Array<AIChatHistoryCategoryData>): void;
|
|
29
|
+
/**
|
|
30
|
+
* Removes a conversation item from the history list by its ID.
|
|
31
|
+
*/
|
|
32
|
+
removeHistoryItem(id: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Updates the title of a specific history item in the UI.
|
|
35
|
+
*/
|
|
36
|
+
updateItemTitle(itemId: string, title: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Updates the loading state of a specific history item in the UI.
|
|
39
|
+
*/
|
|
40
|
+
updateItemLoadingState(itemId: string, operation: string | null, isLoading: boolean): void;
|
|
41
|
+
}
|
|
@@ -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 _0x3f6ba0=_0x5501;(function(_0x223e06,_0x6b6de3){const _0x231ea2=_0x5501,_0x76e75=_0x223e06();while(!![]){try{const _0x539ce1=parseInt(_0x231ea2(0x11a))/0x1*(-parseInt(_0x231ea2(0x10e))/0x2)+parseInt(_0x231ea2(0xfe))/0x3*(parseInt(_0x231ea2(0xce))/0x4)+parseInt(_0x231ea2(0xd9))/0x5*(parseInt(_0x231ea2(0x119))/0x6)+parseInt(_0x231ea2(0xe7))/0x7+-parseInt(_0x231ea2(0x107))/0x8*(-parseInt(_0x231ea2(0x10a))/0x9)+-parseInt(_0x231ea2(0xea))/0xa*(parseInt(_0x231ea2(0xf0))/0xb)+parseInt(_0x231ea2(0xca))/0xc*(parseInt(_0x231ea2(0xd4))/0xd);if(_0x539ce1===_0x6b6de3)break;else _0x76e75['push'](_0x76e75['shift']());}catch(_0x45b511){_0x76e75['push'](_0x76e75['shift']());}}}(_0x31b0,0x93190));import{View as _0x2aede4,SearchTextView as _0x2a36cc,FormHeaderView as _0x25e0aa,ButtonView as _0x36e17a}from'ckeditor5/src/ui.js';import{IconAIHistory as _0x577862,IconCancel as _0x1967f7}from'ckeditor5/src/icons.js';import{AIChatHistorySectionListView as _0x48d2d3}from'./aichathistorysectionlistview.js';import{AIChatHistoryListView as _0x343257}from'./aichathistorylistview.js';import{AIChatHistoryListItemView as _0x1eae61}from'./aichathistorylistitemview.js';function _0x5501(_0x2608e1,_0x31907b){const _0x31b0f4=_0x31b0();return _0x5501=function(_0x550113,_0x51f2d7){_0x550113=_0x550113-0xbe;let _0x22da79=_0x31b0f4[_0x550113];return _0x22da79;},_0x5501(_0x2608e1,_0x31907b);}import{AI_CHAT_HISTORY_UI_EVENT_NAMES as _0x437449}from'../aichathistoryui.js';import{AISkeletonView as _0x54725a,SKELETON_DEFINITIONS as _0x5c664d}from'../../aicore/ui/aiskeleton.js';import{createResizeButton as _0x4f70ca}from'../../aicore/utils/createresizebutton.js';import{getTranslation as _0x1f1bb6}from'../../aicore/utils/common-translations.js';function _0x31b0(){const _0x4d8010=['_createSkeletonView','isSearchViewVisible','ck-reset_all','emptyView','9BiBTJb','div','updateTitle','AI_CHAT_HISTORY_SEARCH_NOT_FOUND_PRIMARY','render','searchView','ck-ai-chat-history__empty-message','locale','isMaximized','3109616zYheBe','indexOf','AI_CHAT_HISTORY_SEARCH_LABEL','9vPYlMK','setTemplate','ck-ai-header\x20ck-ai-header_history','ck-ai-chat-history','1242132hkRxBA','push','clear','AI_CHAT_HISTORY_EMPTY_MESSAGE','value','ck-ai-chat-history__open-chat-button','_createListItemViews','change:errorMessage','change:isLoading','sectionsView','some','912708pZxSLW','1EClijh','bindTemplate','delegate','search','getItem','_createEmptyStateView','bind','isEmptyViewVisible','updateItemLoadingState','ck-rounded-corners','ck-ai-chat-error__dismiss-button','ck-ai-chat-history__content','extendTemplate','AI_CHAT_HISTORY_SEARCH_NOT_FOUND_SECONDARY','79656OwTiDp','ck-ai-chat-error','length','_createErrorView','575572zhWqPa','ck-hidden','_createSearchView','splice','errorView','removeHistoryItem','65YetwwI','remove','change:hasItems','addMany','set','20EGnbYA','ck-ai-chat-history__empty','ltr','AI_CHAT_HISTORY_HEADING','_refreshSearch','openChat','updateItemTitle','execute','queryView','_updateViewVisibility','hasItems','add','sections','AI_CHAT_HISTORY_GO_TO_CHAT_BUTTON','3595249DyuzNY','children','fieldView','940090Dsxkzw','removeItem','resizeButton','errorMessage','itemsViews','skeletonView','88MtjBpl','updateLoadingState','updateHistoryItemsWithCategories','title','element','aiHistory','fire','isLoading','isVisible','items'];_0x31b0=function(){return _0x4d8010;};return _0x31b0();}export class AIChatHistoryView extends _0x2aede4{[_0x3f6ba0(0x103)];[_0x3f6ba0(0xd2)];[_0x3f6ba0(0xef)];[_0x3f6ba0(0xfd)];[_0x3f6ba0(0x117)];[_0x3f6ba0(0xec)];constructor(_0x18f426,_0x1d016f){const _0x197f04=_0x3f6ba0;super(_0x18f426),this[_0x197f04(0xd8)](_0x197f04(0xe3),!0x1),this[_0x197f04(0xd8)](_0x197f04(0xf7),!0x0),this[_0x197f04(0xd8)](_0x197f04(0xed),''),this[_0x197f04(0xd8)](_0x197f04(0x106),!0x1),this[_0x197f04(0xd8)](_0x197f04(0xfb),!0x1),this[_0x197f04(0xd8)](_0x197f04(0xc3),!0x1);const _0x4356b0=new _0x25e0aa(_0x18f426,{'label':_0x1f1bb6(_0x18f426,_0x197f04(0xdc)),'icon':_0x577862,'class':_0x197f04(0x10c)});_0x1d016f&&(this[_0x197f04(0xec)]=_0x4f70ca(_0x18f426,this),_0x4356b0[_0x197f04(0xe8)][_0x197f04(0xe4)](this[_0x197f04(0xec)])),this[_0x197f04(0x117)]=new _0x48d2d3(_0x18f426,[]),this[_0x197f04(0x117)][_0x197f04(0xbe)](..._0x437449)['to'](this),this[_0x197f04(0xd2)]=this[_0x197f04(0xcd)](),this[_0x197f04(0xef)]=this[_0x197f04(0xfa)](),this[_0x197f04(0xfd)]=this[_0x197f04(0xc1)](),this[_0x197f04(0x103)]=this[_0x197f04(0xd0)](),this['on'](_0x197f04(0x116),()=>this[_0x197f04(0xe2)]()),this['on'](_0x197f04(0xd6),()=>this[_0x197f04(0xe2)]()),this['on'](_0x197f04(0x115),()=>this[_0x197f04(0xe2)]()),this[_0x197f04(0x10b)]({'tag':_0x197f04(0xff),'attributes':{'class':['ck',_0x197f04(0xfc),_0x197f04(0x10d),_0x197f04(0xc5)],'dir':_0x197f04(0xdb)},'children':[_0x4356b0,{'tag':_0x197f04(0xff),'attributes':{'class':[_0x197f04(0xc7)]},'children':[this[_0x197f04(0xef)],this[_0x197f04(0xd2)],this[_0x197f04(0xfd)],this[_0x197f04(0x103)]]}]});}[_0x3f6ba0(0xe2)](){const _0x52d78d=_0x3f6ba0;this[_0x52d78d(0xfb)]=!this[_0x52d78d(0xf7)]&&this[_0x52d78d(0xe3)]&&!this[_0x52d78d(0xed)],this[_0x52d78d(0xc3)]=!this[_0x52d78d(0xf7)]&&!this[_0x52d78d(0xe3)]&&!this[_0x52d78d(0xed)];}[_0x3f6ba0(0xd0)](){const _0x37c3f3=_0x3f6ba0,_0x296fef=new _0x2a36cc(this[_0x37c3f3(0x105)],{'filteredView':this[_0x37c3f3(0x117)],'queryView':{'label':_0x1f1bb6(this[_0x37c3f3(0x105)],_0x37c3f3(0x109))},'infoView':{'text':{'notFound':{'primary':_0x3259db=>_0x1f1bb6(this[_0x37c3f3(0x105)],_0x37c3f3(0x101),_0x3259db),'secondary':_0x1f1bb6(this[_0x37c3f3(0x105)],_0x37c3f3(0xc9))}}}});return _0x296fef['on'](_0x37c3f3(0x102),()=>{const _0x9b8f66=_0x37c3f3;this[_0x9b8f66(0x103)][_0x9b8f66(0xe8)][_0x9b8f66(0xe4)](this[_0x9b8f66(0xd2)],0x1);}),_0x296fef[_0x37c3f3(0xc8)]({'attributes':{'class':[this[_0x37c3f3(0x11b)]['if'](_0x37c3f3(0xfb),_0x37c3f3(0xcf),_0x263730=>!_0x263730)]}}),_0x296fef;}[_0x3f6ba0(0xfa)](){const _0x18db8d=_0x3f6ba0,_0x8afda3=new _0x54725a(this[_0x18db8d(0x105)],_0x5c664d[_0x18db8d(0xf5)]);return _0x8afda3[_0x18db8d(0xc8)]({'attributes':{'class':[this[_0x18db8d(0x11b)]['if'](_0x18db8d(0xf7),_0x18db8d(0xcf),_0x503679=>!_0x503679)]}}),_0x8afda3;}[_0x3f6ba0(0xcd)](){const _0x1e137c=_0x3f6ba0,_0x1c7278=new _0x2aede4(this[_0x1e137c(0x105)]),_0x219b36=new _0x36e17a(this[_0x1e137c(0x105)]);return _0x219b36[_0x1e137c(0xd8)]({'withText':!0x1,'icon':_0x1967f7,'class':_0x1e137c(0xc6)}),_0x219b36[_0x1e137c(0xc2)](_0x1e137c(0xf8))['to'](this,_0x1e137c(0xe3),_0x207275=>!!_0x207275),_0x219b36['on'](_0x1e137c(0xe0),()=>{const _0x1b758a=_0x1e137c;this[_0x1b758a(0xed)]='';}),_0x1c7278[_0x1e137c(0x10b)]({'tag':_0x1e137c(0xff),'attributes':{'class':['ck',_0x1e137c(0xcb),this[_0x1e137c(0x11b)]['if'](_0x1e137c(0xed),_0x1e137c(0xcf),_0x51f692=>!_0x51f692)]},'children':[{'tag':'p','children':[{'text':this[_0x1e137c(0x11b)]['to'](_0x1e137c(0xed))}]},_0x219b36]}),_0x1c7278;}[_0x3f6ba0(0xc1)](){const _0x18eb50=_0x3f6ba0,_0x55ed4b=new _0x36e17a(this[_0x18eb50(0x105)]);_0x55ed4b[_0x18eb50(0xd8)]({'withText':!0x0,'label':_0x1f1bb6(this[_0x18eb50(0x105)],_0x18eb50(0xe6)),'class':_0x18eb50(0x113)}),_0x55ed4b['on'](_0x18eb50(0xe0),()=>{const _0x1c1128=_0x18eb50;this[_0x1c1128(0xf6)](_0x1c1128(0xde));});const _0x3bd2b0=new _0x2aede4(this[_0x18eb50(0x105)]);return _0x3bd2b0[_0x18eb50(0x10b)]({'tag':_0x18eb50(0xff),'attributes':{'class':[_0x18eb50(0xda),this[_0x18eb50(0x11b)]['if'](_0x18eb50(0xc3),_0x18eb50(0xcf),_0x4dc476=>!_0x4dc476)]},'children':[{'tag':'p','attributes':{'class':[_0x18eb50(0x104)]},'children':[_0x1f1bb6(this[_0x18eb50(0x105)],_0x18eb50(0x111))]},_0x55ed4b]}),_0x3bd2b0;}[_0x3f6ba0(0x114)](_0x3bcac1,_0x7c7798){const _0x4c96ca=_0x3f6ba0,_0x5da1b5=[];for(const _0x155ecd of _0x3bcac1){const _0x426d9b=new _0x1eae61(_0x7c7798,_0x155ecd);_0x426d9b[_0x4c96ca(0xbe)](..._0x437449)['to'](this),_0x5da1b5[_0x4c96ca(0x10f)](_0x426d9b);}return _0x5da1b5;}[_0x3f6ba0(0xf2)](_0x454ccc){const _0x221927=_0x3f6ba0,_0x35f32b=this[_0x221927(0x105)]||'en',_0x2323fb=[];for(const _0x47d9b7 of _0x454ccc){const _0x2f180c=this[_0x221927(0x114)](_0x47d9b7[_0x221927(0xf9)],_0x35f32b);_0x2323fb[_0x221927(0x10f)](new _0x343257(_0x35f32b,{'title':_0x47d9b7[_0x221927(0xf3)],'items':_0x2f180c}));}this[_0x221927(0x117)][_0x221927(0xe5)]=_0x2323fb,this[_0x221927(0x117)][_0x221927(0xf9)][_0x221927(0x110)](),this[_0x221927(0x117)][_0x221927(0xf9)][_0x221927(0xd7)](_0x2323fb),this[_0x221927(0xe3)]=_0x454ccc[_0x221927(0x118)](_0x5e6b88=>_0x5e6b88[_0x221927(0xf9)][_0x221927(0xcc)]>0x0),this[_0x221927(0xdd)]();}[_0x3f6ba0(0xd3)](_0x12efef){const _0x14ab90=_0x3f6ba0;for(const _0x6c4ef3 of this[_0x14ab90(0x117)][_0x14ab90(0xe5)]){const _0x54eb9b=_0x6c4ef3[_0x14ab90(0xc0)](_0x12efef);if(_0x54eb9b){if(_0x6c4ef3[_0x14ab90(0xeb)](_0x54eb9b),0x0===_0x6c4ef3[_0x14ab90(0xee)][_0x14ab90(0xcc)]){const _0x54c263=this[_0x14ab90(0x117)][_0x14ab90(0xe5)][_0x14ab90(0x108)](_0x6c4ef3);-0x1!==_0x54c263&&(this[_0x14ab90(0x117)][_0x14ab90(0xe5)][_0x14ab90(0xd1)](_0x54c263,0x1),this[_0x14ab90(0x117)][_0x14ab90(0xf9)][_0x14ab90(0xd5)](_0x6c4ef3));}this[_0x14ab90(0xe3)]=this[_0x14ab90(0x117)][_0x14ab90(0xe5)][_0x14ab90(0xcc)]>0x0,this[_0x14ab90(0xdd)]();break;}}}[_0x3f6ba0(0xdf)](_0x25330d,_0x21bd4e){const _0x2f3618=_0x3f6ba0;for(const _0x334ce4 of this[_0x2f3618(0x117)][_0x2f3618(0xe5)]){const _0x2543d7=_0x334ce4[_0x2f3618(0xc0)](_0x25330d);if(_0x2543d7){_0x2543d7[_0x2f3618(0x100)](_0x21bd4e);break;}}}[_0x3f6ba0(0xc4)](_0x333f7d,_0x5492f6,_0x9eb05c){const _0x3256db=_0x3f6ba0;for(const _0x31446d of this[_0x3256db(0x117)][_0x3256db(0xe5)]){const _0x5a6f70=_0x31446d[_0x3256db(0xc0)](_0x333f7d);if(_0x5a6f70){_0x5a6f70[_0x3256db(0xf1)](_0x5492f6,_0x9eb05c);break;}}}[_0x3f6ba0(0xdd)](){const _0x304716=_0x3f6ba0;if(this[_0x304716(0xe3)]){const _0x4e2a0b=this[_0x304716(0x103)][_0x304716(0xe1)][_0x304716(0xe9)]?.[_0x304716(0xf4)]?.[_0x304716(0x112)]||'';this[_0x304716(0x103)][_0x304716(0xbf)](_0x4e2a0b);}}}
|
package/src/aiconfig.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @module ai/aiconfig
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import type { AIAssistantConfig } from './aiassistant.js';
|
|
10
|
-
import type
|
|
11
|
-
import type
|
|
9
|
+
import type { AIAssistantConfig } from './aiassistant/aiassistant.js';
|
|
10
|
+
import { type AIChatConfig } from './aichat/aichat.js';
|
|
11
|
+
import { type AIQuickActionsConfig } from './aiquickactions/aiquickactions.js';
|
|
12
12
|
/**
|
|
13
13
|
* The configuration for all AI-related functionalities.
|
|
14
14
|
*
|
|
@@ -18,12 +18,7 @@ import type { AIAWSTextAdapterConfig } from './adapters/awstextadapter.js';
|
|
|
18
18
|
* ClassicEditor
|
|
19
19
|
* .create( editorElement, {
|
|
20
20
|
* ai: {
|
|
21
|
-
*
|
|
22
|
-
* requestHeaders: {
|
|
23
|
-
* Authorization: 'Bearer API_KEY'
|
|
24
|
-
* }
|
|
25
|
-
* },
|
|
26
|
-
* useTheme: false
|
|
21
|
+
* ...
|
|
27
22
|
* }
|
|
28
23
|
* } )
|
|
29
24
|
* .then( ... )
|
|
@@ -34,36 +29,92 @@ import type { AIAWSTextAdapterConfig } from './adapters/awstextadapter.js';
|
|
|
34
29
|
*/
|
|
35
30
|
export interface AIConfig {
|
|
36
31
|
/**
|
|
37
|
-
* The configuration of the {@link module:ai/aiassistant~AIAssistant AI Assistant feature}.
|
|
32
|
+
* The configuration of the {@link module:ai/aiassistant/aiassistant~AIAssistant AI Assistant feature}.
|
|
38
33
|
*
|
|
39
|
-
* Read more in {@link module:ai/aiassistant~AIAssistantConfig}.
|
|
34
|
+
* Read more in {@link module:ai/aiassistant/aiassistant~AIAssistantConfig}.
|
|
40
35
|
*/
|
|
41
|
-
|
|
36
|
+
assistant?: AIAssistantConfig;
|
|
42
37
|
/**
|
|
43
|
-
* The configuration
|
|
44
|
-
*
|
|
45
|
-
* This is required only if you connect to OpenAI or Azure OpenAI service.
|
|
46
|
-
*
|
|
47
|
-
* Read more in {@link module:ai/adapters/openaitextadapter~OpenAITextAdapterConfig}.
|
|
38
|
+
* The configuration of the AI user interface provided by the {@link module:ai/aitabs/aitabs~AITabs} plugin.
|
|
48
39
|
*/
|
|
49
|
-
|
|
40
|
+
container?: AIContainerConfig;
|
|
50
41
|
/**
|
|
51
|
-
* The configuration
|
|
42
|
+
* The configuration of the {@link module:ai/aichat/aichat~AIChat AI Chat feature}.
|
|
52
43
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Read more in {@link module:ai/adapters/awstextadapter~AIAWSTextAdapterConfig}.
|
|
44
|
+
* Read more in {@link module:ai/aichat/aichat~AIChatConfig}.
|
|
56
45
|
*/
|
|
57
|
-
|
|
46
|
+
chat?: AIChatConfig;
|
|
58
47
|
/**
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
48
|
+
* The configuration of the AI quick actions.
|
|
49
|
+
*/
|
|
50
|
+
quickActions?: AIQuickActionsConfig;
|
|
51
|
+
}
|
|
52
|
+
export type AIContainerType = 'sidebar' | 'overlay' | 'custom';
|
|
53
|
+
export type AIContainerSide = 'left' | 'right';
|
|
54
|
+
export interface AIContainerBase {
|
|
55
|
+
type: AIContainerType;
|
|
56
|
+
/**
|
|
57
|
+
* This option is used to show or hide the resize button in the AI user interface.
|
|
65
58
|
*
|
|
66
|
-
*
|
|
59
|
+
* Defaults to `true`.
|
|
67
60
|
*/
|
|
68
|
-
|
|
61
|
+
showResizeButton?: boolean;
|
|
69
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The configuration of the AI user interface container in the sidebar mode.
|
|
65
|
+
*
|
|
66
|
+
* Provide an existing DOM element to use as the container for the AI user interface.
|
|
67
|
+
*
|
|
68
|
+
* The interface will automatically render into the element.
|
|
69
|
+
*
|
|
70
|
+
* Tab buttons can be positioned on the preferred side of the element.
|
|
71
|
+
*/
|
|
72
|
+
export interface AIContainerSidebar extends AIContainerBase {
|
|
73
|
+
type: 'sidebar';
|
|
74
|
+
element: HTMLElement;
|
|
75
|
+
side?: AIContainerSide;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The configuration of the AI user interface container in the overlay mode. The AI user
|
|
79
|
+
* interface is displayed on top of the web page on a preferred side.
|
|
80
|
+
*/
|
|
81
|
+
export interface AIContainerOverlay extends AIContainerBase {
|
|
82
|
+
type: 'overlay';
|
|
83
|
+
side?: AIContainerSide;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The configuration of the AI user interface container in the custom mode.
|
|
87
|
+
*
|
|
88
|
+
* In this mode, integrator is responsible for rendering the AI user interface in the web page.
|
|
89
|
+
*
|
|
90
|
+
* * Use {@link module:ai/aitabs/aitabs~AITabs#view} to access the view of the AI user interface,
|
|
91
|
+
* * Use {@link module:ai/aitabs/tabs/aitabsview~AITabsView#getTabIds} to read available IDs of individual tabs in the AI user interface,
|
|
92
|
+
* * Use {@link module:ai/aitabs/tabs/aitabsview~AITabsView#getTab} to access individual tab views in the AI user interface.
|
|
93
|
+
*
|
|
94
|
+
* For example, to integrate the AI user interface with custom containers on the web page, use the following code:
|
|
95
|
+
*
|
|
96
|
+
* ```js
|
|
97
|
+
* const tabsPlugin = editor.plugins.get( 'AITabs' );
|
|
98
|
+
*
|
|
99
|
+
* for ( const id of tabsPlugin.view.getTabIds() ) {
|
|
100
|
+
* const tab = tabsPlugin.view.getTab( id );
|
|
101
|
+
*
|
|
102
|
+
* // Display tab button and panel in a custom container.
|
|
103
|
+
* myButtonsContainer.appendChild( tab.button.element );
|
|
104
|
+
* myPanelContainer.appendChild( tab.panel.element );
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export interface AIContainerCustom extends AIContainerBase {
|
|
109
|
+
type: 'custom';
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The configuration of the AI user interface provided by the {@link module:ai/aitabs/aitabs~AITabs} plugin.
|
|
113
|
+
*
|
|
114
|
+
* The AI user interface can operate in three different modes:
|
|
115
|
+
*
|
|
116
|
+
* * {@link module:ai/aiconfig~AIContainerSidebar} - the AI user interface is displayed in a specific DOM element,
|
|
117
|
+
* * {@link module:ai/aiconfig~AIContainerOverlay} - the AI user interface is displayed on top of the web page,
|
|
118
|
+
* * {@link module:ai/aiconfig~AIContainerCustom} - the AI user interface is displayed in a custom way.
|
|
119
|
+
*/
|
|
120
|
+
export type AIContainerConfig = AIContainerSidebar | AIContainerOverlay | AIContainerCustom;
|
|
@@ -0,0 +1,302 @@
|
|
|
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/aicore/aiconnector
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type EventSourceMessage } from 'eventsource-parser';
|
|
10
|
+
import { type Editor, type Context, ContextPlugin } from 'ckeditor5/src/core.js';
|
|
11
|
+
import { type AIContextItemRequestData, type AIContextItemType } from './model/aicontext.js';
|
|
12
|
+
import { type AICapabilitiesRequestData } from './model/aicapabilities.js';
|
|
13
|
+
import { type AIQuickActionRequestData } from '../aiquickactions/aiquickactions.js';
|
|
14
|
+
export declare enum AIActionsNames {
|
|
15
|
+
CONTINUE = "continue",
|
|
16
|
+
FIX_GRAMMAR = "fix-grammar",
|
|
17
|
+
IMPROVE_WRITING = "improve-writing",
|
|
18
|
+
MAKE_LONGER = "make-longer",
|
|
19
|
+
MAKE_SHORTER = "make-shorter",
|
|
20
|
+
MAKE_TONE_CASUAL = "make-tone-casual",
|
|
21
|
+
MAKE_TONE_FORMAL = "make-tone-formal",
|
|
22
|
+
TRANSLATE = "translate"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A plugin that handles communication with the AI API.
|
|
26
|
+
*/
|
|
27
|
+
export declare class AIConnector extends ContextPlugin {
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get requires(): readonly ["CloudServices"];
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get pluginName(): "AIConnector";
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
static get isOfficialPlugin(): true;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
static get isPremiumPlugin(): true;
|
|
44
|
+
constructor(context: Context | Editor);
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
init(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new conversation session with the AI API.
|
|
51
|
+
*/
|
|
52
|
+
startConversation(id: string, group: string): AIConversationStartRequest;
|
|
53
|
+
/**
|
|
54
|
+
* Sends a request to the AI API '/conversations/{conversationId}/messages' endpoint and returns a response stream reader.
|
|
55
|
+
*/
|
|
56
|
+
queryAssistant({ message, conversationId, parts, capabilities, model, quickActionData }: AIConnectorQueryAssistantData): AIConnectorRequest;
|
|
57
|
+
/**
|
|
58
|
+
* Sends a request to the /actions/custom/calls endpoint and returns a response stream reader.
|
|
59
|
+
*/
|
|
60
|
+
executeCustomAction({ content, message, model, outputFormat }: AIConnectorExecuteCustomActionData): AIConnectorRequest;
|
|
61
|
+
/**
|
|
62
|
+
* Sends a request to the /actions/system/{actionName}/calls endpoint and returns a response stream reader.
|
|
63
|
+
*/
|
|
64
|
+
executeAction({ actionName, content, args }: AIConnectorExecuteActionData): AIConnectorRequest;
|
|
65
|
+
/**
|
|
66
|
+
* Uploads a file to the AI API for a specific conversation.
|
|
67
|
+
*/
|
|
68
|
+
uploadFile(conversationId: string, file: File, attributes?: {
|
|
69
|
+
resourceId: string;
|
|
70
|
+
label: string;
|
|
71
|
+
}): AIUploadRequest;
|
|
72
|
+
/**
|
|
73
|
+
* Fetches a specific document by its ID from a conversation.
|
|
74
|
+
*/
|
|
75
|
+
fetchDocument(conversationId: string, documentId: string): AIFetchDocumentRequest;
|
|
76
|
+
/**
|
|
77
|
+
* Gets a document from the AI API for a specific conversation.
|
|
78
|
+
*/
|
|
79
|
+
uploadDocument(conversationId: string, content: string, attributes?: Record<string, unknown>): AIUploadRequest;
|
|
80
|
+
/**
|
|
81
|
+
* Fetches the list of conversations from the AI API.
|
|
82
|
+
*/
|
|
83
|
+
fetchConversations(group: string, search?: string): AIFetchConversationsRequest;
|
|
84
|
+
/**
|
|
85
|
+
* Deletes a conversation by its ID.
|
|
86
|
+
*/
|
|
87
|
+
deleteConversation(id: string): AIDeleteConversationRequest;
|
|
88
|
+
/**
|
|
89
|
+
* Updates the title and pinned status of a conversation by its ID.
|
|
90
|
+
*/
|
|
91
|
+
updateConversation(id: string, updates: {
|
|
92
|
+
title?: string;
|
|
93
|
+
pinned?: boolean;
|
|
94
|
+
}): AIUpdateConversationRequest;
|
|
95
|
+
/**
|
|
96
|
+
* Fetches a specific conversation by its ID.
|
|
97
|
+
*/
|
|
98
|
+
fetchConversation(id: string): AIGetConversationRequest;
|
|
99
|
+
/**
|
|
100
|
+
* Fetches messages for a specific conversation by its ID.
|
|
101
|
+
*/
|
|
102
|
+
fetchConversationMessages(conversationId: string): AIGetConversationMessagesRequest;
|
|
103
|
+
/**
|
|
104
|
+
* Uploads a URL to the AI API for a specific conversation.
|
|
105
|
+
*/
|
|
106
|
+
uploadUrl(conversationId: string, url: string, attributes?: {
|
|
107
|
+
resourceId: string;
|
|
108
|
+
label: string;
|
|
109
|
+
}): AIUploadRequest;
|
|
110
|
+
/**
|
|
111
|
+
* Returns a list of available AI models.
|
|
112
|
+
*/
|
|
113
|
+
getModels(): AIModelRequest;
|
|
114
|
+
/**
|
|
115
|
+
* Deletes a file from a conversation.
|
|
116
|
+
*/
|
|
117
|
+
deleteFile(conversationId: string, fileId: string): AIDeleteFileRequest;
|
|
118
|
+
/**
|
|
119
|
+
* Deletes a document from a conversation.
|
|
120
|
+
*/
|
|
121
|
+
deleteDocument(conversationId: string, documentId: string): AIDeleteDocumentRequest;
|
|
122
|
+
/**
|
|
123
|
+
* Deletes a web resource from a conversation.
|
|
124
|
+
*/
|
|
125
|
+
deleteWebResource(conversationId: string, webResourceId: string): AIDeleteWebResourceRequest;
|
|
126
|
+
/**
|
|
127
|
+
* Sends a request to the AI API '/reviews/system/{reviewName}/calls' endpoint and returns a response stream reader.
|
|
128
|
+
*/
|
|
129
|
+
callSystemReview({ reviewName, content, args }: AIConnectorSystemReviewData): AIConnectorRequest;
|
|
130
|
+
/**
|
|
131
|
+
* Sends a request to the AI API '/reviews/custom/calls' endpoint and returns a response stream reader.
|
|
132
|
+
*/
|
|
133
|
+
callCustomReview({ content, prompt, model }: AIConnectorCustomReviewData): AIConnectorRequest;
|
|
134
|
+
}
|
|
135
|
+
export type AIGenericRequest = {
|
|
136
|
+
request: Promise<Response>;
|
|
137
|
+
abortController: AbortController;
|
|
138
|
+
};
|
|
139
|
+
export type AIConversationStartReply = {
|
|
140
|
+
id: string;
|
|
141
|
+
};
|
|
142
|
+
export type AIConversationStartRequest = {
|
|
143
|
+
getConversation: () => Promise<AIConversationStartReply>;
|
|
144
|
+
abortController: AbortController;
|
|
145
|
+
};
|
|
146
|
+
export type AIEventSourceMessageParsed = EventSourceMessage & {
|
|
147
|
+
data: Record<string, any>;
|
|
148
|
+
};
|
|
149
|
+
export type AIQueryAssistantReply = AsyncGenerator<AIEventSourceMessageParsed, void, undefined>;
|
|
150
|
+
export type AIConnectorRequest = {
|
|
151
|
+
getStream: () => Promise<AIQueryAssistantReply>;
|
|
152
|
+
abortController: AbortController;
|
|
153
|
+
};
|
|
154
|
+
export type AIConnectorQueryAssistantData = {
|
|
155
|
+
message: string;
|
|
156
|
+
conversationId: string;
|
|
157
|
+
parts: Array<AIContextItemRequestData>;
|
|
158
|
+
capabilities: AICapabilitiesRequestData | undefined;
|
|
159
|
+
model: string;
|
|
160
|
+
quickActionData?: AIQuickActionRequestData;
|
|
161
|
+
};
|
|
162
|
+
export type AIFetchDocumentReply = {
|
|
163
|
+
id: string;
|
|
164
|
+
content: string;
|
|
165
|
+
attributes?: {
|
|
166
|
+
version: number;
|
|
167
|
+
sessionId: string | null;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
export type AIFetchDocumentRequest = {
|
|
171
|
+
getDocument: () => Promise<AIFetchDocumentReply>;
|
|
172
|
+
abortController: AbortController;
|
|
173
|
+
};
|
|
174
|
+
export type AIUploadReply = {
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
177
|
+
export type AIUploadRequest = {
|
|
178
|
+
getId: () => Promise<AIUploadReply>;
|
|
179
|
+
abortController: AbortController;
|
|
180
|
+
};
|
|
181
|
+
export type AIConversationItem = {
|
|
182
|
+
id: string;
|
|
183
|
+
title: string;
|
|
184
|
+
createdAt: string;
|
|
185
|
+
updatedAt?: string;
|
|
186
|
+
pinned: boolean;
|
|
187
|
+
};
|
|
188
|
+
export type AIFetchConversationsRequest = {
|
|
189
|
+
getConversations: () => Promise<Array<AIConversationItem>>;
|
|
190
|
+
abortController: AbortController;
|
|
191
|
+
};
|
|
192
|
+
export type AIUpdateConversationRequest = {
|
|
193
|
+
getResult: () => Promise<{
|
|
194
|
+
title?: string;
|
|
195
|
+
pinned?: boolean;
|
|
196
|
+
}>;
|
|
197
|
+
abortController: AbortController;
|
|
198
|
+
};
|
|
199
|
+
export type AIDeleteConversationRequest = {
|
|
200
|
+
execute: () => Promise<void>;
|
|
201
|
+
abortController: AbortController;
|
|
202
|
+
};
|
|
203
|
+
export type AIUserMessage = {
|
|
204
|
+
capabilities: Record<string, any>;
|
|
205
|
+
content: Array<{
|
|
206
|
+
id: string;
|
|
207
|
+
type: AIContextItemType;
|
|
208
|
+
content: string;
|
|
209
|
+
name?: string;
|
|
210
|
+
url?: string;
|
|
211
|
+
attributes?: {
|
|
212
|
+
resourceId: string;
|
|
213
|
+
label: string;
|
|
214
|
+
};
|
|
215
|
+
}>;
|
|
216
|
+
prompt: string;
|
|
217
|
+
model: string;
|
|
218
|
+
id: string;
|
|
219
|
+
role: 'user';
|
|
220
|
+
attributes: Record<string, any>;
|
|
221
|
+
};
|
|
222
|
+
export type AIAssistantMessage = {
|
|
223
|
+
content: Array<{
|
|
224
|
+
id: string;
|
|
225
|
+
type: 'text' | 'modification';
|
|
226
|
+
content: string;
|
|
227
|
+
}>;
|
|
228
|
+
id: string;
|
|
229
|
+
role: 'assistant';
|
|
230
|
+
};
|
|
231
|
+
export type AIConversationMessage = AIUserMessage | AIAssistantMessage;
|
|
232
|
+
export type AIGetConversationReply = {
|
|
233
|
+
id: string;
|
|
234
|
+
model: string;
|
|
235
|
+
title: string;
|
|
236
|
+
pinned: boolean;
|
|
237
|
+
};
|
|
238
|
+
export type AIGetConversationRequest = {
|
|
239
|
+
getConversation: () => Promise<AIGetConversationReply>;
|
|
240
|
+
abortController: AbortController;
|
|
241
|
+
};
|
|
242
|
+
export type AIGetConversationMessagesRequest = {
|
|
243
|
+
getMessages: () => Promise<Array<AIConversationMessage>>;
|
|
244
|
+
abortController: AbortController;
|
|
245
|
+
};
|
|
246
|
+
export type AIModelData = {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
provider: string;
|
|
250
|
+
description: string;
|
|
251
|
+
capabilities: {
|
|
252
|
+
webSearch: {
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
};
|
|
255
|
+
reasoning: {
|
|
256
|
+
enabled: boolean;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
export type AIModelRequest = {
|
|
261
|
+
list: () => Promise<{
|
|
262
|
+
items: Array<AIModelData>;
|
|
263
|
+
}>;
|
|
264
|
+
abortController: AbortController;
|
|
265
|
+
};
|
|
266
|
+
export type AIDeleteFileRequest = {
|
|
267
|
+
execute: () => Promise<void>;
|
|
268
|
+
abortController: AbortController;
|
|
269
|
+
};
|
|
270
|
+
export type AIDeleteDocumentRequest = {
|
|
271
|
+
execute: () => Promise<void>;
|
|
272
|
+
abortController: AbortController;
|
|
273
|
+
};
|
|
274
|
+
export type AIDeleteWebResourceRequest = {
|
|
275
|
+
execute: () => Promise<void>;
|
|
276
|
+
abortController: AbortController;
|
|
277
|
+
};
|
|
278
|
+
export type AIConnectorExecuteCustomActionData = {
|
|
279
|
+
content: string;
|
|
280
|
+
message: string;
|
|
281
|
+
model: string;
|
|
282
|
+
outputFormat: 'plainText' | 'html';
|
|
283
|
+
};
|
|
284
|
+
export type AIConnectorExecuteActionData = {
|
|
285
|
+
actionName: AIActionsNames;
|
|
286
|
+
content: string;
|
|
287
|
+
args?: {
|
|
288
|
+
language?: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
export type AIConnectorSystemReviewData = {
|
|
292
|
+
reviewName: string;
|
|
293
|
+
content: string;
|
|
294
|
+
args?: {
|
|
295
|
+
language?: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
export type AIConnectorCustomReviewData = {
|
|
299
|
+
content: string;
|
|
300
|
+
prompt: string;
|
|
301
|
+
model: string;
|
|
302
|
+
};
|
|
@@ -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 _0x909b49=_0x9f6c;(function(_0x293062,_0x30fb8c){const _0x3193bb=_0x9f6c,_0x2dc70a=_0x293062();while(!![]){try{const _0x25fc45=-parseInt(_0x3193bb(0x1b4))/0x1+parseInt(_0x3193bb(0x18f))/0x2+parseInt(_0x3193bb(0x139))/0x3*(-parseInt(_0x3193bb(0x173))/0x4)+parseInt(_0x3193bb(0x147))/0x5+parseInt(_0x3193bb(0x182))/0x6+parseInt(_0x3193bb(0x1a9))/0x7+parseInt(_0x3193bb(0x13b))/0x8*(parseInt(_0x3193bb(0x14c))/0x9);if(_0x25fc45===_0x30fb8c)break;else _0x2dc70a['push'](_0x2dc70a['shift']());}catch(_0x7cb9bd){_0x2dc70a['push'](_0x2dc70a['shift']());}}}(_0x331b,0x1ec50));function _0x9f6c(_0x317839,_0x561947){const _0x331bb4=_0x331b();return _0x9f6c=function(_0x9f6cbf,_0xc9f6d0){_0x9f6cbf=_0x9f6cbf-0x137;let _0x20424c=_0x331bb4[_0x9f6cbf];return _0x20424c;},_0x9f6c(_0x317839,_0x561947);}import{createParser as _0x4e0481}from'eventsource-parser';import{ContextPlugin as _0x190e6a}from'ckeditor5/src/core.js';import{CKEditorError as _0xb0e18e}from'ckeditor5/src/utils.js';import{getTranslation as _0xc58144}from'./utils/common-translations.js';export var AIActionsNames;function _0x331b(){const _0x16b2f8=['body','ai-request-failed','/conversations','text','_token','deleteFile','/web-resources','deleteWebResource','name','AI_MODEL_DESCRIPTION_','decode','_apiUrl','/documents','value','IMPROVE_WRITING','map','MAKE_SHORTER','_handleError','233303ubGiTV','PATCH','/actions/system/','stringify','DELETE','/actions/custom/calls','/files','releaseLock','FIX_GRAMMAR','executeCustomAction','read','223398QLCbIB','search','getReader','98265NlOJfV','context','55848csYcyn','TRANSLATE','make-shorter','signal','/files/','fix-grammar','data','_decoder','uploadFile','limit','executeAction','plugins','39320bpdJYK','get','MAKE_TONE_CASUAL','fetchConversationMessages','reset','261ODHvKK','length','feed','true','/documents/','ai-request-aborted','group','abortController','MAKE_LONGER','_sendApiRequest','isOfficialPlugin','fetchConversation','getModels','/reviews/system/','CloudServices','MAKE_TONE_FORMAL','uploadUrl','_getStreamReader','pluginName','request','init','deleteDocument','continue','items','/conversations?','improve-writing','queryAssistant','Bearer\x20','fetchDocument','attributes','/web-resources/','callCustomReview','GET','catch','keys','/messages','toString','translate','100','12dxielD','updateConversation','POST','application/json','callSystemReview','requires','parse','/conversations/','Content-Type','AIConnector','push','fetchConversations','startConversation','make-tone-casual','ai-missing-token','515940zcoaCe','/calls','json','/models/1','https://ai-assistant.cke-cs-staging.com/v1','append','AbortError','uploadDocument','CONTINUE','token','then','toUpperCase','excludeEmpty','236126PWoroW','locale','make-tone-formal','deleteConversation','isPremiumPlugin','/reviews/custom/calls','make-longer','file'];_0x331b=function(){return _0x16b2f8;};return _0x331b();}!function(_0xe25e0f){const _0x242c1a=_0x9f6c;_0xe25e0f[_0x242c1a(0x18a)]=_0x242c1a(0x162),_0xe25e0f[_0x242c1a(0x1b1)]=_0x242c1a(0x140),_0xe25e0f[_0x242c1a(0x1a5)]=_0x242c1a(0x165),_0xe25e0f[_0x242c1a(0x154)]=_0x242c1a(0x195),_0xe25e0f[_0x242c1a(0x1a7)]=_0x242c1a(0x13d),_0xe25e0f[_0x242c1a(0x149)]=_0x242c1a(0x180),_0xe25e0f[_0x242c1a(0x15b)]=_0x242c1a(0x191),_0xe25e0f[_0x242c1a(0x13c)]=_0x242c1a(0x171);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x190e6a{[_0x909b49(0x1a2)];[_0x909b49(0x19b)];[_0x909b49(0x142)];static get[_0x909b49(0x178)](){const _0x4e9127=_0x909b49;return[_0x4e9127(0x15a)];}static get[_0x909b49(0x15e)](){const _0x4de58a=_0x909b49;return _0x4de58a(0x17c);}static get[_0x909b49(0x156)](){return!0x0;}static get[_0x909b49(0x193)](){return!0x0;}constructor(_0x100fae){const _0x2c2f59=_0x909b49;super(_0x100fae),this[_0x2c2f59(0x1a2)]=_0x2c2f59(0x186),this[_0x2c2f59(0x19b)]=null,this[_0x2c2f59(0x142)]=new TextDecoder();}[_0x909b49(0x160)](){const _0xe71572=_0x909b49,_0x34b0aa=this[_0xe71572(0x13a)][_0xe71572(0x146)][_0xe71572(0x148)](_0xe71572(0x15a));if(!_0x34b0aa[_0xe71572(0x18b)])throw new _0xb0e18e(_0xe71572(0x181),this);this[_0xe71572(0x19b)]=_0x34b0aa[_0xe71572(0x18b)];}[_0x909b49(0x17f)](_0x3ea806,_0x26c65d){const _0xa6abd=_0x909b49,_0x8ca526=this[_0xa6abd(0x155)](_0xa6abd(0x199),_0xa6abd(0x175),{'id':_0x3ea806,'group':_0x26c65d});return{'getConversation':async()=>(await _0x8ca526[_0xa6abd(0x15f)])[_0xa6abd(0x184)](),'abortController':_0x8ca526[_0xa6abd(0x153)]};}[_0x909b49(0x166)]({message:_0x436f14,conversationId:_0x433394,parts:_0x44d97b,capabilities:_0x517051,model:_0x1fa78e,quickActionData:_0xe6a608}){const _0x43a927=_0x909b49,_0x10d182={..._0xe6a608&&{'quickActionData':_0xe6a608}},_0x4c4096={'prompt':_0x436f14,'content':_0x44d97b,'model':_0x1fa78e,..._0x517051&&{'capabilities':_0x517051},...Object[_0x43a927(0x16e)](_0x10d182)[_0x43a927(0x14d)]>0x0&&{'attributes':_0x10d182}},_0xe4ac32=this[_0x43a927(0x155)](_0x43a927(0x17a)+_0x433394+_0x43a927(0x16f),_0x43a927(0x175),_0x4c4096);return{'getStream':async()=>{const _0x47d671=_0x43a927,_0x307ddf=(await _0xe4ac32[_0x47d671(0x15f)])[_0x47d671(0x197)];return this[_0x47d671(0x15d)](_0x307ddf);},'abortController':_0xe4ac32[_0x43a927(0x153)]};}[_0x909b49(0x1b2)]({content:_0x39ab30,message:_0x563984,model:_0x1d7db2,outputFormat:_0x3fd665}){const _0x4e9f92=_0x909b49,_0x2c7f98={'content':[{'type':_0x4e9f92(0x19a),'content':_0x39ab30}],'prompt':_0x563984,'model':_0x1d7db2,'outputFormat':_0x3fd665},_0x3054ba=this[_0x4e9f92(0x155)](_0x4e9f92(0x1ae),_0x4e9f92(0x175),_0x2c7f98);return{'getStream':async()=>{const _0x291709=_0x4e9f92,_0x5414e8=(await _0x3054ba[_0x291709(0x15f)])[_0x291709(0x197)];return this[_0x291709(0x15d)](_0x5414e8);},'abortController':_0x3054ba[_0x4e9f92(0x153)]};}[_0x909b49(0x145)]({actionName:_0x1bd5e9,content:_0x482a5b,args:_0x178f68}){const _0xba9008=_0x909b49,_0x622a54={'content':[{'type':_0xba9008(0x19a),'content':_0x482a5b}],'args':_0x178f68},_0x4b0cd7=this[_0xba9008(0x155)](_0xba9008(0x1ab)+_0x1bd5e9+_0xba9008(0x183),_0xba9008(0x175),_0x622a54);return{'getStream':async()=>{const _0xbc32bd=_0xba9008,_0x1c0909=(await _0x4b0cd7[_0xbc32bd(0x15f)])[_0xbc32bd(0x197)];return this[_0xbc32bd(0x15d)](_0x1c0909);},'abortController':_0x4b0cd7[_0xba9008(0x153)]};}[_0x909b49(0x143)](_0x3b7a30,_0x20f6f2,_0x534d01){const _0x56c825=_0x909b49,_0x4e8cbe=new FormData();_0x4e8cbe[_0x56c825(0x187)](_0x56c825(0x196),_0x20f6f2,_0x20f6f2[_0x56c825(0x19f)]),_0x534d01&&_0x4e8cbe[_0x56c825(0x187)](_0x56c825(0x169),JSON[_0x56c825(0x1ac)](_0x534d01));const _0x42ea92=this[_0x56c825(0x155)](_0x56c825(0x17a)+_0x3b7a30+_0x56c825(0x1af),_0x56c825(0x175),_0x4e8cbe);return{'getId':async()=>(await _0x42ea92[_0x56c825(0x15f)])[_0x56c825(0x184)](),'abortController':_0x42ea92[_0x56c825(0x153)]};}[_0x909b49(0x168)](_0x56e970,_0x336aeb){const _0x4951da=_0x909b49,_0x4dbc8b=this[_0x4951da(0x155)](_0x4951da(0x17a)+_0x56e970+_0x4951da(0x150)+_0x336aeb,_0x4951da(0x16c));return{'getDocument':async()=>(await _0x4dbc8b[_0x4951da(0x15f)])[_0x4951da(0x184)](),'abortController':_0x4dbc8b[_0x4951da(0x153)]};}[_0x909b49(0x189)](_0x290556,_0x469e2d,_0x2ab5f3){const _0xc118fd=_0x909b49,_0x33f0eb={'content':_0x469e2d};_0x2ab5f3&&(_0x33f0eb[_0xc118fd(0x169)]=_0x2ab5f3);const _0x164c8e=this[_0xc118fd(0x155)](_0xc118fd(0x17a)+_0x290556+_0xc118fd(0x1a3),_0xc118fd(0x175),_0x33f0eb);return{'getId':async()=>(await _0x164c8e[_0xc118fd(0x15f)])[_0xc118fd(0x184)](),'abortController':_0x164c8e[_0xc118fd(0x153)]};}[_0x909b49(0x17e)](_0x2e1c57,_0x4b2575){const _0x5507a1=_0x909b49,_0x360531=new URLSearchParams();_0x360531[_0x5507a1(0x187)](_0x5507a1(0x18e),_0x5507a1(0x14f)),_0x360531[_0x5507a1(0x187)](_0x5507a1(0x144),_0x5507a1(0x172)),_0x360531[_0x5507a1(0x187)](_0x5507a1(0x152),_0x2e1c57),_0x4b2575&&_0x360531[_0x5507a1(0x187)](_0x5507a1(0x137),_0x4b2575);const _0x5489a6=this[_0x5507a1(0x155)](_0x5507a1(0x164)+_0x360531[_0x5507a1(0x170)](),_0x5507a1(0x16c));return{'getConversations':async()=>{const _0x62398e=_0x5507a1,_0x25f52c=await _0x5489a6[_0x62398e(0x15f)];return(await _0x25f52c[_0x62398e(0x184)]())[_0x62398e(0x163)];},'abortController':_0x5489a6[_0x5507a1(0x153)]};}[_0x909b49(0x192)](_0x4b829f){const _0x167c3a=_0x909b49,_0x495e0a=this[_0x167c3a(0x155)](_0x167c3a(0x17a)+_0x4b829f,_0x167c3a(0x1ad));return{'execute':async()=>{const _0x101bbf=_0x167c3a;await _0x495e0a[_0x101bbf(0x15f)];},'abortController':_0x495e0a[_0x167c3a(0x153)]};}[_0x909b49(0x174)](_0x2a75e9,_0x3930f2){const _0x5c2a53=_0x909b49,_0x56b716=this[_0x5c2a53(0x155)](_0x5c2a53(0x17a)+_0x2a75e9,_0x5c2a53(0x1aa),_0x3930f2);return{'getResult':async()=>(await _0x56b716[_0x5c2a53(0x15f)],_0x3930f2),'abortController':_0x56b716[_0x5c2a53(0x153)]};}[_0x909b49(0x157)](_0x3d57db){const _0x664176=_0x909b49,_0x1e80c4=this[_0x664176(0x155)](_0x664176(0x17a)+_0x3d57db,_0x664176(0x16c));return{'getConversation':async()=>(await _0x1e80c4[_0x664176(0x15f)])[_0x664176(0x184)](),'abortController':_0x1e80c4[_0x664176(0x153)]};}[_0x909b49(0x14a)](_0x2a81e5){const _0x462d33=_0x909b49,_0x5d2f9f=this[_0x462d33(0x155)](_0x462d33(0x17a)+_0x2a81e5+_0x462d33(0x16f),_0x462d33(0x16c));return{'getMessages':async()=>{const _0x31ed37=_0x462d33,_0x5a3a16=await _0x5d2f9f[_0x31ed37(0x15f)];return(await _0x5a3a16[_0x31ed37(0x184)]())[_0x31ed37(0x163)];},'abortController':_0x5d2f9f[_0x462d33(0x153)]};}[_0x909b49(0x15c)](_0x340e30,_0x103f69,_0x125925){const _0x46ab5a=_0x909b49,_0x392ec1=this[_0x46ab5a(0x155)](_0x46ab5a(0x17a)+_0x340e30+_0x46ab5a(0x19d),_0x46ab5a(0x175),{'url':_0x103f69,'attributes':_0x125925});return{'getId':async()=>(await _0x392ec1[_0x46ab5a(0x15f)])[_0x46ab5a(0x184)](),'abortController':_0x392ec1[_0x46ab5a(0x153)]};}[_0x909b49(0x158)](){const _0x3c7f51=_0x909b49,_0x1b3124=this[_0x3c7f51(0x155)](_0x3c7f51(0x185),_0x3c7f51(0x16c));return{'list':async()=>{const _0x3680f9=_0x3c7f51,_0x3ade38=await(await _0x1b3124[_0x3680f9(0x15f)])[_0x3680f9(0x184)](),_0x467769=_0x3ade38[_0x3680f9(0x163)][_0x3680f9(0x1a6)](_0x4a4c7e=>({..._0x4a4c7e,'description':_0xc58144(this[_0x3680f9(0x13a)][_0x3680f9(0x190)],_0x3680f9(0x1a0)+_0x4a4c7e['id'][_0x3680f9(0x18d)]())}));return{..._0x3ade38,'items':_0x467769};},'abortController':_0x1b3124[_0x3c7f51(0x153)]};}[_0x909b49(0x19c)](_0x61d32,_0x25a223){const _0x5a518d=_0x909b49,_0x34408c=this[_0x5a518d(0x155)](_0x5a518d(0x17a)+_0x61d32+_0x5a518d(0x13f)+_0x25a223,_0x5a518d(0x1ad));return{'execute':async()=>{const _0x237550=_0x5a518d;await _0x34408c[_0x237550(0x15f)];},'abortController':_0x34408c[_0x5a518d(0x153)]};}[_0x909b49(0x161)](_0x8b3714,_0x3e5284){const _0x1f4f06=_0x909b49,_0x282204=this[_0x1f4f06(0x155)](_0x1f4f06(0x17a)+_0x8b3714+_0x1f4f06(0x150)+_0x3e5284,_0x1f4f06(0x1ad));return{'execute':async()=>{const _0x171946=_0x1f4f06;await _0x282204[_0x171946(0x15f)];},'abortController':_0x282204[_0x1f4f06(0x153)]};}[_0x909b49(0x19e)](_0x198452,_0x2619d0){const _0x10e76a=_0x909b49,_0x58f5e7=this[_0x10e76a(0x155)](_0x10e76a(0x17a)+_0x198452+_0x10e76a(0x16a)+_0x2619d0,_0x10e76a(0x1ad));return{'execute':async()=>{const _0x3e9012=_0x10e76a;await _0x58f5e7[_0x3e9012(0x15f)];},'abortController':_0x58f5e7[_0x10e76a(0x153)]};}[_0x909b49(0x177)]({reviewName:_0x48506f,content:_0x5d18bb,args:_0x5997a6}){const _0x5d6ea8=_0x909b49,_0x1fe21f=this[_0x5d6ea8(0x155)](_0x5d6ea8(0x159)+_0x48506f+_0x5d6ea8(0x183),_0x5d6ea8(0x175),{'content':[{'type':_0x5d6ea8(0x19a),'content':_0x5d18bb}],'args':_0x5997a6});return{'getStream':async()=>{const _0x252634=_0x5d6ea8,_0x248c48=(await _0x1fe21f[_0x252634(0x15f)])[_0x252634(0x197)];return this[_0x252634(0x15d)](_0x248c48);},'abortController':_0x1fe21f[_0x5d6ea8(0x153)]};}[_0x909b49(0x16b)]({content:_0x4575e2,prompt:_0x1edaa3,model:_0x1e6dbe}){const _0x5d7bcd=_0x909b49,_0x4608ad=this[_0x5d7bcd(0x155)](_0x5d7bcd(0x194),_0x5d7bcd(0x175),{'content':[{'type':_0x5d7bcd(0x19a),'content':_0x4575e2}],'prompt':_0x1edaa3,'model':_0x1e6dbe});return{'getStream':async()=>{const _0x34289e=_0x5d7bcd,_0x53c736=(await _0x4608ad[_0x34289e(0x15f)])[_0x34289e(0x197)];return this[_0x34289e(0x15d)](_0x53c736);},'abortController':_0x4608ad[_0x5d7bcd(0x153)]};}[_0x909b49(0x155)](_0x2e6e2a,_0x25572d,_0x367a05){const _0x29fffb=_0x909b49,_0x1cd6ac=new AbortController(),_0x3853e2=_0x367a05 instanceof FormData,_0x585a6e={'Authorization':_0x29fffb(0x167)+this[_0x29fffb(0x19b)]?.[_0x29fffb(0x1a4)]};_0x367a05&&!_0x3853e2&&(_0x585a6e[_0x29fffb(0x17b)]=_0x29fffb(0x176));const _0x42e194={'method':_0x25572d,'headers':_0x585a6e,'signal':_0x1cd6ac[_0x29fffb(0x13e)]};return _0x367a05&&(_0x42e194[_0x29fffb(0x197)]=_0x3853e2?_0x367a05:JSON[_0x29fffb(0x1ac)](_0x367a05)),{'request':fetch(''+this[_0x29fffb(0x1a2)]+_0x2e6e2a,_0x42e194)[_0x29fffb(0x16d)](_0x1184f3=>{const _0x118a9b=_0x29fffb;this[_0x118a9b(0x1a8)](_0x1184f3);})[_0x29fffb(0x18c)](_0x29763d=>{const _0x48e8db=_0x29fffb;if(!_0x29763d['ok'])throw new _0xb0e18e(_0x48e8db(0x198),this);return _0x29763d;}),'abortController':_0x1cd6ac};}async*[_0x909b49(0x15d)](_0x2be1e4){const _0x17b471=_0x909b49,_0xe08c02=[],_0x19fad7=_0x2be1e4[_0x17b471(0x138)](),_0x187f94=_0x4e0481({'onError':_0x5a105f=>{const _0x169264=_0x17b471;this[_0x169264(0x1a8)](_0x5a105f);},'onEvent':_0x4eb2fb=>{const _0x53dabe=_0x17b471;_0x4eb2fb[_0x53dabe(0x141)]=JSON[_0x53dabe(0x179)](_0x4eb2fb[_0x53dabe(0x141)]),_0xe08c02[_0x53dabe(0x17d)](_0x4eb2fb);}});try{let _0x1c4c75=!0x1;for(;!_0x1c4c75;){const {done:_0x51fbf8,value:_0x61215}=await _0x19fad7[_0x17b471(0x1b3)]();_0x51fbf8&&(_0x1c4c75=!0x0),_0x187f94[_0x17b471(0x14e)](this[_0x17b471(0x142)][_0x17b471(0x1a1)](_0x61215,{'stream':!0x0})),yield*_0xe08c02,_0xe08c02[_0x17b471(0x14d)]=0x0;}}catch(_0x1b045e){this[_0x17b471(0x1a8)](_0x1b045e);}finally{_0x19fad7[_0x17b471(0x1b0)](),_0x187f94[_0x17b471(0x14b)]();}}[_0x909b49(0x1a8)](_0x2f637c){const _0x39f327=_0x909b49;if(_0x2f637c instanceof _0xb0e18e)throw _0x2f637c;if(_0x2f637c instanceof Error&&_0x39f327(0x188)===_0x2f637c[_0x39f327(0x19f)])throw new _0xb0e18e(_0x39f327(0x151),this,{'originalError':_0x2f637c});throw new _0xb0e18e(_0x39f327(0x198),this,{'originalError':_0x2f637c});}}
|