mirror of https://github.com/kortix-ai/suna.git
wip
This commit is contained in:
parent
3af20d6a2e
commit
1e5542820c
|
@ -55,7 +55,7 @@ class ToolRegistry:
|
|||
registered_openapi += 1
|
||||
# logger.debug(f"Registered OpenAPI function {func_name} from {tool_class.__name__}")
|
||||
|
||||
logger.info(f"Tool registration complete for {tool_class.__name__}: {registered_openapi} OpenAPI functions")
|
||||
logger.debug(f"Tool registration complete for {tool_class.__name__}: {registered_openapi} OpenAPI functions")
|
||||
|
||||
def get_available_functions(self) -> Dict[str, Callable]:
|
||||
"""Get all available tool functions.
|
||||
|
|
|
@ -93,7 +93,7 @@ class ToolManager:
|
|||
# Browser tool
|
||||
self._register_browser_tool(disabled_tools)
|
||||
|
||||
logger.info(f"Tool registration complete. Registered {len(self.thread_manager.tool_registry.tools)} tools")
|
||||
logger.debug(f"Tool registration complete. Registered {len(self.thread_manager.tool_registry.tools)} tools")
|
||||
|
||||
def _register_core_tools(self):
|
||||
"""Register core tools that are always available."""
|
||||
|
|
|
@ -19,12 +19,12 @@ else:
|
|||
logger.warning("No Daytona API key found in environment variables")
|
||||
|
||||
if daytona_config.api_url:
|
||||
# logger.debug(f"Daytona API URL set to: {daytona_config.api_url}")
|
||||
logger.debug(f"Daytona API URL set to: {daytona_config.api_url}")
|
||||
else:
|
||||
logger.warning("No Daytona API URL found in environment variables")
|
||||
|
||||
if daytona_config.target:
|
||||
# logger.debug(f"Daytona target set to: {daytona_config.target}")
|
||||
logger.debug(f"Daytona target set to: {daytona_config.target}")
|
||||
else:
|
||||
logger.warning("No Daytona target found in environment variables")
|
||||
|
||||
|
|
|
@ -127,10 +127,10 @@ def get_model_pricing(model: str) -> tuple[float, float] | None:
|
|||
# logger.debug(f"Found pricing for model {model_to_try}: input=${model_obj.pricing.input_cost_per_million_tokens}/M, output=${model_obj.pricing.output_cost_per_million_tokens}/M")
|
||||
return model_obj.pricing.input_cost_per_million_tokens, model_obj.pricing.output_cost_per_million_tokens
|
||||
else:
|
||||
# logger.debug(f"No pricing for model_to_try='{model_to_try}' (model_obj: {model_obj is not None}, has_pricing: {model_obj.pricing is not None if model_obj else False})")
|
||||
logger.debug(f"No pricing for model_to_try='{model_to_try}' (model_obj: {model_obj is not None}, has_pricing: {model_obj.pricing is not None if model_obj else False})")
|
||||
|
||||
# Silently return None for unknown models to avoid log spam
|
||||
# logger.debug(f"No pricing found for model '{model}' (resolved: '{resolved_model}')")
|
||||
logger.debug(f"No pricing found for model '{model}' (resolved: '{resolved_model}')")
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import { agentKeys } from '@/hooks/react-query/agents/keys';
|
|||
import { getAgents } from '@/hooks/react-query/agents/utils';
|
||||
import { AgentRunLimitDialog } from '@/components/thread/agent-run-limit-dialog';
|
||||
import { Examples } from '@/components/dashboard/examples';
|
||||
import { useAgentSelection } from '@/lib/stores/agent-selection-store';
|
||||
|
||||
// Custom dialog overlay with blur effect
|
||||
const BlurredDialogOverlay = () => (
|
||||
|
@ -96,8 +97,14 @@ export function HeroSection() {
|
|||
const scrollTimeout = useRef<NodeJS.Timeout | null>(null);
|
||||
const { scrollY } = useScroll();
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
const [selectedAgentId, setSelectedAgentId] = useState<string | undefined>();
|
||||
const router = useRouter();
|
||||
|
||||
// Use the agent selection store for localStorage persistence
|
||||
const {
|
||||
selectedAgentId,
|
||||
setSelectedAgent,
|
||||
initializeFromAgents
|
||||
} = useAgentSelection();
|
||||
const { user, isLoading } = useAuth();
|
||||
const { billingError, handleBillingError, clearBillingError } =
|
||||
useBillingError();
|
||||
|
@ -135,6 +142,13 @@ export function HeroSection() {
|
|||
|
||||
const agents = agentsResponse?.agents || [];
|
||||
|
||||
// Initialize agent selection from localStorage when agents are loaded
|
||||
useEffect(() => {
|
||||
if (agents.length > 0) {
|
||||
initializeFromAgents(agents);
|
||||
}
|
||||
}, [agents, initializeFromAgents]);
|
||||
|
||||
// Auth dialog state
|
||||
const [authDialogOpen, setAuthDialogOpen] = useState(false);
|
||||
|
||||
|
@ -387,7 +401,7 @@ export function HeroSection() {
|
|||
onChange={setInputValue}
|
||||
isLoggedIn={!!user}
|
||||
selectedAgentId={selectedAgentId}
|
||||
onAgentSelect={setSelectedAgentId}
|
||||
onAgentSelect={setSelectedAgent}
|
||||
autoFocus={false}
|
||||
enableAdvancedConfig={false}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue