Skip to content

Commit e2f2a5b

Browse files
committed
fix(rig): remove unused imports and add feature gating to resolve warnings
1 parent 9e56c46 commit e2f2a5b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/codegraph-mcp-rig/src/agent/react.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
// ABOUTME: ReAct agent implementations for different providers
22

3+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
34
use crate::agent::api::{AgentEvent, RigAgentTrait};
5+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
46
use crate::tools::GraphToolFactory;
7+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
58
use anyhow::{anyhow, Result};
9+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
610
use async_trait::async_trait;
11+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
712
use codegraph_mcp_core::context_aware_limits::ContextTier;
13+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
814
use futures::stream;
15+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
916
use futures::Stream;
17+
#[cfg(any(feature = "openai", feature = "anthropic", feature = "ollama", feature = "xai"))]
1018
use std::pin::Pin;
1119

1220
/// OpenAI-based Rig agent

crates/codegraph-mcp-rig/src/agent/reflexion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::agent::api::{AgentEvent, RigAgentTrait};
44
use anyhow::Result;
55
use async_trait::async_trait;
66
use codegraph_mcp_core::context_aware_limits::ContextTier;
7-
use futures::stream::{self, StreamExt};
7+
use futures::stream;
88
use futures::Stream;
99
use std::pin::Pin;
1010

0 commit comments

Comments
 (0)