From 68375b93eae6d0dcae3c1011e5dd554b21525106 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 19 Apr 2026 18:11:26 -0400 Subject: [PATCH] fix(tui): Correct parenthesis and add local echo --- literate/tui-client.org | 7 +++---- src/tui-client.lisp | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/literate/tui-client.org b/literate/tui-client.org index 508ee62..4fd7f5d 100644 --- a/literate/tui-client.org +++ b/literate/tui-client.org @@ -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 @@ -120,9 +120,8 @@ 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) - (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)))))) + (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*))) diff --git a/src/tui-client.lisp b/src/tui-client.lisp index 1db3f98..335946a 100644 --- a/src/tui-client.lisp +++ b/src/tui-client.lisp @@ -107,9 +107,8 @@ ((or (eq ch #\Newline) (eq ch #\Return)) (let ((cmd (coerce *input-buffer* 'string))) (setf (fill-pointer *input-buffer*) 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)))))) + (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*)))