MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getAnnotateFileHeader

Function getAnnotateFileHeader

apps/opencode-plugin/cli-bridge.ts:443–454  ·  view source on GitHub ↗
(filePath: string, cwd?: string)

Source from the content-addressed store, hash-verified

441}
442
443function getAnnotateFileHeader(filePath: string, cwd?: string): "File" | "Folder" {
444 if (/^https?:\/\//i.test(filePath)) return "File";
445
446 try {
447 const resolved = path.isAbsolute(filePath)
448 ? filePath
449 : path.resolve(cwd || process.cwd(), filePath);
450 return statSync(resolved).isDirectory() ? "Folder" : "File";
451 } catch {
452 return "File";
453 }
454}
455
456export async function handleCliCommand(input: {
457 command: string;

Callers 1

handleCliCommandFunction · 0.85

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected