Web search - #2
Conversation
📝 WalkthroughWalkthroughThe PR adds Ollama tool calling, bounded web-research orchestration, public-network protections, streamed agent-step events, and expandable workflow steps in the Angular chat interface. Documentation and build-budget configuration are updated accordingly. ChangesAgentic web research
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ChatShellComponent
participant ChatCommand
participant run_agent_stream
participant WebTools
participant Ollama
User->>ChatShellComponent: Submit research prompt
ChatShellComponent->>ChatCommand: Send request with chunk and step channels
ChatCommand->>run_agent_stream: Start bounded research
run_agent_stream->>Ollama: Request planning with tool definitions
Ollama-->>run_agent_stream: Tool calls
run_agent_stream->>WebTools: Search or fetch public pages
WebTools-->>run_agent_stream: Evidence and follow-up calls
run_agent_stream-->>ChatCommand: Agent step events
run_agent_stream->>Ollama: Request final answer with evidence
Ollama-->>ChatCommand: Stream answer chunks
ChatCommand-->>ChatShellComponent: Steps and chunks
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src-tauri/Cargo.toml (1)
18-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider updating
quick-xmlandscraperto their latest stable versions.The specified versions are valid and exist on crates.io:
quick-xml = 0.39(released January 2026),scraper = 0.24(released August 2025), andtokio = 1.x. No security advisories found for either crate. However, both are outdated:
quick-xmlhas advanced to0.41.0(June 29, 2026)scraperhas advanced to0.27.0Updating to the latest stable versions is straightforward and recommended for access to bug fixes and improvements. The
tokionetfeature is correctly enabled fortools/web.rsusage.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src-tauri/Cargo.toml` around lines 18 - 25, Update the dependency versions in Cargo.toml from quick-xml 0.39 to 0.41.0 and scraper 0.24 to 0.27.0, preserving their existing feature configuration and leaving tokio unchanged.src/app/features/chat/chat-shell.component.html (1)
93-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a
trackByto the step*ngForto preserve DOM identity.
applyAgentStepandtoggleStepDetailbuild newAgentStepobjects and a new array on every event, so with default identity tracking Angular destroys and recreates each step's<button>on every status transition and on toggle — dropping keyboard focus and restarting the running spinner. Track bystep.id.♻️ Proposed change
<div class="agent-step" - *ngFor="let step of workflowSteps(messageIndex)" + *ngFor="let step of workflowSteps(messageIndex); trackBy: trackByStepId"Add the helper in
chat-shell.component.ts:protected trackByStepId(_: number, step: AgentStep): string { return step.id; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/features/chat/chat-shell.component.html` around lines 93 - 99, Preserve step DOM identity in the workflowSteps loop by adding a trackBy binding that uses each step’s id. Implement the corresponding trackByStepId method in the chat shell component, accepting the index and AgentStep and returning step.id, then reference it from the step *ngFor.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 384-389: Update the later Roadmap heading in README.md from
section 22 to section 23, preserving the existing Roadmap content.
In `@src-tauri/src/providers/ollama.rs`:
- Line 16: Split the timeout constants in the Ollama provider: retain
OLLAMA_REQUEST_TIMEOUT at the shorter health/listing duration for health_check
and list_models, add a dedicated longer OLLAMA_CHAT_TIMEOUT, and update
chat_with_tool_definitions to use it.
---
Nitpick comments:
In `@src-tauri/Cargo.toml`:
- Around line 18-25: Update the dependency versions in Cargo.toml from quick-xml
0.39 to 0.41.0 and scraper 0.24 to 0.27.0, preserving their existing feature
configuration and leaving tokio unchanged.
In `@src/app/features/chat/chat-shell.component.html`:
- Around line 93-99: Preserve step DOM identity in the workflowSteps loop by
adding a trackBy binding that uses each step’s id. Implement the corresponding
trackByStepId method in the chat shell component, accepting the index and
AgentStep and returning step.id, then reference it from the step *ngFor.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4eed1642-bd3a-4ddf-8758-1f47d7f287a7
⛔ Files ignored due to path filters (1)
src-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (18)
README.mdangular.jsonsrc-tauri/Cargo.tomlsrc-tauri/src/agent.rssrc-tauri/src/app_state.rssrc-tauri/src/commands/chat.rssrc-tauri/src/error.rssrc-tauri/src/lib.rssrc-tauri/src/providers/mod.rssrc-tauri/src/providers/ollama.rssrc-tauri/src/tools/mod.rssrc-tauri/src/tools/web.rssrc/app/core/chat/chat.models.tssrc/app/core/chat/chat.service.tssrc/app/features/chat/chat-shell.component.csssrc/app/features/chat/chat-shell.component.htmlsrc/app/features/chat/chat-shell.component.spec.tssrc/app/features/chat/chat-shell.component.ts
| ## 22. Security Notes | ||
|
|
||
| - Taurus is local-first and does not include telemetry by default. | ||
| - Web research sends the model's search query to Bing and automatically fetches up to two highest-ranked public result pages per search. The planner may selectively request additional public pages linked by fetched results, subject to the global planning-round and tool-call limits. | ||
| - The fetch tool blocks loopback, private, link-local, and other special-use IP ranges, including across redirects. | ||
| - Web responses are size-limited and page text is treated as untrusted reference material in the agent prompt. The expandable workflow retains the fetched text, while the model receives a bounded excerpt to leave enough context for its answer. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Renumber the Roadmap section.
These changes make Security Notes section 22, but the later Roadmap heading remains section 22 at Line 396. Rename the Roadmap heading to ## 23. Roadmap.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 384 - 389, Update the later Roadmap heading in
README.md from section 22 to section 23, preserving the existing Roadmap
content.
| pub const DEFAULT_OLLAMA_BASE_URL: &str = "http://localhost:11434"; | ||
| const OLLAMA_CONNECT_TIMEOUT: Duration = Duration::from_secs(5); | ||
| const OLLAMA_REQUEST_TIMEOUT: Duration = Duration::from_secs(30); | ||
| const OLLAMA_REQUEST_TIMEOUT: Duration = Duration::from_secs(120); |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Shared timeout bump to 120s also stretches health checks and model listing. OLLAMA_REQUEST_TIMEOUT is reused by health_check (Line 107) and list_models (Line 138), so raising it from 30s to 120s means a connected-but-slow Ollama can stall those UX-facing calls for up to two minutes. The long budget is only needed for tool-calling chat. Consider a dedicated chat timeout and a shorter one for health/list.
Suggested split
-const OLLAMA_REQUEST_TIMEOUT: Duration = Duration::from_secs(120);
+const OLLAMA_CHAT_TIMEOUT: Duration = Duration::from_secs(120);
+const OLLAMA_REQUEST_TIMEOUT: Duration = Duration::from_secs(30);Use OLLAMA_CHAT_TIMEOUT in chat_with_tool_definitions and keep OLLAMA_REQUEST_TIMEOUT for health_check/list_models.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src-tauri/src/providers/ollama.rs` at line 16, Split the timeout constants in
the Ollama provider: retain OLLAMA_REQUEST_TIMEOUT at the shorter health/listing
duration for health_check and list_models, add a dedicated longer
OLLAMA_CHAT_TIMEOUT, and update chat_with_tool_definitions to use it.
Summary by CodeRabbit