UNPKG

@autobe/agent

Version:

AI backend server code generator

63 lines 2.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformInterfacePrerequisiteHistories = void 0; const uuid_1 = require("uuid"); const transformInterfacePrerequisiteHistories = (state) => { if (state.analyze === null) return [ { id: (0, uuid_1.v4)(), created_at: new Date().toISOString(), type: "systemMessage", text: [ "Requirement analysis is not yet completed.", "Don't call the any tool function,", "but say to process the requirement analysis.", ].join(" "), }, ]; else if (state.prisma === null) return [ { id: (0, uuid_1.v4)(), created_at: new Date().toISOString(), type: "systemMessage", text: [ "Prisma DB schema generation is not yet completed.", "Don't call the any tool function,", "but say to process the Prisma DB schema generation.", ].join(" "), }, ]; else if (state.analyze.step !== state.prisma.step) return [ { id: (0, uuid_1.v4)(), created_at: new Date().toISOString(), type: "systemMessage", text: [ "Prisma DB schema generation has not been updated", "for the latest requirement analysis.", "Don't call the any tool function,", "but say to re-process the Prisma DB schema generation.", ].join(" "), }, ]; else if (state.prisma.compiled.type !== "success") return [ { id: (0, uuid_1.v4)(), created_at: new Date().toISOString(), type: "systemMessage", text: [ "Prisma DB schema generation has not been updated", "for the latest requirement analysis.", "Don't call the any tool function,", "but say to re-process the Prisma DB schema generation.", ].join(" "), }, ]; return null; }; exports.transformInterfacePrerequisiteHistories = transformInterfacePrerequisiteHistories; //# sourceMappingURL=transformInterfacePrerequisiteHistories.js.map