Skip to content

Commit

Permalink
[FIX] Few comments to explain the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesRA committed Dec 23, 2024
1 parent 3c0d74b commit 602ea0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 8 additions & 0 deletions front/components/workspace/ChangeMemberModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ export function ChangeMemberModal({
Shared assistants remain if another workspace member has edited
them, and company assistants stay on the workspace.
</p>
<div className="mt-6">
<p>The following agents will be deleted</p>

{/* TODO ADD a filter here to make sure the user is the only author */}
{sharedAgents.map((agent) => (
<li>{agent.name}</li>
))}
</div>
</div>
</div>
</Dialog>
Expand Down
5 changes: 1 addition & 4 deletions front/pages/api/v1/w/[wId]/assistant/agent_version_author.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export const GetAgentVersionAuthorSchema = t.type({
agentIds: t.array(t.string),
});

const viewRequiresUser = (view?: string): boolean =>
view === "list" || view === "favorites";

/**
* @swagger
* /api/v1/w/{wId}/assistant/agent_version_author:
Expand Down Expand Up @@ -121,7 +118,6 @@ async function handler(
}

const defaultAgentGetView = auth.user() ? "list" : "all";
const agentsGetView = queryValidation.right.view ?? defaultAgentGetView;

const { agentIds } = queryValidation.right;

Expand All @@ -132,6 +128,7 @@ async function handler(
);

return res.status(200).json({
// Typing issue but it's the end of the onsite interview I have to go :()
// @ts-ignore
agentVersionAuthors,
});
Expand Down

0 comments on commit 602ea0c

Please sign in to comment.