Skip to content

Commit

Permalink
feat: optimize animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hk-Gosuto committed Jan 8, 2025
1 parent c1d1caf commit 98b463b
Show file tree
Hide file tree
Showing 17 changed files with 2,371 additions and 100 deletions.
31 changes: 31 additions & 0 deletions app/components/chat.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -815,3 +815,34 @@
}
}
}

.chat-message-checkmark {
display: inline-block;
margin-right: 5px;
height: 12px;
width: 12px;
color: #13a10e;
fill: #13a10e;
user-select: none;
backface-visibility: hidden;
transform: translateZ(0px);
}

.chat-message-tools-status {
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
margin-top: 5px;
line-height: 1.5;
}

.chat-message-tools-name {
color: #aaa;
}

.chat-message-tools-details {
margin-left: 5px;
font-weight: bold;
color: #999;
}
24 changes: 24 additions & 0 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,30 @@ function _Chat() {
</div>
)}
</div>
{!isUser &&
message.toolMessages &&
message.toolMessages.map((tool, index) => (
<div
className={styles["chat-message-tools-status"]}
key={index}
>
<div
className={styles["chat-message-tools-name"]}
>
<CheckmarkIcon
className={styles["chat-message-checkmark"]}
/>
{tool.toolName}:
<code
className={
styles["chat-message-tools-details"]
}
>
{tool.toolInput}
</code>
</div>
</div>
))}
{message?.tools?.length == 0 && showTyping && (
<div className={styles["chat-message-status"]}>
{Locale.Chat.Typing}
Expand Down
1 change: 1 addition & 0 deletions app/components/openai-voice-visualizer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./openai-voice-visualizer";
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.openai-voice-visualizer {
width: 100%;
height: 100%;

canvas {
width: 100%;
height: 100%;
}
}
Loading

0 comments on commit 98b463b

Please sign in to comment.