@quidgest/chatbot 0.6.1 → 0.6.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quidgest/chatbot",
3
3
  "private": false,
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
7
7
  "main": "dist/index.cjs",
@@ -391,7 +391,8 @@
391
391
  execution.callingTools = true
392
392
  } else if (payload.event === 'tool_end') {
393
393
  appendToolCompletion(msg, payload.data.html)
394
- // Stay in 'tools' state - more tools might come
394
+ updateToolStatus(msg, texts.generatingResponse)
395
+ execution.callingTools = true
395
396
  }
396
397
  },
397
398
  (error) => {
@@ -414,11 +415,16 @@
414
415
  }
415
416
 
416
417
  async function clearChat() {
418
+ // Get sessionId from the last message for contextual memory cleanup
419
+ const lastMessage = getLastMessage()
420
+ const sessionId = lastMessage?.sessionID
421
+
417
422
  const { data, error } = await clearChatData(
418
423
  props.username,
419
424
  props.projectPath,
420
425
  currentAgentId.value,
421
- currentFormId.value
426
+ currentFormId.value,
427
+ sessionId
422
428
  )
423
429
  if (error || !data || !data.success) {
424
430
  setDisabledState(true)
@@ -133,8 +133,9 @@ export function useChatApi(apiEndpoint: string) {
133
133
  async function clearChatData(
134
134
  username: string,
135
135
  project: string,
136
- agentID: string,
137
- formId: string
136
+ agentId: string,
137
+ formId: string,
138
+ sessionId?: string
138
139
  ) {
139
140
  return await baseRequest<{ success: boolean }>({
140
141
  method: 'POST',
@@ -142,8 +143,9 @@ export function useChatApi(apiEndpoint: string) {
142
143
  data: {
143
144
  username,
144
145
  project,
145
- agentID,
146
- formId
146
+ agentId,
147
+ formId,
148
+ sessionId
147
149
  }
148
150
  })
149
151
  }