@commentkit/comment-kit 1.6.0 → 2.0.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/CHANGELOG.md +298 -590
- package/README.md +421 -145
- package/SECURITY.md +47 -46
- package/dist/node/THIRD_PARTY_NOTICES.txt +56 -0
- package/dist/node/browser.js +17 -0
- package/dist/node/cli/api.js +226 -0
- package/dist/node/cli/bin.js +18 -0
- package/dist/node/cli/credentials.js +268 -0
- package/dist/node/cli/doctor.js +789 -0
- package/dist/node/cli/format.js +54 -0
- package/dist/node/cli/init.js +686 -0
- package/dist/node/cli/main.js +537 -0
- package/dist/node/cli/mcp.js +295 -0
- package/dist/node/cli/open.js +20 -0
- package/dist/node/plugins/astro-B5y1Gtbf.js +31 -0
- package/dist/node/plugins/astro.js +26 -0
- package/dist/node/plugins/git-BIXLbL3f.js +92 -0
- package/dist/node/plugins/jsx-Bg4BdSph.js +7958 -0
- package/dist/node/plugins/next.js +48 -0
- package/dist/node/plugins/options-THop1K92.js +71 -0
- package/dist/node/plugins/transform-CKiAuSbk.js +1155 -0
- package/dist/node/plugins/vite-BdAYUW10.js +74 -0
- package/dist/node/plugins/vite.js +1 -0
- package/dist/node/plugins/webpack-R2U2DLlY.js +35 -0
- package/dist/node/plugins/webpack-loader.cjs +21 -0
- package/dist/node/plugins/webpack-loader.js +18 -0
- package/dist/node/plugins/webpack.js +1 -0
- package/dist/node/shared/dashboard-places.js +33 -0
- package/dist/node/shared/endpoint.js +26 -0
- package/dist/node/shared/format.js +63 -0
- package/dist/node/types/astro.d.ts +11 -0
- package/dist/node/types/next.d.ts +34 -0
- package/dist/node/types/options.d.ts +59 -0
- package/dist/node/types/vite.d.ts +11 -0
- package/dist/node/types/webpack-loader.d.ts +22 -0
- package/dist/node/types/webpack.d.ts +27 -0
- package/dist/npm/THIRD_PARTY_NOTICES.txt +6 -6
- package/dist/npm/chunks/AgentSend-DOy3jhyF.js +68 -0
- package/dist/npm/chunks/Checklist-CW_SwMpS.js +282 -0
- package/dist/npm/chunks/Composer-Bveq5QrK.js +727 -0
- package/dist/npm/chunks/Guest-7hcN765o.js +270 -0
- package/dist/npm/chunks/MarkupEditor-6bJGpWGO.js +345 -0
- package/dist/npm/chunks/Panel-ChPUB68C.js +1211 -0
- package/dist/npm/chunks/Settings-CB5eEKnf.js +231 -0
- package/dist/npm/chunks/Shortcuts-eAyjJ89P.js +62 -0
- package/dist/npm/chunks/StyleEditor-CZTdAA5c.js +46 -0
- package/dist/npm/chunks/StylePanel-B4pHQUL9.js +199 -0
- package/dist/npm/chunks/TaskFields-C8BX0Sgg.js +289 -0
- package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +1160 -0
- package/dist/npm/chunks/Viewer-DY6zb90M.js +114 -0
- package/dist/npm/chunks/{agent-BDMQtOzH.js → agent-MTQHr9ei.js} +9 -9
- package/dist/npm/chunks/{anchor-BsradQhn.js → anchor-BsQNVkHj.js} +108 -85
- package/dist/npm/chunks/{ar-8tPch6W4.js → ar-L5cQ-NPe.js} +71 -19
- package/dist/npm/chunks/card-bits-CTdrkYn8.js +53 -0
- package/dist/npm/chunks/{client-EFTWxHbJ.js → client-7eVxvg5j.js} +282 -290
- package/dist/npm/chunks/confetti-BIs5s14P.js +49 -0
- package/dist/npm/chunks/context-BuMl7A07.js +48 -0
- package/dist/npm/chunks/context-Cf6khm7A.js +20 -0
- package/dist/npm/chunks/{de-C63897uD.js → de-D0C-v6tP.js} +62 -18
- package/dist/npm/chunks/dialog-DvdIkCW0.js +3 -0
- package/dist/npm/chunks/dpop-0A76OPa9.js +96 -0
- package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
- package/dist/npm/chunks/{es-CI2bSpvB.js → es-Bw4Dj9tN.js} +62 -18
- package/dist/npm/chunks/extension-DFVOvciD.js +62 -0
- package/dist/npm/chunks/{extension-BST6LH1q.js → extension-SmoH5AA4.js} +20 -12
- package/dist/npm/chunks/files-4lV9YQIX.js +114 -0
- package/dist/npm/chunks/{fr-rsVe-Lqk.js → fr-TkuQaIAa.js} +120 -76
- package/dist/npm/chunks/{hi-cvwbSaWP.js → hi-DXSH2U8d.js} +63 -19
- package/dist/npm/chunks/{i18n-C4v0M-6z.js → i18n-aVSu9TcJ.js} +136 -92
- package/dist/npm/chunks/identify-BGYh2dVo.js +106 -0
- package/dist/npm/chunks/{it-C8tnV0BF.js → it-CiWA_bch.js} +81 -37
- package/dist/npm/chunks/{ja-BWxDfC2f.js → ja-C-QmR3yz.js} +60 -16
- package/dist/npm/chunks/late-words-80_VWt8S.js +14 -0
- package/dist/npm/chunks/live-BExWHzQ7.js +85 -0
- package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
- package/dist/npm/chunks/{nl-DNQ6eCht.js → nl-CEmZRqjX.js} +63 -19
- package/dist/npm/chunks/page-key-HSY3Lze5.js +62 -0
- package/dist/npm/chunks/{pick-CLyOdjnD.js → pick-B3sR7jtS.js} +45 -44
- package/dist/npm/chunks/pkce-CfZhiNBi.js +8 -0
- package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
- package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
- package/dist/npm/chunks/{pt-BR-CkG7vpU2.js → pt-BR-b-a8sxO8.js} +62 -18
- package/dist/npm/chunks/{realtime-DIo-Wth4.js → realtime-C79zF50C.js} +14 -12
- package/dist/npm/chunks/report-DaVuoRYS.js +44 -0
- package/dist/npm/chunks/show-BoN8AC-F.js +97 -0
- package/dist/npm/chunks/signin-BOWr_WCo.js +75 -0
- package/dist/npm/chunks/{source-CS7C6wJA.js → source-mk3rGBBQ.js} +1 -1
- package/dist/npm/chunks/src-C8rZFyL_.js +215 -0
- package/dist/npm/chunks/start-CV4j78_q.js +1894 -0
- package/dist/npm/chunks/states-b9Bv3Ci7.js +3 -0
- package/dist/npm/chunks/upload-B2mkgMeJ.js +42 -0
- package/dist/npm/chunks/uploads-8AxyRq7g.js +1147 -0
- package/dist/npm/chunks/wrap-DW6EFbVQ.js +69 -0
- package/dist/npm/chunks/{zh-CN-BKuZOLBE.js → zh-CN-JTscW8u8.js} +61 -17
- package/dist/npm/element.js +58 -21
- package/dist/npm/headless.js +7 -3
- package/dist/npm/index.js +3 -3
- package/dist/npm/react.js +18 -11
- package/dist/npm/svelte.js +28 -12
- package/dist/npm/types/adapters/react.d.ts +4 -1
- package/dist/npm/types/adapters/svelte.d.ts +4 -1
- package/dist/npm/types/adapters/vue.d.ts +35 -2
- package/dist/npm/types/anchor/index.d.ts +19 -0
- package/dist/npm/types/capture/privacy.d.ts +14 -0
- package/dist/npm/types/core/api.d.ts +20 -1
- package/dist/npm/types/core/auth.d.ts +40 -21
- package/dist/npm/types/core/client.d.ts +60 -4
- package/dist/npm/types/core/page-key.d.ts +42 -0
- package/dist/npm/types/core/types.d.ts +87 -4
- package/dist/npm/types/element.d.ts +17 -7
- package/dist/npm/types/headless.d.ts +2 -1
- package/dist/npm/types/index.d.ts +16 -6
- package/dist/npm/vue.js +44 -9
- package/package.json +90 -14
- package/dist/npm/chunks/AgentSend-2JPDseOo.js +0 -63
- package/dist/npm/chunks/Checklist-BpDXQebo.js +0 -257
- package/dist/npm/chunks/Composer-CAyj-c8e.js +0 -677
- package/dist/npm/chunks/Guest-ZdFmTcXI.js +0 -187
- package/dist/npm/chunks/MarkupEditor-BFplZwFy.js +0 -332
- package/dist/npm/chunks/Panel-BhZ4XRDR.js +0 -861
- package/dist/npm/chunks/Settings-SPG9EHUZ.js +0 -204
- package/dist/npm/chunks/Shortcuts-C28HVDw6.js +0 -58
- package/dist/npm/chunks/StyleEditor-ByZMtq10.js +0 -43
- package/dist/npm/chunks/StylePanel-Iwhce2tE.js +0 -197
- package/dist/npm/chunks/TaskFields-BsP_fVJg.js +0 -273
- package/dist/npm/chunks/ThreadCard-BzVZdDCb.js +0 -1030
- package/dist/npm/chunks/Viewer-CqtGrdD8.js +0 -108
- package/dist/npm/chunks/card-bits-Bna-g3Py.js +0 -124
- package/dist/npm/chunks/confetti-DTKpwF3O.js +0 -40
- package/dist/npm/chunks/drafts-akdBsOd0.js +0 -50
- package/dist/npm/chunks/extension-D-V3utTm.js +0 -53
- package/dist/npm/chunks/live-BCpJVBeN.js +0 -33
- package/dist/npm/chunks/report-BBrT3r89.js +0 -27
- package/dist/npm/chunks/src-C4FsVoUp.js +0 -148
- package/dist/npm/chunks/start-i9M-r3aH.js +0 -1800
- package/dist/npm/chunks/upload-DSv7EyBD.js +0 -41
- package/dist/npm/chunks/uploads-I01kdqQF.js +0 -1103
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commentkit/comment-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Figma-style comments for any website. Clients pin feedback with an automatic screenshot; developers see it on localhost and hand it to their AI agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"comments",
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
"bug reporting",
|
|
12
12
|
"screenshot",
|
|
13
13
|
"mcp",
|
|
14
|
-
"ai agent"
|
|
14
|
+
"ai agent",
|
|
15
|
+
"vite-plugin",
|
|
16
|
+
"webpack-plugin",
|
|
17
|
+
"nextjs",
|
|
18
|
+
"astro-integration",
|
|
19
|
+
"cli"
|
|
15
20
|
],
|
|
16
21
|
"homepage": "https://commentkit.dev",
|
|
17
22
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -22,40 +27,79 @@
|
|
|
22
27
|
},
|
|
23
28
|
"type": "module",
|
|
24
29
|
"sideEffects": [
|
|
25
|
-
"./dist/npm/element.js"
|
|
30
|
+
"./dist/npm/element.js",
|
|
31
|
+
"./dist/node/browser.js"
|
|
26
32
|
],
|
|
33
|
+
"bin": {
|
|
34
|
+
"commentkit": "dist/node/cli/bin.js"
|
|
35
|
+
},
|
|
27
36
|
"main": "./dist/npm/index.js",
|
|
28
37
|
"module": "./dist/npm/index.js",
|
|
29
38
|
"types": "./dist/npm/types/index.d.ts",
|
|
30
39
|
"exports": {
|
|
31
40
|
".": {
|
|
32
41
|
"types": "./dist/npm/types/index.d.ts",
|
|
33
|
-
"import": "./dist/npm/index.js"
|
|
42
|
+
"import": "./dist/npm/index.js",
|
|
43
|
+
"default": "./dist/npm/index.js"
|
|
34
44
|
},
|
|
35
45
|
"./react": {
|
|
36
46
|
"types": "./dist/npm/types/adapters/react.d.ts",
|
|
37
|
-
"import": "./dist/npm/react.js"
|
|
47
|
+
"import": "./dist/npm/react.js",
|
|
48
|
+
"default": "./dist/npm/react.js"
|
|
38
49
|
},
|
|
39
50
|
"./vue": {
|
|
40
51
|
"types": "./dist/npm/types/adapters/vue.d.ts",
|
|
41
|
-
"import": "./dist/npm/vue.js"
|
|
52
|
+
"import": "./dist/npm/vue.js",
|
|
53
|
+
"default": "./dist/npm/vue.js"
|
|
42
54
|
},
|
|
43
55
|
"./svelte": {
|
|
44
56
|
"types": "./dist/npm/types/adapters/svelte.d.ts",
|
|
45
|
-
"import": "./dist/npm/svelte.js"
|
|
57
|
+
"import": "./dist/npm/svelte.js",
|
|
58
|
+
"default": "./dist/npm/svelte.js"
|
|
46
59
|
},
|
|
47
60
|
"./element": {
|
|
48
61
|
"types": "./dist/npm/types/element.d.ts",
|
|
49
|
-
"import": "./dist/npm/element.js"
|
|
62
|
+
"import": "./dist/npm/element.js",
|
|
63
|
+
"default": "./dist/npm/element.js"
|
|
50
64
|
},
|
|
51
65
|
"./headless": {
|
|
52
66
|
"types": "./dist/npm/types/headless.d.ts",
|
|
53
|
-
"import": "./dist/npm/headless.js"
|
|
67
|
+
"import": "./dist/npm/headless.js",
|
|
68
|
+
"default": "./dist/npm/headless.js"
|
|
69
|
+
},
|
|
70
|
+
"./vite": {
|
|
71
|
+
"types": "./dist/node/types/vite.d.ts",
|
|
72
|
+
"browser": "./dist/node/browser.js",
|
|
73
|
+
"import": "./dist/node/plugins/vite.js",
|
|
74
|
+
"default": "./dist/node/plugins/vite.js"
|
|
75
|
+
},
|
|
76
|
+
"./next": {
|
|
77
|
+
"types": "./dist/node/types/next.d.ts",
|
|
78
|
+
"browser": "./dist/node/browser.js",
|
|
79
|
+
"import": "./dist/node/plugins/next.js",
|
|
80
|
+
"default": "./dist/node/plugins/next.js"
|
|
81
|
+
},
|
|
82
|
+
"./webpack": {
|
|
83
|
+
"types": "./dist/node/types/webpack.d.ts",
|
|
84
|
+
"browser": "./dist/node/browser.js",
|
|
85
|
+
"import": "./dist/node/plugins/webpack.js",
|
|
86
|
+
"default": "./dist/node/plugins/webpack.js"
|
|
87
|
+
},
|
|
88
|
+
"./webpack/loader": {
|
|
89
|
+
"browser": "./dist/node/browser.js",
|
|
90
|
+
"default": "./dist/node/plugins/webpack-loader.cjs"
|
|
91
|
+
},
|
|
92
|
+
"./astro": {
|
|
93
|
+
"types": "./dist/node/types/astro.d.ts",
|
|
94
|
+
"browser": "./dist/node/browser.js",
|
|
95
|
+
"import": "./dist/node/plugins/astro.js",
|
|
96
|
+
"default": "./dist/node/plugins/astro.js"
|
|
54
97
|
},
|
|
55
98
|
"./package.json": "./package.json"
|
|
56
99
|
},
|
|
57
100
|
"files": [
|
|
58
101
|
"dist/npm",
|
|
102
|
+
"dist/node",
|
|
59
103
|
"README.md",
|
|
60
104
|
"CHANGELOG.md",
|
|
61
105
|
"LICENSE",
|
|
@@ -66,11 +110,18 @@
|
|
|
66
110
|
"registry": "https://registry.npmjs.org/"
|
|
67
111
|
},
|
|
68
112
|
"scripts": {
|
|
69
|
-
"build": "npm run build:npm && npm run build:cdn && npm run build:types && node scripts/check-dist.mjs",
|
|
113
|
+
"build": "npm run build:npm && npm run build:cdn && npm run build:types && npm run build:node && node scripts/check-dist.mjs",
|
|
70
114
|
"build:npm": "vp build",
|
|
71
115
|
"build:cdn": "CK_BUILD=cdn vp build && CK_BUILD=loader vp build",
|
|
72
116
|
"build:types": "rm -rf dist/npm/types && tsc -p tsconfig.build.json && node scripts/prune-types.mjs",
|
|
73
|
-
"
|
|
117
|
+
"build:node": "npm run build:plugins && npm run build:cli",
|
|
118
|
+
"build:plugins": "vp build --config vite.node.config.ts && node scripts/finish-node-build.mjs && rm -rf dist/node/types && tsc -p tsconfig.plugins.json && node scripts/prune-types.mjs node",
|
|
119
|
+
"build:cli": "rm -rf dist/node/cli dist/node/shared && tsc -p tsconfig.cli.json",
|
|
120
|
+
"test": "vp test run && npm run test:node",
|
|
121
|
+
"test:browser": "vp test run",
|
|
122
|
+
"test:node": "npm run build:node && vp test run --config plugins/vitest.config.ts && node --test cli/test/*.test.mjs",
|
|
123
|
+
"test:plugins": "npm run build:plugins && vp test run --config plugins/vitest.config.ts",
|
|
124
|
+
"test:cli": "npm run build:cli && node --test cli/test/*.test.mjs",
|
|
74
125
|
"test:watch": "vp test watch",
|
|
75
126
|
"test:coverage": "vp test run --coverage",
|
|
76
127
|
"test:e2e": "playwright test",
|
|
@@ -78,23 +129,35 @@
|
|
|
78
129
|
"test:host-matrix": "node scripts/host-matrix.mjs",
|
|
79
130
|
"test:wordpress": "node scripts/wordpress-check.mjs",
|
|
80
131
|
"test:wordpress:real": "node e2e/wordpress-real/run.mjs",
|
|
81
|
-
"
|
|
132
|
+
"secret-scan": "node --test scripts/test/*.test.mjs && node scripts/secret-scan.mjs",
|
|
133
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.node.json",
|
|
134
|
+
"typecheck:e2e": "tsc -p tsconfig.e2e.json",
|
|
82
135
|
"check": "npm run typecheck && npm run test && npm run build",
|
|
83
136
|
"prepublishOnly": "npm run check && node scripts/check-pack.mjs",
|
|
84
137
|
"ci": "bash scripts/ci.sh",
|
|
85
138
|
"contract:sync": "bash scripts/contract-sync.sh",
|
|
86
139
|
"changeset": "changeset",
|
|
87
|
-
"version": "changeset version",
|
|
140
|
+
"version": "changeset version && node mcp/scripts/sync-server-json.mjs",
|
|
88
141
|
"release:status": "changeset status --verbose"
|
|
89
142
|
},
|
|
90
143
|
"devDependencies": {
|
|
144
|
+
"@astrojs/compiler": "4.0.0",
|
|
91
145
|
"@axe-core/playwright": "4.14.0",
|
|
146
|
+
"@babel/parser": "8.0.10",
|
|
92
147
|
"@changesets/cli": "3.0.3",
|
|
148
|
+
"@jridgewell/trace-mapping": "0.3.31",
|
|
93
149
|
"@playwright/test": "1.64.1",
|
|
150
|
+
"@sveltejs/vite-plugin-svelte": "7.3.1",
|
|
151
|
+
"@types/node": "26.6.6",
|
|
94
152
|
"@types/react": "19.3.0",
|
|
153
|
+
"@vitejs/plugin-react": "6.1.2",
|
|
154
|
+
"@vitejs/plugin-vue": "6.0.10",
|
|
95
155
|
"@vitest/coverage-v8": "5.0.5",
|
|
156
|
+
"astro": "7.4.4",
|
|
96
157
|
"html2canvas-pro": "2.6.0",
|
|
97
158
|
"jsdom": "30.1.3",
|
|
159
|
+
"laravel-vite-plugin": "3.2.0",
|
|
160
|
+
"magic-string": "1.4.5",
|
|
98
161
|
"preact": "11.1.0",
|
|
99
162
|
"pusher-js": "8.6.0",
|
|
100
163
|
"react": "19.3.1",
|
|
@@ -105,22 +168,35 @@
|
|
|
105
168
|
"vite-plus": "1.4.0",
|
|
106
169
|
"vitest": "5.0.5",
|
|
107
170
|
"vue": "3.5.44",
|
|
171
|
+
"webpack": "5.112.2",
|
|
108
172
|
"yaml": "2.9.1"
|
|
109
173
|
},
|
|
110
174
|
"peerDependencies": {
|
|
175
|
+
"astro": ">=4",
|
|
111
176
|
"react": ">=18",
|
|
112
177
|
"svelte": ">=4",
|
|
113
|
-
"
|
|
178
|
+
"vite": ">=5",
|
|
179
|
+
"vue": ">=3",
|
|
180
|
+
"webpack": ">=5"
|
|
114
181
|
},
|
|
115
182
|
"peerDependenciesMeta": {
|
|
183
|
+
"astro": {
|
|
184
|
+
"optional": true
|
|
185
|
+
},
|
|
116
186
|
"react": {
|
|
117
187
|
"optional": true
|
|
118
188
|
},
|
|
119
189
|
"svelte": {
|
|
120
190
|
"optional": true
|
|
121
191
|
},
|
|
192
|
+
"vite": {
|
|
193
|
+
"optional": true
|
|
194
|
+
},
|
|
122
195
|
"vue": {
|
|
123
196
|
"optional": true
|
|
197
|
+
},
|
|
198
|
+
"webpack": {
|
|
199
|
+
"optional": true
|
|
124
200
|
}
|
|
125
201
|
},
|
|
126
202
|
"overrides": {
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { i as e, l as t, m as n, s as r, u as i } from "./i18n-C4v0M-6z.js";
|
|
2
|
-
import { n as a, t as o } from "./agent-BDMQtOzH.js";
|
|
3
|
-
import { b as s } from "./start-i9M-r3aH.js";
|
|
4
|
-
// src/ui/AgentSend.tsx
|
|
5
|
-
var c = {
|
|
6
|
-
cursor: "Cursor",
|
|
7
|
-
claude: "Claude Code",
|
|
8
|
-
codex: "Codex"
|
|
9
|
-
}, l = "commentkit:agent";
|
|
10
|
-
function u({ client: u, threads: d, onDone: f, onError: p, onClose: m }) {
|
|
11
|
-
let [h, g] = n(null), _ = d.slice(0, 25);
|
|
12
|
-
i(() => {
|
|
13
|
-
let e = !0;
|
|
14
|
-
return Promise.all(_.map((e) => u.allMessages(e.id).then((t) => ({
|
|
15
|
-
thread: e,
|
|
16
|
-
messages: t
|
|
17
|
-
})))).then((t) => e && g(t), (t) => e && (p(t), m())), () => void (e = !1);
|
|
18
|
-
}, []);
|
|
19
|
-
let v = "copy";
|
|
20
|
-
try {
|
|
21
|
-
v = localStorage.getItem(l) ?? "copy";
|
|
22
|
-
} catch {}
|
|
23
|
-
let y = [
|
|
24
|
-
"cursor",
|
|
25
|
-
"claude",
|
|
26
|
-
"codex",
|
|
27
|
-
"copy"
|
|
28
|
-
], b = [v, ...y.filter((e) => e !== v)].filter((e) => y.includes(e)), x = (t) => {
|
|
29
|
-
if (!h) return;
|
|
30
|
-
let n = a(h);
|
|
31
|
-
navigator.clipboard?.writeText(n).catch(() => void 0);
|
|
32
|
-
try {
|
|
33
|
-
localStorage.setItem(l, t);
|
|
34
|
-
} catch {}
|
|
35
|
-
if (t === "copy") return f(e("agentCopied", h.length));
|
|
36
|
-
let { url: i, complete: s } = o(t, h, n, u.state.get().session?.repository ?? null), d = document.createElement("a");
|
|
37
|
-
d.href = i, d.rel = "noopener noreferrer", d.click(), f(r(s ? "agentOpened" : "agentOpenedShort", { agent: c[t] }));
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ t("div", {
|
|
40
|
-
class: "ck-menu ck-agent-menu",
|
|
41
|
-
role: "menu",
|
|
42
|
-
"aria-label": r("sendToAgent"),
|
|
43
|
-
ref: s,
|
|
44
|
-
onKeyDown: (e) => e.key === "Escape" && (e.stopPropagation(), m()),
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ t("div", {
|
|
47
|
-
class: "ck-menu-head",
|
|
48
|
-
children: h ? e("agentReady", h.length) : r("agentPreparing")
|
|
49
|
-
}),
|
|
50
|
-
b.map((e) => /* @__PURE__ */ t("button", {
|
|
51
|
-
role: "menuitem",
|
|
52
|
-
disabled: !h,
|
|
53
|
-
onClick: () => x(e),
|
|
54
|
-
children: e === "copy" ? r("copyPrompt") : r("openIn", { agent: c[e] })
|
|
55
|
-
})),
|
|
56
|
-
d.length > 25 ? /* @__PURE__ */ t("p", {
|
|
57
|
-
class: "ck-muted ck-agent-note",
|
|
58
|
-
children: r("agentFirstOnly", { max: 25 })
|
|
59
|
-
}) : null
|
|
60
|
-
]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
export { u as AgentSend };
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { _ as e, f as t, i as n, l as r, m as i, s as a } from "./i18n-C4v0M-6z.js";
|
|
2
|
-
import { f as o, v as s } from "./start-i9M-r3aH.js";
|
|
3
|
-
// src/ui/art.tsx
|
|
4
|
-
var c = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z", l = (e, t, n, i) => /* @__PURE__ */ r("path", {
|
|
5
|
-
class: i,
|
|
6
|
-
d: c,
|
|
7
|
-
transform: `translate(${e} ${t}) scale(${n})`
|
|
8
|
-
}), u = {
|
|
9
|
-
caughtUp: () => /* @__PURE__ */ r(e, { children: [
|
|
10
|
-
/* @__PURE__ */ r("path", {
|
|
11
|
-
class: "ck-art-w",
|
|
12
|
-
d: "M28 50l8-20h48l8 20v18H28z"
|
|
13
|
-
}),
|
|
14
|
-
/* @__PURE__ */ r("path", {
|
|
15
|
-
class: "ck-art-line",
|
|
16
|
-
d: "M28 50h19l4 6h18l4-6h19"
|
|
17
|
-
}),
|
|
18
|
-
l(44, 4, .5, "ck-art-a"),
|
|
19
|
-
/* @__PURE__ */ r("path", {
|
|
20
|
-
class: "ck-art-tick",
|
|
21
|
-
d: "M53 19l5 5 9-10"
|
|
22
|
-
})
|
|
23
|
-
] }),
|
|
24
|
-
noFeedback: () => /* @__PURE__ */ r(e, { children: [
|
|
25
|
-
/* @__PURE__ */ r("rect", {
|
|
26
|
-
class: "ck-art-w",
|
|
27
|
-
x: "22",
|
|
28
|
-
y: "18",
|
|
29
|
-
width: "70",
|
|
30
|
-
height: "52",
|
|
31
|
-
rx: "7"
|
|
32
|
-
}),
|
|
33
|
-
/* @__PURE__ */ r("path", {
|
|
34
|
-
class: "ck-art-line",
|
|
35
|
-
d: "M22 29h70"
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ r("circle", {
|
|
38
|
-
class: "ck-art-dot",
|
|
39
|
-
cx: "29",
|
|
40
|
-
cy: "23.5",
|
|
41
|
-
r: "1.6"
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ r("circle", {
|
|
44
|
-
class: "ck-art-dot",
|
|
45
|
-
cx: "35",
|
|
46
|
-
cy: "23.5",
|
|
47
|
-
r: "1.6"
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ r("rect", {
|
|
50
|
-
class: "ck-art-m",
|
|
51
|
-
x: "30",
|
|
52
|
-
y: "37",
|
|
53
|
-
width: "34",
|
|
54
|
-
height: "5",
|
|
55
|
-
rx: "2.5"
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ r("rect", {
|
|
58
|
-
class: "ck-art-m",
|
|
59
|
-
x: "30",
|
|
60
|
-
y: "47",
|
|
61
|
-
width: "46",
|
|
62
|
-
height: "5",
|
|
63
|
-
rx: "2.5"
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ r("rect", {
|
|
66
|
-
class: "ck-art-m",
|
|
67
|
-
x: "30",
|
|
68
|
-
y: "57",
|
|
69
|
-
width: "26",
|
|
70
|
-
height: "5",
|
|
71
|
-
rx: "2.5"
|
|
72
|
-
}),
|
|
73
|
-
l(70, 6, .46, "ck-art-a"),
|
|
74
|
-
/* @__PURE__ */ r("path", {
|
|
75
|
-
class: "ck-art-tick",
|
|
76
|
-
d: "M84.5 14v9M80 18.5h9"
|
|
77
|
-
})
|
|
78
|
-
] }),
|
|
79
|
-
noMatch: () => /* @__PURE__ */ r(e, { children: [
|
|
80
|
-
/* @__PURE__ */ r("rect", {
|
|
81
|
-
class: "ck-art-m",
|
|
82
|
-
x: "22",
|
|
83
|
-
y: "22",
|
|
84
|
-
width: "52",
|
|
85
|
-
height: "6",
|
|
86
|
-
rx: "3"
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ r("rect", {
|
|
89
|
-
class: "ck-art-m",
|
|
90
|
-
x: "22",
|
|
91
|
-
y: "36",
|
|
92
|
-
width: "40",
|
|
93
|
-
height: "6",
|
|
94
|
-
rx: "3"
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ r("rect", {
|
|
97
|
-
class: "ck-art-m",
|
|
98
|
-
x: "22",
|
|
99
|
-
y: "50",
|
|
100
|
-
width: "46",
|
|
101
|
-
height: "6",
|
|
102
|
-
rx: "3"
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ r("circle", {
|
|
105
|
-
class: "ck-art-w",
|
|
106
|
-
cx: "76",
|
|
107
|
-
cy: "42",
|
|
108
|
-
r: "15"
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ r("path", {
|
|
111
|
-
class: "ck-art-line ck-art-bold",
|
|
112
|
-
d: "M87 53l11 11"
|
|
113
|
-
}),
|
|
114
|
-
/* @__PURE__ */ r("path", {
|
|
115
|
-
class: "ck-art-line",
|
|
116
|
-
d: "M70 42h12"
|
|
117
|
-
})
|
|
118
|
-
] }),
|
|
119
|
-
error: () => /* @__PURE__ */ r(e, { children: [
|
|
120
|
-
l(36, 6, .75, "ck-art-m"),
|
|
121
|
-
/* @__PURE__ */ r("path", {
|
|
122
|
-
class: "ck-art-line ck-art-bold",
|
|
123
|
-
d: "M60 18v14"
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ r("circle", {
|
|
126
|
-
class: "ck-art-ink",
|
|
127
|
-
cx: "60",
|
|
128
|
-
cy: "40",
|
|
129
|
-
r: "2.4"
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ r("path", {
|
|
132
|
-
class: "ck-art-spark",
|
|
133
|
-
d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
|
|
134
|
-
})
|
|
135
|
-
] }),
|
|
136
|
-
gone: () => /* @__PURE__ */ r(e, { children: l(36, 6, .75, "ck-art-ghost") })
|
|
137
|
-
};
|
|
138
|
-
function d({ name: e }) {
|
|
139
|
-
return /* @__PURE__ */ r("svg", {
|
|
140
|
-
class: "ck-art",
|
|
141
|
-
viewBox: "0 0 120 80",
|
|
142
|
-
width: "120",
|
|
143
|
-
height: "80",
|
|
144
|
-
"aria-hidden": "true",
|
|
145
|
-
focusable: "false",
|
|
146
|
-
children: [/* @__PURE__ */ r("ellipse", {
|
|
147
|
-
class: "ck-art-shadow",
|
|
148
|
-
cx: "60",
|
|
149
|
-
cy: "74",
|
|
150
|
-
rx: "34",
|
|
151
|
-
ry: "3.5"
|
|
152
|
-
}), u[e]()]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
// src/ui/Checklist.tsx
|
|
156
|
-
function f({ client: e, thread: n, editable: c, onChange: l, onError: u }) {
|
|
157
|
-
let [d, f] = i(!1), [p, m] = i(""), [h, g] = i(!1), _ = n.checklist ?? [], v = _.filter((e) => e.done).length, y = t(n);
|
|
158
|
-
y.current = n;
|
|
159
|
-
let b = (e) => l(y.current = {
|
|
160
|
-
...y.current,
|
|
161
|
-
checklist: e(y.current.checklist ?? [])
|
|
162
|
-
}), x = () => {
|
|
163
|
-
let t = p.trim();
|
|
164
|
-
t && !h && (g(!0), m(""), e.addChecklistItem(n.id, t).then((e) => b((t) => [...t, e]), (e) => {
|
|
165
|
-
m(t), u(e);
|
|
166
|
-
}).finally(() => g(!1)));
|
|
167
|
-
}, S = (t) => {
|
|
168
|
-
let n = {
|
|
169
|
-
...t,
|
|
170
|
-
done: !t.done
|
|
171
|
-
}, r = (e) => b((n) => n.map((n) => n.id === t.id ? e : n));
|
|
172
|
-
r(n), e.updateChecklistItem(t.id, { done: n.done }).catch((e) => {
|
|
173
|
-
r(t), u(e);
|
|
174
|
-
});
|
|
175
|
-
}, C = (t) => {
|
|
176
|
-
let n = _.indexOf(t);
|
|
177
|
-
b((e) => e.filter((e) => e.id !== t.id)), e.deleteChecklistItem(t.id).catch((e) => {
|
|
178
|
-
b((e) => e.some((e) => e.id === t.id) ? e : [
|
|
179
|
-
...e.slice(0, n),
|
|
180
|
-
t,
|
|
181
|
-
...e.slice(n)
|
|
182
|
-
]), u(e);
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
return !_.length && !c ? null : /* @__PURE__ */ r("div", {
|
|
186
|
-
class: "ck-extra",
|
|
187
|
-
children: [
|
|
188
|
-
_.length ? /* @__PURE__ */ r("div", {
|
|
189
|
-
class: "ck-checklist",
|
|
190
|
-
role: "group",
|
|
191
|
-
"aria-label": a("checklist"),
|
|
192
|
-
children: [/* @__PURE__ */ r("div", {
|
|
193
|
-
class: "ck-checklist-head",
|
|
194
|
-
children: [/* @__PURE__ */ r("span", {
|
|
195
|
-
class: "ck-muted",
|
|
196
|
-
children: a("checklistProgress", {
|
|
197
|
-
n: v,
|
|
198
|
-
total: _.length
|
|
199
|
-
})
|
|
200
|
-
}), /* @__PURE__ */ r("span", {
|
|
201
|
-
class: "ck-checklist-bar",
|
|
202
|
-
"aria-hidden": "true",
|
|
203
|
-
children: /* @__PURE__ */ r("span", { style: { width: `${Math.round(v / _.length * 100)}%` } })
|
|
204
|
-
})]
|
|
205
|
-
}), /* @__PURE__ */ r("ul", { children: _.map((e) => /* @__PURE__ */ r("li", {
|
|
206
|
-
"data-done": e.done || void 0,
|
|
207
|
-
children: [/* @__PURE__ */ r("label", {
|
|
208
|
-
class: "ck-check",
|
|
209
|
-
children: [/* @__PURE__ */ r("input", {
|
|
210
|
-
type: "checkbox",
|
|
211
|
-
checked: e.done,
|
|
212
|
-
disabled: !c,
|
|
213
|
-
onChange: () => S(e)
|
|
214
|
-
}), /* @__PURE__ */ r("bdi", { children: e.body })]
|
|
215
|
-
}), c ? /* @__PURE__ */ r("button", {
|
|
216
|
-
class: "ck-ghost ck-ghost-sm",
|
|
217
|
-
"aria-label": a("removeItem", { item: e.body }),
|
|
218
|
-
onClick: () => C(e),
|
|
219
|
-
children: /* @__PURE__ */ r(o, {
|
|
220
|
-
name: "close",
|
|
221
|
-
size: 12
|
|
222
|
-
})
|
|
223
|
-
}) : null]
|
|
224
|
-
})) })]
|
|
225
|
-
}) : null,
|
|
226
|
-
c && (d || _.length) ? /* @__PURE__ */ r("div", {
|
|
227
|
-
class: "ck-checklist-add",
|
|
228
|
-
children: /* @__PURE__ */ r("input", {
|
|
229
|
-
class: "ck-input",
|
|
230
|
-
maxLength: 300,
|
|
231
|
-
placeholder: a("checklistAdd"),
|
|
232
|
-
"aria-label": a("checklistAdd"),
|
|
233
|
-
value: p,
|
|
234
|
-
disabled: h,
|
|
235
|
-
ref: d && !_.length ? s : void 0,
|
|
236
|
-
onInput: (e) => m(e.target.value),
|
|
237
|
-
onKeyDown: (e) => {
|
|
238
|
-
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), x()) : e.key === "Escape" && !_.length && f(!1);
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
}) : null,
|
|
242
|
-
c && !_.length && !d ? /* @__PURE__ */ r("div", {
|
|
243
|
-
class: "ck-extra-add",
|
|
244
|
-
children: /* @__PURE__ */ r("button", {
|
|
245
|
-
class: "ck-ghost ck-ghost-sm",
|
|
246
|
-
onClick: () => f(!0),
|
|
247
|
-
children: ["+ ", a("addChecklist")]
|
|
248
|
-
})
|
|
249
|
-
}) : null
|
|
250
|
-
]
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
function p(e) {
|
|
254
|
-
let t = e.checklist ?? [];
|
|
255
|
-
return t.length ? n("checklistShort", t.length, { done: t.filter((e) => e.done).length }) : null;
|
|
256
|
-
}
|
|
257
|
-
export { p as n, d as r, f as t };
|