Skip to content

Integrate WeatherTool into CLI and fix tool calling bugs#27

Merged
IreneXY merged 1 commit intomainfrom
032901
Mar 30, 2026
Merged

Integrate WeatherTool into CLI and fix tool calling bugs#27
IreneXY merged 1 commit intomainfrom
032901

Conversation

@IreneXY
Copy link
Copy Markdown
Member

@IreneXY IreneXY commented Mar 30, 2026

Summary

  • Wire up AgentService + ToolRegistry + WeatherTool in CLI entry point
  • Bug fix: AgentService yielded Done on intermediate tool calling rounds, causing ChatBloc to stop listening before the final text response arrived. Now Done is only yielded on the final round.
  • Bug fix: WeatherTool URL encoding — use Uri.https() instead of string concatenation + Uri.parse() for proper encoding of Chinese characters and spaces in city names
  • Add null check for lat/lon when city not found in geocoding

Test plan

  • dart analyze passes (chat_core + skewr_cli)
  • dart format --set-exit-if-changed . passes
  • dart test — chat_core: 63 tests passed, skewr_cli: 10 tests passed
  • Integration test: WeatherTool queries San Jose weather successfully
  • Manual test: CLI weather queries work for Chinese city names and multi-word cities

🤖 Generated with Claude Code

Co-Authored-By: Claude Code noreply@anthropic.com

- Wire up AgentService + ToolRegistry + WeatherTool in CLI entry point
- Fix AgentService: don't yield Done on intermediate tool calling rounds,
  which caused ChatBloc to stop listening before final response
- Fix WeatherTool: use Uri.https() for proper URL encoding of city names
  (fixes Chinese characters and spaces in city names)
- Add null check for lat/lon when city not found

Co-Authored-By: Claude Code <noreply@anthropic.com>
@IreneXY IreneXY merged commit 9740d72 into main Mar 30, 2026
2 checks passed
@IreneXY IreneXY deleted the 032901 branch March 30, 2026 02:25
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