From b8321cbb007fbbbcbdaa25300096c3bb7efadb6c Mon Sep 17 00:00:00 2001 From: Rob Colbert Date: Sat, 16 May 2026 13:59:40 -0400 Subject: [PATCH] type fix for references --- gadget-code/src/models/project.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gadget-code/src/models/project.ts b/gadget-code/src/models/project.ts index ff09685..fe6dc93 100644 --- a/gadget-code/src/models/project.ts +++ b/gadget-code/src/models/project.ts @@ -10,25 +10,26 @@ import { IProjectSkill, ChatSessionMode, IProjectTask, - Types, } from "@gadget/api"; import { nanoid } from "nanoid"; export const ProjectSkillSchema = new Schema({ + _id: { type: String, default: () => nanoid() }, name: { type: String, required: true }, modes: { type: [String], enum: ChatSessionMode, required: true }, content: { type: String, required: true }, }); export const ProjectTaskSchema = new Schema({ + _id: { type: String, default: () => nanoid() }, name: { type: String, required: true }, - provider: { type: Types.ObjectId, required: true, ref: "AiProvider" }, + provider: { type: String, required: true, ref: "AiProvider" }, selectedModel: { type: String, required: true }, mode: { type: String, enum: ChatSessionMode, required: true }, crontab: { type: String, required: true }, content: { type: String, required: true }, enabled: { type: Boolean, default: true, required: true }, - lastRun: { type: Types.ObjectId, ref: "ChatSession" }, + lastRun: { type: String, ref: "ChatSession" }, }); export const ProjectSchema = new Schema({