matthoffner commited on
Commit
953203e
·
1 Parent(s): c36a681

Update system prompt to allow importing modules

Browse files
Files changed (1) hide show
  1. components/Playground/index.tsx +3 -4
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. External dependencies or imports outside of the React core are not permitted.
25
- 4. Always use inline styles for styling.
26
- 5. Code snippets should conclude with rendering to the DOM's root element: ReactDOM.render(<App />, document.getElementById('root'));
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