Chat: create an unnamed chat without a title; 24-hour Send later picker; capture fixtures
The repository refused a blank title before sending it, so clearing the Name failed with "Enter a chat name"; it now omits the title and only requires a directory. The Send later time picker uses the 24-hour clock of the Scheduled line. The capture fixture gains ?harnesses=1 (three harnesses, two folders) and ?tables=1 (wrapping, long-token and too-wide tables). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
// one with a failed command) split by background-task notices;
|
||||
// `?links=1` answers and operator turns carry a markdown link, an
|
||||
// autolink, a bare URL and URLs inside code (linked too);
|
||||
// `?tables=1` answers carry a wrapping table, one with a long token and
|
||||
// one too wide for a phone (it scrolls sideways);
|
||||
// `?timestamps=1` messages carry recorded times over two calendar days.
|
||||
import 'dart:async';
|
||||
|
||||
@@ -144,9 +146,27 @@ String _answer(int i) {
|
||||
: '';
|
||||
return '## Answer $i\n\nSome **bold** text with `code`.\n\n'
|
||||
'```dart\n${List.generate(8, (l) => 'final v$l = $i * $l;').join('\n')}'
|
||||
'\n```\n$wide\n- one\n- two\n${_links ? _answerLinks : ''}';
|
||||
'\n```\n$wide${_tables ? _answerTables : ''}\n- one\n- two\n'
|
||||
'${_links ? _answerLinks : ''}';
|
||||
}
|
||||
|
||||
bool get _tables => _params['tables'] == '1';
|
||||
|
||||
/// `?tables=1`: a table whose prose wraps to fit, one with a long unbroken
|
||||
/// token, and one whose words cannot fit a phone side by side.
|
||||
const _answerTables =
|
||||
'\n| Column | Description | Status |\n| --- | --- | --- |\n'
|
||||
'| Parser | Reads the markdown source and keeps each table cell as '
|
||||
'written, so wrapping happens only between words | Done |\n'
|
||||
'| Renderer | Lays the cells out at the transcript width | Review |\n\n'
|
||||
'| Commit | Link |\n| --- | --- |\n'
|
||||
'| 4f1c2a9 | https://example.com/pipelines/commit/'
|
||||
'4f1c2a9e0b7d3c6f5a8e1d2c3b4a5f6e7d8c9b0a |\n\n'
|
||||
'| Component | Ownership | Lifecycle | Dependencies | Deployment | '
|
||||
'Monitoring |\n| --- | --- | --- | --- | --- | --- |\n'
|
||||
'| scheduler | platform | long-lived | database | kubernetes | '
|
||||
'prometheus |\n\n';
|
||||
|
||||
const _answerLinks =
|
||||
'\nRead [the release notes](https://example.com/releases/v2) or '
|
||||
'<https://example.com/auto>; the bare https://example.com/bare/path. '
|
||||
|
||||
@@ -170,6 +170,10 @@ String? _liveRunStatus;
|
||||
bool _htmlArtifact = false;
|
||||
bool _warnings = false;
|
||||
|
||||
/// `?harnesses=1` offers three chat harnesses and two workspace folders in the
|
||||
/// New chat dialog, so its per-folder harness default can be reviewed.
|
||||
bool _harnesses = false;
|
||||
|
||||
/// `?turn=1` adds the runner-internal turn files the server records for a model
|
||||
/// visit (group `debug`) to run 7's build visit, so the Artifacts tab's hidden
|
||||
/// Debugging files group can be reviewed.
|
||||
@@ -584,13 +588,17 @@ JsonMap? probeReply(JsonMap request) {
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'chat_backends',
|
||||
'chat_backends': ['opencode'],
|
||||
'chat_backends': _harnesses
|
||||
? ['claude', 'codex', 'opencode']
|
||||
: ['opencode'],
|
||||
};
|
||||
case 'chat_directories':
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'chat_directories',
|
||||
'chat_directories': ['/Users/fixture/workspace'],
|
||||
'chat_directories': _harnesses
|
||||
? ['/Users/fixture', '/Users/fixture/app', '/Users/fixture/site']
|
||||
: ['/Users/fixture/workspace'],
|
||||
};
|
||||
case 'chat_sessions':
|
||||
return {
|
||||
@@ -963,6 +971,7 @@ Future<void> main() async {
|
||||
probeUsage = params['usage'] == '1';
|
||||
_htmlArtifact = params['html'] == '1';
|
||||
_warnings = params['warnings'] == '1';
|
||||
_harnesses = params['harnesses'] == '1';
|
||||
_turnFiles = params['turn'] == '1';
|
||||
final route = params['route'];
|
||||
final opensRoute = route != null && route.startsWith('/');
|
||||
|
||||
Reference in New Issue
Block a user