mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-08-23 16:03:30 +00:00
Dead-code sweep. Functions flagged unreachable by golang.org/x/tools/cmd/deadcode and confirmed unused across pulse, pulse-enterprise, pulse-pro and pulse-mobile by adversarial cross-repo verification. Cross-module reachability was checked explicitly (only pkg/ exported symbols are importable by other modules; internal/ packages and _test.go files are not). go build, go vet and test-compile all pass.
24 lines
531 B
Go
24 lines
531 B
Go
package api
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/rcourtman/pulse-go-rewrite/internal/config"
|
|
)
|
|
|
|
func loadHostedAwareAIConfig(hostedMode bool, billingBaseDir, orgID string, persistence *config.ConfigPersistence) (*config.AIConfig, error) {
|
|
if persistence == nil {
|
|
return nil, fmt.Errorf("Pulse Assistant config persistence unavailable")
|
|
}
|
|
|
|
cfg, err := persistence.LoadAIConfig()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return cfg, nil
|
|
}
|
|
|
|
func hostedModeEnabledFromEnv() bool {
|
|
return os.Getenv("PULSE_HOSTED_MODE") == "true"
|
|
}
|