Skip to content

Commit

Permalink
openinng crews is working
Browse files Browse the repository at this point in the history
  • Loading branch information
eksno committed Apr 21, 2024
1 parent c401b9f commit 46acd7e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion apps/web/src/routes/app/crews/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { Button } from '$lib/components/ui/button/index.js';
import api from '$lib/api';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
export let data;
Expand Down Expand Up @@ -33,7 +34,10 @@
<CreateForm formCreate={data.form.create} />
</Library.CreateButton>
{#each data.crews as crew (crew.id)}
<Library.Entry avatar={'https://images.unsplash.com/photo-1608303588026-884930af2559'}>
<Library.Entry
on:click={() => goto(`/app/crews/${crew.id}`)}
avatar={'https://images.unsplash.com/photo-1608303588026-884930af2559'}
>
<div slot="content">
<Library.EntryHeader>
{crew.title}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/routes/app/crews/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const getNodesByCrewId = async (crew_id: string): Promise<Node[]> => {
})
.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`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'] }>();
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/app/crews/[id]/CrewPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 46acd7e

Please sign in to comment.