Fix Signal messages and replies

This commit is contained in:
2026-03-03 15:51:58 +00:00
parent 56c620473f
commit d6bd56dace
31 changed files with 3317 additions and 668 deletions

View File

@@ -1725,6 +1725,45 @@ class CommandChannelBinding(models.Model):
]
class CommandVariantPolicy(models.Model):
GENERATION_MODE_CHOICES = (
("ai", "AI"),
("verbatim", "Verbatim"),
)
profile = models.ForeignKey(
CommandProfile,
on_delete=models.CASCADE,
related_name="variant_policies",
)
variant_key = models.CharField(max_length=64, default="default")
enabled = models.BooleanField(default=True)
generation_mode = models.CharField(
max_length=32,
choices=GENERATION_MODE_CHOICES,
default="verbatim",
)
send_plan_to_egress = models.BooleanField(default=True)
send_status_to_source = models.BooleanField(default=True)
send_status_to_egress = models.BooleanField(default=False)
store_document = models.BooleanField(default=True)
position = models.PositiveIntegerField(default=0)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
ordering = ["position", "id"]
constraints = [
models.UniqueConstraint(
fields=["profile", "variant_key"],
name="unique_command_variant_policy_per_profile",
)
]
indexes = [
models.Index(fields=["profile", "enabled", "variant_key"]),
]
class CommandAction(models.Model):
ACTION_CHOICES = (
("extract_bp", "Extract Business Plan"),