11import React , { useCallback , useEffect , useRef , useState } from "react" ;
22import SkillsPanel from "@/webview/components/SkillsPanel" ;
33import SkillsTags from "@/webview/components/SkillsTags" ;
4- import ContextMeter from "@/webview/components/ContextMeter " ;
4+ import ContextIndicator from "@/webview/components/ContextIndicator " ;
55import { PromptAttachments , usePromptAttachments } from "@/webview/components/PromptAttachments" ;
66import type { ActiveEditor , EditingMessage , SkillInfo , TokenTelemetry } from "@/webview/types" ;
7- import { FileCodeIcon , Send , Square } from "lucide-react" ;
7+ import { FileCodeIcon , Reply , Square } from "lucide-react" ;
88import { InputGroup , InputGroupAddon , InputGroupButton , InputGroupTextarea } from "@/webview/components/ui/input-group" ;
99import { Separator } from "@/webview/components/ui/separator" ;
1010import { HoverCard , HoverCardContent , HoverCardTrigger } from "./ui/hover-card" ;
1111import { cn } from "@/webview/lib/utils" ;
1212import { Field , FieldGroup } from "./ui/field" ;
13+ import { Spinner } from "@/webview/components/ui/spinner" ;
1314
1415export interface InputPromptProps {
1516 loading : boolean ;
@@ -152,7 +153,6 @@ export default function InputPrompt({
152153 [ handleSend , history , historyIdx , value , draftBeforeHistory ]
153154 ) ;
154155
155- const isProcessing = loading ;
156156 const hasContent = value . trim ( ) . length > 0 || attachments . length > 0 ;
157157
158158 return (
@@ -189,7 +189,7 @@ export default function InputPrompt({
189189 } }
190190 />
191191 < Separator orientation = "vertical" className = "h-5 mt-1.5" />
192- < ContextMeter tokenTelemetry = { tokenTelemetry } />
192+ < ContextIndicator tokenTelemetry = { tokenTelemetry } />
193193 < Separator orientation = "vertical" className = "h-5 mt-1.5" />
194194 { activeEditor && (
195195 < HoverCard openDelay = { 300 } closeDelay = { 100 } >
@@ -204,36 +204,37 @@ export default function InputPrompt({
204204 </ HoverCardTrigger >
205205 < HoverCardContent className = "text-xs space-y-1" >
206206 < div className = "font-medium truncate" > { activeEditor . fileName . split ( "/" ) . pop ( ) } </ div >
207- < div className = "text-muted-foreground" > { activeEditor . fileName } </ div >
207+ < p className = "text-muted-foreground text-wrap break-all line-clamp-3 " > { activeEditor . fileName } </ p >
208208 < div className = "flex gap-3 text-muted-foreground" >
209209 < span > { activeEditor . languageId } </ span >
210210 < span > { activeEditor . lineCount } lines</ span >
211211 </ div >
212212 </ HoverCardContent >
213213 </ HoverCard >
214214 ) }
215- { isProcessing ? (
215+ { loading ? (
216216 < InputGroupButton
217- variant = "ghost "
217+ variant = "secondary "
218218 size = "icon-sm"
219- className = "ml-auto h-7 w-7 "
219+ className = "ml-auto group "
220220 onClick = { onInterrupt }
221221 title = "Stop"
222222 >
223- < Square className = "h-4 w-4" />
223+ < Square className = "h-3 w-3 hidden fill-primary group-hover:block" strokeWidth = { 0 } />
224+ < Spinner className = "h-4 w-4 block group-hover:hidden text-primary" />
224225 </ InputGroupButton >
225226 ) : (
226227 < InputGroupButton
227228 variant = "default"
228- className = { cn ( "h-7 w-7 ml-auto cursor-pointer" , {
229- "cursor-not-allowed!" : ! hasContent && ! isProcessing ,
229+ className = { cn ( "ml-auto cursor-pointer" , {
230+ "cursor-not-allowed!" : ! hasContent && ! loading ,
230231 } ) }
231232 onClick = { handleSend }
232- disabled = { ! hasContent && ! isProcessing }
233+ disabled = { ! hasContent && ! loading }
233234 title = "Send"
234235 size = "icon-sm"
235236 >
236- < Send />
237+ < Reply className = "rotate-x-180" />
237238 </ InputGroupButton >
238239 ) }
239240 </ InputGroupAddon >
0 commit comments