web(coder UI): ChatInput migration + Thinking render + DiffPanel route fix
Bundles in-progress working-tree UI work not authored this session (CoderPane ChatInput migration, AgentComposerBar/CoderMessageList/tab-bar/sidebar/pane refinements, provider icons) with this session's changes to the same files: MessageBubble renders a collapsible 'Thinking' block from reasoning_text/reasoning_parts (surfacing ACP agent_thought_chunk + native reasoning), and the DiffPanel approve/reject calls are repointed to the real /api/coder/pending/:id/apply and /reject routes (the old /sessions/:id/pending/:id/approve|reject paths did not exist). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
useParams,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
import { ChevronRight, FolderTree, Menu } from 'lucide-react';
|
||||
import { ChevronRight, FolderTree, Menu, X } from 'lucide-react';
|
||||
import { api } from '@/api/client';
|
||||
import type { Project, Session as SessionType } from '@/api/types';
|
||||
import { sessionEvents } from '@/hooks/sessionEvents';
|
||||
@@ -61,6 +61,9 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
initializeFirstChatIfEmpty,
|
||||
validatePanes,
|
||||
} = panesHook;
|
||||
const [coderConnected, setCoderConnected] = useState<Record<string, boolean>>({});
|
||||
const activePane = panes[activePaneIdx];
|
||||
const activeIsCoder = activePane?.kind === 'coder';
|
||||
|
||||
const openChatInActivePane = useCallback(
|
||||
(chatId: string) => openChatInPane(activePaneIdxRef.current, chatId),
|
||||
@@ -402,6 +405,16 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
onAddPane={addPaneAndSwitch}
|
||||
disabled={panes.length >= MAX_PANES}
|
||||
/>
|
||||
{activeIsCoder && activePane && panes.length > 1 && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => removePane(activePaneIdx)}
|
||||
className="inline-flex items-center justify-center min-h-[44px] min-w-[44px] rounded-full bg-muted/40 hover:bg-muted/70 text-foreground shrink-0"
|
||||
aria-label="Close pane"
|
||||
>
|
||||
<X size={16} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
@@ -495,6 +508,11 @@ function SessionInner({ sessionId }: { sessionId: string }) {
|
||||
session={session}
|
||||
project={project}
|
||||
onAddPane={addPaneAndSwitch}
|
||||
onCoderConnectedChange={(paneId, connected) =>
|
||||
setCoderConnected((prev) =>
|
||||
prev[paneId] === connected ? prev : { ...prev, [paneId]: connected },
|
||||
)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user