update:部分样式优化

This commit is contained in:
xiaozhu
2026-09-02 16:37:43 +08:00
parent 026cd085c6
commit d8e1eb9ca3
4 changed files with 81 additions and 40 deletions
@@ -0,0 +1,16 @@
/**
* Storage metadata keeps workspace files under
* `workspace/<owner-user-id>/<logical-path>`. That owner segment is an
* implementation detail and should never be presented as part of a script's
* user-facing path.
*/
export function displayScriptPath(relativePath: string): string {
const normalized = relativePath.replaceAll("\\", "/");
const parts = normalized.split("/");
if (parts[0] === "workspace" && parts[1] && parts.length > 2) {
return parts.slice(2).join("/");
}
return normalized;
}