refactor: Deprecate Subflow and Flow as Tool component in favor of RunFlow (#5678)

* depreciated subflow and flow as tool

* 🐛 (filterSidebar.spec.ts): update test cases to reflect changes in sidebar item names by adding [Deprecated] suffix

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Edwin Jose 2025-01-17 18:36:41 -05:00 committed by GitHub
commit aa5a4a505c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View file

@ -14,12 +14,12 @@ from langflow.schema.dotdict import dotdict
class FlowToolComponent(LCToolComponent):
display_name = "Flow as Tool"
display_name = "Flow as Tool [Deprecated]"
description = "Construct a Tool from a function that runs the loaded Flow."
field_order = ["flow_name", "name", "description", "return_direct"]
trace_type = "tool"
name = "FlowTool"
beta = True
legacy: bool = True
icon = "hammer"
async def get_flow_names(self) -> list[str]:

View file

@ -12,10 +12,10 @@ from langflow.schema import Data, dotdict
class SubFlowComponent(Component):
display_name = "Sub Flow"
display_name = "Sub Flow [Deprecated]"
description = "Generates a Component from a Flow, with all of its inputs, and "
name = "SubFlow"
beta: bool = True
legacy: bool = True
icon = "Workflow"
async def get_flow_names(self) -> list[str]:

View file

@ -124,7 +124,7 @@ test(
await expect(page.getByTestId("helpersMessage History")).toBeVisible();
await expect(page.getByTestId("vectorstoresAstra DB")).toBeVisible();
await expect(page.getByTestId("toolsSearch API")).toBeVisible();
await expect(page.getByTestId("logicSub Flow")).not.toBeVisible();
await expect(page.getByTestId("logicSub Flow [Deprecated]")).toBeVisible();
await page.getByTestId("sidebar-options-trigger").click();
await page.getByTestId("sidebar-beta-switch").isVisible({ timeout: 5000 });
@ -132,7 +132,7 @@ test(
await expect(page.getByTestId("sidebar-beta-switch")).toBeChecked();
await page.getByTestId("sidebar-options-trigger").click();
await expect(page.getByTestId("logicSub Flow")).toBeVisible();
await expect(page.getByTestId("logicSub Flow [Deprecated]")).toBeVisible();
await expect(page.getByTestId("processingSplit Text")).toBeVisible();
await expect(page.getByTestId("toolsSearch API")).toBeVisible();
@ -143,7 +143,9 @@ test(
await expect(page.getByTestId("helpersMessage History")).not.toBeVisible();
await expect(page.getByTestId("vectorstoresAstra DB")).not.toBeVisible();
await expect(page.getByTestId("toolsSearch API")).not.toBeVisible();
await expect(page.getByTestId("logicSub Flow")).not.toBeVisible();
await expect(
page.getByTestId("logicSub Flow [Deprecated]"),
).not.toBeVisible();
await expect(page.getByTestId("processingSplit Text")).not.toBeVisible();
await expect(page.getByTestId("toolsSearch API")).not.toBeVisible();