Unverified 提交 b4d5f211 authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Do not commit if only execute SQL queries (#446)

Fixes #438
上级 897d2e52
......@@ -228,6 +228,7 @@ export async function processFullResponseActions(
const dyadExecuteSqlQueries = chatWithApp.app.supabaseProjectId
? getDyadExecuteSqlTags(fullResponse)
: [];
let writtenSqlMigrationFiles = 0;
const message = await db.query.messages.findFirst({
where: and(
......@@ -259,6 +260,7 @@ export async function processFullResponseActions(
query.content,
query.description,
);
writtenSqlMigrationFiles++;
} catch (error) {
errors.push({
message: `Failed to write SQL migration file for: ${query.description}`,
......@@ -445,7 +447,7 @@ export async function processFullResponseActions(
renamedFiles.length > 0 ||
deletedFiles.length > 0 ||
dyadAddDependencyPackages.length > 0 ||
dyadExecuteSqlQueries.length > 0;
writtenSqlMigrationFiles > 0;
let uncommittedFiles: string[] = [];
let extraFilesError: string | undefined;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论