zames_pro 2.26.0 → 2.28.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/i18n.js CHANGED
@@ -662,8 +662,8 @@ const CATALOG = {
662
662
  },
663
663
  'chats.opening': { ru: 'Открываю: {v}', en: 'Opening: {v}' },
664
664
  'chats.context_kept': {
665
- ru: ' Контекст чата сохранён. Системный промпт не пересылается (--resend-prompt чтобы дослать).\n',
666
- en: ' Chat context kept. System prompt is not resent (--resend-prompt to force).\n',
665
+ ru: ' Контекст чата сохранён. Системный промпт будет переслан на следующей задаче.\n',
666
+ en: ' Chat context kept. The system prompt will be resent on the next task.\n',
667
667
  },
668
668
  'chats.prompt_will_resend': {
669
669
  ru: ' Системный промпт будет переслан на следующей задаче.\n',
package/dist/index.js CHANGED
@@ -412,7 +412,18 @@ async function resolveAttachPath(workdir, raw) {
412
412
  s = s.replace(/\\ /g, ' ');
413
413
  if (!looksLikeFilePath(s) && !isImageName(s))
414
414
  return null;
415
- const candidates = path.isAbsolute(s) ? [s] : [path.resolve(workdir, s)];
415
+ const candidates = path.isAbsolute(s)
416
+ ? [s]
417
+ : [
418
+ // Most common: relative to the project (working) directory.
419
+ path.resolve(workdir, s),
420
+ // The operator may paste a path relative to the terminal's cwd (which
421
+ // can be the parent of the project) or copy it with the project name
422
+ // included, e.g. "zames_pro/tmp/image.png" while workdir is already
423
+ // .../zames_pro. Try both so the marker appears instead of raw text.
424
+ path.resolve(process.cwd(), s),
425
+ path.resolve(workdir, '..', s),
426
+ ];
416
427
  for (const c of candidates) {
417
428
  const st = await fs.stat(c).catch(() => null);
418
429
  if (st && st.isFile())
@@ -1170,7 +1181,7 @@ async function main() {
1170
1181
  await browser.openChat(resumeId);
1171
1182
  currentChatId = resumeId;
1172
1183
  freshChatNext = false;
1173
- sendSystemPromptNext = resendPrompt;
1184
+ sendSystemPromptNext = true;
1174
1185
  saveLastChat(resumeId, currentWorkdir);
1175
1186
  console.log(theme.system(t('msg.chat_opened') + ' ' + resumeId + String.fromCharCode(10)));
1176
1187
  await printRestoredHistory(browser, null, resumeId);
@@ -1866,13 +1877,11 @@ async function main() {
1866
1877
  await browser.openChat(pick.id);
1867
1878
  currentChatId = pick.id;
1868
1879
  freshChatNext = false;
1869
- sendSystemPromptNext = resendPrompt;
1880
+ sendSystemPromptNext = true;
1870
1881
  saveLastChat(pick.id, currentWorkdir, pick.title);
1871
1882
  transcript.log('resume_chat', { id: pick.id, title: pick.title });
1872
1883
  console.log(theme.assistant(t('msg.chat_opened')) +
1873
- theme.system(resendPrompt
1874
- ? ' Системный промпт будет переслан на следующей задаче.\n'
1875
- : ' Контекст чата сохранён. Системный промпт не пересылается (--resend-prompt чтобы дослать).\n'));
1884
+ theme.system(' Системный промпт будет переслан на следующей задаче (чтобы модель видела инструменты).\n'));
1876
1885
  await printRestoredHistory(browser, editor, pick.id);
1877
1886
  }
1878
1887
  catch (e) {
@@ -1926,7 +1935,7 @@ async function main() {
1926
1935
  await browser.openChat(id);
1927
1936
  currentChatId = id;
1928
1937
  freshChatNext = false;
1929
- sendSystemPromptNext = resendPrompt;
1938
+ sendSystemPromptNext = true;
1930
1939
  saveLastChat(id, currentWorkdir);
1931
1940
  transcript.log('resume_chat', { id });
1932
1941
  console.log(theme.assistant('Чат открыт.') +
@@ -2126,7 +2135,6 @@ async function main() {
2126
2135
  console.log(theme.system(t('status.chat', { v: currentChatId || t('common.none') })));
2127
2136
  console.log(theme.system(t('status.fresh_next', { v: freshChatNext ? yes : no })));
2128
2137
  console.log(theme.system(t('status.prompt_next', { v: sendSystemPromptNext ? yes : no })));
2129
- console.log(theme.system(t('status.resend', { v: resendPrompt ? yes : no })));
2130
2138
  console.log(theme.system(t('status.last_chat', {
2131
2139
  v: loadLastChat(currentWorkdir) || t('common.none'),
2132
2140
  })));
package/dist/input.js CHANGED
@@ -386,15 +386,20 @@ export class LineEditor {
386
386
  return theme.warn(ctx);
387
387
  return theme.success(ctx);
388
388
  }
389
- // Two colored icons for the DeepSeek toggles: 🧠 "Deep thinking" and 🌐 "Smart
390
- // search". A dim gray icon = off, a teal-green icon = on. Placed just before
391
- // the context counter, so the operator sees the live chat state at a glance.
389
+ // Icons for the DeepSeek toggles: 🧠 "Deep thinking" and 🌐 "Smart search",
390
+ // shown before the context counter. Only the ENABLED toggles are shown, and
391
+ // they are teal-green. This does NOT rely on the terminal honoring the ANSI
392
+ // color: a disabled toggle is simply absent, so there is no ambiguity
393
+ // between "gray (off)" and "the emoji's own color (on)". U+FE0E forces the
394
+ // monochrome TEXT presentation so the green is actually visible.
392
395
  _toggleIcons() {
393
- const on = (s) => theme.toggleOn(s);
394
- const off = (s) => theme.toggleOff(s);
395
- const brain = this.thinkingEnabled ? on('🧠') : off('🧠');
396
- const globe = this.searchEnabled ? on('🌐') : off('🌐');
397
- return brain + ' ' + globe + ' ';
396
+ const TEXT = '\uFE0E';
397
+ const parts = [];
398
+ if (this.thinkingEnabled)
399
+ parts.push(theme.toggleOn('🧠' + TEXT));
400
+ if (this.searchEnabled)
401
+ parts.push(theme.toggleOn('🌐' + TEXT));
402
+ return parts.length ? parts.join(' ') + ' ' : '';
398
403
  }
399
404
  // Read the OS clipboard for an image and insert its marker. Used when the
400
405
  // terminal sends no usable paste data (Ctrl+V / right-click / empty paste).
@@ -854,6 +859,45 @@ export class LineEditor {
854
859
  this._render();
855
860
  return;
856
861
  }
862
+ // Fallback for terminals that do NOT send a bracketed paste: if the WHOLE
863
+ // input is a path to an existing image/file, attach it and send the marker
864
+ // instead of the raw path. Without this the operator pasted a path, saw
865
+ // plain text, and no [image#N] marker appeared.
866
+ if (this.onAttach && !this.attachments.items.length) {
867
+ const t = display.trim();
868
+ const quoted = (t.startsWith('"') && t.endsWith('"')) ||
869
+ (t.startsWith("'") && t.endsWith("'"));
870
+ // Only treat the input as a path when it is a SINGLE token (no spaces)
871
+ // that looks like a file name — so a normal sentence containing a dot is
872
+ // never swallowed as an attachment.
873
+ const singleToken = !/\s/.test(t);
874
+ const looksPath = singleToken && /[./\\]/.test(t) && /\.[a-z0-9]{1,6}$/i.test(t);
875
+ if (looksPath || (quoted && /[./\\]/.test(t))) {
876
+ void this._attachOnSubmit(display);
877
+ return;
878
+ }
879
+ }
880
+ this._doSubmit(display);
881
+ }
882
+ // Try to attach a whole-input path, then submit the marker (or the raw text
883
+ // when the attachment fails).
884
+ async _attachOnSubmit(display) {
885
+ if (this.onAttach) {
886
+ try {
887
+ const att = await this.onAttach(display.trim());
888
+ if (att) {
889
+ this.buf = att.marker;
890
+ this.cursor = Array.from(this.buf).length;
891
+ this._render();
892
+ this._doSubmit(att.marker);
893
+ return;
894
+ }
895
+ }
896
+ catch { }
897
+ }
898
+ this._doSubmit(display);
899
+ }
900
+ _doSubmit(display) {
857
901
  // The input line shows compact markers "[Pasted lines#N]" instead of large
858
902
  // pastes — expand them back into the original text before sending.
859
903
  const text = expandPastes(this.pastes, display);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.26.0",
3
+ "version": "2.28.0",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {