Skip to content

Commit 1551b66

Browse files
committed
Refine response preview layout and clarify tokens per second status display
1 parent 0674744 commit 1551b66

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎packages/ui/src/components/editor/panel/ResponsePreview/ResponsePreview.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
flex-direction: column;
111111
gap: 8px;
112112
margin: 0 12px;
113-
padding: 10px 12px;
113+
padding: 6px 8px 8px 8px;
114114
border-radius: 6px;
115115
background: var(--cwc-bg-tertiary);
116116

‎packages/ui/src/components/editor/panel/ResponsePreview/ResponsePreview.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const ResponsePreview: FC<Props> = (props) => {
131131
const progress = file.apply_progress ?? 0
132132
const tps = file.apply_tokens_per_second
133133
let text = `${progress}%`
134-
if (tps) text += ` (${tps} t/s)`
134+
if (tps) text += ` (${tps} tokens/s)`
135135
return text
136136
}
137137
if (file.apply_status == 'done') return 'Done'

‎packages/ui/src/components/editor/panel/ResponsePreview/components/FileItem/FileItem.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,13 @@ export const FileItem: FC<Props> = (props) => {
6868
const progress = props.file.apply_progress ?? 0
6969
const tps = props.file.apply_tokens_per_second
7070
status_text = `${progress}%`
71-
if (tps) status_text += ` (${tps} t/s)`
71+
if (tps) status_text += ` (${tps} tokens/s)`
7272
} else if (props.file.apply_status == 'done') status_text = 'Done'
7373

7474
return (
7575
<div className={styles.progress}>
7676
<span>{status_text}</span>
77-
<span className="codicon codicon-loading codicon-modifier-spin" />
78-
{props.file.apply_status !== 'done' && (
77+
{props.file.apply_status != 'done' && (
7978
<div
8079
className={styles.progress__cancel}
8180
onClick={(e) => {
@@ -137,7 +136,7 @@ export const FileItem: FC<Props> = (props) => {
137136
<div className={styles['file__actions']}>
138137
{props.file.content !== undefined &&
139138
props.file.proposed_content !== undefined &&
140-
props.file.content !== props.file.proposed_content && (
139+
props.file.content != props.file.proposed_content && (
141140
<IconButton
142141
codicon_icon="discard"
143142
title="Discard user changes"

0 commit comments

Comments
 (0)