Changeset 0.37.15 (#227)

This commit is contained in:
2026-03-23 19:58:17 +00:00
parent b7746c3004
commit d005e8a30f
23 changed files with 1764 additions and 170 deletions

View File

@@ -645,6 +645,15 @@ func (s *ChannelStore) CompleteWorkflow(ctx context.Context, channelID string, f
return err
}
func (s *ChannelStore) CancelWorkflow(ctx context.Context, channelID string) error {
_, err := DB.ExecContext(ctx, `
UPDATE channels
SET workflow_status = 'cancelled', ai_mode = 'off', last_activity_at = ?
WHERE id = ? AND type = 'workflow'
`, time.Now().UTC().Format(timeFmt), channelID)
return err
}
func (s *ChannelStore) RejectWorkflowToStage(ctx context.Context, channelID string, stage int) error {
now := time.Now().UTC().Format(timeFmt)
_, err := DB.ExecContext(ctx, `