feat: enhance bot configuration with new sections and JSON field hooks
- Added support for new configuration sections: relationship, database, maisaka, mcp, and plugin_runtime. - Introduced complex field hooks for handling JSON configurations in chat talk value rules, expression learning lists, and more. - Updated the field hooks to include schema metadata for better UI representation. - Refactored the bot configuration page to utilize a more dynamic approach for managing section values and state. - Improved the configuration schema generation to ensure all top-level sections have UI metadata. - Added tests to validate the new configuration schema and ensure proper functionality of the JSON field hooks.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import type { ConfigSchema, FieldSchema } from '@/types/config-schema'
|
||||
|
||||
/**
|
||||
* Hook type for field-level customization
|
||||
@@ -13,6 +14,7 @@ export interface FieldHookComponentProps {
|
||||
value: unknown
|
||||
onChange?: (value: unknown) => void
|
||||
children?: ReactNode
|
||||
schema?: ConfigSchema | FieldSchema
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user