feat(modal): open model metadata sidecar location from the model modal

Centralized sidecar storage moves .metadata.json into a mirror tree, so
the Location link in the model modal could no longer reveal a model's
sidecar. The Location row now shows an inline metadata icon button
(centralized mode only) that calls a new
POST /api/lm/models/open-sidecar-location endpoint: the backend resolves
the sidecar through py/utils/sidecar_paths, reveals the .metadata.json
selected in the file manager (falling back to the sidecar directory when
it has not been written yet), and returns the path for clipboard mode on
headless/Docker sessions. The platform reveal logic is factored into a
shared FileSystemHandler._reveal_file helper. All 9 locales translated.
This commit is contained in:
Will Miao
2026-10-10 07:41:48 +08:00
parent 7937aeaa04
commit af90fe873d
17 changed files with 622 additions and 58 deletions
@@ -349,6 +349,34 @@
font-size: 0.9em;
}
.file-path-wrapper {
display: flex;
align-items: baseline;
gap: 6px;
}
.file-path-wrapper .file-path {
flex: 1;
min-width: 0;
word-break: break-all;
}
.location-action-btn {
background: transparent;
border: none;
color: var(--lora-accent);
cursor: pointer;
padding: 2px 5px;
border-radius: var(--border-radius-xs);
flex-shrink: 0;
opacity: 0.7;
}
.location-action-btn:hover {
opacity: 1;
background: rgba(66, 153, 225, 0.1);
}
.file-path[data-action="open-file-location"] {
cursor: pointer;
text-decoration: underline;