sunpeak 0.7.11 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/bin/commands/deploy.mjs +18 -8
- package/bin/commands/login.mjs +73 -55
- package/bin/commands/logout.mjs +26 -12
- package/bin/commands/pull.mjs +60 -39
- package/bin/commands/push.mjs +73 -49
- package/bin/commands/upgrade.mjs +203 -0
- package/bin/sunpeak.js +62 -31
- package/dist/chatgpt/chatgpt-simulator.d.ts +2 -1
- package/dist/index.cjs +9 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +41 -9
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +42 -10
- package/dist/mcp/entry.js.map +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{server-CziiHU7V.cjs → server-B9YgCQdS.cjs} +3 -2
- package/dist/{server-CziiHU7V.cjs.map → server-B9YgCQdS.cjs.map} +1 -1
- package/dist/{server-D8kyzuiq.js → server-DVmTC-SF.js} +3 -2
- package/dist/{server-D8kyzuiq.js.map → server-DVmTC-SF.js.map} +1 -1
- package/dist/types/simulation.d.ts +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +78 -15
- package/template/.sunpeak/vite-env.d.ts +1 -0
- package/template/README.md +6 -6
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/counter.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +16 -16
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +32 -32
- package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js → chunk-SPYXUHEY.js} +8 -8
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/map/map-view.test.tsx +1 -1
- package/template/src/components/map/map-view.tsx +1 -1
- package/template/src/components/map/map.tsx +1 -1
- package/template/src/components/map/place-card.test.tsx +1 -1
- package/template/src/components/map/place-card.tsx +1 -1
- package/template/src/components/map/place-carousel.test.tsx +1 -1
- package/template/src/components/map/place-carousel.tsx +1 -1
- package/template/src/components/map/place-inspector.test.tsx +1 -1
- package/template/src/components/map/place-inspector.tsx +1 -1
- package/template/src/components/map/place-list.test.tsx +1 -1
- package/template/src/components/map/place-list.tsx +1 -1
- package/template/src/components/map/types.ts +18 -0
- package/template/src/resources/index.ts +39 -4
- package/template/src/simulations/albums-show-simulation.json +131 -0
- package/template/src/simulations/carousel-show-simulation.json +68 -0
- package/template/src/simulations/counter-show-simulation.json +20 -0
- package/template/src/simulations/index.ts +17 -12
- package/template/src/simulations/map-show-simulation.json +123 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tsconfig.json +1 -1
- package/template/src/simulations/albums-simulation.ts +0 -147
- package/template/src/simulations/carousel-simulation.ts +0 -84
- package/template/src/simulations/counter-simulation.ts +0 -34
- package/template/src/simulations/map-simulation.ts +0 -154
- /package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js.map → chunk-SPYXUHEY.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -7928,11 +7928,8 @@ function ChatGPTSimulator({
|
|
|
7928
7928
|
}) {
|
|
7929
7929
|
const [screenWidth, setScreenWidth] = React.useState("full");
|
|
7930
7930
|
const isMobileWidth = (width) => width === "mobile-s" || width === "mobile-l";
|
|
7931
|
-
const
|
|
7932
|
-
const
|
|
7933
|
-
simulations.length > 0 ? getSimulationKey(simulations[0]) : ""
|
|
7934
|
-
);
|
|
7935
|
-
const selectedSim = simulations.find((sim) => getSimulationKey(sim) === selectedKey);
|
|
7931
|
+
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
7932
|
+
const selectedSim = simulations[selectedIndex];
|
|
7936
7933
|
const userMessage = selectedSim == null ? void 0 : selectedSim.userMessage;
|
|
7937
7934
|
const mock = useMemo(
|
|
7938
7935
|
() => initMockOpenAI({
|
|
@@ -7964,7 +7961,7 @@ function ChatGPTSimulator({
|
|
|
7964
7961
|
mock.widgetState = ((_j = selectedSim.simulationGlobals) == null ? void 0 : _j.widgetState) ?? null;
|
|
7965
7962
|
mock.toolOutput = ((_k = selectedSim.toolCall) == null ? void 0 : _k.structuredContent) ?? null;
|
|
7966
7963
|
}
|
|
7967
|
-
}, [
|
|
7964
|
+
}, [selectedIndex, selectedSim, mock]);
|
|
7968
7965
|
const theme = useTheme() ?? DEFAULT_THEME;
|
|
7969
7966
|
const displayMode = useDisplayMode() ?? DEFAULT_DISPLAY_MODE;
|
|
7970
7967
|
const locale = useLocale() ?? "en-US";
|
|
@@ -8054,7 +8051,7 @@ function ChatGPTSimulator({
|
|
|
8054
8051
|
setViewParamsError("");
|
|
8055
8052
|
}
|
|
8056
8053
|
}, [
|
|
8057
|
-
|
|
8054
|
+
selectedIndex,
|
|
8058
8055
|
toolInput,
|
|
8059
8056
|
toolOutput,
|
|
8060
8057
|
toolResponseMetadata,
|
|
@@ -8093,13 +8090,13 @@ function ChatGPTSimulator({
|
|
|
8093
8090
|
simulations.length > 0 && /* @__PURE__ */ jsx(SidebarControl, { label: "Simulation", children: /* @__PURE__ */ jsx(
|
|
8094
8091
|
SidebarSelect,
|
|
8095
8092
|
{
|
|
8096
|
-
value:
|
|
8097
|
-
onChange: (value) =>
|
|
8098
|
-
options: simulations.map((sim) => {
|
|
8093
|
+
value: String(selectedIndex),
|
|
8094
|
+
onChange: (value) => setSelectedIndex(Number(value)),
|
|
8095
|
+
options: simulations.map((sim, index2) => {
|
|
8099
8096
|
const resourceTitle = sim.resource.title || sim.resource.name;
|
|
8100
8097
|
const toolTitle = sim.tool.title || sim.tool.name;
|
|
8101
8098
|
return {
|
|
8102
|
-
value:
|
|
8099
|
+
value: String(index2),
|
|
8103
8100
|
label: `${resourceTitle}: ${toolTitle}`
|
|
8104
8101
|
};
|
|
8105
8102
|
})
|
|
@@ -8420,7 +8417,7 @@ function ChatGPTSimulator({
|
|
|
8420
8417
|
resourceMeta: selectedSim == null ? void 0 : selectedSim.resource._meta,
|
|
8421
8418
|
children: content
|
|
8422
8419
|
},
|
|
8423
|
-
|
|
8420
|
+
selectedIndex
|
|
8424
8421
|
)
|
|
8425
8422
|
}
|
|
8426
8423
|
) });
|