mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 21:08:17 +00:00
* refactor: declare the chat context contract
Replace the inferred ReturnType<typeof useChatHelpers> context type with an
explicit ChatContract grouped by responsibility, and move the added-chat
context shape to AddedChatContract. useChatHelpers and useAddedResponse
annotate their memoized value with the contract, and contract.check.ts
asserts two-way equality against the hooks each member is forwarded from.
* test: cover the chat context behaviors with e2e scenarios
* refactor: derive newConversation options from NewConversationParams
useNewConvo now takes the contract's NewConversationOptions instead of
restating the shared params inline, so there is one definition.
* test: skip the added pane scenario where the control is hidden
* refactor: type contract setters as React dispatchers
Keep the chat contract free of Recoil types, and tighten the regenerate
and stop scenarios to assert the regenerated sibling's content and that
the stopped reply stays partial after reload.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| sw | ||
| test | ||
| babel.config.cjs | ||
| check_updates.sh | ||
| index.html | ||
| jest.config.cjs | ||
| jest.resolver.cjs | ||
| nginx.conf | ||
| package.json | ||
| postcss.config.cjs | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
| vite.config.ts | ||