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:
blumia committed 2026-11-26 11:48:16 +08:00
1 parent 7b5bccf28f
commit 511c3b006b
43 files changed
+1620 -1791

No files matched your search

+16 -16
View File
@@ -177,7 +177,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
} catch (e) {
if (mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: AppText(trArgs('选择失败:{0}', [e]))));
.showSnackBar(SnackBar(content: AppText(trArgs('Could not attach: {0}', [e]))));
}
} finally {
if (mounted) setState(() => _attaching = false);
@@ -208,14 +208,14 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
? null
: IconButton(
icon: const Icon(Icons.menu),
tooltip: tr('会话'),
tooltip: tr('Sessions'),
onPressed: widget.onOpenSessions,
),
title: const AppText('新会话'),
title: const AppText('New session'),
actions: [
IconButton(
icon: const Icon(Icons.folder_open_outlined),
tooltip: tr('文件'),
tooltip: tr('Files'),
onPressed: () => showFilesPanel(context, app, draft.directory),
),
],
@@ -230,7 +230,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
child: Padding(
padding: const EdgeInsets.all(32),
child: AppText(
'我们今天要做什么?',
'What are we building today?',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 26,
@@ -253,7 +253,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
if (draft.error != null)
Padding(
padding: const EdgeInsets.only(bottom: 6),
child: AppText(
child: Text(
draft.error!,
style: TextStyle(
fontSize: 12.5, color: scheme.error),
@@ -301,8 +301,8 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
const SizedBox(width: 5),
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 170),
child: AppText(
label.isEmpty ? '选择项目' : label,
child: Text(
label.isEmpty ? tr('Choose project') : label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12.5, color: theme.hintColor),
@@ -323,7 +323,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
Widget body = ComposerBox(
controller: _text,
focusNode: _inputFocus,
hint: tr('规划、构建或提问'),
hint: tr('Plan, build, or ask'),
maxLines: 5,
keyboardInset: keyboardInset,
textInputAction:
@@ -355,7 +355,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
},
leading: _roundKey(
icon: Icons.attach_file,
label: tr('添加附件'),
label: tr('Add attachment'),
onTap: _pickFiles,
busy: _attaching,
),
@@ -478,7 +478,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
children: [
const Padding(
padding: EdgeInsets.fromLTRB(16, 14, 16, 6),
child: AppText('选择项目',
child: AppText('Choose project',
style:
TextStyle(fontSize: 17, fontWeight: FontWeight.w600)),
),
@@ -490,8 +490,8 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
dense: true,
leading: ProjectIcon(
app: widget.app, chat: true, size: 20),
title: const AppText('聊天'),
subtitle: const AppText('不关联项目,保存在 OpenChamber 的聊天目录'),
title: const AppText('Chat'),
subtitle: const AppText('Not tied to a project, saved in OpenChamber\'s chat directory'),
trailing: draft.directory == AppState.chatTarget
? Icon(Icons.check,
size: 18,
@@ -509,9 +509,9 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
dense: true,
leading:
ProjectIcon(app: widget.app, project: project, size: 20),
title: AppText(project.label,
title: Text(project.label,
maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: AppText(project.canonical,
subtitle: Text(project.canonical,
maxLines: 1, overflow: TextOverflow.ellipsis),
trailing: project.canonical == draft.directory
? Icon(Icons.check,
@@ -528,7 +528,7 @@ class _NewSessionScreenState extends State<NewSessionScreen> {
if (projects.isEmpty)
const Padding(
padding: EdgeInsets.all(24),
child: AppText('没有可用的项目', textAlign: TextAlign.center),
child: AppText('No projects available', textAlign: TextAlign.center),
),
],
),