@lasso-ai/cli 1.0.27 → 1.0.28
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/agent.js +1 -2
- package/dist/overlay.js +17 -0
- package/package.json +1 -1
package/dist/cli/agent.js
CHANGED
|
@@ -351,7 +351,7 @@ function localCommand(provider, model, prompt) {
|
|
|
351
351
|
return { command: "claude", args: ["-p", prompt || "", "--output-format", "stream-json", "--verbose", "--permission-mode", "plan", "--max-turns", "3", ...(selectedModel ? ["--model", selectedModel] : [])] };
|
|
352
352
|
}
|
|
353
353
|
if (provider === "opencode") {
|
|
354
|
-
return { command: "opencode", args: ["run", "--format", "json", "--
|
|
354
|
+
return { command: "opencode", args: ["run", "--format", "json", "--agent", "plan", ...(selectedModel ? ["--model", selectedModel] : []), prompt || ""] };
|
|
355
355
|
}
|
|
356
356
|
return { command: "codex", args: ["exec", "--json", "--sandbox", "read-only", "--skip-git-repo-check", ...(selectedModel ? ["--model", selectedModel] : []), prompt || ""] };
|
|
357
357
|
}
|
|
@@ -394,7 +394,6 @@ function runLocalCommand(cwd, command, args, provider, signal, onProgress) {
|
|
|
394
394
|
if (progress)
|
|
395
395
|
onProgress?.(progress.message, progress.detail);
|
|
396
396
|
else if (stream === "stderr" && line.trim()) {
|
|
397
|
-
onProgress?.(`${label} · ${snippet(line, 110)}`);
|
|
398
397
|
if (provider === "opencode" && /quota exceeded|authentication failed|invalid api key|unauthorized|forbidden/i.test(line)) {
|
|
399
398
|
onProgress?.("OpenCode · provider rejected the request; stopping this task…");
|
|
400
399
|
child.kill("SIGTERM");
|
package/dist/overlay.js
CHANGED
|
@@ -12151,6 +12151,15 @@
|
|
|
12151
12151
|
return Boolean(other) && change.filePath === other.filePath && change.oldString === other.oldString && change.newString === other.newString;
|
|
12152
12152
|
});
|
|
12153
12153
|
}
|
|
12154
|
+
function normalizedInstruction(value2) {
|
|
12155
|
+
return value2.trim().replace(/\s+/g, " ").toLowerCase();
|
|
12156
|
+
}
|
|
12157
|
+
function findReusableAgentTask(instruction, element) {
|
|
12158
|
+
const normalized = normalizedInstruction(instruction);
|
|
12159
|
+
return state.agentTasks.find(
|
|
12160
|
+
(task) => task.status !== "complete" && task.status !== "error" && task.status !== "stopped" && normalizedInstruction(task.instruction) === normalized && task.element === (element || void 0)
|
|
12161
|
+
);
|
|
12162
|
+
}
|
|
12154
12163
|
function onAgentTaskSelected(listener) {
|
|
12155
12164
|
selectionListeners.add(listener);
|
|
12156
12165
|
return () => selectionListeners.delete(listener);
|
|
@@ -18504,6 +18513,9 @@
|
|
|
18504
18513
|
cli: terminal_default
|
|
18505
18514
|
};
|
|
18506
18515
|
function providerIcon(provider, active = false) {
|
|
18516
|
+
if (provider === "cli") {
|
|
18517
|
+
return `<span class="${active ? "lasso-model-active-icon" : "lasso-model-item-icon"} provider-cli" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" focusable="false"><circle cx="12" cy="12" r="9" fill="currentColor" opacity=".16"/><circle cx="12" cy="9" r="3" fill="currentColor"/><path d="M6.5 18c.9-2.4 2.7-3.6 5.5-3.6s4.6 1.2 5.5 3.6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg></span>`;
|
|
18518
|
+
}
|
|
18507
18519
|
const icon = providerIcons[provider];
|
|
18508
18520
|
return `<span class="${active ? "lasso-model-active-icon" : "lasso-model-item-icon"} provider-${provider}" aria-hidden="true"><svg viewBox="0 0 ${icon.width} ${icon.height}" xmlns="http://www.w3.org/2000/svg" focusable="false">${icon.body}</svg></span>`;
|
|
18509
18521
|
}
|
|
@@ -19258,6 +19270,11 @@
|
|
|
19258
19270
|
const selectionId = state.selectionId;
|
|
19259
19271
|
const model = state.selectedModel;
|
|
19260
19272
|
const screenshotPromise = state.screenshotPromise;
|
|
19273
|
+
const reusableTask = findReusableAgentTask(instruction, selectedElement);
|
|
19274
|
+
if (reusableTask) {
|
|
19275
|
+
selectAgentTask(reusableTask.id);
|
|
19276
|
+
return;
|
|
19277
|
+
}
|
|
19261
19278
|
appendChat("user", instruction);
|
|
19262
19279
|
const messages = state.chatHistory.map((message) => ({ ...message }));
|
|
19263
19280
|
const changesHistory = state.changesHistory.map((entry) => ({ ...entry, changes: entry.changes.map((change) => ({ ...change })) }));
|
package/package.json
CHANGED