Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Say how long a silent turn may wait, without rounding it up

quang.tranminh9591a02a12d1
diff --git a/server/drivers/acp/quiet-status.test.ts b/server/drivers/acp/quiet-status.test.ts
index 346ad61ed9..aceeda8cf6 100644
--- a/server/drivers/acp/quiet-status.test.ts
+++ b/server/drivers/acp/quiet-status.test.ts
@@ -105,10 +105,15 @@ describe("describeQuiet", () => {
it("does not blame a rate limit while the request is still open", () => {
const text = describeQuiet("OpenCode", { kind: "waiting-model", nearFullContext: false }, 60_000, 900_000);
- expect(text).toBe("OpenCode is waiting on its model: no reply for 60 s, but its request is still open. Its model provider may be slow or busy; this turn stops on its own after 15 min.");
+ expect(text).toBe("OpenCode is waiting on its model: no reply for 60 s, but its request is still open. Its model provider may be slow or busy; the turn stops after 15 min of silence.");
expect(text).not.toContain("rate limit");
});
+ it("states the silence guard without rounding it up", () => {
+ expect(describeQuiet("OpenCode", { kind: "waiting-model", nearFullContext: false }, 60_000, 90_000))
+ .toContain("the turn stops after 90 s of silence");
+ });
+
it("leaves out the stop time when the prompt silence guard is off", () => {
expect(describeQuiet("OpenCode", { kind: "waiting-model", nearFullContext: false }, 60_000, 0))
.toBe("OpenCode is waiting on its model: no reply for 60 s, but its request is still open. Its model provider may be slow or busy.");
diff --git a/server/drivers/acp/quiet-status.ts b/server/drivers/acp/quiet-status.ts
index fd5546be32..3cfbc53472 100644
--- a/server/drivers/acp/quiet-status.ts
+++ b/server/drivers/acp/quiet-status.ts
@@ -412,7 +412,7 @@ export function describeQuiet(name: string, state: QuietState, quietMs: number,
if (state.nearFullContext) {
return `${name} is waiting on its model: no reply for ${quiet}, but its request is still open. Its history is nearly full, so it may be compressing it.`;
}
- const ownStop = stopAfterMs > 0 ? `; this turn stops on its own after ${minutes(stopAfterMs)}` : "";
+ const ownStop = stopAfterMs > 0 ? `; the turn stops after ${formatQuietLimit(stopAfterMs)} of silence` : "";
return `${name} is waiting on its model: no reply for ${quiet}, but its request is still open. Its model provider may be slow or busy${ownStop}.`;
}
case "busy":