@adminforth/agent 1.43.19 → 1.43.20
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/custom/chat.ts +3 -2
- package/custom/composables/agentStore/useAgentChat.ts +2 -1
- package/custom/composables/agentStore/useAgentSessions.ts +1 -2
- package/custom/speech_recognition_frontend/voiceActivityDetection.ts +2 -2
- package/dist/custom/chat.ts +3 -2
- package/dist/custom/composables/agentStore/useAgentChat.ts +2 -1
- package/dist/custom/composables/agentStore/useAgentSessions.ts +1 -2
- package/dist/custom/speech_recognition_frontend/voiceActivityDetection.ts +2 -2
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -62,5 +62,5 @@ custom/speech_recognition_frontend/voiceActivityDetection.ts
|
|
|
62
62
|
custom/speech_recognition_frontend/types/
|
|
63
63
|
custom/speech_recognition_frontend/types/voice-activity-detection.d.ts
|
|
64
64
|
|
|
65
|
-
sent 1,666,
|
|
66
|
-
total size is 1,661,
|
|
65
|
+
sent 1,666,147 bytes received 921 bytes 3,334,136.00 bytes/sec
|
|
66
|
+
total size is 1,661,994 speedup is 1.00
|
package/custom/chat.ts
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
* Or resolve the circular module initialization issue in a better way
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
AbstractChat,
|
|
14
|
+
import type {
|
|
16
15
|
ChatInit as BaseChatInit,
|
|
17
16
|
ChatState,
|
|
18
17
|
ChatStatus,
|
|
@@ -20,6 +19,8 @@ import {
|
|
|
20
19
|
} from 'ai';
|
|
21
20
|
import { Ref, ref } from 'vue';
|
|
22
21
|
|
|
22
|
+
const { AbstractChat } = await import('ai');
|
|
23
|
+
|
|
23
24
|
class VueChatState<
|
|
24
25
|
UI_MESSAGE extends UIMessage,
|
|
25
26
|
> implements ChatState<UI_MESSAGE> {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DefaultChatTransport } from 'ai';
|
|
1
|
+
// import { DefaultChatTransport } from 'ai';
|
|
2
2
|
import { shallowRef, type Ref } from 'vue';
|
|
3
3
|
import { Chat } from '../../chat';
|
|
4
4
|
import { getCurrentPageContext } from './pageContext';
|
|
5
|
+
const { DefaultChatTransport } = await import('ai');
|
|
5
6
|
|
|
6
7
|
type AgentImportMeta = ImportMeta & {
|
|
7
8
|
env: {
|
|
@@ -3,7 +3,6 @@ import { callAdminForthApi } from '@/utils';
|
|
|
3
3
|
import type { Chat } from '../../chat';
|
|
4
4
|
import type { IAgentSession, ISessionsListItem, IPart } from '../../types';
|
|
5
5
|
import { PRE_SESSION_ID } from './constants';
|
|
6
|
-
import { ChatStatus } from 'ai';
|
|
7
6
|
import { useI18n } from 'vue-i18n';
|
|
8
7
|
|
|
9
8
|
type AdminforthLike = {
|
|
@@ -325,7 +324,7 @@ export function createAgentSessionManager({
|
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
326
|
|
|
328
|
-
function setCurrentChatStatus(status:
|
|
327
|
+
function setCurrentChatStatus(status: any) { // ChatStatus type
|
|
329
328
|
(currentChat.value as any)?.setStatus({status});
|
|
330
329
|
}
|
|
331
330
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { MicVAD, utils } = await import("@ricky0123/vad-web");
|
|
2
2
|
|
|
3
|
-
let VADInstance:
|
|
3
|
+
let VADInstance: any = null;
|
|
4
4
|
let recordedAudioChunks: Float32Array[] = [];
|
|
5
5
|
let onVoiceStopCallback: () => void = () => {};
|
|
6
6
|
let onVoiceStartCallback: () => void = () => {};
|
package/dist/custom/chat.ts
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
* Or resolve the circular module initialization issue in a better way
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
AbstractChat,
|
|
14
|
+
import type {
|
|
16
15
|
ChatInit as BaseChatInit,
|
|
17
16
|
ChatState,
|
|
18
17
|
ChatStatus,
|
|
@@ -20,6 +19,8 @@ import {
|
|
|
20
19
|
} from 'ai';
|
|
21
20
|
import { Ref, ref } from 'vue';
|
|
22
21
|
|
|
22
|
+
const { AbstractChat } = await import('ai');
|
|
23
|
+
|
|
23
24
|
class VueChatState<
|
|
24
25
|
UI_MESSAGE extends UIMessage,
|
|
25
26
|
> implements ChatState<UI_MESSAGE> {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DefaultChatTransport } from 'ai';
|
|
1
|
+
// import { DefaultChatTransport } from 'ai';
|
|
2
2
|
import { shallowRef, type Ref } from 'vue';
|
|
3
3
|
import { Chat } from '../../chat';
|
|
4
4
|
import { getCurrentPageContext } from './pageContext';
|
|
5
|
+
const { DefaultChatTransport } = await import('ai');
|
|
5
6
|
|
|
6
7
|
type AgentImportMeta = ImportMeta & {
|
|
7
8
|
env: {
|
|
@@ -3,7 +3,6 @@ import { callAdminForthApi } from '@/utils';
|
|
|
3
3
|
import type { Chat } from '../../chat';
|
|
4
4
|
import type { IAgentSession, ISessionsListItem, IPart } from '../../types';
|
|
5
5
|
import { PRE_SESSION_ID } from './constants';
|
|
6
|
-
import { ChatStatus } from 'ai';
|
|
7
6
|
import { useI18n } from 'vue-i18n';
|
|
8
7
|
|
|
9
8
|
type AdminforthLike = {
|
|
@@ -325,7 +324,7 @@ export function createAgentSessionManager({
|
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
326
|
|
|
328
|
-
function setCurrentChatStatus(status:
|
|
327
|
+
function setCurrentChatStatus(status: any) { // ChatStatus type
|
|
329
328
|
(currentChat.value as any)?.setStatus({status});
|
|
330
329
|
}
|
|
331
330
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const { MicVAD, utils } = await import("@ricky0123/vad-web");
|
|
2
2
|
|
|
3
|
-
let VADInstance:
|
|
3
|
+
let VADInstance: any = null;
|
|
4
4
|
let recordedAudioChunks: Float32Array[] = [];
|
|
5
5
|
let onVoiceStopCallback: () => void = () => {};
|
|
6
6
|
let onVoiceStartCallback: () => void = () => {};
|