@tarcisiopgs/lisa 1.7.3 → 1.7.4
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/index.js +57 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4289,20 +4289,50 @@ var issue = defineCommand({
|
|
|
4289
4289
|
meta: { name: "issue", description: "Issue tracker operations for use inside worktrees" },
|
|
4290
4290
|
subCommands: { get: issueGet, done: issueDone }
|
|
4291
4291
|
});
|
|
4292
|
-
var
|
|
4292
|
+
var CURSOR_MODELS_FALLBACK = [
|
|
4293
4293
|
"auto",
|
|
4294
4294
|
"composer-1.5",
|
|
4295
|
-
"
|
|
4296
|
-
"
|
|
4297
|
-
"gpt-5.3-codex-low",
|
|
4298
|
-
"gpt-5.3-codex-high",
|
|
4299
|
-
"gpt-5.3-codex-xhigh",
|
|
4300
|
-
"gpt-5.3-codex-fast",
|
|
4295
|
+
"opus-4.6-thinking",
|
|
4296
|
+
"opus-4.6",
|
|
4301
4297
|
"sonnet-4.6",
|
|
4302
|
-
"
|
|
4303
|
-
"
|
|
4304
|
-
"
|
|
4298
|
+
"gpt-5.3-codex",
|
|
4299
|
+
"gpt-5.2",
|
|
4300
|
+
"gemini-3.1-pro"
|
|
4305
4301
|
];
|
|
4302
|
+
function fetchCursorModels() {
|
|
4303
|
+
try {
|
|
4304
|
+
const bin = ["agent", "cursor-agent"].find((b) => {
|
|
4305
|
+
try {
|
|
4306
|
+
execSync8(`${b} --version`, { stdio: "ignore" });
|
|
4307
|
+
return true;
|
|
4308
|
+
} catch {
|
|
4309
|
+
return false;
|
|
4310
|
+
}
|
|
4311
|
+
});
|
|
4312
|
+
if (!bin) return CURSOR_MODELS_FALLBACK;
|
|
4313
|
+
const raw = execSync8(`${bin} --list-models`, { encoding: "utf-8", timeout: 1e4 });
|
|
4314
|
+
const clean = raw.replace(/\x1b\[[0-9;]*[mGKHFA-Z]/g, "");
|
|
4315
|
+
const models = clean.split("\n").map((l) => l.trim()).filter((l) => l.includes(" - ")).map((l) => (l.split(" - ")[0] ?? "").trim()).filter(Boolean);
|
|
4316
|
+
return models.length > 0 ? models : CURSOR_MODELS_FALLBACK;
|
|
4317
|
+
} catch {
|
|
4318
|
+
return CURSOR_MODELS_FALLBACK;
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
function fetchOpenCodeModels() {
|
|
4322
|
+
try {
|
|
4323
|
+
const raw = execSync8("opencode models", { encoding: "utf-8", timeout: 1e4 });
|
|
4324
|
+
return raw.split("\n").map((l) => l.trim()).filter(
|
|
4325
|
+
(m) => (
|
|
4326
|
+
// Latest Anthropic Claude 4.x — exclude dated snapshots (contain 8-digit date suffix)
|
|
4327
|
+
/^anthropic\/claude-(opus|sonnet|haiku)-4-\d+$/.test(m) || // Google Gemini 2.5 stable (no preview/tts suffixes)
|
|
4328
|
+
/^google\/gemini-2\.5-(pro|flash|flash-lite)$/.test(m) || // OpenCode proprietary models
|
|
4329
|
+
/^opencode\//.test(m)
|
|
4330
|
+
)
|
|
4331
|
+
);
|
|
4332
|
+
} catch {
|
|
4333
|
+
return [];
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4306
4336
|
var main = defineCommand({
|
|
4307
4337
|
meta: {
|
|
4308
4338
|
name: "lisa",
|
|
@@ -4323,8 +4353,13 @@ async function runConfigWizard() {
|
|
|
4323
4353
|
aider: "Aider"
|
|
4324
4354
|
};
|
|
4325
4355
|
const providerModels = {
|
|
4326
|
-
claude: ["claude-
|
|
4327
|
-
gemini: ["gemini-2.5-pro", "gemini-2.
|
|
4356
|
+
claude: ["claude-opus-4-6", "claude-sonnet-4-6", "claude-haiku-4-5", "claude-sonnet-4-5"],
|
|
4357
|
+
gemini: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite"],
|
|
4358
|
+
// opencode: populated dynamically below (fetchOpenCodeModels)
|
|
4359
|
+
copilot: ["claude-opus-4.6", "claude-sonnet-4.6", "claude-haiku-4.5", "gpt-5.2"],
|
|
4360
|
+
goose: ["claude-sonnet-4-5", "claude-opus-4-5", "claude-haiku-4-5"],
|
|
4361
|
+
aider: ["claude-opus-4-6", "claude-sonnet-4-5", "claude-haiku-4-5"]
|
|
4362
|
+
// cursor: populated dynamically below (fetchCursorModels)
|
|
4328
4363
|
};
|
|
4329
4364
|
const allProviders = await getAllProvidersWithAvailability();
|
|
4330
4365
|
const available = allProviders.filter((r) => r.available).map((r) => r.provider);
|
|
@@ -4367,8 +4402,17 @@ async function runConfigWizard() {
|
|
|
4367
4402
|
availableModels = ["auto"];
|
|
4368
4403
|
clack.log.info("Cursor Free plan detected \u2014 only the 'auto' model is available.");
|
|
4369
4404
|
} else {
|
|
4370
|
-
availableModels =
|
|
4405
|
+
availableModels = fetchCursorModels();
|
|
4371
4406
|
}
|
|
4407
|
+
} else if (providerName === "opencode") {
|
|
4408
|
+
const dynamic = fetchOpenCodeModels();
|
|
4409
|
+
availableModels = dynamic.length > 0 ? dynamic : [
|
|
4410
|
+
"anthropic/claude-opus-4-6",
|
|
4411
|
+
"anthropic/claude-sonnet-4-6",
|
|
4412
|
+
"anthropic/claude-haiku-4-5",
|
|
4413
|
+
"google/gemini-2.5-pro",
|
|
4414
|
+
"google/gemini-2.5-flash"
|
|
4415
|
+
];
|
|
4372
4416
|
}
|
|
4373
4417
|
if (availableModels && availableModels.length > 0) {
|
|
4374
4418
|
const modelSelection = await clack.multiselect({
|