gemini-design-mcp 3.12.4 → 3.12.5
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.
|
@@ -9,15 +9,13 @@ export const createFrontendSchema = {
|
|
|
9
9
|
techStack: z.string().describe("The tech stack to use. Be specific. " +
|
|
10
10
|
"Examples: 'React + TypeScript + Tailwind CSS', 'Next.js 14 App Router + shadcn/ui', 'Vue 3 + Composition API + CSS Modules'"),
|
|
11
11
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
12
|
-
"This
|
|
13
|
-
"Do NOT summarize
|
|
14
|
-
context: z.string().describe("REQUIRED:
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"5) Package.json dependencies if relevant. " +
|
|
20
|
-
"The MORE context you provide, the BETTER the result will match your project."),
|
|
12
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
13
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
14
|
+
context: z.string().describe("REQUIRED: Functional/business context for what you're creating. " +
|
|
15
|
+
"What is the PURPOSE of this page/component? What should it DO? " +
|
|
16
|
+
"Include: user flow, features needed, data it displays, actions it performs, " +
|
|
17
|
+
"how it fits in the app, business requirements. " +
|
|
18
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
21
19
|
};
|
|
22
20
|
export async function createFrontend(params) {
|
|
23
21
|
const { request, techStack, designSystem, context } = params;
|
|
@@ -31,7 +29,7 @@ ${designSystem}
|
|
|
31
29
|
|
|
32
30
|
---
|
|
33
31
|
|
|
34
|
-
##
|
|
32
|
+
## FUNCTIONAL CONTEXT (what it should DO):
|
|
35
33
|
|
|
36
34
|
${context}
|
|
37
35
|
|
|
@@ -42,7 +40,7 @@ TECH STACK: ${techStack}
|
|
|
42
40
|
CRITICAL RULES:
|
|
43
41
|
- Copy EXACTLY the Tailwind classes, colors, spacing, border-radius from the design system above.
|
|
44
42
|
- NEVER invent new values. The new component must look EXACTLY like the design system.
|
|
45
|
-
-
|
|
43
|
+
- Implement the functional requirements from the context above.
|
|
46
44
|
|
|
47
45
|
Remember: Return a COMPLETE, functional file ready to use.`.trim();
|
|
48
46
|
|
|
@@ -11,15 +11,13 @@ export const modifyFrontendSchema = {
|
|
|
11
11
|
"Pass only the relevant component/element that needs redesigning. " +
|
|
12
12
|
"This helps Gemini focus on exactly what to change."),
|
|
13
13
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
14
|
-
"This
|
|
15
|
-
"Do NOT summarize
|
|
16
|
-
context: z.string().describe("REQUIRED:
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"5) Any utilities or helpers used. " +
|
|
22
|
-
"The MORE context you provide, the BETTER the modification will match your project."),
|
|
14
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
15
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
16
|
+
context: z.string().describe("REQUIRED: Functional context for the modification. " +
|
|
17
|
+
"WHY are you making this change? What is the PURPOSE? " +
|
|
18
|
+
"Include: what the component should do after modification, user flow changes, " +
|
|
19
|
+
"new features or behaviors expected, business requirements. " +
|
|
20
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
23
21
|
};
|
|
24
22
|
export async function modifyFrontend(params) {
|
|
25
23
|
const { modification, targetCode, designSystem, context } = params;
|
|
@@ -33,7 +31,7 @@ ${designSystem}
|
|
|
33
31
|
|
|
34
32
|
---
|
|
35
33
|
|
|
36
|
-
##
|
|
34
|
+
## FUNCTIONAL CONTEXT (why this modification):
|
|
37
35
|
|
|
38
36
|
${context}
|
|
39
37
|
|
|
@@ -49,7 +47,7 @@ MODIFICATION REQUESTED: ${modification}
|
|
|
49
47
|
CRITICAL RULES:
|
|
50
48
|
- Copy EXACTLY the Tailwind classes, colors, spacing, border-radius from the design system above.
|
|
51
49
|
- NEVER invent new values. The modified code must look EXACTLY like the design system.
|
|
52
|
-
-
|
|
50
|
+
- Implement the functional requirements from the context above.
|
|
53
51
|
|
|
54
52
|
Remember: Return ONLY the find/replace block. ONE modification, surgical precision.`.trim();
|
|
55
53
|
|
|
@@ -11,15 +11,13 @@ export const snippetFrontendSchema = {
|
|
|
11
11
|
techStack: z.string().describe("The tech stack being used. " +
|
|
12
12
|
"Examples: 'React + TypeScript + Tailwind CSS', 'Vue 3 + Composition API'"),
|
|
13
13
|
designSystem: z.string().describe("REQUIRED: Copy-paste the ENTIRE content of design-system.md here. " +
|
|
14
|
-
"This
|
|
15
|
-
"Do NOT summarize
|
|
16
|
-
context: z.string().describe("REQUIRED:
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"5) Any utilities, hooks, or helpers used in the project. " +
|
|
22
|
-
"The MORE context you provide, the BETTER the snippet will integrate."),
|
|
14
|
+
"This contains ALL visual/design information: colors, typography, spacing, components styling, etc. " +
|
|
15
|
+
"Do NOT summarize - paste the FULL file content as-is."),
|
|
16
|
+
context: z.string().describe("REQUIRED: Functional context for this snippet. " +
|
|
17
|
+
"What is the PURPOSE of this snippet? What should it DO? " +
|
|
18
|
+
"Include: its role in the app, what data it handles, what actions it performs, " +
|
|
19
|
+
"how it interacts with other parts of the app, business requirements. " +
|
|
20
|
+
"Do NOT include design/styling info here - that goes in designSystem."),
|
|
23
21
|
insertionContext: z.string().describe("WHERE in the file this snippet will go. " +
|
|
24
22
|
"Example: 'Inside the Dashboard component, after the header section.'"),
|
|
25
23
|
};
|
|
@@ -35,7 +33,7 @@ ${designSystem}
|
|
|
35
33
|
|
|
36
34
|
---
|
|
37
35
|
|
|
38
|
-
##
|
|
36
|
+
## FUNCTIONAL CONTEXT (what this snippet should DO):
|
|
39
37
|
|
|
40
38
|
${context}
|
|
41
39
|
|
|
@@ -49,7 +47,7 @@ ${insertionContext}
|
|
|
49
47
|
CRITICAL RULES:
|
|
50
48
|
- Copy EXACTLY the Tailwind classes, colors, spacing, border-radius from the design system above.
|
|
51
49
|
- NEVER invent new values. The snippet must look EXACTLY like the design system.
|
|
52
|
-
-
|
|
50
|
+
- Implement the functional requirements from the context above.
|
|
53
51
|
|
|
54
52
|
Generate a snippet that will integrate smoothly at this location.`.trim();
|
|
55
53
|
|