mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Drop user and bot icons to save space and add shade to user message (#1837)
This commit is contained in:
parent
09124e19e5
commit
feeea21127
1 changed files with 7 additions and 6 deletions
|
|
@ -10,7 +10,6 @@ import { processInlineCitations } from "@/LLMProviders/chainRunner/utils/citatio
|
|||
import { useSettingsValue } from "@/settings/model";
|
||||
import { ChatMessage } from "@/types/message";
|
||||
import { cleanMessageForCopy, insertIntoEditor } from "@/utils";
|
||||
import { Bot, User } from "lucide-react";
|
||||
import { App, Component, MarkdownRenderer, MarkdownView, TFile } from "obsidian";
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ReactDOM, { Root } from "react-dom/client";
|
||||
|
|
@ -644,14 +643,16 @@ const ChatSingleMessage: React.FC<ChatSingleMessageProps> = ({
|
|||
<div className="tw-my-1 tw-flex tw-w-full tw-flex-col">
|
||||
<div
|
||||
className={cn(
|
||||
"tw-group tw-mx-2 tw-flex tw-gap-2 tw-rounded-md tw-p-2",
|
||||
"tw-group tw-mx-2 tw-rounded-md tw-p-2",
|
||||
message.sender === USER_SENDER && "tw-border tw-border-solid tw-border-border"
|
||||
)}
|
||||
style={
|
||||
message.sender === USER_SENDER
|
||||
? { backgroundColor: "var(--background-modifier-hover)" }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<div className="tw-w-6 tw-shrink-0">
|
||||
{message.sender === USER_SENDER ? <User /> : <Bot />}
|
||||
</div>
|
||||
<div className="tw-flex tw-max-w-full tw-grow tw-flex-col tw-gap-2 tw-overflow-hidden">
|
||||
<div className="tw-flex tw-max-w-full tw-flex-col tw-gap-2 tw-overflow-hidden">
|
||||
{!isEditing && <MessageContext context={message.context} />}
|
||||
<div className="message-content">{renderMessageContent()}</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue