feat(memory): config embedders (LOT C2) + suggestion contextuelle (LOT C3) + contexte projet partagé

- 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>
This commit is contained in:
2026-06-09 09:24:51 +02:00
parent 32398827fb
commit 785e9935fd
118 changed files with 5793 additions and 866 deletions

View File

@ -5,8 +5,8 @@
use app_tauri_lib::dto::{
parse_layout_id, CreateLayoutRequestDto, CreateLayoutResultDto, DeleteLayoutRequestDto,
DeleteLayoutResultDto, LayoutInfoDto, LayoutOperationDto, ListLayoutsDto, RenameLayoutRequestDto,
SetActiveLayoutRequestDto,
DeleteLayoutResultDto, LayoutInfoDto, LayoutOperationDto, ListLayoutsDto,
RenameLayoutRequestDto, SetActiveLayoutRequestDto,
};
use application::{
CreateLayoutOutput, DeleteLayoutOutput, LayoutInfo, LayoutKind, ListLayoutsOutput,
@ -63,8 +63,16 @@ fn layout_info_dto_git_graph_kind() {
fn list_layouts_dto_from_output() {
let out = ListLayoutsOutput {
layouts: vec![
LayoutInfo { id: lid(1), name: "Default".to_owned(), kind: LayoutKind::Terminal },
LayoutInfo { id: lid(2), name: "Backend".to_owned(), kind: LayoutKind::GitGraph },
LayoutInfo {
id: lid(1),
name: "Default".to_owned(),
kind: LayoutKind::Terminal,
},
LayoutInfo {
id: lid(2),
name: "Backend".to_owned(),
kind: LayoutKind::GitGraph,
},
],
active_id: lid(1),
};
@ -204,7 +212,10 @@ fn set_cell_agent_op_deserialises_with_agent() {
let dto: LayoutOperationDto = serde_json::from_value(raw).unwrap();
let op = dto.into_operation().unwrap();
match op {
application::LayoutOperation::SetCellAgent { target: t, agent: a } => {
application::LayoutOperation::SetCellAgent {
target: t,
agent: a,
} => {
assert_eq!(t, target);
assert_eq!(a, Some(agent));
}
@ -223,7 +234,10 @@ fn set_cell_agent_op_deserialises_with_null_agent() {
let dto: LayoutOperationDto = serde_json::from_value(raw).unwrap();
let op = dto.into_operation().unwrap();
match op {
application::LayoutOperation::SetCellAgent { target: t, agent: None } => {
application::LayoutOperation::SetCellAgent {
target: t,
agent: None,
} => {
assert_eq!(t, target);
}
_ => panic!("expected SetCellAgent with None agent"),