Skip to content

Commit f966b87

Browse files
committed
feat: setup automation
1 parent 1d873e7 commit f966b87

File tree

10 files changed

+3550
-75
lines changed

10 files changed

+3550
-75
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "lts/*"
30+
cache: "pnpm"
31+
registry-url: "https://registry.npmjs.org"
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build
37+
run: pnpm run build
38+
39+
- name: Verify npm signatures
40+
run: npm audit signatures
41+
42+
- name: Release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
run: npx semantic-release

.pre-commit-config.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.releaserc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md"
10+
}
11+
],
12+
"@semantic-release/npm",
13+
"@semantic-release/github",
14+
[
15+
"@semantic-release/git",
16+
{
17+
"assets": ["CHANGELOG.md", "package.json"],
18+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
19+
}
20+
]
21+
]
22+
}

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
# Pydantic AI Chat package
1+
# Pydantic AI Chat UI
22

3-
Example React frontend for Pydantic AI Chat using [Vercel AI Elements](https://vercel.com/changelog/introducing-ai-elements).
3+
A React-based chat interface for [Pydantic AI](https://ai.pydantic.dev/). This package powers the documentation assistant at [ai.pydantic.dev/web/](https://ai.pydantic.dev/web/).
44

5-
## Dev
5+
Built with [Vercel AI SDK](https://sdk.vercel.ai/) and designed to work with Pydantic AI's streaming chat API.
6+
7+
## Features
8+
9+
- Streaming message responses with reasoning display
10+
- Tool call visualization with collapsible input/output
11+
- Conversation persistence via localStorage
12+
- Dynamic model and tool selection
13+
- Dark/light theme support
14+
- Mobile-responsive sidebar
15+
16+
## Development
617

718
```sh
819
pnpm install
9-
pnpm run dev:server # start the python example backend
10-
pnpm run dev
20+
pnpm run dev:server # start the Python backend (requires agent/ setup)
21+
pnpm run dev # start the Vite dev server
1122
```
23+
24+
## License
25+
26+
MIT

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-conventional'] }

cspell.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": ["Pydantic", "pydantic"]
5+
}

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig(
1919
globals: globals.node,
2020
},
2121
},
22-
{ ignores: ['dist/**', 'server/**', 'node_modules/**', 'scratch/**', 'agent/**'] },
22+
{ ignores: ['dist/**', 'server/**', 'node_modules/**', 'scratch/**', 'agent/**', 'commitlint.config.js'] },
2323
{
2424
rules: {
2525
'@typescript-eslint/no-unused-vars': [

lefthook.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
commit-msg:
2+
commands:
3+
commitlint:
4+
run: npx commitlint --edit
5+
6+
pre-commit:
7+
parallel: true
8+
commands:
9+
lint:
10+
glob: "*.{ts,tsx,js,jsx}"
11+
run: pnpm run lint --no-warn-ignored {staged_files}
12+
format:
13+
glob: "*.{ts,tsx,js,jsx,json,md,css}"
14+
run: pnpm run format {staged_files}
15+
stage_fixed: true
16+
typecheck:
17+
glob: "*.{ts,tsx}"
18+
run: pnpm run typecheck
19+
check-yaml:
20+
glob: "*.{yaml,yml}"
21+
run: npx yaml-lint {staged_files}
22+
check-toml:
23+
glob: "*.toml"
24+
run: npx @taplo/cli check {staged_files}
25+
codespell:
26+
glob: "*.{ts,tsx,js,jsx,md}"
27+
run: npx cspell --no-progress {staged_files}

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
"name": "@pydantic/ai-chat-ui",
33
"private": false,
44
"publishConfig": {
5-
"access": "public"
5+
"access": "public",
6+
"provenance": true
67
},
78
"version": "0.0.4",
89
"type": "module",
910
"scripts": {
11+
"prepare": "lefthook install",
1012
"typecheck": "tsc --noEmit",
11-
"format": "prettier --write -- .",
13+
"format": "prettier --write",
1214
"lint": "eslint",
1315
"lint-fix": "eslint --fix --quiet",
1416
"dev": "BACKEND_PORT=38001 vite",
@@ -55,25 +57,34 @@
5557
"zod": "^4.1.13"
5658
},
5759
"devDependencies": {
60+
"@commitlint/cli": "^20.3.1",
61+
"@commitlint/config-conventional": "^20.3.1",
5862
"@eslint/js": "^9.39.1",
63+
"@semantic-release/changelog": "^6.0.3",
64+
"@semantic-release/git": "^10.0.1",
65+
"@taplo/cli": "^0.7.0",
5966
"@types/node": "^24.10.1",
6067
"@types/react": "^19.2.7",
6168
"@types/react-dom": "^19.2.3",
6269
"@types/react-syntax-highlighter": "^15.5.13",
6370
"@vitejs/plugin-react": "^5.1.1",
71+
"cspell": "^8.17.0",
6472
"eslint": "^9.39.1",
6573
"eslint-config-prettier": "^10.1.8",
6674
"eslint-plugin-prettier": "^5.5.4",
6775
"eslint-plugin-react-hooks": "^5.2.0",
6876
"eslint-plugin-react-refresh": "^0.4.24",
6977
"globals": "^16.5.0",
78+
"lefthook": "^1.11.0",
7079
"neostandard": "^0.12.2",
7180
"prettier": "^3.7.4",
81+
"semantic-release": "^24.2.0",
7282
"tw-animate-css": "^1.4.0",
7383
"typescript": "~5.8.3",
7484
"typescript-eslint": "^8.48.1",
7585
"vite": "^7.2.6",
7686
"vite-bundle-analyzer": "^1.2.3",
77-
"vite-tsconfig-paths": "^5.1.4"
87+
"vite-tsconfig-paths": "^5.1.4",
88+
"yaml-lint": "^1.7.0"
7889
}
7990
}

0 commit comments

Comments
 (0)