feat(backend,frontend): lot utilisateur #310 #311 #312 #313 — horodatage conversation, stop agent robuste, préférence terminal par défaut, paramètres projet (QA verte)
- #310: horodatage de tous les messages et événements de conversation visibles — composant partagé EntryTimestamp, timestamps propagés dans le transcript chat, les annonces inter-agent et le viewer de conversation, normalisation côté domain/adapters (conversation_log, paginate). - #311: stop d'agent robuste pour PTY non monté, sessions headless et CLI custom — lifecycle/orchestrator durcis, ponts chat app-tauri/web-server alignés, arrêt fiable sans session orpheline. - #312: préférence globale d'interface terminal par défaut — nouveau store settings (domain/application/infrastructure + tests), DTO et commandes backend, adapter frontend userSettings, panneau TerminalSettings dans les paramètres globaux. - #313: Paramètres du projet — contexte de projet éditable et couleur de thème par projet (ProjectSettingsPanel + projectTheme), teinte des onglets projet, persistance via DTO projet. QA verte (GO QA sur feature/batch-310-311-312-313-chat-stop-prefs-theme) — vérifications Git: git diff --cached --check OK; staging borné à crates/ et frontend/ (74 fichiers, +2105/-531), commit unique de lot conforme à la convention des lots (précédents batch-151/158/159, batch-210/211/212) car les fichiers partagés (dto.rs, commands.rs, CustomAgentChatView) entrelacent les 4 tickets. fichiers .ideai/* (agents/test.md, chat-drafts.json, system-permissions.json, tickets/counter.json, tickets/index.json, tickets/308-313/), attachments/ et scripts/ hors périmètre et préservés en worktree ; aucun push. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -19,6 +19,7 @@ use domain::ports::{
|
||||
FileSystem, FsError, IdGenerator, LocalPath, MemoryQuery, MemoryRecall, PermissionStore,
|
||||
PreparedContext, ProfileStore, ProjectStore, PtyPort, RemotePath, SecretStore, SessionPlan,
|
||||
SkillStore, SpawnSpec, StructuredProviderLaunchPolicy, SystemPermissionStore,
|
||||
UserSettingsStore,
|
||||
};
|
||||
use domain::profile::{
|
||||
resolve_effort, EffortSelection, McpConfigStrategy, OpenCodeProviderConfig, StructuredAdapter,
|
||||
@ -27,12 +28,12 @@ use domain::profile::{
|
||||
use domain::sandbox::{compile_sandbox_plan, PathAccess, PathGrant, SandboxContext, SandboxPlan};
|
||||
use domain::{
|
||||
bound_handoff_summary, Agent, AgentId, AgentManifest, AgentOrigin, AgentProfile,
|
||||
ContextInjection, ConversationId, ConversationParty, DomainEvent, EffectivePermissions,
|
||||
Handoff, HandoffStore, ManagedTempKind, ManifestEntry, MarkdownDoc, MemoryIndexEntry,
|
||||
MemoryType, NetworkPolicy, NodeId, OrchestrationCapabilitySnapshot, PermissionProjector,
|
||||
PluginMcpServerSpec, ProfileId, Project, ProjectPath, ProjectedFile, ProjectionContext,
|
||||
ProjectorKey, ProviderSessionStore, PtySize, SessionId, SessionKind, SessionStatus, SkillKind,
|
||||
TerminalSession, HANDOFF_SUMMARY_MAX_CHARS,
|
||||
ContextInjection, ConversationId, ConversationParty, DefaultAgentTerminalInterface,
|
||||
DomainEvent, EffectivePermissions, Handoff, HandoffStore, ManagedTempKind, ManifestEntry,
|
||||
MarkdownDoc, MemoryIndexEntry, MemoryType, NetworkPolicy, NodeId,
|
||||
OrchestrationCapabilitySnapshot, PermissionProjector, PluginMcpServerSpec, ProfileId, Project,
|
||||
ProjectPath, ProjectedFile, ProjectionContext, ProjectorKey, ProviderSessionStore, PtySize,
|
||||
SessionId, SessionKind, SessionStatus, SkillKind, TerminalSession, HANDOFF_SUMMARY_MAX_CHARS,
|
||||
};
|
||||
|
||||
use domain::live_state::WorkStatus;
|
||||
@ -1123,6 +1124,7 @@ impl ChangeAgentProfile {
|
||||
mcp_runtime: None,
|
||||
allow_structured_alongside_pty: false,
|
||||
require_structured: false,
|
||||
terminal_interface: None,
|
||||
fresh_start: false,
|
||||
managed_temp_exposure: ManagedTempExposureRequest::default(),
|
||||
})
|
||||
@ -1310,6 +1312,8 @@ pub struct LaunchAgentInput {
|
||||
///
|
||||
/// Historical callers leave this `false`, preserving the PTY launch contract.
|
||||
pub require_structured: bool,
|
||||
/// Explicit human terminal interface. `None` lets the global preference apply.
|
||||
pub terminal_interface: Option<DefaultAgentTerminalInterface>,
|
||||
/// Cold restart request: ignore the cell's previous conversation id and create
|
||||
/// a new provider/CLI conversation for this activation.
|
||||
pub fresh_start: bool,
|
||||
@ -1803,6 +1807,8 @@ pub struct LaunchAgent {
|
||||
/// Optional for legacy tests/callers; runtime composition wires the shared
|
||||
/// project-plugin resolver used by the capability assignment use cases.
|
||||
plugin_mcp: Option<Arc<ProjectPluginResolver>>,
|
||||
/// Machine-local preference source, wired only on the human launcher.
|
||||
user_settings: Option<Arc<dyn UserSettingsStore>>,
|
||||
/// Explicit intent for structured profiles when structured ports are absent.
|
||||
structured_routing_mode: StructuredRoutingMode,
|
||||
}
|
||||
@ -1855,6 +1861,7 @@ impl LaunchAgent {
|
||||
managed_temp_allocator: None,
|
||||
managed_temp_releaser: None,
|
||||
plugin_mcp: None,
|
||||
user_settings: None,
|
||||
structured_routing_mode: StructuredRoutingMode::HumanPtyFallback,
|
||||
}
|
||||
}
|
||||
@ -1866,6 +1873,13 @@ impl LaunchAgent {
|
||||
self
|
||||
}
|
||||
|
||||
/// Wires machine-local preferences for human-facing launches.
|
||||
#[must_use]
|
||||
pub fn with_user_settings(mut self, settings: Arc<dyn UserSettingsStore>) -> Self {
|
||||
self.user_settings = Some(settings);
|
||||
self
|
||||
}
|
||||
|
||||
/// Replaces the default native-skill resolver with the shared effective
|
||||
/// resolver used by runtime context injection and `idea_skill_read`.
|
||||
#[must_use]
|
||||
@ -2279,7 +2293,16 @@ impl LaunchAgent {
|
||||
input.agent_id, profile.id
|
||||
)));
|
||||
}
|
||||
let preferred_interface = match input.terminal_interface {
|
||||
some @ Some(_) => some,
|
||||
None => match &self.user_settings {
|
||||
Some(settings) => settings.load().await?.default_agent_terminal_interface,
|
||||
None => None,
|
||||
},
|
||||
};
|
||||
let wants_structured = input.require_structured
|
||||
|| preferred_interface == Some(DefaultAgentTerminalInterface::IdeaCli)
|
||||
&& profile.structured_adapter.is_some()
|
||||
|| matches!(
|
||||
self.structured_routing_mode,
|
||||
StructuredRoutingMode::RequireStructured
|
||||
|
||||
Reference in New Issue
Block a user