replicas-cli 0.2.372 → 0.2.373

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -3
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -7713,14 +7713,16 @@ var DEFAULT_CHAT_TITLES = {
7713
7713
  opencode: "Opencode",
7714
7714
  relay: "Relay"
7715
7715
  };
7716
+ function isDefaultChat(chat) {
7717
+ return chat.title === DEFAULT_CHAT_TITLES[chat.provider];
7718
+ }
7716
7719
  function getInitialChatId(chats, preferredProvider = "claude") {
7717
7720
  if (chats.length === 0) return null;
7718
- const isDefault = (c) => c.title === DEFAULT_CHAT_TITLES[c.provider];
7719
7721
  const hasActivity = (c) => c.updatedAt > c.createdAt;
7720
7722
  const mostActive = (list) => list.filter(hasActivity).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))[0] ?? null;
7721
7723
  const preferred = chats.filter((c) => c.provider === preferredProvider);
7722
7724
  const others = chats.filter((c) => c.provider !== preferredProvider);
7723
- return mostActive(preferred)?.id ?? mostActive(others)?.id ?? preferred.find(isDefault)?.id ?? others.find(isDefault)?.id ?? chats[0]?.id ?? null;
7725
+ return mostActive(preferred)?.id ?? mostActive(others)?.id ?? preferred.find(isDefaultChat)?.id ?? others.find(isDefaultChat)?.id ?? chats[0]?.id ?? null;
7724
7726
  }
7725
7727
  var CLAUDE_OPUS_1M_MODEL = "opus[1m]";
7726
7728
  var LEGACY_CLAUDE_OPUS_1M_MODEL = "opus-1m";
@@ -9816,7 +9818,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
9816
9818
  var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
9817
9819
 
9818
9820
  // ../shared/src/cli-version.ts
9819
- var CLI_VERSION = "0.2.372";
9821
+ var CLI_VERSION = "0.2.373";
9820
9822
 
9821
9823
  // ../shared/src/version.ts
9822
9824
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.372",
3
+ "version": "0.2.373",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {