Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 003a44be5e feat(agents): Send to Agent from the editor tab menu and editor tab drops on the composer
The editor tab context menu gets Send to Agent, which adds the tab's file as
an @ reference. Dragging a file tab onto the agent composer adds the same
reference; session and virtual tabs are not accepted.
2026-11-27 03:22:04 +08:00
l0ng-ai a96c70f2a7 fix(ui): show the JSON icon for .uproject and .uplugin files (#6239)
#5444 associated .uproject and .uplugin with JSON but left them on the
generic file icon, which failed icons.test on main. They now use the JSON
file icon.
2026-11-27 03:15:01 +08:00
l0ng-ai 304503b9f1 feat(vcs): submenu aim on repository rows of the multi-repository branch popup (#6238)
Moving the pointer from a repository row toward its open branch list no
longer swaps the list for each repository row it crosses: like submenus of a
menu (menuAim), a row reached while heading for the list waits 300 ms, and
the list stays when the pointer enters it. The repository the window works
on is listed first; the others keep their order and colours.

Fixes #6152
2026-11-27 03:14:15 +08:00
l0ng-ai 06cf8fb16a fix(deps): update gix to 0.90 for GHSA-q54r-jf2p-rfr2 (#6237)
gix 0.88-0.89 let an untrusted .git/config turn off the protectNTFS /
protectHFS path checks (GHSA-q54r-jf2p-rfr2); 0.90.0 fixes it. The IDE opens
arbitrary repositories with gix, so it takes the fixed release. No API
changes were needed.
2026-11-27 03:09:19 +08:00
l0ng-ai 521e00d075 feat(vcs): Checkout and Update for a local branch with an upstream (#6236)
The branch popup and the Branches pane offer Checkout and Update next to
Checkout for a local branch that is not checked out: it checks the branch out,
then updates it with the configured update method, in each repository where
the checkout took place (the common-branch menu of a multi-repository project
acts in all of them). Disabled without a tracked branch.

Fixes #6222
2026-11-27 03:07:37 +08:00
l0ng-ai b4cad6ec1b feat(run): Pause Output in the console context menu (#6235)
The Run/Debug console's context menu gets a Pause Output toggle. While it is
on, the output shown so far stays put and new output (including the rest of the
open line) is held back; turning it off shows everything that arrived
meanwhile. Clear All also resumes.

Fixes #5998
2026-11-27 03:03:15 +08:00
21 змінених файлів з 594 додано та 161 видалено

No files matched your search

Створено
+198 -148
Переглянути файл
@@ -474,7 +474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "457d7ed3f888dfd2c7af56d4975cade43c622f74bdcddfed6d4352f57acc6310"
dependencies = [
"futures-util",
"parking_lot",
"parking_lot 0.12.5",
"portable-atomic",
"tokio",
]
@@ -1655,9 +1655,9 @@ dependencies = [
"cfg-if",
"crossbeam-utils",
"hashbrown 0.14.5",
"lock_api",
"lock_api 0.4.14",
"once_cell",
"parking_lot_core",
"parking_lot_core 0.9.12",
"serde",
]
@@ -2154,7 +2154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -2210,6 +2210,16 @@ dependencies = [
"serde",
]
[[package]]
name = "faster-hex"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4ede54fe330383a5de28c0a1f06668ff9dbf06c8094e1c5150c39488a5e911d"
dependencies = [
"defmt 0.3.101",
"serde",
]
[[package]]
name = "fastrand"
version = "2.5.0"
@@ -2453,8 +2463,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f"
dependencies = [
"futures-core",
"lock_api",
"parking_lot",
"lock_api 0.4.14",
"parking_lot 0.12.5",
]
[[package]]
@@ -2734,9 +2744,9 @@ dependencies = [
[[package]]
name = "gix"
version = "0.89.0"
version = "0.90.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2156d2e07fc3afa7632a82bf3cb0db91f995645a2852f642105c9ac9b52e1cb2"
checksum = "b92b20c1560511a9014b16e29db2f3c6f0580d4fe289b70f41131277b065a3b0"
dependencies = [
"gix-actor",
"gix-attributes",
@@ -2788,9 +2798,9 @@ dependencies = [
[[package]]
name = "gix-actor"
version = "0.44.0"
version = "0.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2127da41042965ed205568a52443465806944f71c8acd73f48ec94b8cd8e798e"
checksum = "78243d3371019288a40a75ba1a58de2815c32591fc87b9f7cb01918bce364ca8"
dependencies = [
"bstr",
"gix-date",
@@ -2799,9 +2809,9 @@ dependencies = [
[[package]]
name = "gix-attributes"
version = "0.37.0"
version = "0.37.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0feca0b8919aba9f123b75de54062dd61eb37d2a2130f34be520da6ed8b8ef72"
checksum = "6b9947d93a94d41ddde66ac655674269121cbebaf6cdee30d8d0e7dbe85edb4c"
dependencies = [
"bstr",
"gix-error",
@@ -2816,27 +2826,27 @@ dependencies = [
[[package]]
name = "gix-bitmap"
version = "0.6.0"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "408cb9e482e0dcc5fc481850556348dda6981ec054a4a8e81a8e1bbf84f85eef"
checksum = "9543567ee22142c81fdf75b2811160bec749a5b9f48665e4763f88b1789b8612"
dependencies = [
"gix-error",
]
[[package]]
name = "gix-chunk"
version = "0.10.0"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "626335faf30ed235744642c2309aa370683b8bb2757f1c22a807e274dff60074"
checksum = "60cd5f0e47ffae98bad241ccbc031693765004fb4c2a419f7fda2963232af1e3"
dependencies = [
"gix-error",
]
[[package]]
name = "gix-command"
version = "0.12.0"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac560c05e19455016a4a94b33a77debe59aaed8783da32a73d31c9975947152e"
checksum = "2986e78ebad43510ccd7dd18bd9f22e9afd52f2de791e2979b9c715bacb6f0a8"
dependencies = [
"bstr",
"gix-error",
@@ -2847,9 +2857,9 @@ dependencies = [
[[package]]
name = "gix-commitgraph"
version = "0.41.0"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfede9936d4b789867c09722576aea4ceb0e3aacf962eef035ebab0686b41a80"
checksum = "60b53b700d2a506cf98075099df1fcc0558265cbb47fd86bc6d03c231e4bd72a"
dependencies = [
"bstr",
"gix-chunk",
@@ -2861,9 +2871,9 @@ dependencies = [
[[package]]
name = "gix-config"
version = "0.62.0"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65a9c000fa9a9154f22ffc8f8d74426e9300d759c2029e8701e2ba39d5d464ea"
checksum = "3e11ccf82e9630c4e7befbae07cbe90e79de61dc73a34448c2dec70a13da9ebf"
dependencies = [
"bstr",
"gix-config-value",
@@ -2881,9 +2891,9 @@ dependencies = [
[[package]]
name = "gix-config-value"
version = "0.21.0"
version = "0.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab206c2fccfd35e0de7fb1b424997cfd42912062c66dae024e08a06e22d46674"
checksum = "d7666081ef0ecc5e1dc54bc6ce16dac9d7b9490780f6c130393ef9e50c909d4a"
dependencies = [
"bitflags 2.13.2",
"bstr",
@@ -2895,9 +2905,9 @@ dependencies = [
[[package]]
name = "gix-date"
version = "0.18.0"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f7eeeecc599082f32b5ea6a8c4c734e38be9730e2c09e3fe2851bb4692393e9"
checksum = "4c538190012dbb536df54734ec38cc1109270c73f2f76585c011dd5b0c9f087c"
dependencies = [
"bstr",
"gix-error",
@@ -2907,9 +2917,9 @@ dependencies = [
[[package]]
name = "gix-diff"
version = "0.69.0"
version = "0.70.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa640963fdcbc6b4718e48593c3917f5ae764b59fb5a96313cb5a757246d041d"
checksum = "2c794988335792f85c3ca79c385c950b3a921a71ba3df361cb1f9e5b6bd4a6e4"
dependencies = [
"bstr",
"gix-attributes",
@@ -2931,9 +2941,9 @@ dependencies = [
[[package]]
name = "gix-dir"
version = "0.31.0"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84e916ef77f19161b738ae9913662bc36fed1e48256a943f40277b3a585841da"
checksum = "af939f21c65d4f15457c72d08c874d454893185c51a3596e3c2bd3d9c567618d"
dependencies = [
"bstr",
"gix-discover",
@@ -2951,9 +2961,9 @@ dependencies = [
[[package]]
name = "gix-discover"
version = "0.57.0"
version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7d0f8fd2c7e4b458eb3081362d49b54bd0131d23ecd49be802085a11f0d3cee"
checksum = "4a0875f4e5408713fcf92265973cc38bf9dc5a93384ce218beba0572b7785a03"
dependencies = [
"bstr",
"dunce",
@@ -2966,18 +2976,18 @@ dependencies = [
[[package]]
name = "gix-error"
version = "0.5.1"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb3308a948a01b94ef13d9ee7a9b28c1303d8d9a9dc33b401ff40c2184d9e04a"
checksum = "50ad6c42fa50280f382026ff838a8afa7ab2ad83e92349cab4392972baae69cd"
dependencies = [
"bstr",
]
[[package]]
name = "gix-filter"
version = "0.36.0"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d8d932ee4043f7d77d15ee58d2be2bc95accea5dd1d77fd145de1b7c504551b"
checksum = "f8df8d50fda4684c6ec366f75e4082ab6fc3d437d3deec30ff88462710b68d17"
dependencies = [
"bstr",
"encoding_rs",
@@ -2996,9 +3006,9 @@ dependencies = [
[[package]]
name = "gix-fs"
version = "0.24.0"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44a05d043e670c055cd8b53d078562dc0bc1e322bff6b0376b407d37cf72dcc5"
checksum = "808f23d897ddfe847d9b7206bda947901885be623bdf96b226a2dccf87f018c7"
dependencies = [
"bstr",
"gix-error",
@@ -3011,9 +3021,9 @@ dependencies = [
[[package]]
name = "gix-glob"
version = "0.29.0"
version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b0d03ab50fa841621031960679caf7fe94940968d9a0736d12a580f2c03e525"
checksum = "7a12789fa68a150293ad8834d267b31044240532b5ccf2734d228fe985cba2be"
dependencies = [
"bitflags 2.13.2",
"bstr",
@@ -3025,11 +3035,11 @@ dependencies = [
[[package]]
name = "gix-hash"
version = "0.28.0"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ca156064e378d8c657084365846cedb8dc498c6ea4500965a64d74f12af2be"
checksum = "b4802ffb87e051795822bfdaa8ab9075b23e316684f7054e6ce4a246b2b76f4e"
dependencies = [
"faster-hex",
"faster-hex 0.10.1",
"gix-error",
"gix-utils",
"sha1dc",
@@ -3044,7 +3054,7 @@ checksum = "916cb6b2ec42ffaca624e7867bb382a4673015cb4ffcd7330b48085d02e4c615"
dependencies = [
"gix-hash",
"hashbrown 0.17.1",
"parking_lot",
"parking_lot 0.12.5",
]
[[package]]
@@ -3062,9 +3072,9 @@ dependencies = [
[[package]]
name = "gix-imara-diff"
version = "0.3.1"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c48eccd894bd15555b0346470e63491ded94aefe76b3fcb1052084b5a393238"
checksum = "23347fa4a29a440eebf045d0bc21da465c0dc70434c2a4bcdfcc658f16c9e27e"
dependencies = [
"bstr",
"hashbrown 0.17.1",
@@ -3072,9 +3082,9 @@ dependencies = [
[[package]]
name = "gix-index"
version = "0.57.0"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc6db8b20a3dba8836daf90b24199600bb27dcfce3a127ec24ae61e15a7c5b68"
checksum = "06bfc736774a623307eda890c918d308ef5acd37402bde2d6768fccb1f6ecb5d"
dependencies = [
"bitflags 2.13.2",
"bstr",
@@ -3124,9 +3134,9 @@ dependencies = [
[[package]]
name = "gix-note"
version = "0.3.0"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd364f8bdceaed9e7f3ae40f324b16e39f20e9c7e6a6a058f7c6ec66c3e6205c"
checksum = "8473688f2262f4364f521b39ce2a5dbe94494f327fc19c945318d7aff580952e"
dependencies = [
"gix-error",
"gix-hash",
@@ -3135,9 +3145,9 @@ dependencies = [
[[package]]
name = "gix-object"
version = "0.66.0"
version = "0.66.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0e38f50177e211642af154f9a7f710b7a3a637e635f9b6adb9d51973b0f9209"
checksum = "beaf9086dd00b9d2a177ca3ae83210ce926cee7c0faa112e053851221cd8f94d"
dependencies = [
"bstr",
"gix-actor",
@@ -3156,9 +3166,9 @@ dependencies = [
[[package]]
name = "gix-odb"
version = "0.86.0"
version = "0.87.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca444f33f2140876ed6b5313c2b550b4af699008193c96f3bff5023afa9ef4ea"
checksum = "941b5b99fed282a5b05b54ea486c36c76b558afe151e6804c3acdd5c8f3c3459"
dependencies = [
"arc-swap",
"crc32fast",
@@ -3175,15 +3185,15 @@ dependencies = [
"gix-utils",
"gix-zlib",
"memmap2",
"parking_lot",
"parking_lot 0.12.5",
"tempfile",
]
[[package]]
name = "gix-pack"
version = "0.76.0"
version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5024cc503cd29461a705ae90b9eae772fa8f0e6fafc1c48513877dc374de05"
checksum = "e2ef461798b1e6cb652192c69dfc9658dfc1bab457ef812dd1ab85d75104cbef"
dependencies = [
"clru",
"crc32fast",
@@ -3204,45 +3214,46 @@ dependencies = [
[[package]]
name = "gix-packetline"
version = "0.24.0"
version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830e51b227f6a925fe9308858ac91170dd00fa2880f5480fc81e8a4594fe2c35"
checksum = "6e198121152a397ad1007e3334931b04b393fa17f6af34f17b33e376b15bf5ea"
dependencies = [
"bstr",
"faster-hex",
"faster-hex 2.0.0",
"gix-error",
"gix-trace",
]
[[package]]
name = "gix-parallel"
version = "0.50.0"
version = "0.50.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e994cf1eec247ba4be7f9e7c0d58cc73f83eecb5fcb9feb595df5ba3d2078546"
checksum = "d3a5c86eeec0194a3444611b4762ba05cc5029408a617348b4f6a74a34c222cd"
dependencies = [
"crossbeam-channel",
"gix-trace",
"once_cell",
"parking_lot",
"parking_lot 0.13.0",
]
[[package]]
name = "gix-path"
version = "0.14.0"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6d563d4d0c975ed0df4e853f9ec962a2ba46633b1d324e1a5582541fcae0c6b"
checksum = "615e3ff75800c67022ec8065b67e0846420a88c5f484e6c4fd81c78472e4c77a"
dependencies = [
"bstr",
"gix-error",
"gix-trace",
"gix-validate",
"winreg 0.56.0",
]
[[package]]
name = "gix-pathspec"
version = "0.22.0"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e3b7f03e516a8435d18c3cc2d446925940c81d409145ac21edb5a576f0625e4"
checksum = "490aa03a11e0cbb998a0a593b75e27ea2e30df4ebd8f84f60e0641b9b72270e8"
dependencies = [
"bitflags 2.13.2",
"bstr",
@@ -3255,9 +3266,9 @@ dependencies = [
[[package]]
name = "gix-protocol"
version = "0.67.0"
version = "0.68.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "832b5dc46a3c0a6f6fa8f8e571c11074add4b545c6789799ae6d6c36ae1a294e"
checksum = "83677ebae6a1a09dc07f2435b5ebe68470dc51afb74052135e98fd7c11f85ba9"
dependencies = [
"bstr",
"gix-date",
@@ -3273,9 +3284,9 @@ dependencies = [
[[package]]
name = "gix-quote"
version = "0.10.0"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7f92bc1b13c09e88388578e8aa1e987ec35f28fca158c13b1baa7ab1a85b124"
checksum = "5069a7ec021bb47abe9f12dcc075d292e8cf4a9dff5fffd38595b39c6b419aaa"
dependencies = [
"bstr",
"gix-error",
@@ -3284,9 +3295,9 @@ dependencies = [
[[package]]
name = "gix-ref"
version = "0.69.0"
version = "0.69.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "073bc0928e1f747823b1eaed94918119dacef4c616532bc3d17e5b7457863471"
checksum = "68686e4697b9cd15d1b152ef51df870513210ed22938eacc13b3672b76035f13"
dependencies = [
"gix-actor",
"gix-error",
@@ -3304,9 +3315,9 @@ dependencies = [
[[package]]
name = "gix-refspec"
version = "0.47.0"
version = "0.47.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccc7010dae0df2900aa77cc67f8aca042cd80e35938ccc179010d863b1d42a0c"
checksum = "2569309da6fdc230973cf5b846508154c0e813fda60f2b2da768cc5655ed312c"
dependencies = [
"bstr",
"gix-error",
@@ -3317,9 +3328,9 @@ dependencies = [
[[package]]
name = "gix-revision"
version = "0.51.0"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63210c1943b67fa700806c3c3486fc16a92b3ea871f5cf092340b8eec10a0ca1"
checksum = "241465fc73530f41d0a1c18320c5e291365b7c2c2a3dfd07afe2a5d6265085c8"
dependencies = [
"bitflags 2.13.2",
"bstr",
@@ -3336,9 +3347,9 @@ dependencies = [
[[package]]
name = "gix-revwalk"
version = "0.37.0"
version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "800479fbbf1e7f94f663e07943a91add5499343e7aac611a81e6a0460fd44af6"
checksum = "8b46edeacd25d9d3131941ae6bc91002bf7ba10e130393b7e9bc23d528625447"
dependencies = [
"gix-commitgraph",
"gix-date",
@@ -3351,9 +3362,9 @@ dependencies = [
[[package]]
name = "gix-sec"
version = "0.16.0"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5640f642a1b471616d48230b1def7ca743cb30903441ff84800cafbab3c0fddf"
checksum = "9598d1f35baec7038c2d278bfcc18f1d8951f41dcc3f51ab6175661dfe5a6137"
dependencies = [
"bitflags 2.13.2",
"gix-path",
@@ -3363,9 +3374,9 @@ dependencies = [
[[package]]
name = "gix-shallow"
version = "0.15.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94bc0720a3d6b10f18e3ac382a7780bcfc4c6bee94a8b5857b8e4ec94c50d754"
checksum = "1d805949578724b5164c90ec6d19567832ccaa5ba8a3fe26f7befc52007e2407"
dependencies = [
"bstr",
"gix-error",
@@ -3376,9 +3387,9 @@ dependencies = [
[[package]]
name = "gix-status"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42d3174a9f3fb991cf25a7a609ab6c50f19baa7d5f8ce05a48c202f7db4ce3ba"
checksum = "31b00c359278210e3cc0803d057db1d61c5d6694c21ed9ad0b8f8f862157247a"
dependencies = [
"bstr",
"filetime",
@@ -3398,14 +3409,13 @@ dependencies = [
"gix-worktree",
"hashbrown 0.16.1",
"portable-atomic",
"windows-sys 0.61.2",
]
[[package]]
name = "gix-submodule"
version = "0.36.0"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d945257bd0d624ca844a5a36c79d748df080f355b0ac92d68793875aa529a3f"
checksum = "d558a1307b6f3de2a92bd91d0570c53952d4f2329e6860813007508c8ed413dc"
dependencies = [
"bstr",
"gix-config",
@@ -3425,22 +3435,22 @@ dependencies = [
"dashmap",
"gix-fs",
"libc",
"parking_lot",
"parking_lot 0.12.5",
"tempfile",
"windows-sys 0.61.2",
]
[[package]]
name = "gix-trace"
version = "0.3.0"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "133f2de116104d637541831b6acb157898556d5eeec363ab2eb1c583adc6bb56"
checksum = "1c96f84d731a96780e6a7ad5ee70b4ecc398499946b62617945fbaeb6ab878f8"
[[package]]
name = "gix-transport"
version = "0.61.0"
version = "0.62.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e43d6b0097ea9f2f266d5d6c43b8f615ed3da7c686ec8771cd17c1cb33cb0de"
checksum = "cdcd9cdfd8745aa38f926a4a380c13d76b200d7338de57fc492982cd5a6652ba"
dependencies = [
"bstr",
"gix-command",
@@ -3456,9 +3466,9 @@ dependencies = [
[[package]]
name = "gix-traverse"
version = "0.63.0"
version = "0.64.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a668a6e7f7688e5a43eaf161f1471ffc559de1a5fd8471e861c64d59d1699e1e"
checksum = "00171e00e91508300d0361072c4eb110ec0f1322d8b95ed36887231702a38ebc"
dependencies = [
"bitflags 2.13.2",
"gix-commitgraph",
@@ -3473,9 +3483,9 @@ dependencies = [
[[package]]
name = "gix-url"
version = "0.40.0"
version = "0.40.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04317dea7a5dd5253bbcab060c230f3de6a57d17cc9600c6cd7030bf4795b414"
checksum = "def12e1016b872f1094442882f627905c59bd73480435291a4958cf373a8f28d"
dependencies = [
"bstr",
"gix-error",
@@ -3486,9 +3496,9 @@ dependencies = [
[[package]]
name = "gix-utils"
version = "0.5.1"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8e770b8c34311044d1addc7b18957db0ac27183707e1140dc90e6f674a6354e"
checksum = "b5e6d46894c7a4fd9c5e26d233a0fa836002ba0af9a11aef58923d317c486e10"
dependencies = [
"bstr",
"bytes",
@@ -3501,9 +3511,9 @@ dependencies = [
[[package]]
name = "gix-validate"
version = "0.13.0"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbcd59cc52742468bc5c8a0e7123390d154f45e6cbd37461b0dcecdc681f2179"
checksum = "5d6f293fd8abd9bd9bc1e0a23541f73607e932b5a2bde2246320da38edde5726"
dependencies = [
"bstr",
"gix-error",
@@ -3511,9 +3521,9 @@ dependencies = [
[[package]]
name = "gix-worktree"
version = "0.58.0"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a285c0f6b41e504e8bb81ca3f861c4da00cb3d5ced3210a4591112f22da6d38f"
checksum = "fe92aec0a25cf073394492a6ee2aa4d27632acde91a653d34de0e4da6afb485d"
dependencies = [
"bstr",
"gix-attributes",
@@ -3530,9 +3540,9 @@ dependencies = [
[[package]]
name = "gix-worktree-stream"
version = "0.38.0"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d2789610e8179d4e0e8e51170a52a66483c103a8ad3c7db4d075b571856cb6"
checksum = "3fe5d65793848ffb596f6c5596fd120b132038736525628227e2388ca454f64d"
dependencies = [
"gix-attributes",
"gix-error",
@@ -3545,14 +3555,14 @@ dependencies = [
"gix-trace",
"gix-traverse",
"gix-utils",
"parking_lot",
"parking_lot 0.12.5",
]
[[package]]
name = "gix-zlib"
version = "0.3.0"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c2edb206bf06f3c801f4f6789c696396171558ab9b4c7f1fe3ba4d39b00b0f4"
checksum = "81a49a8b263d2a140f1c178ff93375b8d4cc7b1d3252cd87ce1ca88bce62b9b9"
dependencies = [
"gix-error",
"zlib-rs",
@@ -4156,7 +4166,7 @@ dependencies = [
"ide-tools",
"ide-vcs",
"ide-vfs",
"parking_lot",
"parking_lot 0.12.5",
"rustix",
"semver",
"serde",
@@ -4297,7 +4307,7 @@ dependencies = [
"ide-language",
"libc",
"memchr",
"parking_lot",
"parking_lot 0.12.5",
"percent-encoding",
"portable-pty",
"serde",
@@ -4329,7 +4339,7 @@ dependencies = [
"notify",
"open",
"oracledb",
"parking_lot",
"parking_lot 0.12.5",
"reqwest",
"rsa",
"rustls",
@@ -4385,7 +4395,7 @@ dependencies = [
"blake3",
"dunce",
"ed25519-dalek",
"parking_lot",
"parking_lot 0.12.5",
"semver",
"serde",
"serde_json",
@@ -4403,7 +4413,7 @@ version = "0.1.53"
dependencies = [
"ide-android",
"ide-core",
"parking_lot",
"parking_lot 0.12.5",
"serde_json",
"tempfile",
]
@@ -4510,7 +4520,7 @@ dependencies = [
"ide-workspace",
"ignore",
"jsonschema",
"parking_lot",
"parking_lot 0.12.5",
"quick-xml 0.42.0",
"regex-lite",
"regex-syntax",
@@ -4540,7 +4550,7 @@ dependencies = [
"hyper-util",
"ide-core",
"ide-vfs",
"parking_lot",
"parking_lot 0.12.5",
"reqwest",
"rustls",
"rustls-platform-verifier",
@@ -4565,7 +4575,7 @@ dependencies = [
"ide-language",
"ignore",
"nucleo-matcher",
"parking_lot",
"parking_lot 0.12.5",
"postcard",
"rayon",
"redb",
@@ -4593,7 +4603,7 @@ version = "0.1.53"
dependencies = [
"encoding_rs",
"ide-core",
"parking_lot",
"parking_lot 0.12.5",
"serde",
"serde_json",
"tempfile",
@@ -4634,7 +4644,7 @@ dependencies = [
"ide-extension",
"ide-text",
"memchr",
"parking_lot",
"parking_lot 0.12.5",
"regex-lite",
"serde",
"serde_json",
@@ -4699,7 +4709,7 @@ dependencies = [
"ide-vfs",
"ignore",
"lsp-types",
"parking_lot",
"parking_lot 0.12.5",
"percent-encoding",
"serde",
"serde_json",
@@ -4739,7 +4749,7 @@ dependencies = [
"jupyter-protocol",
"jupyter-zmq-client",
"libc",
"parking_lot",
"parking_lot 0.12.5",
"serde",
"serde_json",
"specta",
@@ -4759,7 +4769,7 @@ dependencies = [
"dunce",
"ide-core",
"ide-extension",
"parking_lot",
"parking_lot 0.12.5",
"semver",
"serde",
"serde_json",
@@ -4798,7 +4808,7 @@ dependencies = [
"ide-run",
"ide-ssh",
"ignore",
"parking_lot",
"parking_lot 0.12.5",
"serde",
"serde_json",
"specta",
@@ -4818,7 +4828,7 @@ dependencies = [
"ide-language",
"ide-workspace",
"libc",
"parking_lot",
"parking_lot 0.12.5",
"portable-pty",
"quick-xml 0.42.0",
"serde",
@@ -4900,7 +4910,7 @@ name = "ide-spell"
version = "0.1.53"
dependencies = [
"ide-core",
"parking_lot",
"parking_lot 0.12.5",
"serde",
"serde_json",
"specta",
@@ -4917,7 +4927,7 @@ dependencies = [
"ide-core",
"keyring",
"keyring-core",
"parking_lot",
"parking_lot 0.12.5",
"russh",
"russh-sftp",
"rustls",
@@ -4967,7 +4977,7 @@ version = "0.1.53"
dependencies = [
"ide-core",
"libc",
"parking_lot",
"parking_lot 0.12.5",
"portable-pty",
"serde",
"specta",
@@ -4999,7 +5009,7 @@ dependencies = [
"ide-core",
"ide-language",
"libc",
"parking_lot",
"parking_lot 0.12.5",
"serde",
"serde_json",
"sha2 0.10.9",
@@ -5046,7 +5056,7 @@ dependencies = [
"ide-core",
"ignore",
"notify",
"parking_lot",
"parking_lot 0.12.5",
"rayon",
"rustix",
"serde",
@@ -5087,7 +5097,7 @@ dependencies = [
"ide-core",
"ide-text",
"ide-vfs",
"parking_lot",
"parking_lot 0.12.5",
"semver",
"serde",
"serde_json",
@@ -5241,7 +5251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f"
dependencies = [
"io-lifetimes 3.0.1",
"windows-sys 0.52.0",
"windows-sys 0.60.2",
]
[[package]]
@@ -5279,7 +5289,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -5779,6 +5789,15 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "lock_api"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65d91b22da179613dcf4d6ec8349563f52a363f6849e03b00dd0a185ec4a59af"
dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.34"
@@ -6750,7 +6769,7 @@ dependencies = [
"objc2-app-kit 0.3.2",
"objc2-foundation 0.3.2",
"objc2-web-kit 0.3.2",
"parking_lot",
"parking_lot 0.12.5",
"percent-encoding",
"reqwest",
"security-framework",
@@ -6940,8 +6959,18 @@ version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
"parking_lot_core",
"lock_api 0.4.14",
"parking_lot_core 0.9.12",
]
[[package]]
name = "parking_lot"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9cf937ca4e1d0b7578784559063422fc39ae7c5a00f02471f2614d5486fd226"
dependencies = [
"lock_api 0.5.0",
"parking_lot_core 0.10.0",
]
[[package]]
@@ -6952,7 +6981,19 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"redox_syscall 0.5.18",
"smallvec",
"windows-link",
]
[[package]]
name = "parking_lot_core"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cfff060068cc18aa7815010fcaf80c68c7fb9e85fc7f5c0f9bf142c21d19826"
dependencies = [
"libc",
"redox_syscall 0.9.5",
"smallvec",
"windows-link",
]
@@ -7403,7 +7444,7 @@ version = "31.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf52d87428247c5aa3760ac8e7d8b13ec7b3579b955a8c3f311668b6860acba5"
dependencies = [
"parking_lot",
"parking_lot 0.12.5",
]
[[package]]
@@ -7599,6 +7640,15 @@ dependencies = [
"bitflags 2.13.2",
]
[[package]]
name = "redox_syscall"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd"
dependencies = [
"bitflags 2.13.2",
]
[[package]]
name = "redox_users"
version = "0.5.3"
@@ -7638,7 +7688,7 @@ dependencies = [
"ahash",
"fluent-uri 0.3.2",
"once_cell",
"parking_lot",
"parking_lot 0.12.5",
"percent-encoding",
"serde_json",
]
@@ -7972,7 +8022,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -8040,7 +8090,7 @@ dependencies = [
"security-framework",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -8714,7 +8764,7 @@ dependencies = [
"objc2-foundation 0.3.2",
"objc2-quartz-core 0.3.2",
"raw-window-handle",
"redox_syscall",
"redox_syscall 0.5.18",
"tracing",
"wasm-bindgen",
"web-sys",
@@ -8814,7 +8864,7 @@ version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e"
dependencies = [
"lock_api",
"lock_api 0.4.14",
]
[[package]]
@@ -9088,7 +9138,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"
dependencies = [
"new_debug_unreachable",
"parking_lot",
"parking_lot 0.12.5",
"phf_shared",
"precomputed-hash",
]
@@ -9276,7 +9326,7 @@ dependencies = [
"objc2-app-kit 0.3.2",
"objc2-foundation 0.3.2",
"objc2-ui-kit 0.3.2",
"parking_lot",
"parking_lot 0.12.5",
"percent-encoding",
"raw-window-handle",
"tao-macros",
@@ -9784,10 +9834,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.3.4",
"getrandom 0.4.3",
"once_cell",
"rustix",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -9967,7 +10017,7 @@ dependencies = [
"bytes",
"libc",
"mio",
"parking_lot",
"parking_lot 0.12.5",
"pin-project-lite",
"signal-hook-registry",
"socket2",
@@ -11624,7 +11674,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -12422,7 +12472,7 @@ dependencies = [
"log",
"num-traits",
"once_cell",
"parking_lot",
"parking_lot 0.12.5",
"rand 0.9.5",
"regex",
"scc",
+1 -1
Переглянути файл
@@ -108,7 +108,7 @@ jupyter-zmq-client = { version = "=2.0.0", default-features = false, features =
jupyter-protocol = "=2.0.3"
zeromq = { version = "0.6", default-features = false, features = ["tokio-runtime", "tcp-transport"] }
lsp-types = "0.97"
gix = { version = "0.89", default-features = false }
gix = { version = "0.90", default-features = false }
portable-pty = "0.9"
reqwest = { version = "0.13", default-features = false, features = ["rustls-no-provider", "http2", "charset", "socks", "gzip", "deflate", "brotli"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
+101
Переглянути файл
@@ -0,0 +1,101 @@
/**
* Git Branches of a project with several repositories: the current repository is listed first,
* and moving the pointer from a repository row toward its open branch list keeps that list open
* while it crosses the other repository rows (like a submenu of a menu). Git is stubbed at the
* IPC layer.
*/
import type { Page } from "@playwright/test";
import { expect, stubDesktop, test } from "./fixtures";
const ROOTS = ["/dev/acme/app", "/dev/acme/lib", "/dev/acme/tools", "/dev/acme/web"];
async function openBranches(page: Page) {
await stubDesktop(page);
await page.evaluate(
async ({ roots }) => {
const h = window.__ipc.handlers;
const branch = (name: string, current = false) => ({
name,
current,
remote: false,
upstream: null,
ahead: 0,
behind: 0,
lastCommitMs: null,
commit: "1111111",
});
const repoName = (root: string) => root.split("/").pop()!;
h.vcs_roots = () =>
roots.map((root) => ({ root, operation: null, head: "main", headCommit: "1111111", hasRemotes: false }));
h.vcs_branch_info = () => ({
head: "main",
headCommit: "1111111",
upstream: null,
ahead: 0,
behind: 0,
operation: null,
});
h.vcs_status = () => [];
h.vcs_tags = () => [];
h.vcs_branches = (args: { repo?: string | null }) => [
branch("main", true),
branch(`only-${repoName(args?.repo ?? roots[0]!)}`),
];
const vcsModule = "/src/features/vcs/store.ts";
const { useVcs, refreshNow, loadBranches } = await import(/* @vite-ignore */ vcsModule);
// The window works on the third repository.
useVcs.setState({ available: true, root: roots[0], repo: roots[2], branchesLoaded: false });
await refreshNow();
await loadBranches();
const actionsModule = "/src/platform/actions.ts";
const { executeAction } = await import(/* @vite-ignore */ actionsModule);
await executeAction("vcs.branches");
},
{ roots: ROOTS },
);
const list = page.getByRole("listbox", { name: "Repositories and branches" });
await expect(list).toBeVisible();
return list;
}
const center = async (locator: ReturnType<Page["locator"]>) => {
const box = (await locator.boundingBox())!;
return { x: box.x + box.width / 2, y: box.y + box.height / 2, box };
};
test("multi-repository Git Branches lists the current repository first and keeps a branch list open on the way to it", async ({
workbench: page,
}) => {
const list = await openBranches(page);
const rows = list.getByRole("option").filter({ has: page.locator("[data-row-key^='repo:']") });
await expect(rows).toHaveCount(4);
await expect(rows.first()).toContainText("tools");
// Open the first repository's branches, then head diagonally into the list across the rows below.
const first = await center(rows.nth(0));
await page.mouse.move(first.x, first.y);
const branchesOfTools = page.getByRole("dialog", { name: "Branches of tools" });
await expect(branchesOfTools).toBeVisible();
const target = (await branchesOfTools.boundingBox())!;
const last = await center(rows.nth(3));
await page.mouse.move(target.x + 12, last.y, { steps: 12 });
await expect(branchesOfTools).toBeVisible();
await expect(branchesOfTools.getByText("only-tools", { exact: true })).toBeVisible();
// Moving straight onto another repository row switches to its branches.
const second = await center(rows.nth(1));
await page.mouse.move(second.x - 40, second.y);
await page.mouse.move(second.x - 60, second.y);
const branchesOfApp = page.getByRole("dialog", { name: "Branches of app" });
await expect(branchesOfApp).toBeVisible();
await expect(branchesOfTools).toBeHidden();
// Stopping on a row while heading for the open list switches only after a short delay.
const third = await center(rows.nth(2));
const appList = (await branchesOfApp.boundingBox())!;
await page.mouse.move(appList.x - 30, second.y);
await page.mouse.move(appList.x - 6, third.y);
await expect(branchesOfApp).toBeVisible();
await expect(page.getByRole("dialog", { name: "Branches of lib" })).toBeVisible();
await expect(branchesOfApp).toBeHidden();
});
+21 -3
Переглянути файл
@@ -24,7 +24,9 @@ import { registerKeyClaim } from "@/platform/keymap";
import { isVirtualUri } from "@/platform/virtualDocs";
import { copySourceOf } from "@/platform/clipboardSource";
import {
EDITOR_TAB_MIME,
getAgentContextSources,
maybeEditorService,
notifications,
OWNS_FILE_DROP,
type AgentContextSource,
@@ -100,6 +102,18 @@ type Item =
const isSection = (item: Item) => item.kind === "section";
/** The file of an editor tab drag payload (`{paneId, tabId}`), null for virtual and non-file tabs. */
const tabFilePath = (payload: string): string | null => {
try {
const p = JSON.parse(payload) as { paneId?: unknown; tabId?: unknown };
if (typeof p.paneId !== "string" || typeof p.tabId !== "string") return null;
const input = maybeEditorService()?.tabInput?.(p.paneId, p.tabId);
return input?.kind === "file" && input.path && !isVirtualUri(input.path) ? input.path : null;
} catch {
return null;
}
};
const SECTION_TITLES: Record<Section, string> = {
command: "Commands",
skill: "Skills",
@@ -941,17 +955,21 @@ export function Composer(props: ComposerProps) {
};
}, [addPaths, addImages]);
// Files and folders dragged from the Project view: the same `@` references.
// Files and folders dragged from the Project view, and file tabs dragged from the editor:
// the same `@` references.
useEffect(() => {
const el = boxRef.current;
if (!el) return;
return registerDropTarget(el, {
accepts: (type) => type === FILES_DRAG,
accepts: (type, data) => type === FILES_DRAG || (type === EDITOR_TAB_MIME && !!tabFilePath(data.payload)),
over: () => setFileOver(true),
leave: () => setFileOver(false),
drop: (data) => {
setFileOver(false);
addPaths(data.payload.split("\n").filter(Boolean));
if (data.type === EDITOR_TAB_MIME) {
const path = tabFilePath(data.payload);
if (path) addPaths([path]);
} else addPaths(data.payload.split("\n").filter(Boolean));
},
});
}, [addPaths]);
+27
Переглянути файл
@@ -7,6 +7,7 @@ import userEvent from "@testing-library/user-event";
import { caretOf, setCaret, textOf, typeChars, typeIn } from "./composerTesting";
import chipStyles from "./ReferenceChip.module.css";
import { FILES_DRAG, dragSession } from "@/ui";
import { EDITOR_TAB_MIME, provideEditorService, type EditorService } from "@/workbench/contributions";
import { useProject } from "@/platform/project";
const findFiles = vi.fn();
@@ -123,6 +124,32 @@ describe("Composer dropped paths", () => {
expect(textOf(box)).toBe("@src/a.ts @src/dir/ ");
});
it("references the file of an editor tab dragged onto it and ignores other tabs", () => {
provideEditorService({
tabInput: (_pane: string, tab: string) =>
tab === "file"
? { kind: "file", key: "/p/src/a.ts", path: "/p/src/a.ts" }
: { kind: "agentSession", key: "agent:one", data: { task: "one" } },
} as unknown as EditorService);
const box = renderComposer();
const restore = document.elementFromPoint;
document.elementFromPoint = () => box;
try {
act(() => {
const other = dragSession({
type: EDITOR_TAB_MIME,
payload: JSON.stringify({ paneId: "p", tabId: "session" }),
});
expect(other.drop(0, 0)).toBe(false);
const file = dragSession({ type: EDITOR_TAB_MIME, payload: JSON.stringify({ paneId: "p", tabId: "file" }) });
expect(file.drop(0, 0)).toBe(true);
});
} finally {
document.elementFromPoint = restore;
}
expect(textOf(box)).toBe("@src/a.ts ");
});
it("deduplicates live references and allows a deleted reference to be dropped again", () => {
const box = renderComposer();
drop(box, "/p/src/a.ts\n/p/src/a.ts\n/p/src/dir/");
+3 -2
Переглянути файл
@@ -232,7 +232,7 @@ export function activate(): () => void {
registerStatusItem({ id: "agents.status", align: "right", priority: 3, title: "Agents", component: AgentsStatus }),
registerMenuGroup({
id: "agents.send",
menus: ["editor", "projectView"],
menus: ["editor", "editorTab", "projectView"],
order: 80,
items: (menu, { paths, dirs }) =>
paths.length && !paths.some(isVirtualUri) && agentsHere()
@@ -240,7 +240,8 @@ export function activate(): () => void {
{
kind: "action",
action: "agents.sendToAgent",
arg: menu === "projectView" ? paths.map((p, i) => (dirs?.[i] ? `${p}/` : p)) : undefined,
// The editor sends its selection; a tab or the Project view sends the files.
arg: menu === "editor" ? undefined : paths.map((p, i) => (dirs?.[i] ? `${p}/` : p)),
},
]
: [],
+18
Переглянути файл
@@ -3,6 +3,7 @@ import { act, fireEvent, render, screen } from "@testing-library/react";
import type { AgentEntry, AgentEvent, AgentTask } from "@/bindings";
import {
dropOnEditor,
menuGroupItems,
useContributions,
useEditorTabTitles,
type EditorInput,
@@ -595,3 +596,20 @@ describe("the diff of an agent change", () => {
expect(backend.openInput.mock.lastCall![0].data.chain).toBeUndefined();
});
});
describe("Send to Agent menus", () => {
it("sends the selection from the editor and the files from an editor tab or the Project view", () => {
const dispose = activate();
try {
const send = (menu: "editor" | "editorTab" | "projectView", dirs?: boolean[]) =>
menuGroupItems(menu, { paths: ["/p/a.ts", "/p/src"].slice(0, dirs ? 2 : 1), dirs }).find(
(i) => "action" in i && i.action === "agents.sendToAgent",
);
expect(send("editor")).toMatchObject({ arg: undefined });
expect(send("editorTab")).toMatchObject({ arg: ["/p/a.ts"] });
expect(send("projectView", [false, true])).toMatchObject({ arg: ["/p/a.ts", "/p/src/"] });
} finally {
dispose();
}
});
});
+21 -2
Переглянути файл
@@ -128,6 +128,11 @@ export interface FileLink extends LinkPosition {
}
/** The file links on the `shown` lines (a collapsed fold hides its links), in output order. */
/** A copy of a line the model may still append to (the open last line). */
function copyLine(line: ConsoleLine): ConsoleLine {
return { ...line, spans: line.spans.map((span) => ({ ...span })) };
}
export function fileLinks(lines: readonly ConsoleLine[], shown: (index: number) => boolean): FileLink[] {
const links: FileLink[] = [];
lines.forEach((line, i) => {
@@ -257,7 +262,12 @@ export function ConsoleView({
}: ConsoleViewProps) {
const scrollRef = useRef<HTMLDivElement>(null);
const innerRef = useRef<HTMLDivElement>(null);
const lines = model.lines;
// Pause Output: the output so far stays on screen while the process keeps
// writing; resuming shows everything that arrived meanwhile.
const [paused, setPaused] = useState<readonly ConsoleLine[] | null>(null);
const lines = paused ?? model.lines;
const togglePaused = () =>
setPaused((p) => (p ? null : model.lines.map((l, i, all) => (i === all.length - 1 ? copyLine(l) : l))));
const patterns = useWorkflowSettings((s) => s.console.foldPatterns);
const logColors = useWorkflowSettings((s) => s.console.logColors);
const consoleRules = compileConsoleRules(useConsoleRules((s) => s.providers));
@@ -539,7 +549,16 @@ export function ConsoleView({
// Opens Settings › Console with the text added to the fold patterns, for OK / Cancel there.
run: () => void executeAction("file.settings", `build.console#${foldText}`),
},
{ label: "Clear All", icon: "trash", disabled: !onClear, run: () => onClear?.() },
{ label: "Pause Output", icon: "pause", checked: !!paused, run: togglePaused },
{
label: "Clear All",
icon: "trash",
disabled: !onClear,
run: () => {
setPaused(null);
onClear?.();
},
},
...(input
? [{ kind: "separator" } as const, { label: "Send EOF", shortcut: "⌃D", run: () => input.onEof() }]
: []),
+52
Переглянути файл
@@ -0,0 +1,52 @@
import { afterEach, beforeEach, expect, it, vi } from "vitest";
import { act, fireEvent, render, within } from "@testing-library/react";
import { useProject } from "@/platform/project";
import { hideContextMenu, useContextMenuStore } from "@/ui";
import { ConsoleModel } from "./console";
import { ConsoleView } from "./ConsoleView";
vi.mock("@tanstack/react-virtual", () => ({
useVirtualizer: ({ count }: { count: number }) => ({
getTotalSize: () => count * 20,
getVirtualItems: () => Array.from({ length: count }, (_, index) => ({ index, start: index * 20, key: index })),
scrollToIndex: () => {},
measureElement: () => {},
measure: () => {},
}),
}));
beforeEach(() => useProject.setState({ settings: null }));
afterEach(() => act(hideContextMenu));
function pauseItem(log: Element) {
fireEvent.contextMenu(log);
const items = useContextMenuStore.getState().menu?.items ?? [];
return items.find((i) => "label" in i && i.label === "Pause Output") as
| { checked?: boolean; run?: () => void }
| undefined;
}
it("Pause Output keeps the output on screen until it is resumed, then shows what arrived meanwhile", () => {
const model = new ConsoleModel();
model.append({ kind: "stdout", text: "first\nsecond " });
const view = (version: number) => (
<ConsoleView model={model} version={version} softWrap={false} follow={false} onFollowChange={() => {}} cwd="/" />
);
const { container, rerender } = render(view(1));
const log = within(container).getByRole("log");
expect(pauseItem(log)?.checked).toBe(false);
act(() => pauseItem(log)!.run!());
// The open line and new lines keep arriving while paused, but are not shown.
model.append({ kind: "stdout", text: "half\nthird\n" });
rerender(view(2));
expect(log.textContent).toContain("first");
expect(log.textContent).toContain("second");
expect(log.textContent).not.toContain("half");
expect(log.textContent).not.toContain("third");
expect(pauseItem(log)?.checked).toBe(true);
act(() => pauseItem(log)!.run!());
expect(log.textContent).toContain("second half");
expect(log.textContent).toContain("third");
});
+52 -2
Переглянути файл
@@ -25,6 +25,7 @@ import {
} from "@/ui";
import { useRowHeight } from "@/ui/density";
import type { PopupAnchor } from "@/ui/Popup";
import { isSubmenuAim, type MenuPointer } from "@/ui/menuAim";
import { useActiveRepository, useWidgetBranch } from "./activeRepository";
import {
buildBranchRows,
@@ -737,6 +738,14 @@ function MultiRepoPanel({
const { menuFor, setMenuFor, openTagMenu } = useBranchSubmenu();
const [repoMenu, setRepoMenu] = useState<{ root: string; el: HTMLElement; focus: boolean } | null>(null);
const listRef = useRef<HTMLDivElement>(null);
const aim = useRef<{
previous: MenuPointer | null;
pointer: MenuPointer | null;
moved: boolean;
pending: number | null;
timer?: ReturnType<typeof setTimeout>;
}>({ previous: null, pointer: null, moved: false, pending: null });
const repoMenuLabel = repoMenu ? tx`Branches of ${repoName(repoMenu.root)}` : "";
const searchRef = useRef<HTMLInputElement>(null);
/** Back from a repository's submenu to the search field. */
const closeRepoMenu = () => {
@@ -867,11 +876,52 @@ function MultiRepoPanel({
}
};
// The pointer on a repository opens its branches right away; elsewhere it closes them.
const hover = (i: number) => {
const applyHover = (i: number) => {
clearTimeout(aim.current.timer);
aim.current.pending = null;
setActive(i);
if (rows[i]?.type === "repo") openSub(i, false);
else setRepoMenu(null);
};
/** While the pointer heads for the open branch list, the rows it crosses wait (like submenus of a menu). */
const aiming = () => {
const { previous, pointer } = aim.current;
const popup = repoMenu && document.querySelector(`[data-popup][aria-label="${CSS.escape(repoMenuLabel)}"]`);
return !!popup && !!pointer && isSubmenuAim(previous, pointer, popup.getBoundingClientRect());
};
const deferHover = (i: number) => {
clearTimeout(aim.current.timer);
aim.current.pending = i;
aim.current.timer = setTimeout(() => applyHover(i), 300);
};
const hover = (i: number) => {
const fromPointer = aim.current.moved;
aim.current.moved = false;
const row = rows[i];
const openRepo = row?.type === "repo" && row.repo.root === repoMenu?.root;
if (fromPointer && repoMenu && !openRepo && aiming()) deferHover(i);
else applyHover(i);
};
// Pointer positions for the aim check, recorded before the rows see the move (capture phase).
useEffect(() => {
if (!repoMenu) return;
const onMove = (e: PointerEvent) => {
const a = aim.current;
if (a.pointer?.x === e.clientX && a.pointer.y === e.clientY) return;
a.previous = a.pointer;
a.pointer = { x: e.clientX, y: e.clientY };
a.moved = true;
if (a.pending === null) return;
const popup = document.querySelector(`[data-popup][aria-label="${CSS.escape(repoMenuLabel)}"]`);
if (popup?.contains(e.target as Node)) {
clearTimeout(a.timer);
a.pending = null;
} else if (!aiming()) applyHover(a.pending);
};
document.addEventListener("pointermove", onMove, true);
return () => document.removeEventListener("pointermove", onMove, true);
});
useEffect(() => () => clearTimeout(aim.current.timer), []);
const onKeyDown = (e: KeyboardEvent) => {
if (isNewBranchStroke(strokeOf(e))) {
@@ -984,7 +1034,7 @@ function MultiRepoPanel({
placement="right-start"
offset={2}
autoFocus={repoMenu.focus}
aria-label={tx`Branches of ${repoName(repoMenu.root)}`}
aria-label={repoMenuLabel}
onClose={closeRepoMenu}
className={styles.popup}
>
+9
Переглянути файл
@@ -160,6 +160,15 @@ describe("buildMultiRepoRows", () => {
]);
});
it("lists the current repository first, keeping the others' order and colours", () => {
const rows = summary(buildMultiRepoRows({ ...input, current: "/p/ology-gateway", query: "" }));
expect(rows.filter((r) => r.startsWith("repo"))).toEqual([
"repo ology-gateway [dev] c3",
"repo ology-collect [dev] c1",
"repo ology-dependencies [dev] c2",
]);
});
it("groups common remote branches by remote when expanded", () => {
const expanded = new Map([
["common:local", false],
+38 -2
Переглянути файл
@@ -6,6 +6,7 @@ const mocks = vi.hoisted(() => ({
update: vi.fn(),
updateCurrent: vi.fn(),
head: vi.fn(),
checkout: vi.fn(),
notify: vi.fn(),
openWorktree: vi.fn(),
}));
@@ -22,7 +23,7 @@ vi.mock("../ops", async (original) => ({
vi.mock("../openWorktree", () => ({ openWorktree: mocks.openWorktree }));
vi.mock("@/platform/ipc", async (original) => {
const real = await original<typeof import("@/platform/ipc")>();
return { ...real, commands: { ...real.commands, vcsBranchInfo: mocks.head } };
return { ...real, commands: { ...real.commands, vcsBranchInfo: mocks.head, vcsCheckout: mocks.checkout } };
});
vi.mock("@/workbench/contributions", async (original) => ({
...(await original<typeof import("@/workbench/contributions")>()),
@@ -30,7 +31,7 @@ vi.mock("@/workbench/contributions", async (original) => ({
}));
import { branchMenu, commonBranchMenu } from "../branchMenu";
import { branchUpdateSummary, updateBranches } from "../branchOps";
import { branchUpdateSummary, checkoutAndUpdate, updateBranches } from "../branchOps";
import { getAction } from "@/platform/actions";
import { useProject } from "@/platform/project";
import type { Settings } from "@/bindings";
@@ -209,3 +210,38 @@ describe("branch common to several repositories", () => {
]);
});
});
describe("Checkout and Update", () => {
const item = (items: ReturnType<typeof branchMenu>) =>
items.find((i) => "label" in i && i.label === "Checkout and Update") as { disabled?: boolean } | undefined;
it("is offered for a local branch that is not checked out, and needs a tracked branch", () => {
expect(item(branchMenu(branch("topic"), "main"))?.disabled).toBe(false);
expect(item(branchMenu(branch("topic", { upstream: null }), "main"))?.disabled).toBe(true);
expect(item(branchMenu(branch("origin/topic", { remote: true, upstream: null }), "main"))).toBeUndefined();
expect(item(branchMenu(branch("main", { current: true }), "main"))).toBeUndefined();
const common = { name: "feature", remote: false, current: false, favorite: false, upstream: true };
expect(item(commonBranchMenu(common, ["/p", "/p/lib"], null))?.disabled).toBe(false);
});
it("checks the branch out, then pulls it with the configured method", async () => {
let head = "main";
mocks.checkout.mockImplementation(async () => {
head = "topic";
return { status: "ok", data: { kind: "done" } };
});
mocks.head.mockImplementation(async () => ({ status: "ok", data: { head, upstream: `origin/${head}` } }));
await checkoutAndUpdate(branch("topic"));
expect(mocks.checkout).toHaveBeenCalledTimes(1);
expect(mocks.updateCurrent).toHaveBeenCalledWith([
{ repo: "/p", op: { op: "pull", expectedBranch: "topic", rebase: false } },
]);
});
it("updates nothing when the checkout did not happen", async () => {
mocks.checkout.mockResolvedValue({ status: "error", error: { kind: "failed", message: "nope" } });
await checkoutAndUpdate(branch("topic"));
expect(mocks.updateCurrent).not.toHaveBeenCalled();
expect(mocks.update).not.toHaveBeenCalled();
});
});
+19
Переглянути файл
@@ -5,6 +5,7 @@ import { showContextMenu, useContextMenuStore, type MenuItem } from "@/ui";
import { isFavoriteBranch } from "./branches";
import {
branchRef,
checkoutAndUpdate,
checkoutBranch,
checkoutDetached,
checkoutInRepos,
@@ -158,6 +159,15 @@ export function branchMenu(
}
const items: MenuItem[] = [
{ label: "Checkout", run: run(() => checkoutBranch(b)) },
...(b.remote
? []
: [
{
label: "Checkout and Update",
disabled: !b.upstream || updating || !!existingWorktree,
run: run(() => checkoutAndUpdate(b)),
},
]),
...(existingWorktree && !b.remote
? [{ label: "Open Existing Worktree", icon: "folder", run: run(() => openWorktree(existingWorktree, true)) }]
: []),
@@ -327,6 +337,15 @@ export function commonBranchMenu(
const base = bases[0];
const items: MenuItem[] = [
{ label: "Checkout", run: run(() => checkoutInRepos(b, roots)) },
...(b.remote
? []
: [
{
label: "Checkout and Update",
disabled: !b.upstream || !!useVcs.getState().remoteBusy || checkedOutInWorktree,
run: run(() => checkoutAndUpdate(b, roots)),
},
]),
newFrom,
worktree,
...(bases.every(Boolean)
+21
Переглянути файл
@@ -1376,6 +1376,27 @@ export async function checkoutAndRebase({ branch, repos }: CheckoutRebaseTarget)
});
}
/**
* Checkout and Update on a local branch: checks it out (in `roots`, or the
* current repository), then updates it like Update does, in each repository
* where the checkout took place.
*/
export async function checkoutAndUpdate(branch: NamedBranch, roots?: readonly string[]) {
const project = useProject.getState().project;
if (roots) await checkoutInRepos(branch, roots);
else await checkoutBranch(branch);
if (useProject.getState().project !== project) return;
const repos: readonly (string | null)[] = roots ?? [currentRepo()];
const heads = await Promise.all(
repos.map(async (repo) => [repo, await call(commands.vcsBranchInfo(repo)).catch(() => null)] as const),
);
if (useProject.getState().project !== project) return;
const targets = heads
.filter(([, info]) => info?.head === branch.name)
.map(([repo]) => ({ repo: repo ?? undefined, branch }));
if (targets.length) await updateBranches(targets);
}
export type BranchUpdateTarget = { repo?: string; branch?: Pick<Branch, "name" | "remote"> };
/** Update the named branches. Checked-out branches follow the configured update method. */
+3
Переглянути файл
@@ -215,6 +215,9 @@ export function buildMultiRepoRows({
if (m !== false)
repoRows.push({ type: "repo", key: `repo:${repo.root}`, repo, color: repoColorIndex(i), matches: m });
});
// The repository this window works on comes first; the others keep their order (and colours).
const currentRow = repoRows.findIndex((r) => r.type === "repo" && r.repo.root === current);
if (currentRow > 0) repoRows.unshift(...repoRows.splice(currentRow, 1));
blocks.push(repoRows);
/** A group row followed (when expanded) by its children; nothing when it has none. */
+2
Переглянути файл
@@ -3645,6 +3645,7 @@
"Shelve Silently": "Shelve Silently",
"Unshelve Silently": "Unshelve Silently",
"Fold Lines Like This": "Fold Lines Like This",
"Pause Output": "Pause Output",
"Remove All Watches": "Remove All Watches",
"Not Cherry-Picked Commits": "Not Cherry-Picked Commits",
"Show Branch Diff": "Show Branch Diff",
@@ -3658,6 +3659,7 @@
"Stopped highlighting unpicked commits from '{source}' after the branch filter changed": "Stopped highlighting unpicked commits from '{source}' after the branch filter changed",
"Checkout and Rebase": "Checkout and Rebase",
"Checkout and Rebase onto Current": "Checkout and Rebase onto Current",
"Checkout and Update": "Checkout and Update",
"Checkout and Rebase failed": "Checkout and Rebase failed",
"Checkout and Rebase requires an existing commit": "Checkout and Rebase requires an existing commit",
"Checked out and rebased '{branchName}'": "Checked out and rebased '{branchName}'",
+2
Переглянути файл
@@ -3905,6 +3905,7 @@
"Hold Shift to Run, F4 to edit, Delete to remove": "Удерживайте Shift для запуска, F4 — для редактирования, Delete — для удаления",
"Send EOF": "Отправить EOF",
"Fold Lines Like This": "Свернуть похожие строки",
"Pause Output": "Приостановить вывод",
"Collapse folded lines": "Сворачивать свернутые строки",
"Close Tool Window Tab": "Закрыть вкладку окна инструментов",
"No open files": "Нет открытых файлов",
@@ -5615,6 +5616,7 @@
"Stopped highlighting unpicked commits from '{source}' after the branch filter changed": "Подсветка неперенесённых коммитов из '{source}' остановлена после изменения фильтра веток",
"Checkout and Rebase": "Переключиться и перебазировать",
"Checkout and Rebase onto Current": "Переключиться и перебазировать на текущую",
"Checkout and Update": "Переключиться и обновить",
"Checkout and Rebase failed": "Не удалось переключиться и перебазировать",
"Checkout and Rebase requires an existing commit": "Для переключения и перебазирования требуется существующий коммит",
"Checked out and rebased '{branchName}'": "Выполнено переключение и перебазирование '{branchName}'",
+1
Переглянути файл
@@ -2757,6 +2757,7 @@
"Shelve Silently": "Bildirim Vermeden Rafa Al",
"Unshelve Silently": "Bildirim Vermeden Raftan Çıkar",
"Fold Lines Like This": "Buna Benzer Satırları Daralt",
"Pause Output": "Çıktıyı Duraklat",
"Remove All Watches": "İzlenen Tüm İfadeleri Kaldır",
"GitHub account": "GitHub hesabı",
"Leave empty to use the active GitHub CLI account. OpenIDEA resolves the token at launch and never stores it.": "Etkin GitHub CLI hesabını kullanmak için boş bırakın. OpenIDEA tokeni başlatma sırasında çözümler ve saklamaz.",
+1
Переглянути файл
@@ -3474,6 +3474,7 @@
"Hold Shift to Run, F4 to edit, Delete to remove": "按住 Shift 執行,F4 編輯,Delete 刪除",
"Send EOF": "傳送 EOF",
"Fold Lines Like This": "摺疊與此類似的行",
"Pause Output": "暫停輸出",
"Collapse folded lines": "摺疊行",
"Close Tool Window Tab": "關閉工具視窗分頁",
"No open files": "沒有開啟的檔案",
+2
Переглянути файл
@@ -4039,6 +4039,7 @@
"Hold Shift to Run, F4 to edit, Delete to remove": "按住 Shift 运行,F4 编辑,Delete 删除",
"Send EOF": "发送 EOF",
"Fold Lines Like This": "折叠与此类似的行",
"Pause Output": "暂停输出",
"Collapse folded lines": "折叠行",
"Close Tool Window Tab": "关闭工具窗口标签页",
"No open files": "没有打开的文件",
@@ -5759,6 +5760,7 @@
"Stopped highlighting unpicked commits from '{source}' after the branch filter changed": "分支筛选已更改,停止高亮 '{source}' 中未拣选的提交",
"Checkout and Rebase": "签出并变基",
"Checkout and Rebase onto Current": "签出并变基到当前分支",
"Checkout and Update": "签出并更新",
"Checkout and Rebase failed": "签出并变基失败",
"Checkout and Rebase requires an existing commit": "签出并变基需要已有提交",
"Checked out and rebased '{branchName}'": "已签出并变基 '{branchName}'",
+2 -1
Переглянути файл
@@ -1176,7 +1176,8 @@ const EXT_ICONS = table({
"file-jsp": "jsp jspx jspf jsph tag tagf tagx",
"file-freemarker": "ftl ftlh ftlx",
"file-astro": "astro",
"file-json": "json jsonc json5 jsonl ndjson geojson topojson webmanifest har avsc code-workspace code-snippets map",
"file-json":
"json jsonc json5 jsonl ndjson geojson topojson webmanifest har avsc code-workspace code-snippets map uproject uplugin",
"file-md": "md mdx markdown mdown mkd mkdn mdwn ronn workbook",
"file-word": "doc docx rtf odt",
"file-pdf": "pdf",