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

Function readText

packages/tui/src/util/persistence.ts:4–6  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

2import { appendFile, mkdir, rename, rm } from "fs/promises"
3
4export function readText(filePath: string) {
5 return Bun.file(filePath).text()
6}
7
8export function readJson<T>(filePath: string) {
9 return Bun.file(filePath).json() as Promise<T>

Callers 4

frecency.tsxFile · 0.90
history.tsxFile · 0.90
stash.tsxFile · 0.90

Calls 2

fileMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected