mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-26 03:48:49 +02:00
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:
@@ -248,6 +248,13 @@ class Answer:
|
|||||||
if self.is_cancelled:
|
if self.is_cancelled:
|
||||||
return
|
return
|
||||||
yield cast(str, message.content)
|
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:
|
if not tool_call_chunk:
|
||||||
return # no tool call needed
|
return # no tool call needed
|
||||||
|
@@ -99,7 +99,6 @@ import ExceptionTraceModal from "@/components/modals/ExceptionTraceModal";
|
|||||||
|
|
||||||
import { SEARCH_TOOL_NAME } from "./tools/constants";
|
import { SEARCH_TOOL_NAME } from "./tools/constants";
|
||||||
import { useUser } from "@/components/user/UserProvider";
|
import { useUser } from "@/components/user/UserProvider";
|
||||||
import { Stop } from "@phosphor-icons/react";
|
|
||||||
|
|
||||||
const TEMP_USER_MESSAGE_ID = -1;
|
const TEMP_USER_MESSAGE_ID = -1;
|
||||||
const TEMP_ASSISTANT_MESSAGE_ID = -2;
|
const TEMP_ASSISTANT_MESSAGE_ID = -2;
|
||||||
|
@@ -364,7 +364,7 @@ export const AIMessage = ({
|
|||||||
<FileDisplay files={files || []} />
|
<FileDisplay files={files || []} />
|
||||||
|
|
||||||
{typeof content === "string" ? (
|
{typeof content === "string" ? (
|
||||||
<div className="overflow-x-visible w-full pr-2">
|
<div className="overflow-x-visible max-w-content-max">
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
key={messageId}
|
key={messageId}
|
||||||
className="prose max-w-full text-base"
|
className="prose max-w-full text-base"
|
||||||
|
@@ -230,3 +230,10 @@ form {
|
|||||||
gap: 1.2rem;
|
gap: 1.2rem;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ol > li > p,
|
||||||
|
ul > li > p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
display: inline; /* Make paragraphs inline to reduce vertical space */
|
||||||
|
}
|
||||||
|
@@ -65,6 +65,7 @@ module.exports = {
|
|||||||
maxWidth: {
|
maxWidth: {
|
||||||
"document-sidebar": "1000px",
|
"document-sidebar": "1000px",
|
||||||
"message-max": "850px",
|
"message-max": "850px",
|
||||||
|
"content-max": "725px",
|
||||||
"searchbar-max": "800px",
|
"searchbar-max": "800px",
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
|
Reference in New Issue
Block a user