chat-js 1.0.0-alpha.8 → 1.0.0-beta.0
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 +7 -5
- package/dist/index.js +7161 -6308
- package/package.json +2 -2
- package/templates/chat-app/agent/agent.ts +0 -2
- package/templates/chat-app/app/editor.css +0 -6
- package/templates/chat-app/app/layout.tsx +11 -18
- package/templates/chat-app/app/opengraph-image.png +0 -0
- package/templates/chat-app/chat.config.ts +0 -44
- package/templates/chat-app/chatjs/core/gateway/runtime.ts +0 -7
- package/templates/chat-app/chatjs/core/ui/slots.tsx +15 -5
- package/templates/chat-app/chatjs/generated/installed-chat-ui.ts +4 -0
- package/templates/chat-app/chatjs/generated/installed.ts +2 -0
- package/templates/chat-app/chatjs/plugins/guest-chat/signed-out.tsx +7 -4
- package/templates/chat-app/chatjs/plugins/mcp/routes/connectors-page.tsx +4 -1
- package/templates/chat-app/chatjs/plugins/mcp/ui/connectors-settings.tsx +1 -1
- package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-connect-dialog.tsx +1 -1
- package/templates/chat-app/chatjs/plugins/mcp/ui/mcp-create-dialog.tsx +1 -1
- package/templates/chat-app/chatjs/plugins/model-preferences/model-row.tsx +3 -0
- package/templates/chat-app/chatjs/plugins/model-preferences/models-settings.tsx +1 -0
- package/templates/chat-app/chatjs/plugins/projects/routes/project-page.tsx +10 -1
- package/templates/chat-app/chatjs/plugins/projects/ui/delete-project-dialog.tsx +0 -3
- package/templates/chat-app/chatjs/plugins/projects/ui/project-icon-picker.tsx +1 -0
- package/templates/chat-app/chatjs/plugins/streamdown-math/chat-ui.ts +11 -0
- package/templates/chat-app/chatjs/plugins/streamdown-math/plugin.json +6 -0
- package/templates/chat-app/chatjs/plugins/streamdown-mermaid/chat-ui.ts +10 -0
- package/templates/chat-app/chatjs/plugins/streamdown-mermaid/plugin.json +6 -0
- package/templates/chat-app/chatjs/providers/gateway.ts +49 -55
- package/templates/chat-app/chatjs/tools/generate-image/tool.test.ts +3 -14
- package/templates/chat-app/components/ai-elements/response.tsx +16 -15
- package/templates/chat-app/components/auth-form-view.tsx +35 -43
- package/templates/chat-app/components/chat/chat-composer.tsx +55 -20
- package/templates/chat-app/components/chat/chat-sidebar.tsx +5 -3
- package/templates/chat-app/components/composer/prompt-form.tsx +7 -1
- package/templates/chat-app/components/eve/eve-chat-error.tsx +12 -2
- package/templates/chat-app/components/eve/eve-conversation.tsx +223 -154
- package/templates/chat-app/components/eve/eve-creation-recovery.tsx +32 -1
- package/templates/chat-app/components/eve/eve-history-list.tsx +1 -1
- package/templates/chat-app/components/model-selection-indicator.tsx +12 -10
- package/templates/chat-app/components/model-selector-view.tsx +211 -186
- package/templates/chat-app/components/new-chat-button.tsx +1 -1
- package/templates/chat-app/components/settings/settings-nav.tsx +1 -1
- package/templates/chat-app/components/settings/settings-navigation-link.tsx +1 -0
- package/templates/chat-app/components/sidebar-top-row.tsx +1 -1
- package/templates/chat-app/components/ui/sidebar.tsx +1 -1
- package/templates/chat-app/components/ui/trace.tsx +1 -1
- package/templates/chat-app/hooks/use-auto-focus.ts +12 -13
- package/templates/chat-app/lib/ai/active-gateway.ts +0 -9
- package/templates/chat-app/lib/ai/app-models.test.ts +0 -4
- package/templates/chat-app/lib/ai/app-models.ts +11 -6
- package/templates/chat-app/lib/ai/gateways/registry.ts +4 -31
- package/templates/chat-app/lib/ai/model-catalog.ts +50 -0
- package/templates/chat-app/lib/ai/models.ts +4 -39
- package/templates/chat-app/lib/ai/providers.ts +2 -16
- package/templates/chat-app/lib/config-schema.ts +0 -96
- package/templates/chat-app/lib/devtools-disabled.ts +1 -0
- package/templates/chat-app/lib/eve/model-selection.test.ts +47 -50
- package/templates/chat-app/lib/eve/model-selection.ts +5 -37
- package/templates/chat-app/lib/eve/tool-cost.test.ts +18 -6
- package/templates/chat-app/lib/eve/tool-cost.ts +10 -18
- package/templates/chat-app/oxfmt.config.ts +0 -2
- package/templates/chat-app/package.json +7 -9
- package/templates/chat-app/proxy.ts +2 -4
- package/templates/chat-app/scripts/build-eve.test.ts +56 -0
- package/templates/chat-app/scripts/build-eve.ts +12 -5
- package/templates/chat-app/scripts/check-env.ts +2 -17
- package/templates/chat-app/scripts/environment-validation-report.ts +1 -20
- package/templates/chat-app/trpc/react.tsx +2 -2
- package/templates/electron/forge.config.ts +1 -19
- package/templates/electron/scripts/write-branding.ts +1 -5
- package/templates/chat-app/app/privacy/page.tsx +0 -153
- package/templates/chat-app/app/terms/page.tsx +0 -270
- package/templates/chat-app/components/ai-elements/context-hover.radix.tsx +0 -15
- package/templates/chat-app/components/ai-elements/context-hover.tsx +0 -17
- package/templates/chat-app/components/ai-elements/context.tsx +0 -405
- package/templates/chat-app/components/composer/editor.css +0 -96
- package/templates/chat-app/components/lexical-chat-input.tsx +0 -276
- package/templates/chat-app/components/model-selection-indicator.radix.tsx +0 -17
- package/templates/chat-app/components/ui/resizable.tsx +0 -49
- package/templates/chat-app/lib/ai/gateways/fallback-models.ts +0 -29
- package/templates/chat-app/lib/ai/models.generated.ts +0 -4242
- package/templates/chat-app/lib/ai/usage-token-details.test.ts +0 -76
- package/templates/chat-app/lib/ai/usage-token-details.ts +0 -33
- package/templates/chat-app/scripts/fetch-models.ts +0 -30
- package/templates/chat-app/scripts/gateway-snapshot-warning.test.ts +0 -9
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ CLI to scaffold and extend ChatJS apps.
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx chat-js@
|
|
8
|
+
npx chat-js@beta
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Or with the command alias:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx chat-js@
|
|
14
|
+
npx chat-js@beta create
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
After install, the binary is:
|
|
@@ -34,7 +34,7 @@ After publication, run `bun --filter chat-js test:published` to create an app us
|
|
|
34
34
|
|
|
35
35
|
## Installation and migration
|
|
36
36
|
|
|
37
|
-
The `1.0.0-
|
|
37
|
+
The `1.0.0-beta.0` release starts the ChatJS 1.0 beta series under the `chat-js` package name. Apps are usable, but APIs and generated source may change substantially before 1.0. Use `npx chat-js@beta` for the examples below. This CLI supports Base UI and Radix with registry `0.2.0-beta.10`.
|
|
38
38
|
|
|
39
39
|
Pass native shadcn visual options after `--`:
|
|
40
40
|
|
|
@@ -75,9 +75,9 @@ Existing ChatJS applications need a source migration; upgrading the CLI does not
|
|
|
75
75
|
|
|
76
76
|
Migrate callers together with primitives. Base UI menu actions use `onClick` and custom triggers use `render`; Radix uses `onSelect` and `asChild`. Passing Radix `onSelect` to a Base UI menu may compile without running the action. Use each library's native composition and ordinary links styled with `buttonVariants` for navigation. Preserve EVE message IDs, scroll anchoring, draft/IME behavior, approval dispatch before specialized renderers, and document revision actions. Verify these flows in your app before removing the old wrappers. Markdown still uses Streamdown; tool-specific renderers remain installed source.
|
|
77
77
|
|
|
78
|
-
This CLI candidate pins new apps to `@chat-js/registry@0.2.0-beta.
|
|
78
|
+
This CLI candidate pins new apps to `@chat-js/registry@0.2.0-beta.10`. Matching registry builds preserve the root Base namespace and add complete `/base/{name}.json` and `/radix/{name}.json` namespaces. Fresh Radix generation selects `/radix/`; item IDs and installation targets remain the same. Subsequent `add` and `sync` retain the configured namespace and check the host's native `base-*` or `radix-*` style before writing source or registrations.
|
|
79
79
|
|
|
80
|
-
Plugins require descriptor contract version 3. UI-specific plugins and version 2 tools declare a matching `uiBase: "base"` or `uiBase: "radix"`. A mismatch stops installation. For an earlier plugin, install its current registry source or update its descriptor and entry modules together. Existing applications are not automatically migrated between libraries: changing `components.json` or a registry URL alone is insufficient. Keep the compatible registry namespace until migrating primitives and callers together.
|
|
80
|
+
Plugins require descriptor contract version 3. UI-specific plugins and version 2 tools declare a matching `uiBase: "base"` or `uiBase: "radix"`. A mismatch stops installation. For an earlier plugin, install its current registry source or update its descriptor and entry modules together. Existing applications are not automatically migrated between libraries: changing `components.json` or a registry URL alone is insufficient. Keep the compatible registry namespace until migrating primitives and callers together. The release workflow publishes the registry before the matching CLI. Both use the `beta` tag. The default CLI install still resolves to `1.0.0-alpha.2`.
|
|
81
81
|
|
|
82
82
|
Run `bun --cwd packages/cli test:native-create` to generate a real standalone preset app with uploads, OpenRouter, S3 and Vercel Sandbox, verify native preset resolution and add/sync preservation, then typecheck the result. Set `CHATJS_KEEP_NATIVE_FIXTURE=1` to retain the generated app and logs. This check needs network access but no gateway or storage credentials.
|
|
83
83
|
|
|
@@ -88,6 +88,8 @@ The CLI uses unmodified shadcn 4.22.1 for registry resolution and installation.
|
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
```sh
|
|
91
|
+
chat-js add --plugin projects
|
|
92
|
+
chat-js remove --plugin projects --dry-run
|
|
91
93
|
chat-js add @acme/my-tool --yes
|
|
92
94
|
chat-js add deep-research --overwrite
|
|
93
95
|
chat-js sync
|