Detail: voice chip click re-summarizes immediately; separate Re-summarize button removed (redundant)
This commit is contained in:
parent
25d53cb251
commit
8f7e1f9ea5
1 changed files with 12 additions and 11 deletions
|
|
@ -840,17 +840,25 @@ fun DetailScreen(state: DesktopState) {
|
|||
val hasSummary = detail.summary != null ||
|
||||
(report?.contains("## Summary") == true)
|
||||
val remoteKnown = state.remoteIdFor(detail.file) != null
|
||||
// Personality for the next summary: pick a voice, then hit
|
||||
// Re-summarize. Neutral = the plain house voice.
|
||||
// A voice chip IS the action: clicking one re-summarizes in
|
||||
// that voice immediately — no separate Re-summarize button.
|
||||
val sumBusy = detail.jobs.firstOrNull { it.jobType == "summarize" }
|
||||
?.status in setOf("queued", "running")
|
||||
val voicesEnabled = remoteKnown && hasTranscript && !sumBusy
|
||||
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text("Summarize in the voice of",
|
||||
Text(if (hasSummary) "Re-summarize in the voice of"
|
||||
else "Summarize in the voice of",
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
SUMMARIZE_PERSONAS.forEach { (label, tone) ->
|
||||
FilterChip(
|
||||
selected = sumTone == tone,
|
||||
onClick = { sumTone = tone },
|
||||
enabled = voicesEnabled,
|
||||
onClick = {
|
||||
sumTone = tone
|
||||
state.summarize(tone)
|
||||
},
|
||||
label = { Text(label) },
|
||||
)
|
||||
}
|
||||
|
|
@ -860,13 +868,6 @@ fun DetailScreen(state: DesktopState) {
|
|||
TextButton({ state.transcribe() }) {
|
||||
Text(if (hasTranscript) "Re-transcribe" else "Transcribe")
|
||||
}
|
||||
TextButton({ state.summarize(sumTone) },
|
||||
enabled = remoteKnown && hasTranscript) {
|
||||
Text(buildString {
|
||||
append(if (hasSummary) "Re-summarize" else "Summarize")
|
||||
sumTone?.let { append(" · $it") }
|
||||
})
|
||||
}
|
||||
}
|
||||
// Progress right where the buttons are: the busy spinner near
|
||||
// the top is off-screen once a report fills the page, which
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue