@copilotkit/react-core 1.3.14-fix-handle-execute-agent-error.0 → 1.3.14

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
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.3.14-fix-handle-execute-agent-error.0",
12
+ "version": "1.3.14",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -36,14 +36,14 @@
36
36
  "tsup": "^6.7.0",
37
37
  "typescript": "^5.2.3",
38
38
  "@types/react-dom": "^18.2.4",
39
- "eslint-config-custom": "1.3.14-fix-handle-execute-agent-error.0",
40
- "tsconfig": "1.3.14-fix-handle-execute-agent-error.0"
39
+ "eslint-config-custom": "1.3.14",
40
+ "tsconfig": "1.3.14"
41
41
  },
42
42
  "dependencies": {
43
43
  "@scarf/scarf": "^1.3.0",
44
44
  "untruncate-json": "^0.0.1",
45
- "@copilotkit/runtime-client-gql": "1.3.14-fix-handle-execute-agent-error.0",
46
- "@copilotkit/shared": "1.3.14-fix-handle-execute-agent-error.0"
45
+ "@copilotkit/runtime-client-gql": "1.3.14",
46
+ "@copilotkit/shared": "1.3.14"
47
47
  },
48
48
  "keywords": [
49
49
  "copilotkit",
@@ -356,19 +356,19 @@ export function useChat(options: UseChatOptions): UseChatHelpers {
356
356
  .find((message) => message.isAgentStateMessage());
357
357
 
358
358
  if (lastAgentStateMessage) {
359
+ setCoagentStates((prevAgentStates) => ({
360
+ ...prevAgentStates,
361
+ [lastAgentStateMessage.agentName]: {
362
+ name: lastAgentStateMessage.agentName,
363
+ state: lastAgentStateMessage.state,
364
+ running: lastAgentStateMessage.running,
365
+ active: lastAgentStateMessage.active,
366
+ threadId: lastAgentStateMessage.threadId,
367
+ nodeName: lastAgentStateMessage.nodeName,
368
+ runId: lastAgentStateMessage.runId,
369
+ },
370
+ }));
359
371
  if (lastAgentStateMessage.running) {
360
- setCoagentStates((prevAgentStates) => ({
361
- ...prevAgentStates,
362
- [lastAgentStateMessage.agentName]: {
363
- name: lastAgentStateMessage.agentName,
364
- state: lastAgentStateMessage.state,
365
- running: lastAgentStateMessage.running,
366
- active: lastAgentStateMessage.active,
367
- threadId: lastAgentStateMessage.threadId,
368
- nodeName: lastAgentStateMessage.nodeName,
369
- runId: lastAgentStateMessage.runId,
370
- },
371
- }));
372
372
  setAgentSession({
373
373
  threadId: lastAgentStateMessage.threadId,
374
374
  agentName: lastAgentStateMessage.agentName,