fix(web): enable JSON_OBJECT type support in console UI#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6313992f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| const v = JSON.parse(value) | ||
| const res = { | ||
| ...jsonObjectWrap, | ||
| properties: v, | ||
| } | ||
| handlePayloadChange('json_schema')(JSON.stringify(res, null, 2)) | ||
| handlePayloadChange('json_schema')(value) | ||
| return True |
There was a problem hiding this comment.
Replace
True with boolean literal
When a user enters valid JSON for the schema, this handler executes return True, but True is not a JavaScript boolean literal. In TypeScript this is a compile-time error (cannot find name True), and at runtime it throws a ReferenceError, so any valid JSON input crashes the handler instead of accepting the schema. Use true or return void to avoid breaking the JSON schema editor flow.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#2