input

package
v2.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearScreen

func ClearScreen()

ClearScreen clears the terminal screen and moves the cursor to the top-left.

func GetTextInput

func GetTextInput(title, placeholder string) (string, error)

GetTextInput prompts the user to enter text

func GetTextInputWithLimit

func GetTextInputWithLimit(title, placeholder string, charLimit int) (string, error)

GetTextInputWithLimit prompts the user to enter text with a custom character limit

func NewProgressModel

func NewProgressModel(repos []string, checkpointInterval int, branchName, prTitle, prompt string) progressModel

NewProgressModel creates a new progress model for tracking repository processing. checkpointInterval controls how often the user is asked to confirm (0 = no checkpoints).

func SelectOption

func SelectOption(title string, options []string) (string, error)

SelectOption prompts the user to select one option from a list

Types

type AssessmentResultMsg

type AssessmentResultMsg struct {
	Summary  string
	Findings map[string]string
}

AssessmentResultMsg carries the final assessment summary and per-project findings.

type CancelRegistry

type CancelRegistry struct {
	// contains filtered or unexported fields
}

CancelRegistry is a thread-safe map of repo -> context.CancelFunc.

func (*CancelRegistry) Cancel

func (r *CancelRegistry) Cancel(repo string)

Cancel calls and removes the cancel function for a repo.

func (*CancelRegistry) Register

func (r *CancelRegistry) Register(repo string, cancel context.CancelFunc)

Register stores a cancel function for a repo.

type DashboardConfig

type DashboardConfig struct {
	Projects      []config.Project
	AIToolsConfig *config.AIToolsConfig
	GitHubConfig  config.GitHubConfig
	AppConfig     config.Config
	Parallelism   int
	FetchProjects func() ([]config.Project, error)
	ProcessRepos  func(sender *StatusSender, projects []config.Project, setup *WizardResult)
	AssessRepos   func(sender *StatusSender, projects []config.Project, setup *WizardResult)

	// Slack notification callbacks (invoked from the done screen)
	SendSlackNotifications      func(projects []config.Project, prTitle string, prURLs map[string]string, token string, onStatus func(string))
	SendSlackAssessmentFindings func(projects []config.Project, question string, findings map[string]string, token string, onStatus func(string))
}

DashboardConfig holds all dependencies injected by main.go.

type DashboardResult

type DashboardResult struct {
	Action             string
	SelectedProjects   []config.Project
	WizardResult       *WizardResult
	ProcessResults     map[string]ProjectDoneMsg
	Interrupted        bool
	AssessmentSummary  string
	AssessmentFindings map[string]string
}

DashboardResult holds everything the caller needs after the dashboard exits.

func RunDashboard

func RunDashboard(cfg DashboardConfig) (*DashboardResult, error)

RunDashboard is the single entry point that replaces all standalone tea.Program calls.

type PostStatusMsg

type PostStatusMsg struct {
	Line string
}

PostStatusMsg carries a post-processing status line (e.g. Slack notifications).

type ProjectDoneMsg

type ProjectDoneMsg struct {
	Repo     string
	Status   string
	Success  bool
	Skipped  bool
	PRURL    string
	Error    error
	AIOutput string
}

ProjectDoneMsg signals that a project has finished processing.

type ProjectStatusMsg

type ProjectStatusMsg struct {
	Repo   string
	Status string
}

ProjectStatusMsg updates the status line for a single project.

type StatusSender

type StatusSender struct {
	ResumeCh       chan string
	MCPConfigPath  string
	CancelRegistry *CancelRegistry
	// contains filtered or unexported fields
}

StatusSender sends status updates to the progress dashboard.

func (*StatusSender) AssessmentResult

func (s *StatusSender) AssessmentResult(summary string, findings map[string]string)

AssessmentResult sends the final assessment summary and per-project findings.

func (*StatusSender) Done

func (s *StatusSender) Done(repo, status string, success, skipped bool, prURL string, err error, aiOutput string)

Done signals that a project has finished processing.

func (*StatusSender) Finish

func (s *StatusSender) Finish()

Finish signals that all processing (including post-processing) is done.

func (*StatusSender) PostStatus

func (s *StatusSender) PostStatus(line string)

PostStatus sends a post-processing status line to the progress view.

func (*StatusSender) UpdateStatus

func (s *StatusSender) UpdateStatus(repo, status string)

UpdateStatus updates the status line for a project.

type WizardResult

type WizardResult struct {
	Action                  string // "local" or "assessment"
	AITool                  *config.AITool
	IgnoreAgentInstructions bool
	BranchStrategy          string
	BranchName              string
	PRTitle                 string
	Prompt                  string
}

WizardResult holds all values collected by the setup wizard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL