icbauggw 1.2.2 → 1.2.3
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/package.json +1 -1
- package/src/commands/switch.js +16 -1
- package/src/utils/paths.js +5 -1
package/package.json
CHANGED
package/src/commands/switch.js
CHANGED
|
@@ -2,7 +2,7 @@ const fs = require("fs");
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const { apiRequest } = require("../utils/api");
|
|
4
4
|
const { requireAuth } = require("../utils/auth");
|
|
5
|
-
const { getSessionPath } = require("../utils/paths");
|
|
5
|
+
const { getSessionPath, getClaudeSettingsPath } = require("../utils/paths");
|
|
6
6
|
|
|
7
7
|
async function switchCommand() {
|
|
8
8
|
requireAuth();
|
|
@@ -26,6 +26,21 @@ async function switchCommand() {
|
|
|
26
26
|
};
|
|
27
27
|
fs.writeFileSync(sessionPath, JSON.stringify(session, null, 2), "utf8");
|
|
28
28
|
|
|
29
|
+
// Write Claude settings file
|
|
30
|
+
if (data.claudeSettings) {
|
|
31
|
+
const claudeSettingsPath = getClaudeSettingsPath();
|
|
32
|
+
const claudeDir = path.dirname(claudeSettingsPath);
|
|
33
|
+
if (!fs.existsSync(claudeDir)) {
|
|
34
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
35
|
+
}
|
|
36
|
+
fs.writeFileSync(
|
|
37
|
+
claudeSettingsPath,
|
|
38
|
+
JSON.stringify(data.claudeSettings, null, 2),
|
|
39
|
+
"utf8",
|
|
40
|
+
);
|
|
41
|
+
console.log(` Claude settings → ${claudeSettingsPath}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
console.log("✅ Session switched!");
|
|
30
45
|
console.log(` Account: ${data.accountName}`);
|
|
31
46
|
console.log(` Tenant: ${data.tenantURL}`);
|
package/src/utils/paths.js
CHANGED
|
@@ -9,4 +9,8 @@ function getSessionPath() {
|
|
|
9
9
|
return path.join(os.homedir(), ".augment", "session.json");
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function getClaudeSettingsPath() {
|
|
13
|
+
return path.join(os.homedir(), ".claude", "settings.json");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = { getTokenPath, getSessionPath, getClaudeSettingsPath };
|