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,7 +19,7 @@ import { useGateways } from "@/app/di";
|
||||
import { leaves } from "@/features/layout/layout";
|
||||
import { useLayout } from "@/features/layout/useLayout";
|
||||
import type { LayoutViewModel } from "@/features/layout/useLayout";
|
||||
import { Button, Panel, Spinner, cn } from "@/shared";
|
||||
import { Button, EntryTimestamp, Panel, Spinner, cn } from "@/shared";
|
||||
import { useProjectWorkState } from "./useProjectWorkState";
|
||||
|
||||
export interface ProjectWorkStatePanelProps {
|
||||
@ -307,7 +307,10 @@ function ConversationSummaryLine({
|
||||
<ul className="space-y-0.5">
|
||||
{(summary.recentTurns ?? []).map((turn) => (
|
||||
<li key={`${turn.atMs}-${turn.role}-${turn.textPreview}`}>
|
||||
<span className="font-medium text-content">{turn.role}:</span>{" "}
|
||||
<span className="inline-flex items-baseline gap-1">
|
||||
<span className="font-medium text-content">{turn.role}:</span>
|
||||
<EntryTimestamp atMs={turn.atMs} />
|
||||
</span>{" "}
|
||||
{turn.textPreview}
|
||||
</li>
|
||||
))}
|
||||
@ -659,7 +662,7 @@ function AgentRow({
|
||||
}
|
||||
|
||||
async function stop(): Promise<void> {
|
||||
if (!agent.live || !agentGateway?.stopLiveAgent) return;
|
||||
if (!agent.live || !agentGateway) return;
|
||||
const warning = currentTurn
|
||||
? " The current turn will be interrupted."
|
||||
: "";
|
||||
@ -667,10 +670,15 @@ function AgentRow({
|
||||
setActionBusy(true);
|
||||
setMessage(null);
|
||||
try {
|
||||
const stopped = await agentGateway.stopLiveAgent(projectId, agent.agentId);
|
||||
const stopped = await agentGateway.stopLiveAgent(
|
||||
projectId,
|
||||
agent.agentId,
|
||||
"Arrêt demandé depuis Travail",
|
||||
);
|
||||
if (visibleNodeIds.has(agent.live.nodeId)) {
|
||||
const leaf = visibleLeaves.find((candidate) => candidate.id === agent.live?.nodeId);
|
||||
if (!leaf?.session || leaf.session === stopped.sessionId) {
|
||||
const stoppedSessionIds = new Set(stopped.stopped.map((runtime) => runtime.sessionId));
|
||||
if (!leaf?.session || stoppedSessionIds.has(leaf.session) || stopped.alreadyStopped) {
|
||||
await layout.setSession(agent.live.nodeId, null);
|
||||
}
|
||||
}
|
||||
@ -763,7 +771,7 @@ function AgentRow({
|
||||
size="sm"
|
||||
variant="danger"
|
||||
loading={actionBusy}
|
||||
disabled={!agentGateway?.stopLiveAgent}
|
||||
disabled={!agentGateway}
|
||||
onClick={() => void stop()}
|
||||
>
|
||||
Stop
|
||||
|
||||
Reference in New Issue
Block a user