Detail: always fetch live summary for open file — voice tag was invisible for library-opened files (the report's own '## Summary' section defeated the fetch heuristic)
This commit is contained in:
parent
3e1ec8eff8
commit
25d53cb251
1 changed files with 6 additions and 4 deletions
|
|
@ -1065,10 +1065,12 @@ class DesktopState(private val appDir: File = defaultAppDir()) {
|
||||||
if (_detail.value?.file != file) return@launch
|
if (_detail.value?.file != file) return@launch
|
||||||
}
|
}
|
||||||
if (remoteId == null) return@launch
|
if (remoteId == null) return@launch
|
||||||
// Report written before a summary existed (or lost a race):
|
// Voice tag + re-summarize state need the live SummaryData,
|
||||||
// pull finished outputs so the detail view isn't stale.
|
// not just the rendered report: whenever the open file has no
|
||||||
val report = d.reportText
|
// summary loaded yet, fetch transcript+summary from the engine
|
||||||
if (d.transcript == null && !report.isNullOrBlank() && !report.contains("## Summary")) {
|
// (the old "report contains ## Summary" shortcut left the
|
||||||
|
// voice tag invisible for every library-opened file).
|
||||||
|
if (d.summary == null) {
|
||||||
val t = runCatching { parseTranscript(provider.fetchTranscript(remoteId)) }
|
val t = runCatching { parseTranscript(provider.fetchTranscript(remoteId)) }
|
||||||
.getOrNull()
|
.getOrNull()
|
||||||
val s = runCatching { parseSummary(provider.fetchSummary(remoteId)) }
|
val s = runCatching { parseSummary(provider.fetchSummary(remoteId)) }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue