feat: add main features
Agents for developpement added + frontend add + backend added. Git viewer created + agent and template creator + layout and project creator
This commit is contained in:
36
crates/application/src/layout/mod.rs
Normal file
36
crates/application/src/layout/mod.rs
Normal file
@ -0,0 +1,36 @@
|
||||
//! 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 store;
|
||||
mod usecases;
|
||||
|
||||
pub use management::{
|
||||
CreateLayout, CreateLayoutInput, CreateLayoutOutput, DeleteLayout, DeleteLayoutInput,
|
||||
DeleteLayoutOutput, LayoutInfo, ListLayouts, ListLayoutsInput, ListLayoutsOutput, RenameLayout,
|
||||
RenameLayoutInput, SetActiveLayout, SetActiveLayoutInput,
|
||||
};
|
||||
pub use store::{LayoutKind, LayoutsDoc, NamedLayout, LAYOUTS_FILE};
|
||||
pub use usecases::{
|
||||
LayoutOperation, LoadLayout, LoadLayoutInput, LoadLayoutOutput, MutateLayout,
|
||||
MutateLayoutInput, MutateLayoutOutput,
|
||||
};
|
||||
Reference in New Issue
Block a user