@copilotkit/web-inspector 1.57.0 → 1.57.1
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/dist/index.cjs +1 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -8
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/web-inspector",
|
|
3
|
-
"version": "1.57.
|
|
3
|
+
"version": "1.57.1",
|
|
4
4
|
"description": "Lit-based web component for the CopilotKit web inspector",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lit": "^3.2.0",
|
|
24
24
|
"lucide": "^0.525.0",
|
|
25
25
|
"marked": "^12.0.2",
|
|
26
|
-
"@copilotkit/core": "1.57.
|
|
26
|
+
"@copilotkit/core": "1.57.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@tailwindcss/cli": "^4.1.11",
|
package/src/index.ts
CHANGED
|
@@ -2345,11 +2345,6 @@ export class WebInspectorElement extends LitElement {
|
|
|
2345
2345
|
private agentSubscriptions: Map<string, () => void> = new Map();
|
|
2346
2346
|
private agentEvents: Map<string, InspectorEvent[]> = new Map();
|
|
2347
2347
|
private agentMessages: Map<string, InspectorMessage[]> = new Map();
|
|
2348
|
-
// Tracks which thread each agent is currently running on. Populated from the
|
|
2349
|
-
// agent instance handed to `onAgentRunStarted` so that, when that agent
|
|
2350
|
-
// subsequently emits message changes, we can bump the per-thread live
|
|
2351
|
-
// version (below) only for the thread the messages actually belong to.
|
|
2352
|
-
private agentRunThreadId: Map<string, string> = new Map();
|
|
2353
2348
|
// Per-thread monotonic version that ticks every time an agent currently
|
|
2354
2349
|
// running on that thread emits a message change. `cpk-thread-details`
|
|
2355
2350
|
// watches this prop and re-fetches `/threads/:id/messages` when it changes,
|
|
@@ -2648,19 +2643,6 @@ export class WebInspectorElement extends LitElement {
|
|
|
2648
2643
|
this._threads = Array.from(this._threadsByAgent.values()).flat();
|
|
2649
2644
|
this.requestUpdate();
|
|
2650
2645
|
},
|
|
2651
|
-
onAgentRunStarted: ({ agent }) => {
|
|
2652
|
-
// Subscribe to the concrete agent instance about to run. This handles
|
|
2653
|
-
// per-thread clones that are not in core.agents and therefore not
|
|
2654
|
-
// reachable via onAgentsChanged. Replacing an existing subscription for
|
|
2655
|
-
// the same agentId is safe: the previous instance emits no more events
|
|
2656
|
-
// once a new run starts on a fresh clone.
|
|
2657
|
-
this.subscribeToAgent(agent);
|
|
2658
|
-
const runThreadId = (agent as { threadId?: string }).threadId;
|
|
2659
|
-
if (agent.agentId && runThreadId) {
|
|
2660
|
-
this.agentRunThreadId.set(agent.agentId, runThreadId);
|
|
2661
|
-
}
|
|
2662
|
-
this.requestUpdate();
|
|
2663
|
-
},
|
|
2664
2646
|
} satisfies CopilotKitCoreSubscriber;
|
|
2665
2647
|
|
|
2666
2648
|
this.coreUnsubscribe = core.subscribe(this.coreSubscriber).unsubscribe;
|
|
@@ -3012,7 +2994,7 @@ export class WebInspectorElement extends LitElement {
|
|
|
3012
2994
|
// selected thread and re-fetches `/threads/:id/messages` when it ticks,
|
|
3013
2995
|
// so the conversation view stays in sync with the streaming agent
|
|
3014
2996
|
// without the parent re-implementing AG-UI → ConversationItem mapping.
|
|
3015
|
-
const runThreadId =
|
|
2997
|
+
const runThreadId = (agent as { threadId?: string }).threadId;
|
|
3016
2998
|
if (runThreadId) {
|
|
3017
2999
|
this.liveMessageVersion.set(
|
|
3018
3000
|
runThreadId,
|