mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-24 13:26:08 +00:00
feat(ui): list plugins
This commit is contained in:
@@ -2,6 +2,7 @@ import { IDynamicFormItemSchema } from '@/app/infra/entities/form/dynamic';
|
||||
import { PipelineConfigTab } from '@/app/infra/entities/pipeline';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
import { Message } from '@/app/infra/entities/message';
|
||||
import { Plugin } from '@/app/infra/entities/plugin';
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
code: number;
|
||||
@@ -119,22 +120,22 @@ export interface ApiRespPlugin {
|
||||
plugin: Plugin;
|
||||
}
|
||||
|
||||
export interface Plugin {
|
||||
author: string;
|
||||
name: string;
|
||||
description: I18nLabel;
|
||||
label: I18nLabel;
|
||||
version: string;
|
||||
enabled: boolean;
|
||||
priority: number;
|
||||
status: string;
|
||||
tools: object[];
|
||||
event_handlers: object;
|
||||
main_file: string;
|
||||
pkg_path: string;
|
||||
repository: string;
|
||||
config_schema: IDynamicFormItemSchema[];
|
||||
}
|
||||
// export interface Plugin {
|
||||
// author: string;
|
||||
// name: string;
|
||||
// description: I18nLabel;
|
||||
// label: I18nLabel;
|
||||
// version: string;
|
||||
// enabled: boolean;
|
||||
// priority: number;
|
||||
// status: string;
|
||||
// tools: object[];
|
||||
// event_handlers: object;
|
||||
// main_file: string;
|
||||
// pkg_path: string;
|
||||
// repository: string;
|
||||
// config_schema: IDynamicFormItemSchema[];
|
||||
// }
|
||||
|
||||
export interface ApiRespPluginConfig {
|
||||
config: object;
|
||||
|
||||
@@ -3,3 +3,18 @@ export interface I18nLabel {
|
||||
zh_Hans: string;
|
||||
ja_JP?: string;
|
||||
}
|
||||
|
||||
export interface ComponentManifest {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
metadata: {
|
||||
name: string;
|
||||
label: I18nLabel;
|
||||
description?: I18nLabel;
|
||||
icon?: string;
|
||||
repository?: string;
|
||||
version?: string;
|
||||
author?: string;
|
||||
};
|
||||
spec: object;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { ComponentManifest } from '@/app/infra/entities/common';
|
||||
|
||||
export interface Plugin {
|
||||
status: 'intialized' | 'mounted' | 'unmounted';
|
||||
priority: number;
|
||||
plugin_config: object;
|
||||
manifest: {
|
||||
manifest: ComponentManifest;
|
||||
};
|
||||
enabled: boolean;
|
||||
components: {
|
||||
component_config: object;
|
||||
manifest: {
|
||||
manifest: ComponentManifest;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user