Script for easily configuring, using, switching and comparing local offline coding models
1import { join } from "node:path";
2import { log } from "../log.js";
3import { writeExecutable } from "../util.js";
4import { LAUNCH_DIR } from "../config.js";
5import { localcodeWrapper } from "../templates/scripts.js";
6
7export async function createLauncherScripts(): Promise<void> {
8 // Resolve the project directory (where dist/main.js lives)
9 const projectDir = join(import.meta.dirname, "../..");
10
11 await writeExecutable(join(LAUNCH_DIR, "localcode"), localcodeWrapper(projectDir));
12 log(`Launcher script written to ${LAUNCH_DIR}`);
13}