Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/agent/profile_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *profileController) maybeEscalate() (PostureEscalation, bool) {
if c.policy == nil || c.escalated {
return PostureEscalation{}, false
}
if !(c.failureTripped || c.riskTripped || c.scTripped || c.uncertainTrip) {
if !c.failureTripped && !c.riskTripped && !c.scTripped && !c.uncertainTrip {
return PostureEscalation{}, false
}
c.escalated = true
Expand Down
4 changes: 1 addition & 3 deletions internal/agenteval/score.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ func Score(suite Suite, input ScoreInput) Report {
if len(task.RequiredTraceEvents) > 0 {
report.Results = append(report.Results, scoreTraceEvents(task.RequiredTraceEvents, input))
}
for _, result := range unknownCommandResults(input.CommandResults, seenCommands, input) {
report.Results = append(report.Results, result)
}
report.Results = append(report.Results, unknownCommandResults(input.CommandResults, seenCommands, input)...)
report.finishSummary()
return report
}
Expand Down
6 changes: 3 additions & 3 deletions internal/agentinit/agentinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func FormatFacts(info repoinfo.Info) string {
b.WriteString("Pre-computed repository facts (from a local scan — verify and fill gaps):\n")

if info.PrimaryLanguage != "" {
b.WriteString(fmt.Sprintf("- Primary language: %s (of %d detected)\n", info.PrimaryLanguage, info.LanguageCount))
fmt.Fprintf(&b, "- Primary language: %s (of %d detected)\n", info.PrimaryLanguage, info.LanguageCount)
}
if langs := topLanguages(info.Languages, 5); langs != "" {
b.WriteString("- Languages: " + langs + "\n")
}
b.WriteString(fmt.Sprintf("- Size: ~%d files, ~%d LOC, max dir depth %d\n", info.FileCount, info.LOCEstimate, info.MaxDepth))
fmt.Fprintf(&b, "- Size: ~%d files, ~%d LOC, max dir depth %d\n", info.FileCount, info.LOCEstimate, info.MaxDepth)
if info.WorkspaceType != "" && info.WorkspaceType != "none" {
b.WriteString(fmt.Sprintf("- Workspace: %s (%d packages)\n", info.WorkspaceType, info.WorkspacePackageCount))
fmt.Fprintf(&b, "- Workspace: %s (%d packages)\n", info.WorkspaceType, info.WorkspacePackageCount)
}
if len(info.BuildTools) > 0 {
b.WriteString("- Build tools: " + strings.Join(info.BuildTools, ", ") + "\n")
Expand Down
4 changes: 1 addition & 3 deletions internal/cli/agent_eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,7 @@ func agentEvalReportFromBenchmark(suite agenteval.Suite, report agenteval.Benchm
if task.Agent.Truncated {
converted.Truncated = true
}
for _, failure := range agentEvalFailuresFromTaskReport(task) {
converted.Failures = append(converted.Failures, failure)
}
converted.Failures = append(converted.Failures, agentEvalFailuresFromTaskReport(task)...)
}
return converted
}
Expand Down
2 changes: 0 additions & 2 deletions internal/cli/mcp_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,14 +734,12 @@ func (cfg *mcpWritableConfig) setServerDisabled(name string, disabled bool) (boo
switch {
case legacyFound:
raw = legacyRaw
found = true
case config.IsDefaultMCPServer(name):
// A built-in default server isn't written to the file until the user
// overrides it. Treat it as present with an empty base so disabling it
// writes a minimal {"disabled":true} entry that merges over the default —
// letting `zero mcp disable <default>` work even though it lives in code.
raw = nil
found = true
default:
return false, false, nil
}
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/provider_detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func runProvidersDetect(args []string, stdout io.Writer, stderr io.Writer, deps
func parseProviderDetectArgs(args []string) (providerDetectOptions, bool, error) {
options := providerDetectOptions{}
for _, arg := range args {
switch {
case arg == "-h" || arg == "--help" || arg == "help":
switch arg {
case "-h", "--help", "help":
return options, true, nil
case arg == "--json":
case "--json":
options.json = true
default:
return options, false, execUsageError{fmt.Sprintf("unexpected argument %q", arg)}
Expand Down
18 changes: 9 additions & 9 deletions internal/cli/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ func parseUsageArgs(args []string) (usageOptions, bool, error) {
func FormatReport(report usage.Report, insertions int, deletions int) string {
var builder strings.Builder
builder.WriteString("Usage report (cost is a reconstructed estimate)\n\n")
builder.WriteString(fmt.Sprintf("%-12s %10s %14s %14s\n", "date", "requests", "tokens", "est. cost"))
fmt.Fprintf(&builder, "%-12s %10s %14s %14s\n", "date", "requests", "tokens", "est. cost")
for _, bucket := range report.Buckets {
builder.WriteString(fmt.Sprintf("%-12s %10d %14s %14s\n",
bucket.Date, bucket.Requests, groupThousands(bucket.TotalTokens), formatUSD(bucket.TotalCost)))
fmt.Fprintf(&builder, "%-12s %10d %14s %14s\n",
bucket.Date, bucket.Requests, groupThousands(bucket.TotalTokens), formatUSD(bucket.TotalCost))
}
builder.WriteString(fmt.Sprintf("\n%-12s %10d %14s %14s\n",
"total", report.Total.Requests, groupThousands(report.Total.TotalTokens), formatUSD(report.Total.TotalCost)))
fmt.Fprintf(&builder, "\n%-12s %10d %14s %14s\n",
"total", report.Total.Requests, groupThousands(report.Total.TotalTokens), formatUSD(report.Total.TotalCost))

builder.WriteString(fmt.Sprintf("\nnet LOC (estimate): +%d / -%d = %d\n",
insertions, deletions, report.NetLOC))
fmt.Fprintf(&builder, "\nnet LOC (estimate): +%d / -%d = %d\n",
insertions, deletions, report.NetLOC)
if report.NetLOCPositive {
builder.WriteString(fmt.Sprintf("tokens per net LOC: %.1f\n", report.TokensPerNetLOC))
builder.WriteString(fmt.Sprintf("est. cost per net LOC: %s\n", formatUSD(report.CostPerNetLOC)))
fmt.Fprintf(&builder, "tokens per net LOC: %.1f\n", report.TokensPerNetLOC)
fmt.Fprintf(&builder, "est. cost per net LOC: %s\n", formatUSD(report.CostPerNetLOC))
} else {
builder.WriteString("tokens per net LOC: n/a (net LOC <= 0)\n")
builder.WriteString("est. cost per net LOC: n/a (net LOC <= 0)\n")
Expand Down
2 changes: 1 addition & 1 deletion internal/config/mcp_merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func mergeMCPServer(base MCPServerConfig, next MCPServerConfig, canReenable bool
// server the user explicitly enabled. The only layer allowed to
// override an explicit higher-scope decision is the CLI override scope
// (canReenable=true).
if canReenable || !(baseDisabledSet && baseDisabled != next.Disabled) {
if canReenable || !baseDisabledSet || baseDisabled == next.Disabled {
base.Disabled = next.Disabled
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/dictation/transcriber_deepgram.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (d *deepgramTranscriber) StreamTranscribe(ctx context.Context, chunks <-cha
}
default:
}
return compose(), fmt.Errorf("Deepgram stream error: %w", err)
return compose(), fmt.Errorf("Deepgram stream error: %w", err) //nolint:staticcheck // Preserve established user-facing error text.
}
if typ != websocket.MessageText {
continue
Expand Down
4 changes: 2 additions & 2 deletions internal/imageinput/pdf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func buildMinimalPDF(text string) []byte {
buf.WriteString("0 " + strconv.Itoa(len(offsets)+1) + "\n")
buf.WriteString("0000000000 65535 f \n")
for _, off := range offsets {
buf.WriteString(fmt.Sprintf("%010d 00000 n \n", off))
fmt.Fprintf(&buf, "%010d 00000 n \n", off)
}
buf.WriteString("trailer\n<< /Size " + strconv.Itoa(len(offsets)+1) + " /Root 1 0 R >>\n")
buf.WriteString("startxref\n" + strconv.Itoa(xrefStart) + "\n%%EOF\n")
Expand Down Expand Up @@ -277,7 +277,7 @@ func buildEmptyTextPDF() []byte {
buf.WriteString("0 " + strconv.Itoa(len(offsets)+1) + "\n")
buf.WriteString("0000000000 65535 f \n")
for _, off := range offsets {
buf.WriteString(fmt.Sprintf("%010d 00000 n \n", off))
fmt.Fprintf(&buf, "%010d 00000 n \n", off)
}
buf.WriteString("trailer\n<< /Size " + strconv.Itoa(len(offsets)+1) + " /Root 1 0 R >>\n")
buf.WriteString("startxref\n" + strconv.Itoa(xrefStart) + "\n%%EOF\n")
Expand Down
5 changes: 3 additions & 2 deletions internal/lsp/navigate_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package lsp

import (
"context"
"encoding/json"
"testing"
)
Expand Down Expand Up @@ -64,7 +65,7 @@ func TestDecodeSymbols(t *testing.T) {

func TestNavigateUnknownOp(t *testing.T) {
m := NewManager(t.TempDir())
_, _, ok, err := m.Navigate(nil, NavRequest{Op: "bogus", Path: "x.go"})
_, _, ok, err := m.Navigate(context.TODO(), NavRequest{Op: "bogus", Path: "x.go"})
if err == nil {
t.Fatal("expected an error for an unknown nav op")
}
Expand All @@ -76,7 +77,7 @@ func TestNavigateUnknownOp(t *testing.T) {
func TestNavigateUnsupportedExtensionDegrades(t *testing.T) {
// A file type with no configured server degrades to ok=false, no error.
m := NewManager(t.TempDir())
_, _, ok, err := m.Navigate(nil, NavRequest{Op: NavDefinition, Path: "notes.unknownext", Line: 1, Character: 1})
_, _, ok, err := m.Navigate(context.TODO(), NavRequest{Op: NavDefinition, Path: "notes.unknownext", Line: 1, Character: 1})
if err != nil {
t.Fatalf("unsupported extension should not error, got %v", err)
}
Expand Down
8 changes: 4 additions & 4 deletions internal/providerhealth/providerhealth.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func validateEndpoint(ctx context.Context, endpoint string, resolver Resolver, a
return endpointSafetyError{message: "provider connectivity URL is unsafe: localhost hosts are blocked"}
}
if addr, err := netip.ParseAddr(normalized); err == nil {
if reason := blockedAddrReason(addr); reason != "" && !(allowLoopbackOrPrivate && (addr.IsLoopback() || addr.IsPrivate())) {
if reason := blockedAddrReason(addr); reason != "" && (!allowLoopbackOrPrivate || (!addr.IsLoopback() && !addr.IsPrivate())) {
return endpointSafetyError{message: "provider connectivity URL is unsafe: " + reason}
}
return nil
Expand All @@ -407,7 +407,7 @@ func validateEndpoint(ctx context.Context, endpoint string, resolver Resolver, a
return endpointSafetyError{message: "provider connectivity host resolved to no addresses"}
}
for _, addr := range addrs {
if reason := blockedAddrReason(addr); reason != "" && !(allowLoopbackOrPrivate && (addr.IsLoopback() || addr.IsPrivate())) {
if reason := blockedAddrReason(addr); reason != "" && (!allowLoopbackOrPrivate || (!addr.IsLoopback() && !addr.IsPrivate())) {
return endpointSafetyError{message: "provider connectivity URL is unsafe: " + reason}
}
}
Expand Down Expand Up @@ -529,7 +529,7 @@ func safeDialContext(resolver Resolver, allowLoopbackOrPrivate bool) func(contex
return nil, err
}
if addr, parseErr := netip.ParseAddr(host); parseErr == nil {
if reason := blockedAddrReason(addr); reason != "" && !(allowLoopbackOrPrivate && (addr.IsLoopback() || addr.IsPrivate())) {
if reason := blockedAddrReason(addr); reason != "" && (!allowLoopbackOrPrivate || (!addr.IsLoopback() && !addr.IsPrivate())) {
return nil, endpointSafetyError{message: "provider connectivity URL is unsafe: " + reason}
}
return dialer.DialContext(ctx, network, address)
Expand All @@ -542,7 +542,7 @@ func safeDialContext(resolver Resolver, allowLoopbackOrPrivate bool) func(contex
return nil, endpointSafetyError{message: "provider connectivity host resolved to no addresses"}
}
for _, addr := range addrs {
if reason := blockedAddrReason(addr); reason != "" && !(allowLoopbackOrPrivate && (addr.IsLoopback() || addr.IsPrivate())) {
if reason := blockedAddrReason(addr); reason != "" && (!allowLoopbackOrPrivate || (!addr.IsLoopback() && !addr.IsPrivate())) {
return nil, endpointSafetyError{message: "provider connectivity URL is unsafe: " + reason}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provideronboarding/localruntime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestDetectLocalRuntimesReportsReachableRuntime(t *testing.T) {
if !detected[0].Reachable {
t.Fatalf("runtime should be reachable: %#v", detected[0])
}
if detected[0].Models == nil || len(detected[0].Models) == 0 || detected[0].Models[0] != "llama3.1" {
if len(detected[0].Models) == 0 || detected[0].Models[0] != "llama3.1" {
t.Fatalf("expected discovered model list, got %#v", detected[0].Models)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/repomap/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func writePromptLine(builder *strings.Builder, format string, args ...any) {
if builder.Len() > 0 {
builder.WriteByte('\n')
}
builder.WriteString(fmt.Sprintf(format, args...))
fmt.Fprintf(builder, format, args...)
}

func clampBudget(text string, budget int) string {
Expand Down
2 changes: 1 addition & 1 deletion internal/sandbox/adapters.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (backend Backend) SandboxEnvMarkers(policy Policy) []string {
if policy.Mode == ModeDisabled {
return nil
}
if !(backend.CommandWrapping && backend.Available) && backend.Name != BackendWSL {
if (!backend.CommandWrapping || !backend.Available) && backend.Name != BackendWSL {
return nil
}
name := backend.Name
Expand Down
5 changes: 1 addition & 4 deletions internal/sandbox/command_prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ func unsafeCommandPrefix(prefix []string) bool {
return true
}
}
if unsafeCommandPrefixLauncher(prefix[0]) {
return true
}
return false
return unsafeCommandPrefixLauncher(prefix[0])
}

func unsafeCommandPrefixPart(part string) bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/sandbox/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (engine *Engine) shellSandboxActive(policy Policy) bool {
return false
}
backend := engine.backend
if !(backend.Available && backend.Executable != "" && backend.CommandWrapping && backend.NativeIsolation) {
if !backend.Available || backend.Executable == "" || !backend.CommandWrapping || !backend.NativeIsolation {
return false
}
// On Windows the command is only actually wrapped once `zero sandbox setup`
Expand Down
2 changes: 1 addition & 1 deletion internal/sandbox/landlock_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package sandbox

import "errors"

var ErrLandlockUnsupported = errors.New("Landlock is only supported on Linux")
var ErrLandlockUnsupported = errors.New("Landlock is only supported on Linux") //nolint:staticcheck // Preserve the exported sentinel's established text.

func ApplyLandlockFilesystemProfile(profile PermissionProfile, cwd string) error {
return ErrLandlockUnsupported
Expand Down
2 changes: 1 addition & 1 deletion internal/sandbox/windows_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
)

var ErrWindowsNetworkEnforcementUnavailable = errors.New("Windows sandbox network enforcement is not available")
var ErrWindowsNetworkEnforcementUnavailable = errors.New("Windows sandbox network enforcement is not available") //nolint:staticcheck // Preserve the exported sentinel's established text.

const (
windowsWFPProviderKey = "2e31d31c-3948-4753-9117-e5d1a6496f41"
Expand Down
2 changes: 1 addition & 1 deletion internal/specialist/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func runChildProcess(ctx context.Context, binaryPath string, args []string, prog
// ExitCode() is -1 when the child was terminated by a signal rather
// than exiting. ProcessState.String() is the portable description
// (e.g. "signal: killed") — capture it so the failure isn't opaque.
signalDesc = exitErr.ProcessState.String()
signalDesc = exitErr.String()
}
} else {
return ChildRunResult{Events: events, Stderr: stderr.String(), ExitCode: -1, Started: started}, fmt.Errorf("run specialist child: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/tui/command_center.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (m model) switchProviderModel(providerName, modelID string) (model, string,
// and a stored OAuth login (e.g. ChatGPT) is a credential too — the profile stays
// keyless on purpose so newProvider attaches the bearer resolver + login key.
if strings.TrimSpace(target.APIKey) == "" && strings.TrimSpace(target.AuthHeaderValue) == "" &&
!(hasDescriptor && descriptor.Local) && !oauthLoginAvailable(target) {
(!hasDescriptor || !descriptor.Local) && !oauthLoginAvailable(target) {
return m, "Model\nprovider " + strconv.Quote(providerName) + " has no usable credential — run setup or `zero auth login " + providerName + "`.", false, nil
}
next, err := m.newProvider(target)
Expand Down
21 changes: 0 additions & 21 deletions internal/tui/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strings"
"time"

tea "charm.land/bubbletea/v2"
"charm.land/lipgloss/v2"
"github.com/Gitlawb/zero/internal/dictation"
)
Expand Down Expand Up @@ -87,10 +86,6 @@ func (m model) scrollableTranscriptLayoutView(header string, body transcriptBody
return m.renderScrollableTranscriptWindow(frame, bodyWindow, window, width, overlay)
}

func (m model) scrollableTranscriptView(header string, body string, footer string, width int, overlay string) string {
return m.scrollableTranscriptLayoutView(header, transcriptBodyLayout{lines: viewLines(body)}, footer, width, overlay)
}

func (m model) overlayMouseTop(overlayHeight int, width int) int {
return m.overlayMouseRect(overlayHeight, width).y
}
Expand Down Expand Up @@ -230,17 +225,6 @@ func (d *streamingDecoder) tailLines() []string {
return out
}

// ensureAgeTickReschedule is a small helper used after a fade-state change
// to start the tick if it's not already running. The age-tick case
// short-circuits when fadeActive is false, so calling this on a no-op
// transition (e.g. a 0-byte delta) is safe.
func (m model) ensureAgeTickReschedule() tea.Cmd {
if !m.fadeActive {
return nil
}
return streamingFadeTick()
}

// newSTTDownloadPicker builds the model-download chooser, seeded with the
// curated shortlist. The full model list from the release is fetched
// asynchronously and merged in (see fetchSTTModelsCmd / handleSTTModelsFetched).
Expand Down Expand Up @@ -288,11 +272,6 @@ func transcriptViewportStartForFrame(body string, frame transcriptFrameLayout, s
return window.start, window.height, frame.bodyRect.y
}

func transcriptViewportStartForLayout(layout transcriptBodyLayout, frame transcriptFrameLayout, scrollOffset int) (int, int, int) {
window := transcriptViewportForLayout(layout, frame, scrollOffset).window()
return window.start, window.height, frame.bodyRect.y
}

func transcriptViewportForBody(body string, frame transcriptFrameLayout, offset int) transcriptViewport {
return newTranscriptViewport(len(viewLines(body)), frame.bodyRect.height, offset)
}
9 changes: 5 additions & 4 deletions internal/tui/files_git_sweep_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tui

import (
"context"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -192,7 +193,7 @@ func TestGitSweepCmdAgainstRealRepo(t *testing.T) {
run("commit", "-q", "-m", "seed")
write("pre-existing.txt", "dirt\n") // dirty BEFORE the TUI "opens"

baseline := gitSweepCmd(nil, dir, true)().(gitSweepMsg)
baseline := gitSweepCmd(context.TODO(), dir, true)().(gitSweepMsg)
if !baseline.ok || len(baseline.files) != 1 || baseline.files[0].path != "pre-existing.txt" {
t.Fatalf("baseline should see only the pre-existing dirt: %+v", baseline)
}
Expand All @@ -201,7 +202,7 @@ func TestGitSweepCmdAgainstRealRepo(t *testing.T) {
write("scaffolded.txt", "hello\n")
write("tracked.txt", "one\ntwo\nthree\nfour\n")

sweep := gitSweepCmd(nil, dir, false)().(gitSweepMsg)
sweep := gitSweepCmd(context.TODO(), dir, false)().(gitSweepMsg)
if !sweep.ok {
t.Fatal("sweep failed")
}
Expand All @@ -224,7 +225,7 @@ func TestGitSweepCmdAgainstRealRepo(t *testing.T) {
run("commit", "-q", "-m", "second")
run("mv", "tracked.txt", "renamed.txt")
write("renamed.txt", "one\ntwo\nthree\nfour\nfive\n")
renameSweep := gitSweepCmd(nil, dir, false)().(gitSweepMsg)
renameSweep := gitSweepCmd(context.TODO(), dir, false)().(gitSweepMsg)
if !renameSweep.ok {
t.Fatal("rename sweep failed")
}
Expand All @@ -237,7 +238,7 @@ func TestGitSweepCmdAgainstRealRepo(t *testing.T) {
}

// Not-a-repo → ok=false (the sweep latches off).
if msg := gitSweepCmd(nil, t.TempDir(), false)().(gitSweepMsg); msg.ok {
if msg := gitSweepCmd(context.TODO(), t.TempDir(), false)().(gitSweepMsg); msg.ok {
t.Fatal("a non-repo should report ok=false")
}
}
4 changes: 2 additions & 2 deletions internal/tui/flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (m model) settledRow(row transcriptRow, rc rowContext) bool {
if row.id != "" && rc.resolved[rcKey(row.runID, row.id)] {
return true
}
return !(m.pending && row.runID != 0 && row.runID == m.activeRunID)
return !m.pending || row.runID == 0 || row.runID != m.activeRunID
case rowPermission:
event := row.permission
if event == nil || event.ToolCallID == "" || event.Action != agent.PermissionActionPrompt {
Expand All @@ -57,7 +57,7 @@ func (m model) settledRow(row transcriptRow, rc rowContext) bool {
}
// An undecided prompt renders live (with the modal card) until its
// decision lands or its run ends.
return !(m.pending && row.runID != 0 && row.runID == m.activeRunID)
return !m.pending || row.runID == 0 || row.runID != m.activeRunID
default:
// User/system/error/assistant/ask-user rows are appended in final form;
// welcome rows render nothing and settle trivially.
Expand Down
Loading
Loading