@copilotkitnext/runtime 0.0.1 → 0.0.2

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.
@@ -1,22 +1,23 @@
1
-
2
- > @copilotkitnext/runtime@0.0.0 build /Users/mme/Code/CopilotKit2/packages/runtime
3
- > tsup
4
-
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.0
8
- CLI Using tsup config: /Users/mme/Code/CopilotKit2/packages/runtime/tsup.config.ts
9
- CLI Target: es2022
10
- CLI Cleaning output folder
11
- CJS Build start
12
- ESM Build start
13
- ESM dist/index.mjs 55.89 KB
14
- ESM dist/index.mjs.map 117.76 KB
15
- ESM ⚡️ Build success in 17ms
16
- CJS dist/index.js 58.40 KB
17
- CJS dist/index.js.map 118.05 KB
18
- CJS ⚡️ Build success in 17ms
19
- DTS Build start
20
- DTS ⚡️ Build success in 6164ms
21
- DTS dist/index.d.ts 7.96 KB
22
- DTS dist/index.d.mts 7.96 KB
1
+
2
+ 
3
+ > @copilotkitnext/runtime@0.0.1 build /Users/mme/Code/vnext_experimental/packages/runtime
4
+ > tsup
5
+
6
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.0
9
+ CLI Using tsup config: /Users/mme/Code/vnext_experimental/packages/runtime/tsup.config.ts
10
+ CLI Target: es2022
11
+ CLI Cleaning output folder
12
+ CJS Build start
13
+ ESM Build start
14
+ ESM dist/index.mjs 56.01 KB
15
+ ESM dist/index.mjs.map 117.94 KB
16
+ ESM ⚡️ Build success in 18ms
17
+ CJS dist/index.js 58.53 KB
18
+ CJS dist/index.js.map 118.22 KB
19
+ CJS ⚡️ Build success in 18ms
20
+ DTS Build start
21
+ DTS ⚡️ Build success in 1717ms
22
+ DTS dist/index.d.ts 7.96 KB
23
+ DTS dist/index.d.mts 7.96 KB
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(index_exports);
42
42
  // package.json
43
43
  var package_default = {
44
44
  name: "@copilotkitnext/runtime",
45
- version: "0.0.1",
45
+ version: "0.0.2",
46
46
  description: "Server-side runtime package for CopilotKit2",
47
47
  main: "dist/index.js",
48
48
  types: "dist/index.d.ts",
@@ -367,6 +367,19 @@ var InMemoryAgentRunner = class extends AgentRunner {
367
367
  try {
368
368
  await request.agent.runAgent(request.input, {
369
369
  onEvent: ({ event }) => {
370
+ if (event.type === import_client2.EventType.MESSAGES_SNAPSHOT) {
371
+ const messagesSnapshotEvent = event;
372
+ const fixedMessages = [];
373
+ const messageIds = /* @__PURE__ */ new Set();
374
+ for (const message of messagesSnapshotEvent.messages) {
375
+ if (messageIds.has(message.id)) {
376
+ continue;
377
+ }
378
+ fixedMessages.push(message);
379
+ messageIds.add(message.id);
380
+ }
381
+ messagesSnapshotEvent.messages = fixedMessages;
382
+ }
370
383
  runSubject.next(event);
371
384
  nextSubject.next(event);
372
385
  currentRunEvents.push(event);