mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
docs: document plugin cli helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Commander registration for plugin list/search/inspect/install/update/authoring commands.
|
||||
import type { Command } from "commander";
|
||||
import { formatDocsLink } from "../../packages/terminal-core/src/links.js";
|
||||
import { theme } from "../../packages/terminal-core/src/theme.js";
|
||||
@@ -52,6 +53,7 @@ export type PluginAuthoringInitOptions = {
|
||||
};
|
||||
|
||||
function createModuleLoader<T>(load: () => Promise<T>): () => Promise<T> {
|
||||
// Plugin runtime modules are heavy; load each command surface once on first use.
|
||||
let promise: Promise<T> | undefined;
|
||||
return () => (promise ??= load());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user