Implement plans

This commit is contained in:
2026-03-04 02:19:22 +00:00
parent 34ee49410d
commit 0718a06c19
31 changed files with 3987 additions and 181 deletions

View File

@@ -8,19 +8,19 @@ BP_VARIANT_KEYS = ("bp", "bp_set", "bp_set_range")
BP_VARIANT_META = {
"bp": {
"name": "bp",
"trigger_token": "#bp#",
"trigger_token": ".bp",
"template_supported": True,
"position": 0,
},
"bp_set": {
"name": "bp set",
"trigger_token": "#bp set#",
"trigger_token": ".bp set",
"template_supported": False,
"position": 1,
},
"bp_set_range": {
"name": "bp set range",
"trigger_token": "#bp set range#",
"trigger_token": ".bp set range",
"template_supported": False,
"position": 2,
},
@@ -63,6 +63,9 @@ def ensure_variant_policies_for_profile(
result: dict[str, CommandVariantPolicy] = {}
if str(profile.slug or "").strip() == "bp":
# Keep source-chat status visible for BP to avoid "silent success" confusion.
if str(profile.visibility_mode or "").strip() == "status_in_source":
CommandVariantPolicy.objects.filter(profile=profile).update(send_status_to_source=True)
for key in BP_VARIANT_KEYS:
meta = BP_VARIANT_META.get(key, {})
defaults = _bp_defaults(profile, key, post_result_enabled)