@adminforth/agent 1.43.12 → 1.43.14

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
@@ -60,5 +60,5 @@ custom/speech_recognition_frontend/voiceActivityDetection.ts
60
60
  custom/speech_recognition_frontend/types/
61
61
  custom/speech_recognition_frontend/types/voice-activity-detection.d.ts
62
62
 
63
- sent 1,664,000 bytes received 883 bytes 3,329,766.00 bytes/sec
64
- total size is 1,659,985 speedup is 1.00
63
+ sent 1,664,782 bytes received 883 bytes 3,331,330.00 bytes/sec
64
+ total size is 1,660,823 speedup is 1.00
@@ -1,3 +1,5 @@
1
+ import { loadFile } from '@/utils';
2
+
1
3
  const ctx = new AudioContext();
2
4
  let standbySource: AudioBufferSourceNode | null = null;
3
5
  let isAudioUnlocked = false;
@@ -37,7 +39,7 @@ export async function unlockAudio() {
37
39
 
38
40
  export async function startStandByAudio() {
39
41
  const response = await fetch(
40
- `${import.meta.env.VITE_ADMINFORTH_PUBLIC_PATH}/plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3`
42
+ loadFile('plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3')
41
43
  );
42
44
 
43
45
  const arrayBuffer = await response.arrayBuffer();
@@ -68,13 +68,14 @@
68
68
 
69
69
  <script setup lang="ts">
70
70
  import type { IMessage } from '../types';
71
- import { useTemplateRef, ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
71
+ import { useTemplateRef, ref, onMounted, onUnmounted, watch, nextTick, defineAsyncComponent } from 'vue';
72
72
  import { IconArrowDownOutline } from '@iconify-prerendered/vue-flowbite';
73
73
  import SessionsHistory from '../SessionsHistory.vue';
74
74
  import { useAgentStore } from '../composables/useAgentStore';
75
75
  import { useAgentTransitions } from '../composables/useAgentTransitions';
76
76
  import MessageRenderer from './MessageRenderer.vue';
77
- import CustomAutoScrollContainer from '../CustomAutoScrollContainer.vue';
77
+
78
+ const CustomAutoScrollContainer = defineAsyncComponent(() => import('../CustomAutoScrollContainer.vue'));
78
79
 
79
80
  const props = defineProps<{
80
81
  messages: IMessage[]
@@ -1,12 +1,22 @@
1
1
  <template>
2
- <template v-if="ToolOrReasoningParts.length > 0 || isResponseInProgress || showFakeThinkingMessage">
2
+ <template v-if="ToolOrReasoningParts.length > 0 || inProgress">
3
3
  <div
4
- class="ml-2 px-4 flex items-center gap-1 cursor-pointer select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
4
+ class="shine-text-container ml-2 px-4 flex items-center gap-1 cursor-pointer select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
5
5
  @click="isExpanded = !isExpanded"
6
6
  >
7
- {{ $t('Thoughts') }}
7
+ <p
8
+ :class="[
9
+ inProgress ? `
10
+ shine-text text-listTableHeadingText dark:text-darkListTableHeadingText
11
+ bg-[linear-gradient(-65deg,currentColor,_rgb(120,120,120)_50%,currentColor)]
12
+ dark:bg-[linear-gradient(-65deg,currentColor,_rgb(250,250,250,0.8)_70%,currentColor)]
13
+ `
14
+ : '']"
15
+ >
16
+ {{ $t('Thoughts') }}
17
+ </p>
8
18
  <span v-if="thinkingDuration > 0">({{ (thinkingDuration/1000).toFixed(2) }} s)</span>
9
- <ThreeDotsAnimation v-if="isResponseInProgress || showFakeThinkingMessage" />
19
+ <!-- <ThreeDotsAnimation v-if="inProgress" /> -->
10
20
  <IconAngleDownOutline
11
21
  :class="isExpanded ? 'rotate-180' : 'rotate-0'"
12
22
  class="transition-transform duration-200"
@@ -40,14 +50,15 @@
40
50
 
41
51
  <script setup lang="ts">
42
52
  import type { IFormattedToolCallPart, IMessage, IPart, IToolGroup } from '../types';
43
- import { ref, computed, watch, onUnmounted, onMounted } from 'vue';
53
+ import { ref, computed, watch, onUnmounted, onMounted, defineAsyncComponent } from 'vue';
44
54
  import ReasoningRenderer from './ReasoningRenderer.vue';
45
55
  import { IconAngleDownOutline } from '@iconify-prerendered/vue-flowbite';
46
56
  import ThreeDotsAnimation from './ThreeDotsAnimation.vue';
47
57
  import { useAgentStore } from '../composables/useAgentStore';
48
58
  import { getMessageParts } from '../utils';
49
59
  import ToolsGroup from './ToolsGroup.vue';
50
- import CustomAutoScrollContainer from '../CustomAutoScrollContainer.vue';
60
+
61
+ const CustomAutoScrollContainer = defineAsyncComponent(() => import('../CustomAutoScrollContainer.vue'));
51
62
 
52
63
  const props = defineProps<{
53
64
  message: IMessage
@@ -73,6 +84,10 @@
73
84
  return false;
74
85
  })
75
86
 
87
+ const inProgress = computed(() => {
88
+ return isResponseInProgress.value || showFakeThinkingMessage.value;
89
+ })
90
+
76
91
  onMounted(() => {
77
92
  thinkingStartTime.value = Date.now();
78
93
  if (isResponseInProgress.value) {
@@ -224,5 +239,24 @@
224
239
  max-height: 192px;
225
240
  }
226
241
  }
227
-
242
+
243
+
244
+ .shine-text {
245
+
246
+ background-clip: text;
247
+ -webkit-background-clip: text;
248
+ -webkit-text-fill-color: transparent;
249
+ background-position: -12rem;
250
+ }
251
+
252
+ .shine-text {
253
+ animation: shineText 6s infinite linear;
254
+ }
255
+
256
+ @keyframes shineText {
257
+ to {
258
+ background-position: -100%;
259
+ }
260
+ }
261
+
228
262
  </style>
@@ -1,3 +1,5 @@
1
+ import { loadFile } from '@/utils';
2
+
1
3
  const ctx = new AudioContext();
2
4
  let standbySource: AudioBufferSourceNode | null = null;
3
5
  let isAudioUnlocked = false;
@@ -37,7 +39,7 @@ export async function unlockAudio() {
37
39
 
38
40
  export async function startStandByAudio() {
39
41
  const response = await fetch(
40
- `${import.meta.env.VITE_ADMINFORTH_PUBLIC_PATH}/plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3`
42
+ loadFile('plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3')
41
43
  );
42
44
 
43
45
  const arrayBuffer = await response.arrayBuffer();
@@ -68,13 +68,14 @@
68
68
 
69
69
  <script setup lang="ts">
70
70
  import type { IMessage } from '../types';
71
- import { useTemplateRef, ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
71
+ import { useTemplateRef, ref, onMounted, onUnmounted, watch, nextTick, defineAsyncComponent } from 'vue';
72
72
  import { IconArrowDownOutline } from '@iconify-prerendered/vue-flowbite';
73
73
  import SessionsHistory from '../SessionsHistory.vue';
74
74
  import { useAgentStore } from '../composables/useAgentStore';
75
75
  import { useAgentTransitions } from '../composables/useAgentTransitions';
76
76
  import MessageRenderer from './MessageRenderer.vue';
77
- import CustomAutoScrollContainer from '../CustomAutoScrollContainer.vue';
77
+
78
+ const CustomAutoScrollContainer = defineAsyncComponent(() => import('../CustomAutoScrollContainer.vue'));
78
79
 
79
80
  const props = defineProps<{
80
81
  messages: IMessage[]
@@ -1,12 +1,22 @@
1
1
  <template>
2
- <template v-if="ToolOrReasoningParts.length > 0 || isResponseInProgress || showFakeThinkingMessage">
2
+ <template v-if="ToolOrReasoningParts.length > 0 || inProgress">
3
3
  <div
4
- class="ml-2 px-4 flex items-center gap-1 cursor-pointer select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
4
+ class="shine-text-container ml-2 px-4 flex items-center gap-1 cursor-pointer select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
5
5
  @click="isExpanded = !isExpanded"
6
6
  >
7
- {{ $t('Thoughts') }}
7
+ <p
8
+ :class="[
9
+ inProgress ? `
10
+ shine-text text-listTableHeadingText dark:text-darkListTableHeadingText
11
+ bg-[linear-gradient(-65deg,currentColor,_rgb(120,120,120)_50%,currentColor)]
12
+ dark:bg-[linear-gradient(-65deg,currentColor,_rgb(250,250,250,0.8)_70%,currentColor)]
13
+ `
14
+ : '']"
15
+ >
16
+ {{ $t('Thoughts') }}
17
+ </p>
8
18
  <span v-if="thinkingDuration > 0">({{ (thinkingDuration/1000).toFixed(2) }} s)</span>
9
- <ThreeDotsAnimation v-if="isResponseInProgress || showFakeThinkingMessage" />
19
+ <!-- <ThreeDotsAnimation v-if="inProgress" /> -->
10
20
  <IconAngleDownOutline
11
21
  :class="isExpanded ? 'rotate-180' : 'rotate-0'"
12
22
  class="transition-transform duration-200"
@@ -40,14 +50,15 @@
40
50
 
41
51
  <script setup lang="ts">
42
52
  import type { IFormattedToolCallPart, IMessage, IPart, IToolGroup } from '../types';
43
- import { ref, computed, watch, onUnmounted, onMounted } from 'vue';
53
+ import { ref, computed, watch, onUnmounted, onMounted, defineAsyncComponent } from 'vue';
44
54
  import ReasoningRenderer from './ReasoningRenderer.vue';
45
55
  import { IconAngleDownOutline } from '@iconify-prerendered/vue-flowbite';
46
56
  import ThreeDotsAnimation from './ThreeDotsAnimation.vue';
47
57
  import { useAgentStore } from '../composables/useAgentStore';
48
58
  import { getMessageParts } from '../utils';
49
59
  import ToolsGroup from './ToolsGroup.vue';
50
- import CustomAutoScrollContainer from '../CustomAutoScrollContainer.vue';
60
+
61
+ const CustomAutoScrollContainer = defineAsyncComponent(() => import('../CustomAutoScrollContainer.vue'));
51
62
 
52
63
  const props = defineProps<{
53
64
  message: IMessage
@@ -73,6 +84,10 @@
73
84
  return false;
74
85
  })
75
86
 
87
+ const inProgress = computed(() => {
88
+ return isResponseInProgress.value || showFakeThinkingMessage.value;
89
+ })
90
+
76
91
  onMounted(() => {
77
92
  thinkingStartTime.value = Date.now();
78
93
  if (isResponseInProgress.value) {
@@ -224,5 +239,24 @@
224
239
  max-height: 192px;
225
240
  }
226
241
  }
227
-
242
+
243
+
244
+ .shine-text {
245
+
246
+ background-clip: text;
247
+ -webkit-background-clip: text;
248
+ -webkit-text-fill-color: transparent;
249
+ background-position: -12rem;
250
+ }
251
+
252
+ .shine-text {
253
+ animation: shineText 6s infinite linear;
254
+ }
255
+
256
+ @keyframes shineText {
257
+ to {
258
+ background-position: -100%;
259
+ }
260
+ }
261
+
228
262
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.43.12",
3
+ "version": "1.43.14",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",