feat: change Text to Message type with backend and frontend support (#5652)

* ✨ (inputs.py): Update default prompt input types to include "MessageTextInput" for improved user experience
📝 (styleUtils.ts): Add color definition for "MessageTextInput" node to enhance visual representation in the frontend

* 📝 (text.py): Update input_types for "Value" to include "Message" for better clarity
📝 (memory.py): Update input_types for "Session ID" to include "Message" for consistency
📝 (message.py): Update input_types for "Session ID" to include "Message" for uniformity
📝 (self_query.py): Update input_types for "Query" to only include "Message" for consistency
📝 (create_data.py): Update input_types for fields to only include "Message" for consistency
📝 (update_data.py): Update input_types for fields to only include "Message" for consistency
📝 (inputs.py): Update DEFAULT_PROMPT_INTUT_TYPES to only include "Message" for consistency
📝 (styleUtils.ts): Remove "MessageTextInput" from nodeColors and nodeColorsName for consistency

* 📝 (model.py): update display name from "Text" to "Message" for better clarity
📝 (url.py): update display name from "Text" to "Message" for better consistency
📝 (memory.py): update display name from "Text" to "Message" for better understanding
📝 (text.py): update display name from "Text" to "Message" for better semantics
📝 (llm_math.py): update display name from "Text" to "Message" for improved readability
📝 (runnable_executor.py): update display name from "Text" to "Message" for better context
📝 (sql_generator.py): update display name from "Text" to "Message" for clearer communication
📝 (text.py): update display name from "Text" to "Message" for better consistency
📝 (parse_data.py): update display name from "Text" to "Message" for enhanced understanding
📝 (wikidata_api.py): update display name from "Text" to "Message" for improved semantics
📝 (test_cycles.py): update display name from "Text" to "Message" for better clarity

* [autofix.ci] apply automated fixes

* 🔧 (App.css): change width property value to fit-content to improve layout responsiveness

* fix: resolve merge conflicts and clean up URLComponent implementation in starter projects

- Removed conflicting sections in the JSON files for 'Custom Component Maker' and 'Graph Vector Store RAG'.
- Ensured the URLComponent class is correctly defined with methods for URL validation and content fetching.
- Updated input and output definitions for better clarity and functionality.

* 🐛 (freeze.spec.ts): fix incorrect test selectors for handle-textinput-shownode and handle-parsedata-shownode elements to match updated element IDs

* 📝 (NodeOutputfield/index.tsx): Add id prop to InspectButton component for better identification
🔧 (freeze-path.spec.ts, freeze.spec.ts, stop-building.spec.ts, decisionFlow.spec.ts, similarity.spec.ts, textInputOutput.spec.ts, generalBugs-shard-5.spec.ts, fileUploadComponent.spec.ts): Update test selectors to match changes in UI components for better test accuracy

* ✨ (duckduckgo.spec.ts): update the test to click on a specific element with the test ID "output-inspection-data-duckduckgosearch" instead of "output-inspection-data" to match the updated frontend implementation.

* ✨ (youtube-transcripts.spec.ts): update selector for clicking on transcript element to match changes in the frontend code, ensuring the test remains accurate

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2025-01-20 17:36:46 -03:00 • committed by GitHub
commit 9dc6c24180
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 186 additions and 156 deletions

View file

@ -65,14 +65,20 @@ test(
timeout: 15000,
});
await page.getByTestId("output-inspection-text").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const randomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").first().click();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.waitForSelector('[data-testid="default_slider_display_value"]', {
timeout: 1000,
@ -95,14 +101,20 @@ test(
timeout: 15000,
});
await page.getByTestId("output-inspection-text").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const secondRandomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").first().click();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
await page.waitForSelector("text=OpenAI", {
timeout: 1000,
@ -140,14 +152,20 @@ test(
timeout: 15000,
});
await page.getByTestId("output-inspection-text").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
const thirdRandomTextGeneratedByAI = await page
.getByPlaceholder("Empty")
.first()
.inputValue();
await page.getByText("Close").first().click();
await page.getByText("Close").last().click();
await page.getByText("Close").last().click();
expect(randomTextGeneratedByAI).not.toEqual(secondRandomTextGeneratedByAI);
expect(randomTextGeneratedByAI).not.toEqual(thirdRandomTextGeneratedByAI);

View file

@ -126,7 +126,7 @@ test(
//connection 2
const textOutput = await page
.getByTestId("handle-textinput-shownode-text-right")
.getByTestId("handle-textinput-shownode-message-right")
.nth(0);
await textOutput.hover();
await page.mouse.down();
@ -150,7 +150,7 @@ test(
//connection 4
const parseDataOutput = await page
.getByTestId("handle-parsedata-shownode-text-right")
.getByTestId("handle-parsedata-shownode-message-right")
.nth(0);
await parseDataOutput.hover();
await page.mouse.down();
@ -177,11 +177,17 @@ test(
timeout: 15000,
});
await page.waitForSelector('[data-testid="output-inspection-message"]', {
timeout: 1000,
});
await page.waitForSelector(
'[data-testid="output-inspection-message-chatoutput"]',
{
timeout: 1000,
},
);
await page.getByTestId("output-inspection-message").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
@ -203,11 +209,17 @@ test(
timeout: 15000,
});
await page.waitForSelector('[data-testid="output-inspection-message"]', {
timeout: 1000,
});
await page.waitForSelector(
'[data-testid="output-inspection-message-chatoutput"]',
{
timeout: 1000,
},
);
await page.getByTestId("output-inspection-message").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
@ -253,11 +265,17 @@ test(
timeout: 15000,
});
await page.waitForSelector('[data-testid="output-inspection-message"]', {
timeout: 1000,
});
await page.waitForSelector(
'[data-testid="output-inspection-message-chatoutput"]',
{
timeout: 1000,
},
);
await page.getByTestId("output-inspection-message").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();
@ -292,11 +310,17 @@ test(
timeout: 15000,
});
await page.waitForSelector('[data-testid="output-inspection-message"]', {
timeout: 1000,
});
await page.waitForSelector(
'[data-testid="output-inspection-message-chatoutput"]',
{
timeout: 1000,
},
);
await page.getByTestId("output-inspection-message").first().click();
await page
.getByTestId("output-inspection-message-chatoutput")
.first()
.click();
await page.getByRole("gridcell").nth(4).click();

View file

@ -117,7 +117,7 @@ test(
//
const elementsTextOutputRight = await page
.locator('[data-testid="handle-textoutput-shownode-text-right"]')
.locator('[data-testid="handle-textoutput-shownode-message-right"]')
.all();
for (const element of elementsTextOutputRight) {

View file

@ -89,7 +89,7 @@ test(
//connection 2
const textOutput = await page
.getByTestId("handle-textinput-shownode-text-right")
.getByTestId("handle-textinput-shownode-message-right")
.nth(0);
await textOutput.hover();
await page.mouse.down();
@ -113,7 +113,7 @@ test(
//connection 4
const parseDataOutput = await page
.getByTestId("handle-parsedata-shownode-text-right")
.getByTestId("handle-parsedata-shownode-message-right")
.nth(0);
await parseDataOutput.hover();
await page.mouse.down();