@gethmy/mcp 2.22.0 → 2.24.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/src/tui/setup.ts CHANGED
@@ -19,8 +19,7 @@ import {
19
19
  loadConfig,
20
20
  saveConfig,
21
21
  saveLocalConfig,
22
- setActiveProject,
23
- setActiveWorkspace,
22
+ setActiveContext,
24
23
  } from "../config.js";
25
24
  import { loginWithBrowser, type OAuthTokens } from "../oauth-login.js";
26
25
  import { onboardNewUser } from "../onboard.js";
@@ -960,8 +959,10 @@ export async function runSetup(options: SetupOptions = {}): Promise<void> {
960
959
 
961
960
  // Save config immediately
962
961
  saveConfig({ apiKey, userEmail, apiUrl: API_URL });
963
- setActiveWorkspace(selectedWorkspaceIdFromSignup);
964
- setActiveProject(selectedProjectIdFromSignup);
962
+ setActiveContext({
963
+ workspaceId: selectedWorkspaceIdFromSignup,
964
+ projectId: selectedProjectIdFromSignup,
965
+ });
965
966
 
966
967
  p.log.success("Workspace and board created");
967
968
  } catch (error) {
@@ -1563,8 +1564,22 @@ export async function runSetup(options: SetupOptions = {}): Promise<void> {
1563
1564
  ` ${colors.success("\u2713")} ${colors.dim(formatPath(getLocalConfigPath(cwd), home))} ${colors.dim("(created)")}`,
1564
1565
  );
1565
1566
 
1566
- if (selectedWorkspaceId) setActiveWorkspace(selectedWorkspaceId);
1567
- if (selectedProjectId) setActiveProject(selectedProjectId);
1567
+ // Mirror the choice into the GLOBAL default, explicitly (#893). The local
1568
+ // file above already pins this directory; this second write is what gives a
1569
+ // server started elsewhere — Claude Desktop, another repo — a context at
1570
+ // all. It must say `global: true`: without it the write would find the file
1571
+ // just created one line up and land back in it, and the global default
1572
+ // would stay empty. One pair either way — a project is never set without
1573
+ // its workspace.
1574
+ if (selectedWorkspaceId || selectedProjectId) {
1575
+ setActiveContext(
1576
+ {
1577
+ workspaceId: selectedWorkspaceId ?? null,
1578
+ projectId: selectedProjectId ?? null,
1579
+ },
1580
+ { global: true },
1581
+ );
1582
+ }
1568
1583
  }
1569
1584
 
1570
1585
  // Step 10: Show completion message