Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(server): use a Cursor todo's title when its content is blank (#5073)
Arham Amin82b76e2138db
diff --git a/apps/server/src/provider/acp/CursorAcpExtension.test.ts b/apps/server/src/provider/acp/CursorAcpExtension.test.tsindex 0a6adb75f..ba070c912 100644--- a/apps/server/src/provider/acp/CursorAcpExtension.test.ts+++ b/apps/server/src/provider/acp/CursorAcpExtension.test.ts@@ -107,6 +107,25 @@ describe("CursorAcpExtension", () => {});});+ it("falls back to the title when content is present but blank", () => {+ expect(+ extractTodosAsPlan({+ toolCallId: "todos-2",+ todos: [+ { id: "1", content: "", title: "Titled step", status: "pending" },+ { id: "2", content: " ", title: "Whitespace content", status: "in_progress" },+ { id: "3", content: "", title: "", status: "pending" },+ ],+ merge: true,+ }),+ ).toEqual({+ plan: [+ { step: "Titled step", status: "pending" },+ { step: "Whitespace content", status: "inProgress" },+ ],+ });+ });+it("decodes Cursor list_available_models responses with per-model config options", () => {const decoded = CursorListAvailableModelsResponse.make({models: [diff --git a/apps/server/src/provider/acp/CursorAcpExtension.ts b/apps/server/src/provider/acp/CursorAcpExtension.tsindex 2e131a616..05fc53f4a 100644--- a/apps/server/src/provider/acp/CursorAcpExtension.ts+++ b/apps/server/src/provider/acp/CursorAcpExtension.ts@@ -94,7 +94,10 @@ export function extractTodosAsPlan(params: typeof CursorUpdateTodosRequest.Type)}>;} {const plan = params.todos.flatMap((todo) => {- const step = todo.content?.trim() ?? todo.title?.trim() ?? "";+ // Fall back to the title when content is missing OR blank. `??` only+ // covers a missing content, so a present-but-empty content ("" or+ // whitespace) would shadow a real title and drop the step below.+ const step = todo.content?.trim() || todo.title?.trim() || "";if (step === "") {return [];}