@hej / sigit / commits / 1ab72bf

Add ratatui-based interactive chat UI for terminal sessions

If stdin is a terminal, launch a TUI chat interface using ratatui and crossterm instead of starting the ACP agent server.

Seto Elkahfi committed Apr 14, 2026 at 21:41 UTC 1ab72bfc3b02b53d7132125e8a1d6b5b0967e6c1
3 files changed +247 -94
Cargo.lock
+232 -94
@@ -113,13 +113,12 @@ dependencies = [
113
114 [[package]]
115 name = "annotate-snippets"
116 -version = "0.12.15"
116 +version = "0.12.5"
117 source = "registry+https://github.com/rust-lang/crates.io-index"
118 -checksum = "92570a3f9c98e7e84df84b71d0965ac99b1871fcd75a3773a3bd1bad13f64cf7"
118 +checksum = "96401ca08501972288ecbcde33902fce858bf73fbcbdf91dab8c3a9544e106bb"
119 dependencies = [
120 "anstyle",
121 - "memchr",
122 - "unicode-width 0.2.2",
121 + "unicode-width 0.2.0",
122 ]
123
124 [[package]]
@@ -477,9 +476,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
476
477 [[package]]
478 name = "bitflags"
480 -version = "2.11.0"
479 +version = "2.11.1"
480 source = "registry+https://github.com/rust-lang/crates.io-index"
482 -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
481 +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
482
483 [[package]]
484 name = "bitstream-io"
@@ -725,6 +724,12 @@ dependencies = [
724 "thiserror 2.0.18",
725 ]
726
727 +[[package]]
728 +name = "cassowary"
729 +version = "0.3.0"
730 +source = "registry+https://github.com/rust-lang/crates.io-index"
731 +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
732 +
733 [[package]]
734 name = "castaway"
735 version = "0.2.4"
@@ -879,6 +884,20 @@ dependencies = [
884 "memchr",
885 ]
886
887 +[[package]]
888 +name = "compact_str"
889 +version = "0.8.1"
890 +source = "registry+https://github.com/rust-lang/crates.io-index"
891 +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
892 +dependencies = [
893 + "castaway",
894 + "cfg-if",
895 + "itoa",
896 + "rustversion",
897 + "ryu",
898 + "static_assertions",
899 +]
900 +
901 [[package]]
902 name = "compact_str"
903 version = "0.9.0"
@@ -912,7 +931,7 @@ dependencies = [
931 "encode_unicode",
932 "libc",
933 "once_cell",
915 - "unicode-width 0.2.2",
934 + "unicode-width 0.2.0",
935 "windows-sys 0.59.0",
936 ]
937
@@ -924,7 +943,7 @@ checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87"
943 dependencies = [
944 "encode_unicode",
945 "libc",
927 - "unicode-width 0.2.2",
946 + "unicode-width 0.2.0",
947 "windows-sys 0.61.2",
948 ]
949
@@ -1036,15 +1055,34 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
1055
1056 [[package]]
1057 name = "crossterm"
1039 -version = "0.25.0"
1058 +version = "0.28.1"
1059 source = "registry+https://github.com/rust-lang/crates.io-index"
1041 -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
1060 +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
1061 dependencies = [
1043 - "bitflags 1.3.2",
1062 + "bitflags 2.11.1",
1063 "crossterm_winapi",
1045 - "libc",
1046 - "mio 0.8.11",
1064 + "mio",
1065 "parking_lot",
1066 + "rustix 0.38.44",
1067 + "signal-hook",
1068 + "signal-hook-mio",
1069 + "winapi",
1070 +]
1071 +
1072 +[[package]]
1073 +name = "crossterm"
1074 +version = "0.29.0"
1075 +source = "registry+https://github.com/rust-lang/crates.io-index"
1076 +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
1077 +dependencies = [
1078 + "bitflags 2.11.1",
1079 + "crossterm_winapi",
1080 + "derive_more",
1081 + "document-features",
1082 + "futures-core",
1083 + "mio",
1084 + "parking_lot",
1085 + "rustix 1.1.4",
1086 "signal-hook",
1087 "signal-hook-mio",
1088 "winapi",
@@ -1376,7 +1414,7 @@ version = "0.3.1"
1414 source = "registry+https://github.com/rust-lang/crates.io-index"
1415 checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
1416 dependencies = [
1379 - "bitflags 2.11.0",
1417 + "bitflags 2.11.1",
1418 "block2",
1419 "objc2",
1420 ]
@@ -1398,6 +1436,15 @@ version = "1.1.1"
1436 source = "registry+https://github.com/rust-lang/crates.io-index"
1437 checksum = "c2db04e74f0a9a93103b50e90b96024c9b2bdca8bce6a632ec71b88736d3d359"
1438
1439 +[[package]]
1440 +name = "document-features"
1441 +version = "0.2.12"
1442 +source = "registry+https://github.com/rust-lang/crates.io-index"
1443 +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"
1444 +dependencies = [
1445 + "litrs",
1446 +]
1447 +
1448 [[package]]
1449 name = "dtoa"
1450 version = "1.0.11"
@@ -2143,7 +2190,7 @@ version = "0.2.24"
2190 source = "registry+https://github.com/rust-lang/crates.io-index"
2191 checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"
2192 dependencies = [
2146 - "unicode-width 0.2.2",
2193 + "unicode-width 0.2.0",
2194 ]
2195
2196 [[package]]
@@ -2366,7 +2413,7 @@ dependencies = [
2413 "html5ever 0.38.0",
2414 "tendril 0.5.0",
2415 "thiserror 2.0.18",
2369 - "unicode-width 0.2.2",
2416 + "unicode-width 0.2.0",
2417 ]
2418
2419 [[package]]
@@ -2701,7 +2748,7 @@ dependencies = [
2748 "console 0.15.11",
2749 "number_prefix",
2750 "portable-atomic",
2704 - "unicode-width 0.2.2",
2751 + "unicode-width 0.2.0",
2752 "web-time",
2753 ]
2754
@@ -2714,11 +2761,33 @@ dependencies = [
2761 "console 0.16.3",
2762 "portable-atomic",
2763 "rayon",
2717 - "unicode-width 0.2.2",
2764 + "unicode-width 0.2.0",
2765 "unit-prefix",
2766 "web-time",
2767 ]
2768
2769 +[[package]]
2770 +name = "indoc"
2771 +version = "2.0.7"
2772 +source = "registry+https://github.com/rust-lang/crates.io-index"
2773 +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
2774 +dependencies = [
2775 + "rustversion",
2776 +]
2777 +
2778 +[[package]]
2779 +name = "instability"
2780 +version = "0.3.12"
2781 +source = "registry+https://github.com/rust-lang/crates.io-index"
2782 +checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971"
2783 +dependencies = [
2784 + "darling 0.23.0",
2785 + "indoc",
2786 + "proc-macro2",
2787 + "quote",
2788 + "syn 2.0.117",
2789 +]
2790 +
2791 [[package]]
2792 name = "interpolate_name"
2793 version = "0.2.4"
@@ -2765,6 +2834,15 @@ version = "1.70.2"
2834 source = "registry+https://github.com/rust-lang/crates.io-index"
2835 checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
2836
2837 +[[package]]
2838 +name = "itertools"
2839 +version = "0.13.0"
2840 +source = "registry+https://github.com/rust-lang/crates.io-index"
2841 +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
2842 +dependencies = [
2843 + "either",
2844 +]
2845 +
2846 [[package]]
2847 name = "itertools"
2848 version = "0.14.0"
@@ -2890,9 +2968,9 @@ checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8"
2968
2969 [[package]]
2970 name = "libc"
2893 -version = "0.2.184"
2971 +version = "0.2.185"
2972 source = "registry+https://github.com/rust-lang/crates.io-index"
2895 -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
2973 +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
2974
2975 [[package]]
2976 name = "libfuzzer-sys"
@@ -2929,6 +3007,12 @@ dependencies = [
3007 "libc",
3008 ]
3009
3010 +[[package]]
3011 +name = "linux-raw-sys"
3012 +version = "0.4.15"
3013 +source = "registry+https://github.com/rust-lang/crates.io-index"
3014 +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
3015 +
3016 [[package]]
3017 name = "linux-raw-sys"
3018 version = "0.12.1"
@@ -2941,6 +3025,12 @@ version = "0.8.2"
3025 source = "registry+https://github.com/rust-lang/crates.io-index"
3026 checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
3027
3028 +[[package]]
3029 +name = "litrs"
3030 +version = "1.0.0"
3031 +source = "registry+https://github.com/rust-lang/crates.io-index"
3032 +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
3033 +
3034 [[package]]
3035 name = "llguidance"
3036 version = "1.7.2"
@@ -3008,6 +3098,15 @@ dependencies = [
3098 "vob",
3099 ]
3100
3101 +[[package]]
3102 +name = "lru"
3103 +version = "0.12.5"
3104 +source = "registry+https://github.com/rust-lang/crates.io-index"
3105 +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
3106 +dependencies = [
3107 + "hashbrown 0.15.5",
3108 +]
3109 +
3110 [[package]]
3111 name = "lru-slab"
3112 version = "0.1.2"
@@ -3124,7 +3223,7 @@ version = "0.29.0"
3223 source = "registry+https://github.com/rust-lang/crates.io-index"
3224 checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
3225 dependencies = [
3127 - "bitflags 2.11.0",
3226 + "bitflags 2.11.1",
3227 "block",
3228 "core-graphics-types",
3229 "foreign-types",
@@ -3186,18 +3285,6 @@ dependencies = [
3285 "simd-adler32",
3286 ]
3287
3189 -[[package]]
3190 -name = "mio"
3191 -version = "0.8.11"
3192 -source = "registry+https://github.com/rust-lang/crates.io-index"
3193 -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
3194 -dependencies = [
3195 - "libc",
3196 - "log",
3197 - "wasi",
3198 - "windows-sys 0.48.0",
3199 -]
3200 -
3288 [[package]]
3289 name = "mio"
3290 version = "1.2.0"
@@ -3205,6 +3292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
3292 checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
3293 dependencies = [
3294 "libc",
3295 + "log",
3296 "wasi",
3297 "windows-sys 0.61.2",
3298 ]
@@ -3212,8 +3300,7 @@ dependencies = [
3300 [[package]]
3301 name = "mistralrs"
3302 version = "0.8.1"
3215 -source = "registry+https://github.com/rust-lang/crates.io-index"
3216 -checksum = "9bb0a83340b4492ebba9760ba6845364de369c7e10c1f91af8733d574c7405fa"
3303 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3304 dependencies = [
3305 "anyhow",
3306 "candle-core",
@@ -3240,8 +3327,7 @@ dependencies = [
3327 [[package]]
3328 name = "mistralrs-audio"
3329 version = "0.8.1"
3243 -source = "registry+https://github.com/rust-lang/crates.io-index"
3244 -checksum = "5ac5d36f634c7c20c45845bc995be3b6387ab01048410386a5b180cfeaf89c72"
3330 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3331 dependencies = [
3332 "anyhow",
3333 "apodize",
@@ -3252,8 +3338,7 @@ dependencies = [
3338 [[package]]
3339 name = "mistralrs-core"
3340 version = "0.8.1"
3255 -source = "registry+https://github.com/rust-lang/crates.io-index"
3256 -checksum = "a2b8b9e5c94491d9ceeded3a30291cb6af6ae74810a5776dd55e3bbb8b3429d4"
3341 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3342 dependencies = [
3343 "ahash",
3344 "akin",
@@ -3289,7 +3374,7 @@ dependencies = [
3374 "indexmap 2.14.0",
3375 "indicatif 0.18.4",
3376 "interprocess",
3292 - "itertools",
3377 + "itertools 0.14.0",
3378 "libc",
3379 "llguidance",
3380 "lrtable",
@@ -3350,8 +3435,7 @@ dependencies = [
3435 [[package]]
3436 name = "mistralrs-macros"
3437 version = "0.8.1"
3353 -source = "registry+https://github.com/rust-lang/crates.io-index"
3354 -checksum = "5aa9b4794322d3f89fe61d21f33f67be494c16d5bd869604b111218f32544d32"
3438 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3439 dependencies = [
3440 "darling 0.23.0",
3441 "proc-macro2",
@@ -3362,8 +3446,7 @@ dependencies = [
3446 [[package]]
3447 name = "mistralrs-mcp"
3448 version = "0.8.1"
3365 -source = "registry+https://github.com/rust-lang/crates.io-index"
3366 -checksum = "4fa97d4e3189ed80ebbc730b7da5b2356df0ae004ab489066249340c33c089ab"
3449 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3450 dependencies = [
3451 "anyhow",
3452 "async-trait",
@@ -3383,8 +3466,7 @@ dependencies = [
3466 [[package]]
3467 name = "mistralrs-paged-attn"
3468 version = "0.8.1"
3386 -source = "registry+https://github.com/rust-lang/crates.io-index"
3387 -checksum = "6e53ddf1537426997b46abdadbe6ca8a7ce7668004ed2b7cf00115016558bae8"
3469 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3470 dependencies = [
3471 "anyhow",
3472 "candle-core",
@@ -3400,8 +3482,7 @@ dependencies = [
3482 [[package]]
3483 name = "mistralrs-quant"
3484 version = "0.8.1"
3403 -source = "registry+https://github.com/rust-lang/crates.io-index"
3404 -checksum = "980715493d252e9aaf0779c4c101576d67ef4dd9812bfd77a54987f6f17526f4"
3485 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3486 dependencies = [
3487 "byteorder",
3488 "candle-core",
@@ -3430,8 +3511,7 @@ dependencies = [
3511 [[package]]
3512 name = "mistralrs-vision"
3513 version = "0.8.1"
3433 -source = "registry+https://github.com/rust-lang/crates.io-index"
3434 -checksum = "10046a3da2de5b702d3e829b5ddef7aa829ad454819dcc4876dea481a6cb5456"
3514 +source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#020dcbf8e2c4147c16bb015e89435811501baa28"
3515 dependencies = [
3516 "candle-core",
3517 "image",
@@ -3683,7 +3763,7 @@ version = "0.3.2"
3763 source = "registry+https://github.com/rust-lang/crates.io-index"
3764 checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
3765 dependencies = [
3686 - "bitflags 2.11.0",
3766 + "bitflags 2.11.1",
3767 "dispatch2",
3768 "objc2",
3769 ]
@@ -3700,7 +3780,7 @@ version = "0.3.2"
3780 source = "registry+https://github.com/rust-lang/crates.io-index"
3781 checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
3782 dependencies = [
3703 - "bitflags 2.11.0",
3783 + "bitflags 2.11.1",
3784 "block2",
3785 "libc",
3786 "objc2",
@@ -3723,7 +3803,7 @@ version = "0.3.2"
3803 source = "registry+https://github.com/rust-lang/crates.io-index"
3804 checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
3805 dependencies = [
3726 - "bitflags 2.11.0",
3806 + "bitflags 2.11.1",
3807 "block2",
3808 "dispatch2",
3809 "objc2",
@@ -3746,8 +3826,7 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
3826 [[package]]
3827 name = "onde"
3828 version = "0.1.4"
3749 -source = "registry+https://github.com/rust-lang/crates.io-index"
3750 -checksum = "939495589fec914220491600a00bddedcba437e5fd5e3926ca1af2e8da681bb0"
3829 +source = "git+https://github.com/ondeinference/onde?branch=development#0cf8325b4b9ebcc7278bfc29c5a3d229ab05d632"
3830 dependencies = [
3831 "anyhow",
3832 "cc",
@@ -3769,7 +3848,7 @@ version = "6.5.1"
3848 source = "registry+https://github.com/rust-lang/crates.io-index"
3849 checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0"
3850 dependencies = [
3772 - "bitflags 2.11.0",
3851 + "bitflags 2.11.1",
3852 "libc",
3853 "once_cell",
3854 "onig_sys",
@@ -3963,7 +4042,7 @@ version = "0.18.1"
4042 source = "registry+https://github.com/rust-lang/crates.io-index"
4043 checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
4044 dependencies = [
3966 - "bitflags 2.11.0",
4045 + "bitflags 2.11.1",
4046 "crc32fast",
4047 "fdeflate",
4048 "flate2",
@@ -4319,6 +4398,27 @@ dependencies = [
4398 "rand_core 0.9.5",
4399 ]
4400
4401 +[[package]]
4402 +name = "ratatui"
4403 +version = "0.29.0"
4404 +source = "registry+https://github.com/rust-lang/crates.io-index"
4405 +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
4406 +dependencies = [
4407 + "bitflags 2.11.1",
4408 + "cassowary",
4409 + "compact_str 0.8.1",
4410 + "crossterm 0.28.1",
4411 + "indoc",
4412 + "instability",
4413 + "itertools 0.13.0",
4414 + "lru",
4415 + "paste",
4416 + "strum 0.26.3",
4417 + "unicode-segmentation",
4418 + "unicode-truncate",
4419 + "unicode-width 0.2.0",
4420 +]
4421 +
4422 [[package]]
4423 name = "rav1e"
4424 version = "0.8.1"
@@ -4335,7 +4435,7 @@ dependencies = [
4435 "built",
4436 "cfg-if",
4437 "interpolate_name",
4338 - "itertools",
4438 + "itertools 0.14.0",
4439 "libc",
4440 "libfuzzer-sys",
4441 "log",
@@ -4375,7 +4475,7 @@ version = "11.6.0"
4475 source = "registry+https://github.com/rust-lang/crates.io-index"
4476 checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
4477 dependencies = [
4378 - "bitflags 2.11.0",
4478 + "bitflags 2.11.1",
4479 ]
4480
4481 [[package]]
@@ -4401,7 +4501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4501 checksum = "2964d0cf57a3e7a06e8183d14a8b527195c706b7983549cd5462d5aa3747438f"
4502 dependencies = [
4503 "either",
4404 - "itertools",
4504 + "itertools 0.14.0",
4505 "rayon",
4506 ]
4507
@@ -4442,7 +4542,7 @@ version = "0.5.18"
4542 source = "registry+https://github.com/rust-lang/crates.io-index"
4543 checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
4544 dependencies = [
4445 - "bitflags 2.11.0",
4545 + "bitflags 2.11.1",
4546 ]
4547
4548 [[package]]
@@ -4682,16 +4782,29 @@ dependencies = [
4782 "transpose",
4783 ]
4784
4785 +[[package]]
4786 +name = "rustix"
4787 +version = "0.38.44"
4788 +source = "registry+https://github.com/rust-lang/crates.io-index"
4789 +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
4790 +dependencies = [
4791 + "bitflags 2.11.1",
4792 + "errno",
4793 + "libc",
4794 + "linux-raw-sys 0.4.15",
4795 + "windows-sys 0.59.0",
4796 +]
4797 +
4798 [[package]]
4799 name = "rustix"
4800 version = "1.1.4"
4801 source = "registry+https://github.com/rust-lang/crates.io-index"
4802 checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
4803 dependencies = [
4691 - "bitflags 2.11.0",
4804 + "bitflags 2.11.1",
4805 "errno",
4806 "libc",
4694 - "linux-raw-sys",
4807 + "linux-raw-sys 0.12.1",
4808 "windows-sys 0.61.2",
4809 ]
4810
@@ -4933,7 +5046,7 @@ version = "3.7.0"
5046 source = "registry+https://github.com/rust-lang/crates.io-index"
5047 checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
5048 dependencies = [
4936 - "bitflags 2.11.0",
5049 + "bitflags 2.11.1",
5050 "core-foundation 0.10.1",
5051 "core-foundation-sys",
5052 "libc",
@@ -4956,7 +5069,7 @@ version = "0.33.0"
5069 source = "registry+https://github.com/rust-lang/crates.io-index"
5070 checksum = "feef350c36147532e1b79ea5c1f3791373e61cbd9a6a2615413b3807bb164fb7"
5071 dependencies = [
4959 - "bitflags 2.11.0",
5072 + "bitflags 2.11.1",
5073 "cssparser",
5074 "derive_more",
5075 "log",
@@ -5183,10 +5296,12 @@ dependencies = [
5296 "agent-client-protocol",
5297 "anyhow",
5298 "async-trait",
5299 + "crossterm 0.29.0",
5300 "env_logger",
5301 "futures",
5302 "log",
5303 "onde",
5304 + "ratatui",
5305 "tokio",
5306 "tokio-util",
5307 "uuid 1.23.0",
@@ -5209,7 +5324,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
5324 checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
5325 dependencies = [
5326 "libc",
5212 - "mio 0.8.11",
5327 + "mio",
5328 "signal-hook",
5329 ]
5330
@@ -5439,6 +5554,15 @@ dependencies = [
5554 "syn 1.0.109",
5555 ]
5556
5557 +[[package]]
5558 +name = "strum"
5559 +version = "0.26.3"
5560 +source = "registry+https://github.com/rust-lang/crates.io-index"
5561 +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
5562 +dependencies = [
5563 + "strum_macros 0.26.4",
5564 +]
5565 +
5566 [[package]]
5567 name = "strum"
5568 version = "0.27.2"
@@ -5457,6 +5581,19 @@ dependencies = [
5581 "strum_macros 0.28.0",
5582 ]
5583
5584 +[[package]]
5585 +name = "strum_macros"
5586 +version = "0.26.4"
5587 +source = "registry+https://github.com/rust-lang/crates.io-index"
5588 +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
5589 +dependencies = [
5590 + "heck 0.5.0",
5591 + "proc-macro2",
5592 + "quote",
5593 + "rustversion",
5594 + "syn 2.0.117",
5595 +]
5596 +
5597 [[package]]
5598 name = "strum_macros"
5599 version = "0.27.2"
@@ -5670,7 +5807,7 @@ version = "0.6.0"
5807 source = "registry+https://github.com/rust-lang/crates.io-index"
5808 checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc"
5809 dependencies = [
5673 - "bitflags 2.11.0",
5810 + "bitflags 2.11.1",
5811 "byteorder",
5812 "enum-as-inner",
5813 "libc",
@@ -5698,7 +5835,7 @@ version = "0.7.0"
5835 source = "registry+https://github.com/rust-lang/crates.io-index"
5836 checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
5837 dependencies = [
5701 - "bitflags 2.11.0",
5838 + "bitflags 2.11.1",
5839 "core-foundation 0.9.4",
5840 "system-configuration-sys",
5841 ]
@@ -5722,7 +5859,7 @@ dependencies = [
5859 "fastrand",
5860 "getrandom 0.4.2",
5861 "once_cell",
5725 - "rustix",
5862 + "rustix 1.1.4",
5863 "windows-sys 0.61.2",
5864 ]
5865
@@ -5753,7 +5890,7 @@ version = "0.4.4"
5890 source = "registry+https://github.com/rust-lang/crates.io-index"
5891 checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874"
5892 dependencies = [
5756 - "rustix",
5893 + "rustix 1.1.4",
5894 "windows-sys 0.61.2",
5895 ]
5896
@@ -5902,13 +6039,13 @@ checksum = "a620b996116a59e184c2fa2dfd8251ea34a36d0a514758c6f966386bd2e03476"
6039 dependencies = [
6040 "ahash",
6041 "aho-corasick",
5905 - "compact_str",
6042 + "compact_str 0.9.0",
6043 "dary_heap",
6044 "derive_builder",
6045 "esaxx-rs",
6046 "fancy-regex 0.14.0",
6047 "getrandom 0.3.4",
5911 - "itertools",
6048 + "itertools 0.14.0",
6049 "log",
6050 "macro_rules_attribute",
6051 "monostate",
@@ -5935,12 +6072,12 @@ checksum = "b238e22d44a15349529690fb07bd645cf58149a1b1e44d6cb5bd1641ff1a6223"
6072 dependencies = [
6073 "ahash",
6074 "aho-corasick",
5938 - "compact_str",
6075 + "compact_str 0.9.0",
6076 "dary_heap",
6077 "derive_builder",
6078 "esaxx-rs",
6079 "getrandom 0.3.4",
5943 - "itertools",
6080 + "itertools 0.14.0",
6081 "log",
6082 "macro_rules_attribute",
6083 "monostate",
@@ -5962,13 +6099,13 @@ dependencies = [
6099
6100 [[package]]
6101 name = "tokio"
5965 -version = "1.51.1"
6102 +version = "1.52.0"
6103 source = "registry+https://github.com/rust-lang/crates.io-index"
5967 -checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c"
6104 +checksum = "a91135f59b1cbf38c91e73cf3386fca9bb77915c45ce2771460c9d92f0f3d776"
6105 dependencies = [
6106 "bytes",
6107 "libc",
5971 - "mio 1.2.0",
6108 + "mio",
6109 "parking_lot",
6110 "pin-project-lite",
6111 "signal-hook-registry",
@@ -6121,7 +6258,7 @@ version = "0.6.8"
6258 source = "registry+https://github.com/rust-lang/crates.io-index"
6259 checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
6260 dependencies = [
6124 - "bitflags 2.11.0",
6261 + "bitflags 2.11.1",
6262 "bytes",
6263 "futures-util",
6264 "http",
@@ -6148,11 +6285,10 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
6285 [[package]]
6286 name = "tqdm"
6287 version = "0.8.0"
6151 -source = "registry+https://github.com/rust-lang/crates.io-index"
6152 -checksum = "b316d5c2ac649ca856dacd487d0ebb94f3b746bada51355d93dd2c007ab62a2e"
6288 +source = "git+https://github.com/setoelkahfi/tqdm?branch=deps%2Fbump-crossterm#41e4182829136e6dadbdd1c36af824d19219147a"
6289 dependencies = [
6290 "anyhow",
6155 - "crossterm",
6291 + "crossterm 0.29.0",
6292 "once_cell",
6293 ]
6294
@@ -6352,6 +6488,17 @@ version = "1.13.2"
6488 source = "registry+https://github.com/rust-lang/crates.io-index"
6489 checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c"
6490
6491 +[[package]]
6492 +name = "unicode-truncate"
6493 +version = "1.1.0"
6494 +source = "registry+https://github.com/rust-lang/crates.io-index"
6495 +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
6496 +dependencies = [
6497 + "itertools 0.13.0",
6498 + "unicode-segmentation",
6499 + "unicode-width 0.1.14",
6500 +]
6501 +
6502 [[package]]
6503 name = "unicode-width"
6504 version = "0.1.14"
@@ -6360,9 +6507,9 @@ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
6507
6508 [[package]]
6509 name = "unicode-width"
6363 -version = "0.2.2"
6510 +version = "0.2.0"
6511 source = "registry+https://github.com/rust-lang/crates.io-index"
6365 -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
6512 +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
6513
6514 [[package]]
6515 name = "unicode-xid"
@@ -6823,7 +6970,7 @@ version = "0.244.0"
6970 source = "registry+https://github.com/rust-lang/crates.io-index"
6971 checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
6972 dependencies = [
6826 - "bitflags 2.11.0",
6973 + "bitflags 2.11.1",
6974 "hashbrown 0.15.5",
6975 "indexmap 2.14.0",
6976 "semver",
@@ -7118,15 +7265,6 @@ dependencies = [
7265 "windows-targets 0.42.2",
7266 ]
7267
7121 -[[package]]
7122 -name = "windows-sys"
7123 -version = "0.48.0"
7124 -source = "registry+https://github.com/rust-lang/crates.io-index"
7125 -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
7126 -dependencies = [
7127 - "windows-targets 0.48.5",
7128 -]
7129 -
7268 [[package]]
7269 name = "windows-sys"
7270 version = "0.52.0"
@@ -7488,7 +7626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
7626 checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
7627 dependencies = [
7628 "anyhow",
7491 - "bitflags 2.11.0",
7629 + "bitflags 2.11.1",
7630 "indexmap 2.14.0",
7631 "log",
7632 "serde",
Cargo.toml
+4
@@ -24,6 +24,10 @@ tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "io-std"
24 tokio-util = { version = "0.7", features = ["compat"] }
25 futures = "0.3"
26
27 +# TUI (interactive chat mode)
28 +ratatui = "0.29"
29 +crossterm = { version = "0.29", features = ["event-stream"] }
30 +
31 # Utilities
32 anyhow = "1"
33 log = "0.4"
src/main.rs
+11
@@ -24,6 +24,7 @@
24 //! }
25 //! ```
26
27 +mod chat;
28 mod setup;
29
30 use std::sync::Arc;
@@ -198,6 +199,16 @@ async fn main() -> anyhow::Result<()> {
199
200 log::info!("model loaded and ready");
201
202 + // If stdin is a terminal, run the interactive chat UI instead of the ACP agent.
203 + if std::io::IsTerminal::is_terminal(&std::io::stdin()) {
204 + log::info!("interactive mode — starting chat UI");
205 + chat::run(&engine).await?;
206 + log::info!("siGit shutting down");
207 + return Ok(());
208 + }
209 +
210 + log::info!("ACP mode — starting agent server");
211 +
212 // ACP server
213
214 let (notification_tx, mut notification_rx) = mpsc::channel::<SessionNotification>(256);