@auto-engineer/component-implementer 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +12 -0
- package/README.md +153 -305
- package/dist/src/commands/implement-component.d.ts.map +1 -1
- package/dist/src/commands/implement-component.js +5 -1
- package/dist/src/commands/implement-component.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/commands/implement-component.ts +5 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/component-implementer@0.
|
|
2
|
+
> @auto-engineer/component-implementer@0.15.0 build /home/runner/work/auto-engineer/auto-engineer/packages/component-implementer
|
|
3
3
|
> tsc && tsx ../../scripts/fix-esm-imports.ts && cp src/*.html dist/src/ 2>/dev/null || true
|
|
4
4
|
|
|
5
5
|
Fixed ESM imports in dist/
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @auto-engineer/frontend-implementer
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- version bump
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @auto-engineer/message-bus@0.15.0
|
|
13
|
+
- @auto-engineer/ai-gateway@0.15.0
|
|
14
|
+
|
|
3
15
|
## 0.14.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,358 +1,206 @@
|
|
|
1
|
-
# @auto-engineer/
|
|
1
|
+
# @auto-engineer/component-implementer
|
|
2
2
|
|
|
3
|
-
AI-powered
|
|
3
|
+
AI-powered component implementation that generates production-ready React components from IA schema definitions.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This is a plugin for the Auto Engineer CLI. Install both the CLI and this plugin:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install -g @auto-engineer/cli
|
|
11
|
-
npm install @auto-engineer/frontend-implementer
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Configuration
|
|
15
|
-
|
|
16
|
-
Add this plugin to your `auto.config.ts`:
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
export default {
|
|
20
|
-
plugins: [
|
|
21
|
-
'@auto-engineer/frontend-implementer',
|
|
22
|
-
// ... other plugins
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Commands
|
|
5
|
+
---
|
|
28
6
|
|
|
29
|
-
|
|
7
|
+
## Purpose
|
|
30
8
|
|
|
31
|
-
-
|
|
9
|
+
Without `@auto-engineer/component-implementer`, you would have to manually translate IA specifications into React components, handle dependency resolution between atoms/molecules/organisms, and iterate through TypeScript errors without AI assistance.
|
|
32
10
|
|
|
33
|
-
|
|
11
|
+
This package bridges the gap between design specifications and working code. It reads component specs from an IA schema, resolves the full dependency tree, and generates type-safe React/TypeScript code via AI with automatic retry on compilation errors.
|
|
34
12
|
|
|
35
|
-
|
|
13
|
+
---
|
|
36
14
|
|
|
37
|
-
##
|
|
15
|
+
## Installation
|
|
38
16
|
|
|
39
|
-
|
|
17
|
+
```bash
|
|
18
|
+
pnpm add @auto-engineer/component-implementer
|
|
19
|
+
```
|
|
40
20
|
|
|
41
|
-
|
|
42
|
-
- Implements custom hooks for state management and API interactions
|
|
43
|
-
- Creates responsive layouts and interactive user interfaces
|
|
44
|
-
- Integrates with design systems and component libraries
|
|
21
|
+
## Quick Start
|
|
45
22
|
|
|
46
|
-
|
|
23
|
+
Register the handler and implement a component:
|
|
47
24
|
|
|
48
|
-
|
|
49
|
-
- Implements optimistic updates and error handling
|
|
50
|
-
- Creates type-safe GraphQL operations
|
|
51
|
-
- Handles loading states and data caching
|
|
25
|
+
### 1. Register the handlers
|
|
52
26
|
|
|
53
|
-
|
|
27
|
+
```typescript
|
|
28
|
+
import { COMMANDS } from '@auto-engineer/component-implementer';
|
|
29
|
+
import { createMessageBus } from '@auto-engineer/message-bus';
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- Maintains visual consistency across the application
|
|
31
|
+
const bus = createMessageBus();
|
|
32
|
+
COMMANDS.forEach(cmd => bus.registerCommand(cmd));
|
|
33
|
+
```
|
|
59
34
|
|
|
60
|
-
###
|
|
35
|
+
### 2. Send a command
|
|
61
36
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
37
|
+
```typescript
|
|
38
|
+
const result = await bus.dispatch({
|
|
39
|
+
type: 'ImplementComponent',
|
|
40
|
+
data: {
|
|
41
|
+
projectDir: './client',
|
|
42
|
+
iaSchemeDir: './.context',
|
|
43
|
+
designSystemPath: './design-system.md',
|
|
44
|
+
componentType: 'molecule',
|
|
45
|
+
componentName: 'SurveyCard',
|
|
46
|
+
filePath: 'client/src/components/molecules/SurveyCard.tsx',
|
|
47
|
+
},
|
|
48
|
+
requestId: 'req-123',
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
console.log(result);
|
|
52
|
+
// → { type: 'ComponentImplemented', data: { filePath: '...', composition: ['Button', 'Badge'] } }
|
|
53
|
+
```
|
|
66
54
|
|
|
67
|
-
|
|
55
|
+
The command generates a React component file with TypeScript types and GraphQL integration.
|
|
68
56
|
|
|
69
|
-
|
|
57
|
+
---
|
|
70
58
|
|
|
71
|
-
|
|
59
|
+
## How-to Guides
|
|
72
60
|
|
|
73
|
-
|
|
74
|
-
// Before (generated stub)
|
|
75
|
-
export function OrderHistoryPage() {
|
|
76
|
-
// TODO: Implement order history display
|
|
77
|
-
return <div>Order History - Not implemented</div>;
|
|
78
|
-
}
|
|
61
|
+
### Run via CLI
|
|
79
62
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const { data, loading, error, refetch } = useOrderHistoryQuery({
|
|
83
|
-
variables: { customerId: useCurrentUser().id },
|
|
84
|
-
errorPolicy: 'partial'
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const [selectedOrder, setSelectedOrder] = useState<Order | null>(null);
|
|
88
|
-
|
|
89
|
-
if (loading) return <LoadingSpinner message="Loading your orders..." />;
|
|
90
|
-
if (error) return <ErrorMessage error={error} onRetry={refetch} />;
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<PageLayout title="Order History" breadcrumbs={[{ label: 'Orders', href: '/orders' }]}>
|
|
94
|
-
<div className="space-y-6">
|
|
95
|
-
<OrderFilters onFilterChange={handleFilterChange} />
|
|
96
|
-
|
|
97
|
-
{data?.orders.length === 0 ? (
|
|
98
|
-
<EmptyState
|
|
99
|
-
title="No orders found"
|
|
100
|
-
description="You haven't placed any orders yet."
|
|
101
|
-
action={<Button href="/products">Start Shopping</Button>}
|
|
102
|
-
/>
|
|
103
|
-
) : (
|
|
104
|
-
<OrderList
|
|
105
|
-
orders={data?.orders || []}
|
|
106
|
-
onSelectOrder={setSelectedOrder}
|
|
107
|
-
/>
|
|
108
|
-
)}
|
|
109
|
-
|
|
110
|
-
{selectedOrder && (
|
|
111
|
-
<OrderDetailModal
|
|
112
|
-
order={selectedOrder}
|
|
113
|
-
isOpen={!!selectedOrder}
|
|
114
|
-
onClose={() => setSelectedOrder(null)}
|
|
115
|
-
/>
|
|
116
|
-
)}
|
|
117
|
-
</div>
|
|
118
|
-
</PageLayout>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
63
|
+
```bash
|
|
64
|
+
pnpm ai-agent ./client ./.context ./design-system.md
|
|
121
65
|
```
|
|
122
66
|
|
|
123
|
-
###
|
|
124
|
-
|
|
125
|
-
Creates reusable hooks for complex logic:
|
|
67
|
+
### Run Programmatically
|
|
126
68
|
|
|
127
69
|
```typescript
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
id: `temp-${Date.now()}`,
|
|
143
|
-
status: OrderStatus.Pending,
|
|
144
|
-
...orderData,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
update: (cache, { data }) => {
|
|
148
|
-
if (data?.placeOrder) {
|
|
149
|
-
cache.modify({
|
|
150
|
-
fields: {
|
|
151
|
-
orders: (existing = []) => [...existing, data.placeOrder],
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
return result.data?.placeOrder;
|
|
159
|
-
} catch (error) {
|
|
160
|
-
throw new OrderPlacementError('Failed to place order', error);
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
[placeOrderMutation],
|
|
164
|
-
);
|
|
165
|
-
|
|
166
|
-
const cancelOrder = useCallback(
|
|
167
|
-
async (orderId: string) => {
|
|
168
|
-
// Implementation with optimistic updates and error handling
|
|
169
|
-
},
|
|
170
|
-
[cancelOrderMutation],
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
return { placeOrder, cancelOrder, orders };
|
|
174
|
-
}
|
|
70
|
+
import { implementComponentHandler } from '@auto-engineer/component-implementer';
|
|
71
|
+
|
|
72
|
+
const result = await implementComponentHandler.handle({
|
|
73
|
+
type: 'ImplementComponent',
|
|
74
|
+
data: {
|
|
75
|
+
projectDir: './client',
|
|
76
|
+
iaSchemeDir: './.context',
|
|
77
|
+
designSystemPath: './design-system.md',
|
|
78
|
+
componentType: 'organism',
|
|
79
|
+
componentName: 'SurveyList',
|
|
80
|
+
filePath: 'client/src/components/organisms/SurveyList.tsx',
|
|
81
|
+
},
|
|
82
|
+
requestId: 'req-123',
|
|
83
|
+
});
|
|
175
84
|
```
|
|
176
85
|
|
|
177
|
-
###
|
|
178
|
-
|
|
179
|
-
Creates feature-rich, accessible components:
|
|
86
|
+
### Handle Errors
|
|
180
87
|
|
|
181
88
|
```typescript
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const [isAdding, setIsAdding] = useState(false);
|
|
185
|
-
const [imageError, setImageError] = useState(false);
|
|
186
|
-
const { addToast } = useToast();
|
|
187
|
-
|
|
188
|
-
const handleAddToCart = async () => {
|
|
189
|
-
setIsAdding(true);
|
|
190
|
-
try {
|
|
191
|
-
await onAddToCart(product.id);
|
|
192
|
-
addToast({
|
|
193
|
-
type: 'success',
|
|
194
|
-
message: `${product.name} added to cart`
|
|
195
|
-
});
|
|
196
|
-
} catch (error) {
|
|
197
|
-
addToast({
|
|
198
|
-
type: 'error',
|
|
199
|
-
message: 'Failed to add item to cart'
|
|
200
|
-
});
|
|
201
|
-
} finally {
|
|
202
|
-
setIsAdding(false);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
return (
|
|
207
|
-
<Card className="group hover:shadow-lg transition-shadow">
|
|
208
|
-
<CardContent className="p-0">
|
|
209
|
-
{!imageError ? (
|
|
210
|
-
<img
|
|
211
|
-
src={product.imageUrl}
|
|
212
|
-
alt={product.name}
|
|
213
|
-
className="w-full h-48 object-cover rounded-t-lg"
|
|
214
|
-
onError={() => setImageError(true)}
|
|
215
|
-
/>
|
|
216
|
-
) : (
|
|
217
|
-
<div className="w-full h-48 bg-gray-100 flex items-center justify-center rounded-t-lg">
|
|
218
|
-
<ImageIcon className="text-gray-400" size={48} />
|
|
219
|
-
</div>
|
|
220
|
-
)}
|
|
221
|
-
|
|
222
|
-
<div className="p-4">
|
|
223
|
-
<h3 className="font-semibold text-lg mb-2">{product.name}</h3>
|
|
224
|
-
<p className="text-gray-600 text-sm mb-3 line-clamp-2">
|
|
225
|
-
{product.description}
|
|
226
|
-
</p>
|
|
227
|
-
|
|
228
|
-
<div className="flex justify-between items-center">
|
|
229
|
-
<span className="text-xl font-bold text-primary">
|
|
230
|
-
${product.price.toFixed(2)}
|
|
231
|
-
</span>
|
|
232
|
-
|
|
233
|
-
<Button
|
|
234
|
-
onClick={handleAddToCart}
|
|
235
|
-
disabled={isAdding || !product.inStock}
|
|
236
|
-
className="min-w-24"
|
|
237
|
-
>
|
|
238
|
-
{isAdding ? (
|
|
239
|
-
<Spinner size="sm" />
|
|
240
|
-
) : !product.inStock ? (
|
|
241
|
-
'Out of Stock'
|
|
242
|
-
) : (
|
|
243
|
-
'Add to Cart'
|
|
244
|
-
)}
|
|
245
|
-
</Button>
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</CardContent>
|
|
249
|
-
</Card>
|
|
250
|
-
);
|
|
89
|
+
if (result.type === 'ComponentImplementationFailed') {
|
|
90
|
+
console.error(result.data.error);
|
|
251
91
|
}
|
|
252
92
|
```
|
|
253
93
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
Customize implementation behavior:
|
|
94
|
+
### Enable Debug Logging
|
|
257
95
|
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
export default {
|
|
261
|
-
plugins: [
|
|
262
|
-
[
|
|
263
|
-
'@auto-engineer/frontend-implementer',
|
|
264
|
-
{
|
|
265
|
-
// AI model configuration
|
|
266
|
-
model: 'claude-3-sonnet',
|
|
267
|
-
|
|
268
|
-
// Framework preferences
|
|
269
|
-
framework: 'react',
|
|
270
|
-
stateManagement: 'apollo-client',
|
|
271
|
-
|
|
272
|
-
// UI library integration
|
|
273
|
-
designSystem: 'shadcn/ui',
|
|
274
|
-
iconLibrary: 'lucide-react',
|
|
275
|
-
|
|
276
|
-
// Implementation preferences
|
|
277
|
-
includeAccessibility: true,
|
|
278
|
-
includeAnimations: true,
|
|
279
|
-
includeErrorBoundaries: true,
|
|
280
|
-
|
|
281
|
-
// Testing
|
|
282
|
-
generateTests: true,
|
|
283
|
-
testingLibrary: 'testing-library',
|
|
284
|
-
},
|
|
285
|
-
],
|
|
286
|
-
],
|
|
287
|
-
};
|
|
96
|
+
```bash
|
|
97
|
+
DEBUG=auto:client-implementer:* pnpm ai-agent ./client ./.context ./design-system.md
|
|
288
98
|
```
|
|
289
99
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
### Responsive Design Implementation
|
|
100
|
+
---
|
|
293
101
|
|
|
294
|
-
|
|
295
|
-
- Touch-friendly interactions for mobile devices
|
|
296
|
-
- Optimized layouts for different screen sizes
|
|
297
|
-
- Progressive enhancement patterns
|
|
102
|
+
## API Reference
|
|
298
103
|
|
|
299
|
-
###
|
|
104
|
+
### Exports
|
|
300
105
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
- Color contrast compliance
|
|
304
|
-
- Focus management and visual indicators
|
|
305
|
-
|
|
306
|
-
### Performance Optimization
|
|
106
|
+
```typescript
|
|
107
|
+
import { COMMANDS, implementComponentHandler } from '@auto-engineer/component-implementer';
|
|
307
108
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
109
|
+
import type {
|
|
110
|
+
ImplementComponentCommand,
|
|
111
|
+
ComponentImplementedEvent,
|
|
112
|
+
ComponentImplementationFailedEvent,
|
|
113
|
+
} from '@auto-engineer/component-implementer';
|
|
114
|
+
```
|
|
312
115
|
|
|
313
|
-
###
|
|
116
|
+
### Commands
|
|
314
117
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
- Graceful degradation patterns
|
|
118
|
+
| Command | Description |
|
|
119
|
+
|---------|-------------|
|
|
120
|
+
| `ImplementComponent` | Generates a React component from IA schema definition |
|
|
319
121
|
|
|
320
|
-
|
|
122
|
+
### ImplementComponentCommand
|
|
321
123
|
|
|
322
|
-
|
|
124
|
+
```typescript
|
|
125
|
+
type ImplementComponentCommand = Command<
|
|
126
|
+
'ImplementComponent',
|
|
127
|
+
{
|
|
128
|
+
projectDir: string;
|
|
129
|
+
iaSchemeDir: string;
|
|
130
|
+
designSystemPath: string;
|
|
131
|
+
componentType: 'atom' | 'molecule' | 'organism' | 'page';
|
|
132
|
+
filePath: string;
|
|
133
|
+
componentName: string;
|
|
134
|
+
failures?: string[];
|
|
135
|
+
aiOptions?: { temperature?: number; maxTokens?: number };
|
|
136
|
+
}
|
|
137
|
+
>;
|
|
138
|
+
```
|
|
323
139
|
|
|
324
|
-
|
|
325
|
-
- **@auto-engineer/design-system-importer**: Uses imported design tokens and components
|
|
326
|
-
- **@auto-engineer/frontend-checks**: Validates implementations pass tests and type checking
|
|
327
|
-
- **@auto-engineer/information-architect**: Uses IA specifications for navigation and content structure
|
|
140
|
+
### ComponentImplementedEvent
|
|
328
141
|
|
|
329
|
-
|
|
142
|
+
```typescript
|
|
143
|
+
type ComponentImplementedEvent = Event<
|
|
144
|
+
'ComponentImplemented',
|
|
145
|
+
{
|
|
146
|
+
filePath: string;
|
|
147
|
+
componentType: string;
|
|
148
|
+
componentName: string;
|
|
149
|
+
composition: string[];
|
|
150
|
+
specs: string[];
|
|
151
|
+
}
|
|
152
|
+
>;
|
|
153
|
+
```
|
|
330
154
|
|
|
331
|
-
|
|
155
|
+
### ComponentImplementationFailedEvent
|
|
332
156
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
157
|
+
```typescript
|
|
158
|
+
type ComponentImplementationFailedEvent = Event<
|
|
159
|
+
'ComponentImplementationFailed',
|
|
160
|
+
{
|
|
161
|
+
error: string;
|
|
162
|
+
componentType: string;
|
|
163
|
+
componentName: string;
|
|
164
|
+
filePath: string;
|
|
165
|
+
}
|
|
166
|
+
>;
|
|
167
|
+
```
|
|
338
168
|
|
|
339
|
-
|
|
169
|
+
---
|
|
340
170
|
|
|
341
|
-
|
|
171
|
+
## Architecture
|
|
342
172
|
|
|
343
|
-
|
|
173
|
+
```
|
|
174
|
+
src/
|
|
175
|
+
├── index.ts
|
|
176
|
+
├── commands/
|
|
177
|
+
│ └── implement-component.ts
|
|
178
|
+
├── agent.ts
|
|
179
|
+
└── agent-cli.ts
|
|
180
|
+
```
|
|
344
181
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
182
|
+
The following diagram shows the implementation flow:
|
|
183
|
+
|
|
184
|
+
```mermaid
|
|
185
|
+
flowchart TB
|
|
186
|
+
A[ImplementComponentCommand] --> B[Load IA Schema]
|
|
187
|
+
B --> C[Build Component Registry]
|
|
188
|
+
C --> D[Resolve Dependencies]
|
|
189
|
+
D --> E[Generate via AI]
|
|
190
|
+
E --> F{TypeScript Valid?}
|
|
191
|
+
F -->|Yes| G[ComponentImplementedEvent]
|
|
192
|
+
F -->|No| H{Retries < 3?}
|
|
193
|
+
H -->|Yes| E
|
|
194
|
+
H -->|No| I[ComponentImplementationFailedEvent]
|
|
195
|
+
```
|
|
350
196
|
|
|
351
|
-
|
|
197
|
+
*Flow: Command loads schema, builds registry, resolves dependencies, generates code via AI, validates with TypeScript, and retries up to 3 times on failure.*
|
|
352
198
|
|
|
353
|
-
|
|
354
|
-
- Adds advanced features incrementally
|
|
355
|
-
- Supports partial implementations and manual refinements
|
|
356
|
-
- Adapts to user feedback and requirements changes
|
|
199
|
+
### Dependencies
|
|
357
200
|
|
|
358
|
-
|
|
201
|
+
| Package | Usage |
|
|
202
|
+
|---------|-------|
|
|
203
|
+
| `@auto-engineer/ai-gateway` | AI text generation for code synthesis |
|
|
204
|
+
| `@auto-engineer/message-bus` | Command/event infrastructure |
|
|
205
|
+
| `zod` | Schema validation |
|
|
206
|
+
| `jsdom` | DOM parsing for component analysis |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement-component.d.ts","sourceRoot":"","sources":["../../../src/commands/implement-component.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAoB5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,oBAAoB,EACpB;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,sBAAsB,EACtB;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CACF,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,KAAK,CACpD,+BAA+B,EAC/B;IACE,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CACF,CAAC;AAEF,eAAO,MAAM,cAAc;;;oBAnCX,MAAM;qBACL,MAAM;0BACD,MAAM;uBACT,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM;kBAC9C,MAAM;uBACD,MAAM;mBACV,MAAM,EAAE;oBACP;YACV,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;;;;;
|
|
1
|
+
{"version":3,"file":"implement-component.d.ts","sourceRoot":"","sources":["../../../src/commands/implement-component.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAoB5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAC7C,oBAAoB,EACpB;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,sBAAsB,EACtB;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CACF,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,KAAK,CACpD,+BAA+B,EAC/B;IACE,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CACF,CAAC;AAEF,eAAO,MAAM,cAAc;;;oBAnCX,MAAM;qBACL,MAAM;0BACD,MAAM;uBACT,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM;kBAC9C,MAAM;uBACD,MAAM;mBACV,MAAM,EAAE;oBACP;YACV,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;;;;;GAqEH,CAAC"}
|
|
@@ -12,6 +12,7 @@ const debugProcess = createDebug('auto:client-implementer:component:process');
|
|
|
12
12
|
const debugResult = createDebug('auto:client-implementer:component:result');
|
|
13
13
|
export const commandHandler = defineCommandHandler({
|
|
14
14
|
name: 'ImplementComponent',
|
|
15
|
+
displayName: 'Implement Component',
|
|
15
16
|
alias: 'implement:component',
|
|
16
17
|
description: 'AI implements a single component (atom, molecule, organism, or page)',
|
|
17
18
|
category: 'implement',
|
|
@@ -35,7 +36,10 @@ export const commandHandler = defineCommandHandler({
|
|
|
35
36
|
examples: [
|
|
36
37
|
'$ auto implement:component --project-dir=./client --ia-scheme-dir=./.context --design-system-path=./design-system.md --component-type=molecule --component-name=SurveyCard',
|
|
37
38
|
],
|
|
38
|
-
events: [
|
|
39
|
+
events: [
|
|
40
|
+
{ name: 'ComponentImplemented', displayName: 'Component Implemented' },
|
|
41
|
+
{ name: 'ComponentImplementationFailed', displayName: 'Component Failed' },
|
|
42
|
+
],
|
|
39
43
|
handle: async (command) => {
|
|
40
44
|
const result = await handleImplementComponentCommandInternal(command);
|
|
41
45
|
if (result.type === 'ComponentImplemented') {
|