- 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.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
/**
|
|
* Tauri adapter for {@link ProjectGateway} (L2). Together with the sibling
|
|
* adapters this is the *only* place that calls `invoke()`; components reach it
|
|
* exclusively through the port.
|
|
*
|
|
* Commands and payload keys are camelCase, matching the backend DTO convention.
|
|
*/
|
|
|
|
import { invoke } from "@tauri-apps/api/core";
|
|
|
|
import type { Project } from "@/domain";
|
|
import type { ProjectGateway } from "@/ports";
|
|
|
|
export class TauriProjectGateway implements ProjectGateway {
|
|
listProjects(): Promise<Project[]> {
|
|
return invoke<Project[]>("list_projects");
|
|
}
|
|
|
|
createProject(name: string, root: string): Promise<Project> {
|
|
return invoke<Project>("create_project", { request: { name, root } });
|
|
}
|
|
|
|
openProject(projectId: string): Promise<Project> {
|
|
return invoke<Project>("open_project", { projectId });
|
|
}
|
|
|
|
async closeProject(projectId: string): Promise<void> {
|
|
await invoke("close_project", { projectId });
|
|
}
|
|
|
|
readProjectContext(projectId: string): Promise<string> {
|
|
return invoke<string>("read_project_context", { projectId });
|
|
}
|
|
|
|
async updateProjectContext(projectId: string, content: string): Promise<void> {
|
|
await invoke("update_project_context", {
|
|
request: { projectId, content },
|
|
});
|
|
}
|
|
}
|