style: fix cargo fmt + clippy violations
This commit is contained in:
parent
c1e05069ea
commit
7a4ea4cbe9
@ -9,9 +9,9 @@ pub use schema::{
|
||||
BuiltinHooksConfig, ChannelsConfig, ClassificationRule, ComposioConfig, Config, CostConfig,
|
||||
CronConfig, DelegateAgentConfig, DiscordConfig, DockerRuntimeConfig, EdgeTtsConfig,
|
||||
ElevenLabsTtsConfig, EmbeddingRouteConfig, EstopConfig, FeishuConfig, GatewayConfig,
|
||||
GoogleTtsConfig, HardwareConfig, HardwareTransport, HeartbeatConfig, HooksConfig,
|
||||
HttpRequestConfig, IMessageConfig, IdentityConfig, LarkConfig, MatrixConfig, McpConfig,
|
||||
McpServerConfig, McpTransport, MemoryConfig, ModelRouteConfig, MultimodalConfig,
|
||||
GoogleTtsConfig, GoogleWorkspaceConfig, HardwareConfig, HardwareTransport, HeartbeatConfig,
|
||||
HooksConfig, HttpRequestConfig, IMessageConfig, IdentityConfig, LarkConfig, MatrixConfig,
|
||||
McpConfig, McpServerConfig, McpTransport, MemoryConfig, ModelRouteConfig, MultimodalConfig,
|
||||
NextcloudTalkConfig, NodesConfig, ObservabilityConfig, OpenAiTtsConfig, OtpConfig, OtpMethod,
|
||||
PeripheralBoardConfig, PeripheralsConfig, ProxyConfig, ProxyScope, QdrantConfig,
|
||||
QueryClassificationConfig, ReliabilityConfig, ResourceLimitsConfig, RuntimeConfig,
|
||||
@ -19,7 +19,6 @@ pub use schema::{
|
||||
SkillsPromptInjectionMode, SlackConfig, StorageConfig, StorageProviderConfig,
|
||||
StorageProviderSection, StreamMode, TelegramConfig, ToolFilterGroup, ToolFilterGroupMode,
|
||||
TranscriptionConfig, TtsConfig, TunnelConfig, WebFetchConfig, WebSearchConfig, WebhookConfig,
|
||||
GoogleWorkspaceConfig,
|
||||
};
|
||||
|
||||
pub fn name_and_presence<T: traits::ChannelConfig>(channel: Option<&T>) -> (&'static str, bool) {
|
||||
|
||||
@ -1564,7 +1564,7 @@ impl Default for WebSearchConfig {
|
||||
/// To revert, remove the `[google_workspace]` section from the config file (or
|
||||
/// set `enabled = false`). No data migration is required; the tool simply stops
|
||||
/// being registered.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct GoogleWorkspaceConfig {
|
||||
/// Enable the `google_workspace` tool. Default: `false`.
|
||||
#[serde(default)]
|
||||
@ -1579,15 +1579,6 @@ pub struct GoogleWorkspaceConfig {
|
||||
pub allowed_services: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for GoogleWorkspaceConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: false,
|
||||
allowed_services: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Proxy ───────────────────────────────────────────────────────
|
||||
|
||||
/// Proxy application scope — determines which outbound traffic uses the proxy.
|
||||
@ -5278,6 +5269,8 @@ impl Config {
|
||||
// MCP
|
||||
if self.mcp.enabled {
|
||||
validate_mcp_config(&self.mcp)?;
|
||||
}
|
||||
|
||||
// Google Workspace allowed_services validation
|
||||
let mut seen_gws_services = std::collections::HashSet::new();
|
||||
for (i, service) in self.google_workspace.allowed_services.iter().enumerate() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user