- LOT C2 (§14.5.3) : use cases de configuration des embedders déclaratifs (List/Save/Delete + DescribeEmbedderEngines : modèles ONNX recommandés, environnement local détecté, stratégies compilées). UI EmbedderSettings. - LOT C3 (§14.5.5) : suggestion contextuelle best-effort à l'activation quand la mémoire dépasse le budget de recall sans embedder configuré (event EmbedderSuggested, anti-spam 1×/session, « ne plus demander »). - Contexte projet partagé .ideai/CONTEXT.md (model-agnostic) injecté à tous les agents/profils au lancement, avant la persona. UI ProjectContextPanel. Tests : backend workspace vert (0 échec) ; frontend 306/306. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
1.8 KiB
Rust
41 lines
1.8 KiB
Rust
//! Layout use cases (ARCHITECTURE §6, §7, L4).
|
|
//!
|
|
//! The terminal layout of a tab is a pure [`domain::LayoutTree`] (a recursive
|
|
//! spreadsheet-like grid). Its mutating operations (`split`/`merge`/`resize`/
|
|
//! `move`/`set_session`) are **pure functions** that live in the domain; this
|
|
//! module is the thin application orchestration that:
|
|
//!
|
|
//! - resolves the project root (via the [`domain::ports::ProjectStore`]),
|
|
//! - reads/writes the tree from/to `.ideai/layout.json` (via the
|
|
//! [`domain::ports::FileSystem`] port — so the layout *travels with the
|
|
//! project*, including on remote hosts, ARCHITECTURE §7.3, §9.1),
|
|
//! - publishes [`domain::DomainEvent::LayoutChanged`] on every mutation.
|
|
//!
|
|
//! ## Layout ↔ terminal session binding (L3 ↔ L4)
|
|
//!
|
|
//! A [`domain::LeafCell`] carries `Option<SessionId>`. When the UI opens a
|
|
//! terminal in a cell, it calls `OpenTerminal` (L3) — which mints the
|
|
//! `SessionId` — then records that id in the hosting leaf through the
|
|
//! `SetSession` layout operation here. The layout is the single source of truth
|
|
//! for *which cell hosts which session*; the live PTY handle stays in L3's
|
|
//! `TerminalSessions` registry, keyed by that same `SessionId`.
|
|
|
|
mod management;
|
|
mod snapshot;
|
|
mod store;
|
|
mod usecases;
|
|
|
|
pub use management::{
|
|
CreateLayout, CreateLayoutInput, CreateLayoutOutput, DeleteLayout, DeleteLayoutInput,
|
|
DeleteLayoutOutput, LayoutInfo, ListLayouts, ListLayoutsInput, ListLayoutsOutput, RenameLayout,
|
|
RenameLayoutInput, SetActiveLayout, SetActiveLayoutInput,
|
|
};
|
|
pub use snapshot::{
|
|
SnapshotRunningAgents, SnapshotRunningAgentsInput, SnapshotRunningAgentsOutput,
|
|
};
|
|
pub use store::{LayoutKind, LayoutsDoc, NamedLayout, LAYOUTS_FILE};
|
|
pub use usecases::{
|
|
LayoutOperation, LoadLayout, LoadLayoutInput, LoadLayoutOutput, MutateLayout,
|
|
MutateLayoutInput, MutateLayoutOutput,
|
|
};
|