feat: write the UI in English, select only conversation content
- source strings are English again; Chinese comes from lib/l10n/zh.dart through tr()/trArgs() and AppText, and a language without a table (Spanish, ...) reads English instead of Chinese - server and user data (titles, messages, file names, notes, task names) is drawn with plain Text, so it is never looked up in the table - SelectionArea moved from the whole message list to the messages, the answer text, an opened tool call's details and the turn footer; status lines and folded tool rows no longer start a selection - a message the transcript does not know (its start event was lost while the stream was down) fetches the tail once, so a turn continued from another client comes in with its prompt - bump to 0.5.3
This commit is contained in:
1 parent
7b5bccf28f
commit
511c3b006b
43 files changed
+1620
-1791
No files matched your search
@@ -121,20 +121,20 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
ThemeData theme, TerminalTab tab, TerminalSessionState state) {
|
||||
final scheme = theme.colorScheme;
|
||||
final (label, color) = switch (state.link) {
|
||||
TerminalLinkState.idle => (tr('未启动'), theme.hintColor),
|
||||
TerminalLinkState.creating => (tr('正在创建…'), theme.hintColor),
|
||||
TerminalLinkState.connecting => (tr('正在连接…'), theme.hintColor),
|
||||
TerminalLinkState.idle => (tr('Not started'), theme.hintColor),
|
||||
TerminalLinkState.creating => (tr('Creating…'), theme.hintColor),
|
||||
TerminalLinkState.connecting => (tr('Connecting…'), theme.hintColor),
|
||||
TerminalLinkState.reconnecting =>
|
||||
(tr('连接中断,正在重连…'), scheme.error),
|
||||
TerminalLinkState.open => (tr('运行中'), scheme.primary),
|
||||
TerminalLinkState.exited => (state.detail ?? tr('已退出'), theme.hintColor),
|
||||
TerminalLinkState.error => (state.detail ?? tr('连接失败'), scheme.error),
|
||||
(tr('Connection lost, reconnecting…'), scheme.error),
|
||||
TerminalLinkState.open => (tr('Running'), scheme.primary),
|
||||
TerminalLinkState.exited => (state.detail ?? tr('Exited'), theme.hintColor),
|
||||
TerminalLinkState.error => (state.detail ?? tr('Connection failed'), scheme.error),
|
||||
};
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: PopupMenuButton<int>(
|
||||
tooltip: tr('切换终端'),
|
||||
tooltip: tr('Switch terminal'),
|
||||
position: PopupMenuPosition.under,
|
||||
onSelected: _onTabMenu,
|
||||
itemBuilder: (_) => [
|
||||
@@ -154,7 +154,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: AppText(
|
||||
child: Text(
|
||||
_workspace.tabs[i].label,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -170,7 +170,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
children: [
|
||||
Icon(Icons.add, size: 18),
|
||||
SizedBox(width: 10),
|
||||
AppText('新建终端'),
|
||||
AppText('New terminal'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -183,7 +183,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
Icon(Icons.circle, size: 8, color: color),
|
||||
const SizedBox(width: 6),
|
||||
Flexible(
|
||||
child: AppText(
|
||||
child: Text(
|
||||
tab.label,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -193,7 +193,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: AppText(
|
||||
child: Text(
|
||||
'· $label',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -207,13 +207,13 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: tr('键盘'),
|
||||
tooltip: tr('Keyboard'),
|
||||
visualDensity: VisualDensity.compact,
|
||||
icon: const Icon(Icons.keyboard_outlined, size: 18),
|
||||
onPressed: () => _focus.requestFocus(),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: tr('重新启动'),
|
||||
tooltip: tr('Restart'),
|
||||
visualDensity: VisualDensity.compact,
|
||||
icon: const Icon(Icons.restart_alt, size: 18),
|
||||
onPressed: state.link == TerminalLinkState.exited ||
|
||||
@@ -223,7 +223,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
: null,
|
||||
),
|
||||
PopupMenuButton<String>(
|
||||
tooltip: tr('更多'),
|
||||
tooltip: tr('More'),
|
||||
icon: const Icon(Icons.more_vert, size: 18),
|
||||
onSelected: (value) {
|
||||
switch (value) {
|
||||
@@ -236,8 +236,8 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
}
|
||||
},
|
||||
itemBuilder: (_) => const [
|
||||
PopupMenuItem(value: 'clear', child: AppText('清屏')),
|
||||
PopupMenuItem(value: 'close', child: AppText('关闭此终端')),
|
||||
PopupMenuItem(value: 'clear', child: AppText('Clear screen')),
|
||||
PopupMenuItem(value: 'close', child: AppText('Close this terminal')),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -336,7 +336,7 @@ class _TerminalPanelState extends State<TerminalPanel> {
|
||||
border: Border.all(
|
||||
color: active ? scheme.primary : Colors.transparent, width: 1),
|
||||
),
|
||||
child: AppText(
|
||||
child: Text(
|
||||
label,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
|
||||
Reference in new issue
Block a user