mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
* Add OAuth authentication support for MCP servers * Improve mobile text sizing with responsive text classes * refactor: improve virtualized text viewer with React Query infinite scroll and simplified buffering * Add push notifications with VAPID and PWA support * feat: add VAPID environment variables for push notifications * Replace SquareFill with MicOff icon for stop recording buttons * Send push notifications when app is not focused * Fix stop generation button icons to use X instead of MicOff * feat: enhance push notification logging and debugging - Add structured logging throughout push notification flow - Improve error handling with detailed diagnostics - Add /api/notifications/debug endpoint for troubleshooting - Enhanced test notification response with per-subscription results - Add service worker logging and better install/activate handling * Improve VAPID push notification configuration with validation and better defaults - Add validation warnings for VAPID_SUBJECT format (requires mailto: prefix for iOS/Safari) - Expose VAPID details via notifications API endpoint - Update default VAPID_SUBJECT from mailto:admin@opencode.local to empty string - Enhance VAPID logging with key lengths and subject info - Improve documentation in .env.example with setup instructions * Fix notification URL to use repo ID instead of filesystem path * Clean up push notification logging and debug endpoints * Add push notifications documentation
61 lines
1.4 KiB
TypeScript
61 lines
1.4 KiB
TypeScript
import path from "path";
|
|
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, path.resolve(__dirname, ".."), "");
|
|
const backendPort = env.PORT || 5001;
|
|
|
|
return {
|
|
envDir: path.resolve(__dirname, ".."),
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
strategies: "injectManifest",
|
|
srcDir: "src",
|
|
filename: "sw.ts",
|
|
injectRegister: false,
|
|
manifest: false,
|
|
injectManifest: {
|
|
globPatterns: ["**/*.{html,svg,png,ico}"],
|
|
},
|
|
devOptions: {
|
|
enabled: false,
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: `http://localhost:${backendPort}`,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
assetsInlineLimit: 4096,
|
|
rollupOptions: {
|
|
output: {
|
|
assetFileNames: (assetInfo) => {
|
|
if (assetInfo.name === "manifest.json") {
|
|
return "manifest.json";
|
|
}
|
|
return "assets/[name]-[hash][extname]";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|