LibreChat/client/test/inertSteerHost.ts
Marco Beretta e714aba067
⏳ refactor: Render the Pending Turn and Steers From @librechat/chat by Default (#18134)
- refactor: Render Pending Turn and Steers from the Package
- refactor: Keep Package Pending Rows Inert Without a Steer Host
- fix: Read the Host Thread Mode on Every Render
- fix: Point the Hosts Guard at the Messages Loader
- fix: Follow the Moved Pending Rows in the Guard and Lazy Chunk Specs
- fix: Ship Message Body Typography With the Shared Theme Styles
- fix: Keep the App Message Typography Cascade With the Shared Styles
2026-11-14 17:01:27 +01:00

34 lines
1.3 KiB
TypeScript

import type { SteerHost } from '@librechat/chat/react';
/** A steer host whose transport does nothing, for specs that mount the package list
* outside the app shell. */
export const inertSteerHost: SteerHost = {
useSteerMessage: () => () => undefined,
useSteerMessageAsync: () => async () => ({
status: 'queued',
steerId: 'steer-1',
position: 0,
conversationId: 'convo-1',
}),
useCancelSteer: () => async () => ({ removed: true }),
useArmSteer: () => async () => ({ armed: true }),
useMarkFilesUsage: () => () => undefined,
useEnqueueQueuedTurn: () => () => undefined,
useCancelQueuedTurn: () => async () => {
throw new Error('not queued');
},
useQueuedTurns: () => undefined,
useQueuedTurnCache: () => ({ read: () => ({}), subscribe: () => () => undefined }),
useFetchStreamStatus: () => async () => ({ active: false }),
useRouteConversationId: () => undefined,
useCodeApprovalInputs: () => ({ conversation: null, reachable: { agents: [], complete: true } }),
useLocalize: () => (key) => key,
useNotify: () => () => undefined,
useFileMap: () => undefined,
useClearFilesToDelete: () => () => undefined,
useSettings: () => ({
duringRunDefaultAction: 'steer',
setDuringRunDefaultAction: () => undefined,
getPaneConversations: () => [],
}),
};