Workflow Copilot: backend side of the first version (#4401)

This commit is contained in:
Stanislav Novosad
2026-01-06 14:58:44 -07:00
committed by GitHub
parent 1e314ce149
commit e3dd75d7c1
10 changed files with 1440 additions and 0 deletions

View File

@@ -69,6 +69,8 @@ WORKFLOW_RUN_PREFIX = "wr"
WORKFLOW_SCRIPT_PREFIX = "ws"
WORKFLOW_TEMPLATE_PREFIX = "wt"
ORGANIZATION_BILLING_PREFIX = "ob"
WORKFLOW_COPILOT_CHAT_PREFIX = "wcc"
WORKFLOW_COPILOT_CHAT_MESSAGE_PREFIX = "wccm"
def generate_workflow_id() -> str:
@@ -266,6 +268,16 @@ def generate_billing_id() -> str:
return f"{ORGANIZATION_BILLING_PREFIX}_{int_id}"
def generate_workflow_copilot_chat_id() -> str:
int_id = generate_id()
return f"{WORKFLOW_COPILOT_CHAT_PREFIX}_{int_id}"
def generate_workflow_copilot_chat_message_id() -> str:
int_id = generate_id()
return f"{WORKFLOW_COPILOT_CHAT_MESSAGE_PREFIX}_{int_id}"
############# Helper functions below ##############
def generate_id() -> int:
"""