xclaude-launcher 0.1.3 → 0.1.4
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/commands/config.js +13 -0
- package/package.json +1 -1
package/dist/commands/config.js
CHANGED
|
@@ -6,10 +6,14 @@ export async function runConfigCommand(action) {
|
|
|
6
6
|
const configService = new ConfigService();
|
|
7
7
|
const promptService = new PromptService();
|
|
8
8
|
while (true) {
|
|
9
|
+
const fromArg = action !== undefined;
|
|
9
10
|
const nextAction = normalizeAction(action) ?? (await promptService.chooseConfigAction());
|
|
10
11
|
action = undefined;
|
|
11
12
|
if (nextAction === 'path') {
|
|
12
13
|
console.log(getConfigPath());
|
|
14
|
+
if (fromArg) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
13
17
|
continue;
|
|
14
18
|
}
|
|
15
19
|
if (nextAction === 'exit') {
|
|
@@ -63,6 +67,9 @@ export async function runConfigCommand(action) {
|
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
70
|
+
if (fromArg) {
|
|
71
|
+
return 0;
|
|
72
|
+
}
|
|
66
73
|
continue;
|
|
67
74
|
}
|
|
68
75
|
if (nextAction === 'add') {
|
|
@@ -78,6 +85,9 @@ export async function runConfigCommand(action) {
|
|
|
78
85
|
console.log(`Added profile: ${profile.name}`);
|
|
79
86
|
return 0;
|
|
80
87
|
}
|
|
88
|
+
if (fromArg) {
|
|
89
|
+
return 0;
|
|
90
|
+
}
|
|
81
91
|
continue;
|
|
82
92
|
}
|
|
83
93
|
if (nextAction === 'edit') {
|
|
@@ -101,6 +111,9 @@ export async function runConfigCommand(action) {
|
|
|
101
111
|
console.log(`Updated profile: ${updated.name}`);
|
|
102
112
|
continue;
|
|
103
113
|
}
|
|
114
|
+
if (fromArg) {
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
104
117
|
continue;
|
|
105
118
|
}
|
|
106
119
|
throw new CliError(`Unsupported config action: ${action}`);
|