mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
fix(hooks): correct JSON schema type for hooks configuration
- Add 'array' type support to SettingItemDefinition - Change hooks field from object to array type - Add additionalProperties constraint for env fields - Fix additionalProperties generation to only apply for object types This ensures the hooks configuration schema correctly represents hooks as an array and properly validates environment variable objects. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
d5eda197c2
commit
8161ac4523
3 changed files with 18 additions and 12 deletions
|
|
@ -85,7 +85,7 @@ export interface SettingDefinition {
|
|||
* Supports simple types (string, number, boolean) and complex object types.
|
||||
*/
|
||||
export interface SettingItemDefinition {
|
||||
type: 'string' | 'number' | 'boolean' | 'object';
|
||||
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
||||
properties?: Record<
|
||||
string,
|
||||
SettingItemDefinition & {
|
||||
|
|
@ -125,7 +125,7 @@ const HOOK_DEFINITION_ITEMS: SettingItemDefinition = {
|
|||
'Whether the hooks should be executed sequentially instead of in parallel.',
|
||||
},
|
||||
hooks: {
|
||||
type: 'object',
|
||||
type: 'array',
|
||||
description: 'The list of hook configurations to execute.',
|
||||
required: true,
|
||||
items: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue