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