coder-config 0.43.12 → 0.43.16
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
CHANGED
package/lib/workstreams.js
CHANGED
|
@@ -186,15 +186,28 @@ function workstreamUse(installDir, idOrName, evalMode = false) {
|
|
|
186
186
|
|
|
187
187
|
// Output for eval mode: eval "$(coder-config workstream use name --eval)"
|
|
188
188
|
if (evalMode) {
|
|
189
|
+
// Output export command and a user-friendly message to stderr
|
|
189
190
|
console.log(`export CODER_WORKSTREAM="${ws.name}"`);
|
|
191
|
+
console.log(`echo "📂 Workstream: ${ws.name}"`);
|
|
190
192
|
return ws;
|
|
191
193
|
}
|
|
192
194
|
|
|
193
|
-
// Normal mode:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
// Normal mode: check if cws function exists and give appropriate instructions
|
|
196
|
+
const cwsInstalled = workstreamCdHookStatus().installed;
|
|
197
|
+
if (cwsInstalled) {
|
|
198
|
+
console.log(`Use the cws function to activate workstreams:`);
|
|
199
|
+
console.log(` cws ${ws.name}`);
|
|
200
|
+
console.log('');
|
|
201
|
+
console.log(`Or if calling directly:`);
|
|
202
|
+
console.log(` eval "$(coder-config workstream use ${ws.name} --eval)"`);
|
|
203
|
+
} else {
|
|
204
|
+
console.log(`To activate workstream "${ws.name}", install the cd hook first:`);
|
|
205
|
+
console.log(` coder-config workstream install-cd-hook`);
|
|
206
|
+
console.log('');
|
|
207
|
+
console.log(`Then use: cws ${ws.name}`);
|
|
208
|
+
console.log('');
|
|
209
|
+
console.log(`Or manually: export CODER_WORKSTREAM="${ws.name}"`);
|
|
210
|
+
}
|
|
198
211
|
return ws;
|
|
199
212
|
}
|
|
200
213
|
|
|
@@ -1162,6 +1175,15 @@ coder_workstream_cd() {
|
|
|
1162
1175
|
fi
|
|
1163
1176
|
}
|
|
1164
1177
|
alias cd='coder_workstream_cd'
|
|
1178
|
+
|
|
1179
|
+
# cws - workstream use shortcut (activates workstream in current shell)
|
|
1180
|
+
cws() {
|
|
1181
|
+
if [ -z "$1" ]; then
|
|
1182
|
+
coder-config workstream use
|
|
1183
|
+
else
|
|
1184
|
+
eval "$(coder-config workstream use "$@" --eval)"
|
|
1185
|
+
fi
|
|
1186
|
+
}
|
|
1165
1187
|
# end coder-config workstream cd hook
|
|
1166
1188
|
`;
|
|
1167
1189
|
|
|
@@ -1169,6 +1191,30 @@ alias cd='coder_workstream_cd'
|
|
|
1169
1191
|
if (fs.existsSync(rcFile)) {
|
|
1170
1192
|
const content = fs.readFileSync(rcFile, 'utf8');
|
|
1171
1193
|
if (content.includes(hookMarker)) {
|
|
1194
|
+
// Check if cws function is already there (might be old install without it)
|
|
1195
|
+
if (!content.includes('cws()')) {
|
|
1196
|
+
// Add just the cws function
|
|
1197
|
+
const cwsFunc = `
|
|
1198
|
+
# cws - workstream use shortcut (activates workstream in current shell)
|
|
1199
|
+
cws() {
|
|
1200
|
+
if [ -z "$1" ]; then
|
|
1201
|
+
coder-config workstream use
|
|
1202
|
+
else
|
|
1203
|
+
eval "$(coder-config workstream use "$@" --eval)"
|
|
1204
|
+
fi
|
|
1205
|
+
}
|
|
1206
|
+
`;
|
|
1207
|
+
// Insert before the end marker
|
|
1208
|
+
const endMarker = '# end coder-config workstream cd hook';
|
|
1209
|
+
const newContent = content.replace(endMarker, cwsFunc + endMarker);
|
|
1210
|
+
fs.writeFileSync(rcFile, newContent);
|
|
1211
|
+
console.log('✓ Added cws function to existing hook');
|
|
1212
|
+
console.log(` Location: ${rcFile}`);
|
|
1213
|
+
console.log('');
|
|
1214
|
+
console.log('Restart your shell or run:');
|
|
1215
|
+
console.log(` source ${rcFile}`);
|
|
1216
|
+
return true;
|
|
1217
|
+
}
|
|
1172
1218
|
console.log('✓ Workstream cd hook already installed');
|
|
1173
1219
|
console.log(` Location: ${rcFile}`);
|
|
1174
1220
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.16",
|
|
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",
|