@adminforth/rich-editor 2.0.3 → 2.0.5
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/build.log +2 -2
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +3 -2
- package/types.ts +3 -1
package/build.log
CHANGED
|
@@ -10,5 +10,5 @@ custom/package.json
|
|
|
10
10
|
custom/quillEditor.vue
|
|
11
11
|
custom/tsconfig.json
|
|
12
12
|
|
|
13
|
-
sent 35,
|
|
14
|
-
total size is 35,088 speedup is 0.
|
|
13
|
+
sent 35,511 bytes received 115 bytes 71,252.00 bytes/sec
|
|
14
|
+
total size is 35,088 speedup is 0.98
|
package/dist/index.js
CHANGED
|
@@ -257,7 +257,7 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
257
257
|
"Be short, clear and precise. No quotes. Don't talk to me. Just write text. Stop generating when you finish the sentence. DO NOT GENERATE AFTER YOU GENERATED FIRST\".\" \n";
|
|
258
258
|
}
|
|
259
259
|
process.env.HEAVY_DEBUG && console.log('🪲 OpenAI Prompt 🧠', content);
|
|
260
|
-
const { content: respContent } = yield this.options.completion.adapter.complete(content,
|
|
260
|
+
const { content: respContent } = yield this.options.completion.adapter.complete(content, (_m = (_l = this.options.completion) === null || _l === void 0 ? void 0 : _l.expert) === null || _m === void 0 ? void 0 : _m.maxTokens);
|
|
261
261
|
let suggestion = respContent;
|
|
262
262
|
if (suggestion.startsWith(currentVal)) {
|
|
263
263
|
suggestion = suggestion.slice(currentVal.length);
|
package/index.ts
CHANGED
|
@@ -324,7 +324,7 @@ export default class RichEditorPlugin extends AdminForthPlugin {
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
process.env.HEAVY_DEBUG && console.log('🪲 OpenAI Prompt 🧠', content);
|
|
327
|
-
const { content: respContent } = await this.options.completion.adapter.complete(content,
|
|
327
|
+
const { content: respContent } = await this.options.completion.adapter.complete(content, this.options.completion?.expert?.maxTokens);
|
|
328
328
|
let suggestion = respContent
|
|
329
329
|
if (suggestion.startsWith(currentVal)) {
|
|
330
330
|
suggestion = suggestion.slice(currentVal.length);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/rich-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Rich editor plugin for adminforth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"cheerio": "^1.0.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"adminforth": "^2.
|
|
29
|
+
"adminforth": "^2.35.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.10.7",
|
|
33
|
+
"adminforth": "^2.35.0",
|
|
33
34
|
"semantic-release": "^24.2.1",
|
|
34
35
|
"semantic-release-slack-bot": "^4.0.2",
|
|
35
36
|
"typescript": "^5.7.3"
|
package/types.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CompletionAdapter } from "adminforth";
|
|
2
|
+
import {type PluginsCommonOptions } from "adminforth";
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
// example options ussage:
|
|
4
6
|
//{
|
|
@@ -15,7 +17,7 @@ import { CompletionAdapter } from "adminforth";
|
|
|
15
17
|
// }
|
|
16
18
|
//}
|
|
17
19
|
|
|
18
|
-
export interface PluginOptions {
|
|
20
|
+
export interface PluginOptions extends PluginsCommonOptions {
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Field where plugin will auto-complete text. Should be string or text field.
|