The open source coding agent.
TypeScript
fix: command being passed as arg when no args present (#2553)
Aiden Cline4614e4983ec6
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.goindex dd24dcf1577..31de346f5b0 100644--- a/packages/tui/internal/components/chat/editor.go+++ b/packages/tui/internal/components/chat/editor.go@@ -507,7 +507,10 @@ func (m *editorComponent) Submit() (tea.Model, tea.Cmd) {commandName := strings.Split(expandedValue, " ")[0]command := m.app.Commands[commands.CommandName(commandName)]if command.Custom {- args := strings.TrimPrefix(expandedValue, command.PrimaryTrigger()+" ")+ args := ""+ if strings.HasPrefix(expandedValue, command.PrimaryTrigger()+" ") {+ args = strings.TrimPrefix(expandedValue, command.PrimaryTrigger()+" ")+ }cmds = append(cmds,util.CmdHandler(app.SendCommand{Command: string(command.Name), Args: args}),