adminforth 2.27.0-next.46 → 2.27.0-next.48
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/spa/src/components/Sidebar.vue +27 -6
- package/dist/spa/src/types/adapters/CompletionAdapter.ts +13 -2
- package/dist/spa/src/types/adapters/index.ts +2 -2
- package/dist/types/adapters/CompletionAdapter.d.ts +9 -2
- package/dist/types/adapters/CompletionAdapter.d.ts.map +1 -1
- package/dist/types/adapters/index.d.ts +1 -1
- package/dist/types/adapters/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -90,13 +90,15 @@
|
|
|
90
90
|
</svg>
|
|
91
91
|
</button>
|
|
92
92
|
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
|
|
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
|
-
|
|
99
|
-
|
|
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,3 +1,9 @@
|
|
|
1
|
+
export type CompletionStreamEvent = {
|
|
2
|
+
type: "output" | "reasoning";
|
|
3
|
+
delta: string;
|
|
4
|
+
text: string;
|
|
5
|
+
source?: "summary" | "text";
|
|
6
|
+
};
|
|
1
7
|
export interface CompletionAdapter {
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -11,14 +17,19 @@ export interface CompletionAdapter {
|
|
|
11
17
|
* @param content - The input text to complete
|
|
12
18
|
* @param maxTokens - The maximum number of tokens to generate
|
|
13
19
|
* @param outputSchema - Optional structured output schema for the response
|
|
14
|
-
* @param
|
|
20
|
+
* @param reasoningEffort - Optional parameter to indicate the level of reasoning effort for the completion
|
|
21
|
+
* @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
|
|
15
22
|
* @returns A promise that resolves to an object containing the completed text and other metadata
|
|
16
23
|
*/
|
|
17
24
|
complete(
|
|
18
25
|
content: string,
|
|
19
26
|
maxTokens: number,
|
|
20
27
|
outputSchema?: any,
|
|
21
|
-
|
|
28
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh',
|
|
29
|
+
onChunk?: (
|
|
30
|
+
chunk: string,
|
|
31
|
+
event?: CompletionStreamEvent,
|
|
32
|
+
) => void | Promise<void>,
|
|
22
33
|
): Promise<{
|
|
23
34
|
content?: string;
|
|
24
35
|
finishReason?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { EmailAdapter } from './EmailAdapter.js';
|
|
2
|
-
export type { CompletionAdapter } from './CompletionAdapter.js';
|
|
2
|
+
export type { CompletionAdapter, CompletionStreamEvent } from './CompletionAdapter.js';
|
|
3
3
|
export type { ImageGenerationAdapter } from './ImageGenerationAdapter.js';
|
|
4
4
|
export type { KeyValueAdapter } from './KeyValueAdapter.js';
|
|
5
5
|
export type { ImageVisionAdapter } from './ImageVisionAdapter.js';
|
|
6
6
|
export type { OAuth2Adapter } from './OAuth2Adapter.js';
|
|
7
7
|
export type { StorageAdapter } from './StorageAdapter.js';
|
|
8
|
-
export type { CaptchaAdapter } from './CaptchaAdapter.js';
|
|
8
|
+
export type { CaptchaAdapter } from './CaptchaAdapter.js';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export type CompletionStreamEvent = {
|
|
2
|
+
type: "output" | "reasoning";
|
|
3
|
+
delta: string;
|
|
4
|
+
text: string;
|
|
5
|
+
source?: "summary" | "text";
|
|
6
|
+
};
|
|
1
7
|
export interface CompletionAdapter {
|
|
2
8
|
/**
|
|
3
9
|
* This method is called to validate the configuration of the adapter
|
|
@@ -9,10 +15,11 @@ export interface CompletionAdapter {
|
|
|
9
15
|
* @param content - The input text to complete
|
|
10
16
|
* @param maxTokens - The maximum number of tokens to generate
|
|
11
17
|
* @param outputSchema - Optional structured output schema for the response
|
|
12
|
-
* @param
|
|
18
|
+
* @param reasoningEffort - Optional parameter to indicate the level of reasoning effort for the completion
|
|
19
|
+
* @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
|
|
13
20
|
* @returns A promise that resolves to an object containing the completed text and other metadata
|
|
14
21
|
*/
|
|
15
|
-
complete(content: string, maxTokens: number, outputSchema?: any, onChunk?: (chunk: string) => void | Promise<void>): Promise<{
|
|
22
|
+
complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
|
|
16
23
|
content?: string;
|
|
17
24
|
finishReason?: string;
|
|
18
25
|
error?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB
|
|
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,5 +1,5 @@
|
|
|
1
1
|
export type { EmailAdapter } from './EmailAdapter.js';
|
|
2
|
-
export type { CompletionAdapter } from './CompletionAdapter.js';
|
|
2
|
+
export type { CompletionAdapter, CompletionStreamEvent } from './CompletionAdapter.js';
|
|
3
3
|
export type { ImageGenerationAdapter } from './ImageGenerationAdapter.js';
|
|
4
4
|
export type { KeyValueAdapter } from './KeyValueAdapter.js';
|
|
5
5
|
export type { ImageVisionAdapter } from './ImageVisionAdapter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../types/adapters/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../types/adapters/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACvF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|