fix: Remove unused Proactive icon on chatInput

This icon doesn't do anything on chatInput but just an indicator when the proactive capability is activated. Safely remove since this can be indicated from the model dropdown
This commit is contained in:
Vanalite 2025-10-28 17:04:31 +07:00
parent f7e0e790b6
commit 2fa153ac34
9 changed files with 8 additions and 28 deletions

View File

@ -108,7 +108,6 @@ const ChatInput = ({
const [connectedServers, setConnectedServers] = useState<string[]>([]) const [connectedServers, setConnectedServers] = useState<string[]>([])
const [isDragOver, setIsDragOver] = useState(false) const [isDragOver, setIsDragOver] = useState(false)
const [hasMmproj, setHasMmproj] = useState(false) const [hasMmproj, setHasMmproj] = useState(false)
const [hasProactive, setHasProactive] = useState(false)
const [hasActiveModels, setHasActiveModels] = useState(false) const [hasActiveModels, setHasActiveModels] = useState(false)
const attachmentsEnabled = useAttachments((s) => s.enabled) const attachmentsEnabled = useAttachments((s) => s.enabled)
// Determine whether to show the Attach documents button (simple gating) // Determine whether to show the Attach documents button (simple gating)
@ -207,26 +206,6 @@ const ChatInput = ({
checkMmprojSupport() checkMmprojSupport()
}, [selectedModel, selectedModel?.capabilities, selectedProvider, serviceHub]) }, [selectedModel, selectedModel?.capabilities, selectedProvider, serviceHub])
// Check for proactive capability when model changes
useEffect(() => {
const checkProactiveSupport = () => {
if (selectedModel && selectedModel?.id) {
// Proactive mode requires both tools and vision capabilities
const hasTools = selectedModel?.capabilities?.includes('tools')
const hasVision = selectedModel?.capabilities?.includes('vision')
const hasProactiveCapability = selectedModel?.capabilities?.includes('proactive')
if (hasTools && hasVision && hasProactiveCapability) {
setHasProactive(true)
} else {
setHasProactive(false)
}
}
}
checkProactiveSupport()
}, [selectedModel, selectedModel?.capabilities])
// Check if there are active MCP servers // Check if there are active MCP servers
const hasActiveMCPServers = connectedServers.length > 0 || tools.length > 0 const hasActiveMCPServers = connectedServers.length > 0 || tools.length > 0

View File

@ -488,6 +488,7 @@ const filterOldProactiveScreenshots = (builder: CompletionMessagesBuilder) => {
// Reconstruct builder with filtered messages // Reconstruct builder with filtered messages
// Note: This is a workaround since CompletionMessagesBuilder doesn't have a setter // Note: This is a workaround since CompletionMessagesBuilder doesn't have a setter
// We'll need to access the private messages array // We'll need to access the private messages array
// eslint-disable-next-line no-extra-semi
;(builder as any).messages = filteredMessages ;(builder as any).messages = filteredMessages
} }
@ -518,8 +519,6 @@ export const postMessageProcessing = async (
) => { ) => {
// Handle completed tool calls // Handle completed tool calls
if (calls.length) { if (calls.length) {
// Track if any browser MCP tool was called
let hasBrowserMCPToolCall = false
// Fetch RAG tool names from RAG service // Fetch RAG tool names from RAG service
let ragToolNames = new Set<string>() let ragToolNames = new Set<string>()
try { try {
@ -663,11 +662,6 @@ export const postMessageProcessing = async (
} }
builder.addToolMessage(result as ToolResult, toolCall.id) builder.addToolMessage(result as ToolResult, toolCall.id)
// Mark if we used a browser tool (for proactive mode)
if (isBrowserTool) {
hasBrowserMCPToolCall = true
}
// Proactive mode: Capture screenshot/snapshot after browser tool execution // Proactive mode: Capture screenshot/snapshot after browser tool execution
if (isProactiveMode && isBrowserTool && !abortController.signal.aborted) { if (isProactiveMode && isBrowserTool && !abortController.signal.aborted) {
console.log('Proactive mode: Capturing screenshots after browser tool call') console.log('Proactive mode: Capturing screenshots after browser tool call')

View File

@ -80,6 +80,7 @@
"tools": "Werkzeuge", "tools": "Werkzeuge",
"webSearch": "Web Suche", "webSearch": "Web Suche",
"reasoning": "Argumentation", "reasoning": "Argumentation",
"proactive": "Proaktiv",
"selectAModel": "Wähle ein Modell", "selectAModel": "Wähle ein Modell",
"noToolsAvailable": "Keine Werkzeuge verfügbar", "noToolsAvailable": "Keine Werkzeuge verfügbar",
"noModelsFoundFor": "Keine Modelle gefunden zu \"{{searchValue}}\"", "noModelsFoundFor": "Keine Modelle gefunden zu \"{{searchValue}}\"",

View File

@ -81,6 +81,7 @@
"tools": "Tools", "tools": "Tools",
"webSearch": "Web Search", "webSearch": "Web Search",
"reasoning": "Reasoning", "reasoning": "Reasoning",
"proactive": "Proactive",
"selectAModel": "Select a model", "selectAModel": "Select a model",
"noToolsAvailable": "No tools available", "noToolsAvailable": "No tools available",
"noModelsFoundFor": "No models found for \"{{searchValue}}\"", "noModelsFoundFor": "No models found for \"{{searchValue}}\"",

View File

@ -80,6 +80,7 @@
"tools": "Alat", "tools": "Alat",
"webSearch": "Pencarian Web", "webSearch": "Pencarian Web",
"reasoning": "Penalaran", "reasoning": "Penalaran",
"proactive": "Proaktif",
"selectAModel": "Pilih model", "selectAModel": "Pilih model",
"noToolsAvailable": "Tidak ada alat yang tersedia", "noToolsAvailable": "Tidak ada alat yang tersedia",
"noModelsFoundFor": "Tidak ada model yang ditemukan untuk \"{{searchValue}}\"", "noModelsFoundFor": "Tidak ada model yang ditemukan untuk \"{{searchValue}}\"",

View File

@ -80,6 +80,7 @@
"tools": "Narzędzia", "tools": "Narzędzia",
"webSearch": "Szukanie w Sieci", "webSearch": "Szukanie w Sieci",
"reasoning": "Rozumowanie", "reasoning": "Rozumowanie",
"proactive": "Proaktywny",
"selectAModel": "Wybierz Model", "selectAModel": "Wybierz Model",
"noToolsAvailable": "Brak narzędzi", "noToolsAvailable": "Brak narzędzi",
"noModelsFoundFor": "Brak modeli dla \"{{searchValue}}\"", "noModelsFoundFor": "Brak modeli dla \"{{searchValue}}\"",

View File

@ -80,6 +80,7 @@
"tools": "Công cụ", "tools": "Công cụ",
"webSearch": "Tìm kiếm trên web", "webSearch": "Tìm kiếm trên web",
"reasoning": "Lý luận", "reasoning": "Lý luận",
"proactive": "Chủ động",
"selectAModel": "Chọn một mô hình", "selectAModel": "Chọn một mô hình",
"noToolsAvailable": "Không có công cụ nào", "noToolsAvailable": "Không có công cụ nào",
"noModelsFoundFor": "Không tìm thấy mô hình nào cho \"{{searchValue}}\"", "noModelsFoundFor": "Không tìm thấy mô hình nào cho \"{{searchValue}}\"",

View File

@ -80,6 +80,7 @@
"tools": "工具", "tools": "工具",
"webSearch": "网页搜索", "webSearch": "网页搜索",
"reasoning": "推理", "reasoning": "推理",
"proactive": "主动模式",
"selectAModel": "选择一个模型", "selectAModel": "选择一个模型",
"noToolsAvailable": "无可用工具", "noToolsAvailable": "无可用工具",
"noModelsFoundFor": "未找到“{{searchValue}}”的模型", "noModelsFoundFor": "未找到“{{searchValue}}”的模型",

View File

@ -80,6 +80,7 @@
"tools": "工具", "tools": "工具",
"webSearch": "網路搜尋", "webSearch": "網路搜尋",
"reasoning": "推理", "reasoning": "推理",
"proactive": "主動模式",
"selectAModel": "選擇一個模型", "selectAModel": "選擇一個模型",
"noToolsAvailable": "沒有可用的工具", "noToolsAvailable": "沒有可用的工具",
"noModelsFoundFor": "找不到符合「{{searchValue}}」的模型", "noModelsFoundFor": "找不到符合「{{searchValue}}」的模型",