chatroom-cli 1.102.1 → 1.102.2

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/index.js CHANGED
@@ -107631,7 +107631,7 @@ var init_start_subscriptions = __esm(() => {
107631
107631
  // src/daemon/entry/workspace-git/workspace-cache.ts
107632
107632
  async function getWorkspacesForMachine(deps) {
107633
107633
  const store = deps.workspaceListStore;
107634
- if (store && store.updatedAt > 0) {
107634
+ if (store && store.updatedAt > 0 && !deps.forceRefresh) {
107635
107635
  return store.workspaces;
107636
107636
  }
107637
107637
  try {
@@ -111250,17 +111250,21 @@ var init_file_content_classifier = __esm(() => {
111250
111250
 
111251
111251
  // src/infrastructure/services/workspace/assert-registered-working-dir.ts
111252
111252
  async function assertRegisteredWorkingDir(session2, workingDir) {
111253
- const workspaces = await getWorkspacesForMachine({
111253
+ const normalizedWorkingDir = normalizeWorkingDirForLookup(workingDir);
111254
+ const deps = {
111254
111255
  workspaceListStore: session2.workspaceListStore,
111255
111256
  sessionId: session2.sessionId,
111256
111257
  machineId: session2.machineId,
111257
111258
  backend: session2.backend
111258
- });
111259
- const normalizedWorkingDir = normalizeWorkingDirForLookup(workingDir);
111260
- if (!workspaces.some((w) => normalizeWorkingDirForLookup(w.workingDir) === normalizedWorkingDir)) {
111261
- return { ok: false, error: "Workspace not registered for this machine" };
111259
+ };
111260
+ const isRegistered = (workspaces) => workspaces.some((workspace) => normalizeWorkingDirForLookup(workspace.workingDir) === normalizedWorkingDir);
111261
+ if (isRegistered(await getWorkspacesForMachine(deps))) {
111262
+ return { ok: true };
111262
111263
  }
111263
- return { ok: true };
111264
+ if (isRegistered(await getWorkspacesForMachine({ ...deps, forceRefresh: true }))) {
111265
+ return { ok: true };
111266
+ }
111267
+ return { ok: false, error: "Workspace not registered for this machine" };
111264
111268
  }
111265
111269
  var init_assert_registered_working_dir = __esm(() => {
111266
111270
  init_workspace_cache();
@@ -134758,4 +134762,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
134758
134762
  });
134759
134763
  program2.parse();
134760
134764
 
134761
- //# debugId=FC425A6C08DFE01664756E2164756E21
134765
+ //# debugId=B34E804643624D4B64756E2164756E21