refactor: remove RuleEditor, RuleList, RulePreview, TimeRangePicker, and VoiceSection components

- Deleted RuleEditor.tsx, RuleList.tsx, RulePreview.tsx, TimeRangePicker.tsx, and VoiceSection.tsx as part of a cleanup.
- Updated index.ts to remove imports related to deleted components.
- Modified types.ts and model.tsx to accommodate changes in task configuration structure.
- Introduced new types for TargetItem and LearningItem to enhance type safety.
- Refactored ModelTaskConfig to be dynamic based on backend schema.
- Updated ModelProviderConfigPage to unwrap backend config response for better handling.
This commit is contained in:
DrSmoothl
2026-03-08 00:12:10 +08:00
parent 186073f13b
commit d0840db2a5
14 changed files with 250 additions and 898 deletions

View File

@@ -454,7 +454,7 @@ export const ChatSectionHook: FieldHookComponent = ({ value, onChange }) => {
<div className="grid gap-2">
<Label className="text-xs font-medium"></Label>
<Select
value={rule.target === '' ? 'global' : 'specific'}
value={rule.target ? 'specific' : 'global'}
onValueChange={(value) => {
if (value === 'global') {
updateTalkValueRule(index, 'target', '')
@@ -474,7 +474,7 @@ export const ChatSectionHook: FieldHookComponent = ({ value, onChange }) => {
</div>
{/* 详细配置选项 - 只在非全局时显示 */}
{rule.target !== '' && (() => {
{rule.target && (() => {
const parts = rule.target.split(':')
const platform = parts[0] || 'qq'
const chatId = parts[1] || ''