Diff-based file editing and file discovery tools
Project Files
src / promptPreprocessor.ts
import { type ChatMessage, type PromptPreprocessorController } from "@lmstudio/sdk";
export async function preprocess(ctl: PromptPreprocessorController, userMessage: ChatMessage) {
const textContent = userMessage.getText();
// Here is where you can modify the user message.
// Learn more about prompt-preprocessors: https://lmstudio.ai/docs/typescript/plugins/prompt-preprocessor
return textContent;
}
src / promptPreprocessor.ts
import { type ChatMessage, type PromptPreprocessorController } from "@lmstudio/sdk";
export async function preprocess(ctl: PromptPreprocessorController, userMessage: ChatMessage) {
const textContent = userMessage.getText();
// Here is where you can modify the user message.
// Learn more about prompt-preprocessors: https://lmstudio.ai/docs/typescript/plugins/prompt-preprocessor
return textContent;
}