V1.0.0-beta.1 #7

Merged
irammini merged 91 commits from feat/more-prompts into main 2026-02-02 17:02:15 +00:00
irammini commented 2026-01-31 00:19:30 +00:00 (Migrated from github.com)
No description provided.
irammini commented 2026-01-31 00:59:35 +00:00 (Migrated from github.com)

In this commit:

  • Added OTPPrompt for fixed-length masked numeric input with auto-submit.
  • Added QuizSelectPrompt and QuizTextPrompt with "Reveal Phase" for interactive feedback.
  • Refactored SelectPrompt and TextPrompt to use protected members and generic options for extensibility.
  • Updated MepCLI facade with otp, quizSelect, and quizText methods.
  • Updated types.ts with new option interfaces.
  • Also added experimental warning in CodePrompt.
In this commit: - Added `OTPPrompt` for fixed-length masked numeric input with auto-submit. - Added `QuizSelectPrompt` and `QuizTextPrompt` with "Reveal Phase" for interactive feedback. - Refactored `SelectPrompt` and `TextPrompt` to use `protected` members and generic options for extensibility. - Updated `MepCLI` facade with `otp`, `quizSelect`, and `quizText` methods. - Updated `types.ts` with new option interfaces. - Also added experimental warning in `CodePrompt`.
irammini commented 2026-01-31 11:28:11 +00:00 (Migrated from github.com)

In this commit:

  • Added KanbanPrompt for column-based item management with drag-and-drop.
  • Added TimePrompt for vertical scrolling time selection.
  • Added HeatmapPrompt for grid-based intensity selection.
  • Exposed new prompts via MepCLI.
  • Added missing ANSI color codes.
In this commit: - Added `KanbanPrompt` for column-based item management with drag-and-drop. - Added `TimePrompt` for vertical scrolling time selection. - Added `HeatmapPrompt` for grid-based intensity selection. - Exposed new prompts via `MepCLI`. - Added missing ANSI color codes.
irammini commented 2026-01-31 11:48:40 +00:00 (Migrated from github.com)

In this commit:

  • Kanban:
    • Normal mode: Scroll Up/Down to navigate items.
    • Grabbed mode: Scroll Up/Down to move grabbed item horizontally.
  • Time: Scroll Up/Down to adjust time values.
  • Heatmap:
    • Scroll Up/Down to navigate rows.
    • Added Tab/Shift+Tab for horizontal navigation.
In this commit: - Kanban: - Normal mode: Scroll Up/Down to navigate items. - Grabbed mode: Scroll Up/Down to move grabbed item horizontally. - Time: Scroll Up/Down to adjust time values. - Heatmap: - Scroll Up/Down to navigate rows. - Added Tab/Shift+Tab for horizontal navigation.
irammini commented 2026-01-31 12:48:10 +00:00 (Migrated from github.com)

In this commit:

  • Added SlotPrompt with circular scrolling and deceleration physics.
  • Added GaugePrompt with oscillating cursor and configurable safe zones.
  • Updated MepCLI facade to include slot and gauge methods.
  • Updated src/types.ts with SlotOptions and GaugeOptions.
  • Exported new prompts in src/index.ts.
In this commit: - Added `SlotPrompt` with circular scrolling and deceleration physics. - Added `GaugePrompt` with oscillating cursor and configurable safe zones. - Updated `MepCLI` facade to include `slot` and `gauge` methods. - Updated `src/types.ts` with `SlotOptions` and `GaugeOptions`. - Exported new prompts in `src/index.ts`.
irammini commented 2026-01-31 13:21:02 +00:00 (Migrated from github.com)

In this commit:

  • Implements CalculatorPrompt with safe evaluation engine and real-time preview
  • Implements EmojiPrompt with responsive grid layout, filtering, and recent item prioritization
  • Implements MatchPrompt for dual-column item linking with constraint support
  • Updates MepCLI facade to expose new prompts
  • Exports new types and classes
In this commit: - Implements CalculatorPrompt with safe evaluation engine and real-time preview - Implements EmojiPrompt with responsive grid layout, filtering, and recent item prioritization - Implements MatchPrompt for dual-column item linking with constraint support - Updates MepCLI facade to expose new prompts - Exports new types and classes
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 13:21:52 +00:00
@ -0,0 +1,148 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 13:21:52 +00:00

Unused variable, import, function or class

Unused import symbols.


In general, an unused import should be removed to keep the code clean, avoid confusion, and eliminate potential linter or build warnings. Since symbols is never used in this file, the best fix that preserves existing functionality is simply to delete that specific import line.

Concretely, in src/prompts/gauge.ts, remove line 4 (import { symbols } from '../symbols';). No other code changes are necessary, since there are no references to symbols. No additional methods, imports, or definitions are needed to implement this change.

## Unused variable, import, function or class Unused import symbols. --- In general, an unused import should be removed to keep the code clean, avoid confusion, and eliminate potential linter or build warnings. Since <code>symbols</code> is never used in this file, the best fix that preserves existing functionality is simply to delete that specific import line.</p> <p>Concretely, in <code>src/prompts/gauge.ts</code>, remove line 4 (<code>import { symbols } from '../symbols';</code>). No other code changes are necessary, since there are no references to <code>symbols</code>. No additional methods, imports, or definitions are needed to implement this change.
@ -0,0 +72,4 @@
const title = this.truncate(item.title, colWidth - 4);
content = `${prefix} ${title}${suffix}`;
content = content.padEnd(colWidth);
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 13:21:52 +00:00

Useless assignment to local variable

The value assigned to content here is unused.


In general, to fix a "useless assignment to local variable" you either (a) remove the assignment if it truly has no effect, or (b) reuse the assigned value instead of overwriting it, depending on the intended logic. Here, the final cell content is derived from plain, not from content as padded on line 78, and content is guaranteed to be overwritten based on plain immediately afterward. The intended behavior is to pad the plain string (which already happens at line 80) and then optionally wrap it with styling.

The best fix with no functional change is to remove the redundant padding assignment to content on line 78. We leave the computation of plain and its padEnd(colWidth) intact, and keep the rest of the logic unchanged. This requires only editing src/prompts/kanban.ts in the shown block, deleting line 78 and not introducing any new imports or helpers.

## Useless assignment to local variable The value assigned to content here is unused. --- In general, to fix a "useless assignment to local variable" you either (a) remove the assignment if it truly has no effect, or (b) reuse the assigned value instead of overwriting it, depending on the intended logic. Here, the final cell content is derived from <code>plain</code>, not from <code>content</code> as padded on line 78, and <code>content</code> is guaranteed to be overwritten based on <code>plain</code> immediately afterward. The intended behavior is to pad the <code>plain</code> string (which already happens at line 80) and then optionally wrap it with styling.</p> <p>The best fix with no functional change is to remove the redundant padding assignment to <code>content</code> on line 78. We leave the computation of <code>plain</code> and its <code>padEnd(colWidth)</code> intact, and keep the rest of the logic unchanged. This requires only editing <code>src/prompts/kanban.ts</code> in the shown block, deleting line 78 and not introducing any new imports or helpers.
@ -0,0 +1,210 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 13:21:52 +00:00

Unused variable, import, function or class

Unused variable step.


In general, unused variables should either be removed or actually used. Since step in handleInput is not referenced anywhere, and step-based behavior is already implemented in adjustValue, the best fix is to remove the unused declaration from handleInput.

Concretely, in src/prompts/time.ts, within the handleInput method, delete the line const step = this.options.step || 1;. The rest of the function, including the use of maxCols, remains unchanged. No new imports, methods, or definitions are required; we are only removing a redundant local variable.

## Unused variable, import, function or class Unused variable step. --- In general, unused variables should either be removed or actually used. Since <code>step</code> in <code>handleInput</code> is not referenced anywhere, and step-based behavior is already implemented in <code>adjustValue</code>, the best fix is to remove the unused declaration from <code>handleInput</code>.</p> <p>Concretely, in <code>src/prompts/time.ts</code>, within the <code>handleInput</code> method, delete the line <code>const step = this.options.step || 1;</code>. The rest of the function, including the use of <code>maxCols</code>, remains unchanged. No new imports, methods, or definitions are required; we are only removing a redundant local variable.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 13:56:08 +00:00
@ -0,0 +1,238 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 13:56:08 +00:00

Unused variable, import, function or class

Unused import TreeSelectPrompt.


In general, the correct way to fix an unused import is to either (a) remove it if it truly isn’t needed, or (b) start using it where intended. Since TreeSelectPrompt is never referenced in this file, the safest fix that doesn’t alter existing behavior is to remove the unused import line.

Concretely, in src/prompts/emoji.ts, delete the line import { TreeSelectPrompt } from './tree-select'; (line 6 in the provided snippet). No additional code, methods, or imports are needed, and this change does not affect the runtime behavior of EmojiPrompt since the imported symbol was never used.

## Unused variable, import, function or class Unused import TreeSelectPrompt. --- In general, the correct way to fix an unused import is to either (a) remove it if it truly isn’t needed, or (b) start using it where intended. Since <code>TreeSelectPrompt</code> is never referenced in this file, the safest fix that doesn’t alter existing behavior is to remove the unused import line.</p> <p>Concretely, in <code>src/prompts/emoji.ts</code>, delete the line <code>import { TreeSelectPrompt } from './tree-select';</code> (line 6 in the provided snippet). No additional code, methods, or imports are needed, and this change does not affect the runtime behavior of <code>EmojiPrompt</code> since the imported symbol was never used.
irammini (Migrated from github.com) reviewed 2026-01-31 14:30:20 +00:00
@ -0,0 +1,148 @@
import { ANSI } from '../ansi';
irammini (Migrated from github.com) commented 2026-01-31 14:30:19 +00:00

Will manually fix this

Will manually fix this
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 14:34:11 +00:00
@ -0,0 +72,4 @@
const title = this.truncate(item.title, colWidth - 4);
content = `${prefix} ${title}${suffix}`;
content = content.padEnd(colWidth);
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 14:34:11 +00:00

Useless assignment to local variable

The value assigned to content here is unused.


In general, to fix a useless assignment, either remove the dead assignment or change the code so that the computed value is actually used instead of being recomputed and reassigned. The goal is to keep behavior identical while eliminating dead stores.

Here, inside the item-rendering branch, content is first built from prefix, title, and suffix, then padded and assigned back to content on line 75, and then a *new* string plain is built with the same constituents and padding on line 77. Afterwards, content is always set from plain, ignoring the earlier padded content. The minimal, behavior-preserving fix is to remove the redundant line 75. No imports, new methods, or additional definitions are needed. All changes are confined to src/prompts/kanban.ts in the shown region, specifically removing the content = content.padEnd(colWidth); line.

## Useless assignment to local variable The value assigned to content here is unused. --- In general, to fix a useless assignment, either remove the dead assignment or change the code so that the computed value is actually used instead of being recomputed and reassigned. The goal is to keep behavior identical while eliminating dead stores.</p> <p>Here, inside the item-rendering branch, <code>content</code> is first built from <code>prefix</code>, <code>title</code>, and <code>suffix</code>, then padded and assigned back to <code>content</code> on line 75, and then a *new* string <code>plain</code> is built with the same constituents and padding on line 77. Afterwards, <code>content</code> is always set from <code>plain</code>, ignoring the earlier padded <code>content</code>. The minimal, behavior-preserving fix is to remove the redundant line 75. No imports, new methods, or additional definitions are needed. All changes are confined to <code>src/prompts/kanban.ts</code> in the shown region, specifically removing the <code>content = content.padEnd(colWidth);</code> line.
irammini commented 2026-01-31 14:35:29 +00:00 (Migrated from github.com)

In this commit:

  • Implement DiffPrompt for visualizing and resolving text conflicts.
  • Implement DialPrompt for circular knob numeric input using Braille-like visuals.
  • Implement DrawPrompt for high-resolution Braille canvas drawing with mouse support.
  • Expose new prompts via MepCLI facade.
  • Add necessary types in src/types.ts.
In this commit: - Implement `DiffPrompt` for visualizing and resolving text conflicts. - Implement `DialPrompt` for circular knob numeric input using Braille-like visuals. - Implement `DrawPrompt` for high-resolution Braille canvas drawing with mouse support. - Expose new prompts via `MepCLI` facade. - Add necessary types in `src/types.ts`.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 14:36:30 +00:00
@ -0,0 +1,197 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 14:36:30 +00:00

Unused variable, import, function or class

Unused variable borderTop.


In general, unused variables should either be removed or actually used. Since the top border is already rendered directly in line 72, and borderTop is never referenced, the best fix is to remove the unused declaration and its now-misleading comment.

Concretely, in src/prompts/draw.ts, inside the render method, delete the line that declares const borderTop = ... along with the immediately following comment lines that only pertain to that unused variable. Keep the existing border rendering at line 72 unchanged, ensuring no functional behavior is altered. No new imports or methods are required.

## Unused variable, import, function or class Unused variable borderTop. --- In general, unused variables should either be removed or actually used. Since the top border is already rendered directly in line 72, and <code>borderTop</code> is never referenced, the best fix is to remove the unused declaration and its now-misleading comment.</p> <p>Concretely, in <code>src/prompts/draw.ts</code>, inside the <code>render</code> method, delete the line that declares <code>const borderTop = ...</code> along with the immediately following comment lines that only pertain to that unused variable. Keep the existing border rendering at line 72 unchanged, ensuring no functional behavior is altered. No new imports or methods are required.
irammini commented 2026-01-31 15:39:30 +00:00 (Migrated from github.com)

In this commit:

  • Added MultiColumnSelectPrompt for grid-based selection.
  • Added FuzzySelectPrompt for approximate string matching with debounce.
  • Added MillerPrompt for hierarchical navigation.
  • Implemented fuzzyMatch utility using subsequence matching.
  • Updated example.ts with new demos.
In this commit: - Added `MultiColumnSelectPrompt` for grid-based selection. - Added `FuzzySelectPrompt` for approximate string matching with debounce. - Added `MillerPrompt` for hierarchical navigation. - Implemented `fuzzyMatch` utility using subsequence matching. - Updated `example.ts` with new demos.
irammini commented 2026-01-31 16:59:26 +00:00 (Migrated from github.com)

In this commit:

  • Added PatternPrompt for gesture-based input (drag or keyboard).
  • Added RegionPrompt for selecting points on an ASCII map.
  • Added SpreadsheetPrompt for editing tabular data with horizontal/vertical scrolling.
  • Updated types and symbols.
  • Added static methods to MepCLI.
In this commit: - Added PatternPrompt for gesture-based input (drag or keyboard). - Added RegionPrompt for selecting points on an ASCII map. - Added SpreadsheetPrompt for editing tabular data with horizontal/vertical scrolling. - Updated types and symbols. - Added static methods to MepCLI.
irossmini commented 2026-01-31 18:32:57 +00:00 (Migrated from github.com)

In this commit:

  • Added ScrollPrompt class in src/prompts/scroll.ts to handle long text content.
  • Added ScrollOptions interface in src/types.ts.
  • Integrated ScrollPrompt into MepCLI facade in src/core.ts.
  • Exported ScrollPrompt from src/index.ts.
  • Implemented scrolling logic (Arrows, PageUp/Down, Home/End, Mouse) and gatekeeper mode (requireScrollToBottom).
In this commit: - Added `ScrollPrompt` class in `src/prompts/scroll.ts` to handle long text content. - Added `ScrollOptions` interface in `src/types.ts`. - Integrated `ScrollPrompt` into `MepCLI` facade in `src/core.ts`. - Exported `ScrollPrompt` from `src/index.ts`. - Implemented scrolling logic (Arrows, PageUp/Down, Home/End, Mouse) and gatekeeper mode (`requireScrollToBottom`).
irossmini commented 2026-01-31 19:32:50 +00:00 (Migrated from github.com)

In this commit:

  • Implements BreadcrumbPrompt with stack-based state management (restoring cursor on back navigation).
  • Adds responsive breadcrumb rendering with truncation logic.
  • Supports Enter/Right to drill down, Backspace/Left to go up.
  • Supports Tab/Shift+Tab for cycling items.
  • Integrates with MepCLI and exports via src/index.ts.
In this commit: - Implements `BreadcrumbPrompt` with stack-based state management (restoring cursor on back navigation). - Adds responsive breadcrumb rendering with truncation logic. - Supports `Enter`/`Right` to drill down, `Backspace`/`Left` to go up. - Supports `Tab`/`Shift+Tab` for cycling items. - Integrates with `MepCLI` and exports via `src/index.ts`.
irossmini commented 2026-01-31 20:50:13 +00:00 (Migrated from github.com)

In this commit:

  • Add SchedulePrompt for Gantt-style timeline visualization and editing.
  • Add DataInspectorPrompt for deep object traversal and in-place editing.
  • Export new prompts in src/index.ts and src/core.ts.
  • Update src/types.ts with necessary interfaces.
In this commit: - Add `SchedulePrompt` for Gantt-style timeline visualization and editing. - Add `DataInspectorPrompt` for deep object traversal and in-place editing. - Export new prompts in `src/index.ts` and `src/core.ts`. - Update `src/types.ts` with necessary interfaces.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 20:51:59 +00:00
@ -0,0 +1,290 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 20:51:59 +00:00

Unused variable, import, function or class

Unused import stringWidth.


In general, unused imports should be removed to keep the codebase clean and to avoid confusion about dependencies. Removing an unused named import does not change runtime behavior, because imports are only needed for symbols that are actually referenced in the code.

For this specific file, the best fix is to adjust the existing import from ../utils so that it only imports the stripAnsi symbol, which is presumably used elsewhere in data-inspector.ts. We should remove stringWidth from the named import list and leave the rest of the file unchanged. No additional methods, definitions, or imports are needed, and there is no need to alter any other lines.

Concretely:

  • In src/prompts/data-inspector.ts, on the line import { stringWidth, stripAnsi } from '../utils';, remove stringWidth, so that only stripAnsi remains imported.
  • No other changes are required.
## Unused variable, import, function or class Unused import stringWidth. --- <p>In general, unused imports should be removed to keep the codebase clean and to avoid confusion about dependencies. Removing an unused named import does not change runtime behavior, because imports are only needed for symbols that are actually referenced in the code.</p> <p>For this specific file, the best fix is to adjust the existing import from <code>../utils</code> so that it only imports the <code>stripAnsi</code> symbol, which is presumably used elsewhere in <code>data-inspector.ts</code>. We should remove <code>stringWidth</code> from the named import list and leave the rest of the file unchanged. No additional methods, definitions, or imports are needed, and there is no need to alter any other lines.</p> <p>Concretely:</p> <ul> <li>In <code>src/prompts/data-inspector.ts</code>, on the line <code>import { stringWidth, stripAnsi } from '../utils';</code>, remove <code>stringWidth, </code> so that only <code>stripAnsi</code> remains imported.</li> <li>No other changes are required.</li> </ul>
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 20:51:59 +00:00

Unused variable, import, function or class

Unused variable maxKeyWidth.


In general, unused local variables should either be removed or used meaningfully. If they were part of an unfinished feature, either implement that feature fully or delete the unused artifacts to keep the codebase clean and avoid confusion.

Here, the single best fix without changing existing functionality is to delete the declaration const maxKeyWidth = 20; // Or dynamic on line 108 of src/prompts/data-inspector.ts. No other code depends on it, so removing it will not affect behavior. No new imports, methods, or definitions are required.

## Unused variable, import, function or class Unused variable maxKeyWidth. --- In general, unused local variables should either be removed or used meaningfully. If they were part of an unfinished feature, either implement that feature fully or delete the unused artifacts to keep the codebase clean and avoid confusion.</p> <p>Here, the single best fix without changing existing functionality is to delete the declaration <code>const maxKeyWidth = 20; // Or dynamic</code> on line 108 of <code>src/prompts/data-inspector.ts</code>. No other code depends on it, so removing it will not affect behavior. No new imports, methods, or definitions are required.
@ -0,0 +1,290 @@
import { ANSI } from '../ansi';
import { Prompt } from '../base';
import { theme } from '../theme';
import { DataInspectorOptions, MouseEvent } from '../types';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 20:51:59 +00:00

Unused variable, import, function or class

Unused import MouseEvent.


In general, the correct fix for an unused import is to remove the unused symbol from the import statement, keeping only the parts that are actually referenced. This avoids changing runtime behavior while eliminating unnecessary code and warnings.

For this file, the best minimal fix is to update the import on line 4 so that it only imports DataInspectorOptions from '../types', removing MouseEvent. No other code changes are required, since MouseEvent is not referenced elsewhere in the provided snippet. Concretely, in src/prompts/data-inspector.ts, replace:

import { DataInspectorOptions, MouseEvent } from '../types';

with:

import { DataInspectorOptions } from '../types';

No new methods, definitions, or additional imports are needed.

## Unused variable, import, function or class Unused import MouseEvent. --- In general, the correct fix for an unused import is to remove the unused symbol from the import statement, keeping only the parts that are actually referenced. This avoids changing runtime behavior while eliminating unnecessary code and warnings.</p> <p>For this file, the best minimal fix is to update the import on line 4 so that it only imports <code>DataInspectorOptions</code> from <code>'../types'</code>, removing <code>MouseEvent</code>. No other code changes are required, since <code>MouseEvent</code> is not referenced elsewhere in the provided snippet. Concretely, in <code>src/prompts/data-inspector.ts</code>, replace:</p> <pre><code>import { DataInspectorOptions, MouseEvent } from '../types'; </code></pre> <p>with:</p> <pre><code>import { DataInspectorOptions } from '../types'; </code></pre> <p>No new methods, definitions, or additional imports are needed.
@ -0,0 +1,254 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 20:51:59 +00:00

Unused variable, import, function or class

Unused variable msPerHour.


In general, to fix an unused-variable issue you either remove the variable if it’s unnecessary, or you update the code to actually use it in a way that aligns with the intended behavior. Here, the comments describe three zoom regimes (month/year, date, time) including an hour-based threshold, but the implementation uses only day-based thresholds and leaves msPerHour unused. The best fix is to adjust formatDateCompact to use msPerHour so that the output formatting meaningfully changes when zooming in to hour-level detail.

Concretely, within src/prompts/schedule.ts, in the formatDateCompact method (lines ~140–155), keep the msPerDay constant and replace the existing two if statements with a three-tier logic that:

  • uses both msPerDay and msPerHour,
  • matches the comment “If 1 char > 1 day ... If 1 char > 1 hour ... Else show Time”, and
  • actually uses msPerHour, eliminating the unused-variable warning.

No new imports, methods, or other definitions are required; the change is fully local to that method.

## Unused variable, import, function or class Unused variable msPerHour. --- In general, to fix an unused-variable issue you either remove the variable if it’s unnecessary, or you update the code to actually use it in a way that aligns with the intended behavior. Here, the comments describe three zoom regimes (month/year, date, time) including an hour-based threshold, but the implementation uses only day-based thresholds and leaves <code>msPerHour</code> unused. The best fix is to adjust <code>formatDateCompact</code> to use <code>msPerHour</code> so that the output formatting meaningfully changes when zooming in to hour-level detail.</p> <p>Concretely, within <code>src/prompts/schedule.ts</code>, in the <code>formatDateCompact</code> method (lines ~140–155), keep the <code>msPerDay</code> constant and replace the existing two <code>if</code> statements with a three-tier logic that:</p> <ul> <li>uses both <code>msPerDay</code> and <code>msPerHour</code>,</li> <li>matches the comment “If 1 char &gt; 1 day ... If 1 char &gt; 1 hour ... Else show Time”, and</li> <li>actually uses <code>msPerHour</code>, eliminating the unused-variable warning.</li> </ul> <p>No new imports, methods, or other definitions are required; the change is fully local to that method.
@ -0,0 +1,254 @@
import { ANSI } from '../ansi';
import { Prompt } from '../base';
import { theme } from '../theme';
import { ScheduleOptions, ScheduleTask, MouseEvent } from '../types';
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 20:51:59 +00:00

Unused variable, import, function or class

Unused import MouseEvent.


In general, unused imports should be removed to keep the code clean and to avoid linter or build warnings. This does not change runtime functionality because imports that are never referenced contribute nothing to the executed code (and in TypeScript, type-only imports can often be erased at compile time).

The best fix here is to edit src/prompts/schedule.ts and remove MouseEvent from the destructuring import on line 4, leaving only the two actually used types, ScheduleOptions and ScheduleTask. No additional code changes, methods, or imports are required, since the rest of the file already compiles and runs based on these two types.

Concretely, in src/prompts/schedule.ts, within the import section at the top of the file, change import { ScheduleOptions, ScheduleTask, MouseEvent } from '../types'; to import { ScheduleOptions, ScheduleTask } from '../types';. No other definitions or dependencies are needed.

## Unused variable, import, function or class Unused import MouseEvent. --- In general, unused imports should be removed to keep the code clean and to avoid linter or build warnings. This does not change runtime functionality because imports that are never referenced contribute nothing to the executed code (and in TypeScript, type-only imports can often be erased at compile time).</p> <p>The best fix here is to edit <code>src/prompts/schedule.ts</code> and remove <code>MouseEvent</code> from the destructuring import on line 4, leaving only the two actually used types, <code>ScheduleOptions</code> and <code>ScheduleTask</code>. No additional code changes, methods, or imports are required, since the rest of the file already compiles and runs based on these two types.</p> <p>Concretely, in <code>src/prompts/schedule.ts</code>, within the import section at the top of the file, change <code>import { ScheduleOptions, ScheduleTask, MouseEvent } from '../types';</code> to <code>import { ScheduleOptions, ScheduleTask } from '../types';</code>. No other definitions or dependencies are needed.
irossmini commented 2026-01-31 22:04:02 +00:00 (Migrated from github.com)

In this commit:

  • Added ExecPrompt class to src/prompts/exec.ts
  • Added ExecOptions interface to src/types.ts
  • Added MepCLI.exec static method to src/core.ts
  • Added cancel method to Prompt base class in src/base.ts
  • Implemented robust error handling, timeout support, and race condition prevention
  • Exported new prompt in src/index.ts
In this commit: - Added `ExecPrompt` class to `src/prompts/exec.ts` - Added `ExecOptions` interface to `src/types.ts` - Added `MepCLI.exec` static method to `src/core.ts` - Added `cancel` method to `Prompt` base class in `src/base.ts` - Implemented robust error handling, timeout support, and race condition prevention - Exported new prompt in `src/index.ts`
irossmini commented 2026-01-31 22:44:16 +00:00 (Migrated from github.com)

In this commit:

  • Added ShortcutPrompt for keybinding recording.
  • Added SeatPrompt for matrix selection with jump navigation.
  • Added MnemonicPrompt for secure wordlist input with autocomplete, masking, and checksum validation.
  • Updated MepCLI facade to expose new prompts.
  • Updated types.ts and ansi.ts.
In this commit: - Added `ShortcutPrompt` for keybinding recording. - Added `SeatPrompt` for matrix selection with jump navigation. - Added `MnemonicPrompt` for secure wordlist input with autocomplete, masking, and checksum validation. - Updated `MepCLI` facade to expose new prompts. - Updated `types.ts` and `ansi.ts`.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 22:45:32 +00:00
@ -0,0 +82,4 @@
const charDisplay = node.char;
// If occupied, maybe show a different char or color
let style = ANSI.RESET;
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 22:45:32 +00:00

Useless assignment to local variable

The initial value of style is unused, since it is always overwritten.


In general, to fix "useless assignment to local variable" issues, remove the redundant initialization, or restructure the code so that the variable’s initial value is actually used (e.g., by using it as a default when some branches don’t reassign it). Here, the best fix is simply to declare style without an initial value, since every path assigns to it before use.

Concretely, in src/prompts/seat.ts, inside the render method’s inner row.forEach callback, change let style = ANSI.RESET; on line 84 to let style;. Since style is always set in the if (node.status === 'occupied') ... else if ... else ... block before being used, no further changes, imports, or new definitions are needed. This removes the useless assignment while preserving behavior.

## Useless assignment to local variable The initial value of style is unused, since it is always overwritten. --- In general, to fix "useless assignment to local variable" issues, remove the redundant initialization, or restructure the code so that the variable’s initial value is actually used (e.g., by using it as a default when some branches don’t reassign it). Here, the best fix is simply to declare <code>style</code> without an initial value, since every path assigns to it before use.</p> <p>Concretely, in <code>src/prompts/seat.ts</code>, inside the <code>render</code> method’s inner <code>row.forEach</code> callback, change <code>let style = ANSI.RESET;</code> on line 84 to <code>let style;</code>. Since <code>style</code> is always set in the <code>if (node.status === 'occupied') ... else if ... else ...</code> block before being used, no further changes, imports, or new definitions are needed. This removes the useless assignment while preserving behavior.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-01-31 23:06:01 +00:00
@ -0,0 +82,4 @@
const charDisplay = node.char;
// If occupied, maybe show a different char or color
let style = ANSI.RESET;
github-code-quality[bot] (Migrated from github.com) commented 2026-01-31 23:06:01 +00:00

Useless assignment to local variable

The initial value of style is unused, since it is always overwritten.


To fix the problem, remove the useless initial assignment to style and instead just declare the variable, relying on the subsequent conditional branches to assign it before it is used. This preserves existing behavior because every path that reaches the lineStr += ... statement already sets style based on node.status, node.selectable, isSelected, and isCursor.

Concretely, in src/prompts/seat.ts, inside the render method’s inner row.forEach callback, change let style = ANSI.RESET; on line 85 to just let style;. No new imports or methods are needed, and no other lines require modification, because the rest of the function and its logic remain valid and behaviorally identical.

## Useless assignment to local variable The initial value of style is unused, since it is always overwritten. --- To fix the problem, remove the useless initial assignment to <code>style</code> and instead just declare the variable, relying on the subsequent conditional branches to assign it before it is used. This preserves existing behavior because every path that reaches the <code>lineStr += ...</code> statement already sets <code>style</code> based on <code>node.status</code>, <code>node.selectable</code>, <code>isSelected</code>, and <code>isCursor</code>.</p> <p>Concretely, in <code>src/prompts/seat.ts</code>, inside the <code>render</code> method’s inner <code>row.forEach</code> callback, change <code>let style = ANSI.RESET;</code> on line 85 to just <code>let style;</code>. No new imports or methods are needed, and no other lines require modification, because the rest of the function and its logic remain valid and behaviorally identical.
irammini commented 2026-02-01 01:40:42 +00:00 (Migrated from github.com)

In this commit:

  • Implement SelectRangePrompt extending SelectPrompt to allow selecting a continuous range of items using an anchor.
  • Implement SortGridPrompt for 2D grid reordering with drag-and-drop mechanics.
  • Add selectRange and sortGrid methods to MepCLI.
  • Export new prompts and options.
  • Fix ragged grid navigation logic in SortGridPrompt.
In this commit: - Implement `SelectRangePrompt` extending `SelectPrompt` to allow selecting a continuous range of items using an anchor. - Implement `SortGridPrompt` for 2D grid reordering with drag-and-drop mechanics. - Add `selectRange` and `sortGrid` methods to `MepCLI`. - Export new prompts and options. - Fix ragged grid navigation logic in `SortGridPrompt`.
irammini commented 2026-02-01 14:12:18 +00:00 (Migrated from github.com)

In this commit:

  • Architecture: Extracted BIP39 logic (wordlist, checksum validation) to src/bip39.ts.
  • UX: Implemented non-linear navigation (Arrow keys, Tab) and full-phrase paste support.
  • Validation: Added immediate visual feedback (color-coding) and fuzzy search suggestions.
  • Tests: Added unit tests for variable-length mnemonic validation (12, 15, 18, 21, 24 words).
In this commit: - **Architecture:** Extracted BIP39 logic (wordlist, checksum validation) to `src/bip39.ts`. - **UX:** Implemented non-linear navigation (Arrow keys, Tab) and full-phrase paste support. - **Validation:** Added immediate visual feedback (color-coding) and fuzzy search suggestions. - **Tests:** Added unit tests for variable-length mnemonic validation (12, 15, 18, 21, 24 words).
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 14:13:30 +00:00
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 14:13:30 +00:00

Useless assignment to local variable

The initial value of wordColor is unused, since it is always overwritten.


In general, the way to fix this kind of issue is to remove the unused or redundant assignment, ensuring that the variable is only given values that are actually used. If a default value is truly needed, it should correspond to a real branch of execution where it is used.

Here, wordColor is always set in the if (word.length > 0) { ... } else { ... } block before being used in cellContent = .... The initial let wordColor = ANSI.RESET; on line 39 is therefore unnecessary. The minimal, behavior‑preserving fix is to declare wordColor without an initializer and rely on the subsequent conditional to assign it in all cases.

Concretely, in src/prompts/mnemonic.ts, within the render method’s loop, change line 39 from let wordColor = ANSI.RESET; to let wordColor;. No additional imports, methods, or definitions are needed, and no other lines in this file must change.

## Useless assignment to local variable The initial value of wordColor is unused, since it is always overwritten. --- In general, the way to fix this kind of issue is to remove the unused or redundant assignment, ensuring that the variable is only given values that are actually used. If a default value is truly needed, it should correspond to a real branch of execution where it is used.</p> <p>Here, <code>wordColor</code> is always set in the <code>if (word.length &gt; 0) { ... } else { ... }</code> block before being used in <code>cellContent = ...</code>. The initial <code>let wordColor = ANSI.RESET;</code> on line 39 is therefore unnecessary. The minimal, behavior‑preserving fix is to declare <code>wordColor</code> without an initializer and rely on the subsequent conditional to assign it in all cases.</p> <p>Concretely, in <code>src/prompts/mnemonic.ts</code>, within the <code>render</code> method’s loop, change line 39 from <code>let wordColor = ANSI.RESET;</code> to <code>let wordColor;</code>. No additional imports, methods, or definitions are needed, and no other lines in this file must change.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 14:13:30 +00:00

Unused variable, import, function or class

Unused import DEFAULT_WORDLIST.


In general, unused imports should be removed to keep the code clean and avoid confusion. The best fix here is to remove DEFAULT_WORDLIST from the import list in test/bip39.test.ts while leaving the other imports intact.

Concretely, in test/bip39.test.ts, on line 1, change the import statement from importing three symbols (validateMnemonic, isWordValid, DEFAULT_WORDLIST) to importing only the two that are actually used: validateMnemonic and isWordValid. No other lines in this file need modification, and no new imports or definitions are required.

## Unused variable, import, function or class Unused import DEFAULT_WORDLIST. --- In general, unused imports should be removed to keep the code clean and avoid confusion. The best fix here is to remove <code>DEFAULT_WORDLIST</code> from the import list in <code>test/bip39.test.ts</code> while leaving the other imports intact.</p> <p>Concretely, in <code>test/bip39.test.ts</code>, on line 1, change the import statement from importing three symbols (<code>validateMnemonic, isWordValid, DEFAULT_WORDLIST</code>) to importing only the two that are actually used: <code>validateMnemonic</code> and <code>isWordValid</code>. No other lines in this file need modification, and no new imports or definitions are required.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 14:59:40 +00:00
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 14:59:40 +00:00

Useless assignment to local variable

The initial value of wordColor is unused, since it is always overwritten.


In general, when a local variable’s initial value is never used because all control-flow paths overwrite it before any read, the correct fix is to remove that initial assignment and, if needed, declare the variable without an initializer. This both clarifies intent and eliminates the useless assignment.

Here, the best fix is to change the declaration let wordColor = ANSI.RESET; on line 40 to a declaration without an initializer, let wordColor;. The subsequent if/else block guarantees that wordColor is always assigned (ANSI.FG_GREEN, ANSI.FG_RED, or theme.muted) before it is used to build cellContent. This preserves existing functionality exactly while removing the redundant initialization.

Concretely, in src/prompts/mnemonic.ts, within the render method’s for loop, update the line declaring wordColor (line 40) to remove the = ANSI.RESET initializer. No new imports, methods, or other definitions are required.

## Useless assignment to local variable The initial value of wordColor is unused, since it is always overwritten. --- In general, when a local variable’s initial value is never used because all control-flow paths overwrite it before any read, the correct fix is to remove that initial assignment and, if needed, declare the variable without an initializer. This both clarifies intent and eliminates the useless assignment.</p> <p>Here, the best fix is to change the declaration <code>let wordColor = ANSI.RESET;</code> on line 40 to a declaration without an initializer, <code>let wordColor;</code>. The subsequent <code>if/else</code> block guarantees that <code>wordColor</code> is always assigned (<code>ANSI.FG_GREEN</code>, <code>ANSI.FG_RED</code>, or <code>theme.muted</code>) before it is used to build <code>cellContent</code>. This preserves existing functionality exactly while removing the redundant initialization.</p> <p>Concretely, in <code>src/prompts/mnemonic.ts</code>, within the <code>render</code> method’s <code>for</code> loop, update the line declaring <code>wordColor</code> (line 40) to remove the <code>= ANSI.RESET</code> initializer. No new imports, methods, or other definitions are required.
irammini (Migrated from github.com) reviewed 2026-02-01 16:07:16 +00:00
irammini commented 2026-02-01 16:57:22 +00:00 (Migrated from github.com)

In this commit:

Added a new examples/ directory with categorized example files to demonstrate various MepCLI prompts:

  • basic-prompts.ts: Text, Password, Number, Toggle, Confirm.
  • selection-prompts.ts: Select, MultiSelect, Checkbox, Autocomplete, FuzzySelect.
  • form-prompts.ts: Form, Date, Time, Color, List.
  • filesystem-prompts.ts: File, Tree, Breadcrumb, TreeSelect.
  • data-visualization.ts: Table, Heatmap, Kanban, Schedule, Draw.
In this commit: Added a new `examples/` directory with categorized example files to demonstrate various MepCLI prompts: - `basic-prompts.ts`: Text, Password, Number, Toggle, Confirm. - `selection-prompts.ts`: Select, MultiSelect, Checkbox, Autocomplete, FuzzySelect. - `form-prompts.ts`: Form, Date, Time, Color, List. - `filesystem-prompts.ts`: File, Tree, Breadcrumb, TreeSelect. - `data-visualization.ts`: Table, Heatmap, Kanban, Schedule, Draw.
github-advanced-security[bot] (Migrated from github.com) reviewed 2026-02-01 16:58:15 +00:00
@ -0,0 +18,4 @@
message: "Set a password:",
validate: (value) => value.length >= 6 || "Password must be at least 6 chars"
});
console.log(`Password set (length: ${password.length})`);
github-advanced-security[bot] (Migrated from github.com) commented 2026-02-01 16:58:15 +00:00

Clear-text logging of sensitive information

This logs sensitive data returned by an access to password as clear text.

Show more details

## Clear-text logging of sensitive information This logs sensitive data returned by [an access to password](1) as clear text. [Show more details](https://github.com/CodeTease/mep/security/code-scanning/5)
irammini (Migrated from github.com) reviewed 2026-02-01 16:58:46 +00:00
@ -0,0 +18,4 @@
message: "Set a password:",
validate: (value) => value.length >= 6 || "Password must be at least 6 chars"
});
console.log(`Password set (length: ${password.length})`);
irammini (Migrated from github.com) commented 2026-02-01 16:58:46 +00:00

It's just a test file

It's just a test file
irossmini commented 2026-02-01 18:04:55 +00:00 (Migrated from github.com)

In this commit:

  • Added Layout helper in src/utils.ts for split-view rendering and ANSI-aware string manipulation (split, pad, truncate).
  • Added Graph helper in src/utils.ts for dependency resolution (topologicalSort, getDependencies).
  • Added pauseInput() and resumeInput() to Prompt class in src/base.ts to allow prompts to yield control of stdin (e.g., for child processes).
  • Ensured all existing tests pass.

This sets the foundation for upcoming terminal, dependency, and license prompts.

In this commit: - Added `Layout` helper in `src/utils.ts` for split-view rendering and ANSI-aware string manipulation (`split`, `pad`, `truncate`). - Added `Graph` helper in `src/utils.ts` for dependency resolution (`topologicalSort`, `getDependencies`). - Added `pauseInput()` and `resumeInput()` to `Prompt` class in `src/base.ts` to allow prompts to yield control of stdin (e.g., for child processes). - Ensured all existing tests pass. This sets the foundation for upcoming `terminal`, `dependency`, and `license` prompts.
irossmini commented 2026-02-01 18:14:45 +00:00 (Migrated from github.com)

In this commit:

  • Added TerminalPrompt in src/prompts/terminal.ts for interactive command execution.
  • Added TerminalOptions to src/types.ts.
  • Exposed MepCLI.terminal in src/core.ts and src/index.ts.
  • Implemented input pausing/resuming logic in base prompt class (from Phase 1) to handle child process stdio safely.
  • Ensured streaming output support for real-time feedback.
In this commit: - Added `TerminalPrompt` in `src/prompts/terminal.ts` for interactive command execution. - Added `TerminalOptions` to `src/types.ts`. - Exposed `MepCLI.terminal` in `src/core.ts` and `src/index.ts`. - Implemented input pausing/resuming logic in base prompt class (from Phase 1) to handle child process stdio safely. - Ensured streaming output support for real-time feedback.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 18:15:38 +00:00
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 18:15:38 +00:00

Unused variable, import, function or class

Unused import Layout.


To fix the problem in general, remove any imported symbols that are not actually used in the file. This avoids dead code, keeps the codebase cleaner, and has no impact on runtime behavior if the symbol truly is unused.

For this specific case, the best fix is to edit src/prompts/terminal.ts and adjust the import from '../utils'. Currently it imports Layout, safeSplit, and stringWidth. Only stringWidth is used in the shown code, and Layout is reported unused. We should remove Layout from the destructuring import while keeping the other imports unchanged. This preserves existing functionality while eliminating the unused import. No new methods, definitions, or additional imports are needed.

Concretely, in src/prompts/terminal.ts at line 7, change:

import { Layout, safeSplit, stringWidth } from '../utils';

to:

import { safeSplit, stringWidth } from '../utils';

leaving all other lines as they are.

## Unused variable, import, function or class Unused import Layout. --- To fix the problem in general, remove any imported symbols that are not actually used in the file. This avoids dead code, keeps the codebase cleaner, and has no impact on runtime behavior if the symbol truly is unused.</p> <p>For this specific case, the best fix is to edit <code>src/prompts/terminal.ts</code> and adjust the import from <code>'../utils'</code>. Currently it imports <code>Layout</code>, <code>safeSplit</code>, and <code>stringWidth</code>. Only <code>stringWidth</code> is used in the shown code, and <code>Layout</code> is reported unused. We should remove <code>Layout</code> from the destructuring import while keeping the other imports unchanged. This preserves existing functionality while eliminating the unused import. No new methods, definitions, or additional imports are needed.</p> <p>Concretely, in <code>src/prompts/terminal.ts</code> at line 7, change:</p> <pre><code>import { Layout, safeSplit, stringWidth } from '../utils'; </code></pre> <p>to:</p> <pre><code>import { safeSplit, stringWidth } from '../utils'; </code></pre> <p>leaving all other lines as they are.
irossmini commented 2026-02-01 18:26:32 +00:00 (Migrated from github.com)

In this commit:

  • Added DependencyPrompt in src/prompts/dependency.ts to handle complex checkbox selections with dependencies.
  • Added DependencyOptions and DependencyItem to src/types.ts.
  • Exposed MepCLI.dependency in src/core.ts and src/index.ts.
  • Implemented resolveDependencies logic to handle dependsOn, triggers, and conflictsWith rules.
In this commit: - Added `DependencyPrompt` in `src/prompts/dependency.ts` to handle complex checkbox selections with dependencies. - Added `DependencyOptions` and `DependencyItem` to `src/types.ts`. - Exposed `MepCLI.dependency` in `src/core.ts` and `src/index.ts`. - Implemented `resolveDependencies` logic to handle `dependsOn`, `triggers`, and `conflictsWith` rules.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 18:27:30 +00:00
@ -0,0 +1,295 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 18:27:30 +00:00

Unused variable, import, function or class

Unused import DependencyItem.


In general, unused imports should be removed to keep the code clean and avoid potential lint/build issues. Since DependencyItem is not used anywhere in this file, the safest fix that does not change runtime behavior is to remove DependencyItem from the import list while leaving DependencyOptions untouched.

Concretely, in src/prompts/dependency.ts, update the import on line 5 from import { DependencyOptions, DependencyItem } from '../types'; to only import DependencyOptions. No other parts of the file need changes, and no additional methods, imports, or definitions are required.

## Unused variable, import, function or class Unused import DependencyItem. --- In general, unused imports should be removed to keep the code clean and avoid potential lint/build issues. Since <code>DependencyItem</code> is not used anywhere in this file, the safest fix that does not change runtime behavior is to remove <code>DependencyItem</code> from the import list while leaving <code>DependencyOptions</code> untouched.</p> <p>Concretely, in <code>src/prompts/dependency.ts</code>, update the import on line 5 from <code>import { DependencyOptions, DependencyItem } from '../types';</code> to only import <code>DependencyOptions</code>. No other parts of the file need changes, and no additional methods, imports, or definitions are required.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 18:27:30 +00:00

Unused variable, import, function or class

Unused import Graph.


In general, unused imports should be removed to keep the code clean, avoid confusion, and prevent potential linting or build warnings from failing CI. Since Graph is not used anywhere in src/prompts/dependency.ts, the best fix is simply to delete the Graph named import from the file.

Concretely, in src/prompts/dependency.ts on line 6, remove the line import { Graph } from '../utils';. No other code changes are needed, because there are no references to Graph in the snippet. This does not change existing functionality; it only eliminates dead code.

No additional methods, imports, or definitions are required to implement this change.

## Unused variable, import, function or class Unused import Graph. --- In general, unused imports should be removed to keep the code clean, avoid confusion, and prevent potential linting or build warnings from failing CI. Since <code>Graph</code> is not used anywhere in <code>src/prompts/dependency.ts</code>, the best fix is simply to delete the <code>Graph</code> named import from the file.</p> <p>Concretely, in <code>src/prompts/dependency.ts</code> on line 6, remove the line <code>import { Graph } from '../utils';</code>. No other code changes are needed, because there are no references to <code>Graph</code> in the snippet. This does not change existing functionality; it only eliminates dead code.</p> <p>No additional methods, imports, or definitions are required to implement this change.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 18:27:30 +00:00

Unused variable, import, function or class

Unused variable item.


In general, to fix an "unused variable" warning, either remove the variable declaration if it’s truly unnecessary, or use the variable meaningfully if it was intended to participate in the logic. We must ensure we don’t change existing behavior.

Here, const item = choices[index]; does not affect any subsequent computation: choices and index are used directly elsewhere, and item is never referenced. The safest fix is to delete this single line, leaving the rest of resolveDependencies unchanged. No new imports, methods, or other definitions are required.

Concretely, in src/prompts/dependency.ts, inside the resolveDependencies method, remove line 40 (const item = choices[index];), keeping the surrounding lines (const choices = this.options.choices;, const visited = new Set<number>();, etc.) intact.

## Unused variable, import, function or class Unused variable item. --- In general, to fix an "unused variable" warning, either remove the variable declaration if it’s truly unnecessary, or use the variable meaningfully if it was intended to participate in the logic. We must ensure we don’t change existing behavior.</p> <p>Here, <code>const item = choices[index];</code> does not affect any subsequent computation: <code>choices</code> and <code>index</code> are used directly elsewhere, and <code>item</code> is never referenced. The safest fix is to delete this single line, leaving the rest of <code>resolveDependencies</code> unchanged. No new imports, methods, or other definitions are required.</p> <p>Concretely, in <code>src/prompts/dependency.ts</code>, inside the <code>resolveDependencies</code> method, remove line 40 (<code>const item = choices[index];</code>), keeping the surrounding lines (<code>const choices = this.options.choices;</code>, <code>const visited = new Set&lt;number&gt;();</code>, etc.) intact.
irossmini commented 2026-02-01 18:39:54 +00:00 (Migrated from github.com)

In this commit:

  • Added LicensePrompt in src/prompts/license.ts utilizing the new split-view layout capability.
  • Added LicenseOptions and License types to src/types.ts.
  • Created src/data/licenses.ts with metadata for popular licenses (MIT, Apache, GPL, etc.).
  • Exposed MepCLI.license in src/core.ts and src/index.ts.
  • Implemented Layout.split usage for rendering the list and details side-by-side.
In this commit: - Added `LicensePrompt` in `src/prompts/license.ts` utilizing the new split-view layout capability. - Added `LicenseOptions` and `License` types to `src/types.ts`. - Created `src/data/licenses.ts` with metadata for popular licenses (MIT, Apache, GPL, etc.). - Exposed `MepCLI.license` in `src/core.ts` and `src/index.ts`. - Implemented `Layout.split` usage for rendering the list and details side-by-side.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 18:41:24 +00:00
@ -0,0 +1,133 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 18:41:24 +00:00

Unused variable, import, function or class

Unused variable splitWidth.


In general, an unused local variable should either be removed or put to actual use. Since the layout logic already correctly uses width, the cleanest fix is to delete the unused splitWidth declaration.

Concretely, in src/prompts/license.ts, inside LicensePrompt.render, remove line 42:

  • Delete const splitWidth = width;.

No new imports, methods, or definitions are needed. This change simply eliminates the dead variable while preserving existing behavior.

## Unused variable, import, function or class Unused variable splitWidth. --- In general, an unused local variable should either be removed or put to actual use. Since the layout logic already correctly uses <code>width</code>, the cleanest fix is to delete the unused <code>splitWidth</code> declaration.</p> <p>Concretely, in <code>src/prompts/license.ts</code>, inside <code>LicensePrompt.render</code>, remove line 42:</p> <ul> <li>Delete <code>const splitWidth = width;</code>.</li> </ul> <p>No new imports, methods, or definitions are needed. This change simply eliminates the dead variable while preserving existing behavior.
irossmini commented 2026-02-01 18:51:35 +00:00 (Migrated from github.com)

In this commit:

  • Updated example.ts to include demos for the new prompt types (terminal, dependency, license) in the main showcase.
  • Created examples/terminal-prompts.ts demonstrating a restricted shell simulation with command whitelist validation.
  • Created examples/dependency-prompts.ts demonstrating a full-stack installation wizard with complex dependency/conflict logic.
  • Created examples/license-prompts.ts demonstrating the license picker with split-view layout.
  • Improved TerminalPrompt security by rejecting command chaining operators when a whitelist is active.
In this commit: - Updated `example.ts` to include demos for the new prompt types (`terminal`, `dependency`, `license`) in the main showcase. - Created `examples/terminal-prompts.ts` demonstrating a restricted shell simulation with command whitelist validation. - Created `examples/dependency-prompts.ts` demonstrating a full-stack installation wizard with complex dependency/conflict logic. - Created `examples/license-prompts.ts` demonstrating the license picker with split-view layout. - Improved `TerminalPrompt` security by rejecting command chaining operators when a whitelist is active.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 19:24:31 +00:00
@ -0,0 +1,295 @@
import { ANSI } from '../ansi';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 19:24:31 +00:00

Unused variable, import, function or class

Unused import DependencyItem.


In general, the way to fix an unused import is either to remove it if it truly is not needed, or to update the code to use it if it was intended to be used. Since there is no indication that DependencyItem should be used and the class already compiles conceptually without it, the minimal, non‑functional change is to delete DependencyItem from the import list while leaving the rest of the imports intact.

Concretely, in src/prompts/dependency.ts, on the line import { DependencyOptions, DependencyItem, MouseEvent } from '../types';, remove DependencyItem and its trailing comma. The resulting line should import only DependencyOptions and MouseEvent. No additional methods, imports, or definitions are needed elsewhere, as this is a purely cosmetic/cleanup fix that does not alter runtime behavior or type signatures beyond removing an unused symbol.

## Unused variable, import, function or class Unused import DependencyItem. --- In general, the way to fix an unused import is either to remove it if it truly is not needed, or to update the code to use it if it was intended to be used. Since there is no indication that <code>DependencyItem</code> should be used and the class already compiles conceptually without it, the minimal, non‑functional change is to delete <code>DependencyItem</code> from the import list while leaving the rest of the imports intact.</p> <p>Concretely, in <code>src/prompts/dependency.ts</code>, on the line <code>import { DependencyOptions, DependencyItem, MouseEvent } from '../types';</code>, remove <code>DependencyItem</code> and its trailing comma. The resulting line should import only <code>DependencyOptions</code> and <code>MouseEvent</code>. No additional methods, imports, or definitions are needed elsewhere, as this is a purely cosmetic/cleanup fix that does not alter runtime behavior or type signatures beyond removing an unused symbol.
irossmini commented 2026-02-01 20:32:26 +00:00 (Migrated from github.com)

In this commit:

  • Added RegexPrompt for real-time regex validation against test cases.
  • Added BoxPrompt for visual editing of 4-sided values (margin/padding style).
  • Exposed MepCLI.regex and MepCLI.box APIs.
  • Updated exports and types.
In this commit: - Added `RegexPrompt` for real-time regex validation against test cases. - Added `BoxPrompt` for visual editing of 4-sided values (margin/padding style). - Exposed `MepCLI.regex` and `MepCLI.box` APIs. - Updated exports and types.
github-advanced-security[bot] (Migrated from github.com) reviewed 2026-02-01 22:23:14 +00:00
@ -0,0 +1,337 @@
import { Prompt } from '../base';
github-advanced-security[bot] (Migrated from github.com) commented 2026-02-01 22:23:14 +00:00

Incomplete string escaping or encoding

This does not escape backslash characters in the input.

Show more details

## Incomplete string escaping or encoding This does not escape backslash characters in the input. [Show more details](https://github.com/CodeTease/mep/security/code-scanning/6)
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 22:23:56 +00:00
@ -0,0 +1,337 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:23:56 +00:00

Unused variable, import, function or class

Unused import highlightJson.


In general, unused imports should be removed to keep the codebase clean and avoid confusion. This does not change runtime behavior because unused imports are not referenced anywhere.

The best fix here is to delete the unused highlightJson import from src/prompts/curl.ts. No other changes are necessary: we do not need to add any new imports or alter logic, because nothing in this file depends on highlightJson. Concretely, remove line 7 (import { highlightJson } from '../highlight';) and leave all other imports and code intact.

## Unused variable, import, function or class Unused import highlightJson. --- In general, unused imports should be removed to keep the codebase clean and avoid confusion. This does not change runtime behavior because unused imports are not referenced anywhere.</p> <p>The best fix here is to delete the unused <code>highlightJson</code> import from <code>src/prompts/curl.ts</code>. No other changes are necessary: we do not need to add any new imports or alter logic, because nothing in this file depends on <code>highlightJson</code>. Concretely, remove line 7 (<code>import { highlightJson } from '../highlight';</code>) and leave all other imports and code intact.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:23:56 +00:00

Unused variable, import, function or class

Unused import stringWidth.


In general, an unused import should be removed to keep the code clean, avoid confusion, and prevent potential build/lint issues. Since removing an unused import does not affect runtime behavior, this is a safe change that preserves existing functionality.

The best fix here is to delete the stringWidth import line from src/prompts/curl.ts. No other code references stringWidth in the shown snippet, so no additional changes are required. Specifically, remove line 8: import { stringWidth } from '../utils';. No new methods, definitions, or imports are needed.

## Unused variable, import, function or class Unused import stringWidth. --- In general, an unused import should be removed to keep the code clean, avoid confusion, and prevent potential build/lint issues. Since removing an unused import does not affect runtime behavior, this is a safe change that preserves existing functionality.</p> <p>The best fix here is to delete the <code>stringWidth</code> import line from <code>src/prompts/curl.ts</code>. No other code references <code>stringWidth</code> in the shown snippet, so no additional changes are required. Specifically, remove line 8: <code>import { stringWidth } from '../utils';</code>. No new methods, definitions, or imports are needed.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:23:56 +00:00

Unused variable, import, function or class

Unused variable cursorRow.


In general, unused variable warnings are best fixed by either removing the variable or, if it was meant to be used, actually using it in the appropriate logic. Here, the code comments describe cursor positioning, but there’s no implemented use of cursorRow; only prefixLen is conceptually needed for the X position, while the Y position is defined implicitly by the layout and by how renderFrame writes lines. Removing cursorRow will not change current runtime behavior because its value is never read.

The single best fix without changing behavior is therefore to delete the declaration of cursorRow on line 213 and leave the surrounding comments and other variables (prefixLen, totalLines) intact. No new imports, methods, or definitions are required. The edit is localized to the block starting at the comment “// So URL is on line 3 (0-indexed).” in src/prompts/curl.ts.

## Unused variable, import, function or class Unused variable cursorRow. --- In general, unused variable warnings are best fixed by either removing the variable or, if it was meant to be used, actually using it in the appropriate logic. Here, the code comments describe cursor positioning, but there’s no implemented use of <code>cursorRow</code>; only <code>prefixLen</code> is conceptually needed for the X position, while the Y position is defined implicitly by the layout and by how <code>renderFrame</code> writes lines. Removing <code>cursorRow</code> will not change current runtime behavior because its value is never read.</p> <p>The single best fix without changing behavior is therefore to delete the declaration of <code>cursorRow</code> on line 213 and leave the surrounding comments and other variables (<code>prefixLen</code>, <code>totalLines</code>) intact. No new imports, methods, or definitions are required. The edit is localized to the block starting at the comment “// So URL is on line 3 (0-indexed).” in <code>src/prompts/curl.ts</code>.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:23:56 +00:00

Unused variable, import, function or class

Unused variable totalLines.


In general, unused variable issues are resolved either by removing the variable or by actually using it if it was part of an incomplete implementation. To avoid changing existing behavior, the safest approach is to delete the unused declaration when it has no side effects.

Here, totalLines is computed but never used in the visible code and has no side effects (pure string split and length). The best fix is to remove the line declaring totalLines and, if needed, adjust nearby comments that mention it so they remain coherent. No new methods, imports, or definitions are necessary, and no other code needs to be updated because nothing references totalLines.

Concretely, in src/prompts/curl.ts, remove the line:

const totalLines = output.split('\n').length; // Approximation

and leave the surrounding comments and logic unchanged.

## Unused variable, import, function or class Unused variable totalLines. --- In general, unused variable issues are resolved either by removing the variable or by actually using it if it was part of an incomplete implementation. To avoid changing existing behavior, the safest approach is to delete the unused declaration when it has no side effects.</p> <p>Here, <code>totalLines</code> is computed but never used in the visible code and has no side effects (pure string split and length). The best fix is to remove the line declaring <code>totalLines</code> and, if needed, adjust nearby comments that mention it so they remain coherent. No new methods, imports, or definitions are necessary, and no other code needs to be updated because nothing references <code>totalLines</code>.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, remove the line:</p> <pre><code>const totalLines = output.split('\n').length; // Approximation </code></pre> <p>and leave the surrounding comments and logic unchanged.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 22:38:29 +00:00
@ -0,0 +1,337 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:38:29 +00:00

Unused variable, import, function or class

Unused variable cursorRow.


In general, unused variables should either be removed or integrated into the logic so they serve a purpose. Since cursorRow is not used anywhere and the logic already works without it (the vertical positioning is driven by linesFromBottom and the ANSI escape sequences), the safest fix that does not alter behavior is to remove the declaration of cursorRow.

Concretely, in src/prompts/curl.ts, within the if (this.section === Section.URL) block, delete the line declaring const cursorRow = 3;. Keep the surrounding comments and the rest of the code intact. No new imports, methods, or definitions are required, and no other regions of the file need modification.

## Unused variable, import, function or class Unused variable cursorRow. --- In general, unused variables should either be removed or integrated into the logic so they serve a purpose. Since <code>cursorRow</code> is not used anywhere and the logic already works without it (the vertical positioning is driven by <code>linesFromBottom</code> and the ANSI escape sequences), the safest fix that does not alter behavior is to remove the declaration of <code>cursorRow</code>.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, within the <code>if (this.section === Section.URL)</code> block, delete the line declaring <code>const cursorRow = 3;</code>. Keep the surrounding comments and the rest of the code intact. No new imports, methods, or definitions are required, and no other regions of the file need modification.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:38:29 +00:00

Unused variable, import, function or class

Unused variable totalLines.


In general, the way to fix an unused variable is either to remove it if it is unnecessary, or to use it in the logic if it was intended to participate in some computation. Here, the logic already uses lines and its length directly, and the totalLines variable is redundant and unused, so it should be removed.

Concretely, in src/prompts/curl.ts, inside the render method, in the cursor-positioning block for Section.URL, remove the line that declares totalLines (line 179). No other lines need to be adjusted, and no imports or additional definitions are required. This will eliminate the unused variable while preserving the existing behavior.

## Unused variable, import, function or class Unused variable totalLines. --- In general, the way to fix an unused variable is either to remove it if it is unnecessary, or to use it in the logic if it was intended to participate in some computation. Here, the logic already uses <code>lines</code> and its length directly, and the <code>totalLines</code> variable is redundant and unused, so it should be removed.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, inside the <code>render</code> method, in the cursor-positioning block for <code>Section.URL</code>, remove the line that declares <code>totalLines</code> (line 179). No other lines need to be adjusted, and no imports or additional definitions are required. This will eliminate the unused variable while preserving the existing behavior.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-01 22:52:12 +00:00
@ -0,0 +1,337 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:52:12 +00:00

Unused variable, import, function or class

Unused import warn.


In general, unused imports should be removed to keep the code clean, avoid confusion, and prevent minor build/bundle overhead. If the imported symbol is actually needed, the fix would instead be to use it where appropriate, but here there is no indication that warn should be used.

The best fix without changing existing functionality is to delete the import { warn } from 'console'; line from src/prompts/curl.ts. Since the imported symbol is not referenced anywhere, removing this line will not affect runtime behavior. No additional methods, imports, or definitions are needed.

Concretely, in src/prompts/curl.ts, remove line 8 containing the unused import and leave the remaining imports as they are.

## Unused variable, import, function or class Unused import warn. --- In general, unused imports should be removed to keep the code clean, avoid confusion, and prevent minor build/bundle overhead. If the imported symbol is actually needed, the fix would instead be to use it where appropriate, but here there is no indication that <code>warn</code> should be used.</p> <p>The best fix without changing existing functionality is to delete the <code>import { warn } from 'console';</code> line from <code>src/prompts/curl.ts</code>. Since the imported symbol is not referenced anywhere, removing this line will not affect runtime behavior. No additional methods, imports, or definitions are needed.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, remove line 8 containing the unused import and leave the remaining imports as they are.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:52:12 +00:00

Unused variable, import, function or class

Unused variable cursorRow.


To fix this unused variable, the best approach is simply to remove the cursorRow declaration, since the current cursor-positioning logic does not depend on it. This avoids adding unnecessary complexity or refactoring working behavior. We do not need to introduce any new imports or methods, and we should not alter how the cursor is actually moved, as that logic is already using the computed linesFromBottom and targetCol values.

Concretely, in src/prompts/curl.ts, in the cursor positioning block under if (this.section === Section.URL), delete the line const cursorRow = 3; // " URL: " while leaving the surrounding logic intact. No other changes are required.

## Unused variable, import, function or class Unused variable cursorRow. --- To fix this unused variable, the best approach is simply to remove the <code>cursorRow</code> declaration, since the current cursor-positioning logic does not depend on it. This avoids adding unnecessary complexity or refactoring working behavior. We do not need to introduce any new imports or methods, and we should not alter how the cursor is actually moved, as that logic is already using the computed <code>linesFromBottom</code> and <code>targetCol</code> values.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, in the cursor positioning block under <code>if (this.section === Section.URL)</code>, delete the line <code>const cursorRow = 3; // " URL: "</code> while leaving the surrounding logic intact. No other changes are required.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-01 22:52:12 +00:00

Unused variable, import, function or class

Unused variable totalLines.


In general, unused variable warnings are best fixed either by removing the variable or by actually using it if it was intended for some purpose. Since totalLines is never used and the existing cursor logic functions without it, the safest fix is to remove the declaration.

Specifically, in src/prompts/curl.ts inside the render method, in the if (this.section === Section.URL) block, delete the line that declares totalLines and keep the rest of the logic (lines, urlLineIndex, linesFromBottom, etc.) unchanged. No additional methods, imports, or definitions are needed.

## Unused variable, import, function or class Unused variable totalLines. --- In general, unused variable warnings are best fixed either by removing the variable or by actually using it if it was intended for some purpose. Since <code>totalLines</code> is never used and the existing cursor logic functions without it, the safest fix is to remove the declaration.</p> <p>Specifically, in <code>src/prompts/curl.ts</code> inside the <code>render</code> method, in the <code>if (this.section === Section.URL)</code> block, delete the line that declares <code>totalLines</code> and keep the rest of the logic (<code>lines</code>, <code>urlLineIndex</code>, <code>linesFromBottom</code>, etc.) unchanged. No additional methods, imports, or definitions are needed.
github-code-quality[bot] (Migrated from github.com) reviewed 2026-02-02 15:43:19 +00:00
@ -0,0 +1,337 @@
import { Prompt } from '../base';
github-code-quality[bot] (Migrated from github.com) commented 2026-02-02 15:43:18 +00:00

Unused variable, import, function or class

Unused variable cursorRow.


In general, unused variables should either be removed or actually used in a meaningful way. Since cursorRow has no effect on program behavior and the cursor is already moved correctly using linesFromBottom, the best fix without changing functionality is to delete the const cursorRow = 3; declaration and, if desired, keep or slightly adjust the comment to retain the information that row 3 is the intended cursor row.

Concretely, in src/prompts/curl.ts, within the if (this.section === Section.URL) { ... } block around lines 184–203, remove the line const cursorRow = 3;. No additional methods, imports, or definitions are needed, and no other lines in the snippet must be changed.

## Unused variable, import, function or class Unused variable cursorRow. --- In general, unused variables should either be removed or actually used in a meaningful way. Since <code>cursorRow</code> has no effect on program behavior and the cursor is already moved correctly using <code>linesFromBottom</code>, the best fix without changing functionality is to delete the <code>const cursorRow = 3;</code> declaration and, if desired, keep or slightly adjust the comment to retain the information that row 3 is the intended cursor row.</p> <p>Concretely, in <code>src/prompts/curl.ts</code>, within the <code>if (this.section === Section.URL) { ... }</code> block around lines 184–203, remove the line <code>const cursorRow = 3;</code>. No additional methods, imports, or definitions are needed, and no other lines in the snippet must be changed.
github-code-quality[bot] (Migrated from github.com) commented 2026-02-02 15:43:19 +00:00

Unused variable, import, function or class

Unused variable totalLines.


In general, unused variables should either be removed or actually used; here, the variable is simply redundant. The best fix without changing functionality is to remove the totalLines declaration entirely, since the code already recomputes lines from output and does not need totalLines.

Concretely, in src/prompts/curl.ts within the render method's cursor-positioning block for Section.URL, delete the line:

const totalLines = output.split('\n').length; 

Leave the following lines (splitting into lines, finding urlLineIndex, etc.) unchanged. No new imports or helper methods are needed; this is a pure deletion.

## Unused variable, import, function or class Unused variable totalLines. --- In general, unused variables should either be removed or actually used; here, the variable is simply redundant. The best fix without changing functionality is to remove the <code>totalLines</code> declaration entirely, since the code already recomputes <code>lines</code> from <code>output</code> and does not need <code>totalLines</code>.</p> <p>Concretely, in <code>src/prompts/curl.ts</code> within the <code>render</code> method's cursor-positioning block for <code>Section.URL</code>, delete the line:</p> <pre><code>const totalLines = output.split('\n').length; </code></pre> <p>Leave the following lines (splitting into <code>lines</code>, finding <code>urlLineIndex</code>, etc.) unchanged. No new imports or helper methods are needed; this is a pure deletion.
Sign in to join this conversation.
No description provided.