@codeyam/codeyam-cli 0.1.0-bleeding-edge.8afd3ee → 0.1.0-staging.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/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +107 -51
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +183 -36
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +0 -34
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/index.ts +0 -2
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/frameworks/getNextRoutePath.ts +2 -6
- package/analyzer-template/project/writeUniversalMocks.ts +2 -6
- package/background/src/lib/virtualized/project/writeUniversalMocks.js +2 -3
- package/background/src/lib/virtualized/project/writeUniversalMocks.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +3 -4
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +5 -25
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +5 -75
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +2 -3
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +0 -13
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +35 -15
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-GqWwt5wG.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-B0oiPem-.js → InteractivePreview-Dh-FldQK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-p0fuyqGQ.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-BKKG1s2B.js → LogViewer-Dp6DC845.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DU_jxCPD.js → SafeScreenshot-xwuhwsZH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-Bl2IRh55.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DmjXUj6m.js → ScenarioViewer-M2QuSHKC.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/_index-CAVtep9Q.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CLmzsLsT.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/chart-column-B2I7jQx2.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/circle-alert-GwwOAbhw.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{components-Dj-Ggnl2.js → components-CAx5ONX_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CgyOwWip.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-BbR3FwNc.js → dev.empty-DGy3zrli.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-BHiWkb_W.js → entity._sha._-1Z6D0fLM.js} +7 -7
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-L7M9Vr5z.js → entity._sha_.create-scenario-ChAdTrrU.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C9w-q7P3.js → entity._sha_.edit._scenarioId-D9L7267w.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entityVersioning-Bk_YB1jM.js → entityVersioning-DO2gCvXv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CdGoUs8A.js → entry.client-C6FRgjPr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-C3-cQjgv.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-Dp4EB9nv.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-Da3jt49-.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-DN7Vr40D.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-172a4629.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-COyVTsPq.js +16 -0
- package/codeyam-cli/src/webserver/build/client/assets/search-CvyP_1Lo.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{settings-NU_ZquhK.js → settings-Hbf8b7J_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-MZc4XdmE.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-BMBi0VzO.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-Lumm1t01.js → useLastLogLine-BBlyqxij.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-C_VxoXTh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/zap-B4gsLUZQ.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/{index-DHr4rT4u.js → index-eAULANMV.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-lutv16q5.js +161 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/templates/codeyam-setup-skill.md +18 -24
- package/package.json +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +107 -51
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +183 -36
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +0 -28
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/index.js +0 -2
- package/packages/analyze/src/lib/asts/sourceFiles/index.js.map +1 -1
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js +2 -3
- package/packages/utils/src/lib/frameworks/getNextRoutePath.js.map +1 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +0 -238
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.ts +0 -25
- package/codeyam-cli/scripts/apply-setup.js +0 -288
- package/codeyam-cli/scripts/apply-setup.js.map +0 -1
- package/codeyam-cli/scripts/extract-setup.js +0 -130
- package/codeyam-cli/scripts/extract-setup.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-rqv54FUY.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DqXXjAJ7.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioPreview-5DY-YIxu.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/_index-DvSrcxsk.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CsaMd9mb.js +0 -10
- package/codeyam-cli/src/webserver/build/client/assets/chart-column-VXBS6qOn.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/circle-alert-n5GUC2AS.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/clock-DKqtX8js.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/file-text-B6Er7j5k.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-KcDVw1FY.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-B9uZ8eSJ.js +0 -12
- package/codeyam-cli/src/webserver/build/client/assets/globals-B0f88RTV.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-v3c6DFp4.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-fca08d7e.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-Cf8VBqIb.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-DA14wXpu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-COJUrwGu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CNaMJ-nR.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-BRShB17p.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/zap-BvukH0eN.js +0 -1
- package/codeyam-cli/src/webserver/build/client/favicon.svg +0 -13
- package/codeyam-cli/src/webserver/build/server/assets/server-build-Bi1mj14J.js +0 -166
- package/codeyam-cli/src/webserver/public/favicon.svg +0 -13
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +0 -191
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +0 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js +0 -16
- package/packages/analyze/src/lib/asts/sourceFiles/getDeclaredEntityNode.js.map +0 -1
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/require-await */
|
|
2
|
-
export const prisma = {
|
|
3
|
-
$connect: async () => { },
|
|
4
|
-
$disconnect: async () => { },
|
|
5
|
-
$on: () => { },
|
|
6
|
-
$use: () => { },
|
|
7
|
-
$transaction: async (fn) => typeof fn === 'function' ? fn(prisma) : [],
|
|
8
|
-
$extends: () => prisma,
|
|
9
|
-
user: {
|
|
10
|
-
findFirst: async () => null,
|
|
11
|
-
findUnique: async () => null,
|
|
12
|
-
findMany: async () => [],
|
|
13
|
-
create: async () => ({}),
|
|
14
|
-
createMany: async () => ({ count: 0 }),
|
|
15
|
-
update: async () => ({}),
|
|
16
|
-
updateMany: async () => ({ count: 0 }),
|
|
17
|
-
upsert: async () => ({}),
|
|
18
|
-
delete: async () => ({}),
|
|
19
|
-
deleteMany: async () => ({ count: 0 }),
|
|
20
|
-
count: async () => 0,
|
|
21
|
-
aggregate: async () => ({}),
|
|
22
|
-
groupBy: async () => [],
|
|
23
|
-
},
|
|
24
|
-
booking: {
|
|
25
|
-
findFirst: async () => null,
|
|
26
|
-
findUnique: async () => null,
|
|
27
|
-
findMany: async () => [],
|
|
28
|
-
create: async () => ({}),
|
|
29
|
-
createMany: async () => ({ count: 0 }),
|
|
30
|
-
update: async () => ({}),
|
|
31
|
-
updateMany: async () => ({ count: 0 }),
|
|
32
|
-
upsert: async () => ({}),
|
|
33
|
-
delete: async () => ({}),
|
|
34
|
-
deleteMany: async () => ({ count: 0 }),
|
|
35
|
-
count: async () => 0,
|
|
36
|
-
aggregate: async () => ({}),
|
|
37
|
-
groupBy: async () => [],
|
|
38
|
-
},
|
|
39
|
-
eventType: {
|
|
40
|
-
findFirst: async () => null,
|
|
41
|
-
findUnique: async () => null,
|
|
42
|
-
findMany: async () => [],
|
|
43
|
-
create: async () => ({}),
|
|
44
|
-
createMany: async () => ({ count: 0 }),
|
|
45
|
-
update: async () => ({}),
|
|
46
|
-
updateMany: async () => ({ count: 0 }),
|
|
47
|
-
upsert: async () => ({}),
|
|
48
|
-
delete: async () => ({}),
|
|
49
|
-
deleteMany: async () => ({ count: 0 }),
|
|
50
|
-
count: async () => 0,
|
|
51
|
-
aggregate: async () => ({}),
|
|
52
|
-
groupBy: async () => [],
|
|
53
|
-
},
|
|
54
|
-
credential: {
|
|
55
|
-
findFirst: async () => null,
|
|
56
|
-
findUnique: async () => null,
|
|
57
|
-
findMany: async () => [],
|
|
58
|
-
create: async () => ({}),
|
|
59
|
-
createMany: async () => ({ count: 0 }),
|
|
60
|
-
update: async () => ({}),
|
|
61
|
-
updateMany: async () => ({ count: 0 }),
|
|
62
|
-
upsert: async () => ({}),
|
|
63
|
-
delete: async () => ({}),
|
|
64
|
-
deleteMany: async () => ({ count: 0 }),
|
|
65
|
-
count: async () => 0,
|
|
66
|
-
aggregate: async () => ({}),
|
|
67
|
-
groupBy: async () => [],
|
|
68
|
-
},
|
|
69
|
-
app: {
|
|
70
|
-
findFirst: async () => null,
|
|
71
|
-
findUnique: async () => null,
|
|
72
|
-
findMany: async () => [],
|
|
73
|
-
create: async () => ({}),
|
|
74
|
-
createMany: async () => ({ count: 0 }),
|
|
75
|
-
update: async () => ({}),
|
|
76
|
-
updateMany: async () => ({ count: 0 }),
|
|
77
|
-
upsert: async () => ({}),
|
|
78
|
-
delete: async () => ({}),
|
|
79
|
-
deleteMany: async () => ({ count: 0 }),
|
|
80
|
-
count: async () => 0,
|
|
81
|
-
aggregate: async () => ({}),
|
|
82
|
-
groupBy: async () => [],
|
|
83
|
-
},
|
|
84
|
-
team: {
|
|
85
|
-
findFirst: async () => null,
|
|
86
|
-
findUnique: async () => null,
|
|
87
|
-
findMany: async () => [],
|
|
88
|
-
create: async () => ({}),
|
|
89
|
-
createMany: async () => ({ count: 0 }),
|
|
90
|
-
update: async () => ({}),
|
|
91
|
-
updateMany: async () => ({ count: 0 }),
|
|
92
|
-
upsert: async () => ({}),
|
|
93
|
-
delete: async () => ({}),
|
|
94
|
-
deleteMany: async () => ({ count: 0 }),
|
|
95
|
-
count: async () => 0,
|
|
96
|
-
aggregate: async () => ({}),
|
|
97
|
-
groupBy: async () => [],
|
|
98
|
-
},
|
|
99
|
-
membership: {
|
|
100
|
-
findFirst: async () => null,
|
|
101
|
-
findUnique: async () => null,
|
|
102
|
-
findMany: async () => [],
|
|
103
|
-
create: async () => ({}),
|
|
104
|
-
createMany: async () => ({ count: 0 }),
|
|
105
|
-
update: async () => ({}),
|
|
106
|
-
updateMany: async () => ({ count: 0 }),
|
|
107
|
-
upsert: async () => ({}),
|
|
108
|
-
delete: async () => ({}),
|
|
109
|
-
deleteMany: async () => ({ count: 0 }),
|
|
110
|
-
count: async () => 0,
|
|
111
|
-
aggregate: async () => ({}),
|
|
112
|
-
groupBy: async () => [],
|
|
113
|
-
},
|
|
114
|
-
schedule: {
|
|
115
|
-
findFirst: async () => null,
|
|
116
|
-
findUnique: async () => null,
|
|
117
|
-
findMany: async () => [],
|
|
118
|
-
create: async () => ({}),
|
|
119
|
-
createMany: async () => ({ count: 0 }),
|
|
120
|
-
update: async () => ({}),
|
|
121
|
-
updateMany: async () => ({ count: 0 }),
|
|
122
|
-
upsert: async () => ({}),
|
|
123
|
-
delete: async () => ({}),
|
|
124
|
-
deleteMany: async () => ({ count: 0 }),
|
|
125
|
-
count: async () => 0,
|
|
126
|
-
aggregate: async () => ({}),
|
|
127
|
-
groupBy: async () => [],
|
|
128
|
-
},
|
|
129
|
-
availability: {
|
|
130
|
-
findFirst: async () => null,
|
|
131
|
-
findUnique: async () => null,
|
|
132
|
-
findMany: async () => [],
|
|
133
|
-
create: async () => ({}),
|
|
134
|
-
createMany: async () => ({ count: 0 }),
|
|
135
|
-
update: async () => ({}),
|
|
136
|
-
updateMany: async () => ({ count: 0 }),
|
|
137
|
-
upsert: async () => ({}),
|
|
138
|
-
delete: async () => ({}),
|
|
139
|
-
deleteMany: async () => ({ count: 0 }),
|
|
140
|
-
count: async () => 0,
|
|
141
|
-
aggregate: async () => ({}),
|
|
142
|
-
groupBy: async () => [],
|
|
143
|
-
},
|
|
144
|
-
selectedCalendar: {
|
|
145
|
-
findFirst: async () => null,
|
|
146
|
-
findUnique: async () => null,
|
|
147
|
-
findMany: async () => [],
|
|
148
|
-
create: async () => ({}),
|
|
149
|
-
createMany: async () => ({ count: 0 }),
|
|
150
|
-
update: async () => ({}),
|
|
151
|
-
updateMany: async () => ({ count: 0 }),
|
|
152
|
-
upsert: async () => ({}),
|
|
153
|
-
delete: async () => ({}),
|
|
154
|
-
deleteMany: async () => ({ count: 0 }),
|
|
155
|
-
count: async () => 0,
|
|
156
|
-
aggregate: async () => ({}),
|
|
157
|
-
groupBy: async () => [],
|
|
158
|
-
},
|
|
159
|
-
webhook: {
|
|
160
|
-
findFirst: async () => null,
|
|
161
|
-
findUnique: async () => null,
|
|
162
|
-
findMany: async () => [],
|
|
163
|
-
create: async () => ({}),
|
|
164
|
-
createMany: async () => ({ count: 0 }),
|
|
165
|
-
update: async () => ({}),
|
|
166
|
-
updateMany: async () => ({ count: 0 }),
|
|
167
|
-
upsert: async () => ({}),
|
|
168
|
-
delete: async () => ({}),
|
|
169
|
-
deleteMany: async () => ({ count: 0 }),
|
|
170
|
-
count: async () => 0,
|
|
171
|
-
aggregate: async () => ({}),
|
|
172
|
-
groupBy: async () => [],
|
|
173
|
-
},
|
|
174
|
-
workflow: {
|
|
175
|
-
findFirst: async () => null,
|
|
176
|
-
findUnique: async () => null,
|
|
177
|
-
findMany: async () => [],
|
|
178
|
-
create: async () => ({}),
|
|
179
|
-
createMany: async () => ({ count: 0 }),
|
|
180
|
-
update: async () => ({}),
|
|
181
|
-
updateMany: async () => ({ count: 0 }),
|
|
182
|
-
upsert: async () => ({}),
|
|
183
|
-
delete: async () => ({}),
|
|
184
|
-
deleteMany: async () => ({ count: 0 }),
|
|
185
|
-
count: async () => 0,
|
|
186
|
-
aggregate: async () => ({}),
|
|
187
|
-
groupBy: async () => [],
|
|
188
|
-
},
|
|
189
|
-
attendee: {
|
|
190
|
-
findFirst: async () => null,
|
|
191
|
-
findUnique: async () => null,
|
|
192
|
-
findMany: async () => [],
|
|
193
|
-
create: async () => ({}),
|
|
194
|
-
createMany: async () => ({ count: 0 }),
|
|
195
|
-
update: async () => ({}),
|
|
196
|
-
updateMany: async () => ({ count: 0 }),
|
|
197
|
-
upsert: async () => ({}),
|
|
198
|
-
delete: async () => ({}),
|
|
199
|
-
deleteMany: async () => ({ count: 0 }),
|
|
200
|
-
count: async () => 0,
|
|
201
|
-
aggregate: async () => ({}),
|
|
202
|
-
groupBy: async () => [],
|
|
203
|
-
},
|
|
204
|
-
feature: {
|
|
205
|
-
findFirst: async () => null,
|
|
206
|
-
findUnique: async () => null,
|
|
207
|
-
findMany: async () => [],
|
|
208
|
-
create: async () => ({}),
|
|
209
|
-
createMany: async () => ({ count: 0 }),
|
|
210
|
-
update: async () => ({}),
|
|
211
|
-
updateMany: async () => ({ count: 0 }),
|
|
212
|
-
upsert: async () => ({}),
|
|
213
|
-
delete: async () => ({}),
|
|
214
|
-
deleteMany: async () => ({ count: 0 }),
|
|
215
|
-
count: async () => 0,
|
|
216
|
-
aggregate: async () => ({}),
|
|
217
|
-
groupBy: async () => [],
|
|
218
|
-
},
|
|
219
|
-
deployment: {
|
|
220
|
-
findFirst: async () => null,
|
|
221
|
-
findUnique: async () => null,
|
|
222
|
-
findMany: async () => [],
|
|
223
|
-
create: async () => ({}),
|
|
224
|
-
createMany: async () => ({ count: 0 }),
|
|
225
|
-
update: async () => ({}),
|
|
226
|
-
updateMany: async () => ({ count: 0 }),
|
|
227
|
-
upsert: async () => ({}),
|
|
228
|
-
delete: async () => ({}),
|
|
229
|
-
deleteMany: async () => ({ count: 0 }),
|
|
230
|
-
count: async () => 0,
|
|
231
|
-
aggregate: async () => ({}),
|
|
232
|
-
groupBy: async () => [],
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
export const readonlyPrisma = prisma;
|
|
236
|
-
export const customPrisma = () => prisma;
|
|
237
|
-
export default prisma;
|
|
238
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,CAAC,MAAM,MAA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tC,UAAU,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAClE,MAAM,EAAE,KAAK,IAAkB,EAAE,CAAC,CAAC,EAAE,CAAC;QACtC,UAAU,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAClE,MAAM,EAAE,KAAK,IAAkB,EAAE,CAAC,CAAC,EAAE,CAAC;QACtC,MAAM,EAAE,KAAK,IAAkB,EAAE,CAAC,CAAC,EAAE,CAAC;QACtC,UAAU,EAAE,KAAK,IAAgC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAClE,KAAK,EAAE,KAAK,IAAqB,EAAE,CAAC,CAAC;QACrC,SAAS,EAAE,KAAK,IAAkB,EAAE,CAAC,CAAC,EAAE,CAAC;QACzC,OAAO,EAAE,KAAK,IAAoB,EAAE,CAAC,EAAE;KACxC;CACK,CAAC;AAET,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAErC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;AAEzC,eAAe,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./components-Dj-Ggnl2.js";import{c as r,F as a}from"./file-text-B6Er7j5k.js";import{C as s}from"./chart-column-VXBS6qOn.js";const i=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],d=r("box",i);const g=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],C=r("code-xml",g);const b=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],n=r("code",b);const h=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],x=r("image",h);const f=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],p=r("list",f);const y=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],m=r("tag",y);function z({type:c}){const t={visual:{iconColor:"#7c3aed",bgColor:"bg-purple-100",bgHex:"#f3e8ff"},library:{iconColor:"#0DBFE9",bgColor:"bg-cyan-100",bgHex:"#cffafe"},type:{iconColor:"#dc2626",bgColor:"bg-red-100",bgHex:"#fee2e2"},data:{iconColor:"#2563eb",bgColor:"bg-blue-100",bgHex:"#dbeafe"},index:{iconColor:"#ea580c",bgColor:"bg-orange-100",bgHex:"#ffedd5"},functionCall:{iconColor:"#7c3aed",bgColor:"bg-purple-100",bgHex:"#f3e8ff"},class:{iconColor:"#059669",bgColor:"bg-emerald-100",bgHex:"#d1fae5"},method:{iconColor:"#0891b2",bgColor:"bg-cyan-100",bgHex:"#cffafe"},other:{iconColor:"#6b7280",bgColor:"bg-gray-100",bgHex:"#f3f4f6"}},o=t[c]||t.other,l=()=>{switch(c){case"library":return e.jsx(C,{size:16,color:o.iconColor});case"visual":return e.jsx(x,{size:16,color:o.iconColor});case"type":return e.jsx(m,{size:16,color:o.iconColor});case"data":return e.jsx(s,{size:16,color:o.iconColor});case"index":return e.jsx(p,{size:16,color:o.iconColor});case"functionCall":return e.jsx(n,{size:16,color:o.iconColor});case"class":return e.jsx(d,{size:16,color:o.iconColor});case"method":return e.jsx(n,{size:16,color:o.iconColor});case"other":return e.jsx(a,{size:16,color:o.iconColor});default:return e.jsx(a,{size:16,color:o.iconColor})}};return e.jsx("span",{className:`flex items-center justify-center w-8 h-8 rounded ${o.bgColor}`,children:l()})}export{C,z as E,x as I};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{j as l,L as D}from"./components-Dj-Ggnl2.js";function F(t,d,x,y,E){const e=d?.scenarios?.find(r=>r.name===t.name),u=!!e?.startedAt,n=!!e?.screenshotStartedAt,k=!!e?.screenshotFinishedAt,p=!!e?.finishedAt,v=1800*1e3,g=n&&!k&&e?.screenshotStartedAt&&Date.now()-new Date(e.screenshotStartedAt).getTime()>v,o=!!t.metadata?.screenshotPaths?.[0]||!!t.metadata?.executionResult,s=n&&!k,c=e?.error,S=t.metadata?.executionResult?.error,a=[];if(d?.errors&&d.errors.length>0)for(const r of d.errors)a.push({source:`${r.phase} phase`,message:r.message});if(d?.steps)for(const r of d.steps)r.error&&a.push({source:r.name,message:r.error});const w=!o&&!c&&!S&&a.length>0,i=!!(c||S||g||w),j=g?"Capture timed out after 30 minutes":(typeof c=="string"?c:null)||S?.message||(w?`Analysis error: ${a[0].message}`:null),L=g?"The capture process has been running for more than 30 minutes and likely got stuck. Consider re-running the analysis.":e?.errorStack||S?.stack||null,A=(y&&E?E.jobs.some(r=>r.entityShas?.includes(y)||r.type==="analysis"&&r.entityShas&&r.entityShas.length===0)||E.currentlyExecuting?.entityShas?.includes(y):!1)&&!u&&!i||!!e?.analyzing&&!u&&!i,C=u&&!n&&!p&&!i,M=(A||C||s)&&!i,h=(A||C)&&x===!1&&!o;let m;h?m="crashed":i?m="error":o||p?m="completed":s?m="capturing":C?m="starting":A?m="queued":m="pending";let b="📷",f="pending",T=!1,$=`Not captured: ${t.name}`;const R="border-gray-300",z=i||h?"bg-red-50":"bg-white";return i||h?(b="⚠️",f="error",$=`Error: ${h?"Analysis process crashed":j||"Unknown error"}`):A?(b="⋯",f="queued",$=`Queued: ${t.name}`):C?(b="⋯",f="starting",T=!0,$=`Starting server for ${t.name}...`):s&&!i?(b="⋯",f="capturing",T=!0,$=`Capturing ${t.name}...`):o&&(b="✓",f="completed",$=t.name),{hasError:i||h,errorMessage:h?"Analysis process crashed":j,errorStack:h?"Process terminated unexpectedly before completing analysis":L,isCapturing:s,isCaptured:o,hasCrashed:h,isAnalyzing:M,isQueued:A,isServerStarting:C,status:m,icon:b,iconType:f,shouldSpin:T,title:$,borderColor:R,bgColor:z}}function P({scenario:t,entitySha:d,size:x="medium",showBorder:y=!0,isOutdated:E=!1}){const e=F(t,void 0,void 0,d,void 0),u=t.metadata?.executionResult,n=!!u,p=(t.metadata?.data?.argumentsData||[]).length,v=u?.returnValue!==void 0&&u?.returnValue!==null,g=u?.sideEffects?.consoleOutput?.length||0,o=u?.timing?.duration||0;let s=0;p>0&&s++,p>2&&s++,v&&s++,g>0&&s++,s=Math.min(3,s);const c=x==="small"?{width:"w-[50px]",height:"h-[38px]",iconSize:"text-base",textSize:"text-[8px]"}:{width:"w-20",height:"h-15",iconSize:"text-xl",textSize:"text-[10px]"},a=e.hasError?{border:"border-red-400",bg:"bg-red-50",icon:"text-red-600",badge:"bg-red-100 text-red-700"}:n?E?{border:"border-amber-500",bg:"bg-amber-50",icon:"text-amber-700",badge:"bg-amber-100 text-amber-700"}:{border:"border-blue-400",bg:"bg-blue-50",icon:"text-blue-600",badge:"bg-blue-100 text-blue-700"}:{border:"border-gray-300 border-dashed",bg:"bg-gray-50",icon:"text-gray-400",badge:"bg-gray-100 text-gray-600"},w=y?`border-2 ${a.border}`:"",i=Array.from({length:3},(L,N)=>l.jsx("div",{className:`w-1 h-1 rounded-full ${N<s?a.icon.replace("text-","bg-"):"bg-gray-300"}`},N)),j=e.hasError?`Error: ${e.errorMessage||"Unknown error"}`:n?`${t.name}
|
|
2
|
-
${p} args → ${v?"value":"void"}${g>0?` (${g} logs)`:""}
|
|
3
|
-
${o}ms`:`Not executed: ${t.name}`;return l.jsxs(D,{to:`/entity/${d}/scenarios/${t.id}`,className:`relative ${c.width} ${c.height} ${w} rounded ${a.bg} flex flex-col items-center justify-center gap-0.5 cursor-pointer transition-all hover:scale-105 hover:shadow-md`,title:j,children:[l.jsx("div",{className:`${a.icon} ${c.iconSize} font-mono font-bold`,children:e.hasError?"⚠":n?"ƒ":"○"}),n&&!e.hasError&&l.jsxs("div",{className:`flex items-center gap-0.5 ${c.textSize} ${a.badge} px-1 rounded`,children:[l.jsx("span",{children:p}),l.jsx("span",{children:"→"}),l.jsx("span",{children:v?"✓":"∅"})]}),n&&!e.hasError&&x==="medium"&&l.jsx("div",{className:"flex gap-0.5 mt-0.5",children:i}),n&&!e.hasError&&o>100&&x==="medium"&&l.jsx("div",{className:`absolute top-0.5 right-0.5 ${c.textSize} ${a.badge} px-1 rounded`,children:o>1e3?`${Math.round(o/1e3)}s`:`${o}ms`}),n&&!e.hasError&&g>0&&x==="medium"&&l.jsxs("div",{className:"absolute bottom-0.5 left-0.5 text-[8px] text-gray-500",children:["📝",g]})]})}export{P as L,F as g};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{j as e,L as u}from"./components-Dj-Ggnl2.js";import{S as j}from"./SafeScreenshot-DU_jxCPD.js";import{L as S,g as b}from"./LibraryFunctionPreview-DqXXjAJ7.js";import{c as C}from"./file-text-B6Er7j5k.js";import{C as w}from"./circle-alert-n5GUC2AS.js";const $=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],v=C("circle-check-big",$);function A({scenario:a,entity:i,analysisStatus:d,queueState:h,processIsRunning:x,size:t="medium",cacheBuster:p,className:f="",viewMode:o}){if(i.entityType==="library")return e.jsx(S,{scenario:a,entitySha:i.sha,size:t==="small"?"small":"medium"});const s=b(a,d,x,i.sha,h),l=t==="small"?{containerClass:"w-16 h-12",iconSize:"text-xl"}:t==="large"?{containerClass:"w-full h-[67px]",iconSize:"text-2xl"}:{containerClass:"w-20 h-15",iconSize:"text-2xl"},c=`relative ${l.containerClass} ${f}`,m=()=>{const n=`/entity/${i.sha}/scenarios/${a.id}`;return o?`${n}/${o}`:n};if(s.isCaptured){const n=a.metadata?.screenshotPaths?.[0];return e.jsx(u,{to:m(),className:`${c} overflow-hidden bg-gray-50 cursor-pointer transition-all flex items-center justify-center hover:scale-105 hover:shadow-md`,children:e.jsx(j,{screenshotPath:n,cacheBuster:p,alt:a.name,title:a.name,className:"max-w-full max-h-full object-contain object-center"})})}const y=()=>{const n={size:t==="small"?16:t==="large"?24:20,strokeWidth:2},g=t==="small"?"text-base":t==="large"?"text-2xl":"text-xl",r=e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
2
|
-
@keyframes strongPulse {
|
|
3
|
-
0%, 100% { opacity: 0.2; }
|
|
4
|
-
50% { opacity: 1; }
|
|
5
|
-
}
|
|
6
|
-
`}),e.jsxs("div",{className:`${g} font-bold tracking-widest flex items-center justify-center text-gray-600`,children:[e.jsx("span",{style:{animation:"strongPulse 1.5s ease-in-out infinite"},children:"."}),e.jsx("span",{style:{animation:"strongPulse 1.5s ease-in-out infinite",animationDelay:"0.3s"},children:"."}),e.jsx("span",{style:{animation:"strongPulse 1.5s ease-in-out infinite",animationDelay:"0.6s"},children:"."})]})]});if(s.shouldSpin||s.iconType==="queued"||s.iconType==="pending")return r;switch(s.iconType){case"starting":case"capturing":return r;case"error":return e.jsx(w,{...n});case"completed":return e.jsx(v,{...n});default:return r}};return e.jsx(u,{to:m(),className:`${c} ${s.bgColor} flex flex-col items-center justify-center cursor-pointer transition-all hover:scale-105 hover:shadow-md`,title:s.title,children:e.jsx("div",{className:l.iconSize,children:y()})})}export{v as C,A as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as J,b as K,d as ee,r as d,j as e,L as m}from"./components-Dj-Ggnl2.js";import{u as se}from"./useLastLogLine-Lumm1t01.js";import{u as te,C as le}from"./useToast-BRShB17p.js";import{L as ne}from"./LogViewer-BKKG1s2B.js";import{I as b,C as V,E as ae}from"./EntityTypeIcon-rqv54FUY.js";import{S as H}from"./SafeScreenshot-DU_jxCPD.js";import{c as re}from"./file-text-B6Er7j5k.js";import{S as ie}from"./settings-COJUrwGu.js";import{Z as oe}from"./zap-BvukH0eN.js";import{L as w}from"./loader-circle-v3c6DFp4.js";import"./chart-column-VXBS6qOn.js";const ce=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],de=re("folder-open",ce),Ne=()=>[{title:"Dashboard - CodeYam"},{name:"description",content:"CodeYam project dashboard"}];function we(){const{stats:j,uncommittedFiles:g,uncommittedEntitiesList:C,recentSimulations:h,visualEntitiesForSimulation:y,projectSlug:v,queueState:F,currentCommit:_}=J(),i=K(),W=ee(),{showToast:x}=te(),[I,P]=d.useState(new Set),[o,T]=d.useState(null),[R,A]=d.useState(!1),[L,k]=d.useState(!1),{lastLine:S,isCompleted:z,resetLogs:Z}=se(v,!!o),{simulatingEntity:f,scenarios:N,scenarioStatuses:U,allScenariosCaptured:E}=d.useMemo(()=>{const s={simulatingEntity:null,scenarios:[],scenarioStatuses:[],allScenariosCaptured:!1};if(!o)return s;const t=y?.find(r=>r.sha===o);if(!t)return s;const l=t.analyses?.[0],a=l?.scenarios||[],n=l?.status?.scenarios||[],u=n.filter(r=>r.screenshotFinishedAt).length,p=a.length>0&&u===a.length;return{simulatingEntity:t,scenarios:a,scenarioStatuses:n,allScenariosCaptured:p}},[o,y]);d.useEffect(()=>{(z||E)&&T(null)},[z,E]);const q=_?.metadata?.currentRun,$=new Set(q?.currentEntityShas||[]),M=new Set(F.jobs.flatMap(s=>s.entityShas||[])),B=new Set(F.currentlyExecuting?.entityShas||[]),D=C.filter(s=>s.entityType==="visual"||s.entityType==="library"),c=D.filter(s=>!$.has(s.sha)&&!M.has(s.sha)&&!B.has(s.sha)),Q=()=>{if(c.length===0){x("All entities are already queued or analyzing","info",3e3);return}console.log("Analyzing uncommitted entities not yet queued:",c.length),console.log("Entity SHAs:",c.map(s=>s.sha)),k(!0),x(`Starting analysis for ${c.length} entities...`,"info",3e3),i.submit({entityShas:c.map(s=>s.sha).join(",")},{method:"post",action:"/api/analyze"})};d.useEffect(()=>{if(i.state==="idle"&&i.data){const s=i.data;s.success?(console.log("[Analyze All] Success:",s.message),x(`Analysis started for ${s.entityCount} entities in ${s.fileCount} files. Watch the logs for progress.`,"success",6e3),k(!1)):s.error&&(console.error("[Analyze All] Error:",s.error),x(`Error: ${s.error}`,"error",8e3),k(!1))}},[i.state,i.data,x]);const Y=(s,t)=>{console.log("Simulating entity:",s);const l=y?.find(a=>a.sha===s);T(s),Z(),x(`Starting analysis for ${l?.name||"entity"}...`,"info",3e3),i.submit({entitySha:s,filePath:t},{method:"post",action:"/api/analyze"})},O=s=>{P(t=>{const l=new Set(t);return l.has(s)?l.delete(s):l.add(s),l})},G=d.useMemo(()=>{const s=new Map;return h.forEach(t=>{const l=t.entitySha;s.has(l)||s.set(l,[]),s.get(l).push(t)}),Array.from(s.entries()).map(([t,l])=>({entitySha:t,entityName:l[0].entityName,scenarios:l}))},[h]),X=[{label:"Total Entities",value:j.totalEntities,iconType:"folder",link:"/files",color:"#F59E0B"},{label:"Analyzed Entities",value:j.entitiesWithAnalyses,iconType:"check",link:"/simulations",color:"#10B981"},{label:"Visual Components",value:j.visualEntities,iconType:"image",link:"/files?entityType=visual",color:"#8B5CF6"},{label:"Library Functions",value:j.libraryEntities,iconType:"code-xml",link:"/files?entityType=library",color:"#0DBFE9"}];return e.jsx("div",{className:"bg-cygray-10 min-h-screen",children:e.jsxs("div",{className:"py-6 px-12",children:[e.jsxs("header",{className:"mb-8 flex justify-between items-center",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-3xl font-bold text-gray-900 m-0 mb-2",children:"CodeYam"})}),W.state==="loading"&&e.jsx("div",{className:"text-blue-600 text-sm font-medium animate-pulse",children:"🔄 Updating..."})]}),e.jsx("div",{className:"flex items-center justify-between gap-3",children:X.map((s,t)=>e.jsx(m,{to:s.link,className:"flex-1 bg-white rounded-xl border border-gray-200 overflow-hidden flex transition-all hover:shadow-lg hover:-translate-y-0.5 no-underline",style:{borderLeft:`4px solid ${s.color}`},children:e.jsxs("div",{className:"px-6 py-4 flex flex-col gap-3 flex-1",children:[e.jsxs("div",{className:"flex md:justify-between md:items-start md:flex-row flex-col",children:[e.jsx("div",{className:"text-xs text-gray-700 font-medium",children:s.label}),e.jsx("div",{className:"text-xs font-medium transition-colors flex items-center gap-1 hidden md:flex",style:{color:s.color},children:"View All →"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"rounded-lg p-2 leading-none flex-shrink-0",style:{backgroundColor:`${s.color}15`},children:[s.iconType==="folder"&&e.jsx(de,{size:20,style:{color:s.color}}),s.iconType==="check"&&e.jsx(le,{size:20,style:{color:s.color}}),s.iconType==="image"&&e.jsx(b,{size:20,style:{color:s.color}}),s.iconType==="gear"&&e.jsx(ie,{size:20,style:{color:s.color}}),s.iconType==="code-xml"&&e.jsx(V,{size:20,style:{color:s.color}})]}),e.jsx("div",{className:"text-2xl font-bold text-gray-900 leading-none",children:s.value})]}),e.jsx("div",{className:"text-xs font-medium transition-colors flex items-center gap-1 md:hidden",style:{color:s.color},children:"View All →"})]})]})},t))}),e.jsxs("div",{className:"mt-12 grid gap-8 items-start",style:{gridTemplateColumns:"repeat(auto-fit, minmax(500px, 1fr))"},children:[e.jsxs("section",{id:"uncommitted",className:"bg-white border border-gray-200 rounded-xl p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-[22px] font-semibold text-gray-900 m-0 mb-1",children:"Uncommitted Changes"}),e.jsx("p",{className:"text-sm text-gray-500 m-0",children:g.length>0?`${g.length} file${g.length!==1?"s":""} with ${C.length} uncommitted entit${C.length!==1?"ies":"y"}`:"No uncommitted changes detected"})]}),D.length>0&&e.jsx("button",{onClick:Q,disabled:i.state!=="idle"||L||c.length===0,className:"px-5 py-2.5 text-white border-none rounded-lg text-sm font-semibold cursor-pointer transition-all hover:-translate-y-px disabled:bg-gray-400 disabled:cursor-not-allowed disabled:translate-y-0",style:{backgroundColor:"#005C75"},onMouseEnter:s=>s.currentTarget.style.backgroundColor="#004560",onMouseLeave:s=>s.currentTarget.style.backgroundColor="#005C75",children:i.state!=="idle"||L?"Starting analysis...":c.length===0?"All Queued":`Analyze All (${c.length})`})]}),g.length>0?e.jsx("div",{className:"flex flex-col gap-3",children:g.map(([s,t])=>{const l=I.has(s),a=t.editedEntities||[];return e.jsxs("div",{className:"bg-white border border-gray-200 border-l-4 rounded-lg overflow-hidden",style:{borderLeftColor:"#306AFF"},children:[e.jsx("div",{className:"p-4 cursor-pointer select-none transition-colors hover:bg-gray-50",onClick:()=>O(s),role:"button",tabIndex:0,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-gray-500 text-xs w-4 shrink-0",children:l?"▼":"▶"}),e.jsxs("svg",{width:"16",height:"20",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0",children:[e.jsxs("g",{clipPath:"url(#clip0_784_10666)",children:[e.jsx("path",{d:"M0 2.55857C0 1.14551 1.14551 0 2.55857 0H8.73194L12 3.3616V13.4414C12 14.8545 10.8545 16 9.44143 16H2.55857C1.14551 16 0 14.8545 0 13.4414V2.55857Z",fill:"#DDDDFE"}),e.jsx("path",{d:"M8.72656 3.3307H11.9906L8.72656 0V3.3307Z",fill:"#306AFF"}),e.jsx("line",{x1:"1.8125",y1:"5.94825",x2:"10.0235",y2:"5.94825",stroke:"#306AFF",strokeWidth:"1.27929"}),e.jsx("line",{x1:"1.8125",y1:"8.82715",x2:"6.01207",y2:"8.82715",stroke:"#306AFF",strokeWidth:"1.27929"}),e.jsx("line",{x1:"1.8125",y1:"11.7061",x2:"10.0235",y2:"11.7061",stroke:"#306AFF",strokeWidth:"1.27929"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_784_10666",children:e.jsx("rect",{width:"12",height:"16",fill:"white"})})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"font-normal text-gray-900 text-sm block truncate",children:s}),e.jsxs("span",{className:"text-xs text-gray-500",children:[a.length," entit",a.length!==1?"ies":"y"]})]})]})}),l&&e.jsx("div",{className:"border-t border-gray-200 bg-gray-50 p-3 flex flex-col gap-2",children:a.length>0?a.map(n=>{const u=$.has(n.sha),p=M.has(n.sha)||B.has(n.sha);return e.jsxs(m,{to:`/entity/${n.sha}`,className:"flex items-center gap-4 p-4 bg-white border border-gray-200 rounded-lg no-underline transition-all hover:shadow-md hover:-translate-y-0.5",style:{borderColor:"inherit"},onMouseEnter:r=>r.currentTarget.style.borderColor="#005C75",onMouseLeave:r=>r.currentTarget.style.borderColor="inherit",children:[e.jsxs("div",{className:"shrink-0 rounded-lg p-1.5 flex items-center justify-center",style:{backgroundColor:n.entityType==="visual"?"#8B5CF615":n.entityType==="library"?"#6366F1":"#EC4899"},children:[n.entityType==="visual"&&e.jsx(b,{size:16,style:{color:"#8B5CF6"}}),n.entityType==="library"&&e.jsx(V,{size:16,className:"text-white"}),n.entityType==="other"&&e.jsx(oe,{size:16,className:"text-white"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[e.jsx("div",{className:"font-semibold text-gray-900 text-sm",children:n.name}),n.entityType==="visual"&&e.jsx("div",{className:"px-2 py-0.5 rounded-sm text-[10px] uppercase font-bold",style:{backgroundColor:"#8B5CF60D",color:"#8B5CF6"},children:"Visual"}),n.entityType==="library"&&e.jsx("div",{className:"px-2 py-0.5 rounded-sm text-[10px] uppercase font-bold",style:{backgroundColor:"#0DBFE90D",color:"#0DBFE9"},children:"Library"}),n.entityType==="other"&&e.jsx("div",{className:"px-2 py-0.5 rounded-sm text-[10px] uppercase font-bold",style:{backgroundColor:"#EC48990D",color:"#EC4899"},children:"Other"})]}),n.description&&e.jsx("div",{className:"text-sm text-gray-500 mt-1 overflow-hidden text-ellipsis whitespace-nowrap",children:n.description})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u&&e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(w,{size:14,className:"animate-spin"}),"Analyzing..."]}),!u&&p&&e.jsx("div",{className:"px-2 py-1 bg-purple-50 border border-purple-300 rounded text-xs text-purple-700 font-semibold",children:"⏳ Queued"}),!u&&!p&&e.jsx("button",{onClick:r=>{r.preventDefault(),r.stopPropagation(),x(`Starting analysis for ${n.name}...`,"info",3e3),i.submit({entityShas:n.sha},{method:"post",action:"/api/analyze"})},disabled:i.state!=="idle",className:"px-3 py-1.5 text-white border-none rounded text-xs font-medium cursor-pointer transition-all disabled:bg-gray-400 disabled:cursor-not-allowed",style:{backgroundColor:"#005C75"},onMouseEnter:r=>r.currentTarget.style.backgroundColor="#004560",onMouseLeave:r=>r.currentTarget.style.backgroundColor="#005C75",children:"Analyze"})]})]},n.sha)}):e.jsx("div",{className:"text-sm text-gray-500 italic p-2",children:"No entity changes detected in this file"})})]},s)})}):e.jsxs("div",{className:"py-12 px-6 text-center flex flex-col items-center bg-gray-50 rounded-lg min-h-[200px] justify-center",children:[e.jsxs("svg",{width:"52",height:"68",viewBox:"0 0 26 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mb-4 opacity-40",children:[e.jsxs("g",{clipPath:"url(#clip0_784_10631)",children:[e.jsx("path",{d:"M0 2.55857C0 1.14551 1.14551 0 2.55857 0H18.9423L26.0318 7.14651V31.4562C26.0318 32.8693 24.8863 34.0148 23.4732 34.0148H2.55857C1.14551 34.0148 0 32.8693 0 31.4562V2.55857Z",fill:"#D9D9D9"}),e.jsx("path",{d:"M18.9453 7.08081H26.0261L18.9453 0V7.08081Z",fill:"#646464"}),e.jsx("line",{x1:"3.92188",y1:"13.3633",x2:"21.7341",y2:"13.3633",stroke:"#646464",strokeWidth:"1.27929"}),e.jsx("line",{x1:"3.92188",y1:"19.4863",x2:"13.0321",y2:"19.4863",stroke:"#646464",strokeWidth:"1.27929"}),e.jsx("line",{x1:"3.92188",y1:"25.6016",x2:"21.7341",y2:"25.6016",stroke:"#646464",strokeWidth:"1.27929"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_784_10631",children:e.jsx("rect",{width:"26",height:"34",fill:"white"})})})]}),e.jsx("p",{className:"text-sm font-medium text-gray-400 m-0 mb-2",children:"No Uncommitted Changes."})]})]}),e.jsxs("section",{className:"bg-white border border-gray-200 rounded-xl p-6",children:[e.jsx("div",{className:"flex justify-between items-start mb-5",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-[22px] font-semibold text-gray-900 m-0 mb-1",children:"Recent Simulations"}),e.jsx("p",{className:"text-sm text-gray-500 m-0",children:h.length>0?`Latest ${h.length} captured screenshot${h.length!==1?"s":""}`:"No simulations captured yet"})]})}),h.length>0&&!o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-6 mb-5",children:G.map(s=>e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx("div",{className:"shrink-0 rounded-lg p-1.5 flex items-center justify-center bg-purple-100",children:e.jsx(b,{size:16,style:{color:"#8B5CF6"}})}),e.jsx(m,{to:`/entity/${s.entitySha}`,className:"text-sm font-semibold text-gray-900 no-underline hover:text-gray-700 transition-colors",children:s.entityName})]}),e.jsx("div",{className:"grid grid-cols-4 gap-3",children:s.scenarios.map((t,l)=>e.jsx(m,{to:t.scenarioId?`/entity/${t.entitySha}/scenarios/${t.scenarioId}`:`/entity/${t.entitySha}`,className:"aspect-4/3 border border-gray-200 rounded-lg overflow-hidden bg-gray-50 transition-all flex items-center justify-center hover:scale-105",onMouseEnter:a=>{a.currentTarget.style.borderColor="#005C75",a.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.2)"},onMouseLeave:a=>{a.currentTarget.style.borderColor="#E5E7EB",a.currentTarget.style.boxShadow="none"},title:`${t.scenarioName}`,children:e.jsx(H,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain object-center"})},l))})]},s.entitySha))}),e.jsx(m,{to:"/recent",className:"block text-center p-3 rounded-lg no-underline font-semibold text-sm transition-all",style:{color:"#005C75",backgroundColor:"#F6F9FC"},onMouseEnter:s=>s.currentTarget.style.backgroundColor="#EEF4F8",onMouseLeave:s=>s.currentTarget.style.backgroundColor="#F6F9FC",children:"View All Recent Simulations →"})]}):o?e.jsxs("div",{className:"p-0 bg-white rounded-lg flex flex-col gap-0",children:[f&&e.jsx("div",{className:"p-4 rounded-t-lg",style:{backgroundColor:"#F0F5F8",borderBottom:"2px solid #005C75"},children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[32px] leading-none",children:e.jsx(ae,{type:"visual"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"text-base font-bold mb-1",style:{color:"#005C75"},children:["Generating Simulations for ",f.name]}),e.jsx("div",{className:"text-[13px] text-gray-500 font-mono overflow-hidden text-ellipsis whitespace-nowrap",children:f.filePath})]})]})}),E?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-emerald-600 font-medium p-4 bg-emerald-50",children:[e.jsx("span",{className:"text-lg",children:"✅"}),e.jsxs("span",{children:["Complete (",N.length," scenario",N.length!==1?"s":"",")"]})]}):S?e.jsxs("div",{className:"flex items-center justify-between gap-1.5 text-sm font-medium p-4 bg-gray-50",style:{color:"#005C75"},children:[e.jsx(w,{size:18,className:"animate-spin shrink-0"}),e.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap font-mono text-xs",title:S,children:S}),v&&e.jsx("button",{onClick:()=>A(!0),className:"px-2 py-1.5 bg-gray-500 text-white border-none rounded-md text-[13px] font-medium cursor-pointer transition-all whitespace-nowrap self-start hover:bg-gray-600 hover:-translate-y-px",title:"View analysis logs",children:"📋 Logs"})]}):i.state!=="idle"?e.jsxs("div",{className:"flex items-center justify-between gap-1.5 text-sm font-medium p-4 bg-gray-50",style:{color:"#005C75"},children:[e.jsx(w,{size:18,className:"animate-spin shrink-0"}),e.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:"Initializing analysis..."})]}):e.jsxs("div",{className:"flex items-center justify-between gap-1.5 text-sm font-medium p-4 bg-gray-50",style:{color:"#005C75"},children:[e.jsx(w,{size:18,className:"animate-spin shrink-0"}),e.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:"Starting analysis..."})]}),N.length>0&&e.jsx("div",{className:"flex gap-2 flex-wrap p-4 bg-white border-t border-gray-200",children:N.slice(0,8).map((s,t)=>{const l=s.metadata?.screenshotPaths?.[0],a=U.find(p=>p.name===s.name),n=a?.screenshotStartedAt&&!a?.screenshotFinishedAt;return l?e.jsx(m,{to:`/entity/${o}`,className:"w-20 h-15 border-2 border-gray-200 rounded overflow-hidden bg-gray-50 cursor-pointer transition-all flex items-center justify-center no-underline hover:border-blue-600 hover:scale-105 hover:shadow-md",children:e.jsx(H,{screenshotPath:l,alt:s.name,title:s.name,className:"max-w-full max-h-full object-contain object-center"})},t):e.jsx("div",{className:"w-20 h-15 border-2 border-dashed border-gray-300 rounded bg-gray-50 flex items-center justify-center text-2xl",title:`Capturing ${s.name}...`,children:e.jsx("span",{className:n?"animate-pulse":"text-gray-400",children:n?"⋯":"⏹️"})},t)})})]}):e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsxs("div",{className:"py-12 px-6 text-center bg-gray-50 rounded-lg w-full flex flex-col items-center justify-center min-h-[200px]",children:[e.jsx("div",{className:"mb-4 bg-[#efefef] rounded-lg p-3",children:e.jsx(b,{size:28,style:{color:"#999999"},strokeWidth:1.5})}),e.jsx("p",{className:"text-gray-700 m-0 font-semibold",children:"Start by analyzing your first component below."})]}),(y?.length??0)>0?e.jsx(e.Fragment,{children:e.jsx("div",{className:"flex flex-col gap-3 mt-6 w-full",children:(o&&f?[f]:y||[]).map(s=>e.jsx("div",{className:"flex flex-col gap-3",children:e.jsxs("div",{className:"flex items-center gap-4 p-4 bg-white border border-gray-200 rounded-lg transition-colors",style:{borderLeft:"4px solid #8B5CF6"},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#F9FAFB"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="white"},children:[e.jsxs(m,{to:`/entity/${s.sha}`,className:"flex items-center gap-4 flex-1 min-w-0 no-underline",children:[e.jsx("div",{className:"shrink-0 rounded-lg p-1.5 flex items-center justify-center bg-purple-100",children:e.jsx(b,{size:16,style:{color:"#8B5CF6"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-gray-900 text-sm mb-1",children:s.name}),e.jsx("div",{className:"text-xs text-gray-500 font-mono overflow-hidden text-ellipsis whitespace-nowrap",children:s.filePath})]})]}),e.jsx("button",{onClick:()=>Y(s.sha,s.filePath||""),disabled:i.state!=="idle"||o!==null,className:"px-4 py-2 text-white border-none rounded text-sm font-medium cursor-pointer transition-all whitespace-nowrap shrink-0 disabled:bg-gray-400 disabled:cursor-not-allowed disabled:translate-y-0",style:{backgroundColor:"#005C75"},onMouseEnter:t=>t.currentTarget.style.backgroundColor="#004560",onMouseLeave:t=>t.currentTarget.style.backgroundColor="#005C75",title:o?"Please wait for current analysis to complete":"Analyze this entity",children:"Analyze"})]})},s.sha))})}):e.jsx("p",{className:"text-base text-gray-600 m-0 mb-6 leading-relaxed mt-6",children:"Run analysis on your visual components to create simulations and capture screenshots"})]})]})]}),R&&v&&e.jsx(ne,{projectSlug:v,onClose:()=>A(!1)})]})})}export{we as default,Ne as meta};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{b as E,j as e,L as g,u as L,f as q,r as A,d as D}from"./components-Dj-Ggnl2.js";import{S as K}from"./settings-COJUrwGu.js";import{c as T,F as C}from"./file-text-B6Er7j5k.js";import{L as F}from"./LogViewer-BKKG1s2B.js";import{u as I}from"./useLastLogLine-Lumm1t01.js";import{C as $,S as z}from"./ScenarioPreview-5DY-YIxu.js";import{C as W}from"./chart-column-VXBS6qOn.js";import{C as B}from"./circle-alert-n5GUC2AS.js";import"./SafeScreenshot-DU_jxCPD.js";import"./LibraryFunctionPreview-DqXXjAJ7.js";const H=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],_=T("cog",H);const Q=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],J=T("list-todo",Q);const V=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],M=T("pause",V);function O(s){const t=Date.now(),c=new Date(s).getTime(),l=t-c,i=Math.floor(l/6e4),a=Math.floor(i/60);return i<1?"just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function R({state:s,currentRun:t}){E();const c=t?.currentEntityShas&&t.currentEntityShas.length>0;return!s.currentlyExecuting&&(!s.jobs||s.jobs.length===0)?null:e.jsxs("div",{className:"bg-white border-2 rounded-xl shadow-lg p-5 mb-6",style:{borderColor:"#005C75"},children:[s.currentlyExecuting&&!c&&e.jsxs("div",{className:"mb-4 border-2 rounded-lg p-3",style:{backgroundColor:"#e8f1f5",borderColor:"#005C75"},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(K,{size:20,className:"animate-spin",style:{color:"#005C75"}}),e.jsx("span",{className:"text-sm font-bold",style:{color:"#003d52"},children:"Starting analysis..."})]}),e.jsxs("p",{className:"text-xs mb-2",style:{color:"#004a5e"},children:["Booting analyzer for"," ",s.currentlyExecuting.entities?.length||s.currentlyExecuting.entityShas?.length||1," ",(s.currentlyExecuting.entities?.length||s.currentlyExecuting.entityShas?.length)===1?"entity":"entities"]}),s.currentlyExecuting.entities&&s.currentlyExecuting.entities.length>0&&e.jsxs("div",{className:"space-y-1 mt-2 max-h-[100px] overflow-y-auto bg-white rounded-md p-2 border",style:{borderColor:"#b3d9e6"},children:[s.currentlyExecuting.entities.slice(0,3).map(l=>e.jsxs(g,{to:`/entity/${l.sha}`,className:"flex items-center gap-1.5 text-xs hover:underline font-medium truncate",title:`${l.name} - ${l.filePath}`,style:{color:"#005C75"},onMouseEnter:i=>i.currentTarget.style.color="#003d52",onMouseLeave:i=>i.currentTarget.style.color="#005C75",children:[e.jsx(C,{size:12,style:{strokeWidth:1.5,flexShrink:0}}),e.jsxs("span",{className:"truncate",children:[l.name,e.jsxs("span",{className:"text-gray-400 ml-1",children:["(",l.filePath,")"]})]})]},l.sha)),s.currentlyExecuting.entities.length>3&&e.jsxs("div",{className:"text-xs italic",style:{color:"#005C75"},children:["+",s.currentlyExecuting.entities.length-3," more entities"]})]}),e.jsx("p",{className:"text-xs mt-2",style:{color:"#005C75"},children:"This may take 2-3 minutes for environment setup"})]}),s.jobs.length>0&&e.jsxs("div",{className:"space-y-2",children:[s.jobs.slice(0,5).map((l,i)=>{l.entities?.length||l.entityShas?.length,l.filePaths?.length,l.entityNames?.[0];const a=l.entities&&l.entities.length>0;return e.jsx("div",{className:"flex items-start gap-3",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{className:"text-sm font-semibold text-gray-700",children:["Job ",i+1]}),e.jsx("span",{className:"text-xs text-gray-400",children:"•"}),e.jsx("span",{className:"text-xs text-gray-500",children:O(l.queuedAt)})]}),a&&e.jsxs("div",{className:"space-y-1 mt-2 max-h-[120px] overflow-y-auto bg-white rounded-md p-2 border border-gray-200",children:[l.entities.slice(0,5).map(n=>e.jsxs(g,{to:`/entity/${n.sha}`,className:"flex items-center gap-1.5 text-xs hover:underline font-medium truncate",title:`${n.name} - ${n.filePath}`,style:{color:"#005C75"},onMouseEnter:u=>u.currentTarget.style.color="#003d52",onMouseLeave:u=>u.currentTarget.style.color="#005C75",children:[e.jsx(C,{size:12,style:{strokeWidth:1.5,flexShrink:0}}),e.jsxs("span",{className:"truncate",children:[n.name,e.jsxs("span",{className:"text-gray-400 ml-1",children:["(",n.filePath,")"]})]})]},n.sha)),l.entities.length>5&&e.jsxs("div",{className:"text-xs text-gray-500 italic",children:["+",l.entities.length-5," more entities"]})]}),l.type==="recapture"&&l.scenarioId&&e.jsxs("div",{className:"text-xs text-gray-500 mt-1 font-mono",children:["Scenario: ",l.scenarioId]})]})},l.id)}),s.jobs.length>5&&e.jsxs("div",{className:"text-xs text-gray-500 text-center py-2",children:["+",s.jobs.length-5," more jobs in queue"]})]})]})}function U({activeTab:s,hasCurrentActivity:t,queuedCount:c,historicCount:l}){const i=[{id:"current",label:"Current Activity",hasContent:t,count:null},{id:"queued",label:"Queued Activity",hasContent:c>0,count:c},{id:"historic",label:"Historic Activity",hasContent:l>0,count:l}];return e.jsx("div",{className:"border-b border-gray-200 mb-6",children:e.jsx("nav",{className:"flex gap-8",children:i.map(a=>{const n=s===a.id;return e.jsx(g,{to:a.id==="current"?"/activity":`/activity/${a.id}`,className:`
|
|
2
|
-
relative pb-4 px-2 text-sm font-medium transition-colors
|
|
3
|
-
${n?"border-b-2":"text-gray-500 hover:text-gray-700"}
|
|
4
|
-
`,style:n?{color:"#005C75",borderColor:"#005C75"}:{},children:e.jsxs("span",{className:"flex items-center gap-2",children:[a.label,a.count!==null&&a.count>0&&e.jsx("span",{className:`
|
|
5
|
-
inline-flex items-center justify-center px-2 py-0.5 text-xs font-semibold rounded-full
|
|
6
|
-
${n?"":"bg-gray-200 text-gray-700"}
|
|
7
|
-
`,style:n?{backgroundColor:"#e8f1f5",color:"#005C75"}:{},children:a.count}),a.count===null&&a.hasContent&&e.jsx("span",{className:`
|
|
8
|
-
inline-block w-2 h-2 rounded-full
|
|
9
|
-
${n?"":"bg-gray-400"}
|
|
10
|
-
`,style:n?{backgroundColor:"#005C75"}:{}})]})},a.id)})})})}function G(s){const t=new Date(s),l=Math.floor((new Date().getTime()-t.getTime())/1e3);if(l<60)return"just now";const i=Math.floor(l/60);if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function X({currentlyExecuting:s,currentRun:t,state:c,projectSlug:l,commitSha:i,onShowLogs:a,recentCompletedRuns:n,totalCompletedRuns:u}){const[h,P]=A.useState({}),[p,j]=A.useState({isKilling:!1,current:0,total:0}),w=D(),k=!!s,y=s?.entities||[],x=!!t?.analysisCompletedAt,N=k,{lastLine:v}=I(l,N);return A.useEffect(()=>{if(!t)return;const r=[t.analyzerPid,t.capturePid].filter(o=>!!o);if(r.length===0)return;const m=async()=>{try{const d=await(await fetch(`/api/process-status?pids=${r.join(",")}`)).json();if(d.processes){const b={};d.processes.forEach(S=>{b[S.pid]={isRunning:S.isRunning,processName:S.processName}}),P(b)}}catch(o){console.error("Failed to fetch process statuses:",o)}};m();const f=setInterval(()=>void m(),5e3);return()=>clearInterval(f)},[t?.analyzerPid,t?.capturePid]),N?e.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-6",style:{borderWidth:"2px",borderColor:"#005C75"},children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 bg-gray-100 rounded-full animate-spin",children:e.jsx(_,{size:24,className:"text-gray-700"})}),e.jsx("h3",{className:"text-xl font-bold text-gray-900",children:x?"Capture in Progress":"Analysis in Progress"})]}),e.jsx("button",{onClick:a,className:"px-4 py-2 text-white rounded-md text-sm font-semibold transition-colors",style:{backgroundColor:"#005C75"},onMouseEnter:r=>r.currentTarget.style.backgroundColor="#003d52",onMouseLeave:r=>r.currentTarget.style.backgroundColor="#005C75",children:"View Logs"})]}),x&&(t?.readyToBeCaptured??0)>0&&e.jsxs("div",{className:"rounded-md p-4 mb-4",style:{backgroundColor:"#f0f5f8",borderColor:"#b3d9e8",borderWidth:"1px"},children:[e.jsx("p",{className:"text-sm font-semibold mb-1",style:{color:"#00263d"},children:"Capture Progress:"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("p",{className:"text-sm",style:{color:"#004560"},children:[t?.capturesCompleted??0," of"," ",t?.readyToBeCaptured??0," entities captured"]}),e.jsx("div",{className:"flex-1 rounded-full h-2",style:{backgroundColor:"#b3d9e8"},children:e.jsx("div",{className:"h-2 rounded-full transition-all duration-300",style:{backgroundColor:"#005C75",width:`${(t?.capturesCompleted??0)/(t?.readyToBeCaptured??1)*100}%`}})})]})]}),y&&y.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsxs("p",{className:"text-sm font-semibold text-gray-700 mb-2",children:[x?"Capturing":"Analyzing"," ",y.length," ",y.length===1?"Entity":"Entities",":"]}),e.jsx("div",{className:"space-y-3",children:y.map(r=>{const m=r.analyses?.[0],f=m?.scenarios||[],o=m?.status;return e.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[e.jsxs(g,{to:`/entity/${r.sha}`,className:"flex items-center gap-1.5 text-sm hover:underline font-medium truncate mb-2",title:`${r.name} - ${r.filePath}`,style:{color:"#005C75"},onMouseEnter:d=>d.currentTarget.style.color="#003d52",onMouseLeave:d=>d.currentTarget.style.color="#005C75",children:[e.jsx(C,{size:14,style:{strokeWidth:1.5,flexShrink:0}}),e.jsxs("span",{className:"truncate",children:[r.name,e.jsxs("span",{className:"text-gray-500 ml-2 text-xs",children:["(",r.filePath,")"]})]})]}),f.length>0&&e.jsx("div",{className:"flex gap-2 flex-wrap",children:f.slice(0,5).map((d,b)=>d.id?e.jsx(z,{scenario:d,entity:{sha:r.sha,entityType:r.entityType},analysisStatus:o,queueState:c,processIsRunning:N,size:"small"},b):null)})]},r.sha)})})]}),v&&e.jsxs("div",{className:"flex flex-col gap-2 mb-4",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-700",children:"Current Step:"}),e.jsx("p",{className:"text-sm text-gray-600 font-mono",children:v})]}),(t?.analyzerPid||t?.capturePid)&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-700",children:"Running Processes:"}),e.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded-md p-3",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[t.analyzerPid&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs font-mono bg-gray-200 px-2 py-1 rounded",children:["Analyzer: ",t.analyzerPid]}),h[t.analyzerPid]&&e.jsx("span",{className:`text-xs px-2 py-1 rounded ${h[t.analyzerPid].isRunning?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:h[t.analyzerPid].isRunning?"Running":"Stopped"})]}),t.capturePid&&e.jsxs(e.Fragment,{children:[t.analyzerPid&&e.jsx("span",{className:"text-gray-400",children:"|"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs font-mono bg-gray-200 px-2 py-1 rounded",children:["Capture: ",t.capturePid]}),h[t.capturePid]&&e.jsx("span",{className:`text-xs px-2 py-1 rounded ${h[t.capturePid].isRunning?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:h[t.capturePid].isRunning?"Running":"Stopped"})]})]})]}),(h[t.analyzerPid]?.isRunning||h[t.capturePid]?.isRunning)&&e.jsxs("div",{className:"flex items-center gap-3",children:[p.isKilling&&e.jsxs("span",{className:"text-xs text-gray-600 font-medium",children:["Killing process ",p.current," of"," ",p.total,"..."]}),e.jsx("button",{onClick:()=>{const r=[t.analyzerPid,t.capturePid].filter(o=>!!o&&h[o]?.isRunning);if(r.length===0)return;const m=r.join(", ");if(!confirm(`Are you sure you want to kill all running processes (${m})?`))return;j({isKilling:!0,current:1,total:r.length}),(async()=>{for(let o=0;o<r.length;o++){const d=r[o];try{await fetch("/api/kill-process",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pid:d,commitSha:i||""})})}catch(b){console.error(`Failed to kill process ${d}:`,b)}o<r.length-1&&j({isKilling:!0,current:o+2,total:r.length})}j({isKilling:!1,current:0,total:0}),w.revalidate()})()},disabled:p.isKilling,className:"px-3 py-1 bg-red-600 text-white rounded-md text-xs font-semibold hover:bg-red-700 transition-colors whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed",children:p.isKilling?"Killing...":"Kill All Processes"})]})]})]})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-gray-50 rounded-xl p-12 text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"p-2 bg-gray-200 rounded-lg",children:e.jsx(M,{size:20,className:"text-gray-600"})})}),e.jsx("h3",{className:"text-xl font-semibold text-gray-700 mb-2",children:"No Current Activity"}),e.jsxs("p",{className:"text-gray-500",children:["There are no analyses currently running. Trigger an analysis from the"," ",e.jsx(g,{to:"/git",className:"text-[#005C75] underline hover:text-[#004a5e]",children:"Git"})," ","or"," ",e.jsx(g,{to:"/files",className:"text-[#005C75] underline hover:text-[#004a5e]",children:"Files"})," ","page."]})]}),n&&n.length>0&&e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Recent Completed Analyses"}),e.jsx("div",{className:"space-y-3",children:n.map(r=>{const m=r.analysisCompletedAt||r.archivedAt||r.createdAt,f=r.entities&&r.entities.length>0;return e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx($,{size:18,className:"text-green-600"}),e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:"Completed"}),e.jsx("span",{className:"text-xs text-gray-400",children:"•"}),e.jsx("span",{className:"text-xs text-gray-500",children:m?G(m):"Unknown"})]}),f&&e.jsxs("div",{className:"ml-7 space-y-1",children:[r.entities.slice(0,3).map(o=>e.jsxs(g,{to:`/entity/${o.sha}`,className:"flex items-center gap-1.5 text-sm hover:underline truncate",title:`${o.name} - ${o.filePath}`,style:{color:"#005C75"},onMouseEnter:d=>d.currentTarget.style.color="#003d52",onMouseLeave:d=>d.currentTarget.style.color="#005C75",children:[e.jsx(C,{size:14,style:{strokeWidth:1.5,flexShrink:0}}),e.jsxs("span",{className:"truncate",children:[o.name,e.jsxs("span",{className:"text-gray-400 ml-1 text-xs",children:["(",o.filePath,")"]})]})]},o.sha)),r.entities.length>3&&e.jsxs("div",{className:"text-xs text-gray-500 italic",children:["+",r.entities.length-3," more entities"]})]})]},r.id)})}),u>3&&e.jsx("div",{className:"mt-4 text-center",children:e.jsx(g,{to:"/activity/historic",className:"text-sm font-medium",style:{color:"#005C75"},onMouseEnter:r=>r.currentTarget.style.color="#003d52",onMouseLeave:r=>r.currentTarget.style.color="#005C75",children:"View All Historic Activity →"})})]})]})}function Y({queueJobs:s,state:t,currentRun:c}){return!s||s.length===0?e.jsxs("div",{className:"bg-gray-50 rounded-xl p-12 text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"p-3 bg-gray-200 rounded-lg",children:e.jsx(J,{size:20,className:"text-gray-600"})})}),e.jsx("h3",{className:"text-xl font-semibold text-gray-700 mb-2",children:"No Queued Jobs"}),e.jsx("p",{className:"text-gray-500",children:"Analysis jobs will appear here when they are queued but not yet started."})]}):e.jsx("div",{children:e.jsx(R,{state:t,currentRun:c})})}function Z({historicalRuns:s,totalHistoricalRuns:t,currentPage:c,totalPages:l,tab:i}){return t===0?e.jsxs("div",{className:"bg-gray-50 rounded-xl p-12 text-center",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"p-3 bg-gray-200 rounded-lg",children:e.jsx(W,{size:20,className:"text-gray-600"})})}),e.jsx("h3",{className:"text-xl font-semibold text-gray-700 mb-2",children:"No Historic Activity"}),e.jsx("p",{className:"text-gray-500",children:"Completed analyses will appear here for historical reference."})]}):e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-6",children:[e.jsx("div",{className:"space-y-3",children:s.map(a=>{const n=!!a.failedAt,u=a.readyToBeCaptured,h=a.capturesCompleted??0,P=u===void 0?!0:u===0||h>=u,p=!n&&!!a.analysisCompletedAt&&P,j=a.createdAt?new Date(a.createdAt):null,w=a.failedAt?new Date(a.failedAt):a.analysisCompletedAt?new Date(a.analysisCompletedAt):null,k=j&&w?(w.getTime()-j.getTime())/1e3:null,y=a.entities&&a.entities.length>0;return e.jsx("div",{className:`border rounded-lg p-4 ${n?"bg-red-50 border-red-200":p?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200"}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n?e.jsx(B,{size:20,className:"text-red-500"}):p?e.jsx($,{size:20,className:"text-green-500"}):e.jsx(M,{size:20,className:"text-gray-400"}),e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:n?"Failed":p?"Completed":"Incomplete"}),e.jsx("span",{className:"text-xs text-gray-400",children:"•"}),e.jsx("span",{className:"text-xs text-gray-500",children:a.archivedAt?new Date(a.archivedAt).toLocaleString():a.createdAt?new Date(a.createdAt).toLocaleString():"Unknown"})]}),y&&e.jsxs("div",{className:"ml-7 mt-2 space-y-2 max-h-[300px] overflow-y-auto bg-white rounded-md p-2 border border-gray-200",children:[a.entities.slice(0,5).map(x=>{const N=x.analyses?.[0],v=N?.scenarios||[];return e.jsxs("div",{className:"pb-2 border-b last:border-b-0 border-gray-100",children:[e.jsxs(g,{to:`/entity/${x.sha}`,className:"flex items-center gap-1.5 text-xs hover:underline font-medium truncate mb-1",title:`${x.name} - ${x.filePath}`,style:{color:"#005C75"},onMouseEnter:r=>r.currentTarget.style.color="#003d52",onMouseLeave:r=>r.currentTarget.style.color="#005C75",children:[e.jsx(C,{size:12,style:{strokeWidth:1.5,flexShrink:0}}),e.jsxs("span",{className:"truncate",children:[x.name,e.jsxs("span",{className:"text-gray-400 ml-1",children:["(",x.filePath,")"]})]})]}),v.length>0&&e.jsx("div",{className:"flex gap-1.5 flex-wrap mt-1.5",children:v.slice(0,5).map((r,m)=>r.id?e.jsx(z,{scenario:r,entity:{sha:x.sha,entityType:x.entityType},analysisStatus:N?.status,queueState:void 0,processIsRunning:!1,size:"small"},m):null)})]},x.sha)}),a.entities.length>5&&e.jsxs("div",{className:"text-xs text-gray-500 italic pt-1",children:["+",a.entities.length-5," more entities"]})]}),a.failureReason&&e.jsx("p",{className:"text-xs text-red-600 mt-2 font-mono ml-7",children:a.failureReason})]}),k!==null&&e.jsxs("div",{className:"text-xs text-gray-500",children:[k.toFixed(1),"s"]})]})},a.id)})}),l>1&&e.jsxs("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 pt-4",children:[e.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",(c-1)*20+1," -"," ",Math.min(c*20,t)," of"," ",t," runs"]}),e.jsxs("div",{className:"flex gap-2",children:[c>1&&e.jsx(g,{to:`/activity/${i}?page=${c-1}`,className:"px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium hover:bg-gray-200 transition-colors",children:"Previous"}),c<l&&e.jsx(g,{to:`/activity/${i}?page=${c+1}`,className:"px-3 py-1 bg-gray-100 text-gray-700 rounded-md text-sm font-medium hover:bg-gray-200 transition-colors",children:"Next"})]})]})]})}function de(){const s=L(),t=q(),[c,l]=A.useState(!1),i=t.tab||"current";return e.jsxs("div",{className:"px-36 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Activity"}),e.jsx("p",{className:"text-gray-600",children:"View queued, current, and historical analysis activity"})]}),e.jsx(U,{activeTab:i,hasCurrentActivity:s.hasCurrentActivity,queuedCount:s.queuedCount,historicCount:s.totalHistoricalRuns}),i==="current"&&e.jsx(X,{currentlyExecuting:s.currentlyExecuting,currentRun:s.currentRun,state:s.state,projectSlug:s.projectSlug,commitSha:s.commitSha,onShowLogs:()=>l(!0),recentCompletedRuns:s.recentCompletedRuns,totalCompletedRuns:s.totalCompletedRuns}),i==="queued"&&e.jsx(Y,{queueJobs:s.queueJobs,state:s.state,currentRun:s.currentRun}),i==="historic"&&e.jsx(Z,{historicalRuns:s.historicalRuns,totalHistoricalRuns:s.totalHistoricalRuns,currentPage:s.currentPage,totalPages:s.totalPages,tab:i}),c&&s.projectSlug&&e.jsx(F,{projectSlug:s.projectSlug,onClose:()=>l(!1)})]})}export{de as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t}from"./file-text-B6Er7j5k.js";const a=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],o=t("chart-column",a);export{o as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./file-text-B6Er7j5k.js";const c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=e("circle-alert",c);export{y as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c}from"./file-text-B6Er7j5k.js";const o=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],r=c("clock",o);export{r as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s}from"./components-Dj-Ggnl2.js";const m=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),w=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var C={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const k=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:p,...c},d)=>s.createElement("svg",{ref:d,...C,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!w(c)&&{"aria-hidden":"true"},...c},[...p.map(([u,h])=>s.createElement(u,h)),...Array.isArray(a)?a:[a]]));const g=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(k,{ref:a,iconNode:e,className:l(`lucide-${m(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};const y=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],x=g("file-text",y);export{x as F,g as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as K,r as g,j as e,L as B,e as Y,u as H,d as X}from"./components-Dj-Ggnl2.js";import{E as Z}from"./EntityTypeIcon-rqv54FUY.js";import{s as ee}from"./entityVersioning-Bk_YB1jM.js";import{L as G,g as te}from"./LibraryFunctionPreview-DqXXjAJ7.js";import{S as Q}from"./SafeScreenshot-DU_jxCPD.js";import{L as O}from"./loader-circle-v3c6DFp4.js";import{C as se}from"./clock-DKqtX8js.js";import{C as W,S as ae}from"./search-DA14wXpu.js";import{c as re}from"./file-text-B6Er7j5k.js";import"./chart-column-VXBS6qOn.js";const ne=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],oe=re("triangle-alert",ne);function ie({entity:s,currentRun:b,queueState:N}){const E=K(),C=s.entityType==="visual"||s.entityType==="library",S=s.analyses?.[0],A=S?.status,f=S?.scenarios||[],T=S?.entitySha!==s.sha,k=A?.scenarios||[],m=k.filter(o=>o.screenshotFinishedAt).length,u=!T&&f.length>0&&m===f.length,U=f.length>0&&!u&&!T,v=N?.jobs.some(o=>o.entityShas?.includes(s.sha)||o.type==="analysis"&&o.entityShas&&o.entityShas.length===0)??!1,x=(b?.currentEntityShas?.includes(s.sha)??!1)||(N?.currentlyExecuting?.entityShas?.includes(s.sha)??!1)||U,P=g.useCallback(()=>{E.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})},[s,E]),M=ee(s),$=s.metadata?.isSuperseded===!0,I=x||v;return e.jsxs("div",{className:`flex flex-col gap-1.5 p-3 rounded-lg transition-all ${s.metadata?.isUncommitted?"border-l-4 border-l-amber-500 bg-amber-50":"bg-white hover:bg-gray-100"}`,children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 overflow-hidden",children:[e.jsx(Z,{type:s.entityType}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(B,{to:`/entity/${s.sha}`,className:"font-semibold text-sm text-gray-900 whitespace-nowrap",children:s.name}),e.jsx("div",{className:"px-2 py-0.5 rounded-sm text-[10px] uppercase font-medium",style:s.entityType==="visual"?{backgroundColor:"#7c3aed0D",color:"#7c3aed"}:s.entityType==="library"?{backgroundColor:"#0DBFE90D",color:"#0DBFE9"}:s.entityType==="type"?{backgroundColor:"#dc26260D",color:"#dc2626"}:s.entityType==="data"?{backgroundColor:"#2563eb0D",color:"#2563eb"}:s.entityType==="index"?{backgroundColor:"#ea580c0D",color:"#ea580c"}:s.entityType==="functionCall"?{backgroundColor:"#7c3aed0D",color:"#7c3aed"}:s.entityType==="class"?{backgroundColor:"#0596690D",color:"#059669"}:s.entityType==="method"?{backgroundColor:"#0891b20D",color:"#0891b2"}:{backgroundColor:"#6b72800D",color:"#6b7280"},children:s.entityType})]}),e.jsx("div",{className:"text-xs text-gray-500 mt-0.5 truncate",children:s.filePath}),s.description&&e.jsx("div",{className:"text-sm text-gray-600 mt-1 italic",children:s.description})]})]}),e.jsx("div",{className:"flex-1 shrink flex justify-end items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[x?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(O,{size:14,className:"animate-spin"}),"Analyzing..."]}):s.analyses&&s.analyses.length>0?e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-lg bg-green-50",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),e.jsx("span",{className:"text-xs text-green-700",children:"Up to date"})]}):e.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-lg bg-gray-100",children:[e.jsx("div",{className:"w-2 h-2 rounded-full border border-gray-400"}),e.jsx("span",{className:"text-xs text-gray-700",children:"Not yet analyzed"})]}),C&&!x&&e.jsx("button",{onClick:P,disabled:I,className:`px-3 py-1.5 border-none rounded-md text-[13px] font-medium cursor-pointer transition-all whitespace-nowrap ${v?"bg-purple-50 border border-purple-300 text-purple-700":x?"bg-pink-50 border border-pink-300 cursor-not-allowed":"bg-white text-white hover:-translate-y-px"}`,style:!v&&!x?{backgroundColor:"#005C75"}:{},onMouseEnter:o=>{!v&&!x&&(o.currentTarget.style.backgroundColor="#004560")},onMouseLeave:o=>{!v&&!x&&(o.currentTarget.style.backgroundColor="#005C75")},title:x?"Analysis in progress":v?"Already queued for analysis":"Analyze this entity",children:v?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(se,{size:16,color:s.entityType==="visual"?"#7c3aed":"#14b8a6"}),e.jsx("span",{children:"Queued"})]}):x?e.jsxs("span",{className:"flex items-center gap-1.5 text-pink-600",children:[e.jsx(O,{size:16,className:"animate-spin",color:"#ec4899"}),e.jsx("span",{children:"Analyzing..."})]}):"Analyze"})]})})]}),f.length>0&&e.jsx("div",{className:"flex gap-2 flex-wrap px-0 mt-3",children:f.slice(0,5).map((o,z)=>{if(!o.id)return null;if(s.entityType==="library")return e.jsx(G,{scenario:o,entitySha:s.sha,size:"medium",isOutdated:$||M},z);const R=o.metadata?.screenshotPaths?.[0],j=te(o,A,!!x,s.sha,N),D=k.find(F=>F.name===o.name);if(U&&D?.startedAt&&D?.screenshotStartedAt,j.isCaptured)return e.jsx(B,{to:`/entity/${s.sha}/scenarios/${o.id}`,className:`relative w-20 h-15 border-2 rounded overflow-hidden bg-gray-50 cursor-pointer transition-all flex items-center justify-center hover:scale-105 hover:shadow-md ${$||M?"border-amber-500 hover:border-amber-600":"border-gray-200 hover:border-blue-600"}`,children:e.jsx(Q,{screenshotPath:R,alt:o.name,title:o.name,className:"max-w-full max-h-full object-contain object-center"})},z);{const F=j.hasError?"text-red-500":"text-gray-400";return e.jsx(B,{to:`/entity/${s.sha}/scenarios/${o.id}`,className:`w-20 h-15 border-2 border-dashed ${j.borderColor} rounded ${j.bgColor} flex items-center justify-center text-2xl`,title:j.title,children:e.jsx("span",{className:j.shouldSpin?"animate-pulse":F,children:j.icon})},z)}})})]})}function le({entities:s,page:b,itemsPerPage:N=50,currentRun:E,filter:C,entityType:S,queueState:A}){const[f,T]=Y(),[k,m]=g.useState(new Set),[u,V]=g.useState(""),[U,v]=g.useState(!1),[L,x]=g.useState("all"),P=S||"all",M=(t,n=[])=>{if(n.some(r=>r.entityShas?.includes(t.sha)))return"analyzing";if(!t.analyses||t.analyses.length===0)return"not-analyzed";const l=t.analyses[0],w=l.createdAt?new Date(l.createdAt).getTime():0,a=t.metadata?.editedAt?new Date(t.metadata.editedAt).getTime():0;return w>=a?"up-to-date":"out-of-date"},$=g.useMemo(()=>{let t=s;return P!=="all"&&(t=t.filter(n=>n.entityType===P)),C==="analyzed"&&(t=t.filter(n=>n.analyses&&n.analyses.length>0)),t},[s,P,C]),I=g.useMemo(()=>{const t=new Map,n=new Map,d=new Map;$.forEach(a=>{const r=`${a.filePath}::${a.name}`,i=n.get(r);if(!i)n.set(r,a),d.set(r,[]);else{const p=i.metadata?.editedAt||i.createdAt||"",c=a.metadata?.editedAt||a.createdAt||"";let h=!1;if(c>p)h=!0;else if(c===p){const y=i.createdAt||"";h=(a.createdAt||"")>y}h?(d.get(r).push(i),n.set(r,a)):d.get(r).push(a)}}),n.forEach((a,r)=>{if(!(a.analyses&&a.analyses.length>0)&&a.metadata?.previousVersionWithAnalyses){const c=(d.get(r)||[]).find(h=>h.sha===a.metadata?.previousVersionWithAnalyses);c&&c.analyses&&c.analyses.length>0&&(a.analyses=c.analyses)}}),Array.from(n.values()).sort((a,r)=>{const i=!a.metadata?.notExported&&!a.metadata?.namedExport,p=!r.metadata?.notExported&&!r.metadata?.namedExport;return i&&!p?-1:!i&&p?1:0}).forEach(a=>{const r=a.filePath??"No File Path";t.has(r)||t.set(r,{filePath:r,entities:[],totalCount:0,uncommittedCount:0,lastUpdated:null,previewScreenshots:[],previewScreenshotErrors:[],previewLibraryScenarios:[],state:"up-to-date",simulationCount:0});const i=t.get(r);i.entities.push(a),i.totalCount++,a.metadata?.isUncommitted&&i.uncommittedCount++;const p=a.analyses?.[0]?.scenarios?.length||0;i.simulationCount+=p;const c=a.metadata?.editedAt||a.updatedAt;c&&(!i.lastUpdated||new Date(c)>new Date(i.lastUpdated))&&(i.lastUpdated=c)});const l=A?.jobs||[];t.forEach(a=>{const r=a.entities.map(i=>M(i,l));r.includes("analyzing")?a.state="analyzing":r.includes("out-of-date")?a.state="out-of-date":r.includes("not-analyzed")?a.state="not-analyzed":a.state="up-to-date"}),t.forEach(a=>{for(const r of a.entities){if(a.previewScreenshots.length+a.previewLibraryScenarios.length>=3)break;const p=r.analyses?.[0]?.scenarios||[];if(r.entityType==="library"){const c=p.find(h=>h.metadata?.executionResult||h.metadata?.error);c&&a.previewLibraryScenarios.push({scenario:c,entitySha:r.sha})}else{const c=p.find(h=>h.metadata?.screenshotPaths?.[0]);if(c){const h=c.metadata?.screenshotPaths?.[0],y=!!c.metadata?.error;h&&!a.previewScreenshots.includes(h)&&(a.previewScreenshots.push(h),a.previewScreenshotErrors.push(y))}}}});const w=Array.from(t.values());return w.sort((a,r)=>{if(C==="analyzed"){const c=Math.max(...a.entities.filter(y=>y.analyses?.[0]?.createdAt).map(y=>new Date(y.analyses[0].createdAt).getTime()),0);return Math.max(...r.entities.filter(y=>y.analyses?.[0]?.createdAt).map(y=>new Date(y.analyses[0].createdAt).getTime()),0)-c}if(a.uncommittedCount>0&&r.uncommittedCount===0)return-1;if(a.uncommittedCount===0&&r.uncommittedCount>0)return 1;const i=a.lastUpdated?new Date(a.lastUpdated).getTime():0;return(r.lastUpdated?new Date(r.lastUpdated).getTime():0)-i}),w},[$,C]),o=g.useMemo(()=>{let t=I;if(L!=="all"&&(t=t.filter(n=>n.state===L)),u.trim()){const n=u.toLowerCase();t=t.filter(d=>d.filePath.toLowerCase().includes(n))}return t},[I,u,L]),z=(b-1)*N,R=z+N,j=o.slice(z,R),D=Math.ceil(o.length/N),F=t=>{m(n=>{const d=new Set(n);return d.has(t)?d.delete(t):d.add(t),d})},_=()=>{if(U)m(new Set),v(!1);else{const t=new Set(j.map(n=>n.filePath));m(t),v(!0)}},q=t=>{switch(t){case"analyzing":return{text:"Analyzing...",bgColor:"bg-pink-100",textColor:"text-pink-700",borderColor:"border-pink-300"};case"up-to-date":return{text:"Up to date",bgColor:"bg-green-100",textColor:"text-green-700",borderColor:"border-green-300"};case"out-of-date":return{text:"Out of date",bgColor:"bg-yellow-100",textColor:"text-yellow-700",borderColor:"border-yellow-300"};case"not-analyzed":return{text:"Not analyzed",bgColor:"bg-gray-100",textColor:"text-gray-600",borderColor:"border-gray-300"}}},J=t=>t?new Date(t).toLocaleString("en-US",{month:"numeric",day:"numeric",year:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}):"Never";return e.jsxs("div",{children:[e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-6",children:[e.jsx("div",{className:"text-[10px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:P,onChange:t=>{const n=t.target.value,d=new URLSearchParams(f);n==="all"?d.delete("entityType"):d.set("entityType",n),d.set("page","1"),T(d)},className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 py-2 pr-8 text-sm cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(W,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{value:L,onChange:t=>x(t.target.value),className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 py-2 pr-8 text-sm cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",children:[e.jsx("option",{value:"all",children:"All States"}),e.jsx("option",{value:"analyzing",children:"Analyzing..."}),e.jsx("option",{value:"up-to-date",children:"Up to date"}),e.jsx("option",{value:"out-of-date",children:"Out of date"}),e.jsx("option",{value:"not-analyzed",children:"Not analyzed"})]}),e.jsx(W,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(ae,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",value:u,onChange:t=>V(t.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 py-2 text-sm placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors"})]}),e.jsx("button",{onClick:_,className:"px-3 py-2 border-none rounded text-sm font-medium cursor-pointer transition-colors whitespace-nowrap bg-[#005c75] text-white hover:bg-[#004a5e] disabled:bg-gray-400 disabled:cursor-not-allowed",children:U?"Collapse All":"Expand All"})]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:j.map(t=>{const n=k.has(t.filePath),d=t.uncommittedCount>0;return e.jsxs("div",{className:"bg-white overflow-hidden",style:n?{border:"1px solid #e5e7eb",borderLeft:"4px solid #306AFF",borderRadius:"8px"}:{borderRadius:"8px"},children:[e.jsxs("div",{className:"flex justify-between items-center p-3 cursor-pointer select-none transition-colors hover:bg-gray-200",style:{outlineColor:"#005C75"},onClick:()=>F(t.filePath),role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),F(t.filePath))},children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx("span",{className:"text-gray-500 text-xs w-4 inline-block shrink-0",children:n?"▼":"▶"}),e.jsx("img",{src:"/icons/file-icon.svg",alt:"file",className:"w-4 h-5 shrink-0"}),e.jsx("span",{className:"font-normal text-gray-900 text-sm overflow-hidden text-ellipsis whitespace-nowrap",children:t.filePath}),d&&e.jsxs("span",{className:"text-[12px] text-amber-500 font-medium shrink-0 whitespace-nowrap",children:[t.uncommittedCount," uncommitted"]})]}),e.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[(t.previewScreenshots.length>0||t.previewLibraryScenarios.length>0)&&e.jsxs("div",{className:"flex gap-1.5 items-center h-[38px]",children:[t.previewScreenshots.map((l,w)=>{const a=t.previewScreenshotErrors[w],r=a?"border-red-400":"border-gray-200";return e.jsxs("div",{className:`relative w-[50px] h-[38px] border ${r} rounded overflow-hidden bg-gray-50 shrink-0 flex items-center justify-center`,children:[e.jsx(Q,{screenshotPath:l,alt:`Preview ${w+1}`,className:"max-w-full max-h-full object-contain object-center"}),a&&e.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 bg-red-500 text-white flex items-center justify-center text-[10px] rounded-bl",title:"Error during capture",children:e.jsx(oe,{size:12,color:"white"})})]},`screenshot-${w}`)}),t.previewLibraryScenarios.map((l,w)=>e.jsx(G,{scenario:l.scenario,entitySha:l.entitySha,size:"small",showBorder:!0},`library-${w}`))]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx("span",{className:"text-[13px] text-gray-500",children:t.simulationCount===0?"-":`${t.simulationCount} simulations`}),e.jsxs("span",{className:"text-[13px] text-gray-500",children:[t.totalCount," ",t.totalCount===1?"entity":"entities"]}),(()=>{const l=q(t.state);return e.jsx("span",{className:`text-[12px] px-2 py-1 rounded ${l.bgColor} ${l.textColor}`,children:l.text})})(),e.jsx("span",{className:"text-[11px] text-gray-400",children:J(t.lastUpdated)})]})]})]}),n&&e.jsx("div",{className:"p-2 bg-gray-50 flex flex-col gap-2",children:t.entities.map(l=>e.jsx(ie,{entity:l,currentRun:E,queueState:A},l.sha))})]},t.filePath)})}),D>1&&e.jsxs("div",{className:"flex justify-center items-center gap-4 mt-6 p-4",children:[b>1&&e.jsx("a",{href:`?${new URLSearchParams({...Object.fromEntries(f),page:String(b-1)}).toString()}`,className:"no-underline font-medium hover:underline",style:{color:"#005C75"},children:"← Previous"}),e.jsxs("span",{children:["Page ",b," of ",D]}),b<D&&e.jsx("a",{href:`?${new URLSearchParams({...Object.fromEntries(f),page:String(b+1)}).toString()}`,className:"no-underline font-medium hover:underline",style:{color:"#005C75"},children:"Next →"})]})]})}const ve=()=>[{title:"CodeYam - Files & Entities"},{name:"description",content:"Browse your codebase files and entities"}];function je(){const{entities:s,currentCommit:b,page:N,filter:E,entityType:C,queueState:S}=H(),A=X(),f=g.useMemo(()=>{if(!s)return[];const m=new Set([]);for(const u of s)m.add(u.filePath??"No File Path");return Array.from(m)},[s]),T=g.useMemo(()=>s?s.sort((m,u)=>m.metadata?.isUncommitted&&!u.metadata?.isUncommitted?-1:!m.metadata?.isUncommitted&&u.metadata?.isUncommitted?1:new Date(u.metadata?.editedAt||0).getTime()-new Date(m.metadata?.editedAt||0).getTime()):[],[s]),k=g.useMemo(()=>{if(!s)return[];const m=new Set([]);for(const u of s)u.metadata?.isUncommitted&&m.add(u.filePath??"No File Path");return Array.from(m)},[s]);return s?e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Files & Entities"}),e.jsxs("div",{className:"flex gap-4 text-sm text-gray-500 mt-2",children:[A.state==="loading"&&e.jsx("span",{className:"text-blue-600 font-medium animate-pulse",children:"🔄"}),e.jsxs("span",{children:[f.length," files"]}),e.jsxs("span",{children:[s.length," entities"]}),e.jsxs("span",{className:"text-amber-500 font-medium",children:[k.length," uncommitted files"]})]})]}),e.jsx(le,{entities:T,page:N,itemsPerPage:50,currentRun:b?.metadata?.currentRun,filter:E,entityType:C,queueState:S})]})}):e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-36 py-12 font-sans",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Error"}),e.jsx("p",{className:"text-base text-gray-500",children:"Unable to retrieve entities"})]})})}export{je as default,ve as meta};
|