src / index.ts
import { PluginContext } from "@lmstudio/sdk";
import { configSchematics } from "./config";
import { predictionLoopHandler } from "./handler";
import { nameChatIfNeeded } from "./naming";
export async function main(context: PluginContext) {
context.withConfigSchematics(configSchematics);
// Chat titles: LM Studio leaves naming to the loop handler (see naming.ts).
context.withPredictionLoopHandler(async (ctl) => {
await predictionLoopHandler(ctl);
await nameChatIfNeeded(ctl);
});
}
src / index.ts
import { PluginContext } from "@lmstudio/sdk";
import { configSchematics } from "./config";
import { predictionLoopHandler } from "./handler";
import { nameChatIfNeeded } from "./naming";
export async function main(context: PluginContext) {
context.withConfigSchematics(configSchematics);
// Chat titles: LM Studio leaves naming to the loop handler (see naming.ts).
context.withPredictionLoopHandler(async (ctl) => {
await predictionLoopHandler(ctl);
await nameChatIfNeeded(ctl);
});
}