Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: compilation issues on some pipes

Louis Beaumont42f1dffcf587
diff --git a/pipes/data-table/src/app/api/settings/route.ts b/pipes/data-table/src/app/api/settings/route.ts
index a923e160e..e53911f12 100644
--- a/pipes/data-table/src/app/api/settings/route.ts
+++ b/pipes/data-table/src/app/api/settings/route.ts
@@ -1,35 +1,13 @@
// app/api/settings/route.ts
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
-import type { Settings } from "@screenpipe/js";
+import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
-export const dynamic = 'force-dynamic'
+export const dynamic = "force-dynamic";
export async function GET() {
- const defaultSettings: Settings = {
- analyticsEnabled: true,
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: "",
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {}
- };
+ const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
diff --git a/pipes/identify-speakers/src/app/api/settings/route.ts b/pipes/identify-speakers/src/app/api/settings/route.ts
index 1c8682b0d..ddf1a30d5 100644
--- a/pipes/identify-speakers/src/app/api/settings/route.ts
+++ b/pipes/identify-speakers/src/app/api/settings/route.ts
@@ -2,36 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
+import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
export const dynamic = "force-dynamic";
export async function GET() {
- const defaultSettings: Settings = {
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: "",
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {
- token: "",
- },
- analyticsEnabled: true,
- };
+ const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
diff --git a/pipes/meeting/src/app/api/settings/route.ts b/pipes/meeting/src/app/api/settings/route.ts
index 343bd4a8c..f15de9b31 100644
--- a/pipes/meeting/src/app/api/settings/route.ts
+++ b/pipes/meeting/src/app/api/settings/route.ts
@@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
+import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
-export const dynamic = 'force-dynamic'
+export const dynamic = "force-dynamic";
export async function GET() {
- const defaultSettings: Settings = {
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: "",
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {
- token: "",
- },
- analyticsEnabled: true,
- };
-
+ const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
diff --git a/pipes/rewind/src/app/api/settings/route.ts b/pipes/rewind/src/app/api/settings/route.ts
index 5f2bf8fdc..f15de9b31 100644
--- a/pipes/rewind/src/app/api/settings/route.ts
+++ b/pipes/rewind/src/app/api/settings/route.ts
@@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
+import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
-export const dynamic = 'force-dynamic'
+export const dynamic = "force-dynamic";
export async function GET() {
- const defaultSettings: Settings = {
- analyticsEnabled: true,
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: "",
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {
- token: "",
- },
- };
-
+ const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
diff --git a/pipes/search/src/app/api/settings/route.ts b/pipes/search/src/app/api/settings/route.ts
index 343bd4a8c..f15de9b31 100644
--- a/pipes/search/src/app/api/settings/route.ts
+++ b/pipes/search/src/app/api/settings/route.ts
@@ -2,37 +2,13 @@
import { pipe } from "@screenpipe/js";
import { NextResponse } from "next/server";
import type { Settings } from "@screenpipe/js";
+import { getDefaultSettings } from "@screenpipe/browser";
// Force Node.js runtime
export const runtime = "nodejs"; // Add this line
-export const dynamic = 'force-dynamic'
+export const dynamic = "force-dynamic";
export async function GET() {
- const defaultSettings: Settings = {
- openaiApiKey: "",
- deepgramApiKey: "",
- aiModel: "gpt-4",
- aiUrl: "https://api.openai.com/v1",
- customPrompt: "",
- port: 3030,
- dataDir: "default",
- disableAudio: false,
- ignoredWindows: [],
- includedWindows: [],
- aiProviderType: "openai",
- embeddedLLM: {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M",
- port: 11438,
- },
- enableFrameCache: true,
- enableUiMonitoring: false,
- aiMaxContextChars: 128000,
- user: {
- token: "",
- },
- analyticsEnabled: true,
- };
-
+ const defaultSettings = getDefaultSettings();
try {
const settingsManager = pipe.settings;
if (!settingsManager) {
diff --git a/screenpipe-js/node-sdk/src/index.ts b/screenpipe-js/node-sdk/src/index.ts
index 2f3b17b7d..3b2c7af01 100644
--- a/screenpipe-js/node-sdk/src/index.ts
+++ b/screenpipe-js/node-sdk/src/index.ts
@@ -257,3 +257,4 @@ const pipe = new NodePipe();
export { pipe };
export * from "../../common/types";
+export { getDefaultSettings } from "../../common/utils";