From 6f3d21d6e7f01155ce0c461857a053b43d329392 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 27 Jun 2026 02:29:55 -0400 Subject: feat: recall/home cmd, line break option --- internal/net/server.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/net/server.go') diff --git a/internal/net/server.go b/internal/net/server.go index 731beef..8114df2 100644 --- a/internal/net/server.go +++ b/internal/net/server.go @@ -344,6 +344,14 @@ func (sess *Session) wrap(msg string) string { return color.WrapANSI(msg, width) } +// ClearPrompt marks the prompt as consumed so the next Write/WriteLine does not +// emit a leading \r\n. Useful for clients that locally advance the line on Enter. +func (sess *Session) ClearPrompt() { + sess.writeMu.Lock() + defer sess.writeMu.Unlock() + sess.promptVisible = false +} + // Write sends raw text with no wrapping. Used for prompts and partial lines. func (sess *Session) Write(msg string) { sess.writeMu.Lock() -- cgit v1.2.3