mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
Workspace: prop-drill to ChatMessage
This commit is contained in:
@@ -292,6 +292,7 @@ export function ChatMessageList(props: {
|
||||
<ChatMessageMemoOrNot
|
||||
key={'msg-' + message.id}
|
||||
message={message}
|
||||
workspaceContents={props.workspaceContents}
|
||||
// diffPreviousText={message === diffTargetMessage ? diffPrevText : undefined}
|
||||
fitScreen={props.fitScreen}
|
||||
hasInReferenceTo={composerHasInReferenceto}
|
||||
|
||||
@@ -88,6 +88,7 @@ export const ChatMessageMemo = React.memo(ChatMessage);
|
||||
*/
|
||||
export function ChatMessage(props: {
|
||||
message: DMessage,
|
||||
workspaceContents: WorkspaceContents | null,
|
||||
diffPreviousText?: string,
|
||||
fitScreen: boolean,
|
||||
hasInReferenceTo?: boolean;
|
||||
|
||||
@@ -121,6 +121,7 @@ export function LinkChatViewer(props: { conversation: DConversation, storedAt: D
|
||||
{filteredMessages.map((message, idx) =>
|
||||
<ChatMessageMemo
|
||||
key={'msg-' + message.id}
|
||||
workspaceContents={null /* shared chat - no workspace */}
|
||||
message={message}
|
||||
fitScreen={isMobile}
|
||||
isMobile={isMobile}
|
||||
|
||||
@@ -143,6 +143,7 @@ export function Fusion(props: {
|
||||
{!!fusion.outputDMessage && (
|
||||
<ChatMessageMemo
|
||||
message={fusion.outputDMessage}
|
||||
workspaceContents={null /* a single fusion, when done */}
|
||||
fitScreen={true}
|
||||
hideAvatar
|
||||
showUnsafeHtml={true}
|
||||
|
||||
@@ -80,6 +80,7 @@ export async function executeChatGenerate(_i: ChatGenerateInstruction, inputs: E
|
||||
inputs.updateInstructionComponent(
|
||||
<ChatMessage
|
||||
message={inputs.intermediateDMessage}
|
||||
workspaceContents={null /* this is a merge being generated, in progress */}
|
||||
fitScreen={true}
|
||||
hideAvatar
|
||||
adjustContentScaling={-1}
|
||||
|
||||
@@ -206,6 +206,7 @@ export function BeamRay(props: {
|
||||
{!!ray.message && (
|
||||
<ChatMessageMemo
|
||||
message={ray.message}
|
||||
workspaceContents={null /* a single ray being generated */}
|
||||
fitScreen={true}
|
||||
hideAvatar
|
||||
showUnsafeHtml={true}
|
||||
|
||||
@@ -89,6 +89,7 @@ export function BeamScatterInput(props: {
|
||||
<Box sx={BEAM_INVERT_BACKGROUND ? userMessageWrapperINVSx : userMessageWrapperSx}>
|
||||
<ChatMessageMemo
|
||||
message={lastHistoryMessage}
|
||||
workspaceContents={null /* User Message (last message in history) */}
|
||||
fitScreen={props.isMobile}
|
||||
isMobile={props.isMobile}
|
||||
adjustContentScaling={-1}
|
||||
|
||||
Reference in New Issue
Block a user