@adminforth/agent 1.52.4 → 1.52.6

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
@@ -63,5 +63,5 @@ custom/speech_recognition_frontend/voiceActivityDetection.ts
63
63
  custom/speech_recognition_frontend/types/
64
64
  custom/speech_recognition_frontend/types/voice-activity-detection.d.ts
65
65
 
66
- sent 1,682,974 bytes received 940 bytes 3,367,828.00 bytes/sec
67
- total size is 1,678,746 speedup is 1.00
66
+ sent 1,683,211 bytes received 940 bytes 3,368,302.00 bytes/sec
67
+ total size is 1,679,042 speedup is 1.00
@@ -197,6 +197,7 @@ export function createAgentChatManager({
197
197
  }),
198
198
  onError(error: unknown) {
199
199
  console.error('Chat error:', error);
200
+ appendTextDelta(`Error: ${error instanceof Error ? error.message : String(error)}`);
200
201
  },
201
202
  onData: handleRealtimeChatData,
202
203
  });
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <template v-if="ToolOrReasoningParts.length > 0 || inProgress">
3
3
  <div
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"
4
+ class="shine-text-container ml-2 px-4 flex items-center gap-1 select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
5
+ :class="[ToolOrReasoningParts.length > 0 ? 'cursor-pointer' : '']"
5
6
  @click="isExpanded = !isExpanded"
6
7
  >
7
8
  <p
@@ -13,11 +14,12 @@
13
14
  `
14
15
  : '']"
15
16
  >
16
- {{ $t('Thoughts') }}
17
+ {{ inProgress ? $t('Thinking') : $t('Thoughts') }}
17
18
  </p>
19
+
18
20
  <span v-if="thinkingDuration > 0">({{ (thinkingDuration/1000).toFixed(2) }} s)</span>
19
- <!-- <ThreeDotsAnimation v-if="inProgress" /> -->
20
21
  <IconAngleDownOutline
22
+ v-if="ToolOrReasoningParts.length > 0"
21
23
  :class="isExpanded ? 'rotate-180' : 'rotate-0'"
22
24
  class="transition-transform duration-200"
23
25
  />
@@ -38,7 +40,7 @@
38
40
  <ol class="ml-8 my-2 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
39
41
  <template v-for="(part, index) in ToolOrReasoningParts" :key="index">
40
42
  <ReasoningRenderer v-if="part.type === 'reasoning'" :state="part.state" :text="part.text" />
41
- <ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" />
43
+ <ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" :isExpanded="isExpanded" />
42
44
  <li v-else-if="part.type === 'data-rendering'" class="mb-6 mx-2 mt-2 px-2 z-50 overflow-hidden">
43
45
  <span class="bg-lightNavbar dark:bg-darkNavbar absolute flex items-center text-listTableHeadingText dark:text-darkListTableHeadingText justify-center w-5 h-5 rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar">
44
46
  <div class="w-2 h-2 rounded-full bg-current animate-pulse"></div>
@@ -59,7 +59,7 @@
59
59
  </template>
60
60
 
61
61
  <script setup lang="ts">
62
- import { computed, ref, watch, onMounted } from 'vue';
62
+ import { computed, ref, watch, onMounted, nextTick } from 'vue';
63
63
  import { type IFormattedToolCallPart } from '../types';
64
64
  import { Spinner } from '@/afcl';
65
65
  import { IconAngleDownOutline, IconCheckOutline, IconCloseOutline } from '@iconify-prerendered/vue-flowbite';
@@ -109,7 +109,8 @@
109
109
  });
110
110
  const hasToolSections = computed(() => toolSections.value.length > 0);
111
111
 
112
- onMounted(() => {
112
+ onMounted(async () => {
113
+ await nextTick();
113
114
  if (toolRendererRef.value && props.data.toolInfo) {
114
115
  toolRendererInitialWidth.value = toolRendererRef.value.offsetWidth;
115
116
  }
@@ -13,7 +13,8 @@
13
13
  </h3>
14
14
  <div class="flex flex-wrap">
15
15
  <template v-for="group in props.toolGroup" :key="group.title">
16
- <ToolRenderer
16
+ <ToolRenderer
17
+ v-if="isExpanded"
17
18
  v-for="part in group.groupedTools"
18
19
  :key="part.toolInfo.toolCallId"
19
20
  :data="part"
@@ -31,6 +32,7 @@ import { IconWrenchSolid } from '@iconify-prerendered/vue-heroicons';
31
32
 
32
33
  const props = defineProps<{
33
34
  toolGroup: IToolGroup[]
35
+ isExpanded: boolean
34
36
  }>();
35
37
 
36
38
  </script>
@@ -197,6 +197,7 @@ export function createAgentChatManager({
197
197
  }),
198
198
  onError(error: unknown) {
199
199
  console.error('Chat error:', error);
200
+ appendTextDelta(`Error: ${error instanceof Error ? error.message : String(error)}`);
200
201
  },
201
202
  onData: handleRealtimeChatData,
202
203
  });
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <template v-if="ToolOrReasoningParts.length > 0 || inProgress">
3
3
  <div
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"
4
+ class="shine-text-container ml-2 px-4 flex items-center gap-1 select-none hover:opacity-80 tracking-wide font-medium text-sm text-listTableHeadingText dark:text-darkListTableHeadingText"
5
+ :class="[ToolOrReasoningParts.length > 0 ? 'cursor-pointer' : '']"
5
6
  @click="isExpanded = !isExpanded"
6
7
  >
7
8
  <p
@@ -13,11 +14,12 @@
13
14
  `
14
15
  : '']"
15
16
  >
16
- {{ $t('Thoughts') }}
17
+ {{ inProgress ? $t('Thinking') : $t('Thoughts') }}
17
18
  </p>
19
+
18
20
  <span v-if="thinkingDuration > 0">({{ (thinkingDuration/1000).toFixed(2) }} s)</span>
19
- <!-- <ThreeDotsAnimation v-if="inProgress" /> -->
20
21
  <IconAngleDownOutline
22
+ v-if="ToolOrReasoningParts.length > 0"
21
23
  :class="isExpanded ? 'rotate-180' : 'rotate-0'"
22
24
  class="transition-transform duration-200"
23
25
  />
@@ -38,7 +40,7 @@
38
40
  <ol class="ml-8 my-2 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
39
41
  <template v-for="(part, index) in ToolOrReasoningParts" :key="index">
40
42
  <ReasoningRenderer v-if="part.type === 'reasoning'" :state="part.state" :text="part.text" />
41
- <ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" />
43
+ <ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" :isExpanded="isExpanded" />
42
44
  <li v-else-if="part.type === 'data-rendering'" class="mb-6 mx-2 mt-2 px-2 z-50 overflow-hidden">
43
45
  <span class="bg-lightNavbar dark:bg-darkNavbar absolute flex items-center text-listTableHeadingText dark:text-darkListTableHeadingText justify-center w-5 h-5 rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar">
44
46
  <div class="w-2 h-2 rounded-full bg-current animate-pulse"></div>
@@ -59,7 +59,7 @@
59
59
  </template>
60
60
 
61
61
  <script setup lang="ts">
62
- import { computed, ref, watch, onMounted } from 'vue';
62
+ import { computed, ref, watch, onMounted, nextTick } from 'vue';
63
63
  import { type IFormattedToolCallPart } from '../types';
64
64
  import { Spinner } from '@/afcl';
65
65
  import { IconAngleDownOutline, IconCheckOutline, IconCloseOutline } from '@iconify-prerendered/vue-flowbite';
@@ -109,7 +109,8 @@
109
109
  });
110
110
  const hasToolSections = computed(() => toolSections.value.length > 0);
111
111
 
112
- onMounted(() => {
112
+ onMounted(async () => {
113
+ await nextTick();
113
114
  if (toolRendererRef.value && props.data.toolInfo) {
114
115
  toolRendererInitialWidth.value = toolRendererRef.value.offsetWidth;
115
116
  }
@@ -13,7 +13,8 @@
13
13
  </h3>
14
14
  <div class="flex flex-wrap">
15
15
  <template v-for="group in props.toolGroup" :key="group.title">
16
- <ToolRenderer
16
+ <ToolRenderer
17
+ v-if="isExpanded"
17
18
  v-for="part in group.groupedTools"
18
19
  :key="part.toolInfo.toolCallId"
19
20
  :data="part"
@@ -31,6 +32,7 @@ import { IconWrenchSolid } from '@iconify-prerendered/vue-heroicons';
31
32
 
32
33
  const props = defineProps<{
33
34
  toolGroup: IToolGroup[]
35
+ isExpanded: boolean
34
36
  }>();
35
37
 
36
38
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.52.4",
3
+ "version": "1.52.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -0,0 +1,4 @@
1
+ allowBuilds:
2
+ adminforth: true
3
+ minimumReleaseAgeExclude:
4
+ - adminforth@3.0.1