diff --git a/web/pages/Assistants.tsx b/web/pages/Assistants.tsx index f5d54fa..0f18265 100644 --- a/web/pages/Assistants.tsx +++ b/web/pages/Assistants.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from 'react'; -import { Plus, Search, Play, Copy, Trash2, Edit2, Mic, MessageSquare, Save, Video, PhoneOff, Camera, ArrowLeftRight, Send, Phone, MoreHorizontal, Rocket, AlertTriangle, PhoneCall, CameraOff, Image, Images, CloudSun, Calendar, TrendingUp, Coins, Wrench, Globe, Terminal, X, ClipboardCheck, Sparkles, Volume2, Timer, ChevronDown, Link as LinkIcon, Database, Server, Zap, ExternalLink, Key, BrainCircuit, Ear, Book, Filter } from 'lucide-react'; +import { Plus, Search, Play, Copy, Trash2, Edit2, Mic, MessageSquare, Save, Video, PhoneOff, Camera, ArrowLeftRight, Send, Phone, MoreHorizontal, Rocket, AlertTriangle, PhoneCall, CameraOff, Image, Images, CloudSun, Calendar, TrendingUp, Coins, Wrench, Globe, Terminal, X, ClipboardCheck, Sparkles, Volume2, Timer, ChevronDown, ChevronLeft, ChevronRight, Link as LinkIcon, Database, Server, Zap, ExternalLink, Key, BrainCircuit, Ear, Book, Filter } from 'lucide-react'; import { Button, Input, Card, Badge, Drawer, Dialog } from '../components/UI'; import { ASRModel, Assistant, KnowledgeBase, LLMModel, TabValue, Voice } from '../types'; import { createAssistant, deleteAssistant, fetchASRModels, fetchAssistantRuntimeConfig, fetchAssistants, fetchKnowledgeBases, fetchLLMModels, fetchVoices, updateAssistant as updateAssistantApi } from '../services/backendApi'; @@ -1605,28 +1605,10 @@ export const DebugDrawer: React.FC<{ ))} -
- - {resolvedConfigOpen && ( -
-              {resolvedConfigView || 'Connect to load resolved config...'}
-            
- )} -
- -
- {mode === 'text' ? ( +
+
+
+ {mode === 'text' ? ( textSessionStarted ? (
@@ -1668,7 +1650,7 @@ export const DebugDrawer: React.FC<{
) - ) : callStatus === 'idle' ? ( + ) : callStatus === 'idle' ? (
@@ -1732,17 +1714,41 @@ export const DebugDrawer: React.FC<{ 挂断通话
- )} -
+ )} +
- {(mode !== 'text' || textSessionStarted) && ( -
-
- setInputText(e.target.value)} placeholder={mode === 'text' ? "输入消息..." : "输入文本模拟交互..."} onKeyDown={e => e.key === 'Enter' && handleSend()} disabled={isLoading || (mode === 'text' ? !textSessionStarted : callStatus !== 'active')} className="flex-1" /> - + {(mode !== 'text' || textSessionStarted) && ( +
+
+ setInputText(e.target.value)} placeholder={mode === 'text' ? "输入消息..." : "输入文本模拟交互..."} onKeyDown={e => e.key === 'Enter' && handleSend()} disabled={isLoading || (mode === 'text' ? !textSessionStarted : callStatus !== 'active')} className="flex-1" /> + +
+ )}
- )} + +
+ +
+ +
+
+
+ Resolved Runtime Config + read-only +
+
+                {resolvedConfigView || 'Connect to load resolved config...'}
+              
+
+
+
);