@@ -263,6 +263,9 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
263263 Attachment: attachment,
264264 })
265265
266+ case commands.ToggleYoloModeMsg:
267+ m.setEditorPrompt()
268+ return m, nil
266269 case tea.KeyPressMsg:
267270 cur := m.textarea.Cursor()
268271 curIdx := m.textarea.Width()*cur.Y + cur.X
@@ -368,6 +371,14 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
368371 return m, tea.Batch(cmds...)
369372}
370373
374+func (m *editorCmp) setEditorPrompt() {
375+ if m.app.Permissions.SkipRequests() {
376+ m.textarea.SetPromptFunc(4, yoloPromptFunc)
377+ return
378+ }
379+ m.textarea.SetPromptFunc(4, normalPromptFunc)
380+}
381+
371382func (m *editorCmp) completionsPosition() (int, int) {
372383 cur := m.textarea.Cursor()
373384 if cur == nil {
@@ -416,6 +427,9 @@ func (m *editorCmp) View() string {
416427 } else {
417428 m.textarea.Placeholder = m.readyPlaceholder
418429 }
430+ if m.app.Permissions.SkipRequests() {
431+ m.textarea.Placeholder = "Yolo mode!"
432+ }
419433 if len(m.attachments) == 0 {
420434 content := t.S().Base.Padding(1).Render(
421435 m.textarea.View(),
@@ -529,31 +543,47 @@ func (c *editorCmp) HasAttachments() bool {
529543 return len(c.attachments) > 0
530544}
531545
532−func New(app *app.App) Editor {
546+func normalPromptFunc(info textarea.PromptInfo) string {
533547 t := styles.CurrentTheme()
534− ta := textarea.New()
535− ta.SetStyles(t.S().TextArea)
536− ta.SetPromptFunc(4, func(info textarea.PromptInfo) string {
537− if info.LineNumber == 0 {
538− return " > "
539− }
548+ if info.LineNumber == 0 {
549+ return " > "
550+ }
551+ if info.Focused {
552+ return t.S().Base.Foreground(t.GreenDark).Render("::: ")
553+ }
554+ return t.S().Muted.Render("::: ")
555+}
556+
557+func yoloPromptFunc(info textarea.PromptInfo) string {
558+ t := styles.CurrentTheme()
559+ if info.LineNumber == 0 {
540560 if info.Focused {
541− return t.S().Base.Foreground(t.GreenDark).Render("::: ")
561+ return fmt.Sprintf("%s ", t.YoloIconFocused)
542562 } else {
543− return t.S().Muted.Render("::: ")
563+ return fmt.Sprintf("%s ", t.YoloIconBlurred)
544564 }
545− })
565+ }
566+ if info.Focused {
567+ return fmt.Sprintf("%s ", t.YoloDotsFocused)
568+ }
569+ return fmt.Sprintf("%s ", t.YoloDotsBlurred)
570+}
571+
572+func New(app *app.App) Editor {
573+ t := styles.CurrentTheme()
574+ ta := textarea.New()
575+ ta.SetStyles(t.S().TextArea)
546576 ta.ShowLineNumbers = false
547577 ta.CharLimit = -1
548578 ta.SetVirtualCursor(false)
549579 ta.Focus()
550−
551580 e := &editorCmp{
552581 // TODO: remove the app instance from here
553582 app: app,
554583 textarea: ta,
555584 keyMap: DefaultEditorKeyMap(),
556585 }
586+ e.setEditorPrompt()
557587
558588 e.randomizePlaceholders()
559589 e.textarea.Placeholder = e.readyPlaceholder