zames_pro 2.26.0 → 2.27.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
@@ -389,11 +389,17 @@ export class LineEditor {
389
389
  // Two colored icons for the DeepSeek toggles: 🧠 "Deep thinking" and 🌐 "Smart
390
390
  // search". A dim gray icon = off, a teal-green icon = on. Placed just before
391
391
  // the context counter, so the operator sees the live chat state at a glance.
392
+ // U+FE0E (VARIATION SELECTOR-15) forces the TEXT presentation of the emoji:
393
+ // without it the terminal paints the emoji in its own colors (pink brain,
394
+ // blue globe) and the ANSI color is ignored — "the icons are colored, and it
395
+ // is unclear which is on". With the selector they become monochrome glyphs
396
+ // and take the on/off color.
392
397
  _toggleIcons() {
393
398
  const on = (s) => theme.toggleOn(s);
394
399
  const off = (s) => theme.toggleOff(s);
395
- const brain = this.thinkingEnabled ? on('🧠') : off('🧠');
396
- const globe = this.searchEnabled ? on('🌐') : off('🌐');
400
+ const TEXT = '\uFE0E';
401
+ const brain = this.thinkingEnabled ? on('🧠' + TEXT) : off('🧠' + TEXT);
402
+ const globe = this.searchEnabled ? on('🌐' + TEXT) : off('🌐' + TEXT);
397
403
  return brain + ' ' + globe + ' ';
398
404
  }
399
405
  // Read the OS clipboard for an image and insert its marker. Used when the
@@ -854,6 +860,45 @@ export class LineEditor {
854
860
  this._render();
855
861
  return;
856
862
  }
863
+ // Fallback for terminals that do NOT send a bracketed paste: if the WHOLE
864
+ // input is a path to an existing image/file, attach it and send the marker
865
+ // instead of the raw path. Without this the operator pasted a path, saw
866
+ // plain text, and no [image#N] marker appeared.
867
+ if (this.onAttach && !this.attachments.items.length) {
868
+ const t = display.trim();
869
+ const quoted = (t.startsWith('"') && t.endsWith('"')) ||
870
+ (t.startsWith("'") && t.endsWith("'"));
871
+ // Only treat the input as a path when it is a SINGLE token (no spaces)
872
+ // that looks like a file name — so a normal sentence containing a dot is
873
+ // never swallowed as an attachment.
874
+ const singleToken = !/\s/.test(t);
875
+ const looksPath = singleToken && /[./\\]/.test(t) && /\.[a-z0-9]{1,6}$/i.test(t);
876
+ if (looksPath || (quoted && /[./\\]/.test(t))) {
877
+ void this._attachOnSubmit(display);
878
+ return;
879
+ }
880
+ }
881
+ this._doSubmit(display);
882
+ }
883
+ // Try to attach a whole-input path, then submit the marker (or the raw text
884
+ // when the attachment fails).
885
+ async _attachOnSubmit(display) {
886
+ if (this.onAttach) {
887
+ try {
888
+ const att = await this.onAttach(display.trim());
889
+ if (att) {
890
+ this.buf = att.marker;
891
+ this.cursor = Array.from(this.buf).length;
892
+ this._render();
893
+ this._doSubmit(att.marker);
894
+ return;
895
+ }
896
+ }
897
+ catch { }
898
+ }
899
+ this._doSubmit(display);
900
+ }
901
+ _doSubmit(display) {
857
902
  // The input line shows compact markers "[Pasted lines#N]" instead of large
858
903
  // pastes — expand them back into the original text before sending.
859
904
  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.27.0",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {