@adminforth/text-complete 2.0.6 → 2.0.8

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 CHANGED
@@ -10,5 +10,5 @@ custom/package.json
10
10
  custom/pnpm-lock.yaml
11
11
  custom/tsconfig.json
12
12
 
13
- sent 31,218 bytes received 115 bytes 62,666.00 bytes/sec
14
- total size is 30,798 speedup is 0.98
13
+ sent 31,371 bytes received 115 bytes 62,972.00 bytes/sec
14
+ total size is 30,945 speedup is 0.98
@@ -70,13 +70,18 @@
70
70
  </template>
71
71
 
72
72
  <script setup lang="ts">
73
- import { ref, onMounted, watch, Ref, computed } from 'vue';
73
+ import { ref, onMounted, watch, Ref, computed, defineAsyncComponent } from 'vue';
74
74
  import { callAdminForthApi } from '@/utils';
75
75
  import { AdminForthColumnCommon } from '@/types/Common';
76
76
  import { Spinner, Tooltip } from '@/afcl';
77
77
  import { IconMagic, IconCheck, IconArrowRightThin } from '@iconify-prerendered/vue-mdi';
78
- import SuggestionInput from 'vue-suggestion-input';
79
- import 'vue-suggestion-input/dist/style.css';
78
+
79
+
80
+ const SuggestionInput = defineAsyncComponent(async () => {
81
+ const { default: SuggestionInput } = await import('vue-suggestion-input');
82
+ await import('vue-suggestion-input/dist/style.css');
83
+ return SuggestionInput;
84
+ });
80
85
 
81
86
  const props = defineProps<{
82
87
  column: AdminForthColumnCommon,
@@ -70,13 +70,18 @@
70
70
  </template>
71
71
 
72
72
  <script setup lang="ts">
73
- import { ref, onMounted, watch, Ref, computed } from 'vue';
73
+ import { ref, onMounted, watch, Ref, computed, defineAsyncComponent } from 'vue';
74
74
  import { callAdminForthApi } from '@/utils';
75
75
  import { AdminForthColumnCommon } from '@/types/Common';
76
76
  import { Spinner, Tooltip } from '@/afcl';
77
77
  import { IconMagic, IconCheck, IconArrowRightThin } from '@iconify-prerendered/vue-mdi';
78
- import SuggestionInput from 'vue-suggestion-input';
79
- import 'vue-suggestion-input/dist/style.css';
78
+
79
+
80
+ const SuggestionInput = defineAsyncComponent(async () => {
81
+ const { default: SuggestionInput } = await import('vue-suggestion-input');
82
+ await import('vue-suggestion-input/dist/style.css');
83
+ return SuggestionInput;
84
+ });
80
85
 
81
86
  const props = defineProps<{
82
87
  column: AdminForthColumnCommon,
package/dist/index.js CHANGED
@@ -120,7 +120,7 @@ export default class TextCompletePlugin extends AdminForthPlugin {
120
120
  }
121
121
  }
122
122
  process.env.HEAVY_DEBUG && console.log('🪲 OpenAI Prompt 🧠', content);
123
- const { content: respContent } = yield this.options.adapter.complete(content, [], (_l = this.options.expert) === null || _l === void 0 ? void 0 : _l.maxTokens);
123
+ const { content: respContent } = yield this.options.adapter.complete(content, (_l = this.options.expert) === null || _l === void 0 ? void 0 : _l.maxTokens);
124
124
  let suggestion = respContent;
125
125
  if (suggestion.startsWith(currentVal)) {
126
126
  suggestion = suggestion.slice(currentVal.length);
package/index.ts CHANGED
@@ -145,7 +145,7 @@ export default class TextCompletePlugin extends AdminForthPlugin {
145
145
  }
146
146
 
147
147
  process.env.HEAVY_DEBUG && console.log('🪲 OpenAI Prompt 🧠', content);
148
- const { content: respContent } = await this.options.adapter.complete(content, [], this.options.expert?.maxTokens);
148
+ const { content: respContent } = await this.options.adapter.complete(content, this.options.expert?.maxTokens);
149
149
  let suggestion = respContent
150
150
 
151
151
  if (suggestion.startsWith(currentVal)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/text-complete",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "Text completion plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,7 @@
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.10.7",
27
+ "adminforth": "^2.35.0",
27
28
  "semantic-release": "^24.2.1",
28
29
  "semantic-release-slack-bot": "^4.0.2",
29
30
  "typescript": "^5.7.3"
@@ -54,6 +55,6 @@
54
55
  ]
55
56
  },
56
57
  "peerDependencies": {
57
- "adminforth": "^2.30.0"
58
+ "adminforth": "^2.35.0"
58
59
  }
59
60
  }