Files
openchamber/packages/ui/src/components/chat/StatusRowContainer.tsx
T
Bohdan Triapitsyn 717854d06b refactor: remove aborted status banner from chat UI
Removes the transient aborted banner from the composer status area
Simplifies status row rendering to focus on working state and pending changes
Cleans up unused abort-status localization strings
2026-08-26 19:50:07 +03:00

44 lines
1.6 KiB
TypeScript

import React from 'react';
import { useAssistantStatus } from '@/hooks/useAssistantStatus';
import { useConfigStore } from '@/stores/useConfigStore';
import { getProviderModelDisplayName } from '@/lib/modelDisplay';
import { StatusRow } from './StatusRow';
/**
* Status row wrapper.
* Uses the dedicated assistant status hook so the row keeps accurate live activity
* labels while still limiting subscriptions to the active assistant message.
*/
export const StatusRowContainer: React.FC = React.memo(() => {
const { activeModel, working } = useAssistantStatus();
const currentAgentName = useConfigStore((state) => state.currentAgentName);
const providers = useConfigStore((state) => state.providers);
const modelDisplayName = React.useMemo(() => {
if (!activeModel) {
return null;
}
const provider = providers.length > 0
? providers.find((candidate) => candidate.id === activeModel.providerId)
: undefined;
return getProviderModelDisplayName(provider, activeModel.modelId) || null;
}, [activeModel, providers]);
return (
<StatusRow
isWorking={working.isWorking}
statusText={working.statusText}
isGenericStatus={working.isGenericStatus}
isWaitingForPermission={working.isWaitingForPermission}
abortActive={working.abortActive}
retryInfo={working.retryInfo}
agentName={currentAgentName}
modelName={modelDisplayName}
providerId={activeModel?.providerId ?? null}
/>
);
});
StatusRowContainer.displayName = 'StatusRowContainer';