Skip to content

Commit

Permalink
✨ feat: update manifest schema
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Sep 3, 2023
1 parent 0ba728d commit 8f6a078
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/schema/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export const pluginManifestSchema = z.object({
settings: JSONSchema.optional(),
ui: z
.object({
url: z.string().optional(),
height: z.number().optional(),
mode: z.enum(['iframe', 'modules']).optional(),
url: z.string(),
width: z.number().optional(),
})
.optional(),
});
5 changes: 4 additions & 1 deletion src/types/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ export interface LobeChatPluginManifest {
* @descCN 插件在用户侧的展示内容
*/
ui?: {
height?: number;
mode?: 'iframe' | 'modules';
/**
* component url
* @desc The type of rendering for the plugin
* @nameCN 动态组件
* @descCN 插件的渲染类型
*/
url?: string;
url: string;
width?: number;
};
}

0 comments on commit 8f6a078

Please sign in to comment.