Skip to content

Commit

Permalink
remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavyajain21 committed Aug 10, 2024
1 parent 1bf0f2b commit 6ce3092
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
9 changes: 0 additions & 9 deletions keep-ui/app/workflows/builder/builder-store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function addNodeBetween(nodeOrEdge: string | null, step: any, type: string, set:
newStep,
{ id: targetId, type: 'temp_node', name: 'temp_node', 'componentType': 'temp_node', edgeNotNeeded: true }
], { x: 0, y: 0 }, true);
console.log("new nodes, edges", nodes, edges);
const newEdges = [
...edges,
...(get().edges.filter(edge => !(edge.source == sourceId && edge.target == targetId)) || []),
Expand Down Expand Up @@ -300,7 +299,6 @@ const useStore = create<FlowState>((set, get) => ({
if (!step) {
return;
}
console.log("step", step);
step = JSON.parse(step);
if (!step) return;
// Use the screenToFlowPosition function to get flow coordinates
Expand Down Expand Up @@ -347,24 +345,17 @@ const useStore = create<FlowState>((set, get) => ({
}
let idArray = Array.isArray(ids) ? ids : [ids];

console.log("nodes", nodes);

const startNode = nodes[nodeStartIndex];
console.log("startNode", startNode);
const customIdentifier = `${startNode?.data?.type}__end__${startNode?.id}`;
console.log("customIdentifier", customIdentifier);

let endIndex = nodes.findIndex((node) => node.id === customIdentifier);
endIndex = endIndex === -1 ? nodeStartIndex : endIndex;
console.log("endIndex", endIndex);

const endNode = nodes[endIndex];
console.log("endNode", endNode);

const edges = get().edges;
let finalEdges = edges;
idArray = nodes.slice(nodeStartIndex, endIndex + 1).map((node) => node.id);
console.log("idArray", idArray);
finalEdges = edges.filter((edge) => !(idArray.includes(edge.source) || idArray.includes(edge.target)));

const sources = [...new Set(edges.filter((edge) => startNode.id === edge.target))];
Expand Down
2 changes: 0 additions & 2 deletions keep-ui/app/workflows/builder/builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ function Builder({

const searchParams = useSearchParams();

console.log("definition", definition);

const updateWorkflow = () => {
const apiUrl = getApiURL();
const url = `${apiUrl}/workflows/${workflowId}`;
Expand Down
4 changes: 0 additions & 4 deletions keep-ui/app/workflows/builder/editors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export function GlobalEditorV2() {
const handleSubmit = () => {
// Save the finalized properties
setProperty(localProperties);
console.log('Final properties saved:', localProperties);
};

return (
Expand Down Expand Up @@ -641,9 +640,6 @@ export function StepEditorV2({
// Finalize the changes before saving
updateSelectedNodeData('name', formData.name);
updateSelectedNodeData('properties', formData.properties);

// Perform any additional save logic, such as API calls
console.log('Final data saved:', formData);
};

return (
Expand Down
1 change: 0 additions & 1 deletion keep-ui/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export async function installWebhook(provider: Provider, accessToken: string) {
success: `${provider.type} webhook installed 👌`,
error: {
render({ data }) {
console.log(data);
// When the promise reject, data will contains the error
return `Webhook installation failed 😢 Error: ${
(data as any).detail
Expand Down
4 changes: 0 additions & 4 deletions keep-ui/utils/hooks/useWorkflowInitialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ const useWorkflowInitialization = (
const initializeWorkflow = async () => {
setIsLoading(true);
let parsedWorkflow = definition?.value;
console.log("parsedWorkflow", parsedWorkflow);
setV2Properties(parsedWorkflow?.properties ?? {});
// let { nodes: newNodes, edges: newEdges } = processWorkflow(
// parsedWorkflow?.sequence
Expand All @@ -268,9 +267,6 @@ const useWorkflowInitialization = (
];
const intialPositon = { x: 0, y: 50 };
let { nodes, edges } = processWorkflowV2(sequences, intialPositon, true);
console.log(nodes, edges);
console.log("nodes", nodes);
console.log("edges", edges);
setIsLayouted(false);
setNodes(nodes);
setEdges(edges);
Expand Down

0 comments on commit 6ce3092

Please sign in to comment.