refactor: Move RetrieverToolComponent to langchain_utilities and add legacy support (#5003)

* ✨ (langchain_utilities): add RetrieverToolComponent to langchain_utilities package
♻️ (tools): remove RetrieverToolComponent from tools package to avoid duplication and improve organization

* style: fix import block un-sorted

* 🔧 (twoEdges.spec.ts): remove unnecessary click on "input-inspection-retriever" element to improve test clarity and efficiency

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2024-12-03 15:21:26 -03:00 • committed by GitHub
commit 728a86aab0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 2 deletions

View file

@ -36,7 +36,17 @@ test(
await page.waitForTimeout(1000);
let modelElement = await page.getByTestId("toolsRetrieverTool");
await page.getByTestId("sidebar-options-trigger").click();
await page
.getByTestId("sidebar-legacy-switch")
.isVisible({ timeout: 5000 });
await page.getByTestId("sidebar-legacy-switch").click();
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
await page.getByTestId("sidebar-options-trigger").click();
let modelElement = await page.getByTestId(
"langchain_utilitiesRetrieverTool",
);
let targetElement = await page.locator('//*[@id="react-flow-id"]');
await modelElement.dragTo(targetElement);