Markdown Edit/Preview tabs + read-only .md viewer for skills & profiles
Adds MarkdownEditor (react-markdown + remark-gfm, no raw HTML — authored/retrieved content is data, not markup) with Edit | Preview tabs, wired into the AGENTS.md and SKILL.md editors, the agent persona, and the review artifact. Adds a read-only "View" on every skill and agent-profile card — including builtins, which previously had no way to be inspected at all — rendering the full SKILL.md / AGENTS.md (frontmatter + body + actions/golden tests). Collapses a same-version builtin that an org has forked so its own copy shadows it, keeping the version picker unambiguous and the item clearly editable/versionable. Also lands the agent-face wiring on the seat configurator (a live xl preview with a state cycler) and the review inbox header. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { Textarea } from '@/components/ui/textarea'
|
||||
import { AgentFace } from '@/components/AgentFace'
|
||||
import { MarkdownEditor } from '@/components/MarkdownEditor'
|
||||
import { api } from '@/lib/api'
|
||||
import { diffWords } from '@/lib/diff'
|
||||
import { useAuth } from '@/store/auth'
|
||||
@@ -126,10 +128,8 @@ function ReviewCard({ item, onDecided }: { item: ReviewItem; onDecided: (id: str
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="grid size-8 shrink-0 place-items-center rounded-md bg-seat-ai font-semibold text-white">
|
||||
AI
|
||||
</span>
|
||||
<div className="flex items-center gap-3">
|
||||
<AgentFace size="md" monogram={item.agentId} state="review" className="shrink-0" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<CardTitle className="truncate text-base">{item.title}</CardTitle>
|
||||
<div className="mt-1 flex items-center gap-2">
|
||||
@@ -148,12 +148,12 @@ function ReviewCard({ item, onDecided }: { item: ReviewItem; onDecided: (id: str
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
<div className="flex flex-col gap-2">
|
||||
<Label htmlFor={`content-${item.id}`}>Proposed artifact</Label>
|
||||
<Textarea
|
||||
<MarkdownEditor
|
||||
id={`content-${item.id}`}
|
||||
value={content}
|
||||
onChange={(e) => setContent(e.target.value)}
|
||||
onChange={setContent}
|
||||
rows={6}
|
||||
className="font-mono text-xs"
|
||||
mono
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user