fixed type issues
This commit is contained in:
parent
a7bfdddc00
commit
65e38c0a48
4 changed files with 7 additions and 7 deletions
|
|
@ -54,7 +54,7 @@ export const ChatStream: React.FC<ChatStreamProps> = ({
|
|||
borderRadius: 8,
|
||||
maxWidth: '85%',
|
||||
alignSelf: msg.role === 'user' ? 'flex-end' : 'flex-start',
|
||||
background: _getBubbleBackground(msg.role),
|
||||
background: _getBubbleBackground(msg.role || 'assistant'),
|
||||
border: msg.role === 'user'
|
||||
? 'none'
|
||||
: '1px solid var(--border-color, #e0e0e0)',
|
||||
|
|
@ -343,7 +343,7 @@ function _getFileIcon(ext: string): string {
|
|||
return map[ext] || '\uD83D\uDCC4';
|
||||
}
|
||||
|
||||
function _AudioPlayer({ url, language, charCount }: { url: string; language?: string; charCount?: number }) {
|
||||
function _AudioPlayer({ url, language }: { url: string; language?: string; charCount?: number }) {
|
||||
const audioRef = useRef<HTMLAudioElement | null>(null);
|
||||
const [playing, setPlaying] = useState(false);
|
||||
const [progress, setProgress] = useState(0);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export const DataSourcePanel: React.FC<DataSourcePanelProps> = ({
|
|||
}, [instanceId, onRefresh]);
|
||||
|
||||
/* ── Check if a path is already added ── */
|
||||
const _isAdded = useCallback((connectionId: string, service: string | undefined, path: string | undefined): boolean => {
|
||||
const _isAdded = useCallback((connectionId: string, _service: string | undefined, path: string | undefined): boolean => {
|
||||
return dataSources.some(ds =>
|
||||
ds.connectionId === connectionId && ds.path === (path || '/'),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ interface _InstanceGroup {
|
|||
export const FileBrowser: React.FC<FileBrowserProps> = ({
|
||||
instanceId,
|
||||
files,
|
||||
folders,
|
||||
folders: _folders,
|
||||
onRefresh,
|
||||
onFileSelect,
|
||||
}) => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ interface WorkspaceInputProps {
|
|||
}
|
||||
|
||||
export const WorkspaceInput: React.FC<WorkspaceInputProps> = ({
|
||||
instanceId,
|
||||
instanceId: _instanceId,
|
||||
onSend,
|
||||
isProcessing,
|
||||
onStop,
|
||||
|
|
@ -65,7 +65,7 @@ export const WorkspaceInput: React.FC<WorkspaceInputProps> = ({
|
|||
const [autocompleteFilter, setAutocompleteFilter] = useState('');
|
||||
const [voiceActive, setVoiceActive] = useState(false);
|
||||
const [voiceLanguage, setVoiceLanguage] = useState(() => localStorage.getItem('workspace_stt_lang') || 'de-DE');
|
||||
const [liveTranscript, setLiveTranscript] = useState('');
|
||||
const [, setLiveTranscript] = useState('');
|
||||
const [showLangPicker, setShowLangPicker] = useState(false);
|
||||
const [attachedFileIds, setAttachedFileIds] = useState<string[]>([]);
|
||||
const [attachedDataSourceIds, setAttachedDataSourceIds] = useState<string[]>([]);
|
||||
|
|
@ -168,7 +168,7 @@ export const WorkspaceInput: React.FC<WorkspaceInputProps> = ({
|
|||
}
|
||||
const finalText = transcriptPartsRef.current.join(' ').trim();
|
||||
if (finalText) {
|
||||
setPrompt(prev => {
|
||||
setPrompt(() => {
|
||||
const base = promptBeforeVoiceRef.current;
|
||||
return base ? `${base} ${finalText}` : finalText;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue