Project and Repair workspaces; adoption keeps the person's own pane; truncation fix
This commit is contained in:
22
tui/main.go
22
tui/main.go
@@ -19,17 +19,17 @@ import (
|
||||
const defaultAgent = "403de1f7-645c-4d35-bc7e-19b01d77bacc"
|
||||
|
||||
func main() {
|
||||
screen := flag.String("screen", "board", "which screen to run: board, work, tree, reply, new or log")
|
||||
screen := flag.String("screen", "board", "which screen to run: board, work, reply, new, project, repair")
|
||||
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")
|
||||
ascii := flag.Bool("ascii", false, "plain characters instead of Nerd Font icons")
|
||||
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)
|
||||
chooseGlyphs(*ascii)
|
||||
|
||||
client, err := paperclip.New()
|
||||
if err != nil {
|
||||
@@ -54,6 +54,20 @@ func main() {
|
||||
}
|
||||
m = newBoardModel(client, proj, dir)
|
||||
|
||||
case "project":
|
||||
dir := *folder
|
||||
if dir == "" {
|
||||
dir, _ = os.Getwd()
|
||||
}
|
||||
m = newProjectModel(client, dir)
|
||||
|
||||
case "repair":
|
||||
dir := *folder
|
||||
if dir == "" {
|
||||
dir, _ = os.Getwd()
|
||||
}
|
||||
m = newRepairModel(client, dir)
|
||||
|
||||
case "work":
|
||||
dir := *folder
|
||||
if dir == "" {
|
||||
@@ -113,7 +127,7 @@ func main() {
|
||||
m = newReplyModel(client, dir, id)
|
||||
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "unknown screen %q: use tree, reply, new or log\n", *screen)
|
||||
fmt.Fprintf(os.Stderr, "unknown screen %q: use board, work, reply, new, project or repair\n", *screen)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user