MCPcopy Index your code
hub / github.com/anomalyco/opencode / runGlob

Function runGlob

packages/opencode/src/cli/cmd/run/tool.ts:288–299  ·  view source on GitHub ↗
(p: ToolProps<typeof GlobTool>)

Source from the content-addressed store, hash-verified

286}
287
288function runGlob(p: ToolProps<typeof GlobTool>): ToolInline {
289 const root = p.input.path ?? ""
290 const title = `Glob "${p.input.pattern ?? ""}"`
291 const suffix = root ? `in ${toolPath(root)}` : ""
292 const matches = p.metadata.count
293 const description = matches === undefined ? suffix : `${suffix}${suffix ? " · " : ""}${count(matches, "match")}`
294 return {
295 icon: "✱",
296 title,
297 ...(description && { description }),
298 }
299}
300
301function runGrep(p: ToolProps<typeof GrepTool>): ToolInline {
302 const root = p.input.path ?? ""

Callers

nothing calls this directly

Calls 2

toolPathFunction · 0.85
countFunction · 0.70

Tested by

no test coverage detected