Enha: move flag parse into init

This commit is contained in:
Grail Finder
2026-04-09 10:24:27 +03:00
parent ef67cbb456
commit 0bc6a09786
2 changed files with 8 additions and 7 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"bufio"
"flag"
"fmt"
"gf-lt/models"
"gf-lt/pngmeta"
@@ -37,12 +36,6 @@ var (
)
func main() {
flag.BoolVar(&cfg.CLIMode, "cli", false, "Run in CLI mode without TUI")
flag.BoolVar(&cfg.ToolUse, "tools", true, "run with tools")
flag.StringVar(&cliCardPath, "card", "", "Path to syscard JSON file")
flag.BoolVar(&cliContinue, "continue", false, "Continue from last chat (by agent or card)")
flag.StringVar(&cliMsg, "msg", "", "Send message and exit (one-shot mode)")
flag.Parse()
if cfg.CLIMode {
runCLIMode()
return