MCPcopy
hub / github.com/anomalyco/opencode / rule

Function rule

packages/opencode/src/cli/cmd/run/tool.ts:1238–1244  ·  view source on GitHub ↗
(name?: string)

Source from the content-addressed store, hash-verified

1236}
1237
1238function rule(name?: string): AnyToolRule | undefined {
1239 if (!name || !key(name)) {
1240 return undefined
1241 }
1242
1243 return TOOL_RULES[name]
1244}
1245
1246function frame(part: ToolPart): ToolFrame {
1247 const state = dict(part.state)

Callers 5

toolViewFunction · 0.85
toolInlineInfoFunction · 0.85
toolScrollFunction · 0.85
toolPermissionInfoFunction · 0.85
toolSnapshotFunction · 0.85

Calls 1

keyFunction · 0.70

Tested by

no test coverage detected