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

Method IsReadOnly

cli/plugins/builtin_coder_caps.go:23–30  ·  view source on GitHub ↗

Fase 2.1 capability advertisements for BuiltinCoderPlugin, kept in a separate file from builtin_coder.go to keep the cyclo-new scan clean. IsReadOnly reports whether the @coder subcommand is read-only for the given args. Only `read`, `search`, `tree`, `list`, `stat` are pure reads — every other subc

(args []string)

Source from the content-addressed store, hash-verified

21// pure reads — every other subcommand (`exec`, `write`, `patch`,
22// `test`) mutates state.
23func (p *BuiltinCoderPlugin) IsReadOnly(args []string) bool {
24 sub := coderSubcommand(args)
25 switch sub {
26 case "read", "search", "tree", "list", "stat":
27 return true
28 }
29 return false
30}
31
32// IsConcurrencySafe mirrors IsReadOnly: read/search/tree on
33// independent paths can run in parallel; mutating subcommands stay

Callers 1

IsConcurrencySafeMethod · 0.95

Calls 1

coderSubcommandFunction · 0.85

Tested by

no test coverage detected