Compare commits
1 Commits
bed74f9d33
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 723b7be84a |
49
index.ts
49
index.ts
@@ -1287,12 +1287,17 @@ async function handleReset(
|
|||||||
ctx: ExtensionContext,
|
ctx: ExtensionContext,
|
||||||
args: string[],
|
args: string[],
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
let sourcePath: string;
|
||||||
|
let prdKey: string | undefined;
|
||||||
|
let progress: ProgressTracker;
|
||||||
|
|
||||||
if (args[0]) {
|
if (args[0]) {
|
||||||
const taskFile = resolveTaskArg(args[0], ctx.cwd);
|
const taskFile = resolveTaskArg(args[0], ctx.cwd);
|
||||||
const found = findProgressFile(ctx.cwd, taskFile);
|
const found = findProgressFile(ctx.cwd, taskFile);
|
||||||
const projectDir = found ? path.dirname(path.dirname(found.path)) : ctx.cwd;
|
const projectDir = found ? path.dirname(path.dirname(found.path)) : ctx.cwd;
|
||||||
const progress = new ProgressTracker(projectDir, taskFile, found?.prdKey);
|
sourcePath = taskFile;
|
||||||
progress.reset();
|
prdKey = found?.prdKey;
|
||||||
|
progress = new ProgressTracker(projectDir, taskFile, prdKey);
|
||||||
} else {
|
} else {
|
||||||
const found = findProgressFile(ctx.cwd);
|
const found = findProgressFile(ctx.cwd);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
@@ -1315,13 +1320,41 @@ async function handleReset(
|
|||||||
ctx.ui.notify("Reset cancelled.", "info");
|
ctx.ui.notify("Reset cancelled.", "info");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const progress = new ProgressTracker(
|
sourcePath = selected.sourcePath;
|
||||||
projectDir,
|
prdKey = selected.prdKey;
|
||||||
selected.sourcePath,
|
progress = new ProgressTracker(projectDir, sourcePath, prdKey);
|
||||||
selected.prdKey,
|
|
||||||
);
|
|
||||||
progress.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ask whether to also clear the progress markers (checkboxes/status) in the
|
||||||
|
// source PRD/README file itself, not just .ralpi/progress.json.
|
||||||
|
const taskIds = Object.keys(progress.getState().tasks);
|
||||||
|
if (taskIds.length > 0) {
|
||||||
|
const choice = await ctx.ui.select(
|
||||||
|
`Also reset progress markers in the source file (${path.basename(
|
||||||
|
sourcePath,
|
||||||
|
)})?`,
|
||||||
|
[
|
||||||
|
"Yes — clear checkboxes/status markers in the source PRD/README",
|
||||||
|
"No — only reset .ralpi/progress.json",
|
||||||
|
],
|
||||||
|
);
|
||||||
|
if (choice === undefined) {
|
||||||
|
ctx.ui.notify("Reset cancelled.", "info");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (choice.startsWith("Yes")) {
|
||||||
|
progress.reset();
|
||||||
|
for (const id of taskIds) {
|
||||||
|
updateTaskInFile(sourcePath, id, "pending");
|
||||||
|
}
|
||||||
|
ctx.ui.notify(
|
||||||
|
`Progress reset — cleared ${taskIds.length} task marker(s) in ${path.basename(sourcePath)}.`,
|
||||||
|
"info",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
progress.reset();
|
||||||
ctx.ui.notify("Progress reset. All task statuses cleared.", "info");
|
ctx.ui.notify("Progress reset. All task statuses cleared.", "info");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mikefreno/ralpi",
|
"name": "@mikefreno/ralpi",
|
||||||
"version": "0.4.4",
|
"version": "0.5.0",
|
||||||
"description": "Execute tasks from task files/PRD's using DAG-based dependency resolution with persistent progress tracking",
|
"description": "Execute tasks from task files/PRD's using DAG-based dependency resolution with persistent progress tracking",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"pi-package",
|
"pi-package",
|
||||||
|
|||||||
@@ -1434,7 +1434,7 @@ async function runFollowUpSession(
|
|||||||
undefined,
|
undefined,
|
||||||
model,
|
model,
|
||||||
config.thinkingLevel,
|
config.thinkingLevel,
|
||||||
true, // noSkills — follow-up sessions don't need the skills catalog
|
false, // noSkills=false — follow-up sessions load skills too
|
||||||
(ctx.modelRegistry as any).runtime as ModelRuntime,
|
(ctx.modelRegistry as any).runtime as ModelRuntime,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
1257
src/utils.ts
1257
src/utils.ts
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user