Visitar URL original
feat: Support named arguments in custom commands by ezynda3 · Pull Request #158 · opencode-ai/opencode · GitHub
Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: Fix styling in multi-arguments dialog
  • Loading branch information
ezynda3 committed May 13, 2025
commit e3d81c34d0dbe711cc16742b7284a8b590123475
13 changes: 9 additions & 4 deletions internal/tui/components/dialog/arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,31 +297,36 @@ func (m MultiArgumentsDialogCmp) View() string {
// Calculate width needed for content
maxWidth := 60 // Width for explanation text

title := baseStyle.
title := lipgloss.NewStyle().
Foreground(t.Primary()).
Bold(true).
Width(maxWidth).
Padding(0, 1).
Background(t.Background()).
Render("Command Arguments")

explanation := baseStyle.
explanation := lipgloss.NewStyle().
Foreground(t.Text()).
Width(maxWidth).
Padding(0, 1).
Background(t.Background()).
Render("This command requires multiple arguments. Please enter values for each:")

// Create input fields for each argument
inputFields := make([]string, len(m.inputs))
for i, input := range m.inputs {
label := baseStyle.
label := lipgloss.NewStyle().
Foreground(t.TextMuted()).
Width(maxWidth).
Padding(1, 1, 0, 1).
Background(t.Background()).
Render(m.argNames[i] + ":")

field := baseStyle.
field := lipgloss.NewStyle().
Foreground(t.Text()).
Width(maxWidth).
Padding(0, 1).
Background(t.Background()).
Render(input.View())

inputFields[i] = lipgloss.JoinVertical(lipgloss.Left, label, field)
Expand Down