Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add Hermes and Pi agent provider support #2748

Closedjoeynyc(GitHub profile, opens in a new tab)wants to merge 23 commits intomain fromrefs/pull/2748/headopened View on GitHub

Showing 44 changed files with 94 additions and 0 deletions (loading 43).

x
0 of 44 viewed, 44 left
94 additions and 0 deletionsapps/server/scripts/dev-watch.mjsAdded
View file
@@ -0,0 +1,94 @@
+import { spawn } from "node:child_process";
+import { watch } from "node:fs";
+import { stat } from "node:fs/promises";
+import { dirname, extname, resolve } from "node:path";
+import { fileURLToPath } from "node:url";
+​
+const scriptsDir = dirname(fileURLToPath(import.meta.url));
+const serverDir = resolve(scriptsDir, "..");
+const srcDir = resolve(serverDir, "src");
+const entry = resolve(srcDir, "bin.ts");
+const sourceExtensions = new Set([".cjs", ".cts", ".js", ".json", ".mjs", ".mts", ".ts"]);
+​
+let child;
+let restartTimer;
+let stopping = false;
+​
+function start() {
+ child = spawn(process.execPath, [entry], {
+ stdio: "inherit",
+ env: process.env,
+ cwd: serverDir,
+ });
+​
+ child.on("exit", (code, signal) => {
+ if (stopping || restartTimer) {
+ return;
+ }
+ if (signal) {
+ process.kill(process.pid, signal);
+ return;