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

Function kind

packages/opencode/src/git/index.ts:93–99  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

91}
92
93const kind = (code: string): Kind => {
94 if (code === "??") return "added"
95 if (code.includes("U")) return "modified"
96 if (code.includes("A") && !code.includes("D")) return "added"
97 if (code.includes("D") && !code.includes("A")) return "deleted"
98 return "modified"
99}
100
101export class Service extends Context.Service<Service, Interface>()("@opencode/Git") {}
102

Callers 1

index.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected