fix(studio): show local file path tooltip for Hub-tab local models (#6715)

Local models in the Studio Hub tab (Custom folders, LM Studio, and
Local models sections) did not reveal their on-disk path on hover,
unlike the Fine-tuned rows which already do. Each of these rows maps
over a LocalModelInfo with a required path, so pass tooltipText built
from the model name and path via a small shared localPathTooltip
helper, matching the existing FT-row tooltip format.

Refs #6382

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Lee Jackson <130007945+Imagineer99@users.noreply.github.com>
This commit is contained in:
Matt Van Horn 2026-06-29 03:12:47 -07:00 committed by GitHub
parent 677ec0cc20
commit 54b95fbcc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1114,6 +1114,17 @@ function localModelIsGguf(m: LocalModelInfo): boolean {
);
}
function localPathTooltip(name: string, path: string): ReactNode {
return (
<>
<span className="block break-words">{name}</span>
<span className="block mt-1 text-[10px] text-muted-foreground break-all">
{path}
</span>
</>
);
}
/** Whether a local model is an MLX build (name hint). MLX runs on Mac only, so
* callers gate visibility on the host being a Mac. */
function localModelIsMlx(m: LocalModelInfo): boolean {
@ -2928,6 +2939,10 @@ export function HubModelPicker({
<ModelRow
label={m.model_id ?? m.display_name}
meta={isGguf ? "GGUF" : "Local"}
tooltipText={localPathTooltip(
m.model_id ?? m.display_name,
m.path,
)}
selected={value === m.id}
optionProps={hubModelList.getOptionProps(
optionKey,
@ -3017,6 +3032,10 @@ export function HubModelPicker({
<ModelRow
label={m.model_id ?? m.display_name}
meta={isGguf ? "GGUF" : "Local"}
tooltipText={localPathTooltip(
m.model_id ?? m.display_name,
m.path,
)}
selected={value === m.id}
optionProps={hubModelList.getOptionProps(
optionKey,
@ -3098,6 +3117,10 @@ export function HubModelPicker({
<ModelRow
label={m.model_id ?? m.display_name}
meta={isGguf ? "GGUF" : "Local"}
tooltipText={localPathTooltip(
m.model_id ?? m.display_name,
m.path,
)}
selected={value === m.id}
optionProps={hubModelList.getOptionProps(
optionKey,