fix: Fix critical TUI issues

- Use password mode for API Key input (security)
- Fix input box display with proper CSS
- Fix message sending crash with safe handling
- Simplify message processing to avoid async issues
- Add error handling and user feedback
- Improve input field styling
This commit is contained in:
JianFeeeee
2026-04-10 17:35:39 +08:00
parent 4bc5bd3e41
commit 60d2f60495
3 changed files with 61 additions and 26 deletions

View File

@ -29,6 +29,7 @@ ConfigSection Input {
margin: 0 0 1 0;
background: $surface-lighten-1;
border: solid $primary;
color: $text;
}
ConfigSection Input:focus {
@ -38,35 +39,25 @@ ConfigSection Input:focus {
/* Input Box */
InputBox {
border: solid orange;
height: 3;
margin: 1;
background: $surface;
padding: 1;
}
InputBox:focus {
border: double orange;
text-style: bold;
height: auto;
}
InputBox Input {
width: 1fr;
height: 1;
background: $surface;
color: $text;
border: none;
border: solid $primary;
padding: 1;
}
InputBox Input:focus {
border: double $accent;
background: $surface-lighten-1;
}
/* Other Components */
ConfigSection {
background: $panel;
margin: 1;
}
OperationLog {
background: $surface-darken-1;
height: 1fr;