45 Commits
Author SHA1 Message Date
B Harper f52c52ca19 fix: Remove space from MCP server name (HumanAgentMCP)
- Updated extension.ts MCP server definition
- Updated server.ts config name
- Added auto-growing textarea to web interface
- Tool now referenced as HumanAgentMCP/HumanAgent_Chat (no space)
- Fixes tool reference issues in .agent.md files
v0.0.17
2025-11-27 12:25:16 +11:00
B Harper c5b1267686 feat: Add anonymous telemetry with GA4 integration
- Created TelemetryService with Google Analytics 4
- Track extension lifecycle (activation/deactivation)
- Track chat events (opened, messages sent/received)
- Track connection errors for debugging
- Respects VS Code telemetry settings
- Added privacy disclosure to README
- Client ID persists across updates
- GDPR compliant, no PII collected
v0.0.16
2025-11-20 14:34:50 +11:00
B Harper 123bed4a29 chore: Bump version to 0.0.15 and add square icon v0.0.15 2025-11-20 14:02:56 +11:00
B Harper 9bfce15f44 feat: Add reconnection backoff, server start notifications, issue reporting, improved README
- Implement exponential backoff for SSE reconnection (1s → 30s max, no timeout)
- Update connection status indicator (green/orange/red dot)
- Reset backoff and reconnect immediately when server manually started
- Add Report Issue and Request Feature options to cog menu
- Add bugs field to package.json for native VS Code issue reporting
- Improve README with actual usage instructions and troubleshooting
- Fix status indicator to update properly on disconnect
- Close EventSource to prevent browser auto-reconnect interference
v0.0.14
2025-11-20 12:06:50 +11:00
B Harper 78fbceb3f7 Bump version to 0.0.13 v0.0.13 2025-11-19 15:35:42 +11:00
B Harper 0f07602b59 Merge fix/timeout-issue: Resolve tool call timeout with chunked response keepalive 2025-11-19 15:33:33 +11:00
B Harper accdbdc602 Fix tool call timeout by implementing chunked response with keepalive
- Added special handling for HumanAgent_Chat tool calls to prevent Node.js undici 5-minute timeout
- Send HTTP headers immediately with Transfer-Encoding: chunked to stop headersTimeout
- Implement 4-minute keepalive mechanism writing space character to reset bodyTimeout
- Allows indefinite wait times for human responses in tool calls
- Tested successfully with 35+ minute wait time without timeout

Resolves issue where VS Code MCP client would cancel tool calls after ~5-6 minutes
with error 'The user cancelled the tool call' due to undici hardcoded timeouts.
2025-11-19 15:32:59 +11:00
B Harper 164b6b9f1e Fix workflow: Use version from package.json instead of tag v0.0.12 2025-11-18 13:40:48 +11:00
B Harper c2129cb3ed v0.0.12: Add quick replies, remove timeout feature, keep textarea enabled, improve error handling 2025-11-18 13:34:39 +11:00
B Harper ea62ebfbf3 Add tab notification features and timeout improvements 2025-11-01 17:37:01 +11:00
B Harper fb9251f793 Add Report Issues button to startup notification v0.0.11 2025-10-28 09:29:59 +11:00
B Harper 2f45e2f723 Add startup notification feature with user configuration option v0.0.10 2025-10-28 08:55:12 +11:00
B Harper 6b49a4f230 Update README files with demo positioning and content v0.0.9 2025-10-26 19:52:36 +11:00
B Harper d905b7a185 Add high-resolution demo GIF to README files 2025-10-26 19:48:09 +11:00
B Harper 9da74792d5 Update documentation and add additional README content v0.0.8 2025-10-26 19:11:27 +11:00
B Harper f8115fae53 Fix workflow: Add contents write permission for GitHub releases v0.0.7 2025-10-26 18:35:54 +11:00
B Harper 4cb6434584 Fix workflow: Package .vsix file before creating GitHub release v0.0.6 2025-10-26 18:33:55 +11:00
B Harper a3bd6662e4 Fix workflow: Use correct secret name VCSE_PAT v0.0.5 2025-10-26 18:29:34 +11:00
B Harper fb62ffbcd2 Fix workflow: Update Node.js version to 20 for vsce compatibility v0.0.4 2025-10-26 18:27:08 +11:00
B Harper 87ae328e31 Update workflow to trigger on git tags instead of releases v0.0.3 2025-10-26 18:24:54 +11:00
B Harper d5878d9f32 Fix: Add GitHub Actions workflow for automated publishing 2025-10-26 18:22:02 +11:00
B Harper 464f4e0bf4 Add GitHub Actions workflow for automated publishing and clean up unnecessary files v0.0.2 2025-10-26 18:14:13 +11:00
B Harper 347485a822 Add .gitignore to exclude .github and .vscode folders, remove them from tracking 2025-10-26 17:50:58 +11:00
B Harper 8777d3b928 Add GPL-3.0 LICENSE and add untracked README files 2025-10-26 17:48:36 +11:00
B Harper 87ade947ba Update package.json for marketplace publishing - change publisher to 3DTek-xyz and add repository field 2025-10-26 17:20:33 +11:00
B Harper 839fc81df6 Remove problematic reload override functionality from cog menu
- Removed 'Reload Override File' option from cog menu
- Removed reloadOverrideFile() method and related handlers
- Clean solution: users restart VS Code when changing override files
- Startup override loading works perfectly with version-based cache invalidation
- Eliminates hanging 'Update Tools' process and duplicate tool issues

Override file changes now require VS Code restart/reload to take effect.
2025-10-26 16:51:28 +11:00
B Harper 94d004338a Implement version-based cache invalidation for MCP tool definitions
- Added serverVersion property to McpServerDefinitionProvider that updates on override reloads
- VS Code now refreshes cached tool definitions when server version changes
- Fixed tool override caching issue where old descriptions persisted
- Removed unnecessary delay in notification system
- Added debug endpoint /debug/tools for inspecting server-side tool definitions

Progress: Startup override loading now works correctly, investigating override reload hang in VS Code
2025-10-26 16:40:44 +11:00
B Harper 60ea857b54 Fix SSE connection conflicts between webview and extension
- Added separate /mcp-tools endpoint for VS Code extension MCP protocol
- Maintained /mcp endpoint for webview SSE connections (heartbeats, messages)
- Eliminated competing SSE connections that caused message delivery failures
- Enhanced SSE connection health monitoring with detailed diagnostics
- Added connection state management to prevent race conditions
- Fixed sendToSession() to use proper health checking instead of raw writes
- Improved logging to track connection conflicts and message delivery
- Maintains proper session separation between different VS Code workspaces

This resolves the issue where VS Code webview received heartbeats but not
tool call messages due to competing SSE connections overwriting each other.
2025-10-26 15:36:26 +11:00
B Harper 2de7ad2db1 Add comprehensive documentation - README.md and ReadMeDev.md
- README.md: Clean user-facing documentation with truthful feature descriptions
- ReadMeDev.md: Technical developer documentation with architecture details
- No exaggeration or marketing fluff - just what we actually built
- Covers real features: VS Code interface, MCP server, tool overrides, web interface
- Includes honest installation, configuration, and troubleshooting sections
2025-10-25 11:52:58 +11:00
B Harper a19312c2df Remove silent timeout fallback - implement explicit timeout handling
- Removed hidden 300-second default timeout that created unpredictable behavior
- Tool now waits indefinitely if no timeout specified (explicit behavior)
- When timeout IS provided via params.timeout, uses that value exactly
- Tool overrides can still configure workspace-specific timeouts as before
- No more silent fallbacks - behavior is now explicit and predictable
2025-10-25 11:43:35 +11:00
B Harper d846f0895b Implement VS Code native MCP event system for automatic tool refreshing
- Added HumanAgentMcpProvider class with onDidChangeMcpServerDefinitions event
- Registered MCP provider with VS Code lm.registerMcpServerDefinitionProvider
- Added mcpServerDefinitionProviders contribution point to package.json
- Implemented startup event firing when override files exist
- Fixed session name loading timing by moving after server startup with retry
- Chat webview now fires MCP events when override files are reloaded
- VS Code Configure Tools will now automatically refresh tool descriptions
2025-10-25 11:29:05 +11:00
B Harper 59be50e9d9 Fix VS Code MCP tool override descriptions by adding sessionId to URL
- Modified mcpConfigManager.ts to include sessionId in MCP URL configuration
- Fixed server.ts URL parsing to handle query parameters properly
- Enhanced reloadOverrideFile to trigger MCP notifications
- VS Code now shows custom tool descriptions from HumanAgentOverride.json
2025-10-24 20:06:49 +11:00
B Harper 068e745460 Fix web interface JavaScript error and complete message formatting
- Fixed JavaScript syntax error in escapeHtml comment that was breaking web interface
- Completed message formatting fix with CSS white-space: pre-wrap
- Fixed VS Code chat history synchronization by removing local message arrays
- Added unified message loading via server API for both VS Code and web
- Fixed display labels to show 'You (VS Code)' and 'You (Web)' consistently
- Implemented autoAppendEnabled logic to properly respect enable/disable setting
- Added default auto-append text for HumanAgent_Chat tool in templates
- Enhanced auto-append formatting with period + space and 'Appended:' prefix
- Added MCP tool notification method for dynamic tool discovery
- All web interface and VS Code chat functionality now working correctly
2025-10-24 18:39:50 +11:00
B Harper a0333d2dbf Add session name persistence using VS Code globalState
EXACTLY as requested - persist session names same way as session IDs:

 Session names saved to context.globalState when user names chat in VS Code
 Session names restored on startup and sent to server automatically
 Uses same workspace-based key system as session ID persistence
 Web interface will now show friendly names after VS Code restart

Workflow: VS Code 'Name This Chat' → persist to globalState → restore on startup → web shows friendly name

No web interface changes needed - server already has name display logic
2025-10-24 13:52:18 +11:00
B Harper 100508581e Implement clean request state management system
MAJOR IMPROVEMENT: Replace confusing 'human-agent-request' event with clean 'request-state-change' SSE system

 NEW: request-state-change events for both web and VS Code interfaces
 CLEAN: Separate message display (via ChatManager) from input control (via request state)
 CONSISTENT: Both interfaces get same state updates via SSE
 ELIMINATED: Duplicate message display issues
 PROPER: Input enabling/disabling and 'waiting for response' indicators

States: 'waiting_for_response' → 'completed'
Benefits: Clean separation of concerns, no more mixed event types causing confusion

Ready for testing: VS Code input should enable when AI asks questions, disable when complete
2025-10-24 13:40:34 +11:00
B Harper cac8d40b66 SUCCESSFUL: Complete message synchronization between web and VS Code
 FIXED: AI messages now stored in ChatManager when HumanAgent_Chat tool is called
 FIXED: User messages stored with source tracking (web vs vscode)
 FIXED: Eliminated redundant /chat endpoint - only /response endpoint needed
 CONFIRMED: API shows correct message flow: AI → User → AI with proper storage

Key insight: AI communicates BY calling HumanAgent_Chat tool, not via responses afterward.

Message storage working perfectly. Only remaining issue: web interface display showing duplicates (storage is correct per curl verification)
2025-10-24 13:26:57 +11:00
B Harper bab4f4138a Fix AI response storage and add message source tracking
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
2025-10-24 13:16:37 +11:00
B Harper b5d0190474 Debug AI response storage issue
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.
2025-10-24 11:55:42 +11:00
B Harper 0fcc0a7b0e Eliminate duplicate pendingHumanRequests system - use ChatManager only
- 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
2025-10-24 11:44:38 +11:00
B Harper dc1ee54ecd Fix session ID mapping: VS Code conversation IDs now map to registered sessions
- 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
2025-10-24 11:17:46 +11:00
B Harper 20fba4fb96 Fix dynamic cog menu updates and improve override file UI
- 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
2025-10-23 15:39:41 +11:00
B Harper 0f1b5fa820 Complete single source of truth implementation
- 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
2025-10-23 14:47:54 +11:00
B Harper a3b52ac593 Fix override loading system and server independence
- 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
2025-10-23 14:37:02 +11:00
B Harper 64d0a322cd Fix: Remove startup status notifications and improve menu routing
- 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
2025-10-23 10:11:24 +11:00
B Harper a414a4f70d Fix sessionless HumanAgent chat functionality
- 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
2025-10-22 11:49:17 +11:00