@ckeditor/ckeditor5-ai 47.6.1 → 48.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 +2 -1
- package/ckeditor5-metadata.json +10 -10
- package/dist/aiactions/aiactions.d.ts +90 -0
- package/{src → dist}/aiactions/model/aiactionsinteraction.d.ts +2 -2
- package/{src → dist}/aiassistant/adapters/aiadapter.d.ts +1 -1
- package/{src → dist}/aiassistant/adapters/aitextadapter.d.ts +1 -1
- package/{src → dist}/aiassistant/adapters/awstextadapter.d.ts +2 -2
- package/{src → dist}/aiassistant/adapters/openaitextadapter.d.ts +2 -2
- package/{src → dist}/aiassistant/aiassistant.d.ts +3 -3
- package/{src → dist}/aiassistant/aiassistantediting.d.ts +2 -2
- package/{src → dist}/aiassistant/aiassistantui.d.ts +3 -3
- package/{src → dist}/aiassistant/ui/aiassistantcontroller.d.ts +3 -3
- package/{src → dist}/aiassistant/ui/form/aiformcontentarea.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/aiformerrorview.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/aiformpromptview.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/aiformtoolbarview.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/aiformview.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/aihistorylistitemview.d.ts +1 -1
- package/{src → dist}/aiassistant/ui/form/aihistorylistview.d.ts +2 -2
- package/{src → dist}/aiassistant/ui/form/prompthistory.d.ts +1 -1
- package/{src → dist}/aiassistant/ui/showaiassistantcommand.d.ts +1 -1
- package/{src → dist}/aiassistant/utils/common-translations.d.ts +1 -1
- package/{src → dist}/aiassistant/utils/normalizecommandsconfig.d.ts +1 -1
- package/{src → dist}/aiballoon/aiballoon.d.ts +2 -2
- package/{src → dist}/aiballoon/ui/aiballoonview.d.ts +2 -2
- package/dist/aichat/aichat.d.ts +95 -0
- package/{src → dist}/aichat/aichatballoon.d.ts +2 -2
- package/{src/aichat/aichat.d.ts → dist/aichat/aichatcontroller.d.ts} +122 -89
- package/{src → dist}/aichat/aichatui.d.ts +5 -5
- package/{src → dist}/aichat/model/aichatcontext.d.ts +91 -17
- package/{src → dist}/aichat/model/aichatconversation.d.ts +4 -4
- package/{src → dist}/aichat/model/aichatinteraction.d.ts +1 -4
- package/{src → dist}/aichat/ui/aichatballoonview.d.ts +2 -2
- package/{src → dist}/aichat/ui/aichatcontrolsview.d.ts +2 -2
- package/{src → dist}/aichat/ui/aichatfeedview.d.ts +2 -2
- package/{src → dist}/aichat/ui/aichatheaderview.d.ts +2 -2
- package/{src → dist}/aichat/ui/aichatview.d.ts +3 -2
- package/{src → dist}/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatcontextitembuttonview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatcontextpanelview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatcontrolsloaderview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatpromptinputview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +1 -1
- package/{src → dist}/aichat/ui/controls/resources/aichatcontextresourceslistview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/resources/aichatcontextresourcesview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +2 -2
- package/{src → dist}/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +2 -2
- package/{src → dist}/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +2 -2
- package/{src → dist}/aichat/ui/feed/aichatfeedcustomelementview.d.ts +7 -1
- package/{src → dist}/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +1 -1
- package/{src → dist}/aichat/ui/feed/aichatfeeditemview.d.ts +1 -1
- package/{src → dist}/aichat/ui/feed/aichatfeedreplyitemview.d.ts +2 -2
- package/{src → dist}/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +2 -2
- package/{src → dist}/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +2 -2
- package/{src → dist}/aichat/ui/feed/aichatfeedusermessageitem.d.ts +2 -2
- package/{src → dist}/aichat/utils/promisequeue.d.ts +2 -2
- package/{src → dist}/aichathistory/aichathistory.d.ts +1 -1
- package/{src → dist}/aichathistory/aichathistorycontroller.d.ts +1 -1
- package/{src → dist}/aichathistory/aichathistoryui.d.ts +1 -1
- package/{src → dist}/aichathistory/model/aichathistoryconversations.d.ts +2 -2
- package/{src → dist}/aichathistory/model/aichathistoryitem.d.ts +2 -2
- package/{src → dist}/aichathistory/ui/aichathistorylistitemview.d.ts +2 -2
- package/{src → dist}/aichathistory/ui/aichathistorylistview.d.ts +1 -1
- package/{src → dist}/aichathistory/ui/aichathistorysectionlistview.d.ts +1 -1
- package/{src → dist}/aichathistory/ui/aichathistoryview.d.ts +2 -2
- package/{src → dist}/aichatshortcuts/aichatshortcuts.d.ts +17 -17
- package/{src → dist}/aichatshortcuts/ui/aichatshortcutsview.d.ts +2 -2
- package/{src → dist}/aichatshortcuts/ui/aichatshortcutview.d.ts +2 -2
- package/{src → dist}/aiconfig.d.ts +7 -9
- package/{src → dist}/aicore/aiconnector.d.ts +4 -12
- package/{src → dist}/aicore/aiediting.d.ts +27 -6
- package/{src → dist}/aicore/model/aicapabilities.d.ts +2 -2
- package/{src → dist}/aicore/model/aiinteraction.d.ts +17 -13
- package/{src → dist}/aicore/model/aimodels.d.ts +6 -4
- package/{src → dist}/aicore/model/aireply.d.ts +12 -50
- package/{src → dist}/aicore/pipeline/airesponseapplier.d.ts +2 -2
- package/{src → dist}/aicore/pipeline/airesponseparser.d.ts +2 -2
- package/{src → dist}/aicore/ui/aidisclaimerview.d.ts +2 -2
- package/{src → dist}/aicore/ui/aiskeleton.d.ts +2 -2
- package/{src → dist}/aicore/ui/aispinner.d.ts +1 -1
- package/{src → dist}/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestionloaderview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.d.ts +2 -2
- package/{src → dist}/aicore/ui/suggestioncontainer/aiwebsourcesview.d.ts +2 -2
- package/dist/aicore/utils/buttonclasses.d.ts +12 -0
- package/{src → dist}/aicore/utils/common-translations.d.ts +1 -1
- package/{src → dist}/aicore/utils/createresizebutton.d.ts +2 -2
- package/{src → dist}/aicore/utils/geteditorfromcontext.d.ts +1 -1
- package/{src → dist}/aicore/utils/getoperationsfromreply.d.ts +3 -3
- package/{src → dist}/aicore/utils/getsuggestionpartsfromreply.d.ts +1 -1
- package/{src → dist}/aieditorintegration/aieditorintegration.d.ts +2 -2
- package/{src → dist}/aieditorintegration/aitogglebutton/aitogglebuttonui.d.ts +1 -1
- package/{src → dist}/aieditorintegration/aitogglebutton/toggleaicommand.d.ts +1 -1
- package/{src → dist}/aiquickactions/aiquickactions.d.ts +110 -52
- package/{src → dist}/aiquickactions/aiquickactionscommand.d.ts +1 -1
- package/{src → dist}/aiquickactions/aiquickactionsediting.d.ts +1 -1
- package/{src → dist}/aiquickactions/aiquickactionsui.d.ts +16 -30
- package/{src → dist}/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +2 -2
- package/{src → dist}/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +3 -3
- package/{src → dist}/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +2 -2
- package/{src → dist}/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.d.ts +2 -2
- package/{src → dist}/aiquickactions/ui/balloon/aiactionsballoontoolbarview.d.ts +2 -2
- package/{src → dist}/aiquickactions/ui/balloon/aiactionsballoonview.d.ts +2 -2
- package/{src → dist}/aiquickactions/ui/dropdownmenubuttonwithhighlightview.d.ts +1 -1
- package/{src → dist}/aireviewcore/aireviewcorecontroller.d.ts +1 -1
- package/{src → dist}/aireviewcore/aireviewcoreediting.d.ts +4 -4
- package/{src → dist}/aireviewcore/aireviewcoreui.d.ts +2 -1
- package/{src → dist}/aireviewcore/model/aireviewchecklist.d.ts +2 -2
- package/{src → dist}/aireviewcore/model/aireviewcheckresult.d.ts +2 -2
- package/{src → dist}/aireviewcore/model/aireviewcheckresultchange.d.ts +3 -3
- package/{src → dist}/aireviewcore/model/aireviewcheckrun.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcoreballoonsuggestionview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorechecklistitemresultview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorecustomcheckview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorefinishreviewbuttonview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcoregeneralerrorview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorepromptinputview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorereviewchecklistview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorereviewcommandlistitemview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcorereviewcompletedview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcoreuicheckresultsview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/aireviewcoreview.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/form/aireviewcoreformdropdown.d.ts +2 -2
- package/{src → dist}/aireviewcore/ui/form/aireviewcoreformmanager.d.ts +2 -2
- package/{src → dist}/aireviewmode/aireviewmode.d.ts +6 -4
- package/{src → dist}/aireviewmode/aireviewmodecontroller.d.ts +1 -1
- package/{src → dist}/aitabs/aitabs.d.ts +4 -1
- package/{src → dist}/aitabs/aitabsmainview.d.ts +4 -1
- package/{src → dist}/aitabs/tabs/aitabsview.d.ts +22 -2
- package/{src → dist}/aitabs/tabs/tabbuttonview.d.ts +2 -2
- package/{src → dist}/aitabs/tabs/tabpanelview.d.ts +2 -2
- package/{src → dist}/aitranslate/aitranslate.d.ts +47 -4
- package/{src → dist}/aitranslate/aitranslatecontroller.d.ts +1 -1
- package/{src → dist}/aitranslate/ui/aitranslatecheckresultsview.d.ts +1 -1
- package/dist/index-content.css +95 -0
- package/dist/index-editor.css +2711 -2793
- package/dist/index.css +2699 -3521
- package/{src → dist}/index.d.ts +7 -6
- package/dist/index.js +5 -5
- 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/package.json +26 -51
- package/build/966.ai.js +0 -5
- package/build/ai.js +0 -4
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/en.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -286
- package/lang/translations/af.po +0 -1144
- package/lang/translations/ar.po +0 -1144
- package/lang/translations/ast.po +0 -1144
- package/lang/translations/az.po +0 -1144
- package/lang/translations/be.po +0 -1144
- package/lang/translations/bg.po +0 -1144
- package/lang/translations/bn.po +0 -1144
- package/lang/translations/bs.po +0 -1144
- package/lang/translations/ca.po +0 -1144
- package/lang/translations/cs.po +0 -1144
- package/lang/translations/da.po +0 -1144
- package/lang/translations/de-ch.po +0 -1144
- package/lang/translations/de.po +0 -1144
- package/lang/translations/el.po +0 -1144
- package/lang/translations/en-au.po +0 -1144
- package/lang/translations/en-gb.po +0 -1144
- package/lang/translations/en.po +0 -1144
- package/lang/translations/eo.po +0 -1144
- package/lang/translations/es-co.po +0 -1144
- package/lang/translations/es.po +0 -1144
- package/lang/translations/et.po +0 -1144
- package/lang/translations/eu.po +0 -1144
- package/lang/translations/fa.po +0 -1144
- package/lang/translations/fi.po +0 -1144
- package/lang/translations/fr.po +0 -1144
- package/lang/translations/gl.po +0 -1144
- package/lang/translations/gu.po +0 -1144
- package/lang/translations/he.po +0 -1144
- package/lang/translations/hi.po +0 -1144
- package/lang/translations/hr.po +0 -1144
- package/lang/translations/hu.po +0 -1144
- package/lang/translations/hy.po +0 -1144
- package/lang/translations/id.po +0 -1144
- package/lang/translations/it.po +0 -1144
- package/lang/translations/ja.po +0 -1144
- package/lang/translations/jv.po +0 -1144
- package/lang/translations/kk.po +0 -1144
- package/lang/translations/km.po +0 -1144
- package/lang/translations/kn.po +0 -1144
- package/lang/translations/ko.po +0 -1144
- package/lang/translations/ku.po +0 -1144
- package/lang/translations/lt.po +0 -1144
- package/lang/translations/lv.po +0 -1144
- package/lang/translations/ms.po +0 -1144
- package/lang/translations/nb.po +0 -1144
- package/lang/translations/ne.po +0 -1144
- package/lang/translations/nl.po +0 -1144
- package/lang/translations/no.po +0 -1144
- package/lang/translations/oc.po +0 -1144
- package/lang/translations/pl.po +0 -1144
- package/lang/translations/pt-br.po +0 -1144
- package/lang/translations/pt.po +0 -1144
- package/lang/translations/ro.po +0 -1144
- package/lang/translations/ru.po +0 -1144
- package/lang/translations/si.po +0 -1144
- package/lang/translations/sk.po +0 -1144
- package/lang/translations/sl.po +0 -1144
- package/lang/translations/sq.po +0 -1144
- package/lang/translations/sr-latn.po +0 -1144
- package/lang/translations/sr.po +0 -1144
- package/lang/translations/sv.po +0 -1144
- package/lang/translations/th.po +0 -1144
- package/lang/translations/ti.po +0 -1144
- package/lang/translations/tk.po +0 -1144
- package/lang/translations/tr.po +0 -1144
- package/lang/translations/tt.po +0 -1144
- package/lang/translations/ug.po +0 -1144
- package/lang/translations/uk.po +0 -1144
- package/lang/translations/ur.po +0 -1144
- package/lang/translations/uz.po +0 -1144
- package/lang/translations/vi.po +0 -1144
- package/lang/translations/zh-cn.po +0 -1144
- package/lang/translations/zh.po +0 -1144
- package/src/aiactions/aiactions.d.ts +0 -53
- package/src/aiactions/aiactions.js +0 -23
- package/src/aiactions/model/aiactionsinteraction.js +0 -23
- package/src/aiactions/model/aiactionsreply.js +0 -23
- package/src/aiassistant/adapters/aiadapter.js +0 -23
- package/src/aiassistant/adapters/aitextadapter.js +0 -23
- package/src/aiassistant/adapters/awstextadapter.js +0 -23
- package/src/aiassistant/adapters/openaitextadapter.js +0 -23
- package/src/aiassistant/aiassistant.js +0 -23
- package/src/aiassistant/aiassistantediting.js +0 -23
- package/src/aiassistant/aiassistantui.js +0 -23
- package/src/aiassistant/legacyerrors.js +0 -23
- package/src/aiassistant/ui/aiassistantcontroller.js +0 -24
- package/src/aiassistant/ui/form/aiformcontentarea.js +0 -23
- package/src/aiassistant/ui/form/aiformerrorview.js +0 -23
- package/src/aiassistant/ui/form/aiformpromptview.js +0 -23
- package/src/aiassistant/ui/form/aiformtoolbarview.js +0 -23
- package/src/aiassistant/ui/form/aiformview.js +0 -23
- package/src/aiassistant/ui/form/aihistorylistitemview.js +0 -23
- package/src/aiassistant/ui/form/aihistorylistview.js +0 -23
- package/src/aiassistant/ui/form/prompthistory.js +0 -23
- package/src/aiassistant/ui/showaiassistantcommand.js +0 -23
- package/src/aiassistant/utils/common-translations.js +0 -23
- package/src/aiassistant/utils/normalizecommandsconfig.js +0 -23
- package/src/aiballoon/aiballoon.js +0 -23
- package/src/aiballoon/ui/aiballoonview.js +0 -23
- package/src/aichat/aichat.js +0 -23
- package/src/aichat/aichatballoon.js +0 -23
- package/src/aichat/aichatcontroller.d.ts +0 -77
- package/src/aichat/aichatcontroller.js +0 -23
- package/src/aichat/aichatui.js +0 -23
- package/src/aichat/model/aichatcontext.js +0 -23
- package/src/aichat/model/aichatconversation.js +0 -23
- package/src/aichat/model/aichatinteraction.js +0 -23
- package/src/aichat/ui/aichatballoonview.js +0 -23
- package/src/aichat/ui/aichatcontrolsview.js +0 -23
- package/src/aichat/ui/aichatfeedview.js +0 -23
- package/src/aichat/ui/aichatheaderview.js +0 -23
- package/src/aichat/ui/aichatview.js +0 -23
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +0 -23
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +0 -23
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +0 -23
- package/src/aichat/ui/controls/aichatcontextpanelview.js +0 -23
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +0 -23
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +0 -23
- package/src/aichat/ui/controls/aichatpromptinputview.js +0 -23
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +0 -23
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +0 -23
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +0 -23
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +0 -23
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +0 -23
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedcustomelementview.js +0 -23
- package/src/aichat/ui/feed/aichatfeederroritemview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +0 -23
- package/src/aichat/ui/feed/aichatfeeditemview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +0 -23
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +0 -23
- package/src/aichat/utils/eventnames.js +0 -23
- package/src/aichat/utils/promisequeue.js +0 -23
- package/src/aichathistory/aichathistory.js +0 -23
- package/src/aichathistory/aichathistorycontroller.js +0 -23
- package/src/aichathistory/aichathistoryui.js +0 -23
- package/src/aichathistory/model/aichathistoryconversations.js +0 -23
- package/src/aichathistory/model/aichathistoryitem.js +0 -23
- package/src/aichathistory/ui/aichathistorylistitemview.js +0 -24
- package/src/aichathistory/ui/aichathistorylistview.js +0 -23
- package/src/aichathistory/ui/aichathistorysectionlistview.js +0 -23
- package/src/aichathistory/ui/aichathistoryview.js +0 -23
- package/src/aichatshortcuts/aichatshortcuts.js +0 -23
- package/src/aichatshortcuts/ui/aichatshortcutsview.js +0 -23
- package/src/aichatshortcuts/ui/aichatshortcutview.js +0 -23
- package/src/aiconfig.js +0 -23
- package/src/aicore/aiconnector.js +0 -23
- package/src/aicore/aiediting.js +0 -23
- package/src/aicore/model/aicapabilities.js +0 -23
- package/src/aicore/model/aicontext.js +0 -23
- package/src/aicore/model/aiinteraction.js +0 -23
- package/src/aicore/model/aimodels.js +0 -23
- package/src/aicore/model/aireply.js +0 -23
- package/src/aicore/pipeline/airesponseapplier.js +0 -24
- package/src/aicore/pipeline/airesponseparser.js +0 -24
- package/src/aicore/ui/aidisclaimerview.js +0 -23
- package/src/aicore/ui/aiskeleton.js +0 -23
- package/src/aicore/ui/aispinner.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +0 -23
- package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +0 -23
- package/src/aicore/utils/common-translations.js +0 -23
- package/src/aicore/utils/createresizebutton.js +0 -23
- package/src/aicore/utils/documentposition.js +0 -23
- package/src/aicore/utils/documentrange.js +0 -23
- package/src/aicore/utils/eventnames.js +0 -23
- package/src/aicore/utils/geteditorfromcontext.js +0 -23
- package/src/aicore/utils/getoperationsfromreply.js +0 -23
- package/src/aicore/utils/getsuggestionpartsfromreply.js +0 -23
- package/src/aicore/utils/htmlparser.js +0 -23
- package/src/aicore/utils/htmlstreamer.js +0 -23
- package/src/aicore/utils/scrollmanager.js +0 -23
- package/src/aieditorintegration/aieditorintegration.js +0 -23
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +0 -23
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +0 -23
- package/src/aiquickactions/aiquickactions.js +0 -23
- package/src/aiquickactions/aiquickactionscommand.js +0 -23
- package/src/aiquickactions/aiquickactionsediting.js +0 -23
- package/src/aiquickactions/aiquickactionsui.js +0 -23
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +0 -23
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +0 -23
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +0 -23
- package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +0 -23
- package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +0 -23
- package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +0 -23
- package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +0 -23
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +0 -23
- package/src/aireviewcore/aireviewcorecontroller.js +0 -23
- package/src/aireviewcore/aireviewcoreediting.js +0 -23
- package/src/aireviewcore/aireviewcoreui.js +0 -23
- package/src/aireviewcore/model/aireviewcheck.js +0 -23
- package/src/aireviewcore/model/aireviewchecklist.js +0 -23
- package/src/aireviewcore/model/aireviewcheckresult.js +0 -23
- package/src/aireviewcore/model/aireviewcheckresultchange.js +0 -23
- package/src/aireviewcore/model/aireviewcheckrun.js +0 -23
- package/src/aireviewcore/model/aireviewsystemcheckrun.js +0 -23
- package/src/aireviewcore/types.js +0 -23
- package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +0 -23
- package/src/aireviewcore/ui/aireviewcoregeneralerrorview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorepromptinputview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +0 -23
- package/src/aireviewcore/ui/aireviewcorereviewcompletedview.js +0 -23
- package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +0 -23
- package/src/aireviewcore/ui/aireviewcoreview.js +0 -23
- package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +0 -23
- package/src/aireviewcore/ui/form/aireviewcoreformmanager.js +0 -23
- package/src/aireviewmode/aireviewcheckdefinitions.js +0 -23
- package/src/aireviewmode/aireviewmode.js +0 -23
- package/src/aireviewmode/aireviewmodecontroller.js +0 -23
- package/src/aireviewmode/aireviewmodeui.js +0 -23
- package/src/aireviewmode/model/aireviewcheckcustom.js +0 -23
- package/src/aireviewmode/model/aireviewcheckextra.js +0 -23
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +0 -23
- package/src/aireviewmode/model/aireviewextracheckrun.js +0 -23
- package/src/aireviewmode/model/aireviewmodechecklist.js +0 -23
- package/src/aitabs/aitabs.js +0 -23
- package/src/aitabs/aitabsmainview.js +0 -23
- package/src/aitabs/tabs/aitabsview.js +0 -23
- package/src/aitabs/tabs/tabbuttonview.js +0 -23
- package/src/aitabs/tabs/tabpanelview.js +0 -23
- package/src/aitranslate/aitranslate.js +0 -23
- package/src/aitranslate/aitranslatecontroller.js +0 -23
- package/src/aitranslate/aitranslateui.js +0 -23
- package/src/aitranslate/model/aitranslatecheck.js +0 -23
- package/src/aitranslate/model/aitranslatechecklist.js +0 -23
- package/src/aitranslate/model/aitranslatecheckrun.js +0 -23
- package/src/aitranslate/ui/aitranslatechecklistview.js +0 -23
- package/src/aitranslate/ui/aitranslatecheckresultsview.js +0 -23
- package/src/augmentation.js +0 -23
- package/src/errors.js +0 -23
- package/src/errorsmap.js +0 -23
- package/src/index.js +0 -23
- package/theme/aiassistant/ai-dropdown.css +0 -37
- package/theme/aiassistant/ai-form.css +0 -262
- package/theme/aiassistant/ai.css +0 -120
- package/theme/aiballoon/aiballoon.css +0 -58
- package/theme/aichat/aichat-controls/aichat-context-chip.css +0 -139
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +0 -207
- package/theme/aichat/aichat-controls/aichat-context-controls.css +0 -45
- package/theme/aichat/aichat-controls/aichat-controls-button.css +0 -75
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +0 -77
- package/theme/aichat/aichat-controls/model-unavailable-message.css +0 -39
- package/theme/aichat/aichat-controls/prompt-capabilities.css +0 -45
- package/theme/aichat/aichat-controls/prompt-input.css +0 -78
- package/theme/aichat/aichat-controls.css +0 -121
- package/theme/aichat/aichat.css +0 -55
- package/theme/aichat/aichatballoon.css +0 -122
- package/theme/aichat/aichatfeed.css +0 -430
- package/theme/aichat/aichathistory.css +0 -264
- package/theme/aichat/aiminitoolbar.css +0 -79
- package/theme/aichat/aisuggestioncontainer.css +0 -172
- package/theme/aichatshortcuts/aichatshortcuts.css +0 -84
- package/theme/aieditorintegration/aitogglebutton.css +0 -17
- package/theme/aiquickactions/aiquickactions.css +0 -177
- package/theme/aiquickactions/aiquickactionsballoon.css +0 -119
- package/theme/aireviewcore/aireviewcore-balloon-panel-suggestion.css +0 -47
- package/theme/aireviewcore/aireviewcore-check-list.css +0 -278
- package/theme/aireviewcore/aireviewcore-check-run-result.css +0 -103
- package/theme/aireviewcore/aireviewcore-check-run.css +0 -237
- package/theme/aireviewcore/aireviewcore-review-completed.css +0 -52
- package/theme/aireviewcore/aireviewcore.css +0 -134
- package/theme/aitabs/aitabsresizebutton.css +0 -14
- package/theme/aitabs/aitabsview.css +0 -69
- package/theme/aitabs/tabs/tabbuttonview.css +0 -76
- package/theme/aitabs/tabs/tabsview.css +0 -89
- package/theme/aitranslate/aitranslate.css +0 -116
- package/theme/common/aibutton.css +0 -157
- package/theme/common/aidisclaimer.css +0 -29
- package/theme/common/aiheader.css +0 -99
- package/theme/common/ainotification.css +0 -65
- package/theme/common/aiskeleton.css +0 -54
- package/theme/common/aispinner.css +0 -58
- package/theme/common/aisuggestioncontentpartstate.css +0 -33
- package/theme/common/aisuggestioncontentparttoolbar.css +0 -34
- package/theme/common/aisuggestionstreamablecontent.css +0 -62
- package/theme/common/aitrackchanges.css +0 -29
- /package/{src → dist}/aiactions/model/aiactionsreply.d.ts +0 -0
- /package/{src → dist}/aiassistant/legacyerrors.d.ts +0 -0
- /package/{src → dist}/aichat/ui/feed/aichatfeederroritemview.d.ts +0 -0
- /package/{src → dist}/aichat/utils/eventnames.d.ts +0 -0
- /package/{src → dist}/aicore/model/aicontext.d.ts +0 -0
- /package/{src → dist}/aicore/utils/documentposition.d.ts +0 -0
- /package/{src → dist}/aicore/utils/documentrange.d.ts +0 -0
- /package/{src → dist}/aicore/utils/eventnames.d.ts +0 -0
- /package/{src → dist}/aicore/utils/htmlparser.d.ts +0 -0
- /package/{src → dist}/aicore/utils/htmlstreamer.d.ts +0 -0
- /package/{src → dist}/aicore/utils/scrollmanager.d.ts +0 -0
- /package/{src → dist}/aiquickactions/ui/aiquickactionsfilteredlistview.d.ts +0 -0
- /package/{src → dist}/aireviewcore/model/aireviewcheck.d.ts +0 -0
- /package/{src → dist}/aireviewcore/model/aireviewsystemcheckrun.d.ts +0 -0
- /package/{src → dist}/aireviewcore/types.d.ts +0 -0
- /package/{src → dist}/aireviewmode/aireviewcheckdefinitions.d.ts +0 -0
- /package/{src → dist}/aireviewmode/aireviewmodeui.d.ts +0 -0
- /package/{src → dist}/aireviewmode/model/aireviewcheckcustom.d.ts +0 -0
- /package/{src → dist}/aireviewmode/model/aireviewcheckextra.d.ts +0 -0
- /package/{src → dist}/aireviewmode/model/aireviewcustomcheckrun.d.ts +0 -0
- /package/{src → dist}/aireviewmode/model/aireviewextracheckrun.d.ts +0 -0
- /package/{src → dist}/aireviewmode/model/aireviewmodechecklist.d.ts +0 -0
- /package/{src → dist}/aitranslate/aitranslateui.d.ts +0 -0
- /package/{src → dist}/aitranslate/model/aitranslatecheck.d.ts +0 -0
- /package/{src → dist}/aitranslate/model/aitranslatechecklist.d.ts +0 -0
- /package/{src → dist}/aitranslate/model/aitranslatecheckrun.d.ts +0 -0
- /package/{src → dist}/aitranslate/ui/aitranslatechecklistview.d.ts +0 -0
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/errors.d.ts +0 -0
- /package/{src → dist}/errorsmap.d.ts +0 -0
|
@@ -3,35 +3,37 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @module ai/aichat/
|
|
6
|
+
* @module ai/aichat/aichatcontroller
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { type AIChatContextConfig } from './model/aichatcontext.js';
|
|
14
|
-
import { AIChatHistory } from '../aichathistory/aichathistory.js';
|
|
9
|
+
import { ContextPlugin } from '@ckeditor/ckeditor5-core';
|
|
10
|
+
import { AIConnector } from '../aicore/aiconnector.js';
|
|
11
|
+
import { AIChatConversation, type AIChatInteractionCreatedEvent } from './model/aichatconversation.js';
|
|
12
|
+
import { type AIInteractionReplyCreatedEvent, type AIToolData } from '../aicore/model/aiinteraction.js';
|
|
15
13
|
import { type AIChatInteraction } from './model/aichatinteraction.js';
|
|
16
|
-
import {
|
|
14
|
+
import { DocumentCompare } from '@ckeditor/ckeditor5-collaboration-core';
|
|
17
15
|
import { type AIChatFeedCustomElementView } from './ui/feed/aichatfeedcustomelementview.js';
|
|
18
16
|
/**
|
|
19
|
-
*
|
|
20
|
-
* interface designed to facilitate rich, multi-turn interactions between users and an AI Assistant.
|
|
17
|
+
* Implements integration layer between AI Chat feature UI and logic.
|
|
21
18
|
*
|
|
22
|
-
*
|
|
19
|
+
* Provides an API to interact with AI Chat feature.
|
|
23
20
|
*
|
|
24
|
-
*
|
|
21
|
+
* @experimental **Experimental:** Some methods of this class are production-ready but experimental and may change
|
|
22
|
+
* in minor releases without the standard deprecation policy. Check the changelog for migration guidance.
|
|
25
23
|
*/
|
|
26
|
-
export declare class
|
|
24
|
+
export declare class AIChatController extends ContextPlugin {
|
|
25
|
+
/**
|
|
26
|
+
* Active conversation (currently open and visible in UI).
|
|
27
|
+
*/
|
|
28
|
+
activeConversation?: AIChatConversation;
|
|
27
29
|
/**
|
|
28
30
|
* @inheritDoc
|
|
29
31
|
*/
|
|
30
|
-
static get requires(): readonly [typeof
|
|
32
|
+
static get requires(): readonly [typeof AIConnector, typeof DocumentCompare];
|
|
31
33
|
/**
|
|
32
34
|
* @inheritDoc
|
|
33
35
|
*/
|
|
34
|
-
static get pluginName(): "
|
|
36
|
+
static get pluginName(): "AIChatController";
|
|
35
37
|
/**
|
|
36
38
|
* @inheritDoc
|
|
37
39
|
*/
|
|
@@ -40,33 +42,22 @@ export declare class AIChat extends ContextPlugin {
|
|
|
40
42
|
* @inheritDoc
|
|
41
43
|
*/
|
|
42
44
|
static get isPremiumPlugin(): true;
|
|
43
|
-
constructor(context: Context | Editor);
|
|
44
|
-
addSelectionToChatContext(): Promise<void>;
|
|
45
|
-
startConversation(): Promise<void>;
|
|
46
45
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* You can pass additional parameters with the message using the `attributes` property.
|
|
50
|
-
*
|
|
51
|
-
* The following properties are currently supported in `attributes`:
|
|
52
|
-
*
|
|
53
|
-
* * `displayedPrompt` (`string`) - If set, will be displayed instead of the actual `message`. You can use it to display a shorter,
|
|
54
|
-
* or otherwise different or friendlier user message. This is also respected in the conversation history. Original `message` will
|
|
55
|
-
* still be used to query the AI model.
|
|
56
|
-
*
|
|
57
|
-
* Besides supported properties, `attributes` can be used to save any additional metadata with the message, which can be used by your
|
|
58
|
-
* integration in any way. Data passed in `attributes` will be saved in the conversation history. If your integration connects external
|
|
59
|
-
* custom AI tools, `attributes` are passed to the tool calls and can be used by these tools.
|
|
60
|
-
*
|
|
61
|
-
* @param message User message, used to query the AI model.
|
|
62
|
-
* @param attributes Additional metadata and options.
|
|
46
|
+
* @inheritDoc
|
|
63
47
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
48
|
+
init(): void;
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
afterInit(): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
destroy(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Loads a conversation by its ID and sets it as the active conversation.
|
|
59
|
+
*/
|
|
60
|
+
loadConversation(conversationId: string): Promise<void>;
|
|
70
61
|
/**
|
|
71
62
|
* Registers a function that is called when data from a custom AI tool is received from the backend service.
|
|
72
63
|
*
|
|
@@ -76,9 +67,9 @@ export declare class AIChat extends ContextPlugin {
|
|
|
76
67
|
*
|
|
77
68
|
* When data is received, the callback is immediately called with two parameters:
|
|
78
69
|
*
|
|
79
|
-
* * `toolData` – data returned by the tool,
|
|
80
|
-
* * `api` –
|
|
81
|
-
*
|
|
70
|
+
* * `toolData` – data returned by the AI tool,
|
|
71
|
+
* * `api` – {@link module:ai/aichat/aichatcontroller~AIChatFeedAPI set of tools} which you can use to reflect the received AI tool data
|
|
72
|
+
* in the AI chat feed.
|
|
82
73
|
*
|
|
83
74
|
* The callback is called for data received from all tools that you have connected, and both for tool results and tool notifications.
|
|
84
75
|
* Check `toolData.toolName` and `toolData.type` to handle various tools and actions. You can register multiple callbacks to better
|
|
@@ -124,67 +115,92 @@ export declare class AIChat extends ContextPlugin {
|
|
|
124
115
|
* } );
|
|
125
116
|
* ```
|
|
126
117
|
*
|
|
118
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
119
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
127
120
|
* @param callback A callback function that is called when tool data is received.
|
|
128
121
|
*/
|
|
129
122
|
registerToolDataCallback(callback: AIToolEventCallback): void;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* The configuration of the {@link module:ai/aichat/aichat~AIChat AI Chat feature}.
|
|
133
|
-
*
|
|
134
|
-
* The properties defined in this config are set in the `config.ai.chat` namespace.
|
|
135
|
-
*
|
|
136
|
-
* ```ts
|
|
137
|
-
* ClassicEditor
|
|
138
|
-
* .create( editorElement, {
|
|
139
|
-
* ai: {
|
|
140
|
-
* chat: {
|
|
141
|
-
* // AI Chat configuration.
|
|
142
|
-
* }
|
|
143
|
-
* }
|
|
144
|
-
* } )
|
|
145
|
-
* .then( ... )
|
|
146
|
-
* .catch( ... );
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* See {@link module:ai/aiconfig~AIConfig the full AI configuration}.
|
|
150
|
-
*
|
|
151
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
152
|
-
*/
|
|
153
|
-
export interface AIChatConfig {
|
|
154
123
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* Read more in {@link module:ai/aichat/model/aichatcontext~AIChatContextConfig}.
|
|
124
|
+
* Adds the current document to the chat context.
|
|
158
125
|
*/
|
|
159
|
-
|
|
126
|
+
addCurrentDocumentToChatContext(): void;
|
|
160
127
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* Possible values are:
|
|
128
|
+
* Adds current document selection to the conversation context. If document is not added to the context, it is added as well.
|
|
164
129
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
|
|
130
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
131
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
132
|
+
*/
|
|
133
|
+
addSelectionToChatContext(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Removes current document selection from the conversation context.
|
|
168
136
|
*
|
|
169
|
-
*
|
|
137
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
138
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
139
|
+
*/
|
|
140
|
+
removeSelectionFromChatContext(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Moves focus to the AI Chat prompt input field.
|
|
170
143
|
*
|
|
171
|
-
*
|
|
144
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
145
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
146
|
+
*/
|
|
147
|
+
focusPromptInput(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Creates a new, empty conversation.
|
|
150
|
+
*/
|
|
151
|
+
startConversation(): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* Submits a user message to the currently active conversation.
|
|
154
|
+
*/
|
|
155
|
+
sendMessage(messageData: AIChatUserMessageData): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the ID under which conversations are grouped. All created conversations will have this `groupId` set. Conversation history
|
|
158
|
+
* will fetch conversations with such `groupId`.
|
|
172
159
|
*
|
|
173
|
-
*
|
|
160
|
+
* By default, this is equal to the document ID passed in editor configuration.
|
|
174
161
|
*/
|
|
175
|
-
|
|
162
|
+
getGroupId(): string;
|
|
176
163
|
/**
|
|
177
|
-
*
|
|
164
|
+
* Starts an AI chat conversation safely, catching and logging any errors.
|
|
178
165
|
*/
|
|
179
|
-
|
|
166
|
+
protected _startConversationSafely(id?: string): Promise<void>;
|
|
180
167
|
}
|
|
181
168
|
/**
|
|
182
|
-
*
|
|
183
|
-
|
|
169
|
+
* Data for the message send by the user in the AI chat.
|
|
170
|
+
*/
|
|
171
|
+
export type AIChatUserMessageData = {
|
|
172
|
+
/**
|
|
173
|
+
* The query that the user provided for the message. Displayed in the chat feed as the user's message.
|
|
174
|
+
*/
|
|
175
|
+
message: string;
|
|
176
|
+
/**
|
|
177
|
+
* Additional parameters for the message. This data is stored together with the message and can influence how the message is processed
|
|
178
|
+
* or displayed.
|
|
179
|
+
*
|
|
180
|
+
* You can pass following properties to alter how the message behaves:
|
|
181
|
+
*
|
|
182
|
+
* * `displayedPrompt: string` - If set, will be displayed instead of the actual `message`. You can use it to display a shorter,
|
|
183
|
+
* or a friendlier user message. This is also respected in the conversation history. Original `message` will still be used to query
|
|
184
|
+
* the AI model.
|
|
185
|
+
*
|
|
186
|
+
* Besides supported properties, `attributes` can be used to save any additional metadata with the message, which can be used by your
|
|
187
|
+
* integration in any way. Data passed in `attributes` will be saved in the conversation history. If your integration connects external
|
|
188
|
+
* custom AI tools, `attributes` are passed to the tool calls and can be used by these tools.
|
|
189
|
+
*
|
|
190
|
+
* Additionally, other official features that interact with the AI chat feature may introduce their own attributes.
|
|
191
|
+
*/
|
|
192
|
+
attributes?: Record<string, unknown>;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Set of helpers dedicated to be used inside {@link module:ai/aichat/aichatcontroller~AIToolEventCallback callbacks} registered
|
|
196
|
+
* through {@link module:ai/aichat/aichatcontroller~AIChatController#registerToolDataCallback}.
|
|
197
|
+
*
|
|
198
|
+
* Using this tools you can manipulate AI chat feed (e.g. add custom replies) in response to the received custom AI tool data.
|
|
184
199
|
*
|
|
185
|
-
*
|
|
200
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
201
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
186
202
|
*/
|
|
187
|
-
export interface
|
|
203
|
+
export interface AIChatFeedAPI {
|
|
188
204
|
/**
|
|
189
205
|
* Creates a new reply in the current interaction. The created reply becomes the current reply of the interaction.
|
|
190
206
|
*
|
|
@@ -224,6 +240,23 @@ export interface AIChatInteractionAPI {
|
|
|
224
240
|
clearLoadingMessage: () => void;
|
|
225
241
|
}
|
|
226
242
|
/**
|
|
227
|
-
* A callback type for handling custom AI tools
|
|
243
|
+
* A callback type for handling custom AI tools data.
|
|
244
|
+
*
|
|
245
|
+
* This callback receives two parameters:
|
|
246
|
+
*
|
|
247
|
+
* * `toolData` - data returned by the AI tool.
|
|
248
|
+
* * `api` - set of tools which you can use to reflect the received AI tool data in the AI chat feed.
|
|
249
|
+
*/
|
|
250
|
+
export type AIToolEventCallback = (toolData: AIToolData, api: AIChatFeedAPI) => void | Promise<void>;
|
|
251
|
+
/**
|
|
252
|
+
* An event emitted by `AIChatController` when an AI reply is created.
|
|
253
|
+
*
|
|
254
|
+
* @eventName ~AIChatController#replyCreated
|
|
255
|
+
*/
|
|
256
|
+
export type AIChatControllerAIReplyCreatedEvent = AIInteractionReplyCreatedEvent;
|
|
257
|
+
/**
|
|
258
|
+
* An event emitted by `AIChatController` when an AI chat interaction is created.
|
|
259
|
+
*
|
|
260
|
+
* @eventName ~AIChatController#interactionCreated
|
|
228
261
|
*/
|
|
229
|
-
export type
|
|
262
|
+
export type AIChatControllerAIInteractionCreatedEvent = AIChatInteractionCreatedEvent;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/aichatui
|
|
7
7
|
*/
|
|
8
|
-
import { type Context, type Editor, ContextPlugin } from 'ckeditor5
|
|
8
|
+
import { type Context, type Editor, ContextPlugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { AITabs } from '../aitabs/aitabs.js';
|
|
10
10
|
import { type AIAddContextOptionsState, type AIContextProvider, type AIContextResource, type AIContextResourceState } from './model/aichatcontext.js';
|
|
11
11
|
import { type AIContextItem } from '../aicore/model/aicontext.js';
|
|
@@ -65,18 +65,18 @@ export declare class AIChatUI extends ContextPlugin {
|
|
|
65
65
|
addFeedItemStaticMessage({ id, staticMessage }: {
|
|
66
66
|
id: string;
|
|
67
67
|
staticMessage?: string;
|
|
68
|
-
}): void
|
|
68
|
+
}): Promise<void>;
|
|
69
69
|
/**
|
|
70
70
|
* Adds a user message to the chat feed.
|
|
71
71
|
*/
|
|
72
|
-
addFeedItemUserMessage(interaction: AIChatInteraction): void
|
|
72
|
+
addFeedItemUserMessage(interaction: AIChatInteraction): Promise<void>;
|
|
73
73
|
/**
|
|
74
74
|
* Adds an error message to the chat feed.
|
|
75
75
|
*/
|
|
76
76
|
addFeedItemError({ errorMessage, id }: {
|
|
77
77
|
errorMessage: string;
|
|
78
78
|
id: string;
|
|
79
|
-
}): void
|
|
79
|
+
}): Promise<void>;
|
|
80
80
|
/**
|
|
81
81
|
* Adds an AI reply to the chat feed.
|
|
82
82
|
*/
|
|
@@ -88,7 +88,7 @@ export declare class AIChatUI extends ContextPlugin {
|
|
|
88
88
|
/**
|
|
89
89
|
* Adds an interaction header to the chat feed.
|
|
90
90
|
*/
|
|
91
|
-
addFeedInteractionHeader(interaction: AIChatInteraction, capabilities: AICapabilitiesConfig): void
|
|
91
|
+
addFeedInteractionHeader(interaction: AIChatInteraction, capabilities: AICapabilitiesConfig): Promise<void>;
|
|
92
92
|
/**
|
|
93
93
|
* Adds a custom element to the chat feed.
|
|
94
94
|
*/
|
|
@@ -6,11 +6,14 @@ import { type AIConnector, type AIUserMessage } from '../../aicore/aiconnector.j
|
|
|
6
6
|
import { AIContextItemType, AIContextTextResourceType, type AIContextItem, type AIContextItemRequestData, type AIToolContextItem } from '../../aicore/model/aicontext.js';
|
|
7
7
|
export declare const AI_CONTEXT_MODEL_EVENT_NAMES: readonly ["contextItemAdded", "contextItemRemoved", "contextItemLoadingEnded", "contextSent", "error", "addContextOptionsChanged", "sourceResourcesLoaded", "resourceStateChanged", "uploadProgressChanged"];
|
|
8
8
|
declare const AIChatContext_base: {
|
|
9
|
-
new (): import("ckeditor5
|
|
10
|
-
prototype: import("ckeditor5
|
|
9
|
+
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
10
|
+
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Manages the context of the current conversation.
|
|
14
|
+
*
|
|
15
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
16
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
14
17
|
*/
|
|
15
18
|
export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
16
19
|
constructor({ connector, config, ownerId }: {
|
|
@@ -20,17 +23,25 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
20
23
|
});
|
|
21
24
|
/**
|
|
22
25
|
* Initializes the context.
|
|
26
|
+
*
|
|
27
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
28
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
23
29
|
*/
|
|
24
30
|
init(): void;
|
|
25
31
|
/**
|
|
26
32
|
* Returns the pending context items that will be sent to the AI endpoint in the next interaction.
|
|
27
33
|
*
|
|
34
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
35
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
28
36
|
* @returns Map of pending context items keyed by their uiId
|
|
29
37
|
*/
|
|
30
38
|
getPendingContextItems(): Map<string, AIContextItem>;
|
|
31
39
|
/**
|
|
32
40
|
* Populates context items from message data.
|
|
33
41
|
* This method converts user message content to context items and adds them to the conversation context.
|
|
42
|
+
*
|
|
43
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
44
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
34
45
|
*/
|
|
35
46
|
populateFromMessage(content: AIUserMessage['content'][0]): Promise<AIContextItem>;
|
|
36
47
|
/**
|
|
@@ -40,6 +51,8 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
40
51
|
/**
|
|
41
52
|
* Returns all context items that have been sent to the AI endpoint in the current conversation.
|
|
42
53
|
*
|
|
54
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
55
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
43
56
|
* @returns Map of sent context items keyed by their uiId
|
|
44
57
|
*/
|
|
45
58
|
getSentContextItems(): Map<string, AIContextItem>;
|
|
@@ -47,27 +60,43 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
47
60
|
* Removes a context item from the pending context.
|
|
48
61
|
* Read-only items cannot be removed and the method returns early.
|
|
49
62
|
*
|
|
63
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
64
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
50
65
|
* @param uiId The unique identifier of the context item to remove
|
|
51
66
|
*/
|
|
52
67
|
removeFromContext(uiId: string): void;
|
|
53
68
|
/**
|
|
54
69
|
* Clears all pending context items and adds the current document to the conversation context if it exists.
|
|
70
|
+
*
|
|
71
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
72
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
55
73
|
*/
|
|
56
74
|
clearPendingContextItems(): void;
|
|
57
75
|
/**
|
|
58
76
|
* Adds context items to the conversation context and clears the pending context items.
|
|
77
|
+
*
|
|
78
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
79
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
59
80
|
*/
|
|
60
81
|
addToConversationContext(contextItems: Map<string, AIContextItem>): void;
|
|
61
82
|
/**
|
|
62
83
|
* Checks if the current document is in the pending context.
|
|
63
84
|
*
|
|
85
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
86
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
64
87
|
* @returns True if the current document is in pending context, false otherwise
|
|
65
88
|
*/
|
|
66
89
|
isCurrentDocumentInContext(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
92
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
93
|
+
*/
|
|
67
94
|
isSelectionInContext(): boolean;
|
|
68
95
|
/**
|
|
69
96
|
* Checks if the current document is in the conversation context.
|
|
70
97
|
*
|
|
98
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
99
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
71
100
|
* @returns True if the current document is in conversation context, false otherwise
|
|
72
101
|
*/
|
|
73
102
|
isCurrentDocumentInConversation(): boolean;
|
|
@@ -75,6 +104,8 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
75
104
|
* Converts context items to request data format for API endpoint.
|
|
76
105
|
* This static method transforms the internal context item format to the format expected by the AI connector.
|
|
77
106
|
*
|
|
107
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
108
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
78
109
|
* @param contextItems Map of context items to convert
|
|
79
110
|
* @returns Array of context items in API request format
|
|
80
111
|
*/
|
|
@@ -83,6 +114,8 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
83
114
|
* Adds files to the context by uploading them and creating context items.
|
|
84
115
|
* This method handles multiple files concurrently and tracks upload progress.
|
|
85
116
|
*
|
|
117
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
118
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
86
119
|
* @param files Array of File objects to upload and add to context
|
|
87
120
|
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
88
121
|
* @param [type] Context item type, defaults to AIContextItemType.FILE to indicate that the file is being added as a file or text
|
|
@@ -96,6 +129,8 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
96
129
|
* Adds the current document to the pending context.
|
|
97
130
|
* If the document is already in context, this method returns early without changes.
|
|
98
131
|
*
|
|
132
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
133
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
99
134
|
* @param label Display label for the current document
|
|
100
135
|
*/
|
|
101
136
|
addCurrentDocumentToContext(label: string): void;
|
|
@@ -103,6 +138,8 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
103
138
|
* Updates the current document in the pending context with new content and version.
|
|
104
139
|
* This method uploads the document content and updates the context item accordingly.
|
|
105
140
|
*
|
|
141
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
142
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
106
143
|
* @param content The document content to upload, or undefined to skip
|
|
107
144
|
* @param version Version number of the document for change tracking
|
|
108
145
|
* @returns Promise that resolves when the document is updated
|
|
@@ -112,12 +149,22 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
112
149
|
end: number;
|
|
113
150
|
htmlFragment: string;
|
|
114
151
|
}>): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
154
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
155
|
+
*/
|
|
115
156
|
addSelectionToContext(selection: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
159
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
160
|
+
*/
|
|
116
161
|
removeSelectionFromContext(): void;
|
|
117
162
|
/**
|
|
118
163
|
* Adds a URL to the context by uploading it and creating a context item.
|
|
119
164
|
* This method handles URL upload with proper error handling and progress tracking.
|
|
120
165
|
*
|
|
166
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
167
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
121
168
|
* @param url The URL to upload and add to context
|
|
122
169
|
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
123
170
|
* @returns Promise that resolves when the URL is processed
|
|
@@ -132,20 +179,30 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
132
179
|
* Note, that these context items are ignored by the CKEditor AI agent and should be handled by your backend AI tool.
|
|
133
180
|
*
|
|
134
181
|
* The object which is passed as a parameter can contain the following properties:
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
182
|
+
* ```ts
|
|
183
|
+
* {
|
|
184
|
+
* // Must be set to `AIContextItemType.TOOL`.
|
|
185
|
+
* type: AIContextItemType.TOOL,
|
|
186
|
+
*
|
|
187
|
+
* // The name of the MCP server.
|
|
188
|
+
* mcpServerName: string;
|
|
189
|
+
*
|
|
190
|
+
* // The data for the tool. Can be anything.
|
|
191
|
+
* data: Record<string, any>;
|
|
192
|
+
*
|
|
193
|
+
* // The label of the item used to display it in the chat UI.
|
|
194
|
+
* label: string;
|
|
195
|
+
*
|
|
196
|
+
* // Optional, 1-21 characters. Auto-generated if omitted.
|
|
197
|
+
* id?: string;
|
|
198
|
+
*
|
|
199
|
+
* // The name of the tool. Omit to send context to all tools on the server.
|
|
200
|
+
* toolName?: string;
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
205
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
149
206
|
*/
|
|
150
207
|
addToolItemToContext(contextItem: AIToolContextItem): void;
|
|
151
208
|
/**
|
|
@@ -153,12 +210,18 @@ export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
|
153
210
|
* This method calls the source's {@link module:ai/aichat/model/aichatcontext~AIContextProvider#getResources}
|
|
154
211
|
* callback and updates resource states.
|
|
155
212
|
*
|
|
213
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
214
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
156
215
|
* @param sourceId The unique identifier of the source provider
|
|
157
216
|
* @param query Search query to filter resources
|
|
158
217
|
* @param uid Unique identifier for the request to prevent race conditions
|
|
159
218
|
* @returns Promise resolving to array of resources with context state
|
|
160
219
|
*/
|
|
161
220
|
loadSourceResources(sourceId: string, query: string, uid: string): Promise<Array<AIContextResourceState>>;
|
|
221
|
+
/**
|
|
222
|
+
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
223
|
+
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
224
|
+
*/
|
|
162
225
|
addResourceToContext(source: AIContextProvider, resource: AIContextResource): Promise<void>;
|
|
163
226
|
}
|
|
164
227
|
export type AIChatContextItemAddedEvent = {
|
|
@@ -235,7 +298,7 @@ export type AIContextResourceState = AIContextResource & {
|
|
|
235
298
|
*
|
|
236
299
|
* ```ts
|
|
237
300
|
* ClassicEditor
|
|
238
|
-
* .create(
|
|
301
|
+
* .create( {
|
|
239
302
|
* ai: {
|
|
240
303
|
* chat: {
|
|
241
304
|
* context: {
|
|
@@ -326,6 +389,17 @@ export type AIChatContextConfig = {
|
|
|
326
389
|
* {@link module:ai/aichat/model/aichatcontext~AIContextProvider Learn more about the configuration of custom resources}.
|
|
327
390
|
*/
|
|
328
391
|
sources?: Array<AIContextProvider>;
|
|
392
|
+
/**
|
|
393
|
+
* When this option is enabled, the selection made in the editor will always be added to the context.
|
|
394
|
+
*
|
|
395
|
+
* By default, the selection is added to the context only after user explicitly requests it by clicking "Ask AI" button.
|
|
396
|
+
*
|
|
397
|
+
* **Note**: This setting will have no effect if the feature is configured to
|
|
398
|
+
* {@link module:ai/aichat/model/aichatcontext~AIChatContextConfig#document disallow setting document as the conversation context}.
|
|
399
|
+
*
|
|
400
|
+
* @default false
|
|
401
|
+
*/
|
|
402
|
+
alwaysAddSelection?: boolean;
|
|
329
403
|
/**
|
|
330
404
|
* The configuration of the custom items in the context menu.
|
|
331
405
|
*
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/model/aichatconversation
|
|
7
7
|
*/
|
|
8
|
-
import { CKEditorError } from 'ckeditor5
|
|
8
|
+
import { CKEditorError } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import type { AIConnector, AIModelData } from '../../aicore/aiconnector.js';
|
|
10
10
|
import { AIChatContext, type AIChatContextConfig, type AIContextProvider, type AIContextResource, type AIContextResourceState } from './aichatcontext.js';
|
|
11
11
|
import { type AIToolContextItem, type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
12
|
import { AICapabilities, type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
13
13
|
import type { AIModels } from '../../aicore/model/aimodels.js';
|
|
14
|
-
import { type Editor } from 'ckeditor5
|
|
14
|
+
import { type Editor } from '@ckeditor/ckeditor5-core';
|
|
15
15
|
import { AIChatInteraction } from './aichatinteraction.js';
|
|
16
16
|
declare const AIChatConversation_base: {
|
|
17
|
-
new (): import("ckeditor5
|
|
18
|
-
prototype: import("ckeditor5
|
|
17
|
+
new (): import("@ckeditor/ckeditor5-utils").Emitter;
|
|
18
|
+
prototype: import("@ckeditor/ckeditor5-utils").Emitter;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* Represents a conversation between the user and the AI endpoint on top of the
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
10
10
|
import { AIInteraction, type AIInteractionOptions } from '../../aicore/model/aiinteraction.js';
|
|
11
|
-
import { type AIConnectorQueryAssistantRequest } from '../../aicore/aiconnector.js';
|
|
12
11
|
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
13
12
|
export declare class AIChatInteraction extends AIInteraction {
|
|
14
13
|
/**
|
|
@@ -32,12 +31,10 @@ export declare class AIChatInteraction extends AIInteraction {
|
|
|
32
31
|
*/
|
|
33
32
|
readonly model: string;
|
|
34
33
|
/**
|
|
35
|
-
* Additional metadata
|
|
34
|
+
* Additional metadata properties passed together with the user message when it was submitted.
|
|
36
35
|
*/
|
|
37
36
|
readonly attributes?: Record<string, unknown>;
|
|
38
37
|
constructor(options: AIChatInteractionOptions);
|
|
39
|
-
sendRequest(): Promise<AIConnectorQueryAssistantRequest>;
|
|
40
|
-
getDocumentContext(): AIContextItem | undefined;
|
|
41
38
|
}
|
|
42
39
|
export type AIChatInteractionOptions = {
|
|
43
40
|
conversationId: string;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/ui/aichatballoonview
|
|
7
7
|
*/
|
|
8
|
-
import { type Locale } from 'ckeditor5
|
|
8
|
+
import { type Locale } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import { type AISuggestionActionName } from './feed/aichatfeedsuggestionitemactionsview.js';
|
|
10
10
|
import { type AISuggestionContentPartDefinition } from '../../aicore/utils/getsuggestionpartsfromreply.js';
|
|
11
11
|
import { type AIContentRenderingStrategy } from '../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';
|
|
12
12
|
import { AIBalloonView } from '../../aiballoon/ui/aiballoonview.js';
|
|
13
|
-
import { ButtonView, FocusCycler, type ViewCollection } from 'ckeditor5
|
|
13
|
+
import { ButtonView, FocusCycler, type ViewCollection } from '@ckeditor/ckeditor5-ui';
|
|
14
14
|
import { type AIReplyChangeGroupState } from '../../aicore/model/aireply.js';
|
|
15
15
|
import '../../../theme/aichat/aichatballoon.css';
|
|
16
16
|
export type AIChatBalloonViewConfig = {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/ui/aichatcontrolsview
|
|
7
7
|
*/
|
|
8
|
-
import type { Locale } from 'ckeditor5
|
|
9
|
-
import { View, type BodyCollection } from 'ckeditor5
|
|
8
|
+
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import { View, type BodyCollection } from '@ckeditor/ckeditor5-ui';
|
|
10
10
|
import { type AIAddContextOptionsState, type AIContextProvider, type AIContextResourceState } from '../model/aichatcontext.js';
|
|
11
11
|
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
12
|
import { type AIModelData } from '../../aicore/aiconnector.js';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/ui/aichatfeedview
|
|
7
7
|
*/
|
|
8
|
-
import { type Locale } from 'ckeditor5
|
|
9
|
-
import { View, type ViewCollection, type BodyCollection } from 'ckeditor5
|
|
8
|
+
import { type Locale } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import { View, type ViewCollection, type BodyCollection } from '@ckeditor/ckeditor5-ui';
|
|
10
10
|
import { type AIChatFeedItemView } from './feed/aichatfeeditemview.js';
|
|
11
11
|
import { type AIContentRenderingStrategy } from '../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';
|
|
12
12
|
import { type Document } from '../../aicore/utils/htmlparser.js';
|