- 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.
28 lines
709 B
TypeScript
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',
|
|
},
|
|
},
|
|
},
|
|
});
|