(UI - View SpendLogs Table) (#7842)

* litellm log messages / responses

* add messages/response to schema.prisma

* add support for logging messages / responses in DB

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* ui_view_spend_logs endpoint

* add tanstack and moment

* add uiSpendLogsCall

* ui view logs table

* ui view spendLogs table

* ui_view_spend_logs

* fix code quality

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* test_spend_logs_payload_with_prompts_enabled

* test_spend_logs_payload_with_prompts_enabled

* ui view spend logs

* minor ui fix

* ui - update leftnav

* ui - clean up ui

* fix leftnav

* ui fix navbar

* ui fix moving chat ui tab
This commit is contained in:
Ishaan Jaff 2025-01-17 18:53:45 -08:00 committed by GitHub
parent a99deb6d0a
commit d3c2f4331a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 795 additions and 89 deletions

View file

@ -145,7 +145,13 @@ const ChatUI: React.FC<ChatUIProps> = ({
useEffect(() => {
// Scroll to the bottom of the chat whenever chatHistory updates
if (chatEndRef.current) {
chatEndRef.current.scrollIntoView({ behavior: "smooth" });
// Add a small delay to ensure content is rendered
setTimeout(() => {
chatEndRef.current?.scrollIntoView({
behavior: "smooth",
block: "end" // Keep the scroll position at the end
});
}, 100);
}
}, [chatHistory]);
@ -359,7 +365,7 @@ const ChatUI: React.FC<ChatUIProps> = ({
))}
<TableRow>
<TableCell>
<div ref={chatEndRef} />
<div ref={chatEndRef} style={{ height: "1px" }} />
</TableCell>
</TableRow>
</TableBody>