MCPcopy Create free account
hub / github.com/anomalyco/opencode / args

Function args

packages/session-ui/src/components/basic-tool.tsx:305–317  ·  view source on GitHub ↗
(input: Record<string, unknown> | undefined)

Source from the content-addressed store, hash-verified

303}
304
305function args(input: Record<string, unknown> | undefined) {
306 if (!input) return []
307 const skip = new Set(["description", "query", "url", "filePath", "path", "pattern", "name"])
308 return Object.entries(input)
309 .filter(([key]) => !skip.has(key))
310 .flatMap(([key, value]) => {
311 if (typeof value === "string") return [`${key}=${value}`]
312 if (typeof value === "number") return [`${key}=${value}`]
313 if (typeof value === "boolean") return [`${key}=${value}`]
314 return []
315 })
316 .slice(0, 3)
317}
318
319export function GenericTool(props: {
320 tool: string

Callers 1

GenericToolFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected