"backend/internal/pkg/vscode:/vscode.git/clone" did not exist on "921599948b627323d25f2c08877019ab91ce7878"
  1. 17 Jan, 2026 18 commits
  2. 16 Jan, 2026 21 commits
  3. 15 Jan, 2026 1 commit
    • IanShaw027's avatar
      fix(lint): 修复剩余的errcheck错误 · 41584008
      IanShaw027 authored
      修复了测试文件中剩余的6处类型断言未检查错误:
      - 第115-118行:choices.message.tool_calls 的类型断言链
      - 第140和145行:multiple tool calls 测试的类型断言
      - 第343和345行:ComplexSSEData 测试的类型断言
      
      **修复模式:**
      所有类型断言都改为使用 ok 检查:
      ```go
      // 修复前
      choices := payload["choices"].([]any)
      
      // 修复后
      choices, ok := payload["choices"].([]any)
      if !ok || len(choices) == 0 {
          t.Fatal("No choices found in result")
      }
      ```
      
      **测试验证:**
      -  TestCorrectToolCallsInSSEData - 所有子测试通过
      -  TestComplexSSEData - 通过
      -  TestCorrectToolParameters - 通过
      -  所有类型断言都有 ok 检查
      -  添加了数组长度验证
      
      现在所有 errcheck 错误都已修复。
      41584008