Files
adiuva/vite.main.config.mts
Roberto Musso 2cb2f0e4e8 feat: integrate vectordb for note embeddings
- Added `vectordb` as a dependency in `package.json`.
- Implemented `embedText` function in `src/main/ai/embeddings.ts` to handle text embeddings using GitHub Copilot OAuth token or OpenAI token.
- Created `vectordb.ts` for managing LanceDB connection and embedding notes with upsert strategy.
- Updated `index.ts` to initialize vector database and migrate existing notes on app ready.
- Modified `router/index.ts` to fire-and-forget embedding calls on note creation and updates.
- Enhanced `progress.txt` with detailed implementation notes and learnings regarding the integration.
2026-02-24 21:34:48 +01:00

28 lines
709 B
TypeScript

import { defineConfig } from 'vite';
// https://vitejs.dev/config
export default defineConfig({
build: {
rollupOptions: {
// Externalize native Node modules — they're rebuilt by electron-forge
external: [
'better-sqlite3',
'keytar',
'@github/copilot-sdk',
'@github/copilot',
// LangChain — externalize to avoid bundling Node.js-specific code
'@langchain/core',
'@langchain/langgraph',
'@langchain/openai',
'@langchain/anthropic',
'@langchain/langgraph-checkpoint',
'@langchain/langgraph-sdk',
'vectordb',
],
output: {
entryFileNames: 'main.js',
},
},
},
});