LM StudioLM Studio

Custom Status Report

Ask Bionic to read this page

Copy this prompt, open Bionic, and paste it into a new chat.

Read https://lmstudio.ai/docs/typescript/plugins/prompt-preprocessor/custom-status-report, I want to ask questions about it.

Depending on the task, the prompt preprocessor may take some time to complete, for example, it may need to fetch some data from the internet or perform some heavy computation. In such cases, you can report the status of the preprocessing using ctl.setStatus.

src/promptPreprocessor.ts
const status = ctl.createStatus({
  status: "loading",
  text: "Preprocessing.",
});

You can update the status at any time by calling status.setState.

src/promptPreprocessor.ts
status.setState({
  status: "done",
  text: "Preprocessing done.",
})

You can even add sub status to the status:

src/promptPreprocessor.ts
const subStatus = status.addSubStatus({
  status: "loading",
  text: "I am a sub status."
});