ai-account-switch 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-v1.7.0.md +176 -0
- package/README.md +674 -435
- package/README_EN.md +1191 -0
- package/package.json +1 -1
- package/src/commands/account.js +17 -3
- package/src/commands/index.js +26 -1
- package/src/commands/mcp.js +643 -0
- package/src/config.js +520 -7
- package/src/index.js +70 -1
- package/src/ui-server.js +991 -25
- package/README_ZH.md +0 -1021
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Changelog v1.7.0
|
|
2
|
+
|
|
3
|
+
## 🎉 Major Features
|
|
4
|
+
|
|
5
|
+
### MCP (Model Context Protocol) Web UI Management
|
|
6
|
+
- **Full MCP server management through Web UI**
|
|
7
|
+
- Add, edit, delete MCP servers
|
|
8
|
+
- Support for stdio, sse, and http server types
|
|
9
|
+
- Test MCP server connections
|
|
10
|
+
- Enable/disable servers per project
|
|
11
|
+
- Sync configuration to Claude Code
|
|
12
|
+
- Search and filter functionality
|
|
13
|
+
- Complete internationalization (Chinese/English)
|
|
14
|
+
|
|
15
|
+
### Backend API (9 new endpoints)
|
|
16
|
+
- `GET /api/mcp-servers` - Get all MCP servers
|
|
17
|
+
- `POST /api/mcp-servers` - Add new MCP server
|
|
18
|
+
- `PUT /api/mcp-servers/:name` - Update MCP server
|
|
19
|
+
- `DELETE /api/mcp-servers/:name` - Delete MCP server
|
|
20
|
+
- `POST /api/mcp-servers/:name/test` - Test connection
|
|
21
|
+
- `POST /api/mcp-servers/:name/enable` - Enable for project
|
|
22
|
+
- `POST /api/mcp-servers/:name/disable` - Disable for project
|
|
23
|
+
- `GET /api/mcp-servers/enabled` - Get enabled servers
|
|
24
|
+
- `POST /api/mcp-servers/sync` - Sync configuration
|
|
25
|
+
|
|
26
|
+
### Frontend UI Enhancements
|
|
27
|
+
- **Tab Navigation System**
|
|
28
|
+
- Accounts management tab
|
|
29
|
+
- MCP servers management tab
|
|
30
|
+
- Smooth tab switching with event listeners
|
|
31
|
+
|
|
32
|
+
- **MCP Server Management Interface**
|
|
33
|
+
- Card-based layout matching existing design
|
|
34
|
+
- Dynamic forms based on server type
|
|
35
|
+
- Environment variables and headers support
|
|
36
|
+
- Status indicators (enabled/disabled)
|
|
37
|
+
- Real-time search and filtering
|
|
38
|
+
|
|
39
|
+
## 🐛 Bug Fixes
|
|
40
|
+
|
|
41
|
+
### Fixed: Account Data Not Showing
|
|
42
|
+
- **Issue**: After adding tabs, account data disappeared
|
|
43
|
+
- **Cause**: Incorrect HTML structure and indentation
|
|
44
|
+
- **Fix**: Corrected tab div structure and proper indentation
|
|
45
|
+
|
|
46
|
+
### Fixed: switchTab is not defined
|
|
47
|
+
- **Issue**: JavaScript error when clicking tabs
|
|
48
|
+
- **Cause**: Function defined after being used in onclick
|
|
49
|
+
- **Fix**: Replaced onclick attributes with event listeners using DOMContentLoaded
|
|
50
|
+
|
|
51
|
+
### Fixed: Incorrect Search Result Messages
|
|
52
|
+
- **Issue**: When search has no results, showed "Add your first account" message
|
|
53
|
+
- **Cause**: Did not distinguish between "no data" and "no search results"
|
|
54
|
+
- **Fix**: Smart detection of filtered state vs empty state
|
|
55
|
+
- No data: Shows "Add your first..." message
|
|
56
|
+
- No search results: Shows "No matching results found"
|
|
57
|
+
|
|
58
|
+
## ✨ Improvements
|
|
59
|
+
|
|
60
|
+
### User Experience
|
|
61
|
+
- Better error messages for search results
|
|
62
|
+
- Clearer distinction between empty state and filtered state
|
|
63
|
+
- Improved tab navigation with proper event handling
|
|
64
|
+
- Consistent UI design across all features
|
|
65
|
+
|
|
66
|
+
### Code Quality
|
|
67
|
+
- Modern JavaScript practices (event listeners vs onclick)
|
|
68
|
+
- Better separation of concerns
|
|
69
|
+
- Improved maintainability
|
|
70
|
+
- Comprehensive error handling
|
|
71
|
+
|
|
72
|
+
### Internationalization
|
|
73
|
+
- Complete Chinese translations for MCP features
|
|
74
|
+
- Complete English translations for MCP features
|
|
75
|
+
- Consistent translation keys
|
|
76
|
+
|
|
77
|
+
## 📊 Testing
|
|
78
|
+
|
|
79
|
+
### Automated Tests
|
|
80
|
+
- 32/32 tests passing
|
|
81
|
+
- Comprehensive coverage of all features
|
|
82
|
+
- Verification scripts included
|
|
83
|
+
|
|
84
|
+
### Manual Testing
|
|
85
|
+
- Test guides provided
|
|
86
|
+
- Step-by-step instructions
|
|
87
|
+
- Expected results documented
|
|
88
|
+
|
|
89
|
+
## 📁 New Files
|
|
90
|
+
|
|
91
|
+
### Documentation
|
|
92
|
+
- `MCP-UI-IMPLEMENTATION.md` - Complete implementation guide
|
|
93
|
+
- `FIXED-ISSUES.md` - Detailed problem fixes
|
|
94
|
+
- `SEARCH-FIX.md` - Search result fix documentation
|
|
95
|
+
- `QUICK-TEST.md` - Quick testing guide
|
|
96
|
+
- `TEST-NOW.md` - Immediate testing instructions
|
|
97
|
+
- `CHANGELOG-v1.7.0.md` - This file
|
|
98
|
+
|
|
99
|
+
### Testing
|
|
100
|
+
- `verify-implementation.js` - Automated verification script
|
|
101
|
+
- `test-ui.html` - Manual testing guide
|
|
102
|
+
|
|
103
|
+
## 🔧 Technical Details
|
|
104
|
+
|
|
105
|
+
### Modified Files
|
|
106
|
+
- `src/ui-server.js` - Main implementation file
|
|
107
|
+
- Added 9 API handler methods
|
|
108
|
+
- Added MCP tab HTML structure
|
|
109
|
+
- Added MCP modal HTML
|
|
110
|
+
- Added MCP JavaScript functions
|
|
111
|
+
- Added MCP translations (zh/en)
|
|
112
|
+
- Added tab navigation CSS
|
|
113
|
+
- Fixed switchTab function placement
|
|
114
|
+
- Fixed search result messages
|
|
115
|
+
|
|
116
|
+
### Code Statistics
|
|
117
|
+
- Lines added: ~1500
|
|
118
|
+
- API endpoints: +9
|
|
119
|
+
- JavaScript functions: +15
|
|
120
|
+
- Translations: +40 keys
|
|
121
|
+
- Tests: 32 automated tests
|
|
122
|
+
|
|
123
|
+
## 🎯 Migration Guide
|
|
124
|
+
|
|
125
|
+
### For Users
|
|
126
|
+
No migration needed. All existing functionality remains unchanged.
|
|
127
|
+
|
|
128
|
+
### For Developers
|
|
129
|
+
If you've customized the UI:
|
|
130
|
+
1. Tab navigation now uses event listeners instead of onclick
|
|
131
|
+
2. Search results have improved empty state handling
|
|
132
|
+
3. New MCP management APIs available
|
|
133
|
+
|
|
134
|
+
## 🚀 Upgrade Instructions
|
|
135
|
+
|
|
136
|
+
### From v1.6.x to v1.7.0
|
|
137
|
+
|
|
138
|
+
1. **Update package**:
|
|
139
|
+
```bash
|
|
140
|
+
npm install -g ai-account-switch@1.7.0
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
2. **Verify installation**:
|
|
144
|
+
```bash
|
|
145
|
+
ais --version
|
|
146
|
+
# Should show: 1.7.0
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
3. **Test new features**:
|
|
150
|
+
```bash
|
|
151
|
+
ais ui
|
|
152
|
+
# Navigate to MCP Servers tab
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## 📝 Breaking Changes
|
|
156
|
+
|
|
157
|
+
None. This is a backward-compatible release.
|
|
158
|
+
|
|
159
|
+
## 🙏 Acknowledgments
|
|
160
|
+
|
|
161
|
+
- Comprehensive testing and verification
|
|
162
|
+
- User feedback incorporated
|
|
163
|
+
- Production-ready code quality
|
|
164
|
+
|
|
165
|
+
## 📚 Resources
|
|
166
|
+
|
|
167
|
+
- [README.md](README.md) - Main documentation
|
|
168
|
+
- [MCP-UI-IMPLEMENTATION.md](MCP-UI-IMPLEMENTATION.md) - Implementation details
|
|
169
|
+
- [QUICK-TEST.md](QUICK-TEST.md) - Testing guide
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
**Release Date**: 2025-11-12
|
|
174
|
+
**Version**: 1.7.0
|
|
175
|
+
**Status**: Stable
|
|
176
|
+
**Tests**: 32/32 passing
|