From 7f34c8ea1e55f856fb43492072ef4ef3d3e29b15 Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Thu, 24 Sep 2026 14:23:30 +0100 Subject: [PATCH] remove unsupported codex prompt stack binding Change-Id: Ifdf2d3eb28f4326cda1852b409f6b62f6a6a6964 --- modules/home/ai-agent/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/home/ai-agent/default.nix b/modules/home/ai-agent/default.nix index 3ec1ab0..d98950a 100644 --- a/modules/home/ai-agent/default.nix +++ b/modules/home/ai-agent/default.nix @@ -47,7 +47,7 @@ let nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram "$out/bin/codex" --add-flags '-c tui.terminal_title=[] -c tui.alternate_screen=always --enable hooks' \ - --add-flags '-c tui.keymap.chat.edit_queued_message=ctrl-up -c tui.keymap.chat.prompt_stack_back=ctrl-down' + --add-flags '-c tui.keymap.chat.edit_queued_message=ctrl-up' ''; } else @@ -131,6 +131,13 @@ in hooks.UserPromptSubmit = sessionTitlePromptHook; }; + home.activation.removeCodexPromptStackBack = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + codexConfig=${lib.escapeShellArg "${config.home.homeDirectory}/.codex/config.toml"} + if [ -f "$codexConfig" ]; then + run ${pkgs.gnused}/bin/sed -i '/^\[tui\.keymap\.chat\]$/,/^\[/ { /^[[:space:]]*prompt_stack_back[[:space:]]*=/d; }' "$codexConfig" + fi + ''; + home.file.".config/opencode/opencode.jsonc" = lib.mkIf (config.ai-agent.agent == "opencode") { source = lib.mkDefault ( if config.home.username == "alebat01" then mergedArmOpencodeConfig else ./opencode/config.jsonc -- 2.51.2