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 [isDragOver, setIsDragOver] = useState(false)
const [hasMmproj, setHasMmproj] = useState(false)
const [hasProactive, setHasProactive] = useState(false)
const [hasActiveModels, setHasActiveModels] = useState(false)
const attachmentsEnabled = useAttachments((s) => s.enabled)
// Determine whether to show the Attach documents button (simple gating)
@ -207,26 +206,6 @@ const ChatInput = ({
checkMmprojSupport()
}, [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
const hasActiveMCPServers = connectedServers.length > 0 || tools.length > 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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