fimo 0.11.0-staging.3 → 0.11.0-staging.4
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/assets/skills/fimo-cli/references/content.md +2 -0
- package/assets/skills/fimo-code/references/content.md +1 -0
- package/assets/skills/fimo-code/references/setup-plain-vite.md +8 -7
- package/assets/skills/fimo-code/references/setup-react-router.md +5 -0
- package/assets/skills/fimo-studio/references/ai-chat.md +8 -2
- package/assets/skills/fimo-studio/references/publish-and-deploy.md +2 -1
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +10 -10
- package/dist/runtime/app/FimoProviders.js +18 -8
- package/package.json +3 -3
- package/templates/react-router/package.json +1 -1
|
@@ -34,6 +34,8 @@ The command is `fimo schemas` (plural). There is no singular `fimo schema` alias
|
|
|
34
34
|
|
|
35
35
|
All commands accept `-C, --cwd <dir>` to point at a different project directory.
|
|
36
36
|
|
|
37
|
+
Blocks schemas support at most 7 nested `blocks` levels, 40 variants in one `schema.oneOf`, and `min` or `max` values up to 200 items per blocks field. Load `fimo/references/content.md` for the complete blocks JSON shape.
|
|
38
|
+
|
|
37
39
|
Schema transitions are automatic. Adding optional fields and changing labels preserve content. A new required field backfills its `default` only where existing values need it; the push fails safely when no default can satisfy existing content. Removing a nested field or block variant removes only those values. `string` and `text` preserve values in both directions. Other primitive changes convert safe values and reject unsafe ones without changing the schema or entries. Lowering block `max` trims from the end; raising `min` fills from the blocks `default` templates. A reference target change clears its connections. Use repeatable `--rename old.path=new.path` arguments when a field moved by name so the one-time migration preserves its values; the operation is not stored in schema JSON. Collection-to-Single removes that type's entries and cleans inbound references; Single-to-collection preserves its entry. Run `fimo validate` after pushing.
|
|
38
40
|
|
|
39
41
|
## Singles CLI commands
|
|
@@ -163,6 +163,7 @@ A field may declare `showIf` (every clause must match) or `showIfAny` (one claus
|
|
|
163
163
|
|
|
164
164
|
- `blocks.schema.fields` repeats one homogeneous shape.
|
|
165
165
|
- `blocks.schema.oneOf` lets the editor choose exactly one variant per item.
|
|
166
|
+
- Blocks schemas support at most 7 nested `blocks` levels, 40 variants in one `schema.oneOf`, and `min` or `max` values up to 200 items per blocks field.
|
|
166
167
|
- Blocks always read and write arrays. A field with `max: 1` is `[]` or `[item]`, never a bare object.
|
|
167
168
|
- `min` and `max` constrain the total number of blocks. Use `min: 1` to require at least one block; `required: true` has the same minimum-one behavior.
|
|
168
169
|
- Fimo creates a stable `_key` for each item. A `oneOf` item also carries `_type`, matching the variant `uid`.
|
|
@@ -90,11 +90,11 @@ The `seo` plugin rewrites `<title>`, og, twitter, canonical tags from
|
|
|
90
90
|
|
|
91
91
|
## File: `src/main.tsx`
|
|
92
92
|
|
|
93
|
-
`FimoProviders`
|
|
94
|
-
|
|
95
|
-
`@tanstack/react-query`
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
`FimoProviders` requires a React Router `<Router>` ancestor (it reads
|
|
94
|
+
`useLocation`/`useNavigate`). It reuses a host app's
|
|
95
|
+
`@tanstack/react-query` client when one exists and supplies a stable fallback
|
|
96
|
+
for adopted SPAs. This recipe still mounts an explicit provider so the app owns
|
|
97
|
+
the shared cache and its configuration:
|
|
98
98
|
|
|
99
99
|
```tsx
|
|
100
100
|
import { FimoProviders } from 'fimo/react-router';
|
|
@@ -122,8 +122,9 @@ createRoot(document.getElementById('root')!).render(
|
|
|
122
122
|
|
|
123
123
|
`react-router` and `@tanstack/react-query` are peer dependencies of `fimo`;
|
|
124
124
|
both are in the install command above. `FimoProviders` is exported only from
|
|
125
|
-
the `fimo/react-router` adapter barrel
|
|
126
|
-
|
|
125
|
+
the `fimo/react-router` adapter barrel. Keep the explicit QueryClientProvider
|
|
126
|
+
when the app needs custom query defaults or shared cache access; adopted SPAs
|
|
127
|
+
can omit it.
|
|
127
128
|
|
|
128
129
|
## File: `src/App.tsx`
|
|
129
130
|
|
|
@@ -100,6 +100,11 @@ when to render them, and how.
|
|
|
100
100
|
|
|
101
101
|
## File: `src/root.tsx`
|
|
102
102
|
|
|
103
|
+
The explicit `QueryClientProvider` below is the canonical template shape so the
|
|
104
|
+
app can configure query defaults such as `staleTime`. Adopted SPAs can omit it:
|
|
105
|
+
`FimoProviders` reuses an ancestor client when present and supplies a stable
|
|
106
|
+
fallback otherwise.
|
|
107
|
+
|
|
103
108
|
```tsx
|
|
104
109
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
105
110
|
import { FimoProviders, FimoScripts, loadFimoMetaData, buildFimoMeta, fimoHtmlProps } from 'fimo/react-router';
|
|
@@ -9,6 +9,12 @@ The AI chat opens as a floating panel by default. You can dock it to the left or
|
|
|
9
9
|
3. Press **Enter** or click the **send button**.
|
|
10
10
|
4. The AI responds in a stream. You see tool status badges appear as it works, and the preview updates automatically.
|
|
11
11
|
|
|
12
|
+
## Responding to Choices and Forms
|
|
13
|
+
|
|
14
|
+
The AI can place choices, cards, tables, images, and contextual actions directly in its reply. Optional suggestions do not interrupt the conversation.
|
|
15
|
+
|
|
16
|
+
When the AI needs an answer before it can continue, it shows a form in the chat and waits for your response. Complete the form for a structured answer, or reply normally in the chat to answer in your own words.
|
|
17
|
+
|
|
12
18
|
## Attaching Context
|
|
13
19
|
|
|
14
20
|
Give the AI more to work with:
|
|
@@ -37,9 +43,9 @@ While the AI works, you see small badges in the chat showing what it is doing. E
|
|
|
37
43
|
|
|
38
44
|
Chat changes are prepared separately and then applied to the environment you are viewing. Most changes merge automatically.
|
|
39
45
|
|
|
40
|
-
If the project changed in the same place while the AI was working, the response shows a **Review changes** card
|
|
46
|
+
If the project changed in the same place while the AI was working, the response shows a **Review changes** card and an attention banner above the chat input. The banner remains visible when floating chat history is collapsed.
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
Choose **Auto fix** or keep chatting to let Fimo continue in the retained proposal, resolve the conflict, and retry the merge. Choose **Review manually** to inspect and resolve the proposal yourself. Discarding leaves the current environment unchanged and permanently removes the proposal.
|
|
43
49
|
|
|
44
50
|
## Tips for Better Results
|
|
45
51
|
|
|
@@ -14,7 +14,7 @@ Every change you make is automatically saved to your project, but saved changes
|
|
|
14
14
|
|
|
15
15
|
To push your latest changes live, open the publish panel from the header **Publish** button and click **Publish** inside it again. It redeploys with your latest code and content.
|
|
16
16
|
|
|
17
|
-
> **Tip:**
|
|
17
|
+
> **Tip:** After completing relevant work, the AI may offer a one-click **Publish** callout in chat. It appears only when publishing is available; the header **Publish** control remains the reliable path at any time.
|
|
18
18
|
|
|
19
19
|
## Publishing Changes That Need Review
|
|
20
20
|
|
|
@@ -29,6 +29,7 @@ The header **Publish** button itself only shows the label "Publish" (or a spinne
|
|
|
29
29
|
- **"Not published yet"** — Your site has never been published. The **Publish** button inside the panel is ready to click.
|
|
30
30
|
- **"Publishing"** — Publishing is in progress. A spinner and a **Publishing** status badge show while it builds, and the button is disabled.
|
|
31
31
|
- **"Published"** — Your site is live. A **Published** status badge appears, your live URL is listed under a **Published site** heading as a clickable link, and a **Last published** date and time is shown.
|
|
32
|
+
- **"Couldn't publish · N issues"** — Project validation found issues that must be fixed first. Choose **Fix with Fimo** to send the safe issue list to the project chat and ask Fimo to repair it.
|
|
32
33
|
|
|
33
34
|
## Key Concepts
|
|
34
35
|
|