GFramework/tools/vscode-config-extension
GeWuYou ad87f72ca6 feat(game): 添加游戏内容配置系统
- 实现基于YAML的配置文件管理和JSON Schema校验功能
- 提供YamlConfigSchemaValidator用于运行时配置校验和跨表引用检查
- 添加完整的单元测试覆盖配置加载器的各种场景
- 支持热重载功能,开发期修改配置文件后自动刷新运行时表
- 集成Source Generator生成配置类型和表包装类
- 提供VS Code插件支持配置浏览、编辑和校验操作
2026-04-01 12:38:52 +08:00
..

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
  • Surface schema metadata such as title, description, default, enum, and x-gframework-ref-table in the lightweight editors

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
  • scalar enum constraints and scalar-array item enum constraints

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