diff --git a/docs/docs/components/agents.mdx b/docs/docs/components/agents.mdx index f8917e4e2..cdc49a76d 100644 --- a/docs/docs/components/agents.mdx +++ b/docs/docs/components/agents.mdx @@ -1,11 +1,13 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Agents -

- We appreciate your understanding as we polish our documentation โ€“ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ We appreciate your understanding as we polish our documentation โ€“ it may + contain some rough edges. Share your feedback or report issues to help us + improve! ๐Ÿ› ๏ธ๐Ÿ“ +

Agents are components that use reasoning to make decisions and take actions, designed to autonomously perform tasks or provide services with some degree of agency. LLM chains can only perform hardcoded sequences of actions, while agents use LLMs to reason through which actions to take, and in which order. @@ -87,4 +89,4 @@ The `ZeroShotAgent` uses the ReAct framework to decide which tool to use based o **Parameters**: - **Allowed Tools:** The tools accessible to the agent. -- **LLM Chain:** The LLM Chain used by the agent. \ No newline at end of file +- **LLM Chain:** The LLM Chain used by the agent. diff --git a/docs/docs/components/chains.mdx b/docs/docs/components/chains.mdx index fd3b5bd5d..91477644d 100644 --- a/docs/docs/components/chains.mdx +++ b/docs/docs/components/chains.mdx @@ -6,11 +6,11 @@ import Admonition from "@theme/Admonition"; # Chains -

- Thank you for your patience while we enhance our documentation. It may - have some imperfections. Share your feedback or report issues to help us - improve! ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ Thank you for your patience while we enhance our documentation. It may have + some imperfections. Share your feedback or report issues to help us improve! + ๐Ÿ› ๏ธ๐Ÿ“ +

Chains, in the context of language models, refer to a series of calls made to a language model. This approach allows for using the output of one call as the input for another. Different chain types facilitate varying complexity levels, making them useful for creating pipelines and executing specific scenarios. diff --git a/docs/docs/components/data.mdx b/docs/docs/components/data.mdx index ca81bd225..d7f525d7d 100644 --- a/docs/docs/components/data.mdx +++ b/docs/docs/components/data.mdx @@ -1,4 +1,4 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Data diff --git a/docs/docs/components/embeddings.mdx b/docs/docs/components/embeddings.mdx index 4978ff354..200e0ccf3 100644 --- a/docs/docs/components/embeddings.mdx +++ b/docs/docs/components/embeddings.mdx @@ -4,113 +4,113 @@ Used to load embedding models from [Amazon Bedrock](https://aws.amazon.com/bedrock/). -| **Parameter** | **Type** | **Description** | **Default** | -|-----------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------|-------------| -| `credentials_profile_name` | `str` | Name of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information. | | -| `model_id` | `str` | ID of the model to call, e.g., `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API. | | -| `endpoint_url` | `str` | URL to set a specific service endpoint other than the default AWS endpoint. | | -| `region_name` | `str` | AWS region to use, e.g., `us-west-2`. Falls back to `AWS_DEFAULT_REGION` environment variable or region specified in ~/.aws/config if not provided. | | +| **Parameter** | **Type** | **Description** | **Default** | +| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | +| `credentials_profile_name` | `str` | Name of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information. | | +| `model_id` | `str` | ID of the model to call, e.g., `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API. | | +| `endpoint_url` | `str` | URL to set a specific service endpoint other than the default AWS endpoint. | | +| `region_name` | `str` | AWS region to use, e.g., `us-west-2`. Falls back to `AWS_DEFAULT_REGION` environment variable or region specified in ~/.aws/config if not provided. | | ## Cohere Embeddings Used to load embedding models from [Cohere](https://cohere.com/). -| **Parameter** | **Type** | **Description** | **Default** | -|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------| -| `cohere_api_key` | `str` | API key required to authenticate with the Cohere service. | | -| `model` | `str` | Language model used for embedding text documents and performing queries. | `embed-english-v2.0` | -| `truncate` | `bool` | Whether to truncate the input text to fit within the model's constraints. | `False` | +| **Parameter** | **Type** | **Description** | **Default** | +| ---------------- | -------- | ------------------------------------------------------------------------- | -------------------- | +| `cohere_api_key` | `str` | API key required to authenticate with the Cohere service. | | +| `model` | `str` | Language model used for embedding text documents and performing queries. | `embed-english-v2.0` | +| `truncate` | `bool` | Whether to truncate the input text to fit within the model's constraints. | `False` | ## Azure OpenAI Embeddings Generate embeddings using Azure OpenAI models. -| **Parameter** | **Type** | **Description** | **Default** | -|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------| -| `Azure Endpoint` | `str` | Your Azure endpoint, including the resource. Example: `https://example-resource.azure.openai.com/` | | -| `Deployment Name` | `str` | The name of the deployment. | | -| `API Version` | `str` | The API version to use, options include various dates. | | -| `API Key` | `str` | The API key to access the Azure OpenAI service. | | +| **Parameter** | **Type** | **Description** | **Default** | +| ----------------- | -------- | -------------------------------------------------------------------------------------------------- | ----------- | +| `Azure Endpoint` | `str` | Your Azure endpoint, including the resource. Example: `https://example-resource.azure.openai.com/` | | +| `Deployment Name` | `str` | The name of the deployment. | | +| `API Version` | `str` | The API version to use, options include various dates. | | +| `API Key` | `str` | The API key to access the Azure OpenAI service. | | ## Hugging Face API Embeddings Generate embeddings using Hugging Face Inference API models. -| **Parameter** | **Type** | **Description** | **Default** | -|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------| -| `API Key` | `str` | API key for accessing the Hugging Face Inference API. | | -| `API URL` | `str` | URL of the Hugging Face Inference API. | `http://localhost:8080` | -| `Model Name` | `str` | Name of the model to use for embeddings. | `BAAI/bge-large-en-v1.5` | -| `Cache Folder` | `str` | Folder path to cache Hugging Face models. | | -| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | | -| `Model Kwargs` | `dict` | Additional arguments for the model. | | -| `Multi Process` | `bool` | Whether to use multiple processes. | `False` | +| **Parameter** | **Type** | **Description** | **Default** | +| --------------- | -------- | ----------------------------------------------------- | ------------------------ | +| `API Key` | `str` | API key for accessing the Hugging Face Inference API. | | +| `API URL` | `str` | URL of the Hugging Face Inference API. | `http://localhost:8080` | +| `Model Name` | `str` | Name of the model to use for embeddings. | `BAAI/bge-large-en-v1.5` | +| `Cache Folder` | `str` | Folder path to cache Hugging Face models. | | +| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | | +| `Model Kwargs` | `dict` | Additional arguments for the model. | | +| `Multi Process` | `bool` | Whether to use multiple processes. | `False` | ## Hugging Face Embeddings Used to load embedding models from [HuggingFace](https://huggingface.co). -| **Parameter** | **Type** | **Description** | **Default** | -|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------| -| `Cache Folder` | `str` | Folder path to cache HuggingFace models. | | -| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | | -| `Model Kwargs` | `dict` | Additional arguments for the model. | | -| `Model Name` | `str` | Name of the HuggingFace model to use. | `sentence-transformers/all-mpnet-base-v2` | -| `Multi Process` | `bool` | Whether to use multiple processes. | `False` | +| **Parameter** | **Type** | **Description** | **Default** | +| --------------- | -------- | ---------------------------------------------- | ----------------------------------------- | +| `Cache Folder` | `str` | Folder path to cache HuggingFace models. | | +| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | | +| `Model Kwargs` | `dict` | Additional arguments for the model. | | +| `Model Name` | `str` | Name of the HuggingFace model to use. | `sentence-transformers/all-mpnet-base-v2` | +| `Multi Process` | `bool` | Whether to use multiple processes. | `False` | ## OpenAI Embeddings Used to load embedding models from [OpenAI](https://openai.com/). -| **Parameter** | **Type** | **Description** | **Default** | -|-----------------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------| -| `OpenAI API Key` | `str` | The API key to use for accessing the OpenAI API. | | -| `Default Headers` | `Dict[str, str]` | Default headers for the HTTP requests. | | -| `Default Query` | `NestedDict` | Default query parameters for the HTTP requests. | | -| `Allowed Special` | `List[str]` | Special tokens allowed for processing. | `[]` | -| `Disallowed Special` | `List[str]` | Special tokens disallowed for processing. | `["all"]` | -| `Chunk Size` | `int` | Chunk size for processing. | `1000` | -| `Client` | `Any` | HTTP client for making requests. | | -| `Deployment` | `str` | Deployment name for the model. | `text-embedding-3-small` | -| `Embedding Context Length` | `int` | Length of embedding context. | `8191` | -| `Max Retries` | `int` | Maximum number of retries for failed requests. | `6` | -| `Model` | `str` | Name of the model to use. | `text-embedding-3-small` | -| `Model Kwargs` | `NestedDict` | Additional keyword arguments for the model. | | -| `OpenAI API Base` | `str` | Base URL of the OpenAI API. | | -| `OpenAI API Type` | `str` | Type of the OpenAI API. | | -| `OpenAI API Version` | `str` | Version of the OpenAI API. | | -| `OpenAI Organization` | `str` | Organization associated with the API key. | | -| `OpenAI Proxy` | `str` | Proxy server for the requests. | | -| `Request Timeout` | `float` | Timeout for the HTTP requests. | | -| `Show Progress Bar` | `bool` | Whether to show a progress bar for processing. | `False` | -| `Skip Empty` | `bool` | Whether to skip empty inputs. | `False` | -| `TikToken Enable` | `bool` | Whether to enable TikToken. | `True` | -| `TikToken Model Name` | `str` | Name of the TikToken model. | | +| **Parameter** | **Type** | **Description** | **Default** | +| -------------------------- | ---------------- | ------------------------------------------------ | ------------------------ | +| `OpenAI API Key` | `str` | The API key to use for accessing the OpenAI API. | | +| `Default Headers` | `Dict[str, str]` | Default headers for the HTTP requests. | | +| `Default Query` | `NestedDict` | Default query parameters for the HTTP requests. | | +| `Allowed Special` | `List[str]` | Special tokens allowed for processing. | `[]` | +| `Disallowed Special` | `List[str]` | Special tokens disallowed for processing. | `["all"]` | +| `Chunk Size` | `int` | Chunk size for processing. | `1000` | +| `Client` | `Any` | HTTP client for making requests. | | +| `Deployment` | `str` | Deployment name for the model. | `text-embedding-3-small` | +| `Embedding Context Length` | `int` | Length of embedding context. | `8191` | +| `Max Retries` | `int` | Maximum number of retries for failed requests. | `6` | +| `Model` | `str` | Name of the model to use. | `text-embedding-3-small` | +| `Model Kwargs` | `NestedDict` | Additional keyword arguments for the model. | | +| `OpenAI API Base` | `str` | Base URL of the OpenAI API. | | +| `OpenAI API Type` | `str` | Type of the OpenAI API. | | +| `OpenAI API Version` | `str` | Version of the OpenAI API. | | +| `OpenAI Organization` | `str` | Organization associated with the API key. | | +| `OpenAI Proxy` | `str` | Proxy server for the requests. | | +| `Request Timeout` | `float` | Timeout for the HTTP requests. | | +| `Show Progress Bar` | `bool` | Whether to show a progress bar for processing. | `False` | +| `Skip Empty` | `bool` | Whether to skip empty inputs. | `False` | +| `TikToken Enable` | `bool` | Whether to enable TikToken. | `True` | +| `TikToken Model Name` | `str` | Name of the TikToken model. | | ## Ollama Embeddings Generate embeddings using Ollama models. -| **Parameter** | **Type** | **Description** | **Default** | -|---------------------|-------------------|--------------------------------------------------------------------------------------------------------------------|---------------------------| -| `Ollama Model` | `str` | Name of the Ollama model to use. | `llama2` | -| `Ollama Base URL` | `str` | Base URL of the Ollama API. | `http://localhost:11434` | -| `Model Temperature` | `float` | Temperature parameter for the model. Adjusts the randomness in the generated embeddings. | | +| **Parameter** | **Type** | **Description** | **Default** | +| ------------------- | -------- | ---------------------------------------------------------------------------------------- | ------------------------ | +| `Ollama Model` | `str` | Name of the Ollama model to use. | `llama2` | +| `Ollama Base URL` | `str` | Base URL of the Ollama API. | `http://localhost:11434` | +| `Model Temperature` | `float` | Temperature parameter for the model. Adjusts the randomness in the generated embeddings. | | ## VertexAI Embeddings Wrapper around [Google Vertex AI](https://cloud.google.com/vertex-ai) [Embeddings API](https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings). -| **Parameter** | **Type** | **Description** | **Default** | -|-----------------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------| -| `credentials` | `Credentials` | The default custom credentials to use. | | -| `location` | `str` | The default location to use when making API calls. | `us-central1`| -| `max_output_tokens` | `int` | Token limit determines the maximum amount of text output from one prompt. | `128` | -| `model_name` | `str` | The name of the Vertex AI large language model. | `text-bison`| -| `project` | `str` | The default GCP project to use when making Vertex API calls. | | -| `request_parallelism` | `int` | The amount of parallelism allowed for requests issued to VertexAI models. | `5` | -| `temperature` | `float` | Tunes the degree of randomness in text generations. Should be a non-negative value. | `0` | -| `top_k` | `int` | How the model selects tokens for output, the next token is selected from the top `k` tokens. | `40` | -| `top_p` | `float` | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. | `0.95` | -| `tuned_model_name` | `str` | The name of a tuned model. If provided, `model_name` is ignored. | | -| `verbose` | `bool` | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. | `False` | +| **Parameter** | **Type** | **Description** | **Default** | +| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------- | +| `credentials` | `Credentials` | The default custom credentials to use. | | +| `location` | `str` | The default location to use when making API calls. | `us-central1` | +| `max_output_tokens` | `int` | Token limit determines the maximum amount of text output from one prompt. | `128` | +| `model_name` | `str` | The name of the Vertex AI large language model. | `text-bison` | +| `project` | `str` | The default GCP project to use when making Vertex API calls. | | +| `request_parallelism` | `int` | The amount of parallelism allowed for requests issued to VertexAI models. | `5` | +| `temperature` | `float` | Tunes the degree of randomness in text generations. Should be a non-negative value. | `0` | +| `top_k` | `int` | How the model selects tokens for output, the next token is selected from the top `k` tokens. | `40` | +| `top_p` | `float` | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. | `0.95` | +| `tuned_model_name` | `str` | The name of a tuned model. If provided, `model_name` is ignored. | | +| `verbose` | `bool` | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. | `False` | diff --git a/docs/docs/components/experimental.mdx b/docs/docs/components/experimental.mdx index 8e503da06..7664b0406 100644 --- a/docs/docs/components/experimental.mdx +++ b/docs/docs/components/experimental.mdx @@ -1,4 +1,4 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Experimental @@ -29,10 +29,12 @@ This component extracts specified keys from a record. **Parameters** - **Record:** + - **Display Name:** Record - **Info:** The record from which to extract keys. - **Keys:** + - **Display Name:** Keys - **Info:** The keys to be extracted. @@ -54,6 +56,7 @@ This component turns a function running a flow into a Tool. **Parameters** - **Flow Name:** + - **Display Name:** Flow Name - **Info:** Select the flow to run. - **Options:** List of available flows. @@ -61,10 +64,12 @@ This component turns a function running a flow into a Tool. - **Refresh Button:** True - **Name:** + - **Display Name:** Name - **Description:** The tool's name. - **Description:** + - **Display Name:** Description - **Description:** Describes the tool. @@ -127,10 +132,12 @@ This component generates a notification. **Parameters** - **Name:** + - **Display Name:** Name - **Info:** The notification's name. - **Record:** + - **Display Name:** Record - **Info:** Optionally, a record to store in the notification. @@ -151,10 +158,12 @@ This component runs a specified flow. **Parameters** - **Input Value:** + - **Display Name:** Input Value - **Multiline:** True - **Flow Name:** + - **Display Name:** Flow Name - **Info:** Select the flow to run. - **Options:** List of available flows. @@ -177,14 +186,17 @@ This component executes a specified runnable. **Parameters** - **Input Key:** + - **Display Name:** Input Key - **Info:** The input key. - **Inputs:** + - **Display Name:** Inputs - **Info:** Inputs for the runnable. - **Runnable:** + - **Display Name:** Runnable - **Info:** The runnable to execute. @@ -205,14 +217,17 @@ This component executes an SQL query. **Parameters** - **Database URL:** + - **Display Name:** Database URL - **Info:** The database's URL. - **Include Columns:** + - **Display Name:** Include Columns - **Info:** Whether to include columns in the result. - **Passthrough:** + - **Display Name:** Passthrough - **Info:** Returns the query instead of raising an exception if an error occurs. @@ -233,10 +248,12 @@ This component dynamically generates a tool from a flow. **Parameters** - **Input Value:** + - **Display Name:** Input Value - **Multiline:** True - **Flow Name:** + - **Display Name:** Flow Name - **Info:** Select the flow to run. - **Options:** List of available flows. diff --git a/docs/docs/components/helpers.mdx b/docs/docs/components/helpers.mdx index ff95eab7e..f95c43b9d 100644 --- a/docs/docs/components/helpers.mdx +++ b/docs/docs/components/helpers.mdx @@ -1,4 +1,4 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Helpers @@ -49,9 +49,10 @@ Use this component as a template to create your custom component. - **Parameter:** Describe the purpose of this parameter. -

- Customize the build_config and build methods according to your requirements. -

+

+ Customize the build_config and build methods + according to your requirements. +

Learn more about creating custom components at [Custom Component](http://docs.langflow.org/components/custom). diff --git a/docs/docs/components/memories.mdx b/docs/docs/components/memories.mdx index f4002844e..a133c6a6a 100644 --- a/docs/docs/components/memories.mdx +++ b/docs/docs/components/memories.mdx @@ -1,11 +1,13 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Memories -

- Thanks for your patience as we improve our documentationโ€”it might have some rough edges. Share your feedback or report issues to help us enhance it! ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ Thanks for your patience as we improve our documentationโ€”it might have some + rough edges. Share your feedback or report issues to help us enhance it! + ๐Ÿ› ๏ธ๐Ÿ“ +

Memory is a concept in chat-based applications that allows the system to remember previous interactions. This capability helps maintain the context of the conversation and enables the system to understand new messages in light of past messages. @@ -24,9 +26,13 @@ This component retrieves stored messages using various filters such as sender ty - **number_of_messages**: Specifies the number of messages to retrieve. Defaults to `5`. Determines the number of recent messages from the chat history to fetch. -

- The component retrieves messages based on the provided criteria, including the specific file path for stored messages. If no specific criteria are provided, it returns the most recent messages up to the specified limit. This component can be used to review past interactions and analyze conversation flows. -

+

+ The component retrieves messages based on the provided criteria, including + the specific file path for stored messages. If no specific criteria are + provided, it returns the most recent messages up to the specified limit. + This component can be used to review past interactions and analyze + conversation flows. +

### ConversationBufferMemory @@ -84,7 +90,8 @@ The `ConversationKGMemory` utilizes a knowledge graph to enhance memory capabili - **memory_key**: Specifies the prompt variable name where the memory stores and retrieves chat messages. Defaults to `chat_history`. - **output_key**: Identifies the key under which the generated response - is stored, enabling retrieval using this key. +is stored, enabling retrieval using this key. + - **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`. --- @@ -124,4 +131,4 @@ The `VectorRetrieverMemory` retrieves vectors based on queries, facilitating vec - **Retriever**: The tool used to fetch documents. - **input_key**: Identifies where input messages are stored in the memory object, facilitating their retrieval and manipulation. - **memory_key**: Specifies the prompt variable name where the memory stores and retrieves chat messages. Defaults to `chat_history`. -- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`. \ No newline at end of file +- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`. diff --git a/docs/docs/components/model_specs.mdx b/docs/docs/components/model_specs.mdx index 3ed3d60ca..9da89de3f 100644 --- a/docs/docs/components/model_specs.mdx +++ b/docs/docs/components/model_specs.mdx @@ -1,11 +1,13 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Large Language Models (LLMs) -

- Thank you for your patience as we refine our documentation. You might encounter some inconsistencies. Please help us improve by sharing your feedback or reporting any issues! ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ Thank you for your patience as we refine our documentation. You might + encounter some inconsistencies. Please help us improve by sharing your + feedback or reporting any issues! ๐Ÿ› ๏ธ๐Ÿ“ +

A Large Language Model (LLM) is a foundational component of Langflow. It provides a uniform interface for interacting with LLMs from various providers, including OpenAI, Cohere, and HuggingFace. Langflow extensively uses LLMs across its chains and agents, employing them to generate text based on specific prompts or inputs. @@ -37,7 +39,9 @@ This is a wrapper for Anthropic's large language model designed for chat-based i `CTransformers` provides access to Transformer models implemented in C/C++ using the [GGML](https://github.com/ggerganov/ggml) library. -Ensure the `ctransformers` Python package is installed. Discover more about installation, supported models, and usage [here](https://github.com/marella/ctransformers). + Ensure the `ctransformers` Python package is installed. Discover more about + installation, supported models, and usage + [here](https://github.com/marella/ctransformers). - **config:** This configuration is for the Transformer models. Check the default settings and possible configurations at [config](https://github.com/marella/ctransformers#config). @@ -128,7 +132,8 @@ This component integrates with [Google Vertex AI](https://cloud.google.com/verte - **credentials**: Custom - credentials used for API interactions. +credentials used for API interactions. + - **location**: The default location for API calls, defaulting to `us-central1`. - **max_output_tokens**: Limits the output tokens per prompt, defaulting to `128`. - **model_name**: The name of the Vertex AI model in use, defaulting to `text-bison`. @@ -140,4 +145,4 @@ This component integrates with [Google Vertex AI](https://cloud.google.com/verte - **tuned_model_name**: Specifies a tuned model name, which overrides the default model name if provided. - **verbose**: Controls the output verbosity to assist in debugging and understanding the operational details, defaulting to `False`. ---- \ No newline at end of file +--- diff --git a/docs/docs/components/retrievers.mdx b/docs/docs/components/retrievers.mdx index 825842df7..f86695e37 100644 --- a/docs/docs/components/retrievers.mdx +++ b/docs/docs/components/retrievers.mdx @@ -1,11 +1,13 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Retrievers -

- We appreciate your patience as we enhance our documentation. It may have some imperfections. Please share your feedback or report issues to help us improve. ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ We appreciate your patience as we enhance our documentation. It may have + some imperfections. Please share your feedback or report issues to help us + improve. ๐Ÿ› ๏ธ๐Ÿ“ +

A retriever is an interface that returns documents in response to an unstructured query. It's broader than a vector store because it doesn't need to store documents; it only needs to retrieve them. diff --git a/docs/docs/components/tools.mdx b/docs/docs/components/tools.mdx index 940c304eb..25d458360 100644 --- a/docs/docs/components/tools.mdx +++ b/docs/docs/components/tools.mdx @@ -1,11 +1,13 @@ -import Admonition from '@theme/Admonition'; +import Admonition from "@theme/Admonition"; # Tools -

- Thanks for your patience as we refine our documentation. It might have some rough edges currently. Please share your feedback or report issues to help us enhance it! ๐Ÿ› ๏ธ๐Ÿ“ -

+

+ Thanks for your patience as we refine our documentation. It might have some + rough edges currently. Please share your feedback or report issues to help + us enhance it! ๐Ÿ› ๏ธ๐Ÿ“ +

### SearchApi diff --git a/docs/docs/components/utilities.mdx b/docs/docs/components/utilities.mdx index 5f2a86d4d..8ef1f91c8 100644 --- a/docs/docs/components/utilities.mdx +++ b/docs/docs/components/utilities.mdx @@ -3,9 +3,9 @@ import Admonition from "@theme/Admonition"; # Utilities - We appreciate your understanding as we polish our documentationโ€”it may - contain some rough edges. Share your feedback or report issues to help us - improve! ๐Ÿ› ๏ธ๐Ÿ“ + We appreciate your understanding as we polish our documentationโ€”it may contain + some rough edges. Share your feedback or report issues to help us improve! + ๐Ÿ› ๏ธ๐Ÿ“ Utilities are a set of actions that can be used to perform common tasks in a flow. They are available in the **Utilities** section in the sidebar. @@ -86,7 +86,11 @@ Generates a unique identifier (UUID) for each instance it is invoked, providing - Returns a unique identifier (UUID) as a string. This UUID is generated using Python's `uuid` module, ensuring that each identifier is unique and can be used as a reliable reference in your application. - The Unique ID Generator is crucial for scenarios requiring distinct identifiers, such as session management, transaction tracking, or any context where different instances or entities must be uniquely identified. The generated UUID is provided as a hexadecimal string, offering a high level of uniqueness and security for identification purposes. + The Unique ID Generator is crucial for scenarios requiring distinct + identifiers, such as session management, transaction tracking, or any context + where different instances or entities must be uniquely identified. The + generated UUID is provided as a hexadecimal string, offering a high level of + uniqueness and security for identification purposes. For additional information and examples, please consult the [Langflow Components Custom Documentation](http://docs.langflow.org/components/custom). diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index 5e623aab4..c4a1ee671 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -60,6 +60,7 @@ "react-dom": "^18.2.21", "react-error-boundary": "^4.0.11", "react-hook-form": "^7.51.4", + "react-hotkeys-hook": "^4.5.0", "react-icons": "^5.0.1", "react-laag": "^2.0.5", "react-markdown": "^8.0.7", @@ -11022,6 +11023,15 @@ "react": "^16.8.0 || ^17 || ^18" } }, + "node_modules/react-hotkeys-hook": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-4.5.0.tgz", + "integrity": "sha512-Samb85GSgAWFQNvVt3PS90LPPGSf9mkH/r4au81ZP1yOIFayLC3QAvqTgGtJ8YEDMXtPmaVBs6NgipHO6h4Mug==", + "peerDependencies": { + "react": ">=16.8.1", + "react-dom": ">=16.8.1" + } + }, "node_modules/react-icons": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.2.1.tgz", diff --git a/src/frontend/package.json b/src/frontend/package.json index c9219b5e5..c069b9da1 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -6,6 +6,7 @@ "@headlessui/react": "^1.7.17", "@hookform/resolvers": "^3.3.4", "@million/lint": "^0.0.73", + "react-hotkeys-hook": "^4.5.0", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dialog": "^1.0.4", diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx index 0fefff800..dea103b37 100644 --- a/src/frontend/src/CustomNodes/GenericNode/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx @@ -36,7 +36,7 @@ import getFieldTitle from "../utils/get-field-title"; import sortFields from "../utils/sort-fields"; import ParameterComponent from "./components/parameterComponent"; import { postCustomComponent } from "../../controllers/API"; -import { cloneDeep } from "lodash"; +import { useShortcutsStore } from "../../stores/shortcuts"; export default function GenericNode({ data, @@ -137,6 +137,8 @@ export default function GenericNode({ return names; }; + // const [openWDoubleCLick, setOpenWDoubleCLick] = useState(false); + const getBaseBorderClass = (selected) => { let className = selected ? "border border-ring" : "border"; let frozenClass = selected ? "border-ring-frozen" : "border-frozen"; @@ -231,10 +233,14 @@ export default function GenericNode({ } }; + const shortcuts = useShortcutsStore((state) => state.shortcuts); + const memoizedNodeToolbarComponent = useMemo(() => { return ( { takeSnapshot(); @@ -266,11 +272,18 @@ export default function GenericNode({ updateNodeCode, isOutdated, selected, + shortcuts, + // openWDoubleCLick, + // setOpenWDoubleCLick, ]); return ( <> {memoizedNodeToolbarComponent}
{ + // if (!isWrappedWithClass(event, "nodoubleclick")) + // setOpenWDoubleCLick(true); + // }} className={getNodeBorderClassName( selected, showNode, @@ -344,7 +357,7 @@ export default function GenericNode({ event.preventDefault(); }} data-testid={"title-" + data.node?.display_name} - className="generic-node-tooltip-div cursor-text text-primary" + className="nodoubleclick generic-node-tooltip-div cursor-text text-primary" > {data.node?.display_name}
@@ -592,7 +605,7 @@ export default function GenericNode({ ) : (
(false); + const [openCodeModal, setOpenCodeModal] = useState(false); + const [openShareModal, setOpenShareModal] = useState(false); + function handleAPIWShortcut(e: KeyboardEvent) { + if (isThereModal() && !openCodeModal) return; + setOpenCodeModal((oldOpen) => !oldOpen); + } + + function handleChatWShortcut(e: KeyboardEvent) { + if (isThereModal() && !open) return; + if (useFlowStore.getState().hasIO) { + setOpen((oldState) => !oldState); + } + } + + function handleShareWShortcut(e: KeyboardEvent) { + if (isThereModal() && !openShareModal) return; + setOpenShareModal((oldState) => !oldState); + } + + const openPlayground = useShortcutsStore((state) => state.open); + const api = useShortcutsStore((state) => state.api); + const flow = useShortcutsStore((state) => state.flow); + + useHotkeys(openPlayground, handleChatWShortcut, { preventDefault }); + useHotkeys(api, handleAPIWShortcut, { preventDefault }); + useHotkeys(flow, handleShareWShortcut, { preventDefault }); + const hasIO = useFlowStore((state) => state.hasIO); const hasStore = useStoreStore((state) => state.hasStore); const validApiKey = useStoreStore((state) => state.validApiKey); const hasApiKey = useStoreStore((state) => state.hasApiKey); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); - useEffect(() => { - const handleKeyDown = (event: KeyboardEvent) => { - if ( - (event.key === "K" || event.key === "k") && - (event.metaKey || event.ctrlKey) && - useFlowStore.getState().hasIO - ) { - event.preventDefault(); - setOpen((oldState) => !oldState); - } - }; - document.addEventListener("keydown", handleKeyDown); - return () => { - document.removeEventListener("keydown", handleKeyDown); - }; - }, []); - const prevNodesRef = useRef(); const ModalMemo = useMemo( @@ -43,6 +56,8 @@ export default function FlowToolbar(): JSX.Element { is_component={false} component={currentFlow!} disabled={!hasApiKey || !validApiKey || !hasStore} + open={openShareModal} + setOpen={setOpenShareModal} >
{currentFlow && currentFlow.data && ( - +
{ + const shortcuts = useShortcutsStore((state) => state.shortcuts); const addFlow = useFlowsManagerStore((state) => state.addFlow); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const setErrorData = useAlertStore((state) => state.setErrorData); @@ -113,7 +115,7 @@ export const MenuBar = ({}: {}): JSX.Element => { title: UPLOAD_ERROR_ALERT, list: [error], }); - }, + } ); }} > @@ -137,17 +139,19 @@ export const MenuBar = ({}: {}): JSX.Element => { > Undo - {navigator.userAgent.toUpperCase().includes("MAC") ? ( + {IS_MAC ? ( ) : ( - Ctrl +{" "} + { + shortcuts.find((s) => s.name.toLowerCase() === "undo") + ?.shortcut + } )} - Z { @@ -157,17 +161,19 @@ export const MenuBar = ({}: {}): JSX.Element => { > Redo - {navigator.userAgent.toUpperCase().includes("MAC") ? ( + {IS_MAC ? ( ) : ( - Ctrl +{" "} + { + shortcuts.find((s) => s.name.toLowerCase() === "redo") + ?.shortcut + } )} - Y @@ -195,7 +201,7 @@ export const MenuBar = ({}: {}): JSX.Element => { name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"} className={cn( "h-4 w-4", - isBuilding || saveLoading ? "animate-spin" : "animate-wiggle", + isBuilding || saveLoading ? "animate-spin" : "animate-wiggle" )} /> {printByBuildStatus()} diff --git a/src/frontend/src/components/renderIconComponent/index.tsx b/src/frontend/src/components/renderIconComponent/index.tsx new file mode 100644 index 000000000..241566f93 --- /dev/null +++ b/src/frontend/src/components/renderIconComponent/index.tsx @@ -0,0 +1,46 @@ +import ForwardedIconComponent from "../genericIconComponent"; + +export default function RenderIcons({ + isMac, + hasShift, + filteredShortcut, + shortcutWPlus, +}: { + isMac: boolean; + hasShift: boolean; + filteredShortcut: string[]; + shortcutWPlus: string[]; +}): JSX.Element { + return hasShift ? ( + <> + {isMac ? ( + + ) : ( + filteredShortcut[0] + )} + + {filteredShortcut.map((key, idx) => { + if (idx > 0) { + return {key.toUpperCase()} ; + } + })} + + ) : ( + <> + {shortcutWPlus[0].toLowerCase() === "space" ? ( + "Space" + ) : shortcutWPlus[0].length <= 1 ? ( + shortcutWPlus[0] + ) : isMac ? ( + + ) : ( + shortcutWPlus[0] + )} + {shortcutWPlus.map((key, idx) => { + if (idx > 0) { + return {key.toUpperCase()} ; + } + })} + + ); +} diff --git a/src/frontend/src/components/ui/select-custom.tsx b/src/frontend/src/components/ui/select-custom.tsx index 8c5223231..82ba540fe 100644 --- a/src/frontend/src/components/ui/select-custom.tsx +++ b/src/frontend/src/components/ui/select-custom.tsx @@ -33,10 +33,10 @@ const SelectContent = React.forwardRef< {children} @@ -75,7 +75,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > diff --git a/src/frontend/src/constants/constants.ts b/src/frontend/src/constants/constants.ts index 46e31ee55..df003c021 100644 --- a/src/frontend/src/constants/constants.ts +++ b/src/frontend/src/constants/constants.ts @@ -734,6 +734,91 @@ export const AUTHORIZED_DUPLICATE_REQUESTS = [ export const SAVE_DEBOUNCE_TIME = 300; +export const IS_MAC = navigator.userAgent.toUpperCase().includes("MAC"); + +export const defaultShortcuts = [ + { + name: "Advanced Settings", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Shift + A`, + }, + { + name: "Minimize", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Q`, + }, + { + name: "Code", + shortcut: `Space`, + }, + { + name: "Copy", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + C`, + }, + { + name: "Duplicate", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + D`, + }, + { + name: "Share", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Shift + S`, + }, + { + name: "Docs", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Shift + D`, + }, + { + name: "Save", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + S`, + }, + { + name: "Delete", + shortcut: "Backspace", + }, + { + name: "Open playground", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + K`, + }, + { + name: "Undo", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Z`, + }, + { + name: "Redo", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + Y`, + }, + { + name: "Group", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + G`, + }, + { + name: "Cut", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + X`, + }, + { + name: "Paste", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + V`, + }, + { + name: "API", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + R`, + }, + { + name: "Download", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + J`, + }, + { + name: "Update", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + U`, + }, + { + name: "Freeze", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + F`, + }, + { + name: "Flow Share", + shortcut: `${IS_MAC ? "Cmd" : "Ctrl"} + B`, + }, +]; + export const DEFAULT_TABLE_ALERT_MSG = `Oops! It seems there's no data to display right now. Please check back later.`; export const DEFAULT_TABLE_ALERT_TITLE = "No Data Available"; @@ -741,3 +826,6 @@ export const DEFAULT_TABLE_ALERT_TITLE = "No Data Available"; export const LOCATIONS_TO_RETURN = ["/flow/", "/settings/"]; export const MAX_BATCH_SIZE = 50; + +export const MODAL_CLASSES = + "nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"; diff --git a/src/frontend/src/icons/Groq/index.tsx b/src/frontend/src/icons/Groq/index.tsx index 291696154..6c4283d29 100644 --- a/src/frontend/src/icons/Groq/index.tsx +++ b/src/frontend/src/icons/Groq/index.tsx @@ -4,5 +4,5 @@ import SvgGroqLogo from "./GroqLogo"; export const GroqIcon = forwardRef>( (props, ref) => { return ; - } + }, ); diff --git a/src/frontend/src/modals/apiModal/index.tsx b/src/frontend/src/modals/apiModal/index.tsx new file mode 100644 index 000000000..874e93f5b --- /dev/null +++ b/src/frontend/src/modals/apiModal/index.tsx @@ -0,0 +1,252 @@ +import "ace-builds/src-noconflict/ext-language_tools"; +import "ace-builds/src-noconflict/mode-python"; +import "ace-builds/src-noconflict/theme-github"; +import "ace-builds/src-noconflict/theme-twilight"; +import { + ReactNode, + forwardRef, + useContext, + useEffect, + useRef, + useState, +} from "react"; +// import "ace-builds/webpack-resolver"; +import CodeTabsComponent from "../../components/codeTabsComponent"; +import IconComponent from "../../components/genericIconComponent"; +import { + EXPORT_CODE_DIALOG, + LANGFLOW_SUPPORTED_TYPES, +} from "../../constants/constants"; +import { AuthContext } from "../../contexts/authContext"; +import useFlowStore from "../../stores/flowStore"; +import { TemplateVariableType } from "../../types/api"; +import { tweakType, uniqueTweakType } from "../../types/components"; +import { FlowType, NodeType } from "../../types/flow/index"; +import { buildTweaks, convertArrayToObj } from "../../utils/reactflowUtils"; +import { + getCurlCode, + getPythonApiCode, + getPythonCode, + getWidgetCode, + tabsArray, +} from "../../utils/utils"; +import BaseModal from "../baseModal"; + +const ApiModal = forwardRef( + ( + { + flow, + children, + open: myOpen, + setOpen: mySetOpen, + }: { + flow: FlowType; + children: ReactNode; + open: any; + setOpen: any; + }, + ref + ) => { + const { autoLogin } = useContext(AuthContext); + const [open, setOpen] = + mySetOpen !== undefined && myOpen !== undefined + ? [myOpen, mySetOpen] + : useState(false); + const [activeTab, setActiveTab] = useState("0"); + const tweak = useRef([]); + const tweaksList = useRef([]); + const [getTweak, setTweak] = useState([]); + const flowState = useFlowStore((state) => state.flowState); + const pythonApiCode = getPythonApiCode(flow, autoLogin, tweak.current); + const curl_code = getCurlCode(flow, autoLogin, tweak.current); + const pythonCode = getPythonCode(flow, tweak.current); + const widgetCode = getWidgetCode(flow, autoLogin, flowState); + const tweaksCode = buildTweaks(flow); + const codesArray = [ + curl_code, + pythonApiCode, + pythonCode, + widgetCode, + pythonCode, + ]; + const [tabs, setTabs] = useState(tabsArray(codesArray, 0)); + + function startState() { + tweak.current = []; + setTweak([]); + tweaksList.current = []; + } + + useEffect(() => { + if (flow["data"]!["nodes"].length == 0) { + startState(); + } else { + tweak.current = []; + const t = buildTweaks(flow); + tweak.current.push(t); + } + + filterNodes(); + + if (Object.keys(tweaksCode).length > 0) { + setActiveTab("0"); + setTabs(tabsArray(codesArray, 1)); + } else { + setTabs(tabsArray(codesArray, 1)); + } + }, [flow["data"]!["nodes"], open]); + + function filterNodes() { + let arrNodesWithValues: string[] = []; + + flow["data"]!["nodes"].forEach((node) => { + if (!node["data"]["node"]["template"]) { + return; + } + Object.keys(node["data"]["node"]["template"]) + .filter( + (templateField) => + templateField.charAt(0) !== "_" && + node.data.node.template[templateField].show && + LANGFLOW_SUPPORTED_TYPES.has( + node.data.node.template[templateField].type + ) + ) + .map((n, i) => { + arrNodesWithValues.push(node["id"]); + }); + }); + + tweaksList.current = arrNodesWithValues.filter((value, index, self) => { + return self.indexOf(value) === index; + }); + } + function buildTweakObject( + tw: string, + changes: string | string[] | boolean | number | Object[] | Object, + template: TemplateVariableType + ) { + if (typeof changes === "string" && template.type === "float") { + changes = parseFloat(changes); + } + if (typeof changes === "string" && template.type === "int") { + changes = parseInt(changes); + } + if (template.list === true && Array.isArray(changes)) { + changes = changes?.filter((x) => x !== ""); + } + + if (template.type === "dict" && Array.isArray(changes)) { + changes = convertArrayToObj(changes); + } + + if (template.type === "NestedDict") { + changes = JSON.stringify(changes); + } + + const existingTweak = tweak.current.find((element) => + element.hasOwnProperty(tw) + ); + + if (existingTweak) { + existingTweak[tw][template["name"]!] = changes as string; + + if (existingTweak[tw][template["name"]!] == template.value) { + tweak.current.forEach((element) => { + if (element[tw] && Object.keys(element[tw])?.length === 0) { + tweak.current = tweak.current.filter((obj) => { + const prop = obj[Object.keys(obj)[0]].prop; + return prop !== undefined && prop !== null && prop !== ""; + }); + } + }); + } + } else { + const newTweak = { + [tw]: { + [template["name"]!]: changes, + }, + } as uniqueTweakType; + tweak.current.push(newTweak); + } + + const pythonApiCode = getPythonApiCode(flow, autoLogin, tweak.current); + const curl_code = getCurlCode(flow, autoLogin, tweak.current); + const pythonCode = getPythonCode(flow, tweak.current); + const widgetCode = getWidgetCode(flow, autoLogin, flowState); + + tabs![0].code = curl_code; + tabs![1].code = pythonApiCode; + tabs![2].code = pythonCode; + tabs![3].code = widgetCode; + + setTweak(tweak.current); + } + + function buildContent(value: string) { + const htmlContent = ( +
+ {value != null && value != "" ? value : "None"} +
+ ); + return htmlContent; + } + + function getValue( + value: string, + node: NodeType, + template: TemplateVariableType + ) { + let returnValue = value ?? ""; + + if (getTweak.length > 0) { + for (const obj of getTweak) { + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (key == node["id"]) { + Object.keys(value).forEach((key) => { + if (key == template["name"]) { + returnValue = value[key]; + } + }); + } + }); + } + } else { + return value ?? ""; + } + return returnValue; + } + + return ( + + {children} + + API + + + + + + ); + } +); + +export default ApiModal; diff --git a/src/frontend/src/modals/apiModal/utils/get-python-code.tsx b/src/frontend/src/modals/apiModal/utils/get-python-code.tsx index 9fd8048f2..ff571b492 100644 --- a/src/frontend/src/modals/apiModal/utils/get-python-code.tsx +++ b/src/frontend/src/modals/apiModal/utils/get-python-code.tsx @@ -6,7 +6,7 @@ */ export default function getPythonCode( flowName: string, - tweaksBuildedObject + tweaksBuildedObject, ): string { const tweaksObject = tweaksBuildedObject[0]; diff --git a/src/frontend/src/modals/apiModal/views/index.tsx b/src/frontend/src/modals/apiModal/views/index.tsx index 59b3c13ee..3b41103f9 100644 --- a/src/frontend/src/modals/apiModal/views/index.tsx +++ b/src/frontend/src/modals/apiModal/views/index.tsx @@ -31,9 +31,13 @@ const ApiModal = forwardRef( { flow, children, + open: myOpen, + setOpen: mySetOpen, }: { flow: FlowType; children: ReactNode; + open?: boolean; + setOpen?: (a: boolean | ((o?: boolean) => boolean)) => void; }, ref, ) => { @@ -44,7 +48,10 @@ const ApiModal = forwardRef( const [activeTweaks, setActiveTweaks] = useState(false); const { autoLogin } = useContext(AuthContext); - const [open, setOpen] = useState(false); + const [open, setOpen] = + mySetOpen !== undefined && myOpen !== undefined + ? [myOpen, mySetOpen] + : useState(false); const [activeTab, setActiveTab] = useState("0"); const pythonApiCode = getPythonApiCode( flow?.id, diff --git a/src/frontend/src/modals/editNodeModal/index.tsx b/src/frontend/src/modals/editNodeModal/index.tsx index 4e00e540c..4e910ca84 100644 --- a/src/frontend/src/modals/editNodeModal/index.tsx +++ b/src/frontend/src/modals/editNodeModal/index.tsx @@ -15,11 +15,13 @@ const EditNodeModal = forwardRef( nodeLength, open, setOpen, + // setOpenWDoubleClick, data, }: { nodeLength: number; open: boolean; setOpen: (open: boolean) => void; + // setOpenWDoubleClick: (open: boolean) => void; data: NodeDataType; }, ref, @@ -55,6 +57,12 @@ const EditNodeModal = forwardRef( } }, [gridApi, open]); + // useEffect(() => { + // return () => { + // setOpenWDoubleClick(false); + // }; + // }, []); + return ( {type === TypeModal.PROMPT && isEdit && !readonly ? ( @@ -244,7 +244,7 @@ export default function GenericModal({ ) : type !== TypeModal.PROMPT ? (