- Fixed import order in bot.tsx, ChatSection.tsx and Hook files - Replaced 'as any' with specific type assertions (ExpressionConfig, PersonalityConfig, etc.) - All files now comply with AGENTS.md import rules - Build passes with zero errors - LSP diagnostics clean on all modified files Changes: - bot.tsx: Reorganized imports (React first, then third-party, then @/, then ./) - ChatSection.tsx: Fixed import order - *SectionHook.tsx (4 files): Added type imports, replaced 'as any' with typed assertions Note: ProcessingSection (1121 lines) and ExpressionSection (996 lines) not split due to tight coupling and clear responsibilities.
18 lines
541 B
TypeScript
18 lines
541 B
TypeScript
import type { FieldHookComponent } from '@/lib/field-hooks'
|
|
|
|
import type { ExpressionConfig } from '../types'
|
|
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 (
|
|
<ExpressionSection
|
|
config={value as ExpressionConfig}
|
|
onChange={(newConfig) => onChange?.(newConfig)}
|
|
/>
|
|
)
|
|
}
|