Skip to content

Commit 346df21

Browse files
authored
Merge pull request #98 from openai/add-bryant-ecommerce-app
Add Pizza shop example
2 parents e6392b4 + 7e6a087 commit 346df21

File tree

4 files changed

+1477
-0
lines changed

4 files changed

+1477
-0
lines changed

build-all.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const targets: string[] = [
2121
"pizzaz-carousel",
2222
"pizzaz-list",
2323
"pizzaz-albums",
24+
"pizzaz-shop",
2425
];
2526
const builtNames: string[] = [];
2627

pizzaz_server_node/src/server.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ const widgets: PizzazWidget[] = [
128128
html: readWidgetHtml("pizzaz-list"),
129129
responseText: "Rendered a pizza list!",
130130
},
131+
{
132+
id: "pizza-shop",
133+
title: "Open Pizzaz Shop",
134+
templateUri: "ui://widget/pizza-shop.html",
135+
invoking: "Opening the shop",
136+
invoked: "Shop opened",
137+
html: readWidgetHtml("pizzaz-shop"),
138+
responseText: "Rendered the Pizzaz shop!",
139+
},
131140
];
132141

133142
const widgetsById = new Map<string, PizzazWidget>();

pizzaz_server_python/main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ def _load_widget_html(component_name: str) -> str:
8787
html=_load_widget_html("pizzaz-list"),
8888
response_text="Rendered a pizza list!",
8989
),
90+
PizzazWidget(
91+
identifier="pizza-shop",
92+
title="Open Pizzaz Shop",
93+
template_uri="ui://widget/pizza-shop.html",
94+
invoking="Opening the shop",
95+
invoked="Shop opened",
96+
html=_load_widget_html("pizzaz-shop"),
97+
response_text="Rendered the Pizzaz shop!",
98+
),
9099
]
91100

92101

0 commit comments

Comments
 (0)