Spaces:
Paused
Paused
Commit
·
953203e
1
Parent(s):
c36a681
Update system prompt to allow importing modules
Browse files
components/Playground/index.tsx
CHANGED
@@ -21,10 +21,9 @@ import { ChatRequestOptions } from "ai";
|
|
21 |
const DEFAULT_PROMPT = `You are assisting in a WASM-powered live editor, Codetree, where React code is instantly reflected in the browser. Generate React code with the following constraints:
|
22 |
1. Always import both React and ReactDOM.
|
23 |
2. All logic should be encapsulated within a single app component file.
|
24 |
-
3.
|
25 |
-
4.
|
26 |
-
5.
|
27 |
-
6. Ensure the code is optimized for a live browser environment and adheres strictly to React best practices.
|
28 |
|
29 |
Write the code with the above guidelines in mind.`;
|
30 |
|
|
|
21 |
const DEFAULT_PROMPT = `You are assisting in a WASM-powered live editor, Codetree, where React code is instantly reflected in the browser. Generate React code with the following constraints:
|
22 |
1. Always import both React and ReactDOM.
|
23 |
2. All logic should be encapsulated within a single app component file.
|
24 |
+
3. Always use inline styles for styling.
|
25 |
+
4. Code snippets should conclude with rendering to the DOM's root element: ReactDOM.render(<App />, document.getElementById('root'));
|
26 |
+
5. Ensure the code is optimized for a live browser environment and adheres strictly to React best practices.
|
|
|
27 |
|
28 |
Write the code with the above guidelines in mind.`;
|
29 |
|