import React from 'react' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Switch } from '@/components/ui/switch' import type { EmojiConfig, MemoryConfig, ToolConfig, VoiceConfig } from '../types' interface FeaturesSectionProps { emojiConfig: EmojiConfig memoryConfig: MemoryConfig toolConfig: ToolConfig voiceConfig: VoiceConfig onEmojiChange: (config: EmojiConfig) => void onMemoryChange: (config: MemoryConfig) => void onToolChange: (config: ToolConfig) => void onVoiceChange: (config: VoiceConfig) => void } export const FeaturesSection = React.memo(function FeaturesSection({ emojiConfig, memoryConfig, toolConfig, voiceConfig, onEmojiChange, onMemoryChange, onToolChange, onVoiceChange, }: FeaturesSectionProps) { return (
{/* 工具设置 */}

工具设置

onToolChange({ ...toolConfig, enable_tool: checked })} />

允许麦麦使用各种工具来增强功能

onVoiceChange({ ...voiceConfig, enable_asr: checked })} />

启用后麦麦可以识别语音消息,需要配置语音识别模型

{/* 记忆设置 */}

记忆设置

onMemoryChange({ ...memoryConfig, max_agent_iterations: parseInt(e.target.value) }) } />

最低为 1(不深入思考)

onMemoryChange({ ...memoryConfig, agent_timeout_seconds: parseFloat(e.target.value) }) } />

记忆检索的超时时间,避免过长的等待

onMemoryChange({ ...memoryConfig, enable_jargon_detection: checked }) } />

记忆检索过程中是否启用黑话识别

onMemoryChange({ ...memoryConfig, global_memory: checked }) } />

允许记忆检索在所有聊天记录中进行全局查询(忽略当前聊天流)

{/* 聊天历史总结配置 */}

聊天历史总结配置

onMemoryChange({ ...memoryConfig, chat_history_topic_check_message_threshold: parseInt(e.target.value) }) } />

当累积消息数达到此值时触发话题检查

onMemoryChange({ ...memoryConfig, chat_history_topic_check_time_hours: parseFloat(e.target.value) }) } />

当距离上次检查超过此时间且消息数达到最小阈值时触发话题检查

onMemoryChange({ ...memoryConfig, chat_history_topic_check_min_messages: parseInt(e.target.value) }) } />

时间触发模式下的最小消息数阈值

onMemoryChange({ ...memoryConfig, chat_history_finalize_no_update_checks: parseInt(e.target.value) }) } />

当话题连续N次检查无新增内容时触发打包存储

onMemoryChange({ ...memoryConfig, chat_history_finalize_message_count: parseInt(e.target.value) }) } />

当话题的消息条数超过此值时触发打包存储

{/* 表情包设置 */}

表情包设置

onEmojiChange({ ...emojiConfig, emoji_chance: parseFloat(e.target.value) }) } />

范围 0-1,越大越容易发送表情包

onEmojiChange({ ...emojiConfig, max_reg_num: parseInt(e.target.value) }) } />

麦麦最多可以注册的表情包数量

onEmojiChange({ ...emojiConfig, check_interval: parseInt(e.target.value) }) } />

检查表情包(注册、破损、删除)的时间间隔

onEmojiChange({ ...emojiConfig, do_replace: checked }) } />
onEmojiChange({ ...emojiConfig, steal_emoji: checked }) } />

允许麦麦将看到的表情包据为己有

onEmojiChange({ ...emojiConfig, content_filtration: checked }) } />
) })