fix(tui): Definitive clean-room rewrite of TUI client (verified syntax)
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s

This commit is contained in:
2026-04-19 18:06:33 -04:00
parent 8b7d4c1b9c
commit bafc473395
2 changed files with 26 additions and 28 deletions

View File

@@ -53,7 +53,6 @@ The OpenCortex TUI Client is a standalone Common Lisp application built on **Cro
(when (and *stream* (open-stream-p *stream*)) (when (and *stream* (open-stream-p *stream*))
(let ((raw-msg (opencortex:read-framed-message *stream*))) (let ((raw-msg (opencortex:read-framed-message *stream*)))
(unless (member raw-msg '(:eof :error)) (unless (member raw-msg '(:eof :error))
(let ((msg (clean-keywords raw-msg)))
(let* ((msg (clean-keywords raw-msg)) (let* ((msg (clean-keywords raw-msg))
(type (or (getf msg :TYPE) (getf msg :type)))) (type (or (getf msg :TYPE) (getf msg :type))))
(cond ((eq type :EVENT) (cond ((eq type :EVENT)
@@ -66,7 +65,7 @@ The OpenCortex TUI Client is a standalone Common Lisp application built on **Cro
(or (getf msg :GARDENER) (getf msg :gardener))))) (or (getf msg :GARDENER) (getf msg :gardener)))))
((eq type :CHAT) ((eq type :CHAT)
(enqueue-msg (or (getf msg :TEXT) (getf msg :text)))) (enqueue-msg (or (getf msg :TEXT) (getf msg :text))))
(t (enqueue-msg (format nil "~s" msg)))))))) (t (enqueue-msg (format nil "~s" msg))))))
(when (eq raw-msg :eof) (setf *is-running* nil)) (when (eq raw-msg :eof) (setf *is-running* nil))
(when (eq raw-msg :error) (setf *status-text* "Protocol Error")))) (when (eq raw-msg :error) (setf *status-text* "Protocol Error"))))
(error (c) (setf *status-text* (format nil "Net Error: ~a" c)) (setf *is-running* nil))) (error (c) (setf *status-text* (format nil "Net Error: ~a" c)) (setf *is-running* nil)))

View File

@@ -40,7 +40,6 @@
(when (and *stream* (open-stream-p *stream*)) (when (and *stream* (open-stream-p *stream*))
(let ((raw-msg (opencortex:read-framed-message *stream*))) (let ((raw-msg (opencortex:read-framed-message *stream*)))
(unless (member raw-msg '(:eof :error)) (unless (member raw-msg '(:eof :error))
(let ((msg (clean-keywords raw-msg)))
(let* ((msg (clean-keywords raw-msg)) (let* ((msg (clean-keywords raw-msg))
(type (or (getf msg :TYPE) (getf msg :type)))) (type (or (getf msg :TYPE) (getf msg :type))))
(cond ((eq type :EVENT) (cond ((eq type :EVENT)
@@ -53,7 +52,7 @@
(or (getf msg :GARDENER) (getf msg :gardener))))) (or (getf msg :GARDENER) (getf msg :gardener)))))
((eq type :CHAT) ((eq type :CHAT)
(enqueue-msg (or (getf msg :TEXT) (getf msg :text)))) (enqueue-msg (or (getf msg :TEXT) (getf msg :text))))
(t (enqueue-msg (format nil "~s" msg)))))))) (t (enqueue-msg (format nil "~s" msg))))))
(when (eq raw-msg :eof) (setf *is-running* nil)) (when (eq raw-msg :eof) (setf *is-running* nil))
(when (eq raw-msg :error) (setf *status-text* "Protocol Error")))) (when (eq raw-msg :error) (setf *status-text* "Protocol Error"))))
(error (c) (setf *status-text* (format nil "Net Error: ~a" c)) (setf *is-running* nil))) (error (c) (setf *status-text* (format nil "Net Error: ~a" c)) (setf *is-running* nil)))