fix: dynamically resolve localhost/127.0.0.1 in links to active hostname for remote access

This commit is contained in:
Hitonabi
2026-06-25 23:06:25 +02:00
parent 8d5885d683
commit e9fb72fdc7
8 changed files with 75 additions and 66 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react"
import { Bot, Cpu, ExternalLink, Brain, Layers, Plus, ShieldAlert } from "lucide-react"
import { api, type SystemStatus, type AgentStatus, type ModelInfo, type Memory, type UpdatesResp } from "@/lib/api"
import { cn } from "@/lib/utils"
import { cn, resolveExternalUrl } from "@/lib/utils"
function gb(b: number) {
return (b / 1024 ** 3).toFixed(1)
@@ -213,7 +213,7 @@ export function DashboardView() {
</div>
{agent?.webui_url && (
<a
href={agent.webui_url}
href={resolveExternalUrl(agent.webui_url)}
target="_blank"
rel="noopener"
className={cn(