@ckeditor/ckeditor5-ai 40.1.0 → 40.2.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.
Files changed (148) hide show
  1. package/README.md +1 -1
  2. package/build/ai.js +77 -2
  3. package/build/translations/af.js +1 -1
  4. package/build/translations/ar.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/bs.js +1 -1
  8. package/build/translations/ca.js +1 -1
  9. package/build/translations/cs.js +1 -1
  10. package/build/translations/da.js +1 -1
  11. package/build/translations/de-ch.js +1 -1
  12. package/build/translations/de.js +1 -1
  13. package/build/translations/el.js +1 -1
  14. package/build/translations/en-au.js +1 -1
  15. package/build/translations/es-co.js +1 -1
  16. package/build/translations/es.js +1 -1
  17. package/build/translations/et.js +1 -1
  18. package/build/translations/fa.js +1 -1
  19. package/build/translations/fi.js +1 -1
  20. package/build/translations/fr.js +1 -1
  21. package/build/translations/gl.js +1 -1
  22. package/build/translations/he.js +1 -1
  23. package/build/translations/hi.js +1 -1
  24. package/build/translations/hr.js +1 -1
  25. package/build/translations/hu.js +1 -1
  26. package/build/translations/id.js +1 -1
  27. package/build/translations/it.js +1 -1
  28. package/build/translations/ja.js +1 -1
  29. package/build/translations/jv.js +1 -1
  30. package/build/translations/ko.js +1 -1
  31. package/build/translations/lt.js +1 -1
  32. package/build/translations/lv.js +1 -1
  33. package/build/translations/ms.js +1 -1
  34. package/build/translations/nl.js +1 -1
  35. package/build/translations/no.js +1 -1
  36. package/build/translations/pl.js +1 -1
  37. package/build/translations/pt-br.js +1 -1
  38. package/build/translations/pt.js +1 -1
  39. package/build/translations/ro.js +1 -1
  40. package/build/translations/ru.js +1 -1
  41. package/build/translations/sk.js +1 -1
  42. package/build/translations/sr-latn.js +1 -1
  43. package/build/translations/sr.js +1 -1
  44. package/build/translations/sv.js +1 -1
  45. package/build/translations/th.js +1 -1
  46. package/build/translations/tk.js +1 -1
  47. package/build/translations/tr.js +1 -1
  48. package/build/translations/ug.js +1 -1
  49. package/build/translations/uk.js +1 -1
  50. package/build/translations/ur.js +1 -1
  51. package/build/translations/uz.js +1 -1
  52. package/build/translations/vi.js +1 -1
  53. package/build/translations/zh-cn.js +1 -1
  54. package/build/translations/zh.js +1 -1
  55. package/ckeditor5-metadata.json +1 -1
  56. package/lang/contexts.json +3 -1
  57. package/lang/translations/af.po +2 -2
  58. package/lang/translations/ar.po +3 -3
  59. package/lang/translations/bg.po +3 -3
  60. package/lang/translations/bn.po +3 -3
  61. package/lang/translations/bs.po +2 -2
  62. package/lang/translations/ca.po +3 -3
  63. package/lang/translations/cs.po +3 -3
  64. package/lang/translations/da.po +3 -3
  65. package/lang/translations/de-ch.po +2 -2
  66. package/lang/translations/de.po +3 -3
  67. package/lang/translations/el.po +3 -3
  68. package/lang/translations/en-au.po +2 -2
  69. package/lang/translations/en.po +3 -3
  70. package/lang/translations/es-co.po +2 -2
  71. package/lang/translations/es.po +3 -3
  72. package/lang/translations/et.po +3 -3
  73. package/lang/translations/fa.po +2 -2
  74. package/lang/translations/fi.po +3 -3
  75. package/lang/translations/fr.po +3 -3
  76. package/lang/translations/gl.po +50 -50
  77. package/lang/translations/he.po +3 -3
  78. package/lang/translations/hi.po +3 -3
  79. package/lang/translations/hr.po +2 -2
  80. package/lang/translations/hu.po +3 -3
  81. package/lang/translations/id.po +3 -3
  82. package/lang/translations/it.po +3 -3
  83. package/lang/translations/ja.po +3 -3
  84. package/lang/translations/jv.po +2 -2
  85. package/lang/translations/ko.po +3 -3
  86. package/lang/translations/lt.po +3 -3
  87. package/lang/translations/lv.po +3 -3
  88. package/lang/translations/ms.po +3 -3
  89. package/lang/translations/nl.po +3 -3
  90. package/lang/translations/no.po +3 -3
  91. package/lang/translations/pl.po +3 -3
  92. package/lang/translations/pt-br.po +3 -3
  93. package/lang/translations/pt.po +3 -3
  94. package/lang/translations/ro.po +3 -3
  95. package/lang/translations/ru.po +3 -3
  96. package/lang/translations/sk.po +3 -3
  97. package/lang/translations/sr-latn.po +50 -50
  98. package/lang/translations/sr.po +3 -3
  99. package/lang/translations/sv.po +3 -3
  100. package/lang/translations/th.po +3 -3
  101. package/lang/translations/tk.po +2 -2
  102. package/lang/translations/tr.po +3 -3
  103. package/lang/translations/ug.po +15 -15
  104. package/lang/translations/uk.po +3 -3
  105. package/lang/translations/ur.po +2 -2
  106. package/lang/translations/uz.po +2 -2
  107. package/lang/translations/vi.po +3 -3
  108. package/lang/translations/zh-cn.po +3 -3
  109. package/lang/translations/zh.po +3 -3
  110. package/package.json +4 -3
  111. package/src/adapters/aiadapter.d.ts +48 -0
  112. package/src/adapters/aiadapter.js +23 -0
  113. package/src/adapters/aitextadapter.d.ts +146 -0
  114. package/src/adapters/aitextadapter.js +23 -0
  115. package/src/adapters/awstextadapter.d.ts +178 -0
  116. package/src/adapters/awstextadapter.js +23 -0
  117. package/src/adapters/openaitextadapter.d.ts +181 -0
  118. package/src/adapters/openaitextadapter.js +23 -0
  119. package/src/aiassistant.d.ts +44 -116
  120. package/src/aiassistant.js +1 -1
  121. package/src/aiassistantediting.js +1 -1
  122. package/src/aiassistantui.d.ts +12 -4
  123. package/src/aiassistantui.js +1 -1
  124. package/src/aiconfig.d.ts +69 -0
  125. package/src/aiconfig.js +23 -0
  126. package/src/augmentation.d.ts +6 -5
  127. package/src/index.d.ts +4 -0
  128. package/src/index.js +1 -1
  129. package/src/ui/aiassistantcontroller.d.ts +32 -19
  130. package/src/ui/aiassistantcontroller.js +1 -1
  131. package/src/ui/dropdown/aicommandslistview.js +1 -1
  132. package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
  133. package/src/ui/dropdown/labelwithhighlightview.js +1 -1
  134. package/src/ui/form/aiformcontentarea.js +1 -1
  135. package/src/ui/form/aiformerrorview.js +1 -1
  136. package/src/ui/form/aiformpromptview.js +1 -1
  137. package/src/ui/form/aiformtoolbarview.d.ts +2 -2
  138. package/src/ui/form/aiformtoolbarview.js +1 -1
  139. package/src/ui/form/aiformview.d.ts +2 -2
  140. package/src/ui/form/aiformview.js +1 -1
  141. package/src/ui/form/aihistorylistitemview.js +1 -1
  142. package/src/ui/form/aihistorylistview.js +1 -1
  143. package/src/ui/form/prompthistory.js +1 -1
  144. package/src/ui/showaiassistantcommand.d.ts +6 -3
  145. package/src/ui/showaiassistantcommand.js +1 -1
  146. package/src/utils/common-translations.js +1 -1
  147. package/src/aiconnector.d.ts +0 -45
  148. package/src/aiconnector.js +0 -23
@@ -19,139 +19,139 @@ msgstr ""
19
19
 
20
20
  msgctxt "AI command group label for editing and reviewing."
21
21
  msgid "Edit or review"
22
- msgstr ""
22
+ msgstr "Uredi ili pregledaj"
23
23
 
24
24
  msgctxt "Label for the AI command to improve the writing of content."
25
25
  msgid "Improve writing"
26
- msgstr ""
26
+ msgstr "Poboljsaj pisanje"
27
27
 
28
28
  msgctxt "Label for the AI command to make the content shorter."
29
29
  msgid "Make shorter"
30
- msgstr ""
30
+ msgstr "Skrati"
31
31
 
32
32
  msgctxt "Label for the AI command to make the content longer."
33
33
  msgid "Make longer"
34
- msgstr ""
34
+ msgstr "Produži"
35
35
 
36
36
  msgctxt "Label for the AI command to simplify the language of content."
37
37
  msgid "Simplify language"
38
- msgstr ""
38
+ msgstr "Pojednostavi jezik"
39
39
 
40
40
  msgctxt "AI command group label for generating content from selection."
41
41
  msgid "Generate from selection"
42
- msgstr ""
42
+ msgstr "Generiši iz izbora"
43
43
 
44
44
  msgctxt "Label for the AI command to provide a summary of content."
45
45
  msgid "Summarize"
46
- msgstr ""
46
+ msgstr "Rezimiraj"
47
47
 
48
48
  msgctxt "Label for the AI command to continue the content."
49
49
  msgid "Continue"
50
- msgstr ""
50
+ msgstr "Nastavi"
51
51
 
52
52
  msgctxt "AI command group label for changing the tone of content."
53
53
  msgid "Change tone"
54
- msgstr ""
54
+ msgstr "Promeni ton"
55
55
 
56
56
  msgctxt "Label for the AI command to rewrite content in a professional tone."
57
57
  msgid "Professional"
58
- msgstr ""
58
+ msgstr "Profesionalni"
59
59
 
60
60
  msgctxt "Label for the AI command to rewrite content in a casual tone."
61
61
  msgid "Casual"
62
- msgstr ""
62
+ msgstr "Neobavezno"
63
63
 
64
64
  msgctxt "Label for the AI command to rewrite content in a direct manner."
65
65
  msgid "Direct"
66
- msgstr ""
66
+ msgstr "Direktno"
67
67
 
68
68
  msgctxt "Label for the AI command to rewrite content in a confident tone."
69
69
  msgid "Confident"
70
- msgstr ""
70
+ msgstr "Samouvereno"
71
71
 
72
72
  msgctxt "Label for the AI command to rewrite content in a friendly tone."
73
73
  msgid "Friendly"
74
- msgstr ""
74
+ msgstr "Prijateljski"
75
75
 
76
76
  msgctxt "AI command group label for changing the style of content."
77
77
  msgid "Change style"
78
- msgstr ""
78
+ msgstr "Promeni stil"
79
79
 
80
80
  msgctxt "Label for the AI command to rewrite content in a business style."
81
81
  msgid "Business"
82
- msgstr ""
82
+ msgstr "Poslovni"
83
83
 
84
84
  msgctxt "Label for the AI command to rewrite content in a legal style."
85
85
  msgid "Legal"
86
- msgstr ""
86
+ msgstr "Poslovni"
87
87
 
88
88
  msgctxt "Label for the AI command to rewrite content in a journalistic style."
89
89
  msgid "Journalism"
90
- msgstr ""
90
+ msgstr "Novinarski"
91
91
 
92
92
  msgctxt "Label for the AI command to rewrite content poetically."
93
93
  msgid "Poetic"
94
- msgstr ""
94
+ msgstr "Poetski "
95
95
 
96
96
  msgctxt "AI command group label for translating the content."
97
97
  msgid "Translate"
98
- msgstr ""
98
+ msgstr "Prevedi"
99
99
 
100
100
  msgctxt "Label for the AI command. Example: (Translate to) English"
101
101
  msgid "Translate to %0"
102
- msgstr ""
102
+ msgstr "Prevedi na %0"
103
103
 
104
104
  msgctxt "Translate to (English)"
105
105
  msgid "English"
106
- msgstr ""
106
+ msgstr "Engleski"
107
107
 
108
108
  msgctxt "Translate to (Spanish)"
109
109
  msgid "Spanish"
110
- msgstr ""
110
+ msgstr "španski"
111
111
 
112
112
  msgctxt "Translate to (German)"
113
113
  msgid "German"
114
- msgstr ""
114
+ msgstr "nemački"
115
115
 
116
116
  msgctxt "Translate to (Portuguese)"
117
117
  msgid "Portuguese"
118
- msgstr ""
118
+ msgstr "portugalski"
119
119
 
120
120
  msgctxt "Translate to (French)"
121
121
  msgid "French"
122
- msgstr ""
122
+ msgstr "francuski"
123
123
 
124
124
  msgctxt "Translate to (Simplified Chinese)"
125
125
  msgid "Simplified Chinese"
126
- msgstr ""
126
+ msgstr "pojednostavljeni kineski"
127
127
 
128
128
  msgctxt "Translate to (Hindi)"
129
129
  msgid "Hindi"
130
- msgstr ""
130
+ msgstr "hindi"
131
131
 
132
132
  msgctxt "Translate to (Arabic)"
133
133
  msgid "Arabic"
134
- msgstr ""
134
+ msgstr "arapski"
135
135
 
136
136
  msgctxt "The heading element name displayed in the AI balloon and the button tooltip that opens the balloon."
137
137
  msgid "AI Assistant"
138
- msgstr ""
138
+ msgstr "AI pomoćnik"
139
139
 
140
140
  msgctxt "The toolbar button tooltip for the dropdown with predefined AI commands."
141
141
  msgid "AI Commands"
142
- msgstr ""
142
+ msgstr "AI komande"
143
143
 
144
144
  msgctxt "The placeholder for the prompt input to obtain new content."
145
145
  msgid "Ask AI to edit or generate"
146
- msgstr ""
146
+ msgstr "Zatražite od AI da uredi ili generiše"
147
147
 
148
148
  msgctxt "The placeholder for the prompt input to improve the generated content."
149
149
  msgid "Ask AI to improve generated text"
150
- msgstr ""
150
+ msgstr "Zatražite od AI da poboljša generisani tekst"
151
151
 
152
152
  msgctxt "The label for the button that copies the text from the textarea."
153
153
  msgid "Copy"
154
- msgstr ""
154
+ msgstr "Kopiraj"
155
155
 
156
156
  msgctxt "The label for the button that submits the entered AI prompt."
157
157
  msgid "Submit"
@@ -159,47 +159,47 @@ msgstr "Pošalji"
159
159
 
160
160
  msgctxt "The label for the button that inserts the generated AI response below the current selection."
161
161
  msgid "Insert below"
162
- msgstr ""
162
+ msgstr "Umetni ispod"
163
163
 
164
164
  msgctxt "The label for the button that repeats the request to AI."
165
165
  msgid "Try again"
166
- msgstr ""
166
+ msgstr "Pokušaj ponovo"
167
167
 
168
168
  msgctxt "The label for the button that stops the generating of the content by AI."
169
169
  msgid "Stop"
170
- msgstr ""
170
+ msgstr "Zaustavi"
171
171
 
172
172
  msgctxt "The label that indicates the AI is generating content."
173
173
  msgid "AI is writing..."
174
- msgstr ""
174
+ msgstr "AI piše…"
175
175
 
176
176
  msgctxt "The label of the button that toggles the prompt history pane in the AI balloon."
177
177
  msgid "History"
178
- msgstr ""
178
+ msgstr "Istorija"
179
179
 
180
180
  msgctxt "The primary information text displayed when the prompt history is empty."
181
181
  msgid "Empty history"
182
- msgstr ""
182
+ msgstr "Istorija je prazna"
183
183
 
184
184
  msgctxt "The secondary information text displayed when the prompt history is empty."
185
185
  msgid "Ask AI and your prompts will be listed here for you to use later."
186
- msgstr ""
186
+ msgstr "Zatražite od AI i vaši upiti će biti navedeni ovde kako biste ih koristili kasnije."
187
187
 
188
188
  msgctxt "The label of the list group that hosts historical user prompts in the AI balloon."
189
189
  msgid "Prompt history"
190
- msgstr ""
190
+ msgstr "Istorija upita"
191
191
 
192
192
  msgctxt "The placeholder for the search input to filter the AI commands."
193
193
  msgid "Search AI command"
194
- msgstr ""
194
+ msgstr "Komanda za AI pretragu"
195
195
 
196
196
  msgctxt "The message displayed when the commands search input does not match any AI commands."
197
197
  msgid "No commands found"
198
- msgstr ""
198
+ msgstr "Nije pronađena nijedna komanda"
199
199
 
200
200
  msgctxt "The message displayed when there are no AI commands available in the commands dropdown."
201
201
  msgid "No commands available"
202
- msgstr ""
202
+ msgstr "Nije dostupna nijedna komanda"
203
203
 
204
204
  msgctxt "The label for the button that replaces the selected content by the generated AI response."
205
205
  msgid "AI_REPLACE_CONTENT"
@@ -209,18 +209,18 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Ubaci"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
214
  msgstr ""
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
218
- msgstr ""
218
+ msgstr "Izabrani sadržaj je predugačak​"
219
219
 
220
220
  msgctxt "Error message displayed when a request is abusive, harmful or hateful and was rejected due to moderation rules."
221
221
  msgid "AI_ERROR_MODERATION"
222
- msgstr ""
222
+ msgstr "Zahtevani upit ne prolazi pravila moderiranja​"
223
223
 
224
224
  msgctxt "Generic error message displayed when the request failed for unspecified reason."
225
225
  msgid "AI_ERROR_FAILED"
226
- msgstr ""
226
+ msgstr "Komunikacija sa AI uslugom nije uspela"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Убаци"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "Zahtev za autorizaciju nije uspeo​"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "Priprema zahteva zaglavlja nije uspela"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Infoga"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "Begäran om auktorisering misslyckades"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "Förbereder-förfrågan-rubriker misslyckades"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "แทรก"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "คำขออนุมัติล้มเหลว"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "การเตรียมส่วนหัวของคำขอล้มเหลว"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,8 +209,8 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr ""
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
214
  msgstr ""
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Ekle"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "Yetkilendirme isteği başarısız"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "İstek başlıklarının hazırlanması başarısız oldu."
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -95,43 +95,43 @@ msgstr "شېئىرىي"
95
95
 
96
96
  msgctxt "AI command group label for translating the content."
97
97
  msgid "Translate"
98
- msgstr ""
98
+ msgstr "تەرجىمە"
99
99
 
100
100
  msgctxt "Label for the AI command. Example: (Translate to) English"
101
101
  msgid "Translate to %0"
102
- msgstr ""
102
+ msgstr "%0 غا تەرجىمە قىل"
103
103
 
104
104
  msgctxt "Translate to (English)"
105
105
  msgid "English"
106
- msgstr ""
106
+ msgstr "ئىنگلىزچە"
107
107
 
108
108
  msgctxt "Translate to (Spanish)"
109
109
  msgid "Spanish"
110
- msgstr ""
110
+ msgstr "ئىسپانچە"
111
111
 
112
112
  msgctxt "Translate to (German)"
113
113
  msgid "German"
114
- msgstr ""
114
+ msgstr "گېرمانچە"
115
115
 
116
116
  msgctxt "Translate to (Portuguese)"
117
117
  msgid "Portuguese"
118
- msgstr ""
118
+ msgstr "پورتۇگالچە"
119
119
 
120
120
  msgctxt "Translate to (French)"
121
121
  msgid "French"
122
- msgstr ""
122
+ msgstr "فىرانسۇزچە"
123
123
 
124
124
  msgctxt "Translate to (Simplified Chinese)"
125
125
  msgid "Simplified Chinese"
126
- msgstr ""
126
+ msgstr "ئاددى خەنچە"
127
127
 
128
128
  msgctxt "Translate to (Hindi)"
129
129
  msgid "Hindi"
130
- msgstr ""
130
+ msgstr "ھىندىچە"
131
131
 
132
132
  msgctxt "Translate to (Arabic)"
133
133
  msgid "Arabic"
134
- msgstr ""
134
+ msgstr "ئەرەبچە"
135
135
 
136
136
  msgctxt "The heading element name displayed in the AI balloon and the button tooltip that opens the balloon."
137
137
  msgid "AI Assistant"
@@ -207,19 +207,19 @@ msgstr "ئالماشتۇر"
207
207
 
208
208
  msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
- msgstr ""
210
+ msgstr "قىستۇر"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
214
  msgstr ""
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
218
- msgstr ""
218
+ msgstr "تاللانغان مەزمۇن بەك ئۇزۇن"
219
219
 
220
220
  msgctxt "Error message displayed when a request is abusive, harmful or hateful and was rejected due to moderation rules."
221
221
  msgid "AI_ERROR_MODERATION"
222
- msgstr ""
222
+ msgstr "ئىلتىماس قىلغان سۈرۈشتۈرۈش تەكشۈرۈش قائىدىسىگە ماس كەلمەيدۇ"
223
223
 
224
224
  msgctxt "Generic error message displayed when the request failed for unspecified reason."
225
225
  msgid "AI_ERROR_FAILED"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Вставити"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "Помилка запиту на авторизацію"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "Не вдалося підготувати заголовки запиту"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,8 +209,8 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr ""
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
214
  msgstr ""
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
@@ -209,8 +209,8 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Kiritish"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
214
  msgstr ""
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "Chèn"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "Yêu cầu cấp quyền thất bại"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "Chuẩn bị tiêu đề yêu cầu không thành công"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "插入"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "授权请求失败"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "准备请求头失败"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -209,9 +209,9 @@ msgctxt "The label for the button that inserts the generated AI response."
209
209
  msgid "AI_INSERT_CONTENT"
210
210
  msgstr "插入"
211
211
 
212
- msgctxt "Error message displayed when the authorization request fails."
213
- msgid "AI_ERROR_AUTH_REQUEST"
214
- msgstr "授權請求失敗"
212
+ msgctxt "Error message displayed when a function providing custom headers fails."
213
+ msgid "AI_ERROR_HEADERS"
214
+ msgstr "要求標頭準備失敗"
215
215
 
216
216
  msgctxt "Error message displayed when the content selected for AI processing is too long"
217
217
  msgid "AI_ERROR_CONTEXT_LENGTH"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ai",
3
- "version": "40.1.0",
3
+ "version": "40.2.0",
4
4
  "description": "AI-powered features for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,8 +23,9 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "ckeditor5": "40.1.0",
27
- "@ckeditor/ckeditor5-ui": "40.1.0",
26
+ "ckeditor5": "40.2.0",
27
+ "@aws-sdk/client-bedrock-runtime": "3.470.0",
28
+ "@ckeditor/ckeditor5-ui": "40.2.0",
28
29
  "lodash-es": "4.17.21"
29
30
  },
30
31
  "main": "src/index.js",
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module ai/adapters/aiadapter
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import type AITextAdapter from './aitextadapter';
11
+ /**
12
+ * Main adapter plugin that is a common interface between AI features and AI adapters.
13
+ *
14
+ * Various AI features require to make calls to AI services. On the other hand, there are various AI adapters that can be
15
+ * loaded, which provide access to different AI service providers.
16
+ *
17
+ * `AIAdapter` brings both parties together. Features use the `AIAdapter` API that is known to them. On the other hand, a concrete adapter
18
+ * implementation can inject itself into `AIAdapter`. This way features and adapters are decoupled.
19
+ *
20
+ * For example:
21
+ *
22
+ * * `AIAssistant` feature needs to make text AI requests, so it uses `AIAdapter#textAdapter`.
23
+ * * `OpenAITextAdapter` plugin, when loaded, sets itself as `AIAdapter#textAdapter`, so features can use it.
24
+ */
25
+ export default class AIAdapter extends Plugin {
26
+ /**
27
+ * The instance of the loaded AI text adapter instance.
28
+ *
29
+ * The adapter is provided by a different plugin that has to be additionally loaded.
30
+ */
31
+ textAdapter: AITextAdapter;
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get pluginName(): "AIAdapter";
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ afterInit(): void;
40
+ }
41
+ /**
42
+ * Error which may be thrown by various AI adapters.
43
+ *
44
+ * When this error is thrown it should be handled by the feature which used the adapter.
45
+ */
46
+ export declare class AIRequestError extends Error {
47
+ constructor(message: string);
48
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2023, 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
+ var _0x56a8=['name','textAdapter','AIRequestError','aiadapter-text-adapter-not-set','afterInit','AIAdapter','pluginName'];(function(_0x17d11f,_0x56a86a){var _0x272805=function(_0x1fc02f){while(--_0x1fc02f){_0x17d11f['push'](_0x17d11f['shift']());}};_0x272805(++_0x56a86a);}(_0x56a8,0xc8));var _0x2728=function(_0x17d11f,_0x56a86a){_0x17d11f=_0x17d11f-0x0;var _0x272805=_0x56a8[_0x17d11f];return _0x272805;};import{Plugin as _0x1ca293}from'ckeditor5/src/core';import{CKEditorError as _0x557522}from'ckeditor5/src/utils';export default class A extends _0x1ca293{static get[_0x2728('0x2')](){return _0x2728('0x1');}[_0x2728('0x0')](){if(!this[_0x2728('0x4')])throw new _0x557522(_0x2728('0x6'),null);}}export class AIRequestError extends Error{constructor(_0x461e0e){super(_0x461e0e),this[_0x2728('0x3')]=_0x2728('0x5');}}