@ckeditor/ckeditor5-ai 48.4.0-alpha.6 → 48.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aiconfig.d.ts +0 -3
- package/dist/aicore/model/aicontextlibrary.d.ts +7 -6
- package/dist/aicore/model/aicontextref.d.ts +0 -3
- package/dist/aicore/model/aidefaultcontext.d.ts +2 -14
- package/dist/aicore/model/airunresult.d.ts +3 -0
- package/dist/aicore/model/airunsinglerootresult.d.ts +3 -0
- package/dist/index.js +19 -19
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +29 -29
package/dist/aiconfig.d.ts
CHANGED
|
@@ -84,9 +84,6 @@ export interface AIConfig {
|
|
|
84
84
|
* ```
|
|
85
85
|
*
|
|
86
86
|
* Read more in {@link module:ai/aicore/model/aidefaultcontext~AIDefaultContext}.
|
|
87
|
-
*
|
|
88
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
89
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
90
87
|
*/
|
|
91
88
|
defaultContext?: AIDefaultContext;
|
|
92
89
|
/**
|
|
@@ -48,17 +48,18 @@ export declare class AIContextLibrary {
|
|
|
48
48
|
* quick action's or review check's own `context`, or the contexts injected into a chat conversation), and adds the
|
|
49
49
|
* result to `context`.
|
|
50
50
|
*
|
|
51
|
-
* The caller passes its own context model, so a feature can resolve straight into it
|
|
51
|
+
* The caller passes its own context model, so a feature can resolve straight into it - for example
|
|
52
52
|
* {@link module:ai/aichat/model/aichatcontext~AIChatContext} for chat, or a fresh
|
|
53
53
|
* {@link module:ai/aicore/model/aicontext~AIContext} for review, translate and quick actions.
|
|
54
54
|
*
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
55
|
+
* @param options Options of the resolution.
|
|
56
|
+
* @param options.feature The feature the context is resolved for.
|
|
57
|
+
* @param options.ids The IDs matched against a feature's `RegExp` filter.
|
|
58
|
+
* @param options.extraContexts References to append after the resolved default context, in order.
|
|
59
|
+
* @param options.idScopedOnly When set, resolves only the entries that the given `IDs` make applicable.
|
|
59
60
|
* Used to add the id-specific increment to a context that already carries the
|
|
60
61
|
* always-applicable default context.
|
|
61
|
-
* @param context The context to add the resolved references to. Returned as-is for chaining.
|
|
62
|
+
* @param options.context The context to add the resolved references to. Returned as-is for chaining.
|
|
62
63
|
*/
|
|
63
64
|
resolveContext<T extends AIContext>({ feature, ids, extraContexts, idScopedOnly, context }: {
|
|
64
65
|
feature: AIDefaultContextFeature;
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
* * `{ id }` — attaches all prompts and files from the context.
|
|
13
13
|
* * `{ id, fileId }` — attaches a single file from the context.
|
|
14
14
|
* * `{ id, promptId }` — attaches a single prompt from the context.
|
|
15
|
-
*
|
|
16
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
17
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
18
15
|
*/
|
|
19
16
|
export type AIContextRef = {
|
|
20
17
|
id: string;
|
|
@@ -10,9 +10,6 @@ import { type AIContextRef } from "./aicontextref.js";
|
|
|
10
10
|
/**
|
|
11
11
|
* Identifiers of the AI features that a {@link module:ai/aicore/model/aidefaultcontext~AIDefaultContextEntry
|
|
12
12
|
* default context entry} can target.
|
|
13
|
-
*
|
|
14
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
15
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
16
13
|
*/
|
|
17
14
|
export type AIDefaultContextFeature = "chat" | "quickActions" | "review" | "translate";
|
|
18
15
|
/**
|
|
@@ -32,15 +29,12 @@ export type AIDefaultContextFeature = "chat" | "quickActions" | "review" | "tran
|
|
|
32
29
|
* * `translate` - the ID of the target language.
|
|
33
30
|
*
|
|
34
31
|
* ```ts
|
|
35
|
-
* // Attach to all review commands, but only to the
|
|
32
|
+
* // Attach to all review commands, but only to the translate quick actions.
|
|
36
33
|
* {
|
|
37
34
|
* review: true,
|
|
38
|
-
* quickActions: /^translate
|
|
35
|
+
* quickActions: /^translate/
|
|
39
36
|
* }
|
|
40
37
|
* ```
|
|
41
|
-
*
|
|
42
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
43
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
44
38
|
*/
|
|
45
39
|
export interface AIDefaultContextFeatures {
|
|
46
40
|
/**
|
|
@@ -72,9 +66,6 @@ export interface AIDefaultContextFeatures {
|
|
|
72
66
|
*
|
|
73
67
|
* It is a {@link module:ai/aicore/model/aicontextref~AIContextRef context reference} optionally narrowed down to
|
|
74
68
|
* specific features via `features`. When `features` is omitted, the entry is attached to **every** AI feature.
|
|
75
|
-
*
|
|
76
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
77
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
78
69
|
*/
|
|
79
70
|
export type AIDefaultContextEntry = AIContextRef & {
|
|
80
71
|
/**
|
|
@@ -88,8 +79,5 @@ export type AIDefaultContextEntry = AIContextRef & {
|
|
|
88
79
|
* A list of {@link module:ai/aicore/model/aidefaultcontext~AIDefaultContextEntry context references} attached
|
|
89
80
|
* automatically to AI feature invocations triggered through the editor UI. Each entry can target all features or a
|
|
90
81
|
* subset of them. The headless gateway APIs are config-independent and do not apply it.
|
|
91
|
-
*
|
|
92
|
-
* @experimental **Experimental:** This is a production-ready API but may change in minor releases
|
|
93
|
-
* without the standard deprecation policy. Check the changelog for migration guidance.
|
|
94
82
|
*/
|
|
95
83
|
export type AIDefaultContext = Array<AIDefaultContextEntry>;
|
|
@@ -29,6 +29,9 @@ export declare class AIRunResult<SubResultType extends AIRunSingleRootResult = A
|
|
|
29
29
|
set status(value: AIRunStatus);
|
|
30
30
|
/**
|
|
31
31
|
* The error that caused the whole run to fail. Undefined when the run completed successfully or was aborted.
|
|
32
|
+
*
|
|
33
|
+
* When the failure originated in the AI service backend, its structured response (for example, an `issues`
|
|
34
|
+
* list describing which fields failed validation) is available under `error.data.backendData`.
|
|
32
35
|
*/
|
|
33
36
|
get error(): Error | undefined;
|
|
34
37
|
set error(value: CKEditorError);
|
|
@@ -85,6 +85,9 @@ export declare class AIRunSingleRootResult {
|
|
|
85
85
|
get contentNew(): string;
|
|
86
86
|
/**
|
|
87
87
|
* The error that caused the run to fail.
|
|
88
|
+
*
|
|
89
|
+
* When the failure originated in the AI service backend, its structured response (for example, an `issues`
|
|
90
|
+
* list describing which fields failed validation) is available under `error.data.backendData`.
|
|
88
91
|
*/
|
|
89
92
|
get error(): Error | undefined;
|
|
90
93
|
set error(value: CKEditorError | undefined);
|