-
Notifications
You must be signed in to change notification settings - Fork 236
add split view for switching chats #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,17 @@ import { | |||||
| isEditToolUseResult, | ||||||
| isBashToolUseResult, | ||||||
| } from "../utils/contentUtils"; | ||||||
| import { | ||||||
| Settings, | ||||||
| Wrench, | ||||||
| CheckCircle, | ||||||
| ClipboardList, | ||||||
| Brain, | ||||||
| Clock, | ||||||
| CheckCheck, | ||||||
| RotateCcw, | ||||||
| Loader, | ||||||
| } from "lucide-react"; | ||||||
|
|
||||||
| // ANSI escape sequence regex for cleaning hooks messages | ||||||
| const ANSI_REGEX = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g"); | ||||||
|
|
@@ -66,7 +77,7 @@ export function ChatMessageComponent({ message }: ChatMessageComponentProps) { | |||||
| }`} | ||||||
| /> | ||||||
| </div> | ||||||
| <pre className="whitespace-pre-wrap text-sm font-mono leading-relaxed"> | ||||||
| <pre className="whitespace-pre-wrap break-words overflow-x-auto text-sm font-mono leading-relaxed"> | ||||||
| {message.content} | ||||||
| </pre> | ||||||
| </MessageContainer> | ||||||
|
|
@@ -127,7 +138,7 @@ export function SystemMessageComponent({ | |||||
| label={getLabel()} | ||||||
| details={details} | ||||||
| badge={"subtype" in message ? message.subtype : undefined} | ||||||
| icon={<span className="bg-blue-400 dark:bg-blue-500">⚙</span>} | ||||||
| icon={<Settings className="w-4 h-4 text-white" />} | ||||||
| colorScheme={{ | ||||||
| header: "text-blue-800 dark:text-blue-300", | ||||||
| content: "text-blue-700 dark:text-blue-300", | ||||||
|
|
@@ -150,7 +161,7 @@ export function ToolMessageComponent({ message }: ToolMessageComponentProps) { | |||||
| > | ||||||
| <div className="text-xs font-semibold mb-2 opacity-90 text-emerald-700 dark:text-emerald-300 flex items-center gap-2"> | ||||||
| <div className="w-4 h-4 bg-emerald-500 dark:bg-emerald-600 rounded-full flex items-center justify-center text-white text-xs"> | ||||||
| 🔧 | ||||||
| <Wrench className="w-3 h-3" /> | ||||||
| </div> | ||||||
| {message.content} | ||||||
| </div> | ||||||
|
|
@@ -221,7 +232,7 @@ export function ToolResultMessageComponent({ | |||||
| label={message.toolName} | ||||||
| details={displayContent} | ||||||
| badge={message.toolName === "Edit" ? undefined : message.summary} | ||||||
| icon={<span className="bg-emerald-400 dark:bg-emerald-500">✓</span>} | ||||||
| icon={<CheckCircle className="w-4 h-4 text-white" />} | ||||||
| colorScheme={{ | ||||||
| header: "text-emerald-800 dark:text-emerald-300", | ||||||
| content: "text-emerald-700 dark:text-emerald-300", | ||||||
|
|
@@ -250,7 +261,7 @@ export function PlanMessageComponent({ message }: PlanMessageComponentProps) { | |||||
| <div className="mb-3 flex items-center justify-between gap-4"> | ||||||
| <div className="text-xs font-semibold opacity-90 text-blue-700 dark:text-blue-300 flex items-center gap-2"> | ||||||
| <div className="w-4 h-4 bg-blue-500 dark:bg-blue-600 rounded-full flex items-center justify-center text-white text-xs"> | ||||||
| 📋 | ||||||
| <ClipboardList className="w-3 h-3" /> | ||||||
| </div> | ||||||
| Ready to code? | ||||||
| </div> | ||||||
|
|
@@ -265,7 +276,7 @@ export function PlanMessageComponent({ message }: PlanMessageComponentProps) { | |||||
| Here is Claude's plan: | ||||||
| </p> | ||||||
| <div className="bg-blue-100/50 dark:bg-blue-800/30 border border-blue-200 dark:border-blue-700 rounded-lg p-3"> | ||||||
| <pre className="text-sm text-blue-900 dark:text-blue-100 whitespace-pre-wrap font-mono leading-relaxed"> | ||||||
| <pre className="text-sm text-blue-900 dark:text-blue-100 whitespace-pre-wrap break-words overflow-x-auto font-mono leading-relaxed"> | ||||||
|
||||||
| <pre className="text-sm text-blue-900 dark:text-blue-100 whitespace-pre-wrap break-words overflow-x-auto font-mono leading-relaxed"> | |
| <pre className="text-sm text-blue-900 dark:text-blue-100 whitespace-pre-wrap overflow-x-auto font-mono leading-relaxed"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
break-wordsandoverflow-x-autoclasses are redundant.break-wordstells text to break anywhere to prevent overflow, whileoverflow-x-autoadds a scrollbar when content overflows horizontally. These work against each other.If you want text to break, use only
break-words. If you want a scrollbar for code/preformatted text that shouldn't break, use onlyoverflow-x-auto. For most readable text in messages,break-wordsalone is appropriate.