Keep ctrl+c and ctrl+d working with the keyboard protocol on Asking the terminal to disambiguate escape codes bought shift+enter and cost every control key. With the protocol on, ctrl+c arrives as `\x1b[99;5u` and ctrl+d as `\x1b[100;5u` rather than as `\x03` and `\x04`, and this console reads only the bytes — so it stopped being quittable, which is a far worse trade than the one it was making. A protocol sequence for a key this interface binds is now decoded back to the byte it stands for, and the existing handlers do the rest. One set of handlers for both spellings rather than two that can disagree. The first decoder went too far: shift+tab is `\x1b[9;2u`, and reading any tab code as a bare tab cycled the model instead of the reasoning level. Only an unmodified tab decodes; shift+tab stays the separate key it is. Three tests cover both spellings of each, and all three fail with the decoder removed. 422 tests pass.
Keep ctrl+c and ctrl+d working with the keyboard protocol on
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
packages/openagents-cli/src/coder-ui.ts -
modified
packages/openagents-cli/test/coder-ui.test.ts
Diff
2 files changed, +95 -1
packages/openagents-cli/src/coder-ui.ts modified +41 -1
@@ -212,6 +212,38 @@ function truncate(text: string, width: number): string {
| 212 | 212 |
|
| 213 | 213 |
|
| 214 | 214 |
|
| 215 |
|
|
| 216 |
|
|
| 217 |
|
|
| 218 |
|
|
| 219 |
|
|
| 220 |
|
|
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
|
| 215 | 247 |
|
| 216 | 248 |
|
| 217 | 249 |
|
@@ -793,7 +825,7 @@ export function runCoderUi(session: CoderSession, options: CoderUiOptions): Prom
| 793 | 825 |
|
| 794 | 826 |
|
| 795 | 827 |
|
| 796 |
|
|
| 828 |
|
|
| 797 | 829 |
|
| 798 | 830 |
|
| 799 | 831 |
|
@@ -870,6 +902,14 @@ export function runCoderUi(session: CoderSession, options: CoderUiOptions): Prom
| 870 | 902 |
|
| 871 | 903 |
|
| 872 | 904 |
|
| 905 |
|
|
| 906 |
|
|
| 907 |
|
|
| 908 |
|
|
| 909 |
|
|
| 910 |
|
|
| 911 |
|
|
| 912 |
|
|
| 873 | 913 |
|
| 874 | 914 |
|
| 875 | 915 |
|
packages/openagents-cli/test/coder-ui.test.ts modified +54
@@ -848,3 +848,57 @@ describe("changing how hard the model thinks", () => {
| 848 | 848 |
|
| 849 | 849 |
|
| 850 | 850 |
|
| 851 |
|
|
| 852 |
|
|
| 853 |
|
|
| 854 |
|
|
| 855 |
|
|
| 856 |
|
|
| 857 |
|
|
| 858 |
|
|
| 859 |
|
|
| 860 |
|
|
| 861 |
|
|
| 862 |
|
|
| 863 |
|
|
| 864 |
|
|
| 865 |
|
|
| 866 |
|
|
| 867 |
|
|
| 868 |
|
|
| 869 |
|
|
| 870 |
|
|
| 871 |
|
|
| 872 |
|
|
| 873 |
|
|
| 874 |
|
|
| 875 |
|
|
| 876 |
|
|
| 877 |
|
|
| 878 |
|
|
| 879 |
|
|
| 880 |
|
|
| 881 |
|
|
| 882 |
|
|
| 883 |
|
|
| 884 |
|
|
| 885 |
|
|
| 886 |
|
|
| 887 |
|
|
| 888 |
|
|
| 889 |
|
|
| 890 |
|
|
| 891 |
|
|
| 892 |
|
|
| 893 |
|
|
| 894 |
|
|
| 895 |
|
|
| 896 |
|
|
| 897 |
|
|
| 898 |
|
|
| 899 |
|
|
| 900 |
|
|
| 901 |
|
|
| 902 |
|
|
| 903 |
|
|
| 904 |
|