@@ -13,23 +13,22 @@ import (
1313 "sort"
1414 "strings"
1515 "sync"
16- "time"
17-
18- "golang.design/x/clipboard"
19-
20- "github.com/charmbracelet/bubbles/textarea"
21-
22- "github.com/charmbracelet/bubbles/viewport" tea "github.com/charmbracelet/bubbletea"
23- "github.com/charmbracelet/lipgloss"
24- "github.com/google/uuid"
25- "github.com/nathfavour/vibeauracle/brain"
26- "github.com/nathfavour/vibeauracle/internal/doctor"
27- vmodel "github.com/nathfavour/vibeauracle/model"
28- "github.com/nathfavour/vibeauracle/prompt"
29- "github.com/nathfavour/vibeauracle/reactor"
30- "github.com/nathfavour/vibeauracle/sys"
31- "github.com/nathfavour/vibeauracle/tooling"
32- )
16+ "time"
17+
18+ "golang.design/x/clipboard"
19+ "github.com/charmbracelet/bubbles/textarea"
20+ "github.com/charmbracelet/bubbles/viewport"
21+ tea "github.com/charmbracelet/bubbletea"
22+ "github.com/charmbracelet/lipgloss"
23+ "github.com/google/uuid"
24+ "github.com/nathfavour/vibeauracle/brain"
25+ "github.com/nathfavour/vibeauracle/internal/doctor"
26+ vmodel "github.com/nathfavour/vibeauracle/model"
27+ "github.com/nathfavour/vibeauracle/prompt"
28+ "github.com/nathfavour/vibeauracle/reactor"
29+ "github.com/nathfavour/vibeauracle/sys"
30+ "github.com/nathfavour/vibeauracle/tooling"
31+ )
3332
3433type focus int
3534
@@ -2094,39 +2093,75 @@ func (m *model) handleSlashCommand(cmd string) (tea.Model, tea.Cmd) {
20942093 }
20952094 }
20962095
2097- if lastUser != "" && lastAI != "" {
2098- formatted := fmt .Sprintf ("Question: %s\n \n Answer: %s" , strings .TrimSpace (lastUser ), strings .TrimSpace (lastAI ))
2099-
2100- // 1. Try native Go clipboard (talks to X11/Wayland/Win/Mac APIs directly)
2101- clipboard .Write (clipboard .FmtText , []byte (formatted ))
2102-
2103- // We assume success if it didn't panic (native lib design)
2104- // But we still check for Termux as it's a special sandbox
2105- if _ , tErr := exec .LookPath ("termux-clipboard-set" ); tErr == nil {
2106- cmd := exec .Command ("termux-clipboard-set" )
2107- cmd .Stdin = strings .NewReader (formatted )
2108- _ = cmd .Run ()
2109- }
2110-
2111- m .messages = append (m .messages , subtleStyle .Render ("✓ Copied Q&A block to clipboard" ))
2112- } else {
2113- m .messages = append (m .messages , errorStyle .Render (" COPY ERROR " )+ "\n No Q&A block found to copy." )
2114- }
2115- return m , m .asyncRender () case "/shot" : return m .takeScreenshot ()
2116- case "/record" :
2117- return m .toggleRecording ()
2118- case "/show-tree" , "/sidebar" :
2119- m .showTree = ! m .showTree
2120- // trigger resize
2121- return m , func () tea.Msg { return tea.WindowSizeMsg {Width : m .width , Height : m .height } }
2122- case "/clear" :
2123- m .messages = []string {}
2124- m .historyRendered = ""
2125- ensureBanner (& m .messages , m .banner )
2126- m .messages = append (m .messages , "Type " + systemStyle .Render ("/help" )+ " to see available commands." )
2127- m .saveState ()
2128- return m , m .asyncRenderWithPos (true , false , 0 )
2129- case "/heal" :
2096+ if lastUser != "" && lastAI != "" {
2097+
2098+ formatted := fmt .Sprintf ("Question: %s\n \n Answer: %s" , strings .TrimSpace (lastUser ), strings .TrimSpace (lastAI ))
2099+
2100+
2101+
2102+ // 1. Try native Go clipboard (talks to X11/Wayland/Win/Mac APIs directly)
2103+
2104+ clipboard .Write (clipboard .FmtText , []byte (formatted ))
2105+
2106+
2107+
2108+ // We assume success if it didn't panic (native lib design)
2109+
2110+ // But we still check for Termux as it's a special sandbox
2111+
2112+ if _ , tErr := exec .LookPath ("termux-clipboard-set" ); tErr == nil {
2113+
2114+ cmd := exec .Command ("termux-clipboard-set" )
2115+
2116+ cmd .Stdin = strings .NewReader (formatted )
2117+
2118+ _ = cmd .Run ()
2119+
2120+ }
2121+
2122+
2123+
2124+ m .messages = append (m .messages , subtleStyle .Render ("✓ Copied Q&A block to clipboard" ))
2125+
2126+ } else {
2127+
2128+ m .messages = append (m .messages , errorStyle .Render (" COPY ERROR " )+ "\n No Q&A block found to copy." )
2129+
2130+ }
2131+
2132+ return m , m .asyncRender ()
2133+
2134+ case "/shot" :
2135+
2136+ return m .takeScreenshot ()
2137+
2138+ case "/record" :
2139+
2140+ return m .toggleRecording ()
2141+
2142+ case "/show-tree" , "/sidebar" :
2143+
2144+ m .showTree = ! m .showTree
2145+
2146+ // trigger resize
2147+
2148+ return m , func () tea.Msg { return tea.WindowSizeMsg {Width : m .width , Height : m .height } }
2149+
2150+ case "/clear" :
2151+
2152+ m .messages = []string {}
2153+
2154+ m .historyRendered = ""
2155+
2156+ ensureBanner (& m .messages , m .banner )
2157+
2158+ m .messages = append (m .messages , "Type " + systemStyle .Render ("/help" )+ " to see available commands." )
2159+
2160+ m .saveState ()
2161+
2162+ return m , m .asyncRenderWithPos (true , false , 0 )
2163+
2164+ case "/heal" :
21302165 issue := "Analyze and fix current project failures"
21312166 if len (parts ) > 1 {
21322167 issue = strings .Join (parts [1 :], " " )
0 commit comments