9
9
"github.com/gptscript-ai/gptscript/pkg/config"
10
10
gcontext "github.com/gptscript-ai/gptscript/pkg/context"
11
11
"github.com/gptscript-ai/gptscript/pkg/credentials"
12
- "github.com/gptscript-ai/gptscript/pkg/repos/runtimes"
13
12
)
14
13
15
14
func (s * server ) initializeCredentialStore (ctx context.Context , credCtx string ) (credentials.CredentialStore , error ) {
@@ -18,16 +17,14 @@ func (s *server) initializeCredentialStore(ctx context.Context, credCtx string)
18
17
return nil , fmt .Errorf ("failed to read CLI config: %w" , err )
19
18
}
20
19
21
- // TODO - are we sure we want to always use runtimes.Default here?
22
- runtimeManager := runtimes .Default (s .gptscriptOpts .Cache .CacheDir )
23
- if err := runtimeManager .SetUpCredentialHelpers (ctx , cfg ); err != nil {
20
+ if err := s .runtimeManager .SetUpCredentialHelpers (ctx , cfg ); err != nil {
24
21
return nil , fmt .Errorf ("failed to set up credential helpers: %w" , err )
25
22
}
26
- if err := runtimeManager .EnsureCredentialHelpers (ctx ); err != nil {
23
+ if err := s . runtimeManager .EnsureCredentialHelpers (ctx ); err != nil {
27
24
return nil , fmt .Errorf ("failed to ensure credential helpers: %w" , err )
28
25
}
29
26
30
- store , err := credentials .NewStore (cfg , runtimeManager , credCtx , s .gptscriptOpts .Cache .CacheDir )
27
+ store , err := credentials .NewStore (cfg , s . runtimeManager , credCtx , s .gptscriptOpts .Cache .CacheDir )
31
28
if err != nil {
32
29
return nil , fmt .Errorf ("failed to initialize credential store: %w" , err )
33
30
}
0 commit comments