replicas-cli 0.2.87 → 0.2.90

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.
@@ -8149,6 +8149,16 @@ function generatePlaceholderName() {
8149
8149
  }
8150
8150
 
8151
8151
  // ../shared/src/workspace-groups.ts
8152
+ function findRepositorySetForWorkspace(workspaceRepoIds, repositorySets) {
8153
+ if (workspaceRepoIds.length <= 1) return null;
8154
+ for (const set of repositorySets) {
8155
+ const setRepoIds = new Set(set.repositories.map((r) => r.id));
8156
+ if (workspaceRepoIds.every((id) => setRepoIds.has(id))) {
8157
+ return set;
8158
+ }
8159
+ }
8160
+ return null;
8161
+ }
8152
8162
  function buildGroups(workspaces, workspacesData, repositories, repositorySets, mockGroupAssignments) {
8153
8163
  const groupMap = /* @__PURE__ */ new Map();
8154
8164
  for (const repo of repositories) {
@@ -8162,17 +8172,13 @@ function buildGroups(workspaces, workspacesData, repositories, repositorySets, m
8162
8172
  for (const workspace of workspaces) {
8163
8173
  const repos = allWsRepos.filter((r) => r.workspace_id === workspace.id);
8164
8174
  if (repos.length > 0) {
8175
+ const matchingSet = findRepositorySetForWorkspace(repos.map((r) => r.id), repositorySets);
8165
8176
  let placedInSet = false;
8166
- for (const repoSet of repositorySets) {
8167
- const setRepoIds = new Set(repoSet.repositories.map((r) => r.id));
8168
- const wsRepoIds = repos.map((r) => r.id);
8169
- if (wsRepoIds.length > 1 && wsRepoIds.every((id) => setRepoIds.has(id))) {
8170
- const setKey = `set:${repoSet.id}`;
8171
- if (groupMap.has(setKey)) {
8172
- groupMap.get(setKey).workspaces.push(workspace);
8173
- placedInSet = true;
8174
- break;
8175
- }
8177
+ if (matchingSet) {
8178
+ const setKey = `set:${matchingSet.id}`;
8179
+ if (groupMap.has(setKey)) {
8180
+ groupMap.get(setKey).workspaces.push(workspace);
8181
+ placedInSet = true;
8176
8182
  }
8177
8183
  }
8178
8184
  if (!placedInSet) {
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  setIdeCommand,
16
16
  setOrganizationId,
17
17
  writeConfig
18
- } from "./chunk-JD5S6ZRL.mjs";
18
+ } from "./chunk-Y5A6DOJR.mjs";
19
19
 
20
20
  // src/index.ts
21
21
  import "dotenv/config";
@@ -2509,12 +2509,12 @@ async function interactiveCommand() {
2509
2509
  );
2510
2510
  }
2511
2511
  console.log(chalk18.gray("Starting interactive mode..."));
2512
- const { launchInteractive } = await import("./interactive-5V3VZUZE.mjs");
2512
+ const { launchInteractive } = await import("./interactive-G27WVRJ6.mjs");
2513
2513
  await launchInteractive();
2514
2514
  }
2515
2515
 
2516
2516
  // src/index.ts
2517
- var CLI_VERSION = "0.2.87";
2517
+ var CLI_VERSION = "0.2.90";
2518
2518
  var program = new Command();
2519
2519
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
2520
2520
  program.command("login").description("Authenticate with your Replicas account").action(async () => {
@@ -11,7 +11,7 @@ import {
11
11
  isAgentBackendEvent,
12
12
  parseAgentEvents,
13
13
  parseUserMessage
14
- } from "./chunk-JD5S6ZRL.mjs";
14
+ } from "./chunk-Y5A6DOJR.mjs";
15
15
 
16
16
  // src/interactive/index.tsx
17
17
  import { createCliRenderer } from "@opentui/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.87",
3
+ "version": "0.2.90",
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": {