Forked from promptpirate/chat-auto-exporter
src / index.ts
import { type PluginContext } from "@lmstudio/sdk";
import { globalConfigSchematics } from "./config";
import { preprocess } from "./promptPreprocessor";
/**
* Entry point β LM Studio calls this when the plugin loads.
* All we do here is register our pieces:
* 1. The settings UI (global config)
* 2. The prompt preprocessor (the message-counting + export logic)
*/
export async function main(context: PluginContext) {
// Show the "Export Folder" and "Message Threshold" settings in the plugin panel
context.withGlobalConfigSchematics(globalConfigSchematics);
// Run our preprocessor every time the user hits Send
context.withPromptPreprocessor(preprocess);
console.log("[chat-auto-exporter] Plugin loaded! π");
}