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
This commit is contained in:
B Harper
2025-11-27 12:25:16 +11:00
parent c5b1267686
commit f52c52ca19
3 changed files with 23 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "humanagent-mcp",
"displayName": "HumanAgent MCP",
"description": "MCP server for chatting with a human agent",
"version": "0.0.16",
"version": "0.0.17",
"publisher": "3DTek-xyz",
"icon": "HumanAgent_Icon_Square.png",
"repository": {
+1 -1
View File
@@ -28,7 +28,7 @@ class HumanAgentMcpProvider implements vscode.McpServerDefinitionProvider {
// Use separate endpoint for MCP tools to avoid SSE conflicts with webview
const serverUrl = `http://127.0.0.1:${this.port}/mcp-tools?sessionId=${this.sessionId}`;
const serverUri = vscode.Uri.parse(serverUrl);
const server = new vscode.McpHttpServerDefinition('HumanAgent MCP', serverUri, {}, this.serverVersion);
const server = new vscode.McpHttpServerDefinition('HumanAgentMCP', serverUri, {}, this.serverVersion);
console.log(`HumanAgent MCP: Using separate MCP tools endpoint to avoid SSE conflicts (version: ${this.serverVersion})`);
return [server];
}
+21 -3
View File
@@ -136,7 +136,7 @@ export class McpServer extends EventEmitter {
this.chatManager = new ChatManager(this.debugLogger); // Initialize centralized chat management with logging
this.config = {
name: 'HumanAgent MCP Server',
name: 'HumanAgentMCP',
description: 'MCP server for chatting with human agents',
version: '1.0.0',
capabilities: {
@@ -1444,7 +1444,8 @@ export class McpServer extends EventEmitter {
font-size: 13px;
resize: none;
min-height: 36px;
max-height: 120px;
max-height: 200px;
overflow-y: auto;
}
.quick-replies {
@@ -1702,6 +1703,22 @@ export class McpServer extends EventEmitter {
}
});
// Auto-grow textarea as user types
function autoGrowTextarea(textarea) {
textarea.style.height = '36px'; // Reset to min height
if (textarea.value) {
const newHeight = Math.min(textarea.scrollHeight, 200); // Max 200px
textarea.style.height = newHeight + 'px';
}
}
// Listen for input on all textareas
document.addEventListener('input', (e) => {
if (e.target.classList.contains('input-box')) {
autoGrowTextarea(e.target);
}
});
document.addEventListener('keydown', (e) => {
if (e.target.classList.contains('input-box') && e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
@@ -1724,8 +1741,9 @@ export class McpServer extends EventEmitter {
mimeType: preview.dataset.mimeType
}));
// Clear input, remove images, and disable send button
// Clear input, remove images, reset height, and disable send button
textarea.value = '';
textarea.style.height = '36px'; // Reset to min height
imagePreviews.forEach(preview => preview.remove());
button.disabled = true;