Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(platform): preserve LinkedIn and TikTok in block names (#15504)

Nicholas Tindle7eb63e69af07
diff --git a/autogpt_platform/backend/backend/api/features/store/text_utils_test.py b/autogpt_platform/backend/backend/api/features/store/text_utils_test.py
index 3022802a7d..c27d806602 100644
--- a/autogpt_platform/backend/backend/api/features/store/text_utils_test.py
+++ b/autogpt_platform/backend/backend/api/features/store/text_utils_test.py
@@ -43,6 +43,8 @@ from backend.util.text import split_camelcase
("AutoGPTAgent", "AutoGPT Agent"),
("GitHubIntegration", "GitHub Integration"),
("LinkedInBlock", "LinkedIn Block"),
+ ("PostToLinkedInBlock", "Post To LinkedIn Block"),
+ ("PostToTikTokBlock", "Post To TikTok Block"),
("AllQuietGetOnCallBlock", "AllQuiet Get On Call Block"),
("AnySearchExtractBlock", "AnySearch Extract Block"),
],
diff --git a/autogpt_platform/backend/backend/util/text.py b/autogpt_platform/backend/backend/util/text.py
index 412dc3d371..3b151ff498 100644
--- a/autogpt_platform/backend/backend/util/text.py
+++ b/autogpt_platform/backend/backend/util/text.py
@@ -140,6 +140,7 @@ _CAMELCASE_EXCEPTIONS: dict[str, str] = {
"You Tube": "YouTube",
"Git Hub": "GitHub",
"Linked In": "LinkedIn",
+ "Tik Tok": "TikTok",
"All Quiet": "AllQuiet",
"Any Search": "AnySearch",
}
diff --git a/autogpt_platform/frontend/src/lib/utils.ts b/autogpt_platform/frontend/src/lib/utils.ts
index 8731a5d219..3b88b5646c 100644
--- a/autogpt_platform/frontend/src/lib/utils.ts
+++ b/autogpt_platform/frontend/src/lib/utils.ts
@@ -166,6 +166,8 @@ const exceptionMap: Record<string, string> = {
Json: "JSON",
Ai: "AI",
"You Tube": "YouTube",
+ "Linked In": "LinkedIn",
+ "Tik Tok": "TikTok",
"All Quiet": "AllQuiet",
"Any Search": "AnySearch",
};
diff --git a/autogpt_platform/frontend/src/lib/utils/__tests__/beautify-string.test.ts b/autogpt_platform/frontend/src/lib/utils/__tests__/beautify-string.test.ts
index 508c3422a4..fb46805d9f 100644
--- a/autogpt_platform/frontend/src/lib/utils/__tests__/beautify-string.test.ts
+++ b/autogpt_platform/frontend/src/lib/utils/__tests__/beautify-string.test.ts
@@ -3,6 +3,15 @@ import { describe, expect, it } from "vitest";
import { beautifyString } from "@/lib/utils";
describe("beautifyString", () => {
+ it.each([
+ ["PostToLinkedInBlock", "Post To LinkedIn Block"],
+ ["PostToTikTokBlock", "Post To TikTok Block"],
+ ["Post To LinkedIn", "Post To LinkedIn"],
+ ["Post To TikTok", "Post To TikTok"],
+ ])("preserves social platform spelling in %s", (name, expected) => {
+ expect(beautifyString(name)).toBe(expected);
+ });
+
it("keeps brand names that the camel-case split would break apart", () => {
expect(beautifyString("AnySearchExtractBlock")).toBe(
"AnySearch Extract Block",
diff --git a/docs/integrations/README.md b/docs/integrations/README.md
index b00b20058b..e0b95ae79b 100644
--- a/docs/integrations/README.md
+++ b/docs/integrations/README.md
@@ -395,7 +395,7 @@ Below is a comprehensive list of all available blocks, categorized by their prim
| [Post To Snapchat](block-integrations/ayrshare/post_to_snapchat.md#post-to-snapchat) | Post to Snapchat using Ayrshare |
| [Post To Telegram](block-integrations/ayrshare/post_to_telegram.md#post-to-telegram) | Post to Telegram using Ayrshare |
| [Post To Threads](block-integrations/ayrshare/post_to_threads.md#post-to-threads) | Post to Threads using Ayrshare |
-| [Post To Tik Tok](block-integrations/ayrshare/post_to_tiktok.md#post-to-tik-tok) | Post to TikTok using Ayrshare |
+| [Post To TikTok](block-integrations/ayrshare/post_to_tiktok.md#post-to-tiktok) | Post to TikTok using Ayrshare |
| [Post To X](block-integrations/ayrshare/post_to_x.md#post-to-x) | Post to X / Twitter using Ayrshare |
| [Post To YouTube](block-integrations/ayrshare/post_to_youtube.md#post-to-youtube) | Post to YouTube using Ayrshare |
| [Publish To Medium](block-integrations/misc.md#publish-to-medium) | Publishes a post to Medium |
diff --git a/docs/integrations/block-integrations/ayrshare/post_to_tiktok.md b/docs/integrations/block-integrations/ayrshare/post_to_tiktok.md
index d7b09046eb..13c28ab940 100644
--- a/docs/integrations/block-integrations/ayrshare/post_to_tiktok.md
+++ b/docs/integrations/block-integrations/ayrshare/post_to_tiktok.md
@@ -3,7 +3,7 @@
Blocks for posting videos and image slideshows to TikTok using the Ayrshare social media management API.
<!-- END MANUAL -->
-## Post To Tik Tok
+## Post To TikTok
### What it is
Post to TikTok using Ayrshare