Key changes:
- Fixed sessionId detection in HumanAgent_Chat tool (use sessionToUse instead of params.sessionId)
- Added source field to ChatMessage interface for tracking web vs vscode origin
- Updated web interface to show message source in headers
- Removed incorrect storage of human responses as assistant messages
- AI responses need proper capture mechanism (not human answers stored as AI responses)
Issue: Still need to eliminate redundant /chat endpoint causing potential duplicates
Found root cause: HumanAgent_Chat tool only stores AI responses when params.sessionId exists,
but sessionId detection may be failing. Only user messages are being stored in ChatManager,
causing web interface to show incomplete conversation history.
Next: Fix sessionId detection and add message source tracking.
- Removed pendingHumanRequests Map completely
- Added findPendingRequest() method to ChatManager for cross-session lookups
- Created minimal requestResolvers Map only for Promise resolve/reject functions
- Replaced all 9 calls to old system with ChatManager equivalents:
* /response endpoint now uses ChatManager.findPendingRequest()
* Timeout cleanup uses ChatManager.removePendingRequest()
* Request storage uses ChatManager.addPendingRequest() only
* respondToHumanRequest() and resolvePendingRequest() updated
- No more duplicate data storage - single source of truth in ChatManager
- All functionality preserved, cleaner architecture
- Added conversationToSession mapping to link VS Code conversation IDs to registered session IDs
- Updated handleToolCall to extract session ID from _meta.vscode.conversationId
- Auto-maps VS Code conversations to first available registered session
- Both VS Code and web interface now use same registered session ID
- Fixes 'No pending AI request found' error in web interface
- Changed 'Override Prompt' to contextual text:
- '📁 Create Override File' when file doesn't exist
- '📁 Recreate Override File' when file exists
- Added dynamic webview updating after override file creation
- Fixed cog menu not showing reload option when override created during session
- Added updateOverrideFileExists message handler to refresh menu state
- Fixed character encoding issues in webview menu options
- Remove all hardcoded tool description fallbacks
- Ensure override file creation fetches complete tool definition from server
- Verify IMPORTANT text is preserved in all tool descriptions
- Fix word wrapping for better code readability
- Confirm true single source of truth for all tool definitions
- Implement proper override file reload functionality with session re-registration
- Add tools endpoint with sessionId query parameter support
- Remove hardcoded tool description fallbacks (single source of truth)
- Fix ServerManager duplicate setTimeout in startServer method
- Add /response and /reload HTTP endpoints to server
- Ensure server remains independent across VS Code restarts
- Format long tool description for better readability
- Remove automatic status display on webview load (line 964)
- Fix status command routing - unified status display via dedicated command
- Remove unused showStatus command duplicate
- Add Override Prompt to default menu when status unknown
- Clean up status notification behavior - only show on manual request
- Remove session management complexity from MCP server and UI
- Update chatWebviewProvider for direct messaging without sessions
- Fix MCP tool response format to use content array as per specification
- Restore cog icon for MCP configuration (install global/local)
- Add safety checks for message content handling
- Resolve 'o.content is not iterable' error by using proper MCP format