@eeacms/volto-eea-chatbot 4.1.2 → 4.1.3
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/ChatBlock/chat/ChatWindow.tsx +2 -2
- package/src/ChatBlock/hooks/useChatController.ts +2 -2
- package/src/ChatBlock/packets/MultiToolRenderer.tsx +7 -3
- package/src/ChatBlock/schema.jsx +1 -1
- package/src/ChatBlock/services/streamingService.ts +16 -0
- package/src/ChatBlock/style.less +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [4.1.3](https://github.com/eea/volto-eea-chatbot/compare/4.1.2...4.1.3) - 21 September 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix(chat): remove duplicate loader during tool execution and default to Onyx v3 [Tiberiu Ichim - [`127b919`](https://github.com/eea/volto-eea-chatbot/commit/127b9191a3141b9f59d44b0eebb69e11b68a6420)]
|
|
12
|
+
|
|
7
13
|
### [4.1.2](https://github.com/eea/volto-eea-chatbot/compare/4.1.1...4.1.2) - 17 September 2026
|
|
8
14
|
|
|
9
15
|
#### :rocket: New Features
|
package/package.json
CHANGED
|
@@ -97,7 +97,7 @@ function ChatWindow({
|
|
|
97
97
|
onDemandInputToggle = true,
|
|
98
98
|
maxContextSegments = 0,
|
|
99
99
|
batchSize,
|
|
100
|
-
onyxVersion = '
|
|
100
|
+
onyxVersion = '3',
|
|
101
101
|
hideSourcesTab,
|
|
102
102
|
extraRemarkPlugins,
|
|
103
103
|
extraMarkdownComponents,
|
|
@@ -272,7 +272,7 @@ function ChatWindow({
|
|
|
272
272
|
|
|
273
273
|
{isStreaming &&
|
|
274
274
|
!isFetchingRelatedQuestions &&
|
|
275
|
-
|
|
275
|
+
messages[messages.length - 1]?.type === 'user' && (
|
|
276
276
|
<div className="comment">
|
|
277
277
|
<div className="circle assistant placeholder"></div>
|
|
278
278
|
<div className="comment-content">
|
|
@@ -65,7 +65,7 @@ async function fetchRelatedQuestions(
|
|
|
65
65
|
query: string,
|
|
66
66
|
answer: string,
|
|
67
67
|
qgenAsistantId: number,
|
|
68
|
-
onyxVersion: '2' | '3' = '
|
|
68
|
+
onyxVersion: '2' | '3' = '3',
|
|
69
69
|
): Promise<RelatedQuestion[]> {
|
|
70
70
|
try {
|
|
71
71
|
console.log(`[RQ] Creating session for assistant ${qgenAsistantId} (Onyx v${onyxVersion})`);
|
|
@@ -122,7 +122,7 @@ export function useChatController({
|
|
|
122
122
|
enableQgen = false,
|
|
123
123
|
qgenAsistantId,
|
|
124
124
|
deepResearch,
|
|
125
|
-
onyxVersion = '
|
|
125
|
+
onyxVersion = '3',
|
|
126
126
|
}: UseChatControllerProps) {
|
|
127
127
|
const [messages, setMessages] = useState<Message[]>([]);
|
|
128
128
|
const [chatSessionId, setChatSessionId] = useState<string | null>(null);
|
|
@@ -29,8 +29,12 @@ export function MultiToolRenderer({
|
|
|
29
29
|
|
|
30
30
|
// Filter tool groups based on allowed tool types
|
|
31
31
|
const filteredToolGroups = useMemo(() => {
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const activeShowTools =
|
|
33
|
+
Array.isArray(showTools) && showTools.length > 0
|
|
34
|
+
? showTools
|
|
35
|
+
: [PacketType.SEARCH_TOOL_START, PacketType.REASONING_START];
|
|
36
|
+
const expandedShowTools = [...activeShowTools];
|
|
37
|
+
if (activeShowTools.includes(PacketType.SEARCH_TOOL_START)) {
|
|
34
38
|
expandedShowTools.push(
|
|
35
39
|
PacketType.SEARCH_TOOL_START_V3,
|
|
36
40
|
PacketType.SEARCH_TOOL_QUERIES_DELTA,
|
|
@@ -38,7 +42,7 @@ export function MultiToolRenderer({
|
|
|
38
42
|
PacketType.SEARCH_TOOL_DELTA,
|
|
39
43
|
);
|
|
40
44
|
}
|
|
41
|
-
if (
|
|
45
|
+
if (activeShowTools.includes(PacketType.REASONING_START)) {
|
|
42
46
|
expandedShowTools.push(
|
|
43
47
|
PacketType.REASONING_DELTA,
|
|
44
48
|
PacketType.REASONING_DONE,
|
package/src/ChatBlock/schema.jsx
CHANGED
|
@@ -195,6 +195,22 @@ function normaliseV3Chunk(raw: any): Packet | null {
|
|
|
195
195
|
} as Packet;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
// Handle Error format (special case without ind/obj)
|
|
199
|
+
if ('error' in raw) {
|
|
200
|
+
return {
|
|
201
|
+
ind: -1,
|
|
202
|
+
obj: {
|
|
203
|
+
type: PacketType.ERROR,
|
|
204
|
+
error: raw.error,
|
|
205
|
+
},
|
|
206
|
+
} as Packet;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Already normalised or v2 format: { ind: number, obj: { type: string, ... } }
|
|
210
|
+
if ('ind' in raw && typeof raw.obj === 'object' && raw.obj !== null) {
|
|
211
|
+
return raw as Packet;
|
|
212
|
+
}
|
|
213
|
+
|
|
198
214
|
if (!raw.placement || typeof raw.obj !== 'object') return null;
|
|
199
215
|
|
|
200
216
|
const ind: number = raw.placement.turn_index ?? 0;
|