UNPKG

igniteui-theming

Version:

A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.

25 lines (24 loc) 726 B
import { RESOURCE_DEFINITIONS, getResourceContent } from "../../resources/presets.js"; import "../../resources/index.js"; //#region src/tools/handlers/resource.ts /** * Handler for read_resource tool. * Reads theming resource content by URI, bypassing the custom protocol scheme. */ async function handleReadResource(params) { const { uri } = params; const content = getResourceContent(uri); if (!content) return { content: [{ type: "text", text: `Resource not found: ${uri}\n\nAvailable resources:\n${RESOURCE_DEFINITIONS.map((r) => ` - ${r.uri}: ${r.name}`).join("\n")}` }], isError: true }; return { content: [{ type: "text", text: content.content }] }; } //#endregion export { handleReadResource };