fix(ui): inject Spec Kit architectural templates directly into Architect mode prompt
This commit is contained in:
@@ -135,25 +135,7 @@ function ObjectiveView({ plan, projectId, onChange }: { plan: Plan, projectId: s
|
||||
<div>
|
||||
|
||||
</div>
|
||||
{!editing && (
|
||||
<button onClick={() => setEditing(true)} className="btn-ghost">
|
||||
<Pencil size={12} /> Edit
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{editing ? (
|
||||
<div style={{ border: `1px solid ${INK.border}`, borderRadius: 8, overflow: "hidden" }}>
|
||||
<textarea
|
||||
value={draft}
|
||||
onChange={(e) => setDraft(e.target.value)}
|
||||
style={{
|
||||
width: "100%", minHeight: 400, padding: 20, fontSize: "0.95rem", lineHeight: 1.6,
|
||||
border: "none", outline: "none", resize: "vertical", fontFamily: "var(--font-sans)",
|
||||
}}
|
||||
placeholder="Describe the business objective..."
|
||||
/>
|
||||
<div style={{ display: "flex", justifyContent: "space-between", padding: "12px 20px", background: INK.bgHover, borderTop: `1px solid ${INK.border}` }}>
|
||||
<div style={{ display: "flex", gap: 12 }}>
|
||||
<button
|
||||
onClick={async () => {
|
||||
if (!confirm("This will overwrite the PRD and Execution Plan based on the current objective. Continue?")) return;
|
||||
@@ -171,20 +153,38 @@ function ObjectiveView({ plan, projectId, onChange }: { plan: Plan, projectId: s
|
||||
setEditing(false);
|
||||
}
|
||||
}}
|
||||
disabled={saving}
|
||||
className="btn-secondary"
|
||||
style={{ background: "#fff", borderColor: INK.border }}
|
||||
disabled={saving || !draft.trim()}
|
||||
className="btn-primary"
|
||||
style={{ fontWeight: 600, fontSize: "0.85rem", padding: "6px 16px", borderRadius: 6 }}
|
||||
>
|
||||
{saving ? "Generating PRD..." : "Generate Complete PRD"}
|
||||
{saving ? <><Loader2 size={12} className="animate-spin" /> Generating...</> : "Generate Complete PRD"}
|
||||
</button>
|
||||
<div style={{ display: "flex", gap: 8 }}>
|
||||
{!editing && (
|
||||
<button onClick={() => setEditing(true)} className="btn-ghost">
|
||||
<Pencil size={12} /> Edit
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{editing ? (
|
||||
<div style={{ border: `1px solid ${INK.border}`, borderRadius: 8, overflow: "hidden" }}>
|
||||
<textarea
|
||||
value={draft}
|
||||
onChange={(e) => setDraft(e.target.value)}
|
||||
style={{
|
||||
width: "100%", minHeight: 400, padding: 20, fontSize: "0.95rem", lineHeight: 1.6,
|
||||
border: "none", outline: "none", resize: "vertical", fontFamily: "var(--font-sans)",
|
||||
}}
|
||||
placeholder="Describe the business objective..."
|
||||
/>
|
||||
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8, padding: "12px 20px", background: INK.bgHover, borderTop: `1px solid ${INK.border}` }}>
|
||||
<button onClick={() => setEditing(false)} className="btn-ghost">Cancel</button>
|
||||
<button onClick={save} disabled={saving} className="btn-primary">
|
||||
{saving ? "Saving..." : "Save Objective"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="markdown-prose" style={{ background: "#fff", border: `1px solid ${INK.border}`, padding: 32, borderRadius: 8, minHeight: 200 }}>
|
||||
{plan.vision ? (
|
||||
|
||||
Reference in New Issue
Block a user