@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,61 @@
|
|
|
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/aiediting
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type ModelRange, type ViewDocumentFragment, type ModelDocumentFragment } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import { ContextPlugin } from 'ckeditor5/src/core.js';
|
|
11
|
+
export declare const AI_VISUAL_SELECTION_MARKER_NAME = "ai-selection";
|
|
12
|
+
export declare class AIEditing extends ContextPlugin {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
static get pluginName(): "AIEditing";
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get isOfficialPlugin(): true;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get isPremiumPlugin(): true;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current session ID. If RTC plugin is available, uses its sessionId.
|
|
27
|
+
* Otherwise, generates a random ID for the current (non-RTC) session.
|
|
28
|
+
*/
|
|
29
|
+
get sessionId(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the data and version of the current document.
|
|
32
|
+
*/
|
|
33
|
+
getDocumentData(): {
|
|
34
|
+
content: string;
|
|
35
|
+
version: number;
|
|
36
|
+
sessionId: string;
|
|
37
|
+
selections: Array<{
|
|
38
|
+
markerName: string;
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
htmlFragment: string;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
afterInit(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Displays a fake visual selection on given ranges.
|
|
47
|
+
*
|
|
48
|
+
* Since multiple features may want to show and hide the selection, while at the same time, only one fake selection should be shown,
|
|
49
|
+
* it is necessary to provide an `id` when showing fake selection. Then, when the fake selection should be hidden, `id` must be
|
|
50
|
+
* passed as well. This mechanism prevents a feature from mistakenly hiding a fake selection set by another feature.
|
|
51
|
+
*/
|
|
52
|
+
showFakeVisualSelection(ranges: Array<ModelRange>, id: string, lock?: boolean, force?: boolean): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Removes a fake visual selection from the document.
|
|
55
|
+
*
|
|
56
|
+
* The passed `id` should be the same as the one used when {@link module:ai/aicore/aiediting~AIEditing#showFakeVisualSelection} was
|
|
57
|
+
* called. This mechanism prevents a feature from mistakenly hiding a fake selection set by another feature.
|
|
58
|
+
*/
|
|
59
|
+
hideFakeVisualSelection(id: string): boolean;
|
|
60
|
+
modelToViewWithIds(modelFragment: ModelDocumentFragment): ViewDocumentFragment;
|
|
61
|
+
}
|
|
@@ -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 _0x188a0d=_0x2391;(function(_0xf81fdd,_0x16fabe){const _0x58947c=_0x2391,_0x2c475f=_0xf81fdd();while(!![]){try{const _0x47fab0=parseInt(_0x58947c(0x1c9))/0x1*(-parseInt(_0x58947c(0x1c5))/0x2)+parseInt(_0x58947c(0x19d))/0x3*(-parseInt(_0x58947c(0x1b3))/0x4)+parseInt(_0x58947c(0x1a7))/0x5*(parseInt(_0x58947c(0x19e))/0x6)+parseInt(_0x58947c(0x184))/0x7+parseInt(_0x58947c(0x1c8))/0x8*(parseInt(_0x58947c(0x190))/0x9)+parseInt(_0x58947c(0x18e))/0xa+-parseInt(_0x58947c(0x1b7))/0xb*(parseInt(_0x58947c(0x19b))/0xc);if(_0x47fab0===_0x16fabe)break;else _0x2c475f['push'](_0x2c475f['shift']());}catch(_0x27a8f4){_0x2c475f['push'](_0x2c475f['shift']());}}}(_0x23be,0x3b4b4));import{ViewDowncastWriter as _0x3687dc}from'ckeditor5/src/engine.js';import{ContextPlugin as _0x45fb06,Editor as _0xe25d3}from'ckeditor5/src/core.js';import{uid as _0x4ef01c}from'ckeditor5/src/utils.js';function _0x23be(){const _0x16bc74=['for','has','emptyElement','ai-selection','createRangeIn','12yixFft','context','15nioxUN','2236818KFZIHy','_getMarkersInDocumentOrder','getMarkersGroup','afterInit','isAfter','ck-fake-ai-selection','$textProxy','indexOf','editors','5TASJeF','setAttribute','substring','_sessionId','toView','toData','pluginName','selection','data-id','RealTimeCollaborationClient','removeAllRanges','getDocumentData','177932WLQdaZ','floor',':start></','isOfficialPlugin','9625341YZjzbj','get','createUIElement','getWalker','_integrateEditor','showFakeVisualSelection','getLastMatchingPosition','editingDowncast','addMarker',':start>','_nextDataId','isBefore','containerElement','getRoot','257102tAYDij','markerToHighlight','from','7496hLJKAS','3vDAwAK','hideFakeVisualSelection','change','ck-ai-assistant-ui_theme','conversion','isAtEnd','random','end','_displayedFakeSelectionId','sessionId','length','model','add','getChildren','AIEditing','getSelectedContent','trim','_displayedFakeSelectionLocked','markers','name','version','join','editing','plugins','element',':end></','start','getSelection','fromCharCode','removeMarker','ready',':end>','ai-selection:','push','isContent','listenTo','schema','data','2834811vuRkoX','getStart','document','createRange','processor','sort','getSelectionText','_setDataIdsOnChildren','convertAiChatSelectionMarker','markerToElement','4750060gCAzmR','view','4545ZcFJHG','dataDowncast','modelToViewWithIds','markerName','isPremiumPlugin','isOpening'];_0x23be=function(){return _0x16bc74;};return _0x23be();}import{getEditorFromContext as _0x988298}from'./utils/geteditorfromcontext.js';function _0x2391(_0x200257,_0x435f9e){const _0x23bee8=_0x23be();return _0x2391=function(_0x2391c1,_0x42b51c){_0x2391c1=_0x2391c1-0x176;let _0x52363b=_0x23bee8[_0x2391c1];return _0x52363b;},_0x2391(_0x200257,_0x435f9e);}export const AI_VISUAL_SELECTION_MARKER_NAME=_0x188a0d(0x199);export class AIEditing extends _0x45fb06{[_0x188a0d(0x1d1)]=null;[_0x188a0d(0x1da)]=!0x1;[_0x188a0d(0x1aa)];static get[_0x188a0d(0x1ad)](){const _0x4e5499=_0x188a0d;return _0x4e5499(0x1d7);}static get[_0x188a0d(0x1b6)](){return!0x0;}static get[_0x188a0d(0x194)](){return!0x0;}get[_0x188a0d(0x1d2)](){const _0x31dd86=_0x188a0d;if(!this[_0x31dd86(0x1aa)]){const _0x555e6c=_0x988298(this[_0x31dd86(0x19c)]),_0x8b3d2b=_0x555e6c[_0x31dd86(0x1e0)][_0x31dd86(0x197)](_0x31dd86(0x1b0))&&_0x555e6c[_0x31dd86(0x1e0)][_0x31dd86(0x1b8)](_0x31dd86(0x1b0))[_0x31dd86(0x1d2)];this[_0x31dd86(0x1aa)]=_0x8b3d2b||_0x4ef01c();}return this[_0x31dd86(0x1aa)];}[_0x188a0d(0x1b2)](){const _0x25ad60=_0x188a0d,_0x460ac8=_0x988298(this[_0x25ad60(0x19c)]),_0x20fefa=_0x460ac8[_0x25ad60(0x1d4)],_0x4a4002=_0x460ac8[_0x25ad60(0x183)][_0x25ad60(0x1ab)](_0x20fefa[_0x25ad60(0x186)][_0x25ad60(0x1c4)](),{'convertAiChatSelectionMarker':!0x0}),_0x5fe1a8=new _0x3687dc(_0x460ac8[_0x25ad60(0x1df)][_0x25ad60(0x18f)][_0x25ad60(0x186)]);this[_0x25ad60(0x18b)](_0x4a4002,_0x5fe1a8);let _0x1e373e=_0x460ac8[_0x25ad60(0x183)][_0x25ad60(0x188)][_0x25ad60(0x1ac)](_0x4a4002);const _0x1ef1cf=this[_0x25ad60(0x19f)](),_0x5eb46e=[];for(const _0x50e439 of _0x1ef1cf){const _0xd7cdba='<'+_0x50e439[_0x25ad60(0x1dc)]+_0x25ad60(0x1b5)+_0x50e439[_0x25ad60(0x1dc)]+_0x25ad60(0x1c0),_0xae5fda=_0x1e373e[_0x25ad60(0x1a5)](_0xd7cdba);_0x1e373e=_0x1e373e[_0x25ad60(0x1a9)](0x0,_0xae5fda)+_0x1e373e[_0x25ad60(0x1a9)](_0xae5fda+_0xd7cdba[_0x25ad60(0x1d3)]);const _0x429677='<'+_0x50e439[_0x25ad60(0x1dc)]+_0x25ad60(0x177)+_0x50e439[_0x25ad60(0x1dc)]+_0x25ad60(0x17d),_0x4a87f2=_0x1e373e[_0x25ad60(0x1a5)](_0x429677);_0x1e373e=_0x1e373e[_0x25ad60(0x1a9)](0x0,_0x4a87f2)+_0x1e373e[_0x25ad60(0x1a9)](_0x4a87f2+_0x429677[_0x25ad60(0x1d3)]),_0x5eb46e[_0x25ad60(0x17f)]({'markerName':_0x50e439[_0x25ad60(0x1dc)],'start':_0xae5fda,'end':_0x4a87f2,'htmlFragment':_0x1e373e[_0x25ad60(0x1a9)](_0xae5fda,_0x4a87f2)});}return{'content':_0x1e373e,'version':_0x460ac8[_0x25ad60(0x1d4)][_0x25ad60(0x186)][_0x25ad60(0x1dd)],'sessionId':this[_0x25ad60(0x1d2)],'selections':_0x5eb46e};}async[_0x188a0d(0x1a1)](){const _0x489f30=_0x188a0d;this[_0x489f30(0x19c)]instanceof _0xe25d3?this[_0x489f30(0x1bb)](this[_0x489f30(0x19c)]):this[_0x489f30(0x181)](this[_0x489f30(0x19c)][_0x489f30(0x1a6)],_0x489f30(0x1d5),(_0x131a21,_0x3ed810)=>{const _0x252d4d=_0x489f30;_0x3ed810['on'](_0x252d4d(0x17c),()=>{const _0x506417=_0x252d4d;this[_0x506417(0x1bb)](_0x3ed810);});});}[_0x188a0d(0x1bb)](_0xd21c1c){const _0x4047ea=_0x188a0d;_0xd21c1c[_0x4047ea(0x1cd)][_0x4047ea(0x196)](_0x4047ea(0x1be))[_0x4047ea(0x1c6)]({'model':_0x4047ea(0x199),'view':{'classes':[_0x4047ea(0x1a3),_0x4047ea(0x1cc)],'priority':0xc}}),_0xd21c1c[_0x4047ea(0x1cd)][_0x4047ea(0x196)](_0x4047ea(0x191))[_0x4047ea(0x18d)]({'model':_0x4047ea(0x199),'view':(_0x3ad8ce,{writer:_0x3a5935,options:_0x2801ca})=>_0x2801ca[_0x4047ea(0x18c)]?_0x3a5935[_0x4047ea(0x1b9)](_0x3ad8ce[_0x4047ea(0x193)]+':'+(_0x3ad8ce[_0x4047ea(0x195)]?_0x4047ea(0x178):_0x4047ea(0x1d0))):null});}[_0x188a0d(0x1bc)](_0x178e9f,_0xaa3264,_0x40f7f1=!0x1,_0x3c1e65=!0x1){const _0x32f551=_0x188a0d;if(this[_0x32f551(0x1da)]&&!_0x3c1e65)return!0x1;this[_0x32f551(0x1d1)]&&this[_0x32f551(0x1ca)](this[_0x32f551(0x1d1)]),this[_0x32f551(0x1d1)]=_0xaa3264,this[_0x32f551(0x1da)]=_0x40f7f1;const _0x3e297f=_0x988298(this[_0x32f551(0x19c)])[_0x32f551(0x1d4)];return _0x3e297f[_0x32f551(0x1cb)](_0x3baaaf=>{const _0x3837cd=_0x32f551;let _0x2eb599=0x0;for(let _0xfc3268 of _0x178e9f){const _0x82bb7d=_0x3837cd(0x17e)+_0x2eb599;if(_0xfc3268[_0x3837cd(0x178)][_0x3837cd(0x1ce)]){const _0x23ef7e=_0xfc3268[_0x3837cd(0x178)][_0x3837cd(0x1bd)](({item:_0x182ef1})=>!_0x3e297f[_0x3837cd(0x182)][_0x3837cd(0x180)](_0x182ef1),{'boundaries':_0xfc3268});_0xfc3268=_0x3baaaf[_0x3837cd(0x187)](_0x23ef7e,_0xfc3268[_0x3837cd(0x1d0)]);}_0x3baaaf[_0x3837cd(0x1bf)](_0x82bb7d,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xfc3268}),_0x2eb599++;}}),window[_0x32f551(0x179)]()?.[_0x32f551(0x1b1)](),!0x0;}[_0x188a0d(0x1ca)](_0x2fcdf0){const _0x4a93d1=_0x188a0d;if(this[_0x4a93d1(0x1d1)]!=_0x2fcdf0)return!0x1;this[_0x4a93d1(0x1d1)]=null,this[_0x4a93d1(0x1da)]=!0x1;const _0x486332=_0x988298(this[_0x4a93d1(0x19c)]),_0x16020e=_0x486332[_0x4a93d1(0x1d4)][_0x4a93d1(0x1db)][_0x4a93d1(0x1a0)](_0x4a93d1(0x199));return _0x486332[_0x4a93d1(0x1d4)][_0x4a93d1(0x1cb)](_0x437427=>{const _0x3c6044=_0x4a93d1;for(const _0xa34e7e of _0x16020e)_0x437427[_0x3c6044(0x17b)](_0xa34e7e);}),!0x0;}[_0x188a0d(0x192)](_0x52ec12){const _0x5e9d59=_0x188a0d,_0x113df9=_0x988298(this[_0x5e9d59(0x19c)]),_0x1837c0=_0x113df9[_0x5e9d59(0x183)][_0x5e9d59(0x1ab)](_0x52ec12),_0x41afd0=new _0x3687dc(_0x113df9[_0x5e9d59(0x1df)][_0x5e9d59(0x18f)][_0x5e9d59(0x186)]);return this[_0x5e9d59(0x18b)](_0x1837c0,_0x41afd0),_0x1837c0;}[_0x188a0d(0x18b)](_0x34f992,_0x2d3162){const _0x5025d7=_0x188a0d;let _0xcf4210=!0x1;const _0x3bce59=new Set();for(const _0x2f9e0a of _0x34f992[_0x5025d7(0x1d6)]()){const _0x540d62=_0x2f9e0a['is'](_0x5025d7(0x198))||_0x2f9e0a['is'](_0x5025d7(0x1c3));if(!_0x2f9e0a['is'](_0x5025d7(0x176)))continue;(this[_0x5025d7(0x18b)](_0x2f9e0a,_0x2d3162)||_0x540d62)&&(_0x2d3162[_0x5025d7(0x1a8)](_0x5025d7(0x1af),this[_0x5025d7(0x1c1)](_0x3bce59),_0x2f9e0a),_0xcf4210=!0x0);}return _0xcf4210;}[_0x188a0d(0x1c1)](_0x5580c6){const _0x226248=_0x188a0d;let _0x46a3d1;do{_0x46a3d1='';for(let _0x1259d2=0x0;_0x1259d2<0x4;_0x1259d2++)_0x46a3d1+=String[_0x226248(0x17a)](0x61+Math[_0x226248(0x1b4)](0x1a*Math[_0x226248(0x1cf)]()));}while(_0x5580c6[_0x226248(0x197)](_0x46a3d1));return _0x5580c6[_0x226248(0x1d5)](_0x46a3d1),_0x46a3d1;}[_0x188a0d(0x18a)](){const _0x21e5cb=_0x188a0d,{model:_0x596007}=_0x988298(this[_0x21e5cb(0x19c)]),_0x493d57=_0x596007[_0x21e5cb(0x186)][_0x21e5cb(0x1ae)],_0x2add03=_0x596007[_0x21e5cb(0x1d8)](_0x493d57),_0x56cc81=[],_0x16b315=_0x596007[_0x21e5cb(0x19a)](_0x2add03)[_0x21e5cb(0x1ba)]();for(const {item:_0x333355}of _0x16b315)_0x333355['is'](_0x21e5cb(0x1a4))?_0x56cc81[_0x21e5cb(0x17f)](_0x333355[_0x21e5cb(0x183)]):_0x333355['is'](_0x21e5cb(0x176))&&_0x56cc81[_0x21e5cb(0x1d3)]>0x0&&'\x20'!==_0x56cc81[_0x56cc81[_0x21e5cb(0x1d3)]-0x1]&&_0x56cc81[_0x21e5cb(0x17f)]('\x20');return'\x22'+_0x56cc81[_0x21e5cb(0x1de)]('')[_0x21e5cb(0x1d9)]()+'\x22';}[_0x188a0d(0x19f)](){const _0x277f4d=_0x188a0d,_0x85a2e1=_0x988298(this[_0x277f4d(0x19c)])[_0x277f4d(0x1d4)];return Array[_0x277f4d(0x1c7)](_0x85a2e1[_0x277f4d(0x1db)][_0x277f4d(0x1a0)](_0x277f4d(0x199)))[_0x277f4d(0x189)]((_0x42072f,_0x4831e9)=>_0x42072f[_0x277f4d(0x185)]()[_0x277f4d(0x1c2)](_0x4831e9[_0x277f4d(0x185)]())?-0x1:_0x42072f[_0x277f4d(0x185)]()[_0x277f4d(0x1a2)](_0x4831e9[_0x277f4d(0x185)]())?0x1:0x0);}}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
export declare const CAPABILITIES_MODEL_EVENT_NAMES: readonly ["capabilitiesUpdated"];
|
|
6
|
+
declare const AICapabilities_base: {
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Manages the AI capabilities configuration and state.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AICapabilities extends /* #__PURE__ */ AICapabilities_base {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Initializes the capabilities.
|
|
17
|
+
*/
|
|
18
|
+
init(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Resets the capabilities configuration to default state.
|
|
21
|
+
*/
|
|
22
|
+
reset(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the current capabilities configuration.
|
|
25
|
+
*
|
|
26
|
+
* @returns The current capabilities configuration.
|
|
27
|
+
*/
|
|
28
|
+
getCapabilitiesConfig(): AICapabilitiesConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Converts capabilities configuration to request data format for API endpoint.
|
|
31
|
+
* @returns The request data or undefined if no capabilities are enabled.
|
|
32
|
+
*/
|
|
33
|
+
static getCapabilitiesRequestData(config: AICapabilitiesConfig | undefined): AICapabilitiesRequestData;
|
|
34
|
+
/**
|
|
35
|
+
* Toggles the web search enabled state.
|
|
36
|
+
*/
|
|
37
|
+
toggleWebSearch(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Toggles the reasoning enabled state.
|
|
40
|
+
*/
|
|
41
|
+
toggleReasoning(): void;
|
|
42
|
+
}
|
|
43
|
+
export type AICapabilitiesUpdatedEvent = {
|
|
44
|
+
name: 'capabilitiesUpdated';
|
|
45
|
+
args: [AICapabilitiesConfig];
|
|
46
|
+
};
|
|
47
|
+
export type AICapabilitiesConfig = {
|
|
48
|
+
isWebSearchEnabled: boolean;
|
|
49
|
+
isReasoningEnabled: boolean;
|
|
50
|
+
};
|
|
51
|
+
export type AICapabilitiesRequestData = {
|
|
52
|
+
webSearch?: object;
|
|
53
|
+
reasoning?: object;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x1210(){const _0x5c14ff=['4885760blOABF','_isWebSearchEnabled','15IZeKvm','getCapabilitiesRequestData','142916zrOGPB','fire','toggleReasoning','reasoning','1602195eKyEQv','isWebSearchEnabled','_isReasoningEnabled','reset','init','2918220AplAiE','webSearch','toggleWebSearch','capabilitiesUpdated','getCapabilitiesConfig','2050612IGVNOi','18FuaSbk','186382oMCDYG','setReasoning','5grFllQ','3310768EyKjfc','setWebSearch','isReasoningEnabled'];_0x1210=function(){return _0x5c14ff;};return _0x1210();}function _0x4dd7(_0x374883,_0x4930f6){const _0x1210a0=_0x1210();return _0x4dd7=function(_0x4dd756,_0x248b34){_0x4dd756=_0x4dd756-0x14d;let _0x47eec9=_0x1210a0[_0x4dd756];return _0x47eec9;},_0x4dd7(_0x374883,_0x4930f6);}const _0x4283d4=_0x4dd7;(function(_0x3aa87d,_0x3f73ae){const _0x103313=_0x4dd7,_0x2d2387=_0x3aa87d();while(!![]){try{const _0x25c89b=-parseInt(_0x103313(0x15c))/0x1+parseInt(_0x103313(0x166))/0x2*(-parseInt(_0x103313(0x164))/0x3)+parseInt(_0x103313(0x15a))/0x4*(parseInt(_0x103313(0x15e))/0x5)+-parseInt(_0x103313(0x155))/0x6+parseInt(_0x103313(0x150))/0x7+-parseInt(_0x103313(0x15f))/0x8+parseInt(_0x103313(0x15b))/0x9*(parseInt(_0x103313(0x162))/0xa);if(_0x25c89b===_0x3f73ae)break;else _0x2d2387['push'](_0x2d2387['shift']());}catch(_0x289591){_0x2d2387['push'](_0x2d2387['shift']());}}}(_0x1210,0x43172));import{EmitterMixin as _0xd4ba19}from'ckeditor5/src/utils.js';export const CAPABILITIES_MODEL_EVENT_NAMES=[_0x4283d4(0x158)];export class AICapabilities extends _0xd4ba19(){[_0x4283d4(0x163)];[_0x4283d4(0x152)];constructor(){const _0x1b9e4a=_0x4283d4;super(),this[_0x1b9e4a(0x163)]=!0x1,this[_0x1b9e4a(0x152)]=!0x1;}[_0x4283d4(0x154)](){const _0x4b599e=_0x4283d4;this[_0x4b599e(0x153)]();}[_0x4283d4(0x153)](){const _0x36e33a=_0x4283d4;this[_0x36e33a(0x160)](!0x1),this[_0x36e33a(0x15d)](!0x1);}[_0x4283d4(0x159)](){const _0x2c06d5=_0x4283d4;return{'isWebSearchEnabled':this[_0x2c06d5(0x163)],'isReasoningEnabled':this[_0x2c06d5(0x152)]};}static[_0x4283d4(0x165)](_0x30322f){const _0x572450=_0x4283d4,_0x1e0c8c={};return _0x30322f&&_0x30322f[_0x572450(0x151)]&&(_0x1e0c8c[_0x572450(0x156)]={}),_0x30322f&&_0x30322f[_0x572450(0x161)]&&(_0x1e0c8c[_0x572450(0x14f)]={}),_0x1e0c8c;}[_0x4283d4(0x157)](){const _0x58c534=_0x4283d4;this[_0x58c534(0x160)](!this[_0x58c534(0x163)]);}[_0x4283d4(0x14e)](){const _0x5e04bb=_0x4283d4;this[_0x5e04bb(0x15d)](!this[_0x5e04bb(0x152)]);}[_0x4283d4(0x160)](_0x275eb){const _0x265d5a=_0x4283d4;_0x275eb!==this[_0x265d5a(0x163)]&&(this[_0x265d5a(0x163)]=_0x275eb,this[_0x265d5a(0x14d)](_0x265d5a(0x158),this[_0x265d5a(0x159)]()));}[_0x4283d4(0x15d)](_0x157711){const _0x296004=_0x4283d4;_0x157711!==this[_0x296004(0x152)]&&(this[_0x296004(0x152)]=_0x157711,this[_0x296004(0x14d)](_0x296004(0x158),this[_0x296004(0x159)]()));}}
|
|
@@ -0,0 +1,53 @@
|
|
|
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/model/aicontext
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The type of context item.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum AIContextItemType {
|
|
12
|
+
FILE = "file",
|
|
13
|
+
DOCUMENT = "document",
|
|
14
|
+
URL = "web-resource",
|
|
15
|
+
TEXT = "text",
|
|
16
|
+
SELECTION = "selection"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The type of text resource.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum AIContextTextResourceType {
|
|
22
|
+
TEXT = "text",
|
|
23
|
+
MARKDOWN = "markdown",
|
|
24
|
+
HTML = "html"
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A context item.
|
|
28
|
+
*/
|
|
29
|
+
export type AIContextItem = AIContextItemRequestData & {
|
|
30
|
+
label: string;
|
|
31
|
+
uiId: string;
|
|
32
|
+
resourceId?: string;
|
|
33
|
+
isReadOnly?: boolean;
|
|
34
|
+
version?: number;
|
|
35
|
+
hidden?: boolean;
|
|
36
|
+
sessionId?: string | null;
|
|
37
|
+
selection?: Array<{
|
|
38
|
+
start: number;
|
|
39
|
+
end: number;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A context item request data for using in the {@link module:ai/aicore/aiconnector~AIConnector}.
|
|
44
|
+
*/
|
|
45
|
+
export type AIContextItemRequestData = {
|
|
46
|
+
type: AIContextItemType;
|
|
47
|
+
content?: string;
|
|
48
|
+
id?: string;
|
|
49
|
+
selection?: Array<{
|
|
50
|
+
start: number;
|
|
51
|
+
end: number;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x5b33(_0x410b09,_0x42e273){var _0x448b73=_0x448b();return _0x5b33=function(_0x5b335c,_0x5d2398){_0x5b335c=_0x5b335c-0x1ae;var _0x1cc34f=_0x448b73[_0x5b335c];return _0x1cc34f;},_0x5b33(_0x410b09,_0x42e273);}(function(_0x44f853,_0x57ad80){var _0x3f0afb=_0x5b33,_0x2c49bf=_0x44f853();while(!![]){try{var _0x1fbe60=-parseInt(_0x3f0afb(0x1bb))/0x1*(-parseInt(_0x3f0afb(0x1b5))/0x2)+parseInt(_0x3f0afb(0x1c5))/0x3*(-parseInt(_0x3f0afb(0x1b4))/0x4)+-parseInt(_0x3f0afb(0x1b9))/0x5+-parseInt(_0x3f0afb(0x1bd))/0x6+parseInt(_0x3f0afb(0x1be))/0x7*(parseInt(_0x3f0afb(0x1c4))/0x8)+-parseInt(_0x3f0afb(0x1c1))/0x9+-parseInt(_0x3f0afb(0x1c3))/0xa;if(_0x1fbe60===_0x57ad80)break;else _0x2c49bf['push'](_0x2c49bf['shift']());}catch(_0x5001cf){_0x2c49bf['push'](_0x2c49bf['shift']());}}}(_0x448b,0x4a347));export var AIContextItemType;!function(_0xf606bd){var _0x25aa67=_0x5b33;_0xf606bd[_0x25aa67(0x1bc)]=_0x25aa67(0x1ba),_0xf606bd[_0x25aa67(0x1b1)]=_0x25aa67(0x1b2),_0xf606bd[_0x25aa67(0x1b6)]=_0x25aa67(0x1ae),_0xf606bd[_0x25aa67(0x1bf)]=_0x25aa67(0x1af),_0xf606bd[_0x25aa67(0x1b8)]=_0x25aa67(0x1c0);}(AIContextItemType||(AIContextItemType={}));function _0x448b(){var _0xe10b66=['file','18986duQofA','FILE','1965456wHZRwu','1049965drXKAS','TEXT','selection','868257gPuKCl','MARKDOWN','2466340OoaVLN','32OhOgJc','53832rzwTju','web-resource','text','markdown','DOCUMENT','document','html','44JNvNtb','62IfTtCu','URL','HTML','SELECTION','82680uXHtnO'];_0x448b=function(){return _0xe10b66;};return _0x448b();}export var AIContextTextResourceType;!function(_0x2ee0ce){var _0x98ec17=_0x5b33;_0x2ee0ce[_0x98ec17(0x1bf)]=_0x98ec17(0x1af),_0x2ee0ce[_0x98ec17(0x1c2)]=_0x98ec17(0x1b0),_0x2ee0ce[_0x98ec17(0x1b7)]=_0x98ec17(0x1b3);}(AIContextTextResourceType||(AIContextTextResourceType={}));
|
|
@@ -0,0 +1,135 @@
|
|
|
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 AIConnectorRequest, type AIConnector } from '../aiconnector.js';
|
|
6
|
+
import { AIReply } from './aireply.js';
|
|
7
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
8
|
+
import { type AIContextItem } from './aicontext.js';
|
|
9
|
+
export declare const AI_MODEL_EVENT_NAMES: readonly ["interactionCreated", "interactionStarted", "interactionStopped", "interactionFinished", "interactionDestroyed", "replyCreated", "replyContentUpdated", "replyChangeGroupStateUpdated", "setConversationTitle", "error"];
|
|
10
|
+
declare const AIInteraction_base: {
|
|
11
|
+
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
12
|
+
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* An interaction is a single request to the AI endpoint. It is created when a user message is sent and finishes when the
|
|
16
|
+
* interaction is stopped.
|
|
17
|
+
*
|
|
18
|
+
* An interaction hosts a collection of {@link module:ai/aicore/model/aireply~AIReply replies}.
|
|
19
|
+
*
|
|
20
|
+
* There's a {@link module:ai/aicore/model/aiinteraction~AIInteraction#currentReply current reply} in the interaction
|
|
21
|
+
* that is the reply that is currently being processed by the AI.
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class AIInteraction extends /* #__PURE__ */ AIInteraction_base {
|
|
24
|
+
/**
|
|
25
|
+
* The unique ID of the interaction.
|
|
26
|
+
*/
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The AI endpoint replies to the user message.
|
|
30
|
+
*/
|
|
31
|
+
replies: Array<AIReply>;
|
|
32
|
+
constructor({ connector, editor }: AIInteractionOptions);
|
|
33
|
+
/**
|
|
34
|
+
* Sends the request to the AI endpoint.
|
|
35
|
+
*/
|
|
36
|
+
abstract sendRequest(): Promise<AIConnectorRequest>;
|
|
37
|
+
/**
|
|
38
|
+
* Gets the document context for further processing (merging, displaying changes, applying changes, etc.).
|
|
39
|
+
*/
|
|
40
|
+
abstract getDocumentContext(): AIContextItem | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Starts the interaction. It sends the user message to the AI endpoint and starts listening for replies.
|
|
43
|
+
*
|
|
44
|
+
* * It fires the {@link #userMessage event} with the user message.
|
|
45
|
+
* * It fires {@link #newReply events} during the interaction as new replies are received from the AI endpoint.
|
|
46
|
+
*
|
|
47
|
+
* Interaction can be stopped by calling the {@link #stop} method.
|
|
48
|
+
*/
|
|
49
|
+
start(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Stops the interaction. It marks the last reply as done and aborts the current request to the AI endpoint.
|
|
52
|
+
*/
|
|
53
|
+
stop(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Gets a reply by its ID.
|
|
56
|
+
*/
|
|
57
|
+
getReply(id: string): AIReply | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Destroys the interaction. It marks the last reply as done and aborts the current request to the AI endpoint.
|
|
60
|
+
*/
|
|
61
|
+
destroy(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a reply and adds it to the interaction.
|
|
64
|
+
*/
|
|
65
|
+
createReply(options: ConstructorParameters<typeof AIReply>[0]): AIReply;
|
|
66
|
+
/**
|
|
67
|
+
* Fires an event to set the conversation title.
|
|
68
|
+
*
|
|
69
|
+
* @param title The new title of the conversation.
|
|
70
|
+
* @param shouldAnimate Whether the title change should be animated. Defaults to `false`.
|
|
71
|
+
*/
|
|
72
|
+
setConversationTitle(title: string, shouldAnimate?: boolean): void;
|
|
73
|
+
}
|
|
74
|
+
export type AIInteractionOptions = {
|
|
75
|
+
connector: AIConnector;
|
|
76
|
+
editor?: Editor;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when started, which means that
|
|
80
|
+
* the request to the AI endpoint has been sent.
|
|
81
|
+
*
|
|
82
|
+
* @eventName ~AIInteraction#interactionStarted
|
|
83
|
+
*/
|
|
84
|
+
export type AIInteractionStartedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
85
|
+
name: 'interactionStarted';
|
|
86
|
+
args: [interaction: TInteraction];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when a user stopped
|
|
90
|
+
* the current interaction.
|
|
91
|
+
*
|
|
92
|
+
* @eventName ~AIInteraction#interactionStopped
|
|
93
|
+
*/
|
|
94
|
+
export type AIInteractionStoppedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
95
|
+
name: 'interactionStopped';
|
|
96
|
+
args: [interaction: TInteraction];
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when an interaction
|
|
100
|
+
* ran out of content to process or crashed during processing.
|
|
101
|
+
*
|
|
102
|
+
* @eventName ~AIInteraction#interactionFinished
|
|
103
|
+
*/
|
|
104
|
+
export type AIInteractionFinishedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
105
|
+
name: 'interactionFinished';
|
|
106
|
+
args: [interaction: TInteraction];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when it is destroyed.
|
|
110
|
+
*
|
|
111
|
+
* @eventName ~AIInteraction#interactionDestroyed
|
|
112
|
+
*/
|
|
113
|
+
export type AIInteractionDestroyedEvent<TInteraction extends AIInteraction = AIInteraction> = {
|
|
114
|
+
name: 'interactionDestroyed';
|
|
115
|
+
args: [interaction: TInteraction];
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when an AI reply is added to the
|
|
119
|
+
* interaction (usually because received from the AI endpoint).
|
|
120
|
+
*
|
|
121
|
+
* @eventName ~AIInteraction#replyCreated
|
|
122
|
+
*/
|
|
123
|
+
export type AIInteractionReplyCreatedEvent = {
|
|
124
|
+
name: 'replyCreated';
|
|
125
|
+
args: [reply: AIReply];
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
|
|
129
|
+
* the title of the conversation needs to be updated.
|
|
130
|
+
*/
|
|
131
|
+
export type AISetConversationTitleEvent = {
|
|
132
|
+
name: 'setConversationTitle';
|
|
133
|
+
args: [title: string, shouldAnimate?: boolean];
|
|
134
|
+
};
|
|
135
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x482e(_0x4bfdbf,_0x435cf1){const _0x4aa09a=_0x4aa0();return _0x482e=function(_0x482eab,_0x8019f7){_0x482eab=_0x482eab-0x1cf;let _0x25552d=_0x4aa09a[_0x482eab];return _0x25552d;},_0x482e(_0x4bfdbf,_0x435cf1);}const _0x56fe30=_0x482e;(function(_0x1a935c,_0x3ec712){const _0x57cd1e=_0x482e,_0x12b45a=_0x1a935c();while(!![]){try{const _0x226c2b=-parseInt(_0x57cd1e(0x1e4))/0x1*(-parseInt(_0x57cd1e(0x203))/0x2)+-parseInt(_0x57cd1e(0x207))/0x3*(-parseInt(_0x57cd1e(0x204))/0x4)+-parseInt(_0x57cd1e(0x1fb))/0x5*(parseInt(_0x57cd1e(0x1d3))/0x6)+parseInt(_0x57cd1e(0x1fc))/0x7+parseInt(_0x57cd1e(0x1e9))/0x8*(-parseInt(_0x57cd1e(0x1f4))/0x9)+parseInt(_0x57cd1e(0x1d4))/0xa*(parseInt(_0x57cd1e(0x1e3))/0xb)+-parseInt(_0x57cd1e(0x206))/0xc;if(_0x226c2b===_0x3ec712)break;else _0x12b45a['push'](_0x12b45a['shift']());}catch(_0x47d4c5){_0x12b45a['push'](_0x12b45a['shift']());}}}(_0x4aa0,0xed7d7));function _0x4aa0(){const _0x424b0b=['appendContent','interactionStopped','abortController','3501HADTNI','replyContentUpdated','interactionDestroyed','ai-interaction-invalid-event-type','delegate','length','interactionCreated','3444305USRSAD','10947566dgteLb','connector','event','content','conversationTitle','replyChangeGroupStateUpdated','done','170qLXmEn','2972TSIIjs','forEach','2812020OESXPL','873ezovyO','interactionFinished','sources','source','isStopped','currentRequest','12wJJqzg','45550cNRMwp','find','textDelta','data','currentReply','replies','stopListening','destroy','push','editor','stop','replyCreated','start','fire','getReply','2057IYIkMI','19605jGhmFY','getDocumentContext','interactionStarted','error','_finalizeInteraction','35240ZjOXRn','getStream','abort','createReply','setConversationTitle','splice','sendRequest','isDestroyed'];_0x4aa0=function(){return _0x424b0b;};return _0x4aa0();}import{EmitterMixin as _0x3a7265,logWarning as _0x415c99,uid as _0x1fafe0}from'ckeditor5/src/utils.js';import{AIReply as _0x1ab1d6,isIgnoredReplyType as _0x2745ef,isValidReplyType as _0x3dbe98,isReplyTitleType as _0x3329d0,isSourceType as _0x8966d1}from'./aireply.js';export const AI_MODEL_EVENT_NAMES=[_0x56fe30(0x1fa),_0x56fe30(0x1e6),_0x56fe30(0x1f2),_0x56fe30(0x208),_0x56fe30(0x1f6),_0x56fe30(0x1df),_0x56fe30(0x1f5),_0x56fe30(0x201),_0x56fe30(0x1ed),_0x56fe30(0x1e7)];export class AIInteraction extends _0x3a7265(){['id'];[_0x56fe30(0x1d9)]=[];[_0x56fe30(0x1d8)];[_0x56fe30(0x1d2)];[_0x56fe30(0x1fd)];[_0x56fe30(0x1d1)]=!0x1;[_0x56fe30(0x1f0)]=!0x1;[_0x56fe30(0x1dd)];constructor({connector:_0x5b746d,editor:_0x3bb72a}){const _0x3d8662=_0x56fe30;super(),this['id']=_0x1fafe0(),this[_0x3d8662(0x1fd)]=_0x5b746d,this[_0x3d8662(0x1d1)]=!0x0,this[_0x3d8662(0x1dd)]=_0x3bb72a;}async[_0x56fe30(0x1e0)](){const _0x5680cd=_0x56fe30;let _0x3630fb;this[_0x5680cd(0x1d1)]=!0x1;try{this[_0x5680cd(0x1d2)]=await this[_0x5680cd(0x1ef)](),this[_0x5680cd(0x1e1)](_0x5680cd(0x1e6),this);const _0x2babde=await this[_0x5680cd(0x1d2)][_0x5680cd(0x1ea)](),_0x468816=[];for await(const _0x4e7712 of _0x2babde){if(this[_0x5680cd(0x1d1)])return;_0x3329d0(_0x4e7712[_0x5680cd(0x1fe)])&&this[_0x5680cd(0x1ed)](_0x4e7712[_0x5680cd(0x1d7)][_0x5680cd(0x200)],!0x0),_0x8966d1(_0x4e7712[_0x5680cd(0x1fe)])?_0x468816[_0x5680cd(0x1dc)](_0x4e7712[_0x5680cd(0x1d7)][_0x5680cd(0x1d0)]):_0x3dbe98(_0x4e7712[_0x5680cd(0x1fe)])?(_0x4e7712[_0x5680cd(0x1fe)]!==_0x3630fb&&(this[_0x5680cd(0x1d8)]&&this[_0x5680cd(0x1d8)][_0x5680cd(0x202)](),this[_0x5680cd(0x1d8)]=this[_0x5680cd(0x1ec)]({'type':_0x4e7712[_0x5680cd(0x1fe)],'interactionId':this['id']}),_0x468816[_0x5680cd(0x1f9)]>0x0&&(this[_0x5680cd(0x1d8)][_0x5680cd(0x1cf)]=_0x468816[_0x5680cd(0x1ee)](0x0)),_0x3630fb=_0x4e7712[_0x5680cd(0x1fe)]),this[_0x5680cd(0x1d8)][_0x5680cd(0x1f1)](_0x4e7712[_0x5680cd(0x1d7)][_0x5680cd(0x1d6)])):_0x2745ef(_0x4e7712[_0x5680cd(0x1fe)])||_0x415c99(_0x5680cd(0x1f7),{'chunk':_0x4e7712});}}finally{this[_0x5680cd(0x1d1)]||(this[_0x5680cd(0x1e8)](),this[_0x5680cd(0x1e1)](_0x5680cd(0x208),this));}}[_0x56fe30(0x1de)](){const _0x49eec1=_0x56fe30;this[_0x49eec1(0x1d1)]||(this[_0x49eec1(0x1e8)](),this[_0x49eec1(0x1e1)](_0x49eec1(0x1f2),this));}[_0x56fe30(0x1e2)](_0x658ab){const _0x104a27=_0x56fe30;return this[_0x104a27(0x1d9)][_0x104a27(0x1d5)](_0x3094e0=>_0x3094e0['id']===_0x658ab);}[_0x56fe30(0x1db)](){const _0x5e8976=_0x56fe30;this[_0x5e8976(0x1f0)]||(this[_0x5e8976(0x1de)](),this[_0x5e8976(0x1d9)][_0x5e8976(0x205)](_0x113705=>_0x113705[_0x5e8976(0x1db)]()),this[_0x5e8976(0x1d9)]=[],this[_0x5e8976(0x1f0)]=!0x0,this[_0x5e8976(0x1e1)](_0x5e8976(0x1f6),this),this[_0x5e8976(0x1da)]());}[_0x56fe30(0x1ec)](_0x3908b4){const _0x3894a6=_0x56fe30,_0x7d198e=new _0x1ab1d6({'editor':this[_0x3894a6(0x1dd)],'documentContextContent':this[_0x3894a6(0x1e5)]()?.[_0x3894a6(0x1ff)],..._0x3908b4});return this[_0x3894a6(0x1d9)][_0x3894a6(0x1dc)](_0x7d198e),_0x7d198e[_0x3894a6(0x1f8)](...AI_MODEL_EVENT_NAMES)['to'](this),this[_0x3894a6(0x1e1)](_0x3894a6(0x1df),_0x7d198e),_0x7d198e;}[_0x56fe30(0x1ed)](_0x2e06c8,_0x1ee4a3=!0x1){const _0x4e3774=_0x56fe30;this[_0x4e3774(0x1e1)](_0x4e3774(0x1ed),_0x2e06c8,_0x1ee4a3);}[_0x56fe30(0x1e8)](){const _0x17a7ab=_0x56fe30;this[_0x17a7ab(0x1d1)]=!0x0,this[_0x17a7ab(0x1d2)]&&this[_0x17a7ab(0x1d2)][_0x17a7ab(0x1f3)][_0x17a7ab(0x1eb)](),this[_0x17a7ab(0x1d8)]&&this[_0x17a7ab(0x1d8)][_0x17a7ab(0x202)](),this[_0x17a7ab(0x1d2)]=this[_0x17a7ab(0x1d8)]=void 0x0;}}
|
|
@@ -0,0 +1,178 @@
|
|
|
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 { Element, Document } from '../utils/htmlparser.js';
|
|
6
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
7
|
+
import { type AISuggestionContentPartDefinition } from '../utils/getsuggestionpartsfromreply.js';
|
|
8
|
+
/**
|
|
9
|
+
* The reply types that are provided by the AI endpoint.
|
|
10
|
+
*/
|
|
11
|
+
export declare const AI_REPLY_TYPES: readonly ["modification-delta", "text-delta"];
|
|
12
|
+
/**
|
|
13
|
+
* The reply types that are intentionally ignored.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AI_REPLY_TYPES_IGNORED: readonly ["reasoning"];
|
|
16
|
+
/**
|
|
17
|
+
* The type of the reply that is responsible for the conversation title.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AI_REPLY_TITLE_TYPE = "conversation-title";
|
|
20
|
+
/**
|
|
21
|
+
* The type of the reply. It can be one of the following:
|
|
22
|
+
*
|
|
23
|
+
* * `modification-delta`: A content change suggestion made by the AI endpoint.
|
|
24
|
+
* * `text-delta`: A generic text response.
|
|
25
|
+
* * `source`: A source used by web search reply.
|
|
26
|
+
*/
|
|
27
|
+
export type AIReplyType = (typeof AI_REPLY_TYPES)[number];
|
|
28
|
+
declare const AIReply_base: {
|
|
29
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
30
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Represents a single reply from the AI endpoint.
|
|
34
|
+
*
|
|
35
|
+
* A reply's {@link #content} can be updated using the {@link #appendContent} method.
|
|
36
|
+
*/
|
|
37
|
+
export declare class AIReply extends /* #__PURE__ */ AIReply_base {
|
|
38
|
+
/**
|
|
39
|
+
* The ID of the reply.
|
|
40
|
+
*/
|
|
41
|
+
readonly id: string;
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the interaction that the reply belongs to.
|
|
44
|
+
*/
|
|
45
|
+
readonly interactionId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The type of the reply.
|
|
48
|
+
*/
|
|
49
|
+
readonly type: AIReplyType;
|
|
50
|
+
/**
|
|
51
|
+
* The content of the reply as received from AI endpoint.
|
|
52
|
+
*/
|
|
53
|
+
content: string;
|
|
54
|
+
/**
|
|
55
|
+
* The sources of the reply. Used for web search reply.
|
|
56
|
+
*/
|
|
57
|
+
sources: Array<AIReplySource>;
|
|
58
|
+
/**
|
|
59
|
+
* The parsed content of the reply.
|
|
60
|
+
*/
|
|
61
|
+
parsedContent: Document;
|
|
62
|
+
/**
|
|
63
|
+
* The parsed content of the reply after merging with the current document context.
|
|
64
|
+
*/
|
|
65
|
+
parsedMergedContent: Document;
|
|
66
|
+
/**
|
|
67
|
+
* TODO
|
|
68
|
+
*/
|
|
69
|
+
changeGroups: Array<AIReplyChangeGroup>;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the reply is done. The reply is done once the AI endpoint emitted the last chunk of the content
|
|
72
|
+
* that matches the reply's type.
|
|
73
|
+
*/
|
|
74
|
+
isDone: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The document context of the reply.
|
|
77
|
+
*/
|
|
78
|
+
documentContextContent: Document;
|
|
79
|
+
/**
|
|
80
|
+
* @inheritDoc
|
|
81
|
+
*/
|
|
82
|
+
constructor({ type, content, isDone, interactionId, areActionsDisabled, documentContextContent, editor }: {
|
|
83
|
+
type: AIReplyType;
|
|
84
|
+
interactionId: string;
|
|
85
|
+
areActionsDisabled?: boolean;
|
|
86
|
+
content?: string;
|
|
87
|
+
isDone?: boolean;
|
|
88
|
+
documentContextContent?: string;
|
|
89
|
+
editor?: Editor;
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* Appends new content to the reply.
|
|
93
|
+
*
|
|
94
|
+
* See {@link #content} for more information.
|
|
95
|
+
*/
|
|
96
|
+
appendContent(content: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Marks the reply as done.
|
|
99
|
+
*
|
|
100
|
+
* See {@link #isDone} for more information.
|
|
101
|
+
*/
|
|
102
|
+
done(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Destroys the reply.
|
|
105
|
+
*/
|
|
106
|
+
destroy(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Changes the state of change group at `index` to `state`.
|
|
109
|
+
*
|
|
110
|
+
* Fires event.
|
|
111
|
+
*/
|
|
112
|
+
setChangeGroupState(index: number, state: AIReplyChangeGroupState): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Validates if the given reply type (SSE type) is a valid reply type.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isValidReplyType(type: string | undefined): type is AIReplyType;
|
|
118
|
+
/**
|
|
119
|
+
* Checks whether the given reply type is ignored.
|
|
120
|
+
*/
|
|
121
|
+
export declare function isIgnoredReplyType(type: string | undefined): type is AIReplyType;
|
|
122
|
+
/**
|
|
123
|
+
* Checks whether the given reply type is a title reply.
|
|
124
|
+
*
|
|
125
|
+
* @param type The reply type to check.
|
|
126
|
+
* @returns True when the reply type is a title reply, otherwise false.
|
|
127
|
+
*/
|
|
128
|
+
export declare function isReplyTitleType(type: string | undefined): boolean;
|
|
129
|
+
export declare function isSourceType(type: string | undefined): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* An event emitted by an {@link module:ai/aicore/model/aireply~AIReply} when it's
|
|
132
|
+
* {@link module:ai/aicore/model/aireply~AIReply#content} gets updated or the reply is marked as done.
|
|
133
|
+
*
|
|
134
|
+
* @eventName ~AIReply#replyContentUpdated
|
|
135
|
+
*/
|
|
136
|
+
export type AIReplyContentUpdatedEvent = {
|
|
137
|
+
name: 'replyContentUpdated';
|
|
138
|
+
args: [
|
|
139
|
+
reply: AIReply,
|
|
140
|
+
updatedChangeGroups?: Array<AIReplyChangeGroup>
|
|
141
|
+
];
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* An event emitted by an {@link module:ai/aicore/model/aireply~AIReply} when it's
|
|
145
|
+
* {@link module:ai/aicore/model/aireply~AIReply#content} gets updated or the reply is marked as done.
|
|
146
|
+
*
|
|
147
|
+
* @eventName ~AIReply#replyContentUpdated
|
|
148
|
+
*/
|
|
149
|
+
export type AIReplyChangeGroupStateUpdated = {
|
|
150
|
+
name: 'replyChangeGroupStateUpdated';
|
|
151
|
+
args: [
|
|
152
|
+
{
|
|
153
|
+
reply: AIReply;
|
|
154
|
+
index: number;
|
|
155
|
+
state: AIReplyChangeGroupState;
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
};
|
|
159
|
+
export type AIReplyHotNode = {
|
|
160
|
+
node: Element;
|
|
161
|
+
id: string;
|
|
162
|
+
type: AISuggestionContentPartDefinition['type'];
|
|
163
|
+
anchorId?: string | null;
|
|
164
|
+
};
|
|
165
|
+
export type AIReplyChangeGroup = {
|
|
166
|
+
readonly changes: Array<AIReplyHotNode>;
|
|
167
|
+
readonly index: number;
|
|
168
|
+
state: AIReplyChangeGroupState;
|
|
169
|
+
};
|
|
170
|
+
export type AIReplyChangeGroupState = 'pending' | 'accepted' | 'rejected';
|
|
171
|
+
export type AIReplySource = {
|
|
172
|
+
type: string;
|
|
173
|
+
id: string;
|
|
174
|
+
url: string;
|
|
175
|
+
title: string;
|
|
176
|
+
favicon: string;
|
|
177
|
+
};
|
|
178
|
+
export {};
|