@evolve.labs/devflow 0.8.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/.claude/commands/agents/architect.md +1162 -0
- package/.claude/commands/agents/architect.meta.yaml +124 -0
- package/.claude/commands/agents/builder.md +1432 -0
- package/.claude/commands/agents/builder.meta.yaml +117 -0
- package/.claude/commands/agents/chronicler.md +633 -0
- package/.claude/commands/agents/chronicler.meta.yaml +217 -0
- package/.claude/commands/agents/guardian.md +456 -0
- package/.claude/commands/agents/guardian.meta.yaml +127 -0
- package/.claude/commands/agents/strategist.md +483 -0
- package/.claude/commands/agents/strategist.meta.yaml +158 -0
- package/.claude/commands/agents/system-designer.md +1137 -0
- package/.claude/commands/agents/system-designer.meta.yaml +156 -0
- package/.claude/commands/devflow-help.md +93 -0
- package/.claude/commands/devflow-status.md +60 -0
- package/.claude/commands/quick/create-adr.md +82 -0
- package/.claude/commands/quick/new-feature.md +57 -0
- package/.claude/commands/quick/security-check.md +54 -0
- package/.claude/commands/quick/system-design.md +58 -0
- package/.claude_project +52 -0
- package/.devflow/agents/architect.meta.yaml +122 -0
- package/.devflow/agents/builder.meta.yaml +116 -0
- package/.devflow/agents/chronicler.meta.yaml +222 -0
- package/.devflow/agents/guardian.meta.yaml +127 -0
- package/.devflow/agents/strategist.meta.yaml +158 -0
- package/.devflow/agents/system-designer.meta.yaml +265 -0
- package/.devflow/project.yaml +242 -0
- package/.gitignore-template +84 -0
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/bin/devflow.js +54 -0
- package/lib/autopilot.js +235 -0
- package/lib/autopilotConstants.js +213 -0
- package/lib/constants.js +95 -0
- package/lib/init.js +200 -0
- package/lib/update.js +181 -0
- package/lib/utils.js +157 -0
- package/lib/web.js +119 -0
- package/package.json +57 -0
- package/web/CHANGELOG.md +192 -0
- package/web/README.md +156 -0
- package/web/app/api/autopilot/execute/route.ts +102 -0
- package/web/app/api/autopilot/terminal-execute/route.ts +124 -0
- package/web/app/api/files/route.ts +280 -0
- package/web/app/api/files/tree/route.ts +160 -0
- package/web/app/api/git/route.ts +201 -0
- package/web/app/api/health/route.ts +94 -0
- package/web/app/api/project/open/route.ts +134 -0
- package/web/app/api/search/route.ts +247 -0
- package/web/app/api/specs/route.ts +405 -0
- package/web/app/api/terminal/route.ts +222 -0
- package/web/app/globals.css +160 -0
- package/web/app/ide/layout.tsx +43 -0
- package/web/app/ide/page.tsx +216 -0
- package/web/app/layout.tsx +34 -0
- package/web/app/page.tsx +303 -0
- package/web/components/agents/AgentIcons.tsx +281 -0
- package/web/components/autopilot/AutopilotConfigModal.tsx +245 -0
- package/web/components/autopilot/AutopilotPanel.tsx +299 -0
- package/web/components/dashboard/DashboardPanel.tsx +393 -0
- package/web/components/editor/Breadcrumbs.tsx +134 -0
- package/web/components/editor/EditorPanel.tsx +120 -0
- package/web/components/editor/EditorTabs.tsx +229 -0
- package/web/components/editor/MarkdownPreview.tsx +154 -0
- package/web/components/editor/MermaidDiagram.tsx +113 -0
- package/web/components/editor/MonacoEditor.tsx +177 -0
- package/web/components/editor/TabContextMenu.tsx +207 -0
- package/web/components/git/GitPanel.tsx +534 -0
- package/web/components/layout/Shell.tsx +15 -0
- package/web/components/layout/StatusBar.tsx +100 -0
- package/web/components/modals/CommandPalette.tsx +393 -0
- package/web/components/modals/GlobalSearch.tsx +348 -0
- package/web/components/modals/QuickOpen.tsx +241 -0
- package/web/components/modals/RecentFiles.tsx +208 -0
- package/web/components/projects/ProjectSelector.tsx +147 -0
- package/web/components/settings/SettingItem.tsx +150 -0
- package/web/components/settings/SettingsPanel.tsx +323 -0
- package/web/components/specs/SpecsPanel.tsx +1091 -0
- package/web/components/terminal/TerminalPanel.tsx +683 -0
- package/web/components/ui/ContextMenu.tsx +182 -0
- package/web/components/ui/LoadingSpinner.tsx +66 -0
- package/web/components/ui/ResizeHandle.tsx +110 -0
- package/web/components/ui/Skeleton.tsx +108 -0
- package/web/components/ui/SkipLinks.tsx +37 -0
- package/web/components/ui/Toaster.tsx +57 -0
- package/web/hooks/useFocusTrap.ts +141 -0
- package/web/hooks/useKeyboardShortcuts.ts +169 -0
- package/web/hooks/useListNavigation.ts +237 -0
- package/web/lib/autopilotConstants.ts +213 -0
- package/web/lib/constants/agents.ts +67 -0
- package/web/lib/git.ts +339 -0
- package/web/lib/ptyManager.ts +191 -0
- package/web/lib/specsParser.ts +299 -0
- package/web/lib/stores/autopilotStore.ts +288 -0
- package/web/lib/stores/fileStore.ts +550 -0
- package/web/lib/stores/gitStore.ts +386 -0
- package/web/lib/stores/projectStore.ts +196 -0
- package/web/lib/stores/settingsStore.ts +126 -0
- package/web/lib/stores/specsStore.ts +297 -0
- package/web/lib/stores/uiStore.ts +175 -0
- package/web/lib/types/index.ts +177 -0
- package/web/lib/utils.ts +98 -0
- package/web/next.config.js +50 -0
- package/web/package.json +54 -0
- package/web/postcss.config.js +6 -0
- package/web/tailwind.config.ts +68 -0
- package/web/tsconfig.json +41 -0
package/web/app/page.tsx
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { useProjectStore } from '@/lib/stores/projectStore';
|
|
6
|
+
import {
|
|
7
|
+
FolderOpen,
|
|
8
|
+
Clock,
|
|
9
|
+
Zap,
|
|
10
|
+
FileText,
|
|
11
|
+
Cpu,
|
|
12
|
+
Terminal,
|
|
13
|
+
GitBranch,
|
|
14
|
+
Sparkles,
|
|
15
|
+
ArrowRight,
|
|
16
|
+
CheckCircle2,
|
|
17
|
+
Bot
|
|
18
|
+
} from 'lucide-react';
|
|
19
|
+
|
|
20
|
+
export default function HomePage() {
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
const { addProject, recentProjects, isLoading, error: storeError } = useProjectStore();
|
|
23
|
+
const [projectPath, setProjectPath] = useState('');
|
|
24
|
+
const [error, setError] = useState<string | null>(null);
|
|
25
|
+
|
|
26
|
+
const displayError = error || storeError;
|
|
27
|
+
|
|
28
|
+
const handleOpenProject = async (path?: string) => {
|
|
29
|
+
const targetPath = path || projectPath;
|
|
30
|
+
if (!targetPath.trim()) {
|
|
31
|
+
setError('Please enter a project path');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
setError(null);
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
await addProject(targetPath.trim());
|
|
39
|
+
|
|
40
|
+
// Check if project was added successfully
|
|
41
|
+
const state = useProjectStore.getState();
|
|
42
|
+
if (state.error) {
|
|
43
|
+
setError(state.error);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
router.push('/ide');
|
|
48
|
+
} catch (err) {
|
|
49
|
+
setError(err instanceof Error ? err.message : 'Failed to open project');
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<div className="min-h-screen bg-[#0a0a0f] text-white">
|
|
55
|
+
{/* Header */}
|
|
56
|
+
<header className="border-b border-white/10 bg-[#0a0a0f]/80 backdrop-blur-sm sticky top-0 z-50">
|
|
57
|
+
<div className="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between">
|
|
58
|
+
<div className="flex items-center gap-3">
|
|
59
|
+
<div className="w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-700 rounded-lg flex items-center justify-center">
|
|
60
|
+
<Zap className="w-5 h-5 text-white" />
|
|
61
|
+
</div>
|
|
62
|
+
<span className="text-xl font-semibold">DevFlow</span>
|
|
63
|
+
<span className="text-xs bg-purple-500/20 text-purple-300 px-2 py-0.5 rounded-full">
|
|
64
|
+
Beta
|
|
65
|
+
</span>
|
|
66
|
+
</div>
|
|
67
|
+
<nav className="flex items-center gap-6 text-sm text-gray-400">
|
|
68
|
+
<a href="#features" className="hover:text-white transition-colors">Features</a>
|
|
69
|
+
<a href="https://github.com/anthropics/claude-code" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">Docs</a>
|
|
70
|
+
<a href="https://github.com/evolve-labs-cloud/dexter-devflow" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">GitHub</a>
|
|
71
|
+
</nav>
|
|
72
|
+
</div>
|
|
73
|
+
</header>
|
|
74
|
+
|
|
75
|
+
{/* Hero Section */}
|
|
76
|
+
<section className="relative overflow-hidden">
|
|
77
|
+
{/* Background gradient */}
|
|
78
|
+
<div className="absolute inset-0 bg-gradient-to-b from-purple-900/20 via-transparent to-transparent" />
|
|
79
|
+
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-purple-600/10 rounded-full blur-3xl" />
|
|
80
|
+
|
|
81
|
+
<div className="relative max-w-7xl mx-auto px-6 py-24 text-center">
|
|
82
|
+
<h1 className="text-5xl md:text-7xl font-bold mb-6 bg-gradient-to-r from-white via-purple-200 to-purple-400 bg-clip-text text-transparent">
|
|
83
|
+
Spec-Driven Development
|
|
84
|
+
</h1>
|
|
85
|
+
<p className="text-xl text-gray-400 max-w-2xl mx-auto mb-12">
|
|
86
|
+
Transform ideas into production code with AI agents.
|
|
87
|
+
From requirements to implementation, guided by specifications.
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
{/* Open Project Card */}
|
|
91
|
+
<div className="max-w-xl mx-auto bg-[#12121a] border border-white/10 rounded-2xl p-6 shadow-2xl">
|
|
92
|
+
<div className="flex items-center gap-2 mb-4">
|
|
93
|
+
<FolderOpen className="w-5 h-5 text-purple-400" />
|
|
94
|
+
<span className="font-medium">Open Project</span>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div className="flex gap-2 mb-3">
|
|
98
|
+
<input
|
|
99
|
+
type="text"
|
|
100
|
+
value={projectPath}
|
|
101
|
+
onChange={(e) => setProjectPath(e.target.value)}
|
|
102
|
+
onKeyDown={(e) => e.key === 'Enter' && handleOpenProject()}
|
|
103
|
+
placeholder="/path/to/your/project"
|
|
104
|
+
className="flex-1 px-4 py-3 bg-[#0a0a0f] border border-white/10 rounded-xl text-white placeholder-gray-500 focus:outline-none focus:border-purple-500 focus:ring-1 focus:ring-purple-500 transition-all"
|
|
105
|
+
suppressHydrationWarning
|
|
106
|
+
autoComplete="off"
|
|
107
|
+
data-form-type="other"
|
|
108
|
+
/>
|
|
109
|
+
<button
|
|
110
|
+
onClick={() => handleOpenProject()}
|
|
111
|
+
disabled={isLoading}
|
|
112
|
+
className="px-6 py-3 bg-purple-600 hover:bg-purple-500 text-white font-medium rounded-xl disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center gap-2"
|
|
113
|
+
>
|
|
114
|
+
{isLoading ? (
|
|
115
|
+
<span className="animate-spin">⏳</span>
|
|
116
|
+
) : (
|
|
117
|
+
<>
|
|
118
|
+
Open
|
|
119
|
+
<ArrowRight className="w-4 h-4" />
|
|
120
|
+
</>
|
|
121
|
+
)}
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
{displayError && (
|
|
126
|
+
<p className="text-sm text-red-400 text-left">{displayError}</p>
|
|
127
|
+
)}
|
|
128
|
+
|
|
129
|
+
{/* Recent Projects */}
|
|
130
|
+
{recentProjects.length > 0 && (
|
|
131
|
+
<div className="mt-4 pt-4 border-t border-white/10">
|
|
132
|
+
<div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
|
|
133
|
+
<Clock className="w-4 h-4" />
|
|
134
|
+
Recent
|
|
135
|
+
</div>
|
|
136
|
+
<div className="space-y-1">
|
|
137
|
+
{recentProjects.map((project, i) => (
|
|
138
|
+
<button
|
|
139
|
+
key={i}
|
|
140
|
+
onClick={() => handleOpenProject(project.path)}
|
|
141
|
+
className="w-full text-left px-3 py-2 text-sm text-gray-400 hover:text-white hover:bg-white/5 rounded-lg transition-colors truncate"
|
|
142
|
+
>
|
|
143
|
+
{project.name}
|
|
144
|
+
<span className="text-gray-600 ml-2 text-xs">{project.path}</span>
|
|
145
|
+
</button>
|
|
146
|
+
))}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
)}
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</section>
|
|
153
|
+
|
|
154
|
+
{/* Workflow Section */}
|
|
155
|
+
<section id="features" className="py-24 border-t border-white/5">
|
|
156
|
+
<div className="max-w-7xl mx-auto px-6">
|
|
157
|
+
<h2 className="text-3xl font-bold text-center mb-4">
|
|
158
|
+
From Idea to Production
|
|
159
|
+
</h2>
|
|
160
|
+
<p className="text-gray-400 text-center mb-16 max-w-2xl mx-auto">
|
|
161
|
+
DevFlow guides your development through structured phases,
|
|
162
|
+
ensuring clarity and quality at every step.
|
|
163
|
+
</p>
|
|
164
|
+
|
|
165
|
+
<div className="grid md:grid-cols-3 gap-6">
|
|
166
|
+
{/* Requirements */}
|
|
167
|
+
<div className="bg-[#12121a] border border-white/10 rounded-2xl p-6 hover:border-purple-500/50 transition-colors group">
|
|
168
|
+
<div className="w-12 h-12 bg-blue-500/20 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
|
169
|
+
<FileText className="w-6 h-6 text-blue-400" />
|
|
170
|
+
</div>
|
|
171
|
+
<h3 className="text-xl font-semibold mb-2">1. Requirements</h3>
|
|
172
|
+
<p className="text-gray-400 text-sm mb-4">
|
|
173
|
+
Transform natural language into structured specs with EARS notation.
|
|
174
|
+
Clear acceptance criteria before any code.
|
|
175
|
+
</p>
|
|
176
|
+
<div className="flex items-center gap-2 text-sm text-blue-400">
|
|
177
|
+
<Bot className="w-4 h-4" />
|
|
178
|
+
@strategist
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
{/* Design */}
|
|
183
|
+
<div className="bg-[#12121a] border border-white/10 rounded-2xl p-6 hover:border-purple-500/50 transition-colors group">
|
|
184
|
+
<div className="w-12 h-12 bg-purple-500/20 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
|
185
|
+
<Cpu className="w-6 h-6 text-purple-400" />
|
|
186
|
+
</div>
|
|
187
|
+
<h3 className="text-xl font-semibold mb-2">2. Design</h3>
|
|
188
|
+
<p className="text-gray-400 text-sm mb-4">
|
|
189
|
+
Generate architecture decisions, tech stack recommendations,
|
|
190
|
+
and implementation plans based on your codebase.
|
|
191
|
+
</p>
|
|
192
|
+
<div className="flex items-center gap-2 text-sm text-purple-400">
|
|
193
|
+
<Bot className="w-4 h-4" />
|
|
194
|
+
@architect
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
{/* Implementation */}
|
|
199
|
+
<div className="bg-[#12121a] border border-white/10 rounded-2xl p-6 hover:border-purple-500/50 transition-colors group">
|
|
200
|
+
<div className="w-12 h-12 bg-amber-500/20 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
|
201
|
+
<Terminal className="w-6 h-6 text-amber-400" />
|
|
202
|
+
</div>
|
|
203
|
+
<h3 className="text-xl font-semibold mb-2">3. Implementation</h3>
|
|
204
|
+
<p className="text-gray-400 text-sm mb-4">
|
|
205
|
+
Execute discrete, dependency-sequenced tasks.
|
|
206
|
+
AI agents write code following your specs.
|
|
207
|
+
</p>
|
|
208
|
+
<div className="flex items-center gap-2 text-sm text-amber-400">
|
|
209
|
+
<Bot className="w-4 h-4" />
|
|
210
|
+
@builder
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</section>
|
|
216
|
+
|
|
217
|
+
{/* Features Grid */}
|
|
218
|
+
<section className="py-24 border-t border-white/5 bg-[#08080c]">
|
|
219
|
+
<div className="max-w-7xl mx-auto px-6">
|
|
220
|
+
<h2 className="text-3xl font-bold text-center mb-16">
|
|
221
|
+
Powerful Features
|
|
222
|
+
</h2>
|
|
223
|
+
|
|
224
|
+
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
225
|
+
<FeatureCard
|
|
226
|
+
icon={<Sparkles className="w-5 h-5" />}
|
|
227
|
+
title="Autopilot Mode"
|
|
228
|
+
description="Autonomous task execution without step-by-step guidance"
|
|
229
|
+
/>
|
|
230
|
+
<FeatureCard
|
|
231
|
+
icon={<GitBranch className="w-5 h-5" />}
|
|
232
|
+
title="Git Integration"
|
|
233
|
+
description="Automatic commits with meaningful messages"
|
|
234
|
+
/>
|
|
235
|
+
<FeatureCard
|
|
236
|
+
icon={<Bot className="w-5 h-5" />}
|
|
237
|
+
title="AI Agents"
|
|
238
|
+
description="Specialized agents for each development phase"
|
|
239
|
+
/>
|
|
240
|
+
<FeatureCard
|
|
241
|
+
icon={<CheckCircle2 className="w-5 h-5" />}
|
|
242
|
+
title="Quality Assurance"
|
|
243
|
+
description="Built-in code review and testing"
|
|
244
|
+
/>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</section>
|
|
248
|
+
|
|
249
|
+
{/* CTA Section */}
|
|
250
|
+
<section className="py-24 border-t border-white/5">
|
|
251
|
+
<div className="max-w-4xl mx-auto px-6 text-center">
|
|
252
|
+
<h2 className="text-3xl font-bold mb-4">
|
|
253
|
+
Ready to transform your workflow?
|
|
254
|
+
</h2>
|
|
255
|
+
<p className="text-gray-400 mb-8">
|
|
256
|
+
Start building with spec-driven development today.
|
|
257
|
+
</p>
|
|
258
|
+
<div className="flex items-center justify-center gap-4">
|
|
259
|
+
<button
|
|
260
|
+
onClick={() => document.querySelector('input')?.focus()}
|
|
261
|
+
className="px-8 py-3 bg-purple-600 hover:bg-purple-500 text-white font-medium rounded-xl transition-colors"
|
|
262
|
+
>
|
|
263
|
+
Open a Project
|
|
264
|
+
</button>
|
|
265
|
+
<a
|
|
266
|
+
href="https://github.com/evolve-labs-cloud/dexter-devflow"
|
|
267
|
+
target="_blank"
|
|
268
|
+
rel="noopener noreferrer"
|
|
269
|
+
className="px-8 py-3 border border-white/20 hover:border-white/40 text-white font-medium rounded-xl transition-colors"
|
|
270
|
+
>
|
|
271
|
+
View Documentation
|
|
272
|
+
</a>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</section>
|
|
276
|
+
|
|
277
|
+
{/* Footer */}
|
|
278
|
+
<footer className="border-t border-white/10 py-8">
|
|
279
|
+
<div className="max-w-7xl mx-auto px-6 flex items-center justify-between text-sm text-gray-500">
|
|
280
|
+
<div className="flex items-center gap-2">
|
|
281
|
+
<Zap className="w-4 h-4 text-purple-400" />
|
|
282
|
+
DevFlow v0.7.0
|
|
283
|
+
</div>
|
|
284
|
+
<div>
|
|
285
|
+
Powered by Evolve Labs
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
</footer>
|
|
289
|
+
</div>
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function FeatureCard({ icon, title, description }: { icon: React.ReactNode; title: string; description: string }) {
|
|
294
|
+
return (
|
|
295
|
+
<div className="bg-[#12121a] border border-white/10 rounded-xl p-4 hover:border-purple-500/30 transition-colors">
|
|
296
|
+
<div className="w-10 h-10 bg-purple-500/10 rounded-lg flex items-center justify-center text-purple-400 mb-3">
|
|
297
|
+
{icon}
|
|
298
|
+
</div>
|
|
299
|
+
<h3 className="font-medium mb-1">{title}</h3>
|
|
300
|
+
<p className="text-sm text-gray-500">{description}</p>
|
|
301
|
+
</div>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
interface AgentIconProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Strategist - Chart/Strategy icon with rising bars
|
|
11
|
+
export function StrategistIcon({ className, size = 24 }: AgentIconProps) {
|
|
12
|
+
return (
|
|
13
|
+
<svg
|
|
14
|
+
width={size}
|
|
15
|
+
height={size}
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
fill="none"
|
|
18
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
+
className={className}
|
|
20
|
+
>
|
|
21
|
+
<defs>
|
|
22
|
+
<linearGradient id="strategist-grad" x1="0%" y1="100%" x2="100%" y2="0%">
|
|
23
|
+
<stop offset="0%" stopColor="#3B82F6" />
|
|
24
|
+
<stop offset="100%" stopColor="#60A5FA" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
{/* Rising bars */}
|
|
28
|
+
<rect x="3" y="14" width="4" height="7" rx="1" fill="url(#strategist-grad)" />
|
|
29
|
+
<rect x="10" y="10" width="4" height="11" rx="1" fill="url(#strategist-grad)" />
|
|
30
|
+
<rect x="17" y="5" width="4" height="16" rx="1" fill="url(#strategist-grad)" />
|
|
31
|
+
{/* Trend line */}
|
|
32
|
+
<path
|
|
33
|
+
d="M4 12L11 7L19 3"
|
|
34
|
+
stroke="url(#strategist-grad)"
|
|
35
|
+
strokeWidth="2"
|
|
36
|
+
strokeLinecap="round"
|
|
37
|
+
strokeLinejoin="round"
|
|
38
|
+
/>
|
|
39
|
+
{/* Arrow head */}
|
|
40
|
+
<path
|
|
41
|
+
d="M16 3H19V6"
|
|
42
|
+
stroke="url(#strategist-grad)"
|
|
43
|
+
strokeWidth="2"
|
|
44
|
+
strokeLinecap="round"
|
|
45
|
+
strokeLinejoin="round"
|
|
46
|
+
/>
|
|
47
|
+
</svg>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Architect - Blueprint/Building blocks icon
|
|
52
|
+
export function ArchitectIcon({ className, size = 24 }: AgentIconProps) {
|
|
53
|
+
return (
|
|
54
|
+
<svg
|
|
55
|
+
width={size}
|
|
56
|
+
height={size}
|
|
57
|
+
viewBox="0 0 24 24"
|
|
58
|
+
fill="none"
|
|
59
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
60
|
+
className={className}
|
|
61
|
+
>
|
|
62
|
+
<defs>
|
|
63
|
+
<linearGradient id="architect-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
64
|
+
<stop offset="0%" stopColor="#8B5CF6" />
|
|
65
|
+
<stop offset="100%" stopColor="#A78BFA" />
|
|
66
|
+
</linearGradient>
|
|
67
|
+
</defs>
|
|
68
|
+
{/* Main structure */}
|
|
69
|
+
<path
|
|
70
|
+
d="M12 2L3 7V17L12 22L21 17V7L12 2Z"
|
|
71
|
+
stroke="url(#architect-grad)"
|
|
72
|
+
strokeWidth="2"
|
|
73
|
+
strokeLinecap="round"
|
|
74
|
+
strokeLinejoin="round"
|
|
75
|
+
fill="none"
|
|
76
|
+
/>
|
|
77
|
+
{/* Inner lines */}
|
|
78
|
+
<path
|
|
79
|
+
d="M12 22V12"
|
|
80
|
+
stroke="url(#architect-grad)"
|
|
81
|
+
strokeWidth="2"
|
|
82
|
+
strokeLinecap="round"
|
|
83
|
+
/>
|
|
84
|
+
<path
|
|
85
|
+
d="M21 7L12 12L3 7"
|
|
86
|
+
stroke="url(#architect-grad)"
|
|
87
|
+
strokeWidth="2"
|
|
88
|
+
strokeLinecap="round"
|
|
89
|
+
/>
|
|
90
|
+
{/* Center dot */}
|
|
91
|
+
<circle cx="12" cy="12" r="2" fill="url(#architect-grad)" />
|
|
92
|
+
</svg>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// System Designer - Gear/Infrastructure icon
|
|
97
|
+
export function SystemDesignerIcon({ className, size = 24 }: AgentIconProps) {
|
|
98
|
+
return (
|
|
99
|
+
<svg
|
|
100
|
+
width={size}
|
|
101
|
+
height={size}
|
|
102
|
+
viewBox="0 0 24 24"
|
|
103
|
+
fill="none"
|
|
104
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
105
|
+
className={className}
|
|
106
|
+
>
|
|
107
|
+
<defs>
|
|
108
|
+
<linearGradient id="sysdesigner-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
109
|
+
<stop offset="0%" stopColor="#06B6D4" />
|
|
110
|
+
<stop offset="100%" stopColor="#22D3EE" />
|
|
111
|
+
</linearGradient>
|
|
112
|
+
</defs>
|
|
113
|
+
{/* Gear outer */}
|
|
114
|
+
<path
|
|
115
|
+
d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
|
|
116
|
+
stroke="url(#sysdesigner-grad)"
|
|
117
|
+
strokeWidth="2"
|
|
118
|
+
strokeLinecap="round"
|
|
119
|
+
strokeLinejoin="round"
|
|
120
|
+
fill="none"
|
|
121
|
+
/>
|
|
122
|
+
<path
|
|
123
|
+
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z"
|
|
124
|
+
stroke="url(#sysdesigner-grad)"
|
|
125
|
+
strokeWidth="2"
|
|
126
|
+
strokeLinecap="round"
|
|
127
|
+
strokeLinejoin="round"
|
|
128
|
+
fill="none"
|
|
129
|
+
/>
|
|
130
|
+
</svg>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Builder - Hammer/Construction icon
|
|
135
|
+
export function BuilderIcon({ className, size = 24 }: AgentIconProps) {
|
|
136
|
+
return (
|
|
137
|
+
<svg
|
|
138
|
+
width={size}
|
|
139
|
+
height={size}
|
|
140
|
+
viewBox="0 0 24 24"
|
|
141
|
+
fill="none"
|
|
142
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
143
|
+
className={className}
|
|
144
|
+
>
|
|
145
|
+
<defs>
|
|
146
|
+
<linearGradient id="builder-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
147
|
+
<stop offset="0%" stopColor="#F59E0B" />
|
|
148
|
+
<stop offset="100%" stopColor="#FBBF24" />
|
|
149
|
+
</linearGradient>
|
|
150
|
+
</defs>
|
|
151
|
+
{/* Hammer head */}
|
|
152
|
+
<path
|
|
153
|
+
d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"
|
|
154
|
+
stroke="url(#builder-grad)"
|
|
155
|
+
strokeWidth="2"
|
|
156
|
+
strokeLinecap="round"
|
|
157
|
+
strokeLinejoin="round"
|
|
158
|
+
fill="none"
|
|
159
|
+
/>
|
|
160
|
+
{/* Accent */}
|
|
161
|
+
<circle cx="10" cy="10" r="1.5" fill="url(#builder-grad)" />
|
|
162
|
+
</svg>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Guardian - Shield with checkmark icon
|
|
167
|
+
export function GuardianIcon({ className, size = 24 }: AgentIconProps) {
|
|
168
|
+
return (
|
|
169
|
+
<svg
|
|
170
|
+
width={size}
|
|
171
|
+
height={size}
|
|
172
|
+
viewBox="0 0 24 24"
|
|
173
|
+
fill="none"
|
|
174
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
175
|
+
className={className}
|
|
176
|
+
>
|
|
177
|
+
<defs>
|
|
178
|
+
<linearGradient id="guardian-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
179
|
+
<stop offset="0%" stopColor="#10B981" />
|
|
180
|
+
<stop offset="100%" stopColor="#34D399" />
|
|
181
|
+
</linearGradient>
|
|
182
|
+
</defs>
|
|
183
|
+
{/* Shield outline */}
|
|
184
|
+
<path
|
|
185
|
+
d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"
|
|
186
|
+
stroke="url(#guardian-grad)"
|
|
187
|
+
strokeWidth="2"
|
|
188
|
+
strokeLinecap="round"
|
|
189
|
+
strokeLinejoin="round"
|
|
190
|
+
fill="none"
|
|
191
|
+
/>
|
|
192
|
+
{/* Checkmark */}
|
|
193
|
+
<path
|
|
194
|
+
d="M9 12l2 2 4-4"
|
|
195
|
+
stroke="url(#guardian-grad)"
|
|
196
|
+
strokeWidth="2.5"
|
|
197
|
+
strokeLinecap="round"
|
|
198
|
+
strokeLinejoin="round"
|
|
199
|
+
/>
|
|
200
|
+
</svg>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Chronicler - Book/Document with pen icon
|
|
205
|
+
export function ChroniclerIcon({ className, size = 24 }: AgentIconProps) {
|
|
206
|
+
return (
|
|
207
|
+
<svg
|
|
208
|
+
width={size}
|
|
209
|
+
height={size}
|
|
210
|
+
viewBox="0 0 24 24"
|
|
211
|
+
fill="none"
|
|
212
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
213
|
+
className={className}
|
|
214
|
+
>
|
|
215
|
+
<defs>
|
|
216
|
+
<linearGradient id="chronicler-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
217
|
+
<stop offset="0%" stopColor="#EC4899" />
|
|
218
|
+
<stop offset="100%" stopColor="#F472B6" />
|
|
219
|
+
</linearGradient>
|
|
220
|
+
</defs>
|
|
221
|
+
{/* Book */}
|
|
222
|
+
<path
|
|
223
|
+
d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"
|
|
224
|
+
stroke="url(#chronicler-grad)"
|
|
225
|
+
strokeWidth="2"
|
|
226
|
+
strokeLinecap="round"
|
|
227
|
+
strokeLinejoin="round"
|
|
228
|
+
/>
|
|
229
|
+
<path
|
|
230
|
+
d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"
|
|
231
|
+
stroke="url(#chronicler-grad)"
|
|
232
|
+
strokeWidth="2"
|
|
233
|
+
strokeLinecap="round"
|
|
234
|
+
strokeLinejoin="round"
|
|
235
|
+
fill="none"
|
|
236
|
+
/>
|
|
237
|
+
{/* Lines on page */}
|
|
238
|
+
<path
|
|
239
|
+
d="M8 7h8M8 11h6M8 15h4"
|
|
240
|
+
stroke="url(#chronicler-grad)"
|
|
241
|
+
strokeWidth="1.5"
|
|
242
|
+
strokeLinecap="round"
|
|
243
|
+
/>
|
|
244
|
+
</svg>
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Map agent ID to icon component
|
|
249
|
+
export const AgentIconMap: Record<string, React.FC<AgentIconProps>> = {
|
|
250
|
+
strategist: StrategistIcon,
|
|
251
|
+
architect: ArchitectIcon,
|
|
252
|
+
'system-designer': SystemDesignerIcon,
|
|
253
|
+
builder: BuilderIcon,
|
|
254
|
+
guardian: GuardianIcon,
|
|
255
|
+
chronicler: ChroniclerIcon,
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
// Generic AgentIcon component
|
|
259
|
+
export function AgentIcon({
|
|
260
|
+
agentId,
|
|
261
|
+
className,
|
|
262
|
+
size = 24,
|
|
263
|
+
}: AgentIconProps & { agentId: string }) {
|
|
264
|
+
const IconComponent = AgentIconMap[agentId];
|
|
265
|
+
|
|
266
|
+
if (!IconComponent) {
|
|
267
|
+
return (
|
|
268
|
+
<div
|
|
269
|
+
className={cn(
|
|
270
|
+
'flex items-center justify-center rounded-lg bg-gray-500/20 text-gray-400',
|
|
271
|
+
className
|
|
272
|
+
)}
|
|
273
|
+
style={{ width: size, height: size }}
|
|
274
|
+
>
|
|
275
|
+
?
|
|
276
|
+
</div>
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return <IconComponent className={className} size={size} />;
|
|
281
|
+
}
|