summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components/dialog
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-13 11:18:46 -0500
committeradamdottv <[email protected]>2025-06-13 11:18:46 -0500
commit61396b93edd8e93ad45503ca785f94314d9cd4b5 (patch)
tree91b1db1d11712e212b1ecfa96880a1a3269131ad /packages/tui/internal/components/dialog
parent62b9a30a9c70bd48768055f0049400d27a849c3e (diff)
downloadopencode-61396b93edd8e93ad45503ca785f94314d9cd4b5.tar.gz
opencode-61396b93edd8e93ad45503ca785f94314d9cd4b5.zip
wip: refactoring tui
Diffstat (limited to 'packages/tui/internal/components/dialog')
-rw-r--r--packages/tui/internal/components/dialog/complete.go33
1 files changed, 17 insertions, 16 deletions
diff --git a/packages/tui/internal/components/dialog/complete.go b/packages/tui/internal/components/dialog/complete.go
index c797a00df..8819184ac 100644
--- a/packages/tui/internal/components/dialog/complete.go
+++ b/packages/tui/internal/components/dialog/complete.go
@@ -203,26 +203,27 @@ func (c *completionDialogComponent) View() string {
t := theme.CurrentTheme()
baseStyle := styles.BaseStyle()
- maxWidth := 40
+ // maxWidth := 40
+ //
+ // completions := c.list.GetItems()
- completions := c.list.GetItems()
+ // for _, cmd := range completions {
+ // title := cmd.DisplayValue()
+ // if len(title) > maxWidth-4 {
+ // maxWidth = len(title) + 4
+ // }
+ // }
- for _, cmd := range completions {
- title := cmd.DisplayValue()
- if len(title) > maxWidth-4 {
- maxWidth = len(title) + 4
- }
- }
-
- c.list.SetMaxWidth(maxWidth)
+ // c.list.SetMaxWidth(maxWidth)
return baseStyle.Padding(0, 0).
- Border(lipgloss.NormalBorder()).
+ Background(t.BackgroundSubtle()).
+ Border(lipgloss.ThickBorder()).
+ BorderTop(false).
BorderBottom(false).
- BorderRight(false).
- BorderLeft(false).
- BorderBackground(t.Background()).
- BorderForeground(t.TextMuted()).
+ BorderRight(true).
+ BorderLeft(true).
+ BorderForeground(t.BackgroundSubtle()).
Width(c.width).
Render(c.list.View())
}
@@ -246,7 +247,7 @@ func NewCompletionDialogComponent(completionProvider CompletionProvider) Complet
li := utilComponents.NewListComponent(
items,
7,
- "No file matches found",
+ "No matching files",
false,
)