From 911b79880efe6d1108bcf366b6166e776c7dc87b Mon Sep 17 00:00:00 2001 From: MrBeanDev Date: Tue, 21 Oct 2025 20:12:01 +0530 Subject: [PATCH 1/3] init commit --- convex.json | 9 -- convex/_generated/api.d.ts | 57 ------------ convex/_generated/api.js | 23 ----- convex/_generated/dataModel.d.ts | 60 ------------- convex/_generated/server.d.ts | 149 ------------------------------- convex/_generated/server.js | 90 ------------------- convex/tsconfig.tsbuildinfo | 1 - 7 files changed, 389 deletions(-) delete mode 100644 convex.json delete mode 100644 convex/_generated/api.d.ts delete mode 100644 convex/_generated/api.js delete mode 100644 convex/_generated/dataModel.d.ts delete mode 100644 convex/_generated/server.d.ts delete mode 100644 convex/_generated/server.js delete mode 100644 convex/tsconfig.tsbuildinfo diff --git a/convex.json b/convex.json deleted file mode 100644 index 75f61f1..0000000 --- a/convex.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "node": { - "externalPackages": [ - "@langchain/langgraph", - "@langchain/core", - "@anthropic-ai/sdk" - ] - } -} diff --git a/convex/_generated/api.d.ts b/convex/_generated/api.d.ts deleted file mode 100644 index 97fe137..0000000 --- a/convex/_generated/api.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable */ -/** - * Generated `api` utility. - * - * THIS CODE IS AUTOMATICALLY GENERATED. - * - * To regenerate, run `npx convex dev`. - * @module - */ - -import type * as admin from "../admin.js"; -import type * as apiKeys from "../apiKeys.js"; -import type * as approvals from "../approvals.js"; -import type * as executions from "../executions.js"; -import type * as mcpServers from "../mcpServers.js"; -import type * as templates from "../templates.js"; -import type * as userLLMKeys from "../userLLMKeys.js"; -import type * as userMCPs from "../userMCPs.js"; -import type * as workflows from "../workflows.js"; - -import type { - ApiFromModules, - FilterApi, - FunctionReference, -} from "convex/server"; - -/** - * A utility for referencing Convex functions in your app's API. - * - * Usage: - * ```js - * const myFunctionReference = api.myModule.myFunction; - * ``` - */ -declare const fullApi: ApiFromModules<{ - admin: typeof admin; - apiKeys: typeof apiKeys; - approvals: typeof approvals; - executions: typeof executions; - mcpServers: typeof mcpServers; - templates: typeof templates; - userLLMKeys: typeof userLLMKeys; - userMCPs: typeof userMCPs; - workflows: typeof workflows; -}>; -declare const fullApiWithMounts: typeof fullApi; - -export declare const api: FilterApi< - typeof fullApiWithMounts, - FunctionReference ->; -export declare const internal: FilterApi< - typeof fullApiWithMounts, - FunctionReference ->; - -export declare const components: {}; diff --git a/convex/_generated/api.js b/convex/_generated/api.js deleted file mode 100644 index 44bf985..0000000 --- a/convex/_generated/api.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -/** - * Generated `api` utility. - * - * THIS CODE IS AUTOMATICALLY GENERATED. - * - * To regenerate, run `npx convex dev`. - * @module - */ - -import { anyApi, componentsGeneric } from "convex/server"; - -/** - * A utility for referencing Convex functions in your app's API. - * - * Usage: - * ```js - * const myFunctionReference = api.myModule.myFunction; - * ``` - */ -export const api = anyApi; -export const internal = anyApi; -export const components = componentsGeneric(); diff --git a/convex/_generated/dataModel.d.ts b/convex/_generated/dataModel.d.ts deleted file mode 100644 index 8541f31..0000000 --- a/convex/_generated/dataModel.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* eslint-disable */ -/** - * Generated data model types. - * - * THIS CODE IS AUTOMATICALLY GENERATED. - * - * To regenerate, run `npx convex dev`. - * @module - */ - -import type { - DataModelFromSchemaDefinition, - DocumentByName, - TableNamesInDataModel, - SystemTableNames, -} from "convex/server"; -import type { GenericId } from "convex/values"; -import schema from "../schema.js"; - -/** - * The names of all of your Convex tables. - */ -export type TableNames = TableNamesInDataModel; - -/** - * The type of a document stored in Convex. - * - * @typeParam TableName - A string literal type of the table name (like "users"). - */ -export type Doc = DocumentByName< - DataModel, - TableName ->; - -/** - * An identifier for a document in Convex. - * - * Convex documents are uniquely identified by their `Id`, which is accessible - * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids). - * - * Documents can be loaded using `db.get(id)` in query and mutation functions. - * - * IDs are just strings at runtime, but this type can be used to distinguish them from other - * strings when type checking. - * - * @typeParam TableName - A string literal type of the table name (like "users"). - */ -export type Id = - GenericId; - -/** - * A type describing your Convex data model. - * - * This type includes information about what tables you have, the type of - * documents stored in those tables, and the indexes defined on them. - * - * This type is used to parameterize methods like `queryGeneric` and - * `mutationGeneric` to make them type-safe. - */ -export type DataModel = DataModelFromSchemaDefinition; diff --git a/convex/_generated/server.d.ts b/convex/_generated/server.d.ts deleted file mode 100644 index b5c6828..0000000 --- a/convex/_generated/server.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* eslint-disable */ -/** - * Generated utilities for implementing server-side Convex query and mutation functions. - * - * THIS CODE IS AUTOMATICALLY GENERATED. - * - * To regenerate, run `npx convex dev`. - * @module - */ - -import { - ActionBuilder, - AnyComponents, - HttpActionBuilder, - MutationBuilder, - QueryBuilder, - GenericActionCtx, - GenericMutationCtx, - GenericQueryCtx, - GenericDatabaseReader, - GenericDatabaseWriter, - FunctionReference, -} from "convex/server"; -import type { DataModel } from "./dataModel.js"; - -type GenericCtx = - | GenericActionCtx - | GenericMutationCtx - | GenericQueryCtx; - -/** - * Define a query in this Convex app's public API. - * - * This function will be allowed to read your Convex database and will be accessible from the client. - * - * @param func - The query function. It receives a {@link QueryCtx} as its first argument. - * @returns The wrapped query. Include this as an `export` to name it and make it accessible. - */ -export declare const query: QueryBuilder; - -/** - * Define a query that is only accessible from other Convex functions (but not from the client). - * - * This function will be allowed to read from your Convex database. It will not be accessible from the client. - * - * @param func - The query function. It receives a {@link QueryCtx} as its first argument. - * @returns The wrapped query. Include this as an `export` to name it and make it accessible. - */ -export declare const internalQuery: QueryBuilder; - -/** - * Define a mutation in this Convex app's public API. - * - * This function will be allowed to modify your Convex database and will be accessible from the client. - * - * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. - * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. - */ -export declare const mutation: MutationBuilder; - -/** - * Define a mutation that is only accessible from other Convex functions (but not from the client). - * - * This function will be allowed to modify your Convex database. It will not be accessible from the client. - * - * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. - * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. - */ -export declare const internalMutation: MutationBuilder; - -/** - * Define an action in this Convex app's public API. - * - * An action is a function which can execute any JavaScript code, including non-deterministic - * code and code with side-effects, like calling third-party services. - * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive. - * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}. - * - * @param func - The action. It receives an {@link ActionCtx} as its first argument. - * @returns The wrapped action. Include this as an `export` to name it and make it accessible. - */ -export declare const action: ActionBuilder; - -/** - * Define an action that is only accessible from other Convex functions (but not from the client). - * - * @param func - The function. It receives an {@link ActionCtx} as its first argument. - * @returns The wrapped function. Include this as an `export` to name it and make it accessible. - */ -export declare const internalAction: ActionBuilder; - -/** - * Define an HTTP action. - * - * This function will be used to respond to HTTP requests received by a Convex - * deployment if the requests matches the path and method where this action - * is routed. Be sure to route your action in `convex/http.js`. - * - * @param func - The function. It receives an {@link ActionCtx} as its first argument. - * @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up. - */ -export declare const httpAction: HttpActionBuilder; - -/** - * A set of services for use within Convex query functions. - * - * The query context is passed as the first argument to any Convex query - * function run on the server. - * - * This differs from the {@link MutationCtx} because all of the services are - * read-only. - */ -export type QueryCtx = GenericQueryCtx; - -/** - * A set of services for use within Convex mutation functions. - * - * The mutation context is passed as the first argument to any Convex mutation - * function run on the server. - */ -export type MutationCtx = GenericMutationCtx; - -/** - * A set of services for use within Convex action functions. - * - * The action context is passed as the first argument to any Convex action - * function run on the server. - */ -export type ActionCtx = GenericActionCtx; - -/** - * An interface to read from the database within Convex query functions. - * - * The two entry points are {@link DatabaseReader.get}, which fetches a single - * document by its {@link Id}, or {@link DatabaseReader.query}, which starts - * building a query. - */ -export type DatabaseReader = GenericDatabaseReader; - -/** - * An interface to read from and write to the database within Convex mutation - * functions. - * - * Convex guarantees that all writes within a single mutation are - * executed atomically, so you never have to worry about partial writes leaving - * your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control) - * for the guarantees Convex provides your functions. - */ -export type DatabaseWriter = GenericDatabaseWriter; diff --git a/convex/_generated/server.js b/convex/_generated/server.js deleted file mode 100644 index 4a21df4..0000000 --- a/convex/_generated/server.js +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-disable */ -/** - * Generated utilities for implementing server-side Convex query and mutation functions. - * - * THIS CODE IS AUTOMATICALLY GENERATED. - * - * To regenerate, run `npx convex dev`. - * @module - */ - -import { - actionGeneric, - httpActionGeneric, - queryGeneric, - mutationGeneric, - internalActionGeneric, - internalMutationGeneric, - internalQueryGeneric, - componentsGeneric, -} from "convex/server"; - -/** - * Define a query in this Convex app's public API. - * - * This function will be allowed to read your Convex database and will be accessible from the client. - * - * @param func - The query function. It receives a {@link QueryCtx} as its first argument. - * @returns The wrapped query. Include this as an `export` to name it and make it accessible. - */ -export const query = queryGeneric; - -/** - * Define a query that is only accessible from other Convex functions (but not from the client). - * - * This function will be allowed to read from your Convex database. It will not be accessible from the client. - * - * @param func - The query function. It receives a {@link QueryCtx} as its first argument. - * @returns The wrapped query. Include this as an `export` to name it and make it accessible. - */ -export const internalQuery = internalQueryGeneric; - -/** - * Define a mutation in this Convex app's public API. - * - * This function will be allowed to modify your Convex database and will be accessible from the client. - * - * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. - * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. - */ -export const mutation = mutationGeneric; - -/** - * Define a mutation that is only accessible from other Convex functions (but not from the client). - * - * This function will be allowed to modify your Convex database. It will not be accessible from the client. - * - * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument. - * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible. - */ -export const internalMutation = internalMutationGeneric; - -/** - * Define an action in this Convex app's public API. - * - * An action is a function which can execute any JavaScript code, including non-deterministic - * code and code with side-effects, like calling third-party services. - * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive. - * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}. - * - * @param func - The action. It receives an {@link ActionCtx} as its first argument. - * @returns The wrapped action. Include this as an `export` to name it and make it accessible. - */ -export const action = actionGeneric; - -/** - * Define an action that is only accessible from other Convex functions (but not from the client). - * - * @param func - The function. It receives an {@link ActionCtx} as its first argument. - * @returns The wrapped function. Include this as an `export` to name it and make it accessible. - */ -export const internalAction = internalActionGeneric; - -/** - * Define a Convex HTTP action. - * - * @param func - The function. It receives an {@link ActionCtx} as its first argument, and a `Request` object - * as its second. - * @returns The wrapped endpoint function. Route a URL path to this function in `convex/http.js`. - */ -export const httpAction = httpActionGeneric; diff --git a/convex/tsconfig.tsbuildinfo b/convex/tsconfig.tsbuildinfo deleted file mode 100644 index ce793c9..0000000 --- a/convex/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../node_modules/@types/react/jsx-runtime.d.ts","../node_modules/convex/dist/esm-types/values/value.d.ts","../node_modules/convex/dist/esm-types/type_utils.d.ts","../node_modules/convex/dist/esm-types/values/validators.d.ts","../node_modules/convex/dist/esm-types/values/validator.d.ts","../node_modules/convex/dist/esm-types/values/base64.d.ts","../node_modules/convex/dist/esm-types/values/errors.d.ts","../node_modules/convex/dist/esm-types/values/compare.d.ts","../node_modules/convex/dist/esm-types/values/index.d.ts","../node_modules/convex/dist/esm-types/server/authentication.d.ts","../node_modules/convex/dist/esm-types/server/data_model.d.ts","../node_modules/convex/dist/esm-types/server/filter_builder.d.ts","../node_modules/convex/dist/esm-types/server/index_range_builder.d.ts","../node_modules/convex/dist/esm-types/server/pagination.d.ts","../node_modules/convex/dist/esm-types/server/search_filter_builder.d.ts","../node_modules/convex/dist/esm-types/server/query.d.ts","../node_modules/convex/dist/esm-types/server/system_fields.d.ts","../node_modules/convex/dist/esm-types/server/schema.d.ts","../node_modules/convex/dist/esm-types/server/database.d.ts","../node_modules/convex/dist/esm-types/server/api.d.ts","../node_modules/convex/dist/esm-types/server/scheduler.d.ts","../node_modules/convex/dist/esm-types/server/vector_search.d.ts","../node_modules/convex/dist/esm-types/server/registration.d.ts","../node_modules/convex/dist/esm-types/server/impl/registration_impl.d.ts","../node_modules/convex/dist/esm-types/server/storage.d.ts","../node_modules/convex/dist/esm-types/server/cron.d.ts","../node_modules/convex/dist/esm-types/server/router.d.ts","../node_modules/convex/dist/esm-types/server/components/paths.d.ts","../node_modules/convex/dist/esm-types/server/components/index.d.ts","../node_modules/convex/dist/esm-types/server/index.d.ts","./schema.ts","./_generated/datamodel.d.ts","./_generated/server.d.ts","./admin.ts","./apikeys.ts","./approvals.ts","./auth.config.ts","./executions.ts","./templates.ts","./userllmkeys.ts","./usermcps.ts","../lib/workflow/types.ts","../lib/workflow/templates.ts","./workflows.ts","./_generated/api.d.ts","./mcpservers.ts","./_generated/api.js","./_generated/server.js"],"fileIdsList":[[83,87,88,89,91,92,93,94,97,99],[54,83],[62,83,84],[83,85],[54,86],[54,62,86],[54],[54,62,86,98],[54,62,83],[54,62,85,86],[54,62,86,96],[54,95],[51,52],[53],[56,67,76],[62],[73,76,81],[62,73,74],[62,64,69,70,71],[62,64],[64,76],[56,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,82],[64],[57],[64,65,66,67,68],[55,56,57,58,64,73,74,75,83],[76],[55,73],[56,57,58,64,70],[56,62,64],[55,64],[55],[55,57,58,59,60,61],[56,57,62],[55,58,62]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"da172a28c35d5f298bf5f0361725cc80f45e89e803a353c56e1aa347e10f572d","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"8567c4f44c0d1c40726745701a7bbd715c0e8301b6b15bc25b208cec0317bd3d","impliedFormat":99},{"version":"56c7652b9e41b2acf8fc249f13bbf293f2fd5d20a6826a779fb13f2b41310285","impliedFormat":99},{"version":"d619113674b97169b14dd63cec0cd38ca586550be0b898342d84860c6966e016","impliedFormat":99},{"version":"11aa84b8f18926639643de83d61e46dcefabcfcbbfc503be11d837d81ac9d4e6","impliedFormat":99},{"version":"27f7e8c28ea53d110d4a4e3a365736dc2cdf2c46e3aa02e48c5ec22207123b9d","impliedFormat":99},{"version":"c5ee44dca52898ad7262cadc354f5e6f434a007c2d904a53ecfb4ee0e419b403","impliedFormat":99},{"version":"cb44dd6fd99ade30c70496a3fa535590aed5f2bb64ba7bc92aa34156c10c0f25","impliedFormat":99},{"version":"d52cc473d0d96c4d8a8e9768846f8a38d24b053750b1a1d1c01f9d8112fe05c7","impliedFormat":99},{"version":"ed6fd0951de157501bfb5772742b7dddac9ca8e53f1ab201513af8c91f92de66","impliedFormat":99},{"version":"2ad00018e95065d0b14bbd4dcc4ececec08d104860651668452f5c6305692b41","impliedFormat":99},{"version":"c4dd27a0c3897b8f1b7082f70d70f38231f0e0973813680c8ca08ddf0e7d16c1","impliedFormat":99},{"version":"b23fad2190be146426a7de0fa403e24fccbc9c985d49d22f8b9f39803db47699","impliedFormat":99},{"version":"91dff8d71a435d11575a5d0f1d14562776c02bfa99e7aef7529766e842fcdbba","impliedFormat":99},{"version":"895d89df016d846222abdd633b1f6e3a7f4c820f56901dbda853916d302c16f2","impliedFormat":99},{"version":"fe05dff4d835a34d8b61468deeb948abf13e77378cb2ec24607f132f2a4065f4","impliedFormat":99},{"version":"ab59a5f7526fc8309ee5a5a28e3e358f6ed457bdb599dd6542becb706c0419dc","impliedFormat":99},{"version":"0a0cad5d6e29fe9a045330b1b22021780664ad3e4b4a9af7b98a4086a45b5d79","impliedFormat":99},{"version":"db98970865a44b3c7d7c8c6a5bf17e75916bbc672e59c8e59f2672c221ca4d59","impliedFormat":99},{"version":"64a8c0db1ac49d639d35064e7f20360b8ebb2f64266136adf94a604d698b4ff7","impliedFormat":99},{"version":"0a2602130be5a581a921d84f465ce0f81e62c961b4d2ffe10e9bcd4060dd41cf","impliedFormat":99},{"version":"7c1c1d4c8fe888eecca43aa8d1bb12811c4915ffd27718b939c9bb127f2225bf","impliedFormat":99},{"version":"0d4079e5d31dee0ea3f724aad8ff19a01e248d5e4d234ee81dfe561731b484d9","impliedFormat":99},{"version":"886e27d585b99cea11db1f8ec5504e7d3da92f48fc819db0e8fc1b615a47f9b5","impliedFormat":99},{"version":"5c4621a72b5994b6c8d84ca2dc6592ab7288c70a72e86df68b89187f801ebfa7","impliedFormat":99},{"version":"9f2a41d65629c9d3218d3451b5b73dd96956f9078720e5ea2acf469ea6895240","impliedFormat":99},{"version":"2d1924bb4fa9f785437228ca40cd05162795b36295b9addaed7aaef2e8e5c7e5","impliedFormat":99},{"version":"99d62f5ac0911ef2a22c1a67a69e8441e1b409d1773837ba58361e8d574b4152","impliedFormat":99},{"version":"34c57354a2a1b8e654bc730ab55aeeb857ee342ebe848660a078803e0bbd940a","impliedFormat":99},{"version":"6977e71491b7a8ea4b4ae158be439ac1a3a596e143feb58a24ba4a44d0b15cc5","impliedFormat":99},{"version":"ed76d542981dff111740cd23142b66db5629905c072a87cce749007748c1450d","signature":"1235b5627a122518435f627fe7960f12842b727047621c707a0c560ee4774f11"},"d70591b280b4c77c0b82243785056025463e4d4b115412deb71dc443114b4d99","532915b9a7eb59faea346c48b5de7046339eacf1141692e25319dcd72da375fc","f4dde909dac3dc124607edf61c3c5206f0fbacf197c48864143e7eae00d302c2","73d280d2abc3b7ccf26e7470aa811579f750c7f4703e910ded225ffc85f4ce76","e1f4bd89e3f9bdda9735ecb57ccc01565c0b611d15031cb10f4a43271afa1aa0",{"version":"b1c7d9d98fdf2623398e2ef20f8218cb538c0f644ebdda1b034900880ad84204","signature":"dd06718dde608387890ddad92970e087e9a9f4ede683a2f50c5de4207b72eea8"},"8dcdc7eca61dc9141dbb0853c3e6f6f6a88b699e32b4972f77b8d18fe91afb8d",{"version":"9a9443b70b408e39b86400bcb4b4f19a51e77643d8b5eb16557d17a56417863e","signature":"1c9fc048e014bac1615ef9b197029794c75c5aa7fd4fae15a3a2197b1b73cc97"},"ca87ce5cb141d1bbaf694004a3af00a646a32531e52a135c79406d4583b205b8","4c4143a9a3cf8ab658f4bc17dd39e143e10d7ce99f4507abd3fd9b1f02e2fdd3",{"version":"50f0b20bd5cc3338f2b8d4c4acd787bc9c22ba449a424adf799129f0a42065cb","signature":"7527b70f46226630d8d9bc4ca7a857a6401fa9b9940e2fb5f75d336abd965bbb"},{"version":"261b0c5aabe6928fdabacc37d4b3e649166f53ddbda52a5d4759f043f648887b","signature":"7c33748d8e3e97126d970f174ecbcec11cc0cc313b66d20f8e2c9caf56685388"},"4a315bfef92e0976db73e5273c8215929f6064845e1245c0e0e139ab58c43b80","474ca8c5109f8e6d020a9eaa501a7aad97e4b8ce8fbfe17fae128faec6e55e0c","bea9f7be0b735a52ead87157c16868a1719be37ad3ef9076697b5561f7d274d4","f513058549831e85376f8d19cafaf2a4a770b6eb1b859fb371141f2c9dec0d70","25f4af06aef1a0021ef7a774c29fd426d1aab745ac6a6377c07737c7f3583e50"],"root":[[84,94],[97,101]],"options":{"allowJs":true,"esModuleInterop":true,"jsx":4,"module":99,"noImplicitAny":false,"skipLibCheck":true,"strict":true,"target":1},"referencedMap":[[98,1],[100,2],[85,3],[86,4],[101,2],[87,5],[88,6],[89,6],[90,7],[91,6],[99,8],[84,9],[92,10],[93,10],[94,6],[97,11],[96,12],[95,7],[53,13],[54,14],[73,15],[63,16],[82,17],[79,18],[64,16],[72,19],[65,20],[77,21],[83,22],[66,23],[67,24],[69,25],[76,26],[80,27],[74,28],[71,29],[68,23],[78,16],[70,30],[75,31],[61,32],[60,32],[62,33],[58,34],[57,35]],"affectedFilesPendingEmit":[100,101,87,88,89,90,91,99,84,92,93,94,97,96,95],"version":"5.9.2"} \ No newline at end of file From 5dfa6808b518f05dbd7b75023eeff7d6b4cb581e Mon Sep 17 00:00:00 2001 From: MrBeanDev Date: Tue, 21 Oct 2025 20:12:17 +0530 Subject: [PATCH 2/3] fix: Update Clerk domain in authentication configuration --- .gitignore | 12 +++++++++++- convex/auth.config.ts | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9ca0d6a..d7cc239 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,14 @@ certificates post_migrator.py # Server -firecrawl-responses-api/.env \ No newline at end of file +firecrawl-responses-api/.env + +# convex generated files +convex/_generated/api.d.ts +convex/_generated/api.js +convex/_generated/dataModel.d.ts +convex/_generated/server.d.ts +convex/_generated/server.js +convex/tsconfig.tsbuildinfo +convex.json +convex/tsconfig.tsbuildinfo diff --git a/convex/auth.config.ts b/convex/auth.config.ts index e30d616..cdb4c24 100644 --- a/convex/auth.config.ts +++ b/convex/auth.config.ts @@ -10,7 +10,7 @@ export default { { // This reads from Convex environment variable (not process.env) // Set via: npx convex env set CLERK_JWT_ISSUER_DOMAIN "https://..." - domain: "https://oriented-quetzal-4.clerk.accounts.dev", + domain: "https://large-polliwog-3.clerk.accounts.dev", applicationID: "convex", }, ], From a445acb438eac72319c1a9777a2a24a455a069b2 Mon Sep 17 00:00:00 2001 From: MrBeanDev Date: Tue, 21 Oct 2025 20:34:59 +0530 Subject: [PATCH 3/3] fix: Refactor ExtractNodePanel and WorkflowBuilder for improved functionality and performance --- .../workflow-builder/ExtractNodePanel.tsx | 121 +++++++++------ .../workflow-builder/WorkflowBuilder.tsx | 139 +++++++++++------- package.json | 1 + tsconfig.json | 4 +- 4 files changed, 161 insertions(+), 104 deletions(-) diff --git a/components/app/(home)/sections/workflow-builder/ExtractNodePanel.tsx b/components/app/(home)/sections/workflow-builder/ExtractNodePanel.tsx index 4e17710..fc210f1 100644 --- a/components/app/(home)/sections/workflow-builder/ExtractNodePanel.tsx +++ b/components/app/(home)/sections/workflow-builder/ExtractNodePanel.tsx @@ -1,21 +1,25 @@ "use client"; import { motion, AnimatePresence } from "framer-motion"; -import { useState, useEffect } from "react"; +import { useState, useEffect, useRef } from "react"; +import type { Node } from "@xyflow/react"; interface ExtractNodePanelProps { - nodeData: any; + node: Node | null; + nodes: Node[]; onUpdate: (nodeId: string, updates: any) => void; onClose: () => void; - onAddMCP: () => void; + onDelete: (nodeId: string) => void; } export default function ExtractNodePanel({ - nodeData, + node, + nodes, onUpdate, onClose, - onAddMCP, + onDelete, }: ExtractNodePanelProps) { + const nodeData = node?.data as any; const [instructions, setInstructions] = useState(nodeData?.instructions || 'Extract information from the input'); const [model, setModel] = useState(nodeData?.model || 'gpt-4o'); const [customModel, setCustomModel] = useState(''); @@ -30,6 +34,7 @@ export default function ExtractNodePanel({ }, null, 2) ); const [schemaError, setSchemaError] = useState(''); + const updateTimeoutRef = useRef(null); // Validate JSON schema useEffect(() => { @@ -41,41 +46,69 @@ export default function ExtractNodePanel({ } }, [jsonSchema]); + // Debounced update to prevent infinite loops useEffect(() => { - onUpdate(nodeData?.id, { - instructions, - model, - jsonSchema, - nodeType: 'extract', - }); - }, [instructions, model, jsonSchema, nodeData?.id, onUpdate]); + // Clear any pending updates + if (updateTimeoutRef.current) { + clearTimeout(updateTimeoutRef.current); + } + + // Debounce the update + updateTimeoutRef.current = setTimeout(() => { + onUpdate(nodeData?.id, { + instructions, + model, + jsonSchema, + nodeType: 'extract', + }); + }, 300); // 300ms debounce + + // Cleanup on unmount + return () => { + if (updateTimeoutRef.current) { + clearTimeout(updateTimeoutRef.current); + } + }; + }, [instructions, model, jsonSchema, nodeData?.id]); // Remove onUpdate from deps to prevent loop return ( - - {/* Header */} -
-
-

Extract (Schema)

- + {node && ( + + {/* Header */} +
+
+

Extract (Schema)

+
+ + +
+
+

+ Use LLM to extract structured data with a JSON schema +

-

- Use LLM to extract structured data with a JSON schema -

-
{/* Content */}
@@ -141,21 +174,12 @@ export default function ExtractNodePanel({

- {/* MCP Tools */} -
+ {/* MCP Tools - Hidden for now since Extract nodes don't use MCP */} + {/*
-
{nodeData?.mcpTools && nodeData.mcpTools.length > 0 ? ( @@ -191,16 +215,17 @@ export default function ExtractNodePanel({

)} -
+
*/} {/* Info Box */}

- How it works: The LLM analyzes the input and extracts data matching your JSON schema. Use MCP tools to give the agent access to external data sources like web search. + How it works: The LLM analyzes the input and extracts data matching your JSON schema.

+ )}
); } diff --git a/components/app/(home)/sections/workflow-builder/WorkflowBuilder.tsx b/components/app/(home)/sections/workflow-builder/WorkflowBuilder.tsx index dfef7b3..c656c69 100644 --- a/components/app/(home)/sections/workflow-builder/WorkflowBuilder.tsx +++ b/components/app/(home)/sections/workflow-builder/WorkflowBuilder.tsx @@ -249,11 +249,12 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: const updateTemplateStructure = useMutation(api.workflows.updateTemplateStructure); // Function to seed templates via API - const seedTemplates = async () => { + const seedTemplates = useCallback(async () => { const response = await fetch('/api/templates/seed', { method: 'POST' }); const data = await response.json(); return data; - }; + }, []); + const [selectedNode, setSelectedNode] = useState(null); const [showPreview, setShowPreview] = useState(false); const [showExecution, setShowExecution] = useState(false); @@ -290,6 +291,57 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: // Workflow management const { workflow, convexId, updateNodes, updateEdges, saveWorkflow, saveWorkflowImmediate, deleteWorkflow, createNewWorkflow } = useWorkflow(initialWorkflowId || undefined); + // Helper functions defined early to avoid hoisting issues + const getNodeColor = useCallback((type: string): string => { + const colorMap: Record = { + 'agent': 'bg-blue-500', + 'mcp': 'bg-[#FFEFA4] dark:bg-[#FFDD40]', + 'firecrawl': 'bg-heat-100', + 'if-else': 'bg-[#FEE7C2] dark:bg-[#FFAE2B]', + 'while': 'bg-[#FEE7C2] dark:bg-[#FFAE2B]', + 'user-approval': 'bg-[#E5E7EB] dark:bg-[#9CA3AF]', + 'transform': 'bg-[#ECE3FF] dark:bg-[#9665FF]', + 'set-state': 'bg-[#ECE3FF] dark:bg-[#9665FF]', + 'file-search': 'bg-indigo-500', + 'extract': 'bg-purple-500', + 'note': 'bg-[#E4E4E7] dark:bg-[#52525B]', + 'end': 'bg-teal-500', + 'start': 'bg-gray-600', + }; + return colorMap[type] || 'bg-gray-500'; + }, []); + + const createNodeLabel = useCallback((label: string, color: string, nodeType?: string) => { + // Get icon for this node type + const nodeCategory = nodeCategories.find(cat => + cat.nodes.some(n => n.type === nodeType || n.label === label) + ); + const nodeConfig = nodeCategory?.nodes.find(n => n.type === nodeType || n.label === label); + const IconComponent = nodeConfig?.icon; + + // Determine text color based on node type + const getTextColor = () => { + if (nodeType === 'note') return 'text-white'; // White text for note nodes (yellow background) + if (nodeType === 'if-else' || nodeType === 'while' || nodeType === 'user-approval') { + return 'text-[#18181b]'; // Dark text for orange background nodes + } + return 'text-[#18181b]'; // Default dark text + }; + + return ( +
+
+ {IconComponent ? ( + + ) : ( +
+ )} +
+ {label} +
+ ); + }, []); + // AUTO-SAVE DISABLED - Use manual Save button instead // Smart auto-save: only save when nodes/edges actually change, with debounce // const lastSavedNodesRef = useRef(''); @@ -369,6 +421,7 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: useEffect(() => { setEnvironment('draft'); setShowTestEndpoint(false); // Close API panel when switching workflows + // eslint-disable-next-line react-hooks/exhaustive-deps }, [workflow?.id]); const handleDuplicateWorkflow = useCallback(() => { @@ -459,11 +512,20 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: }, [workflow, deleteWorkflow, setConfirmDialog, setShowWorkflowMenu]); const { runWorkflow, stopWorkflow, isRunning, nodeResults, execution, currentNodeId, pendingAuth, resumeWorkflow } = useWorkflowExecution(); + // Track what we've already loaded to prevent re-processing + const loadedTemplateRef = useRef(null); + const loadedWorkflowRef = useRef(null); + // Load template or workflow on mount useEffect(() => { if (initialized) return; if (initialTemplateId) { + // Skip if we've already processed this template + if (loadedTemplateRef.current === initialTemplateId) { + return; + } + // Check if template is loading from Convex if (template === undefined) { // Still loading from Convex @@ -488,6 +550,9 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: if (template) { console.log('Loading template from Convex:', template); + // Mark this template as loaded to prevent re-processing + loadedTemplateRef.current = initialTemplateId; + // Clean up any invalid edges in the template const cleaned = cleanupInvalidEdges(template.nodes, template.edges); const cleanedNodes = cleaned.nodes; @@ -546,6 +611,11 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: setInitialized(true); } } else if (initialWorkflowId && workflow && !initialized) { + // Skip if we've already processed this workflow + if (loadedWorkflowRef.current === initialWorkflowId) { + return; + } + // Use workflow data from useWorkflow hook (loaded via API) console.log('Loading workflow from hook:', { id: workflow.id, @@ -554,6 +624,9 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: nodes: workflow.nodes?.map((n: any) => ({ id: n.id, type: n.type })) }); + // Mark this workflow as loaded to prevent re-processing + loadedWorkflowRef.current = initialWorkflowId; + // Clean up any invalid edges before rendering const cleaned = cleanupInvalidEdges(workflow.nodes, workflow.edges); const cleanedNodes = cleaned.nodes; @@ -597,57 +670,7 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: // For new workflows, don't select any node by default // User can click the start node or drag new nodes to build their workflow } - }, [initialTemplateId, initialWorkflowId, initialized, setNodes, setEdges, saveWorkflow, template, seedTemplates, workflow]); - - const createNodeLabel = (label: string, color: string, nodeType?: string) => { - // Get icon for this node type - const nodeCategory = nodeCategories.find(cat => - cat.nodes.some(n => n.type === nodeType || n.label === label) - ); - const nodeConfig = nodeCategory?.nodes.find(n => n.type === nodeType || n.label === label); - const IconComponent = nodeConfig?.icon; - - // Determine text color based on node type - const getTextColor = () => { - if (nodeType === 'note') return 'text-white'; // White text for note nodes (yellow background) - if (nodeType === 'if-else' || nodeType === 'while' || nodeType === 'user-approval') { - return 'text-[#18181b]'; // Dark text for orange background nodes - } - return 'text-[#18181b]'; // Default dark text - }; - - return ( -
-
- {IconComponent ? ( - - ) : ( -
- )} -
- {label} -
- ); - }; - - const getNodeColor = (type: string): string => { - const colorMap: Record = { - 'agent': 'bg-blue-500', - 'mcp': 'bg-[#FFEFA4] dark:bg-[#FFDD40]', - 'firecrawl': 'bg-heat-100', - 'if-else': 'bg-[#FEE7C2] dark:bg-[#FFAE2B]', - 'while': 'bg-[#FEE7C2] dark:bg-[#FFAE2B]', - 'user-approval': 'bg-[#E5E7EB] dark:bg-[#9CA3AF]', - 'transform': 'bg-[#ECE3FF] dark:bg-[#9665FF]', - 'set-state': 'bg-[#ECE3FF] dark:bg-[#9665FF]', - 'file-search': 'bg-indigo-500', - 'extract': 'bg-purple-500', - 'note': 'bg-[#E4E4E7] dark:bg-[#52525B]', - 'end': 'bg-teal-500', - 'start': 'bg-gray-600', - }; - return colorMap[type] || 'bg-gray-500'; - }; + }, [initialTemplateId, initialWorkflowId, initialized, setNodes, setEdges, saveWorkflow, template, workflow, createNodeLabel, getNodeColor, seedTemplates]); // Detect duplicate credentials useEffect(() => { @@ -663,6 +686,7 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: }); } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [workflow?.nodes, workflow?.edges]); // Sync React Flow state with workflow state (debounced to avoid loops) @@ -674,9 +698,12 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: // Cleanup timeouts on unmount to prevent memory leaks useEffect(() => { return () => { - if (nodesSaveTimeoutRef.current) clearTimeout(nodesSaveTimeoutRef.current); - if (edgesSaveTimeoutRef.current) clearTimeout(edgesSaveTimeoutRef.current); + const nodesSaveTimeout = nodesSaveTimeoutRef.current; + const edgesSaveTimeout = edgesSaveTimeoutRef.current; + if (nodesSaveTimeout) clearTimeout(nodesSaveTimeout); + if (edgesSaveTimeout) clearTimeout(edgesSaveTimeout); }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -1159,6 +1186,7 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: document.addEventListener('keydown', handleKeyDown); return () => document.removeEventListener('keydown', handleKeyDown); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedNode, selectedEdgeId, nodes, edges, handleDeleteNode, setNodes, setEdges, isRunning, handleAutoArrange]); const handleRunWithInput = useCallback(async (input: string) => { @@ -1355,6 +1383,7 @@ function WorkflowBuilderInner({ onBack, initialWorkflowId, initialTemplateId }: return node; }) ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [nodes.length]); // Only re-run when node count changes return ( diff --git a/package.json b/package.json index 338a244..a408841 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "lsof -ti:3000,3001 | xargs kill -9 2>/dev/null || true && next dev", + "dev:windows": "powershell -Command \"try { Get-NetTCPConnection -LocalPort 3000,3001 -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue } } catch {}; next dev\"", "dev:all": "concurrently \"npx convex dev\" \"npm run dev\"", "build": "next build", "start": "next start", diff --git a/tsconfig.json b/tsconfig.json index ac48690..5648ea1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,7 +36,9 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - ".next/dev/types/**/*.ts" + ".next/dev/types/**/*.ts", + ".next\\dev/types/**/*.ts", + ".next\\dev/types/**/*.ts" ], "exclude": [ "node_modules"