@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1

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.
Files changed (623) hide show
  1. package/LICENSE.md +18 -5
  2. package/README.md +10 -9
  3. package/build/ai.js +2 -2
  4. package/build/translations/af.js +1 -1
  5. package/build/translations/ar.js +1 -1
  6. package/build/translations/ast.js +1 -1
  7. package/build/translations/az.js +1 -1
  8. package/build/translations/be.js +1 -1
  9. package/build/translations/bg.js +1 -1
  10. package/build/translations/bn.js +1 -1
  11. package/build/translations/bs.js +1 -1
  12. package/build/translations/ca.js +1 -1
  13. package/build/translations/cs.js +1 -1
  14. package/build/translations/da.js +1 -1
  15. package/build/translations/de-ch.js +1 -1
  16. package/build/translations/de.js +1 -1
  17. package/build/translations/el.js +1 -1
  18. package/build/translations/en-au.js +1 -1
  19. package/build/translations/en-gb.js +1 -1
  20. package/build/translations/eo.js +1 -1
  21. package/build/translations/es-co.js +1 -1
  22. package/build/translations/es.js +1 -1
  23. package/build/translations/et.js +1 -1
  24. package/build/translations/eu.js +1 -1
  25. package/build/translations/fa.js +1 -1
  26. package/build/translations/fi.js +1 -1
  27. package/build/translations/fr.js +1 -1
  28. package/build/translations/gl.js +1 -1
  29. package/build/translations/gu.js +1 -1
  30. package/build/translations/he.js +1 -1
  31. package/build/translations/hi.js +1 -1
  32. package/build/translations/hr.js +1 -1
  33. package/build/translations/hu.js +1 -1
  34. package/build/translations/hy.js +1 -1
  35. package/build/translations/id.js +1 -1
  36. package/build/translations/it.js +1 -1
  37. package/build/translations/ja.js +1 -1
  38. package/build/translations/jv.js +1 -1
  39. package/build/translations/kk.js +1 -1
  40. package/build/translations/km.js +1 -1
  41. package/build/translations/kn.js +1 -1
  42. package/build/translations/ko.js +1 -1
  43. package/build/translations/ku.js +1 -1
  44. package/build/translations/lt.js +1 -1
  45. package/build/translations/lv.js +1 -1
  46. package/build/translations/ms.js +1 -1
  47. package/build/translations/nb.js +1 -1
  48. package/build/translations/ne.js +1 -1
  49. package/build/translations/nl.js +1 -1
  50. package/build/translations/no.js +1 -1
  51. package/build/translations/oc.js +1 -1
  52. package/build/translations/pl.js +1 -1
  53. package/build/translations/pt-br.js +1 -1
  54. package/build/translations/pt.js +1 -1
  55. package/build/translations/ro.js +1 -1
  56. package/build/translations/ru.js +1 -1
  57. package/build/translations/si.js +1 -1
  58. package/build/translations/sk.js +1 -1
  59. package/build/translations/sl.js +1 -1
  60. package/build/translations/sq.js +1 -1
  61. package/build/translations/sr-latn.js +1 -1
  62. package/build/translations/sr.js +1 -1
  63. package/build/translations/sv.js +1 -1
  64. package/build/translations/th.js +1 -1
  65. package/build/translations/ti.js +1 -1
  66. package/build/translations/tk.js +1 -1
  67. package/build/translations/tr.js +1 -1
  68. package/build/translations/tt.js +1 -1
  69. package/build/translations/ug.js +1 -1
  70. package/build/translations/uk.js +1 -1
  71. package/build/translations/ur.js +1 -1
  72. package/build/translations/uz.js +1 -1
  73. package/build/translations/vi.js +1 -1
  74. package/build/translations/zh-cn.js +1 -1
  75. package/build/translations/zh.js +1 -1
  76. package/ckeditor5-metadata.json +24 -3
  77. package/dist/index-content.css +0 -1
  78. package/dist/index-editor.css +2742 -0
  79. package/dist/index.css +3141 -0
  80. package/dist/index.js +4 -2
  81. package/dist/translations/af.js +1 -1
  82. package/dist/translations/af.umd.js +1 -1
  83. package/dist/translations/ar.js +1 -1
  84. package/dist/translations/ar.umd.js +1 -1
  85. package/dist/translations/ast.js +1 -1
  86. package/dist/translations/ast.umd.js +1 -1
  87. package/dist/translations/az.js +1 -1
  88. package/dist/translations/az.umd.js +1 -1
  89. package/dist/translations/be.js +1 -1
  90. package/dist/translations/be.umd.js +1 -1
  91. package/dist/translations/bg.js +1 -1
  92. package/dist/translations/bg.umd.js +1 -1
  93. package/dist/translations/bn.js +1 -1
  94. package/dist/translations/bn.umd.js +1 -1
  95. package/dist/translations/bs.js +1 -1
  96. package/dist/translations/bs.umd.js +1 -1
  97. package/dist/translations/ca.js +1 -1
  98. package/dist/translations/ca.umd.js +1 -1
  99. package/dist/translations/cs.js +1 -1
  100. package/dist/translations/cs.umd.js +1 -1
  101. package/dist/translations/da.js +1 -1
  102. package/dist/translations/da.umd.js +1 -1
  103. package/dist/translations/de-ch.js +1 -1
  104. package/dist/translations/de-ch.umd.js +1 -1
  105. package/dist/translations/de.js +1 -1
  106. package/dist/translations/de.umd.js +1 -1
  107. package/dist/translations/el.js +1 -1
  108. package/dist/translations/el.umd.js +1 -1
  109. package/dist/translations/en-au.js +1 -1
  110. package/dist/translations/en-au.umd.js +1 -1
  111. package/dist/translations/en-gb.js +1 -1
  112. package/dist/translations/en-gb.umd.js +1 -1
  113. package/dist/translations/en.js +1 -1
  114. package/dist/translations/en.umd.js +1 -1
  115. package/dist/translations/eo.js +1 -1
  116. package/dist/translations/eo.umd.js +1 -1
  117. package/dist/translations/es-co.js +1 -1
  118. package/dist/translations/es-co.umd.js +1 -1
  119. package/dist/translations/es.js +1 -1
  120. package/dist/translations/es.umd.js +1 -1
  121. package/dist/translations/et.js +1 -1
  122. package/dist/translations/et.umd.js +1 -1
  123. package/dist/translations/eu.js +1 -1
  124. package/dist/translations/eu.umd.js +1 -1
  125. package/dist/translations/fa.js +1 -1
  126. package/dist/translations/fa.umd.js +1 -1
  127. package/dist/translations/fi.js +1 -1
  128. package/dist/translations/fi.umd.js +1 -1
  129. package/dist/translations/fr.js +1 -1
  130. package/dist/translations/fr.umd.js +1 -1
  131. package/dist/translations/gl.js +1 -1
  132. package/dist/translations/gl.umd.js +1 -1
  133. package/dist/translations/gu.js +1 -1
  134. package/dist/translations/gu.umd.js +1 -1
  135. package/dist/translations/he.js +1 -1
  136. package/dist/translations/he.umd.js +1 -1
  137. package/dist/translations/hi.js +1 -1
  138. package/dist/translations/hi.umd.js +1 -1
  139. package/dist/translations/hr.js +1 -1
  140. package/dist/translations/hr.umd.js +1 -1
  141. package/dist/translations/hu.js +1 -1
  142. package/dist/translations/hu.umd.js +1 -1
  143. package/dist/translations/hy.js +1 -1
  144. package/dist/translations/hy.umd.js +1 -1
  145. package/dist/translations/id.js +1 -1
  146. package/dist/translations/id.umd.js +1 -1
  147. package/dist/translations/it.js +1 -1
  148. package/dist/translations/it.umd.js +1 -1
  149. package/dist/translations/ja.js +1 -1
  150. package/dist/translations/ja.umd.js +1 -1
  151. package/dist/translations/jv.js +1 -1
  152. package/dist/translations/jv.umd.js +1 -1
  153. package/dist/translations/kk.js +1 -1
  154. package/dist/translations/kk.umd.js +1 -1
  155. package/dist/translations/km.js +1 -1
  156. package/dist/translations/km.umd.js +1 -1
  157. package/dist/translations/kn.js +1 -1
  158. package/dist/translations/kn.umd.js +1 -1
  159. package/dist/translations/ko.js +1 -1
  160. package/dist/translations/ko.umd.js +1 -1
  161. package/dist/translations/ku.js +1 -1
  162. package/dist/translations/ku.umd.js +1 -1
  163. package/dist/translations/lt.js +1 -1
  164. package/dist/translations/lt.umd.js +1 -1
  165. package/dist/translations/lv.js +1 -1
  166. package/dist/translations/lv.umd.js +1 -1
  167. package/dist/translations/ms.js +1 -1
  168. package/dist/translations/ms.umd.js +1 -1
  169. package/dist/translations/nb.js +1 -1
  170. package/dist/translations/nb.umd.js +1 -1
  171. package/dist/translations/ne.js +1 -1
  172. package/dist/translations/ne.umd.js +1 -1
  173. package/dist/translations/nl.js +1 -1
  174. package/dist/translations/nl.umd.js +1 -1
  175. package/dist/translations/no.js +1 -1
  176. package/dist/translations/no.umd.js +1 -1
  177. package/dist/translations/oc.js +1 -1
  178. package/dist/translations/oc.umd.js +1 -1
  179. package/dist/translations/pl.js +1 -1
  180. package/dist/translations/pl.umd.js +1 -1
  181. package/dist/translations/pt-br.js +1 -1
  182. package/dist/translations/pt-br.umd.js +1 -1
  183. package/dist/translations/pt.js +1 -1
  184. package/dist/translations/pt.umd.js +1 -1
  185. package/dist/translations/ro.js +1 -1
  186. package/dist/translations/ro.umd.js +1 -1
  187. package/dist/translations/ru.js +1 -1
  188. package/dist/translations/ru.umd.js +1 -1
  189. package/dist/translations/si.js +1 -1
  190. package/dist/translations/si.umd.js +1 -1
  191. package/dist/translations/sk.js +1 -1
  192. package/dist/translations/sk.umd.js +1 -1
  193. package/dist/translations/sl.js +1 -1
  194. package/dist/translations/sl.umd.js +1 -1
  195. package/dist/translations/sq.js +1 -1
  196. package/dist/translations/sq.umd.js +1 -1
  197. package/dist/translations/sr-latn.js +1 -1
  198. package/dist/translations/sr-latn.umd.js +1 -1
  199. package/dist/translations/sr.js +1 -1
  200. package/dist/translations/sr.umd.js +1 -1
  201. package/dist/translations/sv.js +1 -1
  202. package/dist/translations/sv.umd.js +1 -1
  203. package/dist/translations/th.js +1 -1
  204. package/dist/translations/th.umd.js +1 -1
  205. package/dist/translations/ti.js +1 -1
  206. package/dist/translations/ti.umd.js +1 -1
  207. package/dist/translations/tk.js +1 -1
  208. package/dist/translations/tk.umd.js +1 -1
  209. package/dist/translations/tr.js +1 -1
  210. package/dist/translations/tr.umd.js +1 -1
  211. package/dist/translations/tt.js +1 -1
  212. package/dist/translations/tt.umd.js +1 -1
  213. package/dist/translations/ug.js +1 -1
  214. package/dist/translations/ug.umd.js +1 -1
  215. package/dist/translations/uk.js +1 -1
  216. package/dist/translations/uk.umd.js +1 -1
  217. package/dist/translations/ur.js +1 -1
  218. package/dist/translations/ur.umd.js +1 -1
  219. package/dist/translations/uz.js +1 -1
  220. package/dist/translations/uz.umd.js +1 -1
  221. package/dist/translations/vi.js +1 -1
  222. package/dist/translations/vi.umd.js +1 -1
  223. package/dist/translations/zh-cn.js +1 -1
  224. package/dist/translations/zh-cn.umd.js +1 -1
  225. package/dist/translations/zh.js +1 -1
  226. package/dist/translations/zh.umd.js +1 -1
  227. package/lang/contexts.json +163 -1
  228. package/lang/translations/af.po +612 -0
  229. package/lang/translations/ar.po +628 -0
  230. package/lang/translations/ast.po +612 -0
  231. package/lang/translations/az.po +612 -0
  232. package/lang/translations/be.po +616 -0
  233. package/lang/translations/bg.po +612 -0
  234. package/lang/translations/bn.po +612 -0
  235. package/lang/translations/bs.po +616 -0
  236. package/lang/translations/ca.po +612 -0
  237. package/lang/translations/cs.po +616 -0
  238. package/lang/translations/da.po +612 -0
  239. package/lang/translations/de-ch.po +612 -0
  240. package/lang/translations/de.po +612 -0
  241. package/lang/translations/el.po +612 -0
  242. package/lang/translations/en-au.po +612 -0
  243. package/lang/translations/en-gb.po +612 -0
  244. package/lang/translations/en.po +612 -0
  245. package/lang/translations/eo.po +612 -0
  246. package/lang/translations/es-co.po +612 -0
  247. package/lang/translations/es.po +612 -0
  248. package/lang/translations/et.po +612 -0
  249. package/lang/translations/eu.po +612 -0
  250. package/lang/translations/fa.po +608 -0
  251. package/lang/translations/fi.po +612 -0
  252. package/lang/translations/fr.po +612 -0
  253. package/lang/translations/gl.po +612 -0
  254. package/lang/translations/gu.po +612 -0
  255. package/lang/translations/he.po +612 -0
  256. package/lang/translations/hi.po +612 -0
  257. package/lang/translations/hr.po +616 -0
  258. package/lang/translations/hu.po +612 -0
  259. package/lang/translations/hy.po +612 -0
  260. package/lang/translations/id.po +608 -0
  261. package/lang/translations/it.po +612 -0
  262. package/lang/translations/ja.po +608 -0
  263. package/lang/translations/jv.po +612 -0
  264. package/lang/translations/kk.po +612 -0
  265. package/lang/translations/km.po +608 -0
  266. package/lang/translations/kn.po +612 -0
  267. package/lang/translations/ko.po +608 -0
  268. package/lang/translations/ku.po +612 -0
  269. package/lang/translations/lt.po +616 -0
  270. package/lang/translations/lv.po +616 -0
  271. package/lang/translations/ms.po +608 -0
  272. package/lang/translations/nb.po +612 -0
  273. package/lang/translations/ne.po +612 -0
  274. package/lang/translations/nl.po +612 -0
  275. package/lang/translations/no.po +612 -0
  276. package/lang/translations/oc.po +612 -0
  277. package/lang/translations/pl.po +616 -0
  278. package/lang/translations/pt-br.po +612 -0
  279. package/lang/translations/pt.po +612 -0
  280. package/lang/translations/ro.po +616 -0
  281. package/lang/translations/ru.po +616 -0
  282. package/lang/translations/si.po +612 -0
  283. package/lang/translations/sk.po +616 -0
  284. package/lang/translations/sl.po +620 -0
  285. package/lang/translations/sq.po +612 -0
  286. package/lang/translations/sr-latn.po +616 -0
  287. package/lang/translations/sr.po +616 -0
  288. package/lang/translations/sv.po +612 -0
  289. package/lang/translations/th.po +608 -0
  290. package/lang/translations/ti.po +612 -0
  291. package/lang/translations/tk.po +612 -0
  292. package/lang/translations/tr.po +612 -0
  293. package/lang/translations/tt.po +608 -0
  294. package/lang/translations/ug.po +608 -0
  295. package/lang/translations/uk.po +616 -0
  296. package/lang/translations/ur.po +612 -0
  297. package/lang/translations/uz.po +612 -0
  298. package/lang/translations/vi.po +608 -0
  299. package/lang/translations/zh-cn.po +608 -0
  300. package/lang/translations/zh.po +608 -0
  301. package/package.json +23 -11
  302. package/src/aiactions/aiactions.d.ts +48 -0
  303. package/src/aiactions/aiactions.js +23 -0
  304. package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
  305. package/src/aiactions/model/aiactionsinteraction.js +23 -0
  306. package/src/aiactions/model/aiactionsreply.d.ts +15 -0
  307. package/src/aiactions/model/aiactionsreply.js +23 -0
  308. package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
  309. package/src/aiassistant/adapters/aiadapter.js +23 -0
  310. package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
  311. package/src/aiassistant/adapters/aitextadapter.js +23 -0
  312. package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
  313. package/src/aiassistant/adapters/awstextadapter.js +23 -0
  314. package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
  315. package/src/aiassistant/adapters/openaitextadapter.js +23 -0
  316. package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
  317. package/src/aiassistant/aiassistant.js +23 -0
  318. package/src/aiassistant/aiassistantediting.js +23 -0
  319. package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
  320. package/src/aiassistant/aiassistantui.js +23 -0
  321. package/src/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
  322. package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
  323. package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
  324. package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
  325. package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
  326. package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
  327. package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
  328. package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
  329. package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
  330. package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
  331. package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
  332. package/src/aiassistant/ui/form/aiformview.js +23 -0
  333. package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
  334. package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
  335. package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
  336. package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
  337. package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
  338. package/src/aiassistant/ui/form/prompthistory.js +23 -0
  339. package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
  340. package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
  341. package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
  342. package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
  343. package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
  344. package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
  345. package/src/aiballoon/aiballoon.d.ts +72 -0
  346. package/src/aiballoon/aiballoon.js +23 -0
  347. package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
  348. package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
  349. package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
  350. package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
  351. package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
  352. package/src/aiballoon/ui/aiballoonview.js +23 -0
  353. package/src/aichat/aichat.d.ts +79 -0
  354. package/src/aichat/aichat.js +23 -0
  355. package/src/aichat/aichatcontroller.d.ts +68 -0
  356. package/src/aichat/aichatcontroller.js +23 -0
  357. package/src/aichat/aichatui.d.ts +297 -0
  358. package/src/aichat/aichatui.js +23 -0
  359. package/src/aichat/model/aichatcontext.d.ts +360 -0
  360. package/src/aichat/model/aichatcontext.js +23 -0
  361. package/src/aichat/model/aichatconversation.d.ts +270 -0
  362. package/src/aichat/model/aichatconversation.js +23 -0
  363. package/src/aichat/model/aichatinteraction.d.ts +46 -0
  364. package/src/aichat/model/aichatinteraction.js +23 -0
  365. package/src/aichat/model/aichatmodels.d.ts +77 -0
  366. package/src/aichat/model/aichatmodels.js +23 -0
  367. package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
  368. package/src/aichat/ui/aichatcontrolsview.js +23 -0
  369. package/src/aichat/ui/aichatfeedview.d.ts +114 -0
  370. package/src/aichat/ui/aichatfeedview.js +23 -0
  371. package/src/aichat/ui/aichatheaderview.d.ts +29 -0
  372. package/src/aichat/ui/aichatheaderview.js +23 -0
  373. package/src/aichat/ui/aichatview.d.ts +37 -0
  374. package/src/aichat/ui/aichatview.js +23 -0
  375. package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
  376. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
  377. package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
  378. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
  379. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
  380. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
  381. package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
  382. package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
  383. package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
  384. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
  385. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
  386. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
  387. package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
  388. package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
  389. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
  390. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
  391. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
  392. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
  393. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
  394. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
  395. package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
  396. package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
  397. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
  398. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
  399. package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
  400. package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
  401. package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
  402. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
  403. package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
  404. package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
  405. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
  406. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
  407. package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
  408. package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
  409. package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
  410. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
  411. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
  412. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
  413. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
  414. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
  415. package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
  416. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
  417. package/src/aichat/utils/eventnames.d.ts +5 -0
  418. package/src/aichat/utils/eventnames.js +23 -0
  419. package/src/aichat/utils/promisequeue.d.ts +32 -0
  420. package/src/aichat/utils/promisequeue.js +23 -0
  421. package/src/aichat/utils/scrollmanager.d.ts +23 -0
  422. package/src/aichat/utils/scrollmanager.js +23 -0
  423. package/src/aichathistory/aichathistory.d.ts +30 -0
  424. package/src/aichathistory/aichathistory.js +23 -0
  425. package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
  426. package/src/aichathistory/aichathistorycontroller.js +23 -0
  427. package/src/aichathistory/aichathistoryui.d.ts +112 -0
  428. package/src/aichathistory/aichathistoryui.js +23 -0
  429. package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
  430. package/src/aichathistory/model/aichathistoryconversations.js +23 -0
  431. package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
  432. package/src/aichathistory/model/aichathistoryitem.js +23 -0
  433. package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
  434. package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
  435. package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
  436. package/src/aichathistory/ui/aichathistorylistview.js +23 -0
  437. package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
  438. package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
  439. package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
  440. package/src/aichathistory/ui/aichathistoryview.js +23 -0
  441. package/src/aiconfig.d.ts +92 -30
  442. package/src/aicore/aiconnector.d.ts +302 -0
  443. package/src/aicore/aiconnector.js +23 -0
  444. package/src/aicore/aiediting.d.ts +61 -0
  445. package/src/aicore/aiediting.js +23 -0
  446. package/src/aicore/model/aicapabilities.d.ts +55 -0
  447. package/src/aicore/model/aicapabilities.js +23 -0
  448. package/src/aicore/model/aicontext.d.ts +53 -0
  449. package/src/aicore/model/aicontext.js +23 -0
  450. package/src/aicore/model/aiinteraction.d.ts +135 -0
  451. package/src/aicore/model/aiinteraction.js +23 -0
  452. package/src/aicore/model/aireply.d.ts +178 -0
  453. package/src/aicore/model/aireply.js +23 -0
  454. package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
  455. package/src/aicore/pipeline/airesponseapplier.js +24 -0
  456. package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
  457. package/src/aicore/pipeline/airesponseparser.js +24 -0
  458. package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
  459. package/src/aicore/ui/aidisclaimerview.js +23 -0
  460. package/src/aicore/ui/aiskeleton.d.ts +37 -0
  461. package/src/aicore/ui/aiskeleton.js +23 -0
  462. package/src/aicore/ui/aispinner.d.ts +14 -0
  463. package/src/aicore/ui/aispinner.js +23 -0
  464. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
  465. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
  466. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
  467. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
  468. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
  469. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
  470. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
  471. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
  472. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
  473. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
  474. package/src/aicore/utils/common-translations.d.ts +9 -0
  475. package/src/aicore/utils/common-translations.js +23 -0
  476. package/src/aicore/utils/createresizebutton.d.ts +12 -0
  477. package/src/aicore/utils/createresizebutton.js +23 -0
  478. package/src/aicore/utils/documentposition.d.ts +41 -0
  479. package/src/aicore/utils/documentposition.js +23 -0
  480. package/src/aicore/utils/documentrange.d.ts +46 -0
  481. package/src/aicore/utils/documentrange.js +23 -0
  482. package/src/aicore/utils/eventnames.d.ts +9 -0
  483. package/src/aicore/utils/eventnames.js +23 -0
  484. package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
  485. package/src/aicore/utils/geteditorfromcontext.js +23 -0
  486. package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
  487. package/src/aicore/utils/getoperationsfromreply.js +23 -0
  488. package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
  489. package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
  490. package/src/aicore/utils/htmlparser.d.ts +35 -0
  491. package/src/aicore/utils/htmlparser.js +23 -0
  492. package/src/aicore/utils/htmlstreamer.d.ts +123 -0
  493. package/src/aicore/utils/htmlstreamer.js +23 -0
  494. package/src/aiquickactions/aiquickactions.d.ts +41 -0
  495. package/src/aiquickactions/aiquickactions.js +23 -0
  496. package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
  497. package/src/aiquickactions/aiquickactionscommand.js +23 -0
  498. package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
  499. package/src/aiquickactions/aiquickactionsediting.js +23 -0
  500. package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
  501. package/src/aiquickactions/aiquickactionsui.js +23 -0
  502. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
  503. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
  504. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
  505. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
  506. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
  507. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
  508. package/src/aiquickactions/utils/common-translations.d.ts +9 -0
  509. package/src/aiquickactions/utils/common-translations.js +23 -0
  510. package/src/aireviewmode/aireviewmode.d.ts +30 -0
  511. package/src/aireviewmode/aireviewmode.js +23 -0
  512. package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
  513. package/src/aireviewmode/aireviewmodecontroller.js +23 -0
  514. package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
  515. package/src/aireviewmode/aireviewmodeediting.js +23 -0
  516. package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
  517. package/src/aireviewmode/aireviewmodeui.js +23 -0
  518. package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
  519. package/src/aireviewmode/model/aireviewcheck.js +23 -0
  520. package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
  521. package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
  522. package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
  523. package/src/aireviewmode/model/aireviewchecklist.js +23 -0
  524. package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
  525. package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
  526. package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
  527. package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
  528. package/src/aireviewmode/model/aireviewcheckrun.d.ts +102 -0
  529. package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
  530. package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
  531. package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
  532. package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
  533. package/src/aireviewmode/model/aireviewmodels.js +23 -0
  534. package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
  535. package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
  536. package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
  537. package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
  538. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
  539. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
  540. package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +23 -0
  541. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
  542. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
  543. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
  544. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
  545. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
  546. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
  547. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
  548. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
  549. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
  550. package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
  551. package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
  552. package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
  553. package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
  554. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
  555. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
  556. package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
  557. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
  558. package/src/aireviewmode/utils/common-translations.d.ts +9 -0
  559. package/src/aireviewmode/utils/common-translations.js +23 -0
  560. package/src/aitabs/aitabs.d.ts +92 -0
  561. package/src/aitabs/aitabs.js +23 -0
  562. package/src/aitabs/aitabsmainview.d.ts +45 -0
  563. package/src/aitabs/aitabsmainview.js +23 -0
  564. package/src/aitabs/tabs/aitabsview.d.ts +147 -0
  565. package/src/aitabs/tabs/aitabsview.js +23 -0
  566. package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
  567. package/src/aitabs/tabs/tabbuttonview.js +23 -0
  568. package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
  569. package/src/aitabs/tabs/tabpanelview.js +23 -0
  570. package/src/augmentation.d.ts +22 -6
  571. package/src/index.d.ts +40 -9
  572. package/src/index.js +1 -1
  573. package/theme/aiballoon/aiballoon.css +207 -0
  574. package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
  575. package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
  576. package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
  577. package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
  578. package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
  579. package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
  580. package/theme/aichat/aichat-controls/prompt-input.css +55 -0
  581. package/theme/aichat/aichat-controls.css +154 -0
  582. package/theme/aichat/aichat.css +68 -0
  583. package/theme/aichat/aichatfeed.css +376 -0
  584. package/theme/aichat/aichathistory.css +235 -0
  585. package/theme/aichat/aiminitoolbar.css +94 -0
  586. package/theme/aichat/aisuggestioncontainer.css +203 -0
  587. package/theme/aiquickactions/aiquickactions.css +43 -0
  588. package/theme/aireviewmode/aireviewmode-check-list.css +255 -0
  589. package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
  590. package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
  591. package/theme/aireviewmode/aireviewmode.css +73 -0
  592. package/theme/aitabs/aitabsview.css +64 -0
  593. package/theme/aitabs/tabs/tabbuttonview.css +74 -0
  594. package/theme/aitabs/tabs/tabsview.css +78 -0
  595. package/theme/common/aibutton.css +145 -0
  596. package/theme/common/aichaterror.css +61 -0
  597. package/theme/common/aidisclaimer.css +29 -0
  598. package/theme/common/aiheader.css +88 -0
  599. package/theme/common/aiskeleton.css +54 -0
  600. package/theme/common/aispinner.css +58 -0
  601. package/src/adapters/aiadapter.js +0 -23
  602. package/src/adapters/aitextadapter.js +0 -23
  603. package/src/adapters/awstextadapter.js +0 -23
  604. package/src/adapters/openaitextadapter.js +0 -23
  605. package/src/aiassistant.js +0 -23
  606. package/src/aiassistantediting.js +0 -23
  607. package/src/aiassistantui.js +0 -23
  608. package/src/ui/aiassistantcontroller.js +0 -24
  609. package/src/ui/form/aiformcontentarea.js +0 -23
  610. package/src/ui/form/aiformerrorview.js +0 -23
  611. package/src/ui/form/aiformpromptview.js +0 -23
  612. package/src/ui/form/aiformtoolbarview.js +0 -23
  613. package/src/ui/form/aiformview.js +0 -23
  614. package/src/ui/form/aihistorylistitemview.js +0 -23
  615. package/src/ui/form/aihistorylistview.js +0 -23
  616. package/src/ui/form/prompthistory.js +0 -23
  617. package/src/ui/showaiassistantcommand.js +0 -23
  618. /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
  619. /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
  620. /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
  621. /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
  622. /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
  623. /package/theme/{ai.css → aiassistant/ai.css} +0 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module ai/aicore/aiediting
7
+ * @publicApi
8
+ */
9
+ import { type ModelRange, type ViewDocumentFragment, type ModelDocumentFragment } from 'ckeditor5/src/engine.js';
10
+ import { ContextPlugin } from 'ckeditor5/src/core.js';
11
+ export declare const AI_VISUAL_SELECTION_MARKER_NAME = "ai-selection";
12
+ export declare class AIEditing extends ContextPlugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "AIEditing";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get isOfficialPlugin(): true;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get isPremiumPlugin(): true;
25
+ /**
26
+ * Gets the current session ID. If RTC plugin is available, uses its sessionId.
27
+ * Otherwise, generates a random ID for the current (non-RTC) session.
28
+ */
29
+ get sessionId(): string;
30
+ /**
31
+ * Returns the data and version of the current document.
32
+ */
33
+ getDocumentData(): {
34
+ content: string;
35
+ version: number;
36
+ sessionId: string;
37
+ selections: Array<{
38
+ markerName: string;
39
+ start: number;
40
+ end: number;
41
+ htmlFragment: string;
42
+ }>;
43
+ };
44
+ afterInit(): Promise<void>;
45
+ /**
46
+ * Displays a fake visual selection on given ranges.
47
+ *
48
+ * Since multiple features may want to show and hide the selection, while at the same time, only one fake selection should be shown,
49
+ * it is necessary to provide an `id` when showing fake selection. Then, when the fake selection should be hidden, `id` must be
50
+ * passed as well. This mechanism prevents a feature from mistakenly hiding a fake selection set by another feature.
51
+ */
52
+ showFakeVisualSelection(ranges: Array<ModelRange>, id: string, lock?: boolean, force?: boolean): boolean;
53
+ /**
54
+ * Removes a fake visual selection from the document.
55
+ *
56
+ * The passed `id` should be the same as the one used when {@link module:ai/aicore/aiediting~AIEditing#showFakeVisualSelection} was
57
+ * called. This mechanism prevents a feature from mistakenly hiding a fake selection set by another feature.
58
+ */
59
+ hideFakeVisualSelection(id: string): boolean;
60
+ modelToViewWithIds(modelFragment: ModelDocumentFragment): ViewDocumentFragment;
61
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x1172e5=_0x3983;(function(_0x47b02b,_0x2c6441){const _0xc93d1c=_0x3983,_0x30a30d=_0x47b02b();while(!![]){try{const _0x2ed04f=parseInt(_0xc93d1c(0x150))/0x1*(-parseInt(_0xc93d1c(0x10a))/0x2)+parseInt(_0xc93d1c(0xf4))/0x3+-parseInt(_0xc93d1c(0x146))/0x4+parseInt(_0xc93d1c(0x11a))/0x5*(-parseInt(_0xc93d1c(0x102))/0x6)+-parseInt(_0xc93d1c(0xe7))/0x7*(-parseInt(_0xc93d1c(0x13b))/0x8)+parseInt(_0xc93d1c(0xea))/0x9*(-parseInt(_0xc93d1c(0x12c))/0xa)+parseInt(_0xc93d1c(0xf7))/0xb;if(_0x2ed04f===_0x2c6441)break;else _0x30a30d['push'](_0x30a30d['shift']());}catch(_0x1044d0){_0x30a30d['push'](_0x30a30d['shift']());}}}(_0x2916,0x459f6));import{ViewDowncastWriter as _0x39e183}from'ckeditor5/src/engine.js';import{ContextPlugin as _0x10beb9,Editor as _0x46c0e7}from'ckeditor5/src/core.js';function _0x2916(){const _0x3265dd=['2000384edgBop','markerName','isOfficialPlugin','schema','sort','createRange','markerToElement','convertAiChatSelectionMarker','has','from','1438XIKNFX','14rQmAsb','trim',':start>','11862hEvPZw','ck-fake-ai-selection','getDocumentData','selection','indexOf','_displayedFakeSelectionLocked','removeMarker','sessionId','_setDataIdsOnChildren','createUIElement','171300TWytWk','toData','isBefore','16095453NhtMOp','_getMarkersInDocumentOrder','setAttribute','substring','showFakeVisualSelection','modelToViewWithIds','_nextDataId','getSelection','$textProxy','ai-selection:','removeAllRanges','786ucFFRZ','document','ai-selection','add','plugins','isPremiumPlugin','editors','floor','604QpSPTh','listenTo','markerToHighlight','RealTimeCollaborationClient','isOpening','version','isContent','fromCharCode','createRangeIn','getSelectionText',':end>',':start></','addMarker','toView','length','join','12435hZPCyo','getRoot','pluginName','get','_sessionId','isAfter','containerElement','ready','afterInit','editing','getLastMatchingPosition','getChildren','element','markers','getStart','AIEditing',':end></','for','20GNOxAV','context','start','isAtEnd','data','view','random','model','processor','conversion','push','editingDowncast','data-id','dataDowncast','end','110624agoAfx','_displayedFakeSelectionId','hideFakeVisualSelection','ck-ai-assistant-ui_theme','getWalker','emptyElement','change','name','getMarkersGroup','_integrateEditor','getSelectedContent'];_0x2916=function(){return _0x3265dd;};return _0x2916();}import{uid as _0x29e5c6}from'ckeditor5/src/utils.js';import{getEditorFromContext as _0x26d4bd}from'./utils/geteditorfromcontext.js';function _0x3983(_0x138c0b,_0x16683f){const _0x2916c5=_0x2916();return _0x3983=function(_0x3983cd,_0x167cfe){_0x3983cd=_0x3983cd-0xe7;let _0x42c7af=_0x2916c5[_0x3983cd];return _0x42c7af;},_0x3983(_0x138c0b,_0x16683f);}export const AI_VISUAL_SELECTION_MARKER_NAME=_0x1172e5(0x104);export class AIEditing extends _0x10beb9{[_0x1172e5(0x13c)]=null;[_0x1172e5(0xef)]=!0x1;[_0x1172e5(0x11e)];static get[_0x1172e5(0x11c)](){const _0x14e814=_0x1172e5;return _0x14e814(0x129);}static get[_0x1172e5(0x148)](){return!0x0;}static get[_0x1172e5(0x107)](){return!0x0;}get[_0x1172e5(0xf1)](){const _0x281366=_0x1172e5;if(!this[_0x281366(0x11e)]){const _0x9c7ee5=_0x26d4bd(this[_0x281366(0x12d)]),_0x5dbbba=_0x9c7ee5[_0x281366(0x106)][_0x281366(0x14e)](_0x281366(0x10d))&&_0x9c7ee5[_0x281366(0x106)][_0x281366(0x11d)](_0x281366(0x10d))[_0x281366(0xf1)];this[_0x281366(0x11e)]=_0x5dbbba||_0x29e5c6();}return this[_0x281366(0x11e)];}[_0x1172e5(0xec)](){const _0x333e5c=_0x1172e5,_0x3fba5e=_0x26d4bd(this[_0x333e5c(0x12d)]),_0x4f6ac6=_0x3fba5e[_0x333e5c(0x133)],_0x15df52=_0x3fba5e[_0x333e5c(0x130)][_0x333e5c(0x117)](_0x4f6ac6[_0x333e5c(0x103)][_0x333e5c(0x11b)](),{'convertAiChatSelectionMarker':!0x0}),_0x3e9a35=new _0x39e183(_0x3fba5e[_0x333e5c(0x123)][_0x333e5c(0x131)][_0x333e5c(0x103)]);this[_0x333e5c(0xf2)](_0x15df52,_0x3e9a35);let _0x2a52ab=_0x3fba5e[_0x333e5c(0x130)][_0x333e5c(0x134)][_0x333e5c(0xf5)](_0x15df52);const _0x288b7b=this[_0x333e5c(0xf8)](),_0x207860=[];for(const _0x46c9e8 of _0x288b7b){const _0x25c3ea='<'+_0x46c9e8[_0x333e5c(0x142)]+_0x333e5c(0x115)+_0x46c9e8[_0x333e5c(0x142)]+_0x333e5c(0xe9),_0x1b4b6b=_0x2a52ab[_0x333e5c(0xee)](_0x25c3ea);_0x2a52ab=_0x2a52ab[_0x333e5c(0xfa)](0x0,_0x1b4b6b)+_0x2a52ab[_0x333e5c(0xfa)](_0x1b4b6b+_0x25c3ea[_0x333e5c(0x118)]);const _0xd7c3c4='<'+_0x46c9e8[_0x333e5c(0x142)]+_0x333e5c(0x12a)+_0x46c9e8[_0x333e5c(0x142)]+_0x333e5c(0x114),_0xf741d3=_0x2a52ab[_0x333e5c(0xee)](_0xd7c3c4);_0x2a52ab=_0x2a52ab[_0x333e5c(0xfa)](0x0,_0xf741d3)+_0x2a52ab[_0x333e5c(0xfa)](_0xf741d3+_0xd7c3c4[_0x333e5c(0x118)]),_0x207860[_0x333e5c(0x136)]({'markerName':_0x46c9e8[_0x333e5c(0x142)],'start':_0x1b4b6b,'end':_0xf741d3,'htmlFragment':_0x2a52ab[_0x333e5c(0xfa)](_0x1b4b6b,_0xf741d3)});}return{'content':_0x2a52ab,'version':_0x3fba5e[_0x333e5c(0x133)][_0x333e5c(0x103)][_0x333e5c(0x10f)],'sessionId':this[_0x333e5c(0xf1)],'selections':_0x207860};}async[_0x1172e5(0x122)](){const _0x30d8f3=_0x1172e5;this[_0x30d8f3(0x12d)]instanceof _0x46c0e7?this[_0x30d8f3(0x144)](this[_0x30d8f3(0x12d)]):this[_0x30d8f3(0x10b)](this[_0x30d8f3(0x12d)][_0x30d8f3(0x108)],_0x30d8f3(0x105),(_0xde9691,_0x55b701)=>{const _0x54561f=_0x30d8f3;_0x55b701['on'](_0x54561f(0x121),()=>{const _0x20cd60=_0x54561f;this[_0x20cd60(0x144)](_0x55b701);});});}[_0x1172e5(0x144)](_0x2a5c46){const _0x6e71c=_0x1172e5;_0x2a5c46[_0x6e71c(0x135)][_0x6e71c(0x12b)](_0x6e71c(0x137))[_0x6e71c(0x10c)]({'model':_0x6e71c(0x104),'view':{'classes':[_0x6e71c(0xeb),_0x6e71c(0x13e)],'priority':0xc}}),_0x2a5c46[_0x6e71c(0x135)][_0x6e71c(0x12b)](_0x6e71c(0x139))[_0x6e71c(0x14c)]({'model':_0x6e71c(0x104),'view':(_0xd97837,{writer:_0x42e1dc,options:_0x3d6f5b})=>_0x3d6f5b[_0x6e71c(0x14d)]?_0x42e1dc[_0x6e71c(0xf3)](_0xd97837[_0x6e71c(0x147)]+':'+(_0xd97837[_0x6e71c(0x10e)]?_0x6e71c(0x12e):_0x6e71c(0x13a))):null});}[_0x1172e5(0xfb)](_0x3992da,_0x9bbf55,_0x9b4da2=!0x1,_0x4f1150=!0x1){const _0x2dc727=_0x1172e5;if(this[_0x2dc727(0xef)]&&!_0x4f1150)return!0x1;this[_0x2dc727(0x13c)]&&this[_0x2dc727(0x13d)](this[_0x2dc727(0x13c)]),this[_0x2dc727(0x13c)]=_0x9bbf55,this[_0x2dc727(0xef)]=_0x9b4da2;const _0x36963f=_0x26d4bd(this[_0x2dc727(0x12d)])[_0x2dc727(0x133)];return _0x36963f[_0x2dc727(0x141)](_0x3f452a=>{const _0x791914=_0x2dc727;let _0xc7d2fc=0x0;for(let _0x2b23f5 of _0x3992da){const _0x1f1f50=_0x791914(0x100)+_0xc7d2fc;if(_0x2b23f5[_0x791914(0x12e)][_0x791914(0x12f)]){const _0x21d34d=_0x2b23f5[_0x791914(0x12e)][_0x791914(0x124)](({item:_0x17b293})=>!_0x36963f[_0x791914(0x149)][_0x791914(0x110)](_0x17b293),{'boundaries':_0x2b23f5});_0x2b23f5=_0x3f452a[_0x791914(0x14b)](_0x21d34d,_0x2b23f5[_0x791914(0x13a)]);}_0x3f452a[_0x791914(0x116)](_0x1f1f50,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2b23f5}),_0xc7d2fc++;}}),window[_0x2dc727(0xfe)]()?.[_0x2dc727(0x101)](),!0x0;}[_0x1172e5(0x13d)](_0xcf058e){const _0x3c33e0=_0x1172e5;if(this[_0x3c33e0(0x13c)]!=_0xcf058e)return!0x1;this[_0x3c33e0(0x13c)]=null,this[_0x3c33e0(0xef)]=!0x1;const _0x55b1b1=_0x26d4bd(this[_0x3c33e0(0x12d)]),_0x1c4f2f=_0x55b1b1[_0x3c33e0(0x133)][_0x3c33e0(0x127)][_0x3c33e0(0x143)](_0x3c33e0(0x104));return _0x55b1b1[_0x3c33e0(0x133)][_0x3c33e0(0x141)](_0x435de1=>{const _0x2fead1=_0x3c33e0;for(const _0x30567a of _0x1c4f2f)_0x435de1[_0x2fead1(0xf0)](_0x30567a);}),!0x0;}[_0x1172e5(0xfc)](_0x13e149){const _0x4ba8a3=_0x1172e5,_0x589462=_0x26d4bd(this[_0x4ba8a3(0x12d)]),_0x4ac45c=_0x589462[_0x4ba8a3(0x130)][_0x4ba8a3(0x117)](_0x13e149),_0x2127bf=new _0x39e183(_0x589462[_0x4ba8a3(0x123)][_0x4ba8a3(0x131)][_0x4ba8a3(0x103)]);return this[_0x4ba8a3(0xf2)](_0x4ac45c,_0x2127bf),_0x4ac45c;}[_0x1172e5(0xf2)](_0x495238,_0x4b33df){const _0x23a4cd=_0x1172e5;let _0x51a7c2=!0x1;const _0x106db1=new Set();for(const _0x5da77a of _0x495238[_0x23a4cd(0x125)]()){const _0x4b958f=_0x5da77a['is'](_0x23a4cd(0x140))||_0x5da77a['is'](_0x23a4cd(0x120));if(!_0x5da77a['is'](_0x23a4cd(0x126)))continue;(this[_0x23a4cd(0xf2)](_0x5da77a,_0x4b33df)||_0x4b958f)&&(_0x4b33df[_0x23a4cd(0xf9)](_0x23a4cd(0x138),this[_0x23a4cd(0xfd)](_0x106db1),_0x5da77a),_0x51a7c2=!0x0);}return _0x51a7c2;}[_0x1172e5(0xfd)](_0x1f005e){const _0x4aae0f=_0x1172e5;let _0x5033a0;do{_0x5033a0='';for(let _0x41ad6b=0x0;_0x41ad6b<0x4;_0x41ad6b++)_0x5033a0+=String[_0x4aae0f(0x111)](0x61+Math[_0x4aae0f(0x109)](0x1a*Math[_0x4aae0f(0x132)]()));}while(_0x1f005e[_0x4aae0f(0x14e)](_0x5033a0));return _0x1f005e[_0x4aae0f(0x105)](_0x5033a0),_0x5033a0;}[_0x1172e5(0x113)](){const _0x5c9690=_0x1172e5,{model:_0x165b83}=_0x26d4bd(this[_0x5c9690(0x12d)]),_0x20f211=_0x165b83[_0x5c9690(0x103)][_0x5c9690(0xed)],_0x4474f3=_0x165b83[_0x5c9690(0x145)](_0x20f211),_0x5dc108=[],_0x214668=_0x165b83[_0x5c9690(0x112)](_0x4474f3)[_0x5c9690(0x13f)]();for(const {item:_0x285c43}of _0x214668)_0x285c43['is'](_0x5c9690(0xff))?_0x5dc108[_0x5c9690(0x136)](_0x285c43[_0x5c9690(0x130)]):_0x285c43['is'](_0x5c9690(0x126))&&_0x5dc108[_0x5c9690(0x118)]>0x0&&'\x20'!==_0x5dc108[_0x5dc108[_0x5c9690(0x118)]-0x1]&&_0x5dc108[_0x5c9690(0x136)]('\x20');return'\x22'+_0x5dc108[_0x5c9690(0x119)]('')[_0x5c9690(0xe8)]()+'\x22';}[_0x1172e5(0xf8)](){const _0x3a2a60=_0x1172e5,_0x5a5b67=_0x26d4bd(this[_0x3a2a60(0x12d)])[_0x3a2a60(0x133)];return Array[_0x3a2a60(0x14f)](_0x5a5b67[_0x3a2a60(0x127)][_0x3a2a60(0x143)](_0x3a2a60(0x104)))[_0x3a2a60(0x14a)]((_0x5a4f79,_0x6dcc4d)=>_0x5a4f79[_0x3a2a60(0x128)]()[_0x3a2a60(0xf6)](_0x6dcc4d[_0x3a2a60(0x128)]())?-0x1:_0x5a4f79[_0x3a2a60(0x128)]()[_0x3a2a60(0x11f)](_0x6dcc4d[_0x3a2a60(0x128)]())?0x1:0x0);}}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ export declare const CAPABILITIES_MODEL_EVENT_NAMES: readonly ["capabilitiesUpdated"];
6
+ declare const AICapabilities_base: {
7
+ new (): import("ckeditor5/src/utils.js").Emitter;
8
+ prototype: import("ckeditor5/src/utils.js").Emitter;
9
+ };
10
+ /**
11
+ * Manages the AI capabilities configuration and state.
12
+ */
13
+ export declare class AICapabilities extends /* #__PURE__ */ AICapabilities_base {
14
+ constructor();
15
+ /**
16
+ * Initializes the capabilities.
17
+ */
18
+ init(): void;
19
+ /**
20
+ * Resets the capabilities configuration to default state.
21
+ */
22
+ reset(): void;
23
+ /**
24
+ * Returns the current capabilities configuration.
25
+ *
26
+ * @returns The current capabilities configuration.
27
+ */
28
+ getCapabilitiesConfig(): AICapabilitiesConfig;
29
+ /**
30
+ * Converts capabilities configuration to request data format for API endpoint.
31
+ * @returns The request data or undefined if no capabilities are enabled.
32
+ */
33
+ static getCapabilitiesRequestData(config: AICapabilitiesConfig | undefined): AICapabilitiesRequestData;
34
+ /**
35
+ * Toggles the web search enabled state.
36
+ */
37
+ toggleWebSearch(): void;
38
+ /**
39
+ * Toggles the reasoning enabled state.
40
+ */
41
+ toggleReasoning(): void;
42
+ }
43
+ export type AICapabilitiesUpdatedEvent = {
44
+ name: 'capabilitiesUpdated';
45
+ args: [AICapabilitiesConfig];
46
+ };
47
+ export type AICapabilitiesConfig = {
48
+ isWebSearchEnabled: boolean;
49
+ isReasoningEnabled: boolean;
50
+ };
51
+ export type AICapabilitiesRequestData = {
52
+ webSearch?: object;
53
+ reasoning?: object;
54
+ };
55
+ export {};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0xbdf3fe=_0x2c56;(function(_0x28917b,_0x1bb795){const _0x589d1b=_0x2c56,_0x588788=_0x28917b();while(!![]){try{const _0x4f06c4=parseInt(_0x589d1b(0x1f5))/0x1*(-parseInt(_0x589d1b(0x1ff))/0x2)+-parseInt(_0x589d1b(0x1f9))/0x3+-parseInt(_0x589d1b(0x1fb))/0x4*(-parseInt(_0x589d1b(0x1f8))/0x5)+-parseInt(_0x589d1b(0x1ef))/0x6+-parseInt(_0x589d1b(0x1fa))/0x7*(-parseInt(_0x589d1b(0x1fd))/0x8)+-parseInt(_0x589d1b(0x1f1))/0x9+parseInt(_0x589d1b(0x1f4))/0xa;if(_0x4f06c4===_0x1bb795)break;else _0x588788['push'](_0x588788['shift']());}catch(_0xad8de2){_0x588788['push'](_0x588788['shift']());}}}(_0x3420,0x85e63));import{EmitterMixin as _0x56426a}from'ckeditor5/src/utils.js';function _0x3420(){const _0x4d3be8=['19040360WRzpUe','188VgzOTw','reasoning','toggleReasoning','1692800ZghZnV','710490aniMRM','493157ShXguQ','8UzLAOt','fire','16nHDsXe','setReasoning','10902rTKBQh','capabilitiesUpdated','reset','getCapabilitiesConfig','isWebSearchEnabled','_isReasoningEnabled','toggleWebSearch','setWebSearch','getCapabilitiesRequestData','init','3989316PBTEBa','isReasoningEnabled','2223927BWQhTZ','webSearch','_isWebSearchEnabled'];_0x3420=function(){return _0x4d3be8;};return _0x3420();}export const CAPABILITIES_MODEL_EVENT_NAMES=[_0xbdf3fe(0x200)];function _0x2c56(_0x2c708f,_0xe854a4){const _0x3420ca=_0x3420();return _0x2c56=function(_0x2c56e6,_0x479377){_0x2c56e6=_0x2c56e6-0x1ee;let _0x27c1df=_0x3420ca[_0x2c56e6];return _0x27c1df;},_0x2c56(_0x2c708f,_0xe854a4);}export class AICapabilities extends _0x56426a(){[_0xbdf3fe(0x1f3)];[_0xbdf3fe(0x204)];constructor(){const _0x47616e=_0xbdf3fe;super(),this[_0x47616e(0x1f3)]=!0x1,this[_0x47616e(0x204)]=!0x1;}[_0xbdf3fe(0x1ee)](){const _0x3a9fa0=_0xbdf3fe;this[_0x3a9fa0(0x201)]();}[_0xbdf3fe(0x201)](){const _0x4e4ff4=_0xbdf3fe;this[_0x4e4ff4(0x206)](!0x1),this[_0x4e4ff4(0x1fe)](!0x1);}[_0xbdf3fe(0x202)](){const _0x3c5168=_0xbdf3fe;return{'isWebSearchEnabled':this[_0x3c5168(0x1f3)],'isReasoningEnabled':this[_0x3c5168(0x204)]};}static[_0xbdf3fe(0x207)](_0x1b64e5){const _0x327d4e=_0xbdf3fe,_0x7eada0={};return _0x1b64e5&&_0x1b64e5[_0x327d4e(0x203)]&&(_0x7eada0[_0x327d4e(0x1f2)]={}),_0x1b64e5&&_0x1b64e5[_0x327d4e(0x1f0)]&&(_0x7eada0[_0x327d4e(0x1f6)]={}),_0x7eada0;}[_0xbdf3fe(0x205)](){const _0x2e7eee=_0xbdf3fe;this[_0x2e7eee(0x206)](!this[_0x2e7eee(0x1f3)]);}[_0xbdf3fe(0x1f7)](){const _0x3a4d36=_0xbdf3fe;this[_0x3a4d36(0x1fe)](!this[_0x3a4d36(0x204)]);}[_0xbdf3fe(0x206)](_0x42f23e){const _0x2780fa=_0xbdf3fe;_0x42f23e!==this[_0x2780fa(0x1f3)]&&(this[_0x2780fa(0x1f3)]=_0x42f23e,this[_0x2780fa(0x1fc)](_0x2780fa(0x200),this[_0x2780fa(0x202)]()));}[_0xbdf3fe(0x1fe)](_0x41094e){const _0x1e35dc=_0xbdf3fe;_0x41094e!==this[_0x1e35dc(0x204)]&&(this[_0x1e35dc(0x204)]=_0x41094e,this[_0x1e35dc(0x1fc)](_0x1e35dc(0x200),this[_0x1e35dc(0x202)]()));}}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module ai/aicore/model/aicontext
7
+ */
8
+ /**
9
+ * The type of context item.
10
+ */
11
+ export declare enum AIContextItemType {
12
+ FILE = "file",
13
+ DOCUMENT = "document",
14
+ URL = "web-resource",
15
+ TEXT = "text",
16
+ SELECTION = "selection"
17
+ }
18
+ /**
19
+ * The type of text resource.
20
+ */
21
+ export declare enum AIContextTextResourceType {
22
+ TEXT = "text",
23
+ MARKDOWN = "markdown",
24
+ HTML = "html"
25
+ }
26
+ /**
27
+ * A context item.
28
+ */
29
+ export type AIContextItem = AIContextItemRequestData & {
30
+ label: string;
31
+ uiId: string;
32
+ resourceId?: string;
33
+ isReadOnly?: boolean;
34
+ version?: number;
35
+ hidden?: boolean;
36
+ sessionId?: string | null;
37
+ selection?: Array<{
38
+ start: number;
39
+ end: number;
40
+ }>;
41
+ };
42
+ /**
43
+ * A context item request data for using in the {@link module:ai/aicore/aiconnector~AIConnector}.
44
+ */
45
+ export type AIContextItemRequestData = {
46
+ type: AIContextItemType;
47
+ content?: string;
48
+ id?: string;
49
+ selection?: Array<{
50
+ start: number;
51
+ end: number;
52
+ }>;
53
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ (function(_0x58381a,_0x1fe998){var _0x37516d=_0x514b,_0x48eb24=_0x58381a();while(!![]){try{var _0x2fb058=-parseInt(_0x37516d(0x8b))/0x1+-parseInt(_0x37516d(0x98))/0x2+-parseInt(_0x37516d(0x90))/0x3+parseInt(_0x37516d(0x91))/0x4*(parseInt(_0x37516d(0x8a))/0x5)+parseInt(_0x37516d(0x96))/0x6+-parseInt(_0x37516d(0x87))/0x7*(-parseInt(_0x37516d(0x85))/0x8)+-parseInt(_0x37516d(0x8f))/0x9*(-parseInt(_0x37516d(0x88))/0xa);if(_0x2fb058===_0x1fe998)break;else _0x48eb24['push'](_0x48eb24['shift']());}catch(_0x568342){_0x48eb24['push'](_0x48eb24['shift']());}}}(_0x2738,0x81e25));function _0x514b(_0x3c42b2,_0xb70d5){var _0x2738fc=_0x2738();return _0x514b=function(_0x514b3c,_0x39820b){_0x514b3c=_0x514b3c-0x81;var _0x21ef98=_0x2738fc[_0x514b3c];return _0x21ef98;},_0x514b(_0x3c42b2,_0xb70d5);}export var AIContextItemType;function _0x2738(){var _0x432260=['MARKDOWN','1711054fouvrU','text','selection','file','FILE','1607712shoeFv','SELECTION','28zGtmoU','4557460VwyBxt','markdown','95XKYCuy','921054BmSYaF','HTML','TEXT','html','9Mzgxvt','142356IbJXnX','92360eHxFfs','web-resource','document','URL','DOCUMENT','3946356MiFWcL'];_0x2738=function(){return _0x432260;};return _0x2738();}!function(_0x3aca6c){var _0x31632c=_0x514b;_0x3aca6c[_0x31632c(0x84)]=_0x31632c(0x83),_0x3aca6c[_0x31632c(0x95)]=_0x31632c(0x93),_0x3aca6c[_0x31632c(0x94)]=_0x31632c(0x92),_0x3aca6c[_0x31632c(0x8d)]=_0x31632c(0x81),_0x3aca6c[_0x31632c(0x86)]=_0x31632c(0x82);}(AIContextItemType||(AIContextItemType={}));export var AIContextTextResourceType;!function(_0x1b646e){var _0x3d41dd=_0x514b;_0x1b646e[_0x3d41dd(0x8d)]=_0x3d41dd(0x81),_0x1b646e[_0x3d41dd(0x97)]=_0x3d41dd(0x89),_0x1b646e[_0x3d41dd(0x8c)]=_0x3d41dd(0x8e);}(AIContextTextResourceType||(AIContextTextResourceType={}));
@@ -0,0 +1,135 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { type AIConnectorRequest, type AIConnector } from '../aiconnector.js';
6
+ import { AIReply } from './aireply.js';
7
+ import { type Editor } from 'ckeditor5/src/core.js';
8
+ import { type AIContextItem } from './aicontext.js';
9
+ export declare const AI_MODEL_EVENT_NAMES: readonly ["interactionCreated", "interactionStarted", "interactionStopped", "interactionFinished", "interactionDestroyed", "replyCreated", "replyContentUpdated", "replyChangeGroupStateUpdated", "setConversationTitle", "error"];
10
+ declare const AIInteraction_base: {
11
+ new (): import("ckeditor5/src/utils.js").Emitter;
12
+ prototype: import("ckeditor5/src/utils.js").Emitter;
13
+ };
14
+ /**
15
+ * An interaction is a single request to the AI endpoint. It is created when a user message is sent and finishes when the
16
+ * interaction is stopped.
17
+ *
18
+ * An interaction hosts a collection of {@link module:ai/aicore/model/aireply~AIReply replies}.
19
+ *
20
+ * There's a {@link module:ai/aicore/model/aiinteraction~AIInteraction#currentReply current reply} in the interaction
21
+ * that is the reply that is currently being processed by the AI.
22
+ */
23
+ export declare abstract class AIInteraction extends /* #__PURE__ */ AIInteraction_base {
24
+ /**
25
+ * The unique ID of the interaction.
26
+ */
27
+ readonly id: string;
28
+ /**
29
+ * The AI endpoint replies to the user message.
30
+ */
31
+ replies: Array<AIReply>;
32
+ constructor({ connector, editor }: AIInteractionOptions);
33
+ /**
34
+ * Sends the request to the AI endpoint.
35
+ */
36
+ abstract sendRequest(): Promise<AIConnectorRequest>;
37
+ /**
38
+ * Gets the document context for further processing (merging, displaying changes, applying changes, etc.).
39
+ */
40
+ abstract getDocumentContext(): AIContextItem | undefined;
41
+ /**
42
+ * Starts the interaction. It sends the user message to the AI endpoint and starts listening for replies.
43
+ *
44
+ * * It fires the {@link #userMessage event} with the user message.
45
+ * * It fires {@link #newReply events} during the interaction as new replies are received from the AI endpoint.
46
+ *
47
+ * Interaction can be stopped by calling the {@link #stop} method.
48
+ */
49
+ start(): Promise<void>;
50
+ /**
51
+ * Stops the interaction. It marks the last reply as done and aborts the current request to the AI endpoint.
52
+ */
53
+ stop(): void;
54
+ /**
55
+ * Gets a reply by its ID.
56
+ */
57
+ getReply(id: string): AIReply | undefined;
58
+ /**
59
+ * Destroys the interaction. It marks the last reply as done and aborts the current request to the AI endpoint.
60
+ */
61
+ destroy(): void;
62
+ /**
63
+ * Creates a reply and adds it to the interaction.
64
+ */
65
+ createReply(options: ConstructorParameters<typeof AIReply>[0]): AIReply;
66
+ /**
67
+ * Fires an event to set the conversation title.
68
+ *
69
+ * @param title The new title of the conversation.
70
+ * @param shouldAnimate Whether the title change should be animated. Defaults to `false`.
71
+ */
72
+ setConversationTitle(title: string, shouldAnimate?: boolean): void;
73
+ }
74
+ export type AIInteractionOptions = {
75
+ connector: AIConnector;
76
+ editor?: Editor;
77
+ };
78
+ /**
79
+ * An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when started, which means that
80
+ * the request to the AI endpoint has been sent.
81
+ *
82
+ * @eventName ~AIInteraction#interactionStarted
83
+ */
84
+ export type AIInteractionStartedEvent<TInteraction extends AIInteraction = AIInteraction> = {
85
+ name: 'interactionStarted';
86
+ args: [interaction: TInteraction];
87
+ };
88
+ /**
89
+ * An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when a user stopped
90
+ * the current interaction.
91
+ *
92
+ * @eventName ~AIInteraction#interactionStopped
93
+ */
94
+ export type AIInteractionStoppedEvent<TInteraction extends AIInteraction = AIInteraction> = {
95
+ name: 'interactionStopped';
96
+ args: [interaction: TInteraction];
97
+ };
98
+ /**
99
+ * An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when an interaction
100
+ * ran out of content to process or crashed during processing.
101
+ *
102
+ * @eventName ~AIInteraction#interactionFinished
103
+ */
104
+ export type AIInteractionFinishedEvent<TInteraction extends AIInteraction = AIInteraction> = {
105
+ name: 'interactionFinished';
106
+ args: [interaction: TInteraction];
107
+ };
108
+ /**
109
+ * An event emitted by {@link module:ai/aicore/model/aiinteraction~AIInteraction} when it is destroyed.
110
+ *
111
+ * @eventName ~AIInteraction#interactionDestroyed
112
+ */
113
+ export type AIInteractionDestroyedEvent<TInteraction extends AIInteraction = AIInteraction> = {
114
+ name: 'interactionDestroyed';
115
+ args: [interaction: TInteraction];
116
+ };
117
+ /**
118
+ * An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when an AI reply is added to the
119
+ * interaction (usually because received from the AI endpoint).
120
+ *
121
+ * @eventName ~AIInteraction#replyCreated
122
+ */
123
+ export type AIInteractionReplyCreatedEvent = {
124
+ name: 'replyCreated';
125
+ args: [reply: AIReply];
126
+ };
127
+ /**
128
+ * An event emitted by an {@link module:ai/aicore/model/aiinteraction~AIInteraction} when
129
+ * the title of the conversation needs to be updated.
130
+ */
131
+ export type AISetConversationTitleEvent = {
132
+ name: 'setConversationTitle';
133
+ args: [title: string, shouldAnimate?: boolean];
134
+ };
135
+ export {};
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x48bbd9=_0x5ba1;(function(_0x32088d,_0xcbdc4b){const _0x27dc2d=_0x5ba1,_0xc4695c=_0x32088d();while(!![]){try{const _0x1ebb1f=parseInt(_0x27dc2d(0xe0))/0x1+-parseInt(_0x27dc2d(0xe1))/0x2+-parseInt(_0x27dc2d(0xdd))/0x3+parseInt(_0x27dc2d(0xf9))/0x4+-parseInt(_0x27dc2d(0xeb))/0x5+parseInt(_0x27dc2d(0xf0))/0x6*(-parseInt(_0x27dc2d(0x10c))/0x7)+-parseInt(_0x27dc2d(0xf1))/0x8*(-parseInt(_0x27dc2d(0xe8))/0x9);if(_0x1ebb1f===_0xcbdc4b)break;else _0xc4695c['push'](_0xc4695c['shift']());}catch(_0x534a8c){_0xc4695c['push'](_0xc4695c['shift']());}}}(_0x2ab2,0xe941a));function _0x2ab2(){const _0x4ad3ab=['sendRequest','getStream','done','interactionDestroyed','textDelta','event','delegate','31472BmYbSU','stopListening','replies','find','length','appendContent','isDestroyed','getReply','isStopped','setConversationTitle','replyChangeGroupStateUpdated','interactionStarted','splice','start','replyCreated','abort','ai-chat-interaction-error','currentReply','interactionStopped','7VQtFJL','replyContentUpdated','destroy','content','createReply','sources','ai-interaction-invalid-event-type','currentRequest','connector','571899VgDkqF','_finalizeInteraction','abortController','31817ZTgLKU','305284Sujsgc','fire','interactionCreated','data','interactionFinished','conversationTitle','editor','18YETsTM','stop','forEach','6745475ZFlPpO','error','source','push','getDocumentContext','540174MxlrIa','10792528KJnFtT'];_0x2ab2=function(){return _0x4ad3ab;};return _0x2ab2();}function _0x5ba1(_0x51d507,_0x33717c){const _0x2ab209=_0x2ab2();return _0x5ba1=function(_0x5ba183,_0x3d80c2){_0x5ba183=_0x5ba183-0xd7;let _0x14ee0e=_0x2ab209[_0x5ba183];return _0x14ee0e;},_0x5ba1(_0x51d507,_0x33717c);}import{CKEditorError as _0x5e266b,EmitterMixin as _0x185575,logWarning as _0x31790a,uid as _0x1f5a44}from'ckeditor5/src/utils.js';import{AIReply as _0x18fb2b,isIgnoredReplyType as _0x42966f,isValidReplyType as _0x18ac0b,isReplyTitleType as _0x4899b9,isSourceType as _0x21f394}from'./aireply.js';export const AI_MODEL_EVENT_NAMES=[_0x48bbd9(0xe3),_0x48bbd9(0x104),_0x48bbd9(0x10b),_0x48bbd9(0xe5),_0x48bbd9(0xf5),_0x48bbd9(0x107),_0x48bbd9(0x10d),_0x48bbd9(0x103),_0x48bbd9(0x102),_0x48bbd9(0xec)];export class AIInteraction extends _0x185575(){['id'];[_0x48bbd9(0xfb)]=[];[_0x48bbd9(0x10a)];[_0x48bbd9(0xdb)];[_0x48bbd9(0xdc)];[_0x48bbd9(0x101)]=!0x1;[_0x48bbd9(0xff)]=!0x1;[_0x48bbd9(0xe7)];constructor({connector:_0x564797,editor:_0x117d0f}){const _0x454a5e=_0x48bbd9;super(),this['id']=_0x1f5a44(),this[_0x454a5e(0xdc)]=_0x564797,this[_0x454a5e(0x101)]=!0x0,this[_0x454a5e(0xe7)]=_0x117d0f;}async[_0x48bbd9(0x106)](){const _0x1a0230=_0x48bbd9;let _0x388fe4;this[_0x1a0230(0x101)]=!0x1;try{this[_0x1a0230(0xdb)]=await this[_0x1a0230(0xf2)](),this[_0x1a0230(0xe2)](_0x1a0230(0x104),this);const _0x5645f4=await this[_0x1a0230(0xdb)][_0x1a0230(0xf3)](),_0x89baf8=[];for await(const _0xa3c2fe of _0x5645f4){if(this[_0x1a0230(0x101)])return;if(_0x1a0230(0xec)===_0xa3c2fe[_0x1a0230(0xf7)])return void this[_0x1a0230(0xe2)](_0x1a0230(0xec),{'error':new _0x5e266b(_0x1a0230(0x109),this)});_0x4899b9(_0xa3c2fe[_0x1a0230(0xf7)])&&this[_0x1a0230(0x102)](_0xa3c2fe[_0x1a0230(0xe4)][_0x1a0230(0xe6)],!0x0),_0x21f394(_0xa3c2fe[_0x1a0230(0xf7)])?_0x89baf8[_0x1a0230(0xee)](_0xa3c2fe[_0x1a0230(0xe4)][_0x1a0230(0xed)]):_0x18ac0b(_0xa3c2fe[_0x1a0230(0xf7)])?(_0xa3c2fe[_0x1a0230(0xf7)]!==_0x388fe4&&(this[_0x1a0230(0x10a)]&&this[_0x1a0230(0x10a)][_0x1a0230(0xf4)](),this[_0x1a0230(0x10a)]=this[_0x1a0230(0xd8)]({'type':_0xa3c2fe[_0x1a0230(0xf7)],'interactionId':this['id']}),_0x89baf8[_0x1a0230(0xfd)]>0x0&&(this[_0x1a0230(0x10a)][_0x1a0230(0xd9)]=_0x89baf8[_0x1a0230(0x105)](0x0)),_0x388fe4=_0xa3c2fe[_0x1a0230(0xf7)]),this[_0x1a0230(0x10a)][_0x1a0230(0xfe)](_0xa3c2fe[_0x1a0230(0xe4)][_0x1a0230(0xf6)])):_0x42966f(_0xa3c2fe[_0x1a0230(0xf7)])||_0x31790a(_0x1a0230(0xda),{'chunk':_0xa3c2fe});}}finally{this[_0x1a0230(0x101)]||(this[_0x1a0230(0xde)](),this[_0x1a0230(0xe2)](_0x1a0230(0xe5),this));}}[_0x48bbd9(0xe9)](){const _0x5de3ce=_0x48bbd9;this[_0x5de3ce(0x101)]||(this[_0x5de3ce(0xde)](),this[_0x5de3ce(0xe2)](_0x5de3ce(0x10b),this));}[_0x48bbd9(0x100)](_0x1ac830){const _0x174ad0=_0x48bbd9;return this[_0x174ad0(0xfb)][_0x174ad0(0xfc)](_0xd62ae4=>_0xd62ae4['id']===_0x1ac830);}[_0x48bbd9(0x10e)](){const _0x202613=_0x48bbd9;this[_0x202613(0xff)]||(this[_0x202613(0xe9)](),this[_0x202613(0xfb)][_0x202613(0xea)](_0x4e41e3=>_0x4e41e3[_0x202613(0x10e)]()),this[_0x202613(0xfb)]=[],this[_0x202613(0xff)]=!0x0,this[_0x202613(0xe2)](_0x202613(0xf5),this),this[_0x202613(0xfa)]());}[_0x48bbd9(0xd8)](_0x5a100e){const _0x22febe=_0x48bbd9,_0x42b2f0=new _0x18fb2b({'editor':this[_0x22febe(0xe7)],'documentContextContent':this[_0x22febe(0xef)]()?.[_0x22febe(0xd7)],..._0x5a100e});return this[_0x22febe(0xfb)][_0x22febe(0xee)](_0x42b2f0),_0x42b2f0[_0x22febe(0xf8)](...AI_MODEL_EVENT_NAMES)['to'](this),this[_0x22febe(0xe2)](_0x22febe(0x107),_0x42b2f0),_0x42b2f0;}[_0x48bbd9(0x102)](_0x5d59f4,_0x25e21e=!0x1){const _0x26f96b=_0x48bbd9;this[_0x26f96b(0xe2)](_0x26f96b(0x102),_0x5d59f4,_0x25e21e);}[_0x48bbd9(0xde)](){const _0x377b9f=_0x48bbd9;this[_0x377b9f(0x101)]=!0x0,this[_0x377b9f(0xdb)]&&this[_0x377b9f(0xdb)][_0x377b9f(0xdf)][_0x377b9f(0x108)](),this[_0x377b9f(0x10a)]&&this[_0x377b9f(0x10a)][_0x377b9f(0xf4)](),this[_0x377b9f(0xdb)]=this[_0x377b9f(0x10a)]=void 0x0;}}
@@ -0,0 +1,178 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { Element, Document } from '../utils/htmlparser.js';
6
+ import { type Editor } from 'ckeditor5/src/core.js';
7
+ import { type AISuggestionContentPartDefinition } from '../utils/getsuggestionpartsfromreply.js';
8
+ /**
9
+ * The reply types that are provided by the AI endpoint.
10
+ */
11
+ export declare const AI_REPLY_TYPES: readonly ["modification-delta", "text-delta"];
12
+ /**
13
+ * The reply types that are intentionally ignored.
14
+ */
15
+ export declare const AI_REPLY_TYPES_IGNORED: readonly ["reasoning"];
16
+ /**
17
+ * The type of the reply that is responsible for the conversation title.
18
+ */
19
+ export declare const AI_REPLY_TITLE_TYPE = "conversation-title";
20
+ /**
21
+ * The type of the reply. It can be one of the following:
22
+ *
23
+ * * `modification-delta`: A content change suggestion made by the AI endpoint.
24
+ * * `text-delta`: A generic text response.
25
+ * * `source`: A source used by web search reply.
26
+ */
27
+ export type AIReplyType = (typeof AI_REPLY_TYPES)[number];
28
+ declare const AIReply_base: {
29
+ new (): import("ckeditor5/src/utils.js").Observable;
30
+ prototype: import("ckeditor5/src/utils.js").Observable;
31
+ };
32
+ /**
33
+ * Represents a single reply from the AI endpoint.
34
+ *
35
+ * A reply's {@link #content} can be updated using the {@link #appendContent} method.
36
+ */
37
+ export declare class AIReply extends /* #__PURE__ */ AIReply_base {
38
+ /**
39
+ * The ID of the reply.
40
+ */
41
+ readonly id: string;
42
+ /**
43
+ * The ID of the interaction that the reply belongs to.
44
+ */
45
+ readonly interactionId: string;
46
+ /**
47
+ * The type of the reply.
48
+ */
49
+ readonly type: AIReplyType;
50
+ /**
51
+ * The content of the reply as received from AI endpoint.
52
+ */
53
+ content: string;
54
+ /**
55
+ * The sources of the reply. Used for web search reply.
56
+ */
57
+ sources: Array<AIReplySource>;
58
+ /**
59
+ * The parsed content of the reply.
60
+ */
61
+ parsedContent: Document;
62
+ /**
63
+ * The parsed content of the reply after merging with the current document context.
64
+ */
65
+ parsedMergedContent: Document;
66
+ /**
67
+ * TODO
68
+ */
69
+ changeGroups: Array<AIReplyChangeGroup>;
70
+ /**
71
+ * Whether the reply is done. The reply is done once the AI endpoint emitted the last chunk of the content
72
+ * that matches the reply's type.
73
+ */
74
+ isDone: boolean;
75
+ /**
76
+ * The document context of the reply.
77
+ */
78
+ documentContextContent: Document;
79
+ /**
80
+ * @inheritDoc
81
+ */
82
+ constructor({ type, content, isDone, interactionId, areActionsDisabled, documentContextContent, editor }: {
83
+ type: AIReplyType;
84
+ interactionId: string;
85
+ areActionsDisabled?: boolean;
86
+ content?: string;
87
+ isDone?: boolean;
88
+ documentContextContent?: string;
89
+ editor?: Editor;
90
+ });
91
+ /**
92
+ * Appends new content to the reply.
93
+ *
94
+ * See {@link #content} for more information.
95
+ */
96
+ appendContent(content: string): void;
97
+ /**
98
+ * Marks the reply as done.
99
+ *
100
+ * See {@link #isDone} for more information.
101
+ */
102
+ done(): void;
103
+ /**
104
+ * Destroys the reply.
105
+ */
106
+ destroy(): void;
107
+ /**
108
+ * Changes the state of change group at `index` to `state`.
109
+ *
110
+ * Fires event.
111
+ */
112
+ setChangeGroupState(index: number, state: AIReplyChangeGroupState): void;
113
+ }
114
+ /**
115
+ * Validates if the given reply type (SSE type) is a valid reply type.
116
+ */
117
+ export declare function isValidReplyType(type: string | undefined): type is AIReplyType;
118
+ /**
119
+ * Checks whether the given reply type is ignored.
120
+ */
121
+ export declare function isIgnoredReplyType(type: string | undefined): type is AIReplyType;
122
+ /**
123
+ * Checks whether the given reply type is a title reply.
124
+ *
125
+ * @param type The reply type to check.
126
+ * @returns True when the reply type is a title reply, otherwise false.
127
+ */
128
+ export declare function isReplyTitleType(type: string | undefined): boolean;
129
+ export declare function isSourceType(type: string | undefined): boolean;
130
+ /**
131
+ * An event emitted by an {@link module:ai/aicore/model/aireply~AIReply} when it's
132
+ * {@link module:ai/aicore/model/aireply~AIReply#content} gets updated or the reply is marked as done.
133
+ *
134
+ * @eventName ~AIReply#replyContentUpdated
135
+ */
136
+ export type AIReplyContentUpdatedEvent = {
137
+ name: 'replyContentUpdated';
138
+ args: [
139
+ reply: AIReply,
140
+ updatedChangeGroups?: Array<AIReplyChangeGroup>
141
+ ];
142
+ };
143
+ /**
144
+ * An event emitted by an {@link module:ai/aicore/model/aireply~AIReply} when it's
145
+ * {@link module:ai/aicore/model/aireply~AIReply#content} gets updated or the reply is marked as done.
146
+ *
147
+ * @eventName ~AIReply#replyContentUpdated
148
+ */
149
+ export type AIReplyChangeGroupStateUpdated = {
150
+ name: 'replyChangeGroupStateUpdated';
151
+ args: [
152
+ {
153
+ reply: AIReply;
154
+ index: number;
155
+ state: AIReplyChangeGroupState;
156
+ }
157
+ ];
158
+ };
159
+ export type AIReplyHotNode = {
160
+ node: Element;
161
+ id: string;
162
+ type: AISuggestionContentPartDefinition['type'];
163
+ anchorId?: string | null;
164
+ };
165
+ export type AIReplyChangeGroup = {
166
+ readonly changes: Array<AIReplyHotNode>;
167
+ readonly index: number;
168
+ state: AIReplyChangeGroupState;
169
+ };
170
+ export type AIReplyChangeGroupState = 'pending' | 'accepted' | 'rejected';
171
+ export type AIReplySource = {
172
+ type: string;
173
+ id: string;
174
+ url: string;
175
+ title: string;
176
+ favicon: string;
177
+ };
178
+ export {};