agen-vektor 0.3.20 → 0.3.21
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/README.md +1 -1
- package/dist/tui/app.js +80 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -408,7 +408,7 @@ npm run build
|
|
|
408
408
|
- **"model not found" on the free tier** — the free catalog rotates; run `/model` to pick from the live list.
|
|
409
409
|
- **"Rate limited (429) / cooling down"** — VectorHead retries automatically with backoff, and the free gateway cools down briefly instead of burning the shared key. Switch to another free model via `/model` and retry.
|
|
410
410
|
- **Nothing happens on `vector` in Termux** — make sure your terminal is a TTY and TERM is set (e.g. `export TERM=xterm-256color`). If glyphs look broken (█ everywhere, torn logo), ASCII safe mode is already default-on; desktop users can opt back in with `VECTOR_ASCII=0`.
|
|
411
|
-
- **Runs out of iterations** — raise `maxIterations`
|
|
411
|
+
- **Runs out of iterations** — open `/settings` in the TUI and press `+`/`-` (or PgUp/PgDn, or type a number) to raise `maxIterations` — persisted to `~/.vector/config.json` — or refine the request.
|
|
412
412
|
|
|
413
413
|
## Roadmap
|
|
414
414
|
|
package/dist/tui/app.js
CHANGED
|
@@ -2373,7 +2373,6 @@ class App {
|
|
|
2373
2373
|
case 'help':
|
|
2374
2374
|
case 'commands':
|
|
2375
2375
|
case 'status':
|
|
2376
|
-
case 'settings':
|
|
2377
2376
|
if (ev.name === 'escape' || ev.name === 'enter' || ev.name === 'ctrl_c' || (ev.name === 'char' && ev.char === '?')) {
|
|
2378
2377
|
this.modal = { type: 'none' };
|
|
2379
2378
|
}
|
|
@@ -2392,6 +2391,74 @@ class App {
|
|
|
2392
2391
|
this.followBottom = this.scroll >= Math.max(0, all.length - this.chatHeight());
|
|
2393
2392
|
}
|
|
2394
2393
|
break;
|
|
2394
|
+
case 'settings':
|
|
2395
|
+
// /settings is mostly read-only, but Max iterations is LIVE-EDITABLE:
|
|
2396
|
+
// hitting the iteration limit mid-task used to require manual
|
|
2397
|
+
// ~/.vector/config.json surgery. +/- (and up/down) step the budget,
|
|
2398
|
+
// 0 and number keys type an exact value, Enter/commit keeps the
|
|
2399
|
+
// dialog open (backspace too — stray presses must not vaporize it),
|
|
2400
|
+
// Esc still closes. Changes persist via saveConfig immediately.
|
|
2401
|
+
{
|
|
2402
|
+
const cfg = this.agent.config;
|
|
2403
|
+
const step = (d) => {
|
|
2404
|
+
const next = Math.min(200, Math.max(1, cfg.maxIterations + d));
|
|
2405
|
+
if (next === cfg.maxIterations)
|
|
2406
|
+
return;
|
|
2407
|
+
cfg.maxIterations = next;
|
|
2408
|
+
try {
|
|
2409
|
+
(0, config_1.saveConfig)(cfg);
|
|
2410
|
+
}
|
|
2411
|
+
catch {
|
|
2412
|
+
/* read-only home — in-memory value still applies this session */
|
|
2413
|
+
}
|
|
2414
|
+
this.addSystem(`Max iterations: ${next}.`);
|
|
2415
|
+
};
|
|
2416
|
+
if (ev.name === 'escape') {
|
|
2417
|
+
this.modal = { type: 'none' };
|
|
2418
|
+
}
|
|
2419
|
+
else if (ev.name === 'enter' || ev.name === 'ctrl_c') {
|
|
2420
|
+
this.addSystem(`Max iterations: ${cfg.maxIterations} (tersimpan di ~/.vector/config.json).`);
|
|
2421
|
+
}
|
|
2422
|
+
else if (ev.name === 'up' || ev.name === 'char' && ev.char === '+') {
|
|
2423
|
+
step(+1);
|
|
2424
|
+
}
|
|
2425
|
+
else if (ev.name === 'down' || ev.name === 'char' && ev.char === '-') {
|
|
2426
|
+
step(-1);
|
|
2427
|
+
}
|
|
2428
|
+
else if (ev.name === 'pageup') {
|
|
2429
|
+
step(+10);
|
|
2430
|
+
}
|
|
2431
|
+
else if (ev.name === 'pagedown') {
|
|
2432
|
+
step(-10);
|
|
2433
|
+
}
|
|
2434
|
+
else if (ev.name === 'char' && ev.char === '0') {
|
|
2435
|
+
step(-cfg.maxIterations + 1);
|
|
2436
|
+
}
|
|
2437
|
+
else if (ev.name === 'char' && ev.char && /[0-9]/.test(ev.char)) {
|
|
2438
|
+
// Number keys type the exact value (not digit-append — no
|
|
2439
|
+
// visible field, so append would be invisible state).
|
|
2440
|
+
const next = Math.min(200, Math.max(1, Number(ev.char)));
|
|
2441
|
+
if (next !== cfg.maxIterations) {
|
|
2442
|
+
cfg.maxIterations = next;
|
|
2443
|
+
try {
|
|
2444
|
+
(0, config_1.saveConfig)(cfg);
|
|
2445
|
+
}
|
|
2446
|
+
catch {
|
|
2447
|
+
/* read-only home */
|
|
2448
|
+
}
|
|
2449
|
+
this.addSystem(`Max iterations: ${next}.`);
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
else if (ev.name === 'char' && ev.char === '?') {
|
|
2453
|
+
this.modal = { type: 'none' };
|
|
2454
|
+
}
|
|
2455
|
+
else if (ev.name === 'char' && ev.char) {
|
|
2456
|
+
// Other letters: keep the old close-and-insert behavior.
|
|
2457
|
+
this.modal = { type: 'none' };
|
|
2458
|
+
this.input.insert(ev.char);
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
break;
|
|
2395
2462
|
case 'provider':
|
|
2396
2463
|
await this.handleSelector(modal, ev, this.providerPickerOptions(), async (opt) => {
|
|
2397
2464
|
const c = this.agent.config;
|
|
@@ -3166,7 +3233,9 @@ class App {
|
|
|
3166
3233
|
label('Model', this.agent.config.model),
|
|
3167
3234
|
label('Theme', this.agent.config.theme || 'vectorhead'),
|
|
3168
3235
|
label('Mode', this.agent.config.permissionMode),
|
|
3169
|
-
|
|
3236
|
+
// LIVE-EDITABLE: +/- / ↑↓ / PgUp-PgDn step the budget, digits
|
|
3237
|
+
// type an exact value — persisted to ~/.vector/config.json.
|
|
3238
|
+
label('Max iterations', `${this.agent.config.maxIterations} ${theme_1.THEME.muted}(+/- / ↑↓ / PgUp-PgDn / angka)${theme_1.THEME.reset}`),
|
|
3170
3239
|
label('Max retries', String(this.agent.config.maxRetries)),
|
|
3171
3240
|
label('API URL', this.agent.config.apiUrl || '(default)'),
|
|
3172
3241
|
label('Key configured', (0, credentials_1.hasApiKey)(this.agent.config.provider) ? 'yes' : 'no'),
|
|
@@ -3184,7 +3253,7 @@ class App {
|
|
|
3184
3253
|
label('Env vars', 'VECTOR_API_KEY VECTOR_API_URL'),
|
|
3185
3254
|
label('', 'VECTOR_MODEL VECTOR_PROVIDER'),
|
|
3186
3255
|
],
|
|
3187
|
-
footer: 'Esc
|
|
3256
|
+
footer: 'Esc close · +/- ubah max iterations (tersimpan otomatis)',
|
|
3188
3257
|
}, rows, cols);
|
|
3189
3258
|
}
|
|
3190
3259
|
case 'status':
|
|
@@ -3216,9 +3285,16 @@ class App {
|
|
|
3216
3285
|
body: ['Fetching models from provider…', '', 'Esc to cancel'],
|
|
3217
3286
|
}, rows, cols);
|
|
3218
3287
|
}
|
|
3219
|
-
if (m.error) {
|
|
3288
|
+
if (m.error && m.options.length === 0) {
|
|
3220
3289
|
// Fetch failed (bad/missing URL or stored key) — show the real
|
|
3221
3290
|
// reason (e.g. "HTTP 401 …") instead of a misleading 1-item list.
|
|
3291
|
+
// BUT only when there is NOTHING selectable: if the provider def
|
|
3292
|
+
// declares models in config, those options were already merged in
|
|
3293
|
+
// (openModelModal always populates options from the fallback list
|
|
3294
|
+
// before setting error) and the picker must stay usable — endpoints
|
|
3295
|
+
// without GET /models (e.g. Cloudflare Workers AI compat: HTTP 405
|
|
3296
|
+
// "GET not supported") would otherwise brick /model entirely
|
|
3297
|
+
// (live VPS 2026-09-10).
|
|
3222
3298
|
return (0, components_1.renderModal)({
|
|
3223
3299
|
title: `Model (${(0, factory_1.displayProviderName)(this.agent.config)})`,
|
|
3224
3300
|
body: [m.error, '', 'Esc to cancel'],
|
package/package.json
CHANGED