feat(studio/articles): Dimzou draft preview

Adds a 预览 action (enabled once an article has a Dimzou document) opening a
sheet that fetches and renders the draft — cover, title, summary, and body HTML
(typography/prose). Re-enables the @tailwindcss/typography plugin for prose.
This commit is contained in:
2026-07-08 22:23:49 +08:00
parent a84e5dcb54
commit 3f3a8347eb
4 changed files with 126 additions and 3 deletions
+14
View File
@@ -36,6 +36,20 @@ export const fetchStylePresets = (params: ListParams) =>
export const updateRobotAuthor = (id: string, payload: Partial<StudioRobotAuthor>) =>
api.put<ApiResponse<StudioRobotAuthor>>(`${BASE}/robot-authors/${id}`, payload)
export interface ArticlePreview {
kind: 'studio_article_preview'
article_id: string
version_status: 'draft' | 'published' | null
title: string | null
summary: string | null
cover_image: { url: string; alt?: string | null } | null
body_html: string
has_content: boolean
}
export const fetchArticlePreview = (id: string) =>
api.get<ApiResponse<ArticlePreview>>(`${BASE}/articles/${id}/preview`)
// ---- agent tokens (show-once) ----
export const fetchAgentTokens = () =>