From 6212002270ba214fe51462f24dbcb9034311e101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Sat, 27 Jun 2026 23:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20read=5Fsymbol=20=E6=90=9C?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=20const=20=E5=A3=B0=E6=98=8E=E7=9A=84?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 variable_declarator 到 DEFINITION_KINDS - Vue 3 + TS 大量使用 const fn = () => {} 箭头函数 AST 节点是 variable_declarator,原本不在列表中 导致 read_symbol 对 Vue 文件频繁 fallback 回 read_file --- src-tauri/src/commands/ai/code_intel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-tauri/src/commands/ai/code_intel.rs b/src-tauri/src/commands/ai/code_intel.rs index 7607d12..4a5d0f6 100644 --- a/src-tauri/src/commands/ai/code_intel.rs +++ b/src-tauri/src/commands/ai/code_intel.rs @@ -39,6 +39,8 @@ const DEFINITION_KINDS: &[&str] = &[ "interface_declaration", "enum_declaration", "method_definition", + // TS/JS const/let/var 声明(如 const fn = () => {}) + "variable_declarator", // Go "method_declaration", // Go method(receiver func) "type_declaration", // Go type Xxx struct/interface/func