@lasso-ai/cli 1.3.3 → 1.3.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.
Files changed (2) hide show
  1. package/dist/cli/agent.js +21 -11
  2. package/package.json +1 -3
package/dist/cli/agent.js CHANGED
@@ -19,7 +19,15 @@ const node_path_1 = __importDefault(require("node:path"));
19
19
  const node_child_process_1 = require("node:child_process");
20
20
  const node_util_1 = require("node:util");
21
21
  const auth_1 = require("./auth");
22
- const layout_intelligence_1 = require("@lasso-ai/layout-intelligence");
22
+ // Optional layout-intelligence support (local dev only)
23
+ let searchLayouts = null;
24
+ try {
25
+ const layoutModule = require("@lasso-ai/layout-intelligence");
26
+ searchLayouts = layoutModule.searchLayouts;
27
+ }
28
+ catch {
29
+ // layout-intelligence not available in production builds
30
+ }
23
31
  const execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
24
32
  const execAsync = (0, node_util_1.promisify)(node_child_process_1.exec);
25
33
  function detectProjectStructure(cwd) {
@@ -1003,21 +1011,23 @@ async function proposeChanges(cwd, input, config, signal, onProgress, onPrompt)
1003
1011
  : "";
1004
1012
  // Detect project structure for instruction
1005
1013
  const structure = detectProjectStructure(cwd);
1006
- // Query layout intelligence for relevant patterns
1014
+ // Query layout intelligence for relevant patterns (if available)
1007
1015
  let layoutContext = "";
1008
- try {
1009
- const layoutQuery = input.instruction;
1010
- const relevantLayouts = await (0, layout_intelligence_1.searchLayouts)(layoutQuery);
1011
- if (relevantLayouts.length > 0) {
1012
- layoutContext = `\n\nLAYOUT INTELLIGENCE:
1016
+ if (searchLayouts) {
1017
+ try {
1018
+ const layoutQuery = input.instruction;
1019
+ const relevantLayouts = await searchLayouts(layoutQuery);
1020
+ if (relevantLayouts.length > 0) {
1021
+ layoutContext = `\n\nLAYOUT INTELLIGENCE:
1013
1022
  Based on your request, here are relevant layout patterns you should consider:
1014
1023
  ${relevantLayouts.slice(0, 3).map((result) => `- ${result.pattern.name}: ${result.pattern.description}`).join("\n")}
1015
1024
  Use these patterns as inspiration for your implementation. Focus on matching the layout structure, spacing, and composition principles.`;
1025
+ }
1026
+ }
1027
+ catch (error) {
1028
+ // Layout intelligence is optional; continue without it if it fails
1029
+ console.warn("Layout intelligence query failed:", error);
1016
1030
  }
1017
- }
1018
- catch (error) {
1019
- // Layout intelligence is optional; continue without it if it fails
1020
- console.warn("Layout intelligence query failed:", error);
1021
1031
  }
1022
1032
  const instruction = `Selection context:
1023
1033
  ${JSON.stringify(input.element, null, 2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lasso-ai/cli",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Select any part of your running app, describe a change, and let AI edit the real source code.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cli/index.js",
@@ -76,8 +76,6 @@
76
76
  "@iconify-icons/logos": "^2.0.1",
77
77
  "@iconify-json/logos": "^1.2.14",
78
78
  "@iconify/utils": "^3.1.7",
79
- "@lasso-ai/cli": "link:",
80
- "@lasso-ai/layout-intelligence": "file:../layout-intelligence",
81
79
  "chalk": "^6.0.0",
82
80
  "commander": "^15.0.0",
83
81
  "http-proxy": "^1.18.1",