From ddecde940e325d9cb02da20af073e14d057f3296 Mon Sep 17 00:00:00 2001 From: Grant Horner Date: Fri, 9 Jan 2026 15:10:24 -0500 Subject: [PATCH] remove more bugs --- codex.el | 19 +++++++++++-------- history | 32 -------------------------------- projects | 2 -- 3 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 history delete mode 100644 projects diff --git a/codex.el b/codex.el index 323af7c..be140f8 100644 --- a/codex.el +++ b/codex.el @@ -171,21 +171,24 @@ (defun codex--parse-msg-from-response (response-string) (let* ((output (string-trim response-string)) (lines (string-lines output)) - (jsons (mapcar #'json-parse-string lines)) + (jsons (delq nil + (mapcar (lambda (line) + (condition-case nil + (json-parse-string line) + (json-parse-error nil))) + lines))) (msg (cl-find-if (lambda (hm) (let ((type (gethash "type" hm)) (item (gethash "item" hm))) (and type item (string-equal type "item.completed") (string-equal (gethash "type" item) "agent_message")))) - jsons))) - (unless msg - (error "No proper agent_message" received)) - (let* ((item (gethash "item" msg)) - (text (gethash "text" item))) + jsons)) + (item (and msg (gethash "item" msg))) + (text (and item (gethash "text" item)))) ;; We should make sure we get one and only one message here, otherwise bail out - (setf codex--session-id (codex--parse-session-id jsons)) - text))) + (setf codex--session-id (codex--parse-session-id jsons)) + (or text output))) (defun codex--ensure-session-in-sessions-file (prompt) (let ((sessions (codex--read-sessions-file))) diff --git a/history b/history deleted file mode 100644 index 661c96a..0000000 --- a/history +++ /dev/null @@ -1,32 +0,0 @@ -;; -*- mode: emacs-lisp; coding: utf-8-unix -*- -;; Minibuffer history file, automatically generated by ‘savehist’. - -(setq savehist-minibuffer-history-variables '(magit-git-command-history magit-revision-history imenu--history-list common-lisp-hyperspec-history sly-minibuffer-history dired-shell-command-history read-expression-history cider--select-cljs-repl-history cider-host-history read-char-history shell-command-history read-number-history grep-regexp-history compile-history minibuffer-history buffer-name-history project--dir-history file-name-history extended-command-history)) -(setq magit-revision-history '("origin/high-fidelity")) -(setq common-lisp-hyperspec-history '("push")) -(setq sly-minibuffer-history '("(mapc (lambda (s) - (str:split \" \" s)) - (str:lines *sample*))")) -(setq read-expression-history '("(setup-paredit)")) -(setq cider--select-cljs-repl-history '("shadow")) -(setq cider-host-history '("localhost")) -(setq read-char-history '("yes")) -(setq shell-command-history '("curl -H 'Content-Type: application/json' -d '{\"To\": \"foo\", \"CallSid\": \"123\", \"From\": \"bar\"}' localhost:6969/twilio/outgoing" "curl localhost:6969/twilio/outgoing" "echo \"{\\\"accountSid\\\": \\\"AC97a39a3f4c8a4a83364cf039e5ad7284\\\", \\\"apiSid\\\": \\\"SKf4106af4401d7cd980e1b66323d4cd79\\\", \\\"apiSecret\\\": \\\"GQPFqUhjsx5lLXGw6sATEIXBEO0xE99T\\\", \\\"authToken\\\": \\\"bfbc0bd56ad9e4ce02889557232f33e3\\\", \\\"testAccountSid\\\": \\\"AC20abaa15014e3cbe7ae7eac4be5e2b93\\\", \\\"testAuthToken\\\": \\\"2d5db4af30a7d2bf716e8cdf6a499534\\\", \\\"pushCredentialSid\\\":\\\"CR8766629d1bce35d3031311c7e16c1aa6\\\", \\\"outgoingApplicationSid\\\": \\\"APfd68ab4321c491ccc5a7d90ca33d972c\\\", \\\"androidPushCredentialSid\\\": \\\"CR36622e76432583070ebaa05f25de7950\\\"}\" | jq ." "bb --nrepl-server" "bunx shadow-cljs browser-repl")) -(setq read-number-history '("120" "18")) -(setq grep-regexp-history '("my tasks" "registering with twilio token" "EXPO_PUBLIC_API_ENDPOINT" "testauth" "uuid" "handleNewUser")) -(setq compile-history '("bun run prebuild" "bun run scratch.ts " "bunx prettier -w ./" "bun run android -- --device" "bun run android" "bunx expo install expo-calendar" "bun --watch run src/local.ts " "bun dev src/local.ts " "bun run src/local.ts " "bun run ios -- --device" "git --version" "terraform apply" "./package.sh " "terraform apply" "echo 'hello'" "echo \"hello\"" "tsc" "echo 'hello'" "tsc" "aws ssm put-parameter --name twilio --overwrite --value '{ - \"accountSid\": \"AC97a39a3f4c8a4a83364cf039e5ad7284\", - \"apiSid\": \"SKf4106af4401d7cd980e1b66323d4cd79\", - \"apiSecret\": \"GQPFqUhjsx5lLXGw6sATEIXBEO0xE99T\", - \"authToken\": \"bfbc0bd56ad9e4ce02889557232f33e3\", - \"testAccountSid\": \"AC20abaa15014e3cbe7ae7eac4be5e2b93\", - \"testAuthToken\": \"2d5db4af30a7d2bf716e8cdf6a499534\", - \"appleSandboxPushCredentialSid\": \"CR8766629d1bce35d3031311c7e16c1aa6\", - \"appleProdPushCredentialSid\": \"CRd2ae825b1502fdb1dd7b5291a83a1aea\", - \"outgoingApplicationSid\": \"APfd68ab4321c491ccc5a7d90ca33d972c\", - \"androidPushCredentialSid\": \"CR36622e76432583070ebaa05f25de7950\" -}'" "openssl pkcs12 -in cred.p12 -nokeys -out cert.pem -nodes -legacy" "aws ssm get-parameter --name twilio --with-decrypt" "twilio api:voice:v1:settings -h" "twilio api:voice:v1:settings -v" "twilio api:voice:v1 -h" "twilio api:voice -h" "twilio api -h" "twilio -h" "wget https://beta.quicklisp.org/quicklisp.lisp" "clpm" "clpm --version" "INSTALL_ROOT=\"$HOME/.local\" ./install.sh " "INSTALL_ROOT=\"$PATH/.local\" ./install.sh " "clpm --version" "clpm --versino" "tar -xzvf clpm-0.4.1-darwin-arm64.tar.gz " " wget https://files.clpm.dev/clpm/clpm-0.4.1-darwin-arm64.tar.gz" "tar -xzvf cl-unicode.tar.gz " "wget http://weitz.de/files/cl-unicode.tar.gz " "curl https://github.com/edicl/cl-ppcre/archive/master.zip -O" "curl https://github.com/edicl/cl-ppcre/archive/master.zip -o" "unzip master.zip " "curl https://github.com/edicl/cl-ppcre/archive/master.zip -O" "wget https://github.com/edicl/cl-ppcre/archive/master.zip" "clj -X:deps prep" "clj -X:deps -P" "bun install react@18.3.1 react-dom@18.3.1" "bun install" "bunx shadow-cljs browser-repl" "clj -X:deps help" "clj -X:deps --help" "clj -X:deps" "clj -X:deps get" "bunx shadow-cljs browser-repl" "bun install" "bunx shadow-cljs browser-repl" "bun install" "bunx shadow-cljs browser-repl" "echo \"$JAVA_HOME\"" "echo $JAVA_HOME" "java --version" "brew install clojure-lsp" "bun init --yes" "bun init --help" "bun init" "./package.sh" "tsc" "bun run prettier -w ./" "bun run prettier ./" "bun run createTwilioSubAccount.ts " "JOBS=8 ./batch.sh ")) -(setq minibuffer-history '("Convert 'require' to 'import'" "Add import from \"../components/BackButton\"" "compile" "Add import from \"./auth/getUser\"" "Add import from \"./twilio/handleToken\"" "Add import from \"./twilio/handleIncoming\"" "org-todo-key-alist" "org-todo-keywords" "org-todo-kwd-alist" "org-todo-sets" "push" "append" "advice-add" "compile" "advice-add" "defadvice" "ad-set-argument" "defadvice" "ad-set-arg" "openssl pkcs12 -in cred.p12 -nokeys -out cert.pem -nodes -legacy" "clojure:1667" "yes" "https://github.com/edicl/cl-unicode.git" "https://github.com/edicl/cl-ppcre.git" "dired-use-ls-dired" "https://github.com/vindarel/cl-str.git" "browser-repl" "shadow-cljs" "string-join" "string" "browser-repl" "shadow-cljs" "browser-repl" "shadow-cljs" "browser-repl" "shadow-cljs" "defconst" "cider-jack-in-cljs-dependencies" "browser-repl" "shadow-cljs" "web:54738" "browser-repl" "web:54623" "clojure-cli" "web:53719" "clojure-cli" "web:53689" "clojure-cli" "Remove unused declaration for: 'getParameter'" "Remove import from '@aws-sdk/client-cognito-identity-provider'" "Add import from \"./createTwilioSubAccount\"" "eglot-server-programs" "hook" "add-hook" "Add import from \"@aws-sdk/lib-dynamodb\"" "Add import from \"@aws-sdk/client-cognito-identity-provider\"" "Update import from \"./requestHelpers\"" "Move to a new file" "Add import from \"./requestHelpers\"" "setenv" " https://github.com/casouri/tree-sitter-module")) -(setq buffer-name-history '("Home.tsx" "magit-diff: builtecho" "Home.tsx" "withCallingAppEntitlements.js<2>" "plugins" "*compilation*" "app.json" "#withCallingAppEntitlements.js#" "withCallingAppEntitlements.js<2>" "plugins" "transcribe.ts" "app.json" "storage.ts" "AppContext.tsx" "index.tsx" "AppContext.tsx" "index.tsx" "AppContext.tsx" "index.tsx" "*compilation*" "tasks.tsx" "PermissionsHook.ts" "*compilation*" "handleOutgoing.ts" "local.ts" "handleToken.ts" "init.el" "*compilation*" "work.org" "infrastructure" "init.el" "*Messages*" "init.el" "*Messages*" "init.el" "server" "init.el" "infrastructure" "handleToken.ts" "*compilation*" "*scratch*" "*Messages*" "work.org" ".env" "work.org" "day1.clj" "*cider-repl 2024/clojure:localhost:56611(clj)*" "*sly-mrepl for sbcl*" "day1.lisp" "*sly-mrepl for sbcl*" "lisp" "*sly-mrepl for sbcl*" "advent.lisp" "*sly-mrepl for sbcl*" "advent.lisp" "lisp" "init.el" "lisp" "*cider-repl builtecho/web:localhost:54885(cljs:shadow)*" "*nrepl-server builtecho/web:localhost*" "*nrepl-server builtecho/web:localhost*<2>" "core.cljs" "*cider-repl builtecho/web:localhost:54840(cljs:shadow)*" "core.cljs" "*cider-repl builtecho/web:localhost:54815(cljs:shadow)*" "*cider-repl builtecho/web:localhost:54795(cljs:shadow)*" "*nrepl-server builtecho/web:localhost*" "core.cljs" "deps.edn" "*cider-repl builtecho/web:localhost:54738(cljs:shadow)*" "core.cljs" "*cider-repl builtecho/web:localhost:54718(cljs:shadow)*" "shadow-cljs.edn" "*cider-repl builtecho/web:localhost:54685(cljs:shadow)*" "*cider-repl builtecho/web:localhost:54685(clj)*" "*cider-repl builtecho/web:localhost:54664(cljs:shadow)*" "core.cljs" "deps.edn" "handleNewOrganization.ts" "server" "handleNewOrganization.ts" "createTwilioSubAccount.ts" "create user pool docs" "createuserpoolcommand docs" "*scratch*" "dynamo.tf" "init.el" "handleNewOrganization.ts" "index.tsx" "*aider:/Users/grant/repos/builtecho/*" "index.tsx")) -(setq file-name-history '("~/.emacs.d/" "~/repos/builtecho/server/transcription_testing/karlyxdad/" "~/repos/builtecho/server/transcription_testing/" "~/repos/builtecho/server/transcription_testing/karlyxdad" "~/repos/builtecho/server/" "~/repos/builtecho/web/index.ts" "~/repos/builtecho/web" "~/repos/builtecho/" "~/repos/builtecho/work.org" #("/Users/grant/repos/builtecho/mobile/src/app/(tabs)/Home.tsx" 0 59 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/" "~/repos/builtecho/mobile/plugins/" "~/repos/builtecho/mobile/app.json" "~/repos/builtecho/mobile/plugins/" "~/repos/builtecho/mobile/plugins/withTwilioSdk.js" "~/repos/builtecho/mobile/plugins/" "~/repos/builtecho/mobile/plugins/withTwilioSdk.js" "~/repos/builtecho/mobile/plugins/withCallingAppEntitlements.js" #("/Users/grant/repos/builtecho/mobile/app.json" 0 44 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/eas.json" #("/Users/grant/repos/builtecho/mobile/package.json" 0 48 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/" "~/repos/builtecho/server/KarlyxDad updated 4.json" "~/repos/builtecho/server/KarlyxDad updated 3.json" #("/Users/grant/repos/builtecho/server/src/transcribe.ts" 0 53 (project "~/repos/builtecho/")) "~/repos/builtecho/server/KarlyxDad updated 2.json" "~/repos/builtecho/server/KarlyxDad.json" "~/repos/builtecho/server/KarlyxDad updated.json" "~/repos/builtecho/server/src/transcribe.ts" "~/repos/builtecho/server/KarlyxDad.json" "~/repos/builtecho/" #("/Users/grant/repos/builtecho/server/" 0 36 (project "~/repos/builtecho/")) "~/repos/builtecho/" "~/repos/builtecho/mobile/.env.example" #("/Users/grant/repos/builtecho/mobile/src/app/index.tsx" 0 53 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/.env" #("/Users/grant/repos/builtecho/mobile/src/contexts/AppContext.tsx" 0 63 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/package.json" #("/Users/grant/repos/builtecho/mobile/app.json" 0 44 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/src/app/index.tsx" 0 53 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/work.org" 0 37 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/package.json" 0 48 (project "~/repos/builtecho/")) "~/repos/builtecho/work.org" #("/Users/grant/repos/builtecho/NOTES.md" 0 37 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/src/app/(tabs)/lists/[list].tsx" "~/repos/builtecho/mobile/src/app/(tabs)/" #("/Users/grant/repos/builtecho/mobile/src/app/(tabs)/contacts.tsx" 0 63 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/src/contexts/AppContext.tsx" 0 63 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/" "~/repos/builtecho/server/" "~/repos/builtecho/infrastructure/main.tf" "~/repos/builtecho/server/src/local.ts" "~/repos/builtecho/server/" #("/Users/grant/repos/builtecho/mobile/src/contexts/AppContext.tsx" 0 63 (project "~/repos/builtecho/")) "~/repos/builtecho/server/src/twilio/" #("/Users/grant/repos/builtecho/server/src/twilio/handleToken.ts" 0 61 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/src/contexts/AppContext.tsx" 0 63 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/src/app/index.tsx" 0 53 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/src/contexts/AppContext.tsx" 0 63 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/package.json" 0 48 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/mobile/" 0 36 (project "~/repos/builtecho/")) "~/repos/builtecho/work.org" #("/Users/grant/repos/builtecho/server/" 0 36 (project "~/repos/builtecho/")) "~/repos/builtecho/infrastructure/" #("/Users/grant/repos/builtecho/shared/" 0 36 (project "~/repos/builtecho/")) "~/Documents/builtecho/prod push notifictions/" #("/Users/grant/repos/builtecho/server/src/utils/requestHelpers.ts" 0 63 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/server/src/twilio/handleToken.ts" 0 61 (project "~/repos/builtecho/")) "~/repos/builtecho/mobile/.env" #("/Users/grant/repos/builtecho/mobile/.env.example" 0 48 (project "~/repos/builtecho/")) #("/Users/grant/repos/builtecho/work.org" 0 37 (project "~/repos/builtecho/")) "~/repos/advents/2024/clojure/" "~/repos/advents/2024/clojure/src/day1.clj" "~/repos/advents/2024/clojure/" "~/repos/advents/2024/clojure/deps.edn" "~/repos/advents/2024/clojure/src" "~/repos/advents/2024/clojure/" "~/repos/advents/2024/clojure/day1.clj" "~/repos/advents/2024/clojure" "~/repos/" "~/repos/advents/2024/lisp/advent.lisp" "~/repos/advents/2024/lisp/day1.lisp" "~/repos/advents/2024/lisp/advent.asd" "~/repos/advents/2024/lisp/" "~/.sbclrc" "~/.local/opt/clpm-0.4.1-darwin-arm64/" "~/.local/bin/" "~/.local/opt/clpm-0.4.1-darwin-arm64/" "~/.zshrc" "~/.local/bin/" "~/.local/opt/clpm-0.4.1-darwin-arm64/bin/clpm" "~/.local/bin" "~/.local/" "~/.local/opt" "~/" "~/repos/advents/2024/lisp/vendor/cl-unicode" "~/repos/advents/2024/lisp/" "~/repos/advents/2024/lisp/day1.lisp" "~/repos/advents/2024/lisp/advent.asd" "~/repos/advents/2024/lisp/vendor/cl-ppcre")) -(setq extended-command-history '("revert-buffer" "wdired-change-to-wdired-mode" "org-edit-inline-src-code" "restart-emacs" "revert-buffer" "restart-emacs" "comint-run" "visual-fill-column-mode" "widen" "cider-connect-clj" "cider-jack-in-clj" "hyperspec-lookup" "sly" "magit-clone-shallow" "tar-untar-buffer" "magit-clone-shallow" "wdired-change-to-wdired-mode" "magit-clone-shallow" "sly" "cider-jack-in-cljs" "cider-restart" "enable-paredit-mode" "cider-jack-in-cljs" "restart-emacs" "cider-jack-in-cljs" "restart-emacs" "cider-jack-in-cljs" "cider-connect-sibling-cljs" "cider-connect" "cider-jack-in-cljs" "cider-log" "cider-log-show" "cider-jack-in-cljs" "cider-jack-in-clj&cljs" "cider-jack-in-cljs" "cider-quit" "cider-connect-cljs" "cider-jack-in-cljs" "cider-quit" "cider-connect-clj" "cider-jack-in" "cider-quit" "cider-log" "cider-mode" "cider-connect-clj" "cider-jack-in" "cider-log" "eglot" "revert-buffer" "wdired-change-to-wdired-mode" "special-mode" "markdown-mode" "corfu-complete" "revert-buffer" "restart-emacs" "revert-buffer" "restart-emacs" "align" "tsx-ts-mode" "typescript-ts-mode" "restart-emacs" "markdown-ts-mode" "typescript-ts-mode" "restart-emacs" "compile" "magit-clone" "typescript-ts-mode" "typescript-ts-base-mode" "typescript-ts-mode" "restart-emacs" "load-file")) diff --git a/projects b/projects deleted file mode 100644 index e999ec2..0000000 --- a/projects +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- lisp-data -*- -(("/Users/grant/repos/builtecho/"))