@@ -20,7 +20,6 @@ import (
2020 "github.com/spf13/cobra"
2121)
2222
23- // gwsServices lists the Google Workspace services available via gws.
2423var gwsServices = []string {"calendar" , "drive" , "docs" , "sheets" , "tasks" , "people" }
2524
2625var setupCmd = & cobra.Command {
@@ -33,7 +32,6 @@ var setupCmd = &cobra.Command{
3332
3433 fmt .Print ("\n Welcome to OpenBotKit setup!\n \n " )
3534
36- // Step 1: Source selection.
3735 var sources []string
3836 sourceOptions := []huh.Option [string ]{
3937 huh .NewOption ("LLM Models (for obk chat)" , "models" ),
@@ -113,7 +111,6 @@ var setupCmd = &cobra.Command{
113111 return fmt .Errorf ("save config: %w" , err )
114112 }
115113
116- // Install skills based on current auth state.
117114 fmt .Println ("\n -- Installing skills --" )
118115 result , err := skills .Install (cfg )
119116 if err != nil {
@@ -151,7 +148,6 @@ func setupGoogle(cfg *config.Config) error {
151148 return fmt .Errorf ("create provider dir: %w" , err )
152149 }
153150
154- // Credentials path.
155151 defaultCredPath := cfg .GoogleCredentialsFile ()
156152 var credPath string
157153
@@ -177,7 +173,6 @@ func setupGoogle(cfg *config.Config) error {
177173 return fmt .Errorf ("credentials file not found: %s" , credPath )
178174 }
179175
180- // Save to config.
181176 if cfg .Providers == nil {
182177 cfg .Providers = & config.ProvidersConfig {}
183178 }
@@ -186,7 +181,6 @@ func setupGoogle(cfg *config.Config) error {
186181 }
187182 cfg .Providers .Google .CredentialsFile = credPath
188183
189- // Scope selection.
190184 var scopes []string
191185 err = huh .NewForm (
192186 huh .NewGroup (
@@ -207,7 +201,6 @@ func setupGoogle(cfg *config.Config) error {
207201 scopes = []string {"https://www.googleapis.com/auth/gmail.readonly" }
208202 }
209203
210- // OAuth flow.
211204 gp := google .New (google.Config {
212205 CredentialsFile : credPath ,
213206 TokenDBPath : cfg .GoogleTokenDBPath (),
@@ -221,7 +214,6 @@ func setupGoogle(cfg *config.Config) error {
221214
222215 fmt .Printf ("\n Authenticated as %s\n " , email )
223216
224- // Sync window.
225217 var syncDays string
226218 err = huh .NewForm (
227219 huh .NewGroup (
@@ -247,7 +239,6 @@ func setupGWS(cfg *config.Config, services []string) error {
247239 fmt .Printf ("\n -- Google Workspace Setup (%s) --\n " , strings .Join (services , ", " ))
248240 fmt .Println (" These services are powered by gws (Google Workspace CLI)." )
249241
250- // Check for gws binary.
251242 gwsPath , err := exec .LookPath ("gws" )
252243 if err != nil {
253244 fmt .Println ("\n Checking for gws... not found." )
@@ -273,7 +264,6 @@ func setupGWS(cfg *config.Config, services []string) error {
273264 fmt .Printf (" gws found at %s\n " , gwsPath )
274265 }
275266
276- // Share credentials with gws.
277267 credPath := cfg .GoogleCredentialsFile ()
278268 home , err := os .UserHomeDir ()
279269 if err != nil {
@@ -295,7 +285,6 @@ func setupGWS(cfg *config.Config, services []string) error {
295285 }
296286 fmt .Printf (" Shared credentials with gws (%s)\n " , gwsCredPath )
297287
298- // Run gws auth login.
299288 scopeArg := strings .Join (services , "," )
300289 fmt .Println ("\n Opening browser for Google Workspace access..." )
301290 authCmd := exec .Command (gwsPath , "auth" , "login" , "--scopes" , scopeArg )
@@ -307,7 +296,6 @@ func setupGWS(cfg *config.Config, services []string) error {
307296 }
308297 fmt .Println (" Google Workspace authenticated." )
309298
310- // Save to config.
311299 if cfg .Integrations == nil {
312300 cfg .Integrations = & config.IntegrationsConfig {}
313301 }
@@ -316,7 +304,6 @@ func setupGWS(cfg *config.Config, services []string) error {
316304 }
317305 cfg .Integrations .GWS .Enabled = true
318306
319- // Merge with existing services.
320307 existing := make (map [string ]bool )
321308 for _ , s := range cfg .Integrations .GWS .Services {
322309 existing [s ] = true
@@ -369,7 +356,6 @@ func isGWSService(s string) bool {
369356 return false
370357}
371358
372- // cleanPath handles drag-and-drop paths that may have quotes and whitespace.
373359func cleanPath (s string ) string {
374360 s = strings .TrimSpace (s )
375361 s = strings .Trim (s , "'\" " )
0 commit comments