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(editor): Node Creator AI nodes improvements #9484

Merged
merged 26 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a8fca31
WIP: Add support for DynamicStructuredTool
OlegIvaniv May 16, 2024
f8247c4
Add option to use example JSON object to generate schema
OlegIvaniv May 17, 2024
040ae5f
Merge branch 'master' into feat/custom-tool-schema
OlegIvaniv May 20, 2024
bdf6c66
Wrap the schema generation as util, refactor Structured Output Parser…
OlegIvaniv May 20, 2024
22659d5
Revert editor changes
OlegIvaniv May 20, 2024
a7f1216
Fix pnpm-lock
OlegIvaniv May 20, 2024
b299c44
Remove old editor files
OlegIvaniv May 20, 2024
e9e3d2c
Add template role override
OlegIvaniv May 22, 2024
2dfd3c3
feat(editor): Node Creator AI nodes improvements
OlegIvaniv May 22, 2024
c8bb0a0
Remove unused code
OlegIvaniv May 22, 2024
6af6df5
fix: Do not sort alphabetically the search results & fix e2e tests
OlegIvaniv May 23, 2024
1fdb378
Cleanup & fix item ordering
OlegIvaniv May 24, 2024
b4cdb09
Address PM change requests
OlegIvaniv May 27, 2024
82735cf
Add experiment to auto-add manual trigger
OlegIvaniv May 27, 2024
42970bb
Increase specificity of .tag selector in node creator
OlegIvaniv May 27, 2024
7d3202b
Merge branch 'master' into feat/ai-180-nodes-panel-improvements-for-ai
OlegIvaniv May 27, 2024
0c894c5
Remove console.logs & select auto-added manual trigger
OlegIvaniv May 27, 2024
5fbd854
Update canvas name of manual trigger
OlegIvaniv May 28, 2024
9b77ecf
Fix root view keyboard navigation & sort AI sections
OlegIvaniv May 29, 2024
ad96e1b
Merge branch 'master' into feat/ai-180-nodes-panel-improvements-for-ai
OlegIvaniv May 29, 2024
0039745
Fix unit test
OlegIvaniv May 29, 2024
efc14fb
Address PR feedback
OlegIvaniv May 30, 2024
6e44965
Merge branch 'master' into feat/ai-180-nodes-panel-improvements-for-ai
OlegIvaniv May 30, 2024
406aa26
Update 41-editors e2e for new manual node name
OlegIvaniv May 30, 2024
a053057
Merge branch 'master' into feat/ai-180-nodes-panel-improvements-for-ai
OlegIvaniv May 30, 2024
d823cad
Update CY fixtures to match the new manual trigger name
OlegIvaniv May 30, 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
2 changes: 1 addition & 1 deletion cypress/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const INSTANCE_MEMBERS = [
];

export const MANUAL_TRIGGER_NODE_NAME = 'Manual Trigger';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Test workflow"';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking Test workflow';
export const MANUAL_CHAT_TRIGGER_NODE_NAME = 'Chat Trigger';
export const SCHEDULE_TRIGGER_NODE_NAME = 'Schedule Trigger';
export const CODE_NODE_NAME = 'Code';
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/19-execution.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ describe('Execution', () => {

cy.wait('@workflowRun').then((interception) => {
expect(interception.request.body).to.have.property('runData').that.is.an('object');
const expectedKeys = ['When clicking "Test workflow"', 'fetch 5 random users'];
const expectedKeys = ['When clicking Test workflow', 'fetch 5 random users'];

expect(Object.keys(interception.request.body.runData)).to.have.lengthOf(expectedKeys.length);
expect(interception.request.body.runData).to.include.all.keys(expectedKeys);
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Node Creator', () => {
nodeCreatorFeature.actions.openNodeCreator();

nodeCreatorFeature.getters.searchBar().find('input').type('manual');
nodeCreatorFeature.getters.creatorItem().should('have.length', 2);
nodeCreatorFeature.getters.creatorItem().should('have.length', 1);
nodeCreatorFeature.getters.searchBar().find('input').clear().type('manual123');
nodeCreatorFeature.getters.creatorItem().should('have.length', 0);
nodeCreatorFeature.getters
Expand Down Expand Up @@ -159,7 +159,7 @@ describe('Node Creator', () => {

it('should have "Triggers" section collapsed when opening actions view from Regular root view', () => {
nodeCreatorFeature.actions.openNodeCreator();
nodeCreatorFeature.getters.getCreatorItem('Manually').click();
nodeCreatorFeature.getters.getCreatorItem('Trigger manually').click();

nodeCreatorFeature.actions.openNodeCreator();
nodeCreatorFeature.getters.searchBar().find('input').clear().type('n8n');
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('Node Creator', () => {
nodeCreatorFeature.getters.getCategoryItem('Actions').click();
nodeCreatorFeature.getters.getCreatorItem('Create a credential').click();
NDVModal.actions.close();
WorkflowPage.actions.deleteNode('When clicking "Test workflow"');
WorkflowPage.actions.deleteNode('When clicking Test workflow');
WorkflowPage.getters.canvasNodePlusEndpointByName('n8n').click();
nodeCreatorFeature.getters.searchBar().find('input').clear().type('n8n');
nodeCreatorFeature.getters.getCreatorItem('n8n').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/41-editors.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Editors', () => {
});
ndv.actions.close();

workflowPage.actions.openNode('When clicking "Test workflow"');
workflowPage.actions.openNode('When clicking Test workflow');
ndv.actions.setPinnedData([{ table: 'test_table' }]);
ndv.actions.close();

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ describe('NDV', () => {
ndv.getters.backToCanvas().click();
workflowPage.actions.executeWorkflow();
// Manual tigger node should show success indicator
workflowPage.actions.openNode('When clicking "Test workflow"');
workflowPage.actions.openNode('When clicking Test workflow');
ndv.getters.nodeRunSuccessIndicator().should('exist');
// Code node should show error
ndv.getters.backToCanvas().click();
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Floating_Nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "d0eda550-2526-42a1-aa19-dee411c8acf9",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -91,7 +91,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Lots_of_nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "369fe424-dd3b-4399-9de3-50bd4ce1f75b",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -570,7 +570,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/Multiple_trigger_node_rerun.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "5ae8991f-08a2-4b27-b61c-85e3b8a83693",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -78,14 +78,14 @@
}
}
],
"When clicking \"Test workflow\"": [
"When clicking Test workflow": [
{
"json": {}
}
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/NDV-test-switch_reorder.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "b3f0815d-b733-413f-ab3f-74e48277bd3a",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -160,7 +160,7 @@
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
6 changes: 3 additions & 3 deletions cypress/fixtures/Node_IO_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "46770685-44d1-4aad-9107-1d790cf26b50",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -74,7 +74,7 @@
}
],
"pinData": {
"When clicking \"Test workflow\"": [
"When clicking Test workflow": [
{
"json": {
"id": "654cfa05fa51480dcb543b1a",
Expand Down Expand Up @@ -599,7 +599,7 @@
]
},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
16 changes: 8 additions & 8 deletions cypress/fixtures/Suggested_Templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -92,7 +92,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -191,7 +191,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -241,7 +241,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -374,7 +374,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -424,7 +424,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down Expand Up @@ -524,7 +524,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -574,7 +574,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "f26332f3-c61a-4843-94bd-64a73ad161ff",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -105,7 +105,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"parameters": {},
"id": "449ab540-d9d7-480d-b131-05e9989a69cd",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -42,7 +42,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"parameters": {},
"id": "ef63cdc5-50bc-4525-9873-7e7f7589a60e",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -199,7 +199,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "f332a7d1-31b4-4e78-b31e-9e8db945bf3f",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -99,7 +99,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_ndv_run_error.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"parameters": {},
"id": "4f4c6527-d565-448a-96bd-8f5414caf8cc",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -136,7 +136,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/Test_workflow_ndv_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"nodes": [
{
"id": "2acca986-10a6-451e-b20a-86e95b50e627",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [460, 460]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"parameters": {},
"id": "09e4325e-ede1-40cf-a1ba-58612bbc7f1b",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -77,7 +77,7 @@
}
],
"connections": {
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "58512a93-dabf-4584-817f-27c608c1bdd5",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -69,7 +69,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test_pinned_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "3dc7cf26-ff25-4437-b9fd-0e8b127ebec9",
"name": "When clicking \"Test workflow\"",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -552,7 +552,7 @@
]
]
},
"When clicking \"Test workflow\"": {
"When clicking Test workflow": {
"main": [
[
{
Expand Down
Loading
Loading