Implements README.md injection similar to existing AGENTS.md injector. Automatically injects README.md contents when reading files, searching upward from file directory to project root. Closes #14 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
import { join } from "node:path";
|
|
import { xdgData } from "xdg-basedir";
|
|
|
|
export const OPENCODE_STORAGE = join(xdgData ?? "", "opencode", "storage");
|
|
export const README_INJECTOR_STORAGE = join(
|
|
OPENCODE_STORAGE,
|
|
"directory-readme",
|
|
);
|
|
export const README_FILENAME = "README.md";
|