src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { configSchematics } from "./config";
import { buildToChatTool, buildFromChatTool } from "./toolsProvider";
export function main(context: PluginContext) {
context.withConfigSchematics(configSchematics);
// Registering tools via ctl
context.withToolsProvider(async (ctl: any) => {
const PostToChatTool = buildToChatTool(ctl);
const PostFromChatTool = buildFromChatTool(ctl);
return [PostToChatTool, PostFromChatTool].filter(Boolean);
});
}
// 2. double as default - just in case
export default main;