opencode-pilot 0.7.0 → 0.7.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/opencode-pilot +30 -13
- package/package.json +1 -1
package/bin/opencode-pilot
CHANGED
|
@@ -247,14 +247,7 @@ async function configCommand() {
|
|
|
247
247
|
process.exit(1);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
// Validate defaults section
|
|
251
|
-
console.log("");
|
|
252
|
-
console.log("Defaults:");
|
|
253
250
|
const defaults = config.defaults || {};
|
|
254
|
-
console.log(` working_dir: ${defaults.working_dir || "~"}`);
|
|
255
|
-
console.log(` prompt: ${defaults.prompt || "default"}`);
|
|
256
|
-
if (defaults.agent) console.log(` agent: ${defaults.agent}`);
|
|
257
|
-
if (defaults.model) console.log(` model: ${defaults.model}`);
|
|
258
251
|
|
|
259
252
|
// Validate repos section
|
|
260
253
|
console.log("");
|
|
@@ -314,16 +307,40 @@ async function configCommand() {
|
|
|
314
307
|
console.log(` ✓ ${name}: ${tool.mcp}/${tool.name}`);
|
|
315
308
|
}
|
|
316
309
|
|
|
317
|
-
// Show
|
|
318
|
-
|
|
310
|
+
// Show prompt and agent
|
|
311
|
+
const prompt = source.prompt || defaults.prompt || "default";
|
|
312
|
+
const agent = source.agent || defaults.agent;
|
|
313
|
+
console.log(` prompt: ${prompt}`);
|
|
314
|
+
if (agent) console.log(` agent: ${agent}`);
|
|
315
|
+
|
|
316
|
+
// Show repo resolution - interpolate template with configured repos
|
|
317
|
+
const configuredRepos = Object.keys(config.repos || {});
|
|
318
|
+
if (source.repos) {
|
|
319
|
+
// Explicit repos filter - check if it's all configured repos
|
|
320
|
+
const isAll = configuredRepos.length > 0 &&
|
|
321
|
+
source.repos.length === configuredRepos.length &&
|
|
322
|
+
source.repos.every(r => configuredRepos.includes(r));
|
|
323
|
+
if (isAll) {
|
|
324
|
+
console.log(` repos: all`);
|
|
325
|
+
} else {
|
|
326
|
+
for (const repo of source.repos) {
|
|
327
|
+
console.log(` repo: ${repo}`);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
} else if (source.repo && source.repo.includes("{")) {
|
|
331
|
+
// Template like {repository_full_name} - matches all configured repos
|
|
332
|
+
if (configuredRepos.length > 0) {
|
|
333
|
+
console.log(` repos: all`);
|
|
334
|
+
} else {
|
|
335
|
+
console.log(` repos: (none configured)`);
|
|
336
|
+
}
|
|
337
|
+
} else if (source.repo) {
|
|
338
|
+
// Static repo
|
|
319
339
|
console.log(` repo: ${source.repo}`);
|
|
320
|
-
} else if (source.repos) {
|
|
321
|
-
console.log(` repos: ${Array.isArray(source.repos) ? source.repos.join(", ") : JSON.stringify(source.repos)}`);
|
|
322
340
|
} else if (source.working_dir) {
|
|
323
341
|
console.log(` working_dir: ${source.working_dir}`);
|
|
324
|
-
} else {
|
|
325
|
-
console.log(` (uses defaults.working_dir)`);
|
|
326
342
|
}
|
|
343
|
+
// Don't show working_dir if it's just the default
|
|
327
344
|
}
|
|
328
345
|
}
|
|
329
346
|
|