feat: add real-time TOML validation for Codex config

- Add smol-toml dependency for client-side TOML parsing
- Create useCodexTomlValidation hook with 500ms debounce
- Display validation errors below config.toml textarea
- Trigger validation on onChange for immediate user feedback
- Backend validation remains as fallback for data integrity
This commit is contained in:
Jason
2025-10-16 23:56:30 +08:00
parent 51c68ef192
commit 54b0b3b139
4 changed files with 102 additions and 7 deletions

View File

@@ -10,3 +10,4 @@ export { useTemplateValues } from "./useTemplateValues";
export { useCommonConfigSnippet } from "./useCommonConfigSnippet";
export { useCodexCommonConfig } from "./useCodexCommonConfig";
export { useSpeedTestEndpoints } from "./useSpeedTestEndpoints";
export { useCodexTomlValidation } from "./useCodexTomlValidation";