unused
This commit is contained in:
1 parent
e25264bc8d
commit
def996f40a
1 file changed
+8
-11
@@ -262,18 +262,15 @@ export default function ChatView() {
|
||||
// Auto-scroll on new messages
|
||||
const messageCount = activeThread?.messages.length ?? 0;
|
||||
const workLogCount = workLogEntries.length;
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: trigger on message count change
|
||||
useEffect(() => {
|
||||
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
}, [messageCount]);
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: auto-scroll while active work-log events stream in
|
||||
useEffect(() => {
|
||||
if (phase !== "running") return;
|
||||
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
}, [phase, workLogCount]);
|
||||
|
||||
// Auto-resize textarea
|
||||
// biome-ignore lint/correctness/useExhaustiveDependencies: trigger on prompt change
|
||||
useEffect(() => {
|
||||
const ta = textareaRef.current;
|
||||
if (!ta) return;
|
||||
@@ -505,7 +502,7 @@ export default function ChatView() {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col bg-[#0c0c0c]">
|
||||
{/* Top bar */}
|
||||
<header className="drag-region flex items-center justify-between border-b border-white/[0.08] px-5 pt-[28px] pb-3">
|
||||
<header className="drag-region flex items-center justify-between border-b border-white/8 px-5 pt-[28px] pb-3">
|
||||
<div className="flex items-center gap-3">
|
||||
<h2 className="text-sm font-medium text-[#e0e0e0]">
|
||||
{activeThread.title}
|
||||
@@ -760,7 +757,7 @@ export default function ChatView() {
|
||||
{/* Input bar */}
|
||||
<div className="px-5 pb-4 pt-2">
|
||||
<form onSubmit={onSend} className="mx-auto max-w-3xl">
|
||||
<div className="group rounded-[20px] border border-white/[0.08] bg-[#141416] transition-colors duration-200 focus-within:border-white/[0.16]">
|
||||
<div className="group rounded-[20px] border border-white/8 bg-[#141416] transition-colors duration-200 focus-within:border-white/16">
|
||||
{/* Textarea area */}
|
||||
<div className="px-4 pt-4 pb-2">
|
||||
<textarea
|
||||
@@ -784,7 +781,7 @@ export default function ChatView() {
|
||||
<div className="relative" ref={modelMenuRef}>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[13px] text-[#a0a0a0]/70 transition-colors duration-150 hover:bg-white/[0.06] hover:text-[#d0d0d0]"
|
||||
className="inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[13px] text-[#a0a0a0]/70 transition-colors duration-150 hover:bg-white/6 hover:text-[#d0d0d0]"
|
||||
onClick={() => setIsModelMenuOpen((open) => !open)}
|
||||
>
|
||||
<span className="max-w-[180px] truncate">{selectedModel}</span>
|
||||
@@ -806,7 +803,7 @@ export default function ChatView() {
|
||||
</svg>
|
||||
</button>
|
||||
{isModelMenuOpen && (
|
||||
<div className="absolute bottom-full left-0 z-20 mb-2 w-[320px] rounded-2xl border border-white/[0.1] bg-[#1b1b1d]/95 p-2 shadow-[0_16px_40px_rgba(0,0,0,0.55)] backdrop-blur">
|
||||
<div className="absolute bottom-full left-0 z-20 mb-2 w-[320px] rounded-2xl border border-white/10 bg-[#1b1b1d]/95 p-2 shadow-[0_16px_40px_rgba(0,0,0,0.55)] backdrop-blur">
|
||||
<p className="px-2 py-1 text-[11px] text-[#a0a0a0]/70">Select model</p>
|
||||
<div className="max-h-72 overflow-y-auto">
|
||||
{modelOptions.map((model) => {
|
||||
@@ -817,8 +814,8 @@ export default function ChatView() {
|
||||
type="button"
|
||||
className={`mb-0.5 flex w-full items-center justify-between gap-2 rounded-xl px-2 py-2 text-left font-mono text-sm transition-colors duration-150 ${
|
||||
isSelected
|
||||
? "bg-white/[0.08] text-white"
|
||||
: "text-[#d4d4d4] hover:bg-white/[0.05]"
|
||||
? "bg-white/8 text-white"
|
||||
: "text-[#d4d4d4] hover:bg-white/5"
|
||||
}`}
|
||||
onClick={() => onModelSelect(model)}
|
||||
>
|
||||
@@ -839,11 +836,11 @@ export default function ChatView() {
|
||||
</div>
|
||||
|
||||
{/* Divider */}
|
||||
<div className="mx-0.5 h-4 w-px bg-white/[0.08]" />
|
||||
<div className="mx-0.5 h-4 w-px bg-white/8" />
|
||||
|
||||
{/* Reasoning effort */}
|
||||
<label
|
||||
className="inline-flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[13px] text-[#a0a0a0]/70 transition-colors duration-150 hover:bg-white/[0.06] hover:text-[#d0d0d0]"
|
||||
className="inline-flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[13px] text-[#a0a0a0]/70 transition-colors duration-150 hover:bg-white/6 hover:text-[#d0d0d0]"
|
||||
htmlFor="reasoning-effort"
|
||||
>
|
||||
<span>{selectedEffort.charAt(0).toUpperCase() + selectedEffort.slice(1)}</span>
|
||||
|
||||
Reference in new issue
Block a user