@@ -14,6 +14,7 @@ interface AIAssistantPanelProps {
1414 sendMessage : ( text : string ) => Promise < void > ;
1515 clearHistory : ( ) => Promise < void > ;
1616 executeAction : ( command : string ) => Promise < void > ;
17+ refreshNews : ( ) => void ;
1718 inline ?: boolean ; // when true, render as inline content instead of overlay
1819 onHideWindow ?: ( ) => void ; // hide the entire window (inline mode)
1920}
@@ -509,7 +510,7 @@ if (typeof document !== "undefined" && !document.getElementById("ai-blink-style"
509510
510511/* ── Main component ── */
511512
512- export function AIAssistantPanel ( { onClose, lang, messages, sending, streaming, ready, sendMessage, clearHistory, executeAction, inline, onHideWindow } : AIAssistantPanelProps ) {
513+ export function AIAssistantPanel ( { onClose, lang, messages, sending, streaming, ready, sendMessage, clearHistory, executeAction, refreshNews , inline, onHideWindow } : AIAssistantPanelProps ) {
513514 const [ inputValue , setInputValue ] = useState ( "" ) ;
514515 const [ composing , setComposing ] = useState ( false ) ;
515516 const inputRef = useRef < HTMLTextAreaElement | null > ( null ) ;
@@ -619,6 +620,7 @@ export function AIAssistantPanel({ onClose, lang, messages, sending, streaming,
619620
620621 return (
621622 < div style = { containerStyle } >
623+ < style > { `.pinned-news-card > div { margin-top: 0 !important; margin-bottom: 0 !important; }` } </ style >
622624 { /* ── Drag overlay (inline mode) ── */ }
623625 { inline && (
624626 < div style = { {
@@ -652,6 +654,13 @@ export function AIAssistantPanel({ onClose, lang, messages, sending, streaming,
652654 } } > { title } </ span >
653655 </ div >
654656 < div style = { { display : "flex" , gap : "4px" , flexShrink : 0 , ...( inline ? { '--wails-draggable' : 'no-drag' , position : 'relative' , zIndex : 1000 } as any : { } ) } } >
657+ < button
658+ { ...( inline ? { onMouseDown : refreshNews } : { onClick : refreshNews } ) }
659+ style = { { ...baseActionBtnStyle , color : t . actionBtnColor } }
660+ title = { lang === "en" ? "Refresh news" : "刷新消息" }
661+ >
662+ 🔄
663+ </ button >
655664 < button
656665 { ...( inline ? { onMouseDown : clearHistory } : { onClick : clearHistory } ) }
657666 style = { { ...baseActionBtnStyle , color : t . actionBtnColor } }
@@ -708,14 +717,14 @@ export function AIAssistantPanel({ onClose, lang, messages, sending, streaming,
708717 marginBottom : '6px' ,
709718 } } >
710719 { pinnedNews . map ( msg => (
711- < div key = { msg . id } style = { {
720+ < div key = { msg . id } className = "pinned-news-card" style = { {
712721 padding : "6px 8px" ,
713722 borderRadius : "6px" ,
714723 background : "linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06))" ,
715724 borderLeft : `3px solid ${ t . promptColor } ` ,
716725 color : t . text ,
717726 fontSize : "11px" ,
718- lineHeight : "1.5 " ,
727+ lineHeight : "1.4 " ,
719728 overflow : "hidden" ,
720729 } } >
721730 { renderContentWithCodeBlocks ( msg . content , t ) }
0 commit comments