@kendoo.agentdesk/agentdesk 0.9.9 → 0.9.11
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/cli/init.mjs +11 -11
- package/package.json +1 -1
package/cli/init.mjs
CHANGED
|
@@ -101,7 +101,13 @@ export async function runInit(cwd) {
|
|
|
101
101
|
if (project.lintCommand) console.log(` Lint: ${project.lintCommand}`);
|
|
102
102
|
if (project.testCommand || project.buildCommand || project.lintCommand) console.log("");
|
|
103
103
|
|
|
104
|
-
// --- Step 1:
|
|
104
|
+
// --- Step 1: Project key ---
|
|
105
|
+
const defaultKey = existingConfig.projectKey || projectId;
|
|
106
|
+
const keyAnswer = await ask(rl, ` Project key (${defaultKey}): `);
|
|
107
|
+
const finalProjectKey = keyAnswer.trim() || defaultKey;
|
|
108
|
+
console.log("");
|
|
109
|
+
|
|
110
|
+
// --- Step 2: Tracker selection (platform first) ---
|
|
105
111
|
const trackerOptions = [
|
|
106
112
|
{ label: "Linear", value: "linear" },
|
|
107
113
|
{ label: "Jira", value: "jira" },
|
|
@@ -154,8 +160,7 @@ export async function runInit(cwd) {
|
|
|
154
160
|
console.log(" Checking tracker permissions...");
|
|
155
161
|
const dotEnv = loadDotEnv(cwd);
|
|
156
162
|
const apiKey = loadApiKey(cwd);
|
|
157
|
-
const
|
|
158
|
-
const serverCreds = await fetchServerCreds(apiKey, defaultKey);
|
|
163
|
+
const serverCreds = await fetchServerCreds(apiKey, finalProjectKey);
|
|
159
164
|
const credentials = resolveCredentialsFromEnv({ ...dotEnv, ...serverCreds });
|
|
160
165
|
const check = await checkTrackerPermissions({ tracker, config, credentials });
|
|
161
166
|
|
|
@@ -324,12 +329,6 @@ export async function runInit(cwd) {
|
|
|
324
329
|
}
|
|
325
330
|
}
|
|
326
331
|
|
|
327
|
-
// --- Step 4: Project key ---
|
|
328
|
-
const defaultKey = existingConfig.projectKey || projectId;
|
|
329
|
-
const keyAnswer = await ask(rl, ` Project key (${defaultKey}): `);
|
|
330
|
-
const finalProjectKey = keyAnswer.trim() || defaultKey;
|
|
331
|
-
console.log("");
|
|
332
|
-
|
|
333
332
|
// --- Save .agentdesk.json ---
|
|
334
333
|
let merged = {};
|
|
335
334
|
if (hasConfig) {
|
|
@@ -392,8 +391,9 @@ export async function runInit(cwd) {
|
|
|
392
391
|
console.log(" Ready! Run a team session:");
|
|
393
392
|
console.log("");
|
|
394
393
|
if (tracker) {
|
|
395
|
-
|
|
396
|
-
console.log(` agentdesk team
|
|
394
|
+
const prefix = config.linear?.teamKey || config.jira?.project || finalProjectKey.toUpperCase();
|
|
395
|
+
console.log(` agentdesk team ${prefix}-123`);
|
|
396
|
+
console.log(` agentdesk team ${prefix}-123 -d "Optional extra context"`);
|
|
397
397
|
} else {
|
|
398
398
|
console.log(` agentdesk team my-feature -d "Add dark mode support"`);
|
|
399
399
|
}
|