Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ main, release/* ]
workflow_dispatch:

jobs:
Expand Down
7 changes: 0 additions & 7 deletions electron/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { getSofficePath, isLibreOfficeInstalled } from "./utils/libreoffice-chec
import { getPuppeteerExecutablePath, isChromeInstalled } from "./utils/puppeteer-check";
import { getLiteParseRunnerPath } from "./utils/liteparse-check";
import { getImageMagickBinaryPath, isImageMagickInstalled } from "./utils/imagemagick-check";
import { startUpdateChecker, stopUpdateChecker } from "./utils/update-checker";
import { initMainSentry } from "./sentry/main";


Expand Down Expand Up @@ -226,7 +225,6 @@ async function stopServers() {
async function forceQuitApp(exitCode = 0) {
if (isStopping) return;
isStopping = true;
stopUpdateChecker();
try {
await stopServers();
} finally {
Expand Down Expand Up @@ -326,11 +324,6 @@ app.whenReady().then(async () => {
await startServers(fastApiPort, nextjsPort);
win?.loadURL(`${localhost}:${nextjsPort}`);

// Begin polling the version server for available updates
if (win) {
process.stderr.write("[Presenton] Starting update checker...\n");
startUpdateChecker(win);
}
});

app.on("window-all-closed", async () => {
Expand Down
286 changes: 0 additions & 286 deletions electron/app/utils/update-checker.ts

This file was deleted.

23 changes: 0 additions & 23 deletions electron/generate_update.js

This file was deleted.

3 changes: 1 addition & 2 deletions electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"fetch:export-runtime:latest": "EXPORT_RUNTIME_VERSION=latest node sync_export_runtime.js --force",
"build:nextjs": "rm -rf resources/nextjs && rm -rf servers/nextjs/.next-build && cd servers/nextjs && cross-env BUILD_TARGET=electron npm run build && cp -r .next-build ../../resources/nextjs && cp -r app/presentation-templates ../../resources/nextjs/presentation-templates",
"build:fastapi": "rm -rf resources/fastapi && npm run build:vectorstore && node scripts/prepare_fastapi_migrations.js && cd servers/fastapi && uv run python -m PyInstaller --distpath ../../resources server.spec",
"generate:version": "node generate_update.js",
"build:electron": "npm run generate:version && npm run build:export-runtime && rm -rf app_dist && tsc && node build.js",
"build:electron": "npm run build:export-runtime && rm -rf app_dist && tsc && node build.js",
"build:all": "npm run clean:build && npm run setup:env && npm run build:ts && npm run install:pyinstaller && npm run build:nextjs && npm run build:fastapi && npm run build:electron",
"clean:build": "rm -rf resources/nextjs && rm -rf resources/fastapi && rm -rf app_dist"
},
Expand Down
12 changes: 11 additions & 1 deletion electron/servers/fastapi/utils/llm_client_error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@


def handle_llm_client_exceptions(e: Exception) -> HTTPException:
if isinstance(e, HTTPException):
return e
traceback.print_exc()
if isinstance(e, OpenAIAPIError):
return HTTPException(status_code=500, detail=f"OpenAI API error: {e.message}")
error_body = getattr(e, "body", None) or {}
error_obj = error_body.get("error", {}) if isinstance(error_body, dict) else {}
error_type = error_obj.get("type", "") if isinstance(error_obj, dict) else ""
if error_type == "budget_exceeded" or "ExceededBudget" in str(getattr(e, "message", "")):
return HTTPException(
status_code=402,
detail="Your API key has exceeded its budget limit. Please add credits to your account to continue.",
)
return HTTPException(status_code=500, detail=f"API error: {e.message}")
if isinstance(e, GoogleAPIError):
return HTTPException(status_code=500, detail=f"Google API error: {e.message}")
if isinstance(e, AnthropicAPIError):
Expand Down
Loading
Loading