oh-my-muse/muse-studio
lili 4c069d482d fix(studio): AgentPage 槽位绑定改用作品选择器,消除 workId 硬编码
承 02D 后端槽位首次创建死锁修复(9115d4f),前端 AgentPage 此前 SlotBindingPanel 用硬编码 WORK_ID_FOR_SLOT_PREVIEW=1(盘点 line176② workId 硬编码),槽位绑定无法用于真实作品。修:接入 useWorkList 作品列表 + 作品选择下拉,SlotBindingPanel 按所选作品 workId 查询/绑定槽位,空作品时提示先建作品。SlotBindingPanel 绑定流(precheck→bind)本就完整(盘点"无真正绑定流"过时:实为后端死锁挡着 bind 必失败,后端修复后真后端 curl 已验 precheck→bind→首次建 binding)。补 AgentPage.contract.test(作品选择→正确 workId 下传 + 非硬编码反向验证)。tsc/eslint 绿,vitest 101→102。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 10:56:01 -07:00
..

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