feat (ui): chat reply UI with ACP (last part) (#9857)
This commit is contained in:
@@ -15,8 +15,7 @@ import { AppEvents } from '../../constants/events';
|
||||
import { Goose } from '../icons/Goose';
|
||||
import { InlineEditText } from '../common/InlineEditText';
|
||||
import { SessionIndicators } from '../SessionIndicators';
|
||||
import { updateSessionName } from '../../api';
|
||||
import type { SessionListItem } from '../../acp/sessions';
|
||||
import { acpRenameSession, type SessionListItem } from '../../acp/sessions';
|
||||
import { cn } from '../../utils';
|
||||
import { defineMessages, useIntl } from '../../i18n';
|
||||
|
||||
@@ -102,10 +101,7 @@ const SessionRow: React.FC<SessionRowProps> = ({ session, active, status, onClic
|
||||
<InlineEditText
|
||||
value={session.name}
|
||||
onSave={async (newName) => {
|
||||
await updateSessionName({
|
||||
path: { session_id: session.id },
|
||||
body: { name: newName },
|
||||
});
|
||||
await acpRenameSession(session.id, newName);
|
||||
window.dispatchEvent(
|
||||
new CustomEvent(AppEvents.SESSION_RENAMED, {
|
||||
detail: { sessionId: session.id, newName, userInitiated: true },
|
||||
@@ -143,13 +139,8 @@ export const Navigation: React.FC<{ className?: string }> = ({ className }) => {
|
||||
|
||||
const isActive = useCallback((path: string) => location.pathname === path, [location.pathname]);
|
||||
|
||||
const {
|
||||
recentSessions,
|
||||
activeSessionId,
|
||||
fetchSessions,
|
||||
handleNavClick,
|
||||
handleSessionClick,
|
||||
} = useNavigationSessions();
|
||||
const { recentSessions, activeSessionId, fetchSessions, handleNavClick, handleSessionClick } =
|
||||
useNavigationSessions();
|
||||
|
||||
const [sessionStatuses, setSessionStatuses] = useState<Map<string, SessionStatus>>(new Map());
|
||||
|
||||
@@ -205,10 +196,7 @@ export const Navigation: React.FC<{ className?: string }> = ({ className }) => {
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.15 }}
|
||||
className={cn(
|
||||
'bg-background-primary outline-none flex flex-col h-full',
|
||||
className
|
||||
)}
|
||||
className={cn('bg-background-primary outline-none flex flex-col h-full', className)}
|
||||
>
|
||||
{/* Header: logo + collapse button. Top padding clears the macOS traffic lights. */}
|
||||
<div className="flex items-center justify-between px-4 pt-[34px] pb-2 no-drag">
|
||||
|
||||
Reference in New Issue
Block a user