From 602ea0cc1c9f5c74b02ffa9b4adafee063e4bf10 Mon Sep 17 00:00:00 2001
From: Charles Raimbault
Date: Mon, 23 Dec 2024 18:33:28 +0100
Subject: [PATCH] [FIX] Few comments to explain the issue
---
front/components/workspace/ChangeMemberModal.tsx | 8 ++++++++
.../api/v1/w/[wId]/assistant/agent_version_author.ts | 5 +----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/front/components/workspace/ChangeMemberModal.tsx b/front/components/workspace/ChangeMemberModal.tsx
index a029c5ec4b9f..cac5640adb49 100644
--- a/front/components/workspace/ChangeMemberModal.tsx
+++ b/front/components/workspace/ChangeMemberModal.tsx
@@ -162,6 +162,14 @@ export function ChangeMemberModal({
Shared assistants remain if another workspace member has edited
them, and company assistants stay on the workspace.
+
+
The following agents will be deleted
+
+ {/* TODO ADD a filter here to make sure the user is the only author */}
+ {sharedAgents.map((agent) => (
+
{agent.name}
+ ))}
+
diff --git a/front/pages/api/v1/w/[wId]/assistant/agent_version_author.ts b/front/pages/api/v1/w/[wId]/assistant/agent_version_author.ts
index a724b8348f74..63cf5874f2e2 100644
--- a/front/pages/api/v1/w/[wId]/assistant/agent_version_author.ts
+++ b/front/pages/api/v1/w/[wId]/assistant/agent_version_author.ts
@@ -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:
@@ -121,7 +118,6 @@ async function handler(
}
const defaultAgentGetView = auth.user() ? "list" : "all";
- const agentsGetView = queryValidation.right.view ?? defaultAgentGetView;
const { agentIds } = queryValidation.right;
@@ -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,
});