Formatting nits (#2311)

* stream in all cases

* update code block

* code formatting nits

* proper ports

* proper ports

* remove unnecessary lines
This commit is contained in:
pablodanswer 2024-09-03 09:05:02 -07:00 committed by GitHub
parent a3b1b1db38
commit 5b1f3c8d4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 2 deletions

View File

@ -248,6 +248,13 @@ class Answer:
if self.is_cancelled:
return
yield cast(str, message.content)
if (
message.additional_kwargs.get("usage_metadata", {}).get("stop")
== "length"
):
yield StreamStopInfo(
stop_reason=StreamStopReason.CONTEXT_LENGTH
)
if not tool_call_chunk:
return # no tool call needed

View File

@ -99,7 +99,6 @@ import ExceptionTraceModal from "@/components/modals/ExceptionTraceModal";
import { SEARCH_TOOL_NAME } from "./tools/constants";
import { useUser } from "@/components/user/UserProvider";
import { Stop } from "@phosphor-icons/react";
const TEMP_USER_MESSAGE_ID = -1;
const TEMP_ASSISTANT_MESSAGE_ID = -2;

View File

@ -364,7 +364,7 @@ export const AIMessage = ({
<FileDisplay files={files || []} />
{typeof content === "string" ? (
<div className="overflow-x-visible w-full pr-2">
<div className="overflow-x-visible max-w-content-max">
<ReactMarkdown
key={messageId}
className="prose max-w-full text-base"

View File

@ -230,3 +230,10 @@ form {
gap: 1.2rem;
align-items: start;
}
ol > li > p,
ul > li > p {
margin-top: 0;
margin-bottom: 0;
display: inline; /* Make paragraphs inline to reduce vertical space */
}

View File

@ -65,6 +65,7 @@ module.exports = {
maxWidth: {
"document-sidebar": "1000px",
"message-max": "850px",
"content-max": "725px",
"searchbar-max": "800px",
},
colors: {