[PR #2542] Provide configuration options to the project tree in system prompt #10347

Closed
opened 2026-02-16 18:14:58 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2542

State: closed
Merged: No


This PR provides three experimental options to the project tree file listing in the system prompt

limit: integer
glob: string[]
format: string

limit makes the default 200 files/dirs configurable to allow control over the where the system cuts off
glob: an array of ripgrep style glob strings (these require foo/**)
format: set this to markdown to get a markdown formatted output

the default output format uses tab indents that is the most concise but also separates files from their parent directories which can cause a disconnect in the connection between the two.

setting to markdown will provide an output like this

# src/this
foo.ts
bar.ts
# src/this/that
foo.ts
bar.ts

Making the dirs markdown headers with a file list hopefully keep token locality closer together.

Closes #2541

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2542 **State:** closed **Merged:** No --- This PR provides three experimental options to the project tree file listing in the system prompt ``` limit: integer glob: string[] format: string ``` limit makes the default 200 files/dirs configurable to allow control over the where the system cuts off glob: an array of ripgrep style glob strings (these require foo/**) format: set this to markdown to get a markdown formatted output the default output format uses tab indents that is the most concise but also separates files from their parent directories which can cause a disconnect in the connection between the two. setting to markdown will provide an output like this ``` # src/this foo.ts bar.ts # src/this/that foo.ts bar.ts ``` Making the dirs markdown headers with a file list hopefully keep token locality closer together. Closes #2541
yindo added the pull-request label 2026-02-16 18:14:58 -05:00
yindo closed this issue 2026-02-16 18:14:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10347