feat: multi-ComfyUI connections + workflow foundation (HEL-611)
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
25d1e05a30
commit
1cf9188955
@@ -43,7 +43,7 @@
|
||||
{ id: 'video', labelKey: 'shell.navVideo', icon: 'film', wip: true },
|
||||
{ id: 'tasks', labelKey: 'shell.navTasks', icon: 'queue', wip: true },
|
||||
{ id: 'agents', labelKey: 'shell.navAgents', icon: 'sparkle', href: '/agents' },
|
||||
{ id: 'connections', labelKey: 'shell.navConnections', icon: 'link', wip: true },
|
||||
{ id: 'connections', labelKey: 'shell.navConnections', icon: 'link', href: '/connections' },
|
||||
{ id: 'models', labelKey: 'shell.navModels', icon: 'assets', href: '/models' },
|
||||
{ id: 'settings', labelKey: 'shell.navSettings', icon: 'settings', href: '/settings' },
|
||||
];
|
||||
@@ -59,16 +59,25 @@
|
||||
|
||||
let { active, title, subtitle, actions, children }: Props = $props();
|
||||
|
||||
// Real ComfyUI address from settings — shown honestly without a fake
|
||||
// "connected" claim; the standalone connections page is not built yet.
|
||||
// Real ComfyUI connections from settings — shown honestly without a
|
||||
// fake "connected" claim; tested state lives on /connections (a6).
|
||||
const settingsQuery = createQuery({
|
||||
queryKey: ['settings'],
|
||||
queryFn: settings.get,
|
||||
staleTime: 60_000,
|
||||
});
|
||||
|
||||
// The ACTIVE ComfyUI connection from settings (HEL-611). The dot stays
|
||||
// neutral — a passing test is only claimed on the connections page,
|
||||
// where it comes from a real server-side probe.
|
||||
const activeEndpoint = $derived.by(() => {
|
||||
const s = $settingsQuery.data;
|
||||
if (!s) return null;
|
||||
return s.comfyui_endpoints?.find((ep) => ep.id === s.comfyui_active_id) ?? null;
|
||||
});
|
||||
|
||||
const comfyUrl = $derived.by(() => {
|
||||
const raw = ($settingsQuery.data?.comfyui_base_url ?? '').trim();
|
||||
const raw = (activeEndpoint?.base_url ?? $settingsQuery.data?.comfyui_base_url ?? '').trim();
|
||||
if (!raw) return '';
|
||||
try {
|
||||
const u = new URL(raw.includes('://') ? raw : `http://${raw}`);
|
||||
@@ -120,7 +129,7 @@
|
||||
</nav>
|
||||
|
||||
<div class="side-foot">
|
||||
<a class="comfy-row" href="/settings" title={t('shell.comfyManage')}>
|
||||
<a class="comfy-row" href="/connections" title={t('shell.comfyManage')}>
|
||||
<span class="dot" aria-hidden="true"></span>
|
||||
<span class="comfy-text">
|
||||
{#if comfyUrl}
|
||||
@@ -294,8 +303,8 @@
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* Untested by default — the connections page (a6) is not built yet, so
|
||||
no green "connected" claim is made (honesty rule on HEL-608). */
|
||||
/* Neutral until a real server-side probe says otherwise — the
|
||||
connections page (a6) owns the tested/failed states (HEL-611). */
|
||||
.dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
|
||||
Reference in New Issue
Block a user