Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
06d2219
feat(backend): add embeddings support with llama-go
juligasa Feb 5, 2026
f64871e
fix(daemon): make cmake visible for please
juligasa Feb 3, 2026
5ff2a42
download cmake if not present
juligasa Feb 3, 2026
485b3ab
let mise handle all cmake's shit
juligasa Feb 3, 2026
25529c1
explicit c++17
juligasa Feb 4, 2026
f313d72
fix(daemon): macos linker
juligasa Feb 4, 2026
ed85c6c
fix(daemon): not using omp in macos
juligasa Feb 4, 2026
4056e0d
fix(daemon): accelerated framework macos
juligasa Feb 4, 2026
13190cd
fix(daemon): not build Blas accelerator on CPU
juligasa Feb 4, 2026
51ce329
fix(dev): use pnpm and add GPU/llama-go support to dev script
juligasa Feb 5, 2026
7f4bf08
fix(build): use pnpm build rules instead of yarn
juligasa Feb 5, 2026
64c5a2b
fix(mise): use pnpm instead of yarn in mise.toml
juligasa Feb 5, 2026
ce038db
feat(daemon): filters in semantic search
juligasa Feb 5, 2026
a9e07c7
fix(daemon): remove semantic dedup as its slow
juligasa Feb 5, 2026
a497649
fix(daemon): add search pagination
juligasa Feb 5, 2026
273d348
feat(ci): add llama.cpp build support to CI workflows and fix Docker …
juligasa Feb 5, 2026
cbf3fab
ci: add temporary build test workflow
juligasa Feb 5, 2026
6885bfd
fix(daemon): idempotent migration
juligasa Feb 5, 2026
f5bb0f6
fix(daemon): embeddigs task feedback
juligasa Feb 5, 2026
e738bbd
wip(frontend): activate embeddings
juligasa Feb 5, 2026
71cb509
wip(daemon): check linux/mac compilation
juligasa Feb 5, 2026
82b5583
fix(daemon): real feedback on embeddings
juligasa Feb 5, 2026
1b0a656
fix(ci): compile metal in macos
juligasa Feb 5, 2026
3554c1b
fix(ci): compile nwer macos and windows
juligasa Feb 6, 2026
1968afe
wip(ci): attempt to fix macos/win
juligasa Feb 6, 2026
b42078a
fix(ci): macos build
juligasa Feb 6, 2026
694b683
fix(ci): windows gpu support
juligasa Feb 6, 2026
0878b02
fiix(ci): debug windows
juligasa Feb 6, 2026
55ee1da
fix(ci): attempt to fix windows
juligasa Feb 6, 2026
b945fd2
attempt 2 to fix windows
juligasa Feb 6, 2026
ba2fb7b
attempt 3 to fix windows
juligasa Feb 6, 2026
787abcf
attempt 4 to fix windows
juligasa Feb 6, 2026
ecee30f
attempt 5 to fix windows
juligasa Feb 6, 2026
3595124
attempt 6 to fix windows
juligasa Feb 6, 2026
82479be
attempt 7 to fix windows
juligasa Feb 6, 2026
6907fe9
attempt 8 to fix windows
juligasa Feb 6, 2026
792931a
fix(daemon): Return correct versions in search
juligasa Feb 6, 2026
a5d597c
fix(daemon): deterministic hybrid order
juligasa Feb 6, 2026
506e92a
fix(ci): make all workflows compile with gpu
juligasa Feb 6, 2026
f0f7efc
fix(daemon): search bug
juligasa Feb 6, 2026
c08cb97
fix(daemon): authority score 🥚
juligasa Feb 6, 2026
880c78d
fix(frontend). not panic on DocOptionsButton can only be rendered on …
juligasa Feb 9, 2026
8734aab
wip(daemon): make gpu by default
juligasa Feb 9, 2026
3a89ac7
fix(daemon): granite model bc of weird single words old model
juligasa Feb 9, 2026
cd101ea
wip(daemon): compile gpu everywhere
juligasa Feb 9, 2026
f0e3735
fix(daemon): remove the reranking downloading
juligasa Feb 9, 2026
dd87fcf
fix(ci): get back the build test
juligasa Feb 9, 2026
d30e689
fix(ci): prepare image for production
juligasa Feb 10, 2026
708583a
fix(daemon): semantic filtering
juligasa Feb 10, 2026
35f7c6c
wip(daemon): add deprecation notices
juligasa Feb 10, 2026
d5606e6
fix(ci): build test binaries
juligasa Feb 10, 2026
b5b6b2f
fix(ci): windows package
juligasa Feb 10, 2026
d51c577
fix(ci): win semver test
juligasa Feb 10, 2026
0d0aa1f
fix(ci): MinGW static linking Windows
juligasa Feb 10, 2026
479408b
wip(daemon): not using windows dlls
juligasa Feb 10, 2026
0bedb46
fix(ci): removing windows dlls
juligasa Feb 10, 2026
be2848c
fix(ci): static OpenMP
juligasa Feb 10, 2026
7b1f1e3
fix(ci): no lgomp
juligasa Feb 10, 2026
f5ff1cc
fix(ci): Windows dance
juligasa Feb 10, 2026
ef48db4
wip(ci): manually add missing deps
juligasa Feb 11, 2026
318d3c0
fix(ci): not using MinGW to build windows
juligasa Feb 11, 2026
f338333
fix(ci): not using MinGW to build windows v2
juligasa Feb 11, 2026
85e336a
fix(ci): not using MinGW to build windows v3
juligasa Feb 11, 2026
188be8a
wip(ci): compile sqlite differntly in windows
juligasa Feb 11, 2026
5fe1f84
wip(ci): compile sqlite differntly in windows v2
juligasa Feb 11, 2026
4fa4788
mingw is back
juligasa Feb 11, 2026
03458a3
include dlls in win bundle
juligasa Feb 11, 2026
c9d57ec
bundle test build as in prod
juligasa Feb 11, 2026
bb7df62
fix(daemon): indludeBody searches comments
juligasa Feb 11, 2026
d27aae1
fix(ci): test like in prod
juligasa Feb 11, 2026
318b24f
fix(ci): mingw win compilation everywhere
juligasa Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ grep -qxF "$PATTERN" "$EXCLUDE_FILE" || echo "$PATTERN" >> "$EXCLUDE_FILE"
# Needed for the Go extension in VS Code to find the right toolchain.
export GOROOT="$(go env GOROOT)"

# CGO flags for llama.cpp - use source directory where mise builds the libraries.
export LIBRARY_PATH="$WORKSPACE/backend/util/llama-go"
export C_INCLUDE_PATH="$WORKSPACE/backend/util/llama-go"

# These variables are defined in a separate file to avoid having to invoke direnv allow
# every time we change them. The file doesn't allow any scripting for security, only variables.
dotenv .env.vars

# Optional loading of local env vars.
dotenv_if_exists .env.local

# GPU acceleration: use ./dev run-backend --gpu (or other commands with --gpu flag)
# CGO flags are set via build constraints in platform-specific Go files:
# - macOS: backend/util/llama-go/zgpu_darwin.go (Metal)
# - Linux: backend/util/llama-go/zgpu_linux.go (Vulkan)
# These files are auto-generated by ./dev gen --all
68 changes: 67 additions & 1 deletion .github/actions/ci-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,79 @@ runs:
sudo apt-get install -y gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf rpm libc6 python3 build-essential sqlite3 libsqlite3-dev flatpak flatpak-builder elfutils libnss3 libnspr4 libasound2t64 libnotify4 libpcre3 libpulse0 libxss1 libxtst6 squashfs-tools
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf rpm libc6 python3 build-essential sqlite3 libsqlite3-dev flatpak flatpak-builder elfutils libnss3 libnspr4 libasound2t64 libnotify4 libpcre3 libpulse0 libxss1 libxtst6 squashfs-tools cmake libgomp1
# Snap-related packages temporarily disabled - focusing on flatpak
# sudo apt-get install -y snapd
# sudo snap install snapcraft --classic --channel=7.x/stable
# sudo snap install multipass
shell: bash

- name: "Install Vulkan dev packages (Linux)"
if: inputs.matrix-os == 'ubuntu-latest'
run: |
sudo apt-get install -y libvulkan-dev glslc
shell: bash

- name: "Install Vulkan SDK (Windows)"
if: inputs.matrix-os == 'windows-2025'
shell: powershell
run: |
$vulkanVersion = "1.4.313.2"
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/$vulkanVersion/windows/vulkansdk-windows-X64-$vulkanVersion.exe"
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\$vulkanVersion"
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\$vulkanVersion\Bin"

- name: "Build llama.cpp (Linux)"
if: inputs.matrix-os == 'ubuntu-latest'
run: |
cd backend/util/llama-go
BUILD_TYPE=vulkan CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a
shell: bash

- name: "Build llama.cpp (macOS)"
if: startsWith(inputs.matrix-os, 'macos')
run: |
cd backend/util/llama-go
BUILD_TYPE=metal CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a
shell: bash

- name: "Build llama.cpp (Windows)"
if: inputs.matrix-os == 'windows-2025'
shell: bash
run: |
set -euo pipefail
cd backend/util/llama-go

cmake -G "MinGW Makefiles" -B build -S llama.cpp \
-DGGML_VULKAN=ON \
-DGGML_OPENMP=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DLLAMA_CURL=OFF \
-DLLAMA_BUILD_TESTS=OFF \
-DLLAMA_BUILD_TOOLS=OFF \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_SERVER=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++

cmake --build build --config Release -j "$(nproc)"

cp build/src/libllama.a ./libllama.a
cp build/ggml/src/ggml.a ./libggml.a
cp build/ggml/src/ggml-base.a ./libggml-base.a
cp build/ggml/src/ggml-cpu.a ./libggml-cpu.a
cp build/ggml/src/ggml-vulkan/ggml-vulkan.a ./libggml-vulkan.a
cp build/common/libcommon.a ./libcommon.a
cp "$VULKAN_SDK/Lib/vulkan-1.lib" ./libvulkan-1.a

for lib in libllama.a libggml.a libggml-base.a libggml-cpu.a libggml-vulkan.a libcommon.a libvulkan-1.a; do
[ -f "$lib" ] || { echo "ERROR: Missing $lib"; exit 1; }
done

echo "All llama.cpp libraries built successfully"

# Additional packages for Flatpak building

- name: "Setup Flatpak"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/desktop-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ jobs:
- name: Build Backend (Unix)
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-x86_64-unknown-linux-gnu ./backend/cmd/seed-daemon
env:
GOARCH: amd64
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Set temporal version in package.json
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/desktop-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,26 @@ jobs:
if: matrix.config.os != 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (Windows)
if: matrix.config.os == 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Set temporal version in package.json
run: |
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/dev-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- os: windows-2025
arch: x64
goarch: amd64
daemon_name: x86_64-pc-windows-msvc
daemon_name: x86_64-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -86,20 +86,43 @@ jobs:
if: matrix.config.os != 'windows-2025'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (Windows)
if: matrix.config.os == 'windows-2025'
shell: bash
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
CGO_LDFLAGS: -static-libgcc -static-libstdc++
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Stage Windows runtime DLL
if: matrix.config.os == 'windows-2025'
shell: bash
run: |
set -euo pipefail
DLL_PATH="$(gcc -print-file-name=libwinpthread-1.dll)"

if [ ! -f "$DLL_PATH" ]; then
echo "ERROR: libwinpthread-1.dll not found in gcc toolchain"
exit 1
fi

cp "$DLL_PATH" plz-out/bin/backend/libwinpthread-1.dll
ls -la plz-out/bin/backend/libwinpthread-1.dll

- name: Set MacOS signing certs
if: startsWith(matrix.config.os, 'macos')
Expand Down
44 changes: 42 additions & 2 deletions .github/workflows/dev-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25.4"
- run: go test --count 1 ./backend/...

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ libvulkan-dev glslc

- name: Build llama.cpp (with Vulkan GPU support)
run: |
cd backend/util/llama-go
BUILD_TYPE=vulkan CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF" make libbinding.a

- name: Run tests
run: go test --count 1 ./backend/...
env:
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
LLAMA_LOG: error

# Run tests again with the race-detector.
# Using the same job to reuse the build cache.
- run: go test --count 1 -race ./backend/...
- name: Run tests with race detector
run: go test --count 1 -race ./backend/...
env:
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go
LLAMA_LOG: error
generate-docker-images:
runs-on: ubuntu-latest
needs: [frontend-tests, backend-tests]
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ jobs:
with:
go-version: "1.25.4"
- uses: actions/checkout@v4

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- uses: golangci/golangci-lint-action@v8
with:
version: latest
Expand Down
67 changes: 64 additions & 3 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,96 @@ jobs:
- os: windows-2025
arch: x64
goarch: amd64
daemon_name: x86_64-pc-windows-msvc
daemon_name: x86_64-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache GGUF model
uses: actions/cache@v4
with:
path: backend/llm/backends/llamacpp/models/*.gguf
key: gguf-model-granite-v2
enableCrossOsArchive: true

- name: Download GGUF model (Unix)
if: matrix.config.os != 'windows-2025'
run: |
if [ ! -f backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf ]; then
mkdir -p backend/llm/backends/llamacpp/models
curl -fSL -o backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf \
"https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true"
fi

- name: Download GGUF model (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: pwsh
run: |
$modelPath = "backend/llm/backends/llamacpp/models/granite-embedding-107m-multilingual-Q8_0.gguf"
if (-not (Test-Path $modelPath)) {
New-Item -ItemType Directory -Force -Path "backend/llm/backends/llamacpp/models"
Invoke-WebRequest -Uri "https://huggingface.co/keisuke-miyako/granite-embedding-107m-multilingual-gguf-q8_0/resolve/main/granite-embedding-107m-multilingual-Q8_0.gguf?download=true" -OutFile $modelPath
}

- uses: ./.github/actions/ci-setup
with:
matrix-os: ${{ matrix.config.os }}
# matrix-target: ${{ matrix.config.daemon_name }}
# matrix-arch: ${{ matrix.config.arch }}

- name: Build Backend (Unix)
if: matrix.config.os != 'windows-2025'
- name: Build Backend (Linux)
if: matrix.config.os == 'ubuntu-latest'
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (macOS)
if: startsWith(matrix.config.os, 'macos')
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }} ./backend/cmd/seed-daemon
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Build Backend (Windows)
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
mkdir -p plz-out/bin/backend
# GPU is enabled by default (no -tags needed)
go build -o plz-out/bin/backend/seed-daemon-${{ matrix.config.daemon_name }}.exe ./backend/cmd/seed-daemon
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
CGO_LDFLAGS: -static-libgcc -static-libstdc++
LIBRARY_PATH: ${{ github.workspace }}/backend/util/llama-go
C_INCLUDE_PATH: ${{ github.workspace }}/backend/util/llama-go

- name: Stage Windows runtime DLL
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
set -euo pipefail
DLL_PATH="$(gcc -print-file-name=libwinpthread-1.dll)"

if [ ! -f "$DLL_PATH" ]; then
echo "ERROR: libwinpthread-1.dll not found in gcc toolchain"
exit 1
fi

cp "$DLL_PATH" plz-out/bin/backend/libwinpthread-1.dll
ls -la plz-out/bin/backend/libwinpthread-1.dll

- name: Set MacOS signing certs
if: startsWith(matrix.config.os, 'macos')
Expand Down
Loading
Loading