feat: collapse tool results and add headless Chrome fetcher
Backend: - Add unified URL fetcher with fallback chain: curl → wget → native Go → headless Chrome - Implement JS-rendered page detection for sites like docs.rs - Add chromedp dependency for headless browser support - Log fetch method on server startup Frontend: - Store tool results in structured ToolCall.result field instead of message content - Show tool results collapsed by default in ToolCallDisplay - Add expandable results section with truncation for large outputs - Add Message.hidden flag for internal messages (tool context) - Separate visibleMessages (UI) from allMessages (API) to fix infinite loop - Fix tool result messages not being sent to model 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,10 @@ func main() {
|
||||
Handler: r,
|
||||
}
|
||||
|
||||
// Initialize fetcher and log the method being used
|
||||
fetcher := api.GetFetcher()
|
||||
log.Printf("URL fetcher method: %s (headless Chrome: %v)", fetcher.Method(), fetcher.HasChrome())
|
||||
|
||||
// Graceful shutdown handling
|
||||
go func() {
|
||||
log.Printf("Server starting on port %s", *port)
|
||||
|
||||
Reference in New Issue
Block a user