sunpeak 0.20.36 → 0.20.42

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.
Files changed (33) hide show
  1. package/README.md +4 -2
  2. package/bin/commands/inspect.mjs +225 -34
  3. package/bin/commands/test-init.mjs +4 -0
  4. package/bin/lib/eval/eval-runner.mjs +49 -1
  5. package/bin/lib/eval/eval-types.d.mts +27 -0
  6. package/bin/lib/eval/model-registry.mjs +6 -3
  7. package/dist/chatgpt/index.cjs +1 -1
  8. package/dist/chatgpt/index.js +1 -1
  9. package/dist/claude/index.cjs +1 -1
  10. package/dist/claude/index.js +1 -1
  11. package/dist/embed.css +1 -1
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/inspector/index.cjs +1 -1
  15. package/dist/inspector/index.js +1 -1
  16. package/dist/inspector/inspector.d.ts +7 -0
  17. package/dist/inspector/use-inspector-state.d.ts +28 -0
  18. package/dist/{inspector-CiuT_2yA.js → inspector-C6n8zap3.js} +172 -57
  19. package/dist/{inspector-CiuT_2yA.js.map → inspector-C6n8zap3.js.map} +1 -1
  20. package/dist/{inspector-BNWla95w.cjs → inspector-DOmiG64-.cjs} +172 -57
  21. package/dist/{inspector-BNWla95w.cjs.map → inspector-DOmiG64-.cjs.map} +1 -1
  22. package/dist/style.css +22 -0
  23. package/package.json +1 -1
  24. package/template/dist/albums/albums.html +1 -1
  25. package/template/dist/albums/albums.json +1 -1
  26. package/template/dist/carousel/carousel.html +1 -1
  27. package/template/dist/carousel/carousel.json +1 -1
  28. package/template/dist/map/map.html +1 -1
  29. package/template/dist/map/map.json +1 -1
  30. package/template/dist/review/review.html +1 -1
  31. package/template/dist/review/review.json +1 -1
  32. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-linux.png +0 -0
  33. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-linux.png +0 -0
@@ -6539,6 +6539,9 @@ var VALID_SCREEN_WIDTHS = new Set([
6539
6539
  "tablet",
6540
6540
  "full"
6541
6541
  ]);
6542
+ function isSafeStoredString(value) {
6543
+ return typeof value === "string" && value.length <= 200 && !/[\u0000-\u001f\u007f]/.test(value);
6544
+ }
6542
6545
  function sanitizeStoredPrefs(raw) {
6543
6546
  if (!raw || typeof raw !== "object") return {};
6544
6547
  const obj = raw;
@@ -6546,6 +6549,8 @@ function sanitizeStoredPrefs(raw) {
6546
6549
  if (typeof obj.theme === "string" && VALID_THEMES.has(obj.theme)) prefs.theme = obj.theme;
6547
6550
  if (typeof obj.locale === "string") prefs.locale = obj.locale;
6548
6551
  if (typeof obj.displayMode === "string" && VALID_DISPLAY_MODES.has(obj.displayMode)) prefs.displayMode = obj.displayMode;
6552
+ if (typeof obj.containerHeight === "number" && Number.isFinite(obj.containerHeight)) prefs.containerHeight = obj.containerHeight;
6553
+ if (typeof obj.containerWidth === "number" && Number.isFinite(obj.containerWidth)) prefs.containerWidth = obj.containerWidth;
6549
6554
  if (typeof obj.containerMaxHeight === "number" && Number.isFinite(obj.containerMaxHeight)) prefs.containerMaxHeight = obj.containerMaxHeight;
6550
6555
  if (typeof obj.containerMaxWidth === "number" && Number.isFinite(obj.containerMaxWidth)) prefs.containerMaxWidth = obj.containerMaxWidth;
6551
6556
  if (obj.safeAreaInsets && typeof obj.safeAreaInsets === "object") {
@@ -6564,6 +6569,10 @@ function sanitizeStoredPrefs(raw) {
6564
6569
  if (typeof obj.screenWidth === "string" && VALID_SCREEN_WIDTHS.has(obj.screenWidth)) prefs.screenWidth = obj.screenWidth;
6565
6570
  if (typeof obj.sidebarWidth === "number" && Number.isFinite(obj.sidebarWidth)) prefs.sidebarWidth = Math.max(DEFAULT_SIDEBAR_WIDTH$1, Math.round(obj.sidebarWidth));
6566
6571
  if (typeof obj.rightSidebarWidth === "number" && Number.isFinite(obj.rightSidebarWidth)) prefs.rightSidebarWidth = Math.max(DEFAULT_SIDEBAR_WIDTH$1, Math.round(obj.rightSidebarWidth));
6572
+ if (typeof obj.timeZone === "string") prefs.timeZone = obj.timeZone;
6573
+ if (typeof obj.prodResources === "boolean") prefs.prodResources = obj.prodResources;
6574
+ if (isSafeStoredString(obj.modelProvider)) prefs.modelProvider = obj.modelProvider;
6575
+ if (isSafeStoredString(obj.modelId)) prefs.modelId = obj.modelId;
6567
6576
  return prefs;
6568
6577
  }
6569
6578
  function readStoredPrefs() {
@@ -6576,6 +6585,12 @@ function readStoredPrefs() {
6576
6585
  return {};
6577
6586
  }
6578
6587
  }
6588
+ function writeStoredPrefs(prefs) {
6589
+ if (typeof window === "undefined") return;
6590
+ try {
6591
+ localStorage.setItem(PREFS_KEY, JSON.stringify(prefs));
6592
+ } catch {}
6593
+ }
6579
6594
  function deriveContainerDimensions({ displayMode, containerHeight, containerWidth, containerMaxHeight, containerMaxWidth, measuredContentWidth, viewportHeight = 800, viewportWidth = 1280 }) {
6580
6595
  if (containerHeight != null || containerWidth != null || containerMaxHeight != null || containerMaxWidth != null) return {
6581
6596
  ...containerHeight != null ? { height: containerHeight } : {},
@@ -6624,8 +6639,8 @@ function useInspectorState({ simulations, defaultHost = "chatgpt", preserveToolD
6624
6639
  const [theme, setTheme] = (0, react.useState)(urlParams.theme ?? storedPrefs.theme ?? DEFAULT_THEME);
6625
6640
  const [displayMode, _setDisplayMode] = (0, react.useState)(urlParams.displayMode ?? storedPrefs.displayMode ?? DEFAULT_DISPLAY_MODE);
6626
6641
  const [locale, setLocale] = (0, react.useState)(urlParams.locale ?? storedPrefs.locale ?? "en-US");
6627
- const [containerHeight, setContainerHeight] = (0, react.useState)(void 0);
6628
- const [containerWidth, setContainerWidth] = (0, react.useState)(void 0);
6642
+ const [containerHeight, setContainerHeight] = (0, react.useState)(storedPrefs.containerHeight);
6643
+ const [containerWidth, setContainerWidth] = (0, react.useState)(storedPrefs.containerWidth);
6629
6644
  const [containerMaxHeight, setContainerMaxHeight] = (0, react.useState)(urlParams.containerMaxHeight ?? storedPrefs.containerMaxHeight);
6630
6645
  const [containerMaxWidth, setContainerMaxWidth] = (0, react.useState)(urlParams.containerMaxWidth ?? storedPrefs.containerMaxWidth);
6631
6646
  const [platform, setPlatform] = (0, react.useState)(urlParams.platform ?? storedPrefs.platform ?? DEFAULT_PLATFORM);
@@ -6637,7 +6652,7 @@ function useInspectorState({ simulations, defaultHost = "chatgpt", preserveToolD
6637
6652
  left: 0,
6638
6653
  right: 0
6639
6654
  });
6640
- const [timeZone, setTimeZone] = (0, react.useState)(() => Intl.DateTimeFormat().resolvedOptions().timeZone);
6655
+ const [timeZone, setTimeZone] = (0, react.useState)(() => storedPrefs.timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone);
6641
6656
  const isFirstRender = (0, react.useRef)(true);
6642
6657
  (0, react.useEffect)(() => {
6643
6658
  if (isFirstRender.current) {
@@ -6645,29 +6660,32 @@ function useInspectorState({ simulations, defaultHost = "chatgpt", preserveToolD
6645
6660
  return;
6646
6661
  }
6647
6662
  if (autoRun) return;
6648
- try {
6649
- const prefs = {
6650
- theme,
6651
- locale,
6652
- displayMode,
6653
- containerMaxHeight,
6654
- containerMaxWidth,
6655
- safeAreaInsets,
6656
- activeHost,
6657
- platform,
6658
- hover,
6659
- touch,
6660
- screenWidth,
6661
- sidebarWidth,
6662
- rightSidebarWidth
6663
- };
6664
- localStorage.setItem(PREFS_KEY, JSON.stringify(prefs));
6665
- } catch {}
6663
+ writeStoredPrefs({
6664
+ ...readStoredPrefs(),
6665
+ theme,
6666
+ locale,
6667
+ displayMode,
6668
+ containerHeight,
6669
+ containerWidth,
6670
+ containerMaxHeight,
6671
+ containerMaxWidth,
6672
+ safeAreaInsets,
6673
+ activeHost,
6674
+ platform,
6675
+ hover,
6676
+ touch,
6677
+ screenWidth,
6678
+ sidebarWidth,
6679
+ rightSidebarWidth,
6680
+ timeZone
6681
+ });
6666
6682
  }, [
6667
6683
  autoRun,
6668
6684
  theme,
6669
6685
  locale,
6670
6686
  displayMode,
6687
+ containerHeight,
6688
+ containerWidth,
6671
6689
  containerMaxHeight,
6672
6690
  containerMaxWidth,
6673
6691
  safeAreaInsets,
@@ -6677,7 +6695,8 @@ function useInspectorState({ simulations, defaultHost = "chatgpt", preserveToolD
6677
6695
  touch,
6678
6696
  screenWidth,
6679
6697
  sidebarWidth,
6680
- rightSidebarWidth
6698
+ rightSidebarWidth,
6699
+ timeZone
6681
6700
  ]);
6682
6701
  const [measuredContentWidth, setMeasuredContentWidth] = (0, react.useState)(void 0);
6683
6702
  const handleContentWidthChange = (0, react.useCallback)((width) => {
@@ -7590,12 +7609,16 @@ var DOCS_BASE_URL = "https://sunpeak.ai/docs";
7590
7609
  var DEFAULT_MODEL_PROVIDERS = [{
7591
7610
  id: "openai",
7592
7611
  label: "OpenAI",
7593
- defaultModel: "gpt-4o"
7612
+ defaultModel: "gpt-5.5"
7594
7613
  }, {
7595
7614
  id: "anthropic",
7596
7615
  label: "Anthropic",
7597
- defaultModel: "claude-3-5-sonnet-20241022"
7616
+ defaultModel: "claude-sonnet-4-20250514"
7598
7617
  }];
7618
+ function createModelConversationId() {
7619
+ const random = typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : Math.random().toString(36).slice(2);
7620
+ return `model-chat-${Date.now()}-${random}`;
7621
+ }
7599
7622
  function splitCssArgs(value) {
7600
7623
  const args = [];
7601
7624
  let depth = 0;
@@ -7688,6 +7711,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7688
7711
  autoRun: params.get("autoRun") === "true"
7689
7712
  };
7690
7713
  }, []);
7714
+ const storedPrefs = react.useMemo(() => initUrlParams.autoRun ? {} : readStoredPrefs(), [initUrlParams.autoRun]);
7691
7715
  const [selectedToolName, setSelectedToolName] = react.useState(() => {
7692
7716
  if (initUrlParams.tool && toolMap.has(initUrlParams.tool)) return initUrlParams.tool;
7693
7717
  if (initUrlParams.simulation) {
@@ -7737,7 +7761,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7737
7761
  const [oauthStatus, setOauthStatus] = react.useState("none");
7738
7762
  const [oauthError, setOauthError] = react.useState();
7739
7763
  const connection = useMcpConnection(isEmbedded ? void 0 : mcpServerUrl || void 0, inspectorApiBaseUrl);
7740
- const [prodResources, setProdResources] = react.useState(state.urlProdResources ?? defaultProdResources);
7764
+ const [prodResources, setProdResources] = react.useState(state.urlProdResources ?? storedPrefs.prodResources ?? defaultProdResources);
7741
7765
  const showSidebar = state.urlSidebar !== false;
7742
7766
  const showDevOverlay = state.urlDevOverlay !== false;
7743
7767
  const [isRunning, setIsRunning] = react.useState(false);
@@ -7759,6 +7783,15 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7759
7783
  if (requested && modelProviderOptions.some((provider) => provider.id === requested)) return requested;
7760
7784
  return modelProviderOptions[0]?.id ?? "openai";
7761
7785
  }, [modelChat?.defaultProvider, modelProviderOptions]);
7786
+ const initialModelProvider = react.useMemo(() => {
7787
+ const stored = storedPrefs.modelProvider;
7788
+ if (stored && modelProviderOptions.some((provider) => provider.id === stored)) return stored;
7789
+ return defaultModelProvider;
7790
+ }, [
7791
+ defaultModelProvider,
7792
+ modelProviderOptions,
7793
+ storedPrefs.modelProvider
7794
+ ]);
7762
7795
  const getDefaultModelId = react.useCallback((provider) => {
7763
7796
  const option = modelProviderOptions.find((item) => item.id === provider);
7764
7797
  const candidates = [
@@ -7770,8 +7803,20 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7770
7803
  if (providerModels.length === 0) return candidates.find(Boolean) ?? "";
7771
7804
  return candidates.find((model) => model && providerModels.includes(model)) ?? providerModels[0];
7772
7805
  }, [modelChat?.defaultModel, modelProviderOptions]);
7773
- const [modelProvider, setModelProvider] = react.useState(defaultModelProvider);
7774
- const [modelId, setModelId] = react.useState(() => getDefaultModelId(defaultModelProvider));
7806
+ const getInitialModelId = react.useCallback((provider) => {
7807
+ const stored = storedPrefs.modelId;
7808
+ if (storedPrefs.modelProvider && storedPrefs.modelProvider !== provider) return getDefaultModelId(provider);
7809
+ const providerModels = modelProviderOptions.find((item) => item.id === provider)?.models ?? [];
7810
+ if (stored && (providerModels.length === 0 || providerModels.includes(stored))) return stored;
7811
+ return getDefaultModelId(provider);
7812
+ }, [
7813
+ getDefaultModelId,
7814
+ modelProviderOptions,
7815
+ storedPrefs.modelId,
7816
+ storedPrefs.modelProvider
7817
+ ]);
7818
+ const [modelProvider, setModelProvider] = react.useState(initialModelProvider);
7819
+ const [modelId, setModelId] = react.useState(() => getInitialModelId(initialModelProvider));
7775
7820
  const [apiKeyDraft, setApiKeyDraft] = react.useState("");
7776
7821
  const [keyStatus, setKeyStatus] = react.useState({ hasKey: false });
7777
7822
  const [isKeyStatusLoading, setIsKeyStatusLoading] = react.useState(usesApiKeyUi);
@@ -7780,6 +7825,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7780
7825
  const [chatInput, setChatInput] = react.useState("");
7781
7826
  const [isChatting, setIsChatting] = react.useState(false);
7782
7827
  const [chatStatus, setChatStatus] = react.useState("");
7828
+ const modelConversationIdRef = react.useRef(createModelConversationId());
7783
7829
  const currentModelProvider = react.useMemo(() => modelProviderOptions.find((provider) => provider.id === modelProvider), [modelProvider, modelProviderOptions]);
7784
7830
  const selectedProviderModelOptions = react.useMemo(() => currentModelProvider?.models ?? [], [currentModelProvider?.models]);
7785
7831
  const modelCallableTools = react.useMemo(() => {
@@ -7790,6 +7836,25 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7790
7836
  }
7791
7837
  return Array.from(map.values());
7792
7838
  }, [simulations]);
7839
+ const isFirstInspectorPrefsRender = react.useRef(true);
7840
+ react.useEffect(() => {
7841
+ if (isFirstInspectorPrefsRender.current) {
7842
+ isFirstInspectorPrefsRender.current = false;
7843
+ return;
7844
+ }
7845
+ if (initUrlParams.autoRun) return;
7846
+ writeStoredPrefs({
7847
+ ...readStoredPrefs(),
7848
+ prodResources,
7849
+ modelProvider,
7850
+ modelId
7851
+ });
7852
+ }, [
7853
+ initUrlParams.autoRun,
7854
+ modelId,
7855
+ modelProvider,
7856
+ prodResources
7857
+ ]);
7793
7858
  react.useEffect(() => {
7794
7859
  setServerUrl(mcpServerUrl ?? "");
7795
7860
  }, [mcpServerUrl]);
@@ -7899,6 +7964,13 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
7899
7964
  usesApiKeyUi,
7900
7965
  usesLocalModelEndpoints
7901
7966
  ]);
7967
+ const handleResetModelConversation = react.useCallback(() => {
7968
+ modelConversationIdRef.current = createModelConversationId();
7969
+ setChatMessages([]);
7970
+ setChatInput("");
7971
+ setChatStatus("");
7972
+ setIsChatting(false);
7973
+ }, []);
7902
7974
  react.useEffect(() => {
7903
7975
  state.setSelectedSimulationName(effectiveSimulationName);
7904
7976
  }, [effectiveSimulationName]);
@@ -8159,15 +8231,18 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8159
8231
  state.setToolResultJson("");
8160
8232
  state.setToolResultError("");
8161
8233
  setHasRun(false);
8234
+ const requestConversationId = modelConversationIdRef.current;
8162
8235
  try {
8163
8236
  const messages = nextMessages.map((message) => ({
8164
8237
  role: message.role,
8165
- content: message.content
8166
- }));
8238
+ content: message.content.trim()
8239
+ })).filter((message) => message.content.length > 0);
8167
8240
  let data;
8168
8241
  if (modelChatHandler) data = await modelChatHandler({
8242
+ conversationId: requestConversationId,
8169
8243
  provider: modelProvider,
8170
8244
  modelId,
8245
+ host: state.activeHost,
8171
8246
  messages,
8172
8247
  tools: modelCallableTools,
8173
8248
  appContext: state.modelAppContext ?? void 0
@@ -8178,8 +8253,10 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8178
8253
  method: "POST",
8179
8254
  headers: { "Content-Type": "application/json" },
8180
8255
  body: JSON.stringify({
8256
+ conversationId: requestConversationId,
8181
8257
  provider: modelProvider,
8182
8258
  modelId,
8259
+ host: state.activeHost,
8183
8260
  messages,
8184
8261
  appContext: state.modelAppContext ?? void 0
8185
8262
  })
@@ -8188,6 +8265,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8188
8265
  if (!res.ok || data.error) throw new Error(data.error ?? `Model request failed (${res.status})`);
8189
8266
  }
8190
8267
  if (data.error) throw new Error(data.error);
8268
+ if (requestConversationId !== modelConversationIdRef.current) return;
8191
8269
  let rendersApp = false;
8192
8270
  const toolCalls = data.toolCalls ?? [];
8193
8271
  for (let index = toolCalls.length - 1; index >= 0; index--) {
@@ -8225,6 +8303,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8225
8303
  });
8226
8304
  setChatStatus("");
8227
8305
  } catch (err) {
8306
+ if (requestConversationId !== modelConversationIdRef.current) return;
8228
8307
  const message = err instanceof Error ? err.message : String(err);
8229
8308
  setChatMessages((messages) => [...messages, {
8230
8309
  id: `assistant-error-${Date.now()}`,
@@ -8233,7 +8312,7 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8233
8312
  }]);
8234
8313
  setChatStatus(message);
8235
8314
  } finally {
8236
- setIsChatting(false);
8315
+ if (requestConversationId === modelConversationIdRef.current) setIsChatting(false);
8237
8316
  }
8238
8317
  }, [
8239
8318
  canUseModelChat,
@@ -8847,33 +8926,69 @@ function Inspector({ children, app, simulations: initialSimulationsProp = EMPTY_
8847
8926
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8848
8927
  className: "space-y-1",
8849
8928
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8850
- className: "grid grid-cols-2 gap-2",
8851
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarControl, {
8852
- label: "Provider",
8853
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSelect, {
8854
- value: modelProvider,
8855
- onChange: handleModelProviderChange,
8856
- options: modelProviderOptions.map((provider) => ({
8857
- value: provider.id,
8858
- label: provider.label ?? provider.id
8859
- }))
8860
- })
8861
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarControl, {
8862
- label: "Model",
8863
- children: selectedProviderModelOptions.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSelect, {
8864
- value: modelId,
8865
- onChange: setModelId,
8866
- options: selectedProviderModelOptions.map((model) => ({
8867
- value: model,
8868
- label: model
8869
- }))
8870
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarInput, {
8871
- value: modelId,
8872
- onChange: setModelId,
8873
- applyOnBlur: true,
8874
- placeholder: getDefaultModelId(modelProvider)
8929
+ className: "grid grid-cols-[0.7fr_minmax(0,1fr)_1.75rem] items-end gap-2",
8930
+ children: [
8931
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarControl, {
8932
+ label: "Provider",
8933
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSelect, {
8934
+ value: modelProvider,
8935
+ onChange: handleModelProviderChange,
8936
+ options: modelProviderOptions.map((provider) => ({
8937
+ value: provider.id,
8938
+ label: provider.label ?? provider.id
8939
+ }))
8940
+ })
8941
+ }),
8942
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarControl, {
8943
+ label: "Model",
8944
+ children: selectedProviderModelOptions.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSelect, {
8945
+ value: modelId,
8946
+ onChange: setModelId,
8947
+ options: selectedProviderModelOptions.map((model) => ({
8948
+ value: model,
8949
+ label: model
8950
+ }))
8951
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarInput, {
8952
+ value: modelId,
8953
+ onChange: setModelId,
8954
+ applyOnBlur: true,
8955
+ placeholder: getDefaultModelId(modelProvider)
8956
+ })
8957
+ }),
8958
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8959
+ className: "group relative flex h-7 items-center self-end",
8960
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
8961
+ type: "button",
8962
+ onClick: handleResetModelConversation,
8963
+ disabled: chatMessages.length === 0 && !isChatting && !chatStatus,
8964
+ "aria-label": "Reset model conversation",
8965
+ "aria-describedby": "reset-model-conversation-tooltip",
8966
+ title: "Reset conversation",
8967
+ className: "flex h-7 w-7 cursor-pointer items-center justify-center rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-40",
8968
+ style: {
8969
+ backgroundColor: "var(--color-background-primary)",
8970
+ color: "var(--color-text-primary)"
8971
+ },
8972
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
8973
+ width: "18",
8974
+ height: "18",
8975
+ viewBox: "0 0 24 24",
8976
+ fill: "currentColor",
8977
+ "aria-hidden": "true",
8978
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-8 3.58-8 8s3.58 8 8 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h8V3z" })
8979
+ })
8980
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8981
+ id: "reset-model-conversation-tooltip",
8982
+ role: "tooltip",
8983
+ className: "pointer-events-none absolute right-0 top-full z-[1000] mt-1 hidden whitespace-nowrap rounded px-2 py-1 text-[11px] font-normal leading-tight group-focus-within:block group-hover:block",
8984
+ style: {
8985
+ backgroundColor: "var(--color-text-primary)",
8986
+ color: "var(--color-background-primary)"
8987
+ },
8988
+ children: "Reset conversation"
8989
+ })]
8875
8990
  })
8876
- })]
8991
+ ]
8877
8992
  }), usesApiKeyUi && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SidebarControl, {
8878
8993
  label: "API Key",
8879
8994
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -9404,4 +9519,4 @@ Object.defineProperty(exports, "useThemeContext", {
9404
9519
  }
9405
9520
  });
9406
9521
 
9407
- //# sourceMappingURL=inspector-BNWla95w.cjs.map
9522
+ //# sourceMappingURL=inspector-DOmiG64-.cjs.map