diff --git a/extension/sidepanels/sidepanel.js b/extension/sidepanels/sidepanel.js
index b4c34a4..98a4d02 100644
--- a/extension/sidepanels/sidepanel.js
+++ b/extension/sidepanels/sidepanel.js
@@ -84,60 +84,58 @@ async function fetchAINotes() {
};
// Make API request
- const response = await fetch(
- `${AMUREX_CONFIG.BASE_URL_BACKEND}/end_meeting`,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Accept: "application/json",
- },
- body: JSON.stringify(body),
- }
- );
-
- if (!response.ok) {
- throw new Error(`Server responded with ${response.status}`);
- }
-
- const data = await response.json();
-
- // Display the Notion link and meeting notes
- summaryDiv.innerHTML = `
-
${
- data.notes_content
- ? data.notes_content
- .trim()
- .split("\n")
- .filter((line) => line.trim() !== "")
- .map((line) =>
- line.startsWith("- ")
- ? `
${line.substring(2)}` // Handle list items
- : line // Keep other lines as is
- .replace(/\*\*(.*?)\*\*/g, "
$1")
- .replace(/\*(.*?)\*/g, "
$1")
- .replace(/\[(.*?)\]\((.*?)\)/g, '
$1')
- )
- .join("\n") // Restore newlines
- .replace(
- /(
.*?<\/li>)\n?(.*?<\/li>)+/g,
- (list) => ``
- ) // Wrap consecutive list items
- .replace(/\n/g, "
") // Convert remaining newlines to
- : "No meeting notes available."
- }
- `;
-
- // Display the action items with markdown formatting
- actionItemsDiv.innerHTML = `
- ${
+ data.notes_content
+ ? data.notes_content
+ .trim()
+ .split("\n")
+ .filter((line) => line.trim() !== "")
+ .map((line) =>
+ line.startsWith("- ")
+ ? `
${line.substring(2)}` // Handle list items
+ : line // Keep other lines as is
+ .replace(/\*\*(.*?)\*\*/g, "
$1")
+ .replace(/\*(.*?)\*/g, "
$1")
+ .replace(/\[(.*?)\]\((.*?)\)/g, '
$1')
+ )
+ .join("\n") // Restore newlines
+ .replace(
+ /(
.*?<\/li>)\n?(.*?<\/li>)+/g,
+ (list) => ``
+ ) // Wrap consecutive list items
+ .replace(/\n/g, "
") // Convert remaining newlines to
+ : "No meeting notes available."
+ }
+ `;
+
+ // Display the action items with markdown formatting
+ actionItemsDiv.innerHTML = `
+ Failed to generate meeting notes. Please try again later.
";
+ actionItemsDiv.innerHTML = "