@adminforth/agent 1.26.3 → 1.26.5
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/ChatSurface.vue +2 -2
- package/custom/conversation_area/ConversationArea.vue +17 -0
- package/custom/conversation_area/ProcessingTimeline.vue +5 -4
- package/custom/conversation_area/ReasoningRenderer.vue +30 -28
- package/custom/conversation_area/ToolsGroup.vue +16 -14
- package/dist/custom/ChatSurface.vue +2 -2
- package/dist/custom/conversation_area/ConversationArea.vue +17 -0
- package/dist/custom/conversation_area/ProcessingTimeline.vue +5 -4
- package/dist/custom/conversation_area/ReasoningRenderer.vue +30 -28
- package/dist/custom/conversation_area/ToolsGroup.vue +16 -14
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -38,5 +38,5 @@ custom/skills/fetch_data/SKILL.md
|
|
|
38
38
|
custom/skills/mutate_data/
|
|
39
39
|
custom/skills/mutate_data/SKILL.md
|
|
40
40
|
|
|
41
|
-
sent
|
|
42
|
-
total size is
|
|
41
|
+
sent 207,297 bytes received 562 bytes 415,718.00 bytes/sec
|
|
42
|
+
total size is 204,983 speedup is 0.99
|
package/custom/ChatSurface.vue
CHANGED
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
transition: `transform ${agentTransitions.TRANSITION_DURATION}ms ease-in-out`
|
|
107
107
|
}"
|
|
108
108
|
>
|
|
109
|
-
<div class="w-full border rounded-lg pb-8">
|
|
109
|
+
<div class="w-full border rounded-lg pb-8 dark:bg-gray-700">
|
|
110
110
|
<textarea
|
|
111
111
|
v-model="agentStore.userMessageInput"
|
|
112
112
|
ref="textInput"
|
|
113
113
|
@input="autoResize"
|
|
114
114
|
:class="[
|
|
115
|
-
'min-h-12 px-4 pt-4
|
|
115
|
+
'min-h-12 px-4 pt-4 rounded-xl w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
|
|
116
116
|
]"
|
|
117
117
|
:placeholder="agentStore.userMessagePlaceholder"
|
|
118
118
|
@keydown.enter.exact.prevent="sendMessage"
|
|
@@ -91,6 +91,23 @@ const showScrollContainer = ref(true);
|
|
|
91
91
|
const chatContainerRef = ref<HTMLElement | null>(null);
|
|
92
92
|
|
|
93
93
|
const messagesRefs = ref<Array<HTMLElement | null>>([]);
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* Whenever user sends a message, it adds a bottom spacer, that takes the remaining height
|
|
98
|
+
* without last user and last agent message.
|
|
99
|
+
*
|
|
100
|
+
* On send message, happens the following logic:
|
|
101
|
+
* 1) showBottomSpacer is set to true
|
|
102
|
+
* 2) useWaitingForHeight is set to true and in 1000s set back to false
|
|
103
|
+
* Why do we do this?
|
|
104
|
+
* - When we want to read height of last user message, incremark shows text with some small delay
|
|
105
|
+
* - so when we read height of last user message, we actully getting height of the box without text ~18px
|
|
106
|
+
* - so for the initial period while useWaitingForHeight is true, we are waiting for real height to be bigger than 18px
|
|
107
|
+
* - and then we can read in normally, until new message is sent, then we need to wait again
|
|
108
|
+
* 3) updateSpacerHeight is called, which calculates the height for spacer based on scroll container height and messages height
|
|
109
|
+
* 4) Spacer moves text up
|
|
110
|
+
*/
|
|
94
111
|
const showBottomSpacer = ref(false);
|
|
95
112
|
const spacerHeight = ref(0);
|
|
96
113
|
const MASK_HEIGHT = 20;
|
|
@@ -18,15 +18,16 @@
|
|
|
18
18
|
behavior="smooth"
|
|
19
19
|
v-if="ToolOrReasoningParts.length > 0"
|
|
20
20
|
v-show="isExpanded"
|
|
21
|
+
:threshold="5"
|
|
21
22
|
:wrapperStyle="{
|
|
22
23
|
marginRight: '8rem',
|
|
23
24
|
}"
|
|
24
25
|
>
|
|
25
|
-
<ol class="ml-8 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
|
|
26
|
-
<
|
|
26
|
+
<ol class="ml-8 my-2 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
|
|
27
|
+
<template v-for="(part, index) in ToolOrReasoningParts" :key="index">
|
|
27
28
|
<ReasoningRenderer v-if="part.type === 'reasoning'" :state="part.state" :text="part.text" />
|
|
28
|
-
<ToolsGroup v-else :toolGroup="groupToolCallParts(message, part)" />
|
|
29
|
-
</
|
|
29
|
+
<ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" />
|
|
30
|
+
</template>
|
|
30
31
|
</ol>
|
|
31
32
|
</CustomAutoScrollContainer>
|
|
32
33
|
</transition>
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<span class="font-semibold">{{ reasoningTitle }}</span>
|
|
12
|
-
<ThreeDotsAnimation v-if="isStreaming"/>
|
|
13
|
-
<IconAngleDownOutline
|
|
14
|
-
:class="isExpanded ? 'rotate-180' : 'rotate-0'"
|
|
15
|
-
class="transition-transform duration-200"
|
|
16
|
-
/>
|
|
17
|
-
</h3>
|
|
18
|
-
<transition name="expand">
|
|
19
|
-
<CustomAutoScrollContainer
|
|
20
|
-
v-if="isExpanded" v-show="isExpanded" class="mb-4 text-sm max-h-64 pl-4"
|
|
21
|
-
:wrapperStyle="{
|
|
22
|
-
marginRight: '8rem',
|
|
23
|
-
}"
|
|
24
|
-
:enabled="isStreaming"
|
|
2
|
+
<li class="mb-6 ms-2 z-50 overflow-hidden">
|
|
3
|
+
<span class="bg-lightNavbar dark:bg-darkNavbar absolute flex items-center text-listTableHeadingText dark:text-darkListTableHeadingText justify-center w-5 h-5 bg-brand-softer rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar ring-default">
|
|
4
|
+
<div class="w-5 h-5 rounded-full flex items-center justify-center">
|
|
5
|
+
<IconBrainOutline class="w-4 h-4" />
|
|
6
|
+
</div>
|
|
7
|
+
</span>
|
|
8
|
+
<h3
|
|
9
|
+
class=" flex items-center mb-1 text-sm ml-3 gap-1 cursor-pointer select-none hover:opacity-80 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
10
|
+
@click="isExpanded = !isExpanded"
|
|
25
11
|
>
|
|
26
|
-
<
|
|
27
|
-
|
|
12
|
+
<span class="font-semibold">{{ reasoningTitle }}</span>
|
|
13
|
+
<ThreeDotsAnimation v-if="isStreaming"/>
|
|
14
|
+
<IconAngleDownOutline
|
|
15
|
+
:class="isExpanded ? 'rotate-180' : 'rotate-0'"
|
|
16
|
+
class="transition-transform duration-200"
|
|
28
17
|
/>
|
|
29
|
-
</
|
|
30
|
-
|
|
18
|
+
</h3>
|
|
19
|
+
<transition name="expand">
|
|
20
|
+
<CustomAutoScrollContainer
|
|
21
|
+
v-if="isExpanded" v-show="isExpanded" class="mb-4 text-sm max-h-64 pl-4"
|
|
22
|
+
:wrapperStyle="{
|
|
23
|
+
marginRight: '8rem',
|
|
24
|
+
}"
|
|
25
|
+
:enabled="isStreaming"
|
|
26
|
+
>
|
|
27
|
+
<IncremarkContent
|
|
28
|
+
:content="reasoningText"
|
|
29
|
+
/>
|
|
30
|
+
</CustomAutoScrollContainer>
|
|
31
|
+
</transition>
|
|
32
|
+
</li>
|
|
31
33
|
</template>
|
|
32
34
|
|
|
33
35
|
|
|
@@ -67,7 +69,7 @@ watch(() => props.state, (newValue: IPart['state']) => {
|
|
|
67
69
|
<style scoped>
|
|
68
70
|
.expand-enter-active,
|
|
69
71
|
.expand-leave-active {
|
|
70
|
-
transition: all
|
|
72
|
+
transition: all 300ms ease;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
.expand-enter-from,
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
<template >
|
|
2
2
|
<template v-if="toolGroup.length > 0">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
3
|
+
<li class="mb-6 ms-2 z-50">
|
|
4
|
+
<span class="text-listTableHeadingText dark:text-darkListTableHeadingText bg-lightNavbar dark:bg-darkNavbar absolute flex items-center justify-center w-5 h-5 bg-brand-softer rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar ring-default">
|
|
5
|
+
<div class="w-5 h-5 rounded-full flex items-center justify-center">
|
|
6
|
+
<IconWrenchSolid class="w-4 h-4" />
|
|
7
|
+
</div>
|
|
8
|
+
</span>
|
|
9
|
+
<h3
|
|
10
|
+
class="flex items-center mb-1 text-sm my-2 ml-3 gap-1 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
11
|
+
>
|
|
12
|
+
<span class="font-semibold select-none ">Call tools</span>
|
|
13
|
+
</h3>
|
|
14
|
+
<div class="flex flex-wrap">
|
|
15
|
+
<template v-for="group in props.toolGroup" :key="group.title">
|
|
16
|
+
<ToolRenderer v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part"/>
|
|
17
|
+
</template>
|
|
6
18
|
</div>
|
|
7
|
-
</
|
|
8
|
-
<h3
|
|
9
|
-
class="flex items-center mb-1 text-sm my-2 ml-3 gap-1 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
10
|
-
>
|
|
11
|
-
<span class="font-semibold select-none ">Call tools</span>
|
|
12
|
-
</h3>
|
|
13
|
-
<div class="flex flex-wrap">
|
|
14
|
-
<template v-for="group in props.toolGroup" :key="group.title">
|
|
15
|
-
<ToolRenderer v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part"/>
|
|
16
|
-
</template>
|
|
17
|
-
</div>
|
|
19
|
+
</li>
|
|
18
20
|
</template>
|
|
19
21
|
</template>
|
|
20
22
|
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
transition: `transform ${agentTransitions.TRANSITION_DURATION}ms ease-in-out`
|
|
107
107
|
}"
|
|
108
108
|
>
|
|
109
|
-
<div class="w-full border rounded-lg pb-8">
|
|
109
|
+
<div class="w-full border rounded-lg pb-8 dark:bg-gray-700">
|
|
110
110
|
<textarea
|
|
111
111
|
v-model="agentStore.userMessageInput"
|
|
112
112
|
ref="textInput"
|
|
113
113
|
@input="autoResize"
|
|
114
114
|
:class="[
|
|
115
|
-
'min-h-12 px-4 pt-4
|
|
115
|
+
'min-h-12 px-4 pt-4 rounded-xl w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
|
|
116
116
|
]"
|
|
117
117
|
:placeholder="agentStore.userMessagePlaceholder"
|
|
118
118
|
@keydown.enter.exact.prevent="sendMessage"
|
|
@@ -91,6 +91,23 @@ const showScrollContainer = ref(true);
|
|
|
91
91
|
const chatContainerRef = ref<HTMLElement | null>(null);
|
|
92
92
|
|
|
93
93
|
const messagesRefs = ref<Array<HTMLElement | null>>([]);
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* Whenever user sends a message, it adds a bottom spacer, that takes the remaining height
|
|
98
|
+
* without last user and last agent message.
|
|
99
|
+
*
|
|
100
|
+
* On send message, happens the following logic:
|
|
101
|
+
* 1) showBottomSpacer is set to true
|
|
102
|
+
* 2) useWaitingForHeight is set to true and in 1000s set back to false
|
|
103
|
+
* Why do we do this?
|
|
104
|
+
* - When we want to read height of last user message, incremark shows text with some small delay
|
|
105
|
+
* - so when we read height of last user message, we actully getting height of the box without text ~18px
|
|
106
|
+
* - so for the initial period while useWaitingForHeight is true, we are waiting for real height to be bigger than 18px
|
|
107
|
+
* - and then we can read in normally, until new message is sent, then we need to wait again
|
|
108
|
+
* 3) updateSpacerHeight is called, which calculates the height for spacer based on scroll container height and messages height
|
|
109
|
+
* 4) Spacer moves text up
|
|
110
|
+
*/
|
|
94
111
|
const showBottomSpacer = ref(false);
|
|
95
112
|
const spacerHeight = ref(0);
|
|
96
113
|
const MASK_HEIGHT = 20;
|
|
@@ -18,15 +18,16 @@
|
|
|
18
18
|
behavior="smooth"
|
|
19
19
|
v-if="ToolOrReasoningParts.length > 0"
|
|
20
20
|
v-show="isExpanded"
|
|
21
|
+
:threshold="5"
|
|
21
22
|
:wrapperStyle="{
|
|
22
23
|
marginRight: '8rem',
|
|
23
24
|
}"
|
|
24
25
|
>
|
|
25
|
-
<ol class="ml-8 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
|
|
26
|
-
<
|
|
26
|
+
<ol class="ml-8 my-2 relative border-l border-l-2 border-black border-default border-listTableHeadingText dark:border-darkListTableHeadingText">
|
|
27
|
+
<template v-for="(part, index) in ToolOrReasoningParts" :key="index">
|
|
27
28
|
<ReasoningRenderer v-if="part.type === 'reasoning'" :state="part.state" :text="part.text" />
|
|
28
|
-
<ToolsGroup v-else :toolGroup="groupToolCallParts(message, part)" />
|
|
29
|
-
</
|
|
29
|
+
<ToolsGroup v-else-if="part.type==='data-tool-call'" :toolGroup="groupToolCallParts(message, part)" />
|
|
30
|
+
</template>
|
|
30
31
|
</ol>
|
|
31
32
|
</CustomAutoScrollContainer>
|
|
32
33
|
</transition>
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<span class="font-semibold">{{ reasoningTitle }}</span>
|
|
12
|
-
<ThreeDotsAnimation v-if="isStreaming"/>
|
|
13
|
-
<IconAngleDownOutline
|
|
14
|
-
:class="isExpanded ? 'rotate-180' : 'rotate-0'"
|
|
15
|
-
class="transition-transform duration-200"
|
|
16
|
-
/>
|
|
17
|
-
</h3>
|
|
18
|
-
<transition name="expand">
|
|
19
|
-
<CustomAutoScrollContainer
|
|
20
|
-
v-if="isExpanded" v-show="isExpanded" class="mb-4 text-sm max-h-64 pl-4"
|
|
21
|
-
:wrapperStyle="{
|
|
22
|
-
marginRight: '8rem',
|
|
23
|
-
}"
|
|
24
|
-
:enabled="isStreaming"
|
|
2
|
+
<li class="mb-6 ms-2 z-50 overflow-hidden">
|
|
3
|
+
<span class="bg-lightNavbar dark:bg-darkNavbar absolute flex items-center text-listTableHeadingText dark:text-darkListTableHeadingText justify-center w-5 h-5 bg-brand-softer rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar ring-default">
|
|
4
|
+
<div class="w-5 h-5 rounded-full flex items-center justify-center">
|
|
5
|
+
<IconBrainOutline class="w-4 h-4" />
|
|
6
|
+
</div>
|
|
7
|
+
</span>
|
|
8
|
+
<h3
|
|
9
|
+
class=" flex items-center mb-1 text-sm ml-3 gap-1 cursor-pointer select-none hover:opacity-80 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
10
|
+
@click="isExpanded = !isExpanded"
|
|
25
11
|
>
|
|
26
|
-
<
|
|
27
|
-
|
|
12
|
+
<span class="font-semibold">{{ reasoningTitle }}</span>
|
|
13
|
+
<ThreeDotsAnimation v-if="isStreaming"/>
|
|
14
|
+
<IconAngleDownOutline
|
|
15
|
+
:class="isExpanded ? 'rotate-180' : 'rotate-0'"
|
|
16
|
+
class="transition-transform duration-200"
|
|
28
17
|
/>
|
|
29
|
-
</
|
|
30
|
-
|
|
18
|
+
</h3>
|
|
19
|
+
<transition name="expand">
|
|
20
|
+
<CustomAutoScrollContainer
|
|
21
|
+
v-if="isExpanded" v-show="isExpanded" class="mb-4 text-sm max-h-64 pl-4"
|
|
22
|
+
:wrapperStyle="{
|
|
23
|
+
marginRight: '8rem',
|
|
24
|
+
}"
|
|
25
|
+
:enabled="isStreaming"
|
|
26
|
+
>
|
|
27
|
+
<IncremarkContent
|
|
28
|
+
:content="reasoningText"
|
|
29
|
+
/>
|
|
30
|
+
</CustomAutoScrollContainer>
|
|
31
|
+
</transition>
|
|
32
|
+
</li>
|
|
31
33
|
</template>
|
|
32
34
|
|
|
33
35
|
|
|
@@ -67,7 +69,7 @@ watch(() => props.state, (newValue: IPart['state']) => {
|
|
|
67
69
|
<style scoped>
|
|
68
70
|
.expand-enter-active,
|
|
69
71
|
.expand-leave-active {
|
|
70
|
-
transition: all
|
|
72
|
+
transition: all 300ms ease;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
.expand-enter-from,
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
<template >
|
|
2
2
|
<template v-if="toolGroup.length > 0">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
3
|
+
<li class="mb-6 ms-2 z-50">
|
|
4
|
+
<span class="text-listTableHeadingText dark:text-darkListTableHeadingText bg-lightNavbar dark:bg-darkNavbar absolute flex items-center justify-center w-5 h-5 bg-brand-softer rounded-full -start-[0.68rem] ring-4 ring-lightNavbar dark:ring-darkNavbar ring-default">
|
|
5
|
+
<div class="w-5 h-5 rounded-full flex items-center justify-center">
|
|
6
|
+
<IconWrenchSolid class="w-4 h-4" />
|
|
7
|
+
</div>
|
|
8
|
+
</span>
|
|
9
|
+
<h3
|
|
10
|
+
class="flex items-center mb-1 text-sm my-2 ml-3 gap-1 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
11
|
+
>
|
|
12
|
+
<span class="font-semibold select-none ">Call tools</span>
|
|
13
|
+
</h3>
|
|
14
|
+
<div class="flex flex-wrap">
|
|
15
|
+
<template v-for="group in props.toolGroup" :key="group.title">
|
|
16
|
+
<ToolRenderer v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part"/>
|
|
17
|
+
</template>
|
|
6
18
|
</div>
|
|
7
|
-
</
|
|
8
|
-
<h3
|
|
9
|
-
class="flex items-center mb-1 text-sm my-2 ml-3 gap-1 text-listTableHeadingText dark:text-darkListTableHeadingText"
|
|
10
|
-
>
|
|
11
|
-
<span class="font-semibold select-none ">Call tools</span>
|
|
12
|
-
</h3>
|
|
13
|
-
<div class="flex flex-wrap">
|
|
14
|
-
<template v-for="group in props.toolGroup" :key="group.title">
|
|
15
|
-
<ToolRenderer v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part"/>
|
|
16
|
-
</template>
|
|
17
|
-
</div>
|
|
19
|
+
</li>
|
|
18
20
|
</template>
|
|
19
21
|
</template>
|
|
20
22
|
|