Skip to content

Commit b73b11d

Browse files
authored
Merge pull request #45 from LeslieLeung/milestones/m3
2 parents a6ea83c + b522171 commit b73b11d

266 files changed

Lines changed: 26519 additions & 4156 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,92 @@ ADMIN_PORT=3001
3838

3939
# CORS origins (JSON array)
4040
# CORS_ORIGINS=["http://localhost", "http://localhost:3000"]
41+
42+
# ========================================
43+
# Embedding Configuration
44+
# ========================================
45+
# Embedding provider: openai, sentence-transformers, volc-engine
46+
EMBEDDING_PROVIDER=sentence-transformers
47+
48+
# API key for embeddings (needed for openai and volc-engine providers)
49+
# OpenAI: Get from https://platform.openai.com/api-keys
50+
# Volcengine: Get from https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey
51+
# EMBEDDING_API_KEY=your-api-key-here
52+
53+
# Alternative API key for Volcengine (official SDK recommended)
54+
# Get from: https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey
55+
# ARK_API_KEY=your-volcengine-api-key-here
56+
57+
# Embedding model name
58+
# For sentence-transformers: all-MiniLM-L6-v2 (384d), paraphrase-multilingual-MiniLM-L12-v2 (384d)
59+
# For openai: text-embedding-3-small (1536d), text-embedding-3-large (3072d)
60+
# For volc-engine: doubao-embedding (1024d) or your model endpoint ID
61+
EMBEDDING_MODEL=all-MiniLM-L6-v2
62+
63+
# Embedding dimension
64+
# all-MiniLM-L6-v2: 384
65+
# paraphrase-multilingual-MiniLM-L12-v2: 384
66+
# text-embedding-3-small: 1536
67+
# doubao-embedding: 1024
68+
EMBEDDING_DIMENSION=384
69+
70+
# Batch size for embedding generation
71+
# Recommended: sentence-transformers (20), openai (20), volc-engine (4)
72+
EMBEDDING_BATCH_SIZE=20
73+
74+
# Max retries for failed embedding requests
75+
EMBEDDING_MAX_RETRIES=3
76+
77+
# Request timeout in seconds
78+
EMBEDDING_TIMEOUT=30
79+
80+
# Optional: Custom API base URL
81+
# For local models via LiteLLM: http://localhost:8000/v1
82+
# For Volcengine (default): https://ark.cn-beijing.volces.com
83+
# EMBEDDING_BASE_URL=http://localhost:8000/v1
84+
85+
# ========================================
86+
# Milvus Configuration
87+
# ========================================
88+
# Milvus host
89+
MILVUS_HOST=localhost
90+
91+
# Milvus port
92+
MILVUS_PORT=19530
93+
94+
# Milvus credentials (optional for dev)
95+
# MILVUS_USER=
96+
# MILVUS_PASSWORD=
97+
98+
# Collection names
99+
MILVUS_ENTRIES_COLLECTION=entries
100+
MILVUS_PREFS_COLLECTION=user_preferences
101+
102+
# ========================================
103+
# Preference Configuration
104+
# ========================================
105+
# Default score for entries without preference model
106+
PREFERENCE_DEFAULT_SCORE=50.0
107+
108+
# Confidence threshold (samples needed for full confidence)
109+
PREFERENCE_CONFIDENCE_THRESHOLD=10
110+
111+
# Signal weights
112+
PREFERENCE_LIKE_WEIGHT=1.0
113+
PREFERENCE_BOOKMARK_WEIGHT=0.7
114+
115+
# Maximum affinity boosts
116+
PREFERENCE_SOURCE_BOOST_MAX=5.0
117+
PREFERENCE_AUTHOR_BOOST_MAX=3.0
118+
119+
# ========================================
120+
# Score Configuration
121+
# ========================================
122+
# Threshold for "recommended" section (score >= 70)
123+
SCORE_RECOMMEND_THRESHOLD=70.0
124+
125+
# Threshold for "low interest" section (score < 40)
126+
SCORE_LOW_INTEREST_THRESHOLD=40.0
127+
128+
# Score cache TTL in seconds
129+
SCORE_CACHE_TTL=3600

.github/workflows/release.yml

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
type=semver,pattern={{major}}
4646
type=raw,value=latest,enable={{is_default_branch}}
4747
48+
- name: Extract version from tag
49+
id: version
50+
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
51+
4852
- name: Build and push Backend image
4953
uses: docker/build-push-action@v6
5054
with:
@@ -54,6 +58,8 @@ jobs:
5458
push: true
5559
tags: ${{ steps.meta.outputs.tags }}
5660
labels: ${{ steps.meta.outputs.labels }}
61+
build-args: |
62+
APP_VERSION=${{ steps.version.outputs.version }}
5763
cache-from: type=gha
5864
cache-to: type=gha,mode=max
5965

@@ -151,9 +157,88 @@ jobs:
151157
cache-from: type=gha
152158
cache-to: type=gha,mode=max
153159

160+
build-electron:
161+
name: Build Electron App (${{ matrix.os }})
162+
runs-on: ${{ matrix.os }}
163+
permissions:
164+
contents: write
165+
strategy:
166+
fail-fast: false
167+
matrix:
168+
include:
169+
- os: macos-latest
170+
platform: mac
171+
- os: windows-latest
172+
platform: win
173+
- os: ubuntu-latest
174+
platform: linux
175+
176+
steps:
177+
- name: Checkout repository
178+
uses: actions/checkout@v4
179+
180+
- name: Setup Node.js
181+
uses: actions/setup-node@v4
182+
with:
183+
node-version: '20'
184+
185+
- name: Setup pnpm
186+
uses: pnpm/action-setup@v2
187+
with:
188+
version: 8
189+
190+
- name: Get pnpm store directory
191+
shell: bash
192+
run: |
193+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
194+
195+
- name: Setup pnpm cache
196+
uses: actions/cache@v4
197+
with:
198+
path: ${{ env.STORE_PATH }}
199+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
200+
restore-keys: |
201+
${{ runner.os }}-pnpm-store-
202+
203+
- name: Extract version from tag
204+
id: version
205+
shell: bash
206+
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
207+
208+
- name: Update package.json version
209+
shell: bash
210+
working-directory: frontend/apps/web
211+
run: |
212+
npm pkg set version=${{ steps.version.outputs.version }}
213+
214+
- name: Install dependencies
215+
working-directory: frontend
216+
run: pnpm install
217+
218+
- name: Build Electron app
219+
working-directory: frontend/apps/web
220+
run: pnpm build:electron -- --${{ matrix.platform }}
221+
env:
222+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223+
224+
- name: Upload artifacts to release
225+
uses: softprops/action-gh-release@v1
226+
with:
227+
files: |
228+
frontend/apps/web/release/*.dmg
229+
frontend/apps/web/release/*.zip
230+
frontend/apps/web/release/*.exe
231+
frontend/apps/web/release/*.AppImage
232+
frontend/apps/web/release/*.deb
233+
frontend/apps/web/release/*.rpm
234+
frontend/apps/web/release/*.yml
235+
frontend/apps/web/release/*.yaml
236+
env:
237+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
238+
154239
create-release:
155240
name: Create GitHub Release
156-
needs: [build-backend, build-web, build-admin]
241+
needs: [build-backend, build-web, build-admin, build-electron]
157242
runs-on: ubuntu-latest
158243
permissions:
159244
contents: write
@@ -175,6 +260,10 @@ jobs:
175260
- `ghcr.io/${{ env.IMAGE_PREFIX }}-web:${{ github.ref_name }}`
176261
- `ghcr.io/${{ env.IMAGE_PREFIX }}-admin:${{ github.ref_name }}`
177262
263+
## Desktop Apps
264+
265+
Download the desktop application for your platform from the assets below.
266+
178267
## Quick Start
179268
180269
```bash

0 commit comments

Comments
 (0)