From a99dcfe255ef8a4ddfd8acd2f8428ad59c87efb7 Mon Sep 17 00:00:00 2001 From: Val-sss <154882199@qq.com> Date: Thu, 30 Apr 2026 12:16:23 +0800 Subject: [PATCH] fix: move tree-sitter back to base deps (pre-built wheels available) tree-sitter and tree-sitter-python provide pre-built wheels for Windows/Mac/Linux on Python 3.10-3.12, so no compiler needed. AST engine is now always installed with base package. Co-Authored-By: Claude Opus 4.6 (1M context) --- install.ps1 | 9 --------- install.sh | 8 -------- pyproject.toml | 7 +++---- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/install.ps1 b/install.ps1 index cccd5a3..d0b16f8 100644 --- a/install.ps1 +++ b/install.ps1 @@ -88,15 +88,6 @@ if (-not $installed) { exit 1 } -# 可选:安装 AST 增强 -Write-Info "尝试安装 AST 增强(可选,需要 C 编译器)..." -& $pythonCmd -m pip install "kwcode[ast]" --quiet 2>&1 | Out-Null -if ($LASTEXITCODE -eq 0) { - Write-Info "AST 调用图引擎已启用(代码定位更精准)" -} else { - Write-Info "AST 增强跳过(无编译器),使用 LLM 定位(功能不受影响)" -} - # ── Step 4: 提示配置模型 ───────────────────────────────────── Write-Step "模型配置提示..." Write-Info "KwCode 支持任何 OpenAI 兼容 API(Ollama / DeepSeek / Qwen 等)" diff --git a/install.sh b/install.sh index f2c2ad3..9d39b7b 100644 --- a/install.sh +++ b/install.sh @@ -95,14 +95,6 @@ if [ "$INSTALLED" -eq 0 ]; then exit 1 fi -# 可选:安装 AST 增强 -info "尝试安装 AST 增强(可选,需要 C 编译器)..." -if "$PYTHON_CMD" -m pip install "kwcode[ast]" --quiet 2>/dev/null; then - info "AST 调用图引擎已启用(代码定位更精准)" -else - info "AST 增强跳过(无编译器),使用 LLM 定位(功能不受影响)" -fi - # ── Step 3: 提示配置模型 ───────────────────────────────────── step "模型配置提示..." info "KwCode 支持任何 OpenAI 兼容 API(Ollama / DeepSeek / Qwen 等)" diff --git a/pyproject.toml b/pyproject.toml index 708336f..e05fea5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "kwcode" -version = "1.0.7" +version = "1.0.8" description = "KwCode - Local-model coding agent with MoE expert pipeline" requires-python = ">=3.10" readme = "README.md" @@ -14,7 +14,6 @@ classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", @@ -33,14 +32,14 @@ dependencies = [ "pyyaml>=6.0", "rank-bm25>=0.2.2", "prompt-toolkit>=3.0.0", + "tree-sitter>=0.23.0", + "tree-sitter-python>=0.23.0", ] [project.optional-dependencies] local = ["llama-cpp-python>=0.2.90"] -ast = ["tree-sitter>=0.23.0", "tree-sitter-python>=0.23.0"] full = [ "kwcode[local]", - "kwcode[ast]", ] dev = [ "pytest>=7.0.0",