src / config.ts

import { createConfigSchematics } from "@lmstudio/sdk";

export const configSchematics = createConfigSchematics()
	.field(
		"pageSize",
		"numeric",
		{
			displayName: "Search Results Per Page",
			subtitle: "Between 1 and 10, 0 = auto",
			min: 0,
			max: 10,
			int: true,
			slider: {
				step: 1,
				min: 1,
				max: 10,
			},
		},
		0
	)
	.field(
		"safeSearch",
		"select",
		{
			options: [
				{ value: "strict", displayName: "Strict" },
				{ value: "moderate", displayName: "Moderate" },
				{ value: "off", displayName: "Off" },
				{ value: "auto", displayName: "Auto" },
			],
			displayName: "Safe Search",
		},
		"auto"
	)
	.field(
		"maxLinks",
		"numeric",
		{
			displayName: "Max Links",
			min: -1,
			max: 500,
			int: true,
			subtitle: "Maximum number of links returned by the Visit Website tool (0 = Exclude links, -1 = Auto)",
		},
		-1
	)
	.field(
		"maxImages",
		"numeric",
		{
			displayName: "Max Images",
			min: -1,
			max: 500,
			int: true,
			subtitle: "Maximum number of images downloaded and returned by the Visit Website tool (0 = Exclude images, -1 = Auto)",
		},
		-1
	)
	.field(
		"contentLimit",
		"numeric",
		{
			displayName: "Max Content",
			min: -1,
			max: 50_000,
			int: true,
			subtitle: "Maximum text content size returned by the Visit Website tool (0 = Exclude text content, -1 = Auto)",
		},
		-1
	)
	.build();