MCPcopy Create free account
hub / github.com/babycommando/nightride-cli / viewChat

Method viewChat

zuse.go:1208–1233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1206}
1207
1208func (m *ircModel) viewChat() string {
1209 var header strings.Builder
1210 title := "Chat"
1211 if s, ok := m.servers[m.activeID]; ok {
1212 stat := "●"
1213 if !s.connected {
1214 stat = "○"
1215 }
1216 chanLabel := m.activeChan
1217 if chanLabel == "_sys" || chanLabel == "" {
1218 chanLabel = "(system)"
1219 }
1220 title = fmt.Sprintf("%s %s (%s) %s", stat, s.name, s.nick, chanLabel)
1221 }
1222 header.WriteString(stylePinkB.Render(title) + "\n")
1223 header.WriteString(titleStyle.Render("↑/↓ scroll · ←/→ panes") + "\n")
1224
1225 div := stylePink.Render(strings.Repeat("─", m.chatVP.Width))
1226
1227 return lipgloss.JoinVertical(
1228 lipgloss.Left,
1229 header.String()+m.chatVP.View(),
1230 div,
1231 m.chatInput.View(),
1232 )
1233}
1234
1235func contains(sl []string, s string) bool {
1236 for _, v := range sl {

Callers 1

ViewMethod · 0.95

Calls 1

ViewMethod · 0.45

Tested by

no test coverage detected