refactor: create PipelineStatusInfo interface to eliminate type duplication

Define a dedicated PipelineStatusInfo interface and use it consistently in both
resumePipelineFeature() parameter and detectPipelineStatus() return type.

This eliminates duplicate inline type definitions and improves maintainability
by ensuring both locations always stay in sync. Any future changes to the
pipeline status structure only need to be made in one place.

Changes:
- Add PipelineStatusInfo interface definition
- Replace inline type in resumePipelineFeature() with PipelineStatusInfo
- Replace inline return type in detectPipelineStatus() with PipelineStatusInfo

Co-authored-by: gemini-code-assist bot

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Stephan Rieche
2026-01-02 13:02:43 +01:00
parent 3ff9658723
commit 7a2a3ef500

View File

@@ -74,6 +74,18 @@ interface PlanSpec {
tasks?: ParsedTask[];
}
/**
* Information about pipeline status when resuming a feature
*/
interface PipelineStatusInfo {
isPipeline: boolean;
stepId: string | null;
stepIndex: number;
totalSteps: number;
step: PipelineStep | null;
config: PipelineConfig | null;
}
/**
* Parse tasks from generated spec content
* Looks for the ```tasks code block and extracts task lines
@@ -757,14 +769,7 @@ Complete the pipeline step instructions above. Review the previous work and appl
projectPath: string,
feature: Feature,
useWorktrees: boolean,
pipelineInfo: {
isPipeline: boolean;
stepId: string | null;
stepIndex: number;
totalSteps: number;
step: PipelineStep | null;
config: PipelineConfig | null;
}
pipelineInfo: PipelineStatusInfo
): Promise<void> {
const featureId = feature.id;
console.log(
@@ -2761,14 +2766,7 @@ Review the previous work and continue the implementation. If the feature appears
projectPath: string,
featureId: string,
currentStatus: FeatureStatusWithPipeline
): Promise<{
isPipeline: boolean;
stepId: string | null;
stepIndex: number;
totalSteps: number;
step: PipelineStep | null;
config: PipelineConfig | null;
}> {
): Promise<PipelineStatusInfo> {
// Check if status is pipeline format using PipelineService
const isPipeline = pipelineService.isPipelineStatus(currentStatus);