@autocode-cli/autocode 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/api.d.ts.map +1 -1
- package/dist/server/api.js +95 -1
- package/dist/server/api.js.map +1 -1
- package/dist/server/dashboard/pages/autocreate.d.ts +9 -0
- package/dist/server/dashboard/pages/autocreate.d.ts.map +1 -0
- package/dist/server/dashboard/pages/autocreate.js +847 -0
- package/dist/server/dashboard/pages/autocreate.js.map +1 -0
- package/dist/server/dashboard/pages/index.d.ts +1 -0
- package/dist/server/dashboard/pages/index.d.ts.map +1 -1
- package/dist/server/dashboard/pages/index.js +1 -0
- package/dist/server/dashboard/pages/index.js.map +1 -1
- package/dist/server/dashboard/pages/pipeline-configurator.d.ts.map +1 -1
- package/dist/server/dashboard/pages/pipeline-configurator.js +22 -0
- package/dist/server/dashboard/pages/pipeline-configurator.js.map +1 -1
- package/dist/server/dashboard.d.ts +1 -1
- package/dist/server/dashboard.d.ts.map +1 -1
- package/dist/server/dashboard.js +1 -1
- package/dist/server/dashboard.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +9 -1
- package/dist/server/index.js.map +1 -1
- package/dist/services/autocreate.d.ts +34 -0
- package/dist/services/autocreate.d.ts.map +1 -0
- package/dist/services/autocreate.js +503 -0
- package/dist/services/autocreate.js.map +1 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/catalog.yaml +102 -0
- package/templates/prompts/accessibility-check.en.md +25 -0
- package/templates/prompts/accessibility-check.fr.md +25 -0
- package/templates/prompts/api-endpoints-test.en.md +26 -0
- package/templates/prompts/api-endpoints-test.fr.md +26 -0
- package/templates/prompts/build-dist.en.md +20 -0
- package/templates/prompts/build-dist.fr.md +20 -0
- package/templates/prompts/ci-gitlab-validate.en.md +22 -0
- package/templates/prompts/ci-gitlab-validate.fr.md +22 -0
- package/templates/prompts/claude-integration-test.en.md +22 -0
- package/templates/prompts/claude-integration-test.fr.md +22 -0
- package/templates/prompts/cli-smoke-test.en.md +30 -0
- package/templates/prompts/cli-smoke-test.fr.md +30 -0
- package/templates/prompts/dashboard-responsive.en.md +27 -0
- package/templates/prompts/dashboard-responsive.fr.md +27 -0
- package/templates/prompts/dead-code-check.en.md +25 -0
- package/templates/prompts/dead-code-check.fr.md +25 -0
- package/templates/prompts/deps-licenses.en.md +23 -0
- package/templates/prompts/deps-licenses.fr.md +23 -0
- package/templates/prompts/deps-outdated.en.md +23 -0
- package/templates/prompts/deps-outdated.fr.md +23 -0
- package/templates/prompts/docs-readme-validate.en.md +22 -0
- package/templates/prompts/docs-readme-validate.fr.md +22 -0
- package/templates/prompts/error-handling-review.en.md +24 -0
- package/templates/prompts/error-handling-review.fr.md +24 -0
- package/templates/prompts/esm-compatibility.en.md +24 -0
- package/templates/prompts/esm-compatibility.fr.md +24 -0
- package/templates/prompts/file-watcher-test.en.md +20 -0
- package/templates/prompts/file-watcher-test.fr.md +20 -0
- package/templates/prompts/format-prettier-setup.en.md +21 -0
- package/templates/prompts/format-prettier-setup.fr.md +21 -0
- package/templates/prompts/git-conventional-commits.en.md +21 -0
- package/templates/prompts/git-conventional-commits.fr.md +21 -0
- package/templates/prompts/git-hooks-setup.en.md +27 -0
- package/templates/prompts/git-hooks-setup.fr.md +27 -0
- package/templates/prompts/graceful-shutdown.en.md +25 -0
- package/templates/prompts/graceful-shutdown.fr.md +25 -0
- package/templates/prompts/i18n-completeness.en.md +21 -0
- package/templates/prompts/i18n-completeness.fr.md +21 -0
- package/templates/prompts/landing-html-validate.en.md +23 -0
- package/templates/prompts/landing-html-validate.fr.md +23 -0
- package/templates/prompts/lint-eslint-setup.en.md +20 -0
- package/templates/prompts/lint-eslint-setup.fr.md +20 -0
- package/templates/prompts/node-version-check.en.md +21 -0
- package/templates/prompts/node-version-check.fr.md +21 -0
- package/templates/prompts/npm-publish-dry-run.en.md +25 -0
- package/templates/prompts/npm-publish-dry-run.fr.md +25 -0
- package/templates/prompts/pkg-exports-validate.en.md +23 -0
- package/templates/prompts/pkg-exports-validate.fr.md +23 -0
- package/templates/prompts/port-conflict-handling.en.md +22 -0
- package/templates/prompts/port-conflict-handling.fr.md +22 -0
- package/templates/prompts/security-audit.en.md +20 -0
- package/templates/prompts/security-audit.fr.md +20 -0
- package/templates/prompts/security-secrets.en.md +26 -0
- package/templates/prompts/security-secrets.fr.md +26 -0
- package/templates/prompts/template-validation.en.md +23 -0
- package/templates/prompts/template-validation.fr.md +23 -0
- package/templates/prompts/testing-coverage.en.md +20 -0
- package/templates/prompts/testing-coverage.fr.md +20 -0
- package/templates/prompts/testing-vitest.en.md +17 -0
- package/templates/prompts/testing-vitest.fr.md +17 -0
- package/templates/prompts/typecheck.en.md +17 -0
- package/templates/prompts/typecheck.fr.md +17 -0
- package/templates/prompts/version-semver.en.md +20 -0
- package/templates/prompts/version-semver.fr.md +20 -0
- package/templates/prompts/websocket-test.en.md +19 -0
- package/templates/prompts/websocket-test.fr.md +19 -0
- package/templates/prompts/yaml-validate.en.md +24 -0
- package/templates/prompts/yaml-validate.fr.md +24 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autocreate page generator
|
|
3
|
+
* Page for autonomous column generation based on project analysis
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generate the autocreate page
|
|
7
|
+
*/
|
|
8
|
+
export function generateAutocreatePage(lang) {
|
|
9
|
+
return `<!DOCTYPE html>
|
|
10
|
+
<html lang="${lang}">
|
|
11
|
+
<head>
|
|
12
|
+
<meta charset="UTF-8">
|
|
13
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
14
|
+
<title>Autocreate - AutoCode</title>
|
|
15
|
+
<style>
|
|
16
|
+
:root {
|
|
17
|
+
--bg: #0d1117;
|
|
18
|
+
--bg-card: #161b22;
|
|
19
|
+
--bg-hover: #1f2937;
|
|
20
|
+
--border: #30363d;
|
|
21
|
+
--fg: #c9d1d9;
|
|
22
|
+
--muted: #8b949e;
|
|
23
|
+
--accent: #7c3aed;
|
|
24
|
+
--blue: #4dabf7;
|
|
25
|
+
--green: #22c55e;
|
|
26
|
+
--red: #ef4444;
|
|
27
|
+
--yellow: #eab308;
|
|
28
|
+
--orange: #f97316;
|
|
29
|
+
}
|
|
30
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
31
|
+
body {
|
|
32
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
33
|
+
background: var(--bg);
|
|
34
|
+
color: var(--fg);
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
}
|
|
37
|
+
.header {
|
|
38
|
+
background: var(--bg-card);
|
|
39
|
+
border-bottom: 1px solid var(--border);
|
|
40
|
+
padding: 16px 24px;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 16px;
|
|
44
|
+
position: sticky;
|
|
45
|
+
top: 0;
|
|
46
|
+
z-index: 100;
|
|
47
|
+
}
|
|
48
|
+
.back-btn {
|
|
49
|
+
background: none;
|
|
50
|
+
border: 1px solid var(--border);
|
|
51
|
+
color: var(--fg);
|
|
52
|
+
padding: 8px 12px;
|
|
53
|
+
border-radius: 6px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
}
|
|
58
|
+
.back-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
59
|
+
.title { flex: 1; font-size: 18px; font-weight: 600; }
|
|
60
|
+
.title span { color: var(--accent); }
|
|
61
|
+
.btn {
|
|
62
|
+
padding: 8px 16px;
|
|
63
|
+
border-radius: 6px;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
border: none;
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 6px;
|
|
71
|
+
}
|
|
72
|
+
.btn-primary { background: var(--accent); color: white; }
|
|
73
|
+
.btn-primary:hover { opacity: 0.9; }
|
|
74
|
+
.btn-success { background: var(--green); color: white; }
|
|
75
|
+
.btn-success:hover { opacity: 0.9; }
|
|
76
|
+
.btn-secondary { background: var(--bg); border: 1px solid var(--border); color: var(--fg); }
|
|
77
|
+
.btn-secondary:hover { border-color: var(--accent); }
|
|
78
|
+
.btn-danger { background: var(--red); color: white; }
|
|
79
|
+
.btn-danger:hover { opacity: 0.9; }
|
|
80
|
+
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
81
|
+
.btn-large { padding: 12px 24px; font-size: 16px; }
|
|
82
|
+
|
|
83
|
+
.lang-toggle {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
}
|
|
87
|
+
.lang-btn {
|
|
88
|
+
padding: 4px 8px !important;
|
|
89
|
+
font-size: 12px !important;
|
|
90
|
+
}
|
|
91
|
+
.lang-btn.active {
|
|
92
|
+
background: var(--accent) !important;
|
|
93
|
+
color: white !important;
|
|
94
|
+
border-color: var(--accent) !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.container {
|
|
98
|
+
max-width: 1000px;
|
|
99
|
+
margin: 0 auto;
|
|
100
|
+
padding: 24px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Initial state */
|
|
104
|
+
.analyze-section {
|
|
105
|
+
text-align: center;
|
|
106
|
+
padding: 60px 20px;
|
|
107
|
+
}
|
|
108
|
+
.analyze-section h2 {
|
|
109
|
+
font-size: 24px;
|
|
110
|
+
margin-bottom: 12px;
|
|
111
|
+
}
|
|
112
|
+
.analyze-section p {
|
|
113
|
+
color: var(--muted);
|
|
114
|
+
margin-bottom: 32px;
|
|
115
|
+
font-size: 15px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Loading state */
|
|
119
|
+
.loading-section {
|
|
120
|
+
text-align: center;
|
|
121
|
+
padding: 80px 20px;
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
.spinner {
|
|
125
|
+
width: 48px;
|
|
126
|
+
height: 48px;
|
|
127
|
+
border: 3px solid var(--border);
|
|
128
|
+
border-top-color: var(--accent);
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
animation: spin 1s linear infinite;
|
|
131
|
+
margin: 0 auto 24px;
|
|
132
|
+
}
|
|
133
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
134
|
+
.loading-section p {
|
|
135
|
+
color: var(--muted);
|
|
136
|
+
font-size: 15px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Error state */
|
|
140
|
+
.error-section {
|
|
141
|
+
text-align: center;
|
|
142
|
+
padding: 60px 20px;
|
|
143
|
+
display: none;
|
|
144
|
+
}
|
|
145
|
+
.error-section .error-icon {
|
|
146
|
+
font-size: 48px;
|
|
147
|
+
margin-bottom: 16px;
|
|
148
|
+
}
|
|
149
|
+
.error-section h3 {
|
|
150
|
+
color: var(--red);
|
|
151
|
+
margin-bottom: 8px;
|
|
152
|
+
}
|
|
153
|
+
.error-section p {
|
|
154
|
+
color: var(--muted);
|
|
155
|
+
margin-bottom: 24px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Results section */
|
|
159
|
+
.results-section {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.summary-card {
|
|
164
|
+
background: var(--bg-card);
|
|
165
|
+
border: 1px solid var(--border);
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
padding: 20px;
|
|
168
|
+
margin-bottom: 24px;
|
|
169
|
+
}
|
|
170
|
+
.summary-card h3 {
|
|
171
|
+
font-size: 16px;
|
|
172
|
+
margin-bottom: 12px;
|
|
173
|
+
color: var(--accent);
|
|
174
|
+
}
|
|
175
|
+
.summary-card p {
|
|
176
|
+
color: var(--fg);
|
|
177
|
+
line-height: 1.6;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.columns-header {
|
|
181
|
+
display: flex;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
align-items: center;
|
|
184
|
+
margin-bottom: 16px;
|
|
185
|
+
}
|
|
186
|
+
.columns-header h3 {
|
|
187
|
+
font-size: 16px;
|
|
188
|
+
}
|
|
189
|
+
.columns-header .count {
|
|
190
|
+
color: var(--muted);
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
}
|
|
193
|
+
.select-all-btn {
|
|
194
|
+
font-size: 13px;
|
|
195
|
+
padding: 6px 12px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.column-card {
|
|
199
|
+
background: var(--bg-card);
|
|
200
|
+
border: 1px solid var(--border);
|
|
201
|
+
border-radius: 8px;
|
|
202
|
+
padding: 16px;
|
|
203
|
+
margin-bottom: 12px;
|
|
204
|
+
transition: border-color 0.2s;
|
|
205
|
+
}
|
|
206
|
+
.column-card:hover {
|
|
207
|
+
border-color: var(--accent);
|
|
208
|
+
}
|
|
209
|
+
.column-card.selected {
|
|
210
|
+
border-color: var(--green);
|
|
211
|
+
background: rgba(34, 197, 94, 0.05);
|
|
212
|
+
}
|
|
213
|
+
.column-card-header {
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: flex-start;
|
|
216
|
+
gap: 12px;
|
|
217
|
+
}
|
|
218
|
+
.column-checkbox {
|
|
219
|
+
width: 20px;
|
|
220
|
+
height: 20px;
|
|
221
|
+
accent-color: var(--green);
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
margin-top: 2px;
|
|
224
|
+
}
|
|
225
|
+
.column-info {
|
|
226
|
+
flex: 1;
|
|
227
|
+
}
|
|
228
|
+
.column-name {
|
|
229
|
+
font-weight: 600;
|
|
230
|
+
font-size: 15px;
|
|
231
|
+
margin-bottom: 4px;
|
|
232
|
+
}
|
|
233
|
+
.column-desc {
|
|
234
|
+
color: var(--muted);
|
|
235
|
+
font-size: 13px;
|
|
236
|
+
margin-bottom: 8px;
|
|
237
|
+
}
|
|
238
|
+
.column-meta {
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-wrap: wrap;
|
|
241
|
+
gap: 8px;
|
|
242
|
+
align-items: center;
|
|
243
|
+
}
|
|
244
|
+
.badge {
|
|
245
|
+
display: inline-block;
|
|
246
|
+
padding: 2px 8px;
|
|
247
|
+
border-radius: 4px;
|
|
248
|
+
font-size: 11px;
|
|
249
|
+
font-weight: 500;
|
|
250
|
+
}
|
|
251
|
+
.badge-segment {
|
|
252
|
+
background: var(--accent);
|
|
253
|
+
color: white;
|
|
254
|
+
}
|
|
255
|
+
.badge-segment.definition { background: var(--blue); }
|
|
256
|
+
.badge-segment.action { background: var(--orange); }
|
|
257
|
+
.badge-segment.finish { background: var(--green); }
|
|
258
|
+
.badge-cost {
|
|
259
|
+
background: var(--bg);
|
|
260
|
+
border: 1px solid var(--border);
|
|
261
|
+
color: var(--muted);
|
|
262
|
+
}
|
|
263
|
+
.badge-cost.low { border-color: var(--green); color: var(--green); }
|
|
264
|
+
.badge-cost.medium { border-color: var(--yellow); color: var(--yellow); }
|
|
265
|
+
.badge-cost.high { border-color: var(--red); color: var(--red); }
|
|
266
|
+
.badge-overlap {
|
|
267
|
+
background: rgba(234, 179, 8, 0.1);
|
|
268
|
+
border: 1px solid var(--yellow);
|
|
269
|
+
color: var(--yellow);
|
|
270
|
+
}
|
|
271
|
+
.column-rationale {
|
|
272
|
+
margin-top: 12px;
|
|
273
|
+
padding-top: 12px;
|
|
274
|
+
border-top: 1px solid var(--border);
|
|
275
|
+
font-size: 13px;
|
|
276
|
+
color: var(--muted);
|
|
277
|
+
}
|
|
278
|
+
.column-rationale strong {
|
|
279
|
+
color: var(--fg);
|
|
280
|
+
}
|
|
281
|
+
.preview-btns {
|
|
282
|
+
display: flex;
|
|
283
|
+
gap: 8px;
|
|
284
|
+
margin-top: 12px;
|
|
285
|
+
}
|
|
286
|
+
.preview-btn {
|
|
287
|
+
font-size: 12px;
|
|
288
|
+
padding: 4px 10px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Info sections */
|
|
292
|
+
.info-section {
|
|
293
|
+
background: var(--bg-card);
|
|
294
|
+
border: 1px solid var(--border);
|
|
295
|
+
border-radius: 8px;
|
|
296
|
+
padding: 16px;
|
|
297
|
+
margin-top: 24px;
|
|
298
|
+
}
|
|
299
|
+
.info-section h4 {
|
|
300
|
+
font-size: 14px;
|
|
301
|
+
margin-bottom: 12px;
|
|
302
|
+
color: var(--muted);
|
|
303
|
+
}
|
|
304
|
+
.info-section ul {
|
|
305
|
+
list-style: none;
|
|
306
|
+
padding: 0;
|
|
307
|
+
}
|
|
308
|
+
.info-section li {
|
|
309
|
+
font-size: 13px;
|
|
310
|
+
color: var(--fg);
|
|
311
|
+
padding: 4px 0;
|
|
312
|
+
padding-left: 16px;
|
|
313
|
+
position: relative;
|
|
314
|
+
}
|
|
315
|
+
.info-section li::before {
|
|
316
|
+
content: '•';
|
|
317
|
+
position: absolute;
|
|
318
|
+
left: 0;
|
|
319
|
+
color: var(--muted);
|
|
320
|
+
}
|
|
321
|
+
.info-section.risks li::before {
|
|
322
|
+
color: var(--yellow);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* Actions bar */
|
|
326
|
+
.actions-bar {
|
|
327
|
+
background: var(--bg-card);
|
|
328
|
+
border-top: 1px solid var(--border);
|
|
329
|
+
padding: 16px 24px;
|
|
330
|
+
display: flex;
|
|
331
|
+
justify-content: flex-end;
|
|
332
|
+
gap: 12px;
|
|
333
|
+
position: sticky;
|
|
334
|
+
bottom: 0;
|
|
335
|
+
margin-top: 24px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Modal */
|
|
339
|
+
.modal-overlay {
|
|
340
|
+
display: none;
|
|
341
|
+
position: fixed;
|
|
342
|
+
top: 0;
|
|
343
|
+
left: 0;
|
|
344
|
+
right: 0;
|
|
345
|
+
bottom: 0;
|
|
346
|
+
background: rgba(0, 0, 0, 0.75);
|
|
347
|
+
z-index: 1000;
|
|
348
|
+
justify-content: center;
|
|
349
|
+
align-items: center;
|
|
350
|
+
}
|
|
351
|
+
.modal-overlay.active {
|
|
352
|
+
display: flex;
|
|
353
|
+
}
|
|
354
|
+
.modal {
|
|
355
|
+
background: var(--bg-card);
|
|
356
|
+
border: 1px solid var(--border);
|
|
357
|
+
border-radius: 8px;
|
|
358
|
+
max-width: 700px;
|
|
359
|
+
width: 90%;
|
|
360
|
+
max-height: 80vh;
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
}
|
|
365
|
+
.modal-header {
|
|
366
|
+
display: flex;
|
|
367
|
+
justify-content: space-between;
|
|
368
|
+
align-items: center;
|
|
369
|
+
padding: 16px 20px;
|
|
370
|
+
border-bottom: 1px solid var(--border);
|
|
371
|
+
}
|
|
372
|
+
.modal-header h3 {
|
|
373
|
+
margin: 0;
|
|
374
|
+
font-size: 16px;
|
|
375
|
+
}
|
|
376
|
+
.modal-body {
|
|
377
|
+
padding: 20px;
|
|
378
|
+
overflow-y: auto;
|
|
379
|
+
flex: 1;
|
|
380
|
+
}
|
|
381
|
+
.modal-body pre {
|
|
382
|
+
background: var(--bg);
|
|
383
|
+
border: 1px solid var(--border);
|
|
384
|
+
border-radius: 6px;
|
|
385
|
+
padding: 16px;
|
|
386
|
+
white-space: pre-wrap;
|
|
387
|
+
font-family: monospace;
|
|
388
|
+
font-size: 13px;
|
|
389
|
+
line-height: 1.5;
|
|
390
|
+
max-height: 50vh;
|
|
391
|
+
overflow-y: auto;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.notification {
|
|
395
|
+
position: fixed;
|
|
396
|
+
bottom: 24px;
|
|
397
|
+
right: 24px;
|
|
398
|
+
background: var(--green);
|
|
399
|
+
color: white;
|
|
400
|
+
padding: 12px 20px;
|
|
401
|
+
border-radius: 6px;
|
|
402
|
+
font-size: 14px;
|
|
403
|
+
opacity: 0;
|
|
404
|
+
transform: translateY(10px);
|
|
405
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
406
|
+
z-index: 1001;
|
|
407
|
+
}
|
|
408
|
+
.notification.error { background: var(--red); }
|
|
409
|
+
.notification.visible {
|
|
410
|
+
opacity: 1;
|
|
411
|
+
transform: translateY(0);
|
|
412
|
+
}
|
|
413
|
+
</style>
|
|
414
|
+
</head>
|
|
415
|
+
<body>
|
|
416
|
+
<header class="header">
|
|
417
|
+
<a href="/settings/pipeline/configurator" class="back-btn" id="backBtn">← Configurator</a>
|
|
418
|
+
<h1 class="title"><span>Autocreate</span> Columns</h1>
|
|
419
|
+
<div class="lang-toggle">
|
|
420
|
+
<button class="btn btn-secondary lang-btn" data-lang="en" onclick="switchLang('en')">EN</button>
|
|
421
|
+
<button class="btn btn-secondary lang-btn" data-lang="fr" onclick="switchLang('fr')">FR</button>
|
|
422
|
+
</div>
|
|
423
|
+
</header>
|
|
424
|
+
|
|
425
|
+
<div class="container">
|
|
426
|
+
<!-- Initial state -->
|
|
427
|
+
<div class="analyze-section" id="analyzeSection">
|
|
428
|
+
<h2 id="analyzeTitle">Analyze Your Project</h2>
|
|
429
|
+
<p id="analyzeDesc">Claude will analyze your project's codebase and suggest relevant pipeline columns based on your technology stack, dependencies, and project structure.</p>
|
|
430
|
+
<button class="btn btn-primary btn-large" id="analyzeBtn" onclick="startAnalysis()">
|
|
431
|
+
<span id="analyzeBtnText">Start Analysis</span>
|
|
432
|
+
</button>
|
|
433
|
+
</div>
|
|
434
|
+
|
|
435
|
+
<!-- Loading state -->
|
|
436
|
+
<div class="loading-section" id="loadingSection">
|
|
437
|
+
<div class="spinner"></div>
|
|
438
|
+
<p id="loadingText">Analyzing your project...</p>
|
|
439
|
+
<p style="margin-top: 8px; font-size: 13px; color: var(--muted);" id="loadingHint">This may take several minutes for exhaustive analysis</p>
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
<!-- Error state -->
|
|
443
|
+
<div class="error-section" id="errorSection">
|
|
444
|
+
<div class="error-icon">⚠️</div>
|
|
445
|
+
<h3 id="errorTitle">Analysis Failed</h3>
|
|
446
|
+
<p id="errorMessage">An error occurred during analysis.</p>
|
|
447
|
+
<button class="btn btn-primary" onclick="startAnalysis()">
|
|
448
|
+
<span id="retryBtnText">Retry</span>
|
|
449
|
+
</button>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<!-- Results section -->
|
|
453
|
+
<div class="results-section" id="resultsSection">
|
|
454
|
+
<div class="summary-card">
|
|
455
|
+
<h3 id="summaryTitle">Summary</h3>
|
|
456
|
+
<p id="summaryContent"></p>
|
|
457
|
+
</div>
|
|
458
|
+
|
|
459
|
+
<div class="columns-header">
|
|
460
|
+
<div>
|
|
461
|
+
<h3 id="proposedTitle">Proposed Columns</h3>
|
|
462
|
+
<span class="count" id="selectionCount">(0 selected / 0 total)</span>
|
|
463
|
+
</div>
|
|
464
|
+
<button class="btn btn-secondary select-all-btn" id="selectAllBtn" onclick="toggleSelectAll()">Select All</button>
|
|
465
|
+
</div>
|
|
466
|
+
|
|
467
|
+
<div id="columnsList"></div>
|
|
468
|
+
|
|
469
|
+
<div class="info-section" id="assumptionsSection" style="display: none;">
|
|
470
|
+
<h4 id="assumptionsTitle">Assumptions</h4>
|
|
471
|
+
<ul id="assumptionsList"></ul>
|
|
472
|
+
</div>
|
|
473
|
+
|
|
474
|
+
<div class="info-section risks" id="risksSection" style="display: none;">
|
|
475
|
+
<h4 id="risksTitle">Potential Risks</h4>
|
|
476
|
+
<ul id="risksList"></ul>
|
|
477
|
+
</div>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
<div class="actions-bar" id="actionsBar" style="display: none;">
|
|
482
|
+
<a href="/settings/pipeline/configurator" class="btn btn-secondary" id="cancelBtn">Cancel</a>
|
|
483
|
+
<button class="btn btn-success" id="applyBtn" onclick="applySelected()" disabled>
|
|
484
|
+
<span id="applyBtnText">Add 0 Columns to Catalog</span>
|
|
485
|
+
</button>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
<!-- Preview Modal -->
|
|
489
|
+
<div class="modal-overlay" id="previewModal">
|
|
490
|
+
<div class="modal">
|
|
491
|
+
<div class="modal-header">
|
|
492
|
+
<h3 id="previewModalTitle">Column Preview</h3>
|
|
493
|
+
<div style="display: flex; gap: 8px; align-items: center;">
|
|
494
|
+
<div class="lang-toggle">
|
|
495
|
+
<button class="btn btn-secondary lang-btn" data-lang="en" onclick="switchPreviewLang('en')">EN</button>
|
|
496
|
+
<button class="btn btn-secondary lang-btn" data-lang="fr" onclick="switchPreviewLang('fr')">FR</button>
|
|
497
|
+
</div>
|
|
498
|
+
<button class="btn btn-secondary" onclick="closePreviewModal()" style="padding: 4px 10px;">✕</button>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="modal-body">
|
|
502
|
+
<pre id="previewContent"></pre>
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<div class="notification" id="notification"></div>
|
|
508
|
+
|
|
509
|
+
<script>
|
|
510
|
+
const translations = {
|
|
511
|
+
en: {
|
|
512
|
+
backBtn: '← Configurator',
|
|
513
|
+
pageTitle: 'Autocreate Columns',
|
|
514
|
+
analyzeTitle: 'Analyze Your Project',
|
|
515
|
+
analyzeDesc: "Claude will analyze your project's codebase and suggest relevant pipeline columns based on your technology stack, dependencies, and project structure.",
|
|
516
|
+
startAnalysis: 'Start Analysis',
|
|
517
|
+
loading: 'Analyzing your project...',
|
|
518
|
+
loadingHint: 'This may take several minutes for exhaustive analysis',
|
|
519
|
+
errorTitle: 'Analysis Failed',
|
|
520
|
+
retry: 'Retry',
|
|
521
|
+
summaryTitle: 'Summary',
|
|
522
|
+
proposedTitle: 'Proposed Columns',
|
|
523
|
+
selectionCount: (selected, total) => \`(\${selected} selected / \${total} total)\`,
|
|
524
|
+
selectAll: 'Select All',
|
|
525
|
+
deselectAll: 'Deselect All',
|
|
526
|
+
assumptionsTitle: 'Assumptions',
|
|
527
|
+
risksTitle: 'Potential Risks',
|
|
528
|
+
cancel: 'Cancel',
|
|
529
|
+
addColumns: (count) => \`Add \${count} Column\${count !== 1 ? 's' : ''} to Catalog\`,
|
|
530
|
+
previewTitle: 'Column Preview',
|
|
531
|
+
rationale: 'Rationale',
|
|
532
|
+
previewEN: 'Preview EN',
|
|
533
|
+
previewFR: 'Preview FR',
|
|
534
|
+
tokenCost: 'Token cost',
|
|
535
|
+
overlap: 'Overlap',
|
|
536
|
+
success: 'Columns added to catalog!',
|
|
537
|
+
noColumns: 'Please select at least one column',
|
|
538
|
+
claudeNotFound: 'Claude CLI not found. Please install it first.',
|
|
539
|
+
},
|
|
540
|
+
fr: {
|
|
541
|
+
backBtn: '← Configurateur',
|
|
542
|
+
pageTitle: 'Autocreate Colonnes',
|
|
543
|
+
analyzeTitle: 'Analysez votre projet',
|
|
544
|
+
analyzeDesc: 'Claude analysera votre codebase et suggérera des colonnes de pipeline pertinentes en fonction de votre stack technologique, dépendances et structure du projet.',
|
|
545
|
+
startAnalysis: 'Lancer l\\'analyse',
|
|
546
|
+
loading: 'Analyse de votre projet...',
|
|
547
|
+
loadingHint: 'Cela peut prendre plusieurs minutes pour une analyse exhaustive',
|
|
548
|
+
errorTitle: 'Échec de l\\'analyse',
|
|
549
|
+
retry: 'Réessayer',
|
|
550
|
+
summaryTitle: 'Résumé',
|
|
551
|
+
proposedTitle: 'Colonnes proposées',
|
|
552
|
+
selectionCount: (selected, total) => \`(\${selected} sélectionnée\${selected !== 1 ? 's' : ''} / \${total} au total)\`,
|
|
553
|
+
selectAll: 'Tout sélectionner',
|
|
554
|
+
deselectAll: 'Tout désélectionner',
|
|
555
|
+
assumptionsTitle: 'Hypothèses',
|
|
556
|
+
risksTitle: 'Risques potentiels',
|
|
557
|
+
cancel: 'Annuler',
|
|
558
|
+
addColumns: (count) => \`Ajouter \${count} colonne\${count !== 1 ? 's' : ''} au catalogue\`,
|
|
559
|
+
previewTitle: 'Aperçu de la colonne',
|
|
560
|
+
rationale: 'Justification',
|
|
561
|
+
previewEN: 'Aperçu EN',
|
|
562
|
+
previewFR: 'Aperçu FR',
|
|
563
|
+
tokenCost: 'Coût tokens',
|
|
564
|
+
overlap: 'Chevauchement',
|
|
565
|
+
success: 'Colonnes ajoutées au catalogue !',
|
|
566
|
+
noColumns: 'Veuillez sélectionner au moins une colonne',
|
|
567
|
+
claudeNotFound: 'Claude CLI non trouvé. Veuillez l\\'installer.',
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
let currentLang = localStorage.getItem('autocode-lang') || 'en';
|
|
572
|
+
let analysisResult = null;
|
|
573
|
+
let selectedColumns = new Set();
|
|
574
|
+
let previewLang = 'en';
|
|
575
|
+
let currentPreviewColId = null;
|
|
576
|
+
|
|
577
|
+
function t(key, ...args) {
|
|
578
|
+
const val = translations[currentLang]?.[key] || translations['en'][key] || key;
|
|
579
|
+
return typeof val === 'function' ? val(...args) : val;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
function switchLang(lang) {
|
|
583
|
+
currentLang = lang;
|
|
584
|
+
localStorage.setItem('autocode-lang', lang);
|
|
585
|
+
updateUI();
|
|
586
|
+
updateLangButtons();
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function updateLangButtons() {
|
|
590
|
+
document.querySelectorAll('.header .lang-btn').forEach(btn => {
|
|
591
|
+
btn.classList.toggle('active', btn.dataset.lang === currentLang);
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function updateUI() {
|
|
596
|
+
document.getElementById('backBtn').textContent = t('backBtn');
|
|
597
|
+
document.getElementById('analyzeTitle').textContent = t('analyzeTitle');
|
|
598
|
+
document.getElementById('analyzeDesc').textContent = t('analyzeDesc');
|
|
599
|
+
document.getElementById('analyzeBtnText').textContent = t('startAnalysis');
|
|
600
|
+
document.getElementById('loadingText').textContent = t('loading');
|
|
601
|
+
document.getElementById('loadingHint').textContent = t('loadingHint');
|
|
602
|
+
document.getElementById('errorTitle').textContent = t('errorTitle');
|
|
603
|
+
document.getElementById('retryBtnText').textContent = t('retry');
|
|
604
|
+
document.getElementById('summaryTitle').textContent = t('summaryTitle');
|
|
605
|
+
document.getElementById('proposedTitle').textContent = t('proposedTitle');
|
|
606
|
+
document.getElementById('assumptionsTitle').textContent = t('assumptionsTitle');
|
|
607
|
+
document.getElementById('risksTitle').textContent = t('risksTitle');
|
|
608
|
+
document.getElementById('cancelBtn').textContent = t('cancel');
|
|
609
|
+
document.getElementById('previewModalTitle').textContent = t('previewTitle');
|
|
610
|
+
|
|
611
|
+
updateSelectionUI();
|
|
612
|
+
|
|
613
|
+
if (analysisResult) {
|
|
614
|
+
renderResults();
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
function showNotification(message, isError = false) {
|
|
619
|
+
const el = document.getElementById('notification');
|
|
620
|
+
el.textContent = message;
|
|
621
|
+
el.classList.toggle('error', isError);
|
|
622
|
+
el.classList.add('visible');
|
|
623
|
+
setTimeout(() => el.classList.remove('visible'), 3000);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
function showSection(sectionId) {
|
|
627
|
+
['analyzeSection', 'loadingSection', 'errorSection', 'resultsSection'].forEach(id => {
|
|
628
|
+
document.getElementById(id).style.display = id === sectionId ? 'block' : 'none';
|
|
629
|
+
});
|
|
630
|
+
document.getElementById('actionsBar').style.display = sectionId === 'resultsSection' ? 'flex' : 'none';
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
async function startAnalysis() {
|
|
634
|
+
showSection('loadingSection');
|
|
635
|
+
|
|
636
|
+
try {
|
|
637
|
+
const response = await fetch('/api/catalog/autocreate', {
|
|
638
|
+
method: 'POST',
|
|
639
|
+
headers: { 'Content-Type': 'application/json' },
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
const result = await response.json();
|
|
643
|
+
|
|
644
|
+
if (!result.success) {
|
|
645
|
+
throw new Error(result.error || 'Analysis failed');
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
analysisResult = result.data;
|
|
649
|
+
|
|
650
|
+
// Auto-select all columns initially
|
|
651
|
+
selectedColumns = new Set(analysisResult.proposed_columns.map(c => c.id));
|
|
652
|
+
|
|
653
|
+
showSection('resultsSection');
|
|
654
|
+
renderResults();
|
|
655
|
+
} catch (error) {
|
|
656
|
+
document.getElementById('errorMessage').textContent = error.message;
|
|
657
|
+
showSection('errorSection');
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function renderResults() {
|
|
662
|
+
if (!analysisResult) return;
|
|
663
|
+
|
|
664
|
+
// Summary
|
|
665
|
+
const summary = analysisResult.global_summary;
|
|
666
|
+
document.getElementById('summaryContent').textContent = currentLang === 'fr' ? summary.fr : summary.en;
|
|
667
|
+
|
|
668
|
+
// Columns
|
|
669
|
+
const listEl = document.getElementById('columnsList');
|
|
670
|
+
listEl.innerHTML = '';
|
|
671
|
+
|
|
672
|
+
for (const col of analysisResult.proposed_columns) {
|
|
673
|
+
const isSelected = selectedColumns.has(col.id);
|
|
674
|
+
const displayName = currentLang === 'fr' ? col.display_name.fr : col.display_name.en;
|
|
675
|
+
const shortDesc = currentLang === 'fr' ? col.short_description.fr : col.short_description.en;
|
|
676
|
+
const rationale = currentLang === 'fr' ? col.rationale.fr : col.rationale.en;
|
|
677
|
+
|
|
678
|
+
const card = document.createElement('div');
|
|
679
|
+
card.className = 'column-card' + (isSelected ? ' selected' : '');
|
|
680
|
+
card.innerHTML = \`
|
|
681
|
+
<div class="column-card-header">
|
|
682
|
+
<input type="checkbox" class="column-checkbox" \${isSelected ? 'checked' : ''} onchange="toggleColumn('\${col.id}')">
|
|
683
|
+
<div class="column-info">
|
|
684
|
+
<div class="column-name">\${escapeHtml(displayName)}</div>
|
|
685
|
+
<div class="column-desc">\${escapeHtml(shortDesc)}</div>
|
|
686
|
+
<div class="column-meta">
|
|
687
|
+
<span class="badge badge-segment \${col.segment_hint || 'action'}">\${col.segment_hint || 'action'}</span>
|
|
688
|
+
<span class="badge badge-cost \${col.token_cost_estimate}">\${t('tokenCost')}: \${col.token_cost_estimate}</span>
|
|
689
|
+
\${col.overlap_warnings.length > 0 ? \`<span class="badge badge-overlap">\${t('overlap')}: \${col.overlap_warnings.join(', ')}</span>\` : ''}
|
|
690
|
+
</div>
|
|
691
|
+
\${rationale ? \`<div class="column-rationale"><strong>\${t('rationale')}:</strong> \${escapeHtml(rationale)}</div>\` : ''}
|
|
692
|
+
<div class="preview-btns">
|
|
693
|
+
<button class="btn btn-secondary preview-btn" onclick="showPreview('\${col.id}', 'en')">\${t('previewEN')}</button>
|
|
694
|
+
<button class="btn btn-secondary preview-btn" onclick="showPreview('\${col.id}', 'fr')">\${t('previewFR')}</button>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
</div>
|
|
698
|
+
\`;
|
|
699
|
+
listEl.appendChild(card);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Assumptions
|
|
703
|
+
const assumptionsList = document.getElementById('assumptionsList');
|
|
704
|
+
const assumptionsSection = document.getElementById('assumptionsSection');
|
|
705
|
+
if (analysisResult.assumptions && analysisResult.assumptions.length > 0) {
|
|
706
|
+
assumptionsList.innerHTML = analysisResult.assumptions.map(a => \`<li>\${escapeHtml(a)}</li>\`).join('');
|
|
707
|
+
assumptionsSection.style.display = 'block';
|
|
708
|
+
} else {
|
|
709
|
+
assumptionsSection.style.display = 'none';
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// Risks
|
|
713
|
+
const risksList = document.getElementById('risksList');
|
|
714
|
+
const risksSection = document.getElementById('risksSection');
|
|
715
|
+
if (analysisResult.risks && analysisResult.risks.length > 0) {
|
|
716
|
+
risksList.innerHTML = analysisResult.risks.map(r => \`<li>\${escapeHtml(r)}</li>\`).join('');
|
|
717
|
+
risksSection.style.display = 'block';
|
|
718
|
+
} else {
|
|
719
|
+
risksSection.style.display = 'none';
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
updateSelectionUI();
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function toggleColumn(id) {
|
|
726
|
+
if (selectedColumns.has(id)) {
|
|
727
|
+
selectedColumns.delete(id);
|
|
728
|
+
} else {
|
|
729
|
+
selectedColumns.add(id);
|
|
730
|
+
}
|
|
731
|
+
renderResults();
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
function toggleSelectAll() {
|
|
735
|
+
const allSelected = selectedColumns.size === analysisResult.proposed_columns.length;
|
|
736
|
+
if (allSelected) {
|
|
737
|
+
selectedColumns.clear();
|
|
738
|
+
} else {
|
|
739
|
+
selectedColumns = new Set(analysisResult.proposed_columns.map(c => c.id));
|
|
740
|
+
}
|
|
741
|
+
renderResults();
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
function updateSelectionUI() {
|
|
745
|
+
if (!analysisResult) return;
|
|
746
|
+
|
|
747
|
+
const total = analysisResult.proposed_columns.length;
|
|
748
|
+
const selected = selectedColumns.size;
|
|
749
|
+
const allSelected = selected === total;
|
|
750
|
+
|
|
751
|
+
document.getElementById('selectionCount').textContent = t('selectionCount', selected, total);
|
|
752
|
+
document.getElementById('selectAllBtn').textContent = allSelected ? t('deselectAll') : t('selectAll');
|
|
753
|
+
document.getElementById('applyBtnText').textContent = t('addColumns', selected);
|
|
754
|
+
document.getElementById('applyBtn').disabled = selected === 0;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
function showPreview(colId, lang) {
|
|
758
|
+
const col = analysisResult.proposed_columns.find(c => c.id === colId);
|
|
759
|
+
if (!col) return;
|
|
760
|
+
|
|
761
|
+
currentPreviewColId = colId;
|
|
762
|
+
previewLang = lang;
|
|
763
|
+
let content = '';
|
|
764
|
+
|
|
765
|
+
if (col.files_to_create && col.files_to_create.length > 0) {
|
|
766
|
+
const file = col.files_to_create[0];
|
|
767
|
+
content = lang === 'fr' ? file.content.fr : file.content.en;
|
|
768
|
+
} else {
|
|
769
|
+
const displayName = lang === 'fr' ? col.display_name.fr : col.display_name.en;
|
|
770
|
+
const shortDesc = lang === 'fr' ? col.short_description.fr : col.short_description.en;
|
|
771
|
+
content = \`# \${displayName}\\n\\n## Role\\n\${shortDesc}\\n\\n## Actions\\n1. Execute the required tasks\\n2. Validate the results\\n\\n## Validation Criteria\\n- [ ] Task completed successfully\`;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
document.getElementById('previewContent').textContent = content;
|
|
775
|
+
document.getElementById('previewModal').classList.add('active');
|
|
776
|
+
|
|
777
|
+
// Update preview lang buttons
|
|
778
|
+
document.querySelectorAll('#previewModal .lang-btn').forEach(btn => {
|
|
779
|
+
btn.classList.toggle('active', btn.dataset.lang === lang);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
function switchPreviewLang(lang) {
|
|
784
|
+
if (currentPreviewColId) {
|
|
785
|
+
showPreview(currentPreviewColId, lang);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
function closePreviewModal() {
|
|
790
|
+
document.getElementById('previewModal').classList.remove('active');
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
async function applySelected() {
|
|
794
|
+
if (selectedColumns.size === 0) {
|
|
795
|
+
showNotification(t('noColumns'), true);
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
const columnsToApply = analysisResult.proposed_columns.filter(c => selectedColumns.has(c.id));
|
|
800
|
+
|
|
801
|
+
document.getElementById('applyBtn').disabled = true;
|
|
802
|
+
document.getElementById('applyBtnText').textContent = 'Applying...';
|
|
803
|
+
|
|
804
|
+
try {
|
|
805
|
+
const response = await fetch('/api/catalog/autocreate/apply', {
|
|
806
|
+
method: 'POST',
|
|
807
|
+
headers: { 'Content-Type': 'application/json' },
|
|
808
|
+
body: JSON.stringify({ columns: columnsToApply }),
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
const result = await response.json();
|
|
812
|
+
|
|
813
|
+
if (!result.success) {
|
|
814
|
+
throw new Error(result.error || 'Failed to apply columns');
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
showNotification(t('success'));
|
|
818
|
+
|
|
819
|
+
// Redirect back to configurator after short delay
|
|
820
|
+
setTimeout(() => {
|
|
821
|
+
window.location.href = '/settings/pipeline/configurator';
|
|
822
|
+
}, 1500);
|
|
823
|
+
} catch (error) {
|
|
824
|
+
showNotification(error.message, true);
|
|
825
|
+
document.getElementById('applyBtn').disabled = false;
|
|
826
|
+
updateSelectionUI();
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
function escapeHtml(str) {
|
|
831
|
+
if (!str) return '';
|
|
832
|
+
return str
|
|
833
|
+
.replace(/&/g, '&')
|
|
834
|
+
.replace(/</g, '<')
|
|
835
|
+
.replace(/>/g, '>')
|
|
836
|
+
.replace(/"/g, '"')
|
|
837
|
+
.replace(/'/g, ''');
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
// Initialize
|
|
841
|
+
updateLangButtons();
|
|
842
|
+
updateUI();
|
|
843
|
+
</script>
|
|
844
|
+
</body>
|
|
845
|
+
</html>`;
|
|
846
|
+
}
|
|
847
|
+
//# sourceMappingURL=autocreate.js.map
|