Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Install dependencies
run: cd kimi-code-swarm && npm ci

- name: Install ast dependencies
run: cd ast && npm ci

- name: Type check
run: cd kimi-code-swarm && npm run typecheck

Expand Down
5 changes: 2 additions & 3 deletions ast/fixers/error-handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ export function fixEmptyCatches(content: string): string {
for (const block of blocks) {
if (!isEmptyCatch(block.content)) continue

// 提取 catch 参数名
const catchMatch = block.content.match(/catch\s*\(\s*([_$a-zA-Z][_$a-zA-Z0-9]*)\s*\)/)
const param = catchMatch?.[1] ?? 'e'
// 提取 catch 参数名(AST 版已直接提供)
const param = block.param ?? 'e'

// 计算插入位置(catch 块 opening brace 的下一行)和缩进
const openLine = lines[block.startLine - 1]
Expand Down
Loading
Loading