@serkanalgur/opencode-nexus 1.2.2 → 1.2.3
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/tui.js +35 -6
- package/package.json +1 -1
package/dist/tui.js
CHANGED
|
@@ -34419,12 +34419,29 @@ var tui_default = define({
|
|
|
34419
34419
|
});
|
|
34420
34420
|
if (selected !== null && selected !== undefined) {
|
|
34421
34421
|
configManager.setModel(role, selected);
|
|
34422
|
-
|
|
34423
|
-
|
|
34424
|
-
|
|
34425
|
-
|
|
34426
|
-
|
|
34422
|
+
const saveTarget = await context.ui.dialog.select({
|
|
34423
|
+
title: "Save to where?",
|
|
34424
|
+
options: [
|
|
34425
|
+
{ title: "\uD83D\uDCC1 Project (.opencode/)", value: "project", description: "This project only" },
|
|
34426
|
+
{ title: "\uD83C\uDF0D Global (~/.config/opencode/)", value: "global", description: "All projects" }
|
|
34427
|
+
]
|
|
34427
34428
|
});
|
|
34429
|
+
if (saveTarget === "project") {
|
|
34430
|
+
const basePath = process.cwd();
|
|
34431
|
+
configManager.saveProjectConfig(basePath);
|
|
34432
|
+
context.ui.toast.show({
|
|
34433
|
+
title: "Nexus",
|
|
34434
|
+
message: `${role} → ${selected || "default"} (saved to .opencode/)`,
|
|
34435
|
+
variant: "success"
|
|
34436
|
+
});
|
|
34437
|
+
} else {
|
|
34438
|
+
configManager.saveGlobalConfig();
|
|
34439
|
+
context.ui.toast.show({
|
|
34440
|
+
title: "Nexus",
|
|
34441
|
+
message: `${role} → ${selected || "default"} (saved to ~/.config/opencode/)`,
|
|
34442
|
+
variant: "success"
|
|
34443
|
+
});
|
|
34444
|
+
}
|
|
34428
34445
|
}
|
|
34429
34446
|
};
|
|
34430
34447
|
const handleConfigDialog = async () => {
|
|
@@ -34439,7 +34456,19 @@ var tui_default = define({
|
|
|
34439
34456
|
configManager.updateStorageConfig({
|
|
34440
34457
|
budget: { ...config.budget, maxTotalCost: budget }
|
|
34441
34458
|
});
|
|
34442
|
-
|
|
34459
|
+
const saveTarget = await context.ui.dialog.select({
|
|
34460
|
+
title: "Save budget to where?",
|
|
34461
|
+
options: [
|
|
34462
|
+
{ title: "\uD83D\uDCC1 Project (.opencode/)", value: "project", description: "This project only" },
|
|
34463
|
+
{ title: "\uD83C\uDF0D Global (~/.config/opencode/)", value: "global", description: "All projects" }
|
|
34464
|
+
]
|
|
34465
|
+
});
|
|
34466
|
+
if (saveTarget === "project") {
|
|
34467
|
+
const basePath = process.cwd();
|
|
34468
|
+
configManager.saveProjectConfig(basePath);
|
|
34469
|
+
} else {
|
|
34470
|
+
configManager.saveGlobalConfig();
|
|
34471
|
+
}
|
|
34443
34472
|
context.ui.toast.show({
|
|
34444
34473
|
title: "Nexus",
|
|
34445
34474
|
message: `Budget updated: $${budget}`,
|