Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.
TypeScript ai-sdkclaude-codeclicode-searchcodexcoding-agentscontext-retrievaldeveloper-toolsjevsemantic-searchtypescriptvercel-ai-gateway
fix(cli): keep no-locations output honest
David Zhang308803651305
diff --git a/apps/cli/src/render.ts b/apps/cli/src/render.tsindex eaad1f4..af97f2c 100644--- a/apps/cli/src/render.ts+++ b/apps/cli/src/render.ts@@ -56,7 +56,9 @@ export function renderResult(`No confident match within the navigation budget (${navigationByteBudget} serialized bytes); narrow the root to continue.`,]: []),- "Symbols use name@start-end. Roles are estimates; locations-only files remain reading leads.",+ noLocations+ ? "Roles are estimates. Declaration locations omitted."+ : "Symbols use name@start-end. Roles are estimates; locations-only files remain reading leads.",`AGENTS.md lookup (root and returned-file ancestors): ${context.instructionFiles.length ? context.instructionFiles.map(quote).join(", ") : "none found"}${context.instructionLookupIncomplete ? "; lookup incomplete" : ""}.`,...(result.status === "interrupted" ? ["Interrupted."] : []),...(omittedCount ? [`Source omitted: ${omittedCount} file(s).`] : []),@@ -64,7 +66,7 @@ export function renderResult(...result.issues.map(({ kind, count }) => `Issue: ${quote(kind)}: ${count}`),...(result.providerFailure ? [`Provider error: ${quote(result.providerFailure)}`] : []),...files.flatMap(({ file, excerpts, omitted }) => [- `- ${quote(file.path)} — ${file.roles.join(", ") || "relevant; role uncertain"}; ${excerpts.length ? "source below" : omitted ? "source omitted" : "locations only"}`,+ `- ${quote(file.path)} — ${file.roles.join(", ") || "relevant; role uncertain"}; ${excerpts.length ? "source below" : omitted ? "source omitted" : noLocations ? "path only" : "locations only"}`,]),noLocations ? "End file list." : "End file list. Declaration locations follow source.",];diff --git a/apps/cli/test/render.test.ts b/apps/cli/test/render.test.tsindex a274444..bf61dcf 100644--- a/apps/cli/test/render.test.ts+++ b/apps/cli/test/render.test.ts@@ -46,11 +46,20 @@ test("source precedes detailed locations and remains verbatim", () => {});test("no-locations omits the trailing declaration locations section", () => {- const output = renderResult(result(), 0, 0, true);- expect(output).not.toContain("Declaration locations");+ const value = result();+ value.files.push({+ ...value.files[0]!,+ path: "leads-only.py",+ excerpts: [],+ rendered: [],+ });+ const output = renderResult(value, 0, 0, true);+ expect(output).not.toContain("\nDeclaration locations:\n");expect(output).not.toContain("Declaration locations follow source");+ expect(output).not.toContain("locations-only files remain reading leads");expect(output).toContain("End file list.");expect(output).toContain('- "one.py" — implementation; source below');+ expect(output).toContain('- "leads-only.py" — implementation; path only');expect(output).toContain('Source block "one.py" lines 1-3:');expect(output).not.toContain("behavior@2-3");expect(output.endsWith("\nEnd context.\n")).toBe(true);