adminforth 2.27.0-next.47 → 2.27.0-next.49

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.
@@ -90,13 +90,15 @@
90
90
  </svg>
91
91
  </button>
92
92
 
93
- <ul :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-1 space-y-1" :class="{ 'hidden': !opened.includes(i) }">
94
- <template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
95
- <li class="af-sidebar-menu-link">
96
- <MenuLink :item="child" isChild="true" @click="$emit('hideSidebar')"/>
93
+ <transition name="slow-drop">
94
+ <ul v-show="opened.includes(i)" :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-1 space-y-1 overflow-hidden">
95
+ <template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
96
+ <li class="af-sidebar-menu-link">
97
+ <MenuLink :item="child" isChild="true" @click="$emit('hideSidebar')"/>
97
98
  </li>
98
- </template>
99
- </ul>
99
+ </template>
100
+ </ul>
101
+ </transition>
100
102
  </li>
101
103
  <li v-else class="af-sidebar-menu-link">
102
104
  <MenuLink :item="item" @click="$emit('hideSidebar')"/>
@@ -292,6 +294,25 @@
292
294
  background-color: rgba(75, 85, 99, 0.4);
293
295
  }
294
296
 
297
+ /* Custom animation for dropdown */
298
+ .slow-drop-enter-active,
299
+ .slow-drop-leave-active {
300
+ overflow: hidden;
301
+ transition: opacity 0.2s ease, transform 0.2s ease;
302
+ }
303
+
304
+ .slow-drop-enter-from,
305
+ .slow-drop-leave-to {
306
+ opacity: 0;
307
+ transform: translateY(-4px);
308
+ }
309
+
310
+ .slow-drop-enter-to,
311
+ .slow-drop-leave-from {
312
+ opacity: 1;
313
+ transform: translateY(0);
314
+ }
315
+
295
316
  /* For browsers that support overlay scrollbars natively */
296
317
  @supports (overflow: overlay) {
297
318
  .sidebar-scroll {
@@ -1,9 +1,18 @@
1
+ import type { JSONSchemaType } from "ajv";
2
+
1
3
  export type CompletionStreamEvent = {
2
4
  type: "output" | "reasoning";
3
5
  delta: string;
4
6
  text: string;
5
7
  source?: "summary" | "text";
6
8
  };
9
+
10
+ export type CompletionTool<Input = Record<string, any>, Output = any> = {
11
+ name: string;
12
+ input_schema: JSONSchemaType<Input>;
13
+ description?: string;
14
+ handler: (input: Input) => Promise<Output> | Output;
15
+ };
7
16
  export interface CompletionAdapter {
8
17
 
9
18
  /**
@@ -26,6 +35,7 @@ export interface CompletionAdapter {
26
35
  maxTokens: number,
27
36
  outputSchema?: any,
28
37
  reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh',
38
+ tools?: CompletionTool[],
29
39
  onChunk?: (
30
40
  chunk: string,
31
41
  event?: CompletionStreamEvent,
@@ -1,9 +1,16 @@
1
+ import type { JSONSchemaType } from "ajv";
1
2
  export type CompletionStreamEvent = {
2
3
  type: "output" | "reasoning";
3
4
  delta: string;
4
5
  text: string;
5
6
  source?: "summary" | "text";
6
7
  };
8
+ export type CompletionTool<Input = Record<string, any>, Output = any> = {
9
+ name: string;
10
+ input_schema: JSONSchemaType<Input>;
11
+ description?: string;
12
+ handler: (input: Input) => Promise<Output> | Output;
13
+ };
7
14
  export interface CompletionAdapter {
8
15
  /**
9
16
  * This method is called to validate the configuration of the adapter
@@ -19,7 +26,7 @@ export interface CompletionAdapter {
19
26
  * @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
20
27
  * @returns A promise that resolves to an object containing the completed text and other metadata
21
28
  */
22
- complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
29
+ complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', tools?: CompletionTool[], onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
23
30
  content?: string;
24
31
  finishReason?: string;
25
32
  error?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC;AACF,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,EAClB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC1E,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,qBAAqB,KAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACxB,OAAO,CAAC;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/D"}
1
+ {"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,IAAI;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACrD,CAAC;AACF,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,EAClB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC1E,KAAK,CAAC,EAAE,cAAc,EAAE,EACxB,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,qBAAqB,KAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACxB,OAAO,CAAC;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.47",
3
+ "version": "2.27.0-next.49",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -73,6 +73,7 @@
73
73
  "@inquirer/prompts": "^7.4.1",
74
74
  "@qdrant/js-client-rest": "^1.17.0",
75
75
  "@types/express": "^4.17.21",
76
+ "ajv": "^8.18.0",
76
77
  "arg": "^5.0.2",
77
78
  "ast-types": "^0.14.2",
78
79
  "better-sqlite3": "^11.10.0",