UNPKG

@autobe/agent

Version:

AI backend server code generator

74 lines 2.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformTestHistories = void 0; const uuid_1 = require("uuid"); const transformTestHistories = (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 [ { id: (0, uuid_1.v4)(), created_at: new Date().toISOString(), type: "systemMessage", text: [ "Interface generation is not yet completed.", "Don't call the any tool function,", "but say to process the interface generation.", ].join(" "), }, ]; }; exports.transformTestHistories = transformTestHistories; //# sourceMappingURL=transformTestHistories.js.map