MCPcopy Create free account
hub / github.com/diillson/chatcli / applyStackSpotFlags

Function applyStackSpotFlags

main.go:61–73  ·  view source on GitHub ↗

applyStackSpotFlags applies StackSpot realm/agent overrides when the target provider is StackSpot.

(llmManager manager.LLMManager, targetProvider string, opts *cli.Options, logger *zap.Logger)

Source from the content-addressed store, hash-verified

59// applyStackSpotFlags applies StackSpot realm/agent overrides when the target
60// provider is StackSpot.
61func applyStackSpotFlags(llmManager manager.LLMManager, targetProvider string, opts *cli.Options, logger *zap.Logger) {
62 if strings.ToUpper(targetProvider) != "STACKSPOT" {
63 return
64 }
65 if opts.Realm != "" {
66 llmManager.SetStackSpotRealm(opts.Realm)
67 logger.Info("Realm/Tenant do StackSpot sobrescrito via flag", zap.String("realm", opts.Realm))
68 }
69 if opts.AgentID != "" {
70 llmManager.SetStackSpotAgentID(opts.AgentID)
71 logger.Info("Agent ID do StackSpot sobrescrito via flag", zap.String("agent-id", opts.AgentID))
72 }
73}
74
75// installSignalHandlers wires process signals to the correct cancellation
76// scope. It is the SINGLE handler for SIGINT and SIGTERM — having two

Callers 1

mainFunction · 0.85

Calls 4

SetStackSpotRealmMethod · 0.65
InfoMethod · 0.65
SetStackSpotAgentIDMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected