@frankieai/react 0.2.3 → 0.2.5

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/dist/index.cjs CHANGED
@@ -66,7 +66,7 @@ module.exports = __toCommonJS(index_exports);
66
66
  var import_react2 = require("react");
67
67
 
68
68
  // src/lib/client.ts
69
- var FRANKIE_CLOUD_URL = "https://frankie-data-v2-665333762719.us-central1.run.app";
69
+ var FRANKIE_CLOUD_URL = "https://frankie-control-665333762719.us-central1.run.app";
70
70
  var FrankieApiError = class extends Error {
71
71
  constructor(message, status, code) {
72
72
  super(message);
@@ -408,8 +408,11 @@ function useFrankieChatState() {
408
408
  messagesRef.current = restoredMessages;
409
409
  setMessages(restoredMessages);
410
410
  }
411
- } catch {
412
- if (active) setError("Could not restore this conversation. Check your sign-in and connection, then try opening it again.");
411
+ } catch (caught) {
412
+ if (active) {
413
+ const message = caught instanceof FrankieApiError ? caught.message : caught instanceof Error && caught.message.startsWith("Frankie") ? caught.message : "Could not restore this conversation. Check your sign-in and connection, then try opening it again.";
414
+ setError(message);
415
+ }
413
416
  } finally {
414
417
  if (active) setRestored(true);
415
418
  }
@@ -1434,8 +1437,12 @@ function PageChrome({ showHistory, navigation, currentId, onSelect, onNew, ...pa
1434
1437
  try {
1435
1438
  const items = await client.listConversations();
1436
1439
  if (version === requestVersion.current) setConversations(items);
1437
- } catch {
1438
- if (version === requestVersion.current) setHistoryError("History couldn\u2019t load. Check your sign-in and try again.");
1440
+ } catch (caught) {
1441
+ if (version !== requestVersion.current) {
1442
+ } else {
1443
+ const message = caught instanceof FrankieApiError ? caught.message : caught instanceof Error && caught.message.startsWith("Frankie") ? caught.message : "History couldn\u2019t load. Check your sign-in and try again.";
1444
+ setHistoryError(message);
1445
+ }
1439
1446
  } finally {
1440
1447
  if (version === requestVersion.current) setHistoryLoading(false);
1441
1448
  }