Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .agents/skills/new-react-playground/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: new-react-playground
description: Use when an agent in this TanStack AI monorepo needs a playground app to try a new feature. Trigger: new feature to try in a Start React app in this repo.
---

# new-react-playground

Pick a kebab-case name. Then generate a React chat lab under `examples/<name>/`.

The generator writes a thin chat lab. The app includes:

- BYOK
- Model picker
- `/api/chat` with `chat()`

The index route is the chat shell. The dev server uses port `3100`.

## Must

1. Pick a kebab-case name.
2. From the repo root, run `pnpm nx g @tanstack/workspace-plugin:react-app <name>`.
3. Run `pnpm install`.
4. Implement the feature on the index route. If the server must change, edit `/api/chat`.
5. Run `pnpm --filter <name> dev` (port 3100).

Do not commit the new example. After a human asks to keep it, you can commit it.

## Later

If you need live model keys, copy `.env.example` to `.env.local`.

Open `http://localhost:3100`. The chat lab is live. Your feature is on the index route.
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"fixed": [],
"linked": [],
"ignore": [
"@tanstack/workspace-plugin",
"@tanstack/ai-codemods",
"@tanstack/ai-code-mode-models-eval",
"@tanstack/ai-e2e",
Expand Down
32 changes: 32 additions & 0 deletions .claude/skills/new-react-playground/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: new-react-playground
description: Use when an agent in this TanStack AI monorepo needs a playground app to try a new feature. Trigger: new feature to try in a Start React app in this repo.
---

# new-react-playground

Pick a kebab-case name. Then generate a React chat lab under `examples/<name>/`.

The generator writes a thin chat lab. The app includes:

- BYOK
- Model picker
- `/api/chat` with `chat()`

The index route is the chat shell. The dev server uses port `3100`.

## Must

1. Pick a kebab-case name.
2. From the repo root, run `pnpm nx g @tanstack/workspace-plugin:react-app <name>`.
3. Run `pnpm install`.
4. Implement the feature on the index route. If the server must change, edit `/api/chat`.
5. Run `pnpm --filter <name> dev` (port 3100).

Do not commit the new example. After a human asks to keep it, you can commit it.

## Later

If you need live model keys, copy `.env.example` to `.env.local`.

Open `http://localhost:3100`. The chat lab is live. Your feature is on the index route.
32 changes: 32 additions & 0 deletions .grok/skills/new-react-playground/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: new-react-playground
description: Use when an agent in this TanStack AI monorepo needs a playground app to try a new feature. Trigger: new feature to try in a Start React app in this repo.
---

# new-react-playground

Pick a kebab-case name. Then generate a React chat lab under `examples/<name>/`.

The generator writes a thin chat lab. The app includes:

- BYOK
- Model picker
- `/api/chat` with `chat()`

The index route is the chat shell. The dev server uses port `3100`.

## Must

1. Pick a kebab-case name.
2. From the repo root, run `pnpm nx g @tanstack/workspace-plugin:react-app <name>`.
3. Run `pnpm install`.
4. Implement the feature on the index route. If the server must change, edit `/api/chat`.
5. Run `pnpm --filter <name> dev` (port 3100).

Do not commit the new example. After a human asks to keep it, you can commit it.

## Later

If you need live model keys, copy `.env.example` to `.env.local`.

Open `http://localhost:3100`. The chat lab is live. Your feature is on the index route.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ All commands are run from the repo root. Nx handles affected detection and cachi

Working on a single package? `cd packages/<pkg>` and use its scripts directly (`pnpm test:lib`, `pnpm test:types`, etc.).

## Generate a React playground

You need a TanStack Start chat app to try a feature. Do not copy `examples/ts-react-chat`. Run the generator.

1. From the repo root, run `pnpm nx g @tanstack/workspace-plugin:react-app <name>`.
2. Run `pnpm install`.
3. Copy `examples/<name>/.env.example` to `examples/<name>/.env.local` and add a key.
4. Run `pnpm --filter <name> dev` (port 3100).
5. Change the index route for the feature. If the server must change, change `/api/chat`.

Do not commit the new example unless you mean to keep it as a lasting example.

## TypeScript configuration

There is a single `tsconfig.base.json` at the repo root with the shared `compilerOptions`. Every package extends it and overrides only what's unique to that package (e.g. `outDir`, JSX runtime, framework lib).
Expand Down
1 change: 1 addition & 0 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ignoreWorkspaces": [
"examples/**",
"testing/**",
"tools/**",
"packages/ai-code-mode/models-eval"
],
"ignore": [
Expand Down
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"nxCloudId": "6928ccd60a2e27ab22f38ad0",
"useDaemonProcess": true,
"useInferencePlugins": false,
"plugins": ["@tanstack/workspace-plugin"],
"analytics": false,
"parallel": 15,
"tui": {
Expand Down
Loading
Loading