@kody-ade/kody-engine-lite 0.1.110 → 0.1.112
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/dist/bin/cli.js +29 -3
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -984,7 +984,24 @@ function resolveTaskIdFromComments(issueNumber) {
|
|
|
984
984
|
return null;
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
+
function findPausedTaskifyForIssue(issueNumber, projectDir) {
|
|
988
|
+
const tasksDir = path8.join(projectDir, ".kody", "tasks");
|
|
989
|
+
if (!fs9.existsSync(tasksDir)) return null;
|
|
990
|
+
const allDirs = fs9.readdirSync(tasksDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort().reverse();
|
|
991
|
+
for (const dir of allDirs) {
|
|
992
|
+
const markerPath = path8.join(tasksDir, dir, "taskify.marker");
|
|
993
|
+
if (!fs9.existsSync(markerPath)) continue;
|
|
994
|
+
try {
|
|
995
|
+
const marker = JSON.parse(fs9.readFileSync(markerPath, "utf-8"));
|
|
996
|
+
if (marker.issueNumber === issueNumber) return dir;
|
|
997
|
+
} catch {
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
987
1002
|
function resolveTaskIdForCommand(issueNumber, projectDir) {
|
|
1003
|
+
const fromTaskify = findPausedTaskifyForIssue(issueNumber, projectDir);
|
|
1004
|
+
if (fromTaskify) return fromTaskify;
|
|
988
1005
|
const fromTasks = findLatestTaskForIssue(issueNumber, projectDir);
|
|
989
1006
|
if (fromTasks) return fromTasks;
|
|
990
1007
|
const fromComments = resolveTaskIdFromComments(issueNumber);
|
|
@@ -1325,7 +1342,10 @@ ${lines.join("\n")}
|
|
|
1325
1342
|
const prompt = buildPrompt({ ticketId, fileContent, taskDir, feedback, projectContext });
|
|
1326
1343
|
if (issueNumber && !local) {
|
|
1327
1344
|
const src = mode === "file" ? `file \`${path10.basename(prdFile)}\`` : `ticket **${ticketId}**`;
|
|
1328
|
-
|
|
1345
|
+
const runUrl = process.env.RUN_URL ? ` ([logs](${process.env.RUN_URL}))` : "";
|
|
1346
|
+
postComment(issueNumber, `\u{1F680} Kody pipeline started: \`${taskId}\`${runUrl}
|
|
1347
|
+
|
|
1348
|
+
Kody is decomposing ${src} into tasks...`);
|
|
1329
1349
|
setLifecycleLabel(issueNumber, "planning");
|
|
1330
1350
|
}
|
|
1331
1351
|
fs11.writeFileSync(path10.join(taskDir, MARKER_FILE), JSON.stringify({ ticketId, prdFile, issueNumber }));
|
|
@@ -1427,8 +1447,14 @@ async function handleTasks(parsed, ticketId, issueNumber, local) {
|
|
|
1427
1447
|
filed.push({ number: 0, url: "#", title: task.title });
|
|
1428
1448
|
continue;
|
|
1429
1449
|
}
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1450
|
+
const safeLabels = [
|
|
1451
|
+
...(task.labels ?? []).filter((l) => l.startsWith("priority:") || l.startsWith("kody:")),
|
|
1452
|
+
...task.priority ? [`priority:${task.priority}`] : []
|
|
1453
|
+
];
|
|
1454
|
+
let issue = createIssue(task.title, task.body, safeLabels);
|
|
1455
|
+
if (!issue && safeLabels.length > 0) {
|
|
1456
|
+
issue = createIssue(task.title, task.body, []);
|
|
1457
|
+
}
|
|
1432
1458
|
if (issue) {
|
|
1433
1459
|
filed.push({ number: issue.number, url: issue.url, title: task.title });
|
|
1434
1460
|
} else {
|