Skip to content

Commit

Permalink
bug: add missing agent files to project share
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Mar 7, 2025
1 parent 53f6496 commit ffd77fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/api/handlers/projectshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func convertProjectShare(threadShare v1.ThreadShare) types.ProjectShare {
PublicID: threadShare.Spec.PublicID,
Featured: threadShare.Spec.Featured,
ProjectID: strings.Replace(threadShare.Spec.ProjectThreadName, system.ThreadPrefix, system.ProjectPrefix, 1),
Name: threadShare.Status.Name,
Description: threadShare.Status.Description,
Icons: threadShare.Status.Icons,
}
}

Expand Down
1 change: 1 addition & 0 deletions ui/user/src/lib/services/chat/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export interface ProjectList {
}

export interface ProjectShare {
id: string;
publicID: string;
projectID: string;
public: boolean;
Expand Down
5 changes: 3 additions & 2 deletions ui/user/src/routes/home/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@

{#snippet projectCard(project: Project | ProjectShare)}
<a
href="/o/{'projectID' in project ? project.projectID : (project as Project).id}"
href={'publicID' in project ? `/s/${project.publicID}` : `/o/${project.id}`}
data-sveltekit-preload-data={'publicID' in project ? 'off' : 'hover'}
class="card relative z-20 flex-col overflow-hidden shadow-md"
>
<div class="absolute left-0 top-0 z-30 flex w-full items-center justify-end p-2">
<div class="flex items-center justify-end">
{#if 'id' in project}
{#if !('publicID' in project)}
{@render menu(project)}
{/if}
</div>
Expand Down

0 comments on commit ffd77fa

Please sign in to comment.