diff --git a/dashboard/src/routes/config/bot/hooks/BotInfoSectionHook.tsx b/dashboard/src/routes/config/bot/hooks/BotInfoSectionHook.tsx new file mode 100644 index 00000000..70ba89f9 --- /dev/null +++ b/dashboard/src/routes/config/bot/hooks/BotInfoSectionHook.tsx @@ -0,0 +1,15 @@ +import type { FieldHookComponent } from '@/lib/field-hooks' +import { BotInfoSection } from '../sections/BotInfoSection' + +/** + * BotInfoSection as a Field Hook Component + * This component replaces the entire 'bot' nested config section rendering + */ +export const BotInfoSectionHook: FieldHookComponent = ({ value, onChange }) => { + return ( + onChange?.(newConfig)} + /> + ) +} diff --git a/dashboard/src/routes/config/bot/hooks/DebugSectionHook.tsx b/dashboard/src/routes/config/bot/hooks/DebugSectionHook.tsx new file mode 100644 index 00000000..f5b63e11 --- /dev/null +++ b/dashboard/src/routes/config/bot/hooks/DebugSectionHook.tsx @@ -0,0 +1,15 @@ +import type { FieldHookComponent } from '@/lib/field-hooks' +import { DebugSection } from '../sections/DebugSection' + +/** + * DebugSection as a Field Hook Component + * This component replaces the entire 'debug' nested config section rendering + */ +export const DebugSectionHook: FieldHookComponent = ({ value, onChange }) => { + return ( + onChange?.(newConfig)} + /> + ) +} diff --git a/dashboard/src/routes/config/bot/hooks/ExpressionSectionHook.tsx b/dashboard/src/routes/config/bot/hooks/ExpressionSectionHook.tsx new file mode 100644 index 00000000..d2f9ee01 --- /dev/null +++ b/dashboard/src/routes/config/bot/hooks/ExpressionSectionHook.tsx @@ -0,0 +1,15 @@ +import type { FieldHookComponent } from '@/lib/field-hooks' +import { ExpressionSection } from '../sections/ExpressionSection' + +/** + * ExpressionSection as a Field Hook Component + * This component replaces the entire 'expression' nested config section rendering + */ +export const ExpressionSectionHook: FieldHookComponent = ({ value, onChange }) => { + return ( + onChange?.(newConfig)} + /> + ) +} diff --git a/dashboard/src/routes/config/bot/hooks/PersonalitySectionHook.tsx b/dashboard/src/routes/config/bot/hooks/PersonalitySectionHook.tsx new file mode 100644 index 00000000..d97b86ea --- /dev/null +++ b/dashboard/src/routes/config/bot/hooks/PersonalitySectionHook.tsx @@ -0,0 +1,15 @@ +import type { FieldHookComponent } from '@/lib/field-hooks' +import { PersonalitySection } from '../sections/PersonalitySection' + +/** + * PersonalitySection as a Field Hook Component + * This component replaces the entire 'personality' nested config section rendering + */ +export const PersonalitySectionHook: FieldHookComponent = ({ value, onChange }) => { + return ( + onChange?.(newConfig)} + /> + ) +} diff --git a/dashboard/src/routes/config/bot/hooks/index.ts b/dashboard/src/routes/config/bot/hooks/index.ts index 40b831c2..492caa7c 100644 --- a/dashboard/src/routes/config/bot/hooks/index.ts +++ b/dashboard/src/routes/config/bot/hooks/index.ts @@ -5,3 +5,7 @@ export { useAutoSave, useConfigAutoSave } from './useAutoSave' export type { UseAutoSaveOptions, UseAutoSaveReturn, AutoSaveState } from './useAutoSave' export { ChatSectionHook } from './ChatSectionHook' +export { PersonalitySectionHook } from './PersonalitySectionHook' +export { DebugSectionHook } from './DebugSectionHook' +export { ExpressionSectionHook } from './ExpressionSectionHook' +export { BotInfoSectionHook } from './BotInfoSectionHook'