summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoradamdotdevin <[email protected]>2025-08-25 11:27:49 -0500
committeradamdotdevin <[email protected]>2025-08-25 11:27:58 -0500
commit0a0b363587cdcc311382561092c1277a5544f4c2 (patch)
tree3e44bacbbfa6a2ab192f295a19de5ba7fd4d874e
parentf5f6167146b778a8bf6a4c78d45fb2aa1133a96a (diff)
downloadopencode-0a0b363587cdcc311382561092c1277a5544f4c2.tar.gz
opencode-0a0b363587cdcc311382561092c1277a5544f4c2.zip
feat(tui): grok free
-rw-r--r--packages/tui/internal/tui/tui.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/tui/internal/tui/tui.go b/packages/tui/internal/tui/tui.go
index b0d169e0b..9ca0e0172 100644
--- a/packages/tui/internal/tui/tui.go
+++ b/packages/tui/internal/tui/tui.go
@@ -918,6 +918,7 @@ func (a Model) home() (string, int, int) {
baseStyle := styles.NewStyle().Foreground(t.Text()).Background(t.Background())
base := baseStyle.Render
muted := styles.NewStyle().Foreground(t.TextMuted()).Background(t.Background()).Render
+ highlight := styles.NewStyle().Foreground(t.Accent()).Background(t.Background()).Render
open := `
█▀▀█ █▀▀█ █▀▀ █▀▀▄
@@ -952,9 +953,9 @@ func (a Model) home() (string, int, int) {
)
// Use limit of 4 for vscode, 6 for others
- limit := 6
+ limit := 4
if util.IsVSCode() {
- limit = 4
+ limit = 2
}
showVscode := util.IsVSCode()
@@ -971,15 +972,23 @@ func (a Model) home() (string, int, int) {
styles.WhitespaceStyle(t.Background()),
)
+ grok := highlight("Try Grok Code free for a limited time")
+ grok = lipgloss.PlaceHorizontal(
+ effectiveWidth,
+ lipgloss.Center,
+ grok,
+ styles.WhitespaceStyle(t.Background()),
+ )
+
lines := []string{}
lines = append(lines, "")
- lines = append(lines, "")
lines = append(lines, logoAndVersion)
lines = append(lines, "")
- lines = append(lines, "")
lines = append(lines, cmds)
lines = append(lines, "")
lines = append(lines, "")
+ lines = append(lines, grok)
+ lines = append(lines, "")
mainHeight := lipgloss.Height(strings.Join(lines, "\n"))