diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index 4778c359ba4cad639b55671a252c4fde98eeab73..9608d6cee48502ccf491618a0bd19cdfeed57f5f 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -365,9 +365,11 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (m *editorCmp) setEditorPrompt() { - if m.app.Permissions.SkipRequests() { - m.textarea.SetPromptFunc(4, yoloPromptFunc) - return + if perm := m.app.Permissions; perm != nil { + if perm.SkipRequests() { + m.textarea.SetPromptFunc(4, yoloPromptFunc) + return + } } m.textarea.SetPromptFunc(4, normalPromptFunc) }