Implementation of TUI for Search using Bubbletea by scalvert · Pull Request #5 · gleanwork/glean-cli

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@scalvert

Summary

Migrates the glean search ... to use a TUI using Bubbletea.

New Search Functionality:

  • pkg/search/base_view.go: Added a new BaseSearchModel with methods for performing searches, loading more results, and displaying error and loading views.
  • pkg/search/default_view.go: Introduced a searchDisplayModel for non-interactive search displays, including initialization, update, and view methods.
  • pkg/search/common.go: Created common search utilities, including result item structures, list creation and updating functions, and search execution logic.

Code Refactoring:

  • cmd/chat.go: Refactored formatReadingStage function to use utils.FormatDatasource instead of the local formatDatasource function.

Dependency Updates:

  • go.mod: Updated the Go version and added several new dependencies, including bubbles, bubbletea, lipgloss, and others.

Removal of Redundant Code:

  • cmd/search_test.go: Removed the entire file, including all test cases for the search command.

Import Adjustments:

  • cmd/chat.go: Added a new import for github.com/scalvert/glean-cli/pkg/utils.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 13 changed files in this pull request and generated 2 comments.

Files not reviewed (5)
  • go.mod: Language not supported
  • cmd/search_test.go: Evaluated as low risk
  • cmd/chat.go: Evaluated as low risk
  • pkg/search/models.go: Evaluated as low risk
  • pkg/theme/theme.go: Evaluated as low risk

2 participants

@scalvert