- #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>
81 lines
2.9 KiB
TypeScript
81 lines
2.9 KiB
TypeScript
/**
|
|
* `ViewPanelBody` — renders the body of a single View panel from its id and a
|
|
* project context, reusing the existing feature panels as-is.
|
|
*
|
|
* Shared (ticket #23) between the in-window placements of {@link ProjectsView}
|
|
* (docked/floating) and the detached {@link ViewWindow} (its own OS window), so
|
|
* a view looks and behaves the same wherever it is placed. The `"projects"`
|
|
* panel is intentionally **not** handled here — the projects manager is
|
|
* main-window chrome, never a detachable view.
|
|
*/
|
|
|
|
import type { ReactNode } from "react";
|
|
|
|
import { AgentsPanel } from "@/features/agents";
|
|
import { TemplatesPanel } from "@/features/templates";
|
|
import { SkillsPanel } from "@/features/skills";
|
|
import { MemoryPanel } from "@/features/memory";
|
|
import { EmbedderSettings } from "@/features/embedder";
|
|
import { McpPanel, PermissionsPanel } from "@/features/permissions";
|
|
import { ProjectWorkStatePanel } from "@/features/workstate";
|
|
import { TicketsView } from "@/features/tickets";
|
|
import { GitPanel } from "@/features/git";
|
|
import { ProjectContextPanel } from "./ProjectContextPanel";
|
|
import { ProjectSettingsPanel } from "./ProjectSettingsPanel";
|
|
import type { PanelId } from "./viewPlacement";
|
|
|
|
/** Panels that render a project-scoped view (everything except "projects"). */
|
|
export type ViewPanelId = Exclude<PanelId, "projects">;
|
|
|
|
export interface ViewPanelBodyProps {
|
|
panel: ViewPanelId;
|
|
projectId: string;
|
|
/** Project root — required by the agents panel (its cwd base). */
|
|
projectRoot: string;
|
|
/** Optional: open a conversation viewer (only wired inside the main window). */
|
|
onOpenConversation?: (conversationId: string) => void;
|
|
}
|
|
|
|
/** Renders the requested view panel for the given project. */
|
|
export function ViewPanelBody({
|
|
panel,
|
|
projectId,
|
|
projectRoot,
|
|
onOpenConversation,
|
|
}: ViewPanelBodyProps): ReactNode {
|
|
switch (panel) {
|
|
case "context":
|
|
return <ProjectContextPanel projectId={projectId} />;
|
|
case "projectSettings":
|
|
return <ProjectSettingsPanel projectId={projectId} />;
|
|
case "work":
|
|
return (
|
|
<ProjectWorkStatePanel
|
|
projectId={projectId}
|
|
onOpenConversation={onOpenConversation}
|
|
/>
|
|
);
|
|
case "tickets":
|
|
return <TicketsView projectId={projectId} />;
|
|
case "agents":
|
|
return <AgentsPanel projectId={projectId} projectRoot={projectRoot} />;
|
|
case "templates":
|
|
return <TemplatesPanel projectId={projectId} />;
|
|
case "skills":
|
|
return <SkillsPanel projectId={projectId} />;
|
|
case "mcp":
|
|
return <McpPanel projectId={projectId} />;
|
|
case "permissions":
|
|
return <PermissionsPanel projectId={projectId} />;
|
|
case "memory":
|
|
return (
|
|
<div className="flex flex-col gap-4">
|
|
<MemoryPanel projectId={projectId} />
|
|
<EmbedderSettings />
|
|
</div>
|
|
);
|
|
case "git":
|
|
return <GitPanel projectId={projectId} />;
|
|
}
|
|
}
|