Project Files
src / config.ts
// src/config.ts
// Local globalConfigSchematics for generate-image standalone plugin.
// Does NOT import from core-bundle — only @lmstudio/sdk.
// Key difference from draw-things-chat-core/src/config.ts:
// - PREVIEW_IN_CHAT default = true (inline delivery via tool result)
// - No baseUrl / apiKey / unloadAgentModelDuringRender (orchestrator-only fields)
import { createConfigSchematics } from "@lmstudio/sdk";
export const globalConfigSchematics = createConfigSchematics()
.field(
"PREVIEW_IN_CHAT",
"boolean",
{
displayName: "Previews in Chat",
subtitle:
"When enabled, tool responses include inline image previews. Recommended for local models without vision capability.",
},
true
)
.field(
"DRAW_THINGS_HOST",
"string",
{
displayName: "Draw Things Host",
subtitle: "Hostname or IP of the Draw Things backend server.",
placeholder: "127.0.0.1",
},
"127.0.0.1"
)
.field(
"DRAW_THINGS_HTTP_PORT",
"numeric",
{
displayName: "Draw Things HTTP Port",
subtitle: "HTTP API port (default: 7860).",
},
7860
)
.field(
"DRAW_THINGS_GRPC_PORT",
"numeric",
{
displayName: "Draw Things gRPC Port",
subtitle: "gRPC port (default: 7859).",
},
7859
)
.field(
"embedPngMetadata",
"boolean",
{
displayName: "Embed Metadata in PNGs",
subtitle:
"Write generation parameters (prompt, model, seed, LoRAs, sources) into saved PNGs as XMP metadata. Compatible with draw-things-index.",
},
true
)
.field(
"customConfigsPath",
"string",
{
displayName: "Custom Configs Path",
subtitle:
"Path to custom_configs.json from Draw Things. Set to `none` to disable.",
placeholder:
"~/Library/Containers/com.liuliu.draw-things/Data/Documents/Models/custom_configs.json",
},
"~/Library/Containers/com.liuliu.draw-things/Data/Documents/Models/custom_configs.json"
)
.field(
"HTTP_SERVER_PORT",
"numeric",
{
displayName: "Local HTTP Server Port",
subtitle:
"Port for serving generated images over localhost (default: 54760).",
engineDoesNotSupport: true,
},
54760
)
.build();