mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
* feat(mcp): open an Agent's MCP config file from the dashboard Users asked to jump from the MCP page straight into a client's config file, such as opencode.json or .cursor/mcp.json, instead of copying the path and opening it by hand (#538). The open uses the same editor chain as a skill's Open in editor, so the dashboard opens files one way. The endpoint takes a target, not a path, and only opens a file the MCP page already lists. It answers only requests from the machine running the dashboard, because the editor starts on that machine. The list now reports which files exist, so the button is hidden for a client detected before it has a file. * fix(mcp): hide Open in editor where the server would refuse it Codex review: the dashboard can be opened through a LAN IP, but the open endpoint answers only loopback requests, so the button showed and every click returned 403, while the docs promised it would open. The list now reports `openable` instead of `existing`: the files that exist, and only when the request comes from the dashboard's machine. A viewer elsewhere does not see the button, and the docs say where it appears. * fix(mcp): don't treat a reverse proxy's viewers as local for Open in editor Codex review: the documented Nginx and Caddy setups connect from 127.0.0.1, so the loopback socket check let any browser behind the proxy see the button and launch editors on the server. The browser now counts as local only when the socket and the Host it used are both loopback and no proxy forwarding header is present. Both documented proxies keep the browser's Host and add X-Real-IP or X-Forwarded-For, so their viewers no longer qualify.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])