Skip to content

Commit eac84f7

Browse files
committed
Added more styling
1 parent 51dd753 commit eac84f7

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import McpToolRow from "../mcp/McpToolRow"
2424
import { highlightMentions } from "./TaskHeader"
2525
import { CheckpointSaved } from "./checkpoints/CheckpointSaved"
2626
import FollowUpSuggest from "./FollowUpSuggest"
27+
import { vscEditorBackground } from "../ui"
2728

2829
interface ChatRowProps {
2930
message: ClineMessage
@@ -646,14 +647,17 @@ export const ChatRowContent = ({
646647
return (
647648
<div
648649
style={{
649-
backgroundColor: "var(--vscode-badge-background)",
650+
backgroundColor: vscEditorBackground,
650651
color: "var(--vscode-badge-foreground)",
651-
borderRadius: "3px",
652+
borderRadius: "6px",
652653
padding: "9px",
653654
overflow: "hidden",
654655
whiteSpace: "pre-wrap",
655656
wordBreak: "break-word",
656657
overflowWrap: "anywhere",
658+
width: "75%",
659+
marginLeft: "auto",
660+
position: "relative",
657661
}}>
658662
<div
659663
style={{

webview-ui/src/components/chat/TaskHeader.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { useExtensionState } from "../../context/ExtensionStateContext"
1717
import Thumbnails from "../common/Thumbnails"
1818
import { normalizeApiConfiguration } from "../settings/ApiOptions"
1919
import { DeleteTaskDialog } from "../history/DeleteTaskDialog"
20+
import { vscBadgeBackground, vscEditorBackground, vscInputBackground } from "../ui"
2021

2122
interface TaskHeaderProps {
2223
task: ClineMessage
@@ -65,7 +66,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
6566
function without triggering re-renders or effect re-runs. This approach
6667
ensures that our event listener always has access to the most current state
6768
while minimizing performance overhead and potential memory leaks from
68-
multiple listener registrations.
69+
multiple listener registrations.
6970
7071
Sources
7172
- https://usehooks-ts.com/react-hook/use-event-listener
@@ -74,7 +75,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
7475
- https://stackoverflow.com/questions/55565444/how-to-register-event-with-useeffect-hooks
7576
7677
Before:
77-
78+
7879
const updateMaxHeight = useCallback(() => {
7980
if (isExpanded && textContainerRef.current) {
8081
const maxHeight = window.innerHeight * (3 / 5)
@@ -136,10 +137,10 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
136137
<div style={{ padding: "10px 13px 10px 13px" }}>
137138
<div
138139
style={{
139-
backgroundColor: "var(--vscode-badge-background)",
140+
backgroundColor: vscEditorBackground,
140141
color: "var(--vscode-badge-foreground)",
141-
borderRadius: "3px",
142-
padding: "9px 10px 9px 14px",
142+
borderRadius: "12px",
143+
padding: "12px",
143144
display: "flex",
144145
flexDirection: "column",
145146
gap: 6,

0 commit comments

Comments
 (0)