sdocs-dev 1.4.0 → 1.4.1
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/bin/sdocs-dev.js +14 -6
- package/package.json +1 -1
package/bin/sdocs-dev.js
CHANGED
|
@@ -178,28 +178,36 @@ async function runSetup({ force = false } = {}) {
|
|
|
178
178
|
const opencodeAlreadyDone = fileHasBlock(path.join(os.homedir(), '.config', 'opencode', 'AGENTS.md'));
|
|
179
179
|
if (opencodeAlreadyDone) {
|
|
180
180
|
writeSetupState({ setupCompleted: new Date().toISOString(), writtenTo: [], declined: false });
|
|
181
|
+
console.log('\nSDocs is already set up in all detected agent configs. Nothing to do.');
|
|
181
182
|
return;
|
|
182
183
|
}
|
|
183
|
-
console.log('\
|
|
184
|
+
console.log('\n\u2728\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SDocs setup \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2728');
|
|
185
|
+
console.log('First run only \u2014 wire SDocs into your coding agents.\n');
|
|
186
|
+
console.log('No coding-agent configs detected.');
|
|
184
187
|
const a = await ask('Do you use opencode? [y/N] ');
|
|
185
188
|
const writtenTo = [];
|
|
186
189
|
if (a === 'y' || a === 'yes') {
|
|
187
190
|
const target = path.join(os.homedir(), '.config', 'opencode', 'AGENTS.md');
|
|
188
191
|
try { appendBlockTo(target); writtenTo.push(target); console.log(`\u2713 Wrote SDocs section to ${target}`); }
|
|
189
192
|
catch (e) { console.error(`Failed to write ${target}: ${e.message}`); }
|
|
193
|
+
console.log('Done. Run `sdoc setup` any time to revisit.');
|
|
194
|
+
} else {
|
|
195
|
+
console.log('Skipped. Run `sdoc setup` any time to revisit.');
|
|
190
196
|
}
|
|
191
197
|
writeSetupState({ setupCompleted: new Date().toISOString(), writtenTo, declined: writtenTo.length === 0 });
|
|
192
|
-
console.log('Run `sdoc setup` any time to revisit.');
|
|
193
198
|
return;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
|
-
console.log('\
|
|
201
|
+
console.log('\n\u2728\u2500\u2500\u2500\u2500\u2500\u2500\u2500 SDocs setup \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2728');
|
|
202
|
+
console.log('First run only \u2014 wire SDocs into your coding agents.\n');
|
|
197
203
|
console.log('Detected: ' + detected.map(t => t.name).join(', '));
|
|
198
204
|
console.log('\nWill append a short SDocs section to:');
|
|
199
205
|
for (const t of detected) console.log(' ' + t.filePath);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
console.log(
|
|
206
|
+
const RULE = '\u2550'.repeat(36);
|
|
207
|
+
const previewBody = AGENT_BLOCK.replace(AGENT_BLOCK_MARKER + '\n', '').trim();
|
|
208
|
+
console.log(`\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Block to add \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`);
|
|
209
|
+
console.log(previewBody);
|
|
210
|
+
console.log(RULE + '\n');
|
|
203
211
|
|
|
204
212
|
const a = await ask('Add to all? [Y/n/skip] ');
|
|
205
213
|
const skipped = a === 'skip' || (a && a !== 'y' && a !== 'yes');
|