feat: added configurable base directory. #826
Mergedmcking-07(GitHub profile, opens in a new tab)merged 15 commits into
main fromrefs/pull/826/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- scripts/dev-runner.ts lines 107 to 117OutdatedResolvedby mcking-07(GitHub profile, opens in a new tab)@@ -101,4 +104,14 @@101104 return { offset, source: `hashed T3CODE_DEV_INSTANCE=${seed}` };102105 }103106104-function resolveStateDir(stateDir: string | undefined): Effect.Effect<string, never, Path.Path> {107+function resolveBaseDir(baseDir: string | undefined): Effect.Effect<string, never, Path.Path> {108+ return Effect.gen(function* () {109+ const path = yield* Path.Path;110+ const configured = baseDir?.trim();111+112+ if (configured) {113+ return path.resolve(configured);114+ }115+116+ return yield* DEFAULT_BASE_DIR;117+ });apps/desktop/src/main.ts lines 44 to 45OutdatedResolvedby mcking-07(GitHub profile, opens in a new tab)@@ -41,5 +41,5 @@4141 const UPDATE_GET_STATE_CHANNEL = "desktop:update-get-state";4242 const UPDATE_DOWNLOAD_CHANNEL = "desktop:update-download";4343 const UPDATE_INSTALL_CHANNEL = "desktop:update-install";44-const STATE_DIR =45- process.env.T3CODE_STATE_DIR?.trim() || Path.join(OS.homedir(), ".t3", "userdata");44+const BASE_DIR = process.env.T3CODE_BASE_DIR?.trim() || Path.join(OS.homedir(), ".t3");45+const STATE_DIR = process.env.T3CODE_STATE_DIR?.trim() || Path.join(BASE_DIR, "userdata");apps/server/src/git/Layers/CodexTextGeneration.test.ts lines 11 to 14OutdatedResolvedby mcking-07(GitHub profile, opens in a new tab)@@ -8,7 +8,7 @@88 import { TextGenerationError } from "../Errors.ts";99 import { TextGeneration } from "../Services/TextGeneration.ts";101011-const makeCodexTextGenerationTestLayer = (stateDir: string) =>11+const makeCodexTextGenerationTestLayer = (baseDir: string) =>1212 CodexTextGenerationLive.pipe(13- Layer.provideMerge(ServerConfig.layerTest(process.cwd(), stateDir)),13+ Layer.provideMerge(ServerConfig.layerTest(process.cwd(), `${baseDir}/userdata`, baseDir)),1414 Layer.provideMerge(NodeServices.layer),
mcking-07(GitHub profile, opens in a new tab) changed the title
mcking-07(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge merged this9e29c9d
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
6e656027-8c0a-4f2d-97e2-b39053dffd4bYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share