Conversation and Author screens styled to match; glyph policy chosen from measurement
This commit is contained in:
20
tui/main.go
20
tui/main.go
@@ -22,12 +22,14 @@ func main() {
|
||||
screen := flag.String("screen", "board", "which screen to run: board, work, tree, reply, new or log")
|
||||
folder := flag.String("folder", "", "project folder, for the board screen (defaults to the current directory)")
|
||||
light := flag.String("theme", "", "colour variant: dark, light, or empty to follow the terminal")
|
||||
nerd := flag.Bool("nerd", false, "use Nerd Font icons instead of plain characters")
|
||||
agent := flag.String("agent", defaultAgent, "agent id to assign to, default Builder")
|
||||
project := flag.String("project", "", "project id or url key, for the tree screen")
|
||||
issue := flag.String("issue", "", "task id or identifier such as AUD-160, for the reply screen")
|
||||
dump := flag.Bool("dump", false, "print the tree as plain text and exit (no full-screen interface)")
|
||||
flag.Parse()
|
||||
choosePalette(*light)
|
||||
chooseGlyphs(*nerd)
|
||||
|
||||
client, err := paperclip.New()
|
||||
if err != nil {
|
||||
@@ -95,12 +97,20 @@ func main() {
|
||||
m = newLogModel(client, task.ID)
|
||||
|
||||
case "reply":
|
||||
task, err := resolveIssue(client, *issue)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
dir := *folder
|
||||
if dir == "" {
|
||||
dir, _ = os.Getwd()
|
||||
}
|
||||
m = newReplyModel(client, task.ID)
|
||||
id := *issue
|
||||
if id != "" {
|
||||
task, err := resolveIssue(client, id)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
id = task.ID
|
||||
}
|
||||
m = newReplyModel(client, dir, id)
|
||||
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "unknown screen %q: use tree, reply, new or log\n", *screen)
|
||||
|
||||
Reference in New Issue
Block a user