Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ interface/dist/
.idea
list/
agents/

# Claude Code - Fichiers propriétaires (auto-généré)
.claude/
CLAUDE.md
.claude-context
.claude-memory
.claude-decisions
docs/phases/
docs/specs/
PROJECT-STATUS.md
19 changes: 4 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1.6
# ---- Builder stage ----
# Compiles the React frontend and the Rust binary with the frontend embedded.
FROM rust:bookworm AS builder
Expand All @@ -22,20 +21,15 @@ WORKDIR /build
# 1. Fetch and cache Rust dependencies.
# cargo fetch needs a valid target, so we create stubs that get replaced later.
COPY Cargo.toml Cargo.lock ./
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/build/target \
mkdir src && echo "fn main() {}" > src/main.rs && touch src/lib.rs \
RUN mkdir src && echo "fn main() {}" > src/main.rs && touch src/lib.rs \
&& cargo build --release \
&& rm -rf src

# 2. Build the frontend.
COPY interface/package.json interface/
RUN --mount=type=cache,target=/root/.bun/install/cache \
cd interface && bun install
RUN cd interface && bun install
COPY interface/ interface/
RUN --mount=type=cache,target=/root/.bun/install/cache \
cd interface && bun run build
RUN cd interface && bun run build

# 3. Copy source and compile the real binary.
# build.rs runs the frontend build (already done above, node_modules present).
Expand All @@ -45,10 +39,7 @@ COPY build.rs ./
COPY prompts/ prompts/
COPY migrations/ migrations/
COPY src/ src/
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/build/target \
SPACEBOT_SKIP_FRONTEND_BUILD=1 cargo build --release \
RUN SPACEBOT_SKIP_FRONTEND_BUILD=1 cargo build --release \
&& mv /build/target/release/spacebot /usr/local/bin/spacebot \
&& cargo clean -p spacebot --release --target-dir /build/target

Expand All @@ -71,8 +62,6 @@ ENV SPACEBOT_DIR=/data
ENV SPACEBOT_DEPLOYMENT=docker
EXPOSE 19898 18789

VOLUME /data

HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -f http://localhost:19898/api/health || exit 1

Expand Down
9 changes: 9 additions & 0 deletions src/api/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ const MODELS_CACHE_TTL: std::time::Duration = std::time::Duration::from_secs(360
/// Models known to work with Spacebot's current voice transcription path
/// (OpenAI-compatible `/v1/chat/completions` with `input_audio`).
const KNOWN_VOICE_TRANSCRIPTION_MODELS: &[&str] = &[
// Native Gemini API
"gemini/gemini-2.0-flash",
"gemini/gemini-2.5-flash",
"gemini/gemini-2.5-flash-lite",
"gemini/gemini-2.5-pro",
"gemini/gemini-3-flash-preview",
"gemini/gemini-3-pro-preview",
"gemini/gemini-3.1-pro-preview",
// Via OpenRouter
"openrouter/google/gemini-2.0-flash-001",
"openrouter/google/gemini-2.5-flash",
"openrouter/google/gemini-2.5-flash-lite",
Expand Down
1 change: 1 addition & 0 deletions src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use super::{
};

use axum::Json;

use axum::Router;
use axum::extract::{DefaultBodyLimit, Request, State};
use axum::http::{StatusCode, Uri, header};
Expand Down
9 changes: 7 additions & 2 deletions src/llm/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,21 @@ pub fn defaults_for_provider(provider: &str) -> RoutingConfig {
}
}
"gemini" => {
let channel: String = "gemini/gemini-2.5-flash".into();
let channel: String = "gemini/gemini-2.5-pro".into();
let worker: String = "gemini/gemini-2.5-flash".into();
let lite: String = "gemini/gemini-2.5-flash-lite".into();
RoutingConfig {
channel: channel.clone(),
branch: channel.clone(),
worker: worker.clone(),
compactor: worker.clone(),
cortex: worker.clone(),
voice: String::new(),
task_overrides: HashMap::from([("coding".into(), channel.clone())]),
fallbacks: HashMap::new(),
fallbacks: HashMap::from([
(channel, vec![worker.clone()]),
(worker, vec![lite]),
]),
rate_limit_cooldown_secs: 60,
..RoutingConfig::default()
}
Expand Down
1 change: 1 addition & 0 deletions src/tools/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! via headless Chrome using chromiumoxide. Uses an accessibility-tree based
//! ref system for LLM-friendly element addressing.


use crate::config::BrowserConfig;

use chromiumoxide::browser::{Browser, BrowserConfig as ChromeConfig};
Expand Down
Loading