mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-03 18:23:51 +08:00
feat: enhance Makefile for Windows and non-Windows desktop builds
- Added conditional logic in the Makefile to support Tauri signing key generation for Windows environments. - Updated the build-desktop target to ensure proper signing key handling across different operating systems.
This commit is contained in:
@@ -30,6 +30,13 @@ build-docs:
|
||||
build-server:
|
||||
cargo build --release --package cursor-server --bin cursor-server
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
$(LOCAL_TAURI_SIGNING_KEY):
|
||||
@powershell -NoProfile -Command "New-Item -ItemType Directory -Force -Path '$(dir $@)' | Out-Null; & '$(CURDIR)/apps/desktop/node_modules/.bin/tauri.cmd' signer generate --ci --write-keys '$@'"
|
||||
|
||||
build-desktop: $(LOCAL_TAURI_SIGNING_KEY)
|
||||
@set "TAURI_SIGNING_PRIVATE_KEY=$(LOCAL_TAURI_SIGNING_KEY)" && set "TAURI_SIGNING_PRIVATE_KEY_PASSWORD=" && npm --prefix apps/desktop run tauri:build -- --bundles nsis
|
||||
else
|
||||
$(LOCAL_TAURI_SIGNING_KEY):
|
||||
@install -d -m 700 "$(dir $@)"
|
||||
@apps/desktop/node_modules/.bin/tauri signer generate --ci --write-keys "$@" >/dev/null
|
||||
@@ -37,6 +44,7 @@ $(LOCAL_TAURI_SIGNING_KEY):
|
||||
|
||||
build-desktop: $(LOCAL_TAURI_SIGNING_KEY)
|
||||
TAURI_SIGNING_PRIVATE_KEY="$(LOCAL_TAURI_SIGNING_KEY)" TAURI_SIGNING_PRIVATE_KEY_PASSWORD="" npm --prefix apps/desktop run tauri:build
|
||||
endif
|
||||
|
||||
build-docker:
|
||||
docker build --tag cursor-byok:local .
|
||||
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
## Problem
|
||||
|
||||
During normal Agent usage, the flow silently stops mid-conversation. The AI says "now I'll read the files" and then never continues. No tool call, no more text, no error. It just freezes.
|
||||
|
||||
## Root Causes
|
||||
|
||||
### 1. Actor not emitting end-stream on channel close (actor.rs)
|
||||
When the command channel closes or receives Abort, the actor only called handle.cancel() which sets the cancellation token but never emits an end-stream frame. The SSE stream hangs indefinitely.
|
||||
|
||||
### 2. lifecycle encoding failure skips close_output() (lifecycle.rs)
|
||||
Both fail() and cancel() used the ? operator on encode_error_end_stream(), meaning if serialization fails, close_output() is never called. The stream stays open silently.
|
||||
|
||||
### 3. Context/blob sync timeouts too aggressive (context_sync.rs, blob_sync.rs)
|
||||
Hardcoded 15-second timeouts kill sessions silently on slow networks or with proxy configurations.
|
||||
|
||||
### 4. Bash tool not recognized (dispatch/mod.rs)
|
||||
Cursor IDE sends "Bash" tool calls but the server only recognized "Shell", causing "unsupported tool: Bash" errors.
|
||||
|
||||
## Changes
|
||||
|
||||
- actor.rs: Use lifecycle::cancel() instead of handle.cancel()
|
||||
- lifecycle.rs: Use match instead of ? with fallback end-stream frame
|
||||
- sessions.rs: Document correct Notify pattern
|
||||
- context_sync.rs: 15s to 60s timeout
|
||||
- blob_sync.rs: 15s to 60s timeout (SET and GET)
|
||||
- dispatch/mod.rs: Add Bash tool alias for Shell
|
||||
- openai_chat.rs: Add detailed debug logging
|
||||
- router.rs: Add detailed debug logging
|
||||
|
||||
## Testing
|
||||
|
||||
- All existing tests pass
|
||||
- cargo check compiles cleanly
|
||||
- Both debug and release builds succeed
|
||||
- Tested with Cursor BYOK desktop app
|
||||
Reference in New Issue
Block a user