refactor: migrate FlowPilot components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,14 +65,14 @@ export function InSessionScriptGenerator({
|
||||
return (
|
||||
<div className="mt-3 rounded-xl border border-primary/20 bg-primary/5 p-3 sm:p-4 space-y-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<Terminal size={14} className="text-primary" />
|
||||
<span className="font-label text-[0.625rem] uppercase tracking-wider text-primary">
|
||||
<Terminal size={14} className="text-[#22d3ee]" />
|
||||
<span className="font-sans text-xs text-[0.625rem] uppercase tracking-wider text-[#22d3ee]">
|
||||
Script Generator
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{instructions && (
|
||||
<p className="text-xs text-muted-foreground">{instructions}</p>
|
||||
<p className="text-xs text-[#848b9b]">{instructions}</p>
|
||||
)}
|
||||
|
||||
{/* Parameter editing */}
|
||||
@@ -80,7 +80,7 @@ export function InSessionScriptGenerator({
|
||||
<>
|
||||
<button
|
||||
onClick={() => setShowParams(!showParams)}
|
||||
className="flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="flex items-center gap-1.5 text-xs text-[#848b9b] hover:text-[#e2e5eb] transition-colors"
|
||||
>
|
||||
{showParams ? <ChevronDown size={12} /> : <ChevronRight size={12} />}
|
||||
Parameters ({Object.keys(params).length})
|
||||
@@ -90,13 +90,13 @@ export function InSessionScriptGenerator({
|
||||
<div className="space-y-2">
|
||||
{Object.entries(params).map(([key, value]) => (
|
||||
<div key={key}>
|
||||
<label className="block text-xs font-medium text-muted-foreground mb-1">
|
||||
<label className="block text-xs font-medium text-[#848b9b] mb-1">
|
||||
{key.replace(/_/g, ' ')}
|
||||
</label>
|
||||
<input
|
||||
value={value}
|
||||
onChange={(e) => setParams(prev => ({ ...prev, [key]: e.target.value }))}
|
||||
className="w-full rounded-lg border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-none"
|
||||
className="w-full rounded-lg border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
@@ -106,7 +106,7 @@ export function InSessionScriptGenerator({
|
||||
<button
|
||||
onClick={handleGenerate}
|
||||
disabled={isGenerating}
|
||||
className="w-full min-h-[44px] flex items-center justify-center gap-2 rounded-lg bg-gradient-brand px-4 py-2 text-sm font-semibold text-[#101114] shadow-lg shadow-primary/20 hover:opacity-90 active:scale-[0.97] disabled:opacity-40 transition-all"
|
||||
className="w-full min-h-[44px] flex items-center justify-center gap-2 rounded-lg bg-[#22d3ee] text-white px-4 py-2 text-sm font-semibold hover:brightness-110 active:scale-[0.98] disabled:opacity-40 transition-all"
|
||||
>
|
||||
{isGenerating ? (
|
||||
<Loader2 size={14} className="animate-spin" />
|
||||
@@ -121,12 +121,12 @@ export function InSessionScriptGenerator({
|
||||
{/* Generated script display */}
|
||||
{generatedScript && (
|
||||
<>
|
||||
<div className="relative rounded-lg bg-card/80 border border-border overflow-hidden">
|
||||
<div className="flex items-center justify-between px-3 py-1.5 border-b border-border/50">
|
||||
<span className="text-xs text-muted-foreground font-mono">PowerShell</span>
|
||||
<div className="relative rounded-lg bg-[#14161d]/80 border border-[#1e2130] overflow-hidden">
|
||||
<div className="flex items-center justify-between px-3 py-1.5 border-b border-[#1e2130]/50">
|
||||
<span className="text-xs text-[#848b9b] font-mono">PowerShell</span>
|
||||
<button
|
||||
onClick={handleCopy}
|
||||
className="flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
||||
className="flex items-center gap-1 text-xs text-[#848b9b] hover:text-[#e2e5eb] transition-colors"
|
||||
>
|
||||
{copied ? <Check size={12} className="text-emerald-400" /> : <Copy size={12} />}
|
||||
{copied ? 'Copied' : 'Copy'}
|
||||
@@ -141,13 +141,13 @@ export function InSessionScriptGenerator({
|
||||
<div className="flex flex-col gap-2 pt-1 sm:flex-row">
|
||||
<button
|
||||
onClick={() => handleContinue(true)}
|
||||
className="flex-1 min-h-[44px] rounded-lg bg-primary/10 border border-primary/20 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/20 transition-colors"
|
||||
className="flex-1 min-h-[44px] rounded-lg bg-[rgba(34,211,238,0.10)] border border-primary/20 px-4 py-2 text-sm font-medium text-[#22d3ee] hover:bg-primary/20 transition-colors"
|
||||
>
|
||||
Script worked — continue
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleContinue(false)}
|
||||
className="flex-1 min-h-[44px] rounded-lg bg-card/50 border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-card transition-colors"
|
||||
className="flex-1 min-h-[44px] rounded-lg bg-[#14161d]/50 border border-[#1e2130] px-4 py-2 text-sm font-medium text-[#e2e5eb] hover:bg-[#14161d] transition-colors"
|
||||
>
|
||||
Didn't resolve it
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user