mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 实现面向静态游戏内容的AI-First配置方案,支持怪物、物品、技能、任务等数据管理 - 集成YAML作为配置源文件格式,JSON Schema作为结构描述标准 - 提供一对象一文件的目录组织结构和运行时只读查询功能 - 实现Source Generator生成配置类型、表包装和注册/访问辅助代码 - 添加VS Code插件支持配置浏览、raw编辑、schema打开和递归校验功能 - 创建YamlConfigSchemaValidator类提供YAML与JSON Schema的运行时校验能力 - 支持嵌套对象、对象数组、标量数组的递归校验和深层约束检查 - 实现跨表引用验证和配置热重载功能 - 提供详细的错误诊断信息和开发期工具链支持
GFramework Config Tool
VS Code extension 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/ - Localize extension UI text in English and Simplified Chinese, including the form preview, prompts, and notifications
- Run lightweight schema validation for nested required fields, unknown nested fields, scalar types, scalar arrays, and arrays of objects
- Open a lightweight form preview for nested object fields, object arrays, top-level scalar fields, and scalar arrays
- Render existing YAML comments in the form preview and edit per-field YAML comments directly from the form
- Jump from reference fields to the referenced schema, config domain, or direct config file when a reference value is present
- Initialize empty config files from schema-derived example YAML
- 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, andx-gframework-ref-tablein the lightweight editors
Validation Coverage
The extension currently validates the repository's minimal config-schema subset:
- required properties in nested objects
- unknown properties in nested objects
- scalar compatibility for
integer,number,boolean, andstring - scalar arrays with scalar item type checks
- arrays of objects whose items use the same supported subset recursively
- scalar
enumconstraints and scalar-array itemenumconstraints
Local Testing
cd tools/gframework-config-tool
bun install
bun run test
Packaging And Publishing
cd tools/gframework-config-tool
bun install
bun run package:vsix
VSCE_PAT=your_marketplace_pat bun run publish:marketplace
Current Constraints
- Multi-root workspaces use the first workspace folder
- Validation only covers a minimal subset of JSON Schema
- Form preview supports object-array editing, but nested object arrays inside array items still fall back to raw YAML
- Batch editing remains limited to top-level scalar fields and top-level scalar arrays
Workspace Settings
gframeworkConfig.configPathgframeworkConfig.schemasPath