feat(tui): add cards view, mode switching, promote picker, and card detail
Stream/cards toggle with 1/2 keys. Cards view with intent filtering (tab cycles grab/read/fill/all), sort cycling (s key), pinned-first ordering, and affordance badges. Promote picker (p key) with card type selection and auto-detection from body content. Detail view renders card_data per type: checklist steps, template slots, decision fields, link URLs. Extracts generateCardData to internal/carddata for reuse across cmd and tui packages.
This commit is contained in:
@@ -23,7 +23,12 @@ func renderStatusBar(m model, width int) string {
|
||||
}
|
||||
|
||||
func countText(m model) string {
|
||||
total := len(m.list.entities)
|
||||
var total int
|
||||
if m.mode == modeCards {
|
||||
total = len(m.cards.filtered)
|
||||
} else {
|
||||
total = len(m.list.entities)
|
||||
}
|
||||
if m.filterTag != "" {
|
||||
return fmt.Sprintf("%d entities #%s", total, m.filterTag)
|
||||
}
|
||||
@@ -40,7 +45,12 @@ func contextHints(m model) string {
|
||||
return "j/k:nav enter:select esc:cancel"
|
||||
case stateConfirm:
|
||||
return "y:confirm n:cancel"
|
||||
case statePromote:
|
||||
return "j/k:nav enter:select esc:cancel"
|
||||
default:
|
||||
return "a:add d:del x:todo #:filter ?:help q:quit"
|
||||
if m.mode == modeCards {
|
||||
return "1:stream 2:cards s:sort tab:intent a:add ?:help q:quit"
|
||||
}
|
||||
return "1:stream 2:cards a:add d:del x:todo #:filter ?:help q:quit"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user