chore: bump version to 0.1399

This commit is contained in:
arkon
2026-01-27 18:05:03 +01:00
parent 89a1723333
commit b3f808b5f5
5 changed files with 177 additions and 11 deletions
+38 -9
View File
@@ -2662,6 +2662,9 @@ class ClaudemanApp {
const plan = this.ralphWizardConfig.existingPlan;
if (!plan) return;
// Stop any ongoing plan generation
this.stopPlanGeneration();
// Convert existing todos to generatedPlan format (only pending items)
const pendingTodos = plan.todos.filter(t => t.status === 'pending' || t.status === 'in_progress');
this.ralphWizardConfig.generatedPlan = pendingTodos.map((todo, idx) => ({
@@ -2678,6 +2681,28 @@ class ClaudemanApp {
this.updateDetailLevelButtons();
}
// Stop any ongoing plan generation (abort fetch, clear timers, hide spinner)
stopPlanGeneration() {
// Abort ongoing fetch
if (this.planGenerationAbortController) {
this.planGenerationAbortController.abort();
this.planGenerationAbortController = null;
}
// Clear timers
if (this.planLoadingTimer) {
clearInterval(this.planLoadingTimer);
this.planLoadingTimer = null;
}
if (this.planPhaseTimer) {
clearInterval(this.planPhaseTimer);
this.planPhaseTimer = null;
}
// Hide loading spinner
document.getElementById('planGenerationLoading')?.classList.add('hidden');
}
// Generate a new plan (ignore existing)
generateNewPlan() {
this.ralphWizardConfig.useExistingPlan = false;
@@ -2832,15 +2857,11 @@ class ClaudemanApp {
async generatePlan() {
const config = this.ralphWizardConfig;
// Stop any existing timers
if (this.planLoadingTimer) {
clearInterval(this.planLoadingTimer);
this.planLoadingTimer = null;
}
if (this.planPhaseTimer) {
clearInterval(this.planPhaseTimer);
this.planPhaseTimer = null;
}
// Stop any existing generation first
this.stopPlanGeneration();
// Create abort controller for this generation
this.planGenerationAbortController = new AbortController();
// Show loading state, hide other sections
document.getElementById('existingPlanSection')?.classList.add('hidden');
@@ -2895,6 +2916,7 @@ class ClaudemanApp {
taskDescription: config.taskDescription,
detailLevel: config.planDetailLevel,
}),
signal: this.planGenerationAbortController?.signal,
});
const data = await res.json();
@@ -2946,6 +2968,13 @@ class ClaudemanApp {
clearInterval(this.planLoadingTimer);
this.planLoadingTimer = null;
}
// Ignore abort errors (user cancelled, e.g., clicked "Use Existing Plan")
if (err.name === 'AbortError') {
console.log('Plan generation aborted by user');
return;
}
console.error('Plan generation failed:', err);
this.showPlanError('Network error: ' + err.message);
}
+8
View File
@@ -2917,6 +2917,11 @@ NOW: Generate the implementation plan for the task above. Think step by step.`;
private async _doCleanupSession(sessionId: string, killScreen: boolean): Promise<void> {
const session = this.sessions.get(sessionId);
// Stop watching @fix_plan.md for this session
if (session) {
session.ralphTracker.stopWatchingFixPlan();
}
// Kill all subagents spawned by this session
if (session && killScreen) {
try {
@@ -3032,6 +3037,9 @@ NOW: Generate the implementation plan for the task above. Think step by step.`;
this.runSummaryTrackers.set(session.id, summaryTracker);
summaryTracker.recordSessionStarted(session.mode, session.workingDir);
// Set working directory for Ralph tracker to auto-load @fix_plan.md
session.ralphTracker.setWorkingDir(session.workingDir);
session.on('output', (data) => {
// Use batching for better performance at high throughput
this.batchOutputData(session.id, data);