feat(tui): add bubbletea terminal UI #30
@@ -1,7 +1,6 @@
|
||||
package tui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/charmbracelet/bubbles/textinput"
|
||||
@@ -175,16 +174,3 @@ func glyphForParsed(glyph string) string {
|
||||
func drawerLines() int {
|
||||
return 3
|
||||
}
|
||||
|
||||
// formatPreviewEntity builds a preview string showing how the entity will appear
|
||||
func formatPreviewEntity(p *parse.Result) string {
|
||||
if p == nil {
|
||||
return ""
|
||||
}
|
||||
glyph := glyphForParsed(p.Glyph)
|
||||
body := p.Body
|
||||
if p.Title != nil {
|
||||
body = *p.Title
|
||||
}
|
||||
return fmt.Sprintf("%s %s", glyph, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user