fix: Remove unused vars and improve type safety. Improve task recovery

This commit is contained in:
gsxdsm
2026-02-17 13:18:40 -08:00
parent 8bb10632b1
commit de021f96bf
68 changed files with 1028 additions and 534 deletions

View File

@@ -31,8 +31,8 @@ export async function getTrackedBranches(projectPath: string): Promise<TrackedBr
const content = (await secureFs.readFile(filePath, 'utf-8')) as string;
const data: BranchTrackingData = JSON.parse(content);
return data.branches || [];
} catch (error: any) {
if (error.code === 'ENOENT') {
} catch (error: unknown) {
if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
return [];
}
logger.warn('Failed to read tracked branches:', error);

View File

@@ -117,7 +117,7 @@ export function createCreatePRHandler() {
cwd: worktreePath,
env: execEnv,
});
} catch (error: unknown) {
} catch {
// If push fails, try with --set-upstream
try {
await execAsync(`git push --set-upstream origin ${branchName}`, {
@@ -195,7 +195,7 @@ export function createCreatePRHandler() {
}
}
}
} catch (error) {
} catch {
// Couldn't parse remotes - will try fallback
}
@@ -216,7 +216,7 @@ export function createCreatePRHandler() {
originOwner = owner;
repoUrl = `https://github.com/${owner}/${repo}`;
}
} catch (error) {
} catch {
// Failed to get repo URL from config
}
}

View File

@@ -51,7 +51,7 @@ export function createDeleteHandler() {
// Remove the worktree (using array arguments to prevent injection)
try {
await execGitCommand(['worktree', 'remove', worktreePath, '--force'], projectPath);
} catch (error) {
} catch {
// Try with prune if remove fails
await execGitCommand(['worktree', 'prune'], projectPath);
}