@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-chatbot",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "@eeacms/volto-eea-chatbot: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -97,7 +97,7 @@ function ChatWindow({
97
97
  onDemandInputToggle = true,
98
98
  maxContextSegments = 0,
99
99
  batchSize,
100
- onyxVersion = '2',
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
- !messages[messages.length - 1]?.isFinalMessageComing && (
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' = '2',
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 = '2',
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 expandedShowTools = [...(showTools || [])];
33
- if (showTools?.includes(PacketType.SEARCH_TOOL_START)) {
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 (showTools?.includes(PacketType.REASONING_START)) {
45
+ if (activeShowTools.includes(PacketType.REASONING_START)) {
42
46
  expandedShowTools.push(
43
47
  PacketType.REASONING_DELTA,
44
48
  PacketType.REASONING_DONE,
@@ -401,7 +401,7 @@ range is from 0 to 100`,
401
401
  ['2', 'Onyx 2.x'],
402
402
  ['3', 'Onyx 3.x'],
403
403
  ],
404
- default: '2',
404
+ default: '3',
405
405
  description:
406
406
  'Select which Onyx API version the backend is running. ' +
407
407
  'Onyx 2.x uses the legacy send-message payload; ' +
@@ -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;
@@ -1887,7 +1887,7 @@ mark {
1887
1887
  opacity 0.2s;
1888
1888
 
1889
1889
  &.expanded {
1890
- max-height: 500px;
1890
+ max-height: 3000px;
1891
1891
  padding: 0.25rem 0.875rem;
1892
1892
  opacity: 1;
1893
1893
  }