zames_pro 2.15.1 → 2.15.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/i18n.js +5 -1
- package/dist/index.js +3 -2
- package/dist/input.js +5 -2
- package/package.json +1 -1
package/dist/i18n.js
CHANGED
|
@@ -306,7 +306,7 @@ const CATALOG = {
|
|
|
306
306
|
ru: 'Использование: /config [menu | list | get <путь> | set <путь> <значение> | reset <путь> | path | lang <ru|en>]',
|
|
307
307
|
en: 'Usage: /config [menu | list | get <path> | set <path> <value> | reset <path> | path | lang <ru|en>]',
|
|
308
308
|
},
|
|
309
|
-
'cfg.saved': { ru: 'Сохранено: {v} = {value}', en: 'Saved: {v} = {value}' },
|
|
309
|
+
'cfg.saved': { ru: 'Сохранено: {v} = {value} ({file})', en: 'Saved: {v} = {value} ({file})' },
|
|
310
310
|
'cfg.reset': { ru: 'Сброшено к дефолту: {v}', en: 'Reset to default: {v}' },
|
|
311
311
|
'cfg.value': { ru: '{v} = {value}', en: '{v} = {value}' },
|
|
312
312
|
'cfg.unknown_key': { ru: 'Неизвестный параметр: {v}', en: 'Unknown setting: {v}' },
|
|
@@ -316,6 +316,10 @@ const CATALOG = {
|
|
|
316
316
|
'cfg.keys': { ru: 'Доступные параметры:', en: 'Available settings:' },
|
|
317
317
|
'cfg.lang_set': { ru: 'Язык переключён на {v}.', en: 'Language switched to {v}.' },
|
|
318
318
|
'cfg.lang_usage': { ru: 'Использование: /config lang <ru|en>', en: 'Usage: /config lang <ru|en>' },
|
|
319
|
+
'cfg.scope_current': { ru: 'Запись конфига: {v} ({file})', en: 'Config write scope: {v} ({file})' },
|
|
320
|
+
'cfg.scope_usage': { ru: 'Использование: /config scope <project|home>. project = .zamesrc.json (в git), home = ~/.zames/. Для личных настроек (confirmations) выбери home, чтобы не коммитить их.', en: 'Usage: /config scope <project|home>. project = .zamesrc.json (committed), home = ~/.zames/. Use home for personal settings (confirmations) so they are not committed.' },
|
|
321
|
+
'cfg.scope_set': { ru: 'Запись конфига: {v} ({file})', en: 'Config write scope: {v} ({file})' },
|
|
322
|
+
'cfg.scope_bad': { ru: 'Неизвестный scope: {v}. Используй project или home.', en: 'Unknown scope: {v}. Use project or home.' },
|
|
319
323
|
// ---------- system prompt ----------
|
|
320
324
|
'prompt.answer_language': {
|
|
321
325
|
ru: 'ВАЖНО: отвечай оператору на русском языке. Весь текст в поле message инструмента respond, а также любые пояснения — на русском.',
|
package/dist/index.js
CHANGED
|
@@ -1266,11 +1266,11 @@ async function main() {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
function configSetRaw(field, raw) {
|
|
1268
1268
|
const value = validateConfigValue(field, raw);
|
|
1269
|
-
writeConfigValue('
|
|
1269
|
+
writeConfigValue('home', field.path, raw);
|
|
1270
1270
|
setConfigRuntime(field.path, value);
|
|
1271
1271
|
}
|
|
1272
1272
|
function configResetField(field) {
|
|
1273
|
-
resetConfigValue('
|
|
1273
|
+
resetConfigValue('home', field.path);
|
|
1274
1274
|
// Reset the runtime value to the default.
|
|
1275
1275
|
const def = getByPath(DEFAULTS, field.path);
|
|
1276
1276
|
setConfigRuntime(field.path, def);
|
|
@@ -1414,6 +1414,7 @@ async function main() {
|
|
|
1414
1414
|
console.log(theme.assistant(t('cfg.saved', {
|
|
1415
1415
|
v: key,
|
|
1416
1416
|
value: JSON.stringify(getByPath(config, key)),
|
|
1417
|
+
file: CONFIG_PATHS.HOME_CONFIG,
|
|
1417
1418
|
})));
|
|
1418
1419
|
return;
|
|
1419
1420
|
}
|
package/dist/input.js
CHANGED
|
@@ -377,8 +377,10 @@ export class LineEditor {
|
|
|
377
377
|
_eraseBlock() {
|
|
378
378
|
if (!this.rendered)
|
|
379
379
|
return;
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
const rows = process.stdout.rows || 24;
|
|
381
|
+
const up = Math.min(this.cursorRowFromTop, Math.max(0, rows - 1));
|
|
382
|
+
if (up > 0) {
|
|
383
|
+
process.stdout.write(ESC + '[' + up + 'A');
|
|
382
384
|
}
|
|
383
385
|
process.stdout.write(CR + ESC + '[J');
|
|
384
386
|
this.rendered = false;
|
|
@@ -432,6 +434,7 @@ export class LineEditor {
|
|
|
432
434
|
}
|
|
433
435
|
// Print a block ABOVE the input line and put the input line back.
|
|
434
436
|
printAbove(text) {
|
|
437
|
+
this._stopDots();
|
|
435
438
|
this._eraseBlock();
|
|
436
439
|
process.stdout.write(String(text) + NL);
|
|
437
440
|
this._writeBlock();
|