From b66676c52acc2ae0d151d4f5f819820fd188ddcd Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 21 Jan 2026 15:52:17 -0300 Subject: [PATCH 1/2] fix(sec): do not output resolved command (#1934) Signed-off-by: Carlos Alexandro Becker Co-authored-by: Andrey Nering --- internal/shell/shell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/shell/shell.go b/internal/shell/shell.go index e5a54f01c403ae1b8de681616c5d693bc842ac14..ced8da26ed4e837b08e66152e9aafb2cc029c0d1 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -227,7 +227,7 @@ func (s *Shell) blockHandler() func(next interp.ExecHandlerFunc) interp.ExecHand for _, blockFunc := range s.blockFuncs { if blockFunc(args) { - return fmt.Errorf("command is not allowed for security reasons: %s", strings.Join(args, " ")) + return fmt.Errorf("command is not allowed for security reasons: %q", args[0]) } } From 4086e2f007ac54f1785535546f0fc0bae47afada Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 21 Jan 2026 17:16:51 -0300 Subject: [PATCH 2/2] feat: increase paste lines as attachment threshold (#1936) Signed-off-by: Carlos Alexandro Becker --- internal/tui/components/chat/editor/editor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index 8f7c43c76a965539db3c3d6de4f46377c8a10a5c..ba832b415133305fccbefa37da6b749405feb2c6 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -39,6 +39,9 @@ var ( errClipboardUnknownFormat = fmt.Errorf("unknown clipboard format") ) +// If pasted text has more than 10 newlines, treat it as a file attachment. +const pasteLinesThreshold = 10 + type Editor interface { util.Model layout.Sizeable @@ -239,8 +242,7 @@ func (m *editorCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) { m.textarea.SetValue(msg.Text) m.textarea.MoveToEnd() case tea.PasteMsg: - // If pasted text has more than 2 newlines, treat it as a file attachment. - if strings.Count(msg.Content, "\n") > 2 { + if strings.Count(msg.Content, "\n") > pasteLinesThreshold { content := []byte(msg.Content) if len(content) > maxAttachmentSize { return m, util.ReportWarn("Paste is too big (>5mb)")