-
Notifications
You must be signed in to change notification settings - Fork 65
[13.3] Document command return values #682
Copy link
Copy link
Open
Description
Commands can now return a value. e.g.
.WithCommand(
name: "migrate-database",
displayName: "Migrate Database",
executeCommand: (c) =>
{
var markdown = """
# ⚙️ Database Migration Summary
| Table | Result |
|------------|----------------------------|
| Customers | ✅ 1,200 rows |
| Products | ✅ 850 rows |
| Orders | ✅ 3,400 rows |
| OrderItems | ✅ 8,750 rows |
| Categories | ✅ 45 rows |
| Reviews | ❌ FK constraint violation |
| Inventory | ✅ 850 rows |
| Shipping | ✅ 3,400 rows |
| Payments | ❌ Timeout after 30s |
| Coupons | ✅ 120 rows |
**Summary:** 8 of 10 tables migrated successfully. 2 tables failed.
""";
return Task.FromResult(CommandResults.Success("Database migrated.", new CommandResultData { Value = markdown, Format = CommandResultFormat.Markdown }));
},
commandOptions: new() { IconName = "CloudDatabase", Description = "Migrate the database with sample store data" });Needs to be documented.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels