fix(tui): Correct parenthesis and add local echo
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#+FILETAGS: :tui:ux:client:
|
#+FILETAGS: :tui:ux:client:
|
||||||
|
|
||||||
* Overview
|
* 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
|
* Implementation
|
||||||
#+begin_src lisp :tangle ../src/tui-client.lisp
|
#+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))
|
((or (eq ch #\Newline) (eq ch #\Return))
|
||||||
(let ((cmd (coerce *input-buffer* 'string)))
|
(let ((cmd (coerce *input-buffer* 'string)))
|
||||||
(setf (fill-pointer *input-buffer*) 0)
|
(setf (fill-pointer *input-buffer*) 0)
|
||||||
(when (> (length cmd) 0)
|
(when (> (length cmd) 0)
|
||||||
(enqueue-msg (concatenate 'string "> " cmd)) ; Local Echo
|
(enqueue-msg (concatenate 'string "> " cmd))
|
||||||
(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))))))
|
(let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT cmd))))))
|
||||||
(format *stream* "~a" framed)
|
(format *stream* "~a" framed)
|
||||||
(finish-output *stream*)))
|
(finish-output *stream*)))
|
||||||
|
|||||||
@@ -107,9 +107,8 @@
|
|||||||
((or (eq ch #\Newline) (eq ch #\Return))
|
((or (eq ch #\Newline) (eq ch #\Return))
|
||||||
(let ((cmd (coerce *input-buffer* 'string)))
|
(let ((cmd (coerce *input-buffer* 'string)))
|
||||||
(setf (fill-pointer *input-buffer*) 0)
|
(setf (fill-pointer *input-buffer*) 0)
|
||||||
(when (> (length cmd) 0)
|
(when (> (length cmd) 0)
|
||||||
(enqueue-msg (concatenate 'string "> " cmd)) ; Local Echo
|
(enqueue-msg (concatenate 'string "> " cmd))
|
||||||
(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))))))
|
(let ((framed (opencortex:frame-message (format nil "~s" (list :TYPE :EVENT :PAYLOAD (list :SENSOR :chat-message :TEXT cmd))))))
|
||||||
(format *stream* "~a" framed)
|
(format *stream* "~a" framed)
|
||||||
(finish-output *stream*)))
|
(finish-output *stream*)))
|
||||||
|
|||||||
Reference in New Issue
Block a user