Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(assistantUiMock): correct mock chat model to return valid response

Steven Enamakelda3e520a6b07
diff --git a/app/src/lib/assistantUiMock/mockChatModel.ts b/app/src/lib/assistantUiMock/mockChatModel.ts
index 5b90b21e28..8b0c40c664 100644
--- a/app/src/lib/assistantUiMock/mockChatModel.ts
+++ b/app/src/lib/assistantUiMock/mockChatModel.ts
@@ -144,8 +144,10 @@ export const mockChatModelAdapter: ChatModelAdapter = {
write(false);
pending += 1;
- const startedAt = performance.now();
- const elapsed = () => Math.round((performance.now() - startedAt) / 100) / 10;
+ // `Date.now`, not `performance.now`: the latter is not in this project's
+ // ESLint globals, and tenth-of-a-second resolution is all this displays.
+ const startedAt = Date.now();
+ const elapsed = () => Math.round((Date.now() - startedAt) / 100) / 10;
void (async () => {
try {