mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
01f438d710
* enable deeplinking in ui, add agent details to entity info, add usage data, add middleware example in samples and foundry agent. * update ui build * Update python/packages/devui/frontend/src/components/workflow/workflow-input-form.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update python/packages/devui/pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update python/packages/devui/pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * imporove mapping for agent nodes and serialiation for agent run events * lint fixes * update pyproj toml and ui updates --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
82 lines
2.1 KiB
Markdown
82 lines
2.1 KiB
Markdown
# DevUI Frontend
|
|
|
|
## Build Instructions
|
|
|
|
```bash
|
|
cd frontend
|
|
yarn install
|
|
|
|
# Create .env.local with backend URL
|
|
echo 'VITE_API_BASE_URL=http://localhost:8000' > .env.local
|
|
|
|
# Create .env.production (empty for relative URLs)
|
|
echo '' > .env.production
|
|
|
|
# Development
|
|
yarn dev
|
|
|
|
# Build (copies to backend)
|
|
yarn build
|
|
```
|
|
|
|
## Expanding the ESLint configuration
|
|
|
|
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
|
|
```js
|
|
export default tseslint.config([
|
|
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](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
|
|
```js
|
|
// eslint.config.js
|
|
import reactX from 'eslint-plugin-react-x'
|
|
import reactDom from 'eslint-plugin-react-dom'
|
|
|
|
export default tseslint.config([
|
|
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...
|
|
},
|
|
},
|
|
])
|
|
```
|