@copilotkit/web-inspector 1.55.0-next.8 → 1.55.0
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 +15 -0
- package/dist/index.cjs +48 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +48 -29
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +48 -29
- package/dist/index.umd.js.map +1 -1
- package/package.json +7 -10
- package/src/__tests__/web-inspector.spec.ts +19 -1
- package/src/index.ts +231 -151
- package/eslint.config.mjs +0 -3
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/web-inspector",
|
|
3
|
-
"version": "1.55.0
|
|
3
|
+
"version": "1.55.0",
|
|
4
4
|
"description": "Lit-based web component for the CopilotKit web inspector",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
6
8
|
"types": "./dist/index.d.cts",
|
|
7
|
-
"
|
|
9
|
+
"unpkg": "./dist/index.umd.js",
|
|
10
|
+
"jsdelivr": "./dist/index.umd.js",
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
13
|
"import": "./dist/index.mjs",
|
|
@@ -12,40 +15,34 @@
|
|
|
12
15
|
},
|
|
13
16
|
"./package.json": "./package.json"
|
|
14
17
|
},
|
|
15
|
-
"unpkg": "./dist/index.umd.js",
|
|
16
|
-
"jsdelivr": "./dist/index.umd.js",
|
|
17
18
|
"publishConfig": {
|
|
18
19
|
"access": "public"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@ag-ui/client": "0.0.
|
|
22
|
+
"@ag-ui/client": "0.0.52",
|
|
22
23
|
"lit": "^3.2.0",
|
|
23
24
|
"lucide": "^0.525.0",
|
|
24
25
|
"marked": "^12.0.2",
|
|
25
|
-
"@copilotkit/core": "1.55.0
|
|
26
|
+
"@copilotkit/core": "1.55.0"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@tailwindcss/cli": "^4.1.11",
|
|
29
30
|
"@types/node": "^22.15.3",
|
|
30
31
|
"concurrently": "^9.1.0",
|
|
31
|
-
"eslint": "^9.30.0",
|
|
32
32
|
"tailwindcss": "^4.0.8",
|
|
33
33
|
"tsdown": "^0.20.3",
|
|
34
34
|
"typescript": "5.8.2",
|
|
35
35
|
"vitest": "^3.0.5",
|
|
36
|
-
"@copilotkit/eslint-config": "1.55.0-next.8",
|
|
37
36
|
"@copilotkit/typescript-config": "1.55.0-next.8"
|
|
38
37
|
},
|
|
39
38
|
"engines": {
|
|
40
39
|
"node": ">=18"
|
|
41
40
|
},
|
|
42
|
-
"module": "./dist/index.mjs",
|
|
43
41
|
"scripts": {
|
|
44
42
|
"build": "tsdown && pnpm run build:css",
|
|
45
43
|
"build:css": "tailwindcss -i ./src/styles/tailwind.css -o ./src/styles/generated.css -m",
|
|
46
44
|
"dev": "pnpm run build:css && concurrently \"pnpm run dev:css\" \"tsdown --watch\"",
|
|
47
45
|
"dev:css": "tailwindcss -i ./src/styles/tailwind.css -o ./src/styles/generated.css --watch --minify",
|
|
48
|
-
"lint": "eslint .",
|
|
49
46
|
"check-types": "pnpm run build:css && tsc --noEmit",
|
|
50
47
|
"test": "pnpm run build:css && vitest run",
|
|
51
48
|
"publint": "publint .",
|
|
@@ -111,7 +111,25 @@ function createMockCore(initialAgents: Record<string, AbstractAgent> = {}) {
|
|
|
111
111
|
describe("WebInspectorElement", () => {
|
|
112
112
|
beforeEach(() => {
|
|
113
113
|
document.body.innerHTML = "";
|
|
114
|
-
|
|
114
|
+
|
|
115
|
+
const store: Record<string, string> = {};
|
|
116
|
+
vi.stubGlobal("localStorage", {
|
|
117
|
+
getItem: (key: string) => store[key] ?? null,
|
|
118
|
+
setItem: (key: string, value: string) => {
|
|
119
|
+
store[key] = value;
|
|
120
|
+
},
|
|
121
|
+
removeItem: (key: string) => {
|
|
122
|
+
delete store[key];
|
|
123
|
+
},
|
|
124
|
+
clear: () => {
|
|
125
|
+
for (const key of Object.keys(store)) delete store[key];
|
|
126
|
+
},
|
|
127
|
+
get length() {
|
|
128
|
+
return Object.keys(store).length;
|
|
129
|
+
},
|
|
130
|
+
key: (index: number) => Object.keys(store)[index] ?? null,
|
|
131
|
+
});
|
|
132
|
+
|
|
115
133
|
const mockClipboard = { writeText: vi.fn().mockResolvedValue(undefined) };
|
|
116
134
|
(navigator as unknown as { clipboard: typeof mockClipboard }).clipboard =
|
|
117
135
|
mockClipboard;
|