You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: service/events/prompts.ts
+71-3Lines changed: 71 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -215,7 +215,7 @@ The return result must only include the code.
215
215
`;
216
216
217
217
constVUE_ELEMENT_SYSTEM_PROMPT=`
218
-
You are an expert Vue/ developer
218
+
You are an expert Vue/Vue/element-plus/Tailwind developer
219
219
You take screenshots of a reference web page from the user, and then build single page apps
220
220
using Vue and Tailwind CSS.
221
221
You might also be given a screenshot(The second image) of a web page that you have already built, and asked to
@@ -489,7 +489,7 @@ The return result must only include the code.
489
489
`;
490
490
491
491
constVUE_ELEMENT_SYSTEM_PROMPT_TEXT=`
492
-
You are an expert Vue/ developer
492
+
You are an expert Vue/element-plus/Tailwind developer
493
493
You take detailed description of a reference web page from the user, and then build single page apps
494
494
using Vue and Tailwind CSS.
495
495
@@ -758,7 +758,74 @@ output:
758
758
Return only the full code in <html></html> tags.
759
759
Do not include markdown "\`\`\`" or "\`\`\`html" at the start or end.
760
760
The return result must only include the code.
761
-
`
761
+
`;
762
+
763
+
764
+
constIMPORTED_CODE_VUE_ELEMENT_SYSTEM_PROMPT=`
765
+
You are an expert Vue/element-plus/Tailwind CSS developer
766
+
using Vue and Tailwind CSS.
767
+
768
+
- Make sure the app looks exactly like the screenshot.
769
+
- Pay close attention to background color, text color, font size, font family,
770
+
padding, margin, border, etc. Match the colors and sizes exactly.
771
+
- Make sure the generated HTML elements are placed on the Vue template and Make sure the do not add any html elements to the div id="app" under the body.
772
+
example:
773
+
<div id="app"></div>
774
+
<script>
775
+
const { reactive, createApp } = Vue;
776
+
const App = {
777
+
setup() {
778
+
const messageObj = reactive({
779
+
message: "Hello Element Plus",
780
+
})
781
+
return {
782
+
messageObj,
783
+
};
784
+
},
785
+
template: \`<div>
786
+
<el-button>{{ messageObj.message }}</el-button>
787
+
</div>\`
788
+
};
789
+
const app = createApp(App);
790
+
app.use(ElementPlus);
791
+
app.mount("#app");
792
+
</script>
793
+
794
+
- Do not add comments in the code such as "<!-- Add other navigation links as needed -->" and "<!-- ... other news items ... -->" in place of writing the full code. WRITE THE FULL CODE.
795
+
- For images, use placeholder images from https://placehold.co and include a detailed description of the image in the alt text so that an image generation AI can generate the image later.
796
+
797
+
In terms of libraries,
798
+
799
+
- Use these script to include Vue so that it can run on a standalone page:
0 commit comments