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, ExternalLink, Activity, Cpu, Wrench, Shield } from "lucide-react"
import { api, type AgentStatus } from "@/lib/api"
import { cn } from "@/lib/utils"
import { cn, resolveExternalUrl } from "@/lib/utils"
function Tile({ label, ok, detail, icon: Icon }: { label: string; ok: boolean; detail?: string; icon: any }) {
return (
@@ -56,7 +56,7 @@ export function AgentView() {
{s?.webui_url && (
<a
href={s.webui_url}
href={resolveExternalUrl(s.webui_url)}
target="_blank"
rel="noopener"
className={cn(