From 62a1c9ab21218aac0edf32ceb4524242d0c8345b Mon Sep 17 00:00:00 2001 From: catlog22 Date: Fri, 6 Feb 2026 23:10:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9B=86=E6=88=90=20NativeSessionPanel?= =?UTF-8?q?=20=E5=88=B0=20HistoryPage=EF=BC=8C=E6=94=AF=E6=8C=81=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=8E=9F=E7=94=9FCLI=E4=BC=9A=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在历史记录页面中集成 NativeSessionPanel 组件,用户可通过 ConversationCard 的下拉菜单查看 Gemini/Codex/Qwen 原生会话详情。 --- ccw/frontend/src/pages/HistoryPage.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ccw/frontend/src/pages/HistoryPage.tsx b/ccw/frontend/src/pages/HistoryPage.tsx index b0587065..7cd3b0b1 100644 --- a/ccw/frontend/src/pages/HistoryPage.tsx +++ b/ccw/frontend/src/pages/HistoryPage.tsx @@ -18,6 +18,7 @@ import { cn } from '@/lib/utils'; import { useHistory } from '@/hooks/useHistory'; import { ConversationCard } from '@/components/shared/ConversationCard'; import { CliStreamPanel } from '@/components/shared/CliStreamPanel'; +import { NativeSessionPanel } from '@/components/shared/NativeSessionPanel'; import { Button } from '@/components/ui/Button'; import { Input } from '@/components/ui/Input'; import { @@ -50,6 +51,8 @@ export function HistoryPage() { const [deleteTarget, setDeleteTarget] = React.useState(null); const [selectedExecution, setSelectedExecution] = React.useState(null); const [isPanelOpen, setIsPanelOpen] = React.useState(false); + const [nativeExecutionId, setNativeExecutionId] = React.useState(null); + const [isNativePanelOpen, setIsNativePanelOpen] = React.useState(false); const { executions, @@ -88,6 +91,12 @@ export function HistoryPage() { setIsPanelOpen(true); }; + // View native session handler + const handleViewNative = (execution: CliExecution) => { + setNativeExecutionId(execution.id); + setIsNativePanelOpen(true); + }; + // Delete handlers const handleDeleteClick = (id: string) => { setDeleteType('single'); @@ -274,6 +283,7 @@ export function HistoryPage() { key={execution.id} execution={execution} onClick={handleCardClick} + onViewNative={handleViewNative} onDelete={handleDeleteClick} actionsDisabled={isDeleting} /> @@ -288,6 +298,13 @@ export function HistoryPage() { onOpenChange={setIsPanelOpen} /> + {/* Native Session Panel */} + + {/* Delete Confirmation Dialog */}