该接口必须调用,否则插件无法运行。建议在插件启动时尽早调用一次(多次调用会被忽略)。
最好在AppRegistry.registerComponent之后立即调用
PluginManager
init
初始化插件环境。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
初始化插件环境。
async init(): Promise<void>;
import { PluginManager } from 'sn-plugin-lib';
/**
* 初始化插件环境的示例。
*/
export async function exampleInit() {
await PluginManager.init();
}