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:
@@ -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 = () =>
|
||||
|
||||
Reference in New Issue
Block a user