feat(cursor): harden daemon integration and model discovery

This commit is contained in:
Tam Nhu Tran committed 2026-02-17 04:09:06 +07:00
1 parent 4bd6877dcf
commit c639cefa7b
11 files changed
+953 -252

No files matched your search

+7
View File
@@ -153,6 +153,13 @@ describe('startDaemon', () => {
const running = await isDaemonRunning(port);
expect(running).toBe(true);
// Verify models endpoint exists and is OpenAI-compatible list shape
const modelsResponse = await fetch(`http://127.0.0.1:${port}/v1/models`);
expect(modelsResponse.status).toBe(200);
const modelsJson = (await modelsResponse.json()) as { object?: string; data?: unknown[] };
expect(modelsJson.object).toBe('list');
expect(Array.isArray(modelsJson.data)).toBe(true);
// Verify chat endpoint exists (requires auth, should not be 404)
const chatResponse = await fetch(`http://127.0.0.1:${port}/v1/chat/completions`, {
method: 'POST',