Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implement Shortcut Settings Page #1830

Merged
merged 75 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
44e0328
Refactor: Use react-hotkeys-hook lib to handle shortcuts usability
igorrCarvalho Apr 11, 2024
23bcdce
Merge remote-tracking branch 'origin/dev' into node-shortcuts-refactor
ogabrielluiz Apr 12, 2024
489fc0d
Refactor: Use mod key instead of ctrl key to enable shortcuts to mac …
igorrCarvalho Apr 12, 2024
53f0388
Feat: add API Modal shortcut (ctrl+r)
igorrCarvalho Apr 17, 2024
58f78c3
Feat: make space open node code modal
igorrCarvalho Apr 19, 2024
a0a01ae
Feat: make possible to open node advanced settings by double clicking…
igorrCarvalho Apr 19, 2024
2818909
remove console.log
igorrCarvalho Apr 19, 2024
c550a1d
Refactor: Add all toolbar options into more
igorrCarvalho Apr 22, 2024
8ac6cdb
Feat: add shortcut to open flow share modal (ctrl+alt+s)
igorrCarvalho Apr 23, 2024
113b478
Feat: Add validation to avoid error when user doesnt have access to t…
igorrCarvalho Apr 23, 2024
cfff4e3
Fixed double click on description opening Settings modal
lucaseduoli Apr 29, 2024
1b3d62c
Merge remote-tracking branch 'origin/dev' into node-shortcuts-refactor
lucaseduoli Apr 29, 2024
dc5eebe
Fixed Code shortcut
lucaseduoli Apr 29, 2024
1497e86
Fixed PageComponent shortcuts not considering shift
lucaseduoli Apr 29, 2024
604e579
Feat: User can edit his keys combination for each shortcut
igorrCarvalho Apr 30, 2024
bc3d32b
Merge node-shortcuts-refactor into shortcuts_settings
igorrCarvalho Apr 30, 2024
edb2ff4
Fix: resolve merge conflicts
igorrCarvalho Apr 30, 2024
86fe906
Feat: User can change the node shortcuts
igorrCarvalho Apr 30, 2024
c37c782
Merge feature/ui_table into shortcuts_settings
igorrCarvalho May 1, 2024
c146a0c
Fix merge
igorrCarvalho May 1, 2024
76f3b82
Feat: User can customize all shortcuts
igorrCarvalho May 1, 2024
5bd9aba
Feat: Save user config in localStorage
igorrCarvalho May 2, 2024
61b894c
Feat: Add restore button to shortcuts settings
igorrCarvalho May 2, 2024
8967a26
Format code
igorrCarvalho May 2, 2024
2901580
Merge dev into shortcuts_settings
igorrCarvalho May 3, 2024
58cd138
Merge dev into shortcuts_settings
igorrCarvalho May 3, 2024
c6869c2
Refactor: Visual shortcut update with the settings configuration
igorrCarvalho May 3, 2024
b698ca3
Merge dev into shortcuts_settings
igorrCarvalho May 3, 2024
c2ae5e8
Refactor: Add the possibility to don't use ctrl/cmd
igorrCarvalho May 6, 2024
60dba48
Feat: make possible to change all nodes shortcuts
igorrCarvalho May 6, 2024
9466e06
Fix: Ctrl displaying as Control
igorrCarvalho May 6, 2024
5c6edc9
Merge dev into shortcuts_settings
igorrCarvalho May 8, 2024
ca30b11
Install react-hotkeys-hook
igorrCarvalho May 23, 2024
ec5d5f2
Merge dev into shortcuts_settings
igorrCarvalho May 23, 2024
0eb6f6b
Merge dev
igorrCarvalho May 29, 2024
126d4e1
Merge dev into shortcuts_settings
igorrCarvalho Jun 5, 2024
e531e36
Merge cz/mergeAll into shortcuts_settings
igorrCarvalho Jun 7, 2024
8c5f74e
Merge branch 'cz/mergeAll' into shortcuts_settings
igorrCarvalho Jun 7, 2024
5218e92
Refactor: add max page size
igorrCarvalho Jun 7, 2024
0d09ca2
Remove consolelog
igorrCarvalho Jun 7, 2024
1cfc3f4
Fix: Change Meta key to command for mac users
igorrCarvalho Jun 7, 2024
f2a8e0f
Refactor: Update destructive color in CSS
rodrigosnader Jun 8, 2024
9c88ed3
Refactor: retrieve shortcuts data directly in the store
igorrCarvalho Jun 8, 2024
a53180e
Refactor: Enable editing on double click and make changes in initial …
igorrCarvalho Jun 8, 2024
4b090d6
Refactor: add a name to shortcuts column
igorrCarvalho Jun 8, 2024
f5f5147
Refactor: Remove checkbox and pagination
igorrCarvalho Jun 8, 2024
6b10879
Refactor: change command for cmd
igorrCarvalho Jun 8, 2024
f4a8b31
Remove console.log
igorrCarvalho Jun 8, 2024
ce4550d
Refactor: put freeze inside more
igorrCarvalho Jun 8, 2024
04f6f33
Refactor: remove save and freeze from toolbar
igorrCarvalho Jun 8, 2024
a58f0b0
Refactor: Remove openWDoubleClick
igorrCarvalho Jun 8, 2024
a7187ff
Fix: using space in shortcuts table break the app
igorrCarvalho Jun 8, 2024
f970271
Refactor: Change button variant to default
igorrCarvalho Jun 8, 2024
fc47915
Refactor: add freeze to nodetoolbar
igorrCarvalho Jun 8, 2024
40e977c
Refactor: Improve code check to prevent bugs
igorrCarvalho Jun 9, 2024
90a8adc
Merge branch 'cz/mergeAll' into shortcuts_settings
ogabrielluiz Jun 9, 2024
e614787
Refactor: Remove unnecessary isMac prop from toolbarSelectItem compon…
ogabrielluiz Jun 9, 2024
b99a82e
Fix: shortcuts not saving properly
igorrCarvalho Jun 9, 2024
d372a8e
Fix: add panActivationKeyCode to reactFLow to prevent pan bugs
igorrCarvalho Jun 9, 2024
93ba523
Merge branch 'shortcuts_settings' of github.com:langflow-ai/langflow …
igorrCarvalho Jun 9, 2024
9d73489
Refactor: remove cache before saving shortcuts
igorrCarvalho Jun 9, 2024
3541101
Refactor: Use a single array of shortcuts to prevent bugs on MACOS
igorrCarvalho Jun 9, 2024
81a29da
Fix: API modal not opening with shortcut
igorrCarvalho Jun 9, 2024
71525cf
Remove console.log
igorrCarvalho Jun 9, 2024
4fd9677
Feat: add shortcut to open flow Share modal
igorrCarvalho Jun 9, 2024
a335bb7
Fix: place toolbar icons in the center of the toolbarItem
igorrCarvalho Jun 9, 2024
2bbf01d
Feat: add visual shortcuts to nodeToolbar tooltips
igorrCarvalho Jun 9, 2024
d14e13d
Feat: Add shortcut to open flow share modal
igorrCarvalho Jun 9, 2024
c59542d
Feat: add colorful padding to visual shortcut on toolbar
igorrCarvalho Jun 9, 2024
d07dec9
Add preventDefault to every shortcut call
igorrCarvalho Jun 9, 2024
4f80346
Feat: create isThereModal validate function to prevent modals from op…
igorrCarvalho Jun 9, 2024
63dec53
Refactor: Create modal_classes constant
igorrCarvalho Jun 9, 2024
5028f80
Refactor: Simplify isThereModal function
igorrCarvalho Jun 9, 2024
983e03d
Fix: modal leaving screen
igorrCarvalho Jun 10, 2024
75fa7c1
Fix: state not reseting properly
igorrCarvalho Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/docs/components/agents.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Agents

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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! 🛠️📝
</p>
<p>
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! 🛠️📝
</p>
</Admonition>

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.
Expand Down Expand Up @@ -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.
- **LLM Chain:** The LLM Chain used by the agent.
10 changes: 5 additions & 5 deletions docs/docs/components/chains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import Admonition from "@theme/Admonition";
# Chains

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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! 🛠️📝
</p>
<p>
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!
🛠️📝
</p>
</Admonition>

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/components/data.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Data

Expand Down
150 changes: 75 additions & 75 deletions docs/docs/components/embeddings.mdx

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion docs/docs/components/experimental.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Experimental

Expand Down Expand Up @@ -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.

Expand All @@ -54,17 +56,20 @@ 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.
- **Real-time Refresh:** True
- **Refresh Button:** True

- **Name:**

- **Display Name:** Name
- **Description:** The tool's name.

- **Description:**

- **Display Name:** Description
- **Description:** Describes the tool.

Expand Down Expand Up @@ -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.

Expand All @@ -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.
Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions docs/docs/components/helpers.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Helpers

Expand Down Expand Up @@ -49,9 +49,10 @@ Use this component as a template to create your custom component.
- **Parameter:** Describe the purpose of this parameter.

<Admonition type="info" title="Info">
<p>
Customize the <code>build_config</code> and <code>build</code> methods according to your requirements.
</p>
<p>
Customize the <code>build_config</code> and <code>build</code> methods
according to your requirements.
</p>
</Admonition>

Learn more about creating custom components at [Custom Component](http://docs.langflow.org/components/custom).
Expand Down
25 changes: 16 additions & 9 deletions docs/docs/components/memories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Memories

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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! 🛠️📝
</p>
<p>
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!
🛠️📝
</p>
</Admonition>

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.
Expand All @@ -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.

<Admonition type="note" title="Note">
<p>
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.
</p>
<p>
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.
</p>
</Admonition>

### ConversationBufferMemory
Expand Down Expand Up @@ -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`.

---
Expand Down Expand Up @@ -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`.
- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`.
19 changes: 12 additions & 7 deletions docs/docs/components/model_specs.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Large Language Models (LLMs)

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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! 🛠️📝
</p>
<p>
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! 🛠️📝
</p>
</Admonition>

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.
Expand Down Expand Up @@ -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.

<Admonition type="info">
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).
</Admonition>

- **config:** This configuration is for the Transformer models. Check the default settings and possible configurations at [config](https://github.com/marella/ctransformers#config).
Expand Down Expand Up @@ -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`.
Expand All @@ -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`.

---
---
10 changes: 6 additions & 4 deletions docs/docs/components/retrievers.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Retrievers

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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. 🛠️📝
</p>
<p>
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. 🛠️📝
</p>
</Admonition>

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.
Expand Down
10 changes: 6 additions & 4 deletions docs/docs/components/tools.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Admonition from '@theme/Admonition';
import Admonition from "@theme/Admonition";

# Tools

<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
<p>
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! 🛠️📝
</p>
<p>
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! 🛠️📝
</p>
</Admonition>

### SearchApi
Expand Down
12 changes: 8 additions & 4 deletions docs/docs/components/utilities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Admonition from "@theme/Admonition";
# Utilities

<Admonition type="caution" icon="🚧" title="Zone Under Construction">
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!
🛠️📝
</Admonition>

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.
Expand Down Expand Up @@ -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.

<Admonition type="note" title="Note">
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.
</Admonition>

For additional information and examples, please consult the [Langflow Components Custom Documentation](http://docs.langflow.org/components/custom).
10 changes: 10 additions & 0 deletions src/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
Loading