V1.0.0 #8
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codetease/mep!8
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In this commit:
Pipelineclass insrc/pipeline.tsusing Builder pattern.stepandstepIffor sequential workflow execution.pipeline()static method toMepCLIinsrc/core.ts.Pipelineinsrc/index.ts.examples/pipeline-demo.ts.src/prompts/code.ts.In this commit:
TaskRunnerclass insrc/tasks.tsfor concurrent task management.MepCLI.tasks()static method insrc/core.ts.Pipelineto support passingTaskRunnerinstance.TaskStatus,TaskConfig, etc., tosrc/types.ts.generateProgressBarutility insrc/utils.ts.examples/task-runner.ts.@ -0,0 +1,230 @@import { BreadcrumbPrompt } from './breadcrumb';Useless assignment to local variable
The value assigned to localScrollTop here is unused.
In general, to fix a "useless assignment to local variable" you either (a) remove the variable and its assignments if they are truly unused, or (b) refactor the code so the variable’s value is actually used in the intended logic. Here, the windowing logic for search mode is already implemented using
startandthis.searchCursor, makinglocalScrollTopredundant.The best fix with no behavior change is to completely remove the
localScrollTopvariable and its accompanying conditional block (lines 169–174). The rest of the logic, starting atconst half = Math.floor(pageSize / 2);, remains untouched and continues to control which slice ofthis.filteredEntriesis displayed. No imports, new methods, or definitions are required; we are only deleting unused code and some now-misleading comments about reusing scroll logic.Concretely, in
src/prompts/breadcrumb-search.ts, inside theelsebranch that handlesthis.filteredEntries.length > 0, remove the block:and directly follow the comment about keeping it simple with the
half/startcalculation that is already present.Useless assignment to local variable
The value assigned to localScrollTop here is unused.
In general, to fix a useless assignment to a local variable, either (a) remove the variable and all its assignments if its value is truly unused, or (b) if the variable was intended to control logic, refactor the code so that its value is actually used in the subsequent computation. Here, the windowing logic for the visible entries is already correctly expressed using
start, andlocalScrollTopis not referenced anywhere after being computed, so the safest fix that does not alter behavior is to delete the unused variable and its conditional updates.Concretely, in
src/prompts/breadcrumb-search.ts, within theelsebranch that handlesthis.filteredEntries.length !== 0, you should remove the declarationlet localScrollTop = 0;and the subsequentif/else ifblock that updates it. Then the code will go directly from computingpageSizeand initializingstartto thehalf/startwindow calculation aroundthis.searchCursor. No new imports or helper methods are required; this is a pure deletion of dead code.Unused variable, import, function or class
Unused variable width.
In general, the right fix for an unused variable is to either remove it or start using it meaningfully. Since the current simplified implementation does not use terminal width for any rendering logic, the safest change that does not alter behavior is to remove the unused declaration.
Specifically, in
src/prompts/breadcrumb-search.ts, inside therender(firstRender: boolean)method, remove the lineconst width = this.stdout.columns || 80;(currently line 147). No other code referenceswidth, so no additional changes or imports are needed. This preserves all existing functionality and simply eliminates the dead variable that CodeQL flags.