Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Remove automatic assistant response job scheduling on node creation

Ylber Gashi0505e1fbe7be
diff --git a/apps/server/src/lib/nodes.ts b/apps/server/src/lib/nodes.ts
index a3b5ecbe..9bfafe18 100644
--- a/apps/server/src/lib/nodes.ts
+++ b/apps/server/src/lib/nodes.ts
@@ -206,19 +206,6 @@ export const createNode = async (
await scheduleNodeEmbedding(createdNode);
- if (
- attributes.type === 'message' &&
- (attributes as MessageAttributes).subtype === 'question'
- ) {
- await jobService.addJob({
- type: 'assistant_response',
- messageId: input.nodeId,
- workspaceId: input.workspaceId,
- selectedContextNodeIds:
- (attributes as MessageAttributes).selectedContextNodeIds || [],
- });
- }
-
return {
node: createdNode,
};
@@ -488,19 +475,6 @@ export const createNodeFromMutation = async (
await scheduleNodeEmbedding(createdNode);
- if (
- attributes.type === 'message' &&
- (attributes as MessageAttributes).subtype === 'question'
- ) {
- await jobService.addJob({
- type: 'assistant_response',
- messageId: mutation.nodeId,
- workspaceId: user.workspace_id,
- selectedContextNodeIds:
- (attributes as MessageAttributes).selectedContextNodeIds || [],
- });
- }
-
return {
node: createdNode,
};