Skip to content

refactor: consolidate inquire select functionality into select module - #1128

Merged
tusharmath merged 1 commit into
tailcallhq:mainfrom
echozyr2001:select-module
Jul 18, 2025
Merged

refactor: consolidate inquire select functionality into select module#1128
tusharmath merged 1 commit into
tailcallhq:mainfrom
echozyr2001:select-module

Conversation

@echozyr2001

Copy link
Copy Markdown
Contributor

Consolidate Inquire Select Functionality

Fixes #1126

Consolidate scattered inquire select operations into a single centralized module with consistent error handling and UX.

  • Created forge_main::select module with builder pattern API
  • Centralized error handling: cancellations → Ok(None)
  • Unified render configuration with consistent icons (⇡, ⇣, ➤)
  • Migrated all usage from ui.rs and update.rs

API

// Simple selection
ForgeSelect::select("Choose option", options).prompt()?

// Confirmation with default
ForgeSelect::confirm("Are you sure?").with_default(true).prompt()?

// Advanced configuration
ForgeSelect::select("Select model", models)
    .with_starting_cursor(index)
    .with_help_message("Custom help")
    .prompt()?

@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Jul 18, 2025
@tusharmath

Copy link
Copy Markdown
Collaborator

@echozyr2001 Thank you!

@tusharmath tusharmath changed the title feat: consolidate inquire select functionality into select module refactor: consolidate inquire select functionality into select module Jul 18, 2025
@tusharmath tusharmath added type: chore Routine tasks like conversions, reorganization, and maintenance work. and removed type: feature Brand new functionality, features, pages, workflows, endpoints, etc. labels Jul 18, 2025
@tusharmath
tusharmath merged commit fe49e05 into tailcallhq:main Jul 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate inquire select options into forge_main::select module

2 participants