Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
color fixes--all good now
Dane Schneider2a3256f7c5e1
diff --git a/app/cli/auth/account.go b/app/cli/auth/account.goindex 4bf4f634..bf2b439a 100644--- a/app/cli/auth/account.go+++ b/app/cli/auth/account.go@@ -119,7 +119,7 @@ func SelectOrSignInOrCreate() error {return fmt.Errorf("error setting auth: %v", err)}- fmt.Printf("✅ Signed in as %s | Org: %s\n", color.New(color.Bold, color.FgHiGreen).Sprintf("<%s> %s", Current.UserName, Current.Email), color.New(color.FgHiCyan).Sprint(Current.OrgName))+ fmt.Printf("✅ Signed in as %s | Org: %s\n", color.New(color.Bold, term.ColorHiGreen).Sprintf("<%s> %s", Current.UserName, Current.Email), color.New(term.ColorHiCyan).Sprint(Current.OrgName))fmt.Println()term.PrintCmds("", "new", "plans")diff --git a/app/cli/changes_tui/main_viewport.go b/app/cli/changes_tui/main_viewport.goindex 684e5be3..77bc6580 100644--- a/app/cli/changes_tui/main_viewport.go+++ b/app/cli/changes_tui/main_viewport.go@@ -2,6 +2,7 @@ package changes_tuiimport ("fmt"+ "plandex/term""github.com/charmbracelet/lipgloss""github.com/fatih/color"@@ -120,7 +121,7 @@ func (m changesUIModel) renderMainViewFooter() string {Foreground(lipgloss.Color(helpTextColor))var footer stringif m.didCopy {- footer = color.New(color.Bold, color.FgHiCyan).Sprint(` copied to clipboard`)+ footer = color.New(color.Bold, term.ColorHiCyan).Sprint(` copied to clipboard`)} else {footer = ` (c)opy change to clipboard • (r)eject file`}diff --git a/app/cli/changes_tui/path_tabs.go b/app/cli/changes_tui/path_tabs.goindex bd2af0c4..0b6c9330 100644--- a/app/cli/changes_tui/path_tabs.go+++ b/app/cli/changes_tui/path_tabs.go@@ -1,6 +1,7 @@package changes_tuiimport (+ "plandex/term""strings""github.com/charmbracelet/lipgloss"@@ -28,7 +29,7 @@ func (m changesUIModel) renderPathTabs() string {tab := " 📄 " + path + " "- pathColor := color.FgHiGreen+ pathColor := term.ColorHiGreenbgColor := color.BgGreenif selected {diff --git a/app/cli/changes_tui/replace.go b/app/cli/changes_tui/replace.goindex 90569409..21e8de46 100644--- a/app/cli/changes_tui/replace.go+++ b/app/cli/changes_tui/replace.go@@ -1,6 +1,7 @@package changes_tuiimport (+ "plandex/term""strings""github.com/fatih/color"@@ -89,7 +90,7 @@ func (m changesUIModel) getReplacementOldDisplay() oldReplacementRes {oldContentLines := strings.Split(oldContent, "\n")for i, line := range oldContentLines {- oldContentLines[i] = color.New(color.FgHiRed).Sprint(line)+ oldContentLines[i] = color.New(term.ColorHiRed).Sprint(line)}oldContent = strings.Join(oldContentLines, "\n")@@ -123,7 +124,7 @@ func (m changesUIModel) getReplacementNewDisplay(prependContent, appendContent snewContentLines := strings.Split(newContent, "\n")for i, line := range newContentLines {- newContentLines[i] = color.New(color.FgHiGreen).Sprint(line)+ newContentLines[i] = color.New(term.ColorHiGreen).Sprint(line)}newContent = strings.Join(newContentLines, "\n")diff --git a/app/cli/changes_tui/sidebar.go b/app/cli/changes_tui/sidebar.goindex 28eefc20..ba5f4371 100644--- a/app/cli/changes_tui/sidebar.go+++ b/app/cli/changes_tui/sidebar.go@@ -1,6 +1,7 @@package changes_tuiimport (+ "plandex/term""strings""github.com/charmbracelet/lipgloss"@@ -30,7 +31,7 @@ func (m changesUIModel) renderSidebar() string {if m.hasNewFile() && i == 0 {createdFile = trueselected := m.selectedNewFile()- fgColor := color.FgHiGreen+ fgColor := term.ColorHiGreenbgColor := color.BgGreenicon := "🌟"@@ -58,10 +59,10 @@ func (m changesUIModel) renderSidebar() string {selected := currentRep != nil && rep.Id == currentRep.Ids := ""- fgColor := color.FgHiGreen+ fgColor := term.ColorHiGreenbgColor := color.BgGreenif rep.Failed {- fgColor = color.FgHiRed+ fgColor = term.ColorHiRedbgColor = color.BgRedanyFailed = true} else if rep.RejectedAt != nil {@@ -98,10 +99,10 @@ func (m changesUIModel) renderSidebar() string {}if anyApplied {- fgColor := color.FgHiGreen+ fgColor := term.ColorHiGreenbgColor := color.BgGreenif anyFailed {- fgColor = color.FgHiRed+ fgColor = term.ColorHiRedbgColor = color.BgRed}diff --git a/app/cli/changes_tui/view.go b/app/cli/changes_tui/view.goindex 4fd9ea52..3acf923b 100644--- a/app/cli/changes_tui/view.go+++ b/app/cli/changes_tui/view.go@@ -1,6 +1,7 @@package changes_tuiimport (+ "plandex/term""strings""github.com/charmbracelet/bubbles/viewport"@@ -219,8 +220,8 @@ func (m changesUIModel) renderConfirmRejectFile() string {style := lipgloss.NewStyle().Padding(1).BorderStyle(lipgloss.NormalBorder()).BorderForeground(lipgloss.Color(borderColor)).Width(m.width - 2).Height(m.height - 2)prompt := color.New(color.Bold).Sprintf("🧐 Are you sure you want to reject changes to ") +- color.New(color.Bold, color.FgHiMagenta).Sprint(m.selectionInfo.currentPath) + "?\n\n" +- color.New(color.FgHiCyan, color.Bold).Sprintf("(y)es | (n)o")+ color.New(color.Bold, term.ColorHiMagenta).Sprint(m.selectionInfo.currentPath) + "?\n\n" ++ color.New(term.ColorHiCyan, color.Bold).Sprintf("(y)es | (n)o")return style.Render(prompt)}diff --git a/app/cli/cmd/checkout.go b/app/cli/cmd/checkout.goindex 1b6e0687..77be5f3e 100644--- a/app/cli/cmd/checkout.go+++ b/app/cli/cmd/checkout.go@@ -75,7 +75,7 @@ func checkout(cmd *cobra.Command, args []string) {}if branchName == "" {- fmt.Printf("🌱 Branch %s not found\n", color.New(color.Bold, color.FgHiCyan).Sprint(nameOrIdx))+ fmt.Printf("🌱 Branch %s not found\n", color.New(color.Bold, term.ColorHiCyan).Sprint(nameOrIdx))res, err := term.ConfirmYesNo("Create it now?")if err != nil {@@ -132,7 +132,7 @@ func checkout(cmd *cobra.Command, args []string) {return}- // fmt.Printf("✅ Created branch %s\n", color.New(color.Bold, color.FgHiGreen).Sprint(branchName))+ // fmt.Printf("✅ Created branch %s\n", color.New(color.Bold, term.ColorHiGreen).Sprint(branchName))}err := lib.WriteCurrentBranch(branchName)@@ -142,7 +142,7 @@ func checkout(cmd *cobra.Command, args []string) {return}- fmt.Printf("✅ Checked out branch %s\n", color.New(color.Bold, color.FgHiGreen).Sprint(branchName))+ fmt.Printf("✅ Checked out branch %s\n", color.New(color.Bold, term.ColorHiGreen).Sprint(branchName))fmt.Println()term.PrintCmds("", "load", "tell", "branches", "delete-branch")diff --git a/app/cli/cmd/convo.go b/app/cli/cmd/convo.goindex 47cfe034..836191a0 100644--- a/app/cli/cmd/convo.go+++ b/app/cli/cmd/convo.go@@ -86,7 +86,7 @@ func convo(cmd *cobra.Command, args []string) {totalTokens += msg.Tokens}- convo = strings.ReplaceAll(convo, stoppedEarlyMsg, color.New(color.FgHiRed).Sprint(stoppedEarlyMsg))+ convo = strings.ReplaceAll(convo, stoppedEarlyMsg, color.New(term.ColorHiRed).Sprint(stoppedEarlyMsg))output :=fmt.Sprintf("\n%s", convo) +diff --git a/app/cli/cmd/delete_branch.go b/app/cli/cmd/delete_branch.goindex 6bab3ccb..42443efb 100644--- a/app/cli/cmd/delete_branch.go+++ b/app/cli/cmd/delete_branch.go@@ -110,7 +110,7 @@ func deleteBranch(cmd *cobra.Command, args []string) {}if !found {- fmt.Printf("🤷♂️ Branch %s does not exist\n", color.New(color.Bold, color.FgHiCyan).Sprint(branch))+ fmt.Printf("🤷♂️ Branch %s does not exist\n", color.New(color.Bold, term.ColorHiCyan).Sprint(branch))return}@@ -123,7 +123,7 @@ func deleteBranch(cmd *cobra.Command, args []string) {return}- fmt.Printf("✅ Deleted branch %s\n", color.New(color.Bold, color.FgHiCyan).Sprint(branch))+ fmt.Printf("✅ Deleted branch %s\n", color.New(color.Bold, term.ColorHiCyan).Sprint(branch))fmt.Println()term.PrintCmds("", "branches")diff --git a/app/cli/cmd/delete_plan.go b/app/cli/cmd/delete_plan.goindex 8c62328f..734c81c5 100644--- a/app/cli/cmd/delete_plan.go+++ b/app/cli/cmd/delete_plan.go@@ -124,7 +124,7 @@ func del(cmd *cobra.Command, args []string) {}}- fmt.Printf("✅ Deleted plan %s\n", color.New(color.Bold, color.FgHiCyan).Sprint(plan.Name))+ fmt.Printf("✅ Deleted plan %s\n", color.New(color.Bold, term.ColorHiCyan).Sprint(plan.Name))}func delAll() {diff --git a/app/cli/cmd/ls.go b/app/cli/cmd/ls.goindex 0c5049ca..3803a360 100644--- a/app/cli/cmd/ls.go+++ b/app/cli/cmd/ls.go@@ -69,7 +69,7 @@ func listContext(cmd *cobra.Command, args []string) {tokensTbl := tablewriter.NewWriter(os.Stdout)tokensTbl.SetAutoWrapText(false)- tokensTbl.Append([]string{color.New(color.FgHiCyan, color.Bold).Sprintf("Total tokens →") + color.New(color.Bold).Sprintf(" %d 🪙", totalTokens)})+ tokensTbl.Append([]string{color.New(term.ColorHiCyan, color.Bold).Sprintf("Total tokens →") + color.New(color.Bold).Sprintf(" %d 🪙", totalTokens)})tokensTbl.Render()diff --git a/app/cli/cmd/models.go b/app/cli/cmd/models.goindex c414d3ee..d647c88a 100644--- a/app/cli/cmd/models.go+++ b/app/cli/cmd/models.go@@ -43,7 +43,7 @@ func models(cmd *cobra.Command, args []string) {modelSet = &shared.DefaultModelSet}- color.New(color.Bold, color.FgHiCyan).Println("🤖 Models")+ color.New(color.Bold, term.ColorHiCyan).Println("🤖 Models")table := tablewriter.NewWriter(os.Stdout)table.SetAutoWrapText(false)table.SetHeader([]string{"Role", "Provider", "Model", "Temperature", "Top P"})@@ -68,7 +68,7 @@ func models(cmd *cobra.Command, args []string) {fmt.Println()- color.New(color.Bold, color.FgHiCyan).Println("🧠 Planner Defaults")+ color.New(color.Bold, term.ColorHiCyan).Println("🧠 Planner Defaults")table = tablewriter.NewWriter(os.Stdout)table.SetAutoWrapText(false)table.SetHeader([]string{"Max Tokens", "Max Convo Tokens", "Reserved Output Tokens"})@@ -80,7 +80,7 @@ func models(cmd *cobra.Command, args []string) {table.Render()fmt.Println()- color.New(color.Bold, color.FgHiCyan).Println("⚙️ Planner Overrides")+ color.New(color.Bold, term.ColorHiCyan).Println("⚙️ Planner Overrides")table = tablewriter.NewWriter(os.Stdout)table.SetAutoWrapText(false)table.SetHeader([]string{"Name", "Value"})diff --git a/app/cli/cmd/new.go b/app/cli/cmd/new.goindex 03198b41..4d0d6f08 100644--- a/app/cli/cmd/new.go+++ b/app/cli/cmd/new.go@@ -72,7 +72,7 @@ func new(cmd *cobra.Command, args []string) {name = "draft"}- fmt.Printf("✅ Started new plan %s and set it to current plan\n", color.New(color.Bold, color.FgHiGreen).Sprint(name))+ fmt.Printf("✅ Started new plan %s and set it to current plan\n", color.New(color.Bold, term.ColorHiGreen).Sprint(name))fmt.Println()term.PrintCmds("", "load", "tell", "plans", "current")diff --git a/app/cli/cmd/plans.go b/app/cli/cmd/plans.goindex 82a8a668..8c726844 100644--- a/app/cli/cmd/plans.go+++ b/app/cli/cmd/plans.go@@ -160,19 +160,19 @@ func plans(cmd *cobra.Command, args []string) {currentProjectPlans := plansByProjectId[lib.CurrentProjectId]if len(parentProjectIdsWithPaths) > 0 || len(childProjectIdsWithPaths) > 0 {- color.New(color.Bold, color.FgHiGreen).Print("Plans in current directory\n")+ color.New(color.Bold, term.ColorHiGreen).Print("Plans in current directory\n")} else {fmt.Println()}for i, p := range currentProjectPlans {num := strconv.Itoa(i + 1)if p.Id == lib.CurrentPlanId {- num = color.New(color.Bold, color.FgHiGreen).Sprint(num)+ num = color.New(color.Bold, term.ColorHiGreen).Sprint(num)}var name stringif p.Id == lib.CurrentPlanId {- name = color.New(color.Bold, color.FgHiGreen).Sprint(p.Name) + fmt.Sprint(" 👈")+ name = color.New(color.Bold, term.ColorHiGreen).Sprint(p.Name) + fmt.Sprint(" 👈")} else {name = p.Name}@@ -206,12 +206,8 @@ func plans(cmd *cobra.Command, args []string) {}table.Render()- fmt.Println()- term.PrintCmds("", "new", "cd", "delete-plan")} else {fmt.Println("🤷♂️ No plans in current directory")- fmt.Println()- term.PrintCmds("", "new")}var addPathToTreeFn func(tree treeprint.Tree, basePath, localPath, projectId string, isParent bool)@@ -262,15 +258,23 @@ func plans(cmd *cobra.Command, args []string) {plans := plansByProjectId[projectId]for _, p := range plans {- branch.AddNode(color.New(color.FgHiCyan).Sprint(p.Name))+ branch.AddNode(color.New(term.ColorHiCyan).Sprint(p.Name))}}}+ var c color.Attribute+ if term.IsDarkBg {+ c = color.FgWhite+ } else {+ c = color.FgBlack+ }+if len(parentProjectIdsWithPaths) > 0 {fmt.Println()+color.New(color.Bold).Println("Plans in parent directories")- fmt.Println("cd into a directory to work on a plan in that directory")+ color.New(c).Println("cd into a directory to work on a plan in that directory")parentTree := treeprint.NewWithRoot("~")for i := len(parentProjectIdsWithPaths) - 1; i >= 0; i-- {@@ -290,7 +294,7 @@ func plans(cmd *cobra.Command, args []string) {if len(childProjectIdsWithPaths) > 0 {fmt.Println()color.New(color.Bold).Println("Plans in child directories")- fmt.Println("cd into a directory to work on a plan in that directory")+ color.New(c).Println("cd into a directory to work on a plan in that directory")childTree := treeprint.New()for _, p := range childProjectIdsWithPaths {rel, err := filepath.Rel(fs.Cwd, p[0])@@ -305,4 +309,11 @@ func plans(cmd *cobra.Command, args []string) {} else {fmt.Println()}++ fmt.Println()+ if len(currentProjectPlanIds) > 0 {+ term.PrintCmds("", "new", "cd", "delete-plan")+ } else {+ term.PrintCmds("", "new")+ }}diff --git a/app/cli/lib/context_conflict.go b/app/cli/lib/context_conflict.goindex f96a2626..004c2a30 100644--- a/app/cli/lib/context_conflict.go+++ b/app/cli/lib/context_conflict.go@@ -25,7 +25,7 @@ func checkContextConflicts(filesByPath map[string]string) (bool, error) {if len(conflictedPaths) > 0 {term.StopSpinner()- color.New(color.Bold, color.FgHiYellow).Println("⚠️ Some updates conflict with pending changes:")+ color.New(color.Bold, term.ColorHiYellow).Println("⚠️ Some updates conflict with pending changes:")for path := range conflictedPaths {fmt.Println("📄 " + path)}diff --git a/app/cli/lib/context_update.go b/app/cli/lib/context_update.goindex 5e44fbb3..fe9029b2 100644--- a/app/cli/lib/context_update.go+++ b/app/cli/lib/context_update.go@@ -80,7 +80,7 @@ func MustCheckOutdatedContext(cancelOpt, quiet bool, maybeContexts []*shared.Conif len(outdatedRes.UpdatedContexts) == 1 {phrase = "has been"}- color.New(color.FgHiCyan, color.Bold).Printf("%s in context %s modified 👇\n\n", msg, phrase)+ color.New(term.ColorHiCyan, color.Bold).Printf("%s in context %s modified 👇\n\n", msg, phrase)tableString := tableForContextOutdated(outdatedRes)fmt.Println(tableString)diff --git a/app/cli/lib/current.go b/app/cli/lib/current.goindex d540ff7d..cff4edac 100644--- a/app/cli/lib/current.go+++ b/app/cli/lib/current.go@@ -44,8 +44,8 @@ func resolveProject(mustResolve, shouldCreate bool) {if (fs.PlandexDir == "" || fs.ProjectRoot == "") && mustResolve {fmt.Printf("🤷♂️ No plans in current directory\nTry %s to create a plan or %s to see plans in nearby directories\n",- color.New(color.Bold, color.FgHiCyan).Sprint("plandex new"),- color.New(color.Bold, color.FgHiCyan).Sprint("plandex plans"))+ color.New(color.Bold, term.ColorHiCyan).Sprint("plandex new"),+ color.New(color.Bold, term.ColorHiCyan).Sprint("plandex plans"))os.Exit(0)}diff --git a/app/cli/stream_tui/view.go b/app/cli/stream_tui/view.goindex c1c821e2..280868f6 100644--- a/app/cli/stream_tui/view.go+++ b/app/cli/stream_tui/view.go@@ -5,6 +5,8 @@ import ("sort""strings"+ "plandex/term"+"github.com/charmbracelet/lipgloss""github.com/fatih/color")@@ -156,7 +158,7 @@ func (m streamUIModel) doRenderBuild(outputStatic bool) string {func (m streamUIModel) renderMissingFilePrompt() string {style := lipgloss.NewStyle().Padding(1).BorderStyle(lipgloss.NormalBorder()).BorderForeground(lipgloss.Color(borderColor)).Width(m.width - 2).Height(m.height - 2)- prompt := "📄 " + color.New(color.Bold, color.FgHiYellow).Sprint(m.missingFilePath) + " isn't in context."+ prompt := "📄 " + color.New(color.Bold, term.ColorHiYellow).Sprint(m.missingFilePath) + " isn't in context."prompt += "\n\n"@@ -169,11 +171,11 @@ func (m streamUIModel) renderMissingFilePrompt() string {prompt += strings.Join(words, " ")- prompt += "\n\n" + color.New(color.FgHiMagenta, color.Bold).Sprintln("🧐 What do you want to do?")+ prompt += "\n\n" + color.New(term.ColorHiMagenta, color.Bold).Sprintln("🧐 What do you want to do?")for i, opt := range missingFileSelectOpts {if i == m.missingFileSelectedIdx {- prompt += color.New(color.FgHiCyan, color.Bold).Sprint(" > " + opt)+ prompt += color.New(term.ColorHiCyan, color.Bold).Sprint(" > " + opt)} else {prompt += " " + opt}diff --git a/app/cli/term/color.go b/app/cli/term/color.gonew file mode 100644index 00000000..2d101e1a--- /dev/null+++ b/app/cli/term/color.go@@ -0,0 +1,34 @@+package term++import (+ "github.com/fatih/color"+ "github.com/muesli/termenv"+)++var IsDarkBg = termenv.HasDarkBackground()++var ColorHiGreen color.Attribute+var ColorHiMagenta color.Attribute+var ColorHiRed color.Attribute+var ColorHiYellow color.Attribute+var ColorHiCyan color.Attribute+var ColorHiBlue color.Attribute++func init() {++ if IsDarkBg {+ ColorHiGreen = color.FgHiGreen+ ColorHiMagenta = color.FgHiMagenta+ ColorHiRed = color.FgHiRed+ ColorHiYellow = color.FgHiYellow+ ColorHiCyan = color.FgHiCyan+ ColorHiBlue = color.FgHiBlue+ } else {+ ColorHiGreen = color.FgGreen+ ColorHiMagenta = color.FgMagenta+ ColorHiRed = color.FgRed+ ColorHiYellow = color.FgYellow+ ColorHiCyan = color.FgCyan+ ColorHiBlue = color.FgBlue+ }+}diff --git a/app/cli/term/errors.go b/app/cli/term/errors.goindex c9552d1e..f0be1c1c 100644--- a/app/cli/term/errors.go+++ b/app/cli/term/errors.go@@ -10,13 +10,13 @@ import ()func OutputNoApiKeyMsgAndExit() {- fmt.Fprintln(os.Stderr, color.New(color.Bold, color.FgHiRed).Sprintln("\n🚨 OPENAI_API_KEY environment variable is not set.")+color.New().Sprintln("\nSet it with:\n\nexport OPENAI_API_KEY=your-api-key\n\nThen try again.\n\n👉 If you don't have an OpenAI account, sign up here → https://platform.openai.com/signup\n\n🔑 Generate an api key here → https://platform.openai.com/api-keys"))+ fmt.Fprintln(os.Stderr, color.New(color.Bold, ColorHiRed).Sprintln("\n🚨 OPENAI_API_KEY environment variable is not set.")+color.New().Sprintln("\nSet it with:\n\nexport OPENAI_API_KEY=your-api-key\n\nThen try again.\n\n👉 If you don't have an OpenAI account, sign up here → https://platform.openai.com/signup\n\n🔑 Generate an api key here → https://platform.openai.com/api-keys"))os.Exit(1)}func OutputSimpleError(msg string, args ...interface{}) {msg = fmt.Sprintf(msg, args...)- fmt.Fprintln(os.Stderr, color.New(color.FgHiRed, color.Bold).Sprint("🚨 "+shared.Capitalize(msg)))+ fmt.Fprintln(os.Stderr, color.New(ColorHiRed, color.Bold).Sprint("🚨 "+shared.Capitalize(msg)))}func OutputErrorAndExit(msg string, args ...interface{}) {@@ -41,16 +41,16 @@ func OutputErrorAndExit(msg string, args ...interface{}) {s := shared.Capitalize(part)if i == 0 {- s = color.New(color.FgHiRed, color.Bold).Sprint("🚨 " + s)+ s = color.New(ColorHiRed, color.Bold).Sprint("🚨 " + s)}displayMsg += s}} else {- displayMsg = color.New(color.FgHiRed, color.Bold).Sprint("🚨 " + msg)+ displayMsg = color.New(ColorHiRed, color.Bold).Sprint("🚨 " + msg)}- fmt.Fprintln(os.Stderr, color.New(color.FgHiRed, color.Bold).Sprint(displayMsg))+ fmt.Fprintln(os.Stderr, color.New(ColorHiRed, color.Bold).Sprint(displayMsg))os.Exit(1)}diff --git a/app/cli/term/help.go b/app/cli/term/help.goindex af96840a..8be8f248 100644--- a/app/cli/term/help.go+++ b/app/cli/term/help.go@@ -43,7 +43,7 @@ var CmdDesc = map[string][2]string{}func PrintCmds(prefix string, cmds ...string) {- printCmds(os.Stderr, prefix, []color.Attribute{color.Bold, color.FgHiWhite, color.BgCyan}, cmds...)+ printCmds(os.Stderr, prefix, []color.Attribute{color.Bold, color.FgHiWhite, color.BgCyan, color.FgHiWhite}, cmds...)}func PrintCmdsWithColors(prefix string, colors []color.Attribute, cmds ...string) {@@ -80,7 +80,7 @@ func printCmds(w io.Writer, prefix string, colors []color.Attribute, cmds ...strfunc PrintCustomCmd(prefix, cmd, alias, desc string) {cmd = strings.Replace(cmd, alias, fmt.Sprintf("(%s)", alias), 1)// desc += color.New(color.FgWhite).Sprintf(" • alias → %s", color.New(color.Bold).Sprint(alias))- styled := color.New(color.Bold, color.FgHiWhite, color.BgCyan).Sprintf(" plandex %s ", cmd)+ styled := color.New(color.Bold, color.FgHiWhite, color.BgCyan, color.FgHiWhite).Sprintf(" plandex %s ", cmd)fmt.Printf("%s%s 👉 %s\n", prefix, styled, desc)}@@ -88,57 +88,57 @@ func PrintCustomCmd(prefix, cmd, alias, desc string) {func PrintCustomHelp() {builder := &strings.Builder{}- color.New(color.Bold, color.BgGreen).Fprintln(builder, " Usage ")+ color.New(color.Bold, color.BgGreen, color.FgHiWhite).Fprintln(builder, " Usage ")color.New(color.Bold).Fprintln(builder, " plandex [command] [flags]")color.New(color.Bold).Fprintln(builder, " pdx [command] [flags]")fmt.Fprintln(builder)- color.New(color.Bold, color.BgGreen).Fprintln(builder, " Help ")+ color.New(color.Bold, color.BgGreen, color.FgHiWhite).Fprintln(builder, " Help ")color.New(color.Bold).Fprintln(builder, " plandex help")color.New(color.Bold).Fprintln(builder, " plandex [command] --help")fmt.Fprintln(builder)- color.New(color.Bold, color.BgMagenta).Fprintln(builder, " Getting Started ")- fmt.Fprintf(builder, " Create a new plan in your project's root directory with %s\n\n", color.New(color.Bold, color.BgCyan).Sprint(" plandex new "))+ color.New(color.Bold, color.BgMagenta, color.FgHiWhite).Fprintln(builder, " Getting Started ")+ fmt.Fprintf(builder, " Create a new plan in your project's root directory with %s\n\n", color.New(color.Bold, color.BgCyan, color.FgHiWhite).Sprint(" plandex new "))- color.New(color.Bold, color.BgMagenta).Fprintln(builder, " Key Commands ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiMagenta}, "new", "load", "tell", "changes", "apply")+ color.New(color.Bold, color.BgMagenta, color.FgHiWhite).Fprintln(builder, " Key Commands ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiMagenta}, "new", "load", "tell", "changes", "apply")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Plans ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "new", "plans", "cd", "current", "delete-plan")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Plans ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "new", "plans", "cd", "current", "delete-plan")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Changes ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "changes", "apply")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Changes ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "changes", "apply")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Context ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "load", "ls", "rm", "update", "clear")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Context ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "load", "ls", "rm", "update", "clear")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Branches ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "branches", "checkout", "delete-branch")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Branches ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "branches", "checkout", "delete-branch")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " History ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "convo", "log", "rewind")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " History ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "convo", "log", "rewind")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Control ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "tell", "continue", "build")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Control ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "tell", "continue", "build")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Streams ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "ps", "connect", "stop")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Streams ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "ps", "connect", "stop")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " AI Models ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "models", "set-model")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " AI Models ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "models", "set-model")fmt.Fprintln(builder)- color.New(color.Bold, color.BgCyan).Fprintln(builder, " Accounts ")- printCmds(builder, " ", []color.Attribute{color.Bold, color.FgHiCyan}, "sign-in")+ color.New(color.Bold, color.BgCyan, color.FgHiWhite).Fprintln(builder, " Accounts ")+ printCmds(builder, " ", []color.Attribute{color.Bold, ColorHiCyan}, "sign-in")fmt.Fprintln(builder)fmt.Print(builder.String())diff --git a/app/cli/term/prompt.go b/app/cli/term/prompt.goindex b728feb7..1d2bbe01 100644--- a/app/cli/term/prompt.go+++ b/app/cli/term/prompt.go@@ -47,8 +47,8 @@ func GetUserKeyInput() (rune, error) {}func ConfirmYesNo(fmtStr string, fmtArgs ...interface{}) (bool, error) {- color.New(color.FgHiMagenta, color.Bold).Printf(fmtStr+" (y)es | (n)o", fmtArgs...)- color.New(color.FgHiMagenta, color.Bold).Print("> ")+ color.New(ColorHiMagenta, color.Bold).Printf(fmtStr+" (y)es | (n)o", fmtArgs...)+ color.New(ColorHiMagenta, color.Bold).Print("> ")char, err := GetUserKeyInput()if err != nil {@@ -62,14 +62,14 @@ func ConfirmYesNo(fmtStr string, fmtArgs ...interface{}) (bool, error) {return false, nil} else {fmt.Println()- color.New(color.FgHiRed, color.Bold).Print("Invalid input.\nEnter 'y' for yes or 'n' for no.\n\n")+ color.New(ColorHiRed, color.Bold).Print("Invalid input.\nEnter 'y' for yes or 'n' for no.\n\n")return ConfirmYesNo(fmtStr, fmtArgs...)}}func ConfirmYesNoCancel(fmtStr string, fmtArgs ...interface{}) (bool, bool, error) {- color.New(color.FgHiMagenta, color.Bold).Printf(fmtStr+" (y)es | (n)o | (c)ancel", fmtArgs...)- color.New(color.FgHiMagenta, color.Bold).Print("> ")+ color.New(ColorHiMagenta, color.Bold).Printf(fmtStr+" (y)es | (n)o | (c)ancel", fmtArgs...)+ color.New(ColorHiMagenta, color.Bold).Print("> ")char, err := GetUserKeyInput()if err != nil {@@ -85,7 +85,7 @@ func ConfirmYesNoCancel(fmtStr string, fmtArgs ...interface{}) (bool, bool, erroreturn false, true, nil} else {fmt.Println()- color.New(color.FgHiRed, color.Bold).Print("Invalid input.\nEnter 'y' for yes, 'n' for no, or 'c' for cancel.\n\n")+ color.New(ColorHiRed, color.Bold).Print("Invalid input.\nEnter 'y' for yes, 'n' for no, or 'c' for cancel.\n\n")return ConfirmYesNoCancel(fmtStr, fmtArgs...)}}diff --git a/app/cli/term/select.go b/app/cli/term/select.goindex 1c75debf..402c48aa 100644--- a/app/cli/term/select.go+++ b/app/cli/term/select.go@@ -11,7 +11,7 @@ import (func SelectFromList(msg string, options []string) (string, error) {var selected stringprompt := &survey.Select{- Message: color.New(color.FgHiMagenta, color.Bold).Sprint(msg),+ Message: color.New(ColorHiMagenta, color.Bold).Sprint(msg),Options: convertToStringSlice(options),FilterMessage: "",}diff --git a/app/cli/upgrade.go b/app/cli/upgrade.goindex 084c33dd..fcc35c71 100644--- a/app/cli/upgrade.go+++ b/app/cli/upgrade.go@@ -62,8 +62,8 @@ func checkForUpgrade() {if latestVersion.GreaterThan(currentVersion) {term.StopSpinner()- fmt.Println("A new version of Plandex is available:", color.New(color.Bold, color.FgHiGreen).Sprint(versionStr))- fmt.Printf("Current version: %s\n", color.New(color.Bold, color.FgHiCyan).Sprint(version.Version))+ fmt.Println("A new version of Plandex is available:", color.New(color.Bold, term.ColorHiGreen).Sprint(versionStr))+ fmt.Printf("Current version: %s\n", color.New(color.Bold, term.ColorHiCyan).Sprint(version.Version))confirmed, err := term.ConfirmYesNo("Upgrade to the latest version?")if err != nil {log.Println("Error reading input:", err)