goto(`/app/crews/${crew.id}`)}
+ avatar={'https://images.unsplash.com/photo-1608303588026-884930af2559'}
+ >
{crew.title}
diff --git a/apps/web/src/routes/app/crews/[id]/+page.server.ts b/apps/web/src/routes/app/crews/[id]/+page.server.ts
index ccbdf4bd..da2d8bfc 100644
--- a/apps/web/src/routes/app/crews/[id]/+page.server.ts
+++ b/apps/web/src/routes/app/crews/[id]/+page.server.ts
@@ -32,8 +32,8 @@ const getNodesByCrewId = async (crew_id: string): Promise => {
})
.then(({ data: d, error: e }) => {
if (e) {
- console.error(`Error retrieving agents: ${e.detail}`);
- error(500, `Failed to load agents for crew ${crew_id}`);
+ console.error(`Failed to load agents for crew ${crew_id}. ${e.detail}`);
+ return [];
}
if (!d) {
console.error(`No data returned from agents`);
diff --git a/apps/web/src/lib/components/ui/library/agent-library.svelte b/apps/web/src/routes/app/crews/[id]/AgentLibrary.svelte
similarity index 98%
rename from apps/web/src/lib/components/ui/library/agent-library.svelte
rename to apps/web/src/routes/app/crews/[id]/AgentLibrary.svelte
index 413b83fb..dec7becb 100644
--- a/apps/web/src/lib/components/ui/library/agent-library.svelte
+++ b/apps/web/src/routes/app/crews/[id]/AgentLibrary.svelte
@@ -7,7 +7,7 @@
import { createEventDispatcher } from 'svelte';
import { toast } from 'svelte-sonner';
import { Library } from '$lib/components/ui/community-details';
- import AgentRow from '../community-details/agent-row.svelte';
+ import AgentRow from '$lib/components/ui/community-details/agent-row.svelte';
import type { schemas } from '$lib/api';
const loadAgentDispatch = createEventDispatcher<{ 'load-agent': schemas['Agent'] }>();
diff --git a/apps/web/src/lib/components/ui/library/crew-library.svelte b/apps/web/src/routes/app/crews/[id]/CrewLibrary.svelte
similarity index 100%
rename from apps/web/src/lib/components/ui/library/crew-library.svelte
rename to apps/web/src/routes/app/crews/[id]/CrewLibrary.svelte
diff --git a/apps/web/src/routes/app/crews/[id]/CrewPanel.svelte b/apps/web/src/routes/app/crews/[id]/CrewPanel.svelte
index 69f72240..9740d597 100644
--- a/apps/web/src/routes/app/crews/[id]/CrewPanel.svelte
+++ b/apps/web/src/routes/app/crews/[id]/CrewPanel.svelte
@@ -3,7 +3,7 @@
import RightEditorSidebar from '$lib/components/RightEditorSidebar.svelte';
import { Button } from '$lib/components/ui/button';
import * as Dialog from '$lib/components/ui/dialog';
- import { AgentLibrary } from '$lib/components/ui/library';
+ import AgentLibrary from './AgentLibrary.svelte';
import { goto } from '$app/navigation';
import type { PanelAction } from '$lib/types';
import { PROMPT_LIMIT, AGENT_LIMIT } from '$lib/config';