coder-config 0.42.41 ā 0.43.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/lib/constants.js +1 -1
- package/lib/workstreams.js +22 -35
- package/package.json +1 -1
package/lib/constants.js
CHANGED
package/lib/workstreams.js
CHANGED
|
@@ -52,8 +52,9 @@ function workstreamList(installDir) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
console.log('\nš Workstreams:\n');
|
|
55
|
+
const detected = workstreamDetect(installDir, process.cwd());
|
|
55
56
|
for (const ws of data.workstreams) {
|
|
56
|
-
const active = ws.id ===
|
|
57
|
+
const active = detected && ws.id === detected.id ? 'ā ' : 'ā ';
|
|
57
58
|
console.log(`${active}${ws.name}`);
|
|
58
59
|
if (ws.projects && ws.projects.length > 0) {
|
|
59
60
|
console.log(` Projects: ${ws.projects.map(p => path.basename(p)).join(', ')}`);
|
|
@@ -93,11 +94,6 @@ function workstreamCreate(installDir, name, projects = [], rules = '') {
|
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
data.workstreams.push(workstream);
|
|
96
|
-
|
|
97
|
-
if (!data.activeId) {
|
|
98
|
-
data.activeId = workstream.id;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
97
|
saveWorkstreams(installDir, data);
|
|
102
98
|
console.log(`ā Created workstream: ${name}`);
|
|
103
99
|
return workstream;
|
|
@@ -146,11 +142,6 @@ function workstreamDelete(installDir, idOrName) {
|
|
|
146
142
|
}
|
|
147
143
|
|
|
148
144
|
const removed = data.workstreams.splice(idx, 1)[0];
|
|
149
|
-
|
|
150
|
-
if (data.activeId === removed.id) {
|
|
151
|
-
data.activeId = data.workstreams[0]?.id || null;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
145
|
saveWorkstreams(installDir, data);
|
|
155
146
|
console.log(`ā Deleted workstream: ${removed.name}`);
|
|
156
147
|
return true;
|
|
@@ -160,31 +151,29 @@ function workstreamDelete(installDir, idOrName) {
|
|
|
160
151
|
* Set active workstream
|
|
161
152
|
*/
|
|
162
153
|
function workstreamUse(installDir, idOrName) {
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
// Show current auto-detected workstream
|
|
165
155
|
if (!idOrName) {
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
console.log(`
|
|
156
|
+
const detected = workstreamDetect(installDir, process.cwd());
|
|
157
|
+
if (detected) {
|
|
158
|
+
console.log(`Auto-detected workstream: ${detected.name}`);
|
|
159
|
+
console.log(` (based on current directory)`);
|
|
169
160
|
} else {
|
|
170
|
-
console.log('No
|
|
161
|
+
console.log('No workstream detected for current directory');
|
|
171
162
|
}
|
|
172
|
-
return active || null;
|
|
173
|
-
}
|
|
174
163
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
console.error(`Workstream not found: ${idOrName}`);
|
|
181
|
-
return null;
|
|
164
|
+
const envWs = process.env.CODER_WORKSTREAM;
|
|
165
|
+
if (envWs) {
|
|
166
|
+
console.log(`\nCODER_WORKSTREAM env var: ${envWs}`);
|
|
167
|
+
}
|
|
168
|
+
return detected || null;
|
|
182
169
|
}
|
|
183
170
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
console.log(
|
|
187
|
-
|
|
171
|
+
// Deprecated: global active workstream
|
|
172
|
+
console.log('Global active workstream has been removed.');
|
|
173
|
+
console.log('\nWorkstreams are now auto-detected from the current directory.');
|
|
174
|
+
console.log('To override, set the CODER_WORKSTREAM environment variable:');
|
|
175
|
+
console.log(` export CODER_WORKSTREAM=${idOrName}`);
|
|
176
|
+
return null;
|
|
188
177
|
}
|
|
189
178
|
|
|
190
179
|
/**
|
|
@@ -267,14 +256,12 @@ function getActiveWorkstream(installDir, autoDetect = true) {
|
|
|
267
256
|
if (ws) return ws;
|
|
268
257
|
}
|
|
269
258
|
|
|
270
|
-
// Auto-detect from current directory
|
|
259
|
+
// Auto-detect from current directory
|
|
271
260
|
if (autoDetect) {
|
|
272
|
-
|
|
273
|
-
if (detected) return detected;
|
|
261
|
+
return workstreamDetect(installDir, process.cwd());
|
|
274
262
|
}
|
|
275
263
|
|
|
276
|
-
|
|
277
|
-
return data.workstreams.find(w => w.id === data.activeId) || null;
|
|
264
|
+
return null;
|
|
278
265
|
}
|
|
279
266
|
|
|
280
267
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.2",
|
|
4
4
|
"description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
|
|
5
5
|
"author": "regression.io",
|
|
6
6
|
"main": "config-loader.js",
|