@molecule/app-react 1.5.0 → 1.5.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 +24 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-09-
|
|
6
|
+
Generated: 2026-09-15T13:40:28.802Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-react
|
|
@@ -951,8 +951,22 @@ interface UseChatResult {
|
|
|
951
951
|
*/
|
|
952
952
|
noteRemoteStreamEvent: () => void
|
|
953
953
|
error: string | null
|
|
954
|
-
/**
|
|
955
|
-
|
|
954
|
+
/**
|
|
955
|
+
* Metadata about a limit-related error, for a contextual call-to-action.
|
|
956
|
+
* `limitType` names the RULE the backend enforced; `billingAction` names the
|
|
957
|
+
* REMEDY it resolved (e.g. `add_funds`, `add_payment_method`,
|
|
958
|
+
* `raise_spend_cap`, `upgrade`, `none`) and is what the button should be
|
|
959
|
+
* built from — the same limit needs a different button per account.
|
|
960
|
+
* `upgradeTier` is the plan an upgrade would move to, explicitly `null` when
|
|
961
|
+
* there is no higher tier. The backend owns these vocabularies, so the
|
|
962
|
+
* action/tier are plain strings here.
|
|
963
|
+
*/
|
|
964
|
+
errorMeta: {
|
|
965
|
+
limitType?: string
|
|
966
|
+
requiresSignup?: boolean
|
|
967
|
+
billingAction?: string
|
|
968
|
+
upgradeTier?: string | null
|
|
969
|
+
} | null
|
|
956
970
|
/** Current agent mode — plan (read-only research) or execute (full access). */
|
|
957
971
|
mode: 'plan' | 'execute'
|
|
958
972
|
/**
|
|
@@ -2807,6 +2821,13 @@ Peer dependencies:
|
|
|
2807
2821
|
top-level navigation with NO credentials: it answers 401 and the paid plan is never
|
|
2808
2822
|
granted. The shipped confirmation pages (`@molecule/app-plan-updated-page-react`,
|
|
2809
2823
|
`@molecule/app-legal-pages-react`) already call it.
|
|
2824
|
+
- **A limit error from `useChat` carries the backend's remedy, not just its name.**
|
|
2825
|
+
`errorMeta` exposes `limitType` (the rule that fired), `requiresSignup`,
|
|
2826
|
+
`billingAction` (what the user must DO — e.g. `add_funds`,
|
|
2827
|
+
`add_payment_method`, `raise_spend_cap`, `upgrade`, `none`) and `upgradeTier`
|
|
2828
|
+
(`null` = no higher plan). Build the call-to-action from `billingAction`;
|
|
2829
|
+
deriving it from `limitType` alone offers "Upgrade" to someone who just needs
|
|
2830
|
+
to add funds. Whatever your API omits arrives `undefined`.
|
|
2810
2831
|
- `RouterProvider` carries a molecule `Router` (e.g. `createReactRouter()` from
|
|
2811
2832
|
`@molecule/app-routing-react-router`). react-router's own `<BrowserRouter>` context is
|
|
2812
2833
|
separate — components that render react-router `<Link>` (several in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "React framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@molecule/app-ai-models": "1.3.
|
|
62
|
-
"@molecule/app-i18n": "1.0.
|
|
61
|
+
"@molecule/app-ai-models": "1.3.1",
|
|
62
|
+
"@molecule/app-i18n": "1.0.2",
|
|
63
63
|
"@testing-library/dom": "10.4.1",
|
|
64
64
|
"@testing-library/react": "16.3.2",
|
|
65
65
|
"@types/node": "26.1.2",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"url": "https://github.com/molecule-dev/molecule.git",
|
|
75
75
|
"directory": "packages/app/frameworks/react"
|
|
76
76
|
},
|
|
77
|
-
"homepage": "https://
|
|
77
|
+
"homepage": "https://www.molecule.dev/packages/app-react",
|
|
78
78
|
"bugs": "https://github.com/molecule-dev/molecule/issues",
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|