diff --git a/cmd/gemini/main.go b/cmd/gemini/main.go index 064c815..3c66ea2 100644 --- a/cmd/gemini/main.go +++ b/cmd/gemini/main.go @@ -5,14 +5,14 @@ import ( "os" "os/user" - "github.com/reugn/gemini-cli/cli" "github.com/reugn/gemini-cli/gemini" + "github.com/reugn/gemini-cli/internal/cli" "github.com/spf13/cobra" ) const ( version = "0.3.0" - apiKeyEnv = "GEMINI_API_KEY" + apiKeyEnv = "GEMINI_API_KEY" //nolint:gosec ) func run() int { @@ -34,14 +34,14 @@ func run() int { if err != nil { return err } + chat, err := cli.NewChat(getCurrentUser(), chatSession, &opts) if err != nil { return err } chat.StartChat() - chatSession.Close() - return nil + return chatSession.Close() } err := rootCmd.Execute() diff --git a/cli/chat.go b/internal/cli/chat.go similarity index 100% rename from cli/chat.go rename to internal/cli/chat.go diff --git a/cli/color/color.go b/internal/cli/color/color.go similarity index 100% rename from cli/color/color.go rename to internal/cli/color/color.go diff --git a/cli/command.go b/internal/cli/command.go similarity index 98% rename from cli/command.go rename to internal/cli/command.go index 1432a82..0ef135e 100644 --- a/cli/command.go +++ b/internal/cli/command.go @@ -9,7 +9,7 @@ import ( "time" "github.com/charmbracelet/glamour" - "github.com/reugn/gemini-cli/cli/color" + "github.com/reugn/gemini-cli/internal/cli/color" "google.golang.org/api/iterator" ) diff --git a/cli/prompt.go b/internal/cli/prompt.go similarity index 96% rename from cli/prompt.go rename to internal/cli/prompt.go index 6b3cb90..5217c69 100644 --- a/cli/prompt.go +++ b/internal/cli/prompt.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/muesli/termenv" - "github.com/reugn/gemini-cli/cli/color" + "github.com/reugn/gemini-cli/internal/cli/color" ) const ( diff --git a/cli/spinner.go b/internal/cli/spinner.go similarity index 100% rename from cli/spinner.go rename to internal/cli/spinner.go