style: status tooltip

This commit is contained in:
jialin
2024-11-18 17:24:07 +08:00
parent f8a8225b8c
commit fa4041e560
2 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -75,7 +75,13 @@ const StatusTag: React.FC<StatusTagProps> = ({
<SimpleBar style={{ maxHeight: 200 }}> <SimpleBar style={{ maxHeight: 200 }}>
<div <div
style={{ width: 'max-content', maxWidth: 250, paddingInline: 10 }} style={{
width: 'max-content',
maxWidth: 250,
paddingInline: 10,
whiteSpace: 'pre-wrap',
wordBreak: 'break-word'
}}
> >
{statusValue.message} {statusValue.message}
</div> </div>
+4 -1
View File
@@ -461,7 +461,10 @@ const Models: React.FC<ModelsProps> = ({
return `${modelSourceMap.huggingface}/${record.huggingface_repo_id}`; return `${modelSourceMap.huggingface}/${record.huggingface_repo_id}`;
} }
if (record.source === modelSourceMap.local_path_value) { if (record.source === modelSourceMap.local_path_value) {
return `${modelSourceMap.local_path}${record.local_path}`; const localPath = _.startsWith(record.local_path, '/')
? record.local_path
: `/${record.local_path}`;
return `${modelSourceMap.local_path}${localPath}`;
} }
if (record.source === modelSourceMap.ollama_library_value) { if (record.source === modelSourceMap.ollama_library_value) {
return `${modelSourceMap.ollama_library}/${record.ollama_library_model_name}`; return `${modelSourceMap.ollama_library}/${record.ollama_library_model_name}`;