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

Function pluginScope

packages/opencode/src/config/tui.ts:49–53  ·  view source on GitHub ↗
(file: string, ctx: { directory: string })

Source from the content-addressed store, hash-verified

47export class Service extends Context.Service<Service, Interface>()("@opencode/TuiConfig") {}
48
49function pluginScope(file: string, ctx: { directory: string }): ConfigPlugin.Scope {
50 if (Filesystem.contains(ctx.directory, file)) return "local"
51 // if (ctx.worktree !== "/" && Filesystem.contains(ctx.worktree, file)) return "local"
52 return "global"
53}
54
55function normalize(raw: Record<string, unknown>) {
56 const data = { ...raw }

Callers 1

mergeFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected