Pretor/frontend
朝夕 c39b5eb8e2
Fix individual page system nodes 12812679583942839801 (#43)
* feat: fix individual page configuration to properly display system nodes

- Added `SystemNodeConfig` database table to persist system node config (provider and model).
- Updated `AgentLayout` and `WorkerIndividualSettings` to restrict config modifications to only provider and model for system nodes.
- Hid delete button for system nodes and removed them from the creation modal dropdown.
- Updated Agent API to support querying configured system nodes and persisting setups.

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

* feat: fix individual page configuration to properly display system nodes

- Added `SystemNodeConfig` database table to persist system node config (provider and model).
- Updated `AgentLayout` and `WorkerIndividualSettings` to restrict config modifications to only provider and model for system nodes.
- Hid delete button for system nodes and removed them from the creation modal dropdown.
- Updated Agent API to support querying configured system nodes and persisting setups.
- Fixed an issue where the table would not render if only system nodes were present (and no custom workers existed).

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

* fix: correct individual worker agent_type and system node model display

- Updated the `agent_type` options in `WorkerIndividualSettings.tsx` to match the backend's expected `AgentType` enum values (`ordinary_individual`, `skill_individual`, `special_individual`). This fixes the 422 error when creating a new worker.
- Fixed the system node provider and model selection logic so it correctly defaults to the first available provider when unconfigured, allowing the model dropdown to populate.

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>
2026-04-27 16:20:17 +08:00
..
public [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
src Fix individual page system nodes 12812679583942839801 (#43) 2026-04-27 16:20:17 +08:00
.gitignore [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
README.md [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
eslint.config.js [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
index.html [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
package-lock.json [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
package.json [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
tsconfig.app.json [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
tsconfig.json [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
tsconfig.node.json [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00
vite.config.ts [feature integration] frontend dashboard and API endpoints (#19) 2026-04-24 09:12:12 +08:00

README.md

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:

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...
    },
  },
])