Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ interface/dist/
.idea
list/
agents/

.claude/
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/agent/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ fn build_worker_recap(messages: &[rig::message::Message]) -> String {
}

/// Extract the last assistant text message from a history.
#[allow(dead_code)] // may be needed later
fn extract_last_assistant_text(history: &[rig::message::Message]) -> Option<String> {
for message in history.iter().rev() {
if let rig::message::Message::Assistant { content, .. } = message {
Expand Down
6 changes: 3 additions & 3 deletions src/api/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub(super) async fn create_agent(
cron: Vec::new(),
};
let agent_config = raw_config.resolve(&instance_dir, defaults);
drop(defaults);
let _ = defaults;

for dir in [
&agent_config.workspace,
Expand Down Expand Up @@ -393,13 +393,13 @@ pub(super) async fn create_agent(
let deps = deps.clone();
let logger = cortex_logger.clone();
async move {
crate::agent::cortex::spawn_bulletin_loop(deps, logger).await;
let _ = crate::agent::cortex::spawn_bulletin_loop(deps, logger).await;
}
});
tokio::spawn({
let deps = deps.clone();
async move {
crate::agent::cortex::spawn_association_loop(deps, cortex_logger).await;
let _ = crate::agent::cortex::spawn_association_loop(deps, cortex_logger).await;
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/spacebot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ where
async fn on_completion_response(
&self,
_prompt: &Message,
response: &CompletionResponse<M::Response>,
_response: &CompletionResponse<M::Response>,
) -> HookAction {
// Tool nudging: check if response has tool calls
// Note: Rig's CompletionResponse structure varies by model implementation
Expand Down
2 changes: 2 additions & 0 deletions src/llm/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ impl SpacebotModel {

/// Generic OpenAI-compatible API call.
/// Used by providers that implement the OpenAI chat completions format.
#[allow(dead_code)] // may be needed later
async fn call_openai_compatible(
&self,
request: CompletionRequest,
Expand Down Expand Up @@ -764,6 +765,7 @@ impl SpacebotModel {
}
// --- Helpers ---

#[allow(dead_code)] // may be needed later
fn normalize_ollama_base_url(configured: Option<String>) -> String {
let mut base_url = configured
.unwrap_or_else(|| "http://localhost:11434".to_string())
Expand Down
2 changes: 1 addition & 1 deletion src/memory/lance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl EmbeddingTable {
.into());
}

use arrow_array::{FixedSizeListArray, RecordBatch, StringArray};
use arrow_array::{RecordBatch, StringArray};

let schema = Self::schema();

Expand Down
5 changes: 2 additions & 3 deletions src/memory/maintenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

use crate::error::Result;
use crate::memory::MemoryStore;
use crate::memory::types::{Memory, MemoryType, RelationType};
use std::sync::Arc;
use crate::memory::types::MemoryType;

/// Maintenance configuration.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -124,7 +123,7 @@ async fn prune_memories(memory_store: &MemoryStore, config: &MaintenanceConfig)

/// Merge near-duplicate memories.
async fn merge_similar_memories(
memory_store: &MemoryStore,
_memory_store: &MemoryStore,
similarity_threshold: f32,
) -> Result<usize> {
// For now, this is a placeholder
Expand Down
2 changes: 1 addition & 1 deletion src/memory/store.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Memory graph storage (SQLite).

use crate::error::{MemoryError, Result};
use crate::error::Result;
use crate::memory::search::SearchSort;
use crate::memory::types::{Association, Memory, MemoryType, RelationType};

Expand Down
2 changes: 1 addition & 1 deletion src/messaging/discord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use anyhow::Context as _;
use arc_swap::ArcSwap;
use async_trait::async_trait;
use serenity::all::{
ButtonStyle, ChannelId, ChannelType, ComponentInteraction, Context, CreateActionRow,
ButtonStyle, ChannelId, ChannelType, Context, CreateActionRow,
CreateAttachment, CreateButton, CreateEmbed, CreateEmbedFooter, CreateInteractionResponse,
CreateInteractionResponseMessage, CreateMessage, CreatePoll, CreatePollAnswer,
CreateSelectMenu, CreateSelectMenuKind, CreateSelectMenuOption, CreateThread, EditMessage,
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/slack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ impl Messaging for SlackAdapter {
// The socket mode listener needs its own client instance — it manages
// a persistent WebSocket connection internally and owns that client for
// the lifetime of the connection. The shared `self.client` is for REST calls.
let listener_client = Arc::new(SlackClient::new(
let _listener_client = Arc::new(SlackClient::new(
SlackClientHyperConnector::new()
.context("failed to create slack socket mode connector")?,
));
Expand Down
8 changes: 4 additions & 4 deletions src/messaging/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ pub trait Messaging: Send + Sync + 'static {
/// Send a status update.
fn send_status(
&self,
message: &InboundMessage,
status: StatusUpdate,
_message: &InboundMessage,
_status: StatusUpdate,
) -> impl std::future::Future<Output = Result<()>> + Send {
async { Ok(()) }
}

/// Broadcast a message.
fn broadcast(
&self,
target: &str,
response: OutboundResponse,
_target: &str,
_response: OutboundResponse,
) -> impl std::future::Future<Output = Result<()>> + Send {
async { Ok(()) }
}
Expand Down
1 change: 0 additions & 1 deletion src/secrets/store.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Encrypted credentials storage (AES-256-GCM, redb).

use crate::error::Result;

/// Secrets store.
pub struct SecretsStore;
Expand Down
1 change: 0 additions & 1 deletion src/tools/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,3 @@ pub struct ExecResult {
pub stderr: String,
}

use anyhow::Context as _;
1 change: 0 additions & 1 deletion src/tools/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,3 @@ pub async fn file_list(path: impl AsRef<Path>) -> crate::error::Result<Vec<FileE
.collect())
}

use anyhow::Context as _;
2 changes: 1 addition & 1 deletion src/tools/memory_save.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Memory save tool for channels and branches.

use crate::error::Result;
use crate::memory::types::{Association, CreateAssociationInput};
use crate::memory::types::Association;
use crate::memory::{Memory, MemorySearch, MemoryType};
use rig::completion::ToolDefinition;
use rig::tool::Tool;
Expand Down