Skip to content

Commit

Permalink
Couple bug fixes (#401)
Browse files Browse the repository at this point in the history
* Normalize green for little squares and text in brackets

* Take away the review/undo menu on new user message
  • Loading branch information
nichochar authored Oct 21, 2024
1 parent 1b96568 commit 02e2500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/web/src/components/apps/diff-stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { calculateSquares } from './lib/diff';
export function DiffStats(props: { additions: number; deletions: number; className?: string }) {
return (
<div className={cn('flex items-center gap-2', props.className)}>
<span className="text-green-500">-{props.additions}</span>
<span className="text-red-400">+{props.deletions}</span>
<span className="text-green-500">+{props.additions}</span>
<span className="text-red-400">-{props.deletions}</span>
</div>
);
}
Expand All @@ -21,7 +21,7 @@ export function DiffSquares(props: { additions: number; deletions: number; class
className={cn('w-3 h-3 rounded-sm', {
'bg-border': square === 0,
'bg-red-400': square === -1,
'bg-green-400': square === 1,
'bg-green-500': square === 1,
})}
/>
))}
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ export function ChatPanel(props: PropsType): React.JSX.Element {
const handleSubmit = async (query: string) => {
const planId = randomid();
setIsLoading(true);
setFileDiffs([]);
const userMessage = { type: 'user', message: query, planId } as UserMessageType;
setHistory((prevHistory) => [...prevHistory, userMessage]);
appendToHistory(app.id, userMessage);
Expand Down

0 comments on commit 02e2500

Please sign in to comment.