diff --git a/internal/version/version.go b/internal/version/version.go index 544039e..3ae023f 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -7,7 +7,7 @@ import ( const ( Name = "muyue" - Version = "0.4.1" + Version = "0.5.0" Author = "La Légion de Muyue" ) diff --git a/web/src/components/Shell.jsx b/web/src/components/Shell.jsx index 3c3fb79..7c5778f 100644 --- a/web/src/components/Shell.jsx +++ b/web/src/components/Shell.jsx @@ -214,7 +214,6 @@ function getTheme(themeName) { } function createTerminal(container, settings = {}) { - console.log('[Shell] createTerminal called with settings:', JSON.stringify({ fontSize: settings.fontSize, fontFamily: settings.fontFamily?.slice(0, 30), theme: settings.theme })) const theme = getTheme(settings.theme || 'system') const actualFontSize = settings.fontSize || 14 const term = new XTerm({ @@ -528,20 +527,15 @@ export default function Shell({ api, isSudo }) { setSystemTerminals(d.system || []) }).catch(() => {}) api.getConfig().then(d => { - console.log('[Shell] config response terminal:', JSON.stringify(d?.terminal)) if (d.terminal) { const fontSize = d.terminal.font_size || 14 const fontFamily = d.terminal.font_family || "'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', monospace" const theme = d.terminal.theme || 'system' - console.log('[Shell] setting fontSize to:', fontSize, 'from config') setTerminalSettings({ fontSize, fontFamily, theme }) settingsRef.current = { fontSize, fontFamily, theme } baseFontSizeRef.current = fontSize - } else { - console.log('[Shell] no terminal config in response, using defaults') } setConfigLoaded(true) - console.log('[Shell] configLoaded = true, settingsRef:', JSON.stringify(settingsRef.current)) }).catch((err) => { console.warn('[Shell] getConfig failed:', err); setConfigLoaded(true) }) }, []) @@ -553,7 +547,6 @@ export default function Shell({ api, isSudo }) { const s = settingsRef.current const effectiveFontSize = s.fontSize + zoomLevel * 2 - console.log(`[Shell] initTerminal tab=${tabId}: settingsRef.fontSize=${s.fontSize}, zoomLevel=${zoomLevel}, effectiveFontSize=${effectiveFontSize}`) const { term, fitAddon, searchAddon } = createTerminal(container, { fontSize: effectiveFontSize, fontFamily: s.fontFamily, @@ -646,14 +639,11 @@ export default function Shell({ api, isSudo }) { const bufferSaveInterval = setInterval(() => { if (!disposed) saveBuffer() }, 5000) - console.log(`[Shell] initTerminal tab=${tabId} type=${tab.type} name="${tab.name}" shell="${tab.shell || '(default)'}"`) tabsRef.current[tabId] = { term, fitAddon, searchAddon, ws, resizeObserver, onResize, bufferSaveInterval, saveBuffer, disposed: () => disposed } tabsRef.current[tabId]._markDisposed = () => { disposed = true } - console.log(`[Shell] initTerminal tab=${tabId} done, tabsRef keys:`, Object.keys(tabsRef.current)) const pending = pendingCommandsRef.current[tabId] if (pending && pending.length > 0) { - console.log(`[Shell] Flushing ${pending.length} pending commands for tab ${tabId}`) for (const cmd of pending) { if (ws.readyState === WebSocket.OPEN) { ws.send(JSON.stringify({ type: 'input', data: cmd + '\r' })) @@ -709,7 +699,6 @@ export default function Shell({ api, isSudo }) { const tryInitTab = (tab, attempt) => { if (cancelled) return if (attempt > 20) { - console.warn(`[Shell] max attempts reached for tab ${tab.id}`) return } @@ -733,7 +722,6 @@ export default function Shell({ api, isSudo }) { } if (!tabsRef.current[tab.id]) { - console.log(`[Shell] tryInitTab: calling initTerminal for tab ${tab.id}, configLoaded=${configLoaded}`) initTerminal(tab.id, tab) } @@ -752,7 +740,6 @@ export default function Shell({ api, isSudo }) { }) } - console.log(`[Shell] init effect: tabs=${tabs.length}, configLoaded=${configLoaded}`) for (const tab of tabs) { if (configLoaded && !tabsRef.current[tab.id]) { tryInitTab(tab, 0) @@ -1033,7 +1020,6 @@ export default function Shell({ api, isSudo }) { pendingCommandsRef.current[targetId].push(code) return } - console.log(`[Shell] sendToTerminal: tab ${targetId} ← ${code.length} chars`) entry.ws.send(JSON.stringify({ type: 'input', data: code + '\r' })) }, []) @@ -1120,7 +1106,6 @@ export default function Shell({ api, isSudo }) { } const currentTab = activeTabRef.current - console.log(`[Shell] _sendAiMessage: activeTab=${currentTab}, fromEvent=${fromEvent}, text="${trimmed.slice(0, 50)}"`) setAiMessages(prev => [...prev, { role: 'user', content: trimmed, _tabId: currentTab, _analysis: isAnalysis || undefined }]) setAiLoading(true) diff --git a/web/src/components/Studio.jsx b/web/src/components/Studio.jsx index 004297d..45d5547 100644 --- a/web/src/components/Studio.jsx +++ b/web/src/components/Studio.jsx @@ -270,7 +270,7 @@ function CodeBlockWithCopy({ part, index, copiedIdx, setCopiedIdx }) { ) } -function FeedItem({ msg }) { +function FeedItem({ msg, activeAgents, onModeChange }) { const isUser = msg.role === 'user' const isSystem = msg.role === 'system' const rank = getRank(msg.role) @@ -352,7 +352,7 @@ function FeedItem({ msg }) { const result = r && (r.content !== undefined || r.is_error !== undefined) ? { content: r.content, is_error: r.is_error } : null - return + return } return null }) @@ -365,7 +365,7 @@ function FeedItem({ msg }) { const result = resultData ? { content: resultData.result, is_error: resultData.is_error } : null - return + return })} {cleanContent && (
@@ -385,7 +385,7 @@ function FeedItem({ msg }) { ) } -function StreamingItem({ content, thinking, toolCalls, segments }) { +function StreamingItem({ content, thinking, toolCalls, segments, activeAgents, onModeChange }) { const rank = RANKS.general const cleanContent = content.replace(/]*>[\s\S]*?<\/think>/gi, '') const hasToolCalls = toolCalls && toolCalls.length > 0 @@ -434,14 +434,14 @@ function StreamingItem({ content, thinking, toolCalls, segments }) { ) } if (seg.type === 'tool') { - return + return } return null }) ) : ( <> {hasToolCalls && toolCalls.map((tc, i) => ( - + ))} {cleanContent && (
@@ -882,7 +882,7 @@ export default function Studio({ api }) { {summarizedExpanded ? 'masquer' : 'voir'}
{summarizedExpanded && summarizedMsgs.map(msg => ( - + ))}
) @@ -894,7 +894,7 @@ export default function Studio({ api }) { <> {renderSummaryBlock()} {activeMsgs.slice(0, visibleCount).map(msg => ( - + ))}
@@ -911,7 +911,7 @@ export default function Studio({ api }) { <> {renderSummaryBlock()} {activeMsgs.map(msg => ( - + ))} ) @@ -935,7 +935,7 @@ export default function Studio({ api }) {
{renderMessages()} {(streaming || streamThinking || loading || streamToolCalls.length > 0) && ( - + )}