Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmd/overlock/tui/tui.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
package tui

import (
"context"
"fmt"
"os"

tea "github.com/charmbracelet/bubbletea"
"github.com/web-seven/overlock/internal/tui"
"go.uber.org/zap"
)

// TUICmd represents the TUI command
type TUICmd struct{}

// Run executes the TUI command
func (c *TUICmd) Run() error {
func (c *TUICmd) Run(ctx context.Context, logger *zap.SugaredLogger) error {
// Create the app model
model := tui.NewAppModel()
model := tui.NewAppModel(logger)

// Create the Bubble Tea program
p := tea.NewProgram(model, tea.WithAltScreen())

// Set the program reference for log messages
model.SetProgram(p)

// Run the program
finalModel, err := p.Run()
if err != nil {
Expand Down
Loading
Loading