remove username in chat items

This commit is contained in:
Red Adaya 2024-04-29 15:19:43 +08:00
parent 4d05ef9998
commit 498f91d7fe
3 changed files with 7 additions and 11 deletions

View File

@ -24,7 +24,7 @@
}
}
.content {
> .content {
flex-flow: column nowrap;
flex: 1;
padding: 0 15px;
@ -46,6 +46,7 @@
.chat-msg {
margin-top: calc(var(--termpad) * 2);
margin-bottom: calc(var(--termpad) * 2);
display: flex;
.chat-msg-header {
display: flex;

View File

@ -200,26 +200,24 @@ class AIChat extends React.Component<{}, {}> {
const senderClassName = chatItem.isassistantresponse ? "chat-msg-assistant" : "chat-msg-user";
const msgClassName = "chat-msg " + senderClassName;
let innerHTML: React.JSX.Element = (
<div className="chat-item">
<>
<div className="chat-msg-header">
<i className="fa-sharp fa-solid fa-user"></i>
<div className="chat-username">You</div>
</div>
<div className="msg-text">{chatItem.userquery}</div>
</div>
</>
);
if (chatItem.isassistantresponse) {
if (chatItem.assistantresponse.error != null && chatItem.assistantresponse.error != "") {
innerHTML = this.renderError(chatItem.assistantresponse.error);
} else {
innerHTML = (
<span>
<>
<div className="chat-msg-header">
<i className="fa-sharp fa-solid fa-sparkles"></i>
<div className="chat-username">AI Assistant</div>
</div>
<Markdown text={chatItem.assistantresponse.message} codeSelect />
</span>
</>
);
}
}
@ -237,9 +235,7 @@ class AIChat extends React.Component<{}, {}> {
const renderKeybindings = GlobalModel.inputModel.shouldRenderAuxViewKeybindings(appconst.InputAuxView_AIChat);
return (
<div className="sidebar-aichat">
<If condition={renderKeybindings}>
<AIChatKeybindings AIChatObject={this}></AIChatKeybindings>
</If>
<AIChatKeybindings AIChatObject={this}></AIChatKeybindings>
<div className="titlebar">
<div className="title-string">Wave AI</div>
</div>

View File

@ -33,7 +33,6 @@
flex-direction: row;
padding: 5px 10px;
gap: 5px;
border-bottom: 1px solid var(--app-border-color);
.icon-container {
padding: 2px;