@wrongstack/webui 0.236.0 → 0.255.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/assets/index-DcnrP-gv.js +163 -0
- package/dist/assets/index-u41ruU9Z.css +2 -0
- package/dist/assets/{vendor-BtOIO1oa.js → vendor-DEuauVA6.js} +229 -229
- package/dist/index.html +3 -3
- package/dist/index.js +2601 -819
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +10 -2
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +10 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/assets/index-Cm_R0cfw.css +0 -2
- package/dist/assets/index-DIwGHhP2.js +0 -163
package/dist/server/index.js
CHANGED
|
@@ -601,7 +601,7 @@ import {
|
|
|
601
601
|
} from "@wrongstack/core";
|
|
602
602
|
function isGitRepo(cwd) {
|
|
603
603
|
try {
|
|
604
|
-
const r = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], { cwd, encoding: "utf8" });
|
|
604
|
+
const r = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], { cwd, encoding: "utf8", windowsHide: true });
|
|
605
605
|
return r.status === 0 && r.stdout.trim() === "true";
|
|
606
606
|
} catch {
|
|
607
607
|
return false;
|
|
@@ -2024,7 +2024,7 @@ function browserOpenCommand(url, platform = process.platform) {
|
|
|
2024
2024
|
function openBrowser(url, platform = process.platform) {
|
|
2025
2025
|
try {
|
|
2026
2026
|
const { command, args } = browserOpenCommand(url, platform);
|
|
2027
|
-
const child = spawn(command, args, { stdio: "ignore", detached: true });
|
|
2027
|
+
const child = spawn(command, args, { stdio: "ignore", detached: true, windowsHide: true });
|
|
2028
2028
|
child.on("error", () => {
|
|
2029
2029
|
});
|
|
2030
2030
|
child.unref();
|
|
@@ -3303,6 +3303,14 @@ async function startWebUI(opts = {}) {
|
|
|
3303
3303
|
try {
|
|
3304
3304
|
const m = await modelsRegistry.getModel(config.provider, config.model);
|
|
3305
3305
|
maxContext = m?.capabilities?.maxContext ?? 0;
|
|
3306
|
+
if (!maxContext) {
|
|
3307
|
+
try {
|
|
3308
|
+
const provider2 = await modelsRegistry.getProvider(config.provider);
|
|
3309
|
+
const rawModel = provider2?.models.find((mod) => mod.id === config.model);
|
|
3310
|
+
maxContext = rawModel?.limit?.context ?? 0;
|
|
3311
|
+
} catch {
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3306
3314
|
const rates = getCostRates(m);
|
|
3307
3315
|
inputCost = rates.input;
|
|
3308
3316
|
outputCost = rates.output;
|