diff --git a/literate/tui-client.org b/literate/tui-client.org index 258e602..508ee62 100644 --- a/literate/tui-client.org +++ b/literate/tui-client.org @@ -120,7 +120,9 @@ The OpenCortex TUI Client is a standalone Common Lisp application built on **Cro ((or (eq ch #\Newline) (eq ch #\Return)) (let ((cmd (coerce *input-buffer* 'string))) (setf (fill-pointer *input-buffer*) 0) - (when (> (length cmd) 0) + (when (> (length cmd) 0) + (enqueue-msg (concatenate 'string "> " cmd)) ; Local Echo + (let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT 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*))) diff --git a/src/tui-client.lisp b/src/tui-client.lisp index 9105b9f..1db3f98 100644 --- a/src/tui-client.lisp +++ b/src/tui-client.lisp @@ -107,7 +107,9 @@ ((or (eq ch #\Newline) (eq ch #\Return)) (let ((cmd (coerce *input-buffer* 'string))) (setf (fill-pointer *input-buffer*) 0) - (when (> (length cmd) 0) + (when (> (length cmd) 0) + (enqueue-msg (concatenate 'string "> " cmd)) ; Local Echo + (let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT 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*)))