Commit a296b9d
fix(tui): enable paste in MCP server configuration modal (#276)
Previously, when adding an MCP server (HTTP or stdio) or setting API keys,
users could not paste text into the input fields. This was because the
paste event (EngineEvent::Paste) was only routed to Form modals and the
main input widget, not to the unified modal stack that includes the MCP
manager modal.
Changes:
- Add handle_paste method to the Modal trait with default no-op impl
- Add handle_paste method to ModalStack to delegate to top modal
- Implement handle_paste in McpManagerModal for all text input modes:
- AddStdioServer (name, command, args fields)
- AddHttpServer (name, url fields)
- SetAuth (api_key field)
- SelectFromRegistry (search_query field)
- Update event loop to check modal_stack for paste events first
Co-authored-by: Droid Agent <droid@factory.ai>1 parent 3be8563 commit a296b9d
File tree
3 files changed
+61
-2
lines changed- cortex-tui/src
- modal
- runner
3 files changed
+61
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
1419 | 1459 | | |
1420 | 1460 | | |
1421 | 1461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
246 | 262 | | |
247 | 263 | | |
248 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | | - | |
1676 | | - | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1677 | 1679 | | |
1678 | 1680 | | |
| 1681 | + | |
1679 | 1682 | | |
1680 | 1683 | | |
1681 | 1684 | | |
| |||
0 commit comments