← back to Macstudio2 Dashboard
fix: same TS-annotation crash
a00d6b9f81d2eb9c1d3c10dd73cec4a70f65367d · 2026-05-08 01:06:19 -0700 · SteveStudio2
Files touched
Diff
commit a00d6b9f81d2eb9c1d3c10dd73cec4a70f65367d
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Fri May 8 01:06:19 2026 -0700
fix: same TS-annotation crash
---
server.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server.js b/server.js
index 0179bcd..72cc51d 100644
--- a/server.js
+++ b/server.js
@@ -220,7 +220,7 @@ app.post('/api/control/max-ram', async (_req, res) => {
app.post('/api/control/test', async (_req, res) => {
try {
const ps = await fetch(`${OLLAMA}/api/ps`, { signal: AbortSignal.timeout(2500) });
- const psJ: any = ps.ok ? await ps.json() : { models: [] };
+ const psJ = ps.ok ? await ps.json() : { models: [] };
const model = (psJ.models || [])[0]?.name || 'qwen3:14b';
const t0 = Date.now();
const r = await fetch(`${OLLAMA}/api/chat`, {
@@ -238,13 +238,13 @@ app.post('/api/control/test', async (_req, res) => {
const txt = await r.text();
return res.json({ ok: false, mode: 'test', model, ms, status: r.status, error: txt.slice(0, 240) });
}
- const j: any = await r.json();
+ const j = await r.json();
res.json({
ok: true, mode: 'test', model, ms,
reply: (j?.message?.content || '').slice(0, 120),
tokens_per_s: j.eval_count && j.eval_duration ? +(j.eval_count / (j.eval_duration / 1e9)).toFixed(1) : null
});
- } catch (e: any) {
+ } catch (e) {
res.status(500).json({ ok: false, error: String(e?.message || e) });
}
});
← 2796cb3 feat: TEST button on Mac2 dashboard — same single-prompt lat
·
back to Macstudio2 Dashboard
·
snapshot: 2 file(s) changed, +1 new, ~1 modified e5e07c2 →