feat(questions): make brand questions the primary monitoring & template axis
- add /questions/combination-fill endpoint with AI-driven, IP-region-aware matrix fill - extract ip2region resolver from ops/app into shared/ipregion for cross-service use - thread question_id filter through dashboard composite, citation summary, and collect-now - switch template wizard from keyword inputs to brand-question selection (primary + supplemental) - pass brand_question and supplemental_questions through assist/title/outline prompts - add AiWaitingModal + 45s client timeout and request_timeout error mapping for long AI flows Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ type Config struct {
|
||||
MonitoringDispatch MonitoringDispatchConfig `mapstructure:"monitoring_dispatch"`
|
||||
Membership MembershipConfig `mapstructure:"membership"`
|
||||
BrandLibrary BrandLibraryConfig `mapstructure:"brand_library"`
|
||||
IPRegion IPRegionConfig `mapstructure:"ip_region"`
|
||||
Redis RedisConfig `mapstructure:"redis"`
|
||||
Qdrant QdrantConfig `mapstructure:"qdrant"`
|
||||
ObjectStorage ObjectStorageConfig `mapstructure:"object_storage"`
|
||||
@@ -244,6 +245,11 @@ type BrandLibraryConfig struct {
|
||||
QuestionLimitsByPlan map[string]int `mapstructure:"question_limits_by_plan"`
|
||||
}
|
||||
|
||||
type IPRegionConfig struct {
|
||||
V4XDBPath string `mapstructure:"v4_xdb_path"`
|
||||
V6XDBPath string `mapstructure:"v6_xdb_path"`
|
||||
}
|
||||
|
||||
func (c BrandLibraryConfig) BrandLimitForPlan(planCode string) int {
|
||||
if strings.EqualFold(strings.TrimSpace(planCode), "free") {
|
||||
return c.FreeBrandLimit
|
||||
@@ -958,6 +964,12 @@ func applyEnvOverrides(cfg *Config) {
|
||||
if trustedProxies, ok := lookupNonEmptyEnv("SERVER_TRUSTED_PROXIES"); ok {
|
||||
cfg.Server.TrustedProxies = strings.Split(trustedProxies, ",")
|
||||
}
|
||||
if path, ok := lookupNonEmptyEnv("IP_REGION_V4_XDB_PATH"); ok {
|
||||
cfg.IPRegion.V4XDBPath = path
|
||||
}
|
||||
if path, ok := lookupNonEmptyEnv("IP_REGION_V6_XDB_PATH"); ok {
|
||||
cfg.IPRegion.V6XDBPath = path
|
||||
}
|
||||
}
|
||||
|
||||
func normalizeRabbitMQConfig(cfg *RabbitMQConfig) {
|
||||
|
||||
@@ -65,6 +65,9 @@ func Diff(previous, current *Config) []FieldChange {
|
||||
if !reflect.DeepEqual(previous.BrandLibrary, current.BrandLibrary) {
|
||||
addChange("brand_library", true)
|
||||
}
|
||||
if previous.IPRegion != current.IPRegion {
|
||||
addChange("ip_region", false)
|
||||
}
|
||||
if previous.Qdrant != current.Qdrant {
|
||||
addChange("qdrant", true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user