feat(messaging): ✨ Add real-time content moderation worker and overlay component with moderation provider tests
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
89bb3427e6
commit
2c6787004a
3 changed files with 3 additions and 4 deletions
|
|
@ -22,7 +22,6 @@
|
|||
import { ContentClassifier } from '@lilith/content-moderation-inference';
|
||||
import type {
|
||||
ClassifierConfig,
|
||||
ClassificationResult,
|
||||
FlagCategory,
|
||||
} from '@lilith/content-moderation-inference';
|
||||
import type { WorkerRequest, WorkerResponse } from '../types/content-moderation';
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ const MetadataRow = styled.div`
|
|||
export const ContentModerationOverlay: FC<ContentModerationOverlayProps> = ({
|
||||
severity,
|
||||
categories,
|
||||
codedLanguageMatches = [],
|
||||
codedLanguageMatches: _codedLanguageMatches = [],
|
||||
onSendAnyway,
|
||||
onEditMessage,
|
||||
onDismiss,
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ function wrapper(
|
|||
|
||||
describe('ContentModerationProvider', () => {
|
||||
describe('default settings', () => {
|
||||
it('provides all 12 categories by default', () => {
|
||||
expect(ALL_CATEGORIES).toHaveLength(12);
|
||||
it('provides all 18 categories by default', () => {
|
||||
expect(ALL_CATEGORIES).toHaveLength(18);
|
||||
expect(DEFAULT_SETTINGS.enabledCategories).toEqual(ALL_CATEGORIES);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue