Skip to content

Commit 3fa5202

Browse files
committed
update files.
1 parent 34315a6 commit 3fa5202

File tree

11 files changed

+122
-140
lines changed

11 files changed

+122
-140
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ MaClaw 独创的浏览器运行监管系统,为自动化测试与业务流程
125125

126126
## 关于
127127

128-
* **版本**:V5.2.2.9710
128+
* **版本**:V5.3.0.9800
129129
* **作者**:Dr. Daniel
130130
* **GitHub**[RapidAI/MaClaw](https://github.com/rapidai/maclaw)
131131
* **产品网站**[maclaw.top](https://maclaw.top)

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ On first launch, MaClaw performs an environment self-check and auto-installs mis
125125

126126
## About
127127

128-
* **Version**: V5.2.2.9710
128+
* **Version**: V5.3.0.9800
129129
* **Author**: Dr. Daniel
130130
* **GitHub**: [RapidAI/MaClaw](https://github.com/rapidai/maclaw)
131131
* **Website**: [maclaw.top](https://maclaw.top)

build/windows/installer/multiarch.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
!define INFO_PRODUCTNAME "MaClaw"
1111
!endif
1212
!ifndef INFO_PRODUCTVERSION
13-
!define INFO_PRODUCTVERSION "5.2.2.9710"
13+
!define INFO_PRODUCTVERSION "5.3.0.9800"
1414
!endif
1515
!ifndef INFO_COPYRIGHT
1616
!define INFO_COPYRIGHT "Copyright (C) 2026 RapidAI"

build_number

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9594
1+
9603

gui/frontend/src/App.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ body {
10211021
align-items: center;
10221022
justify-content: center;
10231023
text-align: center;
1024-
padding: 3px 2px;
1024+
padding: 2px 2px;
10251025
gap: 1px;
10261026
border-left: none;
10271027
border-radius: var(--radius-sm);
@@ -1037,10 +1037,17 @@ body {
10371037
margin-top: 0;
10381038
}
10391039

1040+
.tool-grid .sidebar-item .sidebar-icon img {
1041+
width: 1.26em !important;
1042+
height: 1.26em !important;
1043+
}
1044+
10401045
.tool-grid .sidebar-item span:last-child {
1041-
font-size: 0.66rem;
1046+
font-size: 0.6rem;
10421047
line-height: 1;
10431048
word-break: break-word;
1049+
font-family: 'Segoe UI', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
1050+
letter-spacing: 0.01em;
10441051
}
10451052

10461053
/* Modal Helpers */

gui/frontend/src/App.tsx

Lines changed: 78 additions & 121 deletions
Large diffs are not rendered by default.

gui/frontend/src/components/ai/AIAssistantPanel.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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)}

gui/frontend/src/components/ai/__tests__/AIAssistantPanel.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ describe('AIAssistantPanel property tests', () => {
9696
sendMessage={async () => {}}
9797
clearHistory={async () => {}}
9898
executeAction={async () => {}}
99+
refreshNews={() => {}}
99100
/>
100101
);
101102

gui/frontend/src/components/ai/useAIAssistant.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,8 @@ export function useAIAssistant() {
106106
};
107107
}, [messages]);
108108

109-
// Fetch latest news from Hub Center on mount and prepend as system messages.
110-
const newsFetchedRef = useRef(false);
111-
useEffect(() => {
112-
if (newsFetchedRef.current) return;
113-
newsFetchedRef.current = true;
109+
// Fetch latest news from Hub Center and prepend as system messages.
110+
const doFetchNews = useCallback(() => {
114111
FetchNews().then((articles: any[]) => {
115112
if (!articles || articles.length === 0) return;
116113
const catIcons: Record<string, string> = { notice: '📢', update: '🚀', tip: '💡', alert: '⚠️' };
@@ -121,13 +118,24 @@ export function useAIAssistant() {
121118
timestamp: Date.now(),
122119
}));
123120
setMessages(prev => {
124-
// Remove old news system messages, then prepend new ones
125121
const filtered = prev.filter(m => !m.id.startsWith('news-'));
126122
return [...sysMsgs, ...filtered];
127123
});
128124
}).catch(() => { /* silently ignore news fetch failures */ });
129125
}, []);
130126

127+
// Fetch on mount + refresh every 6 hours.
128+
const newsFetchedRef = useRef(false);
129+
useEffect(() => {
130+
if (!newsFetchedRef.current) {
131+
newsFetchedRef.current = true;
132+
doFetchNews();
133+
}
134+
const SIX_HOURS = 6 * 60 * 60 * 1000;
135+
const timer = setInterval(doFetchNews, SIX_HOURS);
136+
return () => clearInterval(timer);
137+
}, [doFetchNews]);
138+
131139
// Listen for streaming token events — append delta to current streaming message.
132140
useEffect(() => {
133141
const tokenHandler = (delta: string) => {
@@ -315,7 +323,7 @@ export function useAIAssistant() {
315323
};
316324
}, []);
317325

318-
return { messages, sending, streaming, ready, sendMessage, clearHistory, executeAction };
326+
return { messages, sending, streaming, ready, sendMessage, clearHistory, executeAction, refreshNews: doFetchNews };
319327
}
320328

321329
// Polyfill for Array.findLastIndex (not available in all environments)

gui/frontend/src/version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const buildNumber = '9594';
2-
export const appVersion = '5.2.2.9594';
1+
export const buildNumber = '9603';
2+
export const appVersion = '5.3.0.9603';

0 commit comments

Comments
 (0)