2 Commits

Author SHA1 Message Date
68375b93ea fix(tui): Correct parenthesis and add local echo
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
2026-04-19 18:11:26 -04:00
be2cbcd9ff fix(tui): Add local echo so user sees their own messages move up 2026-04-19 18:09:21 -04:00
2 changed files with 3 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
#+FILETAGS: :tui:ux:client:
* Overview
The OpenCortex TUI Client is a standalone Common Lisp application built on **Croatoan** (a high-level CLOS wrapper for ncurses). It provides a real-time, multi-window interface for interacting with the OpenCortex daemon.
The OpenCortex TUI Client is a standalone Common Lisp application built on **Croatoan**. It provides a real-time, multi-window interface for interacting with the OpenCortex daemon.
* Implementation
#+begin_src lisp :tangle ../src/tui-client.lisp
@@ -121,6 +121,7 @@ The OpenCortex TUI Client is a standalone Common Lisp application built on **Cro
(let ((cmd (coerce *input-buffer* 'string)))
(setf (fill-pointer *input-buffer*) 0)
(when (> (length cmd) 0)
(enqueue-msg (concatenate 'string "> " cmd))
(let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT cmd))))))
(format *stream* "~a" framed)
(finish-output *stream*)))

View File

@@ -108,6 +108,7 @@
(let ((cmd (coerce *input-buffer* 'string)))
(setf (fill-pointer *input-buffer*) 0)
(when (> (length cmd) 0)
(enqueue-msg (concatenate 'string "> " cmd))
(let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT cmd))))))
(format *stream* "~a" framed)
(finish-output *stream*)))