GeWuYou 5b8099cd98 feat(game): 添加游戏内容配置系统和VS Code插件支持
- 实现基于YAML的配置源文件和JSON Schema结构验证
- 提供运行时只读查询和Source Generator代码生成
- 添加VS Code插件实现配置浏览、编辑和轻量校验功能
- 支持开发期热重载和跨表引用校验
- 实现批量编辑和表单预览功能
2026-04-01 10:18:34 +08:00

1.4 KiB

GFramework Config Tools

Minimal VS Code extension scaffold for the GFramework AI-First config workflow.

Current MVP

  • Browse config files from the workspace config/ directory
  • Open raw YAML files
  • Open matching schema files from schemas/
  • Run lightweight schema validation for required fields, unknown top-level fields, scalar types, and scalar array items
  • Open a lightweight form preview for top-level scalar fields and top-level scalar arrays
  • Batch edit one config domain across multiple files for top-level scalar and scalar-array fields

Validation Coverage

The extension currently validates the repository's minimal config-schema subset:

  • required top-level properties
  • unknown top-level properties
  • scalar compatibility for integer, number, boolean, and string
  • top-level scalar arrays with scalar item type checks

Nested objects and complex arrays should still be reviewed in raw YAML.

Local Testing

cd tools/vscode-config-extension
node --test ./test/*.test.js

Current Constraints

  • Multi-root workspaces use the first workspace folder
  • Validation only covers a minimal subset of JSON Schema
  • Form and batch editing currently support top-level scalar fields and top-level scalar arrays
  • Nested objects and complex arrays should still be edited in raw YAML

Workspace Settings

  • gframeworkConfig.configPath
  • gframeworkConfig.schemasPath