@ckeditor/ckeditor5-ai 47.3.0-alpha.7 → 47.4.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 +1 -1
- package/README.md +1 -1
- package/build/ai.js +3 -3
- 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/dist/index-content.css +1 -1
- package/dist/index-editor.css +67 -4
- package/dist/index.css +117 -54
- package/dist/index.js +6 -6
- package/dist/translations/af.d.ts +1 -1
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +1 -1
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +1 -1
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +1 -1
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/be.d.ts +1 -1
- package/dist/translations/be.js +2 -2
- package/dist/translations/be.umd.js +2 -2
- package/dist/translations/bg.d.ts +1 -1
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +1 -1
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +1 -1
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +1 -1
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +1 -1
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +1 -1
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +1 -1
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +1 -1
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +1 -1
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +1 -1
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +1 -1
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +1 -1
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +1 -1
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +1 -1
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +1 -1
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +1 -1
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +1 -1
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +1 -1
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +1 -1
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +1 -1
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +1 -1
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +1 -1
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +1 -1
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +1 -1
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +1 -1
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +1 -1
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +1 -1
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +1 -1
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +1 -1
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +1 -1
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +1 -1
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +1 -1
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +1 -1
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +1 -1
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +1 -1
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +1 -1
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +1 -1
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +1 -1
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +1 -1
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +1 -1
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +1 -1
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +1 -1
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +1 -1
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +1 -1
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +1 -1
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +1 -1
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +1 -1
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +1 -1
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +1 -1
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +1 -1
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +1 -1
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +1 -1
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +1 -1
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +1 -1
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +1 -1
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +1 -1
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +1 -1
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +1 -1
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +1 -1
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +1 -1
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +1 -1
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +1 -1
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +1 -1
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +1 -1
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +1 -1
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +1 -1
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +1 -1
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +1 -1
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/contexts.json +0 -11
- package/lang/translations/af.po +1 -45
- package/lang/translations/ar.po +1 -45
- package/lang/translations/ast.po +1 -45
- package/lang/translations/az.po +1 -45
- package/lang/translations/be.po +1 -45
- package/lang/translations/bg.po +1 -45
- package/lang/translations/bn.po +1 -45
- package/lang/translations/bs.po +1 -45
- package/lang/translations/ca.po +1 -45
- package/lang/translations/cs.po +1 -45
- package/lang/translations/da.po +1 -45
- package/lang/translations/de-ch.po +1 -45
- package/lang/translations/de.po +1 -45
- package/lang/translations/el.po +1 -45
- package/lang/translations/en-au.po +1 -45
- package/lang/translations/en-gb.po +1 -45
- package/lang/translations/en.po +1 -45
- package/lang/translations/eo.po +1 -45
- package/lang/translations/es-co.po +1 -45
- package/lang/translations/es.po +1 -45
- package/lang/translations/et.po +1 -45
- package/lang/translations/eu.po +1 -45
- package/lang/translations/fa.po +1 -45
- package/lang/translations/fi.po +1 -45
- package/lang/translations/fr.po +1 -45
- package/lang/translations/gl.po +1 -45
- package/lang/translations/gu.po +1 -45
- package/lang/translations/he.po +1 -45
- package/lang/translations/hi.po +1 -45
- package/lang/translations/hr.po +1 -45
- package/lang/translations/hu.po +1 -45
- package/lang/translations/hy.po +1 -45
- package/lang/translations/id.po +1 -45
- package/lang/translations/it.po +1 -45
- package/lang/translations/ja.po +1 -45
- package/lang/translations/jv.po +1 -45
- package/lang/translations/kk.po +1 -45
- package/lang/translations/km.po +1 -45
- package/lang/translations/kn.po +1 -45
- package/lang/translations/ko.po +1 -45
- package/lang/translations/ku.po +1 -45
- package/lang/translations/lt.po +1 -45
- package/lang/translations/lv.po +1 -45
- package/lang/translations/ms.po +1 -45
- package/lang/translations/nb.po +1 -45
- package/lang/translations/ne.po +1 -45
- package/lang/translations/nl.po +1 -45
- package/lang/translations/no.po +1 -45
- package/lang/translations/oc.po +1 -45
- package/lang/translations/pl.po +1 -45
- package/lang/translations/pt-br.po +1 -45
- package/lang/translations/pt.po +1 -45
- package/lang/translations/ro.po +1 -45
- package/lang/translations/ru.po +1 -45
- package/lang/translations/si.po +1 -45
- package/lang/translations/sk.po +1 -45
- package/lang/translations/sl.po +1 -45
- package/lang/translations/sq.po +1 -45
- package/lang/translations/sr-latn.po +1 -45
- package/lang/translations/sr.po +1 -45
- package/lang/translations/sv.po +1 -45
- package/lang/translations/th.po +1 -45
- package/lang/translations/ti.po +1 -45
- package/lang/translations/tk.po +1 -45
- package/lang/translations/tr.po +1 -45
- package/lang/translations/tt.po +1 -45
- package/lang/translations/ug.po +1 -45
- package/lang/translations/uk.po +1 -45
- package/lang/translations/ur.po +1 -45
- package/lang/translations/uz.po +1 -45
- package/lang/translations/vi.po +1 -45
- package/lang/translations/zh-cn.po +1 -45
- package/lang/translations/zh.po +1 -45
- package/package.json +16 -16
- package/src/aiactions/aiactions.d.ts +5 -1
- package/src/aiactions/aiactions.js +2 -2
- package/src/aiactions/model/aiactionsinteraction.d.ts +1 -1
- package/src/aiactions/model/aiactionsinteraction.js +2 -2
- package/src/aiactions/model/aiactionsreply.d.ts +1 -1
- package/src/aiactions/model/aiactionsreply.js +2 -2
- package/src/aiassistant/adapters/aiadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aiadapter.js +2 -2
- package/src/aiassistant/adapters/aitextadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +2 -2
- package/src/aiassistant/adapters/awstextadapter.d.ts +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +2 -2
- package/src/aiassistant/adapters/openaitextadapter.d.ts +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +2 -2
- package/src/aiassistant/aiassistant.d.ts +1 -1
- package/src/aiassistant/aiassistant.js +2 -2
- package/src/aiassistant/aiassistantediting.d.ts +1 -1
- package/src/aiassistant/aiassistantediting.js +2 -2
- package/src/aiassistant/aiassistantui.d.ts +1 -1
- package/src/aiassistant/aiassistantui.js +2 -2
- package/src/aiassistant/legacyerrors.d.ts +1 -1
- package/src/aiassistant/legacyerrors.js +2 -2
- package/src/aiassistant/ui/aiassistantcontroller.d.ts +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +3 -3
- package/src/aiassistant/ui/form/aiformcontentarea.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +2 -2
- package/src/aiassistant/ui/form/aiformerrorview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +2 -2
- package/src/aiassistant/ui/form/aiformpromptview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +2 -2
- package/src/aiassistant/ui/form/aiformtoolbarview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +2 -2
- package/src/aiassistant/ui/form/aiformview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformview.js +2 -2
- package/src/aiassistant/ui/form/aihistorylistitemview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +2 -2
- package/src/aiassistant/ui/form/aihistorylistview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +2 -2
- package/src/aiassistant/ui/form/prompthistory.d.ts +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +2 -2
- package/src/aiassistant/ui/showaiassistantcommand.d.ts +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +2 -2
- package/src/aiassistant/utils/common-translations.d.ts +1 -1
- package/src/aiassistant/utils/common-translations.js +2 -2
- package/src/aiassistant/utils/normalizecommandsconfig.d.ts +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +2 -2
- package/src/aiballoon/aiballoon.d.ts +1 -1
- package/src/aiballoon/aiballoon.js +2 -2
- package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +2 -2
- package/src/aiballoon/ui/aiballoontoolbarview.d.ts +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +2 -2
- package/src/aiballoon/ui/aiballoonview.d.ts +1 -1
- package/src/aiballoon/ui/aiballoonview.js +2 -2
- package/src/aichat/aichat.d.ts +38 -4
- package/src/aichat/aichat.js +2 -2
- package/src/aichat/aichatcontroller.d.ts +5 -1
- package/src/aichat/aichatcontroller.js +2 -2
- package/src/aichat/aichatui.d.ts +3 -3
- package/src/aichat/aichatui.js +2 -2
- package/src/aichat/model/aichatcontext.d.ts +1 -1
- package/src/aichat/model/aichatcontext.js +2 -2
- package/src/aichat/model/aichatconversation.d.ts +10 -10
- package/src/aichat/model/aichatconversation.js +2 -2
- package/src/aichat/model/aichatinteraction.d.ts +1 -1
- package/src/aichat/model/aichatinteraction.js +2 -2
- package/src/aichat/ui/aichatcontrolsview.d.ts +4 -4
- package/src/aichat/ui/aichatcontrolsview.js +2 -2
- package/src/aichat/ui/aichatfeedview.d.ts +1 -1
- package/src/aichat/ui/aichatfeedview.js +2 -2
- package/src/aichat/ui/aichatheaderview.d.ts +1 -1
- package/src/aichat/ui/aichatheaderview.js +2 -2
- package/src/aichat/ui/aichatview.d.ts +1 -1
- package/src/aichat/ui/aichatview.js +2 -2
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +2 -2
- package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +2 -2
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +2 -2
- package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +2 -2
- package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +2 -2
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +5 -5
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +2 -2
- package/src/aichat/ui/controls/aichatpromptinputview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +2 -2
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +2 -2
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.d.ts +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +2 -2
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.d.ts +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +2 -2
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +2 -2
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +2 -2
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +2 -2
- package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +2 -2
- package/src/aichat/ui/feed/aichatfeeditemview.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +3 -2
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +3 -2
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +2 -2
- package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +2 -2
- package/src/aichat/utils/eventnames.d.ts +1 -1
- package/src/aichat/utils/eventnames.js +2 -2
- package/src/aichat/utils/promisequeue.d.ts +1 -1
- package/src/aichat/utils/promisequeue.js +2 -2
- package/src/aichathistory/aichathistory.d.ts +1 -1
- package/src/aichathistory/aichathistory.js +2 -2
- package/src/aichathistory/aichathistorycontroller.d.ts +1 -1
- package/src/aichathistory/aichathistorycontroller.js +2 -2
- package/src/aichathistory/aichathistoryui.d.ts +1 -1
- package/src/aichathistory/aichathistoryui.js +2 -2
- package/src/aichathistory/model/aichathistoryconversations.d.ts +1 -1
- package/src/aichathistory/model/aichathistoryconversations.js +2 -2
- package/src/aichathistory/model/aichathistoryitem.d.ts +1 -1
- package/src/aichathistory/model/aichathistoryitem.js +2 -2
- package/src/aichathistory/ui/aichathistorylistitemview.d.ts +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +3 -3
- package/src/aichathistory/ui/aichathistorylistview.d.ts +1 -1
- package/src/aichathistory/ui/aichathistorylistview.js +2 -2
- package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +2 -2
- package/src/aichathistory/ui/aichathistoryview.d.ts +1 -1
- package/src/aichathistory/ui/aichathistoryview.js +2 -2
- package/src/aiconfig.d.ts +1 -1
- package/src/aiconfig.js +1 -1
- package/src/aicore/aiconnector.d.ts +4 -2
- package/src/aicore/aiconnector.js +2 -2
- package/src/aicore/aiediting.d.ts +1 -1
- package/src/aicore/aiediting.js +2 -2
- package/src/aicore/model/aicapabilities.d.ts +1 -1
- package/src/aicore/model/aicapabilities.js +2 -2
- package/src/aicore/model/aicontext.d.ts +1 -1
- package/src/aicore/model/aicontext.js +2 -2
- package/src/aicore/model/aiinteraction.d.ts +1 -1
- package/src/aicore/model/aiinteraction.js +2 -2
- package/src/aicore/model/aimodels.d.ts +3 -12
- package/src/aicore/model/aimodels.js +2 -2
- package/src/aicore/model/aireply.d.ts +1 -1
- package/src/aicore/model/aireply.js +2 -2
- package/src/aicore/pipeline/airesponseapplier.d.ts +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +3 -3
- package/src/aicore/pipeline/airesponseparser.d.ts +1 -1
- package/src/aicore/pipeline/airesponseparser.js +3 -3
- package/src/aicore/ui/aidisclaimerview.d.ts +1 -1
- package/src/aicore/ui/aidisclaimerview.js +2 -2
- package/src/aicore/ui/aiskeleton.d.ts +1 -1
- package/src/aicore/ui/aiskeleton.js +2 -2
- package/src/aicore/ui/aispinner.d.ts +1 -1
- package/src/aicore/ui/aispinner.js +2 -2
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +2 -2
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +2 -2
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +5 -5
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +2 -2
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +2 -2
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +2 -2
- package/src/aicore/utils/common-translations.d.ts +1 -1
- package/src/aicore/utils/common-translations.js +2 -2
- package/src/aicore/utils/createresizebutton.d.ts +1 -1
- package/src/aicore/utils/createresizebutton.js +2 -2
- package/src/aicore/utils/documentposition.d.ts +1 -1
- package/src/aicore/utils/documentposition.js +2 -2
- package/src/aicore/utils/documentrange.d.ts +1 -1
- package/src/aicore/utils/documentrange.js +2 -2
- package/src/aicore/utils/eventnames.d.ts +1 -1
- package/src/aicore/utils/eventnames.js +2 -2
- package/src/aicore/utils/geteditorfromcontext.d.ts +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +2 -2
- package/src/aicore/utils/getoperationsfromreply.d.ts +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +2 -2
- package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +2 -2
- package/src/aicore/utils/htmlparser.d.ts +1 -1
- package/src/aicore/utils/htmlparser.js +2 -2
- package/src/aicore/utils/htmlstreamer.d.ts +1 -1
- package/src/aicore/utils/htmlstreamer.js +2 -2
- package/src/aicore/utils/scrollmanager.d.ts +1 -1
- package/src/aicore/utils/scrollmanager.js +2 -2
- package/src/aieditorintegration/aieditorintegration.d.ts +1 -1
- package/src/aieditorintegration/aieditorintegration.js +2 -2
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.d.ts +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +2 -2
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.d.ts +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +2 -2
- package/src/aiquickactions/aiquickactions.d.ts +1 -1
- package/src/aiquickactions/aiquickactions.js +2 -2
- package/src/aiquickactions/aiquickactionscommand.d.ts +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +2 -2
- package/src/aiquickactions/aiquickactionsediting.d.ts +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +2 -2
- package/src/aiquickactions/aiquickactionsui.d.ts +1 -1
- package/src/aiquickactions/aiquickactionsui.js +2 -2
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +2 -2
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +2 -2
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +2 -2
- package/src/aiquickactions/ui/aiquickactionsfilteredlistview.d.ts +1 -1
- package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +2 -2
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.d.ts +1 -1
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +2 -2
- package/src/aireviewmode/aireviewcheckdefinitions.d.ts +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +2 -2
- package/src/aireviewmode/aireviewmode.d.ts +1 -1
- package/src/aireviewmode/aireviewmode.js +2 -2
- package/src/aireviewmode/aireviewmodecontroller.d.ts +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +2 -2
- package/src/aireviewmode/aireviewmodeediting.d.ts +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +2 -2
- package/src/aireviewmode/aireviewmodeui.d.ts +1 -1
- package/src/aireviewmode/aireviewmodeui.js +2 -2
- package/src/aireviewmode/model/aireviewcheck.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +2 -2
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +2 -2
- package/src/aireviewmode/model/aireviewchecklist.d.ts +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +2 -2
- package/src/aireviewmode/model/aireviewcheckresult.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +2 -2
- package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +2 -2
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.js +2 -2
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +2 -2
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +2 -2
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +2 -2
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodegeneralerrorview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +2 -2
- package/src/aireviewmode/ui/aireviewmodeview.d.ts +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +2 -2
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +2 -2
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +2 -2
- package/src/aitabs/aitabs.d.ts +1 -1
- package/src/aitabs/aitabs.js +2 -2
- package/src/aitabs/aitabsmainview.d.ts +1 -1
- package/src/aitabs/aitabsmainview.js +2 -2
- package/src/aitabs/tabs/aitabsview.d.ts +1 -1
- package/src/aitabs/tabs/aitabsview.js +2 -2
- package/src/aitabs/tabs/tabbuttonview.d.ts +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +2 -2
- package/src/aitabs/tabs/tabpanelview.d.ts +1 -1
- package/src/aitabs/tabs/tabpanelview.js +2 -2
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/errors.d.ts +1 -1
- package/src/errors.js +2 -2
- package/src/errorsmap.d.ts +1 -1
- package/src/errorsmap.js +2 -2
- package/src/index.d.ts +1 -2
- package/src/index.js +2 -2
- package/theme/aiassistant/ai-dropdown.css +1 -1
- package/theme/aiassistant/ai-form.css +1 -1
- package/theme/aiassistant/ai.css +1 -1
- package/theme/aiballoon/aiballoon.css +1 -1
- package/theme/aichat/aichat-controls/aichat-context-chip.css +1 -1
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +1 -1
- package/theme/aichat/aichat-controls/aichat-context-controls.css +1 -1
- package/theme/aichat/aichat-controls/aichat-controls-button.css +1 -1
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +1 -1
- package/theme/aichat/aichat-controls/model-unavailable-message.css +1 -1
- package/theme/aichat/aichat-controls/prompt-capabilities.css +1 -1
- package/theme/aichat/aichat-controls/prompt-input.css +1 -1
- package/theme/aichat/aichat-controls.css +1 -1
- package/theme/aichat/aichat.css +1 -1
- package/theme/aichat/aichatfeed.css +55 -1
- package/theme/aichat/aichathistory.css +1 -1
- package/theme/aichat/aiminitoolbar.css +1 -1
- package/theme/aichat/aisuggestioncontainer.css +1 -1
- package/theme/aieditorintegration/aitogglebutton.css +1 -1
- package/theme/aiquickactions/aiquickactions.css +1 -1
- package/theme/aireviewmode/aireviewmode-balloon-panel-suggestion.css +1 -1
- package/theme/aireviewmode/aireviewmode-check-list.css +1 -1
- package/theme/aireviewmode/aireviewmode-check-run-result.css +1 -1
- package/theme/aireviewmode/aireviewmode-check-run.css +1 -1
- package/theme/aireviewmode/aireviewmode-review-completed.css +1 -1
- package/theme/aireviewmode/aireviewmode.css +9 -4
- package/theme/aitabs/aitabsview.css +1 -1
- package/theme/aitabs/tabs/tabbuttonview.css +1 -1
- package/theme/aitabs/tabs/tabsview.css +1 -1
- package/theme/common/aibutton.css +1 -1
- package/theme/common/aidisclaimer.css +1 -1
- package/theme/common/aiheader.css +1 -1
- package/theme/common/ainotification.css +1 -1
- package/theme/common/aiskeleton.css +1 -1
- package/theme/common/aispinner.css +1 -1
- package/theme/common/aitrackchanges.css +1 -1
- package/src/aichat/model/aichatmodels.d.ts +0 -63
- package/src/aichat/model/aichatmodels.js +0 -23
package/src/aichat/aichatui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2dbc2b=_0x5a3f;(function(_0x33d7a8,_0xb311bd){const _0x1acae1=_0x5a3f,_0x136551=_0x33d7a8();while(!![]){try{const _0x45e577=-parseInt(_0x1acae1(0x203))/0x1*(parseInt(_0x1acae1(0x192))/0x2)+-parseInt(_0x1acae1(0x172))/0x3*(parseInt(_0x1acae1(0x1d1))/0x4)+parseInt(_0x1acae1(0x1f5))/0x5+-parseInt(_0x1acae1(0x17d))/0x6*(parseInt(_0x1acae1(0x1b1))/0x7)+parseInt(_0x1acae1(0x1d0))/0x8*(parseInt(_0x1acae1(0x1dd))/0x9)+-parseInt(_0x1acae1(0x1a0))/0xa*(parseInt(_0x1acae1(0x179))/0xb)+parseInt(_0x1acae1(0x166))/0xc*(parseInt(_0x1acae1(0x1c9))/0xd);if(_0x45e577===_0xb311bd)break;else _0x136551['push'](_0x136551['shift']());}catch(_0x4c9ab4){_0x136551['push'](_0x136551['shift']());}}}(_0x4bbb,0xd92e6));import{ContextPlugin as _0x45d7cd}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x28d2fa}from'ckeditor5/src/utils.js';import{AIChatView as _0x1e4a78}from'./ui/aichatview.js';import{AITabs as _0x42f081}from'../aitabs/aitabs.js';import{getTranslation as _0x515d47}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x96cb73}from'ckeditor5/src/icons.js';function _0x5a3f(_0xb185d7,_0x148dca){const _0x4bbb14=_0x4bbb();return _0x5a3f=function(_0x5a3f6b,_0x1ef179){_0x5a3f6b=_0x5a3f6b-0x162;let _0x9702d6=_0x4bbb14[_0x5a3f6b];return _0x9702d6;},_0x5a3f(_0xb185d7,_0x148dca);}import{AIChatFeedInteractionHeaderView as _0x2a5d2f}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x8cc8de}from'./utils/promisequeue.js';function _0x4bbb(){const _0x22f2a8=['delegate','toggleLoadingSkeleton','startAutoScroll','chatControls','focusPromptInput','updateSuggestionItem','value','then','markFeedItemAsDone','ai-suggestion-reply','isOfficialPlugin','90toNOFF','addFeedInteractionHeader','_titleAnimationInterval','setModel','isWebSearchEnabled','_animateConversationTitle','find','conversation-start','get','_getLoadingMessage','AI_CHAT_WELCOME_MESSAGE','updateFeedItemAIReplySuggestionContent','showResizeButton','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','1590QtMEHT','plugins','queueEmptyPromise','availableModels','startsWith','resetMessageInput','remove','populateSourceResourceBalloon','stopInteraction','disableModelSelector','setReasoning','last','isModelAvailable','addFeedItemAIReply','enableControls','clearPendingContextUI','addFeedItemAISuggestion','7jQWFZh','destroy','_view','from','removeItem','setModelList','updateFeedItemAIReplySources','startInteraction','chatHeader','removeContextItem','TrackChanges','updateReplyItem','ai.availableReplyActions','showDiff','getItemIds','bind','displayedPrompt','AIChatUI','scrollFeedToSuggestion','config','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','pluginName','addFeedItemError','ai-reply','50024QCKubv','createConversation','context','setAddContextOptions','removeFeedInteraction','clearConversationContextUI','error-message','1484968KAOzkW','80488lCXqwg','interaction-header','contextItems','isTrackChangesOn','setSelectedModel','chatFeed','updateSuggestionPartState','capabilities','AITabs','commands','children','quickActionData','9hXaflt','scrollToSuggestion','<p>','addItem','_getInputPlaceholder','isLoading','finishInteraction','forEach','isDisabled','isPending','addFeedItemUserMessage','updateFeedItemAIReplySuggestionPartState','setIsMaximized','isVisible','enqueue','setConversationContext','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','abort','requires','disableControls','updateWebSources','updateFeedInteractionHeader','has','setLoadingMessage','4509985KbsYhX','updateCapabilities','renderingStrategy','clear','setWebSearch','stopAutoScroll','isMaximized','options','areActionsDisabled','updateFeedItemAIReplyContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','AI_CHAT_HEADING','updateResourceState','setConversationTitle','26669uvfTkk','user-message','_promiseQueue','filter','setIsUploadInProgress','streaming','length','closeSourceResourceBalloon','_interactionPromiseResolver','addFeedItemStaticMessage','isPremiumPlugin','chat','markItemAsDone','7800bqVHsU','interactionId','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','ai.chat.models.modelSelectorAlwaysVisible','label','</p>','toggleSuggestionDisplayMode','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','locale','view','87NIXekK','userMessage','setContextItemLoading','isDone','feedItemRenderingStrategy','ai.chat.context.searchInputVisibleFrom','isBusy','38654gHJjMC','insertSuggestion','setFeedItemRenderingStrategy','resetConversationTitle','2141250qkvJTl','addContextItem','_isTrackChangesCommandValueBound','values','addTab','isReasoningEnabled','trackChanges','set','enableModelSelector','setInputPlaceholder'];_0x4bbb=function(){return _0x22f2a8;};return _0x4bbb();}import{AI_CHAT_UI_EVENT_NAMES as _0x3502c8}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x2cded5}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x2c79ab}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x45d7cd{static get[_0x2dbc2b(0x1ef)](){return[_0x42f081];}[_0x2dbc2b(0x1b3)];static get[_0x2dbc2b(0x1c6)](){const _0xc87111=_0x2dbc2b;return _0xc87111(0x1c2);}static get[_0x2dbc2b(0x191)](){return!0x0;}static get[_0x2dbc2b(0x163)](){return!0x0;}[_0x2dbc2b(0x176)]=_0x2dbc2b(0x208);[_0x2dbc2b(0x1be)]=!0x0;[_0x2dbc2b(0x205)];[_0x2dbc2b(0x20b)];[_0x2dbc2b(0x194)]=void 0x0;[_0x2dbc2b(0x17f)]=!0x1;constructor(_0x595e8f){const _0x2212f9=_0x2dbc2b;super(_0x595e8f);const _0x2115f4=this[_0x2212f9(0x1cb)][_0x2212f9(0x1a1)][_0x2212f9(0x19a)](_0x2212f9(0x1d9));this[_0x2212f9(0x184)](_0x2212f9(0x178),!0x1),this[_0x2212f9(0x205)]=new _0x8cc8de(),this[_0x2212f9(0x1b3)]=new _0x1e4a78(this[_0x2212f9(0x1cb)][_0x2212f9(0x170)],{'showResizeButton':_0x2115f4[_0x2212f9(0x19e)],'contextResourcesSearchInputVisibleFrom':this[_0x2212f9(0x1cb)][_0x2212f9(0x1c4)][_0x2212f9(0x19a)](_0x2212f9(0x177))}),this[_0x2212f9(0x1b3)][_0x2212f9(0x187)](..._0x3502c8)['to'](this),this[_0x2212f9(0x1b3)]['on'](_0x2212f9(0x16e),(_0x5dc0d9,{showDiff:_0x506b4e})=>{const _0x53d0a7=_0x2212f9;this[_0x53d0a7(0x1be)]=_0x506b4e;}),_0x2115f4[_0x2212f9(0x171)][_0x2212f9(0x181)]({'id':_0x2212f9(0x164),'buttonLabel':_0x515d47(this[_0x2212f9(0x1cb)][_0x2212f9(0x170)],_0x2212f9(0x200)),'buttonIcon':_0x96cb73,'order':0x0,'content':this[_0x2212f9(0x1b3)]}),this[_0x2212f9(0x1b3)][_0x2212f9(0x18a)][_0x2212f9(0x1c0)](_0x2212f9(0x1e2))['to'](this,_0x2212f9(0x178),_0x34a110=>_0x34a110),this[_0x2212f9(0x1b3)][_0x2212f9(0x1d6)][_0x2212f9(0x1c0)](_0x2212f9(0x1e6))['to'](this,_0x2212f9(0x178),_0x5ce88f=>_0x5ce88f),this[_0x2212f9(0x1b3)][_0x2212f9(0x18a)][_0x2212f9(0x186)](this[_0x2212f9(0x1e1)]()),this[_0x2212f9(0x1c0)](_0x2212f9(0x1ac))['to'](this[_0x2212f9(0x1b3)][_0x2212f9(0x18a)],_0x2212f9(0x1ac));}[_0x2dbc2b(0x1b2)](){const _0x573330=_0x2dbc2b;super[_0x573330(0x1b2)](),this[_0x573330(0x194)]&&clearInterval(this[_0x573330(0x194)]);}[_0x2dbc2b(0x1ca)](_0x14c639){const _0x41e848=_0x2dbc2b;this[_0x41e848(0x1b3)][_0x41e848(0x1d6)][_0x41e848(0x1f8)](),this[_0x41e848(0x1b3)][_0x41e848(0x18a)][_0x41e848(0x185)](),this[_0x41e848(0x1b3)][_0x41e848(0x18a)][_0x41e848(0x1b6)](_0x14c639[_0x41e848(0x1a3)],!this[_0x41e848(0x1cb)][_0x41e848(0x1c4)][_0x41e848(0x19a)](_0x41e848(0x16b))),this[_0x41e848(0x162)]({'id':_0x41e848(0x199),'staticMessage':_0x515d47(this[_0x41e848(0x1cb)][_0x41e848(0x170)],_0x41e848(0x19c))});}[_0x2dbc2b(0x162)]({id:_0x10f8fb,staticMessage:_0xfdb511}){const _0x4802e9=_0x2dbc2b;this[_0x4802e9(0x1b3)][_0x4802e9(0x1d6)][_0x4802e9(0x1e0)](_0x4802e9(0x1c8),{'id':_0x10f8fb,'initialContent':_0x4802e9(0x1df)+_0xfdb511+_0x4802e9(0x16d)});}[_0x2dbc2b(0x1e7)](_0x4c6bdb){const _0x560a3a=_0x2dbc2b,_0x52a25d=_0x4c6bdb[_0x560a3a(0x1dc)]?.[_0x560a3a(0x1c1)]||_0x4c6bdb[_0x560a3a(0x173)];this[_0x560a3a(0x1b3)][_0x560a3a(0x1d6)][_0x560a3a(0x1e0)](_0x560a3a(0x204),{'contextItems':Array[_0x560a3a(0x1b4)](_0x4c6bdb[_0x560a3a(0x1d3)][_0x560a3a(0x180)]()),'initialContent':_0x560a3a(0x1df)+_0x52a25d+_0x560a3a(0x16d),'id':_0x4c6bdb['id']});}[_0x2dbc2b(0x1c7)]({errorMessage:_0x4d1a89,id:_0x3c9de7}){const _0xe5c56e=_0x2dbc2b;this[_0xe5c56e(0x1b3)][_0xe5c56e(0x1d6)][_0xe5c56e(0x1e0)](_0xe5c56e(0x1cf),{'initialContent':_0xe5c56e(0x1df)+_0x4d1a89+_0xe5c56e(0x16d),'id':_0x3c9de7});}[_0x2dbc2b(0x1ad)](_0x292fc6){const _0x29b1d2=_0x2dbc2b;return this[_0x29b1d2(0x205)][_0x29b1d2(0x1eb)](async()=>{const _0x2d7caa=_0x29b1d2;this[_0x2d7caa(0x1b3)][_0x2d7caa(0x1d6)][_0x2d7caa(0x1e0)](_0x2d7caa(0x1c8),{'id':_0x292fc6[_0x2d7caa(0x167)]+':'+_0x292fc6['id']}),this[_0x2d7caa(0x1f4)](null);});}async[_0x2dbc2b(0x1b0)](_0xc37d1a){const _0x1cc637=_0x2dbc2b,_0x404742=_0x2cded5(this[_0x1cc637(0x1cb)]);let _0x3994bd=_0x404742[_0x1cc637(0x1c4)][_0x1cc637(0x19a)](_0x1cc637(0x1bd))||[..._0x2c79ab];if(_0x404742[_0x1cc637(0x1a1)][_0x1cc637(0x1f3)](_0x1cc637(0x1bb))){if(!this[_0x1cc637(0x17f)]){this[_0x1cc637(0x17f)]=!0x0;const _0x16cfca=_0x404742[_0x1cc637(0x1da)][_0x1cc637(0x19a)](_0x1cc637(0x183));this[_0x1cc637(0x1b3)][_0x1cc637(0x1d6)][_0x1cc637(0x1c0)](_0x1cc637(0x1d4))['to'](_0x16cfca,_0x1cc637(0x18d));}}else _0x3994bd=_0x3994bd[_0x1cc637(0x206)](_0x32d7d1=>_0x1cc637(0x17a)!=_0x32d7d1);return this[_0x1cc637(0x205)][_0x1cc637(0x1eb)](async()=>{const _0x3c1d7d=_0x1cc637;this[_0x3c1d7d(0x1b3)][_0x3c1d7d(0x1d6)][_0x3c1d7d(0x1e0)](_0x3c1d7d(0x190),{'id':_0xc37d1a[_0x3c1d7d(0x167)]+':'+_0xc37d1a['id'],'areActionsDisabled':_0xc37d1a[_0x3c1d7d(0x1fd)],'showDiff':this[_0x3c1d7d(0x1be)],'availableActions':_0x3994bd}),this[_0x3c1d7d(0x1f4)](null);});}[_0x2dbc2b(0x193)](_0x4983ac,_0xb38f4f){const _0xb5b057=_0x2dbc2b,_0x2e7239=this[_0xb5b057(0x1b3)][_0xb5b057(0x1d6)][_0xb5b057(0x1db)][_0xb5b057(0x1ab)];if(_0x2e7239 instanceof _0x2a5d2f)return this[_0xb5b057(0x1b3)][_0xb5b057(0x1d6)][_0xb5b057(0x1db)][_0xb5b057(0x1a6)](_0x2e7239),void this[_0xb5b057(0x1b3)][_0xb5b057(0x1d6)][_0xb5b057(0x1e0)](_0xb5b057(0x1d2),{'id':_0x4983ac['id'],'capabilities':{'isWebSearchEnabled':_0x2e7239[_0xb5b057(0x1d8)][_0xb5b057(0x196)]||_0xb38f4f[_0xb5b057(0x196)],'isReasoningEnabled':_0x2e7239[_0xb5b057(0x1d8)][_0xb5b057(0x182)]||_0xb38f4f[_0xb5b057(0x182)]}});this[_0xb5b057(0x1b3)][_0xb5b057(0x1d6)][_0xb5b057(0x1e0)](_0xb5b057(0x1d2),{'id':_0x4983ac['id'],'capabilities':_0xb38f4f});}[_0x2dbc2b(0x1f2)](_0x152413){const _0x54ee83=_0x2dbc2b,_0x4fbd81=this[_0x54ee83(0x1b3)][_0x54ee83(0x1d6)][_0x54ee83(0x1db)][_0x54ee83(0x198)](_0x2e5ab6=>_0x2e5ab6[_0x54ee83(0x1fc)]['id']==_0x152413['id']&&_0x2e5ab6 instanceof _0x2a5d2f);_0x4fbd81&&_0x4fbd81[_0x54ee83(0x184)](_0x54ee83(0x1ea),_0x152413[_0x54ee83(0x1ea)]);}async[_0x2dbc2b(0x1fe)](_0x537c56){const _0x27ae6f=_0x2dbc2b,_0x200ce6=_0x537c56[_0x27ae6f(0x1f7)]||this[_0x27ae6f(0x176)];return this[_0x27ae6f(0x205)][_0x27ae6f(0x1eb)](async _0x37bc90=>{const _0x2adea9=_0x27ae6f;await this[_0x2adea9(0x1b3)][_0x2adea9(0x1d6)][_0x2adea9(0x1bc)]({..._0x537c56,'abortSignal':_0x37bc90,'renderingStrategy':_0x200ce6}),_0x537c56[_0x2adea9(0x175)]&&this[_0x2adea9(0x18f)](_0x537c56['id']);});}[_0x2dbc2b(0x1b7)](_0x5a651a,_0x1a7b57){const _0x1b2394=_0x2dbc2b;this[_0x1b2394(0x1b3)][_0x1b2394(0x1d6)][_0x1b2394(0x1f1)](_0x5a651a,_0x1a7b57);}async[_0x2dbc2b(0x19d)](_0x342906){const _0x4958cf=_0x2dbc2b,_0x555c0c=_0x342906[_0x4958cf(0x1f7)]||this[_0x4958cf(0x176)];return this[_0x4958cf(0x205)][_0x4958cf(0x1eb)](async _0x20cde0=>{const _0x5dcba4=_0x4958cf;await this[_0x5dcba4(0x1b3)][_0x5dcba4(0x1d6)][_0x5dcba4(0x18c)]({..._0x342906,'abortSignal':_0x20cde0,'renderingStrategy':_0x555c0c}),_0x342906[_0x5dcba4(0x175)]&&this[_0x5dcba4(0x18f)](_0x342906['id']);});}[_0x2dbc2b(0x1e8)](_0x5a2c4f){const _0x59d932=_0x2dbc2b;this[_0x59d932(0x1b3)][_0x59d932(0x1d6)][_0x59d932(0x1d7)](_0x5a2c4f);}[_0x2dbc2b(0x18f)](_0x2e83fa){const _0x4d0290=_0x2dbc2b;this[_0x4d0290(0x1b3)][_0x4d0290(0x1d6)][_0x4d0290(0x165)](_0x2e83fa);}[_0x2dbc2b(0x1cd)](_0x4745be){const _0x5cc10f=_0x2dbc2b;this[_0x5cc10f(0x1b3)][_0x5cc10f(0x1d6)][_0x5cc10f(0x1bf)]()[_0x5cc10f(0x206)](_0x50368e=>_0x50368e[_0x5cc10f(0x1a4)](_0x4745be))[_0x5cc10f(0x1e4)](_0x1f7f55=>this[_0x5cc10f(0x1b3)][_0x5cc10f(0x1d6)][_0x5cc10f(0x1b5)](_0x1f7f55));}[_0x2dbc2b(0x1b8)](){const _0x555b65=_0x2dbc2b;this[_0x555b65(0x1f4)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x555b65(0x1b3)][_0x555b65(0x18a)][_0x555b65(0x1a9)](!this[_0x555b65(0x1cb)][_0x555b65(0x1c4)][_0x555b65(0x19a)](_0x555b65(0x16b))),this[_0x555b65(0x178)]=!0x0,this[_0x555b65(0x1b3)][_0x555b65(0x1d6)][_0x555b65(0x189)]();}[_0x2dbc2b(0x1a8)](_0x325cb5){const _0x36c418=_0x2dbc2b;this[_0x36c418(0x205)][_0x36c418(0x1ee)](),this[_0x36c418(0x1b3)][_0x36c418(0x1d6)][_0x36c418(0x1bf)]()[_0x36c418(0x206)](_0x1d37df=>_0x1d37df[_0x36c418(0x1a4)](_0x325cb5['id']))[_0x36c418(0x1e4)](_0x56d749=>this[_0x36c418(0x18f)](_0x56d749)),this[_0x36c418(0x178)]=!0x1,this[_0x36c418(0x1b3)][_0x36c418(0x1d6)][_0x36c418(0x1fa)]();}async[_0x2dbc2b(0x1e3)](){const _0x3ed061=_0x2dbc2b;return this[_0x3ed061(0x205)][_0x3ed061(0x1a2)][_0x3ed061(0x18e)](()=>{const _0x2f2c7a=_0x3ed061;this[_0x2f2c7a(0x178)]=!0x1,this[_0x2f2c7a(0x1b3)][_0x2f2c7a(0x1d6)][_0x2f2c7a(0x1fa)]();});}[_0x2dbc2b(0x17e)](_0x17142f,_0x2c9009){const _0xfdb452=_0x2dbc2b;this[_0xfdb452(0x1b3)][_0xfdb452(0x18a)][_0xfdb452(0x17e)](_0x17142f,_0x2c9009);}[_0x2dbc2b(0x1ba)](_0x5c273b){const _0x3926e3=_0x2dbc2b;this[_0x3926e3(0x1b3)][_0x3926e3(0x18a)][_0x3926e3(0x1ba)](_0x5c273b);}[_0x2dbc2b(0x174)](_0xcfe8f0,_0x2f8af1){const _0x51f918=_0x2dbc2b;this[_0x51f918(0x1b3)][_0x51f918(0x18a)][_0x51f918(0x174)](_0xcfe8f0,_0x2f8af1);}[_0x2dbc2b(0x207)](_0x4f2527){const _0x43fd30=_0x2dbc2b;this[_0x43fd30(0x1b3)][_0x43fd30(0x18a)][_0x43fd30(0x207)](_0x4f2527);}[_0x2dbc2b(0x1ec)](_0x1dcc9d){const _0x3ca2d8=_0x2dbc2b;this[_0x3ca2d8(0x1b3)][_0x3ca2d8(0x18a)][_0x3ca2d8(0x1ec)](_0x1dcc9d);}[_0x2dbc2b(0x1af)](){const _0x8fcd6b=_0x2dbc2b;this[_0x8fcd6b(0x1b3)][_0x8fcd6b(0x18a)][_0x8fcd6b(0x1af)]();}[_0x2dbc2b(0x1ce)](){const _0x522189=_0x2dbc2b;this[_0x522189(0x1b3)][_0x522189(0x18a)][_0x522189(0x1ce)]();}[_0x2dbc2b(0x201)](_0x3e6e07,_0x777877,_0x11f89a){const _0x28e706=_0x2dbc2b;this[_0x28e706(0x1b3)][_0x28e706(0x18a)][_0x28e706(0x201)](_0x3e6e07,_0x777877,_0x11f89a);}[_0x2dbc2b(0x1a5)](){const _0x3ce95b=_0x2dbc2b;this[_0x3ce95b(0x1b3)][_0x3ce95b(0x18a)][_0x3ce95b(0x1a5)](),this[_0x3ce95b(0x1b3)][_0x3ce95b(0x18a)][_0x3ce95b(0x186)](this[_0x3ce95b(0x1e1)]());}[_0x2dbc2b(0x1cc)](_0x403f88){const _0x32441e=_0x2dbc2b;this[_0x32441e(0x1b3)][_0x32441e(0x18a)][_0x32441e(0x1cc)](_0x403f88);}[_0x2dbc2b(0x1f6)](_0x128d5d){const _0x48e078=_0x2dbc2b;this[_0x48e078(0x1b3)][_0x48e078(0x18a)][_0x48e078(0x1f9)](_0x128d5d[_0x48e078(0x196)]),this[_0x48e078(0x1b3)][_0x48e078(0x18a)][_0x48e078(0x1aa)](_0x128d5d[_0x48e078(0x182)]),this[_0x48e078(0x1b3)][_0x48e078(0x18a)][_0x48e078(0x186)](this[_0x48e078(0x1e1)](_0x128d5d));}[_0x2dbc2b(0x1d5)](_0x46f7f4,_0x230fc2){const _0x4d8ba3=_0x2dbc2b;this[_0x4d8ba3(0x1b3)][_0x4d8ba3(0x18a)][_0x4d8ba3(0x195)](_0x46f7f4),_0x230fc2&&this[_0x4d8ba3(0x1b3)][_0x4d8ba3(0x18a)][_0x4d8ba3(0x1a9)](!0x1);}[_0x2dbc2b(0x17b)](_0x4b45ba){const _0x30fb81=_0x2dbc2b;this[_0x30fb81(0x176)]=_0x4b45ba;}[_0x2dbc2b(0x188)](_0x401be6){const _0x5e11ab=_0x2dbc2b;this[_0x5e11ab(0x1b3)][_0x5e11ab(0x1d6)][_0x5e11ab(0x188)](_0x401be6);}[_0x2dbc2b(0x17c)](){const _0x39b6f2=_0x2dbc2b;this[_0x39b6f2(0x202)](_0x515d47(this[_0x39b6f2(0x1cb)][_0x39b6f2(0x170)],_0x39b6f2(0x200)));}[_0x2dbc2b(0x202)](_0x545987,_0x24b843=!0x1){const _0x4fcbac=_0x2dbc2b;if(_0x24b843&&!_0x28d2fa()&&_0x545987[_0x4fcbac(0x209)])return this[_0x4fcbac(0x1b3)][_0x4fcbac(0x1b9)][_0x4fcbac(0x16c)]='',void this[_0x4fcbac(0x197)](_0x545987);this[_0x4fcbac(0x1b3)][_0x4fcbac(0x1b9)][_0x4fcbac(0x16c)]=_0x545987;}[_0x2dbc2b(0x1f4)](_0x5e8f56){const _0x473a6d=_0x2dbc2b,_0xa3cc75=this[_0x473a6d(0x19b)](_0x5e8f56);this[_0x473a6d(0x1b3)][_0x473a6d(0x1d6)][_0x473a6d(0x1f4)](_0xa3cc75);}[_0x2dbc2b(0x197)](_0x10bba2){const _0x51003d=_0x2dbc2b;let _0x591a07=0x0;clearInterval(this[_0x51003d(0x194)]),this[_0x51003d(0x194)]=setInterval(()=>{const _0x493934=_0x51003d;this[_0x493934(0x1b3)][_0x493934(0x1b9)][_0x493934(0x16c)]=this[_0x493934(0x1b3)][_0x493934(0x1b9)][_0x493934(0x16c)]+_0x10bba2[_0x591a07],_0x591a07++,_0x591a07===_0x10bba2[_0x493934(0x209)]&&clearInterval(this[_0x493934(0x194)]);},0x1e);}[_0x2dbc2b(0x1e9)](_0x3ce2b0){const _0x3e6325=_0x2dbc2b;this[_0x3e6325(0x1b3)][_0x3e6325(0x1b9)][_0x3e6325(0x1fb)]=_0x3ce2b0;}[_0x2dbc2b(0x19b)](_0x127277){const _0x5de9b4=_0x2dbc2b;return _0x127277?_0x127277[_0x5de9b4(0x196)]&&_0x127277[_0x5de9b4(0x182)]?_0x515d47(this[_0x5de9b4(0x1cb)][_0x5de9b4(0x170)],_0x5de9b4(0x169)):_0x127277[_0x5de9b4(0x196)]?_0x515d47(this[_0x5de9b4(0x1cb)][_0x5de9b4(0x170)],_0x5de9b4(0x1ff)):_0x127277[_0x5de9b4(0x182)]?_0x515d47(this[_0x5de9b4(0x1cb)][_0x5de9b4(0x170)],_0x5de9b4(0x168)):_0x515d47(this[_0x5de9b4(0x1cb)][_0x5de9b4(0x170)],_0x5de9b4(0x19f)):'';}[_0x2dbc2b(0x1e1)](_0x2d750b){const _0x42634e=_0x2dbc2b;return _0x2d750b?_0x2d750b[_0x42634e(0x196)]&&_0x2d750b[_0x42634e(0x182)]?_0x515d47(this[_0x42634e(0x1cb)][_0x42634e(0x170)],_0x42634e(0x1c5)):_0x2d750b[_0x42634e(0x196)]?_0x515d47(this[_0x42634e(0x1cb)][_0x42634e(0x170)],_0x42634e(0x16a)):_0x2d750b[_0x42634e(0x182)]?_0x515d47(this[_0x42634e(0x1cb)][_0x42634e(0x170)],_0x42634e(0x16f)):_0x515d47(this[_0x42634e(0x1cb)][_0x42634e(0x170)],_0x42634e(0x1ed)):_0x515d47(this[_0x42634e(0x1cb)][_0x42634e(0x170)],_0x42634e(0x1ed));}[_0x2dbc2b(0x1a7)](_0x13fa8a,_0x2069a1,_0x2cffd4,_0x13a728){const _0x1e9b4e=_0x2dbc2b;this[_0x1e9b4e(0x1b3)][_0x1e9b4e(0x1a7)](_0x13fa8a,_0x2069a1,_0x2cffd4,_0x13a728);}[_0x2dbc2b(0x20a)](_0x59177d){const _0x3ddd11=_0x2dbc2b;this[_0x3ddd11(0x1b3)][_0x3ddd11(0x20a)](_0x59177d);}[_0x2dbc2b(0x18b)](){const _0x25f228=_0x2dbc2b;this[_0x25f228(0x1b3)][_0x25f228(0x18a)][_0x25f228(0x18b)]();}[_0x2dbc2b(0x1c3)](_0x15231f,_0x5de3f9){const _0x543749=_0x2dbc2b;this[_0x543749(0x1b3)][_0x543749(0x1d6)][_0x543749(0x1de)](_0x15231f,_0x5de3f9);}[_0x2dbc2b(0x189)](){const _0x432d50=_0x2dbc2b;this[_0x432d50(0x1b3)][_0x432d50(0x1d6)][_0x432d50(0x189)]();}[_0x2dbc2b(0x1f0)](){const _0x3110ae=_0x2dbc2b;this[_0x3110ae(0x1b3)][_0x3110ae(0x18a)][_0x3110ae(0x1e5)]=!0x0;}[_0x2dbc2b(0x1ae)](){const _0x59d142=_0x2dbc2b;this[_0x59d142(0x1b3)][_0x59d142(0x18a)][_0x59d142(0x1e5)]=!0x1;}}
|
|
23
|
+
const _0x24ff1c=_0xb60d;function _0x3680(){const _0x53ea09=['removeItem','plugins','toggleSuggestionDisplayMode','contextItems','createConversation','clear','3197922tysUZQ','_interactionPromiseResolver','TrackChanges','streaming','423067BaFIpA','AIChatUI','renderingStrategy','clearConversationContextUI','showDiff','addFeedItemUserMessage','updateSuggestionPartState','updateFeedItemAIReplySources','addContextItem','requires','options','enableControls','get','ai.availableReplyActions','abort','length','has','last','disableControls','setLoadingMessage','_promiseQueue','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','8wepRIR','setModelList','removeFeedInteraction','stopInteraction','addItem','filter','pluginName','isDone','addFeedItemAISuggestion','quickActionData','remove','focusPromptInput','ai-suggestion-reply','interaction-header','updateCapabilities','isVisible','value','addTab','setIsMaximized','capabilities','setConversationContext','isOfficialPlugin','startInteraction','updateFeedInteractionHeader','availableModels','setModel','isPending','set','_getInputPlaceholder','locale','userMessage','setFeedItemRenderingStrategy','674451CeLLxR','_getLoadingMessage','clearPendingContextUI','label','AI_CHAT_HEADING','context','isWebSearchEnabled','trackChanges','scrollToSuggestion','values','enableModelSelector','startAutoScroll','_isTrackChangesCommandValueBound','markFeedItemAsDone','setContextItemLoading','resetMessageInput','disableModelSelector','showResizeButton','displayedPrompt','config','chatHeader','setSelectedModel','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','addFeedItemAIReply','stopAutoScroll','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','feedItemRenderingStrategy','delegate','updateReplyItem','50reHPvg','setConversationTitle','closeSourceResourceBalloon','isModelAvailable','setInputPlaceholder','updateWebSources','updateFeedItemAIReplyContent','setWebSearch','isLoading','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','_view','updateFeedItemAIReplySuggestionPartState','enqueue','isMaximized','then','ai.chat.context.searchInputVisibleFrom','removeContextItem','<p>','addFeedItemStaticMessage','isReasoningEnabled','AI_CHAT_WELCOME_MESSAGE','chatFeed','interactionId','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','_animateConversationTitle','resetConversationTitle','commands','AITabs','ai.chat.models.modelSelectorAlwaysVisible','populateSourceResourceBalloon','setReasoning','getItemIds','updateFeedItemAIReplySuggestionContent','from','chatControls','user-message','addFeedInteractionHeader','finishInteraction','toggleLoadingSkeleton','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','markItemAsDone','6vrXwNx','children','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','setIsUploadInProgress','1612416mAqtYZ','view','bind','chat','isBusy','setAddContextOptions','areActionsDisabled','addFeedItemError','updateResourceState','updateSuggestionItem','conversation-start','1179130IcReyy','isTrackChangesOn','destroy','forEach','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','find','</p>','isDisabled','error-message','_titleAnimationInterval','queueEmptyPromise','2098816iaYnDD','insertSuggestion','scrollFeedToSuggestion','2690862VQFARn','isPremiumPlugin','startsWith','ai-reply'];_0x3680=function(){return _0x53ea09;};return _0x3680();}function _0xb60d(_0x33f073,_0x31abea){const _0x368018=_0x3680();return _0xb60d=function(_0xb60d76,_0xf0a1a5){_0xb60d76=_0xb60d76-0xc2;let _0x115a8b=_0x368018[_0xb60d76];return _0x115a8b;},_0xb60d(_0x33f073,_0x31abea);}(function(_0x1c60f3,_0x3f77d2){const _0x39b7e1=_0xb60d,_0x17866d=_0x1c60f3();while(!![]){try{const _0x2e8e85=-parseInt(_0x39b7e1(0x14d))/0x1+parseInt(_0x39b7e1(0x126))/0x2+parseInt(_0x39b7e1(0x13f))/0x3+parseInt(_0x39b7e1(0x163))/0x4*(-parseInt(_0x39b7e1(0x131))/0x5)+parseInt(_0x39b7e1(0x122))/0x6*(-parseInt(_0x39b7e1(0x149))/0x7)+-parseInt(_0x39b7e1(0x13c))/0x8+parseInt(_0x39b7e1(0xdc))/0x9*(parseInt(_0x39b7e1(0xf9))/0xa);if(_0x2e8e85===_0x3f77d2)break;else _0x17866d['push'](_0x17866d['shift']());}catch(_0x12152d){_0x17866d['push'](_0x17866d['shift']());}}}(_0x3680,0x71444));import{ContextPlugin as _0x15a0e6}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x33ed22}from'ckeditor5/src/utils.js';import{AIChatView as _0x4ebbf3}from'./ui/aichatview.js';import{AITabs as _0x308e0a}from'../aitabs/aitabs.js';import{getTranslation as _0x434553}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x4115a4}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x557a84}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x2bd74b}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x4aab44}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x5c2e4a}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x37a15a}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x15a0e6{static get[_0x24ff1c(0x156)](){return[_0x308e0a];}[_0x24ff1c(0x103)];static get[_0x24ff1c(0xc2)](){const _0xd7aeaf=_0x24ff1c;return _0xd7aeaf(0x14e);}static get[_0x24ff1c(0xd1)](){return!0x0;}static get[_0x24ff1c(0x140)](){return!0x0;}[_0x24ff1c(0xf6)]=_0x24ff1c(0x14c);[_0x24ff1c(0x151)]=!0x0;[_0x24ff1c(0x161)];[_0x24ff1c(0x14a)];[_0x24ff1c(0x13a)]=void 0x0;[_0x24ff1c(0xe8)]=!0x1;constructor(_0x1ebfd5){const _0x18934c=_0x24ff1c;super(_0x1ebfd5);const _0x362792=this[_0x18934c(0xe1)][_0x18934c(0x144)][_0x18934c(0x159)](_0x18934c(0x114));this[_0x18934c(0xd7)](_0x18934c(0x12a),!0x1),this[_0x18934c(0x161)]=new _0x2bd74b(),this[_0x18934c(0x103)]=new _0x4ebbf3(this[_0x18934c(0xe1)][_0x18934c(0xd9)],{'showResizeButton':_0x362792[_0x18934c(0xed)],'contextResourcesSearchInputVisibleFrom':this[_0x18934c(0xe1)][_0x18934c(0xef)][_0x18934c(0x159)](_0x18934c(0x108))}),this[_0x18934c(0x103)][_0x18934c(0xf7)](..._0x4aab44)['to'](this),this[_0x18934c(0x103)]['on'](_0x18934c(0x145),(_0x743aba,{showDiff:_0x4dba20})=>{const _0x589b9d=_0x18934c;this[_0x589b9d(0x151)]=_0x4dba20;}),_0x362792[_0x18934c(0x127)][_0x18934c(0xcd)]({'id':_0x18934c(0x129),'buttonLabel':_0x434553(this[_0x18934c(0xe1)][_0x18934c(0xd9)],_0x18934c(0xe0)),'buttonIcon':_0x4115a4,'order':0x0,'content':this[_0x18934c(0x103)]}),this[_0x18934c(0x103)][_0x18934c(0x11b)][_0x18934c(0x128)](_0x18934c(0x101))['to'](this,_0x18934c(0x12a),_0x31b68f=>_0x31b68f),this[_0x18934c(0x103)][_0x18934c(0x10e)][_0x18934c(0x128)](_0x18934c(0xd6))['to'](this,_0x18934c(0x12a),_0x3dab1a=>_0x3dab1a),this[_0x18934c(0x103)][_0x18934c(0x11b)][_0x18934c(0xfd)](this[_0x18934c(0xd8)]()),this[_0x18934c(0x128)](_0x18934c(0xfc))['to'](this[_0x18934c(0x103)][_0x18934c(0x11b)],_0x18934c(0xfc));}[_0x24ff1c(0x133)](){const _0x3b0ec2=_0x24ff1c;super[_0x3b0ec2(0x133)](),this[_0x3b0ec2(0x13a)]&&clearInterval(this[_0x3b0ec2(0x13a)]);}[_0x24ff1c(0x147)](_0x3a6ed6){const _0x169573=_0x24ff1c;this[_0x169573(0x103)][_0x169573(0x10e)][_0x169573(0x148)](),this[_0x169573(0x103)][_0x169573(0x11b)][_0x169573(0xe6)](),this[_0x169573(0x103)][_0x169573(0x11b)][_0x169573(0x164)](_0x3a6ed6[_0x169573(0xd4)],!this[_0x169573(0xe1)][_0x169573(0xef)][_0x169573(0x159)](_0x169573(0x115))),this[_0x169573(0x10b)]({'id':_0x169573(0x130),'staticMessage':_0x434553(this[_0x169573(0xe1)][_0x169573(0xd9)],_0x169573(0x10d))});}[_0x24ff1c(0x10b)]({id:_0x5f3ba4,staticMessage:_0x42d5b0}){const _0x2ed933=_0x24ff1c;this[_0x2ed933(0x103)][_0x2ed933(0x10e)][_0x2ed933(0x167)](_0x2ed933(0x142),{'id':_0x5f3ba4,'initialContent':_0x2ed933(0x10a)+_0x42d5b0+_0x2ed933(0x137)});}[_0x24ff1c(0x152)](_0x481eb3){const _0x345cf6=_0x24ff1c,_0x24c2b0=_0x481eb3[_0x345cf6(0xc5)]?.[_0x345cf6(0xee)]||_0x481eb3[_0x345cf6(0xda)];this[_0x345cf6(0x103)][_0x345cf6(0x10e)][_0x345cf6(0x167)](_0x345cf6(0x11c),{'contextItems':Array[_0x345cf6(0x11a)](_0x481eb3[_0x345cf6(0x146)][_0x345cf6(0xe5)]()),'initialContent':_0x345cf6(0x10a)+_0x24c2b0+_0x345cf6(0x137),'id':_0x481eb3['id']});}[_0x24ff1c(0x12d)]({errorMessage:_0x45848f,id:_0x222d3d}){const _0x3728cc=_0x24ff1c;this[_0x3728cc(0x103)][_0x3728cc(0x10e)][_0x3728cc(0x167)](_0x3728cc(0x139),{'initialContent':_0x3728cc(0x10a)+_0x45848f+_0x3728cc(0x137),'id':_0x222d3d});}[_0x24ff1c(0xf3)](_0x3a7f97){const _0x75609d=_0x24ff1c;return this[_0x75609d(0x161)][_0x75609d(0x105)](async()=>{const _0x4f2370=_0x75609d;this[_0x4f2370(0x103)][_0x4f2370(0x10e)][_0x4f2370(0x167)](_0x4f2370(0x142),{'id':_0x3a7f97[_0x4f2370(0x10f)]+':'+_0x3a7f97['id']}),this[_0x4f2370(0x160)](null);});}async[_0x24ff1c(0xc4)](_0x591202){const _0x1ca7fb=_0x24ff1c,_0x1a0708=_0x5c2e4a(this[_0x1ca7fb(0xe1)]);let _0x4de701=_0x1a0708[_0x1ca7fb(0xef)][_0x1ca7fb(0x159)](_0x1ca7fb(0x15a))||[..._0x37a15a];if(_0x1a0708[_0x1ca7fb(0x144)][_0x1ca7fb(0x15d)](_0x1ca7fb(0x14b))){if(!this[_0x1ca7fb(0xe8)]){this[_0x1ca7fb(0xe8)]=!0x0;const _0x439395=_0x1a0708[_0x1ca7fb(0x113)][_0x1ca7fb(0x159)](_0x1ca7fb(0xe3));this[_0x1ca7fb(0x103)][_0x1ca7fb(0x10e)][_0x1ca7fb(0x128)](_0x1ca7fb(0x132))['to'](_0x439395,_0x1ca7fb(0xcc));}}else _0x4de701=_0x4de701[_0x1ca7fb(0x168)](_0x2b8919=>_0x1ca7fb(0x13d)!=_0x2b8919);return this[_0x1ca7fb(0x161)][_0x1ca7fb(0x105)](async()=>{const _0x56e499=_0x1ca7fb;this[_0x56e499(0x103)][_0x56e499(0x10e)][_0x56e499(0x167)](_0x56e499(0xc8),{'id':_0x591202[_0x56e499(0x10f)]+':'+_0x591202['id'],'areActionsDisabled':_0x591202[_0x56e499(0x12c)],'showDiff':this[_0x56e499(0x151)],'availableActions':_0x4de701}),this[_0x56e499(0x160)](null);});}[_0x24ff1c(0x11d)](_0x3d8ebd,_0x1252f7){const _0x370b42=_0x24ff1c,_0x25a83f=this[_0x370b42(0x103)][_0x370b42(0x10e)][_0x370b42(0x123)][_0x370b42(0x15e)];if(_0x25a83f instanceof _0x557a84)return this[_0x370b42(0x103)][_0x370b42(0x10e)][_0x370b42(0x123)][_0x370b42(0xc6)](_0x25a83f),void this[_0x370b42(0x103)][_0x370b42(0x10e)][_0x370b42(0x167)](_0x370b42(0xc9),{'id':_0x3d8ebd['id'],'capabilities':{'isWebSearchEnabled':_0x25a83f[_0x370b42(0xcf)][_0x370b42(0xe2)]||_0x1252f7[_0x370b42(0xe2)],'isReasoningEnabled':_0x25a83f[_0x370b42(0xcf)][_0x370b42(0x10c)]||_0x1252f7[_0x370b42(0x10c)]}});this[_0x370b42(0x103)][_0x370b42(0x10e)][_0x370b42(0x167)](_0x370b42(0xc9),{'id':_0x3d8ebd['id'],'capabilities':_0x1252f7});}[_0x24ff1c(0xd3)](_0x22262c){const _0x5671df=_0x24ff1c,_0x22c404=this[_0x5671df(0x103)][_0x5671df(0x10e)][_0x5671df(0x123)][_0x5671df(0x136)](_0x44a4eb=>_0x44a4eb[_0x5671df(0x157)]['id']==_0x22262c['id']&&_0x44a4eb instanceof _0x557a84);_0x22c404&&_0x22c404[_0x5671df(0xd7)](_0x5671df(0xcb),_0x22262c[_0x5671df(0xcb)]);}async[_0x24ff1c(0xff)](_0x34022e){const _0x413d75=_0x24ff1c,_0x5008e2=_0x34022e[_0x413d75(0x14f)]||this[_0x413d75(0xf6)];return this[_0x413d75(0x161)][_0x413d75(0x105)](async _0xc6a22b=>{const _0x542428=_0x413d75;await this[_0x542428(0x103)][_0x542428(0x10e)][_0x542428(0xf8)]({..._0x34022e,'abortSignal':_0xc6a22b,'renderingStrategy':_0x5008e2}),_0x34022e[_0x542428(0xc3)]&&this[_0x542428(0xe9)](_0x34022e['id']);});}[_0x24ff1c(0x154)](_0x38a473,_0x2a2ab8){const _0x4bcbfa=_0x24ff1c;this[_0x4bcbfa(0x103)][_0x4bcbfa(0x10e)][_0x4bcbfa(0xfe)](_0x38a473,_0x2a2ab8);}async[_0x24ff1c(0x119)](_0x18d56e){const _0x73f52d=_0x24ff1c,_0x41ea26=_0x18d56e[_0x73f52d(0x14f)]||this[_0x73f52d(0xf6)];return this[_0x73f52d(0x161)][_0x73f52d(0x105)](async _0x3c0b4f=>{const _0x4889ee=_0x73f52d;await this[_0x4889ee(0x103)][_0x4889ee(0x10e)][_0x4889ee(0x12f)]({..._0x18d56e,'abortSignal':_0x3c0b4f,'renderingStrategy':_0x41ea26}),_0x18d56e[_0x4889ee(0xc3)]&&this[_0x4889ee(0xe9)](_0x18d56e['id']);});}[_0x24ff1c(0x104)](_0x4c6ab1){const _0x20c1ba=_0x24ff1c;this[_0x20c1ba(0x103)][_0x20c1ba(0x10e)][_0x20c1ba(0x153)](_0x4c6ab1);}[_0x24ff1c(0xe9)](_0x4e3d90){const _0x52d667=_0x24ff1c;this[_0x52d667(0x103)][_0x52d667(0x10e)][_0x52d667(0x121)](_0x4e3d90);}[_0x24ff1c(0x165)](_0x334db0){const _0xb9dd38=_0x24ff1c;this[_0xb9dd38(0x103)][_0xb9dd38(0x10e)][_0xb9dd38(0x118)]()[_0xb9dd38(0x168)](_0x1cd066=>_0x1cd066[_0xb9dd38(0x141)](_0x334db0))[_0xb9dd38(0x134)](_0xd2f69=>this[_0xb9dd38(0x103)][_0xb9dd38(0x10e)][_0xb9dd38(0x143)](_0xd2f69));}[_0x24ff1c(0xd2)](){const _0x1502b4=_0x24ff1c;this[_0x1502b4(0x160)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x1502b4(0x103)][_0x1502b4(0x11b)][_0x1502b4(0xec)](!this[_0x1502b4(0xe1)][_0x1502b4(0xef)][_0x1502b4(0x159)](_0x1502b4(0x115))),this[_0x1502b4(0x12a)]=!0x0,this[_0x1502b4(0x103)][_0x1502b4(0x10e)][_0x1502b4(0xe7)]();}[_0x24ff1c(0x166)](_0x43f629){const _0x322022=_0x24ff1c;this[_0x322022(0x161)][_0x322022(0x15b)](),this[_0x322022(0x103)][_0x322022(0x10e)][_0x322022(0x118)]()[_0x322022(0x168)](_0x1efeae=>_0x1efeae[_0x322022(0x141)](_0x43f629['id']))[_0x322022(0x134)](_0xff4f95=>this[_0x322022(0xe9)](_0xff4f95)),this[_0x322022(0x12a)]=!0x1,this[_0x322022(0x103)][_0x322022(0x10e)][_0x322022(0xf4)]();}async[_0x24ff1c(0x11e)](){const _0x1883f8=_0x24ff1c;return this[_0x1883f8(0x161)][_0x1883f8(0x13b)][_0x1883f8(0x107)](()=>{const _0x4bb367=_0x1883f8;this[_0x4bb367(0x12a)]=!0x1,this[_0x4bb367(0x103)][_0x4bb367(0x10e)][_0x4bb367(0xf4)]();});}[_0x24ff1c(0x155)](_0x2e5db6,_0x4a3a3e){const _0x25d39a=_0x24ff1c;this[_0x25d39a(0x103)][_0x25d39a(0x11b)][_0x25d39a(0x155)](_0x2e5db6,_0x4a3a3e);}[_0x24ff1c(0x109)](_0x1a4fd9){const _0x32dbf8=_0x24ff1c;this[_0x32dbf8(0x103)][_0x32dbf8(0x11b)][_0x32dbf8(0x109)](_0x1a4fd9);}[_0x24ff1c(0xea)](_0x5612d2,_0x3935a7){const _0x24694e=_0x24ff1c;this[_0x24694e(0x103)][_0x24694e(0x11b)][_0x24694e(0xea)](_0x5612d2,_0x3935a7);}[_0x24ff1c(0x125)](_0x430d4f){const _0x5ccc9a=_0x24ff1c;this[_0x5ccc9a(0x103)][_0x5ccc9a(0x11b)][_0x5ccc9a(0x125)](_0x430d4f);}[_0x24ff1c(0xd0)](_0x282294){const _0x536880=_0x24ff1c;this[_0x536880(0x103)][_0x536880(0x11b)][_0x536880(0xd0)](_0x282294);}[_0x24ff1c(0xde)](){const _0x53180e=_0x24ff1c;this[_0x53180e(0x103)][_0x53180e(0x11b)][_0x53180e(0xde)]();}[_0x24ff1c(0x150)](){const _0x516b65=_0x24ff1c;this[_0x516b65(0x103)][_0x516b65(0x11b)][_0x516b65(0x150)]();}[_0x24ff1c(0x12e)](_0x41721d,_0x40a5e9,_0x905ff0){const _0x16298e=_0x24ff1c;this[_0x16298e(0x103)][_0x16298e(0x11b)][_0x16298e(0x12e)](_0x41721d,_0x40a5e9,_0x905ff0);}[_0x24ff1c(0xeb)](){const _0x380427=_0x24ff1c;this[_0x380427(0x103)][_0x380427(0x11b)][_0x380427(0xeb)](),this[_0x380427(0x103)][_0x380427(0x11b)][_0x380427(0xfd)](this[_0x380427(0xd8)]());}[_0x24ff1c(0x12b)](_0x29eed2){const _0x39a226=_0x24ff1c;this[_0x39a226(0x103)][_0x39a226(0x11b)][_0x39a226(0x12b)](_0x29eed2);}[_0x24ff1c(0xca)](_0x877475){const _0xb42d02=_0x24ff1c;this[_0xb42d02(0x103)][_0xb42d02(0x11b)][_0xb42d02(0x100)](_0x877475[_0xb42d02(0xe2)]),this[_0xb42d02(0x103)][_0xb42d02(0x11b)][_0xb42d02(0x117)](_0x877475[_0xb42d02(0x10c)]),this[_0xb42d02(0x103)][_0xb42d02(0x11b)][_0xb42d02(0xfd)](this[_0xb42d02(0xd8)](_0x877475));}[_0x24ff1c(0xf1)](_0x25342d,_0x2bd575){const _0x362ef8=_0x24ff1c;this[_0x362ef8(0x103)][_0x362ef8(0x11b)][_0x362ef8(0xd5)](_0x25342d),_0x2bd575&&this[_0x362ef8(0x103)][_0x362ef8(0x11b)][_0x362ef8(0xec)](!0x1);}[_0x24ff1c(0xdb)](_0x3fe981){const _0x4759bd=_0x24ff1c;this[_0x4759bd(0xf6)]=_0x3fe981;}[_0x24ff1c(0x11f)](_0x27f734){const _0x5dcbb4=_0x24ff1c;this[_0x5dcbb4(0x103)][_0x5dcbb4(0x10e)][_0x5dcbb4(0x11f)](_0x27f734);}[_0x24ff1c(0x112)](){const _0x340d44=_0x24ff1c;this[_0x340d44(0xfa)](_0x434553(this[_0x340d44(0xe1)][_0x340d44(0xd9)],_0x340d44(0xe0)));}[_0x24ff1c(0xfa)](_0x39a87c,_0x54df46=!0x1){const _0x1bbbea=_0x24ff1c;if(_0x54df46&&!_0x33ed22()&&_0x39a87c[_0x1bbbea(0x15c)])return this[_0x1bbbea(0x103)][_0x1bbbea(0xf0)][_0x1bbbea(0xdf)]='',void this[_0x1bbbea(0x111)](_0x39a87c);this[_0x1bbbea(0x103)][_0x1bbbea(0xf0)][_0x1bbbea(0xdf)]=_0x39a87c;}[_0x24ff1c(0x160)](_0x2b8463){const _0x1131e9=_0x24ff1c,_0x18b26b=this[_0x1131e9(0xdd)](_0x2b8463);this[_0x1131e9(0x103)][_0x1131e9(0x10e)][_0x1131e9(0x160)](_0x18b26b);}[_0x24ff1c(0x111)](_0xe70ec2){const _0x14eb94=_0x24ff1c;let _0xd0d36b=0x0;clearInterval(this[_0x14eb94(0x13a)]),this[_0x14eb94(0x13a)]=setInterval(()=>{const _0x401ce7=_0x14eb94;this[_0x401ce7(0x103)][_0x401ce7(0xf0)][_0x401ce7(0xdf)]=this[_0x401ce7(0x103)][_0x401ce7(0xf0)][_0x401ce7(0xdf)]+_0xe70ec2[_0xd0d36b],_0xd0d36b++,_0xd0d36b===_0xe70ec2[_0x401ce7(0x15c)]&&clearInterval(this[_0x401ce7(0x13a)]);},0x1e);}[_0x24ff1c(0xce)](_0x5a2570){const _0x4a4424=_0x24ff1c;this[_0x4a4424(0x103)][_0x4a4424(0xf0)][_0x4a4424(0x106)]=_0x5a2570;}[_0x24ff1c(0xdd)](_0x30e63d){const _0x214c67=_0x24ff1c;return _0x30e63d?_0x30e63d[_0x214c67(0xe2)]&&_0x30e63d[_0x214c67(0x10c)]?_0x434553(this[_0x214c67(0xe1)][_0x214c67(0xd9)],_0x214c67(0x110)):_0x30e63d[_0x214c67(0xe2)]?_0x434553(this[_0x214c67(0xe1)][_0x214c67(0xd9)],_0x214c67(0xf2)):_0x30e63d[_0x214c67(0x10c)]?_0x434553(this[_0x214c67(0xe1)][_0x214c67(0xd9)],_0x214c67(0x102)):_0x434553(this[_0x214c67(0xe1)][_0x214c67(0xd9)],_0x214c67(0x124)):'';}[_0x24ff1c(0xd8)](_0x37939b){const _0x4b73e2=_0x24ff1c;return _0x37939b?_0x37939b[_0x4b73e2(0xe2)]&&_0x37939b[_0x4b73e2(0x10c)]?_0x434553(this[_0x4b73e2(0xe1)][_0x4b73e2(0xd9)],_0x4b73e2(0x120)):_0x37939b[_0x4b73e2(0xe2)]?_0x434553(this[_0x4b73e2(0xe1)][_0x4b73e2(0xd9)],_0x4b73e2(0xf5)):_0x37939b[_0x4b73e2(0x10c)]?_0x434553(this[_0x4b73e2(0xe1)][_0x4b73e2(0xd9)],_0x4b73e2(0x135)):_0x434553(this[_0x4b73e2(0xe1)][_0x4b73e2(0xd9)],_0x4b73e2(0x162)):_0x434553(this[_0x4b73e2(0xe1)][_0x4b73e2(0xd9)],_0x4b73e2(0x162));}[_0x24ff1c(0x116)](_0x3adef7,_0x282037,_0x61e14,_0x49ed08){const _0x1e5bbe=_0x24ff1c;this[_0x1e5bbe(0x103)][_0x1e5bbe(0x116)](_0x3adef7,_0x282037,_0x61e14,_0x49ed08);}[_0x24ff1c(0xfb)](_0x394ecb){const _0x17462a=_0x24ff1c;this[_0x17462a(0x103)][_0x17462a(0xfb)](_0x394ecb);}[_0x24ff1c(0xc7)](){const _0x108ea6=_0x24ff1c;this[_0x108ea6(0x103)][_0x108ea6(0x11b)][_0x108ea6(0xc7)]();}[_0x24ff1c(0x13e)](_0x4e90e9,_0x4bf7b7){const _0x533779=_0x24ff1c;this[_0x533779(0x103)][_0x533779(0x10e)][_0x533779(0xe4)](_0x4e90e9,_0x4bf7b7);}[_0x24ff1c(0xe7)](){const _0x4596bd=_0x24ff1c;this[_0x4596bd(0x103)][_0x4596bd(0x10e)][_0x4596bd(0xe7)]();}[_0x24ff1c(0x15f)](){const _0x11b1e2=_0x24ff1c;this[_0x11b1e2(0x103)][_0x11b1e2(0x11b)][_0x11b1e2(0x138)]=!0x0;}[_0x24ff1c(0x158)](){const _0x3c4eb8=_0x24ff1c;this[_0x3c4eb8(0x103)][_0x3c4eb8(0x11b)][_0x3c4eb8(0x138)]=!0x1;}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { type AIConnector, type AIUserMessage } from '../../aicore/aiconnector.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0xbb7b3c=_0x1fbd;(function(_0x140180,_0x81a41f){const _0x1de040=_0x1fbd,_0x59ecbd=_0x140180();while(!![]){try{const _0x1fcf35=parseInt(_0x1de040(0x1a7))/0x1*(parseInt(_0x1de040(0x134))/0x2)+-parseInt(_0x1de040(0x13d))/0x3*(-parseInt(_0x1de040(0x16f))/0x4)+parseInt(_0x1de040(0x1b0))/0x5+-parseInt(_0x1de040(0x1b1))/0x6+parseInt(_0x1de040(0x19c))/0x7+parseInt(_0x1de040(0x12a))/0x8+-parseInt(_0x1de040(0x181))/0x9;if(_0x1fcf35===_0x81a41f)break;else _0x59ecbd['push'](_0x59ecbd['shift']());}catch(_0x1eabcd){_0x59ecbd['push'](_0x59ecbd['shift']());}}}(_0x1e02,0x83d37));function _0x1fbd(_0x4a886a,_0x469974){const _0x1e025e=_0x1e02();return _0x1fbd=function(_0x1fbd52,_0x13c29e){_0x1fbd52=_0x1fbd52-0x126;let _0x862754=_0x1e025e[_0x1fbd52];return _0x862754;},_0x1fbd(_0x4a886a,_0x469974);}function _0x1e02(){const _0xcdd6dd=['sessionId','abort','ai-request-aborted','url','uploadUrl','file-','urls','_getCustomSourcesInitialState','_updateResourceInContextState','_pendingContextItems','fire','contextItemRemoved','_setAddContextOptionsDefaultState','selection','ai-chat-file-upload-failed','ai-chat-context-unsupported-type','string','get','files-','from','removeFromContext','2695084qVzhTc','_toggleAddCurrentDocumentOptionVisibility','loadSourceResources','object\x20with\x20content\x20and\x20type\x20properties','delete','ai-chat-resource-load-failed','MARKDOWN','all','_createContextItemFromContent','document','_addContextOptionsState','6adlgNb','HTML','_conversationContextItems','uploadProgressChanged','text/plain','getResources','ai-chat-source-resources-load-failed','map','find','576295ioUQEe','3467664fCxqvG','isCurrentDocumentInConversation','data','ai-chat-document-upload-failed','_finishUploadOperation','length','addUrlToContext','7623808YHJzFC','ai-chat-source-not-found','_startUploadOperation','sources','name','contextItemAdded','clearPendingContextItems','addCurrentDocumentToContext','abortController','isReadOnly','256694TCYPlX','_finishContextItemLoading','ai-chat-context-invalid-data','isHidden','type','end','TEXT','start','resources','10791QrHVlk','getId','values','addResourceToContext','updateCurrentDocument','uploadDocument','addSelectionToContext','code','resourceId','url-','getDocument','_connector','ai-chat-resource-no-data','_findSourceIdsByResourceId','message','getData','forEach','size','contextSent','_addToConversationContextItem','filter','stack','error','ai-chat-url-upload-failed','object','_ongoingUploadOperations','_ongoingUploads','mapContextItemsToRequestData','attributes','Current\x20document','label','getPendingContextItems','addContextOptionsChanged','addToConversationContext','has','File','set','_ownerId','isCurrentDocumentInContext','_config','uiId','push','hidden','FILE','sourceResourcesLoaded','getSentContextItems','_removeContextItem','resourceStateChanged','fetchDocument','isInContext','940VcGPkJ','isSelectionInContext','current-document','text/html','text/markdown','SELECTION','init','uploadFile','startsWith','_addContextItem','_convertTextResourceToFile','populateFromMessage','enabled','URL','removeSelectionFromContext','_mapContextItemToRequestData','contextItemLoadingEnded','files','17556489FQgtRi','DOCUMENT','content','version','_isResourceInContext','addFilesToContext'];_0x1e02=function(){return _0xcdd6dd;};return _0x1e02();}import{CKEditorError as _0x3ef10f,ObservableMixin as _0x55e1ec,uid as _0x427bda}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x4a9210,AIContextTextResourceType as _0x2f602c}from'../../aicore/model/aicontext.js';import{escape as _0x2c3987}from'es-toolkit/compat';import{errorsMap as _0x1616ab}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xbb7b3c(0x12f),_0xbb7b3c(0x192),_0xbb7b3c(0x17f),_0xbb7b3c(0x14f),_0xbb7b3c(0x153),_0xbb7b3c(0x15d),_0xbb7b3c(0x169),_0xbb7b3c(0x16c),_0xbb7b3c(0x1aa)];export class AIChatContext extends _0x55e1ec(){[_0xbb7b3c(0x148)];[_0xbb7b3c(0x164)];[_0xbb7b3c(0x162)];constructor({connector:_0x45de1b,config:_0x4fb355,ownerId:_0x53fd12}){const _0x30d61d=_0xbb7b3c;super(),this[_0x30d61d(0x148)]=_0x45de1b,this[_0x30d61d(0x164)]=_0x4fb355,this[_0x30d61d(0x162)]=_0x53fd12;}[_0xbb7b3c(0x175)](){const _0x4e26a4=_0xbb7b3c;this[_0x4e26a4(0x190)]=new Map(),this[_0x4e26a4(0x1a9)]=new Map(),this[_0x4e26a4(0x157)]=new Map(),this[_0x4e26a4(0x156)]=new Map(),this[_0x4e26a4(0x193)]();}[_0xbb7b3c(0x15c)](){const _0x29e9c5=_0xbb7b3c;return this[_0x29e9c5(0x190)];}async[_0xbb7b3c(0x17a)](_0x35edf6){const _0x53ff24=_0xbb7b3c,_0x3375d3=await this[_0x53ff24(0x1a4)](_0x35edf6);return this[_0x53ff24(0x150)](_0x3375d3),_0x53ff24(0x171)===_0x3375d3[_0x53ff24(0x165)]&&this[_0x53ff24(0x19d)](),_0x3375d3;}async[_0xbb7b3c(0x1a4)](_0x1e8b74){const _0x2a2d5d=_0xbb7b3c;if(_0x1e8b74[_0x2a2d5d(0x138)]===_0x4a9210[_0x2a2d5d(0x182)]){const _0x47af18=await this[_0x2a2d5d(0x148)][_0x2a2d5d(0x16d)](this[_0x2a2d5d(0x162)],_0x1e8b74['id'])[_0x2a2d5d(0x147)]();return{'id':_0x2a2d5d(0x171),'uiId':_0x2a2d5d(0x171),'label':_0x2a2d5d(0x15a),'type':_0x1e8b74[_0x2a2d5d(0x138)],'content':_0x47af18[_0x2a2d5d(0x183)],'hidden':this[_0x2a2d5d(0x1a9)][_0x2a2d5d(0x15f)](_0x2a2d5d(0x171)),'version':_0x47af18[_0x2a2d5d(0x159)]?.[_0x2a2d5d(0x184)],'sessionId':_0x47af18[_0x2a2d5d(0x159)]?.[_0x2a2d5d(0x187)]};}return{'id':_0x1e8b74['id'],'uiId':_0x1e8b74['id'],'label':_0x1e8b74[_0x2a2d5d(0x159)]?.[_0x2a2d5d(0x15b)]||_0x1e8b74[_0x2a2d5d(0x12e)]||_0x1e8b74[_0x2a2d5d(0x18a)]||_0x1e8b74['id'],'type':_0x1e8b74[_0x2a2d5d(0x138)],..._0x1e8b74?.[_0x2a2d5d(0x159)]?.[_0x2a2d5d(0x145)]?{'resourceId':_0x1e8b74[_0x2a2d5d(0x159)]?.[_0x2a2d5d(0x145)]}:{}};}[_0xbb7b3c(0x16a)](){const _0x828ddc=_0xbb7b3c;return new Map(this[_0x828ddc(0x1a9)]);}[_0xbb7b3c(0x19b)](_0x5c6081){const _0xa13f08=_0xbb7b3c,_0x86e0bf=this[_0xa13f08(0x190)][_0xa13f08(0x198)](_0x5c6081);_0x86e0bf?.[_0xa13f08(0x133)]||this[_0xa13f08(0x16b)](_0x5c6081);}[_0xbb7b3c(0x130)](){const _0x395b74=_0xbb7b3c;if(0x0===this[_0x395b74(0x190)][_0x395b74(0x14e)])return;for(const _0x2f52de of this[_0x395b74(0x190)][_0x395b74(0x13f)]())this[_0x395b74(0x16b)](_0x2f52de[_0x395b74(0x165)]);const _0xa35fb7=this[_0x395b74(0x1a9)][_0x395b74(0x198)](_0x395b74(0x171))||this[_0x395b74(0x190)][_0x395b74(0x198)](_0x395b74(0x171));_0xa35fb7&&this[_0x395b74(0x178)]({..._0xa35fb7,'isReadOnly':!0x0,'hidden':!0x0});}[_0xbb7b3c(0x15e)](_0x36251c){const _0x4cfcfc=_0xbb7b3c;for(const _0x11c8f5 of _0x36251c[_0x4cfcfc(0x13f)]())this[_0x4cfcfc(0x150)](_0x11c8f5);this[_0x4cfcfc(0x130)](),this[_0x4cfcfc(0x191)](_0x4cfcfc(0x14f),{'contextItems':Array[_0x4cfcfc(0x19a)](this[_0x4cfcfc(0x16a)]()[_0x4cfcfc(0x13f)]())});}[_0xbb7b3c(0x163)](){const _0x5a6fc2=_0xbb7b3c;return this[_0x5a6fc2(0x190)][_0x5a6fc2(0x15f)](_0x5a6fc2(0x171));}[_0xbb7b3c(0x170)](){const _0xbdb4f5=_0xbb7b3c;return this[_0xbdb4f5(0x190)][_0xbdb4f5(0x15f)](_0xbdb4f5(0x194));}[_0xbb7b3c(0x1b2)](){const _0x28dba3=_0xbb7b3c;return this[_0x28dba3(0x1a9)][_0x28dba3(0x15f)](_0x28dba3(0x171));}static[_0xbb7b3c(0x158)](_0x283c7a){const _0x5d350e=_0xbb7b3c;return Array[_0x5d350e(0x19a)](_0x283c7a[_0x5d350e(0x13f)]())[_0x5d350e(0x1ae)](_0x4ad786=>this[_0x5d350e(0x17e)](_0x4ad786))[_0x5d350e(0x151)](_0x3776c6=>null!==_0x3776c6);}async[_0xbb7b3c(0x186)](_0x334e8f,_0x150df7,_0x2b373f=_0x4a9210[_0xbb7b3c(0x168)]){const _0x3cdbc4=_0xbb7b3c,_0x5b2eaa=_0x3cdbc4(0x199)+_0x427bda();this[_0x3cdbc4(0x12c)](_0x5b2eaa);try{await Promise[_0x3cdbc4(0x1a3)](_0x334e8f[_0x3cdbc4(0x1ae)](async _0x18505f=>{const _0x58e02e=_0x3cdbc4,_0x2fe767=_0x58e02e(0x18c)+_0x427bda(),_0x7fdde3=_0x2c3987(_0x18505f[_0x58e02e(0x12e)]);try{this[_0x58e02e(0x178)]({'type':_0x2b373f,'label':_0x150df7?.[_0x58e02e(0x15b)]||_0x7fdde3,'uiId':_0x2fe767,'resourceId':_0x150df7?.[_0x58e02e(0x145)]},!0x0);const _0x234382=this[_0x58e02e(0x148)][_0x58e02e(0x176)](this[_0x58e02e(0x162)],_0x18505f,_0x150df7);this[_0x58e02e(0x157)][_0x58e02e(0x161)](_0x2fe767,_0x234382[_0x58e02e(0x132)]);const {id:_0x17dbc0}=await _0x234382[_0x58e02e(0x13e)]();this[_0x58e02e(0x157)][_0x58e02e(0x1a0)](_0x2fe767),this[_0x58e02e(0x135)]({'type':_0x2b373f,'id':_0x17dbc0,'label':_0x150df7?.[_0x58e02e(0x15b)]||_0x7fdde3,'uiId':_0x2fe767,'resourceId':_0x150df7?.[_0x58e02e(0x145)]},!0x1);}catch(_0xf85efd){this[_0x58e02e(0x157)][_0x58e02e(0x1a0)](_0x2fe767);if(!(_0xf85efd instanceof _0x3ef10f&&_0xf85efd[_0x58e02e(0x14b)][_0x58e02e(0x177)](_0x58e02e(0x189)))){const _0x3744ff=_0x1616ab[_0x58e02e(0x198)](_0xf85efd[_0x58e02e(0x144)])||_0x58e02e(0x195),_0x417374=new _0x3ef10f(_0x3744ff,null,{'fileName':_0x7fdde3,..._0xf85efd});_0x417374[_0x58e02e(0x152)]=_0xf85efd[_0x58e02e(0x152)],this[_0x58e02e(0x191)](_0x58e02e(0x153),{'error':_0x417374});}this[_0x58e02e(0x16b)](_0x2fe767);}}));}finally{this[_0x3cdbc4(0x127)](_0x5b2eaa);}}[_0xbb7b3c(0x131)](_0x1ca40b){const _0x4e0e77=_0xbb7b3c;if(this[_0x4e0e77(0x163)]())return;const _0x155b4f={'type':_0x4a9210[_0x4e0e77(0x182)],'uiId':_0x4e0e77(0x171),'label':_0x1ca40b,'isReadOnly':this[_0x4e0e77(0x1a9)][_0x4e0e77(0x15f)](_0x4e0e77(0x171)),'hidden':this[_0x4e0e77(0x1a9)][_0x4e0e77(0x15f)](_0x4e0e77(0x171))};this[_0x4e0e77(0x178)](_0x155b4f);}async[_0xbb7b3c(0x141)](_0xde3b5c,_0x57b6cb,_0x35ee60,_0x153f46){const _0x54f432=_0xbb7b3c,_0x204523=this[_0x54f432(0x190)][_0x54f432(0x198)](_0x54f432(0x171));if(_0x204523&&_0xde3b5c){_0x204523[_0x54f432(0x194)]=_0x153f46?_0x153f46[_0x54f432(0x1ae)](_0x2518ea=>({'start':_0x2518ea[_0x54f432(0x13b)],'end':_0x2518ea[_0x54f432(0x139)]})):[];try{if(_0x204523[_0x54f432(0x184)]===_0x57b6cb)return;const {id:_0x22ce16}=await this[_0x54f432(0x148)][_0x54f432(0x142)](this[_0x54f432(0x162)],_0xde3b5c,{'version':_0x57b6cb,'sessionId':_0x35ee60})[_0x54f432(0x13e)]();_0x204523['id']=_0x22ce16,_0x204523[_0x54f432(0x183)]=_0xde3b5c,_0x204523[_0x54f432(0x184)]=_0x57b6cb,_0x204523[_0x54f432(0x187)]=_0x35ee60;}catch(_0x2bf903){const _0x55a9e6=new _0x3ef10f(_0x54f432(0x126),null);_0x55a9e6[_0x54f432(0x152)]=_0x2bf903[_0x54f432(0x152)],this[_0x54f432(0x191)](_0x54f432(0x153),{'error':_0x55a9e6});}}}[_0xbb7b3c(0x143)](_0x43883e){const _0x3e764d=_0xbb7b3c;this[_0x3e764d(0x178)]({'type':_0x4a9210[_0x3e764d(0x174)],'label':_0x43883e,'uiId':_0x3e764d(0x194),'content':_0x43883e});}[_0xbb7b3c(0x17d)](){const _0x596234=_0xbb7b3c;this[_0x596234(0x16b)](_0x596234(0x194));}async[_0xbb7b3c(0x129)](_0x158e4a,_0x1ae8c6){const _0x4d801e=_0xbb7b3c,_0x294833=_0x4d801e(0x146)+_0x427bda();this[_0x4d801e(0x12c)](_0x294833);const _0x56435f=_0x4d801e(0x146)+_0x427bda();try{this[_0x4d801e(0x178)]({'type':_0x4a9210[_0x4d801e(0x17c)],'label':_0x1ae8c6?.[_0x4d801e(0x15b)]||_0x158e4a,'uiId':_0x56435f,'resourceId':_0x1ae8c6?.[_0x4d801e(0x145)]},!0x0);const _0x23c1b7=this[_0x4d801e(0x148)][_0x4d801e(0x18b)](this[_0x4d801e(0x162)],_0x158e4a,_0x1ae8c6);this[_0x4d801e(0x157)][_0x4d801e(0x161)](_0x56435f,_0x23c1b7[_0x4d801e(0x132)]);const {id:_0x290414}=await _0x23c1b7[_0x4d801e(0x13e)]();this[_0x4d801e(0x157)][_0x4d801e(0x1a0)](_0x56435f),this[_0x4d801e(0x135)]({'type':_0x4a9210[_0x4d801e(0x17c)],'id':_0x290414,'label':_0x1ae8c6?.[_0x4d801e(0x15b)]||_0x158e4a,'uiId':_0x56435f,'resourceId':_0x1ae8c6?.[_0x4d801e(0x145)]},!0x1);}catch(_0x4b38fa){this[_0x4d801e(0x157)][_0x4d801e(0x1a0)](_0x56435f),(_0x4b38fa[_0x4d801e(0x14b)][_0x4d801e(0x177)](_0x4d801e(0x189))||this[_0x4d801e(0x191)](_0x4d801e(0x153),{'error':new _0x3ef10f(_0x4d801e(0x154),this,{'url':_0x158e4a,'originalError':_0x4b38fa}),'url':_0x158e4a}),this[_0x4d801e(0x16b)](_0x56435f));}finally{this[_0x4d801e(0x127)](_0x294833);}}async[_0xbb7b3c(0x19e)](_0x246b47,_0x51ec6d,_0x552109){const _0x1fdfd4=_0xbb7b3c,_0x71726c=this[_0x1fdfd4(0x1a6)][_0x1fdfd4(0x12d)][_0x1fdfd4(0x1af)](_0x2f71b3=>_0x2f71b3['id']===_0x246b47);if(!_0x71726c)return this[_0x1fdfd4(0x191)](_0x1fdfd4(0x153),{'error':new _0x3ef10f(_0x1fdfd4(0x12b),this,{'sourceId':_0x246b47}),'sourceId':_0x246b47}),[];try{const _0x15a373=(await _0x71726c[_0x1fdfd4(0x1ac)](_0x51ec6d))[_0x1fdfd4(0x1ae)](_0x20798d=>{const _0x71d84d=_0x1fdfd4,_0x338a60=this[_0x71d84d(0x185)](_0x20798d['id']);return{..._0x20798d,'isInContext':_0x338a60};});return _0x71726c[_0x1fdfd4(0x13c)]=_0x15a373,this[_0x1fdfd4(0x191)](_0x1fdfd4(0x169),{'sourceId':_0x246b47,'source':_0x71726c,'resources':_0x15a373,'uid':_0x552109}),_0x15a373;}catch(_0x368c71){return this[_0x1fdfd4(0x191)](_0x1fdfd4(0x153),{'error':new _0x3ef10f(_0x1fdfd4(0x1ad),this,{'sourceId':_0x246b47,'originalError':_0x368c71}),'sourceId':_0x246b47,'sourceLabel':_0x71726c[_0x1fdfd4(0x15b)]}),[];}}async[_0xbb7b3c(0x140)](_0x45b820,_0x3e1a12){const _0x8f934b=_0xbb7b3c;if(this[_0x8f934b(0x185)](_0x3e1a12['id']))return;let _0x66144c=_0x3e1a12[_0x8f934b(0x1b3)];if(!_0x66144c&&_0x45b820[_0x8f934b(0x14c)])try{_0x66144c=await _0x45b820[_0x8f934b(0x14c)](_0x3e1a12['id']);}catch(_0x4243b9){return void this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x1a1),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id'],'originalError':_0x4243b9}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});}if(_0x66144c)switch(_0x3e1a12[_0x8f934b(0x138)]){case _0x4a9210[_0x8f934b(0x17c)]:if(_0x8f934b(0x197)!=typeof _0x66144c)return void this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x136),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id'],'expectedType':_0x8f934b(0x197),'actualType':typeof _0x66144c}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});await this[_0x8f934b(0x129)](_0x66144c,{'label':_0x3e1a12[_0x8f934b(0x15b)],'resourceId':_0x3e1a12['id']});break;case _0x4a9210[_0x8f934b(0x168)]:if(!(_0x66144c instanceof File))return void this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x136),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id'],'expectedType':_0x8f934b(0x160),'actualType':typeof _0x66144c}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});await this[_0x8f934b(0x186)]([_0x66144c],{'label':_0x3e1a12[_0x8f934b(0x15b)],'resourceId':_0x3e1a12['id']});break;case _0x4a9210[_0x8f934b(0x13a)]:if(_0x8f934b(0x155)!=typeof _0x66144c||!(_0x8f934b(0x183)in _0x66144c)||!(_0x8f934b(0x138)in _0x66144c))return void this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x136),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id'],'expectedType':_0x8f934b(0x19f),'actualType':typeof _0x66144c}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});_0x66144c=AIChatContext[_0x8f934b(0x179)](_0x66144c,_0x3e1a12[_0x8f934b(0x15b)]),await this[_0x8f934b(0x186)]([_0x66144c],{'label':_0x3e1a12[_0x8f934b(0x15b)],'resourceId':_0x3e1a12['id']},_0x4a9210[_0x8f934b(0x13a)]);break;default:this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x196),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id'],'resourceType':_0x3e1a12[_0x8f934b(0x138)]}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});}else this[_0x8f934b(0x191)](_0x8f934b(0x153),{'error':new _0x3ef10f(_0x8f934b(0x149),this,{'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']}),'resourceId':_0x3e1a12['id'],'sourceId':_0x45b820['id']});}static[_0xbb7b3c(0x179)](_0x2876f1,_0x513cba){const _0x30d71c=_0xbb7b3c;switch(_0x2876f1[_0x30d71c(0x138)]){case _0x2f602c[_0x30d71c(0x1a2)]:return new File([_0x2876f1[_0x30d71c(0x183)]],_0x513cba,{'type':_0x30d71c(0x173)});case _0x2f602c[_0x30d71c(0x1a8)]:return new File([_0x2876f1[_0x30d71c(0x183)]],_0x513cba,{'type':_0x30d71c(0x172)});default:return new File([_0x2876f1[_0x30d71c(0x183)]],_0x513cba,{'type':_0x30d71c(0x1ab)});}}static[_0xbb7b3c(0x17e)](_0x4029ed){const _0x2f5303=_0xbb7b3c;switch(_0x4029ed[_0x2f5303(0x138)]){case _0x4a9210[_0x2f5303(0x168)]:return{'type':_0x4a9210[_0x2f5303(0x168)],'id':_0x4029ed['id']};case _0x4a9210[_0x2f5303(0x17c)]:return{'type':_0x4a9210[_0x2f5303(0x17c)],'id':_0x4029ed['id']};case _0x4a9210[_0x2f5303(0x182)]:return{'type':_0x4a9210[_0x2f5303(0x182)],'id':_0x4029ed['id'],..._0x4029ed[_0x2f5303(0x194)]?.[_0x2f5303(0x128)]&&{'selection':_0x4029ed[_0x2f5303(0x194)]}};case _0x4a9210[_0x2f5303(0x13a)]:return{'type':_0x4a9210[_0x2f5303(0x168)],'id':_0x4029ed['id']};default:return null;}}[_0xbb7b3c(0x178)](_0x658b3d,_0x548990=!0x1){const _0x28cc92=_0xbb7b3c;if(this[_0x28cc92(0x190)][_0x28cc92(0x161)](_0x658b3d[_0x28cc92(0x165)],_0x658b3d),_0x658b3d[_0x28cc92(0x167)]||this[_0x28cc92(0x191)](_0x28cc92(0x12f),{'contextItem':_0x658b3d,'isLoading':_0x548990}),_0x28cc92(0x171)===_0x658b3d[_0x28cc92(0x165)]&&this[_0x28cc92(0x19d)](),_0x658b3d[_0x28cc92(0x145)]){const _0x3c13f9=this[_0x28cc92(0x14a)](_0x658b3d[_0x28cc92(0x145)]);_0x3c13f9&&_0x3c13f9[_0x28cc92(0x14d)](_0x17868e=>{const _0x23048d=_0x28cc92;this[_0x23048d(0x18f)](_0x17868e,_0x658b3d[_0x23048d(0x145)],!0x0);});}}[_0xbb7b3c(0x16b)](_0x41329f){const _0x4b12da=_0xbb7b3c,_0x22efd8=this[_0x4b12da(0x190)][_0x4b12da(0x198)](_0x41329f),_0x282502=this[_0x4b12da(0x157)][_0x4b12da(0x198)](_0x41329f);if(_0x282502&&(_0x282502[_0x4b12da(0x188)](),this[_0x4b12da(0x157)][_0x4b12da(0x1a0)](_0x41329f)),_0x22efd8?.[_0x4b12da(0x145)]){const _0x3e40b2=this[_0x4b12da(0x14a)](_0x22efd8[_0x4b12da(0x145)]);_0x3e40b2&&_0x3e40b2[_0x4b12da(0x14d)](_0x214675=>{const _0x1190de=_0x4b12da;this[_0x1190de(0x18f)](_0x214675,_0x22efd8[_0x1190de(0x145)],!0x1);});}this[_0x4b12da(0x190)][_0x4b12da(0x1a0)](_0x41329f),this[_0x4b12da(0x191)](_0x4b12da(0x192),{'uiId':_0x41329f,'type':_0x22efd8?.[_0x4b12da(0x138)]}),_0x4b12da(0x171)===_0x41329f&&this[_0x4b12da(0x19d)]();}[_0xbb7b3c(0x135)](_0x21ef3f,_0x197c98){const _0x5bccf4=_0xbb7b3c;if(this[_0x5bccf4(0x190)][_0x5bccf4(0x15f)](_0x21ef3f[_0x5bccf4(0x165)])&&(this[_0x5bccf4(0x190)][_0x5bccf4(0x161)](_0x21ef3f[_0x5bccf4(0x165)],_0x21ef3f),this[_0x5bccf4(0x191)](_0x5bccf4(0x17f),{'contextItem':_0x21ef3f,'isLoading':_0x197c98}),_0x21ef3f[_0x5bccf4(0x145)])){const _0x570a0b=this[_0x5bccf4(0x14a)](_0x21ef3f[_0x5bccf4(0x145)]);_0x570a0b&&_0x570a0b[_0x5bccf4(0x14d)](_0x5dcf23=>{const _0x9f8154=_0x5bccf4;this[_0x9f8154(0x18f)](_0x5dcf23,_0x21ef3f[_0x9f8154(0x145)],!0x0);});}}[_0xbb7b3c(0x150)](_0x170b5f){const _0x21bacd=_0xbb7b3c;this[_0x21bacd(0x1a9)][_0x21bacd(0x161)](_0x170b5f[_0x21bacd(0x165)],_0x170b5f);}[_0xbb7b3c(0x193)](){const _0x334c44=_0xbb7b3c;this[_0x334c44(0x1a6)]={'document':{'enabled':!0x1!==this[_0x334c44(0x164)]?.[_0x334c44(0x1a5)]?.[_0x334c44(0x17b)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x334c44(0x164)]?.[_0x334c44(0x18d)]?.[_0x334c44(0x17b)]},'files':{'enabled':!0x1!==this[_0x334c44(0x164)]?.[_0x334c44(0x180)]?.[_0x334c44(0x17b)]},'sources':this[_0x334c44(0x18e)]()},this[_0x334c44(0x191)](_0x334c44(0x15d),{'options':this[_0x334c44(0x1a6)]});}[_0xbb7b3c(0x18e)](){const _0x5c6fa6=_0xbb7b3c;return this[_0x5c6fa6(0x164)]?.[_0x5c6fa6(0x12d)]?.[_0x5c6fa6(0x1ae)](_0x2633b4=>({..._0x2633b4,'resources':[]}))??[];}[_0xbb7b3c(0x19d)](){const _0x19ec12=_0xbb7b3c,_0x2c6c1d=this[_0x19ec12(0x163)]()||this[_0x19ec12(0x1b2)]();this[_0x19ec12(0x1a6)][_0x19ec12(0x1a5)][_0x19ec12(0x137)]=_0x2c6c1d,this[_0x19ec12(0x191)](_0x19ec12(0x15d),{'options':this[_0x19ec12(0x1a6)]});}[_0xbb7b3c(0x185)](_0x13b32f){const _0x3823b4=_0xbb7b3c;for(const _0x3514a7 of this[_0x3823b4(0x190)][_0x3823b4(0x13f)]())if(_0x3514a7[_0x3823b4(0x145)]===_0x13b32f)return!0x0;for(const _0x134ce7 of this[_0x3823b4(0x1a9)][_0x3823b4(0x13f)]())if(_0x134ce7[_0x3823b4(0x145)]===_0x13b32f)return!0x0;return!0x1;}[_0xbb7b3c(0x14a)](_0x3b42aa){const _0x56f859=_0xbb7b3c,_0x10d512=[];for(const _0x1724ad of this[_0x56f859(0x1a6)][_0x56f859(0x12d)]){_0x1724ad[_0x56f859(0x13c)][_0x56f859(0x1af)](_0x9542f9=>_0x9542f9['id']===_0x3b42aa)&&_0x10d512[_0x56f859(0x166)](_0x1724ad['id']);}return 0x0===_0x10d512[_0x56f859(0x128)]?null:_0x10d512;}[_0xbb7b3c(0x18f)](_0x3cee4d,_0x111dcc,_0x7246c5){const _0x283ae0=_0xbb7b3c,_0x16901f=this[_0x283ae0(0x1a6)][_0x283ae0(0x12d)][_0x283ae0(0x1af)](_0xb8cc24=>_0xb8cc24['id']===_0x3cee4d);if(!_0x16901f)return;const _0x571eb5=_0x16901f[_0x283ae0(0x13c)][_0x283ae0(0x1af)](_0x510211=>_0x510211['id']===_0x111dcc);_0x571eb5&&(_0x571eb5[_0x283ae0(0x16e)]=_0x7246c5,this[_0x283ae0(0x191)](_0x283ae0(0x16c),{'sourceId':_0x3cee4d,'resourceId':_0x111dcc,'isInContext':_0x7246c5}));}[_0xbb7b3c(0x12c)](_0x4299de){const _0x1489d3=_0xbb7b3c;this[_0x1489d3(0x156)][_0x1489d3(0x161)](_0x4299de,!0x0),this[_0x1489d3(0x156)][_0x1489d3(0x14e)]&&this[_0x1489d3(0x191)](_0x1489d3(0x1aa),{'isUploadInProgress':!0x0});}[_0xbb7b3c(0x127)](_0x301da1){const _0x2333dc=_0xbb7b3c;this[_0x2333dc(0x156)][_0x2333dc(0x1a0)](_0x301da1),0x0===this[_0x2333dc(0x156)][_0x2333dc(0x14e)]&&this[_0x2333dc(0x191)](_0x2333dc(0x1aa),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
function _0xafde(_0x5ad0d9,_0xa53d31){const _0x319717=_0x3197();return _0xafde=function(_0xafdebc,_0x3bc839){_0xafdebc=_0xafdebc-0x1f1;let _0x3c380c=_0x319717[_0xafdebc];return _0x3c380c;},_0xafde(_0x5ad0d9,_0xa53d31);}function _0x3197(){const _0x53122e=['getDocument','removeFromContext','385140gxIqUq','_startUploadOperation','init','length','contextItemAdded','values','7875852AFRkyR','_pendingContextItems','stack','code','forEach','urls','label','getSentContextItems','hidden','resourceStateChanged','resources','ai-chat-file-upload-failed','_addContextOptionsState','name','addToConversationContext','removeSelectionFromContext','DOCUMENT','ai-chat-context-unsupported-type','addUrlToContext','url','uploadUrl','FILE','uploadFile','map','start','_convertTextResourceToFile','resourceId','filter','44msJtzH','sessionId','version','push','_ongoingUploads','text/plain','all','_toggleAddCurrentDocumentOptionVisibility','data','ai-chat-context-invalid-data','content','Current\x20document','294ACQBYq','ai-chat-source-resources-load-failed','object\x20with\x20content\x20and\x20type\x20properties','contextItemLoadingEnded','has','18uyhXWI','addCurrentDocumentToContext','contextItemRemoved','addContextOptionsChanged','abort','isCurrentDocumentInContext','URL','ai-chat-resource-load-failed','get','contextSent','_finishUploadOperation','_ongoingUploadOperations','_isResourceInContext','startsWith','uploadProgressChanged','ai-chat-resource-no-data','size','set','uiId','populateFromMessage','20290QnYDoa','1046180ABvPpm','end','uploadDocument','_removeContextItem','current-document','sourceResourcesLoaded','from','updateCurrentDocument','object','File','addSelectionToContext','_updateResourceInContextState','getId','find','file-','_addContextItem','isInContext','fire','fetchDocument','string','MARKDOWN','_ownerId','ai-chat-url-upload-failed','_finishContextItemLoading','isReadOnly','175400BJodJe','TEXT','_findSourceIdsByResourceId','isCurrentDocumentInConversation','clearPendingContextItems','isSelectionInContext','_mapContextItemToRequestData','text/html','_getCustomSourcesInitialState','abortController','enabled','15474FoRtcS','3smmKwq','error','getData','addFilesToContext','_createContextItemFromContent','ai-request-aborted','_addToConversationContextItem','type','text/markdown','isHidden','sources','38PibopY','loadSourceResources','mapContextItemsToRequestData','ai-chat-source-not-found','_setAddContextOptionsDefaultState','url-','_conversationContextItems','SELECTION','files','_connector','delete','attributes','files-','addResourceToContext','message','_config','53358TGATtc','getResources','ai-chat-document-upload-failed','HTML','selection','getPendingContextItems','document'];_0x3197=function(){return _0x53122e;};return _0x3197();}const _0xd08627=_0xafde;(function(_0x2dfcf8,_0x5ce00e){const _0x4803f2=_0xafde,_0x215058=_0x2dfcf8();while(!![]){try{const _0xa80658=-parseInt(_0x4803f2(0x248))/0x1*(-parseInt(_0x4803f2(0x254))/0x2)+-parseInt(_0x4803f2(0x249))/0x3*(parseInt(_0x4803f2(0x26d))/0x4)+parseInt(_0x4803f2(0x223))/0x5+parseInt(_0x4803f2(0x264))/0x6*(parseInt(_0x4803f2(0x20a))/0x7)+parseInt(_0x4803f2(0x23d))/0x8*(-parseInt(_0x4803f2(0x20f))/0x9)+parseInt(_0x4803f2(0x224))/0xa*(parseInt(_0x4803f2(0x1fe))/0xb)+-parseInt(_0x4803f2(0x273))/0xc;if(_0xa80658===_0x5ce00e)break;else _0x215058['push'](_0x215058['shift']());}catch(_0x4cb8a0){_0x215058['push'](_0x215058['shift']());}}}(_0x3197,0x47ad2));import{CKEditorError as _0x258b61,ObservableMixin as _0x5ad321,uid as _0x2d5ec8}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x5a99b8,AIContextTextResourceType as _0x1d4d40}from'../../aicore/model/aicontext.js';import{escape as _0x1c50e8}from'es-toolkit/compat';import{errorsMap as _0x327b40}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xd08627(0x271),_0xd08627(0x211),_0xd08627(0x20d),_0xd08627(0x218),_0xd08627(0x24a),_0xd08627(0x212),_0xd08627(0x229),_0xd08627(0x27c),_0xd08627(0x21d)];export class AIChatContext extends _0x5ad321(){[_0xd08627(0x25d)];[_0xd08627(0x263)];[_0xd08627(0x239)];constructor({connector:_0x415cfc,config:_0x3efb22,ownerId:_0x385060}){const _0x1fef04=_0xd08627;super(),this[_0x1fef04(0x25d)]=_0x415cfc,this[_0x1fef04(0x263)]=_0x3efb22,this[_0x1fef04(0x239)]=_0x385060;}[_0xd08627(0x26f)](){const _0x3c04c7=_0xd08627;this[_0x3c04c7(0x274)]=new Map(),this[_0x3c04c7(0x25a)]=new Map(),this[_0x3c04c7(0x202)]=new Map(),this[_0x3c04c7(0x21a)]=new Map(),this[_0x3c04c7(0x258)]();}[_0xd08627(0x269)](){const _0x364cde=_0xd08627;return this[_0x364cde(0x274)];}async[_0xd08627(0x222)](_0x214217){const _0x543c99=_0xd08627,_0x5b2997=await this[_0x543c99(0x24d)](_0x214217);return this[_0x543c99(0x24f)](_0x5b2997),_0x543c99(0x228)===_0x5b2997[_0x543c99(0x221)]&&this[_0x543c99(0x205)](),_0x5b2997;}async[_0xd08627(0x24d)](_0x317483){const _0x3d069c=_0xd08627;if(_0x317483[_0x3d069c(0x250)]===_0x5a99b8[_0x3d069c(0x1f2)]){const _0xfece55=await this[_0x3d069c(0x25d)][_0x3d069c(0x236)](this[_0x3d069c(0x239)],_0x317483['id'])[_0x3d069c(0x26b)]();return{'id':_0x3d069c(0x228),'uiId':_0x3d069c(0x228),'label':_0x3d069c(0x209),'type':_0x317483[_0x3d069c(0x250)],'content':_0xfece55[_0x3d069c(0x208)],'hidden':this[_0x3d069c(0x25a)][_0x3d069c(0x20e)](_0x3d069c(0x228)),'version':_0xfece55[_0x3d069c(0x25f)]?.[_0x3d069c(0x200)],'sessionId':_0xfece55[_0x3d069c(0x25f)]?.[_0x3d069c(0x1ff)]};}return{'id':_0x317483['id'],'uiId':_0x317483['id'],'label':_0x317483[_0x3d069c(0x25f)]?.[_0x3d069c(0x279)]||_0x317483[_0x3d069c(0x280)]||_0x317483[_0x3d069c(0x1f5)]||_0x317483['id'],'type':_0x317483[_0x3d069c(0x250)],..._0x317483?.[_0x3d069c(0x25f)]?.[_0x3d069c(0x1fc)]?{'resourceId':_0x317483[_0x3d069c(0x25f)]?.[_0x3d069c(0x1fc)]}:{}};}[_0xd08627(0x27a)](){const _0x45d76e=_0xd08627;return new Map(this[_0x45d76e(0x25a)]);}[_0xd08627(0x26c)](_0x454b0c){const _0x80d21d=_0xd08627,_0xfb5969=this[_0x80d21d(0x274)][_0x80d21d(0x217)](_0x454b0c);_0xfb5969?.[_0x80d21d(0x23c)]||this[_0x80d21d(0x227)](_0x454b0c);}[_0xd08627(0x241)](){const _0x6c1a61=_0xd08627;if(0x0===this[_0x6c1a61(0x274)][_0x6c1a61(0x21f)])return;for(const _0x2d544b of this[_0x6c1a61(0x274)][_0x6c1a61(0x272)]())this[_0x6c1a61(0x227)](_0x2d544b[_0x6c1a61(0x221)]);const _0x5814cf=this[_0x6c1a61(0x25a)][_0x6c1a61(0x217)](_0x6c1a61(0x228))||this[_0x6c1a61(0x274)][_0x6c1a61(0x217)](_0x6c1a61(0x228));_0x5814cf&&this[_0x6c1a61(0x233)]({..._0x5814cf,'isReadOnly':!0x0,'hidden':!0x0});}[_0xd08627(0x281)](_0x5311df){const _0x52afa1=_0xd08627;for(const _0xb650ef of _0x5311df[_0x52afa1(0x272)]())this[_0x52afa1(0x24f)](_0xb650ef);this[_0x52afa1(0x241)](),this[_0x52afa1(0x235)](_0x52afa1(0x218),{'contextItems':Array[_0x52afa1(0x22a)](this[_0x52afa1(0x27a)]()[_0x52afa1(0x272)]())});}[_0xd08627(0x214)](){const _0x33efa3=_0xd08627;return this[_0x33efa3(0x274)][_0x33efa3(0x20e)](_0x33efa3(0x228));}[_0xd08627(0x242)](){const _0x20dbc8=_0xd08627;return this[_0x20dbc8(0x274)][_0x20dbc8(0x20e)](_0x20dbc8(0x268));}[_0xd08627(0x240)](){const _0x292474=_0xd08627;return this[_0x292474(0x25a)][_0x292474(0x20e)](_0x292474(0x228));}static[_0xd08627(0x256)](_0x1e7890){const _0x3e7bd5=_0xd08627;return Array[_0x3e7bd5(0x22a)](_0x1e7890[_0x3e7bd5(0x272)]())[_0x3e7bd5(0x1f9)](_0x4c0949=>this[_0x3e7bd5(0x243)](_0x4c0949))[_0x3e7bd5(0x1fd)](_0x1df78c=>null!==_0x1df78c);}async[_0xd08627(0x24c)](_0x336072,_0x2ba51b,_0x511df9=_0x5a99b8[_0xd08627(0x1f7)]){const _0x50292b=_0xd08627,_0x2f9d72=_0x50292b(0x260)+_0x2d5ec8();this[_0x50292b(0x26e)](_0x2f9d72);try{await Promise[_0x50292b(0x204)](_0x336072[_0x50292b(0x1f9)](async _0x498ef2=>{const _0x6acd82=_0x50292b,_0xbbca74=_0x6acd82(0x232)+_0x2d5ec8(),_0x4f9de6=_0x1c50e8(_0x498ef2[_0x6acd82(0x280)]);try{this[_0x6acd82(0x233)]({'type':_0x511df9,'label':_0x2ba51b?.[_0x6acd82(0x279)]||_0x4f9de6,'uiId':_0xbbca74,'resourceId':_0x2ba51b?.[_0x6acd82(0x1fc)]},!0x0);const _0x5278e1=this[_0x6acd82(0x25d)][_0x6acd82(0x1f8)](this[_0x6acd82(0x239)],_0x498ef2,_0x2ba51b);this[_0x6acd82(0x202)][_0x6acd82(0x220)](_0xbbca74,_0x5278e1[_0x6acd82(0x246)]);const {id:_0x430208}=await _0x5278e1[_0x6acd82(0x230)]();this[_0x6acd82(0x202)][_0x6acd82(0x25e)](_0xbbca74),this[_0x6acd82(0x23b)]({'type':_0x511df9,'id':_0x430208,'label':_0x2ba51b?.[_0x6acd82(0x279)]||_0x4f9de6,'uiId':_0xbbca74,'resourceId':_0x2ba51b?.[_0x6acd82(0x1fc)]},!0x1);}catch(_0x4be6c5){this[_0x6acd82(0x202)][_0x6acd82(0x25e)](_0xbbca74);if(!(_0x4be6c5 instanceof _0x258b61&&_0x4be6c5[_0x6acd82(0x262)][_0x6acd82(0x21c)](_0x6acd82(0x24e)))){const _0x9c7bb7=_0x327b40[_0x6acd82(0x217)](_0x4be6c5[_0x6acd82(0x276)])||_0x6acd82(0x27e),_0x38b886=new _0x258b61(_0x9c7bb7,null,{'fileName':_0x4f9de6,..._0x4be6c5});_0x38b886[_0x6acd82(0x275)]=_0x4be6c5[_0x6acd82(0x275)],this[_0x6acd82(0x235)](_0x6acd82(0x24a),{'error':_0x38b886});}this[_0x6acd82(0x227)](_0xbbca74);}}));}finally{this[_0x50292b(0x219)](_0x2f9d72);}}[_0xd08627(0x210)](_0x205310){const _0x26d4f4=_0xd08627;if(this[_0x26d4f4(0x214)]()||!this[_0x26d4f4(0x27f)][_0x26d4f4(0x26a)][_0x26d4f4(0x247)])return;const _0x182c6e={'type':_0x5a99b8[_0x26d4f4(0x1f2)],'uiId':_0x26d4f4(0x228),'label':_0x205310,'isReadOnly':this[_0x26d4f4(0x25a)][_0x26d4f4(0x20e)](_0x26d4f4(0x228)),'hidden':this[_0x26d4f4(0x25a)][_0x26d4f4(0x20e)](_0x26d4f4(0x228))};this[_0x26d4f4(0x233)](_0x182c6e);}async[_0xd08627(0x22b)](_0x37bd5c,_0x34731b,_0x13ceb4,_0x3ab13f){const _0x134146=_0xd08627,_0x44677a=this[_0x134146(0x274)][_0x134146(0x217)](_0x134146(0x228));if(_0x44677a&&_0x37bd5c){_0x44677a[_0x134146(0x268)]=_0x3ab13f?_0x3ab13f[_0x134146(0x1f9)](_0x38a099=>({'start':_0x38a099[_0x134146(0x1fa)],'end':_0x38a099[_0x134146(0x225)]})):[];try{if(_0x44677a[_0x134146(0x200)]===_0x34731b)return;const {id:_0x430c84}=await this[_0x134146(0x25d)][_0x134146(0x226)](this[_0x134146(0x239)],_0x37bd5c,{'version':_0x34731b,'sessionId':_0x13ceb4})[_0x134146(0x230)]();_0x44677a['id']=_0x430c84,_0x44677a[_0x134146(0x208)]=_0x37bd5c,_0x44677a[_0x134146(0x200)]=_0x34731b,_0x44677a[_0x134146(0x1ff)]=_0x13ceb4;}catch(_0x1cec24){const _0x378b61=new _0x258b61(_0x134146(0x266),null);_0x378b61[_0x134146(0x275)]=_0x1cec24[_0x134146(0x275)],this[_0x134146(0x235)](_0x134146(0x24a),{'error':_0x378b61});}}}[_0xd08627(0x22e)](_0x170fee){const _0x443d20=_0xd08627;this[_0x443d20(0x233)]({'type':_0x5a99b8[_0x443d20(0x25b)],'label':_0x170fee,'uiId':_0x443d20(0x268),'content':_0x170fee});}[_0xd08627(0x1f1)](){const _0x2655df=_0xd08627;this[_0x2655df(0x227)](_0x2655df(0x268));}async[_0xd08627(0x1f4)](_0x1851c0,_0x25418f){const _0x3859d5=_0xd08627,_0x5c03b4=_0x3859d5(0x259)+_0x2d5ec8();this[_0x3859d5(0x26e)](_0x5c03b4);const _0x576870=_0x3859d5(0x259)+_0x2d5ec8();try{this[_0x3859d5(0x233)]({'type':_0x5a99b8[_0x3859d5(0x215)],'label':_0x25418f?.[_0x3859d5(0x279)]||_0x1851c0,'uiId':_0x576870,'resourceId':_0x25418f?.[_0x3859d5(0x1fc)]},!0x0);const _0x409208=this[_0x3859d5(0x25d)][_0x3859d5(0x1f6)](this[_0x3859d5(0x239)],_0x1851c0,_0x25418f);this[_0x3859d5(0x202)][_0x3859d5(0x220)](_0x576870,_0x409208[_0x3859d5(0x246)]);const {id:_0xdab782}=await _0x409208[_0x3859d5(0x230)]();this[_0x3859d5(0x202)][_0x3859d5(0x25e)](_0x576870),this[_0x3859d5(0x23b)]({'type':_0x5a99b8[_0x3859d5(0x215)],'id':_0xdab782,'label':_0x25418f?.[_0x3859d5(0x279)]||_0x1851c0,'uiId':_0x576870,'resourceId':_0x25418f?.[_0x3859d5(0x1fc)]},!0x1);}catch(_0x475484){this[_0x3859d5(0x202)][_0x3859d5(0x25e)](_0x576870),(_0x475484[_0x3859d5(0x262)][_0x3859d5(0x21c)](_0x3859d5(0x24e))||this[_0x3859d5(0x235)](_0x3859d5(0x24a),{'error':new _0x258b61(_0x3859d5(0x23a),this,{'url':_0x1851c0,'originalError':_0x475484}),'url':_0x1851c0}),this[_0x3859d5(0x227)](_0x576870));}finally{this[_0x3859d5(0x219)](_0x5c03b4);}}async[_0xd08627(0x255)](_0x16c4de,_0x14f188,_0x35516b){const _0xe6329d=_0xd08627,_0x3231a3=this[_0xe6329d(0x27f)][_0xe6329d(0x253)][_0xe6329d(0x231)](_0x2a7636=>_0x2a7636['id']===_0x16c4de);if(!_0x3231a3)return this[_0xe6329d(0x235)](_0xe6329d(0x24a),{'error':new _0x258b61(_0xe6329d(0x257),this,{'sourceId':_0x16c4de}),'sourceId':_0x16c4de}),[];try{const _0x2bff12=(await _0x3231a3[_0xe6329d(0x265)](_0x14f188))[_0xe6329d(0x1f9)](_0x1b4e4e=>{const _0x37a905=_0xe6329d,_0x2ba340=this[_0x37a905(0x21b)](_0x1b4e4e['id']);return{..._0x1b4e4e,'isInContext':_0x2ba340};});return _0x3231a3[_0xe6329d(0x27d)]=_0x2bff12,this[_0xe6329d(0x235)](_0xe6329d(0x229),{'sourceId':_0x16c4de,'source':_0x3231a3,'resources':_0x2bff12,'uid':_0x35516b}),_0x2bff12;}catch(_0x4c7277){return this[_0xe6329d(0x235)](_0xe6329d(0x24a),{'error':new _0x258b61(_0xe6329d(0x20b),this,{'sourceId':_0x16c4de,'originalError':_0x4c7277}),'sourceId':_0x16c4de,'sourceLabel':_0x3231a3[_0xe6329d(0x279)]}),[];}}async[_0xd08627(0x261)](_0x26dd3e,_0x554dcf){const _0x63a114=_0xd08627;if(this[_0x63a114(0x21b)](_0x554dcf['id']))return;let _0x335112=_0x554dcf[_0x63a114(0x206)];if(!_0x335112&&_0x26dd3e[_0x63a114(0x24b)])try{_0x335112=await _0x26dd3e[_0x63a114(0x24b)](_0x554dcf['id']);}catch(_0x37b18b){return void this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x216),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id'],'originalError':_0x37b18b}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});}if(_0x335112)switch(_0x554dcf[_0x63a114(0x250)]){case _0x5a99b8[_0x63a114(0x215)]:if(_0x63a114(0x237)!=typeof _0x335112)return void this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x207),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id'],'expectedType':_0x63a114(0x237),'actualType':typeof _0x335112}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});await this[_0x63a114(0x1f4)](_0x335112,{'label':_0x554dcf[_0x63a114(0x279)],'resourceId':_0x554dcf['id']});break;case _0x5a99b8[_0x63a114(0x1f7)]:if(!(_0x335112 instanceof File))return void this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x207),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id'],'expectedType':_0x63a114(0x22d),'actualType':typeof _0x335112}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});await this[_0x63a114(0x24c)]([_0x335112],{'label':_0x554dcf[_0x63a114(0x279)],'resourceId':_0x554dcf['id']});break;case _0x5a99b8[_0x63a114(0x23e)]:if(_0x63a114(0x22c)!=typeof _0x335112||!(_0x63a114(0x208)in _0x335112)||!(_0x63a114(0x250)in _0x335112))return void this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x207),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id'],'expectedType':_0x63a114(0x20c),'actualType':typeof _0x335112}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});_0x335112=AIChatContext[_0x63a114(0x1fb)](_0x335112,_0x554dcf[_0x63a114(0x279)]),await this[_0x63a114(0x24c)]([_0x335112],{'label':_0x554dcf[_0x63a114(0x279)],'resourceId':_0x554dcf['id']},_0x5a99b8[_0x63a114(0x23e)]);break;default:this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x1f3),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id'],'resourceType':_0x554dcf[_0x63a114(0x250)]}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});}else this[_0x63a114(0x235)](_0x63a114(0x24a),{'error':new _0x258b61(_0x63a114(0x21e),this,{'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']}),'resourceId':_0x554dcf['id'],'sourceId':_0x26dd3e['id']});}static[_0xd08627(0x1fb)](_0x3dd079,_0x4bc8e3){const _0x5db770=_0xd08627;switch(_0x3dd079[_0x5db770(0x250)]){case _0x1d4d40[_0x5db770(0x238)]:return new File([_0x3dd079[_0x5db770(0x208)]],_0x4bc8e3,{'type':_0x5db770(0x251)});case _0x1d4d40[_0x5db770(0x267)]:return new File([_0x3dd079[_0x5db770(0x208)]],_0x4bc8e3,{'type':_0x5db770(0x244)});default:return new File([_0x3dd079[_0x5db770(0x208)]],_0x4bc8e3,{'type':_0x5db770(0x203)});}}static[_0xd08627(0x243)](_0x5d4ba8){const _0x24bdd7=_0xd08627;switch(_0x5d4ba8[_0x24bdd7(0x250)]){case _0x5a99b8[_0x24bdd7(0x1f7)]:return{'type':_0x5a99b8[_0x24bdd7(0x1f7)],'id':_0x5d4ba8['id']};case _0x5a99b8[_0x24bdd7(0x215)]:return{'type':_0x5a99b8[_0x24bdd7(0x215)],'id':_0x5d4ba8['id']};case _0x5a99b8[_0x24bdd7(0x1f2)]:return{'type':_0x5a99b8[_0x24bdd7(0x1f2)],'id':_0x5d4ba8['id'],..._0x5d4ba8[_0x24bdd7(0x268)]?.[_0x24bdd7(0x270)]&&{'selection':_0x5d4ba8[_0x24bdd7(0x268)]}};case _0x5a99b8[_0x24bdd7(0x23e)]:return{'type':_0x5a99b8[_0x24bdd7(0x1f7)],'id':_0x5d4ba8['id']};default:return null;}}[_0xd08627(0x233)](_0x26728a,_0x3d5333=!0x1){const _0x30cda2=_0xd08627;if(this[_0x30cda2(0x274)][_0x30cda2(0x220)](_0x26728a[_0x30cda2(0x221)],_0x26728a),_0x26728a[_0x30cda2(0x27b)]||this[_0x30cda2(0x235)](_0x30cda2(0x271),{'contextItem':_0x26728a,'isLoading':_0x3d5333}),_0x30cda2(0x228)===_0x26728a[_0x30cda2(0x221)]&&this[_0x30cda2(0x205)](),_0x26728a[_0x30cda2(0x1fc)]){const _0xc2d0d4=this[_0x30cda2(0x23f)](_0x26728a[_0x30cda2(0x1fc)]);_0xc2d0d4&&_0xc2d0d4[_0x30cda2(0x277)](_0x166ae4=>{const _0x8e2c4d=_0x30cda2;this[_0x8e2c4d(0x22f)](_0x166ae4,_0x26728a[_0x8e2c4d(0x1fc)],!0x0);});}}[_0xd08627(0x227)](_0x496e46){const _0x54b2be=_0xd08627,_0xbbc3c4=this[_0x54b2be(0x274)][_0x54b2be(0x217)](_0x496e46),_0x4825e6=this[_0x54b2be(0x202)][_0x54b2be(0x217)](_0x496e46);if(_0x4825e6&&(_0x4825e6[_0x54b2be(0x213)](),this[_0x54b2be(0x202)][_0x54b2be(0x25e)](_0x496e46)),_0xbbc3c4?.[_0x54b2be(0x1fc)]){const _0x548336=this[_0x54b2be(0x23f)](_0xbbc3c4[_0x54b2be(0x1fc)]);_0x548336&&_0x548336[_0x54b2be(0x277)](_0x3c24a4=>{const _0x1048c5=_0x54b2be;this[_0x1048c5(0x22f)](_0x3c24a4,_0xbbc3c4[_0x1048c5(0x1fc)],!0x1);});}this[_0x54b2be(0x274)][_0x54b2be(0x25e)](_0x496e46),this[_0x54b2be(0x235)](_0x54b2be(0x211),{'uiId':_0x496e46,'type':_0xbbc3c4?.[_0x54b2be(0x250)]}),_0x54b2be(0x228)===_0x496e46&&this[_0x54b2be(0x205)]();}[_0xd08627(0x23b)](_0x41b9a6,_0x38788c){const _0x818e03=_0xd08627;if(this[_0x818e03(0x274)][_0x818e03(0x20e)](_0x41b9a6[_0x818e03(0x221)])&&(this[_0x818e03(0x274)][_0x818e03(0x220)](_0x41b9a6[_0x818e03(0x221)],_0x41b9a6),this[_0x818e03(0x235)](_0x818e03(0x20d),{'contextItem':_0x41b9a6,'isLoading':_0x38788c}),_0x41b9a6[_0x818e03(0x1fc)])){const _0xb44d76=this[_0x818e03(0x23f)](_0x41b9a6[_0x818e03(0x1fc)]);_0xb44d76&&_0xb44d76[_0x818e03(0x277)](_0x449525=>{const _0x3310f0=_0x818e03;this[_0x3310f0(0x22f)](_0x449525,_0x41b9a6[_0x3310f0(0x1fc)],!0x0);});}}[_0xd08627(0x24f)](_0x1ef2da){const _0x4ea9b2=_0xd08627;this[_0x4ea9b2(0x25a)][_0x4ea9b2(0x220)](_0x1ef2da[_0x4ea9b2(0x221)],_0x1ef2da);}[_0xd08627(0x258)](){const _0x36db4f=_0xd08627;this[_0x36db4f(0x27f)]={'document':{'enabled':!0x1!==this[_0x36db4f(0x263)]?.[_0x36db4f(0x26a)]?.[_0x36db4f(0x247)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x36db4f(0x263)]?.[_0x36db4f(0x278)]?.[_0x36db4f(0x247)]},'files':{'enabled':!0x1!==this[_0x36db4f(0x263)]?.[_0x36db4f(0x25c)]?.[_0x36db4f(0x247)]},'sources':this[_0x36db4f(0x245)]()},this[_0x36db4f(0x235)](_0x36db4f(0x212),{'options':this[_0x36db4f(0x27f)]});}[_0xd08627(0x245)](){const _0x2ba166=_0xd08627;return this[_0x2ba166(0x263)]?.[_0x2ba166(0x253)]?.[_0x2ba166(0x1f9)](_0x1e1d13=>({..._0x1e1d13,'resources':[]}))??[];}[_0xd08627(0x205)](){const _0x55d432=_0xd08627,_0x3e3010=this[_0x55d432(0x214)]()||this[_0x55d432(0x240)]();this[_0x55d432(0x27f)][_0x55d432(0x26a)][_0x55d432(0x252)]=_0x3e3010,this[_0x55d432(0x235)](_0x55d432(0x212),{'options':this[_0x55d432(0x27f)]});}[_0xd08627(0x21b)](_0x4e4a70){const _0x944c11=_0xd08627;for(const _0xbefb4a of this[_0x944c11(0x274)][_0x944c11(0x272)]())if(_0xbefb4a[_0x944c11(0x1fc)]===_0x4e4a70)return!0x0;for(const _0x4bae70 of this[_0x944c11(0x25a)][_0x944c11(0x272)]())if(_0x4bae70[_0x944c11(0x1fc)]===_0x4e4a70)return!0x0;return!0x1;}[_0xd08627(0x23f)](_0x59ba0f){const _0x9325b1=_0xd08627,_0x3bd2be=[];for(const _0x5d36f4 of this[_0x9325b1(0x27f)][_0x9325b1(0x253)]){_0x5d36f4[_0x9325b1(0x27d)][_0x9325b1(0x231)](_0x4526e1=>_0x4526e1['id']===_0x59ba0f)&&_0x3bd2be[_0x9325b1(0x201)](_0x5d36f4['id']);}return 0x0===_0x3bd2be[_0x9325b1(0x270)]?null:_0x3bd2be;}[_0xd08627(0x22f)](_0x1fba9d,_0x49dead,_0x5de3a0){const _0x9defaf=_0xd08627,_0x44cb2f=this[_0x9defaf(0x27f)][_0x9defaf(0x253)][_0x9defaf(0x231)](_0x3c5fb7=>_0x3c5fb7['id']===_0x1fba9d);if(!_0x44cb2f)return;const _0x31fc25=_0x44cb2f[_0x9defaf(0x27d)][_0x9defaf(0x231)](_0x40be8a=>_0x40be8a['id']===_0x49dead);_0x31fc25&&(_0x31fc25[_0x9defaf(0x234)]=_0x5de3a0,this[_0x9defaf(0x235)](_0x9defaf(0x27c),{'sourceId':_0x1fba9d,'resourceId':_0x49dead,'isInContext':_0x5de3a0}));}[_0xd08627(0x26e)](_0x4e090e){const _0x6c61ac=_0xd08627;this[_0x6c61ac(0x21a)][_0x6c61ac(0x220)](_0x4e090e,!0x0),this[_0x6c61ac(0x21a)][_0x6c61ac(0x21f)]&&this[_0x6c61ac(0x235)](_0x6c61ac(0x21d),{'isUploadInProgress':!0x0});}[_0xd08627(0x219)](_0x4e7cd1){const _0x4d1626=_0xd08627;this[_0x4d1626(0x21a)][_0x4d1626(0x25e)](_0x4e7cd1),0x0===this[_0x4d1626(0x21a)][_0x4d1626(0x21f)]&&this[_0x4d1626(0x235)](_0x4d1626(0x21d),{'isUploadInProgress':!0x1});}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module ai/aichat/model/aichatconversation
|
|
7
7
|
*/
|
|
8
8
|
import { CKEditorError } from 'ckeditor5/src/utils.js';
|
|
9
|
-
import {
|
|
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 AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
12
|
import { AICapabilities, type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
|
|
13
|
-
import type {
|
|
13
|
+
import type { AIModels } from '../../aicore/model/aimodels.js';
|
|
14
14
|
import { type Editor } from 'ckeditor5/src/core.js';
|
|
15
15
|
import { AIChatInteraction } from './aichatinteraction.js';
|
|
16
16
|
import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
|
|
@@ -56,7 +56,7 @@ export declare class AIChatConversation extends /* #__PURE__ */ AIChatConversati
|
|
|
56
56
|
* This is set when the user selects a model from the list of available models.
|
|
57
57
|
* If not set, the default model will be used.
|
|
58
58
|
*/
|
|
59
|
-
selectedModel?:
|
|
59
|
+
selectedModel?: AIModelData;
|
|
60
60
|
/**
|
|
61
61
|
* Service for managing the conversation context.
|
|
62
62
|
*/
|
|
@@ -68,7 +68,7 @@ export declare class AIChatConversation extends /* #__PURE__ */ AIChatConversati
|
|
|
68
68
|
/**
|
|
69
69
|
* Service for providing the list of available AI chat models.
|
|
70
70
|
*/
|
|
71
|
-
chatModels:
|
|
71
|
+
chatModels: AIModels;
|
|
72
72
|
/**
|
|
73
73
|
* @inheritDoc
|
|
74
74
|
*/
|
|
@@ -184,7 +184,7 @@ export declare class AIChatConversation extends /* #__PURE__ */ AIChatConversati
|
|
|
184
184
|
/**
|
|
185
185
|
* Sets the AI model for the conversation.
|
|
186
186
|
*/
|
|
187
|
-
setModel(model:
|
|
187
|
+
setModel(model: AIModelData): Promise<void>;
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
190
|
* An event emitted by {@link module:ai/aichat/model/aichatconversation~AIChatConversation} when a new interaction is created.
|
|
@@ -222,7 +222,7 @@ export type AIChatConversationInitializedEvent = {
|
|
|
222
222
|
name: 'conversationInitialized';
|
|
223
223
|
args: [
|
|
224
224
|
{
|
|
225
|
-
availableModels: Array<
|
|
225
|
+
availableModels: Array<AIModelData>;
|
|
226
226
|
}
|
|
227
227
|
];
|
|
228
228
|
};
|
|
@@ -236,7 +236,7 @@ export type AIChatConversationStartedEvent = {
|
|
|
236
236
|
args: [
|
|
237
237
|
{
|
|
238
238
|
conversationId: string;
|
|
239
|
-
selectedModel:
|
|
239
|
+
selectedModel: AIModelData;
|
|
240
240
|
}
|
|
241
241
|
];
|
|
242
242
|
};
|
|
@@ -249,7 +249,7 @@ export type AIChatConversationModelSelectedEvent = {
|
|
|
249
249
|
name: 'modelSelected';
|
|
250
250
|
args: [
|
|
251
251
|
{
|
|
252
|
-
selectedModel:
|
|
252
|
+
selectedModel: AIModelData;
|
|
253
253
|
isDisabled?: boolean;
|
|
254
254
|
}
|
|
255
255
|
];
|
|
@@ -259,7 +259,7 @@ export type AIChatConversationModelSelectedEvent = {
|
|
|
259
259
|
*/
|
|
260
260
|
export type AIChatConversationOptions = {
|
|
261
261
|
connector: AIConnector;
|
|
262
|
-
chatModels:
|
|
262
|
+
chatModels: AIModels;
|
|
263
263
|
getEditor?: () => Editor;
|
|
264
264
|
conversationId: string;
|
|
265
265
|
group: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x462782=_0x2aee;(function(_0x16efdb,_0x2c3461){const _0xb9fc8d=_0x2aee,_0x37616a=_0x16efdb();while(!![]){try{const _0x44f70e=-parseInt(_0xb9fc8d(0x1ca))/0x1*(parseInt(_0xb9fc8d(0x1cf))/0x2)+-parseInt(_0xb9fc8d(0x1c2))/0x3*(parseInt(_0xb9fc8d(0x1a7))/0x4)+parseInt(_0xb9fc8d(0x209))/0x5+-parseInt(_0xb9fc8d(0x207))/0x6+parseInt(_0xb9fc8d(0x1f1))/0x7*(parseInt(_0xb9fc8d(0x1a6))/0x8)+-parseInt(_0xb9fc8d(0x1aa))/0x9*(-parseInt(_0xb9fc8d(0x1e0))/0xa)+parseInt(_0xb9fc8d(0x1ed))/0xb;if(_0x44f70e===_0x2c3461)break;else _0x37616a['push'](_0x37616a['shift']());}catch(_0x4e1295){_0x37616a['push'](_0x37616a['shift']());}}}(_0x2935,0x61702));import{CKEditorError as _0x4f6274,EmitterMixin as _0x1b7764,logWarning as _0x49e2ae}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x786540}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x36d193,AI_CONTEXT_MODEL_EVENT_NAMES as _0x447374}from'./aichatcontext.js';import{AICapabilities as _0x49baab,CAPABILITIES_MODEL_EVENT_NAMES as _0x20ddf4}from'../../aicore/model/aicapabilities.js';function _0x2935(){const _0x1b8818=['lastInteraction','assistant','8900045eobuhT','createInteraction','selectedModelId','setModel','21YlNjXw','ai-chat-handle-user-interaction-start-failed','selectedModel','length','contextItems','init','push','conversationStarted','interactions','addToConversationContext','fetchConversation','toggleReasoning','attributes','ai-chat-conversation-init-failed','getCapabilitiesConfig','chatModels','splice','options','ai-chat-conversation-set-model-null','isCurrentDocumentInContext','title','getAll','1816794bwkGAn','webSearch','2360050rOGaRF','getModel','modelSelected','getMessages','stop','toggleWebSearch','chatCapabilities','find','removeSelectionFromContext','getInteraction','chatContext','interactionCreated','modification-delta','getEditor','currentReply','getPendingContextItems','toLowerCase','addFilesToContext','reasoning','addResourceToContext','355176BQBztt','58772hYzrdl','quickActionData','populateFromMessage','918ryKIoC','currentInteraction','fire','content','isAvailable','message','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-conversation-not-initialized','set','_extractContextItems','loadSourceResources','updateCurrentDocument','role','appendContent','ai-chat-conversation-start-failed','handleUserInteraction','load','getCurrentDocumentContext','sessionId','capabilities','model','indexOf','delegate','ai-chat-handle-user-interaction-already-in-progress','117YoPIux','createReply','getDocumentContext','type','addUrlToContext','_processMessagesToInteractions','conversationInitialized','prompt','326110yPeETP','isSelectionInContext','user','conversationId','text','4UuIfsq','ai-chat-conversation-already-started','ai-chat-conversation-init-from-id-failed','updateCurrentDocumentInContext','addCurrentDocumentToContext','connector','ai-chat-conversation-set-model-not-available','fetchConversationMessages','start','getAvailableModels','addSelectionToContext','text-delta','reset','removeInteraction','code','stack','destroy','50280ULAkfK','startConversation','isStarted','hasOwn','group','get','isCurrentDocumentInConversation','getConversation','error','setConversationTitle','removeFromContext'];_0x2935=function(){return _0x1b8818;};return _0x2935();}import{AIChatInteraction as _0xb5d3a0}from'./aichatinteraction.js';function _0x2aee(_0x338dd5,_0xc1321b){const _0x293564=_0x2935();return _0x2aee=function(_0x2aee46,_0x5987ca){_0x2aee46=_0x2aee46-0x19c;let _0x23c685=_0x293564[_0x2aee46];return _0x23c685;},_0x2aee(_0x338dd5,_0xc1321b);}import{errorsMap as _0x3b3143}from'../../errorsmap.js';export class AIChatConversation extends _0x1b7764(){['id'];[_0x462782(0x1e2)]=!0x1;[_0x462782(0x1f9)]=[];[_0x462782(0x1ab)];[_0x462782(0x1f3)];[_0x462782(0x1d4)];[_0x462782(0x202)];constructor(_0x575a24){const _0x5a023c=_0x462782;super(),this[_0x5a023c(0x202)]=_0x575a24,this[_0x5a023c(0x1d4)]=_0x575a24[_0x5a023c(0x1d4)],this[_0x5a023c(0x200)]=_0x575a24[_0x5a023c(0x200)],this['id']=_0x575a24[_0x5a023c(0x1cd)];}async[_0x462782(0x1f6)](_0x51d141){const _0x4f9cca=_0x462782;try{this[_0x4f9cca(0x19c)]=new _0x36d193({'connector':this[_0x4f9cca(0x1d4)],'config':_0x51d141,'ownerId':this['id']}),this[_0x4f9cca(0x19c)][_0x4f9cca(0x1c0)](..._0x447374)['to'](this),this[_0x4f9cca(0x19c)][_0x4f9cca(0x1f6)](),this[_0x4f9cca(0x20f)]=new _0x49baab(),this[_0x4f9cca(0x20f)][_0x4f9cca(0x1c0)](..._0x20ddf4)['to'](this),this[_0x4f9cca(0x20f)][_0x4f9cca(0x1f6)]();const _0x52d52e=await this[_0x4f9cca(0x200)][_0x4f9cca(0x1d8)]();this[_0x4f9cca(0x1ac)](_0x4f9cca(0x1c8),{'availableModels':_0x52d52e});const _0x440fca=await this[_0x4f9cca(0x200)][_0x4f9cca(0x20a)](this[_0x4f9cca(0x202)][_0x4f9cca(0x1ef)]);_0x440fca&&await this[_0x4f9cca(0x1f0)](_0x440fca);}catch(_0x3b91b7){const _0x51e0d5=new _0x4f6274(_0x4f9cca(0x1fe),null,{'message':_0x3b91b7[_0x4f9cca(0x1af)]||_0x3b91b7});_0x51e0d5[_0x4f9cca(0x1de)]=_0x3b91b7[_0x4f9cca(0x1de)],this[_0x4f9cca(0x1ac)](_0x4f9cca(0x1e8),{'error':_0x51e0d5});}}async[_0x462782(0x1d7)](){const _0x1862cc=_0x462782;if(this[_0x1862cc(0x1e2)])throw new _0x4f6274(_0x1862cc(0x1d0),null,{'conversation':this});if(!this[_0x1862cc(0x1f3)])throw new _0x4f6274(_0x1862cc(0x1b0),null,{'conversation':this});try{const {id:_0xa73be1}=await this[_0x1862cc(0x1d4)][_0x1862cc(0x1e1)](this['id'],this[_0x1862cc(0x202)][_0x1862cc(0x1e4)])[_0x1862cc(0x1e7)]();this['id']=_0xa73be1,this[_0x1862cc(0x1e2)]=!0x0,this[_0x1862cc(0x1ac)](_0x1862cc(0x1f8),{'conversationId':this['id'],'selectedModel':this[_0x1862cc(0x1f3)]});}catch(_0x1cd5f4){const _0x53c1ec=new _0x4f6274(_0x1862cc(0x1b8),null,{'message':_0x1cd5f4[_0x1862cc(0x1af)],'conversationId':this['id']});throw _0x53c1ec[_0x1862cc(0x1de)]=_0x1cd5f4[_0x1862cc(0x1de)],this[_0x1862cc(0x1ac)](_0x1862cc(0x1e8),{'error':_0x53c1ec}),_0x53c1ec;}}async[_0x462782(0x1ba)](_0x591a20,_0x1499e0){const _0x190475=_0x462782;try{const _0x521ff8=await this[_0x190475(0x1d4)][_0x190475(0x1fb)](_0x591a20)[_0x190475(0x1e7)](),_0x486162=await this[_0x190475(0x1d4)][_0x190475(0x1d6)](_0x591a20)[_0x190475(0x20c)](),_0x38e2a9=_0x486162[0x0][_0x190475(0x1be)];this[_0x190475(0x1e2)]=!0x0,this['id']=_0x521ff8['id'],_0x190475(0x205)in _0x521ff8?this[_0x190475(0x1ac)](_0x190475(0x1e9),_0x521ff8[_0x190475(0x205)],!0x0):this[_0x190475(0x1ac)](_0x190475(0x1e9),'',!0x0);const _0x20e019=(await this[_0x190475(0x200)][_0x190475(0x206)]())[_0x190475(0x210)](_0x212a1f=>_0x212a1f['id'][_0x190475(0x1a2)]()===_0x38e2a9[_0x190475(0x1a2)]());return this[_0x190475(0x1f3)]=_0x20e019,this[_0x190475(0x1ac)](_0x190475(0x20b),{'selectedModel':_0x20e019,'isDisabled':!0x0}),await this[_0x190475(0x1c7)](_0x486162,_0x1499e0,_0x38e2a9),this[_0x190475(0x1ab)]=void 0x0,this;}catch(_0x10ff39){const _0x319e2a=new _0x4f6274(_0x190475(0x1d1),null,{'message':_0x10ff39[_0x190475(0x1af)],'conversationId':_0x591a20});throw _0x319e2a[_0x190475(0x1de)]=_0x10ff39[_0x190475(0x1de)],this[_0x190475(0x1ac)](_0x190475(0x1e8),{'error':_0x319e2a}),_0x319e2a;}}async[_0x462782(0x1c7)](_0x5cde5b,_0x2d0fed,_0x48b396){const _0x1c62f7=_0x462782;let _0x3c08f5;for(const _0x45e8a3 of _0x5cde5b)if(_0x1c62f7(0x1cc)===_0x45e8a3[_0x1c62f7(0x1b6)]){const _0x411247=await this[_0x1c62f7(0x1b3)](_0x45e8a3),_0x2dc265={'isReasoningEnabled':Object[_0x1c62f7(0x1e3)](_0x45e8a3[_0x1c62f7(0x1bd)],_0x1c62f7(0x1a4)),'isWebSearchEnabled':Object[_0x1c62f7(0x1e3)](_0x45e8a3[_0x1c62f7(0x1bd)],_0x1c62f7(0x208))};_0x3c08f5=this[_0x1c62f7(0x1ee)]({'userMessage':_0x45e8a3[_0x1c62f7(0x1c9)],'contextItems':_0x411247,'capabilities':_0x2dc265,'modelId':_0x48b396,'quickActionData':_0x45e8a3[_0x1c62f7(0x1fd)]?.[_0x1c62f7(0x1a8)]}),this[_0x1c62f7(0x1ab)]=_0x3c08f5,this[_0x1c62f7(0x19c)][_0x1c62f7(0x1fa)](this[_0x1c62f7(0x1ab)][_0x1c62f7(0x1f5)]);}else{if(_0x1c62f7(0x1ec)===_0x45e8a3[_0x1c62f7(0x1b6)]&&_0x3c08f5)for(const _0x1406ff of _0x45e8a3[_0x1c62f7(0x1ad)]){const _0x169c0b=_0x1c62f7(0x1ce)===_0x1406ff[_0x1c62f7(0x1c5)]?_0x1c62f7(0x1da):_0x1c62f7(0x19e),_0x34d19f=_0x3c08f5[_0x1c62f7(0x1c4)]()?.[_0x1c62f7(0x1bc)]!==_0x2d0fed;_0x3c08f5[_0x1c62f7(0x1a0)]=_0x3c08f5[_0x1c62f7(0x1c3)]({'type':_0x169c0b,'isDone':!0x0,'interactionId':_0x3c08f5['id'],'areActionsDisabled':_0x34d19f}),_0x3c08f5[_0x1c62f7(0x1a0)][_0x1c62f7(0x1b7)](_0x1406ff[_0x1c62f7(0x1ad)]);}}}async[_0x462782(0x1b3)](_0xe87cb9){const _0x3fddac=_0x462782,_0x27b3ab=new Map();if(!_0xe87cb9[_0x3fddac(0x1ad)])return _0x27b3ab;for(const _0x56caaf of _0xe87cb9[_0x3fddac(0x1ad)]){const _0x1b7d99=await this[_0x3fddac(0x19c)][_0x3fddac(0x1a9)](_0x56caaf);_0x1b7d99&&_0x27b3ab[_0x3fddac(0x1b2)](_0x1b7d99['id'],_0x1b7d99);}return _0x27b3ab;}async[_0x462782(0x1b9)]({userMessage:_0x3ec330,quickActionData:_0x3f6153}){const _0xe97bff=_0x462782;if(!this[_0xe97bff(0x1e2)])throw new _0x4f6274(_0xe97bff(0x1b1),null,{'conversation':this});if(this[_0xe97bff(0x1ab)])throw new _0x4f6274(_0xe97bff(0x1c1),null,{'conversation':this});try{const _0xdfa37f=this[_0xe97bff(0x19c)][_0xe97bff(0x1a1)](),_0xfafe76=this[_0xe97bff(0x20f)][_0xe97bff(0x1ff)](),_0x61963c=this[_0xe97bff(0x1f3)]['id'];this[_0xe97bff(0x1ab)]=this[_0xe97bff(0x1ee)]({'userMessage':_0x3ec330,'contextItems':_0xdfa37f,'capabilities':_0xfafe76,'modelId':_0x61963c,'quickActionData':_0x3f6153}),await this[_0xe97bff(0x1ab)][_0xe97bff(0x1d7)](),this[_0xe97bff(0x19c)][_0xe97bff(0x1fa)](this[_0xe97bff(0x1ab)][_0xe97bff(0x1f5)]);}catch(_0x26629f){if(_0x26629f instanceof _0x4f6274)this[_0xe97bff(0x1ac)](_0xe97bff(0x1e8),{'interactionId':this[_0xe97bff(0x1ab)]?this[_0xe97bff(0x1ab)]['id']:void 0x0,'error':_0x26629f});else{const _0x1dd677=_0x3b3143[_0xe97bff(0x1e5)](_0x26629f[_0xe97bff(0x1dd)])||_0xe97bff(0x1f2);this[_0xe97bff(0x1ac)](_0xe97bff(0x1e8),{'interactionId':this[_0xe97bff(0x1ab)]?this[_0xe97bff(0x1ab)]['id']:void 0x0,'error':new _0x4f6274(_0x1dd677,null,{'error':_0x26629f})});}}finally{this[_0xe97bff(0x1ab)]?.[_0xe97bff(0x20d)](),this[_0xe97bff(0x1ab)]=void 0x0;}}[_0x462782(0x1ee)]({userMessage:_0x420a88,contextItems:_0x1e8691,capabilities:_0x37e7af,modelId:_0x1e3761,quickActionData:_0x46c759}){const _0x26f933=_0x462782,_0x44bab2=new _0xb5d3a0({'userMessage':_0x420a88,'contextItems':_0x1e8691,'capabilities':_0x37e7af,'conversationId':this['id'],'connector':this[_0x26f933(0x1d4)],'editor':this[_0x26f933(0x202)][_0x26f933(0x19f)]&&this[_0x26f933(0x202)][_0x26f933(0x19f)](),'model':_0x1e3761,'quickActionData':_0x46c759});return _0x44bab2[_0x26f933(0x1c0)](..._0x786540)['to'](this),this[_0x26f933(0x1f9)][_0x26f933(0x1f7)](_0x44bab2),this[_0x26f933(0x1ac)](_0x26f933(0x19d),_0x44bab2),_0x44bab2;}[_0x462782(0x212)](_0x236b1c){const _0xaaa64c=_0x462782;return this[_0xaaa64c(0x1f9)][_0xaaa64c(0x210)](_0x158d4c=>_0x158d4c['id']===_0x236b1c);}[_0x462782(0x1dc)](_0x2692a6){const _0x315fb3=_0x462782,_0x5a6fb5=this[_0x315fb3(0x212)](_0x2692a6);_0x5a6fb5&&(_0x5a6fb5[_0x315fb3(0x1df)](),this[_0x315fb3(0x1f9)][_0x315fb3(0x201)](this[_0x315fb3(0x1f9)][_0x315fb3(0x1bf)](_0x5a6fb5),0x1));}get[_0x462782(0x1eb)](){const _0x567776=_0x462782;return this[_0x567776(0x1f9)][this[_0x567776(0x1f9)][_0x567776(0x1f4)]-0x1];}[_0x462782(0x1d3)](_0x46789c){const _0x54fa57=_0x462782;this[_0x54fa57(0x19c)][_0x54fa57(0x1d3)](_0x46789c);}async[_0x462782(0x1d2)]({content:_0x703bab,version:_0x3df005,sessionId:_0x409a15,selections:_0xaf0ce0}){const _0x153cef=_0x462782;await this[_0x153cef(0x19c)][_0x153cef(0x1b5)](_0x703bab,_0x3df005,_0x409a15,_0xaf0ce0);}[_0x462782(0x1bb)](){const _0xf484e9=_0x462782;return this[_0xf484e9(0x1ab)]?.[_0xf484e9(0x1c4)]()?.[_0xf484e9(0x1ad)]||'';}[_0x462782(0x1d9)](_0x2c6e50){const _0xeebd6d=_0x462782;this[_0xeebd6d(0x19c)][_0xeebd6d(0x1d9)](_0x2c6e50);}[_0x462782(0x211)](){const _0x560dbd=_0x462782;this[_0x560dbd(0x19c)][_0x560dbd(0x211)]();}[_0x462782(0x1a3)](_0x7061b1){const _0x19b799=_0x462782;this[_0x19b799(0x19c)][_0x19b799(0x1a3)](_0x7061b1);}[_0x462782(0x1c6)](_0x2941c0){const _0x1c4769=_0x462782;this[_0x1c4769(0x19c)][_0x1c4769(0x1c6)](_0x2941c0);}[_0x462782(0x1a5)](_0xab79f8,_0x26714e){const _0x382282=_0x462782;this[_0x382282(0x19c)][_0x382282(0x1a5)](_0xab79f8,_0x26714e);}[_0x462782(0x1b4)](_0x561af5,_0x1a8408,_0x49b070){const _0x3d0267=_0x462782;return this[_0x3d0267(0x19c)][_0x3d0267(0x1b4)](_0x561af5,_0x1a8408,_0x49b070);}[_0x462782(0x1ea)](_0x48d2dc){const _0x2674c9=_0x462782;this[_0x2674c9(0x19c)][_0x2674c9(0x1ea)](_0x48d2dc);}[_0x462782(0x20e)](){const _0x8d6fc4=_0x462782;this[_0x8d6fc4(0x20f)][_0x8d6fc4(0x20e)]();}[_0x462782(0x1fc)](){const _0x53cfb7=_0x462782;this[_0x53cfb7(0x20f)][_0x53cfb7(0x1fc)]();}[_0x462782(0x204)](){const _0x2c856f=_0x462782;return this[_0x2c856f(0x19c)][_0x2c856f(0x204)]();}[_0x462782(0x1e6)](){const _0x531097=_0x462782;return this[_0x531097(0x19c)][_0x531097(0x1e6)]();}[_0x462782(0x1cb)](){const _0x591f38=_0x462782;return this[_0x591f38(0x19c)][_0x591f38(0x1cb)]();}async[_0x462782(0x1f0)](_0x567229){const _0x55b9b7=_0x462782;_0x567229?!0x1===await this[_0x55b9b7(0x200)][_0x55b9b7(0x1ae)](_0x567229)&&(_0x49e2ae(_0x55b9b7(0x1d5),{'conversation':this,'model':_0x567229}),_0x567229=(await this[_0x55b9b7(0x200)][_0x55b9b7(0x1d8)]())[0x0]):(_0x49e2ae(_0x55b9b7(0x203),{'conversation':this}),_0x567229=(await this[_0x55b9b7(0x200)][_0x55b9b7(0x1d8)]())[0x0]),_0x567229['id']!==this[_0x55b9b7(0x1f3)]?.['id']&&(this[_0x55b9b7(0x1f3)]=_0x567229,this[_0x55b9b7(0x20f)][_0x55b9b7(0x1db)](),this[_0x55b9b7(0x1ac)](_0x55b9b7(0x20b),{'selectedModel':_0x567229}));}}
|
|
23
|
+
const _0x393da5=_0x541e;(function(_0x2d0a9e,_0x2b3081){const _0x69433c=_0x541e,_0x424785=_0x2d0a9e();while(!![]){try{const _0x4d7de6=parseInt(_0x69433c(0x1bd))/0x1+parseInt(_0x69433c(0x1f7))/0x2+-parseInt(_0x69433c(0x1b8))/0x3+-parseInt(_0x69433c(0x1d7))/0x4*(-parseInt(_0x69433c(0x200))/0x5)+-parseInt(_0x69433c(0x1ca))/0x6+parseInt(_0x69433c(0x20d))/0x7+-parseInt(_0x69433c(0x1e2))/0x8;if(_0x4d7de6===_0x2b3081)break;else _0x424785['push'](_0x424785['shift']());}catch(_0x1e0471){_0x424785['push'](_0x424785['shift']());}}}(_0x32ae,0xc879c));import{CKEditorError as _0x14e2dd,EmitterMixin as _0x3b3df1,logWarning as _0x1f8502}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x530de8}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x23f3d1,AI_CONTEXT_MODEL_EVENT_NAMES as _0x356d4b}from'./aichatcontext.js';import{AICapabilities as _0x48fcb7,CAPABILITIES_MODEL_EVENT_NAMES as _0x124c97}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x117215}from'./aichatinteraction.js';function _0x541e(_0x4b6295,_0x30f81c){const _0x32ae66=_0x32ae();return _0x541e=function(_0x541e69,_0x40401e){_0x541e69=_0x541e69-0x1ae;let _0x3a41f5=_0x32ae66[_0x541e69];return _0x3a41f5;},_0x541e(_0x4b6295,_0x30f81c);}function _0x32ae(){const _0x3164b7=['addUrlToContext','group','find','sessionId','ai-chat-conversation-set-model-not-available','ai-chat-conversation-init-from-id-failed','options','interactionCreated','assistant','toLowerCase','setModel','removeInteraction','_extractContextItems','user','quickActionData','1652283hBHbYj','ai-chat-conversation-start-failed','set','isAvailable','length','533182owWYjZ','destroy','webSearch','connector','model','code','getModel','handleUserInteraction','removeSelectionFromContext','getCapabilitiesConfig','getAll','addSelectionToContext','updateCurrentDocument','5678580mtRxIv','stop','appendContent','currentReply','push','conversationId','_processMessagesToInteractions','modification-delta','selectedModel','indexOf','ai-chat-conversation-init-failed','chatCapabilities','getDocumentContext','300EmaSTh','get','populateFromMessage','ai-chat-conversation-start-no-model-selected','addResourceToContext','contextItems','fire','removeFromContext','capabilities','content','fetchConversation','2619840CNZhFF','getMessages','reasoning','chatContext','getAvailableModels','fetchConversationMessages','type','ai-chat-conversation-set-model-null','addFilesToContext','load','startConversation','isCurrentDocumentInConversation','stack','title','reset','updateCurrentDocumentInContext','loadSourceResources','text-delta','createInteraction','getCurrentDocumentContext','getInteraction','1473622XQVoAP','modelSelected','prompt','getPendingContextItems','isStarted','splice','ai-chat-handle-user-interaction-already-in-progress','conversationInitialized','ai-chat-handle-user-interaction-start-failed','62165bPIZYn','currentInteraction','hasOwn','toggleReasoning','lastInteraction','isSelectionInContext','attributes','ai-chat-conversation-already-started','role','getConversation','chatModels','getEditor','error','3103457cYGvWQ','delegate','ai-chat-handle-user-conversation-not-initialized','toggleWebSearch','addToConversationContext','text','isCurrentDocumentInContext','interactions','message','setConversationTitle','selectedModelId','createReply','conversationStarted','addCurrentDocumentToContext','init','start'];_0x32ae=function(){return _0x3164b7;};return _0x32ae();}import{errorsMap as _0x478617}from'../../errorsmap.js';export class AIChatConversation extends _0x3b3df1(){['id'];[_0x393da5(0x1fb)]=!0x1;[_0x393da5(0x214)]=[];[_0x393da5(0x201)];[_0x393da5(0x1d2)];[_0x393da5(0x1c0)];[_0x393da5(0x1af)];constructor(_0xb9f27c){const _0x4457df=_0x393da5;super(),this[_0x4457df(0x1af)]=_0xb9f27c,this[_0x4457df(0x1c0)]=_0xb9f27c[_0x4457df(0x1c0)],this[_0x4457df(0x20a)]=_0xb9f27c[_0x4457df(0x20a)],this['id']=_0xb9f27c[_0x4457df(0x1cf)];}async[_0x393da5(0x21b)](_0x2e6405){const _0xfbc81d=_0x393da5;try{this[_0xfbc81d(0x1e5)]=new _0x23f3d1({'connector':this[_0xfbc81d(0x1c0)],'config':_0x2e6405,'ownerId':this['id']}),this[_0xfbc81d(0x1e5)][_0xfbc81d(0x20e)](..._0x356d4b)['to'](this),this[_0xfbc81d(0x1e5)][_0xfbc81d(0x21b)](),this[_0xfbc81d(0x1d5)]=new _0x48fcb7(),this[_0xfbc81d(0x1d5)][_0xfbc81d(0x20e)](..._0x124c97)['to'](this),this[_0xfbc81d(0x1d5)][_0xfbc81d(0x21b)]();const _0x1ea8b4=await this[_0xfbc81d(0x20a)][_0xfbc81d(0x1e6)]();this[_0xfbc81d(0x1dd)](_0xfbc81d(0x1fe),{'availableModels':_0x1ea8b4});const _0x12a163=await this[_0xfbc81d(0x20a)][_0xfbc81d(0x1c3)](this[_0xfbc81d(0x1af)][_0xfbc81d(0x217)]);_0x12a163&&await this[_0xfbc81d(0x1b3)](_0x12a163);}catch(_0x5952ce){const _0x4014e7=new _0x14e2dd(_0xfbc81d(0x1d4),null,{'message':_0x5952ce[_0xfbc81d(0x215)]||_0x5952ce});_0x4014e7[_0xfbc81d(0x1ee)]=_0x5952ce[_0xfbc81d(0x1ee)],this[_0xfbc81d(0x1dd)](_0xfbc81d(0x20c),{'error':_0x4014e7});}}async[_0x393da5(0x21c)](){const _0x3191fa=_0x393da5;if(this[_0x3191fa(0x1fb)])throw new _0x14e2dd(_0x3191fa(0x207),null,{'conversation':this});if(!this[_0x3191fa(0x1d2)])throw new _0x14e2dd(_0x3191fa(0x1da),null,{'conversation':this});try{const {id:_0x4db44c}=await this[_0x3191fa(0x1c0)][_0x3191fa(0x1ec)](this['id'],this[_0x3191fa(0x1af)][_0x3191fa(0x21e)])[_0x3191fa(0x209)]();this['id']=_0x4db44c,this[_0x3191fa(0x1fb)]=!0x0,this[_0x3191fa(0x1dd)](_0x3191fa(0x219),{'conversationId':this['id'],'selectedModel':this[_0x3191fa(0x1d2)]});}catch(_0x120c7a){const _0x6d8538=new _0x14e2dd(_0x3191fa(0x1b9),null,{'message':_0x120c7a[_0x3191fa(0x215)],'conversationId':this['id']});throw _0x6d8538[_0x3191fa(0x1ee)]=_0x120c7a[_0x3191fa(0x1ee)],this[_0x3191fa(0x1dd)](_0x3191fa(0x20c),{'error':_0x6d8538}),_0x6d8538;}}async[_0x393da5(0x1eb)](_0x221348,_0x323b13){const _0x1ba8d0=_0x393da5;try{const _0x32c0b9=await this[_0x1ba8d0(0x1c0)][_0x1ba8d0(0x1e1)](_0x221348)[_0x1ba8d0(0x209)](),_0xb7c7b6=await this[_0x1ba8d0(0x1c0)][_0x1ba8d0(0x1e7)](_0x221348)[_0x1ba8d0(0x1e3)](),_0xa90ac6=_0xb7c7b6[0x0][_0x1ba8d0(0x1c1)];this[_0x1ba8d0(0x1fb)]=!0x0,this['id']=_0x32c0b9['id'],_0x1ba8d0(0x1ef)in _0x32c0b9?this[_0x1ba8d0(0x1dd)](_0x1ba8d0(0x216),_0x32c0b9[_0x1ba8d0(0x1ef)],!0x0):this[_0x1ba8d0(0x1dd)](_0x1ba8d0(0x216),'',!0x0);const _0x4dcef4=(await this[_0x1ba8d0(0x20a)][_0x1ba8d0(0x1c7)]())[_0x1ba8d0(0x21f)](_0x14858f=>_0x14858f['id'][_0x1ba8d0(0x1b2)]()===_0xa90ac6[_0x1ba8d0(0x1b2)]());return this[_0x1ba8d0(0x1d2)]=_0x4dcef4,this[_0x1ba8d0(0x1dd)](_0x1ba8d0(0x1f8),{'selectedModel':_0x4dcef4,'isDisabled':!0x0}),await this[_0x1ba8d0(0x1d0)](_0xb7c7b6,_0x323b13,_0xa90ac6),this[_0x1ba8d0(0x201)]=void 0x0,this;}catch(_0x5d9004){const _0x4c26c5=new _0x14e2dd(_0x1ba8d0(0x1ae),null,{'message':_0x5d9004[_0x1ba8d0(0x215)],'conversationId':_0x221348});throw _0x4c26c5[_0x1ba8d0(0x1ee)]=_0x5d9004[_0x1ba8d0(0x1ee)],this[_0x1ba8d0(0x1dd)](_0x1ba8d0(0x20c),{'error':_0x4c26c5}),_0x4c26c5;}}async[_0x393da5(0x1d0)](_0x106885,_0x4e21ca,_0x2a55e6){const _0x8744fe=_0x393da5;let _0x1a2d26;for(const _0x28d0b7 of _0x106885)if(_0x8744fe(0x1b6)===_0x28d0b7[_0x8744fe(0x208)]){const _0x588403=await this[_0x8744fe(0x1b5)](_0x28d0b7),_0x69ee02={'isReasoningEnabled':Object[_0x8744fe(0x202)](_0x28d0b7[_0x8744fe(0x1df)],_0x8744fe(0x1e4)),'isWebSearchEnabled':Object[_0x8744fe(0x202)](_0x28d0b7[_0x8744fe(0x1df)],_0x8744fe(0x1bf))};_0x1a2d26=this[_0x8744fe(0x1f4)]({'userMessage':_0x28d0b7[_0x8744fe(0x1f9)],'contextItems':_0x588403,'capabilities':_0x69ee02,'modelId':_0x2a55e6,'quickActionData':_0x28d0b7[_0x8744fe(0x206)]?.[_0x8744fe(0x1b7)]}),this[_0x8744fe(0x201)]=_0x1a2d26,this[_0x8744fe(0x1e5)][_0x8744fe(0x211)](this[_0x8744fe(0x201)][_0x8744fe(0x1dc)]);}else{if(_0x8744fe(0x1b1)===_0x28d0b7[_0x8744fe(0x208)]&&_0x1a2d26)for(const _0x48393d of _0x28d0b7[_0x8744fe(0x1e0)]){const _0x242aa5=_0x8744fe(0x212)===_0x48393d[_0x8744fe(0x1e8)]?_0x8744fe(0x1f3):_0x8744fe(0x1d1),_0x3b9e86=_0x1a2d26[_0x8744fe(0x1d6)]()?.[_0x8744fe(0x220)]!==_0x4e21ca;_0x1a2d26[_0x8744fe(0x1cd)]=_0x1a2d26[_0x8744fe(0x218)]({'type':_0x242aa5,'isDone':!0x0,'interactionId':_0x1a2d26['id'],'areActionsDisabled':_0x3b9e86}),_0x1a2d26[_0x8744fe(0x1cd)][_0x8744fe(0x1cc)](_0x48393d[_0x8744fe(0x1e0)]);}}}async[_0x393da5(0x1b5)](_0x4af419){const _0x5283cb=_0x393da5,_0x19466d=new Map();if(!_0x4af419[_0x5283cb(0x1e0)])return _0x19466d;for(const _0x5c0d80 of _0x4af419[_0x5283cb(0x1e0)]){const _0x27c187=await this[_0x5283cb(0x1e5)][_0x5283cb(0x1d9)](_0x5c0d80);_0x27c187&&_0x19466d[_0x5283cb(0x1ba)](_0x27c187['id'],_0x27c187);}return _0x19466d;}async[_0x393da5(0x1c4)]({userMessage:_0x1ad502,quickActionData:_0x275686}){const _0xd44c27=_0x393da5;if(!this[_0xd44c27(0x1fb)])throw new _0x14e2dd(_0xd44c27(0x20f),null,{'conversation':this});if(this[_0xd44c27(0x201)])throw new _0x14e2dd(_0xd44c27(0x1fd),null,{'conversation':this});try{const _0x57a72e=this[_0xd44c27(0x1e5)][_0xd44c27(0x1fa)](),_0xeb974d=this[_0xd44c27(0x1d5)][_0xd44c27(0x1c6)](),_0xee378=this[_0xd44c27(0x1d2)]['id'];this[_0xd44c27(0x201)]=this[_0xd44c27(0x1f4)]({'userMessage':_0x1ad502,'contextItems':_0x57a72e,'capabilities':_0xeb974d,'modelId':_0xee378,'quickActionData':_0x275686}),await this[_0xd44c27(0x201)][_0xd44c27(0x21c)](),this[_0xd44c27(0x1e5)][_0xd44c27(0x211)](this[_0xd44c27(0x201)][_0xd44c27(0x1dc)]);}catch(_0x244947){if(_0x244947 instanceof _0x14e2dd)this[_0xd44c27(0x1dd)](_0xd44c27(0x20c),{'interactionId':this[_0xd44c27(0x201)]?this[_0xd44c27(0x201)]['id']:void 0x0,'error':_0x244947});else{const _0x4269b7=_0x478617[_0xd44c27(0x1d8)](_0x244947[_0xd44c27(0x1c2)])||_0xd44c27(0x1ff);this[_0xd44c27(0x1dd)](_0xd44c27(0x20c),{'interactionId':this[_0xd44c27(0x201)]?this[_0xd44c27(0x201)]['id']:void 0x0,'error':new _0x14e2dd(_0x4269b7,null,{'error':_0x244947})});}}finally{this[_0xd44c27(0x201)]?.[_0xd44c27(0x1cb)](),this[_0xd44c27(0x201)]=void 0x0;}}[_0x393da5(0x1f4)]({userMessage:_0x2e5a3b,contextItems:_0xc97861,capabilities:_0x1d4aa3,modelId:_0x34d2c3,quickActionData:_0x106419}){const _0x105eaf=_0x393da5,_0x3423a9=new _0x117215({'userMessage':_0x2e5a3b,'contextItems':_0xc97861,'capabilities':_0x1d4aa3,'conversationId':this['id'],'connector':this[_0x105eaf(0x1c0)],'editor':this[_0x105eaf(0x1af)][_0x105eaf(0x20b)]&&this[_0x105eaf(0x1af)][_0x105eaf(0x20b)](),'model':_0x34d2c3,'quickActionData':_0x106419});return _0x3423a9[_0x105eaf(0x20e)](..._0x530de8)['to'](this),this[_0x105eaf(0x214)][_0x105eaf(0x1ce)](_0x3423a9),this[_0x105eaf(0x1dd)](_0x105eaf(0x1b0),_0x3423a9),_0x3423a9;}[_0x393da5(0x1f6)](_0x890f28){const _0x30c867=_0x393da5;return this[_0x30c867(0x214)][_0x30c867(0x21f)](_0x4cf64c=>_0x4cf64c['id']===_0x890f28);}[_0x393da5(0x1b4)](_0x195f4e){const _0x215e31=_0x393da5,_0x28653a=this[_0x215e31(0x1f6)](_0x195f4e);_0x28653a&&(_0x28653a[_0x215e31(0x1be)](),this[_0x215e31(0x214)][_0x215e31(0x1fc)](this[_0x215e31(0x214)][_0x215e31(0x1d3)](_0x28653a),0x1));}get[_0x393da5(0x204)](){const _0x109c18=_0x393da5;return this[_0x109c18(0x214)][this[_0x109c18(0x214)][_0x109c18(0x1bc)]-0x1];}[_0x393da5(0x21a)](_0x4da5b0){const _0x1f4ea2=_0x393da5;this[_0x1f4ea2(0x1e5)][_0x1f4ea2(0x21a)](_0x4da5b0);}async[_0x393da5(0x1f1)]({content:_0x52e17e,version:_0x326712,sessionId:_0x4e3a5e,selections:_0x59596f}){const _0x42d9bd=_0x393da5;await this[_0x42d9bd(0x1e5)][_0x42d9bd(0x1c9)](_0x52e17e,_0x326712,_0x4e3a5e,_0x59596f);}[_0x393da5(0x1f5)](){const _0x18ddd2=_0x393da5;return this[_0x18ddd2(0x201)]?.[_0x18ddd2(0x1d6)]()?.[_0x18ddd2(0x1e0)]||'';}[_0x393da5(0x1c8)](_0x3b0764){const _0x3d260a=_0x393da5;this[_0x3d260a(0x1e5)][_0x3d260a(0x1c8)](_0x3b0764);}[_0x393da5(0x1c5)](){const _0x533ba7=_0x393da5;this[_0x533ba7(0x1e5)][_0x533ba7(0x1c5)]();}[_0x393da5(0x1ea)](_0x34ee47){const _0x2cfd56=_0x393da5;this[_0x2cfd56(0x1e5)][_0x2cfd56(0x1ea)](_0x34ee47);}[_0x393da5(0x21d)](_0x150486){const _0x1bc344=_0x393da5;this[_0x1bc344(0x1e5)][_0x1bc344(0x21d)](_0x150486);}[_0x393da5(0x1db)](_0x24a054,_0x128cc3){const _0x4fae7=_0x393da5;this[_0x4fae7(0x1e5)][_0x4fae7(0x1db)](_0x24a054,_0x128cc3);}[_0x393da5(0x1f2)](_0x54f45d,_0x218a84,_0x88efd){const _0x507dcb=_0x393da5;return this[_0x507dcb(0x1e5)][_0x507dcb(0x1f2)](_0x54f45d,_0x218a84,_0x88efd);}[_0x393da5(0x1de)](_0x44c816){const _0x393f77=_0x393da5;this[_0x393f77(0x1e5)][_0x393f77(0x1de)](_0x44c816);}[_0x393da5(0x210)](){const _0x4ad545=_0x393da5;this[_0x4ad545(0x1d5)][_0x4ad545(0x210)]();}[_0x393da5(0x203)](){const _0x2cb437=_0x393da5;this[_0x2cb437(0x1d5)][_0x2cb437(0x203)]();}[_0x393da5(0x213)](){const _0x12202a=_0x393da5;return this[_0x12202a(0x1e5)][_0x12202a(0x213)]();}[_0x393da5(0x1ed)](){const _0x2835be=_0x393da5;return this[_0x2835be(0x1e5)][_0x2835be(0x1ed)]();}[_0x393da5(0x205)](){const _0x4061f4=_0x393da5;return this[_0x4061f4(0x1e5)][_0x4061f4(0x205)]();}async[_0x393da5(0x1b3)](_0x36518f){const _0x56084c=_0x393da5;_0x36518f?!0x1===await this[_0x56084c(0x20a)][_0x56084c(0x1bb)](_0x36518f)&&(_0x1f8502(_0x56084c(0x221),{'conversation':this,'model':_0x36518f}),_0x36518f=(await this[_0x56084c(0x20a)][_0x56084c(0x1e6)]())[0x0]):(_0x1f8502(_0x56084c(0x1e9),{'conversation':this}),_0x36518f=(await this[_0x56084c(0x20a)][_0x56084c(0x1e6)]())[0x0]),_0x36518f['id']!==this[_0x56084c(0x1d2)]?.['id']&&(this[_0x56084c(0x1d2)]=_0x36518f,this[_0x56084c(0x1d5)][_0x56084c(0x1f0)](),this[_0x56084c(0x1dd)](_0x56084c(0x1f8),{'selectedModel':_0x36518f}));}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x824010=_0x36bb;(function(_0x478594,_0x198b39){var _0x59d3d1=_0x36bb,_0x185e93=_0x478594();while(!![]){try{var _0x4503a2=parseInt(_0x59d3d1(0x102))/0x1+parseInt(_0x59d3d1(0xf2))/0x2+parseInt(_0x59d3d1(0xfe))/0x3+-parseInt(_0x59d3d1(0xf3))/0x4+parseInt(_0x59d3d1(0xef))/0x5+parseInt(_0x59d3d1(0xf7))/0x6+-parseInt(_0x59d3d1(0xfa))/0x7*(parseInt(_0x59d3d1(0xf5))/0x8);if(_0x4503a2===_0x198b39)break;else _0x185e93['push'](_0x185e93['shift']());}catch(_0x361fc0){_0x185e93['push'](_0x185e93['shift']());}}}(_0x19c6,0xa65e6));import{AICapabilities as _0x3300e1}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x333341}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x2769d4}from'./aichatcontext.js';export class AIChatInteraction extends _0x333341{[_0x824010(0x104)];[_0x824010(0xf4)];[_0x824010(0xfd)]=new Map();[_0x824010(0xfc)];[_0x824010(0xf0)];constructor(_0x1364c4){var _0xfffb3a=_0x824010;super(_0x1364c4),this[_0xfffb3a(0xf4)]=_0x1364c4[_0xfffb3a(0xf4)],this[_0xfffb3a(0xfd)]=_0x1364c4[_0xfffb3a(0xfd)],this[_0xfffb3a(0x101)]=_0x1364c4[_0xfffb3a(0x101)],this[_0xfffb3a(0x104)]=_0x1364c4[_0xfffb3a(0x104)],this[_0xfffb3a(0xfc)]=_0x1364c4[_0xfffb3a(0xfc)],this[_0xfffb3a(0xf0)]=_0x1364c4[_0xfffb3a(0xf0)];}async[_0x824010(0x100)](){var _0x3824da=_0x824010;return this[_0x3824da(0xf9)][_0x3824da(0xf6)]({'message':this[_0x3824da(0x104)],'conversationId':this[_0x3824da(0xf4)],'parts':_0x2769d4[_0x3824da(0xfb)](this[_0x3824da(0xfd)]),'capabilities':_0x3300e1[_0x3824da(0xff)](this[_0x3824da(0x101)]),'model':this[_0x3824da(0xfc)],'quickActionData':this[_0x3824da(0xf0)]});}[_0x824010(0xf8)](){var _0x11f073=_0x824010;return this[_0x11f073(0xfd)][_0x11f073(0xf1)](_0x11f073(0x103));}}function _0x36bb(_0x9d0390,_0x5db649){var _0x19c631=_0x19c6();return _0x36bb=function(_0x36bb00,_0x5b4f80){_0x36bb00=_0x36bb00-0xef;var _0x4c4e0e=_0x19c631[_0x36bb00];return _0x4c4e0e;},_0x36bb(_0x9d0390,_0x5db649);}function _0x19c6(){var _0xf3d3fb=['current-document','userMessage','2001940ZdaJMC','quickActionData','get','1486646WVIRFO','5377400OjjSXg','conversationId','6224WkQrkV','queryAssistant','4630842TpvIZU','getDocumentContext','connector','7987SkUBiM','mapContextItemsToRequestData','model','contextItems','981186gOnQsv','getCapabilitiesRequestData','sendRequest','capabilities','670914dyMctJ'];_0x19c6=function(){return _0xf3d3fb;};return _0x19c6();}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -9,7 +9,7 @@ import type { Locale } from 'ckeditor5/src/utils.js';
|
|
|
9
9
|
import { View, type BodyCollection } from 'ckeditor5/src/ui.js';
|
|
10
10
|
import { type AIAddContextOptionsState, type AIContextProvider, type AIContextResourceState } from '../model/aichatcontext.js';
|
|
11
11
|
import { type AIContextItem } from '../../aicore/model/aicontext.js';
|
|
12
|
-
import { type
|
|
12
|
+
import { type AIModelData } from '../../aicore/aiconnector.js';
|
|
13
13
|
export declare class AIChatControlsView extends View {
|
|
14
14
|
/**
|
|
15
15
|
* The loading state of the controls.
|
|
@@ -88,11 +88,11 @@ export declare class AIChatControlsView extends View {
|
|
|
88
88
|
/**
|
|
89
89
|
* Sets model list dropdown.
|
|
90
90
|
*/
|
|
91
|
-
setModelList(models: Array<
|
|
91
|
+
setModelList(models: Array<AIModelData>, hideIfSingleModel: boolean): void;
|
|
92
92
|
/**
|
|
93
93
|
* Sets the selected model in the model list dropdown.
|
|
94
94
|
*/
|
|
95
|
-
setModel(model:
|
|
95
|
+
setModel(model: AIModelData | null): void;
|
|
96
96
|
/**
|
|
97
97
|
* Enables the model selector in the prompt capabilities view.
|
|
98
98
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x4357(_0x526209,_0xeeeca0){const _0x304a66=_0x304a();return _0x4357=function(_0x4357b2,_0x3f0540){_0x4357b2=_0x4357b2-0x150;let _0x5eb225=_0x304a66[_0x4357b2];return _0x5eb225;},_0x4357(_0x526209,_0xeeeca0);}const _0x4f342a=_0x4357;(function(_0x4a7bb3,_0x54dd0a){const _0x1e76a5=_0x4357,_0x1b5c7f=_0x4a7bb3();while(!![]){try{const _0x146672=-parseInt(_0x1e76a5(0x17d))/0x1*(parseInt(_0x1e76a5(0x152))/0x2)+-parseInt(_0x1e76a5(0x172))/0x3+parseInt(_0x1e76a5(0x175))/0x4*(-parseInt(_0x1e76a5(0x15b))/0x5)+-parseInt(_0x1e76a5(0x150))/0x6*(-parseInt(_0x1e76a5(0x1a1))/0x7)+-parseInt(_0x1e76a5(0x165))/0x8*(parseInt(_0x1e76a5(0x159))/0x9)+-parseInt(_0x1e76a5(0x15a))/0xa*(-parseInt(_0x1e76a5(0x151))/0xb)+-parseInt(_0x1e76a5(0x164))/0xc*(-parseInt(_0x1e76a5(0x199))/0xd);if(_0x146672===_0x54dd0a)break;else _0x1b5c7f['push'](_0x1b5c7f['shift']());}catch(_0x2dccdd){_0x1b5c7f['push'](_0x1b5c7f['shift']());}}}(_0x304a,0x85239));import{ButtonView as _0x31aa30,clickOutsideHandler as _0x3d6e77,View as _0x26422a}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x14cc09}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x303c21}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x3addae,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x2565cc}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x5ae318}from'./controls/aichatcontrolsloaderview.js';import{getTranslation as _0x37e84c}from'../../aicore/utils/common-translations.js';export class AIChatControlsView extends _0x26422a{[_0x4f342a(0x166)]=[];[_0x4f342a(0x180)];[_0x4f342a(0x173)];[_0x4f342a(0x194)];[_0x4f342a(0x196)];[_0x4f342a(0x179)];[_0x4f342a(0x17a)];constructor(_0x3a9ef1,_0x238a48){const _0x14b9f8=_0x4f342a;super(_0x3a9ef1),this[_0x14b9f8(0x180)]=this[_0x14b9f8(0x153)](_0x3a9ef1,{'bodyCollection':_0x238a48[_0x14b9f8(0x15c)],'searchInputVisibleFrom':_0x238a48[_0x14b9f8(0x15e)]}),this[_0x14b9f8(0x173)]=this[_0x14b9f8(0x19a)](_0x3a9ef1),this[_0x14b9f8(0x194)]=this[_0x14b9f8(0x162)](_0x3a9ef1),this[_0x14b9f8(0x196)]=this[_0x14b9f8(0x170)](_0x3a9ef1),this[_0x14b9f8(0x179)]=this[_0x14b9f8(0x197)](_0x3a9ef1),this[_0x14b9f8(0x17a)]=!0x1,this[_0x14b9f8(0x173)][_0x14b9f8(0x193)](_0x14b9f8(0x187))['to'](this),this[_0x14b9f8(0x196)][_0x14b9f8(0x193)](_0x14b9f8(0x186))['to'](this),this[_0x14b9f8(0x194)][_0x14b9f8(0x193)](_0x14b9f8(0x183))['to'](this),this[_0x14b9f8(0x194)][_0x14b9f8(0x193)](_0x14b9f8(0x190))['to'](this),this[_0x14b9f8(0x194)][_0x14b9f8(0x193)](_0x14b9f8(0x155))['to'](this),this[_0x14b9f8(0x180)][_0x14b9f8(0x193)](..._0x2565cc)['to'](this),this[_0x14b9f8(0x17f)](_0x14b9f8(0x189),!0x0),this[_0x14b9f8(0x17f)](_0x14b9f8(0x19b),!0x1);const _0x8edc7a=this[_0x14b9f8(0x15f)];this[_0x14b9f8(0x192)]({'tag':_0x14b9f8(0x191),'attributes':{'class':['ck',_0x14b9f8(0x17e),_0x8edc7a['if'](_0x14b9f8(0x19b),_0x14b9f8(0x15d))]},'children':[{'tag':_0x14b9f8(0x16c),'attributes':{'class':[_0x8edc7a['if'](_0x14b9f8(0x157),_0x14b9f8(0x17b),_0x191707=>_0x191707||!this[_0x14b9f8(0x189)]),_0x8edc7a['if'](_0x14b9f8(0x189),_0x14b9f8(0x17b),_0x4000c5=>!_0x4000c5||this[_0x14b9f8(0x157)])]},'children':[this[_0x14b9f8(0x180)],this[_0x14b9f8(0x173)],this[_0x14b9f8(0x194)]]},{'tag':_0x14b9f8(0x16c),'attributes':{'class':[_0x8edc7a['if'](_0x14b9f8(0x157),_0x14b9f8(0x17b),_0x2d7799=>!_0x2d7799)]},'children':[this[_0x14b9f8(0x196)]]},{'tag':_0x14b9f8(0x16c),'attributes':{'class':[_0x8edc7a['if'](_0x14b9f8(0x189),_0x14b9f8(0x17b),_0x5407b3=>_0x5407b3)]},'children':[this[_0x14b9f8(0x179)]]}]}),_0x3d6e77({'emitter':this[_0x14b9f8(0x173)],'activator':()=>this[_0x14b9f8(0x157)],'contextElements':()=>[this[_0x14b9f8(0x160)]],'callback':()=>{const _0x4d92c9=_0x14b9f8;this[_0x4d92c9(0x17a)]=!0x1;}}),this['on'](_0x14b9f8(0x16e),this[_0x14b9f8(0x185)],{'priority':_0x14b9f8(0x16d)});}[_0x4f342a(0x153)](_0x36fdb2,_0x274b57){return new _0x3addae(_0x36fdb2,_0x274b57);}[_0x4f342a(0x19a)](_0x6defe7){const _0x491417=_0x4f342a;return new _0x14cc09(_0x6defe7,this[_0x491417(0x180)][_0x491417(0x18b)]);}[_0x4f342a(0x162)](_0x33bd4e){return new _0x303c21(_0x33bd4e);}[_0x4f342a(0x170)](_0x2dba11){return new _0x5ae318(_0x2dba11);}[_0x4f342a(0x197)](_0x35324f){const _0x3ed18e=_0x4f342a,_0x547f7a=new ws(_0x35324f);return _0x547f7a[_0x3ed18e(0x193)](_0x3ed18e(0x19c))['to'](this),_0x547f7a;}[_0x4f342a(0x185)](_0x14816e,_0x5b05e5,_0x555310){const _0x4625a7=_0x4f342a;_0x555310?this[_0x4625a7(0x17a)]=!0x0:this[_0x4625a7(0x17a)]&&this[_0x4625a7(0x173)][_0x4625a7(0x167)]();}[_0x4f342a(0x161)](_0x1d17e0,_0x4796a7){const _0x536f99=_0x4f342a;this[_0x536f99(0x180)][_0x536f99(0x161)](_0x1d17e0,_0x4796a7);}[_0x4f342a(0x181)](_0x41b844){const _0x4f0223=_0x4f342a;this[_0x4f0223(0x180)][_0x4f0223(0x181)](_0x41b844);}[_0x4f342a(0x18d)](_0x344a9c,_0x43cc01){const _0x4c3924=_0x4f342a;this[_0x4c3924(0x180)][_0x4c3924(0x18d)](_0x344a9c,_0x43cc01);}[_0x4f342a(0x198)](_0x266e25){const _0x5cb6fe=_0x4f342a;this[_0x5cb6fe(0x173)][_0x5cb6fe(0x198)](_0x266e25);}[_0x4f342a(0x171)](_0x367ae7){const _0x4dd4de=_0x4f342a;this[_0x4dd4de(0x180)][_0x4dd4de(0x171)](_0x367ae7);}[_0x4f342a(0x18c)](){const _0x5d13c9=_0x4f342a;this[_0x5d13c9(0x180)][_0x5d13c9(0x16b)]();}[_0x4f342a(0x177)](){const _0x24b638=_0x4f342a;this[_0x24b638(0x180)][_0x24b638(0x169)]();}[_0x4f342a(0x18a)](_0x426561,_0x3f7efb,_0x1f3dc7){const _0x4e72ef=_0x4f342a;this[_0x4e72ef(0x180)][_0x4e72ef(0x18a)](_0x426561,_0x3f7efb,_0x1f3dc7);}[_0x4f342a(0x1a3)](_0x5b1837){const _0x1590f1=_0x4f342a;this[_0x1590f1(0x194)][_0x1590f1(0x1a3)](_0x5b1837);}[_0x4f342a(0x18e)](_0x55b5b8){const _0xe21320=_0x4f342a;this[_0xe21320(0x194)][_0xe21320(0x18e)](_0x55b5b8);}[_0x4f342a(0x16a)](){const _0x42d330=_0x4f342a;this[_0x42d330(0x173)][_0x42d330(0x158)]();}[_0x4f342a(0x1a0)](_0x3605d7){const _0x9dba84=_0x4f342a;this[_0x9dba84(0x180)][_0x9dba84(0x1a0)](_0x3605d7);}[_0x4f342a(0x1a2)](_0x1fcce3){const _0x3e3c56=_0x4f342a;this[_0x3e3c56(0x173)][_0x3e3c56(0x174)](_0x1fcce3);}[_0x4f342a(0x188)](_0x526f14,_0x2886d2){const _0x3994df=_0x4f342a;this[_0x3994df(0x166)]=_0x526f14,this[_0x3994df(0x194)][_0x3994df(0x188)](_0x526f14,_0x2886d2);}[_0x4f342a(0x156)](_0x20d546){const _0x3faa9c=_0x4f342a;(_0x20d546?this[_0x3faa9c(0x166)][_0x3faa9c(0x16f)](_0x5a44f8=>_0x5a44f8['id']===_0x20d546['id']):null)?(this[_0x3faa9c(0x189)]=!0x0,this[_0x3faa9c(0x194)][_0x3faa9c(0x156)](_0x20d546)):_0x20d546?.['id'][_0x3faa9c(0x184)](_0x3faa9c(0x19d))?(this[_0x3faa9c(0x189)]=!0x0,this[_0x3faa9c(0x194)][_0x3faa9c(0x156)](this[_0x3faa9c(0x166)][0x0])):this[_0x3faa9c(0x189)]=!0x1;}[_0x4f342a(0x176)](){const _0x445e5f=_0x4f342a;this[_0x445e5f(0x194)][_0x445e5f(0x176)]();}[_0x4f342a(0x168)](_0x328df3){const _0x532922=_0x4f342a;this[_0x532922(0x194)][_0x532922(0x168)](_0x328df3);}[_0x4f342a(0x17c)](_0x1b3c94,_0x547873,_0x5d84cc,_0x3b0dc7){const _0x2bdb5e=_0x4f342a;this[_0x2bdb5e(0x180)][_0x2bdb5e(0x17c)](_0x1b3c94,_0x547873,_0x5d84cc,_0x3b0dc7);}[_0x4f342a(0x19f)](_0x3fdba4){const _0x8c235d=_0x4f342a;this[_0x8c235d(0x180)][_0x8c235d(0x19f)](_0x3fdba4);}[_0x4f342a(0x154)](){const _0x2f704a=_0x4f342a;this[_0x2f704a(0x173)][_0x2f704a(0x167)]();}}class ws extends _0x26422a{constructor(_0x29e893){const _0xffb641=_0x4f342a;super(_0x29e893);const _0x1ebf5d=new _0x31aa30(_0x29e893);_0x1ebf5d[_0xffb641(0x17f)]({'label':_0x37e84c(this[_0xffb641(0x19e)],_0xffb641(0x18f)),'withText':!0x0,'class':[_0xffb641(0x195)],'tooltip':''}),_0x1ebf5d[_0xffb641(0x193)](_0xffb641(0x163))['to'](this,_0xffb641(0x19c)),this[_0xffb641(0x192)]({'tag':_0xffb641(0x16c),'attributes':{'class':['ck',_0xffb641(0x182)]},'children':[{'tag':'p','children':[{'text':_0x37e84c(this[_0xffb641(0x19e)],_0xffb641(0x178))+'\x20'},_0x1ebf5d]}]});}}function _0x304a(){const _0x488016=['ck-ai-chat-controls-disabled','contextResourcesSearchInputVisibleFrom','bindTemplate','element','addContextItem','_createPromptCapabilitiesView','execute','36wuYfZy','4218216Yumpjn','_displayedModels','focus','disableModelSelector','clearConversationContextItems','resetMessageInput','clearCurrentContextItems','div','low','change:isLoading','find','_createLoaderView','setConversationContext','3266247bwoEeo','_promptInputView','setPlaceholderText','8GzfaHL','enableModelSelector','clearConversationContextUI','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_TEXT','_modelUnavailableMessageView','_shouldRestorePromptInputFocus','ck-hidden','populateSourceResourceBalloon','379085MmRIpP','ck-ai-chat-controls','set','_contextPanelView','removeContextItem','ck-ai-chat-controls-model-unavailable-message','toggleWebSearch','startsWith','_handlePromptInputFocus','abortPromptStream','sendUserMessage','setModelList','isModelAvailable','updateResourceState','addContextButtonView','clearPendingContextUI','setContextItemLoading','setReasoning','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_BUTTON','toggleReasoning','form','setTemplate','delegate','_promptCapabilitiesView','ck-ai-chat-controls__start-new-chat-button','_loaderView','_createModelUnavailableMessageView','setIsUploadInProgress','5434559PZdBuO','_createPromptInputView','isDisabled','startConversation','agent','locale','closeSourceResourceBalloon','setAddContextOptions','7qCgGtt','setInputPlaceholder','setWebSearch','4741788kyCVsW','11cwvDaw','2IgITus','_createContextPanelView','focusPromptInput','selectModel','setModel','isLoading','reset','9TNHXwT','5983370OfiPpP','255790IDOCys','bodyCollection'];_0x304a=function(){return _0x488016;};return _0x304a();}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
/**
|