openmagic 0.19.0 → 0.20.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/dist/cli.js CHANGED
@@ -904,12 +904,13 @@ You MUST respond with valid JSON in this exact format:
904
904
  ## Rules
905
905
  1. The \`search\` field must contain the EXACT text from the source file \u2014 copy it precisely, including whitespace and indentation
906
906
  2. Keep modifications minimal \u2014 change only what's needed
907
- 3. If you need to read a file first, say so in the explanation and the developer can provide it
908
- 4. For style changes, prefer modifying existing CSS/Tailwind classes over adding inline styles
907
+ 3. If the grounded files don't contain the element you need to modify, return: {"modifications":[],"explanation":"NEED_FILE: path/to/file.tsx"} \u2014 the system will automatically read it and retry
908
+ 4. For style changes, prefer modifying existing CSS/Tailwind classes over adding inline styles. Check the dependencies to know if the project uses Tailwind, MUI, etc.
909
909
  5. Always preserve the existing code style and conventions
910
910
  6. If the change involves multiple files, include all modifications in the array
911
911
  7. ALWAYS respond with the JSON format above, even for explanations (put them in the "explanation" field)
912
- 8. If you cannot make the requested change, set modifications to an empty array and explain why`;
912
+ 8. Use the selected element's cssSelector, className, parentContainerStyles, and siblings to understand the layout context before making changes
913
+ 9. Use the page URL and componentHint to identify the correct source file`;
913
914
  function buildContextParts(context) {
914
915
  const parts = {};
915
916
  if (context.selectedElement) {
@@ -1400,7 +1401,7 @@ async function handleLlmChat(params, onChunk, onDone, onError) {
1400
1401
  }
1401
1402
 
1402
1403
  // src/server.ts
1403
- var VERSION = "0.19.0";
1404
+ var VERSION = "0.20.0";
1404
1405
  var __dirname = dirname2(fileURLToPath(import.meta.url));
1405
1406
  function attachOpenMagic(httpServer, roots) {
1406
1407
  function handleRequest(req, res) {
@@ -1933,7 +1934,7 @@ process.on("uncaughtException", (err) => {
1933
1934
  process.exit(1);
1934
1935
  });
1935
1936
  var childProcesses = [];
1936
- var VERSION2 = "0.19.0";
1937
+ var VERSION2 = "0.20.0";
1937
1938
  function ask(question) {
1938
1939
  const rl = createInterface({ input: process.stdin, output: process.stdout });
1939
1940
  return new Promise((resolve3) => {