mirror of
https://github.com/different-ai/openwork
synced 2026-04-25 17:15:34 +02:00
fix(workspace): show mounted url in edit connection (#1388)
Co-authored-by: src-opn <src-opn@users.noreply.github.com>
This commit is contained in:
@@ -473,8 +473,18 @@ export function createWorkspaceStore(options: {
|
||||
if (!workspaceId) return null;
|
||||
const workspace = workspaces().find((item) => item.id === workspaceId) ?? null;
|
||||
if (!workspace || workspace.workspaceType !== "remote") return null;
|
||||
const openworkHostUrl =
|
||||
normalizeRemoteType(workspace.remoteType) === "openwork"
|
||||
? buildOpenworkWorkspaceBaseUrl(
|
||||
workspace.openworkHostUrl?.trim() ?? "",
|
||||
workspace.openworkWorkspaceId,
|
||||
) ||
|
||||
workspace.openworkHostUrl?.trim() ||
|
||||
workspace.baseUrl?.trim() ||
|
||||
""
|
||||
: workspace.openworkHostUrl?.trim() || workspace.baseUrl?.trim() || "";
|
||||
return {
|
||||
openworkHostUrl: workspace.openworkHostUrl ?? workspace.baseUrl ?? "",
|
||||
openworkHostUrl,
|
||||
openworkToken: workspace.openworkToken ?? options.openworkServer.openworkServerSettings().token ?? "",
|
||||
directory: workspace.directory ?? "",
|
||||
displayName: workspace.displayName ?? "",
|
||||
|
||||
Reference in New Issue
Block a user