remove completed runs from live flow
This commit is contained in:
@@ -26,7 +26,7 @@ The only real npm dependency is `yaml` (^2.4.0).
|
|||||||
|
|
||||||
## Source structure
|
## Source structure
|
||||||
|
|
||||||
- `index.ts` — extension entry, command routing, UI registration
|
- `index.ts` — extension entry, command routing, UI registration, reload detection
|
||||||
- `src/` — all logic modules:
|
- `src/` — all logic modules:
|
||||||
- `parser.ts` — task file parsing (Fio, checkbox, YAML formats)
|
- `parser.ts` — task file parsing (Fio, checkbox, YAML formats)
|
||||||
- `dag.ts` — Kahn's algorithm dependency resolution, batch planning
|
- `dag.ts` — Kahn's algorithm dependency resolution, batch planning
|
||||||
@@ -37,12 +37,13 @@ The only real npm dependency is `yaml` (^2.4.0).
|
|||||||
- `utils.ts` — config loading, progress discovery, `runAgentSession()`
|
- `utils.ts` — config loading, progress discovery, `runAgentSession()`
|
||||||
- `types.ts` — all interfaces and `DEFAULT_CONFIG`
|
- `types.ts` — all interfaces and `DEFAULT_CONFIG`
|
||||||
- `widget-batcher.ts` — debounced widget updates for parallel tasks
|
- `widget-batcher.ts` — debounced widget updates for parallel tasks
|
||||||
|
- `constants.ts` — static constants
|
||||||
- `skills/ralpi-use.md` — Pi skill definition for task execution
|
- `skills/ralpi-use.md` — Pi skill definition for task execution
|
||||||
- `tasks/` — example ralpi task files (self-modification history)
|
- `prompts/task-manager.md` — Pi prompt for task planning
|
||||||
|
|
||||||
## Runtime state
|
## Runtime state
|
||||||
|
|
||||||
All runtime state lives in `.ralpi/` (gitignored):
|
All runtime state lives in `.ralpi/` in the **project directory** (not this extension directory):
|
||||||
- `.ralpi/progress.json` — execution progress, supports multiple PRDs
|
- `.ralpi/progress.json` — execution progress, supports multiple PRDs
|
||||||
- `.ralpi/reflections/` — per-task reflection JSON files
|
- `.ralpi/reflections/` — per-task reflection JSON files
|
||||||
- `.ralpi/prompts/` — generated prompts (timestamped, for debugging)
|
- `.ralpi/prompts/` — generated prompts (timestamped, for debugging)
|
||||||
|
|||||||
19
index.ts
19
index.ts
@@ -202,18 +202,15 @@ async function executePlanBatches(
|
|||||||
failedTaskIds,
|
failedTaskIds,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Replace remaining batches with filtered ones
|
// Keep processed batches (up to current batch), replace the rest
|
||||||
const currentIdx = plan.batches.indexOf(batch);
|
// with the fresh plan — its batchIndex restarts at 0, so filtering
|
||||||
const remainingBatches = newPlan.batches.filter(
|
// by batchIndex > currentIdx would incorrectly drop the next batch.
|
||||||
(b) => b.batchIndex > currentIdx,
|
const processedCount = plan.batches.indexOf(batch) + 1;
|
||||||
);
|
plan.batches.length = processedCount;
|
||||||
|
plan.batches.push(...newPlan.batches);
|
||||||
|
|
||||||
// Update the plan's batches in-place
|
// Skip if nothing remaining
|
||||||
plan.batches.length = 0;
|
if (plan.batches.length === processedCount) {
|
||||||
plan.batches.push(...remainingBatches);
|
|
||||||
|
|
||||||
// Skip empty batches
|
|
||||||
if (remainingBatches.length === 0) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -500,7 +500,9 @@ async function executeBatchParallel(
|
|||||||
truncateToWidth(`${frame} ${entry.taskHeader}`, effectiveWidth),
|
truncateToWidth(`${frame} ${entry.taskHeader}`, effectiveWidth),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (entry.toolCalls.length > 0) {
|
// Only show tool calls for in-progress tasks; completed/failed
|
||||||
|
// tasks already have their tool-call tree in the chat history message.
|
||||||
|
if (!entry.done && entry.toolCalls.length > 0) {
|
||||||
if (entry.toolCalls.length <= MAX_COLLAPSED) {
|
if (entry.toolCalls.length <= MAX_COLLAPSED) {
|
||||||
for (let i = 0; i < entry.toolCalls.length; i++) {
|
for (let i = 0; i < entry.toolCalls.length; i++) {
|
||||||
const tc = entry.toolCalls[i];
|
const tc = entry.toolCalls[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user