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