Remove unused editor symbols and legacy sockets

This commit is contained in:
Lucio Lelii 2026-03-09 16:59:25 +01:00
parent 4d3f35a422
commit 2446762e88
7 changed files with 1 additions and 168 deletions

View File

@ -86,18 +86,3 @@ export type HumanInteractiveBlockConfiguration = {
inputAsList: boolean;
outputAsList: boolean;
};
export type INodeModel = {
key: string;
name?: string;
position: { x: number, y: number } | null;
parameters?: Record<string, any> | null;
}
export type IConnectionModel = {
key: string;
sourceNode: string;
sourceField: string;
targetNode: string;
targetField: string;
}

View File

@ -1,62 +0,0 @@
export const flowTest = {
"name" : "Test Flow",
"description" : "This is a test flow",
"blocks" : [ {
"id" : "cabd6f4e-5a05-41f8-9bf7-4de20391ac4e",
"sink" : false,
"name" : "first",
"inputs" : [ {
"name" : "name",
"type" : "TEXT",
"multiple" : false
} ],
"outputs" : [ {
"name" : "response",
"type" : "TEXT",
"multiple" : false
} ],
"specificConfiguration" : {
"type" : "LLMBlockConfiguration",
"name" : "first",
"llmDescriptor" : {
"provider" : "testProvider",
"model" : "testModel"
},
"prompt" : "Make a question about ${{name}}"
},
"typeName" : "LLMBlock"
}, {
"id" : "0063a3ec-3863-4045-bd3b-61eaf87b4604",
"sink" : true,
"name" : "interactive",
"inputs" : [ {
"name" : "input",
"type" : "TEXT",
"multiple" : false
} ],
"outputs" : [ {
"name" : "output",
"type" : "TEXT",
"multiple" : false
} ],
"specificConfiguration" : {
"type" : "HumanInteractiveBlockConfiguration",
"name" : "interactive",
"actionDescription" : "Answer the question in input",
"llmDescriptor" : {
"provider" : "testProvider",
"model" : "testModel"
},
"inputAsList" : false,
"outputAsList" : false
},
"typeName" : "HumanInteractionBlock"
} ],
"connections" : [ {
"id" : "8da696c2-dc03-4717-b2ce-18637ae6f7f8",
"sourceId" : "cabd6f4e-5a05-41f8-9bf7-4de20391ac4e",
"sourceName" : "response",
"targetId" : "0063a3ec-3863-4045-bd3b-61eaf87b4604",
"targetName" : "input"
} ]
};

View File

@ -100,8 +100,6 @@ export class GenericNodeComponent {
localEditorMaxLength: number | null = null;
missingRequiredParams: string[] = [];
private missingRequiredPaths: string[] = [];
private blockSchema: Record<string, any> | null = null;
private editableFieldDefinitions: EditableFieldDefinition[] = [];
private schemaRequirements: SchemaRequirements = { required: [], conditional: [] };
@ -748,7 +746,6 @@ export class GenericNodeComponent {
const missingFields = requiredFields
.filter((field) => this.isMissingValue(this.getByPath(config, field.path)));
this.missingRequiredPaths = missingFields.map((field) => field.path);
this.missingRequiredParams = missingFields.map((field) => field.label);
if (!this.refreshingConditionalRequirements) {

View File

@ -1,44 +0,0 @@
import { ChangeDetectorRef, Component, HostBinding, Input } from "@angular/core";
import { ReteModule } from "rete-angular-plugin/21";
@Component({
standalone: true,
imports: [ReteModule],
host: {
refComponent: '',
class: `
cursor-crosshair relative -left-3 w-1 h-6 flex items-center justify-center rounded-full bg-green-500 shadow-[0_0_0_1px_rgb(34,197,94)] z-50
`
},
template: ``
})
export class InputSocket {
@Input() data!: any;
@Input() emit!: (data: any) => void;
@Input() rendered!: () => void;
@HostBinding("title") get title() {
return this.data?.name ?? "";
}
ngOnInit(): void {
console.log("InputSocket ngOnInit", this.data);
}
ngAfterViewInit() {
requestAnimationFrame(() => {
this.rendered?.();
});
}
constructor(private cdr: ChangeDetectorRef) {
this.cdr.detach();
}
ngOnChanges(): void {
this.cdr.detectChanges();
requestAnimationFrame(() => this.rendered());
}
}

View File

@ -1,43 +0,0 @@
import { ChangeDetectorRef, Component, HostBinding, Input } from '@angular/core';
import { ReteModule } from 'rete-angular-plugin/21';
@Component({
standalone: true,
imports: [ReteModule],
host: {
refComponent: '',
class: `
cursor-crosshair relative -right-2 w-1 h-6 flex items-center justify-center rounded-full bg-red-500
shadow-[0_0_0_1px_rgb(239,68,68)]
`
},
template: ``
})
export class OutputSocket {
@Input() data!: any;
@Input() emit!: (data: any) => void;
@Input() rendered!: () => void;
@HostBinding("title") get title() {
return this.data?.name ?? "";
}
ngOnInit(): void {
console.log("OutputSocket ngOnInit", this.data);
}
ngAfterViewInit() {
requestAnimationFrame(() => {
this.rendered?.();
});
}
constructor(private cdr: ChangeDetectorRef) {
this.cdr.detach();
}
ngOnChanges(): void {
this.cdr.detectChanges();
requestAnimationFrame(() => this.rendered());
}
}

View File

@ -38,7 +38,7 @@ export async function createEditor(
render.addPreset(
Presets.classic.setup({
customize: {
node(context) {
node(_context) {
return nodeView === "execution" ? TaskStepNodeComponent : GenericNodeComponent;
},
socket(context: any) {