MCPcopy Create free account
hub / github.com/diillson/chatcli / buildTreeArgv

Function buildTreeArgv

cli/plugins/builtin_tree.go:180–192  ·  view source on GitHub ↗

buildTreeArgv reconstructs the engine.handleTree argv form. We expose intuitive names to the LLM (depth/exclude) but the engine uses its own conventions (max-depth/ignore) — translation lives here in a single site so an engine flag rename only breaks here.

(p treeArgs)

Source from the content-addressed store, hash-verified

178// uses its own conventions (max-depth/ignore) — translation lives
179// here in a single site so an engine flag rename only breaks here.
180func buildTreeArgv(p treeArgs) []string {
181 var argv []string
182 if p.Dir != "" {
183 argv = append(argv, "--dir", p.Dir)
184 }
185 if p.Depth > 0 {
186 argv = append(argv, "--max-depth", strconv.Itoa(p.Depth))
187 }
188 if p.Exclude != "" {
189 argv = append(argv, "--ignore", p.Exclude)
190 }
191 return argv
192}

Calls

no outgoing calls