chore: remove local artifacts and sanitize repo

This commit is contained in:
Mohamed Boudra
2026-02-05 13:06:10 +07:00
parent 058c03684a
commit 3a31d708f8
7 changed files with 47 additions and 38 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# OpenAI API Key (for GPT-4, Whisper STT, and TTS)
OPENAI_API_KEY=sk-...
OPENAI_API_KEY=
# TTS Configuration (optional - defaults shown)
TTS_VOICE=alloy
+2 -2
View File
@@ -70,8 +70,8 @@ See [IMPLEMENTATION_PLAN.md](./IMPLEMENTATION_PLAN.md) for complete details.
## Environment Variables
```bash
OPENAI_API_KEY=sk-... # GPT-4 and TTS
DEEPGRAM_API_KEY=... # Streaming STT
OPENAI_API_KEY=your-openai-key-here # GPT-4 and TTS
DEEPGRAM_API_KEY=your-deepgram-key-here # Streaming STT
STT_MODEL=whisper-1 # Optional: override to gpt-4o-transcribe, etc.
STT_CONFIDENCE_THRESHOLD=-3.0 # Optional: reject low-confidence clips
STT_DEBUG_AUDIO_DIR=.stt-debug # Optional: persist raw dictation audio for debugging
@@ -1,5 +1,5 @@
import "dotenv/config";
import { readFile, writeFile, mkdir } from "node:fs/promises";
import { writeFile, mkdir } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import OpenAI from "openai";
@@ -17,22 +17,20 @@ async function main(): Promise<void> {
const __dirname = path.dirname(__filename);
const repoRoot = path.resolve(__dirname, "..");
const fixturePath = path.resolve(
repoRoot,
"src",
"server",
"fixtures",
"dictation",
"dictation-debug-largest.wav"
);
const outPath = path.resolve(
repoRoot,
"src",
"server",
"fixtures",
"dictation",
"dictation-debug-largest.transcript.txt"
);
const defaultOutPath = path.resolve(repoRoot, "tmp", "dictation-baseline.transcript.txt");
const audioPath =
process.env.DICTATION_AUDIO_PATH ??
(process.argv[2] ? path.resolve(process.argv[2]) : null);
const outPath = path.resolve(process.env.DICTATION_OUT_PATH ?? process.argv[3] ?? defaultOutPath);
if (!audioPath) {
// eslint-disable-next-line no-console
console.error(
"Usage: npx tsx packages/server/scripts/dictation-generate-baseline.ts <audioPath> [outPath]\n" +
" Or set DICTATION_AUDIO_PATH / DICTATION_OUT_PATH.\n"
);
process.exit(2);
}
const apiKey = requireEnv("OPENAI_API_KEY");
const transcriptionModel =
@@ -43,10 +41,8 @@ async function main(): Promise<void> {
const openai = new OpenAI({ apiKey });
// Use a temp file path for the SDK's file stream param.
// We already have a fixture file, so just stream it.
const response = await openai.audio.transcriptions.create({
file: await import("node:fs").then((fs) => fs.createReadStream(fixturePath)),
file: await import("node:fs").then((fs) => fs.createReadStream(audioPath)),
language: "en",
model: transcriptionModel,
prompt,
@@ -59,8 +55,7 @@ async function main(): Promise<void> {
await writeFile(outPath, `${response.text.trim()}\n`, "utf8");
// eslint-disable-next-line no-console
console.log(`Wrote baseline transcript to ${outPath}`);
console.log(`Wrote transcript baseline to ${outPath}`);
}
await main();
@@ -10,6 +10,7 @@
*/
import { WebSocket } from "ws";
import os from "node:os";
import { DaemonClient } from "../../client/daemon-client.js";
// Patch WebSocket to log all messages
@@ -28,7 +29,7 @@ class LoggingWebSocket extends OriginalWebSocket {
}
}
const PASEO_HOME = process.env.PASEO_HOME ?? "/Users/moboudra/.paseo";
const PASEO_HOME = process.env.PASEO_HOME ?? `${os.homedir()}/.paseo`;
const PASEO_PORT = process.env.PASEO_PORT ?? "6767";
const DAEMON_URL = `ws://127.0.0.1:${PASEO_PORT}/ws`;
@@ -7,12 +7,12 @@ import {
describe("stripShellWrapperPrefix", () => {
test("strips /bin/zsh -lc cd path && prefix", () => {
const command = "/bin/zsh -lc cd /Users/moboudra/dev/blankpage/editor && npm run format";
const command = "/bin/zsh -lc cd /Users/me/dev/blankpage/editor && npm run format";
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
});
test("strips /bin/zsh -lc \"cd path &&\" wrapper", () => {
const command = '/bin/zsh -lc "cd /Users/moboudra/dev/blankpage/editor && npm run format"';
const command = '/bin/zsh -lc "cd /Users/me/dev/blankpage/editor && npm run format"';
expect(stripShellWrapperPrefix(command)).toBe("npm run format");
});