forked from bai/curriculum-project-hub
fix(hub): 启动重置状态 + lazy-init 修复空白消息 + busy 改表情
三个修复:
1. 启动时清锁+标死run为FAILED(防重启后卡死)
2. 空白消息修复:lazy-init 改为第一个 text-delta 立即创建消息
(不走 throttle);.then 加 fallback:没收到 text-delta 时用
result.text 发完整回复
3. busy 提示从文本'项目正在处理中'改为⏳表情回复
tsc rc=0。
This commit is contained in:
@@ -42,6 +42,16 @@ async function main(): Promise<void> {
|
||||
|
||||
const app = Fastify({ logger: true });
|
||||
|
||||
// Startup reset: clear stale locks + mark dead runs as FAILED.
|
||||
await prisma.projectAgentLock.deleteMany({});
|
||||
await prisma.agentRun.updateMany({
|
||||
where: { status: "ACTIVE" },
|
||||
data: { status: "FAILED", error: "process restart", finishedAt: new Date() },
|
||||
});
|
||||
app.log.info("startup: cleared stale locks + dead runs");
|
||||
|
||||
|
||||
|
||||
app.get("/api/healthz", async () => ({ ok: true, ts: Date.now() }));
|
||||
|
||||
// Model registry (role-as-data, ADR-0017). Claude Code SDK uses model
|
||||
|
||||
Reference in New Issue
Block a user