feat(context): reasoning-thread continuity, L3 doc filtering, and gate hardening
Threads reasoning_content across inference calls and journal renders, filters markdown noise out of L3 repo-knowledge retrieval, adds PlanLinter H3 checks, and tightens filesystem tool output/dir-listing behavior surfaced by prior live QA (see project_readloop_campaign memory).
This commit is contained in:
@@ -790,6 +790,10 @@ func (m Model) buildTranscriptRows(w int) ([]string, []int) {
|
||||
t := m.theme
|
||||
msgs := m.routerMessages[m.selectedID]
|
||||
var rows []string
|
||||
// Prepend the live execution plan card when the session has locked plan stages.
|
||||
if planRows := m.planCardLines(); len(planRows) > 0 {
|
||||
rows = append(rows, planRows...)
|
||||
}
|
||||
msgStart := make([]int, len(msgs)) // first row index of each message, for scroll-to-selection
|
||||
for mi, e := range msgs {
|
||||
msgStart[mi] = len(rows)
|
||||
@@ -847,6 +851,53 @@ func (m Model) buildTranscriptRows(w int) ([]string, []int) {
|
||||
return rows, msgStart
|
||||
}
|
||||
|
||||
// planCardLines renders the live execution plan card for the selected session.
|
||||
func (m Model) planCardLines() []string {
|
||||
t := m.theme
|
||||
s := m.session(m.selectedID)
|
||||
if s == nil || len(s.PlanStages) == 0 {
|
||||
return nil
|
||||
}
|
||||
goal := strings.TrimSpace(s.PlanGoal)
|
||||
var out []string
|
||||
if goal != "" {
|
||||
out = append(out, t.span(goal, t.P.Faint))
|
||||
}
|
||||
stageLabel := "stage"
|
||||
if len(s.PlanStages) != 1 {
|
||||
stageLabel = "stages"
|
||||
}
|
||||
out = append(out, t.span("Plan \u00b7 "+itoa(len(s.PlanStages))+" "+stageLabel, t.P.Accent))
|
||||
idW := 0
|
||||
for _, ps := range s.PlanStages {
|
||||
if len(ps.ID) > idW {
|
||||
idW = len(ps.ID)
|
||||
}
|
||||
}
|
||||
for _, ps := range s.PlanStages {
|
||||
var badge, badgeStyle string
|
||||
var badgeColor color.Color
|
||||
switch ps.Status {
|
||||
case PlanPending:
|
||||
badge = "\u25cb"
|
||||
badgeColor = t.P.Faint
|
||||
case PlanRunning:
|
||||
badge = "\u25cf"
|
||||
badgeColor = t.P.Accent
|
||||
case PlanCompleted:
|
||||
badge = "\u2713"
|
||||
badgeColor = t.P.OK
|
||||
case PlanFailed:
|
||||
badge = "\u2717"
|
||||
badgeColor = t.P.Bad
|
||||
}
|
||||
badgeStyle = t.span(badge, badgeColor)
|
||||
rest := t.span(" "+padRaw(ps.ID, idW), t.P.Fg)
|
||||
out = append(out, " "+badgeStyle+rest)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func (m Model) eventRows(w, h int) []string {
|
||||
t := m.theme
|
||||
header := lipgloss.NewStyle().Foreground(t.P.Accent).Background(t.P.Bg).Bold(true).Render("event stream") +
|
||||
|
||||
Reference in New Issue
Block a user