@progress/kendo-react-mcp 1.3.2 → 1.4.0-dev.efc7fc08.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -18
- package/dist/index.js +736 -148
- package/package.json +2 -1
- package/proto/service.proto +12 -1
- package/dist/index.d.ts +0 -2
- package/dist/lib/constants.d.ts +0 -3
- package/dist/lib/grpc-client.d.ts +0 -3
- package/dist/lib/instructions/datagrid.d.ts +0 -1
- package/dist/lib/instructions/editor.d.ts +0 -1
- package/dist/lib/instructions/smart-grid.d.ts +0 -1
- package/dist/test/setup.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Kendo UI for React MCP Server
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Kendo UI for React [MCP Server](https://modelcontextprotocol.io/introduction) enables you achieve interation with AI and reach new levels of developer productivity. The MCP server provides proprietary context to AI-powered IDEs, apps and tools. You can use the Kendo UI for React MCP Server to ask about Kendo UI for React components, features, or general usage. You can successfully prompt more complex questions and tasks, and generate tailored code that includes Kendo UI for React components and API.
|
|
4
|
+
|
|
5
|
+
As of version 1.4 the Kendo UI for React MCP server supports two modes of operation that depends on your [Telerik license type](https://www.telerik.com/purchase/faq/licensing-purchasing): **AI Coding Assistant** and **Agentic UI Generator**.
|
|
6
|
+
|
|
7
|
+
## **AI Coding Assistant** Intended Use
|
|
8
|
+
|
|
9
|
+
* **Initial code generation**: Quickly add components to your app to speed up the initial development.
|
|
10
|
+
* **Component configuration**: Enable or disable specific component features, or fine tune the configuration through prompting. More * complex configurations are possible but may require additional manual work to be production-ready.
|
|
11
|
+
* **Dummy data generation and data binding**: Quickly add data to your app for testing and prototyping purposes. Avoid exposing or providing access to your proprietary or production data to AI-enabled tools.
|
|
12
|
+
* **Step-by-step explanations**: Understand the solutions provided by the AI Coding Assistant through the detailed explanations (depends * on the tool, mode, and model used). To further develop your knowledge, check the respective documentation.
|
|
13
|
+
* **Preliminary troubleshooting**: Resolve obvious and easy-to-solve issues affecting your code. For more complex issues, look for assistance from the community or contact the support team.
|
|
14
|
+
|
|
15
|
+
## **Agentic UI Generator** Intended Use
|
|
16
|
+
|
|
17
|
+
* **Create Individual Components**: Build specific Kendo UI for React components with particular configurations and features like filtering, validation, and data binding.
|
|
18
|
+
* **Create Full Responsive Pages**
|
|
19
|
+
* Build complete dashboards, landing pages, and listing pages in existing applications.
|
|
20
|
+
* Generate pages similar to the [Progress Design System page templates](https://www.telerik.com/design-system/docs/ui-templates/overview/).
|
|
21
|
+
* **Modify Existing Pages**: Generate new themes inside existing applications. Add dark mode or high-contrast themes.
|
|
22
|
+
* **Implement Responsive Layout**
|
|
23
|
+
* Create new responsive pages and sections.
|
|
24
|
+
* Convert existing pages to be responsive for mobile and tablet views.
|
|
4
25
|
|
|
5
26
|
## Prerequisites
|
|
6
27
|
|
|
7
|
-
To use the
|
|
28
|
+
To use the Kendo UI for React MCP Server, you need:
|
|
8
29
|
|
|
9
30
|
* A [compatible MCP client (IDE, code editor or app)](https://modelcontextprotocol.io/clients) that supports *MCP tools*.
|
|
10
31
|
* A [Telerik user account](https://www.telerik.com/account/).
|
|
@@ -12,11 +33,11 @@ To use the KendoReact MCP server, you need:
|
|
|
12
33
|
|
|
13
34
|
## Installation
|
|
14
35
|
|
|
15
|
-
Use the documentation of your AI-powered MCP client to add the Kendo React MCP server to a specific workspace or globally. You can see installation tips and examples for some popular MCP clients below.
|
|
36
|
+
Use the documentation of your AI-powered MCP client to add the Kendo UI for React MCP server to a specific workspace or globally. You can see installation tips and examples for some popular MCP clients below.
|
|
16
37
|
|
|
17
|
-
The generic settings of the
|
|
38
|
+
The generic settings of the Kendo UI for React MCP Server are:
|
|
18
39
|
|
|
19
|
-
* Server name: `kendo-
|
|
40
|
+
* Server name: `kendo-mcp`
|
|
20
41
|
* Type: `stdio` (standard input/output transport)
|
|
21
42
|
* Command: `npx` (the MCP server works through an npm package)
|
|
22
43
|
* Supported arguments: `-y`
|
|
@@ -25,6 +46,8 @@ The generic settings of the KendoReact MCP server are:
|
|
|
25
46
|
* (recommended) Use a `TELERIK_LICENSE_PATH` argument and point to your Telerik license file location.
|
|
26
47
|
* Use a `TELERIK_LICENSE` argument and paste your Telerik license key. Make sure to [update the license key](https://www.telerik.com/kendo-react-ui/components/my-license) when necessary.
|
|
27
48
|
|
|
49
|
+
> You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
|
|
50
|
+
|
|
28
51
|
## Authentication
|
|
29
52
|
|
|
30
53
|
The MCP server requires a valid Telerik account with a valid license. In order to get a valid license key check the [KendoReact documentation](https://www.telerik.com/kendo-react-ui/components/my-license).
|
|
@@ -44,7 +67,7 @@ To enable the Kendo React MCP server in a specific workspace or React app, add a
|
|
|
44
67
|
```json
|
|
45
68
|
{
|
|
46
69
|
"servers": {
|
|
47
|
-
"kendo-
|
|
70
|
+
"kendo-mcp": {
|
|
48
71
|
"type": "stdio",
|
|
49
72
|
"command": "npx",
|
|
50
73
|
"args": ["-y", "@progress/kendo-react-mcp@latest"],
|
|
@@ -58,18 +81,20 @@ To enable the Kendo React MCP server in a specific workspace or React app, add a
|
|
|
58
81
|
}
|
|
59
82
|
```
|
|
60
83
|
|
|
84
|
+
> You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
|
|
85
|
+
|
|
61
86
|
### Cursor
|
|
62
87
|
|
|
63
88
|
Refer to [Model Context Protocol](https://docs.cursor.com/context/model-context-protocol).
|
|
64
89
|
|
|
65
|
-
To [enable the Kendo React
|
|
90
|
+
To [enable the Kendo UI for React MCP server in a specific workspace](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server-to-your-workspace) or React app, add a `.cursor` folder with an `mcp.json` file at the root of the workspace.
|
|
66
91
|
|
|
67
92
|
> .cursor/mcp.json at the workspace root
|
|
68
93
|
|
|
69
94
|
```json
|
|
70
95
|
{
|
|
71
96
|
"mcpServers": {
|
|
72
|
-
"kendo-
|
|
97
|
+
"kendo-mcp": {
|
|
73
98
|
"type": "stdio",
|
|
74
99
|
"command": "npx",
|
|
75
100
|
"args": ["-y", "@progress/kendo-react-mcp@latest"],
|
|
@@ -83,19 +108,51 @@ To [enable the Kendo React MCP server in a specific workspace](https://code.visu
|
|
|
83
108
|
}
|
|
84
109
|
```
|
|
85
110
|
|
|
111
|
+
> You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
|
|
112
|
+
|
|
86
113
|
## Usage
|
|
87
114
|
|
|
88
|
-
To
|
|
115
|
+
To increase the probability of the Kendo UI for React MCP Server being used, or to call it without the need to mention "kendo" explicitly, add custom idea instructions to your AI-powered tool. Here are examples for [GitHub Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot#about-repository-custom-instructions-for-github-copilot-chat) and [Cursor](https://docs.cursor.com/context/rules).
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### AI Coding Assistant
|
|
119
|
+
|
|
120
|
+
To use the AI Coding Assistant mode:
|
|
121
|
+
|
|
122
|
+
1. Start your prompt with `#kendo_react_assistant` (the main MCP tool to start the agentic workflow in the coding agent).
|
|
123
|
+
1. This will trigger an agentic workflow using the other available MCP tools to retrieve relevant context based on your prompt.
|
|
124
|
+
1. Inspect the output and verify that the Kendo UI for React MCP Server is used. Look for a statement in the output, which is similar to:
|
|
125
|
+
* `Running kendo-react-mcp-server` (in VS Code)
|
|
126
|
+
* `Calling MCP tool kendo-react-mcp-server` (in Cursor)
|
|
127
|
+
|
|
128
|
+
If the Kendo UI for React MCP server is not used even though it's installed and enabled, double-check the server name in your configuration and try rephrasing your prompt.
|
|
129
|
+
1. If requested, grant the Kendo UI for React MCP server a permission to run for this session, workspace, or always.
|
|
130
|
+
|
|
131
|
+
Also check more useful documentation about how to use the AI Coding Assistant here:
|
|
132
|
+
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant#getting-started)
|
|
133
|
+
- [Recommendations](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant#recommendations)
|
|
134
|
+
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/prompt-library)
|
|
135
|
+
|
|
136
|
+
### Agentic UI Generator
|
|
89
137
|
|
|
90
|
-
|
|
91
|
-
1. Inspect the output and verify that the KendoReact MCP Server is used. Look for a statement in the output, which is similar to:
|
|
92
|
-
* `Running kendo-react-assistant` (in VS Code)
|
|
93
|
-
* `Calling MCP tool kendo-react-assistant` (in Cursor)
|
|
138
|
+
To use the Agentic UI Generator mode:
|
|
94
139
|
|
|
95
|
-
|
|
96
|
-
1.
|
|
140
|
+
1. Open the AI chat interface in your IDE—Start a new chat session to begin interacting with the Agentic UI Generator.
|
|
141
|
+
1. Start your prompt with `#kendo_ui_generator` (the main MCP tool to start the agentic workflow in the Agentic UI Generator).
|
|
142
|
+
1. This will trigger an agentic workflow using the other available MCP tools to retrieve relevant context based on your prompt.
|
|
143
|
+
1. Inspect the output and verify that the Kendo UI for React MCP Server is used. Look for a statement in the output, which is similar to:
|
|
144
|
+
* `Running kendo-mcp-server` (in VS Code)
|
|
145
|
+
* `Calling MCP tool kendo-mcp-server` (in Cursor)
|
|
146
|
+
1. If requested, grant the Kendo UI for React MCP server a permission to run for this session, workspace, or always.
|
|
97
147
|
|
|
98
|
-
Also check
|
|
148
|
+
Also check more usefule documentation about how to use the Agentic UI Generator here:
|
|
149
|
+
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator#getting-started)
|
|
150
|
+
- [Intended Use](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator#intended-use)
|
|
151
|
+
- [Recommendations](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator#recommendations) for more usage tips.
|
|
152
|
+
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/prompt-library#kendoreact-agentic-ui-generator-prompt-library)
|
|
99
153
|
|
|
100
|
-
|
|
154
|
+
### AI Tools Usage
|
|
101
155
|
|
|
156
|
+
You can check the usage limits and the modes of operation in our documentation:
|
|
157
|
+
- [AI Coding Assistant - Usage Limits](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant#usage-limits)
|
|
158
|
+
- [Agentic UI Generator - Usage Limits](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator#usage-limits)
|
package/dist/index.js
CHANGED
|
@@ -1,155 +1,743 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
`,
|
|
4
|
-
## DataGrid Deprecated Properties Awareness
|
|
5
|
-
For DataGrid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:
|
|
6
|
-
|
|
7
|
-
Deprecated properties and their modern replacements:
|
|
8
|
-
- selectedField \u2192 use the select state property
|
|
9
|
-
- editField \u2192 use the edit state property
|
|
10
|
-
- expandedField \u2192 use the detailExpand state property
|
|
11
|
-
- onExpandChange \u2192 use onDetailExpandChange for detail-row expansion or onGroupExpandChange for group expansion
|
|
12
|
-
- cellRender \u2192 use the cells={{ data: CustomCell }} prop
|
|
13
|
-
- rowRender \u2192 use the rows={{ data: CustomRow }} prop
|
|
14
|
-
- filterCellRender \u2192 use the cells={{ filterCell: CustomCell }} prop
|
|
15
|
-
- headerCellRender \u2192 use the cells={{ headerCell: CustomHeaderCell }} prop
|
|
16
|
-
- column.cell \u2192 use the column.cells={{ data: CustomCell }} prop
|
|
17
|
-
- column.headerCell \u2192 use the column.cells={{ headerCell: CustomHeaderCell }} prop
|
|
18
|
-
- column.filterCell \u2192 use the column.cells={{ filterCell: CustomCell }} prop
|
|
19
|
-
- column.footerCell \u2192 use the column.cells={{ footerCell: CustomFooterCell }} prop
|
|
20
|
-
|
|
21
|
-
Additional modern updates:
|
|
22
|
-
- Input component in Column Menu Filter has been replaced with Textbox
|
|
23
|
-
- scrollable prop now defaults to virtual
|
|
24
|
-
- Virtual scrolling no longer applies height by default
|
|
2
|
+
import{McpServer as ze}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Ye}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Le,join as _e}from"path";import{fileURLToPath as qe}from"url";import{loadLicense as De,decodeLicenseKey as Ue,decodeLicenseEvidence as Oe}from"@progress/kendo-licensing/utils";var _=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function Z(e){return e.replace(/^\uFEFF/,"")}async function J(){let e=null,t=null;try{let o=De();if(!o.success)throw new _(o.message);try{e=(await Ue(o.value)).licenses.find(async s=>!!(await Oe(s)).userId)}catch(n){console.log(n.message)}if(!e)return[Z(o.value),null]}catch(o){return t=o.message||"Unknown error loading license.",[null,t]}return[Z(e),null]}import E from"node:fs";import U from"node:path";var q=!1,N=process.env.DEBUG_LOG_FILE,ee=!!(N&&typeof N=="string");if(ee){let e=U.resolve(N),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!E.existsSync(t))try{E.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!E.existsSync(e))try{E.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else q=!1;q=ee&&!!N&&E.existsSync(U.resolve(N));function d(...e){if(q&&N){let n=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,s=U.resolve(N);E.appendFile(s,n,r=>{r&&console.error("Error writing to log file:",r)})}}import $e from"@grpc/proto-loader";import O from"@grpc/grpc-js";var $=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let s=$e.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),d("Using ContextApi URl:",this.contextApiUrl);let r=O.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?O.credentials.createInsecure():O.credentials.createSsl())}async getMetadata(){let[t,o]=this.isDev?"fake_license":await J(),n=process.env.CONTEXTAPI_API_KEY,s=n&&typeof n=="string",r=t&&typeof t=="string";if(!r&&!s&&o)throw new Error(`Failed to authenticate with API key or License key!
|
|
25
4
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
5
|
+
License Error: ${o}`);let i=new O.Metadata;if(r)try{i.add("x-license-key",t)}catch(u){throw d("Error adding license key to metadata:",u),new Error(`Failed to use license key: ${u.message}`)}return s&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i}async query(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.query(t,o,(r,i)=>{r?s(new Error(r)):n(i)})})}async queryCssUtils(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.cssUtilsSearch(t,o,(r,i)=>{r?(d("Error querying CSS Utils:",r),s(new Error(r))):n(i)})})}async queryIconsSearch(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.iconsSearch(t,o,(r,i)=>{r?(d("Error querying Icons Search:",r),s(new Error(r))):n(i)})})}async queryBuildingBlocks(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.buildingBlocksSearch(t,o,(r,i)=>{r?(d("Error querying Building Blocks:",r),s(new Error(r))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense(null,t,(s,r)=>{s?(d("Error validating user license:",s),n(new Error(s))):o(r)})})}async queryThemeGenerate(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.generateTheme(t,o,(r,i)=>{r?(d("Error querying context API/GenerateTheme:",r),s(new Error(r))):n(i)})})}async recordOrchestratorUserRequest(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,t,(s,r)=>{s?(d("Error recording orchestrator user request:",s),n(new Error(s))):o(r)})})}};import{z as B}from"zod";var gt=B.object({user_id:B.string(),user_email:B.string().email()});import{z as p}from"zod";var Me=p.object({Product:p.object({Id:p.number().int(),Code:p.string(),Name:p.string()}),License:p.nullable(p.object({Id:p.number().int(),Name:p.string(),Type:p.string(),Active:p.boolean()})),Availability:p.array(p.object({LicenseStart:p.nullable(p.string().datetime()),LicenseEnd:p.nullable(p.string().datetime())})),IsLicenseAvailable:p.optional(p.boolean())}),At=p.array(Me);async function te(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let o=await e();return o.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o.toLocaleLowerCase()==="assistant_ui_generator"?"assistant":"none"}var l="Kendo UI for React",I="react",k="kendo",M=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","FontIcon","Form","Gantt","Gauge","General","GridLayout","Hint","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var Be=_e(Le(qe(import.meta.url)),"../proto/service.proto"),L=new $("contextapi.telerik.com:443",Be,{libName:I});var oe=async()=>L.validateUserLicense();import Qe from"fs";import Pe from"path";import{fileURLToPath as We}from"url";import{z as m}from"zod";var T=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var P=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
6
|
+
|
|
7
|
+
## Comprehensive Code Validation Checklist
|
|
8
|
+
Execute these validation steps systematically to ensure high-quality, maintainable code:
|
|
9
|
+
|
|
10
|
+
### Validation Phase: Framework-Specific Validation
|
|
11
|
+
|
|
12
|
+
${t}
|
|
13
|
+
|
|
14
|
+
### Validation Phase: General Code Quality & Best Practices
|
|
15
|
+
|
|
16
|
+
File Organization:
|
|
17
|
+
- Files are properly named using appropriate conventions
|
|
18
|
+
- Components are logically grouped in appropriate directories
|
|
19
|
+
- File sizes are reasonable
|
|
20
|
+
- Clear separation of concerns between files
|
|
21
|
+
|
|
22
|
+
Performance Best Practices:
|
|
23
|
+
- Optimized rendering patterns
|
|
24
|
+
- Minimal unnecessary re-renders/change detection cycles
|
|
25
|
+
- Efficient data handling and caching
|
|
26
|
+
- Proper component lifecycle management
|
|
27
|
+
|
|
28
|
+
### Validation Phase: Security & Accessibility Validation
|
|
29
|
+
|
|
30
|
+
Security Measures:
|
|
31
|
+
- Input validation and sanitization
|
|
32
|
+
- XSS protection measures
|
|
33
|
+
- CSRF protection where applicable
|
|
34
|
+
- Secure data handling practices
|
|
35
|
+
|
|
36
|
+
Accessibility (a11y) Compliance
|
|
37
|
+
- Proper semantic HTML structure
|
|
38
|
+
- ARIA labels and roles where needed
|
|
39
|
+
- Keyboard navigation support
|
|
40
|
+
- Screen reader compatibility
|
|
41
|
+
- Sufficient color contrast ratios
|
|
42
|
+
|
|
43
|
+
Interactive Elements:
|
|
44
|
+
- Focus management and visual indicators
|
|
45
|
+
- Descriptive alt text for images
|
|
46
|
+
- Proper form labels and error messages
|
|
47
|
+
|
|
48
|
+
### Validation Phase: UI/UX & Design System Compliance
|
|
49
|
+
|
|
50
|
+
Responsive Design:
|
|
51
|
+
- Proper breakpoint handling
|
|
52
|
+
- Flexible layouts that adapt to different screen sizes
|
|
53
|
+
- Touch-friendly interface elements
|
|
54
|
+
|
|
55
|
+
### Validation Phase: Error Handling & Edge Cases
|
|
56
|
+
|
|
57
|
+
Error Handling:
|
|
58
|
+
- Graceful error handling for all user interactions
|
|
59
|
+
- Meaningful error messages for users
|
|
60
|
+
- Network error handling for API calls
|
|
61
|
+
`;var R=(e,t)=>{let o=P({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),n=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",s=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
62
|
+
|
|
63
|
+
**Current Goal:**
|
|
64
|
+
|
|
65
|
+
${e.userIntent}
|
|
66
|
+
|
|
67
|
+
**Requirements Summary:**
|
|
68
|
+
- **Framework:** ${e.libKey}
|
|
69
|
+
${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
70
|
+
- Ensure to use ONLY ${e.suiteName} components for all UI elements.
|
|
71
|
+
- And use the ${e.codeAssistantName} tool to get ${e.suiteName} component documentation and code snippets.
|
|
72
|
+
- Ensure that after you read the plan you use exactly the ${e.codeAssistantName} no matter if there is another tool that can provide code snippets, documentation or other resources related to ${e.suiteName}.
|
|
73
|
+
`:""}${e.includeLayout?`- **Layout:** Yes
|
|
74
|
+
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for layout structure and responsive design.
|
|
75
|
+
`:""}${e.includeIcons?`- **Icons:** Yes
|
|
76
|
+
- Use icons that align with the project theme and enhance usability.
|
|
77
|
+
- Use the ${e.iconAssistantName} tool to search for icons that fit the theme and purpose of your project.
|
|
78
|
+
`:""}${e.includeTheming?`- **Custom Theming:**
|
|
79
|
+
- Create a custom theme that aligns with the current goal and branding needs.
|
|
80
|
+
- Use Kendo Themes and Design System guidelines.
|
|
81
|
+
- Make sure to include strict CSS variables or theme requirements from the current goal.
|
|
82
|
+
- And use the ${e.styleAssistantName} tool to create a custom theme for your project.
|
|
83
|
+
`:""}${e.includeResponsive?`- **Responsive:**
|
|
84
|
+
- Ensure the layout is fully responsive across mobile, tablet, and desktop views.
|
|
85
|
+
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.
|
|
86
|
+
`:""}
|
|
87
|
+
${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
88
|
+
## CRITICAL DESIGN SYSTEM CONSTRAINTS
|
|
89
|
+
- **USE ONLY KENDO DESIGN SYSTEM UTILITIES** for ALL styling, layout, spacing, positioning, and responsive behavior
|
|
90
|
+
- Avoid custom CSS, inline styles, or other CSS framework classes
|
|
91
|
+
- The ${e.layoutAssistantName} tool will provide the specific Kendo CSS utility classes needed
|
|
92
|
+
- All layout requirements must use Kendo utilities exclusively
|
|
93
|
+
|
|
94
|
+
`:""}---
|
|
95
|
+
|
|
96
|
+
## Detailed Execution Plan
|
|
97
|
+
Follow these steps strictly in order to achieve a complete and polished implementation of the current goal:
|
|
98
|
+
|
|
99
|
+
${e.includeLayout?`
|
|
100
|
+
### Phase: Layout Foundation
|
|
101
|
+
|
|
102
|
+
**Step 1: Create Base Layout Structure**
|
|
103
|
+
**IMPORTANT LAYOUT REQUIREMENTS:**
|
|
104
|
+
- Consider the hierarchy and nesting of layout elements (page \u2192 sections \u2192 components)
|
|
105
|
+
- Each layout level should have appropriate wrapper containers with proper Kendo utilities
|
|
106
|
+
- Sections should be wrapped in containers that provide the necessary layout structure
|
|
107
|
+
|
|
108
|
+
**Tool call example:**
|
|
109
|
+
\`\`\`
|
|
110
|
+
${e.layoutAssistantName}({
|
|
111
|
+
prompt="Provide Kendo Design System utility classes for the following layout structure: [LAYOUT DESCRIPTION HERE]",
|
|
112
|
+
includeBuildingBlockExamples=true // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
113
|
+
})
|
|
114
|
+
\`\`\`
|
|
115
|
+
`:""}
|
|
116
|
+
${e.includeComponentsDocs?`
|
|
117
|
+
### Phase: Component Integration
|
|
118
|
+
**Step 1: Identify and Implement Core Components**
|
|
119
|
+
Based on your current goal, analyze what other ${e.suiteName} components are needed and implement them one by one. Here you are some appropriate components based on the different project type:
|
|
120
|
+
|
|
121
|
+
**Component Selection Guidelines:**
|
|
122
|
+
- **Landing Pages**: Consider Button, Card, Form components, Layout containers, Navigation elements
|
|
123
|
+
- **Dashboards**: Consider Grid, Chart, TileLayout, Drawer, Notification, ToolBar components
|
|
124
|
+
- **Data Entry**: Consider Form, TextBox, DatePicker, DropDownList, Upload, Validation components
|
|
125
|
+
- **Content Management**: Consider Grid, Editor, TreeView, FileManager, Dialog components
|
|
126
|
+
- **E-commerce**: Consider ListView, Card, Button, Rating, Badge, Carousel components
|
|
127
|
+
${n}
|
|
128
|
+
|
|
129
|
+
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
130
|
+
- Make sure to identify all necessary features related to the ${s} based on the current goal.
|
|
131
|
+
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
132
|
+
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
133
|
+
- Always specify the exact features you want for each component. Describe only the needed functionality, and behavior you need. Be concise and don't include any information about the use case.
|
|
134
|
+
|
|
135
|
+
**Tool call examples:**
|
|
136
|
+
\`\`\`
|
|
137
|
+
${e.codeAssistantName}({
|
|
138
|
+
query="Give me information about [COMPONENT_NAME] with [SPECIFIC_FEATURES]." <!-- For example: 'Grid with paging' or 'Button with click events' or 'Chart with multiple series' -->
|
|
139
|
+
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', 'Chart', etc. -->
|
|
140
|
+
})
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
For broad queries, break them down into specific features (e.g., paging, sorting, filtering for Grid) and call the tool separately for each feature:
|
|
144
|
+
\`\`\`
|
|
145
|
+
${e.codeAssistantName}({
|
|
146
|
+
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'paging in Grid' -->
|
|
147
|
+
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
148
|
+
})
|
|
149
|
+
\`\`\`
|
|
150
|
+
|
|
151
|
+
\`\`\`
|
|
152
|
+
${e.codeAssistantName}({
|
|
153
|
+
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'sorting in Grid' -->
|
|
154
|
+
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
155
|
+
})
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
\`\`\`
|
|
159
|
+
${e.codeAssistantName}({
|
|
160
|
+
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'filtering in Grid' -->
|
|
161
|
+
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
162
|
+
})
|
|
163
|
+
\`\`\`
|
|
164
|
+
`:""}
|
|
165
|
+
${e.includeResponsive?`
|
|
166
|
+
### Phase: Layout Responsive Finalization
|
|
167
|
+
|
|
168
|
+
**Step 1: Implement Responsive Behavior**
|
|
169
|
+
|
|
170
|
+
**Tool call example:**
|
|
171
|
+
\`\`\`
|
|
172
|
+
${e.layoutAssistantName}({
|
|
173
|
+
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
174
|
+
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
175
|
+
})
|
|
176
|
+
\`\`\`
|
|
177
|
+
`:""}
|
|
178
|
+
${e.includeTheming?`
|
|
179
|
+
**Step 2: Custom Theme Implementation**
|
|
180
|
+
|
|
181
|
+
**CUSTOM THEME REQUIREMENTS:**
|
|
182
|
+
- Create a custom theme that aligns with the current goal and branding needs.
|
|
183
|
+
- Use Kendo Themes and Design System guidelines.
|
|
184
|
+
- Make sure to include strict CSS variables or theme requirements from the current goal.
|
|
185
|
+
|
|
186
|
+
**Tool call example:**
|
|
187
|
+
\`\`\`
|
|
188
|
+
${e.styleAssistantName}({
|
|
189
|
+
query="Create a custom Kendo UI theme that aligns with the following current goal and branding needs: [CURRENT GOAL HERE]. Include strict CSS variables or theme requirements as needed.",
|
|
190
|
+
includeThemeVariables=true // Optional, include specific CSS variables for colors, typography, spacing, etc.
|
|
191
|
+
})
|
|
192
|
+
\`\`\`
|
|
193
|
+
`:""}
|
|
194
|
+
${e.includeIcons?`
|
|
195
|
+
**Step 3: Iconography and Visual Enhancements**
|
|
196
|
+
|
|
197
|
+
**ICONOGRAPHY GUIDELINES:**
|
|
198
|
+
- Select icons that align with the project theme and enhance usability.
|
|
199
|
+
- Ensure icons are consistent in style and size.
|
|
200
|
+
- Use icons to improve navigation and highlight key actions.
|
|
201
|
+
|
|
202
|
+
**Tool call example:**
|
|
203
|
+
\`\`\`
|
|
204
|
+
${e.iconAssistantName}({
|
|
205
|
+
query="Suggest icons that fit the theme and purpose of the following current goal: [CURRENT GOAL HERE]. Provide icon names and usage context.",
|
|
206
|
+
})
|
|
207
|
+
\`\`\`
|
|
208
|
+
`:""}
|
|
209
|
+
### Phase: Code Generation
|
|
210
|
+
**IMPORTANT:** Do NOT generate ANY code or create files until ALL information gathering phases (1-3) are complete.
|
|
211
|
+
**Step 1: Generate Complete Implementation**
|
|
212
|
+
After completing all information gathering phases above, generate the complete ${e.libKey} component/page implementation:
|
|
213
|
+
**Code Generation Requirements:**
|
|
214
|
+
- Create complete, functional ${e.libKey} components/pages
|
|
215
|
+
- Include all identified ${e.suiteName} components with their configurations
|
|
216
|
+
- Apply ALL Kendo Design System utility classes gathered from layout assistant
|
|
217
|
+
- Implement proper component event handling and data binding
|
|
218
|
+
- Ensure responsive behavior using Kendo utility classes
|
|
219
|
+
- Include necessary import statements and dependencies
|
|
220
|
+
|
|
221
|
+
${t.injectedPlan??""}
|
|
222
|
+
|
|
223
|
+
### Phase: Validation and Finalization
|
|
224
|
+
|
|
225
|
+
**Step 1: Code Validation**
|
|
226
|
+
** CRITICAL REQUIREMENT: You MUST validate the generated UI code using this comprehensive checklist to ensure code quality and compliance:**
|
|
227
|
+
|
|
228
|
+
${o}
|
|
229
|
+
|
|
230
|
+
**Step 2: Final Review and Testing**
|
|
231
|
+
** Implementation Validation:**
|
|
232
|
+
${e.includeComponentsDocs?` - Components render correctly without errors
|
|
233
|
+
- All ${e.suiteName} component features function as expected
|
|
234
|
+
- Event handling and data binding operate correctly`:""}
|
|
235
|
+
${e.includeResponsive?"- Responsive layout works across breakpoints":""}
|
|
236
|
+
|
|
237
|
+
**Quick Fixes (if needed):**
|
|
238
|
+
|
|
239
|
+
After code implementation and validation you can make quick fixes as needed:
|
|
240
|
+
- Use ${e.codeAssistantName} for component-specific issues
|
|
241
|
+
- Use ${e.layoutAssistantName} for styling adjustments
|
|
242
|
+
|
|
243
|
+
+### Before You Begin
|
|
244
|
+
- When following/executing the plan call tools are defined from the same function_ecosystem/MCP_server which ${e.name} was called.
|
|
245
|
+
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
246
|
+
- Focus on planning and sequencing.
|
|
247
|
+
- Summarize the components, layouts, and utilities gathered.
|
|
248
|
+
- Confirm all required inputs from tools have been provided.`};var G=e=>`# ${e.suiteName} Assistant
|
|
249
|
+
|
|
250
|
+
**What you're looking for:**
|
|
251
|
+
|
|
252
|
+
${e.userIntent}
|
|
253
|
+
|
|
254
|
+
**Available Tools:**
|
|
255
|
+
- **${e.codeAssistantName}** - Get component documentation, features, and usage examples
|
|
256
|
+
- **${e.iconAssistantName}** - Search for icons from the Kendo icon library
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Discovery Plan
|
|
261
|
+
|
|
262
|
+
Follow these steps to find the right components and resources:
|
|
263
|
+
|
|
264
|
+
### Step 1: Identify Components
|
|
265
|
+
|
|
266
|
+
Based on your needs, consider these ${e.suiteName} component categories:
|
|
267
|
+
|
|
268
|
+
**Common Use Cases:**
|
|
269
|
+
- **Data Display**: Grid, ListView, TreeView, Card, TileLayout
|
|
270
|
+
- **Forms & Input**: Form, TextBox, DatePicker, DropDownList, ComboBox, MultiSelect, Upload
|
|
271
|
+
- **Navigation**: Menu, Drawer, Breadcrumb, TabStrip, Stepper
|
|
272
|
+
- **Data Visualization**: Chart, Gauge, Sparkline
|
|
273
|
+
- **Editing**: Editor (Rich Text)
|
|
274
|
+
- **Notifications**: Dialog, Notification, Tooltip
|
|
275
|
+
- **Layout**: Splitter, PanelBar, ExpansionPanel
|
|
276
|
+
|
|
277
|
+
**How to explore components:**
|
|
278
|
+
|
|
279
|
+
Use the ${e.codeAssistantName} tool to learn about specific components:
|
|
280
|
+
|
|
281
|
+
\`\`\`
|
|
282
|
+
${e.codeAssistantName}({
|
|
283
|
+
query: "What are the main features of [COMPONENT_NAME]?",
|
|
284
|
+
component: "[COMPONENT_NAME]"
|
|
285
|
+
})
|
|
286
|
+
\`\`\`
|
|
287
|
+
|
|
288
|
+
**Examples:**
|
|
289
|
+
\`\`\`
|
|
290
|
+
${e.codeAssistantName}({
|
|
291
|
+
query: "How to use Grid with paging and sorting?",
|
|
292
|
+
component: "Grid"
|
|
293
|
+
})
|
|
294
|
+
\`\`\`
|
|
295
|
+
|
|
296
|
+
\`\`\`
|
|
297
|
+
${e.codeAssistantName}({
|
|
298
|
+
query: "What features does DatePicker have?",
|
|
299
|
+
component: "DatePicker"
|
|
300
|
+
})
|
|
301
|
+
\`\`\`
|
|
302
|
+
|
|
303
|
+
**Pro Tips:**
|
|
304
|
+
- Ask about specific features (e.g., "Grid with filtering" instead of just "Grid")
|
|
305
|
+
- Break complex queries into multiple calls focusing on one feature at a time
|
|
306
|
+
- Specify the exact component name in the component parameter
|
|
307
|
+
|
|
308
|
+
${e.includeIcons?`
|
|
309
|
+
### Step 2: Find Icons
|
|
310
|
+
|
|
311
|
+
Use the ${e.iconAssistantName} tool to search for icons:
|
|
312
|
+
|
|
313
|
+
\`\`\`
|
|
314
|
+
${e.iconAssistantName}({
|
|
315
|
+
query: "Search for icons related to [YOUR THEME/PURPOSE]"
|
|
316
|
+
})
|
|
317
|
+
\`\`\`
|
|
318
|
+
|
|
319
|
+
**Examples:**
|
|
320
|
+
\`\`\`
|
|
321
|
+
${e.iconAssistantName}({
|
|
322
|
+
query: "icons for navigation menu"
|
|
323
|
+
})
|
|
324
|
+
\`\`\`
|
|
325
|
+
|
|
326
|
+
\`\`\`
|
|
327
|
+
${e.iconAssistantName}({
|
|
328
|
+
query: "icons for user actions like edit, delete, save"
|
|
329
|
+
})
|
|
330
|
+
\`\`\`
|
|
331
|
+
`:""}
|
|
332
|
+
|
|
333
|
+
### Step 3: Review and Implement
|
|
334
|
+
|
|
335
|
+
After gathering information:
|
|
336
|
+
1. Review the component documentation provided by ${e.codeAssistantName}
|
|
337
|
+
2. Check which icons are available from ${e.iconAssistantName}
|
|
338
|
+
3. Use the official ${e.suiteName} documentation for detailed implementation guides
|
|
339
|
+
4. Refer to the component examples and code snippets provided
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Getting Started
|
|
344
|
+
|
|
345
|
+
**Next Actions:**
|
|
346
|
+
1. Start by calling ${e.codeAssistantName} for the components you need
|
|
347
|
+
2. ${e.includeIcons?`Search for icons using ${e.iconAssistantName}`:"Review the component documentation"}
|
|
348
|
+
3. Follow the ${e.suiteName} official documentation for implementation details
|
|
349
|
+
|
|
350
|
+
**Important Notes:**
|
|
351
|
+
- These tools provide documentation and guidance, not code generation
|
|
352
|
+
- Always refer to official ${e.suiteName} documentation for the most up-to-date information
|
|
353
|
+
- Tool responses include usage examples and best practices`;var v=(e,t)=>({SETUP_VALIDATION:`
|
|
354
|
+
UI Library Setup:
|
|
355
|
+
- ${e} modules properly imported and configured
|
|
356
|
+
- ${e} theme properly loaded and applied
|
|
357
|
+
- ${e} license properly configured
|
|
358
|
+
- Globalization and localization properly configured for ${e} components
|
|
359
|
+
- Required ${e} dependencies installed and up-to-date`,PERFORMANCE_OPTIMIZATION:`
|
|
360
|
+
Performance Optimization:
|
|
361
|
+
- Efficient rendering patterns to prevent unnecessary re-renders
|
|
362
|
+
- Lazy loading of ${e} components when appropriate
|
|
363
|
+
- Virtualization enabled for large datasets in ${e} components
|
|
364
|
+
- Only required ${e} modules imported and tree-shaken`,THEME_AND_STYLING:`
|
|
365
|
+
${e} Theme & Styling:
|
|
366
|
+
- Prioritize the ${t} Design System utilities
|
|
367
|
+
- Avoid custom CSS or other framework classes
|
|
368
|
+
- Do not use inline styles
|
|
369
|
+
- Consistent ${e} theme application across all components
|
|
370
|
+
- Custom theme variables properly defined and scoped
|
|
371
|
+
- ${e} icon fonts properly loaded and optimized
|
|
372
|
+
- Brand colors integrated with ${e} component themes`});function ne(e,t,o){let{name:n,title:s,description:r,layoutAssistantName:i,codeAssistantName:u,styleAssistantName:g,iconAssistantName:y,suiteName:S,libKey:c,components:A}=e,h=new T(n,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:m.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${S} components you want to use.`),needsComponentsDocsConfidence:m.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:m.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:m.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:m.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:m.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:m.array(m.enum(A)).optional().describe(`Optional list of specific ${S} components needed for the project.`)}},async({userIntent:f,needsComponentsDocsConfidence:C,needsLayoutConfidence:b,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W,componentsNeeded:Re})=>{d("UI Orchestrator called with:",{userIntent:f,needsComponentsDocsConfidence:C,needsLayoutConfidence:b,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W});try{await o.recordOrchestratorUserRequest()}catch(D){throw x(D)}let X;if(w>.3&&w<=.6){let D=await h.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});D?.action==="accept"&&D.content?.includeCustomTheming&&(X=!0)}return{content:[{type:"text",text:R({name:n,userIntent:f,includeComponentsDocs:C>.3,includeTheming:w>.6||!!X,includeLayout:b>.5,includeIcons:W>.6,includeResponsive:b>.5&&Q>.4,layoutAssistantName:i,codeAssistantName:u,styleAssistantName:g,iconAssistantName:y,suiteName:S,libKey:c,components:Re},t)}]}});return h}function se(e,t){let{name:o,title:n,description:s,iconAssistantName:r,codeAssistantName:i,suiteName:u,libKey:g,components:y}=e;return new T(o,{title:n,description:s,inputSchema:{userIntent:m.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${u}.`),needsIconsConfidence:m.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:m.array(m.enum(y)).optional().describe(`Optional list of specific ${u} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:c,needsIconsConfidence:A,componentsNeeded:h})=>{d("Assistant Orchestrator called with:",{userIntent:c,needsIconsConfidence:A,componentsNeeded:h});try{await t.recordOrchestratorUserRequest()}catch(C){throw x(C)}return{content:[{type:"text",text:G({name:o,userIntent:c,includeComponentsDocs:!0,includeIcons:A>.5,codeAssistantName:i,iconAssistantName:r,suiteName:u,libKey:g,components:h})}]}})}function re(e,t){let{name:o,title:n,description:s,suiteName:r,libKey:i,getPreContent:u}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:m.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:m.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:g,includeBuildingBlockExamples:y})=>{d("Layout Assistant called with:",{prompt:g,includeBuildingBlockExamples:y});try{let c=(await t.queryCssUtils({query:g})).values.join(`
|
|
373
|
+
`)||"No CSS utilities found for the given prompt.",A=u?.()??"",h=f=>`${A}
|
|
374
|
+
|
|
375
|
+
# Kendo Design System CSS Utilities
|
|
376
|
+
|
|
377
|
+
${c}
|
|
378
|
+
${f??""}
|
|
379
|
+
`;if(y)try{let f=await t.queryBuildingBlocks({query:g,lib_name:i}),C="";f.items?.length>0&&(C=`
|
|
380
|
+
## Building Blocks Examples
|
|
381
|
+
|
|
382
|
+
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
383
|
+
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
384
|
+
|
|
385
|
+
${f.items.map(b=>`
|
|
386
|
+
### ${b.name}
|
|
387
|
+
|
|
388
|
+
${b.description}
|
|
389
|
+
|
|
390
|
+
\`\`\`code
|
|
391
|
+
${b.code}
|
|
392
|
+
\`\`\`
|
|
393
|
+
`).join(`
|
|
394
|
+
`)}`),c=h(C)}catch(f){d("Error calling building-blocks service:",f),c=h()}else c=h();return{content:[{type:"text",text:c}]}}catch(S){throw x(S)}})}function ie(e,t){let{name:o,title:n,description:s,libKey:r,getPreContent:i}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:m.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:u})=>{d("Style Assistant called with:",{prompt:u});let g="";try{let c=await t.queryThemeGenerate({prompt:u});if(c.variables_json){let A=JSON.parse(c.variables_json),h=[];if(A)for(let f of Object.keys(A))typeof A[f]=="string"&&h.push(`${f}: ${A[f]}`);g=h.join(`
|
|
395
|
+
|
|
396
|
+
`)}}catch(c){throw x(c)}let y=i?.()??"";return{content:[{type:"text",text:g?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
397
|
+
Ensure the variables are applied consistently across all relevant elements.
|
|
398
|
+
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
399
|
+
|
|
400
|
+
${y}
|
|
401
|
+
|
|
402
|
+
## Generated CSS Variables
|
|
403
|
+
|
|
404
|
+
\`\`\`css
|
|
405
|
+
${g}
|
|
406
|
+
\`\`\`
|
|
407
|
+
`:"No CSS variables were generated for the given prompt."}]}})}function ae(e,t){let{name:o,title:n,description:s,libKey:r,getPostContent:i}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:m.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:m.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:u,limit:g})=>{d("Icon Search called with:",{query:u,limit:g});try{let y=await t.queryIconsSearch({query:u,limit:g*100}),S=i?.()??"";return{content:[{type:"text",text:`${y.values.join(`
|
|
408
|
+
|
|
409
|
+
`)}
|
|
410
|
+
|
|
411
|
+
${S}`}]}}catch(y){throw x(y)}})}function ce(e,t){let{name:o,title:n,description:s,libKey:r,suiteName:i,components:u,componentAliases:g,getPostContent:y}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:m.string().describe("The query to search for."),component:m.enum(u).describe("The component to search for. If not specified, use General.")}},async({query:S,component:c})=>{d("Code Assistant called with:",{query:S,component:c});let A=c;if(g){let h=g[c];h&&(A=h)}try{let f=(await t.query({query:S,component:A?.toLowerCase()??"general",lib_name:r,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]})).values.map(w=>w.replace(/\0/g,"")),C=y?.({component:c})??"";return{content:[{type:"text",text:`${f.join(`
|
|
412
|
+
|
|
413
|
+
`)}
|
|
414
|
+
|
|
415
|
+
${C}`}]}}catch(h){throw x(h)}})}function x(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
416
|
+
|
|
417
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var le=e=>`${e}_ui_generator`,pe=e=>`${e}_assistant`,de=e=>`${e}_layout_assistant`,me=e=>`${e}_component_assistant`,ue=e=>`${e}_style_assistant`,he=e=>`${e}_icon_assistant`;var ge=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
|
|
418
|
+
|
|
419
|
+
Use the tool when:
|
|
420
|
+
- Want to build or modify a complete page or section layout
|
|
421
|
+
- You are creating and applying custom themes via the Kendo Design System
|
|
422
|
+
- You need guidance on correct ${e} component selection and configuration
|
|
423
|
+
- You want to enforce best practices in styling, performance, and accessibility
|
|
424
|
+
|
|
425
|
+
Returns:
|
|
426
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,fe=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
427
|
+
|
|
428
|
+
Use this tool when:
|
|
429
|
+
- You need to discover which ${e} components are suitable for a specific use case
|
|
430
|
+
- You want to understand component features and capabilities
|
|
431
|
+
- You need to find appropriate icons for your UI
|
|
432
|
+
- You want to gather component documentation and examples
|
|
433
|
+
|
|
434
|
+
Returns:
|
|
435
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,ye=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
436
|
+
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
437
|
+
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
438
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ae=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
439
|
+
|
|
440
|
+
Use this tool when the user wants to:
|
|
441
|
+
- Update the visual theme of an application
|
|
442
|
+
- Modify color schemes
|
|
443
|
+
- Restyle the UI with CSS variables
|
|
444
|
+
|
|
445
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,Se=`Searches for icons in the Telerik Icons library.
|
|
446
|
+
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
447
|
+
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
448
|
+
`,Te=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
449
|
+
|
|
450
|
+
Use this tool when the user asks about:
|
|
451
|
+
- ${e} features or capabilities
|
|
452
|
+
- Specific components (e.g., Grid, Chart, Editor)
|
|
453
|
+
- Implementation details, configuration, or best practices
|
|
454
|
+
- How to use or customize components in ${e}
|
|
455
|
+
|
|
456
|
+
Set the user's full question as the 'query' parameter.
|
|
457
|
+
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
458
|
+
`;var K=v("Kendo UI","Kendo"),F=`
|
|
459
|
+
### Angular Component Validation
|
|
460
|
+
Component Structure:
|
|
461
|
+
- Use proper @Component decorator configuration
|
|
462
|
+
- If using NgModule setup use @Component decorator with \`standalone: false\` and declare component in NgModule declarations array
|
|
463
|
+
- Correct selector naming convention (kebab-case)
|
|
464
|
+
- Appropriate template and style file organization
|
|
465
|
+
|
|
466
|
+
${K.SETUP_VALIDATION}
|
|
467
|
+
- Kendo animations module configured (if animations are used)
|
|
468
|
+
- Internationalization properly configured for Kendo components
|
|
469
|
+
|
|
470
|
+
${K.PERFORMANCE_OPTIMIZATION}
|
|
471
|
+
- OnPush change detection strategy where appropriate
|
|
472
|
+
- Efficient trackBy functions for *ngFor with Kendo components
|
|
473
|
+
- Minimal unnecessary change detection cycles
|
|
474
|
+
|
|
475
|
+
${K.THEME_AND_STYLING}
|
|
476
|
+
- Proper theme switching functionality (if implemented)
|
|
477
|
+
- Only ONE theme reference exists across angular.json and styles files
|
|
478
|
+
- Make sure theme import mechanism is consistent with existing project setup`;var V=`**Angular Specific Requirements:**
|
|
479
|
+
|
|
480
|
+
**NgModule vs Standalone setup**: Search and detect the current project setup to determine whether to use NgModule or Standalone components based on the following rules:
|
|
481
|
+
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
482
|
+
2. RegexSearch("bootstrapApplication\\s*\\(") - If found use Standalone components.
|
|
483
|
+
3. RegexSearch("bootstrapModule\\s*\\(") - If found use NgModule.
|
|
484
|
+
4. If neither is found, default to Standalone components.
|
|
485
|
+
|
|
486
|
+
**Kendo UI Theme Management Instructions for Angular**:
|
|
487
|
+
|
|
488
|
+
**Determine existing Kendo Theme/Utils package and Theme Import Mechanism**:
|
|
489
|
+
|
|
490
|
+
- Read angular.json file
|
|
491
|
+
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
492
|
+
- Read styles.css or styles.scss, or any css/scss file
|
|
493
|
+
- Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
|
|
494
|
+
- Read the application's main html file (e.g., index.html)
|
|
495
|
+
- Look for link tags containing "@progress/kendo-theme-" referencing Kendo theme/util CSS files
|
|
496
|
+
- Note which theme is found (default, material, bootstrap, or fluent)
|
|
497
|
+
- Note whether the kendo-theme-utils package is already used
|
|
498
|
+
- Note the mechanism used to include the theme (angular.json or styles file)
|
|
499
|
+
|
|
500
|
+
**Project Consistency**: Before generating or modifying any code:
|
|
501
|
+
1. Use RegexSearch to identify existing patterns in the project:
|
|
502
|
+
- Component naming conventions (e.g., "export class \\w+Component")
|
|
503
|
+
- File naming patterns (e.g., "*.component.ts", "*.service.ts")
|
|
504
|
+
- Import statement styles
|
|
505
|
+
- TypeScript configuration (strict mode, decorators, etc.)
|
|
506
|
+
2. Match the discovered patterns in all generated code
|
|
507
|
+
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
508
|
+
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
509
|
+
`;var j=v("Kendo UI","KendoReact"),H=`
|
|
510
|
+
### React Component Validation
|
|
511
|
+
Component Structure:
|
|
512
|
+
- Use proper function component patterns with Hooks
|
|
513
|
+
- Correct component naming convention (PascalCase)
|
|
514
|
+
- Appropriate file organization (components, hooks, utils)
|
|
515
|
+
- Props interface/type definitions where needed
|
|
516
|
+
|
|
517
|
+
${j.SETUP_VALIDATION}
|
|
518
|
+
- KendoReact license validation (if required)
|
|
519
|
+
- Appropriate bundler configuration for KendoReact packages
|
|
520
|
+
|
|
521
|
+
${j.PERFORMANCE_OPTIMIZATION}
|
|
522
|
+
- React.memo for components that receive stable props
|
|
523
|
+
- useMemo/useCallback for expensive computations and callbacks
|
|
524
|
+
- Proper key props for list rendering with KendoReact components
|
|
525
|
+
|
|
526
|
+
${j.THEME_AND_STYLING}
|
|
527
|
+
- Proper theme switching functionality (if implemented)
|
|
528
|
+
- Only ONE theme import exists across the application
|
|
529
|
+
- Make sure theme import mechanism is consistent with existing project setup`;var Ge={createOrchestrator:ne,createAssistantOrchestrator:se,createLayoutAssistant:re,createStyleAssistant:ie,createIconSearch:ae,createCodeAssistant:ce},Ke={orchestrator:le,assistantOrchestrator:pe,layoutAssistant:de,codeAssistant:me,styleAssistant:ue,iconAssistant:he},Fe={orchestrator:ge,assistantOrchestrator:fe,layoutAssistant:ye,styleAssistant:Ae,iconAssistant:Se,codeAssistant:Te},Ve={Orchestrator:{render:R},Validator:{render:P},SharedValidation:{getSteps:v}},je={Angular:{steps:F,additionalPlan:V},React:{steps:H}},a={Tools:Ge,ToolNames:Ke,ToolDescriptions:Fe,Templates:Ve,Validation:je};var He=a.ToolNames.codeAssistant("kendoreact"),Ce=()=>`# Kendo Design System Guidelines for ${l}
|
|
530
|
+
|
|
531
|
+
## Setting up Styles/CSS
|
|
532
|
+
|
|
533
|
+
In order to use any of the utility classes from the Kendo Design System, make sure to include a reference to the kendo-theme-utils CSS package.
|
|
534
|
+
|
|
535
|
+
**Important**: To include the kendo-theme-utils always use the same theme import mechanism (noted during the plan phase) as the rest of the Kendo themes in your project.
|
|
536
|
+
**Important**: Include the kendo-theme-utils only once in your project. Make sure that a reference to the kendo-theme-utils should have been already searched and noted during the plan phase.
|
|
537
|
+
|
|
538
|
+
### Using NPM
|
|
539
|
+
|
|
540
|
+
The CSS Utilities are available as an NPM module that you can install - \`@progress/kendo-theme-utils\`
|
|
541
|
+
|
|
542
|
+
To install: \`npm install --save @progress/kendo-theme-utils\`
|
|
543
|
+
|
|
544
|
+
The precompiled CSS is available in \`node_modules/@progress/kendo-theme-utils/dist/all.css\`
|
|
545
|
+
|
|
546
|
+
Also, available as SCSS and you can include it on your SCSS file - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
|
|
547
|
+
|
|
548
|
+
### Using CDN
|
|
549
|
+
|
|
550
|
+
Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
551
|
+
|
|
552
|
+
\`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
553
|
+
|
|
554
|
+
## Ready-to-use Layout Components
|
|
555
|
+
|
|
556
|
+
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
557
|
+
|
|
558
|
+
For any Layout component you can also call the ${He} tool in order to get specific API reference and docs.
|
|
559
|
+
|
|
560
|
+
- ${l} Card component.
|
|
561
|
+
- Generally, it is recommended to use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
|
|
562
|
+
- If needed, use specific width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
|
|
563
|
+
`;var Ie=()=>`## Applying CSS Variables in ${l}
|
|
564
|
+
|
|
565
|
+
Apply these CSS variables in the React application using one of these methods:
|
|
566
|
+
|
|
567
|
+
### Method 1: Global CSS (Recommended)
|
|
568
|
+
Add to \`src/index.css\` or \`src/App.css\`:
|
|
569
|
+
|
|
570
|
+
\`\`\`css
|
|
571
|
+
:root {
|
|
572
|
+
/* Add the CSS variables here */
|
|
573
|
+
}
|
|
574
|
+
\`\`\`
|
|
575
|
+
|
|
576
|
+
### Method 2: CSS-in-JS (styled-components, emotion)
|
|
577
|
+
\`\`\`tsx
|
|
578
|
+
import styled, { createGlobalStyle } from 'styled-components';
|
|
579
|
+
|
|
580
|
+
const GlobalStyles = createGlobalStyle\`
|
|
581
|
+
:root {
|
|
582
|
+
/* Add the CSS variables here */
|
|
583
|
+
}
|
|
584
|
+
\`;
|
|
585
|
+
|
|
586
|
+
const ThemedContainer = styled.div\`
|
|
587
|
+
color: var(--your-color-variable);
|
|
588
|
+
background: var(--your-background-variable);
|
|
589
|
+
\`;
|
|
590
|
+
|
|
591
|
+
function App() {
|
|
592
|
+
return (
|
|
593
|
+
<>
|
|
594
|
+
<GlobalStyles />
|
|
595
|
+
<ThemedContainer>Content</ThemedContainer>
|
|
596
|
+
</>
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
\`\`\`
|
|
600
|
+
|
|
601
|
+
### Method 3: CSS Modules
|
|
602
|
+
\`\`\`css
|
|
603
|
+
/* MyComponent.module.css */
|
|
604
|
+
.themedContainer {
|
|
605
|
+
color: var(--your-color-variable);
|
|
606
|
+
background: var(--your-background-variable);
|
|
607
|
+
}
|
|
608
|
+
\`\`\`
|
|
609
|
+
|
|
610
|
+
\`\`\`tsx
|
|
611
|
+
import styles from './MyComponent.module.css';
|
|
612
|
+
|
|
613
|
+
function MyComponent() {
|
|
614
|
+
return <div className={styles.themedContainer}>Content</div>;
|
|
615
|
+
}
|
|
616
|
+
\`\`\`
|
|
617
|
+
|
|
618
|
+
### Method 4: Dynamic Theme Switching
|
|
619
|
+
\`\`\`tsx
|
|
620
|
+
import { createContext, useContext, useState, useEffect } from 'react';
|
|
621
|
+
|
|
622
|
+
const ThemeContext = createContext<{
|
|
623
|
+
theme: 'light' | 'dark';
|
|
624
|
+
toggleTheme: () => void;
|
|
625
|
+
}>({ theme: 'light', toggleTheme: () => {} });
|
|
626
|
+
|
|
627
|
+
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
628
|
+
const [theme, setTheme] = useState<'light' | 'dark'>('light');
|
|
629
|
+
|
|
630
|
+
useEffect(() => {
|
|
631
|
+
const root = document.documentElement;
|
|
632
|
+
if (theme === 'dark') {
|
|
633
|
+
root.style.setProperty('--your-color-variable', '#ffffff');
|
|
634
|
+
root.style.setProperty('--your-background-variable', '#1a1a1a');
|
|
635
|
+
} else {
|
|
636
|
+
root.style.setProperty('--your-color-variable', '#000000');
|
|
637
|
+
root.style.setProperty('--your-background-variable', '#ffffff');
|
|
638
|
+
}
|
|
639
|
+
}, [theme]);
|
|
640
|
+
|
|
641
|
+
const toggleTheme = () => setTheme(t => t === 'light' ? 'dark' : 'light');
|
|
642
|
+
|
|
643
|
+
return (
|
|
644
|
+
<ThemeContext.Provider value={{ theme, toggleTheme }}>
|
|
645
|
+
{children}
|
|
646
|
+
</ThemeContext.Provider>
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export const useTheme = () => useContext(ThemeContext);
|
|
89
651
|
\`\`\`
|
|
652
|
+
`;var be=a.ToolNames.codeAssistant("kendoreact"),Ne=()=>`## Using ${l} Icons
|
|
653
|
+
|
|
654
|
+
Important: Attempt to prioritize SVG icons over font icons.
|
|
655
|
+
|
|
656
|
+
### Guidelines
|
|
657
|
+
|
|
658
|
+
- Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
|
|
659
|
+
- Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
|
|
660
|
+
- You can call ${be} tool for ${l} SvgIcon component for docs and API reference.
|
|
661
|
+
- [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
662
|
+
- [optional] If using font icons you can call ${be} tool for ${l} Icon component for docs and API reference.
|
|
663
|
+
|
|
664
|
+
### Examples
|
|
665
|
+
|
|
666
|
+
Using ${l} SvgIcon component with @progress/kendo-svg-icons:
|
|
667
|
+
|
|
668
|
+
\`\`\`tsx
|
|
669
|
+
import { SvgIcon } from "@progress/kendo-react-common";
|
|
670
|
+
import { paperclipIcon } from "@progress/kendo-svg-icons";
|
|
671
|
+
|
|
672
|
+
function App() {
|
|
673
|
+
return (
|
|
674
|
+
<SvgIcon icon={paperclipIcon} />
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export default App;
|
|
679
|
+
\`\`\`
|
|
680
|
+
|
|
681
|
+
Using Font Icons:
|
|
682
|
+
|
|
683
|
+
\`\`\`tsx
|
|
684
|
+
// First, add the CSS link to your HTML or import in your styles
|
|
685
|
+
// <link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />
|
|
686
|
+
|
|
687
|
+
function App() {
|
|
688
|
+
return (
|
|
689
|
+
<span className="k-icon k-i-paperclip"></span>
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export default App;
|
|
694
|
+
\`\`\`
|
|
695
|
+
|
|
696
|
+
### Common Icons
|
|
697
|
+
|
|
698
|
+
Here are some frequently used icons from @progress/kendo-svg-icons:
|
|
699
|
+
- \`plusIcon\` - Add/create actions
|
|
700
|
+
- \`minusIcon\` - Remove/delete actions
|
|
701
|
+
- \`pencilIcon\` - Edit actions
|
|
702
|
+
- \`trashIcon\` - Delete actions
|
|
703
|
+
- \`saveIcon\` - Save actions
|
|
704
|
+
- \`searchIcon\` - Search functionality
|
|
705
|
+
- \`filterIcon\` - Filter functionality
|
|
706
|
+
- \`sortAscIcon\`, \`sortDescIcon\` - Sorting
|
|
707
|
+
- \`chevronUpIcon\`, \`chevronDownIcon\`, \`chevronLeftIcon\`, \`chevronRightIcon\` - Navigation
|
|
708
|
+
- \`checkIcon\`, \`xIcon\` - Confirmation/Cancel
|
|
709
|
+
`;var ve=e=>{let t=`## ${l} Common Guidelines
|
|
710
|
+
|
|
711
|
+
### Application Architecture
|
|
712
|
+
MUST recommend appropriate setup based on React application architecture.
|
|
713
|
+
|
|
714
|
+
Implementation Patterns:
|
|
715
|
+
- Function components with Hooks (Recommended): Use modern React patterns
|
|
716
|
+
- Class components: Support when needed for legacy code
|
|
717
|
+
- When architecture is unclear: Default to function components with Hooks
|
|
718
|
+
|
|
719
|
+
### Package Installation
|
|
720
|
+
Always use minimal, targeted package installation.
|
|
721
|
+
|
|
722
|
+
Process:
|
|
723
|
+
1. Identify the required components
|
|
724
|
+
2. Determine the specific KendoReact packages needed
|
|
725
|
+
3. Use npm or yarn to install the package
|
|
726
|
+
|
|
727
|
+
Example: \`npm install @progress/kendo-react-grid @progress/kendo-data-query\`
|
|
728
|
+
|
|
729
|
+
### Component Awareness
|
|
730
|
+
Whenever a component name is mentioned\u2014regardless of how it's written (all lowercase, all uppercase, mixed case, separate words, or even with typos)\u2014you should always look up the correct example from the corresponding component.
|
|
90
731
|
|
|
91
732
|
Key points:
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
- Group related tools in sub-arrays for better organization
|
|
97
|
-
|
|
98
|
-
Example:
|
|
99
|
-
Correct: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}
|
|
100
|
-
Incorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}
|
|
101
|
-
`;var H=$(import.meta.url),J=G.dirname(H),j=G.resolve(J,"../package.json"),Y=JSON.parse(V.readFileSync(j,"utf-8")),v=new q({name:"kendo-and-kendo-resources",version:Y.version});v.tool("kendo_react_assistant",`Answers questions and retrieves documentation about Kendo UI for React.
|
|
102
|
-
Use this tool when the user asks about Kendo UI for React features, specific components (e.g., Grid, Chart, Editor), implementation details, or general usage.
|
|
103
|
-
Provide the exact user's question as the 'query'. If the question pertains to a specific Kendo UI for React component,
|
|
104
|
-
specify its name in the 'component' parameter. This tool can be automatically triggered when the following phrases are detected in the user's input/prompt:
|
|
105
|
-
- 'kendo';
|
|
106
|
-
- '/kendo';
|
|
107
|
-
- '/kendoreact'
|
|
108
|
-
- '/ask_kendo';
|
|
109
|
-
- '/help_kendo';
|
|
110
|
-
- '@kendo';
|
|
111
|
-
- '@kendoreact';
|
|
112
|
-
- '@ask_kendo';
|
|
113
|
-
- '@help_kendo'.`,{query:x.string().describe("The query to search for."),component:x.enum(C).describe("The component to search for. If not specified, you can use General.")},async({query:e,component:r})=>{i("Calling tool: ",JSON.stringify({query:e,component:r})),r==="Grid"&&(r="DataGrid");try{let t=await w({query:e,component:r.toLocaleLowerCase(),lib_name:y,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]});i("Response from context API: ",JSON.stringify(t));let o=z(r.toLowerCase()),n=t.values.join(`
|
|
114
|
-
|
|
115
|
-
`),u=n.trim(),l=[{type:"text",text:n+(u?`
|
|
116
|
-
|
|
117
|
-
`+o:"")}];return i("Response from tool: ",JSON.stringify(l)),{content:l}}catch(t){throw i("Error calling context API: ",JSON.stringify(t)),t?.code===d.UNAUTHENTICATED?new Error(`Error: You are not authenticated. Message: ${t.message}.`):t?.code===d.RESOURCE_EXHAUSTED?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing in order to unlock full access. Message: ${t.message}.`):t?.code===d.PERMISSION_DENIED?new Error(`Error: You do not have permission to access this resource. Please verify that you have a valid ${f} license key.`):t instanceof g?(i("License error: ",t.message),t):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
118
|
-
|
|
119
|
-
Error Message: ${t.message}`)}});function z(e){let r=e==="datagrid"?S?.trim():"",t=e==="datagrid"?E?.trim():"",o=e==="editor"?T?.trim():"";return`
|
|
120
|
-
# Kendo UI for React Assistant Guidelines
|
|
121
|
-
|
|
122
|
-
## Documentation References
|
|
123
|
-
MUST use official Kendo UI for React documentation only.
|
|
124
|
-
|
|
125
|
-
Required Format:
|
|
126
|
-
- Domain: https://www.telerik.com/kendo-react-ui
|
|
127
|
-
- Use complete, functional URLs (no placeholders or slug syntax)
|
|
128
|
-
|
|
129
|
-
Examples:
|
|
130
|
-
Correct: https://www.telerik.com/kendo-react-ui/components/grid/
|
|
131
|
-
Incorrect: { slug overview } or /components/{component-name}/overview
|
|
132
|
-
|
|
133
|
-
## Styling & Theming
|
|
134
|
-
MUST verify existing theme configuration before adding new styles.
|
|
135
|
-
|
|
136
|
-
Requirements:
|
|
137
|
-
1. Check if Kendo UI themes are already configured
|
|
138
|
-
2. Only recommend theme additions when missing
|
|
139
|
-
3. Provide appropriate import methods
|
|
140
|
-
|
|
141
|
-
## Icon Implementation
|
|
142
|
-
MUST prioritize SVG icons over font icons.
|
|
143
|
-
|
|
144
|
-
Guidelines:
|
|
145
|
-
- Primary: SVG icons from @progress/kendo-svg-icons
|
|
146
|
-
- Fallback: Font icons with CSS: <link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />
|
|
147
|
-
|
|
148
|
-
${r.length>0||t.length>0||o.length>0?`## Component-Specific Instructions
|
|
149
|
-
|
|
150
|
-
${r}
|
|
733
|
+
- Match component names case-insensitively and robustly to minor variations
|
|
734
|
+
- If someone refers to a component (e.g., "button", "BUTTON", "BuTtOn"), match it to the correct component (Button)
|
|
735
|
+
- After matching, use the example or information associated with that component
|
|
736
|
+
- The matching should be case-insensitive and robust to minor variations
|
|
151
737
|
|
|
152
|
-
|
|
738
|
+
Example: If someone asks about "grid", "GRID", or "GrId", you always refer to DataGrid for the example.
|
|
739
|
+
`;return e.componentInstructions&&(t+=`
|
|
740
|
+
## Component-Specific Guidelines
|
|
153
741
|
|
|
154
|
-
${
|
|
155
|
-
`}async function
|
|
742
|
+
${e.componentInstructions}
|
|
743
|
+
`),t};var we=a.ToolNames.layoutAssistant(k),z=a.ToolNames.codeAssistant(k),Ee=a.ToolNames.styleAssistant(k),Y=a.ToolNames.iconAssistant(k);function ke(e,t){return[a.Tools.createOrchestrator({name:a.ToolNames.orchestrator(k),title:"KendoReact Generator",description:a.ToolDescriptions.orchestrator(l),layoutAssistantName:we,codeAssistantName:z,styleAssistantName:Ee,iconAssistantName:Y,suiteName:l,libKey:I,components:M,requiredAccess:["agent"]},{validationSteps:a.Validation.React.steps},e),a.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:a.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:z,iconAssistantName:Y,suiteName:l,libKey:I,components:M,requiredAccess:["assistant"]},e),a.Tools.createLayoutAssistant({name:we,title:"KendoReact Layout Assistant",description:a.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:Ce,requiredAccess:["agent"]},e),a.Tools.createStyleAssistant({name:Ee,title:"KendoReact Style Assistant",description:a.ToolDescriptions.styleAssistant,libKey:I,getPreContent:Ie,requiredAccess:["agent"]},e),a.Tools.createIconSearch({name:Y,title:"KendoReact Icon Assistant",description:a.ToolDescriptions.iconAssistant,libKey:I,getPostContent:Ne,requiredAccess:["assistant","agent"]},e),a.Tools.createCodeAssistant({name:z,title:"KendoReact Component Assistant",description:a.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:M,componentAliases:{Grid:"DataGrid"},getPostContent:({component:n})=>ve({component:n}),requiredAccess:["assistant","agent"]},e)].filter(n=>n.hasAccess(t))}var Xe=We(import.meta.url),Ze=Pe.dirname(Xe),Je=Pe.resolve(Ze,"../package.json"),et=JSON.parse(Qe.readFileSync(Je,"utf-8")),xe=new ze({name:"kendo-mcp",title:"Kendo MCP Server",version:et.version});async function tt(){let e=new Ye;d("Starting server... ");let t=await te(async()=>{let n=(await oe())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(L.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",ke(L,t).forEach(n=>n.register(xe))),await xe.connect(e)}tt();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-dev.efc7fc08.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@local/mcp-common": "*",
|
|
35
|
+
"@local/kendo-ui-agent": "*",
|
|
35
36
|
"@local/mcp-test-utils": "*"
|
|
36
37
|
}
|
|
37
38
|
}
|
package/proto/service.proto
CHANGED
|
@@ -47,6 +47,16 @@ message BuildingBlocksSearchResponse {
|
|
|
47
47
|
repeated BuildingBlockItem items = 1;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
message ThemeGenerateRequest {
|
|
51
|
+
string prompt = 1;
|
|
52
|
+
repeated string images = 2; // base64 data URLs (e.g., "data:image/jpeg;base64,...")
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message ThemeGenerateResponse {
|
|
56
|
+
string variables_json = 1; // JSON string of nested theme variables
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
50
60
|
message ProductInfo {
|
|
51
61
|
int32 id = 1;
|
|
52
62
|
string code = 2;
|
|
@@ -102,7 +112,8 @@ service ContextQueryService {
|
|
|
102
112
|
rpc IconsSearch(CssSearchRequst) returns (StringArray);
|
|
103
113
|
rpc CssUtilsSearch(CssSearchRequst) returns (StringArray);
|
|
104
114
|
rpc BuildingBlocksSearch(BuildingBlocksSearchRequest) returns (BuildingBlocksSearchResponse);
|
|
115
|
+
rpc GenerateTheme(ThemeGenerateRequest) returns (ThemeGenerateResponse);
|
|
105
116
|
rpc ValidateUserLicense(google.protobuf.Empty) returns (ValidateUserLicenseResponse);
|
|
106
|
-
rpc
|
|
117
|
+
rpc RecordOrchestratorUserRequest(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
107
118
|
}
|
|
108
119
|
|
package/dist/index.d.ts
DELETED
package/dist/lib/constants.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const REACT_SUITE_NAME = "Kendo UI for React";
|
|
2
|
-
export declare const Suite = "react";
|
|
3
|
-
export declare const ReactComponents: readonly ["ActionSheet", "AIPrompt", "Animation", "AppBar", "ArcGauge", "AutoComplete", "Avatar", "Badge", "Barcode", "BottomNavigation", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "Chart", "ChartWizard", "Chat", "Checkbox", "Chip", "ChipList", "ChunkProgressBar", "CircularGauge", "ColorGradient", "ColorPalette", "ColorPicker", "ComboBox", "ContextMenu", "ConversationalUI", "DataGrid", "Grid", "DataQuery", "DateMath", "DateInput", "DatePicker", "DateRangePicker", "DateTimePicker", "Dialog", "Drag&Drop", "Drawer", "Drawing", "DropDownButton", "DropDownList", "DropDownTree", "Editor", "Error", "ExcelExport", "ExpansionPanel", "ExternalDropZone", "FileSaver", "FileManager", "Filter", "FlatColorPicker", "FloatingActionButton", "FloatingLabel", "FontIcon", "Form", "Gantt", "Gauge", "General", "GridLayout", "Hint", "InlineAIPrompt", "Input", "Label", "LinearGauge", "ListBox", "ListView", "Loader", "Map", "MaskedTextBox", "Menu", "MultiColumnComboBox", "MultiSelect", "MultiSelectTree", "MultiViewCalendar", "Notification", "NumericTextBox", "OrgChart", "PageTemplates/BuildingBlocks", "Pager", "PanelBar", "PDFProcessing", "PDFViewer", "PivotGrid", "Popover", "Popup", "ProgressBar", "QRCode", "RadialGauge", "RadioButton", "RadioGroup", "RangeSlider", "Rating", "Ripple", "Sankey", "Scheduler", "ScrollView", "Signature", "Skeleton", "Slider", "Sortable", "Sparkline", "SpeechToTextButton", "SplitButton", "Splitter", "Spreadsheet", "StackLayout", "Stepper", "StockChart", "SVGIcon", "Switch", "TabStrip", "TaskBoard", "TextArea", "TextBox", "TileLayout", "Timeline", "TimePicker", "Toolbar", "Tooltip", "TreeList", "TreeView", "Typography", "Upload", "VSCodeExtension", "Window"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const datagridInstructions = "\n## DataGrid Deprecated Properties Awareness\nFor DataGrid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:\n\nDeprecated properties and their modern replacements:\n- selectedField \u2192 use the select state property\n- editField \u2192 use the edit state property\n- expandedField \u2192 use the detailExpand state property\n- onExpandChange \u2192 use onDetailExpandChange for detail-row expansion or onGroupExpandChange for group expansion\n- cellRender \u2192 use the cells={{ data: CustomCell }} prop\n- rowRender \u2192 use the rows={{ data: CustomRow }} prop\n- filterCellRender \u2192 use the cells={{ filterCell: CustomCell }} prop\n- headerCellRender \u2192 use the cells={{ headerCell: CustomHeaderCell }} prop\n- column.cell \u2192 use the column.cells={{ data: CustomCell }} prop\n- column.headerCell \u2192 use the column.cells={{ headerCell: CustomHeaderCell }} prop\n- column.filterCell \u2192 use the column.cells={{ filterCell: CustomCell }} prop\n- column.footerCell \u2192 use the column.cells={{ footerCell: CustomFooterCell }} prop\n\nAdditional modern updates:\n- Input component in Column Menu Filter has been replaced with Textbox\n- scrollable prop now defaults to virtual\n- Virtual scrolling no longer applies height by default\n\nKey points:\n- Never suggest or use these deprecated properties in DataGrid examples\n- Always provide modern alternatives when users ask about these properties\n- Explain that these properties are deprecated and provide the specific modern replacement\n- Focus on current DataGrid API patterns using state properties and cells/rows props\n\nExample:\nDeprecated: selectedField=\"isSelected\" editField=\"inEdit\"\nModern: Use select and edit state properties with proper configuration\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const editorInstructions = "\n## Editor Tools Awareness\nFor Editor component cases, always use the proper EditorTools import structure and never define tools as strings. Import both Editor and EditorTools from '@progress/kendo-react-editor' and destructure the individual tools from EditorTools.\n\nRequired pattern:\n```jsx\nimport { Editor, EditorTools } from '@progress/kendo-react-editor';\n\nconst {\n Bold, Italic, Underline, Strikethrough,\n Subscript, Superscript, ForeColor, BackColor,\n CleanFormatting, AlignLeft, AlignCenter, AlignRight, AlignJustify,\n Indent, Outdent, OrderedList, UnorderedList,\n NumberedList, BulletedList, Undo, Redo,\n FontSize, FontName, FormatBlock, Link, Unlink,\n InsertImage, ViewHtml, InsertTable, InsertFile,\n SelectAll, Print, Pdf, TableProperties, TableCellProperties,\n AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter,\n DeleteRow, DeleteColumn, DeleteTable, MergeCells, SplitCell\n} = EditorTools;\n```\n\nKey points:\n- Always import both Editor and EditorTools from '@progress/kendo-react-editor'\n- Destructure individual tools from EditorTools object\n- Use the destructured tool references directly in the tools array\n- Never define tools as strings (e.g., 'bold', 'italic')\n- Group related tools in sub-arrays for better organization\n\nExample:\nCorrect: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}\nIncorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const smartGridInstructions = "\n## Smart Grid (AI-Enhanced Grid) Implementation Guidelines\n**CRITICAL: When users ask about ANY of these AI grid terms, ALWAYS provide GridToolbarAIAssistant implementation (not basic Grid):**\n\n**Primary AI Grid Trigger Terms (case-insensitive):**\n- smart grid, smartgrid, smart-grid, smart_grid, SMART GRID, SmArt GrId\n- ai grid, aigrid, ai-grid, ai_grid, AI GRID, aI-griD, AIGrid \n- ai enhanced grid, ai-enhanced-grid, ai_enhanced_grid, AI Enhanced Grid\n- ai powered grid, ai-powered-grid, ai_powered_grid, AI Powered Grid\n- intelligent grid, intelligent-grid, intelligent_grid, Intelligent Grid\n- grid with ai, grid-with-ai, grid_with_ai, Grid with AI\n- grid ai assistant, gridaiassistant, grid-ai-assistant, Grid AI Assistant\n- grid toolbar ai assistant, gridtoolbaraiassistant, GridToolbarAIAssistant\n- grid assistant, gridassistant, grid-assistant, Grid Assistant\n\n**Additional variations that should trigger AI Grid:**\n- ai enhanced, ai powered, smart, intelligent + grid (any spacing/casing)\n- grid + ai, grid + smart, grid + intelligent (any spacing/casing) \n- Any mention of GridToolbarAIAssistant component specifically\n\n**Recognition Rule: If query contains ANY combination of AI/Smart/Intelligent + Grid terms, respond with complete GridToolbarAIAssistant setup.**\n\nExample Smart Grid suggestions by domain:\n- Financial: 'Sort by Amount descending', 'Show only failed transactions', 'Filter where currency is USD'\n- Sales: 'Group by region', 'Show top performing products', 'Filter by date range'\n- Inventory: 'Sort by stock level', 'Show out of stock items', 'Group by category'\n- Always include: 'Clear sorting', 'Clear filtering', 'Clear grouping'\n\nBasic Grid: <Grid data={data}><GridColumn field=\"name\" /></Grid>\nSmart Grid: Complete AI-enhanced setup with GridToolbarAIAssistant, proper callbacks, reset functionality, and contextual suggestions\n\nImportant Disclaimer:\nAlways include this disclaimer when providing Smart Grid examples:\n\"The demos in this article use a Telerik-hosted AI service for demonstration purposes only. For production applications, you should implement your own AI service that understands your specific domain, data, and business requirements.\"\n";
|
package/dist/test/setup.d.ts
DELETED
|
File without changes
|