@bastani/atomic 0.8.1-0 → 0.8.1-1

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.
@@ -23,7 +23,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError, } from "../../co
23
23
  import { SessionManager, } from "../../core/session-manager.js";
24
24
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
25
25
  import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
26
- import { getChangelogPath, getNewEntries, parseChangelog, } from "../../utils/changelog.js";
26
+ import { getChangelogPath, getEntriesForVersion, getNewEntries, parseChangelog, } from "../../utils/changelog.js";
27
27
  import { copyToClipboard } from "../../utils/clipboard.js";
28
28
  import { extensionForImageMimeType, readClipboardImage, } from "../../utils/clipboard-image.js";
29
29
  import { parseGitUrl } from "../../utils/git.js";
@@ -360,7 +360,7 @@ export class InteractiveMode {
360
360
  }
361
361
  this.chatContainer.addChild(new DynamicBorder());
362
362
  if (this.settingsManager.getCollapseChangelog()) {
363
- const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
363
+ const versionMatch = this.changelogMarkdown.match(/##\s+\[?((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9]\d*))?)\]?/);
364
364
  const latestVersion = versionMatch ? versionMatch[1] : this.version;
365
365
  const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
366
366
  this.chatContainer.addChild(new Text(condensedText, 1, 0));
@@ -622,11 +622,12 @@ export class InteractiveMode {
622
622
  this.reportInstallTelemetry(VERSION);
623
623
  return undefined;
624
624
  }
625
- const newEntries = getNewEntries(entries, lastVersion);
626
- if (newEntries.length > 0) {
625
+ const newEntries = getNewEntries(entries, lastVersion, VERSION);
626
+ const currentEntries = getEntriesForVersion(newEntries, VERSION);
627
+ if (currentEntries.length > 0) {
627
628
  this.settingsManager.setLastChangelogVersion(VERSION);
628
629
  this.reportInstallTelemetry(VERSION);
629
- return newEntries.map((e) => e.content).join("\n\n");
630
+ return currentEntries.map((e) => e.content).join("\n\n");
630
631
  }
631
632
  return undefined;
632
633
  }