feat: add scoped multimodal image attachments
This commit is contained in:
@@ -83,6 +83,8 @@ pub struct FeatureConfigPartial {
|
||||
#[serde(default)]
|
||||
pub web: Option<FeatureFlagConfigPartial>,
|
||||
#[serde(default)]
|
||||
pub image: Option<FeatureFlagConfigPartial>,
|
||||
#[serde(default)]
|
||||
pub sub_worker: Option<FeatureFlagConfigPartial>,
|
||||
#[serde(default)]
|
||||
pub flow: Option<FeatureFlagConfigPartial>,
|
||||
@@ -104,6 +106,7 @@ impl FeatureConfigPartial {
|
||||
task: merge_option(self.task, other.task, FeatureFlagConfigPartial::merge),
|
||||
memory: merge_option(self.memory, other.memory, MemoryFeatureConfigPartial::merge),
|
||||
web: merge_option(self.web, other.web, FeatureFlagConfigPartial::merge),
|
||||
image: merge_option(self.image, other.image, FeatureFlagConfigPartial::merge),
|
||||
sub_worker: merge_option(
|
||||
self.sub_worker,
|
||||
other.sub_worker,
|
||||
@@ -189,6 +192,7 @@ impl From<FeatureConfigPartial> for FeatureConfig {
|
||||
.map(MemoryFeatureConfig::from)
|
||||
.unwrap_or_default(),
|
||||
web: value.web.map(FeatureFlagConfig::from).unwrap_or_default(),
|
||||
image: value.image.map(FeatureFlagConfig::from).unwrap_or_default(),
|
||||
sub_worker: value
|
||||
.sub_worker
|
||||
.map(FeatureFlagConfig::from)
|
||||
@@ -282,6 +286,7 @@ impl From<FeatureConfig> for FeatureConfigPartial {
|
||||
task: Some(value.task.into()),
|
||||
memory: Some(value.memory.into()),
|
||||
web: Some(value.web.into()),
|
||||
image: Some(value.image.into()),
|
||||
sub_worker: Some(value.sub_worker.into()),
|
||||
flow: Some(value.flow.into()),
|
||||
worker: Some(value.worker.into()),
|
||||
|
||||
@@ -111,6 +111,8 @@ pub struct FeatureConfig {
|
||||
#[serde(default)]
|
||||
pub web: FeatureFlagConfig,
|
||||
#[serde(default)]
|
||||
pub image: FeatureFlagConfig,
|
||||
#[serde(default)]
|
||||
pub sub_worker: FeatureFlagConfig,
|
||||
#[serde(default)]
|
||||
pub flow: FeatureFlagConfig,
|
||||
@@ -132,6 +134,7 @@ impl Default for FeatureConfig {
|
||||
task: FeatureFlagConfig::disabled(),
|
||||
memory: MemoryFeatureConfig::disabled(),
|
||||
web: FeatureFlagConfig::disabled(),
|
||||
image: FeatureFlagConfig::disabled(),
|
||||
sub_worker: FeatureFlagConfig::disabled(),
|
||||
flow: FeatureFlagConfig::disabled(),
|
||||
worker: FeatureFlagConfig::disabled(),
|
||||
|
||||
@@ -962,6 +962,7 @@ fn builtin_base_profile_artifact() -> serde_json::Value {
|
||||
"task": { "enabled": true },
|
||||
"memory": { "enabled": true },
|
||||
"web": { "enabled": true },
|
||||
"image": { "enabled": true },
|
||||
"sub_worker": { "enabled": true },
|
||||
"worker": { "enabled": false },
|
||||
"objective": { "enabled": true },
|
||||
@@ -998,6 +999,7 @@ fn apply_role_profile(
|
||||
value["feature"]["task"] = serde_json::json!({ "enabled": task });
|
||||
value["feature"]["memory"] = serde_json::json!({ "enabled": memory });
|
||||
value["feature"]["web"] = serde_json::json!({ "enabled": web });
|
||||
value["feature"]["image"] = serde_json::json!({ "enabled": true });
|
||||
value["feature"]["sub_worker"] = serde_json::json!({ "enabled": sub_worker });
|
||||
value["feature"]["flow"] = serde_json::json!({ "enabled": slug == "coder" });
|
||||
value["feature"]["worker"] =
|
||||
|
||||
Reference in New Issue
Block a user