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.
refactor(frontend): remove stale feature flags and stabilize share execution (#12697)
Ubbee67dd93ee8bc
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/components/SelectedRunActions/SelectedRunActions.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/components/SelectedRunActions/SelectedRunActions.tsxindex 83c836def4..ef1103a5a0 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/components/SelectedRunActions/SelectedRunActions.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/selected-views/SelectedRunView/components/SelectedRunActions/SelectedRunActions.tsx@@ -2,7 +2,6 @@ import { GraphExecution } from "@/app/api/__generated__/models/graphExecution";import { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";import { Button } from "@/components/atoms/Button/Button";import { LoadingSpinner } from "@/components/atoms/LoadingSpinner/LoadingSpinner";-import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";import {ArrowBendLeftUpIcon,ArrowBendRightDownIcon,@@ -47,7 +46,6 @@ export function SelectedRunActions({onSelectRun: onSelectRun,});- const shareExecutionResultsEnabled = useGetFlag(Flag.SHARE_EXECUTION_RESULTS);const isRunning = run?.status === "RUNNING";if (!run || !agent) return null;@@ -104,14 +102,12 @@ export function SelectedRunActions({<EyeIcon weight="bold" size={18} className="text-zinc-700" /></Button>) : null}- {shareExecutionResultsEnabled && (- <ShareRunButton- graphId={agent.graph_id}- executionId={run.id}- isShared={run.is_shared}- shareToken={run.share_token}- />- )}+ <ShareRunButton+ graphId={agent.graph_id}+ executionId={run.id}+ isShared={run.is_shared}+ shareToken={run.share_token}+ />{canRunManually && (<><Buttondiff --git a/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts b/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.tsindex 94d1c65d55..8a4d0cd9ad 100644--- a/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts+++ b/autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts@@ -6,11 +6,6 @@ import { useFlags } from "launchdarkly-react-client-sdk";export enum Flag {BETA_BLOCKS = "beta-blocks",- NEW_BLOCK_MENU = "new-block-menu",- GRAPH_SEARCH = "graph-search",- ENABLE_ENHANCED_OUTPUT_HANDLING = "enable-enhanced-output-handling",- SHARE_EXECUTION_RESULTS = "share-execution-results",- AGENT_FAVORITING = "agent-favoriting",MARKETPLACE_SEARCH_TERMS = "marketplace-search-terms",ENABLE_PLATFORM_PAYMENT = "enable-platform-payment",ARTIFACTS = "artifacts",@@ -21,11 +16,6 @@ const isPwMockEnabled = process.env.NEXT_PUBLIC_PW_TEST === "true";const defaultFlags = {[Flag.BETA_BLOCKS]: [],- [Flag.NEW_BLOCK_MENU]: false,- [Flag.GRAPH_SEARCH]: false,- [Flag.ENABLE_ENHANCED_OUTPUT_HANDLING]: false,- [Flag.SHARE_EXECUTION_RESULTS]: false,- [Flag.AGENT_FAVORITING]: false,[Flag.MARKETPLACE_SEARCH_TERMS]: DEFAULT_SEARCH_TERMS,[Flag.ENABLE_PLATFORM_PAYMENT]: false,[Flag.ARTIFACTS]: false,