feat(daily-prep): load persisted prep log into the terminal on open
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -518,6 +518,21 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
Bind(null);
|
||||
IsNotesMode = false;
|
||||
IsPrepMode = true;
|
||||
_ = LoadLastPrepLogIfEmptyAsync();
|
||||
}
|
||||
|
||||
public async Task LoadLastPrepLogIfEmptyAsync()
|
||||
{
|
||||
if (_worker is null || IsPrepRunning || PrepLog.Count > 0) return;
|
||||
string text;
|
||||
try { text = await _worker.GetLastPrepLogAsync(); }
|
||||
catch { return; }
|
||||
if (IsPrepRunning || PrepLog.Count > 0) return;
|
||||
foreach (var line in text.Split('\n'))
|
||||
{
|
||||
var trimmed = line.TrimEnd('\r');
|
||||
if (trimmed.Length > 0) AppendStdoutLine(PrepLog, trimmed);
|
||||
}
|
||||
}
|
||||
|
||||
public void Bind(TaskRowViewModel? row)
|
||||
|
||||
Reference in New Issue
Block a user