mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
- Rename packages/opencode → packages/tfcode (directory only) - Rename bin/opencode → bin/tfcode (CLI binary) - Rename .opencode → .tfcode (config directory) - Update package.json name and bin field - Update config directory path references (.tfcode) - Keep internal code references as 'opencode' for easy upstream sync - Keep @opencode-ai/* workspace package names This minimal branding approach allows clean merges from upstream opencode repository while providing tfcode branding for users.
11 lines
441 B
TypeScript
11 lines
441 B
TypeScript
import path from "path"
|
|
import { Effect, FileSystem } from "effect"
|
|
|
|
export const writeFileStringScoped = Effect.fn("test.writeFileStringScoped")(function* (file: string, text: string) {
|
|
const fs = yield* FileSystem.FileSystem
|
|
yield* fs.makeDirectory(path.dirname(file), { recursive: true })
|
|
yield* fs.writeFileString(file, text)
|
|
yield* Effect.addFinalizer(() => fs.remove(file, { force: true }).pipe(Effect.orDie))
|
|
return file
|
|
})
|