feat(studio/articles): show drafting_model (LLM used for draft)
Adds drafting_model to the article type and surfaces it in the detail sheet (provider / model line + raw JSON block). Regenerates admin API types.
This commit is contained in:
+73
-14
@@ -253,7 +253,7 @@ export interface paths {
|
|||||||
content: {
|
content: {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
/**
|
/**
|
||||||
* @example open
|
* @example dismissed
|
||||||
* @enum {string|null}
|
* @enum {string|null}
|
||||||
*/
|
*/
|
||||||
status?: "open" | "resolved" | "dismissed" | null;
|
status?: "open" | "resolved" | "dismissed" | null;
|
||||||
@@ -690,7 +690,7 @@ export interface paths {
|
|||||||
content: {
|
content: {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
/**
|
/**
|
||||||
* @example desktop
|
* @example ios
|
||||||
* @enum {string|null}
|
* @enum {string|null}
|
||||||
*/
|
*/
|
||||||
platform?: "ios" | "android" | "web" | "desktop" | null;
|
platform?: "ios" | "android" | "web" | "desktop" | null;
|
||||||
@@ -941,6 +941,33 @@ export interface paths {
|
|||||||
patch?: never;
|
patch?: never;
|
||||||
trace?: never;
|
trace?: never;
|
||||||
};
|
};
|
||||||
|
"/api/admin/v1/studio/articles/{article}/preview": {
|
||||||
|
parameters: {
|
||||||
|
query?: never;
|
||||||
|
header?: never;
|
||||||
|
path: {
|
||||||
|
/**
|
||||||
|
* @description The article.
|
||||||
|
* @example architecto
|
||||||
|
*/
|
||||||
|
article: string;
|
||||||
|
};
|
||||||
|
cookie?: never;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* [文章] Dimzou 草稿预览
|
||||||
|
* @description 渲染文章当前 Dimzou 草稿(无草稿时回退到最新已发布版本)的正文为 HTML,
|
||||||
|
* 连同标题/摘要/封面返回,供后台预览。管理员权限,绕过 Dimzou 逐用户读权限。
|
||||||
|
*/
|
||||||
|
get: operations["Dimzou"];
|
||||||
|
put?: never;
|
||||||
|
post?: never;
|
||||||
|
delete?: never;
|
||||||
|
options?: never;
|
||||||
|
head?: never;
|
||||||
|
patch?: never;
|
||||||
|
trace?: never;
|
||||||
|
};
|
||||||
"/api/admin/v1/studio/articles": {
|
"/api/admin/v1/studio/articles": {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: never;
|
query?: never;
|
||||||
@@ -1449,7 +1476,7 @@ export interface paths {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -1472,7 +1499,7 @@ export interface paths {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -1495,7 +1522,7 @@ export interface paths {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -1572,7 +1599,7 @@ export interface paths {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
@@ -1603,7 +1630,7 @@ export interface paths {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
@@ -2927,6 +2954,38 @@ export interface operations {
|
|||||||
requestBody?: never;
|
requestBody?: never;
|
||||||
responses: never;
|
responses: never;
|
||||||
};
|
};
|
||||||
|
Dimzou: {
|
||||||
|
parameters: {
|
||||||
|
query?: never;
|
||||||
|
header?: never;
|
||||||
|
path: {
|
||||||
|
/**
|
||||||
|
* @description The article.
|
||||||
|
* @example architecto
|
||||||
|
*/
|
||||||
|
article: string;
|
||||||
|
};
|
||||||
|
cookie?: never;
|
||||||
|
};
|
||||||
|
requestBody?: never;
|
||||||
|
responses: {
|
||||||
|
401: {
|
||||||
|
headers: {
|
||||||
|
[name: string]: unknown;
|
||||||
|
};
|
||||||
|
content: {
|
||||||
|
"application/json": {
|
||||||
|
/** @example false */
|
||||||
|
success?: boolean;
|
||||||
|
/** @example Authentication required */
|
||||||
|
message?: string;
|
||||||
|
/** @example UNAUTHENTICATED */
|
||||||
|
code?: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
getApiAdminV1StudioArticles: {
|
getApiAdminV1StudioArticles: {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: never;
|
query?: never;
|
||||||
@@ -3390,7 +3449,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -3406,7 +3465,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -3422,7 +3481,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
};
|
};
|
||||||
@@ -3740,7 +3799,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
@@ -3803,7 +3862,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
@@ -3872,7 +3931,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
@@ -3968,7 +4027,7 @@ export interface operations {
|
|||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* @description The ID of the category.
|
* @description The ID of the category.
|
||||||
* @example 2912b591-09f0-4c14-9190-866abd51cbee
|
* @example 5a37db21-5a9a-4438-8b4a-f0c80fc4f29e
|
||||||
*/
|
*/
|
||||||
category_id: string;
|
category_id: string;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -132,6 +132,8 @@ export interface StudioArticle {
|
|||||||
inline_images: Array<{ url: string; alt?: string | null }> | null
|
inline_images: Array<{ url: string; alt?: string | null }> | null
|
||||||
inline_image_prompts: unknown[] | null
|
inline_image_prompts: unknown[] | null
|
||||||
status: ArticleStatus
|
status: ArticleStatus
|
||||||
|
/** LLM used to draft the body, e.g. { provider, model, params }. */
|
||||||
|
drafting_model: { provider?: string; model?: string; [k: string]: unknown } | null
|
||||||
publish_schedule: Record<string, unknown> | null
|
publish_schedule: Record<string, unknown> | null
|
||||||
dimzou_document_id: number | null
|
dimzou_document_id: number | null
|
||||||
dimzou_publication_id: number | null
|
dimzou_publication_id: number | null
|
||||||
|
|||||||
@@ -127,6 +127,14 @@ function ArticlesPage() {
|
|||||||
{ label: '标签', value: detail?.tags?.join('、') },
|
{ label: '标签', value: detail?.tags?.join('、') },
|
||||||
{ label: 'SEO 关键词', value: detail?.seo_keywords?.join('、') },
|
{ label: 'SEO 关键词', value: detail?.seo_keywords?.join('、') },
|
||||||
{ label: 'CTA', value: detail?.cta },
|
{ label: 'CTA', value: detail?.cta },
|
||||||
|
{
|
||||||
|
label: '起草模型',
|
||||||
|
value: detail?.drafting_model
|
||||||
|
? [detail.drafting_model.provider, detail.drafting_model.model]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(' / ') || '—'
|
||||||
|
: '—',
|
||||||
|
},
|
||||||
{ label: '封面提示词', value: detail?.cover_image_prompt },
|
{ label: '封面提示词', value: detail?.cover_image_prompt },
|
||||||
{
|
{
|
||||||
label: 'Dimzou 文档',
|
label: 'Dimzou 文档',
|
||||||
@@ -140,6 +148,7 @@ function ArticlesPage() {
|
|||||||
jsonBlocks={[
|
jsonBlocks={[
|
||||||
{ label: '要点 key_takeaways', value: detail?.key_takeaways },
|
{ label: '要点 key_takeaways', value: detail?.key_takeaways },
|
||||||
{ label: '大纲 outline', value: detail?.outline },
|
{ label: '大纲 outline', value: detail?.outline },
|
||||||
|
{ label: '起草模型 drafting_model', value: detail?.drafting_model },
|
||||||
{ label: '计划 plan', value: detail?.plan },
|
{ label: '计划 plan', value: detail?.plan },
|
||||||
{ label: '发布排期', value: detail?.publish_schedule },
|
{ label: '发布排期', value: detail?.publish_schedule },
|
||||||
]}
|
]}
|
||||||
|
|||||||
Reference in New Issue
Block a user