Skip to content

Migrate web search from Google/Gemini to Tavily API#329

Merged
Mingholy merged 1 commit into
mainfrom
feat/tavily_web_search
Aug 14, 2025
Merged

Migrate web search from Google/Gemini to Tavily API#329
Mingholy merged 1 commit into
mainfrom
feat/tavily_web_search

Conversation

@tanzhenxin

@tanzhenxin tanzhenxin commented Aug 14, 2025

Copy link
Copy Markdown
Collaborator

Overview

This PR migrates the web search functionality from Google Search via Gemini API to the Tavily API, providing more reliable and direct web search capabilities.

🚀 What Changed

Core Changes

  • Tool Migration: Renamed google_web_searchweb_search
  • API Switch: Replaced Google Search via Gemini API with direct Tavily API integration
  • Conditional Registration: Web search tool now only registers when TAVILY_API_KEY is configured

Key Features

  • Direct API Integration: Uses Tavily API directly for faster, more reliable results
  • Graceful Degradation: Tool is disabled when API key is not configured (no errors)
  • Multiple Configuration Methods: Support for settings file, environment variables, and CLI arguments
  • Improved Response Format: Returns concise answers with numbered source citations
  • Robust Error Handling: 15-second timeout with proper error messages
  • Sandbox Support: API key forwarding in sandbox environments

⚙️ Configuration

Users can configure the Tavily API key through any of these methods:

1. Settings File (settings.json)

{
  "tavilyApiKey": "tvly-your-api-key-here"
}

2. Environment Variable

export TAVILY_API_KEY="tvly-your-api-key-here"

3. Command Line Argument

qwen --tavily-api-key tvly-your-api-key-here

🧪 Testing

  • ✅ Integration tests updated with proper API key validation
  • ✅ Tests gracefully skip when TAVILY_API_KEY is not set
  • ✅ Network error handling maintained
  • ✅ All existing test patterns preserved

📚 Documentation

  • ✅ Complete tool documentation rewrite
  • ✅ Configuration guide with all three setup methods
  • ✅ Updated example settings
  • ✅ Environment variable documentation
  • ✅ Command-line argument documentation

🔄 Migration Impact

Breaking Changes

  • Tool name changed from google_web_search to web_search
  • Requires new API key configuration (Tavily instead of Google)

Backward Compatibility

  • Clean migration with no legacy code remaining
  • Tool gracefully disables when not configured (no breaking errors)

📊 Stats

  • 9 files changed
  • 155 insertions, 107 deletions
  • Net addition: 48 lines (mostly documentation)

Fixes


Ready for review! 🚀

This PR provides a complete, well-documented migration that maintains all existing functionality while improving reliability and user experience.

@tanzhenxin tanzhenxin requested a review from pomelo-nwu August 14, 2025 12:55
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 73.61% 73.61% 79.59% 80.67%
Core 70.92% 70.92% 73.47% 81.34%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   73.61 |    80.67 |   79.59 |   73.61 |                   
 src               |   51.95 |    72.22 |      60 |   51.95 |                   
  gemini.tsx       |   28.71 |    55.55 |   42.85 |   28.71 | ...94-307,319-376 
  ...ractiveCli.ts |   93.33 |    71.42 |     100 |   93.33 | ...,72-74,120,123 
  ...ActiveAuth.ts |   95.45 |    93.33 |     100 |   95.45 | 25-26             
 src/acp           |    1.73 |        0 |       0 |    1.73 |                   
  acp.ts           |    2.79 |        0 |       0 |    2.79 | ...98-225,228-271 
  acpPeer.ts       |     1.4 |        0 |       0 |     1.4 | 33-48,51-674      
 src/config        |   86.42 |    76.92 |   77.77 |   86.42 |                   
  auth.ts          |   78.72 |    90.47 |      25 |   78.72 | ...59,62-63,66-67 
  config.ts        |   96.52 |    80.28 |   66.66 |   96.52 | ...45,352,537-541 
  extension.ts     |   82.53 |    84.37 |     100 |   82.53 | ...99-103,112-113 
  sandboxConfig.ts |   51.35 |    16.66 |   66.66 |   51.35 | ...43,53-69,74-91 
  settings.ts      |   82.71 |    76.47 |   93.33 |   82.71 | ...73-474,521-522 
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 src/patches       |       0 |        0 |       0 |       0 |                   
  is-in-ci.ts      |       0 |        0 |       0 |       0 | 1-17              
 src/services      |   61.17 |    88.52 |   72.22 |   61.17 |                   
  ...mandLoader.ts |     100 |      100 |     100 |     100 |                   
  ...andService.ts |     100 |      100 |     100 |     100 |                   
  ...mandLoader.ts |   92.09 |    91.89 |     100 |   92.09 | 176-181,250-257   
  ...omptLoader.ts |    9.39 |    57.14 |   33.33 |    9.39 | ...44-167,173-230 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...mpt-processors |   95.18 |    94.73 |     100 |   95.18 |                   
  ...tProcessor.ts |     100 |      100 |     100 |     100 |                   
  ...lProcessor.ts |   93.54 |    92.85 |     100 |   93.54 | 67-70             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/test-utils    |   90.56 |    81.81 |      75 |   90.56 |                   
  ...omMatchers.ts |   69.69 |       50 |      50 |   69.69 | 30-33,35-37,43-45 
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
 src/ui            |   60.48 |    67.32 |   62.96 |   60.48 |                   
  App.tsx          |    57.5 |    61.17 |   41.66 |    57.5 | ...1054,1079-1108 
  colors.ts        |   87.75 |      100 |      80 |   87.75 | 12-13,18-19,48-49 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/commands   |   87.06 |    84.81 |      90 |   87.06 |                   
  aboutCommand.ts  |     100 |    55.55 |     100 |     100 | 23-30             
  authCommand.ts   |     100 |      100 |     100 |     100 |                   
  bugCommand.ts    |   78.46 |    42.85 |     100 |   78.46 | 32-35,72-81       
  chatCommand.ts   |    93.6 |    84.44 |     100 |    93.6 | ...83-184,186-187 
  clearCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...essCommand.ts |     100 |    88.88 |     100 |     100 | 69                
  copyCommand.ts   |     100 |      100 |     100 |     100 |                   
  corgiCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...ryCommand.tsx |   70.48 |       72 |     100 |   70.48 | ...22-123,160-168 
  docsCommand.ts   |     100 |      100 |     100 |     100 |                   
  editorCommand.ts |     100 |      100 |     100 |     100 |                   
  ...onsCommand.ts |     100 |      100 |     100 |     100 |                   
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  ideCommand.ts    |   70.44 |       90 |   57.14 |   70.44 | ...42-152,160-170 
  initCommand.ts   |   81.15 |    66.66 |     100 |   81.15 | 50,64-69,71-76    
  mcpCommand.ts    |   82.21 |    82.95 |   83.33 |   82.21 | ...83-384,434-441 
  memoryCommand.ts |   99.09 |    92.85 |     100 |   99.09 | 93                
  ...acyCommand.ts |     100 |      100 |     100 |     100 |                   
  quitCommand.ts   |     100 |      100 |     100 |     100 |                   
  ...oreCommand.ts |   93.79 |    91.42 |     100 |   93.79 | 54-55,84-89       
  ...hubCommand.ts |     100 |      100 |     100 |     100 |                   
  statsCommand.ts  |   84.48 |       75 |     100 |   84.48 | 24-32             
  themeCommand.ts  |     100 |      100 |     100 |     100 |                   
  toolsCommand.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
  vimCommand.ts    |   44.44 |      100 |       0 |   44.44 | 14-24             
 src/ui/components |   65.58 |    79.24 |    65.3 |   65.58 |                   
  AboutBox.tsx     |     100 |       50 |     100 |     100 | 102               
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  AuthDialog.tsx   |   71.32 |    81.81 |      40 |   71.32 | ...24-128,134-140 
  ...nProgress.tsx |   15.78 |      100 |       0 |   15.78 | 17-57             
  ...Indicator.tsx |   15.15 |      100 |       0 |   15.15 | 17-47             
  ...ryDisplay.tsx |   89.47 |    33.33 |     100 |   89.47 | 20-21             
  ...ryDisplay.tsx |   91.25 |    94.87 |     100 |   91.25 | 78-83,103         
  ...gProfiler.tsx |    23.8 |      100 |       0 |    23.8 | 12-32             
  ...esDisplay.tsx |   10.52 |      100 |       0 |   10.52 | 24-82             
  ...ngsDialog.tsx |    6.76 |      100 |       0 |    6.76 | 26-168            
  Footer.tsx       |   73.33 |    16.66 |     100 |   73.33 | ...,91-94,112-119 
  ...ngSpinner.tsx |      80 |    33.33 |     100 |      80 | 29,31-32          
  Header.tsx       |    17.5 |      100 |       0 |    17.5 | 22-62             
  Help.tsx         |    3.27 |      100 |       0 |    3.27 | 17-173            
  ...emDisplay.tsx |      70 |    56.25 |     100 |      70 | ...59-64,84-91,94 
  ...ilDisplay.tsx |    14.7 |      100 |       0 |    14.7 | 18-51             
  InputPrompt.tsx  |   86.02 |    80.68 |     100 |   86.02 | ...28-430,524-528 
  ...Indicator.tsx |     100 |      100 |     100 |     100 |                   
  ...geDisplay.tsx |   25.92 |      100 |       0 |   25.92 | 14-36             
  ...tsDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...KeyPrompt.tsx |   62.33 |    31.25 |     100 |   62.33 | ...58-111,115-123 
  PrepareLabel.tsx |      60 |       80 |     100 |      60 | 35-48             
  ...hProgress.tsx |     100 |    91.42 |     100 |     100 | 213-224           
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ionDialog.tsx |   85.93 |      100 |      50 |   85.93 | 34-36,40-47       
  ...Indicator.tsx |   44.44 |      100 |       0 |   44.44 | 12-17             
  ...MoreLines.tsx |      60 |       25 |     100 |      60 | 24-27,33-40       
  StatsDisplay.tsx |   98.39 |    86.66 |     100 |   98.39 | 173-175           
  ...nsDisplay.tsx |   88.05 |    71.42 |     100 |   88.05 | 36-41,96-98       
  ThemeDialog.tsx  |    4.29 |      100 |       0 |    4.29 | 29-316            
  Tips.tsx         |      16 |      100 |       0 |      16 | 17-45             
  ...tsDisplay.tsx |     100 |     87.5 |     100 |     100 | 30-31             
  ...ification.tsx |   36.36 |      100 |       0 |   36.36 | 15-22             
 ...nents/messages |   64.51 |     81.3 |   63.15 |   64.51 |                   
  ...onMessage.tsx |   18.51 |      100 |       0 |   18.51 | 22-49             
  DiffRenderer.tsx |   96.18 |    81.92 |     100 |   96.18 | ...16-217,221,283 
  ErrorMessage.tsx |     100 |      100 |     100 |     100 |                   
  ...niMessage.tsx |   18.51 |      100 |       0 |   18.51 | 20-43             
  ...geContent.tsx |   19.04 |      100 |       0 |   19.04 | 25-43             
  InfoMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...onMessage.tsx |   38.07 |     62.5 |   33.33 |   38.07 | ...35-170,209-237 
  ...upMessage.tsx |   10.11 |      100 |       0 |   10.11 | 27-126            
  ToolMessage.tsx  |   87.76 |       80 |     100 |   87.76 | ...,91-95,169-171 
  UserMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...llMessage.tsx |   36.36 |      100 |       0 |   36.36 | 17-25             
 ...ponents/shared |    79.2 |    74.05 |   94.59 |    79.2 |                   
  MaxSizedBox.tsx  |   80.66 |    81.19 |   88.88 |   80.66 | ...08-509,614-615 
  ...tonSelect.tsx |   66.66 |    66.66 |     100 |   66.66 | ...15,119-155,224 
  text-buffer.ts   |   76.36 |       75 |   95.83 |   76.36 | ...1611,1651,1701 
  ...er-actions.ts |   86.39 |    65.76 |     100 |   86.39 | ...75-578,883-885 
 src/ui/contexts   |   84.45 |    78.57 |     100 |   84.45 |                   
  ...owContext.tsx |   91.07 |    81.81 |     100 |   91.07 | 46-47,59-61       
  ...onContext.tsx |   87.01 |      100 |     100 |   87.01 | 102-105,114-119   
  ...ngContext.tsx |   71.42 |       50 |     100 |   71.42 | 17-20             
  ...deContext.tsx |   76.08 |       50 |     100 |   76.08 | 46-47,51-58,76-77 
 src/ui/editors    |   93.18 |    85.71 |   66.66 |   93.18 |                   
  ...ngsManager.ts |   93.18 |    85.71 |   66.66 |   93.18 | 48,62-63          
 src/ui/hooks      |   80.99 |    82.54 |   85.29 |   80.99 |                   
  ...dProcessor.ts |    78.7 |       79 |     100 |    78.7 | ...52-455,466-482 
  ...dProcessor.ts |   95.52 |    69.23 |     100 |   95.52 | ...17-218,223-224 
  ...dProcessor.ts |    86.5 |       72 |     100 |    86.5 | ...54-355,357-361 
  ...Completion.ts |   85.79 |       80 |     100 |   85.79 | ...07-208,216-219 
  ...uthCommand.ts |    7.46 |      100 |       0 |    7.46 | 18-92             
  ...tIndicator.ts |     100 |      100 |     100 |     100 |                   
  ...ketedPaste.ts |     100 |      100 |     100 |     100 |                   
  ...ompletion.tsx |   94.73 |    81.81 |     100 |   94.73 | ...98-199,201-202 
  useCompletion.ts |    92.4 |     87.5 |     100 |    92.4 | ...,95-96,100-101 
  ...leMessages.ts |   98.68 |       95 |     100 |   98.68 | 55                
  ...orSettings.ts |     100 |      100 |     100 |     100 |                   
  useFocus.ts      |     100 |      100 |     100 |     100 |                   
  ...miniStream.ts |   73.62 |    74.34 |     100 |   73.62 | ...56-857,887-977 
  ...BranchName.ts |   91.66 |    84.61 |     100 |   91.66 | 57-63             
  ...oryManager.ts |   98.41 |    93.33 |     100 |   98.41 | 43                
  ...putHistory.ts |    92.5 |    85.71 |     100 |    92.5 | 62-63,71,93-95    
  useKeypress.ts   |     100 |      100 |     100 |     100 |                   
  ...gIndicator.ts |     100 |      100 |     100 |     100 |                   
  useLogger.ts     |      25 |      100 |       0 |      25 | 14-32             
  ...raseCycler.ts |   95.45 |       75 |     100 |   95.45 | ...64-165,183-185 
  ...cySettings.ts |     3.6 |      100 |       0 |     3.6 | 22-143            
  useQwenAuth.ts   |     100 |      100 |     100 |     100 |                   
  ...lScheduler.ts |    79.2 |    94.87 |     100 |    79.2 | ...02-205,295-305 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  ...ompletion.tsx |     100 |     92.3 |     100 |     100 | 77                
  ...ellHistory.ts |   91.26 |       80 |     100 |   91.26 | ...67,112-113,123 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-75              
  ...Completion.ts |      94 |    92.53 |     100 |      94 | 58-61,69-72,93    
  ...tateAndRef.ts |   59.09 |      100 |     100 |   59.09 | 23-31             
  ...rminalSize.ts |   77.27 |      100 |      50 |   77.27 | 19-23             
  ...emeCommand.ts |   46.98 |       75 |     100 |   46.98 | ...4,70-71,77-100 
  useTimer.ts      |   88.09 |    85.71 |     100 |   88.09 | 44-45,51-53       
  vim.ts           |   83.57 |     79.5 |     100 |   83.57 | ...38,742-750,759 
 src/ui/privacy    |   13.77 |      100 |       0 |   13.77 |                   
  ...acyNotice.tsx |    9.58 |      100 |       0 |    9.58 | 20-113            
  ...acyNotice.tsx |    12.9 |      100 |       0 |    12.9 | 15-55             
  ...acyNotice.tsx |   10.81 |      100 |       0 |   10.81 | 15-58             
  ...acyNotice.tsx |   30.76 |      100 |       0 |   30.76 | 19-36,39-41       
 src/ui/themes     |   99.64 |    92.47 |     100 |   99.64 |                   
  ansi-light.ts    |     100 |      100 |     100 |     100 |                   
  ansi.ts          |     100 |      100 |     100 |     100 |                   
  atom-one-dark.ts |     100 |      100 |     100 |     100 |                   
  ayu-light.ts     |     100 |      100 |     100 |     100 |                   
  ayu.ts           |     100 |      100 |     100 |     100 |                   
  color-utils.ts   |     100 |      100 |     100 |     100 |                   
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  dracula.ts       |     100 |      100 |     100 |     100 |                   
  github-dark.ts   |     100 |      100 |     100 |     100 |                   
  github-light.ts  |     100 |      100 |     100 |     100 |                   
  googlecode.ts    |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  qwen-dark.ts     |     100 |      100 |     100 |     100 |                   
  qwen-light.ts    |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-manager.ts |   93.93 |    84.44 |     100 |   93.93 | ...94,198,225-226 
  theme.ts         |     100 |      100 |     100 |     100 |                   
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/utils      |   77.58 |    86.11 |   98.18 |   77.58 |                   
  ...Colorizer.tsx |    77.3 |    77.77 |     100 |    77.3 | ...48-151,185-209 
  ...olePatcher.ts |   95.74 |       75 |     100 |   95.74 | 56-57             
  ...nRenderer.tsx |   26.51 |       75 |     100 |   26.51 | 32-137            
  ...wnDisplay.tsx |   86.19 |    87.69 |     100 |   86.19 | ...71-279,311-332 
  ...eRenderer.tsx |   78.09 |    76.19 |     100 |   78.09 | 55-83             
  ...boardUtils.ts |   32.25 |     37.5 |     100 |   32.25 | ...55-114,129-145 
  commandUtils.ts  |   96.36 |    90.47 |     100 |   96.36 | 68,72             
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  displayUtils.ts  |     100 |      100 |     100 |     100 |                   
  errorParsing.ts  |     100 |     92.5 |     100 |     100 | 74,78,84          
  formatters.ts    |   90.47 |    95.83 |     100 |   90.47 | 57-60             
  ...nUtilities.ts |   69.84 |    85.71 |     100 |   69.84 | 75-91,100-101     
  textUtils.ts     |   66.66 |      100 |      75 |   66.66 | 13-18             
  updateCheck.ts   |     100 |    80.95 |     100 |     100 | 26-38             
 src/utils         |   31.42 |    90.32 |      70 |   31.42 |                   
  cleanup.ts       |      64 |    66.66 |   66.66 |      64 | 18-26,35          
  events.ts        |     100 |      100 |     100 |     100 |                   
  gitUtils.ts      |   84.61 |       50 |     100 |   84.61 | 24-25             
  ...AutoUpdate.ts |   81.14 |    95.23 |   66.66 |   81.14 | 85-99,125-132     
  ...lationInfo.ts |     100 |      100 |     100 |     100 |                   
  package.ts       |   88.88 |       80 |     100 |   88.88 | 33-34             
  readStdin.ts     |    3.44 |      100 |       0 |    3.44 | 7-39              
  resolvePath.ts   |   66.66 |       25 |     100 |   66.66 | 12-13,16,18-19    
  sandbox.ts       |       0 |        0 |       0 |       0 | 1-935             
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |   23.07 |      100 |       0 |   23.07 | 14-40             
  ...entEmitter.ts |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  version.ts       |     100 |       50 |     100 |     100 | 11                
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   70.92 |    81.34 |   73.47 |   70.92 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |     100 |      100 |     100 |     100 |                   
  promises.ts      |     100 |      100 |     100 |     100 |                   
 src/code_assist   |   70.47 |    73.52 |   71.05 |   70.47 |                   
  codeAssist.ts    |   18.51 |      100 |       0 |   18.51 | 13-35             
  converter.ts     |   89.23 |    96.15 |   81.81 |   89.23 | 179-183,202-212   
  oauth2.ts        |   75.23 |     61.7 |      80 |   75.23 | ...03-409,416-417 
  server.ts        |    50.6 |       80 |   53.84 |    50.6 | ...73-214,217-219 
  setup.ts         |   73.77 |     62.5 |     100 |   73.77 | 57-58,69-71,83-93 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/config        |   73.04 |    79.06 |   43.52 |   73.04 |                   
  config.ts        |   72.69 |    79.06 |   43.52 |   72.69 | ...01-802,821-822 
  models.ts        |     100 |      100 |     100 |     100 |                   
 src/core          |    76.8 |     74.7 |      80 |    76.8 |                   
  client.ts        |   71.62 |    77.47 |   68.96 |   71.62 | ...38,841,848-897 
  ...tGenerator.ts |   66.91 |    68.96 |     100 |   66.91 | ...44,174,185-228 
  ...lScheduler.ts |   71.26 |    71.25 |   81.25 |   71.26 | ...99-706,709-719 
  geminiChat.ts    |   57.27 |    71.05 |      60 |   57.27 | ...64-672,707-756 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  logger.ts        |   84.79 |    82.05 |     100 |   84.79 | ...60-261,277-281 
  modelCheck.ts    |     100 |      100 |     100 |     100 |                   
  ...olExecutor.ts |   99.09 |    57.14 |     100 |   99.09 | 105               
  ...tGenerator.ts |   85.31 |    72.16 |     100 |   85.31 | ...1819,1822,1824 
  prompts.ts       |   93.66 |    88.46 |      75 |   93.66 | ...,96-97,429-486 
  tokenLimits.ts   |   14.28 |      100 |       0 |   14.28 | 15-32             
  turn.ts          |   83.57 |    83.33 |     100 |   83.57 | ...68-271,284-285 
 src/ide           |    44.1 |    75.75 |      50 |    44.1 |                   
  detect-ide.ts    |    42.1 |    66.66 |      50 |    42.1 | 12-21,25-26       
  ide-client.ts    |   23.95 |    83.33 |   17.64 |   23.95 | ...40-241,244-245 
  ide-installer.ts |   49.58 |     62.5 |     100 |   49.58 | ...,83-84,106-146 
  ideContext.ts    |     100 |      100 |     100 |     100 |                   
 src/mcp           |   73.81 |    78.94 |   76.31 |   73.81 |                   
  ...h-provider.ts |   83.01 |      100 |   33.33 |   83.01 | ...69,73,77,81-82 
  ...h-provider.ts |   77.05 |    65.62 |      90 |   77.05 | ...62-664,669-671 
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  oauth-utils.ts   |   42.85 |     87.5 |      80 |   42.85 | ...32-192,216-252 
 src/prompts       |   22.64 |      100 |    12.5 |   22.64 |                   
  mcp-prompts.ts   |   18.18 |      100 |       0 |   18.18 | 11-19             
  ...t-registry.ts |    23.8 |      100 |   14.28 |    23.8 | ...55,61-62,68-73 
 src/qwen          |   91.24 |    82.88 |   95.34 |   91.24 |                   
  ...tGenerator.ts |   93.75 |    85.93 |     100 |   93.75 | ...35-236,292-293 
  qwenOAuth2.ts    |   90.13 |     81.3 |    92.3 |   90.13 | ...68-779,815-816 
 src/services      |   94.16 |    94.77 |   86.48 |   94.16 |                   
  ...eryService.ts |   93.33 |    88.46 |   85.71 |   93.33 | 31,39,84,109-110  
  gitService.ts    |   77.52 |      100 |      60 |   77.52 | ...08-112,115-119 
  ...ionService.ts |   99.22 |    96.77 |     100 |   99.22 | 282-283           
  ...ionService.ts |   96.03 |    93.75 |     100 |   96.03 | 132-134,195-196   
 src/telemetry     |    66.8 |    83.68 |   71.64 |    66.8 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...-exporters.ts |   26.47 |      100 |       0 |   26.47 | ...80,83-84,87-88 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-67              
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-121             
  loggers.ts       |   68.07 |    79.16 |   69.23 |   68.07 | ...41-359,362-379 
  metrics.ts       |   60.36 |    95.65 |    62.5 |   60.36 | ...36-158,161-184 
  sdk.ts           |   76.31 |    30.76 |     100 |   76.31 | ...32,140-141,146 
  types.ts         |   86.85 |    90.74 |    82.6 |   86.85 | ...06-315,323-332 
  uiTelemetry.ts   |   99.23 |    95.83 |     100 |   99.23 | 119               
 ...learcut-logger |       0 |        0 |       0 |       0 |                   
  ...cut-logger.ts |       0 |        0 |       0 |       0 | 1-626             
  ...tadata-key.ts |       0 |        0 |       0 |       0 | 1-213             
 ...ry/qwen-logger |    70.8 |    74.35 |   73.33 |    70.8 |                   
  event-types.ts   |       0 |        0 |       0 |       0 |                   
  qwen-logger.ts   |    70.8 |    73.68 |   72.41 |    70.8 | ...69-473,477-482 
 src/test-utils    |     100 |      100 |     100 |     100 |                   
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
 src/tools         |   65.52 |    80.76 |   72.07 |   65.52 |                   
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  edit.ts          |   80.62 |    85.13 |      75 |   80.62 | ...80-481,485-520 
  glob.ts          |   83.33 |    76.08 |   83.33 |   83.33 | ...05-306,314-321 
  grep.ts          |   60.23 |    82.89 |   72.72 |   60.23 | ...77-582,587-591 
  ls.ts            |   96.66 |    90.16 |     100 |   96.66 | 126-127,205-209   
  mcp-client.ts    |   25.88 |    71.15 |   26.31 |   25.88 | ...1082,1086-1089 
  mcp-tool.ts      |   93.59 |    91.22 |   92.85 |   93.59 | 84-94,206-207     
  memoryTool.ts    |   84.13 |    82.97 |   86.66 |   84.13 | ...22-337,375-393 
  ...iable-tool.ts |     100 |    84.61 |     100 |     100 | 90,97             
  read-file.ts     |   96.74 |    89.65 |   83.33 |   96.74 | 115-116,125-126   
  ...many-files.ts |   80.49 |       70 |      80 |   80.49 | ...82-583,590-591 
  shell.ts         |   82.17 |    74.02 |    87.5 |   82.17 | ...53-355,357-358 
  tool-error.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |   55.05 |    76.27 |   76.47 |   55.05 | ...61-366,450-451 
  tools.ts         |   75.47 |      100 |   33.33 |   75.47 | ...68-173,182-185 
  web-fetch.ts     |   31.06 |    68.42 |   66.66 |   31.06 | ...92-193,221-359 
  web-search.ts    |   10.48 |      100 |      20 |   10.48 | ...7,90-91,94-187 
  write-file.ts    |   83.55 |    84.61 |   88.88 |   83.55 | ...12-317,379-409 
 src/utils         |   75.75 |     85.5 |   80.54 |   75.75 |                   
  LruCache.ts      |   70.96 |     62.5 |     100 |   70.96 | 20-22,28,30-34    
  bfsFileSearch.ts |   89.02 |    90.47 |     100 |   89.02 | 86-94             
  browser.ts       |    8.69 |      100 |       0 |    8.69 | 17-53             
  editCorrector.ts |   77.35 |    61.11 |   91.66 |   77.35 | ...70-682,716,730 
  editor.ts        |   97.63 |    94.54 |     100 |   97.63 | 154,224,227-228   
  ...rReporting.ts |   83.72 |    84.61 |     100 |   83.72 | 82-86,107-115     
  errors.ts        |   39.02 |       60 |      75 |   39.02 | 21-25,41-57,61-67 
  fetch.ts         |   34.04 |      100 |       0 |   34.04 | 22-27,31-57       
  fileUtils.ts     |    93.4 |    89.15 |     100 |    93.4 | ...66-270,353-359 
  formatters.ts    |   54.54 |       50 |     100 |   54.54 | 12-16             
  ...eUtilities.ts |   96.03 |    95.83 |     100 |   96.03 | 28-29,57-58       
  ...rStructure.ts |   95.96 |    94.93 |     100 |   95.96 | ...14-117,345-347 
  ...noreParser.ts |     100 |    88.88 |     100 |     100 | 27,47             
  gitUtils.ts      |   51.21 |     90.9 |      50 |   51.21 | 40-41,50-73       
  ...yDiscovery.ts |   87.13 |    76.92 |   77.77 |   87.13 | ...32-333,336-337 
  ...tProcessor.ts |   93.68 |    88.75 |   84.61 |   93.68 | ...80-281,384-385 
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  ...kerChecker.ts |   83.51 |    83.33 |     100 |   83.51 | 64-65,75-80,88-94 
  ...iAnalytics.ts |    4.78 |        0 |       0 |    4.78 | ...44-339,343-360 
  ...iLogViewer.ts |    6.94 |        0 |       0 |    6.94 | ...29-146,150-197 
  openaiLogger.ts  |    19.1 |      100 |   33.33 |    19.1 | ...96-116,124-131 
  partUtils.ts     |     100 |      100 |     100 |     100 |                   
  paths.ts         |   80.76 |       80 |   77.77 |   80.76 | ...92-193,201-202 
  ...rDetection.ts |   69.44 |    79.06 |     100 |   69.44 | ...28-129,169-170 
  retry.ts         |   63.98 |    76.19 |     100 |   63.98 | ...74-294,339-354 
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  ...aValidator.ts |   86.95 |    68.75 |     100 |   86.95 | 24-25,27-28,45-46 
  ...r-launcher.ts |   78.57 |     87.5 |   66.66 |   78.57 | ...33,135,153-188 
  session.ts       |     100 |      100 |     100 |     100 |                   
  shell-utils.ts   |   95.21 |    93.57 |     100 |   95.21 | ...,94-95,142-144 
  summarizer.ts    |     100 |    88.88 |     100 |     100 | 91                
  ...emEncoding.ts |      98 |    94.11 |     100 |      98 | 106-107           
  testUtils.ts     |   84.44 |    72.72 |   83.33 |   84.44 | 27-28,34-35,70-72 
  textUtils.ts     |    12.5 |      100 |       0 |    12.5 | 15-34             
  user_account.ts  |   97.72 |    96.42 |     100 |   97.72 | 102-103           
  user_id.ts       |    75.6 |       60 |      75 |    75.6 | 19-20,28-33,46-48 
  ...aceContext.ts |   80.37 |    74.19 |      80 |   80.37 | ...17-121,149-150 
 ...ils/filesearch |   97.72 |    93.61 |     100 |   97.72 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  fileSearch.ts    |   96.15 |    91.37 |     100 |   96.15 | ...70-171,202-203 
  ignore.ts        |     100 |      100 |     100 |     100 |                   
  result-cache.ts  |     100 |     92.3 |     100 |     100 | 49                
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run.

@Mingholy Mingholy merged commit 3e082ae into main Aug 14, 2025
14 checks passed
@tanzhenxin tanzhenxin deleted the feat/tavily_web_search branch August 15, 2025 10:49
halfaipg pushed a commit to AIPowerGrid/grid-code that referenced this pull request Aug 16, 2025
halfaipg pushed a commit to AIPowerGrid/grid-code that referenced this pull request Aug 16, 2025
DragonnZhang pushed a commit that referenced this pull request Apr 30, 2026
# v0.7.4 — Custom Endpoints & Session Branching Overhaul

---

## Features

- **Custom endpoint support** — connect any OpenAI-compatible provider via Pi SDK's `registerProvider`, with protocol selector, base URL input, and model registration. Fixes [#329](craft-ai-agents/craft-agents-oss#329) (479d6d25)

## Improvements

- **Custom endpoint UX** — protocol selector now appears before the base URL input, and edit-state persistence works reliably across setup routing (aac754d7, d94d36bd, 40b53170)
- **CustomEndpointApi cleanup** — deduplicated type definition, extracted `InitMessage`, and fixed model registration replace bug (8f770f62)

## Bug Fixes

- **Session branching overhaul** — completely reworked the branch/fork flow to eliminate preflight failures, CWD mismatches, and stuck sessions. Branches now fork on first user message instead of during preflight, conversation is properly trimmed at the branch point, and `spawn_session` names appear correctly in the sidebar. Fixes [#392](craft-ai-agents/craft-agents-oss#392) (a9358817, 1cb1d11c, d337e288, e54f58f0, 0d40bb7e, 7bd83366, 36f46f88, e8db3e2a, and 10 more commits)
- **Branch cutoff reliability** — Pi and Claude branch cutoffs now use sidecar turn anchors and lineage guards, with proper fallback when UUIDs are missing (ebf0fba7, 20f1dc35, 82b19359, 4bfac3a0)
- **Windows: duplicate messages on branch** — Windows `fs.watch()` fires aggressively for atomic writes, causing the ConfigWatcher to re-broadcast session metadata and duplicate messages. Fixed with ID-based dedup in `appendMessage()`, self-triggered event suppression via signature comparison, and increased debounce to 300ms on Windows (65c959f8)
- **Windows: empty branch messages** — branch messages were saved with hardcoded source session paths instead of portable `{{SESSION_PATH}}` tokens, causing path resolution failures on Windows. Fixed by re-tokenizing paths from source → branch directory during message copy (1ab2c9b8)
- **Model switching mid-session** — `ClaudeAgent.setModel` now correctly calls `super.setModel` to update the internal model reference, fixing cases where model changes didn't take effect. Partially addresses [#390](craft-ai-agents/craft-agents-oss#390) (abd1fa4a)
- **JSON file link crash** — clicking JSON file links for non-existent files no longer crashes the app (bfcb875d)
- **Empty text block cache_control** — stripped `cache_control` from empty text blocks in Anthropic API requests, preventing validation errors (4ad37ff3)
- **Automation send-timeout** — increased send-timeout for the daily discussion points workflow to prevent premature timeouts (669c83cb)

---
xaelistic pushed a commit to xaelistic/qwen-code that referenced this pull request Jun 7, 2026
xaelistic pushed a commit to xaelistic/qwen-code that referenced this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

今天最新的版本无法谷歌搜索,试了三次都不行

2 participants