id
int64 0
886
| original_context
stringlengths 648
56.6k
| modified_context
stringlengths 587
47.6k
| omitted_context
sequencelengths 0
19
| omitted_index
sequencelengths 0
19
| metadata
dict |
---|---|---|---|---|---|
400 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55ee70d760b34..5d0808235eddf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,38 @@
+<a name="20.0.0-next.3"></a>
+# 20.0.0-next.3 (2025-03-19)
+## Breaking Changes
+### core
+- * `TestBed.get` has been removed. Use `TestBed.inject` instead.
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [bec1610da2](https://github.com/angular/angular/commit/bec1610da241f24bdb9120843a91973a3823a004) | feat | add extended diagnostic for invalid nullish coalescing ([#60279](https://github.com/angular/angular/pull/60279)) |
+| [1971e57a45](https://github.com/angular/angular/commit/1971e57a457ff9fd4dc8a353b59b51364e08b443) | feat | support type checking of host bindings ([#60267](https://github.com/angular/angular/pull/60267)) |
+| [29eded6457](https://github.com/angular/angular/commit/29eded6457b72e7c8a2d53c847ec43996b73c054) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
+| [2d51a203dc](https://github.com/angular/angular/commit/2d51a203dc87d6d880c3cf6d68bf8590f5dd689b) | fix | wrong event name for host listener decorators ([#60460](https://github.com/angular/angular/pull/60460)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [22d3f0562c](https://github.com/angular/angular/commit/22d3f0562cc6c21ebf7c29ff0e01bce40dcd50a0) | feat | add hook for producer creation side effects ([#60333](https://github.com/angular/angular/pull/60333)) |
+| [b154fb3911](https://github.com/angular/angular/commit/b154fb391142db6139cddad820a9a72838f0f16c) | feat | add support for two-way bindings on dynamically-created components ([#60342](https://github.com/angular/angular/pull/60342)) |
+| [644d9f3bbd](https://github.com/angular/angular/commit/644d9f3bbdb5e77a78d95669cfd6b0f6d8cb09b9) | feat | mark the toSignal API as stable ([#60442](https://github.com/angular/angular/pull/60442)) |
+| [5e209cb560](https://github.com/angular/angular/commit/5e209cb560fdfb943169a09d35389c703fa71418) | feat | remove TestBed.get ([#60414](https://github.com/angular/angular/pull/60414)) |
+| [b461e06ecb](https://github.com/angular/angular/commit/b461e06ecb93c9c03e6f41700558731e1f0d3b70) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [b8daf472d8](https://github.com/angular/angular/commit/b8daf472d83b41b3d97d4014737d31c7cfc0ace0) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
+| [8953e45a43](https://github.com/angular/angular/commit/8953e45a43fcb6ea694e77fb9ae779c5d3973524) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+| [48974c3cf8](https://github.com/angular/angular/commit/48974c3cf88ab1a70411bea4950823f975994087) | fix | remove `rejectErrors` option encourages uncaught exceptions ([#60397](https://github.com/angular/angular/pull/60397)) |
+| [04d963c0a5](https://github.com/angular/angular/commit/04d963c0a5f68c93015c13973d29107fe35bb942) | fix | remove unused parameter from listener instruction ([#60406](https://github.com/angular/angular/pull/60406)) |
+### platform-browser-dynamic
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3606aabd6b](https://github.com/angular/angular/commit/3606aabd6b7b9ec9f1b7438f33505f715eeeebe5) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cd7c170763](https://github.com/angular/angular/commit/cd7c170763b9f1f0b4215bf151a431481591ce73) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.3"></a>
# 19.2.3 (2025-03-19)
### compiler-cli
diff --git a/package.json b/package.json
index 6b3915bfb677d..0d836acd2110f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.2",
+ "version": "20.0.0-next.3",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55ee70d760b34..5d0808235eddf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,38 @@
+<a name="20.0.0-next.3"></a>
+# 20.0.0-next.3 (2025-03-19)
+- * `TestBed.get` has been removed. Use `TestBed.inject` instead.
+### compiler-cli
+| [bec1610da2](https://github.com/angular/angular/commit/bec1610da241f24bdb9120843a91973a3823a004) | feat | add extended diagnostic for invalid nullish coalescing ([#60279](https://github.com/angular/angular/pull/60279)) |
+| [1971e57a45](https://github.com/angular/angular/commit/1971e57a457ff9fd4dc8a353b59b51364e08b443) | feat | support type checking of host bindings ([#60267](https://github.com/angular/angular/pull/60267)) |
+| [2d51a203dc](https://github.com/angular/angular/commit/2d51a203dc87d6d880c3cf6d68bf8590f5dd689b) | fix | wrong event name for host listener decorators ([#60460](https://github.com/angular/angular/pull/60460)) |
+| [22d3f0562c](https://github.com/angular/angular/commit/22d3f0562cc6c21ebf7c29ff0e01bce40dcd50a0) | feat | add hook for producer creation side effects ([#60333](https://github.com/angular/angular/pull/60333)) |
+| [b154fb3911](https://github.com/angular/angular/commit/b154fb391142db6139cddad820a9a72838f0f16c) | feat | add support for two-way bindings on dynamically-created components ([#60342](https://github.com/angular/angular/pull/60342)) |
+| [644d9f3bbd](https://github.com/angular/angular/commit/644d9f3bbdb5e77a78d95669cfd6b0f6d8cb09b9) | feat | mark the toSignal API as stable ([#60442](https://github.com/angular/angular/pull/60442)) |
+| [5e209cb560](https://github.com/angular/angular/commit/5e209cb560fdfb943169a09d35389c703fa71418) | feat | remove TestBed.get ([#60414](https://github.com/angular/angular/pull/60414)) |
+| [b461e06ecb](https://github.com/angular/angular/commit/b461e06ecb93c9c03e6f41700558731e1f0d3b70) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [b8daf472d8](https://github.com/angular/angular/commit/b8daf472d83b41b3d97d4014737d31c7cfc0ace0) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
+| [8953e45a43](https://github.com/angular/angular/commit/8953e45a43fcb6ea694e77fb9ae779c5d3973524) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+| [48974c3cf8](https://github.com/angular/angular/commit/48974c3cf88ab1a70411bea4950823f975994087) | fix | remove `rejectErrors` option encourages uncaught exceptions ([#60397](https://github.com/angular/angular/pull/60397)) |
+| [04d963c0a5](https://github.com/angular/angular/commit/04d963c0a5f68c93015c13973d29107fe35bb942) | fix | remove unused parameter from listener instruction ([#60406](https://github.com/angular/angular/pull/60406)) |
+### platform-browser-dynamic
+| [3606aabd6b](https://github.com/angular/angular/commit/3606aabd6b7b9ec9f1b7438f33505f715eeeebe5) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| [cd7c170763](https://github.com/angular/angular/commit/cd7c170763b9f1f0b4215bf151a431481591ce73) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.3"></a>
# 19.2.3 (2025-03-19)
### compiler-cli
diff --git a/package.json b/package.json
index 6b3915bfb677d..0d836acd2110f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.2",
+ "version": "20.0.0-next.3",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+## Breaking Changes",
"+| [29eded6457](https://github.com/angular/angular/commit/29eded6457b72e7c8a2d53c847ec43996b73c054) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |"
] | [
7,
15
] | {
"additions": 36,
"author": "pkozlowski-opensource",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60472",
"issue_id": 60472,
"merged_at": "2025-03-19T19:31:39Z",
"omission_probability": 0.1,
"pr_number": 60472,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.3\" with changelog.",
"total_changes": 37
} |
401 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22c96a686f9d2..55ee70d760b34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.3"></a>
+# 19.2.3 (2025-03-19)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [aa8ea7a5b2](https://github.com/angular/angular/commit/aa8ea7a5b227913e3f15270dac48479481c47f9a) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [13a8709b2b](https://github.com/angular/angular/commit/13a8709b2ba29ef3ab7d38bfb41cdd3d44c24c51) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [296aded9da](https://github.com/angular/angular/commit/296aded9daaf04edd3cda623a220cbd2bf57e0f1) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
+| [0615ffb4f7](https://github.com/angular/angular/commit/0615ffb4f7a41cca2a408419830411897d1826e6) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+### platform-browser-dynamic
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1e06c8e8b6](https://github.com/angular/angular/commit/1e06c8e8b6473a19584ceb66945fd435ea4e6af9) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| Commit | Type | Description |
+| -- | -- | -- |
+| [9e1a1030c8](https://github.com/angular/angular/commit/9e1a1030c818e9849c00ded5f79535ea56976ea8) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.2"></a>
# 20.0.0-next.2 (2025-03-12)
## Breaking Changes
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22c96a686f9d2..55ee70d760b34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.3"></a>
+# 19.2.3 (2025-03-19)
+### compiler-cli
+| [aa8ea7a5b2](https://github.com/angular/angular/commit/aa8ea7a5b227913e3f15270dac48479481c47f9a) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
+### core
+| [13a8709b2b](https://github.com/angular/angular/commit/13a8709b2ba29ef3ab7d38bfb41cdd3d44c24c51) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [0615ffb4f7](https://github.com/angular/angular/commit/0615ffb4f7a41cca2a408419830411897d1826e6) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+### platform-browser-dynamic
+| [1e06c8e8b6](https://github.com/angular/angular/commit/1e06c8e8b6473a19584ceb66945fd435ea4e6af9) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| [9e1a1030c8](https://github.com/angular/angular/commit/9e1a1030c818e9849c00ded5f79535ea56976ea8) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.2"></a>
# 20.0.0-next.2 (2025-03-12)
## Breaking Changes | [
"+| [296aded9da](https://github.com/angular/angular/commit/296aded9daaf04edd3cda623a220cbd2bf57e0f1) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |"
] | [
15
] | {
"additions": 23,
"author": "pkozlowski-opensource",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60470",
"issue_id": 60470,
"merged_at": "2025-03-19T19:26:30Z",
"omission_probability": 0.1,
"pr_number": 60470,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.3 release",
"total_changes": 23
} |
402 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c16792bb5e621..46202cdbde119 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.3"></a>
+# 19.2.3 (2025-03-19)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [aa8ea7a5b2](https://github.com/angular/angular/commit/aa8ea7a5b227913e3f15270dac48479481c47f9a) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [13a8709b2b](https://github.com/angular/angular/commit/13a8709b2ba29ef3ab7d38bfb41cdd3d44c24c51) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [296aded9da](https://github.com/angular/angular/commit/296aded9daaf04edd3cda623a220cbd2bf57e0f1) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
+| [0615ffb4f7](https://github.com/angular/angular/commit/0615ffb4f7a41cca2a408419830411897d1826e6) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+### platform-browser-dynamic
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1e06c8e8b6](https://github.com/angular/angular/commit/1e06c8e8b6473a19584ceb66945fd435ea4e6af9) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| Commit | Type | Description |
+| -- | -- | -- |
+| [9e1a1030c8](https://github.com/angular/angular/commit/9e1a1030c818e9849c00ded5f79535ea56976ea8) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.2"></a>
# 19.2.2 (2025-03-12)
### common
diff --git a/package.json b/package.json
index ef649124e9ed5..9251083485688 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.2",
+ "version": "19.2.3",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index c16792bb5e621..46202cdbde119 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.3"></a>
+# 19.2.3 (2025-03-19)
+### compiler-cli
+| [aa8ea7a5b2](https://github.com/angular/angular/commit/aa8ea7a5b227913e3f15270dac48479481c47f9a) | fix | report more accurate diagnostic for invalid import ([#60455](https://github.com/angular/angular/pull/60455)) |
+### core
+| [13a8709b2b](https://github.com/angular/angular/commit/13a8709b2ba29ef3ab7d38bfb41cdd3d44c24c51) | fix | catch hydration marker with implicit body tag ([#60429](https://github.com/angular/angular/pull/60429)) |
+| [296aded9da](https://github.com/angular/angular/commit/296aded9daaf04edd3cda623a220cbd2bf57e0f1) | fix | execute timer trigger outside zone ([#60392](https://github.com/angular/angular/pull/60392)) |
+| [0615ffb4f7](https://github.com/angular/angular/commit/0615ffb4f7a41cca2a408419830411897d1826e6) | fix | include input name in error message ([#60404](https://github.com/angular/angular/pull/60404)) |
+### platform-browser-dynamic
+| [1e06c8e8b6](https://github.com/angular/angular/commit/1e06c8e8b6473a19584ceb66945fd435ea4e6af9) | fix | ensure compiler is loaded before `@angular/common` ([#60458](https://github.com/angular/angular/pull/60458)) |
+### upgrade
+| [9e1a1030c8](https://github.com/angular/angular/commit/9e1a1030c818e9849c00ded5f79535ea56976ea8) | fix | handle output emitters when downgrading a component ([#60369](https://github.com/angular/angular/pull/60369)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.2"></a>
# 19.2.2 (2025-03-12)
### common
diff --git a/package.json b/package.json
index ef649124e9ed5..9251083485688 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+ \"version\": \"19.2.3\","
] | [
39
] | {
"additions": 24,
"author": "pkozlowski-opensource",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60469",
"issue_id": 60469,
"merged_at": "2025-03-19T19:23:57Z",
"omission_probability": 0.1,
"pr_number": 60469,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.3\" with changelog.",
"total_changes": 25
} |
403 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b7d51624f3a54..9060e2ab38f53 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+<a name="20.0.0-next.7"></a>
+# 20.0.0-next.7 (2025-04-16)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cbbea70fa3](https://github.com/angular/angular/commit/cbbea70fa37b14e89e4f3459ae880116c0e894b1) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60879](https://github.com/angular/angular/pull/60879)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [65adb3024d](https://github.com/angular/angular/commit/65adb3024d6ae2af14952f4afdb2b92b600da074) | feat | Add provider which reports unhandled errors on window to ErrorHandler ([#60704](https://github.com/angular/angular/pull/60704)) |
+| [c1bcae91dd](https://github.com/angular/angular/commit/c1bcae91ddb03efb04451799fbf92e9fd1e82026) | feat | expose performance data in Chrome DevTools ([#60789](https://github.com/angular/angular/pull/60789)) |
+| [727cda3856](https://github.com/angular/angular/commit/727cda385690066c0bbc94734e344cf5ad741e9a) | feat | mark linkedSignal API as public ([#60865](https://github.com/angular/angular/pull/60865)) |
+| [567522398f](https://github.com/angular/angular/commit/567522398ffc4149e726ef30d87b0169ae6f3e21) | feat | stabilize incremental hydration api ([#60888](https://github.com/angular/angular/pull/60888)) |
+| [bf8492b871](https://github.com/angular/angular/commit/bf8492b8711dd25f5a1488a7338f435b59b9e91c) | feat | stabilize withI18nSupport() api ([#60889](https://github.com/angular/angular/pull/60889)) |
+| [11d441ff8b](https://github.com/angular/angular/commit/11d441ff8bb80b0dd45efb3d7b716a466637a949) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| Commit | Type | Description |
+| -- | -- | -- |
+| [9f31947aad](https://github.com/angular/angular/commit/9f31947aad8331a02166d87d98ac2d4ed5aa701b) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.7"></a>
# 19.2.7 (2025-04-16)
### common
diff --git a/package.json b/package.json
index 31ca6b7e6ea12..fab2490aec764 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.6",
+ "version": "20.0.0-next.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index b7d51624f3a54..9060e2ab38f53 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+<a name="20.0.0-next.7"></a>
+# 20.0.0-next.7 (2025-04-16)
+### common
+| [cbbea70fa3](https://github.com/angular/angular/commit/cbbea70fa37b14e89e4f3459ae880116c0e894b1) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60879](https://github.com/angular/angular/pull/60879)) |
+| [65adb3024d](https://github.com/angular/angular/commit/65adb3024d6ae2af14952f4afdb2b92b600da074) | feat | Add provider which reports unhandled errors on window to ErrorHandler ([#60704](https://github.com/angular/angular/pull/60704)) |
+| [c1bcae91dd](https://github.com/angular/angular/commit/c1bcae91ddb03efb04451799fbf92e9fd1e82026) | feat | expose performance data in Chrome DevTools ([#60789](https://github.com/angular/angular/pull/60789)) |
+| [727cda3856](https://github.com/angular/angular/commit/727cda385690066c0bbc94734e344cf5ad741e9a) | feat | mark linkedSignal API as public ([#60865](https://github.com/angular/angular/pull/60865)) |
+| [567522398f](https://github.com/angular/angular/commit/567522398ffc4149e726ef30d87b0169ae6f3e21) | feat | stabilize incremental hydration api ([#60888](https://github.com/angular/angular/pull/60888)) |
+| [11d441ff8b](https://github.com/angular/angular/commit/11d441ff8bb80b0dd45efb3d7b716a466637a949) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| [9f31947aad](https://github.com/angular/angular/commit/9f31947aad8331a02166d87d98ac2d4ed5aa701b) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.7"></a>
# 19.2.7 (2025-04-16)
### common
diff --git a/package.json b/package.json
index 31ca6b7e6ea12..fab2490aec764 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.6",
+ "version": "20.0.0-next.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+### core",
"+| [bf8492b871](https://github.com/angular/angular/commit/bf8492b8711dd25f5a1488a7338f435b59b9e91c) | feat | stabilize withI18nSupport() api ([#60889](https://github.com/angular/angular/pull/60889)) |"
] | [
11,
18
] | {
"additions": 23,
"author": "kirjs",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60896",
"issue_id": 60896,
"merged_at": "2025-04-16T21:03:09Z",
"omission_probability": 0.1,
"pr_number": 60896,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.7\" with changelog.",
"total_changes": 24
} |
404 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67c8e69fabf7d..b7d51624f3a54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.7"></a>
+# 19.2.7 (2025-04-16)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [37ab6814f5](https://github.com/angular/angular/commit/37ab6814f5485434d9642b9f9c28dd430864247b) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60883](https://github.com/angular/angular/pull/60883)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b144126612](https://github.com/angular/angular/commit/b144126612e2cd14cbccc8d3cf4e2136a2e540ff) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d39e09da41](https://github.com/angular/angular/commit/d39e09da413732385a12ed21eb468649233e26d0) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.6"></a>
# 20.0.0-next.6 (2025-04-09)
## Breaking Changes
@@ -5166,4 +5183,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67c8e69fabf7d..b7d51624f3a54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+# 19.2.7 (2025-04-16)
+### common
+| [37ab6814f5](https://github.com/angular/angular/commit/37ab6814f5485434d9642b9f9c28dd430864247b) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60883](https://github.com/angular/angular/pull/60883)) |
+| [b144126612](https://github.com/angular/angular/commit/b144126612e2cd14cbccc8d3cf4e2136a2e540ff) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| [d39e09da41](https://github.com/angular/angular/commit/d39e09da413732385a12ed21eb468649233e26d0) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.6"></a>
# 20.0.0-next.6 (2025-04-09)
## Breaking Changes
@@ -5166,4 +5183,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file | [
"+<a name=\"19.2.7\"></a>",
"+### core"
] | [
5,
11
] | {
"additions": 18,
"author": "kirjs",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60895",
"issue_id": 60895,
"merged_at": "2025-04-16T20:44:45Z",
"omission_probability": 0.1,
"pr_number": 60895,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.7 release",
"total_changes": 19
} |
405 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ef6c11aca510..90e875c61dc05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.7"></a>
+# 19.2.7 (2025-04-16)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [37ab6814f5](https://github.com/angular/angular/commit/37ab6814f5485434d9642b9f9c28dd430864247b) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60883](https://github.com/angular/angular/pull/60883)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b144126612](https://github.com/angular/angular/commit/b144126612e2cd14cbccc8d3cf4e2136a2e540ff) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d39e09da41](https://github.com/angular/angular/commit/d39e09da413732385a12ed21eb468649233e26d0) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.6"></a>
# 19.2.6 (2025-04-09)
### compiler
@@ -4791,4 +4808,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
diff --git a/package.json b/package.json
index 092bb46f3b22a..b98df11c6e030 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.6",
+ "version": "19.2.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ef6c11aca510..90e875c61dc05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.7"></a>
+# 19.2.7 (2025-04-16)
+### common
+| [37ab6814f5](https://github.com/angular/angular/commit/37ab6814f5485434d9642b9f9c28dd430864247b) | fix | issue a warning instead of an error when `NgOptimizedImage` exceeds the preload limit ([#60883](https://github.com/angular/angular/pull/60883)) |
+| [b144126612](https://github.com/angular/angular/commit/b144126612e2cd14cbccc8d3cf4e2136a2e540ff) | fix | inject migration: replace param with this. ([#60713](https://github.com/angular/angular/pull/60713)) |
+### http
+| [d39e09da41](https://github.com/angular/angular/commit/d39e09da413732385a12ed21eb468649233e26d0) | fix | Include HTTP status code and headers when HTTP requests errored in `httpResource` ([#60802](https://github.com/angular/angular/pull/60802)) |
<a name="19.2.6"></a>
# 19.2.6 (2025-04-09)
### compiler
@@ -4791,4 +4808,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
diff --git a/package.json b/package.json
index 092bb46f3b22a..b98df11c6e030 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.6",
+ "version": "19.2.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+### core",
"+<!-- CHANGELOG SPLIT MARKER -->"
] | [
11,
20
] | {
"additions": 19,
"author": "kirjs",
"deletions": 2,
"html_url": "https://github.com/angular/angular/pull/60894",
"issue_id": 60894,
"merged_at": "2025-04-16T20:41:50Z",
"omission_probability": 0.1,
"pr_number": 60894,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.7\" with changelog.",
"total_changes": 21
} |
406 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14aa552539d41..22c96a686f9d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,67 @@
+<a name="20.0.0-next.2"></a>
+# 20.0.0-next.2 (2025-03-12)
+## Breaking Changes
+### core
+- * `InjectFlags` has been removed.
+ * `inject` no longer accepts `InjectFlags`.
+ * `Injector.get` no longer accepts `InjectFlags`.
+ * `EnvironmentInjector.get` no longer accepts `InjectFlags`.
+ * `TestBed.get` no longer accepts `InjectFlags`.
+ * `TestBed.inject` no longer accepts `InjectFlags`.
+- The `any` overload has been removed from
+ `injector.get`. It now only supports `ProviderToken<T>` and (deprecated
+ since v4) `string`.
+- `ApplicationRef.tick` will no longer catch and report
+ errors to the appplication `ErrorHandler`. Errors will instead be thrown out of
+ the method and will allow callers to determine how to handle these
+ errors, such as aborting follow-up work or reporting the error and
+ continuing.
+## Deprecations
+### platform-browser
+- HammerJS support is deprecated and will be removed in a future major version.
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [92250493ff](https://github.com/angular/angular/commit/92250493ffc2201e118f399f2ae46d792390fb47) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ef1fd137a9](https://github.com/angular/angular/commit/ef1fd137a9e180059963b1f3a025c3acc1610b8f) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a1cacc5b17](https://github.com/angular/angular/commit/a1cacc5b17d6f865bb260f475f1d2ef37dc845f1) | fix | avoid fatal diagnostics for missing template files ([#58673](https://github.com/angular/angular/pull/58673)) |
+| [9be2b334ed](https://github.com/angular/angular/commit/9be2b334edd20724dc54646ee11622e7ae4b4b0b) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [611baaf069](https://github.com/angular/angular/commit/611baaf0695882f1684baa1c007f7ae112afa5d4) | feat | remove InjectFlags from public API ([#60318](https://github.com/angular/angular/pull/60318)) |
+| [e170d24240](https://github.com/angular/angular/commit/e170d242402f5ee4671dd425c24e5f31fbc67b21) | fix | add migration away from InjectFlags ([#60318](https://github.com/angular/angular/pull/60318)) |
+| [79ae35577e](https://github.com/angular/angular/commit/79ae35577efc7d2fb2fbf87e7783daf938c576ff) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [c82384104f](https://github.com/angular/angular/commit/c82384104fd9db292e093aa9e62fe6346bdb4a8f) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [de2bfc0913](https://github.com/angular/angular/commit/de2bfc09132d19d954d367622c8704993c21da1e) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+| [ff772d7800](https://github.com/angular/angular/commit/ff772d780089b7b1fcaa14fbd9139d6eeca2f596) | fix | fix typing on injector.get to omit 'any' ([#60202](https://github.com/angular/angular/pull/60202)) |
+| [338818ce89](https://github.com/angular/angular/commit/338818ce8992294a6b3ab15947e65eb0c6d01391) | fix | Surface errors from `ApplicationRef.tick` to callsite ([#60102](https://github.com/angular/angular/pull/60102)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [81fe0536fd](https://github.com/angular/angular/commit/81fe0536fdb86ba2428954ac5305c2424f369339) | fix | Make sure statusChanges is emitted ([#57098](https://github.com/angular/angular/pull/57098)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a980ac9a6a](https://github.com/angular/angular/commit/a980ac9a6a9b47246db8690e7779e563bf231a90) | refactor | Deprecate the HammerJS integration ([#60257](https://github.com/angular/angular/pull/60257)) |
+### platform-server
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0cff9a12d3](https://github.com/angular/angular/commit/0cff9a12d3701b994d25d241e44126f536b15c2f) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [219f41d049](https://github.com/angular/angular/commit/219f41d049cf6798f81fbb393b4e23b2a030ff48) | fix | Prevent dangling promise rejections from internal navigations ([#60162](https://github.com/angular/angular/pull/60162)) |
+| [cae1fe519b](https://github.com/angular/angular/commit/cae1fe519b4fc093ca99d0183a2c4da86a96bde1) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.2"></a>
# 19.2.2 (2025-03-12)
### common
diff --git a/package.json b/package.json
index 9083320632079..05c55e7ae0588 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.1",
+ "version": "20.0.0-next.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14aa552539d41..22c96a686f9d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,67 @@
+<a name="20.0.0-next.2"></a>
+## Breaking Changes
+- * `InjectFlags` has been removed.
+ * `inject` no longer accepts `InjectFlags`.
+ * `Injector.get` no longer accepts `InjectFlags`.
+ * `EnvironmentInjector.get` no longer accepts `InjectFlags`.
+ * `TestBed.get` no longer accepts `InjectFlags`.
+- The `any` overload has been removed from
+ `injector.get`. It now only supports `ProviderToken<T>` and (deprecated
+ since v4) `string`.
+- `ApplicationRef.tick` will no longer catch and report
+ errors to the appplication `ErrorHandler`. Errors will instead be thrown out of
+ the method and will allow callers to determine how to handle these
+ errors, such as aborting follow-up work or reporting the error and
+ continuing.
+## Deprecations
+- HammerJS support is deprecated and will be removed in a future major version.
+### common
+| [92250493ff](https://github.com/angular/angular/commit/92250493ffc2201e118f399f2ae46d792390fb47) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| [ef1fd137a9](https://github.com/angular/angular/commit/ef1fd137a9e180059963b1f3a025c3acc1610b8f) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) |
+### compiler-cli
+| [a1cacc5b17](https://github.com/angular/angular/commit/a1cacc5b17d6f865bb260f475f1d2ef37dc845f1) | fix | avoid fatal diagnostics for missing template files ([#58673](https://github.com/angular/angular/pull/58673)) |
+| [611baaf069](https://github.com/angular/angular/commit/611baaf0695882f1684baa1c007f7ae112afa5d4) | feat | remove InjectFlags from public API ([#60318](https://github.com/angular/angular/pull/60318)) |
+| [e170d24240](https://github.com/angular/angular/commit/e170d242402f5ee4671dd425c24e5f31fbc67b21) | fix | add migration away from InjectFlags ([#60318](https://github.com/angular/angular/pull/60318)) |
+| [79ae35577e](https://github.com/angular/angular/commit/79ae35577efc7d2fb2fbf87e7783daf938c576ff) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [c82384104f](https://github.com/angular/angular/commit/c82384104fd9db292e093aa9e62fe6346bdb4a8f) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [de2bfc0913](https://github.com/angular/angular/commit/de2bfc09132d19d954d367622c8704993c21da1e) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+| [ff772d7800](https://github.com/angular/angular/commit/ff772d780089b7b1fcaa14fbd9139d6eeca2f596) | fix | fix typing on injector.get to omit 'any' ([#60202](https://github.com/angular/angular/pull/60202)) |
+| [338818ce89](https://github.com/angular/angular/commit/338818ce8992294a6b3ab15947e65eb0c6d01391) | fix | Surface errors from `ApplicationRef.tick` to callsite ([#60102](https://github.com/angular/angular/pull/60102)) |
+### forms
+| [81fe0536fd](https://github.com/angular/angular/commit/81fe0536fdb86ba2428954ac5305c2424f369339) | fix | Make sure statusChanges is emitted ([#57098](https://github.com/angular/angular/pull/57098)) |
+| [a980ac9a6a](https://github.com/angular/angular/commit/a980ac9a6a9b47246db8690e7779e563bf231a90) | refactor | Deprecate the HammerJS integration ([#60257](https://github.com/angular/angular/pull/60257)) |
+### platform-server
+| [0cff9a12d3](https://github.com/angular/angular/commit/0cff9a12d3701b994d25d241e44126f536b15c2f) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| [219f41d049](https://github.com/angular/angular/commit/219f41d049cf6798f81fbb393b4e23b2a030ff48) | fix | Prevent dangling promise rejections from internal navigations ([#60162](https://github.com/angular/angular/pull/60162)) |
+| [cae1fe519b](https://github.com/angular/angular/commit/cae1fe519b4fc093ca99d0183a2c4da86a96bde1) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.2"></a>
# 19.2.2 (2025-03-12)
### common
diff --git a/package.json b/package.json
index 9083320632079..05c55e7ae0588 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.1",
+ "version": "20.0.0-next.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+# 20.0.0-next.2 (2025-03-12)",
"+ * `TestBed.inject` no longer accepts `InjectFlags`.",
"+| [9be2b334ed](https://github.com/angular/angular/commit/9be2b334edd20724dc54646ee11622e7ae4b4b0b) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |"
] | [
6,
14,
38
] | {
"additions": 65,
"author": "AndrewKushnir",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60353",
"issue_id": 60353,
"merged_at": "2025-03-12T16:52:41Z",
"omission_probability": 0.1,
"pr_number": 60353,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.2\" with changelog.",
"total_changes": 66
} |
407 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e24de4a3c50b3..14aa552539d41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,34 @@
+<a name="19.2.2"></a>
+# 19.2.2 (2025-03-12)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [90a16a1088](https://github.com/angular/angular/commit/90a16a10888eee37d8a61cdbfad070e002a3cfdf) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [56b551d273](https://github.com/angular/angular/commit/56b551d273a0978e1f2e2ef914c1d7ae942a28a8) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) ([#60331](https://github.com/angular/angular/pull/60331)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [23ca88522b](https://github.com/angular/angular/commit/23ca88522bbc23e24a2b20e48e62edcce3a42eb6) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [6dc41265fd](https://github.com/angular/angular/commit/6dc41265fd47df3fd0462bcd8f451eb6aea972ef) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [bb12b30d52](https://github.com/angular/angular/commit/bb12b30d5213912f50f53aff60a11e6d47349c82) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [b144dd946e](https://github.com/angular/angular/commit/b144dd946e38e52ce716aca7c6ba7c1a1a02f13d) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+### platform-server
+| Commit | Type | Description |
+| -- | -- | -- |
+| [15c42969fc](https://github.com/angular/angular/commit/15c42969fc42c76e3bd593201164183fb82d70f6) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7bcdf7c143](https://github.com/angular/angular/commit/7bcdf7c1435f766b2b0bbd383358ef2ddabf217a) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.1"></a>
# 20.0.0-next.1 (2025-03-05)
## Breaking Changes
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index e24de4a3c50b3..14aa552539d41 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,34 @@
+<a name="19.2.2"></a>
+# 19.2.2 (2025-03-12)
+### common
+| [90a16a1088](https://github.com/angular/angular/commit/90a16a10888eee37d8a61cdbfad070e002a3cfdf) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| [56b551d273](https://github.com/angular/angular/commit/56b551d273a0978e1f2e2ef914c1d7ae942a28a8) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) ([#60331](https://github.com/angular/angular/pull/60331)) |
+### compiler-cli
+| [23ca88522b](https://github.com/angular/angular/commit/23ca88522bbc23e24a2b20e48e62edcce3a42eb6) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
+### core
+| [6dc41265fd](https://github.com/angular/angular/commit/6dc41265fd47df3fd0462bcd8f451eb6aea972ef) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [bb12b30d52](https://github.com/angular/angular/commit/bb12b30d5213912f50f53aff60a11e6d47349c82) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [b144dd946e](https://github.com/angular/angular/commit/b144dd946e38e52ce716aca7c6ba7c1a1a02f13d) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+### platform-server
+| [15c42969fc](https://github.com/angular/angular/commit/15c42969fc42c76e3bd593201164183fb82d70f6) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| [7bcdf7c143](https://github.com/angular/angular/commit/7bcdf7c1435f766b2b0bbd383358ef2ddabf217a) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.1"></a>
# 20.0.0-next.1 (2025-03-05)
## Breaking Changes | [] | [] | {
"additions": 31,
"author": "AndrewKushnir",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60352",
"issue_id": 60352,
"merged_at": "2025-03-12T16:45:05Z",
"omission_probability": 0.1,
"pr_number": 60352,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.2 release",
"total_changes": 31
} |
408 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58fba4b12fef8..c16792bb5e621 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,34 @@
+<a name="19.2.2"></a>
+# 19.2.2 (2025-03-12)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [90a16a1088](https://github.com/angular/angular/commit/90a16a10888eee37d8a61cdbfad070e002a3cfdf) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [56b551d273](https://github.com/angular/angular/commit/56b551d273a0978e1f2e2ef914c1d7ae942a28a8) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) ([#60331](https://github.com/angular/angular/pull/60331)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [23ca88522b](https://github.com/angular/angular/commit/23ca88522bbc23e24a2b20e48e62edcce3a42eb6) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [6dc41265fd](https://github.com/angular/angular/commit/6dc41265fd47df3fd0462bcd8f451eb6aea972ef) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [bb12b30d52](https://github.com/angular/angular/commit/bb12b30d5213912f50f53aff60a11e6d47349c82) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [b144dd946e](https://github.com/angular/angular/commit/b144dd946e38e52ce716aca7c6ba7c1a1a02f13d) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+### platform-server
+| Commit | Type | Description |
+| -- | -- | -- |
+| [15c42969fc](https://github.com/angular/angular/commit/15c42969fc42c76e3bd593201164183fb82d70f6) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7bcdf7c143](https://github.com/angular/angular/commit/7bcdf7c1435f766b2b0bbd383358ef2ddabf217a) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.1"></a>
# 19.2.1 (2025-03-05)
### common
diff --git a/package.json b/package.json
index e070a4398aacf..ef649124e9ed5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.1",
+ "version": "19.2.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58fba4b12fef8..c16792bb5e621 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,34 @@
+### common
+| [90a16a1088](https://github.com/angular/angular/commit/90a16a10888eee37d8a61cdbfad070e002a3cfdf) | fix | support equality function in httpResource ([#60026](https://github.com/angular/angular/pull/60026)) |
+### compiler
+| [56b551d273](https://github.com/angular/angular/commit/56b551d273a0978e1f2e2ef914c1d7ae942a28a8) | fix | incorrect spans for template literals ([#60323](https://github.com/angular/angular/pull/60323)) ([#60331](https://github.com/angular/angular/pull/60331)) |
+### compiler-cli
+| [23ca88522b](https://github.com/angular/angular/commit/23ca88522bbc23e24a2b20e48e62edcce3a42eb6) | fix | handle transformed classes when generating HMR code ([#60298](https://github.com/angular/angular/pull/60298)) |
+### core
+| [6dc41265fd](https://github.com/angular/angular/commit/6dc41265fd47df3fd0462bcd8f451eb6aea972ef) | fix | check whether application is destroyed before initializing event replay ([#59789](https://github.com/angular/angular/pull/59789)) |
+| [bb12b30d52](https://github.com/angular/angular/commit/bb12b30d5213912f50f53aff60a11e6d47349c82) | fix | ensures immediate trigger fires properly with lazy loaded routes ([#60203](https://github.com/angular/angular/pull/60203)) |
+| [b144dd946e](https://github.com/angular/angular/commit/b144dd946e38e52ce716aca7c6ba7c1a1a02f13d) | fix | fix removal of a container reference used in the component file ([#60210](https://github.com/angular/angular/pull/60210)) |
+### platform-server
+| [15c42969fc](https://github.com/angular/angular/commit/15c42969fc42c76e3bd593201164183fb82d70f6) | fix | add missing peer dependency for `rxjs` ([#60308](https://github.com/angular/angular/pull/60308)) |
+### router
+| [7bcdf7c143](https://github.com/angular/angular/commit/7bcdf7c1435f766b2b0bbd383358ef2ddabf217a) | fix | update symbols ([#60233](https://github.com/angular/angular/pull/60233)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.1"></a>
# 19.2.1 (2025-03-05)
### common
diff --git a/package.json b/package.json
index e070a4398aacf..ef649124e9ed5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.1",
+ "version": "19.2.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+<a name=\"19.2.2\"></a>",
"+# 19.2.2 (2025-03-12)"
] | [
5,
6
] | {
"additions": 32,
"author": "AndrewKushnir",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60351",
"issue_id": 60351,
"merged_at": "2025-03-12T16:42:52Z",
"omission_probability": 0.1,
"pr_number": 60351,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.2\" with changelog.",
"total_changes": 33
} |
409 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d6e53c452e82..67c8e69fabf7d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,45 @@
+<a name="20.0.0-next.6"></a>
+# 20.0.0-next.6 (2025-04-09)
+## Breaking Changes
+### core
+- Animations are guaranteed to be flushed when Angular
+ runs automatic change detection or manual calls to `ApplicationRef.tick`.
+ Prior to this change, animations would not be flushed in some situations
+ if change detection did not run on any views attached to the
+ application. This change can affect tests which may rely on the old
+ behavior, often by making assertions on DOM elements that should have
+ been removed but weren't because DOM removal is delayed until animations
+ are flushed.
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7a971766dc](https://github.com/angular/angular/commit/7a971766dc59691dc68da9439e180a6c4d7b17d8) | feat | add extended diagnostic for uninvoked track function on `@for` blocks ([#60495](https://github.com/angular/angular/pull/60495)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8744c9a165](https://github.com/angular/angular/commit/8744c9a165518b77d2037d1255827836326dadf4) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4e88e18a8e](https://github.com/angular/angular/commit/4e88e18a8ef0f19aed85316e80627ad6d2ec80a7) | feat | mark `toObservable` as stable ([#60449](https://github.com/angular/angular/pull/60449)) |
+| [8d050b5bfc](https://github.com/angular/angular/commit/8d050b5bfc49878f01777f71a37e34d5c1733b1b) | feat | stabilize linkedSignal API ([#60741](https://github.com/angular/angular/pull/60741)) |
+| [866cea9a05](https://github.com/angular/angular/commit/866cea9a057ac67fa3f679f1f3da18700926c15a) | feat | Stabilize PendingTasks Injectable ([#60716](https://github.com/angular/angular/pull/60716)) |
+| [39a4e00464](https://github.com/angular/angular/commit/39a4e00464465b1e5a7f894d0992254d43f5028f) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
+| [0b69b61929](https://github.com/angular/angular/commit/0b69b619296231edfab0561480296c477e2c72ca) | fix | Flush animations when no component has been checked ([#58089](https://github.com/angular/angular/pull/58089)) |
+| [3d85d9363c](https://github.com/angular/angular/commit/3d85d9363c6dd02d2f14181bdad1dc0b05fedc31) | fix | reduce total memory usage of various migration schematics ([#60774](https://github.com/angular/angular/pull/60774)) |
+| [0ae1889560](https://github.com/angular/angular/commit/0ae18895605eef6b4946898ff0752ae3917c0057) | fix | run `ApplicationRef.prototype.bootstrap` in `NgZone` ([#60720](https://github.com/angular/angular/pull/60720)) |
+### http
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5795e03cdf](https://github.com/angular/angular/commit/5795e03cdf25f4a96b73a49be915efbeeb398d83) | fix | Delay stabilization until next app synchronization ([#60656](https://github.com/angular/angular/pull/60656)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a22b13f990](https://github.com/angular/angular/commit/a22b13f99041eb6931471aaa81391f9ab0ad7c6d) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
+| [b9cf414790](https://github.com/angular/angular/commit/b9cf414790f5217cd5c73f7520a11031bde6c864) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.6"></a>
# 19.2.6 (2025-04-09)
### compiler
@@ -5124,4 +5166,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
diff --git a/package.json b/package.json
index 8110a57ead37c..c9321bc7c8c24 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.5",
+ "version": "20.0.0-next.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d6e53c452e82..67c8e69fabf7d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,45 @@
+<a name="20.0.0-next.6"></a>
+# 20.0.0-next.6 (2025-04-09)
+## Breaking Changes
+- Animations are guaranteed to be flushed when Angular
+ runs automatic change detection or manual calls to `ApplicationRef.tick`.
+ Prior to this change, animations would not be flushed in some situations
+ if change detection did not run on any views attached to the
+ application. This change can affect tests which may rely on the old
+ behavior, often by making assertions on DOM elements that should have
+ been removed but weren't because DOM removal is delayed until animations
+ are flushed.
+### compiler
+| [7a971766dc](https://github.com/angular/angular/commit/7a971766dc59691dc68da9439e180a6c4d7b17d8) | feat | add extended diagnostic for uninvoked track function on `@for` blocks ([#60495](https://github.com/angular/angular/pull/60495)) |
+### compiler-cli
+| [8744c9a165](https://github.com/angular/angular/commit/8744c9a165518b77d2037d1255827836326dadf4) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+| [4e88e18a8e](https://github.com/angular/angular/commit/4e88e18a8ef0f19aed85316e80627ad6d2ec80a7) | feat | mark `toObservable` as stable ([#60449](https://github.com/angular/angular/pull/60449)) |
+| [8d050b5bfc](https://github.com/angular/angular/commit/8d050b5bfc49878f01777f71a37e34d5c1733b1b) | feat | stabilize linkedSignal API ([#60741](https://github.com/angular/angular/pull/60741)) |
+| [866cea9a05](https://github.com/angular/angular/commit/866cea9a057ac67fa3f679f1f3da18700926c15a) | feat | Stabilize PendingTasks Injectable ([#60716](https://github.com/angular/angular/pull/60716)) |
+| [39a4e00464](https://github.com/angular/angular/commit/39a4e00464465b1e5a7f894d0992254d43f5028f) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
+| [0b69b61929](https://github.com/angular/angular/commit/0b69b619296231edfab0561480296c477e2c72ca) | fix | Flush animations when no component has been checked ([#58089](https://github.com/angular/angular/pull/58089)) |
+| [3d85d9363c](https://github.com/angular/angular/commit/3d85d9363c6dd02d2f14181bdad1dc0b05fedc31) | fix | reduce total memory usage of various migration schematics ([#60774](https://github.com/angular/angular/pull/60774)) |
+| [0ae1889560](https://github.com/angular/angular/commit/0ae18895605eef6b4946898ff0752ae3917c0057) | fix | run `ApplicationRef.prototype.bootstrap` in `NgZone` ([#60720](https://github.com/angular/angular/pull/60720)) |
+### http
+| [5795e03cdf](https://github.com/angular/angular/commit/5795e03cdf25f4a96b73a49be915efbeeb398d83) | fix | Delay stabilization until next app synchronization ([#60656](https://github.com/angular/angular/pull/60656)) |
+### language-service
+| [a22b13f990](https://github.com/angular/angular/commit/a22b13f99041eb6931471aaa81391f9ab0ad7c6d) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
+| [b9cf414790](https://github.com/angular/angular/commit/b9cf414790f5217cd5c73f7520a11031bde6c864) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.6"></a>
# 19.2.6 (2025-04-09)
### compiler
@@ -5124,4 +5166,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
\ No newline at end of file
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
diff --git a/package.json b/package.json
index 8110a57ead37c..c9321bc7c8c24 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.5",
+ "version": "20.0.0-next.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file."
] | [
54
] | {
"additions": 44,
"author": "atscott",
"deletions": 2,
"html_url": "https://github.com/angular/angular/pull/60815",
"issue_id": 60815,
"merged_at": "2025-04-09T20:02:48Z",
"omission_probability": 0.1,
"pr_number": 60815,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.6\" with changelog.",
"total_changes": 46
} |
410 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d30ae3061eb0c..7d6e53c452e82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+<a name="19.2.6"></a>
+# 19.2.6 (2025-04-09)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3441f7b914](https://github.com/angular/angular/commit/3441f7b914c73ccdaacbcd935e945dc304c5962a) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) ([#60753](https://github.com/angular/angular/pull/60753)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fc946c5f72](https://github.com/angular/angular/commit/fc946c5f7261ee3e49fa037bc55703b9ffcfbff3) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [00bbd9b382](https://github.com/angular/angular/commit/00bbd9b382cc0244aa54ee331a6f7f9d7781db72) | fix | fix docs for output migration ([#60764](https://github.com/angular/angular/pull/60764)) |
+| [f2bfa3151e](https://github.com/angular/angular/commit/f2bfa3151ee7ecb335665d55741387bd67ebee9d) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
+| [9241615ad0](https://github.com/angular/angular/commit/9241615ad0825156f4bf31bc4308372e4789e902) | fix | reduce total memory usage of various migration schematics ([#60776](https://github.com/angular/angular/pull/60776)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0e82d42774](https://github.com/angular/angular/commit/0e82d427743c1d22e1683da11f66e33846f38663) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
+| [fcdef1019f](https://github.com/angular/angular/commit/fcdef1019fd28c7261590ba484a949c809b9ceaf) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.5"></a>
# 20.0.0-next.5 (2025-04-02)
## Breaking Changes
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index d30ae3061eb0c..7d6e53c452e82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+<a name="19.2.6"></a>
+# 19.2.6 (2025-04-09)
+### compiler
+| [3441f7b914](https://github.com/angular/angular/commit/3441f7b914c73ccdaacbcd935e945dc304c5962a) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) ([#60753](https://github.com/angular/angular/pull/60753)) |
+### compiler-cli
+| [fc946c5f72](https://github.com/angular/angular/commit/fc946c5f7261ee3e49fa037bc55703b9ffcfbff3) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+### core
+| [00bbd9b382](https://github.com/angular/angular/commit/00bbd9b382cc0244aa54ee331a6f7f9d7781db72) | fix | fix docs for output migration ([#60764](https://github.com/angular/angular/pull/60764)) |
+| [f2bfa3151e](https://github.com/angular/angular/commit/f2bfa3151ee7ecb335665d55741387bd67ebee9d) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
+| [9241615ad0](https://github.com/angular/angular/commit/9241615ad0825156f4bf31bc4308372e4789e902) | fix | reduce total memory usage of various migration schematics ([#60776](https://github.com/angular/angular/pull/60776)) |
+### language-service
+| [0e82d42774](https://github.com/angular/angular/commit/0e82d427743c1d22e1683da11f66e33846f38663) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
+| [fcdef1019f](https://github.com/angular/angular/commit/fcdef1019fd28c7261590ba484a949c809b9ceaf) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.5"></a>
# 20.0.0-next.5 (2025-04-02)
## Breaking Changes | [] | [] | {
"additions": 24,
"author": "atscott",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60813",
"issue_id": 60813,
"merged_at": "2025-04-09T19:30:31Z",
"omission_probability": 0.1,
"pr_number": 60813,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.6 release",
"total_changes": 24
} |
411 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 102590c06ec89..2ef6c11aca510 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.6"></a>
+# 19.2.6 (2025-04-09)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3441f7b914](https://github.com/angular/angular/commit/3441f7b914c73ccdaacbcd935e945dc304c5962a) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) ([#60753](https://github.com/angular/angular/pull/60753)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fc946c5f72](https://github.com/angular/angular/commit/fc946c5f7261ee3e49fa037bc55703b9ffcfbff3) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f2bfa3151e](https://github.com/angular/angular/commit/f2bfa3151ee7ecb335665d55741387bd67ebee9d) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |
+| [9241615ad0](https://github.com/angular/angular/commit/9241615ad0825156f4bf31bc4308372e4789e902) | fix | reduce total memory usage of various migration schematics ([#60776](https://github.com/angular/angular/pull/60776)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0e82d42774](https://github.com/angular/angular/commit/0e82d427743c1d22e1683da11f66e33846f38663) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |
+| [fcdef1019f](https://github.com/angular/angular/commit/fcdef1019fd28c7261590ba484a949c809b9ceaf) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.5"></a>
# 19.2.5 (2025-04-02)
###
@@ -4768,4 +4791,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
diff --git a/package.json b/package.json
index 5bc98e4a86b2b..d420a71ec39ac 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.5",
+ "version": "19.2.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 102590c06ec89..2ef6c11aca510 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.6"></a>
+# 19.2.6 (2025-04-09)
+### compiler
+| [3441f7b914](https://github.com/angular/angular/commit/3441f7b914c73ccdaacbcd935e945dc304c5962a) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) ([#60753](https://github.com/angular/angular/pull/60753)) |
+### compiler-cli
+| [fc946c5f72](https://github.com/angular/angular/commit/fc946c5f7261ee3e49fa037bc55703b9ffcfbff3) | fix | ensure HMR works with different output module type ([#60797](https://github.com/angular/angular/pull/60797)) |
+### core
+| [9241615ad0](https://github.com/angular/angular/commit/9241615ad0825156f4bf31bc4308372e4789e902) | fix | reduce total memory usage of various migration schematics ([#60776](https://github.com/angular/angular/pull/60776)) |
+### language-service
+| [fcdef1019f](https://github.com/angular/angular/commit/fcdef1019fd28c7261590ba484a949c809b9ceaf) | fix | Ensure dollar signs are escaped in completions ([#60597](https://github.com/angular/angular/pull/60597)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.5"></a>
# 19.2.5 (2025-04-02)
###
@@ -4768,4 +4791,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
diff --git a/package.json b/package.json
index 5bc98e4a86b2b..d420a71ec39ac 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.5",
+ "version": "19.2.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [f2bfa3151e](https://github.com/angular/angular/commit/f2bfa3151ee7ecb335665d55741387bd67ebee9d) | fix | fix ng generate @angular/core:output-migration. Fixes angular[#58650](https://github.com/angular/angular/pull/58650) ([#60763](https://github.com/angular/angular/pull/60763)) |",
"+| [0e82d42774](https://github.com/angular/angular/commit/0e82d427743c1d22e1683da11f66e33846f38663) | fix | Do not provide element completions in end tag ([#60616](https://github.com/angular/angular/pull/60616)) |"
] | [
18,
23
] | {
"additions": 25,
"author": "atscott",
"deletions": 2,
"html_url": "https://github.com/angular/angular/pull/60812",
"issue_id": 60812,
"merged_at": "2025-04-09T19:26:03Z",
"omission_probability": 0.1,
"pr_number": 60812,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.6\" with changelog.",
"total_changes": 27
} |
412 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0daeb2d472ed..0ce61d94c0e43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+<a name="19.2.0-next.3"></a>
+# 19.2.0-next.3 (2025-02-13)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
diff --git a/package.json b/package.json
index b162e92169f82..361b10c1f5550 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.2",
+ "version": "19.2.0-next.3",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0daeb2d472ed..0ce61d94c0e43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+<a name="19.2.0-next.3"></a>
+# 19.2.0-next.3 (2025-02-13)
+### compiler
+| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+### compiler-cli
+| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
+### core
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
+### migrations
+| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
diff --git a/package.json b/package.json
index b162e92169f82..361b10c1f5550 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.2",
+ "version": "19.2.0-next.3",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 25,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/59940",
"issue_id": 59940,
"merged_at": "2025-02-13T16:30:30Z",
"omission_probability": 0.1,
"pr_number": 59940,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.0-next.3\" with changelog.",
"total_changes": 26
} |
413 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b80fb3bfa33b..27dfb99600857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,33 @@
+<a name="19.2.0-rc.0"></a>
+# 19.2.0-rc.0 (2025-02-19)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
+| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 87fca5e15c177..1995731ae31b0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.3",
+ "version": "19.2.0-rc.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b80fb3bfa33b..27dfb99600857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,33 @@
+<a name="19.2.0-rc.0"></a>
+# 19.2.0-rc.0 (2025-02-19)
+### common
+| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
+| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler
+| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+### compiler-cli
+| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### core
+| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+### forms
+| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+### migrations
+| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 87fca5e15c177..1995731ae31b0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.3",
+ "version": "19.2.0-rc.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 31,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60019",
"issue_id": 60019,
"merged_at": "2025-02-19T19:02:38Z",
"omission_probability": 0.1,
"pr_number": 60019,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.0-rc.0\" with changelog.",
"total_changes": 32
} |
414 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b80fb3bfa33b..27dfb99600857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,33 @@
+<a name="19.2.0-rc.0"></a>
+# 19.2.0-rc.0 (2025-02-19)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
+| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 87fca5e15c177..23b8d7bc9e461 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.3",
+ "version": "19.3.0-next.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b80fb3bfa33b..27dfb99600857 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,33 @@
+# 19.2.0-rc.0 (2025-02-19)
+### common
+| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
+| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler
+| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+### compiler-cli
+| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### core
+| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+### forms
+| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+### migrations
+| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 87fca5e15c177..23b8d7bc9e461 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
+ "version": "19.3.0-next.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+<a name=\"19.2.0-rc.0\"></a>",
"- \"version\": \"19.2.0-next.3\","
] | [
5,
45
] | {
"additions": 31,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60020",
"issue_id": 60020,
"merged_at": "2025-02-19T19:04:16Z",
"omission_probability": 0.1,
"pr_number": 60020,
"repo": "angular/angular",
"title": "Update next branch to reflect new release-train \"v19.3.0-next.0\".",
"total_changes": 32
} |
415 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89bfcdab1c43b..6d710ef4bc6f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.1.7"></a>
+# 19.1.7 (2025-02-19)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
diff --git a/package.json b/package.json
index f4469727f407b..4d14ba4689d1e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.6",
+ "version": "19.1.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89bfcdab1c43b..6d710ef4bc6f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.1.7"></a>
+### common
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler-cli
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### forms
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
diff --git a/package.json b/package.json
index f4469727f407b..4d14ba4689d1e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.6",
+ "version": "19.1.7",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+# 19.1.7 (2025-02-19)"
] | [
6
] | {
"additions": 18,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60017",
"issue_id": 60017,
"merged_at": "2025-02-19T18:43:00Z",
"omission_probability": 0.1,
"pr_number": 60017,
"repo": "angular/angular",
"title": "Bump version to \"v19.1.7\" with changelog.",
"total_changes": 19
} |
416 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ce61d94c0e43..0b80fb3bfa33b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.1.7"></a>
+# 19.1.7 (2025-02-19)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.0-next.3"></a>
# 19.2.0-next.3 (2025-02-13)
### compiler
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ce61d94c0e43..0b80fb3bfa33b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.1.7"></a>
+# 19.1.7 (2025-02-19)
+### common
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+### compiler-cli
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.3"></a>
# 19.2.0-next.3 (2025-02-13)
### compiler | [
"+### forms"
] | [
15
] | {
"additions": 17,
"author": "thePunderWoman",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60018",
"issue_id": 60018,
"merged_at": "2025-02-19T18:44:53Z",
"omission_probability": 0.1,
"pr_number": 60018,
"repo": "angular/angular",
"title": "docs: release notes for the v19.1.7 release",
"total_changes": 17
} |
417 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 990d852bbb7ef..763befe7a2a2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,63 @@
+<a name="20.0.0-next.1"></a>
+# 20.0.0-next.1 (2025-03-05)
+## Breaking Changes
+### common
+- `AsyncPipe` now directly catches unhandled errors in
+ subscriptions and promises and reports them to the application's
+ `ErrorHandler`. For Zone-based applications, these errors would have
+ been caught by ZoneJS and reported to `ErrorHandler` so the result is
+ generally the same. The change to the exact mechanism for reporting can
+ result in differences in test environments that will require test
+ updates.
+### core
+- * TypeScript versions less than 5.8 are no longer supported.
+- `PendingTasks.run` no longer returns the result of the
+ async function. If this behavior is desired, it can be re-implemented
+ manually with the `PendingTasks.add`. Be aware, however, that promise rejections
+ will need to be handled or they can cause the node process to shut down
+ when using SSR.
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [36b60a9705](https://github.com/angular/angular/commit/36b60a97059d583453888786bf2c4b456d8f2e83) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+| [739cadae62](https://github.com/angular/angular/commit/739cadae62fd7302ef5fffa7897c8c4f2701a556) | fix | Handle errors in async pipe subscriptions ([#60057](https://github.com/angular/angular/pull/60057)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [51b8ff23ce](https://github.com/angular/angular/commit/51b8ff23cefb5112937dec9727a5b5d6e913aae6) | feat | support tagged template literals in expressions ([#59947](https://github.com/angular/angular/pull/59947)) |
+| [4fe489f1b4](https://github.com/angular/angular/commit/4fe489f1b4f8d1c0840af1224ee09d44cbb9c583) | fix | exponentiation should be right-to-left associative ([#60101](https://github.com/angular/angular/pull/60101)) |
+| [b70ad3c4e6](https://github.com/angular/angular/commit/b70ad3c4e63158a72b8aea173b1268ec8ab08e2b) | fix | proper handling of typeof, void in RecursiveAstVisitor ([#60101](https://github.com/angular/angular/pull/60101)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f9043e24ac](https://github.com/angular/angular/commit/f9043e24aca276fb72ee0245d33ab8d4ea37d4b0) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+| [ffb19e64f1](https://github.com/angular/angular/commit/ffb19e64f1ced7b5eb55e1c1b96b6f7c54835a1d) | fix | preserve required parens for nullish coalescing ([#60060](https://github.com/angular/angular/pull/60060)) |
+| [7c9b4892e9](https://github.com/angular/angular/commit/7c9b4892e9f6df164e4e289195bff27f2cc9a0ea) | fix | preserve required parens in exponentiation expressions ([#60101](https://github.com/angular/angular/pull/60101)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fe57332fc5](https://github.com/angular/angular/commit/fe57332fc5c4e6b44f01b9b4343385e90b3edf77) | feat | add input binding support to dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [82aa2c1a52](https://github.com/angular/angular/commit/82aa2c1a527be85e09f0f660ece56b594bff5a76) | feat | add the ability to apply directives to dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [326d48afb4](https://github.com/angular/angular/commit/326d48afb4266ef9b028860e2f845de005653d75) | feat | drop support for TypeScript older than 5.8 ([#60197](https://github.com/angular/angular/pull/60197)) |
+| [d260ca3091](https://github.com/angular/angular/commit/d260ca3091a6de215ba31f2516134d1aa11fe04c) | feat | emit template function for template related profiler hooks ([#60174](https://github.com/angular/angular/pull/60174)) |
+| [4812215a7b](https://github.com/angular/angular/commit/4812215a7b3bcb54bce3f017d89246aa39af2cc5) | feat | Expose `Injector.destroy` on `Injector` created with `Injector.create` ([#60054](https://github.com/angular/angular/pull/60054)) |
+| [809b5b4596](https://github.com/angular/angular/commit/809b5b4596cafcdabdb1c5fa92fcab539c6f637f) | feat | introduce new DI profiling event ([#60158](https://github.com/angular/angular/pull/60158)) |
+| [be44cc8f40](https://github.com/angular/angular/commit/be44cc8f40fb2364dbaf20ba24496e4355f84e78) | feat | support listening to outputs on dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [7eb59d3887](https://github.com/angular/angular/commit/7eb59d38872667c73e09a42e4260e8a58f102448) | fix | added @angular/compiler as a peer dependency ([#55610](https://github.com/angular/angular/pull/55610)) |
+| [af02914852](https://github.com/angular/angular/commit/af02914852cb26106090e07aee155890df1798ff) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [7232ce5b17](https://github.com/angular/angular/commit/7232ce5b17c9cce87bebe41c81f55043f21e639b) | fix | Catch and report rejections in async function of `PendingTasks.run` ([#60044](https://github.com/angular/angular/pull/60044)) |
+| [fd12220a35](https://github.com/angular/angular/commit/fd12220a35665d2378b74905c998fcff6130eb91) | fix | defer block render failures should report to application error handler ([#60149](https://github.com/angular/angular/pull/60149)) |
+| [3459faadbf](https://github.com/angular/angular/commit/3459faadbfce9be7b1ca69f4d4db82a65b31de50) | fix | do not allow setInput to be used with inputBinding ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [ea5eb28865](https://github.com/angular/angular/commit/ea5eb288651a87923edd86b2445d6ed32e52ed85) | fix | input targeting not checking if input exists on host ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [0dbf693a4d](https://github.com/angular/angular/commit/0dbf693a4d6ea0dad6072ebad20158b9e896e4f6) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [7ab0a8d1e7](https://github.com/angular/angular/commit/7ab0a8d1e719c9aee862bff0495fcd0138c00a10) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d5e91e04ff](https://github.com/angular/angular/commit/d5e91e04ff32997d87bdf7386ed3822090ac6b29) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.1"></a>
# 19.2.1 (2025-03-05)
### common
diff --git a/package.json b/package.json
index ce189f55d37d5..089db4eb61281 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.0",
+ "version": "20.0.0-next.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 990d852bbb7ef..763befe7a2a2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,63 @@
+<a name="20.0.0-next.1"></a>
+# 20.0.0-next.1 (2025-03-05)
+## Breaking Changes
+- `AsyncPipe` now directly catches unhandled errors in
+ subscriptions and promises and reports them to the application's
+ `ErrorHandler`. For Zone-based applications, these errors would have
+ been caught by ZoneJS and reported to `ErrorHandler` so the result is
+ generally the same. The change to the exact mechanism for reporting can
+ result in differences in test environments that will require test
+ updates.
+- * TypeScript versions less than 5.8 are no longer supported.
+- `PendingTasks.run` no longer returns the result of the
+ async function. If this behavior is desired, it can be re-implemented
+ manually with the `PendingTasks.add`. Be aware, however, that promise rejections
+ will need to be handled or they can cause the node process to shut down
+ when using SSR.
+| [36b60a9705](https://github.com/angular/angular/commit/36b60a97059d583453888786bf2c4b456d8f2e83) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+| [739cadae62](https://github.com/angular/angular/commit/739cadae62fd7302ef5fffa7897c8c4f2701a556) | fix | Handle errors in async pipe subscriptions ([#60057](https://github.com/angular/angular/pull/60057)) |
+### compiler
+| [51b8ff23ce](https://github.com/angular/angular/commit/51b8ff23cefb5112937dec9727a5b5d6e913aae6) | feat | support tagged template literals in expressions ([#59947](https://github.com/angular/angular/pull/59947)) |
+| [4fe489f1b4](https://github.com/angular/angular/commit/4fe489f1b4f8d1c0840af1224ee09d44cbb9c583) | fix | exponentiation should be right-to-left associative ([#60101](https://github.com/angular/angular/pull/60101)) |
+| [b70ad3c4e6](https://github.com/angular/angular/commit/b70ad3c4e63158a72b8aea173b1268ec8ab08e2b) | fix | proper handling of typeof, void in RecursiveAstVisitor ([#60101](https://github.com/angular/angular/pull/60101)) |
+### compiler-cli
+| [f9043e24ac](https://github.com/angular/angular/commit/f9043e24aca276fb72ee0245d33ab8d4ea37d4b0) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+| [ffb19e64f1](https://github.com/angular/angular/commit/ffb19e64f1ced7b5eb55e1c1b96b6f7c54835a1d) | fix | preserve required parens for nullish coalescing ([#60060](https://github.com/angular/angular/pull/60060)) |
+| [7c9b4892e9](https://github.com/angular/angular/commit/7c9b4892e9f6df164e4e289195bff27f2cc9a0ea) | fix | preserve required parens in exponentiation expressions ([#60101](https://github.com/angular/angular/pull/60101)) |
+| [326d48afb4](https://github.com/angular/angular/commit/326d48afb4266ef9b028860e2f845de005653d75) | feat | drop support for TypeScript older than 5.8 ([#60197](https://github.com/angular/angular/pull/60197)) |
+| [d260ca3091](https://github.com/angular/angular/commit/d260ca3091a6de215ba31f2516134d1aa11fe04c) | feat | emit template function for template related profiler hooks ([#60174](https://github.com/angular/angular/pull/60174)) |
+| [4812215a7b](https://github.com/angular/angular/commit/4812215a7b3bcb54bce3f017d89246aa39af2cc5) | feat | Expose `Injector.destroy` on `Injector` created with `Injector.create` ([#60054](https://github.com/angular/angular/pull/60054)) |
+| [7eb59d3887](https://github.com/angular/angular/commit/7eb59d38872667c73e09a42e4260e8a58f102448) | fix | added @angular/compiler as a peer dependency ([#55610](https://github.com/angular/angular/pull/55610)) |
+| [af02914852](https://github.com/angular/angular/commit/af02914852cb26106090e07aee155890df1798ff) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [7232ce5b17](https://github.com/angular/angular/commit/7232ce5b17c9cce87bebe41c81f55043f21e639b) | fix | Catch and report rejections in async function of `PendingTasks.run` ([#60044](https://github.com/angular/angular/pull/60044)) |
+| [fd12220a35](https://github.com/angular/angular/commit/fd12220a35665d2378b74905c998fcff6130eb91) | fix | defer block render failures should report to application error handler ([#60149](https://github.com/angular/angular/pull/60149)) |
+| [3459faadbf](https://github.com/angular/angular/commit/3459faadbfce9be7b1ca69f4d4db82a65b31de50) | fix | do not allow setInput to be used with inputBinding ([#60137](https://github.com/angular/angular/pull/60137)) |
+| [0dbf693a4d](https://github.com/angular/angular/commit/0dbf693a4d6ea0dad6072ebad20158b9e896e4f6) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [7ab0a8d1e7](https://github.com/angular/angular/commit/7ab0a8d1e719c9aee862bff0495fcd0138c00a10) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| [d5e91e04ff](https://github.com/angular/angular/commit/d5e91e04ff32997d87bdf7386ed3822090ac6b29) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.1"></a>
# 19.2.1 (2025-03-05)
### common
diff --git a/package.json b/package.json
index ce189f55d37d5..089db4eb61281 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.0",
+ "version": "20.0.0-next.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [fe57332fc5](https://github.com/angular/angular/commit/fe57332fc5c4e6b44f01b9b4343385e90b3edf77) | feat | add input binding support to dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |",
"+| [82aa2c1a52](https://github.com/angular/angular/commit/82aa2c1a527be85e09f0f660ece56b594bff5a76) | feat | add the ability to apply directives to dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |",
"+| [809b5b4596](https://github.com/angular/angular/commit/809b5b4596cafcdabdb1c5fa92fcab539c6f637f) | feat | introduce new DI profiling event ([#60158](https://github.com/angular/angular/pull/60158)) |",
"+| [be44cc8f40](https://github.com/angular/angular/commit/be44cc8f40fb2364dbaf20ba24496e4355f84e78) | feat | support listening to outputs on dynamically-created components ([#60137](https://github.com/angular/angular/pull/60137)) |",
"+| [ea5eb28865](https://github.com/angular/angular/commit/ea5eb288651a87923edd86b2445d6ed32e52ed85) | fix | input targeting not checking if input exists on host ([#60137](https://github.com/angular/angular/pull/60137)) |"
] | [
43,
44,
48,
49,
55
] | {
"additions": 61,
"author": "mmalerba",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60225",
"issue_id": 60225,
"merged_at": "2025-03-05T19:20:51Z",
"omission_probability": 0.1,
"pr_number": 60225,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.1\" with changelog.",
"total_changes": 62
} |
418 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d4ecc13f89fb..990d852bbb7ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.1"></a>
+# 19.2.1 (2025-03-05)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c2de5f68b3](https://github.com/angular/angular/commit/c2de5f68b3d3cd8a0c43b3c4325a1a1db874e132) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1dd94476b3](https://github.com/angular/angular/commit/1dd94476b35d08e753766b1d0c5d8af5faa017a9) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1b3b05bf72](https://github.com/angular/angular/commit/1b3b05bf7294963aa50f83b726db620b250b1a5c) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [330c24aed9](https://github.com/angular/angular/commit/330c24aed92e4b916fb7ac6a91fb17c3ae728869) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [cfad089cc3](https://github.com/angular/angular/commit/cfad089cc359cddf08d462662d2a6bf3acab9b22) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3f0116607d](https://github.com/angular/angular/commit/3f0116607dc3ad7e31cb4d895a56094f77c82f5d) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.0"></a>
# 20.0.0-next.0 (2025-02-26)
## Breaking Changes
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d4ecc13f89fb..990d852bbb7ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.1"></a>
+### common
+| [c2de5f68b3](https://github.com/angular/angular/commit/c2de5f68b3d3cd8a0c43b3c4325a1a1db874e132) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+### compiler-cli
+| [1dd94476b3](https://github.com/angular/angular/commit/1dd94476b35d08e753766b1d0c5d8af5faa017a9) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+### core
+| [1b3b05bf72](https://github.com/angular/angular/commit/1b3b05bf7294963aa50f83b726db620b250b1a5c) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [330c24aed9](https://github.com/angular/angular/commit/330c24aed92e4b916fb7ac6a91fb17c3ae728869) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [cfad089cc3](https://github.com/angular/angular/commit/cfad089cc359cddf08d462662d2a6bf3acab9b22) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| [3f0116607d](https://github.com/angular/angular/commit/3f0116607dc3ad7e31cb4d895a56094f77c82f5d) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.0"></a>
# 20.0.0-next.0 (2025-02-26)
## Breaking Changes | [
"+# 19.2.1 (2025-03-05)"
] | [
6
] | {
"additions": 23,
"author": "mmalerba",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60224",
"issue_id": 60224,
"merged_at": "2025-03-05T19:14:49Z",
"omission_probability": 0.1,
"pr_number": 60224,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.1 release",
"total_changes": 23
} |
419 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e61857ec052bd..d036c1c1a543f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.1"></a>
+# 19.2.1 (2025-03-05)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c2de5f68b3](https://github.com/angular/angular/commit/c2de5f68b3d3cd8a0c43b3c4325a1a1db874e132) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1dd94476b3](https://github.com/angular/angular/commit/1dd94476b35d08e753766b1d0c5d8af5faa017a9) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1b3b05bf72](https://github.com/angular/angular/commit/1b3b05bf7294963aa50f83b726db620b250b1a5c) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [330c24aed9](https://github.com/angular/angular/commit/330c24aed92e4b916fb7ac6a91fb17c3ae728869) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [cfad089cc3](https://github.com/angular/angular/commit/cfad089cc359cddf08d462662d2a6bf3acab9b22) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [3f0116607d](https://github.com/angular/angular/commit/3f0116607dc3ad7e31cb4d895a56094f77c82f5d) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.0"></a>
# 19.2.0 (2025-02-26)
### common
diff --git a/package.json b/package.json
index 317228234fe5b..f2920e3ee05f0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0",
+ "version": "19.2.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index e61857ec052bd..d036c1c1a543f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+<a name="19.2.1"></a>
+# 19.2.1 (2025-03-05)
+### common
+| [c2de5f68b3](https://github.com/angular/angular/commit/c2de5f68b3d3cd8a0c43b3c4325a1a1db874e132) | fix | clean up `onUrlChange` listener when root scope is destroyed ([#60004](https://github.com/angular/angular/pull/60004)) |
+### compiler-cli
+| [1dd94476b3](https://github.com/angular/angular/commit/1dd94476b35d08e753766b1d0c5d8af5faa017a9) | fix | ensure template IDs are not reused if a source file changes ([#60152](https://github.com/angular/angular/pull/60152)) |
+| [1b3b05bf72](https://github.com/angular/angular/commit/1b3b05bf7294963aa50f83b726db620b250b1a5c) | fix | cache ComponentRef inputs and outputs ([#60156](https://github.com/angular/angular/pull/60156)) |
+| [330c24aed9](https://github.com/angular/angular/commit/330c24aed92e4b916fb7ac6a91fb17c3ae728869) | fix | prevent invoking replay listeners on disconnected nodes ([#60103](https://github.com/angular/angular/pull/60103)) |
+| [cfad089cc3](https://github.com/angular/angular/commit/cfad089cc359cddf08d462662d2a6bf3acab9b22) | fix | prevents event replay from being called on comment nodes ([#60130](https://github.com/angular/angular/pull/60130)) |
+### language-service
+| [3f0116607d](https://github.com/angular/angular/commit/3f0116607dc3ad7e31cb4d895a56094f77c82f5d) | fix | Forward the tags for quick info from the type definition ([#59524](https://github.com/angular/angular/pull/59524)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0"></a>
# 19.2.0 (2025-02-26)
### common
diff --git a/package.json b/package.json
index 317228234fe5b..f2920e3ee05f0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0",
+ "version": "19.2.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+### core"
] | [
15
] | {
"additions": 24,
"author": "mmalerba",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60223",
"issue_id": 60223,
"merged_at": "2025-03-05T19:12:18Z",
"omission_probability": 0.1,
"pr_number": 60223,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.1\" with changelog.",
"total_changes": 25
} |
420 | diff --git a/packages/forms/experimental/src/api/structure.ts b/packages/forms/experimental/src/api/structure.ts
index 97ce06b825ec8..b0980e8ad132e 100644
--- a/packages/forms/experimental/src/api/structure.ts
+++ b/packages/forms/experimental/src/api/structure.ts
@@ -11,37 +11,7 @@ import {WritableSignal} from '@angular/core';
import {FieldNode} from '../field_node';
import {FieldPathNode} from '../path_node';
import {assertPathIsCurrent, SchemaImpl} from '../schema';
-import type {
- Field,
- FieldPath,
- LogicFn,
- Schema,
- SchemaFn,
- SchemaOrSchemaFn,
- ServerError,
-} from './types';
-
-/**
- * Creates a predefined set of logic that can be applied to a field of type `T`. `schema` accepts a
- * function that recevies the root `FieldPath` for the field and binds logic to it. This creates a
- * set of logic that can be eaily reused by binding it to a root-level field (see `form`), a
- * sub-field (see `apply`, `applyWhen`, `applyWhenValue`), or each element of a field array
- * (see `array`).
- *
- * @example ```
- * const nameSchema = schema<{first: string, last: string}>((name) => {
- * required(name.first);
- * required(name.last);
- * });
- * const nameForm = form(signal({first: '', last: ''}), nameSchema);
- * ```
- *
- * @param fn A function that recevies the root `FieldPath` for the form and binds logic to it.
- * @return A schema that can be applied to a Field of type `T`.
- */
-export function schema<T>(fn: SchemaFn<T>): Schema<T> {
- return new SchemaImpl(fn).asSchema();
-}
+import type {Field, FieldPath, LogicFn, Schema, ServerError} from './types';
/**
* Creates a form wrapped around the given model data. A form is represented as simply a `Field` of
@@ -76,18 +46,15 @@ export function schema<T>(fn: SchemaFn<T>): Schema<T> {
* @param model A writable signal that contains the model data for the form. The resulting field
* structure will match the shape of the model and any changes to the form data will be written to
* the model.
- * @param schemaOrFn A schema or a function that binds logic to the form. This can be optionally
+ * @param schema A schema or a function that binds logic to the form. This can be optionally
* included to specify logic for the form (e.g. validation, disabled fields, etc.)
* @return A `Field` representing a form around the data model.
* @template The type of the data model.
*/
-export function form<T>(
- model: WritableSignal<T>,
- schemaOrFn?: NoInfer<SchemaOrSchemaFn<T>>,
-): Field<T> {
+export function form<T>(model: WritableSignal<T>, schema?: NoInfer<Schema<T>>): Field<T> {
const pathImpl = FieldPathNode.newRoot();
- if (schemaOrFn !== undefined) {
- extractSchema(schemaOrFn).apply(pathImpl);
+ if (schema !== undefined) {
+ new SchemaImpl(schema).apply(pathImpl);
}
const fieldRoot = FieldNode.newRoot(model, pathImpl.logic);
return fieldRoot.fieldProxy as Field<T>;
@@ -122,16 +89,15 @@ export function form<T>(
* ```
*
* @param path The target path for an array field whose items the schema will be applied to.
- * @param schemaOrFn A schema for an element of the array, or function that binds logic to an
+ * @param schema A schema for an element of the array, or function that binds logic to an
* element of the array.
* @template T The data type of an element in the array.
*/
-export function applyEach<T>(path: FieldPath<T[]>, schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>): void {
- // applyEach(p, schema) = apply(p.element, schema)
+export function applyEach<T>(path: FieldPath<T[]>, schema: NoInfer<Schema<T>>): void {
assertPathIsCurrent(path);
const elementPath = FieldPathNode.extractFromPath(path).element.fieldPathProxy;
- apply(elementPath, schemaOrFn);
+ apply(elementPath, schema);
}
/**
@@ -150,11 +116,11 @@ export function applyEach<T>(path: FieldPath<T[]>, schemaOrFn: NoInfer<SchemaOrS
* @param path The target path to apply the schema to.
* @param schema The schema to apply to the property
*/
-export function apply<T>(path: FieldPath<T>, schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>): void {
+export function apply<T>(path: FieldPath<T>, schema: NoInfer<Schema<T>>): void {
assertPathIsCurrent(path);
const childPathImpl = FieldPathNode.extractFromPath(path).withNewKey();
- extractSchema(schemaOrFn).apply(childPathImpl);
+ new SchemaImpl(schema).apply(childPathImpl);
}
/**
@@ -167,16 +133,15 @@ export function apply<T>(path: FieldPath<T>, schemaOrFn: NoInfer<SchemaOrSchemaF
export function applyWhen<T>(
path: FieldPath<T>,
logic: LogicFn<T, boolean>,
- schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>,
+ schema: NoInfer<Schema<T>>,
): void {
assertPathIsCurrent(path);
- const schema = extractSchema(schemaOrFn);
const predicatedPathImpl = FieldPathNode.extractFromPath(path).withPredicate({
fn: logic,
path,
});
- schema.apply(predicatedPathImpl);
+ new SchemaImpl(schema).apply(predicatedPathImpl);
}
/**
@@ -190,7 +155,7 @@ export function applyWhen<T>(
export function applyWhenValue<T, TNarrowed extends T>(
path: FieldPath<T>,
predicate: (value: T) => value is TNarrowed,
- schemaOrFn: NoInfer<SchemaOrSchemaFn<TNarrowed>>,
+ schema: NoInfer<Schema<TNarrowed>>,
): void;
/**
* Conditionally applies a predefined schema to a given `FieldPath`.
@@ -203,14 +168,14 @@ export function applyWhenValue<T, TNarrowed extends T>(
export function applyWhenValue<T>(
path: FieldPath<T>,
predicate: (value: T) => boolean,
- schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>,
+ schema: NoInfer<Schema<T>>,
): void;
export function applyWhenValue(
path: FieldPath<unknown>,
predicate: (value: unknown) => boolean,
- schemaOrFn: SchemaOrSchemaFn<unknown>,
+ schema: Schema<unknown>,
) {
- applyWhen(path, ({value}) => predicate(value()), schemaOrFn);
+ applyWhen(path, ({value}) => predicate(value()), schema);
}
/**
@@ -253,10 +218,3 @@ export async function submit<T>(
}
api.setSubmittedStatus('submitted');
}
-
-function extractSchema(schemaOrFn: SchemaOrSchemaFn<any>): SchemaImpl {
- if (typeof schemaOrFn === 'function') {
- schemaOrFn = schema(schemaOrFn);
- }
- return SchemaImpl.extractFromSchema(schemaOrFn);
-}
diff --git a/packages/forms/experimental/src/api/types.ts b/packages/forms/experimental/src/api/types.ts
index 1148cb4bd7f05..3036c6f8267fb 100644
--- a/packages/forms/experimental/src/api/types.ts
+++ b/packages/forms/experimental/src/api/types.ts
@@ -124,21 +124,9 @@ export type FieldPath<T> = {
: {});
/**
- * Contains logic form a `Field` of type `T`.
+ * A function that binds logic to the given `FieldPath`.
*/
-export interface Schema<T> {
- readonly [ɵɵTYPE]: T;
-}
-
-/**
- * A function that binds schema logic to the given `FieldPath`.
- */
-export type SchemaFn<T> = (p: FieldPath<T>) => void;
-
-/**
- * A predefined schema, or a function used to bind schema logic.
- */
-export type SchemaOrSchemaFn<T> = Schema<T> | SchemaFn<T>;
+export type Schema<T> = (p: FieldPath<T>) => void;
/**
* A function that recevies the `FieldContext` for the field the logic is bound to and returns
diff --git a/packages/forms/experimental/src/schema.ts b/packages/forms/experimental/src/schema.ts
index a16048ac4428e..ffb386ac813a6 100644
--- a/packages/forms/experimental/src/schema.ts
+++ b/packages/forms/experimental/src/schema.ts
@@ -6,13 +6,13 @@
* found in the LICENSE file at https://angular.io/license
*/
-import {FieldPath, Schema, SchemaFn} from './api/types';
+import {FieldPath, Schema} from './api/types';
import {FieldPathNode} from './path_node';
let currentKey: symbol | undefined = undefined;
export class SchemaImpl {
- constructor(readonly schemaFn: SchemaFn<any>) {}
+ constructor(readonly schemaFn: Schema<any>) {}
apply(path: FieldPathNode): void {
let prevKey = currentKey;
@@ -23,18 +23,6 @@ export class SchemaImpl {
currentKey = prevKey;
}
}
-
- asSchema<T>(): Schema<T> {
- return this as unknown as Schema<T>;
- }
-
- /**
- * Get the `SchemaImpl` given a `Schema`.
- */
- static extractFromSchema(schema: Schema<unknown>): SchemaImpl {
- // `Schema` instances at runtime are really `SchemaImpl`s, so this is just a cast.
- return schema as unknown as SchemaImpl;
- }
}
export function assertPathIsCurrent(path: FieldPath<unknown>): void {
diff --git a/packages/forms/experimental/test/active_path.spec.ts b/packages/forms/experimental/test/active_path.spec.ts
index a993235d16890..861b1fd0ba98e 100644
--- a/packages/forms/experimental/test/active_path.spec.ts
+++ b/packages/forms/experimental/test/active_path.spec.ts
@@ -7,8 +7,8 @@
*/
import {signal} from '@angular/core';
-import {apply, applyEach, applyWhen, form} from '../src/api/structure';
import {validate} from '../src/api/logic';
+import {apply, applyEach, applyWhen, form} from '../src/api/structure';
describe('Active path', () => {
it('Disallows using parent paths for applyWhen', () => {
@@ -18,7 +18,7 @@ describe('Active path', () => {
applyWhen(
path,
({value}) => value().needLastName,
- (namePath /* NO USING THIS ONE */) => {
+ (/* UNUSED */) => {
expect(() => {
validate(path.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
}).toThrowError();
diff --git a/packages/forms/experimental/test/api/when.spec.ts b/packages/forms/experimental/test/api/when.spec.ts
index e65230df5d07d..a690f8f01c16e 100644
--- a/packages/forms/experimental/test/api/when.spec.ts
+++ b/packages/forms/experimental/test/api/when.spec.ts
@@ -8,12 +8,12 @@
import {Signal, signal} from '@angular/core';
import {validate} from '../../src/api/logic';
-import {applyEach, applyWhen, applyWhenValue, form, schema} from '../../src/api/structure';
+import {applyEach, applyWhen, applyWhenValue, form} from '../../src/api/structure';
+import {Schema} from '../../src/api/types';
export interface User {
first: string;
last: string;
- needLastName: boolean;
}
const needsLastNamePredicate = ({value}: {value: Signal<{needLastName: boolean}>}) =>
@@ -39,7 +39,7 @@ describe('when', () => {
const data = signal({first: '', needLastName: false, last: ''});
const f = form(data, (path) => {
- applyWhen(path, needsLastNamePredicate, (namePath /* NO USING THIS ONE */) => {
+ applyWhen(path, needsLastNamePredicate, (/* UNUSED */) => {
expect(() => {
validate(path.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
}).toThrowError();
@@ -50,17 +50,17 @@ describe('when', () => {
it('supports merging two array schemas', () => {
const data = signal({needLastName: true, items: [{first: '', last: ''}]});
- const s = schema<User>((namePath) => {
+ const s: Schema<User> = (namePath) => {
validate(namePath.last, ({value}) => {
return value().length > 0 ? undefined : {kind: 'required1'};
});
- });
+ };
- const s2 = schema<User>((namePath) => {
+ const s2: Schema<User> = (namePath) => {
validate(namePath.last, ({value}) => {
return value.length > 0 ? undefined : {kind: 'required2'};
});
- });
+ };
const f = form(data, (path) => {
applyEach(path.items, s);
@@ -77,9 +77,9 @@ describe('when', () => {
it('accepts a schema', () => {
const data = signal({first: '', needLastName: false, last: ''});
- const s = schema<User>((namePath) => {
+ const s: Schema<User> = (namePath) => {
validate(namePath.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
- });
+ };
const f = form(data, (path) => {
applyWhen(path, needsLastNamePredicate, s);
});
@@ -108,11 +108,11 @@ describe('when', () => {
it('supports array schema', () => {
const data = signal({needLastName: true, items: [{first: '', last: ''}]});
- const s = schema<{first: string; last: string}>((i) => {
+ const s: Schema<User> = (i) => {
validate(i.last, ({value}) => {
return value().length > 0 ? undefined : {kind: 'required'};
});
- });
+ };
const f = form(data, (path) => {
applyWhen(path, needsLastNamePredicate, (names /* Path */) => {
diff --git a/packages/forms/experimental/test/node.spec.ts b/packages/forms/experimental/test/node.spec.ts
index fc4230fdd3826..b01f18b01224e 100644
--- a/packages/forms/experimental/test/node.spec.ts
+++ b/packages/forms/experimental/test/node.spec.ts
@@ -1,6 +1,7 @@
import {computed, signal} from '@angular/core';
import {disabled, error, required, validate} from '../src/api/logic';
-import {apply, applyEach, form, schema, submit} from '../src/api/structure';
+import {apply, applyEach, form, submit} from '../src/api/structure';
+import {Schema} from '../src/api/types';
import {DISABLED_REASON, REQUIRED} from '../src/logic_node';
describe('Node', () => {
@@ -477,9 +478,9 @@ describe('Node', () => {
city: string;
}
- const addressSchema = schema<Address>((p) => {
+ const addressSchema: Schema<Address> = (p) => {
disabled(p.street, () => true);
- });
+ };
const data = signal<{name: string; address: Address}>({
name: '',
| diff --git a/packages/forms/experimental/src/api/structure.ts b/packages/forms/experimental/src/api/structure.ts
index 97ce06b825ec8..b0980e8ad132e 100644
--- a/packages/forms/experimental/src/api/structure.ts
+++ b/packages/forms/experimental/src/api/structure.ts
@@ -11,37 +11,7 @@ import {WritableSignal} from '@angular/core';
import {FieldNode} from '../field_node';
import {FieldPathNode} from '../path_node';
import {assertPathIsCurrent, SchemaImpl} from '../schema';
-import type {
- Field,
- Schema,
- SchemaFn,
- SchemaOrSchemaFn,
- ServerError,
-} from './types';
- * Creates a predefined set of logic that can be applied to a field of type `T`. `schema` accepts a
- * function that recevies the root `FieldPath` for the field and binds logic to it. This creates a
- * sub-field (see `apply`, `applyWhen`, `applyWhenValue`), or each element of a field array
- * (see `array`).
- * @example ```
- * const nameSchema = schema<{first: string, last: string}>((name) => {
- * required(name.first);
- * required(name.last);
- * });
- * const nameForm = form(signal({first: '', last: ''}), nameSchema);
- * ```
- * @param fn A function that recevies the root `FieldPath` for the form and binds logic to it.
- * @return A schema that can be applied to a Field of type `T`.
-export function schema<T>(fn: SchemaFn<T>): Schema<T> {
- return new SchemaImpl(fn).asSchema();
+import type {Field, FieldPath, LogicFn, Schema, ServerError} from './types';
* Creates a form wrapped around the given model data. A form is represented as simply a `Field` of
@@ -76,18 +46,15 @@ export function schema<T>(fn: SchemaFn<T>): Schema<T> {
* @param model A writable signal that contains the model data for the form. The resulting field
* structure will match the shape of the model and any changes to the form data will be written to
* the model.
- * @param schemaOrFn A schema or a function that binds logic to the form. This can be optionally
* included to specify logic for the form (e.g. validation, disabled fields, etc.)
* @return A `Field` representing a form around the data model.
* @template The type of the data model.
-export function form<T>(
- model: WritableSignal<T>,
- schemaOrFn?: NoInfer<SchemaOrSchemaFn<T>>,
-): Field<T> {
+export function form<T>(model: WritableSignal<T>, schema?: NoInfer<Schema<T>>): Field<T> {
const pathImpl = FieldPathNode.newRoot();
- if (schemaOrFn !== undefined) {
- extractSchema(schemaOrFn).apply(pathImpl);
+ if (schema !== undefined) {
+ new SchemaImpl(schema).apply(pathImpl);
const fieldRoot = FieldNode.newRoot(model, pathImpl.logic);
return fieldRoot.fieldProxy as Field<T>;
@@ -122,16 +89,15 @@ export function form<T>(
* ```
*
* @param path The target path for an array field whose items the schema will be applied to.
- * @param schemaOrFn A schema for an element of the array, or function that binds logic to an
+ * @param schema A schema for an element of the array, or function that binds logic to an
* element of the array.
* @template T The data type of an element in the array.
-export function applyEach<T>(path: FieldPath<T[]>, schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>): void {
- // applyEach(p, schema) = apply(p.element, schema)
+export function applyEach<T>(path: FieldPath<T[]>, schema: NoInfer<Schema<T>>): void {
const elementPath = FieldPathNode.extractFromPath(path).element.fieldPathProxy;
- apply(elementPath, schemaOrFn);
+ apply(elementPath, schema);
@@ -150,11 +116,11 @@ export function applyEach<T>(path: FieldPath<T[]>, schemaOrFn: NoInfer<SchemaOrS
* @param path The target path to apply the schema to.
* @param schema The schema to apply to the property
-export function apply<T>(path: FieldPath<T>, schemaOrFn: NoInfer<SchemaOrSchemaFn<T>>): void {
+export function apply<T>(path: FieldPath<T>, schema: NoInfer<Schema<T>>): void {
const childPathImpl = FieldPathNode.extractFromPath(path).withNewKey();
- extractSchema(schemaOrFn).apply(childPathImpl);
+ new SchemaImpl(schema).apply(childPathImpl);
@@ -167,16 +133,15 @@ export function apply<T>(path: FieldPath<T>, schemaOrFn: NoInfer<SchemaOrSchemaF
export function applyWhen<T>(
logic: LogicFn<T, boolean>,
): void {
const predicatedPathImpl = FieldPathNode.extractFromPath(path).withPredicate({
fn: logic,
path,
});
- schema.apply(predicatedPathImpl);
+ new SchemaImpl(schema).apply(predicatedPathImpl);
@@ -190,7 +155,7 @@ export function applyWhen<T>(
export function applyWhenValue<T, TNarrowed extends T>(
predicate: (value: T) => value is TNarrowed,
- schemaOrFn: NoInfer<SchemaOrSchemaFn<TNarrowed>>,
+ schema: NoInfer<Schema<TNarrowed>>,
* Conditionally applies a predefined schema to a given `FieldPath`.
@@ -203,14 +168,14 @@ export function applyWhenValue<T, TNarrowed extends T>(
export function applyWhenValue<T>(
predicate: (value: T) => boolean,
export function applyWhenValue(
path: FieldPath<unknown>,
predicate: (value: unknown) => boolean,
+ schema: Schema<unknown>,
) {
- applyWhen(path, ({value}) => predicate(value()), schemaOrFn);
+ applyWhen(path, ({value}) => predicate(value()), schema);
@@ -253,10 +218,3 @@ export async function submit<T>(
api.setSubmittedStatus('submitted');
-function extractSchema(schemaOrFn: SchemaOrSchemaFn<any>): SchemaImpl {
- if (typeof schemaOrFn === 'function') {
- return SchemaImpl.extractFromSchema(schemaOrFn);
diff --git a/packages/forms/experimental/src/api/types.ts b/packages/forms/experimental/src/api/types.ts
index 1148cb4bd7f05..3036c6f8267fb 100644
--- a/packages/forms/experimental/src/api/types.ts
+++ b/packages/forms/experimental/src/api/types.ts
@@ -124,21 +124,9 @@ export type FieldPath<T> = {
: {});
- * Contains logic form a `Field` of type `T`.
+ * A function that binds logic to the given `FieldPath`.
-export interface Schema<T> {
- readonly [ɵɵTYPE]: T;
- * A function that binds schema logic to the given `FieldPath`.
-export type SchemaFn<T> = (p: FieldPath<T>) => void;
- * A predefined schema, or a function used to bind schema logic.
-export type SchemaOrSchemaFn<T> = Schema<T> | SchemaFn<T>;
* A function that recevies the `FieldContext` for the field the logic is bound to and returns
diff --git a/packages/forms/experimental/src/schema.ts b/packages/forms/experimental/src/schema.ts
index a16048ac4428e..ffb386ac813a6 100644
--- a/packages/forms/experimental/src/schema.ts
+++ b/packages/forms/experimental/src/schema.ts
@@ -6,13 +6,13 @@
* found in the LICENSE file at https://angular.io/license
-import {FieldPath, Schema, SchemaFn} from './api/types';
+import {FieldPath, Schema} from './api/types';
import {FieldPathNode} from './path_node';
let currentKey: symbol | undefined = undefined;
export class SchemaImpl {
- constructor(readonly schemaFn: SchemaFn<any>) {}
+ constructor(readonly schemaFn: Schema<any>) {}
apply(path: FieldPathNode): void {
let prevKey = currentKey;
@@ -23,18 +23,6 @@ export class SchemaImpl {
currentKey = prevKey;
}
- asSchema<T>(): Schema<T> {
- /**
- * Get the `SchemaImpl` given a `Schema`.
- */
- static extractFromSchema(schema: Schema<unknown>): SchemaImpl {
- // `Schema` instances at runtime are really `SchemaImpl`s, so this is just a cast.
export function assertPathIsCurrent(path: FieldPath<unknown>): void {
diff --git a/packages/forms/experimental/test/active_path.spec.ts b/packages/forms/experimental/test/active_path.spec.ts
index a993235d16890..861b1fd0ba98e 100644
--- a/packages/forms/experimental/test/active_path.spec.ts
+++ b/packages/forms/experimental/test/active_path.spec.ts
@@ -7,8 +7,8 @@
import {signal} from '@angular/core';
-import {apply, applyEach, applyWhen, form} from '../src/api/structure';
import {validate} from '../src/api/logic';
+import {apply, applyEach, applyWhen, form} from '../src/api/structure';
describe('Active path', () => {
it('Disallows using parent paths for applyWhen', () => {
@@ -18,7 +18,7 @@ describe('Active path', () => {
applyWhen(
path,
({value}) => value().needLastName,
- (namePath /* NO USING THIS ONE */) => {
+ (/* UNUSED */) => {
expect(() => {
validate(path.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
}).toThrowError();
diff --git a/packages/forms/experimental/test/api/when.spec.ts b/packages/forms/experimental/test/api/when.spec.ts
index e65230df5d07d..a690f8f01c16e 100644
--- a/packages/forms/experimental/test/api/when.spec.ts
+++ b/packages/forms/experimental/test/api/when.spec.ts
@@ -8,12 +8,12 @@
import {Signal, signal} from '@angular/core';
import {validate} from '../../src/api/logic';
-import {applyEach, applyWhen, applyWhenValue, form, schema} from '../../src/api/structure';
+import {applyEach, applyWhen, applyWhenValue, form} from '../../src/api/structure';
export interface User {
first: string;
last: string;
- needLastName: boolean;
const needsLastNamePredicate = ({value}: {value: Signal<{needLastName: boolean}>}) =>
@@ -39,7 +39,7 @@ describe('when', () => {
- applyWhen(path, needsLastNamePredicate, (namePath /* NO USING THIS ONE */) => {
+ applyWhen(path, needsLastNamePredicate, (/* UNUSED */) => {
expect(() => {
validate(path.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
}).toThrowError();
@@ -50,17 +50,17 @@ describe('when', () => {
it('supports merging two array schemas', () => {
return value().length > 0 ? undefined : {kind: 'required1'};
- const s2 = schema<User>((namePath) => {
+ const s2: Schema<User> = (namePath) => {
return value.length > 0 ? undefined : {kind: 'required2'};
applyEach(path.items, s);
@@ -77,9 +77,9 @@ describe('when', () => {
it('accepts a schema', () => {
validate(namePath.last, ({value}) => (value().length > 0 ? undefined : {kind: 'required'}));
applyWhen(path, needsLastNamePredicate, s);
});
@@ -108,11 +108,11 @@ describe('when', () => {
it('supports array schema', () => {
- const s = schema<{first: string; last: string}>((i) => {
+ const s: Schema<User> = (i) => {
validate(i.last, ({value}) => {
return value().length > 0 ? undefined : {kind: 'required'};
applyWhen(path, needsLastNamePredicate, (names /* Path */) => {
diff --git a/packages/forms/experimental/test/node.spec.ts b/packages/forms/experimental/test/node.spec.ts
index fc4230fdd3826..b01f18b01224e 100644
--- a/packages/forms/experimental/test/node.spec.ts
+++ b/packages/forms/experimental/test/node.spec.ts
@@ -1,6 +1,7 @@
import {computed, signal} from '@angular/core';
import {disabled, error, required, validate} from '../src/api/logic';
-import {apply, applyEach, form, schema, submit} from '../src/api/structure';
+import {Schema} from '../src/api/types';
import {DISABLED_REASON, REQUIRED} from '../src/logic_node';
describe('Node', () => {
@@ -477,9 +478,9 @@ describe('Node', () => {
city: string;
}
- const addressSchema = schema<Address>((p) => {
+ const addressSchema: Schema<Address> = (p) => {
disabled(p.street, () => true);
- });
+ };
const data = signal<{name: string; address: Address}>({
name: '', | [
"- FieldPath,",
"- LogicFn,",
"- * set of logic that can be eaily reused by binding it to a root-level field (see `form`), a",
"+ * @param schema A schema or a function that binds logic to the form. This can be optionally",
"- const schema = extractSchema(schemaOrFn);",
"- schemaOrFn: SchemaOrSchemaFn<unknown>,",
"- schemaOrFn = schema(schemaOrFn);",
"+export type Schema<T> = (p: FieldPath<T>) => void;",
"- return this as unknown as Schema<T>;",
"- return schema as unknown as SchemaImpl;",
"+import {Schema} from '../../src/api/types';",
"+import {apply, applyEach, form, submit} from '../src/api/structure';"
] | [
10,
11,
21,
48,
109,
138,
153,
181,
211,
219,
257,
331
] | {
"additions": 37,
"author": "mmalerba",
"deletions": 102,
"html_url": "https://github.com/angular/angular/pull/60732",
"issue_id": 60732,
"merged_at": "2025-04-03T23:49:52Z",
"omission_probability": 0.1,
"pr_number": 60732,
"repo": "angular/angular",
"title": "Simplify concept of schemas to just a type",
"total_changes": 139
} |
421 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbc453fc10f88..d30ae3061eb0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,94 @@
+<a name="20.0.0-next.5"></a>
+# 20.0.0-next.5 (2025-04-02)
+## Breaking Changes
+### core
+- - Angular no longer supports Node.js v18.
+ - Node.js versions 22.0 to 22.10 are also no longer supported.
+
+ Before upgrading to Angular v20, ensure the Node.js version is at least 20.11.1.
+ For the full list of supported versions, visit: https://angular.dev/reference/versions
+- Uncaught errors in listeners which were previously only reported to
+ `ErrorHandler` are now also reported to Angular's internal error
+ handling machinery. For tests, this means that the error will be
+ rethrown by default rather than only logging the error. Developers
+ should fix these errors, catch them in the test if the test is
+ intentionally covering an error case, or use `rethrowApplicationErrors:
+ false` in `configureTestingModule` as a last resort.
+### router
+- The guards arrays on `Route` no longer include `any` in
+ the type union. The union includes functions for the functional guards
+ as well as a type matching `Injector.get`: `ProviderToken<T>|string`.
+ Note that string is still deprecated on both the route guards and
+ `Injector.get`.
+## Deprecations
+### core
+- `ngIf`/`ngFor`/`ngSwitch` are deprecated. Use the control flow blocks instead (`@for`/`@if`/`@switch`).
+###
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a7d1293f75](https://github.com/angular/angular/commit/a7d1293f7571568d242ceab2ec934bb4b331fc67) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5eccf3a5e5](https://github.com/angular/angular/commit/5eccf3a5e5903e48546c3e2fdb62e938bbdae179) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8b990a31c3](https://github.com/angular/angular/commit/8b990a31c3f9b27e096c4ac63a7fa1873fadbe72) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) |
+| [e6d2afbfb9](https://github.com/angular/angular/commit/e6d2afbfb9114274eb4374b1ae0683d8f62f3a9f) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1e6faad479](https://github.com/angular/angular/commit/1e6faad479e879083550424f92b6501fe09d48ba) | fix | correctly parse event name in HostListener ([#60561](https://github.com/angular/angular/pull/60561)) |
+| [5948cd03c5](https://github.com/angular/angular/commit/5948cd03c505c252602e80d09d5c63ea8fd38f70) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [7e03af898e](https://github.com/angular/angular/commit/7e03af898e5144eb3a64b17dd6470874467d9133) | fix | set correct target when type checking events ([#60561](https://github.com/angular/angular/pull/60561)) |
+| [9f18c7cc74](https://github.com/angular/angular/commit/9f18c7cc74d1e31b566e6f18153079721b81c41c) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a4bad8d361](https://github.com/angular/angular/commit/a4bad8d361e8a65b52df8c3d5436401343abace7) | feat | export signalGetFn from signal primitives ([#60497](https://github.com/angular/angular/pull/60497)) |
+| [7ccec1494f](https://github.com/angular/angular/commit/7ccec1494f864a485d2188da62d2006c31849f3f) | feat | move DOCUMENT token into core ([#60663](https://github.com/angular/angular/pull/60663)) |
+| [fe9b79b615](https://github.com/angular/angular/commit/fe9b79b615bb72989498c2dc9e84a89e618ebeb4) | feat | update Node.js version support ([#60545](https://github.com/angular/angular/pull/60545)) |
+| [5f7f04634f](https://github.com/angular/angular/commit/5f7f04634f57c0fb669e2b81c85a0dff972868d8) | fix | call `DestroyRef` on destroy callback if view is destroyed ([#58008](https://github.com/angular/angular/pull/58008)) |
+| [765ba1e181](https://github.com/angular/angular/commit/765ba1e181442079c25387bb869ed576388e839c) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
+| [7b819be83f](https://github.com/angular/angular/commit/7b819be83fc3c5ced7a7d14f777cad0691eef709) | fix | Ensure errors in listeners report to the application error handler ([#60251](https://github.com/angular/angular/pull/60251)) |
+| [cdbc6e8ec1](https://github.com/angular/angular/commit/cdbc6e8ec1ebacaee1862ed3da69bef41d214792) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
+| [fd5c981a29](https://github.com/angular/angular/commit/fd5c981a290a69f3b34a6a189ec6e3d4989b1d20) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [6acce7ca2a](https://github.com/angular/angular/commit/6acce7ca2add13a25456c5bacbcf5a21ac8f77e3) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [0cd7d3bdf0](https://github.com/angular/angular/commit/0cd7d3bdf0a9c0aeb514998a248e913fe49b5410) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [005ad65b1f](https://github.com/angular/angular/commit/005ad65b1fbefdb34b03507c1720fa93e2a17cad) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+| [1c7b356625](https://github.com/angular/angular/commit/1c7b35662587de8c3245ca26ba7a04aba2c0a341) | fix | release `hasPendingTasks` observers ([#59723](https://github.com/angular/angular/pull/59723)) |
+| [43cbc58254](https://github.com/angular/angular/commit/43cbc58254ecb8a1a6a938479b6c388cc00143d7) | fix | remove `forceRoot` flag for effects ([#60535](https://github.com/angular/angular/pull/60535)) |
+| [a611b234d7](https://github.com/angular/angular/commit/a611b234d7405f3a06389d66860a139cd9202c60) | fix | run root effects in creation order ([#60534](https://github.com/angular/angular/pull/60534)) |
+| [b407157ee8](https://github.com/angular/angular/commit/b407157ee848296cd264891b1d7cc9c57c719418) | refactor | Deprecate the structural directives `ngIf`/`ngFor`/`ngSwitch`. ([#60492](https://github.com/angular/angular/pull/60492)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a07ee60989](https://github.com/angular/angular/commit/a07ee60989441c38e6539fd25cad5166622e9f9e) | feat | add markAllAsDirty to AbstractControl ([#58663](https://github.com/angular/angular/pull/58663)) |
+| [bdfbd54932](https://github.com/angular/angular/commit/bdfbd5493240869e9a25fa10a0f6c21510e12492) | feat | Allow to reset a form without emitting events ([#60354](https://github.com/angular/angular/pull/60354)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ea62a4f317](https://github.com/angular/angular/commit/ea62a4f3172d0618a33e8e95b49e133cfee6b15d) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0c53970aeb](https://github.com/angular/angular/commit/0c53970aeb54033cce880bd9a8b51d8c67513f74) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [3ff48b6467](https://github.com/angular/angular/commit/3ff48b64670645a70c69706c4b20ee11e8f61306) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0bb4bd661e](https://github.com/angular/angular/commit/0bb4bd661e8fafe3228692181397272898fb9e9a) | feat | Add ability to directly abort a navigation ([#60380](https://github.com/angular/angular/pull/60380)) |
+| [ff98ccb193](https://github.com/angular/angular/commit/ff98ccb19391ed4e04528b82771c04ad67067d68) | feat | support custom elements for RouterLink ([#60290](https://github.com/angular/angular/pull/60290)) |
+| [1226eaad51](https://github.com/angular/angular/commit/1226eaad516ec9736422d5500af130222b8c77d9) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+| [c57951d58f](https://github.com/angular/angular/commit/c57951d58f3c1c9287349d40687715b631a1b25e) | fix | Remove 'any' type from route guards ([#60378](https://github.com/angular/angular/pull/60378)) |
+### service-worker
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4546d4fb39](https://github.com/angular/angular/commit/4546d4fb39145bd8723495fc0035a37b30b47d1f) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.5"></a>
# 19.2.5 (2025-04-02)
###
diff --git a/package.json b/package.json
index a3a26291e2c5b..e9c0665787973 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.4",
+ "version": "20.0.0-next.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbc453fc10f88..d30ae3061eb0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,94 @@
+<a name="20.0.0-next.5"></a>
+# 20.0.0-next.5 (2025-04-02)
+## Breaking Changes
+- - Angular no longer supports Node.js v18.
+
+ Before upgrading to Angular v20, ensure the Node.js version is at least 20.11.1.
+ For the full list of supported versions, visit: https://angular.dev/reference/versions
+- Uncaught errors in listeners which were previously only reported to
+ `ErrorHandler` are now also reported to Angular's internal error
+ handling machinery. For tests, this means that the error will be
+ rethrown by default rather than only logging the error. Developers
+ should fix these errors, catch them in the test if the test is
+ intentionally covering an error case, or use `rethrowApplicationErrors:
+ false` in `configureTestingModule` as a last resort.
+- The guards arrays on `Route` no longer include `any` in
+ the type union. The union includes functions for the functional guards
+ as well as a type matching `Injector.get`: `ProviderToken<T>|string`.
+ Note that string is still deprecated on both the route guards and
+## Deprecations
+- `ngIf`/`ngFor`/`ngSwitch` are deprecated. Use the control flow blocks instead (`@for`/`@if`/`@switch`).
+###
+| [a7d1293f75](https://github.com/angular/angular/commit/a7d1293f7571568d242ceab2ec934bb4b331fc67) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+| [5eccf3a5e5](https://github.com/angular/angular/commit/5eccf3a5e5903e48546c3e2fdb62e938bbdae179) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
+### compiler
+| [e6d2afbfb9](https://github.com/angular/angular/commit/e6d2afbfb9114274eb4374b1ae0683d8f62f3a9f) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
+### compiler-cli
+| [1e6faad479](https://github.com/angular/angular/commit/1e6faad479e879083550424f92b6501fe09d48ba) | fix | correctly parse event name in HostListener ([#60561](https://github.com/angular/angular/pull/60561)) |
+| [5948cd03c5](https://github.com/angular/angular/commit/5948cd03c505c252602e80d09d5c63ea8fd38f70) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [7e03af898e](https://github.com/angular/angular/commit/7e03af898e5144eb3a64b17dd6470874467d9133) | fix | set correct target when type checking events ([#60561](https://github.com/angular/angular/pull/60561)) |
+| [9f18c7cc74](https://github.com/angular/angular/commit/9f18c7cc74d1e31b566e6f18153079721b81c41c) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+| [7ccec1494f](https://github.com/angular/angular/commit/7ccec1494f864a485d2188da62d2006c31849f3f) | feat | move DOCUMENT token into core ([#60663](https://github.com/angular/angular/pull/60663)) |
+| [fe9b79b615](https://github.com/angular/angular/commit/fe9b79b615bb72989498c2dc9e84a89e618ebeb4) | feat | update Node.js version support ([#60545](https://github.com/angular/angular/pull/60545)) |
+| [5f7f04634f](https://github.com/angular/angular/commit/5f7f04634f57c0fb669e2b81c85a0dff972868d8) | fix | call `DestroyRef` on destroy callback if view is destroyed ([#58008](https://github.com/angular/angular/pull/58008)) |
+| [7b819be83f](https://github.com/angular/angular/commit/7b819be83fc3c5ced7a7d14f777cad0691eef709) | fix | Ensure errors in listeners report to the application error handler ([#60251](https://github.com/angular/angular/pull/60251)) |
+| [cdbc6e8ec1](https://github.com/angular/angular/commit/cdbc6e8ec1ebacaee1862ed3da69bef41d214792) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
+| [fd5c981a29](https://github.com/angular/angular/commit/fd5c981a290a69f3b34a6a189ec6e3d4989b1d20) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [6acce7ca2a](https://github.com/angular/angular/commit/6acce7ca2add13a25456c5bacbcf5a21ac8f77e3) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [0cd7d3bdf0](https://github.com/angular/angular/commit/0cd7d3bdf0a9c0aeb514998a248e913fe49b5410) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [005ad65b1f](https://github.com/angular/angular/commit/005ad65b1fbefdb34b03507c1720fa93e2a17cad) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+| [1c7b356625](https://github.com/angular/angular/commit/1c7b35662587de8c3245ca26ba7a04aba2c0a341) | fix | release `hasPendingTasks` observers ([#59723](https://github.com/angular/angular/pull/59723)) |
+| [43cbc58254](https://github.com/angular/angular/commit/43cbc58254ecb8a1a6a938479b6c388cc00143d7) | fix | remove `forceRoot` flag for effects ([#60535](https://github.com/angular/angular/pull/60535)) |
+| [a611b234d7](https://github.com/angular/angular/commit/a611b234d7405f3a06389d66860a139cd9202c60) | fix | run root effects in creation order ([#60534](https://github.com/angular/angular/pull/60534)) |
+| [b407157ee8](https://github.com/angular/angular/commit/b407157ee848296cd264891b1d7cc9c57c719418) | refactor | Deprecate the structural directives `ngIf`/`ngFor`/`ngSwitch`. ([#60492](https://github.com/angular/angular/pull/60492)) |
+| [a07ee60989](https://github.com/angular/angular/commit/a07ee60989441c38e6539fd25cad5166622e9f9e) | feat | add markAllAsDirty to AbstractControl ([#58663](https://github.com/angular/angular/pull/58663)) |
+| [bdfbd54932](https://github.com/angular/angular/commit/bdfbd5493240869e9a25fa10a0f6c21510e12492) | feat | Allow to reset a form without emitting events ([#60354](https://github.com/angular/angular/pull/60354)) |
+### language-service
+| [ea62a4f317](https://github.com/angular/angular/commit/ea62a4f3172d0618a33e8e95b49e133cfee6b15d) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+### migrations
+| [0c53970aeb](https://github.com/angular/angular/commit/0c53970aeb54033cce880bd9a8b51d8c67513f74) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [0bb4bd661e](https://github.com/angular/angular/commit/0bb4bd661e8fafe3228692181397272898fb9e9a) | feat | Add ability to directly abort a navigation ([#60380](https://github.com/angular/angular/pull/60380)) |
+| [ff98ccb193](https://github.com/angular/angular/commit/ff98ccb19391ed4e04528b82771c04ad67067d68) | feat | support custom elements for RouterLink ([#60290](https://github.com/angular/angular/pull/60290)) |
+| [1226eaad51](https://github.com/angular/angular/commit/1226eaad516ec9736422d5500af130222b8c77d9) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+| [c57951d58f](https://github.com/angular/angular/commit/c57951d58f3c1c9287349d40687715b631a1b25e) | fix | Remove 'any' type from route guards ([#60378](https://github.com/angular/angular/pull/60378)) |
+### service-worker
+| [4546d4fb39](https://github.com/angular/angular/commit/4546d4fb39145bd8723495fc0035a37b30b47d1f) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.5"></a>
# 19.2.5 (2025-04-02)
###
diff --git a/package.json b/package.json
index a3a26291e2c5b..e9c0665787973 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.4",
+ "version": "20.0.0-next.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+ - Node.js versions 22.0 to 22.10 are also no longer supported.",
"+ `Injector.get`.",
"+| [8b990a31c3](https://github.com/angular/angular/commit/8b990a31c3f9b27e096c4ac63a7fa1873fadbe72) | fix | error if rawText isn't estimated correctly ([#60529](https://github.com/angular/angular/pull/60529)) |",
"+| [a4bad8d361](https://github.com/angular/angular/commit/a4bad8d361e8a65b52df8c3d5436401343abace7) | feat | export signalGetFn from signal primitives ([#60497](https://github.com/angular/angular/pull/60497)) |",
"+| [765ba1e181](https://github.com/angular/angular/commit/765ba1e181442079c25387bb869ed576388e839c) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |",
"+### forms",
"+| [3ff48b6467](https://github.com/angular/angular/commit/3ff48b64670645a70c69706c4b20ee11e8f61306) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |"
] | [
10,
26,
41,
53,
57,
68,
81
] | {
"additions": 92,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60712",
"issue_id": 60712,
"merged_at": "2025-04-02T19:05:23Z",
"omission_probability": 0.1,
"pr_number": 60712,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.5\" with changelog.",
"total_changes": 93
} |
422 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddcb76902bd95..bbc453fc10f88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,51 @@
+<a name="19.2.5"></a>
+# 19.2.5 (2025-04-02)
+###
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e61d06afb5](https://github.com/angular/angular/commit/e61d06afb5f68268b204bb2630930bb213620811) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fa48f98d9f](https://github.com/angular/angular/commit/fa48f98d9f7e7b74deba65bea9bc90843b1c283b) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ca5aa4d55b](https://github.com/angular/angular/commit/ca5aa4d55b352d1ead43d78b6a74d9e3b57f8777) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f4c4b10ea8](https://github.com/angular/angular/commit/f4c4b10ea8dc263c30d1051a83a72486344d81e4) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [22a0e54ac4](https://github.com/angular/angular/commit/22a0e54ac4ae7b943740dc314ff7f26ee7530ee5) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [64da69f7b6](https://github.com/angular/angular/commit/64da69f7b68c906544b3cb76b2fc7ec42cc434a8) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
+| [8f68d1bec3](https://github.com/angular/angular/commit/8f68d1bec320c8af4c28ad6c8dbeda4581e8299b) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
+| [bc79985c65](https://github.com/angular/angular/commit/bc79985c65c38dee17f5cb53f2a14768632f72dc) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [006ac7f22f](https://github.com/angular/angular/commit/006ac7f22f47b110129ca603cfa34f5514d7b4dd) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [da6e93f434](https://github.com/angular/angular/commit/da6e93f4341804cd16327596c30d8f9258b40d7e) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [dbbddd1617](https://github.com/angular/angular/commit/dbbddd161721990f29a037f88f930b333712550e) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0e9e0348dd](https://github.com/angular/angular/commit/0e9e0348dd972c96ecee8bb990aba8c604dc704f) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [15f53f035b](https://github.com/angular/angular/commit/15f53f035ba64fa761db64d48dd9daa1499370e3) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [4b161e6234](https://github.com/angular/angular/commit/4b161e62344a51e87f1b5c5778fd72e56fc37922) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [958e98e4f7](https://github.com/angular/angular/commit/958e98e4f7ab8e708440f03eb68612d1802b9a71) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+### service-worker
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7cd89ad2c6](https://github.com/angular/angular/commit/7cd89ad2c66adeb625f75d23fea32e762162d3d5) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.4"></a>
# 20.0.0-next.4 (2025-03-26)
### common
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddcb76902bd95..bbc453fc10f88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,51 @@
+<a name="19.2.5"></a>
+# 19.2.5 (2025-04-02)
+###
+| [e61d06afb5](https://github.com/angular/angular/commit/e61d06afb5f68268b204bb2630930bb213620811) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+### compiler
+### compiler-cli
+| [f4c4b10ea8](https://github.com/angular/angular/commit/f4c4b10ea8dc263c30d1051a83a72486344d81e4) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [22a0e54ac4](https://github.com/angular/angular/commit/22a0e54ac4ae7b943740dc314ff7f26ee7530ee5) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+### core
+| [64da69f7b6](https://github.com/angular/angular/commit/64da69f7b68c906544b3cb76b2fc7ec42cc434a8) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
+| [8f68d1bec3](https://github.com/angular/angular/commit/8f68d1bec320c8af4c28ad6c8dbeda4581e8299b) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
+| [bc79985c65](https://github.com/angular/angular/commit/bc79985c65c38dee17f5cb53f2a14768632f72dc) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [006ac7f22f](https://github.com/angular/angular/commit/006ac7f22f47b110129ca603cfa34f5514d7b4dd) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [da6e93f434](https://github.com/angular/angular/commit/da6e93f4341804cd16327596c30d8f9258b40d7e) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [dbbddd1617](https://github.com/angular/angular/commit/dbbddd161721990f29a037f88f930b333712550e) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+| [0e9e0348dd](https://github.com/angular/angular/commit/0e9e0348dd972c96ecee8bb990aba8c604dc704f) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+### migrations
+| [15f53f035b](https://github.com/angular/angular/commit/15f53f035ba64fa761db64d48dd9daa1499370e3) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [4b161e6234](https://github.com/angular/angular/commit/4b161e62344a51e87f1b5c5778fd72e56fc37922) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
+### router
+| [958e98e4f7](https://github.com/angular/angular/commit/958e98e4f7ab8e708440f03eb68612d1802b9a71) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+### service-worker
+| [7cd89ad2c6](https://github.com/angular/angular/commit/7cd89ad2c66adeb625f75d23fea32e762162d3d5) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.4"></a>
# 20.0.0-next.4 (2025-03-26)
### common | [
"+| [fa48f98d9f](https://github.com/angular/angular/commit/fa48f98d9f7e7b74deba65bea9bc90843b1c283b) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |",
"+| [ca5aa4d55b](https://github.com/angular/angular/commit/ca5aa4d55b352d1ead43d78b6a74d9e3b57f8777) | fix | throw for invalid \"as\" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |",
"+### language-service"
] | [
14,
18,
33
] | {
"additions": 48,
"author": "thePunderWoman",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60711",
"issue_id": 60711,
"merged_at": "2025-04-02T18:59:49Z",
"omission_probability": 0.1,
"pr_number": 60711,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.5 release",
"total_changes": 48
} |
423 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2df7099583e82..102590c06ec89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,51 @@
+<a name="19.2.5"></a>
+# 19.2.5 (2025-04-02)
+###
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e61d06afb5](https://github.com/angular/angular/commit/e61d06afb5f68268b204bb2630930bb213620811) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fa48f98d9f](https://github.com/angular/angular/commit/fa48f98d9f7e7b74deba65bea9bc90843b1c283b) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ca5aa4d55b](https://github.com/angular/angular/commit/ca5aa4d55b352d1ead43d78b6a74d9e3b57f8777) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f4c4b10ea8](https://github.com/angular/angular/commit/f4c4b10ea8dc263c30d1051a83a72486344d81e4) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [22a0e54ac4](https://github.com/angular/angular/commit/22a0e54ac4ae7b943740dc314ff7f26ee7530ee5) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [64da69f7b6](https://github.com/angular/angular/commit/64da69f7b68c906544b3cb76b2fc7ec42cc434a8) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
+| [8f68d1bec3](https://github.com/angular/angular/commit/8f68d1bec320c8af4c28ad6c8dbeda4581e8299b) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |
+| [bc79985c65](https://github.com/angular/angular/commit/bc79985c65c38dee17f5cb53f2a14768632f72dc) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [006ac7f22f](https://github.com/angular/angular/commit/006ac7f22f47b110129ca603cfa34f5514d7b4dd) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [da6e93f434](https://github.com/angular/angular/commit/da6e93f4341804cd16327596c30d8f9258b40d7e) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [dbbddd1617](https://github.com/angular/angular/commit/dbbddd161721990f29a037f88f930b333712550e) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [0e9e0348dd](https://github.com/angular/angular/commit/0e9e0348dd972c96ecee8bb990aba8c604dc704f) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [15f53f035b](https://github.com/angular/angular/commit/15f53f035ba64fa761db64d48dd9daa1499370e3) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [4b161e6234](https://github.com/angular/angular/commit/4b161e62344a51e87f1b5c5778fd72e56fc37922) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [958e98e4f7](https://github.com/angular/angular/commit/958e98e4f7ab8e708440f03eb68612d1802b9a71) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+### service-worker
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7cd89ad2c6](https://github.com/angular/angular/commit/7cd89ad2c66adeb625f75d23fea32e762162d3d5) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.4"></a>
# 19.2.4 (2025-03-26)
### core
diff --git a/package.json b/package.json
index e879e4eeb338a..c2ab9aba15094 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.4",
+ "version": "19.2.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2df7099583e82..102590c06ec89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,51 @@
+<a name="19.2.5"></a>
+# 19.2.5 (2025-04-02)
+###
+| [e61d06afb5](https://github.com/angular/angular/commit/e61d06afb5f68268b204bb2630930bb213620811) | fix | step 6 tutorial docs ([#60630](https://github.com/angular/angular/pull/60630)) |
+### animations
+| [fa48f98d9f](https://github.com/angular/angular/commit/fa48f98d9f7e7b74deba65bea9bc90843b1c283b) | fix | add missing peer dependency on `@angular/common` ([#60660](https://github.com/angular/angular/pull/60660)) |
+### compiler
+| [ca5aa4d55b](https://github.com/angular/angular/commit/ca5aa4d55b352d1ead43d78b6a74d9e3b57f8777) | fix | throw for invalid "as" expression in if block ([#60580](https://github.com/angular/angular/pull/60580)) |
+### compiler-cli
+| [f4c4b10ea8](https://github.com/angular/angular/commit/f4c4b10ea8dc263c30d1051a83a72486344d81e4) | fix | Produce fatal diagnostic on duplicate decorated properties ([#60376](https://github.com/angular/angular/pull/60376)) |
+| [22a0e54ac4](https://github.com/angular/angular/commit/22a0e54ac4ae7b943740dc314ff7f26ee7530ee5) | fix | support relative imports to symbols outside `rootDir` ([#60555](https://github.com/angular/angular/pull/60555)) |
+### core
+| [64da69f7b6](https://github.com/angular/angular/commit/64da69f7b68c906544b3cb76b2fc7ec42cc434a8) | fix | check ngDevMode for undefined ([#60565](https://github.com/angular/angular/pull/60565)) |
+| [bc79985c65](https://github.com/angular/angular/commit/bc79985c65c38dee17f5cb53f2a14768632f72dc) | fix | fix regexp for event types ([#60592](https://github.com/angular/angular/pull/60592)) |
+| [006ac7f22f](https://github.com/angular/angular/commit/006ac7f22f47b110129ca603cfa34f5514d7b4dd) | fix | fixes [#592882](https://github.com/angular/angular/pull/592882) ng generate @angular/core:signal-queries-migration ([#60688](https://github.com/angular/angular/pull/60688)) |
+| [da6e93f434](https://github.com/angular/angular/commit/da6e93f4341804cd16327596c30d8f9258b40d7e) | fix | preserve comments in internal inject migration ([#60588](https://github.com/angular/angular/pull/60588)) |
+| [dbbddd1617](https://github.com/angular/angular/commit/dbbddd161721990f29a037f88f930b333712550e) | fix | prevent omission of deferred pipes in full compilation ([#60571](https://github.com/angular/angular/pull/60571)) |
+### language-service
+| [0e9e0348dd](https://github.com/angular/angular/commit/0e9e0348dd972c96ecee8bb990aba8c604dc704f) | fix | Update adapter to log instead of throw errors ([#60651](https://github.com/angular/angular/pull/60651)) |
+| [15f53f035b](https://github.com/angular/angular/commit/15f53f035ba64fa761db64d48dd9daa1499370e3) | fix | handle shorthand assignments in super call ([#60602](https://github.com/angular/angular/pull/60602)) |
+| [4b161e6234](https://github.com/angular/angular/commit/4b161e62344a51e87f1b5c5778fd72e56fc37922) | fix | inject migration not handling super parameter referenced via this ([#60602](https://github.com/angular/angular/pull/60602)) |
+### router
+| [958e98e4f7](https://github.com/angular/angular/commit/958e98e4f7ab8e708440f03eb68612d1802b9a71) | fix | Add missing types to transition ([#60307](https://github.com/angular/angular/pull/60307)) |
+### service-worker
+| [7cd89ad2c6](https://github.com/angular/angular/commit/7cd89ad2c66adeb625f75d23fea32e762162d3d5) | fix | assign initializing client's app version, when a request is for worker script ([#58131](https://github.com/angular/angular/pull/58131)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.4"></a>
# 19.2.4 (2025-03-26)
### core
diff --git a/package.json b/package.json
index e879e4eeb338a..c2ab9aba15094 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.4",
+ "version": "19.2.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [8f68d1bec3](https://github.com/angular/angular/commit/8f68d1bec320c8af4c28ad6c8dbeda4581e8299b) | fix | fix ng generate @angular/core:output-migration ([#60626](https://github.com/angular/angular/pull/60626)) |",
"+### migrations"
] | [
28,
37
] | {
"additions": 49,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60710",
"issue_id": 60710,
"merged_at": "2025-04-02T18:53:11Z",
"omission_probability": 0.1,
"pr_number": 60710,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.5\" with changelog.",
"total_changes": 50
} |
424 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46202cdbde119..2df7099583e82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.4"></a>
+# 19.2.4 (2025-03-26)
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [081f5f5a83f](https://github.com/angular/angular/commit/081f5f5a83fef99718952519bed9fe39005d6d37) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+### localize
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a2f622d82d6](https://github.com/angular/angular/commit/a2f622d82d6c0f93a5fdf34fc8e5829db04c7380) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8e8ccc79279](https://github.com/angular/angular/commit/8e8ccc792790c876cf5831f3d7a504290c665a1b) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.3"></a>
# 19.2.3 (2025-03-19)
### compiler-cli
diff --git a/package.json b/package.json
index 86674ed5757a7..015b7c832c776 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.3",
+ "version": "19.2.4",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46202cdbde119..2df7099583e82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.4"></a>
+# 19.2.4 (2025-03-26)
+### core
+| [081f5f5a83f](https://github.com/angular/angular/commit/081f5f5a83fef99718952519bed9fe39005d6d37) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+### localize
+| [a2f622d82d6](https://github.com/angular/angular/commit/a2f622d82d6c0f93a5fdf34fc8e5829db04c7380) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| [8e8ccc79279](https://github.com/angular/angular/commit/8e8ccc792790c876cf5831f3d7a504290c665a1b) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.3"></a>
# 19.2.3 (2025-03-19)
### compiler-cli
diff --git a/package.json b/package.json
index 86674ed5757a7..015b7c832c776 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.3",
+ "version": "19.2.4",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 18,
"author": "alxhub",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60575",
"issue_id": 60575,
"merged_at": "2025-03-27T03:26:39Z",
"omission_probability": 0.1,
"pr_number": 60575,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.4\" with changelog.",
"total_changes": 19
} |
425 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9e2aa7d8a2cb..9d4ecc13f89fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,38 @@
+<a name="20.0.0-next.0"></a>
+# 20.0.0-next.0 (2025-02-26)
+## Breaking Changes
+### common
+- Using the `Y` formatter (week-numbering year) without also including `w` (week number) is now detected as suspicious date pattern, as `y` is typically intended.
+### compiler
+- `void` in an expression now refers to the operator
+
+ Previously an expression in the template like `{{void}}` referred to a
+ property on the component class. After this change it now refers to the
+ `void` operator, which would make the above example invalid. If you have
+ existing expressions that need to refer to a property named `void`,
+ change the expression to use `this.void` instead: `{{this.void}}`.
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [74cceba587](https://github.com/angular/angular/commit/74cceba5871e83e77a23536d8b64ff8888862dd3) | feat | throw error for suspicious date patterns ([#59798](https://github.com/angular/angular/pull/59798)) |
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f2d5cf7edd](https://github.com/angular/angular/commit/f2d5cf7eddb1ca2d946076d7622778fb12273d31) | feat | support exponentiation operator in templates ([#59894](https://github.com/angular/angular/pull/59894)) |
+| [0361c2d81f](https://github.com/angular/angular/commit/0361c2d81f5d2c56597002f465c00e9b1c4003e4) | feat | support void operator in templates ([#59894](https://github.com/angular/angular/pull/59894)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [962b59b14e](https://github.com/angular/angular/commit/962b59b14e9dad166973be72d74d1e04d25db5a4) | fix | Ensure ComponentFixture does not duplicate error reporting from FakeAsync ([#60104](https://github.com/angular/angular/pull/60104)) |
+| [491b0a4ead](https://github.com/angular/angular/commit/491b0a4ead98822c767543e1f1c8046ed9d1be20) | fix | Remove duplicate reporting of errors in `CDR.detectChanges` ([#60056](https://github.com/angular/angular/pull/60056)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7c12cb1df9](https://github.com/angular/angular/commit/7c12cb1df980734c64a4d127c2b9a7094e0fe9fb) | feat | Allow resolvers to read resolved data from ancestors ([#59860](https://github.com/angular/angular/pull/59860)) |
+| [db2f2d99c8](https://github.com/angular/angular/commit/db2f2d99c82aae52d8a0ae46616c6411d070b35e) | fix | Scroller should scroll as soon as change detection completes ([#60086](https://github.com/angular/angular/pull/60086)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.0"></a>
# 19.2.0 (2025-02-26)
### common
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9e2aa7d8a2cb..9d4ecc13f89fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,38 @@
+<a name="20.0.0-next.0"></a>
+# 20.0.0-next.0 (2025-02-26)
+## Breaking Changes
+- Using the `Y` formatter (week-numbering year) without also including `w` (week number) is now detected as suspicious date pattern, as `y` is typically intended.
+- `void` in an expression now refers to the operator
+ Previously an expression in the template like `{{void}}` referred to a
+ `void` operator, which would make the above example invalid. If you have
+ existing expressions that need to refer to a property named `void`,
+ change the expression to use `this.void` instead: `{{this.void}}`.
+| [74cceba587](https://github.com/angular/angular/commit/74cceba5871e83e77a23536d8b64ff8888862dd3) | feat | throw error for suspicious date patterns ([#59798](https://github.com/angular/angular/pull/59798)) |
+| [f2d5cf7edd](https://github.com/angular/angular/commit/f2d5cf7eddb1ca2d946076d7622778fb12273d31) | feat | support exponentiation operator in templates ([#59894](https://github.com/angular/angular/pull/59894)) |
+| [0361c2d81f](https://github.com/angular/angular/commit/0361c2d81f5d2c56597002f465c00e9b1c4003e4) | feat | support void operator in templates ([#59894](https://github.com/angular/angular/pull/59894)) |
+### core
+| [962b59b14e](https://github.com/angular/angular/commit/962b59b14e9dad166973be72d74d1e04d25db5a4) | fix | Ensure ComponentFixture does not duplicate error reporting from FakeAsync ([#60104](https://github.com/angular/angular/pull/60104)) |
+### router
+| [7c12cb1df9](https://github.com/angular/angular/commit/7c12cb1df980734c64a4d127c2b9a7094e0fe9fb) | feat | Allow resolvers to read resolved data from ancestors ([#59860](https://github.com/angular/angular/pull/59860)) |
+| [db2f2d99c8](https://github.com/angular/angular/commit/db2f2d99c82aae52d8a0ae46616c6411d070b35e) | fix | Scroller should scroll as soon as change detection completes ([#60086](https://github.com/angular/angular/pull/60086)) |
<a name="19.2.0"></a>
# 19.2.0 (2025-02-26)
### common | [
"+ ",
"+ property on the component class. After this change it now refers to the",
"+| [491b0a4ead](https://github.com/angular/angular/commit/491b0a4ead98822c767543e1f1c8046ed9d1be20) | fix | Remove duplicate reporting of errors in `CDR.detectChanges` ([#60056](https://github.com/angular/angular/pull/60056)) |",
"+<!-- CHANGELOG SPLIT MARKER -->"
] | [
12,
14,
31,
38
] | {
"additions": 35,
"author": "kirjs",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60131",
"issue_id": 60131,
"merged_at": "2025-02-26T21:52:40Z",
"omission_probability": 0.1,
"pr_number": 60131,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.0\" with changelog.",
"total_changes": 35
} |
426 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1670eb9eb86e7..e9e2aa7d8a2cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,92 +1,86 @@
-<a name="19.1.8"></a>
-# 19.1.8 (2025-02-26)
-### benchpress
-| Commit | Type | Description |
-| -- | -- | -- |
-| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
-### common
-| Commit | Type | Description |
-| -- | -- | -- |
-| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
-### language-service
-| Commit | Type | Description |
-| -- | -- | -- |
-| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
-<a name="19.2.0-rc.0"></a>
-# 19.2.0-rc.0 (2025-02-19)
+<a name="19.2.0"></a>
+# 19.2.0 (2025-02-26)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
-| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
-| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+| [168516462a](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
+| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
+| [146ab9a76e](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
+| [6c92d65349](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [96e602ebe9](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [127fc0dc84](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [b592b1b051](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e91](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
-| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [fa0c3e3210](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e6cb411e43](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
+### platform-server
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fc5d187da5](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.1.7"></a>
-# 19.1.7 (2025-02-19)
+<a name="19.1.8"></a>
+# 19.1.8 (2025-02-26)
+### benchpress
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
### common
| Commit | Type | Description |
| -- | -- | -- |
-| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
-### compiler-cli
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
| Commit | Type | Description |
| -- | -- | -- |
-| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
-### forms
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+### language-service
| Commit | Type | Description |
| -- | -- | -- |
-| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.3"></a>
-# 19.2.0-next.3 (2025-02-13)
-### compiler
+<a name="19.1.7"></a>
+# 19.1.7 (2025-02-19)
+### common
| Commit | Type | Description |
| -- | -- | -- |
-| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
-| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
-### migrations
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### forms
| Commit | Type | Description |
| -- | -- | -- |
-| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
-| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
<!-- CHANGELOG SPLIT MARKER -->
@@ -112,27 +106,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.2"></a>
-# 19.2.0-next.2 (2025-02-06)
-### compiler-cli
-| Commit | Type | Description |
-| -- | -- | -- |
-| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
-| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
-| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
-### forms
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
@@ -144,45 +117,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.1"></a>
-# 19.2.0-next.1 (2025-01-29)
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [168516462a9](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
-| [6c92d653493](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [96e602ebe9c](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
-| [cf9054248d1](https://github.com/angular/angular/commit/cf9054248d1b8b5658c5f8b582cea71535f081c2) | fix | check whether application is destroyed before printing hydration stats ([#59716](https://github.com/angular/angular/pull/59716)) |
-| [82876242e55](https://github.com/angular/angular/commit/82876242e557abbced793cff06c4d68c4721e6d2) | fix | ensure type is preserved during HMR ([#59700](https://github.com/angular/angular/pull/59700)) |
-| [127fc0dc847](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [f862ace1819](https://github.com/angular/angular/commit/f862ace18191d7fda3b12fc3c6486c035a6b431d) | fix | fixes test timer-based test flakiness in CI ([#59674](https://github.com/angular/angular/pull/59674)) |
-### elements
-| Commit | Type | Description |
-| -- | -- | -- |
-| [0c1ecb453c8](https://github.com/angular/angular/commit/0c1ecb453c8b01447fb5a9f38fdfe9936a60abe5) | fix | not setting initial value on signal-based input ([#59773](https://github.com/angular/angular/pull/59773)) |
-### platform-browser
-| Commit | Type | Description |
-| -- | -- | -- |
-| [e6cb411e439](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
-| [6b09716754b](https://github.com/angular/angular/commit/6b09716754b979c98489a2710eda977e51fe92d0) | fix | prepend `baseHref` to `sourceMappingURL` in CSS content ([#59730](https://github.com/angular/angular/pull/59730)) |
-| [fd7ee47bf70](https://github.com/angular/angular/commit/fd7ee47bf702029e481ad40362684f0a01ef2ec0) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [65cf061feb4](https://github.com/angular/angular/commit/65cf061feb402e1532cd06d0fda5d2b7749ac421) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [af9d74710c4](https://github.com/angular/angular/commit/af9d74710c460b0aaeaf3226533e9e544025523c) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-### platform-server
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fc5d187da5e](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
-### router
-| Commit | Type | Description |
-| -- | -- | -- |
-| [c7b6e1107c6](https://github.com/angular/angular/commit/c7b6e1107c6fcc7ed1dbb7c7b8698b09bfa8f1cc) | fix | prevent error handling when injector is destroyed ([#59457](https://github.com/angular/angular/pull/59457)) |
-### service-worker
-| Commit | Type | Description |
-| -- | -- | -- |
-| [e2987a1d4ab](https://github.com/angular/angular/commit/e2987a1d4ab09b1abf1f42597c40f2055db116e1) | fix | add missing `rxjs` peer dependency ([#59747](https://github.com/angular/angular/pull/59747)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
### core
@@ -213,23 +147,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.0"></a>
-# 19.2.0-next.0 (2025-01-22)
-### compiler
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-### compiler-cli
-| Commit | Type | Description |
-| -- | -- | -- |
-| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.3"></a>
# 19.1.3 (2025-01-22)
### compiler
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1670eb9eb86e7..e9e2aa7d8a2cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,92 +1,86 @@
-<a name="19.1.8"></a>
-# 19.1.8 (2025-02-26)
-### benchpress
-| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
-### common
-| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
-| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
-### language-service
-| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
-<a name="19.2.0-rc.0"></a>
-# 19.2.0-rc.0 (2025-02-19)
+<a name="19.2.0"></a>
| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
-| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+| [168516462a](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
+| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
+| [146ab9a76e](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
+| [6c92d65349](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [96e602ebe9](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [b592b1b051](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e91](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
-| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [fa0c3e3210](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
### migrations
| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+### platform-browser
+| [e6cb411e43](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
+### platform-server
+| [fc5d187da5](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
-<a name="19.1.7"></a>
-# 19.1.7 (2025-02-19)
+<a name="19.1.8"></a>
+# 19.1.8 (2025-02-26)
+### benchpress
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
-| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
-| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+### language-service
-| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
-<a name="19.2.0-next.3"></a>
-# 19.2.0-next.3 (2025-02-13)
+<a name="19.1.7"></a>
+# 19.1.7 (2025-02-19)
-| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+| [e9f10eb4c9](https://github.com/angular/angular/commit/e9f10eb4c950692992098619b9628ecefd1b36ce) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
-| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
-| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
-### migrations
+| [16fc074689](https://github.com/angular/angular/commit/16fc074689d31ef6886c49525b020bc6c1529d0e) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+### forms
-| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
-| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [ec1e4c3d94](https://github.com/angular/angular/commit/ec1e4c3d9430f5ea4380252098d2b4b71d8a950f) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
@@ -112,27 +106,6 @@
-<a name="19.2.0-next.2"></a>
-# 19.2.0-next.2 (2025-02-06)
-| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
-| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
-| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
@@ -144,45 +117,6 @@
-<a name="19.2.0-next.1"></a>
-# 19.2.0-next.1 (2025-01-29)
-| [168516462a9](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
-| [6c92d653493](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [96e602ebe9c](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
-| [cf9054248d1](https://github.com/angular/angular/commit/cf9054248d1b8b5658c5f8b582cea71535f081c2) | fix | check whether application is destroyed before printing hydration stats ([#59716](https://github.com/angular/angular/pull/59716)) |
-| [82876242e55](https://github.com/angular/angular/commit/82876242e557abbced793cff06c4d68c4721e6d2) | fix | ensure type is preserved during HMR ([#59700](https://github.com/angular/angular/pull/59700)) |
-| [127fc0dc847](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [f862ace1819](https://github.com/angular/angular/commit/f862ace18191d7fda3b12fc3c6486c035a6b431d) | fix | fixes test timer-based test flakiness in CI ([#59674](https://github.com/angular/angular/pull/59674)) |
-### elements
-| [0c1ecb453c8](https://github.com/angular/angular/commit/0c1ecb453c8b01447fb5a9f38fdfe9936a60abe5) | fix | not setting initial value on signal-based input ([#59773](https://github.com/angular/angular/pull/59773)) |
-### platform-browser
-| [e6cb411e439](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
-| [6b09716754b](https://github.com/angular/angular/commit/6b09716754b979c98489a2710eda977e51fe92d0) | fix | prepend `baseHref` to `sourceMappingURL` in CSS content ([#59730](https://github.com/angular/angular/pull/59730)) |
-| [fd7ee47bf70](https://github.com/angular/angular/commit/fd7ee47bf702029e481ad40362684f0a01ef2ec0) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [af9d74710c4](https://github.com/angular/angular/commit/af9d74710c460b0aaeaf3226533e9e544025523c) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-### platform-server
-| [fc5d187da5e](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
-### router
-| [c7b6e1107c6](https://github.com/angular/angular/commit/c7b6e1107c6fcc7ed1dbb7c7b8698b09bfa8f1cc) | fix | prevent error handling when injector is destroyed ([#59457](https://github.com/angular/angular/pull/59457)) |
-### service-worker
-| [e2987a1d4ab](https://github.com/angular/angular/commit/e2987a1d4ab09b1abf1f42597c40f2055db116e1) | fix | add missing `rxjs` peer dependency ([#59747](https://github.com/angular/angular/pull/59747)) |
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
@@ -213,23 +147,6 @@
-<a name="19.2.0-next.0"></a>
-| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
-| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
<a name="19.1.3"></a>
# 19.1.3 (2025-01-22) | [
"+# 19.2.0 (2025-02-26)",
"+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |",
"+| [127fc0dc84](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |",
"+### common",
"-| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |",
"-| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |",
"-| [65cf061feb4](https://github.com/angular/angular/commit/65cf061feb402e1532cd06d0fda5d2b7749ac421) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |",
"-# 19.2.0-next.0 (2025-01-22)"
] | [
29,
55,
56,
112,
125,
159,
192,
217
] | {
"additions": 41,
"author": "kirjs",
"deletions": 124,
"html_url": "https://github.com/angular/angular/pull/60129",
"issue_id": 60129,
"merged_at": "2025-02-26T21:12:59Z",
"omission_probability": 0.1,
"pr_number": 60129,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.0 release",
"total_changes": 165
} |
427 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27dfb99600857..e61857ec052bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,30 +1,48 @@
-<a name="19.2.0-rc.0"></a>
-# 19.2.0-rc.0 (2025-02-19)
+<a name="19.2.0"></a>
+# 19.2.0 (2025-02-26)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
-| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
-| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+| [168516462a](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
+| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
+| [146ab9a76e](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
+| [6c92d65349](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [96e602ebe9](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [127fc0dc84](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [b592b1b051](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e91](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
-| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [fa0c3e3210](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e6cb411e43](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
+### platform-server
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fc5d187da5](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
<!-- CHANGELOG SPLIT MARKER -->
@@ -45,30 +63,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.3"></a>
-# 19.2.0-next.3 (2025-02-13)
-### compiler
-| Commit | Type | Description |
-| -- | -- | -- |
-| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
-### compiler-cli
-| Commit | Type | Description |
-| -- | -- | -- |
-| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
-### migrations
-| Commit | Type | Description |
-| -- | -- | -- |
-| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
-| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
### compiler
@@ -91,27 +85,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.2"></a>
-# 19.2.0-next.2 (2025-02-06)
-### compiler-cli
-| Commit | Type | Description |
-| -- | -- | -- |
-| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
-| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
-| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
-### forms
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
@@ -123,45 +96,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.1"></a>
-# 19.2.0-next.1 (2025-01-29)
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [168516462a9](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
-| [6c92d653493](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [96e602ebe9c](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
-| [cf9054248d1](https://github.com/angular/angular/commit/cf9054248d1b8b5658c5f8b582cea71535f081c2) | fix | check whether application is destroyed before printing hydration stats ([#59716](https://github.com/angular/angular/pull/59716)) |
-| [82876242e55](https://github.com/angular/angular/commit/82876242e557abbced793cff06c4d68c4721e6d2) | fix | ensure type is preserved during HMR ([#59700](https://github.com/angular/angular/pull/59700)) |
-| [127fc0dc847](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [f862ace1819](https://github.com/angular/angular/commit/f862ace18191d7fda3b12fc3c6486c035a6b431d) | fix | fixes test timer-based test flakiness in CI ([#59674](https://github.com/angular/angular/pull/59674)) |
-### elements
-| Commit | Type | Description |
-| -- | -- | -- |
-| [0c1ecb453c8](https://github.com/angular/angular/commit/0c1ecb453c8b01447fb5a9f38fdfe9936a60abe5) | fix | not setting initial value on signal-based input ([#59773](https://github.com/angular/angular/pull/59773)) |
-### platform-browser
-| Commit | Type | Description |
-| -- | -- | -- |
-| [e6cb411e439](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
-| [6b09716754b](https://github.com/angular/angular/commit/6b09716754b979c98489a2710eda977e51fe92d0) | fix | prepend `baseHref` to `sourceMappingURL` in CSS content ([#59730](https://github.com/angular/angular/pull/59730)) |
-| [fd7ee47bf70](https://github.com/angular/angular/commit/fd7ee47bf702029e481ad40362684f0a01ef2ec0) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [65cf061feb4](https://github.com/angular/angular/commit/65cf061feb402e1532cd06d0fda5d2b7749ac421) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [af9d74710c4](https://github.com/angular/angular/commit/af9d74710c460b0aaeaf3226533e9e544025523c) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-### platform-server
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fc5d187da5e](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
-### router
-| Commit | Type | Description |
-| -- | -- | -- |
-| [c7b6e1107c6](https://github.com/angular/angular/commit/c7b6e1107c6fcc7ed1dbb7c7b8698b09bfa8f1cc) | fix | prevent error handling when injector is destroyed ([#59457](https://github.com/angular/angular/pull/59457)) |
-### service-worker
-| Commit | Type | Description |
-| -- | -- | -- |
-| [e2987a1d4ab](https://github.com/angular/angular/commit/e2987a1d4ab09b1abf1f42597c40f2055db116e1) | fix | add missing `rxjs` peer dependency ([#59747](https://github.com/angular/angular/pull/59747)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
### core
@@ -192,23 +126,6 @@
<!-- CHANGELOG SPLIT MARKER -->
-<a name="19.2.0-next.0"></a>
-# 19.2.0-next.0 (2025-01-22)
-### compiler
-| Commit | Type | Description |
-| -- | -- | -- |
-| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-### compiler-cli
-| Commit | Type | Description |
-| -- | -- | -- |
-| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
-### core
-| Commit | Type | Description |
-| -- | -- | -- |
-| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
-
-<!-- CHANGELOG SPLIT MARKER -->
-
<a name="19.1.3"></a>
# 19.1.3 (2025-01-22)
### compiler
diff --git a/package.json b/package.json
index ef5e804d9632f..2a640fe34b925 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-rc.0",
+ "version": "19.2.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27dfb99600857..e61857ec052bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,30 +1,48 @@
-<a name="19.2.0-rc.0"></a>
-# 19.2.0-rc.0 (2025-02-19)
+<a name="19.2.0"></a>
+# 19.2.0 (2025-02-26)
### common
| [3e39da593a](https://github.com/angular/angular/commit/3e39da593a0a0c047a2a03b8d5fcabf9dbace40f) | feat | introduce experimental `httpResource` ([#59876](https://github.com/angular/angular/pull/59876)) |
-| [7bd4be0fa5](https://github.com/angular/angular/commit/7bd4be0fa585fda8a09d27683ade77b383500768) | fix | clean up `urlChanges` subscribers when root scope is destroyed ([#59703](https://github.com/angular/angular/pull/59703)) |
| [5b20bab96d](https://github.com/angular/angular/commit/5b20bab96d20fe89b5cc4b4af28edbaae2604da1) | feat | Add Skip Hydration diagnostic. ([#59576](https://github.com/angular/angular/pull/59576)) |
+| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-| [973033abd2](https://github.com/angular/angular/commit/973033abd2d9580cec79948c9c38f977fef2de87) | fix | avoid crash in isolated transform operations ([#59869](https://github.com/angular/angular/pull/59869)) |
+| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
| [2588985f43](https://github.com/angular/angular/commit/2588985f433b20a6a5a8d239347291f5d6fb2451) | feat | pass signal node to throwInvalidWriteToSignalErrorFn ([#59600](https://github.com/angular/angular/pull/59600)) |
+| [168516462a](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
+| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |
+| [96e602ebe9](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
+| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
+| [127fc0dc84](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
+| [b592b1b051](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e91](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
### forms
-| [cf36951f83](https://github.com/angular/angular/commit/cf36951f8327d461a3ad4bf65d12bb16cf9a9e4b) | fix | Fix typing on `FormRecord`. ([#59993](https://github.com/angular/angular/pull/59993)) |
+| [fa0c3e3210](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
### migrations
| [1cd3a7db83](https://github.com/angular/angular/commit/1cd3a7db83e1d05a31d23324676420b614cdabe2) | feat | add migration to convert templates to use self-closing tags ([#57342](https://github.com/angular/angular/pull/57342)) |
+| [e6cb411e43](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
+### platform-server
+| [fc5d187da5](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |
@@ -45,30 +63,6 @@
-<a name="19.2.0-next.3"></a>
-# 19.2.0-next.3 (2025-02-13)
-| [9e847fc60d](https://github.com/angular/angular/commit/9e847fc60d4eef47e665e789ccd2d4f0b4bb94ea) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
-| [5cd26a9420](https://github.com/angular/angular/commit/5cd26a94206dfe8aabdf0dd15bfc09e7a8c606da) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
-| [6789c7ef94](https://github.com/angular/angular/commit/6789c7ef947952551d7598fe37a3d86093b75720) | fix | Defer afterRender until after first CD ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [c87e581dd9](https://github.com/angular/angular/commit/c87e581dd9e240c88cea50f222942873bdccd01d) | fix | Don't run effects in check no changes pass ([#59455](https://github.com/angular/angular/pull/59455)) ([#59551](https://github.com/angular/angular/pull/59551)) |
-| [b0266bda4a](https://github.com/angular/angular/commit/b0266bda4ad4efd19710fd0363a50984f48269dc) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
-### migrations
-| [aa285c548c](https://github.com/angular/angular/commit/aa285c548c164917ebb5760802484843c6830daf) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
-| [1119f85ca9](https://github.com/angular/angular/commit/1119f85ca935f43641f53ee8bc50efa47ad09717) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
<a name="19.1.6"></a>
# 19.1.6 (2025-02-12)
@@ -91,27 +85,6 @@
-<a name="19.2.0-next.2"></a>
-# 19.2.0-next.2 (2025-02-06)
-| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
-| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
-| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
-| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
-### forms
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
@@ -123,45 +96,6 @@
-# 19.2.0-next.1 (2025-01-29)
-| [168516462a9](https://github.com/angular/angular/commit/168516462a9673b158fcaa38b8ce17bf684a8ac9) | feat | support default value in `resource()` ([#59655](https://github.com/angular/angular/pull/59655)) |
-| [6c92d653493](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [96e602ebe9c](https://github.com/angular/angular/commit/96e602ebe9cdf7355befad22c11f9f91e0436e01) | fix | cancel in-progress request when same value is assigned ([#59280](https://github.com/angular/angular/pull/59280)) |
-| [cf9054248d1](https://github.com/angular/angular/commit/cf9054248d1b8b5658c5f8b582cea71535f081c2) | fix | check whether application is destroyed before printing hydration stats ([#59716](https://github.com/angular/angular/pull/59716)) |
-| [82876242e55](https://github.com/angular/angular/commit/82876242e557abbced793cff06c4d68c4721e6d2) | fix | ensure type is preserved during HMR ([#59700](https://github.com/angular/angular/pull/59700)) |
-| [127fc0dc847](https://github.com/angular/angular/commit/127fc0dc847a4e8b62be36cdd980a067c4da974f) | fix | fix `resource()`'s `previous.state` ([#59708](https://github.com/angular/angular/pull/59708)) |
-| [f862ace1819](https://github.com/angular/angular/commit/f862ace18191d7fda3b12fc3c6486c035a6b431d) | fix | fixes test timer-based test flakiness in CI ([#59674](https://github.com/angular/angular/pull/59674)) |
-### elements
-| [0c1ecb453c8](https://github.com/angular/angular/commit/0c1ecb453c8b01447fb5a9f38fdfe9936a60abe5) | fix | not setting initial value on signal-based input ([#59773](https://github.com/angular/angular/pull/59773)) |
-### platform-browser
-| [e6cb411e439](https://github.com/angular/angular/commit/e6cb411e4393a4b1f5852d3d7c5b9622504399b1) | fix | automatically disable animations on the server ([#59762](https://github.com/angular/angular/pull/59762)) |
-| [6b09716754b](https://github.com/angular/angular/commit/6b09716754b979c98489a2710eda977e51fe92d0) | fix | prepend `baseHref` to `sourceMappingURL` in CSS content ([#59730](https://github.com/angular/angular/pull/59730)) |
-| [fd7ee47bf70](https://github.com/angular/angular/commit/fd7ee47bf702029e481ad40362684f0a01ef2ec0) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [65cf061feb4](https://github.com/angular/angular/commit/65cf061feb402e1532cd06d0fda5d2b7749ac421) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-| [af9d74710c4](https://github.com/angular/angular/commit/af9d74710c460b0aaeaf3226533e9e544025523c) | fix | Update pseudoevent created by createMouseSpecialEvent to populate `_originalEvent` property ([#59690](https://github.com/angular/angular/pull/59690)) |
-### platform-server
-### router
-### service-worker
-| [e2987a1d4ab](https://github.com/angular/angular/commit/e2987a1d4ab09b1abf1f42597c40f2055db116e1) | fix | add missing `rxjs` peer dependency ([#59747](https://github.com/angular/angular/pull/59747)) |
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
@@ -192,23 +126,6 @@
-<a name="19.2.0-next.0"></a>
-# 19.2.0-next.0 (2025-01-22)
-| [fe8a68329b](https://github.com/angular/angular/commit/fe8a68329b50363f914a728579392f3fc68670a6) | feat | support untagged template literals in expressions ([#59230](https://github.com/angular/angular/pull/59230)) |
-| [ed705a856a](https://github.com/angular/angular/commit/ed705a856a164f91d33e2173b4f371329d07c472) | feat | detect missing structural directive imports ([#59443](https://github.com/angular/angular/pull/59443)) |
<a name="19.1.3"></a>
# 19.1.3 (2025-01-22)
diff --git a/package.json b/package.json
index ef5e804d9632f..2a640fe34b925 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-rc.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [146ab9a76e](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |",
"+| [6c92d65349](https://github.com/angular/angular/commit/6c92d653493404a5f13aa59cde390bcbed973fb6) | fix | add `hasValue` narrowing to `ResourceRef` ([#59708](https://github.com/angular/angular/pull/59708)) |",
"+### platform-browser",
"-| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |",
"-<a name=\"19.2.0-next.1\"></a>",
"-| [fc5d187da5e](https://github.com/angular/angular/commit/fc5d187da5e8895d60caa35b7b59e234998eddf0) | fix | decouple server from animations module ([#59762](https://github.com/angular/angular/pull/59762)) |",
"-| [c7b6e1107c6](https://github.com/angular/angular/commit/c7b6e1107c6fcc7ed1dbb7c7b8698b09bfa8f1cc) | fix | prevent error handling when injector is destroyed ([#59457](https://github.com/angular/angular/pull/59457)) |",
"-| [bc2ad7bfd3](https://github.com/angular/angular/commit/bc2ad7bfd37a61992b550943de5da0eab2eec98b) | feat | support streaming resources ([#59573](https://github.com/angular/angular/pull/59573)) |",
"+ \"version\": \"19.2.0\","
] | [
30,
31,
47,
110,
121,
148,
152,
180,
195
] | {
"additions": 24,
"author": "kirjs",
"deletions": 107,
"html_url": "https://github.com/angular/angular/pull/60128",
"issue_id": 60128,
"merged_at": "2025-02-26T21:10:05Z",
"omission_probability": 0.1,
"pr_number": 60128,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.0\" with changelog.",
"total_changes": 131
} |
428 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27dfb99600857..1670eb9eb86e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.1.8"></a>
+# 19.1.8 (2025-02-26)
+### benchpress
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.0-rc.0"></a>
# 19.2.0-rc.0 (2025-02-19)
### common
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27dfb99600857..1670eb9eb86e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.1.8"></a>
+# 19.1.8 (2025-02-26)
+### benchpress
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
+### common
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+### language-service
+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-rc.0"></a>
# 19.2.0-rc.0 (2025-02-19)
### common | [] | [] | {
"additions": 21,
"author": "kirjs",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60125",
"issue_id": 60125,
"merged_at": "2025-02-26T19:13:03Z",
"omission_probability": 0.1,
"pr_number": 60125,
"repo": "angular/angular",
"title": "docs: release notes for the v19.1.8 release",
"total_changes": 21
} |
429 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d710ef4bc6f1..a49d881789537 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.1.8"></a>
+# 19.1.8 (2025-02-26)
+### benchpress
+| Commit | Type | Description |
+| -- | -- | -- |
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 6bc89d39a5573..2291d7a64c4d8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.7",
+ "version": "19.1.8",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d710ef4bc6f1..a49d881789537 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.1.8"></a>
+### benchpress
+| [f0990c67e6](https://github.com/angular/angular/commit/f0990c67e660c61109fa910885da6aa4beaf576a) | fix | Ensure future-proof correct initialization order ([#60025](https://github.com/angular/angular/pull/60025)) |
+### common
+| [1fbaeab37d](https://github.com/angular/angular/commit/1fbaeab37d5c65436938b6e14e21bc4d57bb517b) | fix | make types for HttpClient more readable ([#59901](https://github.com/angular/angular/pull/59901)) |
+### core
+| [c611c8d212](https://github.com/angular/angular/commit/c611c8d212b0134365954726c2fd6c98c28e5424) | fix | capture stack for HMR errors ([#60067](https://github.com/angular/angular/pull/60067)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.7"></a>
# 19.1.7 (2025-02-19)
### common
diff --git a/package.json b/package.json
index 6bc89d39a5573..2291d7a64c4d8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.7",
+ "version": "19.1.8",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+# 19.1.8 (2025-02-26)",
"+### language-service",
"+| [4c9d09c643](https://github.com/angular/angular/commit/4c9d09c643cf1232d1f502ff7d6bd25709ba1c6a) | fix | provide correct rename info for elements ([#60088](https://github.com/angular/angular/pull/60088)) |"
] | [
6,
19,
22
] | {
"additions": 22,
"author": "kirjs",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60123",
"issue_id": 60123,
"merged_at": "2025-02-26T19:11:04Z",
"omission_probability": 0.1,
"pr_number": 60123,
"repo": "angular/angular",
"title": "Bump version to \"v19.1.8\" with changelog.",
"total_changes": 23
} |
430 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 31d117e101f00..ddcb76902bd95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,29 @@
+<a name="20.0.0-next.4"></a>
+# 20.0.0-next.4 (2025-03-26)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [785a1110e60](https://github.com/angular/angular/commit/785a1110e603a3573261528f2fda28718f548b4a) | fix | resolve host binding type issues ([#60481](https://github.com/angular/angular/pull/60481)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cf5c61c8490](https://github.com/angular/angular/commit/cf5c61c8490cdb9a7633905eb5ab55ca76d72e77) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+| [13d1c8ab387](https://github.com/angular/angular/commit/13d1c8ab38707b06dbed4941a556f982665b3304) | fix | fixes timing of hydration cleanup on control flow ([#60425](https://github.com/angular/angular/pull/60425)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [bdd5e204233](https://github.com/angular/angular/commit/bdd5e204233eeb79e04a782a51c08429991eb03e) | fix | resolve host binding type issues ([#60481](https://github.com/angular/angular/pull/60481)) |
+### localize
+| Commit | Type | Description |
+| -- | -- | -- |
+| [7408a1f58b3](https://github.com/angular/angular/commit/7408a1f58b3d0b4c535217875412573fb4f34bdd) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [70bdb88b0c9](https://github.com/angular/angular/commit/70bdb88b0c9937ecb6d1adce5f02da32681782b3) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.4"></a>
# 19.2.4 (2025-03-26)
### core
diff --git a/package.json b/package.json
index a9cd91ce1fd76..3e94b19b3b642 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.3",
+ "version": "20.0.0-next.4",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 31d117e101f00..ddcb76902bd95 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,29 @@
+<a name="20.0.0-next.4"></a>
+# 20.0.0-next.4 (2025-03-26)
+### common
+| [785a1110e60](https://github.com/angular/angular/commit/785a1110e603a3573261528f2fda28718f548b4a) | fix | resolve host binding type issues ([#60481](https://github.com/angular/angular/pull/60481)) |
+### core
+| [cf5c61c8490](https://github.com/angular/angular/commit/cf5c61c8490cdb9a7633905eb5ab55ca76d72e77) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+| [bdd5e204233](https://github.com/angular/angular/commit/bdd5e204233eeb79e04a782a51c08429991eb03e) | fix | resolve host binding type issues ([#60481](https://github.com/angular/angular/pull/60481)) |
+### localize
+| [7408a1f58b3](https://github.com/angular/angular/commit/7408a1f58b3d0b4c535217875412573fb4f34bdd) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| [70bdb88b0c9](https://github.com/angular/angular/commit/70bdb88b0c9937ecb6d1adce5f02da32681782b3) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.4"></a>
# 19.2.4 (2025-03-26)
### core
diff --git a/package.json b/package.json
index a9cd91ce1fd76..3e94b19b3b642 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "20.0.0-next.3",
+ "version": "20.0.0-next.4",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [13d1c8ab387](https://github.com/angular/angular/commit/13d1c8ab38707b06dbed4941a556f982665b3304) | fix | fixes timing of hydration cleanup on control flow ([#60425](https://github.com/angular/angular/pull/60425)) |",
"+### forms"
] | [
15,
16
] | {
"additions": 27,
"author": "alxhub",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/60577",
"issue_id": 60577,
"merged_at": "2025-03-27T03:32:52Z",
"omission_probability": 0.1,
"pr_number": 60577,
"repo": "angular/angular",
"title": "Bump version to \"v20.0.0-next.4\" with changelog.",
"total_changes": 28
} |
431 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d0808235eddf..31d117e101f00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+<a name="19.2.4"></a>
+# 19.2.4 (2025-03-26)
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [081f5f5a83f](https://github.com/angular/angular/commit/081f5f5a83fef99718952519bed9fe39005d6d37) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+### localize
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a2f622d82d6](https://github.com/angular/angular/commit/a2f622d82d6c0f93a5fdf34fc8e5829db04c7380) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8e8ccc79279](https://github.com/angular/angular/commit/8e8ccc792790c876cf5831f3d7a504290c665a1b) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="20.0.0-next.3"></a>
# 20.0.0-next.3 (2025-03-19)
## Breaking Changes
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d0808235eddf..31d117e101f00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+# 19.2.4 (2025-03-26)
+### core
+| [081f5f5a83f](https://github.com/angular/angular/commit/081f5f5a83fef99718952519bed9fe39005d6d37) | fix | fix used templates are not deleted ([#60459](https://github.com/angular/angular/pull/60459)) |
+| [a2f622d82d6](https://github.com/angular/angular/commit/a2f622d82d6c0f93a5fdf34fc8e5829db04c7380) | fix | handle @angular/build:karma in ng add ([#60513](https://github.com/angular/angular/pull/60513)) |
+### platform-browser
+| [8e8ccc79279](https://github.com/angular/angular/commit/8e8ccc792790c876cf5831f3d7a504290c665a1b) | fix | ensure `platformBrowserTesting` includes `platformBrowser` providers ([#60480](https://github.com/angular/angular/pull/60480)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.0-next.3"></a>
# 20.0.0-next.3 (2025-03-19)
## Breaking Changes | [
"+<a name=\"19.2.4\"></a>",
"+### localize"
] | [
5,
11
] | {
"additions": 17,
"author": "alxhub",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/60576",
"issue_id": 60576,
"merged_at": "2025-03-27T03:28:20Z",
"omission_probability": 0.1,
"pr_number": 60576,
"repo": "angular/angular",
"title": "docs: release notes for the v19.2.4 release",
"total_changes": 17
} |
432 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 62d9d1ffd8a17..89bfcdab1c43b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+<a name="19.1.6"></a>
+# 19.1.6 (2025-02-12)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [01f669a274](https://github.com/angular/angular/commit/01f669a27425c5034a04274763cc60801f961aa2) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [dcfb9f1959](https://github.com/angular/angular/commit/dcfb9f1959164baf45f5f954b4bf681d650d8a2d) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [cab7a9b69c](https://github.com/angular/angular/commit/cab7a9b69c3a5d789432a87a554e8489c78a0f15) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [710759ddcc](https://github.com/angular/angular/commit/710759ddcc0ecbad68deb20821b535fd5deb69c6) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [46f36a58bf](https://github.com/angular/angular/commit/46f36a58bf3a7b9131b6330e84d4adb3e73f3601) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
diff --git a/package.json b/package.json
index 687ca5e4dc8b8..61c940a69c754 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.5",
+ "version": "19.1.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 62d9d1ffd8a17..89bfcdab1c43b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,25 @@
+<a name="19.1.6"></a>
+# 19.1.6 (2025-02-12)
+### compiler
+| [01f669a274](https://github.com/angular/angular/commit/01f669a27425c5034a04274763cc60801f961aa2) | fix | handle tracking expressions requiring temporary variables ([#58520](https://github.com/angular/angular/pull/58520)) |
+### compiler-cli
+| [dcfb9f1959](https://github.com/angular/angular/commit/dcfb9f1959164baf45f5f954b4bf681d650d8a2d) | fix | handle deferred blocks with shared dependencies correctly ([#59926](https://github.com/angular/angular/pull/59926)) |
+### core
+| [cab7a9b69c](https://github.com/angular/angular/commit/cab7a9b69c3a5d789432a87a554e8489c78a0f15) | fix | invalidate HMR component if replacement throws an error ([#59854](https://github.com/angular/angular/pull/59854)) |
+### migrations
+| [710759ddcc](https://github.com/angular/angular/commit/710759ddcc0ecbad68deb20821b535fd5deb69c6) | fix | account for let declarations in control flow migration ([#59861](https://github.com/angular/angular/pull/59861)) |
+| [46f36a58bf](https://github.com/angular/angular/commit/46f36a58bf3a7b9131b6330e84d4adb3e73f3601) | fix | count used dependencies inside existing control flow ([#59861](https://github.com/angular/angular/pull/59861)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
diff --git a/package.json b/package.json
index 687ca5e4dc8b8..61c940a69c754 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.5",
+ "version": "19.1.6",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 23,
"author": "atscott",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/59929",
"issue_id": 59929,
"merged_at": "2025-02-12T20:02:25Z",
"omission_probability": 0.1,
"pr_number": 59929,
"repo": "angular/angular",
"title": "Bump version to \"v19.1.6\" with changelog.",
"total_changes": 24
} |
433 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 466d5188bf336..72b25e156719c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.2.0-next.2"></a>
+# 19.2.0-next.2 (2025-02-06)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |
+| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
diff --git a/package.json b/package.json
index aec3b444972fa..aa253f7403e06 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.1",
+ "version": "19.2.0-next.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 466d5188bf336..72b25e156719c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+<a name="19.2.0-next.2"></a>
+### compiler-cli
+| [a97136052f9](https://github.com/angular/angular/commit/a97136052f9cfdb696a3b335ed7a1b9fb994d408) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [bae94b82fda](https://github.com/angular/angular/commit/bae94b82fda1669a6aafad975a3a0eb6f2743039) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [03bcd30e348](https://github.com/angular/angular/commit/03bcd30e3487443983d450a5dfea2d68d551bbd3) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+### core
+| [b592b1b0516](https://github.com/angular/angular/commit/b592b1b0516786c52c7d0638c4e7545b0de8a545) | fix | fix race condition in resource() ([#59851](https://github.com/angular/angular/pull/59851)) |
+| [a299e02e914](https://github.com/angular/angular/commit/a299e02e9141cdc4d74185deb58308fa010bb36e) | fix | preserve tracing snapshot until tick finishes ([#59796](https://github.com/angular/angular/pull/59796)) |
+### forms
+| [fa0c3e32108](https://github.com/angular/angular/commit/fa0c3e3210885a36e5c9e9eb76e821032f5cd215) | feat | support type set in form validators ([#45793](https://github.com/angular/angular/pull/45793)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.5"></a>
# 19.1.5 (2025-02-06)
### compiler-cli
diff --git a/package.json b/package.json
index aec3b444972fa..aa253f7403e06 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.2.0-next.1",
+ "version": "19.2.0-next.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+# 19.2.0-next.2 (2025-02-06)",
"+| [146ab9a76e6](https://github.com/angular/angular/commit/146ab9a76e6b4d8db7d08d34e2571ba5207f8756) | feat | support TypeScript 5.8 ([#59830](https://github.com/angular/angular/pull/59830)) |"
] | [
6,
16
] | {
"additions": 22,
"author": "alxhub",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/59872",
"issue_id": 59872,
"merged_at": "2025-02-06T20:50:20Z",
"omission_probability": 0.1,
"pr_number": 59872,
"repo": "angular/angular",
"title": "Bump version to \"v19.2.0-next.2\" with changelog.",
"total_changes": 23
} |
434 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb9e32f0431b3..466d5188bf336 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+<a name="19.1.5"></a>
+# 19.1.5 (2025-02-06)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d7b5c597ffc](https://github.com/angular/angular/commit/d7b5c597ffcb6469ae3f08a97e7790599d569cc4) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [53a4668b58b](https://github.com/angular/angular/commit/53a4668b58b645e41baddc5b67d52ede21c8e945) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [976125e0b4c](https://github.com/angular/angular/commit/976125e0b4cf4e7fb4621a7203e3f43b009885f0) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.2.0-next.1"></a>
# 19.2.0-next.1 (2025-01-29)
### core
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb9e32f0431b3..466d5188bf336 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+<a name="19.1.5"></a>
+### compiler-cli
+| Commit | Type | Description |
+| [d7b5c597ffc](https://github.com/angular/angular/commit/d7b5c597ffcb6469ae3f08a97e7790599d569cc4) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [53a4668b58b](https://github.com/angular/angular/commit/53a4668b58b645e41baddc5b67d52ede21c8e945) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [976125e0b4c](https://github.com/angular/angular/commit/976125e0b4cf4e7fb4621a7203e3f43b009885f0) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.2.0-next.1"></a>
# 19.2.0-next.1 (2025-01-29)
### core | [
"+# 19.1.5 (2025-02-06)",
"+| -- | -- | -- |"
] | [
6,
9
] | {
"additions": 11,
"author": "alxhub",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/59871",
"issue_id": 59871,
"merged_at": "2025-02-06T20:34:56Z",
"omission_probability": 0.1,
"pr_number": 59871,
"repo": "angular/angular",
"title": "docs: release notes for the v19.1.5 release",
"total_changes": 11
} |
435 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff5dc13b10e50..62d9d1ffd8a17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+<a name="19.1.5"></a>
+# 19.1.5 (2025-02-06)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d7b5c597ffc](https://github.com/angular/angular/commit/d7b5c597ffcb6469ae3f08a97e7790599d569cc4) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [53a4668b58b](https://github.com/angular/angular/commit/53a4668b58b645e41baddc5b67d52ede21c8e945) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [976125e0b4c](https://github.com/angular/angular/commit/976125e0b4cf4e7fb4621a7203e3f43b009885f0) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
### core
diff --git a/package.json b/package.json
index bd5fcb4eead19..3551918016847 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.4",
+ "version": "19.1.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff5dc13b10e50..62d9d1ffd8a17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+<a name="19.1.5"></a>
+# 19.1.5 (2025-02-06)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d7b5c597ffc](https://github.com/angular/angular/commit/d7b5c597ffcb6469ae3f08a97e7790599d569cc4) | fix | gracefully fall back if const enum cannot be passed through ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [53a4668b58b](https://github.com/angular/angular/commit/53a4668b58b645e41baddc5b67d52ede21c8e945) | fix | handle const enums used inside HMR data ([#59815](https://github.com/angular/angular/pull/59815)) |
+| [976125e0b4c](https://github.com/angular/angular/commit/976125e0b4cf4e7fb4621a7203e3f43b009885f0) | fix | handle enum members without initializers in partial evaluator ([#59815](https://github.com/angular/angular/pull/59815)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.4"></a>
# 19.1.4 (2025-01-29)
### core
diff --git a/package.json b/package.json
index bd5fcb4eead19..3551918016847 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.4",
+ "version": "19.1.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 12,
"author": "alxhub",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/59870",
"issue_id": 59870,
"merged_at": "2025-02-06T20:32:17Z",
"omission_probability": 0.1,
"pr_number": 59870,
"repo": "angular/angular",
"title": "Bump version to \"v19.1.5\" with changelog.",
"total_changes": 13
} |
436 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e64860496b2b8..7cb7b98ed6fab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,37 @@
+<a name="19.1.0-rc.0"></a>
+# 19.1.0-rc.0 (2025-01-08)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ceadd28ea1](https://github.com/angular/angular/commit/ceadd28ea12140e8e78cdb706aff0487f5a87a3c) | fix | allow $any in two-way bindings ([#59362](https://github.com/angular/angular/pull/59362)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [ce3b6641fb](https://github.com/angular/angular/commit/ce3b6641fbbbc968ee2ddf037dbc5ea70b8f1b07) | fix | account for more expression types when determining HMR dependencies ([#59323](https://github.com/angular/angular/pull/59323)) |
+| [ee99879fdc](https://github.com/angular/angular/commit/ee99879fdc66f98dca80524c702304066c9882d5) | fix | preserve defer block dependencies during HMR when class metadata is disabled ([#59313](https://github.com/angular/angular/pull/59313)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [9870b643bf](https://github.com/angular/angular/commit/9870b643bff46f089a3f0a30514fb7e062a66d56) | fix | Defer afterRender until after first CD ([#58250](https://github.com/angular/angular/pull/58250)) |
+| [a5fc962094](https://github.com/angular/angular/commit/a5fc9620948c59da2146d46d27de388839b93254) | fix | Don't run effects in check no changes pass ([#58250](https://github.com/angular/angular/pull/58250)) |
+| [5c0d68804e](https://github.com/angular/angular/commit/5c0d68804e03bcd425e5398e08d9cbe1846b21ca) | fix | Ensure that a destroyed `effect` never run. ([#59415](https://github.com/angular/angular/pull/59415)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d298d25426](https://github.com/angular/angular/commit/d298d254269ff759111fbdef7736bc8b713638bc) | feat | add schematic to clean up unused imports ([#59353](https://github.com/angular/angular/pull/59353)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8c5db3cfb7](https://github.com/angular/angular/commit/8c5db3cfb75700dd64f4c8c073554c7086835950) | fix | avoid circular DI error in async renderer ([#59256](https://github.com/angular/angular/pull/59256)) |
+| [0e23f20c41](https://github.com/angular/angular/commit/0e23f20c4117ffd5c871549a8012b8e22b03b5f4) | fix | styles not replaced during HMR when using animations renderer ([#59393](https://github.com/angular/angular/pull/59393)) |
+### router
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5ac6f065ab](https://github.com/angular/angular/commit/5ac6f065ab370ae99657c7a230bfd7ebf1d2f587) | fix | avoid component ID collisions with user code ([#59300](https://github.com/angular/angular/pull/59300)) |
+| [52a6710f54](https://github.com/angular/angular/commit/52a6710f54bcec81f4cde23a78b9f78d038156c5) | fix | complete router `events` on dispose ([#59327](https://github.com/angular/angular/pull/59327)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.6"></a>
# 19.0.6 (2025-01-08)
### compiler-cli
diff --git a/package.json b/package.json
index 9cfcc9ba78994..96e9f4ab60b69 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.0-next.4",
+ "version": "19.2.0-next.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index e64860496b2b8..7cb7b98ed6fab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,37 @@
+# 19.1.0-rc.0 (2025-01-08)
+### compiler
+| [ceadd28ea1](https://github.com/angular/angular/commit/ceadd28ea12140e8e78cdb706aff0487f5a87a3c) | fix | allow $any in two-way bindings ([#59362](https://github.com/angular/angular/pull/59362)) |
+### compiler-cli
+| [ce3b6641fb](https://github.com/angular/angular/commit/ce3b6641fbbbc968ee2ddf037dbc5ea70b8f1b07) | fix | account for more expression types when determining HMR dependencies ([#59323](https://github.com/angular/angular/pull/59323)) |
+| [ee99879fdc](https://github.com/angular/angular/commit/ee99879fdc66f98dca80524c702304066c9882d5) | fix | preserve defer block dependencies during HMR when class metadata is disabled ([#59313](https://github.com/angular/angular/pull/59313)) |
+### core
+| [9870b643bf](https://github.com/angular/angular/commit/9870b643bff46f089a3f0a30514fb7e062a66d56) | fix | Defer afterRender until after first CD ([#58250](https://github.com/angular/angular/pull/58250)) |
+| [a5fc962094](https://github.com/angular/angular/commit/a5fc9620948c59da2146d46d27de388839b93254) | fix | Don't run effects in check no changes pass ([#58250](https://github.com/angular/angular/pull/58250)) |
+| [5c0d68804e](https://github.com/angular/angular/commit/5c0d68804e03bcd425e5398e08d9cbe1846b21ca) | fix | Ensure that a destroyed `effect` never run. ([#59415](https://github.com/angular/angular/pull/59415)) |
+### migrations
+| [d298d25426](https://github.com/angular/angular/commit/d298d254269ff759111fbdef7736bc8b713638bc) | feat | add schematic to clean up unused imports ([#59353](https://github.com/angular/angular/pull/59353)) |
+### platform-browser
+| [8c5db3cfb7](https://github.com/angular/angular/commit/8c5db3cfb75700dd64f4c8c073554c7086835950) | fix | avoid circular DI error in async renderer ([#59256](https://github.com/angular/angular/pull/59256)) |
+| [0e23f20c41](https://github.com/angular/angular/commit/0e23f20c4117ffd5c871549a8012b8e22b03b5f4) | fix | styles not replaced during HMR when using animations renderer ([#59393](https://github.com/angular/angular/pull/59393)) |
+### router
+| [5ac6f065ab](https://github.com/angular/angular/commit/5ac6f065ab370ae99657c7a230bfd7ebf1d2f587) | fix | avoid component ID collisions with user code ([#59300](https://github.com/angular/angular/pull/59300)) |
+| [52a6710f54](https://github.com/angular/angular/commit/52a6710f54bcec81f4cde23a78b9f78d038156c5) | fix | complete router `events` on dispose ([#59327](https://github.com/angular/angular/pull/59327)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.6"></a>
# 19.0.6 (2025-01-08)
### compiler-cli
diff --git a/package.json b/package.json
index 9cfcc9ba78994..96e9f4ab60b69 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.1.0-next.4",
+ "version": "19.2.0-next.0",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+<a name=\"19.1.0-rc.0\"></a>"
] | [
5
] | {
"additions": 35,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/59435",
"issue_id": 59435,
"merged_at": "2025-01-08T18:26:08Z",
"omission_probability": 0.1,
"pr_number": 59435,
"repo": "angular/angular",
"title": "Update next branch to reflect new release-train \"v19.2.0-next.0\".",
"total_changes": 36
} |
437 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f19561b8c3774..dc1606f5f383d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,36 @@
+<a name="19.0.1"></a>
+# 19.0.1 (2024-11-26)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fb1fa8b0fc](https://github.com/angular/angular/commit/fb1fa8b0fc04c9cfac6551ca27bee89dcd7c72ac) | fix | more accurate diagnostics for host binding parser errors ([#58870](https://github.com/angular/angular/pull/58870)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [502ee0e722](https://github.com/angular/angular/commit/502ee0e7221a9e7cfa0fa3bd92298d3b650a7713) | fix | correctly clear template HMR internal renderer cache ([#58724](https://github.com/angular/angular/pull/58724)) |
+| [99715104a1](https://github.com/angular/angular/commit/99715104a1a787c3899dfbfac6b44f28c7d24356) | fix | correctly perform lazy routes migration for components with additional decorators ([#58796](https://github.com/angular/angular/pull/58796)) |
+| [118803035f](https://github.com/angular/angular/commit/118803035f366acdffc577ec857b888f764bb338) | fix | Ensure _tick is always run within the TracingSnapshot. ([#58881](https://github.com/angular/angular/pull/58881)) |
+| [08b9452f01](https://github.com/angular/angular/commit/08b9452f012b2ef660f767c2f0a4bf86bb15bb61) | fix | Ensure resource sets an error ([#58855](https://github.com/angular/angular/pull/58855)) |
+| [84f45ea3ff](https://github.com/angular/angular/commit/84f45ea3ffe02003350c6c19fdafdc6f4d521ccb) | fix | make component id generation more stable between client and server builds ([#58813](https://github.com/angular/angular/pull/58813)) |
+| [d3491c7cee](https://github.com/angular/angular/commit/d3491c7cee3d110da1adb51f8047b4e1976ece71) | fix | Prevents race condition of cleanup for incremental hydration ([#58722](https://github.com/angular/angular/pull/58722)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4dfe5b6cef](https://github.com/angular/angular/commit/4dfe5b6cefd7901a466b37b660f8b3a051a06cb3) | fix | work around TypeScript 5.7 issue ([#58731](https://github.com/angular/angular/pull/58731)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a983865bff](https://github.com/angular/angular/commit/a983865bffa828a982ef7e56204924d9c2989ead) | fix | add fix for individual unused imports ([#58719](https://github.com/angular/angular/pull/58719)) |
+| [e6e7a4e22b](https://github.com/angular/angular/commit/e6e7a4e22b0a654808e5eb88a30cd6effa383332) | fix | allow fixes to run without template info ([#58719](https://github.com/angular/angular/pull/58719)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5ce10264a4](https://github.com/angular/angular/commit/5ce10264a434ffc8e31cdc68208d2c3c7f8378ed) | fix | fix provide-initializer migration when using useFactory ([#58518](https://github.com/angular/angular/pull/58518)) |
+| [d4f5c85f60](https://github.com/angular/angular/commit/d4f5c85f60133550303d59b3f9e3e34f14ca63ce) | fix | handle parameters with initializers in inject migration ([#58769](https://github.com/angular/angular/pull/58769)) |
+| [a6d2d2dc10](https://github.com/angular/angular/commit/a6d2d2dc104608f14c3850b21bc23ba75ca04e4d) | fix | Mark hoisted properties as removed in inject migration ([#58804](https://github.com/angular/angular/pull/58804)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.0"></a>
# 19.0.0 (2024-11-19)
@@ -4218,4 +4251,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
diff --git a/package.json b/package.json
index 3de5b53b99f72..2c9f7518a2256 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0",
+ "version": "19.0.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index f19561b8c3774..dc1606f5f383d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,36 @@
+<a name="19.0.1"></a>
+# 19.0.1 (2024-11-26)
+### compiler-cli
+### core
+| [99715104a1](https://github.com/angular/angular/commit/99715104a1a787c3899dfbfac6b44f28c7d24356) | fix | correctly perform lazy routes migration for components with additional decorators ([#58796](https://github.com/angular/angular/pull/58796)) |
+| [118803035f](https://github.com/angular/angular/commit/118803035f366acdffc577ec857b888f764bb338) | fix | Ensure _tick is always run within the TracingSnapshot. ([#58881](https://github.com/angular/angular/pull/58881)) |
+| [08b9452f01](https://github.com/angular/angular/commit/08b9452f012b2ef660f767c2f0a4bf86bb15bb61) | fix | Ensure resource sets an error ([#58855](https://github.com/angular/angular/pull/58855)) |
+| [84f45ea3ff](https://github.com/angular/angular/commit/84f45ea3ffe02003350c6c19fdafdc6f4d521ccb) | fix | make component id generation more stable between client and server builds ([#58813](https://github.com/angular/angular/pull/58813)) |
+| [d3491c7cee](https://github.com/angular/angular/commit/d3491c7cee3d110da1adb51f8047b4e1976ece71) | fix | Prevents race condition of cleanup for incremental hydration ([#58722](https://github.com/angular/angular/pull/58722)) |
+### forms
+| [4dfe5b6cef](https://github.com/angular/angular/commit/4dfe5b6cefd7901a466b37b660f8b3a051a06cb3) | fix | work around TypeScript 5.7 issue ([#58731](https://github.com/angular/angular/pull/58731)) |
+### language-service
+| [a983865bff](https://github.com/angular/angular/commit/a983865bffa828a982ef7e56204924d9c2989ead) | fix | add fix for individual unused imports ([#58719](https://github.com/angular/angular/pull/58719)) |
+| [e6e7a4e22b](https://github.com/angular/angular/commit/e6e7a4e22b0a654808e5eb88a30cd6effa383332) | fix | allow fixes to run without template info ([#58719](https://github.com/angular/angular/pull/58719)) |
+### migrations
+| [5ce10264a4](https://github.com/angular/angular/commit/5ce10264a434ffc8e31cdc68208d2c3c7f8378ed) | fix | fix provide-initializer migration when using useFactory ([#58518](https://github.com/angular/angular/pull/58518)) |
+| [d4f5c85f60](https://github.com/angular/angular/commit/d4f5c85f60133550303d59b3f9e3e34f14ca63ce) | fix | handle parameters with initializers in inject migration ([#58769](https://github.com/angular/angular/pull/58769)) |
+| [a6d2d2dc10](https://github.com/angular/angular/commit/a6d2d2dc104608f14c3850b21bc23ba75ca04e4d) | fix | Mark hoisted properties as removed in inject migration ([#58804](https://github.com/angular/angular/pull/58804)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.0"></a>
# 19.0.0 (2024-11-19)
@@ -4218,4 +4251,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
diff --git a/package.json b/package.json
index 3de5b53b99f72..2c9f7518a2256 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0",
+ "version": "19.0.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [fb1fa8b0fc](https://github.com/angular/angular/commit/fb1fa8b0fc04c9cfac6551ca27bee89dcd7c72ac) | fix | more accurate diagnostics for host binding parser errors ([#58870](https://github.com/angular/angular/pull/58870)) |",
"+| [502ee0e722](https://github.com/angular/angular/commit/502ee0e7221a9e7cfa0fa3bd92298d3b650a7713) | fix | correctly clear template HMR internal renderer cache ([#58724](https://github.com/angular/angular/pull/58724)) |"
] | [
10,
14
] | {
"additions": 35,
"author": "thePunderWoman",
"deletions": 2,
"html_url": "https://github.com/angular/angular/pull/58903",
"issue_id": 58903,
"merged_at": "2024-11-26T17:40:13Z",
"omission_probability": 0.1,
"pr_number": 58903,
"repo": "angular/angular",
"title": "Bump version to \"v19.0.1\" with changelog.",
"total_changes": 37
} |
438 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd5afebe69800..bbbcbc8bea28d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,36 @@
+<a name="19.0.1"></a>
+# 19.0.1 (2024-11-26)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [fb1fa8b0fc](https://github.com/angular/angular/commit/fb1fa8b0fc04c9cfac6551ca27bee89dcd7c72ac) | fix | more accurate diagnostics for host binding parser errors ([#58870](https://github.com/angular/angular/pull/58870)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [502ee0e722](https://github.com/angular/angular/commit/502ee0e7221a9e7cfa0fa3bd92298d3b650a7713) | fix | correctly clear template HMR internal renderer cache ([#58724](https://github.com/angular/angular/pull/58724)) |
+| [99715104a1](https://github.com/angular/angular/commit/99715104a1a787c3899dfbfac6b44f28c7d24356) | fix | correctly perform lazy routes migration for components with additional decorators ([#58796](https://github.com/angular/angular/pull/58796)) |
+| [118803035f](https://github.com/angular/angular/commit/118803035f366acdffc577ec857b888f764bb338) | fix | Ensure _tick is always run within the TracingSnapshot. ([#58881](https://github.com/angular/angular/pull/58881)) |
+| [08b9452f01](https://github.com/angular/angular/commit/08b9452f012b2ef660f767c2f0a4bf86bb15bb61) | fix | Ensure resource sets an error ([#58855](https://github.com/angular/angular/pull/58855)) |
+| [84f45ea3ff](https://github.com/angular/angular/commit/84f45ea3ffe02003350c6c19fdafdc6f4d521ccb) | fix | make component id generation more stable between client and server builds ([#58813](https://github.com/angular/angular/pull/58813)) |
+| [d3491c7cee](https://github.com/angular/angular/commit/d3491c7cee3d110da1adb51f8047b4e1976ece71) | fix | Prevents race condition of cleanup for incremental hydration ([#58722](https://github.com/angular/angular/pull/58722)) |
+### forms
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4dfe5b6cef](https://github.com/angular/angular/commit/4dfe5b6cefd7901a466b37b660f8b3a051a06cb3) | fix | work around TypeScript 5.7 issue ([#58731](https://github.com/angular/angular/pull/58731)) |
+### language-service
+| Commit | Type | Description |
+| -- | -- | -- |
+| [a983865bff](https://github.com/angular/angular/commit/a983865bffa828a982ef7e56204924d9c2989ead) | fix | add fix for individual unused imports ([#58719](https://github.com/angular/angular/pull/58719)) |
+| [e6e7a4e22b](https://github.com/angular/angular/commit/e6e7a4e22b0a654808e5eb88a30cd6effa383332) | fix | allow fixes to run without template info ([#58719](https://github.com/angular/angular/pull/58719)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [5ce10264a4](https://github.com/angular/angular/commit/5ce10264a434ffc8e31cdc68208d2c3c7f8378ed) | fix | fix provide-initializer migration when using useFactory ([#58518](https://github.com/angular/angular/pull/58518)) |
+| [d4f5c85f60](https://github.com/angular/angular/commit/d4f5c85f60133550303d59b3f9e3e34f14ca63ce) | fix | handle parameters with initializers in inject migration ([#58769](https://github.com/angular/angular/pull/58769)) |
+| [a6d2d2dc10](https://github.com/angular/angular/commit/a6d2d2dc104608f14c3850b21bc23ba75ca04e4d) | fix | Mark hoisted properties as removed in inject migration ([#58804](https://github.com/angular/angular/pull/58804)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.0"></a>
# 19.0.0 (2024-11-19)
@@ -4250,4 +4283,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd5afebe69800..bbbcbc8bea28d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,36 @@
+<a name="19.0.1"></a>
+# 19.0.1 (2024-11-26)
+### compiler-cli
+| [fb1fa8b0fc](https://github.com/angular/angular/commit/fb1fa8b0fc04c9cfac6551ca27bee89dcd7c72ac) | fix | more accurate diagnostics for host binding parser errors ([#58870](https://github.com/angular/angular/pull/58870)) |
+| [502ee0e722](https://github.com/angular/angular/commit/502ee0e7221a9e7cfa0fa3bd92298d3b650a7713) | fix | correctly clear template HMR internal renderer cache ([#58724](https://github.com/angular/angular/pull/58724)) |
+| [118803035f](https://github.com/angular/angular/commit/118803035f366acdffc577ec857b888f764bb338) | fix | Ensure _tick is always run within the TracingSnapshot. ([#58881](https://github.com/angular/angular/pull/58881)) |
+| [08b9452f01](https://github.com/angular/angular/commit/08b9452f012b2ef660f767c2f0a4bf86bb15bb61) | fix | Ensure resource sets an error ([#58855](https://github.com/angular/angular/pull/58855)) |
+| [84f45ea3ff](https://github.com/angular/angular/commit/84f45ea3ffe02003350c6c19fdafdc6f4d521ccb) | fix | make component id generation more stable between client and server builds ([#58813](https://github.com/angular/angular/pull/58813)) |
+| [d3491c7cee](https://github.com/angular/angular/commit/d3491c7cee3d110da1adb51f8047b4e1976ece71) | fix | Prevents race condition of cleanup for incremental hydration ([#58722](https://github.com/angular/angular/pull/58722)) |
+| [4dfe5b6cef](https://github.com/angular/angular/commit/4dfe5b6cefd7901a466b37b660f8b3a051a06cb3) | fix | work around TypeScript 5.7 issue ([#58731](https://github.com/angular/angular/pull/58731)) |
+### language-service
+| [a983865bff](https://github.com/angular/angular/commit/a983865bffa828a982ef7e56204924d9c2989ead) | fix | add fix for individual unused imports ([#58719](https://github.com/angular/angular/pull/58719)) |
+| [e6e7a4e22b](https://github.com/angular/angular/commit/e6e7a4e22b0a654808e5eb88a30cd6effa383332) | fix | allow fixes to run without template info ([#58719](https://github.com/angular/angular/pull/58719)) |
+### migrations
+| [5ce10264a4](https://github.com/angular/angular/commit/5ce10264a434ffc8e31cdc68208d2c3c7f8378ed) | fix | fix provide-initializer migration when using useFactory ([#58518](https://github.com/angular/angular/pull/58518)) |
+| [d4f5c85f60](https://github.com/angular/angular/commit/d4f5c85f60133550303d59b3f9e3e34f14ca63ce) | fix | handle parameters with initializers in inject migration ([#58769](https://github.com/angular/angular/pull/58769)) |
+| [a6d2d2dc10](https://github.com/angular/angular/commit/a6d2d2dc104608f14c3850b21bc23ba75ca04e4d) | fix | Mark hoisted properties as removed in inject migration ([#58804](https://github.com/angular/angular/pull/58804)) |
<a name="19.0.0"></a>
# 19.0.0 (2024-11-19)
@@ -4250,4 +4283,4 @@ Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani
+Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file.
\ No newline at end of file | [
"+### core",
"+| [99715104a1](https://github.com/angular/angular/commit/99715104a1a787c3899dfbfac6b44f28c7d24356) | fix | correctly perform lazy routes migration for components with additional decorators ([#58796](https://github.com/angular/angular/pull/58796)) |",
"+### forms",
"+<!-- CHANGELOG SPLIT MARKER -->",
"-Earlier changelog entries can be found in CHANGELOG_ARCHIVE.md file."
] | [
11,
15,
20,
36,
45
] | {
"additions": 34,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/58905",
"issue_id": 58905,
"merged_at": "2024-11-26T17:42:28Z",
"omission_probability": 0.1,
"pr_number": 58905,
"repo": "angular/angular",
"title": "docs: release notes for the v19.0.1 release",
"total_changes": 35
} |
439 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b57acd32cf8d8..3178e1bc8bd38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+<a name="18.2.13"></a>
+# 18.2.13 (2024-11-26)
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [06d70a25ea](https://github.com/angular/angular/commit/06d70a25ea7a6ef32f47516fcb8542d98ac45e14) | fix | take care of tests that import both HttpClientModule & HttpClientTestingModule. ([#58777](https://github.com/angular/angular/pull/58777)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="18.2.12"></a>
# 18.2.12 (2024-11-14)
### compiler-cli
diff --git a/package.json b/package.json
index e02059ad097cd..54692ebaca629 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "18.2.12",
+ "version": "18.2.13",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index b57acd32cf8d8..3178e1bc8bd38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+<a name="18.2.13"></a>
+# 18.2.13 (2024-11-26)
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [06d70a25ea](https://github.com/angular/angular/commit/06d70a25ea7a6ef32f47516fcb8542d98ac45e14) | fix | take care of tests that import both HttpClientModule & HttpClientTestingModule. ([#58777](https://github.com/angular/angular/pull/58777)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="18.2.12"></a>
# 18.2.12 (2024-11-14)
### compiler-cli
diff --git a/package.json b/package.json
index e02059ad097cd..54692ebaca629 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "18.2.12",
+ "version": "18.2.13",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 10,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/58907",
"issue_id": 58907,
"merged_at": "2024-11-26T18:04:48Z",
"omission_probability": 0.1,
"pr_number": 58907,
"repo": "angular/angular",
"title": "Bump version to \"v18.2.13\" with changelog.",
"total_changes": 11
} |
440 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbbcbc8bea28d..e7baf87a84ac9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,16 @@
+<a name="19.1.0-next.0"></a>
+# 19.1.0-next.0 (2024-11-26)
+### common
+| Commit | Type | Description |
+| -- | -- | -- |
+| [e4c50b3bea](https://github.com/angular/angular/commit/e4c50b3bea22ca2afba74465893c36730952f4b9) | feat | expose component instance in NgComponentOutlet ([#58698](https://github.com/angular/angular/pull/58698)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [bd1f1294ae](https://github.com/angular/angular/commit/bd1f1294aeb0d47b24421b7b7a608988689a459f) | feat | support TypeScript 5.7 ([#58609](https://github.com/angular/angular/pull/58609)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.1"></a>
# 19.0.1 (2024-11-26)
### compiler-cli
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbbcbc8bea28d..e7baf87a84ac9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,16 @@
+<a name="19.1.0-next.0"></a>
+# 19.1.0-next.0 (2024-11-26)
+### common
+| [e4c50b3bea](https://github.com/angular/angular/commit/e4c50b3bea22ca2afba74465893c36730952f4b9) | feat | expose component instance in NgComponentOutlet ([#58698](https://github.com/angular/angular/pull/58698)) |
+### core
+| [bd1f1294ae](https://github.com/angular/angular/commit/bd1f1294aeb0d47b24421b7b7a608988689a459f) | feat | support TypeScript 5.7 ([#58609](https://github.com/angular/angular/pull/58609)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.1"></a>
# 19.0.1 (2024-11-26)
### compiler-cli | [] | [] | {
"additions": 13,
"author": "thePunderWoman",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/58906",
"issue_id": 58906,
"merged_at": "2024-11-26T17:58:50Z",
"omission_probability": 0.1,
"pr_number": 58906,
"repo": "angular/angular",
"title": "Bump version to \"v19.1.0-next.0\" with changelog.",
"total_changes": 13
} |
441 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 614ed93e65300..464716e1b4492 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+<a name="19.0.0-rc.2"></a>
+# 19.0.0-rc.2 (2024-11-14)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [560282aa9b](https://github.com/angular/angular/commit/560282aa9b3204ad8311017905beed63072c7303) | fix | control flow nodes with root at the end projected incorrectly ([#58607](https://github.com/angular/angular/pull/58607)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [791ee323dc](https://github.com/angular/angular/commit/791ee323dc5e9ba60b385048f42ff5c5ded7a8c0) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |
+| [9bbb01c85e](https://github.com/angular/angular/commit/9bbb01c85e763b0457456a2393a834db15008671) | fix | report individual diagnostics for unused imports ([#58589](https://github.com/angular/angular/pull/58589)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [71ee81af2c](https://github.com/angular/angular/commit/71ee81af2c4c5854a54cf94a48d5829da41878a7) | fix | clean up event contract once hydration is done ([#58174](https://github.com/angular/angular/pull/58174)) |
+| [5fe57d4fbb](https://github.com/angular/angular/commit/5fe57d4fbb578c35a8e8ef037ae8c19c8a0e901c) | fix | fixes issues with control flow and incremental hydration ([#58644](https://github.com/angular/angular/pull/58644)) |
+| [51933ef5a6](https://github.com/angular/angular/commit/51933ef5a6ce62df37945fa22e87e3868288e318) | fix | prevent errors on contract cleanup ([#58614](https://github.com/angular/angular/pull/58614)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b84ed2b628](https://github.com/angular/angular/commit/b84ed2b6288d101661abdc880c45b52398bc1022) | fix | include the output migration in the defaults of the signal migration ([#58635](https://github.com/angular/angular/pull/58635)) |
+| [e26797b38e](https://github.com/angular/angular/commit/e26797b38efe0ac813601c10581f34b7591954c1) | fix | replace removed NgModules in tests with their exports ([#58627](https://github.com/angular/angular/pull/58627)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="18.2.12"></a>
# 18.2.12 (2024-11-14)
### compiler-cli
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 614ed93e65300..464716e1b4492 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+<a name="19.0.0-rc.2"></a>
+# 19.0.0-rc.2 (2024-11-14)
+### compiler
+| [560282aa9b](https://github.com/angular/angular/commit/560282aa9b3204ad8311017905beed63072c7303) | fix | control flow nodes with root at the end projected incorrectly ([#58607](https://github.com/angular/angular/pull/58607)) |
+### compiler-cli
+| [9bbb01c85e](https://github.com/angular/angular/commit/9bbb01c85e763b0457456a2393a834db15008671) | fix | report individual diagnostics for unused imports ([#58589](https://github.com/angular/angular/pull/58589)) |
+### core
+| [71ee81af2c](https://github.com/angular/angular/commit/71ee81af2c4c5854a54cf94a48d5829da41878a7) | fix | clean up event contract once hydration is done ([#58174](https://github.com/angular/angular/pull/58174)) |
+| [5fe57d4fbb](https://github.com/angular/angular/commit/5fe57d4fbb578c35a8e8ef037ae8c19c8a0e901c) | fix | fixes issues with control flow and incremental hydration ([#58644](https://github.com/angular/angular/pull/58644)) |
+| [51933ef5a6](https://github.com/angular/angular/commit/51933ef5a6ce62df37945fa22e87e3868288e318) | fix | prevent errors on contract cleanup ([#58614](https://github.com/angular/angular/pull/58614)) |
+### migrations
+| [b84ed2b628](https://github.com/angular/angular/commit/b84ed2b6288d101661abdc880c45b52398bc1022) | fix | include the output migration in the defaults of the signal migration ([#58635](https://github.com/angular/angular/pull/58635)) |
+| [e26797b38e](https://github.com/angular/angular/commit/e26797b38efe0ac813601c10581f34b7591954c1) | fix | replace removed NgModules in tests with their exports ([#58627](https://github.com/angular/angular/pull/58627)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="18.2.12"></a>
# 18.2.12 (2024-11-14)
### compiler-cli | [
"+| [791ee323dc](https://github.com/angular/angular/commit/791ee323dc5e9ba60b385048f42ff5c5ded7a8c0) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |"
] | [
14
] | {
"additions": 25,
"author": "thePunderWoman",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/58665",
"issue_id": 58665,
"merged_at": "2024-11-14T16:37:30Z",
"omission_probability": 0.1,
"pr_number": 58665,
"repo": "angular/angular",
"title": "docs: release notes for the v19.0.0-rc.2 release",
"total_changes": 25
} |
442 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33d2079b2e22a..8cd57e6f270ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+<a name="19.0.0-rc.2"></a>
+# 19.0.0-rc.2 (2024-11-14)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [560282aa9b](https://github.com/angular/angular/commit/560282aa9b3204ad8311017905beed63072c7303) | fix | control flow nodes with root at the end projected incorrectly ([#58607](https://github.com/angular/angular/pull/58607)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [791ee323dc](https://github.com/angular/angular/commit/791ee323dc5e9ba60b385048f42ff5c5ded7a8c0) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |
+| [9bbb01c85e](https://github.com/angular/angular/commit/9bbb01c85e763b0457456a2393a834db15008671) | fix | report individual diagnostics for unused imports ([#58589](https://github.com/angular/angular/pull/58589)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [71ee81af2c](https://github.com/angular/angular/commit/71ee81af2c4c5854a54cf94a48d5829da41878a7) | fix | clean up event contract once hydration is done ([#58174](https://github.com/angular/angular/pull/58174)) |
+| [5fe57d4fbb](https://github.com/angular/angular/commit/5fe57d4fbb578c35a8e8ef037ae8c19c8a0e901c) | fix | fixes issues with control flow and incremental hydration ([#58644](https://github.com/angular/angular/pull/58644)) |
+| [51933ef5a6](https://github.com/angular/angular/commit/51933ef5a6ce62df37945fa22e87e3868288e318) | fix | prevent errors on contract cleanup ([#58614](https://github.com/angular/angular/pull/58614)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b84ed2b628](https://github.com/angular/angular/commit/b84ed2b6288d101661abdc880c45b52398bc1022) | fix | include the output migration in the defaults of the signal migration ([#58635](https://github.com/angular/angular/pull/58635)) |
+| [e26797b38e](https://github.com/angular/angular/commit/e26797b38efe0ac813601c10581f34b7591954c1) | fix | replace removed NgModules in tests with their exports ([#58627](https://github.com/angular/angular/pull/58627)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.0-rc.1"></a>
# 19.0.0-rc.1 (2024-11-06)
### compiler
diff --git a/package.json b/package.json
index df0dc8ea7646f..83edfffb79857 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-rc.1",
+ "version": "19.0.0-rc.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33d2079b2e22a..8cd57e6f270ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+<a name="19.0.0-rc.2"></a>
+# 19.0.0-rc.2 (2024-11-14)
+### compiler
+| [560282aa9b](https://github.com/angular/angular/commit/560282aa9b3204ad8311017905beed63072c7303) | fix | control flow nodes with root at the end projected incorrectly ([#58607](https://github.com/angular/angular/pull/58607)) |
+### compiler-cli
+| [791ee323dc](https://github.com/angular/angular/commit/791ee323dc5e9ba60b385048f42ff5c5ded7a8c0) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |
+| [9bbb01c85e](https://github.com/angular/angular/commit/9bbb01c85e763b0457456a2393a834db15008671) | fix | report individual diagnostics for unused imports ([#58589](https://github.com/angular/angular/pull/58589)) |
+| [71ee81af2c](https://github.com/angular/angular/commit/71ee81af2c4c5854a54cf94a48d5829da41878a7) | fix | clean up event contract once hydration is done ([#58174](https://github.com/angular/angular/pull/58174)) |
+| [5fe57d4fbb](https://github.com/angular/angular/commit/5fe57d4fbb578c35a8e8ef037ae8c19c8a0e901c) | fix | fixes issues with control flow and incremental hydration ([#58644](https://github.com/angular/angular/pull/58644)) |
+| [51933ef5a6](https://github.com/angular/angular/commit/51933ef5a6ce62df37945fa22e87e3868288e318) | fix | prevent errors on contract cleanup ([#58614](https://github.com/angular/angular/pull/58614)) |
+### migrations
+| [b84ed2b628](https://github.com/angular/angular/commit/b84ed2b6288d101661abdc880c45b52398bc1022) | fix | include the output migration in the defaults of the signal migration ([#58635](https://github.com/angular/angular/pull/58635)) |
+| [e26797b38e](https://github.com/angular/angular/commit/e26797b38efe0ac813601c10581f34b7591954c1) | fix | replace removed NgModules in tests with their exports ([#58627](https://github.com/angular/angular/pull/58627)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.0-rc.1"></a>
# 19.0.0-rc.1 (2024-11-06)
### compiler
diff --git a/package.json b/package.json
index df0dc8ea7646f..83edfffb79857 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-rc.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+### core",
"+ \"version\": \"19.0.0-rc.2\","
] | [
16,
41
] | {
"additions": 26,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/58664",
"issue_id": 58664,
"merged_at": "2024-11-14T16:35:17Z",
"omission_probability": 0.1,
"pr_number": 58664,
"repo": "angular/angular",
"title": "Bump version to \"v19.0.0-rc.2\" with changelog.",
"total_changes": 27
} |
443 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f763f4b09eaa1..b57acd32cf8d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+<a name="18.2.12"></a>
+# 18.2.12 (2024-11-14)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4c38160853](https://github.com/angular/angular/commit/4c3816085363614497eecf6b722a91e15e1b2051) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="18.2.11"></a>
# 18.2.11 (2024-11-06)
### core
diff --git a/package.json b/package.json
index eb85222de01ee..e02059ad097cd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "18.2.11",
+ "version": "18.2.12",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index f763f4b09eaa1..b57acd32cf8d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+<a name="18.2.12"></a>
+# 18.2.12 (2024-11-14)
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [4c38160853](https://github.com/angular/angular/commit/4c3816085363614497eecf6b722a91e15e1b2051) | fix | correct extraction of generics from type aliases ([#58548](https://github.com/angular/angular/pull/58548)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="18.2.11"></a>
# 18.2.11 (2024-11-06)
### core
diff --git a/package.json b/package.json
index eb85222de01ee..e02059ad097cd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "18.2.11",
+ "version": "18.2.12",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [] | [] | {
"additions": 10,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/58661",
"issue_id": 58661,
"merged_at": "2024-11-14T16:11:59Z",
"omission_probability": 0.1,
"pr_number": 58661,
"repo": "angular/angular",
"title": "Bump version to \"v18.2.12\" with changelog.",
"total_changes": 11
} |
444 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b094bfa70b1e8..88a6b5cacaac4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+<a name="19.0.0-next.5"></a>
+# 19.0.0-next.5 (2024-09-11)
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c93b510f9b](https://github.com/angular/angular/commit/c93b510f9b2e23aa7a3848a04c05249fde14a9b1) | feat | allow passing `undefined` without needing to include it in the type argument of `input` ([#57621](https://github.com/angular/angular/pull/57621)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="18.2.4"></a>
# 18.2.4 (2024-09-11)
### compiler
diff --git a/package.json b/package.json
index d647c0cf2cefc..3a8980bf70203 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-next.4",
+ "version": "19.0.0-next.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index b094bfa70b1e8..88a6b5cacaac4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# 19.0.0-next.5 (2024-09-11)
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c93b510f9b](https://github.com/angular/angular/commit/c93b510f9b2e23aa7a3848a04c05249fde14a9b1) | feat | allow passing `undefined` without needing to include it in the type argument of `input` ([#57621](https://github.com/angular/angular/pull/57621)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="18.2.4"></a>
# 18.2.4 (2024-09-11)
### compiler
diff --git a/package.json b/package.json
index d647c0cf2cefc..3a8980bf70203 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-next.4",
+ "version": "19.0.0-next.5",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+<a name=\"19.0.0-next.5\"></a>"
] | [
5
] | {
"additions": 10,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/57782",
"issue_id": 57782,
"merged_at": "2024-09-11T20:27:52Z",
"omission_probability": 0.1,
"pr_number": 57782,
"repo": "angular/angular",
"title": "Bump version to \"v19.0.0-next.5\" with changelog.",
"total_changes": 11
} |
445 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a498b612f62bb..2e4e3cf052410 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+<a name="19.0.0-rc.1"></a>
+# 19.0.0-rc.1 (2024-11-06)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b25121ee4a](https://github.com/angular/angular/commit/b25121ee4aba427954fef074a967b9332654be84) | fix | avoid having to duplicate core environment ([#58444](https://github.com/angular/angular/pull/58444)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d4d76ead80](https://github.com/angular/angular/commit/d4d76ead802837bc6cc7908bc9ebfefa73eb9969) | fix | do not fail fatal when references to non-existent module are discovered ([#58515](https://github.com/angular/angular/pull/58515)) |
+| [22cd6869ef](https://github.com/angular/angular/commit/22cd6869ef453c342b206f84e857ef6c34922fa5) | fix | make the unused imports diagnostic easier to read ([#58468](https://github.com/angular/angular/pull/58468)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8ae84be3df](https://github.com/angular/angular/commit/8ae84be3df4e1393c6f00e2d28ccacd5b2159a0f) | fix | avoid slow stringification when checking for duplicates in dev mode ([#58521](https://github.com/angular/angular/pull/58521)) |
+| [6e0af6dbbb](https://github.com/angular/angular/commit/6e0af6dbbbe5e9a9e2e5809ada0b7b5a7e456402) | fix | resolve forward-referenced host directives during directive matching ([#58492](https://github.com/angular/angular/pull/58492)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c5e676bb87](https://github.com/angular/angular/commit/c5e676bb8715bcde42e56eb08a41cc1ba5c95f91) | fix | flip the default standalone flag in route-lazy-loading migration ([#58474](https://github.com/angular/angular/pull/58474)) |
+| [e85ac5c7cb](https://github.com/angular/angular/commit/e85ac5c7cb06dc0fba757a9b931e79e07978f2a9) | fix | properly bundle shared compiler code into migrations ([#58515](https://github.com/angular/angular/pull/58515)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c36a1c023b](https://github.com/angular/angular/commit/c36a1c023b34f9b2056e1bef6364787e8495bfad) | fix | correctly add external stylesheets to ShadowDOM components ([#58482](https://github.com/angular/angular/pull/58482)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="18.2.11"></a>
# 18.2.11 (2024-11-06)
### core
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index a498b612f62bb..2e4e3cf052410 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+<a name="19.0.0-rc.1"></a>
+# 19.0.0-rc.1 (2024-11-06)
+### compiler
+| [b25121ee4a](https://github.com/angular/angular/commit/b25121ee4aba427954fef074a967b9332654be84) | fix | avoid having to duplicate core environment ([#58444](https://github.com/angular/angular/pull/58444)) |
+| [d4d76ead80](https://github.com/angular/angular/commit/d4d76ead802837bc6cc7908bc9ebfefa73eb9969) | fix | do not fail fatal when references to non-existent module are discovered ([#58515](https://github.com/angular/angular/pull/58515)) |
+| [22cd6869ef](https://github.com/angular/angular/commit/22cd6869ef453c342b206f84e857ef6c34922fa5) | fix | make the unused imports diagnostic easier to read ([#58468](https://github.com/angular/angular/pull/58468)) |
+### core
+| [8ae84be3df](https://github.com/angular/angular/commit/8ae84be3df4e1393c6f00e2d28ccacd5b2159a0f) | fix | avoid slow stringification when checking for duplicates in dev mode ([#58521](https://github.com/angular/angular/pull/58521)) |
+| [6e0af6dbbb](https://github.com/angular/angular/commit/6e0af6dbbbe5e9a9e2e5809ada0b7b5a7e456402) | fix | resolve forward-referenced host directives during directive matching ([#58492](https://github.com/angular/angular/pull/58492)) |
+### migrations
+| [c5e676bb87](https://github.com/angular/angular/commit/c5e676bb8715bcde42e56eb08a41cc1ba5c95f91) | fix | flip the default standalone flag in route-lazy-loading migration ([#58474](https://github.com/angular/angular/pull/58474)) |
+| [e85ac5c7cb](https://github.com/angular/angular/commit/e85ac5c7cb06dc0fba757a9b931e79e07978f2a9) | fix | properly bundle shared compiler code into migrations ([#58515](https://github.com/angular/angular/pull/58515)) |
+### platform-browser
+| [c36a1c023b](https://github.com/angular/angular/commit/c36a1c023b34f9b2056e1bef6364787e8495bfad) | fix | correctly add external stylesheets to ShadowDOM components ([#58482](https://github.com/angular/angular/pull/58482)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="18.2.11"></a>
# 18.2.11 (2024-11-06)
### core | [
"+### compiler-cli"
] | [
11
] | {
"additions": 28,
"author": "thePunderWoman",
"deletions": 0,
"html_url": "https://github.com/angular/angular/pull/58535",
"issue_id": 58535,
"merged_at": "2024-11-06T18:20:28Z",
"omission_probability": 0.1,
"pr_number": 58535,
"repo": "angular/angular",
"title": "docs: release notes for the v19.0.0-rc.1 release",
"total_changes": 28
} |
446 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47921d2a73357..33d2079b2e22a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+<a name="19.0.0-rc.1"></a>
+# 19.0.0-rc.1 (2024-11-06)
+### compiler
+| Commit | Type | Description |
+| -- | -- | -- |
+| [b25121ee4a](https://github.com/angular/angular/commit/b25121ee4aba427954fef074a967b9332654be84) | fix | avoid having to duplicate core environment ([#58444](https://github.com/angular/angular/pull/58444)) |
+### compiler-cli
+| Commit | Type | Description |
+| -- | -- | -- |
+| [d4d76ead80](https://github.com/angular/angular/commit/d4d76ead802837bc6cc7908bc9ebfefa73eb9969) | fix | do not fail fatal when references to non-existent module are discovered ([#58515](https://github.com/angular/angular/pull/58515)) |
+| [22cd6869ef](https://github.com/angular/angular/commit/22cd6869ef453c342b206f84e857ef6c34922fa5) | fix | make the unused imports diagnostic easier to read ([#58468](https://github.com/angular/angular/pull/58468)) |
+### core
+| Commit | Type | Description |
+| -- | -- | -- |
+| [8ae84be3df](https://github.com/angular/angular/commit/8ae84be3df4e1393c6f00e2d28ccacd5b2159a0f) | fix | avoid slow stringification when checking for duplicates in dev mode ([#58521](https://github.com/angular/angular/pull/58521)) |
+| [6e0af6dbbb](https://github.com/angular/angular/commit/6e0af6dbbbe5e9a9e2e5809ada0b7b5a7e456402) | fix | resolve forward-referenced host directives during directive matching ([#58492](https://github.com/angular/angular/pull/58492)) |
+### migrations
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c5e676bb87](https://github.com/angular/angular/commit/c5e676bb8715bcde42e56eb08a41cc1ba5c95f91) | fix | flip the default standalone flag in route-lazy-loading migration ([#58474](https://github.com/angular/angular/pull/58474)) |
+| [e85ac5c7cb](https://github.com/angular/angular/commit/e85ac5c7cb06dc0fba757a9b931e79e07978f2a9) | fix | properly bundle shared compiler code into migrations ([#58515](https://github.com/angular/angular/pull/58515)) |
+### platform-browser
+| Commit | Type | Description |
+| -- | -- | -- |
+| [c36a1c023b](https://github.com/angular/angular/commit/c36a1c023b34f9b2056e1bef6364787e8495bfad) | fix | correctly add external stylesheets to ShadowDOM components ([#58482](https://github.com/angular/angular/pull/58482)) |
+
+<!-- CHANGELOG SPLIT MARKER -->
+
<a name="19.0.0-rc.0"></a>
# 19.0.0-rc.0 (2024-10-30)
### compiler
diff --git a/package.json b/package.json
index 6c451880c63fe..8cee055c78467 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-rc.0",
+ "version": "19.0.0-rc.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47921d2a73357..33d2079b2e22a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+<a name="19.0.0-rc.1"></a>
+# 19.0.0-rc.1 (2024-11-06)
+### compiler
+| [b25121ee4a](https://github.com/angular/angular/commit/b25121ee4aba427954fef074a967b9332654be84) | fix | avoid having to duplicate core environment ([#58444](https://github.com/angular/angular/pull/58444)) |
+### compiler-cli
+| [d4d76ead80](https://github.com/angular/angular/commit/d4d76ead802837bc6cc7908bc9ebfefa73eb9969) | fix | do not fail fatal when references to non-existent module are discovered ([#58515](https://github.com/angular/angular/pull/58515)) |
+| [22cd6869ef](https://github.com/angular/angular/commit/22cd6869ef453c342b206f84e857ef6c34922fa5) | fix | make the unused imports diagnostic easier to read ([#58468](https://github.com/angular/angular/pull/58468)) |
+### core
+| [8ae84be3df](https://github.com/angular/angular/commit/8ae84be3df4e1393c6f00e2d28ccacd5b2159a0f) | fix | avoid slow stringification when checking for duplicates in dev mode ([#58521](https://github.com/angular/angular/pull/58521)) |
+| [6e0af6dbbb](https://github.com/angular/angular/commit/6e0af6dbbbe5e9a9e2e5809ada0b7b5a7e456402) | fix | resolve forward-referenced host directives during directive matching ([#58492](https://github.com/angular/angular/pull/58492)) |
+### migrations
+| [e85ac5c7cb](https://github.com/angular/angular/commit/e85ac5c7cb06dc0fba757a9b931e79e07978f2a9) | fix | properly bundle shared compiler code into migrations ([#58515](https://github.com/angular/angular/pull/58515)) |
+### platform-browser
+| [c36a1c023b](https://github.com/angular/angular/commit/c36a1c023b34f9b2056e1bef6364787e8495bfad) | fix | correctly add external stylesheets to ShadowDOM components ([#58482](https://github.com/angular/angular/pull/58482)) |
+<!-- CHANGELOG SPLIT MARKER -->
<a name="19.0.0-rc.0"></a>
# 19.0.0-rc.0 (2024-10-30)
### compiler
diff --git a/package.json b/package.json
index 6c451880c63fe..8cee055c78467 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
- "version": "19.0.0-rc.0",
+ "version": "19.0.0-rc.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular", | [
"+| [c5e676bb87](https://github.com/angular/angular/commit/c5e676bb8715bcde42e56eb08a41cc1ba5c95f91) | fix | flip the default standalone flag in route-lazy-loading migration ([#58474](https://github.com/angular/angular/pull/58474)) |"
] | [
24
] | {
"additions": 29,
"author": "thePunderWoman",
"deletions": 1,
"html_url": "https://github.com/angular/angular/pull/58534",
"issue_id": 58534,
"merged_at": "2024-11-06T18:18:43Z",
"omission_probability": 0.1,
"pr_number": 58534,
"repo": "angular/angular",
"title": "Bump version to \"v19.0.0-rc.1\" with changelog.",
"total_changes": 30
} |
447 | diff --git a/crates/editor/src/code_completion_tests.rs b/crates/editor/src/code_completion_tests.rs
index 866fc4575ff2d9..9c6c5dc0147517 100644
--- a/crates/editor/src/code_completion_tests.rs
+++ b/crates/editor/src/code_completion_tests.rs
@@ -1006,3 +1006,152 @@ fn test_sort_matches_for_snippets(_cx: &mut TestAppContext) {
"Match order not expected"
);
}
+
+#[gpui::test]
+fn test_sort_matches_for_exact_match(_cx: &mut TestAppContext) {
+ // Case 1: "set_text"
+ let query: Option<&str> = Some("set_text");
+ let mut matches: Vec<SortableMatch<'_>> = vec![
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 1.0,
+ positions: vec![],
+ string: "set_text".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "set_text"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.32000000000000006,
+ positions: vec![],
+ string: "set_placeholder_text".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "set_placeholder_text"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.32,
+ positions: vec![],
+ string: "set_text_style_refinement".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "set_text_style_refinement"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.16666666666666666,
+ positions: vec![],
+ string: "set_context_menu_options".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "set_context_menu_options"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.08695652173913043,
+ positions: vec![],
+ string: "select_to_next_word_end".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_next_word_end"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.07692307692307693,
+ positions: vec![],
+ string: "select_to_next_subword_end".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_next_subword_end"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.06956521739130435,
+ positions: vec![],
+ string: "set_custom_context_menu".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "set_custom_context_menu"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.06,
+ positions: vec![],
+ string: "select_to_end_of_excerpt".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_end_of_excerpt"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.055384615384615386,
+ positions: vec![],
+ string: "select_to_start_of_excerpt".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_start_of_excerpt"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.0464516129032258,
+ positions: vec![],
+ string: "select_to_start_of_next_excerpt".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_start_of_next_excerpt"),
+ },
+ SortableMatch {
+ string_match: StringMatch {
+ candidate_id: 0,
+ score: 0.04363636363636363,
+ positions: vec![],
+ string: "select_to_end_of_previous_excerpt".to_string(),
+ },
+ is_snippet: false,
+ sort_text: Some("7fffffff"),
+ sort_key: (3, "select_to_end_of_previous_excerpt"),
+ },
+ ];
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::Top);
+ assert_eq!(
+ matches
+ .iter()
+ .map(|m| m.string_match.string.as_str())
+ .collect::<Vec<&str>>(),
+ vec![
+ "set_text",
+ "set_context_menu_options",
+ "set_placeholder_text",
+ "set_text_style_refinement",
+ "select_to_end_of_excerpt",
+ "select_to_end_of_previous_excerpt",
+ "select_to_next_subword_end",
+ "select_to_next_word_end",
+ "select_to_start_of_excerpt",
+ "select_to_start_of_next_excerpt",
+ "set_custom_context_menu"
+ ]
+ );
+}
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 28ae2eb7713342..37e1c9c7cda8e4 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -671,7 +671,7 @@ impl CompletionsMenu {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
enum MatchTier<'a> {
WordStartMatch {
- sort_score_int: Reverse<i32>,
+ sort_bucket: Reverse<i32>,
sort_snippet: Reverse<i32>,
sort_text: Option<&'a str>,
sort_key: (usize, &'a str),
@@ -684,11 +684,9 @@ impl CompletionsMenu {
// Our goal here is to intelligently sort completion suggestions. We want to
// balance the raw fuzzy match score with hints from the language server
//
- // We first primary sort using fuzzy score by putting matches into two buckets
- // strong one and weak one. Among these buckets matches are then compared by
+ // We first primary sort using fuzzy score by putting matches into multiple
+ // buckets. Among these buckets matches are then compared by
// various criteria like snippet, LSP hints, kind, label text etc.
- //
- const FUZZY_THRESHOLD: f64 = 0.1317;
let query_start_lower = query
.and_then(|q| q.chars().next())
@@ -712,14 +710,20 @@ impl CompletionsMenu {
let sort_score = Reverse(OrderedFloat(score));
MatchTier::OtherMatch { sort_score }
} else {
- let sort_score_int = Reverse(if score >= FUZZY_THRESHOLD { 1 } else { 0 });
+ // Convert fuzzy match score (0.0-1.0) to a priority bucket (0-3)
+ let sort_bucket = Reverse(match (score * 10.0).floor() as i32 {
+ s if s >= 7 => 3,
+ s if s >= 1 => 2,
+ s if s > 0 => 1,
+ _ => 0,
+ });
let sort_snippet = match snippet_sort_order {
SnippetSortOrder::Top => Reverse(if mat.is_snippet { 1 } else { 0 }),
SnippetSortOrder::Bottom => Reverse(if mat.is_snippet { 0 } else { 1 }),
SnippetSortOrder::Inline => Reverse(0),
};
MatchTier::WordStartMatch {
- sort_score_int,
+ sort_bucket,
sort_snippet,
sort_text: mat.sort_text,
sort_key: mat.sort_key,
| diff --git a/crates/editor/src/code_completion_tests.rs b/crates/editor/src/code_completion_tests.rs
index 866fc4575ff2d9..9c6c5dc0147517 100644
--- a/crates/editor/src/code_completion_tests.rs
+++ b/crates/editor/src/code_completion_tests.rs
@@ -1006,3 +1006,152 @@ fn test_sort_matches_for_snippets(_cx: &mut TestAppContext) {
"Match order not expected"
);
}
+
+#[gpui::test]
+ // Case 1: "set_text"
+ let query: Option<&str> = Some("set_text");
+ let mut matches: Vec<SortableMatch<'_>> = vec![
+ score: 1.0,
+ string: "set_text".to_string(),
+ sort_key: (3, "set_text"),
+ score: 0.32000000000000006,
+ string: "set_placeholder_text".to_string(),
+ sort_key: (3, "set_placeholder_text"),
+ score: 0.32,
+ string: "set_text_style_refinement".to_string(),
+ score: 0.16666666666666666,
+ string: "set_context_menu_options".to_string(),
+ score: 0.08695652173913043,
+ string: "select_to_next_word_end".to_string(),
+ score: 0.07692307692307693,
+ string: "select_to_next_subword_end".to_string(),
+ sort_key: (3, "select_to_next_subword_end"),
+ score: 0.06956521739130435,
+ string: "set_custom_context_menu".to_string(),
+ sort_key: (3, "set_custom_context_menu"),
+ score: 0.06,
+ string: "select_to_end_of_excerpt".to_string(),
+ sort_key: (3, "select_to_end_of_excerpt"),
+ score: 0.055384615384615386,
+ string: "select_to_start_of_excerpt".to_string(),
+ sort_key: (3, "select_to_start_of_excerpt"),
+ score: 0.0464516129032258,
+ string: "select_to_start_of_next_excerpt".to_string(),
+ sort_key: (3, "select_to_start_of_next_excerpt"),
+ score: 0.04363636363636363,
+ string: "select_to_end_of_previous_excerpt".to_string(),
+ sort_key: (3, "select_to_end_of_previous_excerpt"),
+ ];
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::Top);
+ matches
+ .iter()
+ .map(|m| m.string_match.string.as_str())
+ .collect::<Vec<&str>>(),
+ "set_context_menu_options",
+ "set_placeholder_text",
+ "set_text_style_refinement",
+ "select_to_end_of_excerpt",
+ "select_to_end_of_previous_excerpt",
+ "select_to_next_subword_end",
+ "select_to_next_word_end",
+ "select_to_start_of_excerpt",
+ "select_to_start_of_next_excerpt",
+ ]
+ );
+}
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 28ae2eb7713342..37e1c9c7cda8e4 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -671,7 +671,7 @@ impl CompletionsMenu {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
enum MatchTier<'a> {
WordStartMatch {
- sort_score_int: Reverse<i32>,
+ sort_bucket: Reverse<i32>,
sort_snippet: Reverse<i32>,
sort_text: Option<&'a str>,
sort_key: (usize, &'a str),
@@ -684,11 +684,9 @@ impl CompletionsMenu {
// Our goal here is to intelligently sort completion suggestions. We want to
// balance the raw fuzzy match score with hints from the language server
//
- // We first primary sort using fuzzy score by putting matches into two buckets
- // strong one and weak one. Among these buckets matches are then compared by
+ // We first primary sort using fuzzy score by putting matches into multiple
+ // buckets. Among these buckets matches are then compared by
// various criteria like snippet, LSP hints, kind, label text etc.
- //
- const FUZZY_THRESHOLD: f64 = 0.1317;
let query_start_lower = query
.and_then(|q| q.chars().next())
@@ -712,14 +710,20 @@ impl CompletionsMenu {
let sort_score = Reverse(OrderedFloat(score));
MatchTier::OtherMatch { sort_score }
} else {
+ // Convert fuzzy match score (0.0-1.0) to a priority bucket (0-3)
+ let sort_bucket = Reverse(match (score * 10.0).floor() as i32 {
+ s if s >= 7 => 3,
+ _ => 0,
+ });
let sort_snippet = match snippet_sort_order {
SnippetSortOrder::Top => Reverse(if mat.is_snippet { 1 } else { 0 }),
SnippetSortOrder::Bottom => Reverse(if mat.is_snippet { 0 } else { 1 }),
SnippetSortOrder::Inline => Reverse(0),
};
MatchTier::WordStartMatch {
- sort_score_int,
+ sort_bucket,
sort_snippet,
sort_text: mat.sort_text,
sort_key: mat.sort_key, | [
"+fn test_sort_matches_for_exact_match(_cx: &mut TestAppContext) {",
"+ sort_key: (3, \"set_text_style_refinement\"),",
"+ sort_key: (3, \"set_context_menu_options\"),",
"+ sort_key: (3, \"select_to_next_word_end\"),",
"+ assert_eq!(",
"+ vec![",
"+ \"set_text\",",
"+ \"set_custom_context_menu\"",
"- let sort_score_int = Reverse(if score >= FUZZY_THRESHOLD { 1 } else { 0 });",
"+ s if s >= 1 => 2,",
"+ s if s > 0 => 1,"
] | [
10,
45,
56,
67,
137,
142,
143,
153,
188,
192,
193
] | {
"additions": 160,
"author": "smitbarmase",
"deletions": 7,
"html_url": "https://github.com/zed-industries/zed/pull/29442",
"issue_id": 29442,
"merged_at": "2025-04-25T20:44:18Z",
"omission_probability": 0.1,
"pr_number": 29442,
"repo": "zed-industries/zed",
"title": "editor: Improve fuzzy match bucket logic for code completions",
"total_changes": 167
} |
448 | diff --git a/Cargo.lock b/Cargo.lock
index 7c51eaf7663861..f79af953ccbc12 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -446,6 +446,7 @@ dependencies = [
"anyhow",
"futures 0.3.31",
"gpui",
+ "shlex",
"smol",
"tempfile",
"util",
diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml
index d64ee9f7c35d4d..a2df3b8495acce 100644
--- a/crates/askpass/Cargo.toml
+++ b/crates/askpass/Cargo.toml
@@ -15,6 +15,7 @@ path = "src/askpass.rs"
anyhow.workspace = true
futures.workspace = true
gpui.workspace = true
+shlex.workspace = true
smol.workspace = true
tempfile.workspace = true
util.workspace = true
diff --git a/crates/askpass/src/askpass.rs b/crates/askpass/src/askpass.rs
index a4bdb5edb8e179..b5435ac98e3ecf 100644
--- a/crates/askpass/src/askpass.rs
+++ b/crates/askpass/src/askpass.rs
@@ -72,8 +72,7 @@ impl AskPassSession {
let (askpass_opened_tx, askpass_opened_rx) = oneshot::channel::<()>();
let listener =
UnixListener::bind(&askpass_socket).context("failed to create askpass socket")?;
- let zed_path = std::env::current_exe()
- .context("Failed to figure out current executable path for use in askpass")?;
+ let zed_path = get_shell_safe_zed_path()?;
let (askpass_kill_master_tx, askpass_kill_master_rx) = oneshot::channel::<()>();
let mut kill_tx = Some(askpass_kill_master_tx);
@@ -115,7 +114,7 @@ impl AskPassSession {
// Create an askpass script that communicates back to this process.
let askpass_script = format!(
"{shebang}\n{print_args} | {zed_exe} --askpass={askpass_socket} 2> /dev/null \n",
- zed_exe = zed_path.display(),
+ zed_exe = zed_path,
askpass_socket = askpass_socket.display(),
print_args = "printf '%s\\0' \"$@\"",
shebang = "#!/bin/sh",
@@ -161,6 +160,32 @@ impl AskPassSession {
}
}
+#[cfg(unix)]
+fn get_shell_safe_zed_path() -> anyhow::Result<String> {
+ let zed_path = std::env::current_exe()
+ .context("Failed to figure out current executable path for use in askpass")?
+ .to_string_lossy()
+ .to_string();
+
+ // sanity check on unix systems that the path exists and is executable
+ // todo(windows): implement this check for windows (or just use `is-executable` crate)
+ use std::os::unix::fs::MetadataExt;
+ let metadata = std::fs::metadata(&zed_path)
+ .context("Failed to check metadata of Zed executable path for use in askpass")?;
+ let is_executable = metadata.is_file() && metadata.mode() & 0o111 != 0;
+ anyhow::ensure!(
+ is_executable,
+ "Failed to verify Zed executable path for use in askpass"
+ );
+ // As of writing, this can only be fail if the path contains a null byte, which shouldn't be possible
+ // but shlex has annotated the error as #[non_exhaustive] so we can't make it a compile error if other
+ // errors are introduced in the future :(
+ let zed_path_escaped = shlex::try_quote(&zed_path)
+ .context("Failed to shell-escape Zed executable path for use in askpass")?;
+
+ return Ok(zed_path_escaped.to_string());
+}
+
/// The main function for when Zed is running in netcat mode for use in askpass.
/// Called from both the remote server binary and the zed binary in their respective main functions.
#[cfg(unix)]
| diff --git a/Cargo.lock b/Cargo.lock
index 7c51eaf7663861..f79af953ccbc12 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -446,6 +446,7 @@ dependencies = [
"anyhow",
"futures 0.3.31",
"gpui",
+ "shlex",
"smol",
"tempfile",
"util",
diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml
index d64ee9f7c35d4d..a2df3b8495acce 100644
--- a/crates/askpass/Cargo.toml
+++ b/crates/askpass/Cargo.toml
@@ -15,6 +15,7 @@ path = "src/askpass.rs"
anyhow.workspace = true
futures.workspace = true
gpui.workspace = true
+shlex.workspace = true
smol.workspace = true
tempfile.workspace = true
util.workspace = true
diff --git a/crates/askpass/src/askpass.rs b/crates/askpass/src/askpass.rs
index a4bdb5edb8e179..b5435ac98e3ecf 100644
--- a/crates/askpass/src/askpass.rs
+++ b/crates/askpass/src/askpass.rs
@@ -72,8 +72,7 @@ impl AskPassSession {
let (askpass_opened_tx, askpass_opened_rx) = oneshot::channel::<()>();
let listener =
UnixListener::bind(&askpass_socket).context("failed to create askpass socket")?;
- .context("Failed to figure out current executable path for use in askpass")?;
+ let zed_path = get_shell_safe_zed_path()?;
let (askpass_kill_master_tx, askpass_kill_master_rx) = oneshot::channel::<()>();
let mut kill_tx = Some(askpass_kill_master_tx);
@@ -115,7 +114,7 @@ impl AskPassSession {
// Create an askpass script that communicates back to this process.
let askpass_script = format!(
"{shebang}\n{print_args} | {zed_exe} --askpass={askpass_socket} 2> /dev/null \n",
- zed_exe = zed_path.display(),
+ zed_exe = zed_path,
askpass_socket = askpass_socket.display(),
print_args = "printf '%s\\0' \"$@\"",
shebang = "#!/bin/sh",
@@ -161,6 +160,32 @@ impl AskPassSession {
}
}
+#[cfg(unix)]
+fn get_shell_safe_zed_path() -> anyhow::Result<String> {
+ .context("Failed to figure out current executable path for use in askpass")?
+ .to_string_lossy()
+ .to_string();
+ // sanity check on unix systems that the path exists and is executable
+ // todo(windows): implement this check for windows (or just use `is-executable` crate)
+ use std::os::unix::fs::MetadataExt;
+ let metadata = std::fs::metadata(&zed_path)
+ .context("Failed to check metadata of Zed executable path for use in askpass")?;
+ let is_executable = metadata.is_file() && metadata.mode() & 0o111 != 0;
+ anyhow::ensure!(
+ is_executable,
+ "Failed to verify Zed executable path for use in askpass"
+ );
+ // but shlex has annotated the error as #[non_exhaustive] so we can't make it a compile error if other
+ // errors are introduced in the future :(
+ let zed_path_escaped = shlex::try_quote(&zed_path)
+ return Ok(zed_path_escaped.to_string());
/// The main function for when Zed is running in netcat mode for use in askpass.
/// Called from both the remote server binary and the zed binary in their respective main functions.
#[cfg(unix)] | [
"- let zed_path = std::env::current_exe()",
"+ let zed_path = std::env::current_exe()",
"+ // As of writing, this can only be fail if the path contains a null byte, which shouldn't be possible",
"+ .context(\"Failed to shell-escape Zed executable path for use in askpass\")?;",
"+}"
] | [
32,
53,
68,
72,
75
] | {
"additions": 30,
"author": "probably-neb",
"deletions": 3,
"html_url": "https://github.com/zed-industries/zed/pull/29447",
"issue_id": 29447,
"merged_at": "2025-04-25T21:16:43Z",
"omission_probability": 0.1,
"pr_number": 29447,
"repo": "zed-industries/zed",
"title": "askpass: Shell escape Zed path in askpass script",
"total_changes": 33
} |
449 | diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs
index 3a68546adbcfd7..25c1ea3f8fc778 100644
--- a/crates/agent/src/message_editor.rs
+++ b/crates/agent/src/message_editor.rs
@@ -20,7 +20,9 @@ use gpui::{
Task, TextStyle, WeakEntity, linear_color_stop, linear_gradient, point, pulsating_between,
};
use language::{Buffer, Language};
-use language_model::{ConfiguredModel, LanguageModelRegistry, LanguageModelRequestMessage};
+use language_model::{
+ ConfiguredModel, LanguageModelRegistry, LanguageModelRequestMessage, MessageContent,
+};
use language_model_selector::ToggleModelSelector;
use multi_buffer;
use project::Project;
@@ -1089,6 +1091,12 @@ impl MessageEditor {
loaded_context.add_to_request_message(&mut request_message);
}
+ if !message_text.is_empty() {
+ request_message
+ .content
+ .push(MessageContent::Text(message_text));
+ }
+
let request = language_model::LanguageModelRequest {
thread_id: None,
prompt_id: None,
| diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs
index 3a68546adbcfd7..25c1ea3f8fc778 100644
--- a/crates/agent/src/message_editor.rs
+++ b/crates/agent/src/message_editor.rs
@@ -20,7 +20,9 @@ use gpui::{
Task, TextStyle, WeakEntity, linear_color_stop, linear_gradient, point, pulsating_between,
};
use language::{Buffer, Language};
-use language_model::{ConfiguredModel, LanguageModelRegistry, LanguageModelRequestMessage};
+use language_model::{
+ ConfiguredModel, LanguageModelRegistry, LanguageModelRequestMessage, MessageContent,
+};
use language_model_selector::ToggleModelSelector;
use multi_buffer;
use project::Project;
@@ -1089,6 +1091,12 @@ impl MessageEditor {
loaded_context.add_to_request_message(&mut request_message);
}
+ if !message_text.is_empty() {
+ request_message
+ .content
+ .push(MessageContent::Text(message_text));
+ }
let request = language_model::LanguageModelRequest {
thread_id: None,
prompt_id: None, | [
"+"
] | [
24
] | {
"additions": 9,
"author": "mgsloan",
"deletions": 1,
"html_url": "https://github.com/zed-industries/zed/pull/29443",
"issue_id": 29443,
"merged_at": "2025-04-25T20:21:20Z",
"omission_probability": 0.1,
"pr_number": 29443,
"repo": "zed-industries/zed",
"title": "Fix inclusion of message when counting tokens from message editor",
"total_changes": 10
} |
450 | diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index f93af157c18157..245a4801e693de 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -30,7 +30,7 @@ use language_model::{
};
use markdown::parser::{CodeBlockKind, CodeBlockMetadata};
use markdown::{HeadingLevelStyles, Markdown, MarkdownElement, MarkdownStyle, ParsedMarkdown};
-use project::ProjectItem as _;
+use project::{ProjectEntryId, ProjectItem as _};
use rope::Point;
use settings::{Settings as _, update_settings_file};
use std::path::Path;
@@ -44,7 +44,7 @@ use ui::{
};
use util::ResultExt as _;
use util::markdown::MarkdownString;
-use workspace::{OpenOptions, Workspace};
+use workspace::Workspace;
use zed_actions::assistant::OpenRulesLibrary;
pub struct ActiveThread {
@@ -3039,21 +3039,30 @@ impl ActiveThread {
return;
};
- let abs_paths = project_context
+ let project_entry_ids = project_context
.worktrees
.iter()
.flat_map(|worktree| worktree.rules_file.as_ref())
- .map(|rules_file| rules_file.abs_path.to_path_buf())
+ .map(|rules_file| ProjectEntryId::from_usize(rules_file.project_entry_id))
.collect::<Vec<_>>();
- if let Ok(task) = self.workspace.update(cx, move |workspace, cx| {
- // TODO: Open a multibuffer instead? In some cases this doesn't make the set of rules
- // files clear. For example, if rules file 1 is already open but rules file 2 is not,
- // this would open and focus rules file 2 in a tab that is not next to rules file 1.
- workspace.open_paths(abs_paths, OpenOptions::default(), None, window, cx)
- }) {
- task.detach();
- }
+ self.workspace
+ .update(cx, move |workspace, cx| {
+ // TODO: Open a multibuffer instead? In some cases this doesn't make the set of rules
+ // files clear. For example, if rules file 1 is already open but rules file 2 is not,
+ // this would open and focus rules file 2 in a tab that is not next to rules file 1.
+ let project = workspace.project().read(cx);
+ let project_paths = project_entry_ids
+ .into_iter()
+ .flat_map(|entry_id| project.path_for_entry(entry_id, cx))
+ .collect::<Vec<_>>();
+ for project_path in project_paths {
+ workspace
+ .open_path(project_path, None, true, window, cx)
+ .detach_and_log_err(cx);
+ }
+ })
+ .ok();
}
fn dismiss_notifications(&mut self, cx: &mut Context<ActiveThread>) {
diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rs
index 6f7ee0b7c97c84..9b42737be67ddd 100644
--- a/crates/agent/src/thread_store.rs
+++ b/crates/agent/src/thread_store.rs
@@ -11,7 +11,6 @@ use chrono::{DateTime, Utc};
use collections::HashMap;
use context_server::manager::ContextServerManager;
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
-use fs::Fs;
use futures::channel::{mpsc, oneshot};
use futures::future::{self, BoxFuture, Shared};
use futures::{FutureExt as _, StreamExt as _};
@@ -22,7 +21,7 @@ use gpui::{
use heed::Database;
use heed::types::SerdeBincode;
use language_model::{LanguageModelToolUseId, Role, TokenUsage};
-use project::{Project, Worktree};
+use project::{Project, ProjectItem, ProjectPath, Worktree};
use prompt_store::{
ProjectContext, PromptBuilder, PromptId, PromptStore, PromptsUpdatedEvent, RulesFileContext,
UserRulesContext, WorktreeContext,
@@ -207,15 +206,15 @@ impl ThreadStore {
prompt_store: Option<Entity<PromptStore>>,
cx: &mut Context<Self>,
) -> Task<()> {
- let project = self.project.read(cx);
- let worktree_tasks = project
+ let worktrees = self
+ .project
+ .read(cx)
.visible_worktrees(cx)
+ .collect::<Vec<_>>();
+ let worktree_tasks = worktrees
+ .into_iter()
.map(|worktree| {
- Self::load_worktree_info_for_system_prompt(
- project.fs().clone(),
- worktree.read(cx),
- cx,
- )
+ Self::load_worktree_info_for_system_prompt(worktree, self.project.clone(), cx)
})
.collect::<Vec<_>>();
let default_user_rules_task = match prompt_store {
@@ -276,13 +275,13 @@ impl ThreadStore {
}
fn load_worktree_info_for_system_prompt(
- fs: Arc<dyn Fs>,
- worktree: &Worktree,
- cx: &App,
+ worktree: Entity<Worktree>,
+ project: Entity<Project>,
+ cx: &mut App,
) -> Task<(WorktreeContext, Option<RulesLoadingError>)> {
- let root_name = worktree.root_name().into();
+ let root_name = worktree.read(cx).root_name().into();
- let rules_task = Self::load_worktree_rules_file(fs, worktree, cx);
+ let rules_task = Self::load_worktree_rules_file(worktree, project, cx);
let Some(rules_task) = rules_task else {
return Task::ready((
WorktreeContext {
@@ -312,33 +311,44 @@ impl ThreadStore {
}
fn load_worktree_rules_file(
- fs: Arc<dyn Fs>,
- worktree: &Worktree,
- cx: &App,
+ worktree: Entity<Worktree>,
+ project: Entity<Project>,
+ cx: &mut App,
) -> Option<Task<Result<RulesFileContext>>> {
+ let worktree_ref = worktree.read(cx);
+ let worktree_id = worktree_ref.id();
let selected_rules_file = RULES_FILE_NAMES
.into_iter()
.filter_map(|name| {
- worktree
+ worktree_ref
.entry_for_path(name)
.filter(|entry| entry.is_file())
- .map(|entry| (entry.path.clone(), worktree.absolutize(&entry.path)))
+ .map(|entry| entry.path.clone())
})
.next();
// Note that Cline supports `.clinerules` being a directory, but that is not currently
// supported. This doesn't seem to occur often in GitHub repositories.
- selected_rules_file.map(|(path_in_worktree, abs_path)| {
- let fs = fs.clone();
+ selected_rules_file.map(|path_in_worktree| {
+ let project_path = ProjectPath {
+ worktree_id,
+ path: path_in_worktree.clone(),
+ };
+ let buffer_task =
+ project.update(cx, |project, cx| project.open_buffer(project_path, cx));
+ let rope_task = cx.spawn(async move |cx| {
+ buffer_task.await?.read_with(cx, |buffer, cx| {
+ let project_entry_id = buffer.entry_id(cx).context("buffer has no file")?;
+ anyhow::Ok((project_entry_id, buffer.as_rope().clone()))
+ })?
+ });
+ // Build a string from the rope on a background thread.
cx.background_spawn(async move {
- let abs_path = abs_path?;
- let text = fs.load(&abs_path).await.with_context(|| {
- format!("Failed to load assistant rules file {:?}", abs_path)
- })?;
+ let (project_entry_id, rope) = rope_task.await?;
anyhow::Ok(RulesFileContext {
path_in_worktree,
- abs_path: abs_path.into(),
- text: text.trim().to_string(),
+ text: rope.to_string().trim().to_string(),
+ project_entry_id: project_entry_id.to_usize(),
})
})
})
diff --git a/crates/prompt_store/src/prompts.rs b/crates/prompt_store/src/prompts.rs
index 35430e8f063336..0a53957e3666fb 100644
--- a/crates/prompt_store/src/prompts.rs
+++ b/crates/prompt_store/src/prompts.rs
@@ -64,8 +64,11 @@ pub struct WorktreeContext {
#[derive(Debug, Clone, Serialize)]
pub struct RulesFileContext {
pub path_in_worktree: Arc<Path>,
- pub abs_path: Arc<Path>,
pub text: String,
+ // This used for opening rules files. TODO: Since it isn't related to prompt templating, this
+ // should be moved elsewhere.
+ #[serde(skip)]
+ pub project_entry_id: usize,
}
#[derive(Serialize)]
@@ -403,8 +406,8 @@ mod test {
root_name: "path".into(),
rules_file: Some(RulesFileContext {
path_in_worktree: Path::new(".rules").into(),
- abs_path: Path::new("/some/path/.rules").into(),
text: "".into(),
+ project_entry_id: 0,
}),
}];
let default_user_rules = vec![UserRulesContext {
diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs
index b00b1d6b63b5e5..a114f384ba119f 100644
--- a/crates/worktree/src/worktree.rs
+++ b/crates/worktree/src/worktree.rs
@@ -5549,6 +5549,10 @@ impl ProjectEntryId {
self.0 as u64
}
+ pub fn from_usize(id: usize) -> Self {
+ ProjectEntryId(id)
+ }
+
pub fn to_usize(&self) -> usize {
self.0
}
| diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index f93af157c18157..245a4801e693de 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -30,7 +30,7 @@ use language_model::{
use markdown::parser::{CodeBlockKind, CodeBlockMetadata};
use markdown::{HeadingLevelStyles, Markdown, MarkdownElement, MarkdownStyle, ParsedMarkdown};
-use project::ProjectItem as _;
use rope::Point;
use settings::{Settings as _, update_settings_file};
use std::path::Path;
@@ -44,7 +44,7 @@ use ui::{
use util::ResultExt as _;
use util::markdown::MarkdownString;
-use workspace::{OpenOptions, Workspace};
+use workspace::Workspace;
use zed_actions::assistant::OpenRulesLibrary;
pub struct ActiveThread {
@@ -3039,21 +3039,30 @@ impl ActiveThread {
return;
};
- let abs_paths = project_context
+ let project_entry_ids = project_context
.worktrees
.iter()
.flat_map(|worktree| worktree.rules_file.as_ref())
- .map(|rules_file| rules_file.abs_path.to_path_buf())
+ .map(|rules_file| ProjectEntryId::from_usize(rules_file.project_entry_id))
- if let Ok(task) = self.workspace.update(cx, move |workspace, cx| {
- // TODO: Open a multibuffer instead? In some cases this doesn't make the set of rules
- // files clear. For example, if rules file 1 is already open but rules file 2 is not,
- // this would open and focus rules file 2 in a tab that is not next to rules file 1.
- workspace.open_paths(abs_paths, OpenOptions::default(), None, window, cx)
- }) {
- task.detach();
- }
+ .update(cx, move |workspace, cx| {
+ // TODO: Open a multibuffer instead? In some cases this doesn't make the set of rules
+ // files clear. For example, if rules file 1 is already open but rules file 2 is not,
+ // this would open and focus rules file 2 in a tab that is not next to rules file 1.
+ let project_paths = project_entry_ids
+ .into_iter()
+ .flat_map(|entry_id| project.path_for_entry(entry_id, cx))
+ .collect::<Vec<_>>();
+ for project_path in project_paths {
+ workspace
+ .open_path(project_path, None, true, window, cx)
+ .detach_and_log_err(cx);
+ }
+ })
+ .ok();
fn dismiss_notifications(&mut self, cx: &mut Context<ActiveThread>) {
diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rs
index 6f7ee0b7c97c84..9b42737be67ddd 100644
--- a/crates/agent/src/thread_store.rs
+++ b/crates/agent/src/thread_store.rs
@@ -11,7 +11,6 @@ use chrono::{DateTime, Utc};
use collections::HashMap;
use context_server::manager::ContextServerManager;
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
-use fs::Fs;
use futures::channel::{mpsc, oneshot};
use futures::future::{self, BoxFuture, Shared};
use futures::{FutureExt as _, StreamExt as _};
@@ -22,7 +21,7 @@ use gpui::{
use heed::Database;
use heed::types::SerdeBincode;
use language_model::{LanguageModelToolUseId, Role, TokenUsage};
-use project::{Project, Worktree};
+use project::{Project, ProjectItem, ProjectPath, Worktree};
use prompt_store::{
ProjectContext, PromptBuilder, PromptId, PromptStore, PromptsUpdatedEvent, RulesFileContext,
UserRulesContext, WorktreeContext,
@@ -207,15 +206,15 @@ impl ThreadStore {
prompt_store: Option<Entity<PromptStore>>,
cx: &mut Context<Self>,
) -> Task<()> {
- let project = self.project.read(cx);
- let worktree_tasks = project
+ .read(cx)
.visible_worktrees(cx)
+ let worktree_tasks = worktrees
+ .into_iter()
.map(|worktree| {
- Self::load_worktree_info_for_system_prompt(
- project.fs().clone(),
- worktree.read(cx),
- cx,
- )
+ Self::load_worktree_info_for_system_prompt(worktree, self.project.clone(), cx)
let default_user_rules_task = match prompt_store {
@@ -276,13 +275,13 @@ impl ThreadStore {
fn load_worktree_info_for_system_prompt(
) -> Task<(WorktreeContext, Option<RulesLoadingError>)> {
- let root_name = worktree.root_name().into();
+ let root_name = worktree.read(cx).root_name().into();
- let rules_task = Self::load_worktree_rules_file(fs, worktree, cx);
+ let rules_task = Self::load_worktree_rules_file(worktree, project, cx);
let Some(rules_task) = rules_task else {
return Task::ready((
WorktreeContext {
@@ -312,33 +311,44 @@ impl ThreadStore {
fn load_worktree_rules_file(
) -> Option<Task<Result<RulesFileContext>>> {
+ let worktree_ref = worktree.read(cx);
+ let worktree_id = worktree_ref.id();
let selected_rules_file = RULES_FILE_NAMES
.into_iter()
.filter_map(|name| {
- worktree
+ worktree_ref
.entry_for_path(name)
.filter(|entry| entry.is_file())
- .map(|entry| (entry.path.clone(), worktree.absolutize(&entry.path)))
+ .map(|entry| entry.path.clone())
.next();
// Note that Cline supports `.clinerules` being a directory, but that is not currently
// supported. This doesn't seem to occur often in GitHub repositories.
- selected_rules_file.map(|(path_in_worktree, abs_path)| {
- let fs = fs.clone();
+ selected_rules_file.map(|path_in_worktree| {
+ let project_path = ProjectPath {
+ worktree_id,
+ path: path_in_worktree.clone(),
+ };
+ let buffer_task =
+ project.update(cx, |project, cx| project.open_buffer(project_path, cx));
+ let rope_task = cx.spawn(async move |cx| {
+ buffer_task.await?.read_with(cx, |buffer, cx| {
+ let project_entry_id = buffer.entry_id(cx).context("buffer has no file")?;
+ anyhow::Ok((project_entry_id, buffer.as_rope().clone()))
+ })?
+ });
+ // Build a string from the rope on a background thread.
cx.background_spawn(async move {
- let text = fs.load(&abs_path).await.with_context(|| {
- format!("Failed to load assistant rules file {:?}", abs_path)
- })?;
+ let (project_entry_id, rope) = rope_task.await?;
anyhow::Ok(RulesFileContext {
path_in_worktree,
- abs_path: abs_path.into(),
- text: text.trim().to_string(),
+ text: rope.to_string().trim().to_string(),
+ project_entry_id: project_entry_id.to_usize(),
})
})
diff --git a/crates/prompt_store/src/prompts.rs b/crates/prompt_store/src/prompts.rs
index 35430e8f063336..0a53957e3666fb 100644
--- a/crates/prompt_store/src/prompts.rs
+++ b/crates/prompt_store/src/prompts.rs
@@ -64,8 +64,11 @@ pub struct WorktreeContext {
#[derive(Debug, Clone, Serialize)]
pub struct RulesFileContext {
pub path_in_worktree: Arc<Path>,
- pub abs_path: Arc<Path>,
pub text: String,
+ // This used for opening rules files. TODO: Since it isn't related to prompt templating, this
+ // should be moved elsewhere.
+ #[serde(skip)]
+ pub project_entry_id: usize,
}
#[derive(Serialize)]
@@ -403,8 +406,8 @@ mod test {
root_name: "path".into(),
rules_file: Some(RulesFileContext {
path_in_worktree: Path::new(".rules").into(),
- abs_path: Path::new("/some/path/.rules").into(),
text: "".into(),
+ project_entry_id: 0,
}),
}];
let default_user_rules = vec![UserRulesContext {
diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs
index b00b1d6b63b5e5..a114f384ba119f 100644
--- a/crates/worktree/src/worktree.rs
+++ b/crates/worktree/src/worktree.rs
@@ -5549,6 +5549,10 @@ impl ProjectEntryId {
self.0 as u64
+ pub fn from_usize(id: usize) -> Self {
+ ProjectEntryId(id)
+
pub fn to_usize(&self) -> usize {
self.0 | [
"+use project::{ProjectEntryId, ProjectItem as _};",
"+ self.workspace",
"+ let project = workspace.project().read(cx);",
"+ let worktrees = self",
"+ .project",
"+ .collect::<Vec<_>>();",
"- let abs_path = abs_path?;",
"+ }"
] | [
9,
43,
48,
90,
91,
94,
170,
221
] | {
"additions": 67,
"author": "mgsloan",
"deletions": 41,
"html_url": "https://github.com/zed-industries/zed/pull/29440",
"issue_id": 29440,
"merged_at": "2025-04-25T20:06:40Z",
"omission_probability": 0.1,
"pr_number": 29440,
"repo": "zed-industries/zed",
"title": "Fix agent rules files for remote project by loading via buffer",
"total_changes": 108
} |
451 | diff --git a/crates/debugger_ui/src/tests/attach_modal.rs b/crates/debugger_ui/src/tests/attach_modal.rs
index d5d211537625b4..bdcf98a5d967ce 100644
--- a/crates/debugger_ui/src/tests/attach_modal.rs
+++ b/crates/debugger_ui/src/tests/attach_modal.rs
@@ -1,6 +1,6 @@
use crate::{attach_modal::Candidate, tests::start_debug_session_with, *};
use attach_modal::AttachModal;
-use dap::{FakeAdapter, client::SessionId};
+use dap::FakeAdapter;
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
use menu::Confirm;
use project::{FakeFs, Project};
@@ -176,14 +176,4 @@ async fn test_show_attach_modal_and_select_process(
assert!(workspace.active_modal::<AttachModal>(cx).is_none());
})
.unwrap();
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- let session = dap_store.session_by_id(SessionId(0)).unwrap();
-
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
diff --git a/crates/debugger_ui/src/tests/console.rs b/crates/debugger_ui/src/tests/console.rs
index 534cf1320eff4c..8f25373a1be2f5 100644
--- a/crates/debugger_ui/src/tests/console.rs
+++ b/crates/debugger_ui/src/tests/console.rs
@@ -157,14 +157,6 @@ async fn test_handle_output_event(executor: BackgroundExecutor, cx: &mut TestApp
);
})
.unwrap();
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
// #[gpui::test]
diff --git a/crates/debugger_ui/src/tests/dap_logger.rs b/crates/debugger_ui/src/tests/dap_logger.rs
index 3767d05073bf99..d2f5a86369519d 100644
--- a/crates/debugger_ui/src/tests/dap_logger.rs
+++ b/crates/debugger_ui/src/tests/dap_logger.rs
@@ -103,16 +103,4 @@ async fn test_dap_logger_captures_all_session_rpc_messages(
hit_breakpoint_ids: None,
}))
.await;
-
- cx.run_until_parked();
-
- // Shutdown the debug session
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
- cx.run_until_parked();
}
diff --git a/crates/debugger_ui/src/tests/debugger_panel.rs b/crates/debugger_ui/src/tests/debugger_panel.rs
index 60760dcb8934dc..7c20646cd3ecea 100644
--- a/crates/debugger_ui/src/tests/debugger_panel.rs
+++ b/crates/debugger_ui/src/tests/debugger_panel.rs
@@ -403,14 +403,6 @@ async fn test_handle_successful_run_in_terminal_reverse_request(
);
})
.unwrap();
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -483,14 +475,6 @@ async fn test_handle_start_debugging_request(
.unwrap();
assert_eq!(&fake_config, launched_with.lock().as_ref().unwrap());
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
// // covers that we always send a response back, if something when wrong,
@@ -561,14 +545,6 @@ async fn test_handle_error_run_in_terminal_reverse_request(
);
})
.unwrap();
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -667,14 +643,6 @@ async fn test_handle_start_debugging_reverse_request(
send_response.load(std::sync::atomic::Ordering::SeqCst),
"Expected to receive response from reverse request"
);
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(child_session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -1098,14 +1066,6 @@ async fn test_debug_panel_item_thread_status_reset_on_failure(
.update(cx, |session, cx| session.continue_thread(thread_id, cx));
});
}
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -1261,14 +1221,6 @@ async fn test_send_breakpoints_when_editor_has_been_saved(
called_set_breakpoints.load(std::sync::atomic::Ordering::SeqCst),
"SetBreakpoint request must be called after editor is saved"
);
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -1388,14 +1340,6 @@ async fn test_unsetting_breakpoints_on_clear_breakpoint_action(
cx.dispatch_action(crate::ClearAllBreakpoints);
cx.run_until_parked();
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
diff --git a/crates/debugger_ui/src/tests/module_list.rs b/crates/debugger_ui/src/tests/module_list.rs
index d2c0ca4c106e9f..b84abe437369b4 100644
--- a/crates/debugger_ui/src/tests/module_list.rs
+++ b/crates/debugger_ui/src/tests/module_list.rs
@@ -214,12 +214,4 @@ async fn test_module_list(executor: BackgroundExecutor, cx: &mut TestAppContext)
assert_eq!(actual_modules.len(), 2);
assert!(!actual_modules.contains(&changed_module));
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
diff --git a/crates/debugger_ui/src/tests/stack_frame_list.rs b/crates/debugger_ui/src/tests/stack_frame_list.rs
index 44284e220d7ee5..02b2e3ac635855 100644
--- a/crates/debugger_ui/src/tests/stack_frame_list.rs
+++ b/crates/debugger_ui/src/tests/stack_frame_list.rs
@@ -182,14 +182,6 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
assert_eq!(stack_frames, stack_frame_list.dap_stack_frames(cx));
});
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -450,14 +442,6 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
})
);
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -807,12 +791,4 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
);
});
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
diff --git a/crates/debugger_ui/src/tests/variable_list.rs b/crates/debugger_ui/src/tests/variable_list.rs
index 5abb422ac7bcc3..ca8a425ef8358d 100644
--- a/crates/debugger_ui/src/tests/variable_list.rs
+++ b/crates/debugger_ui/src/tests/variable_list.rs
@@ -215,14 +215,6 @@ async fn test_basic_fetch_initial_scope_and_variables(
]);
});
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
/// This tests fetching multiple scopes and variables for them with a single stackframe
@@ -479,14 +471,6 @@ async fn test_fetch_variables_for_multiple_scopes(
]);
});
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
// tests that toggling a variable will fetch its children and shows it
@@ -1261,14 +1245,6 @@ async fn test_keyboard_navigation(executor: BackgroundExecutor, cx: &mut TestApp
variable_list.assert_visual_entries(vec!["> Scope 1 <=== selected", "> Scope 2"]);
});
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -1501,14 +1477,6 @@ async fn test_variable_list_only_sends_requests_when_rendering(
assert_eq!(frame_1_variables, variable_list.variables());
assert!(made_scopes_request.load(Ordering::SeqCst));
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
#[gpui::test]
@@ -1854,12 +1822,4 @@ async fn test_it_fetches_scopes_variables_when_you_select_a_stack_frame(
assert_eq!(variables, frame_2_variables,);
});
-
- let shutdown_session = project.update(cx, |project, cx| {
- project.dap_store().update(cx, |dap_store, cx| {
- dap_store.shutdown_session(session.read(cx).session_id(), cx)
- })
- });
-
- shutdown_session.await.unwrap();
}
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index 5861825acdb2d4..2f586a5c5c126c 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -28,7 +28,7 @@ use http_client::HttpClient;
use smallvec::SmallVec;
#[cfg(any(test, feature = "test-support"))]
pub use test_context::*;
-use util::ResultExt;
+use util::{ResultExt, debug_panic};
use crate::{
Action, ActionBuildError, ActionRegistry, Any, AnyView, AnyWindowHandle, AppContext, Asset,
@@ -271,6 +271,7 @@ pub struct App {
pub(crate) tracked_entities: FxHashMap<WindowId, FxHashSet<EntityId>>,
#[cfg(any(test, feature = "test-support", debug_assertions))]
pub(crate) name: Option<&'static str>,
+ quitting: bool,
}
impl App {
@@ -332,6 +333,7 @@ impl App {
layout_id_buffer: Default::default(),
propagate_event: true,
prompt_builder: Some(PromptBuilder::Default),
+ quitting: false,
#[cfg(any(test, feature = "test-support", debug_assertions))]
name: None,
@@ -375,6 +377,7 @@ impl App {
self.windows.clear();
self.window_handles.clear();
self.flush_effects();
+ self.quitting = true;
let futures = futures::future::join_all(futures);
if self
@@ -384,6 +387,8 @@ impl App {
{
log::error!("timed out waiting on app_will_quit");
}
+
+ self.quitting = false;
}
/// Get the id of the current keyboard layout
@@ -1049,6 +1054,9 @@ impl App {
/// Obtains a reference to the executor, which can be used to spawn futures.
pub fn foreground_executor(&self) -> &ForegroundExecutor {
+ if self.quitting {
+ panic!("Can't spawn on main thread after on_app_quit")
+ };
&self.foreground_executor
}
@@ -1060,7 +1068,12 @@ impl App {
AsyncFn: AsyncFnOnce(&mut AsyncApp) -> R + 'static,
R: 'static,
{
+ if self.quitting {
+ debug_panic!("Can't spawn on main thread after on_app_quit")
+ };
+
let mut cx = self.to_async();
+
self.foreground_executor
.spawn(async move { f(&mut cx).await })
}
diff --git a/crates/project/src/debugger/dap_store.rs b/crates/project/src/debugger/dap_store.rs
index c0bf4bb1dd5efe..c2b47ce5ac289f 100644
--- a/crates/project/src/debugger/dap_store.rs
+++ b/crates/project/src/debugger/dap_store.rs
@@ -134,8 +134,6 @@ impl DapStore {
breakpoint_store: Entity<BreakpointStore>,
cx: &mut Context<Self>,
) -> Self {
- cx.on_app_quit(Self::shutdown_sessions).detach();
-
let locators = HashMap::from_iter([(
"cargo".to_string(),
Arc::new(super::locators::cargo::CargoLocator {}) as _,
diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs
index dde153d9b0b349..ac6f0ad2ec5be6 100644
--- a/crates/project/src/debugger/session.rs
+++ b/crates/project/src/debugger/session.rs
@@ -700,6 +700,7 @@ impl Session {
BreakpointStoreEvent::ActiveDebugLineChanged => {}
})
.detach();
+ cx.on_app_quit(Self::on_app_quit).detach();
let this = Self {
mode: Mode::Building,
@@ -1510,6 +1511,16 @@ impl Session {
}
}
+ fn on_app_quit(&mut self, cx: &mut Context<Self>) -> Task<()> {
+ let debug_adapter = self.adapter_client();
+
+ cx.background_spawn(async move {
+ if let Some(client) = debug_adapter {
+ client.shutdown().await.log_err();
+ }
+ })
+ }
+
pub fn shutdown(&mut self, cx: &mut Context<Self>) -> Task<()> {
self.is_session_terminated = true;
self.thread_states.exit_all_threads();
| diff --git a/crates/debugger_ui/src/tests/attach_modal.rs b/crates/debugger_ui/src/tests/attach_modal.rs
index d5d211537625b4..bdcf98a5d967ce 100644
--- a/crates/debugger_ui/src/tests/attach_modal.rs
+++ b/crates/debugger_ui/src/tests/attach_modal.rs
@@ -1,6 +1,6 @@
use crate::{attach_modal::Candidate, tests::start_debug_session_with, *};
use attach_modal::AttachModal;
+use dap::FakeAdapter;
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
use menu::Confirm;
use project::{FakeFs, Project};
@@ -176,14 +176,4 @@ async fn test_show_attach_modal_and_select_process(
assert!(workspace.active_modal::<AttachModal>(cx).is_none());
- let session = dap_store.session_by_id(SessionId(0)).unwrap();
diff --git a/crates/debugger_ui/src/tests/console.rs b/crates/debugger_ui/src/tests/console.rs
index 534cf1320eff4c..8f25373a1be2f5 100644
--- a/crates/debugger_ui/src/tests/console.rs
+++ b/crates/debugger_ui/src/tests/console.rs
@@ -157,14 +157,6 @@ async fn test_handle_output_event(executor: BackgroundExecutor, cx: &mut TestApp
// #[gpui::test]
diff --git a/crates/debugger_ui/src/tests/dap_logger.rs b/crates/debugger_ui/src/tests/dap_logger.rs
index 3767d05073bf99..d2f5a86369519d 100644
--- a/crates/debugger_ui/src/tests/dap_logger.rs
+++ b/crates/debugger_ui/src/tests/dap_logger.rs
@@ -103,16 +103,4 @@ async fn test_dap_logger_captures_all_session_rpc_messages(
hit_breakpoint_ids: None,
}))
.await;
- // Shutdown the debug session
diff --git a/crates/debugger_ui/src/tests/debugger_panel.rs b/crates/debugger_ui/src/tests/debugger_panel.rs
index 60760dcb8934dc..7c20646cd3ecea 100644
--- a/crates/debugger_ui/src/tests/debugger_panel.rs
+++ b/crates/debugger_ui/src/tests/debugger_panel.rs
@@ -403,14 +403,6 @@ async fn test_handle_successful_run_in_terminal_reverse_request(
@@ -483,14 +475,6 @@ async fn test_handle_start_debugging_request(
assert_eq!(&fake_config, launched_with.lock().as_ref().unwrap());
// // covers that we always send a response back, if something when wrong,
@@ -561,14 +545,6 @@ async fn test_handle_error_run_in_terminal_reverse_request(
@@ -667,14 +643,6 @@ async fn test_handle_start_debugging_reverse_request(
send_response.load(std::sync::atomic::Ordering::SeqCst),
"Expected to receive response from reverse request"
- dap_store.shutdown_session(child_session.read(cx).session_id(), cx)
@@ -1098,14 +1066,6 @@ async fn test_debug_panel_item_thread_status_reset_on_failure(
.update(cx, |session, cx| session.continue_thread(thread_id, cx));
@@ -1261,14 +1221,6 @@ async fn test_send_breakpoints_when_editor_has_been_saved(
called_set_breakpoints.load(std::sync::atomic::Ordering::SeqCst),
"SetBreakpoint request must be called after editor is saved"
@@ -1388,14 +1340,6 @@ async fn test_unsetting_breakpoints_on_clear_breakpoint_action(
cx.dispatch_action(crate::ClearAllBreakpoints);
cx.run_until_parked();
diff --git a/crates/debugger_ui/src/tests/module_list.rs b/crates/debugger_ui/src/tests/module_list.rs
index d2c0ca4c106e9f..b84abe437369b4 100644
--- a/crates/debugger_ui/src/tests/module_list.rs
+++ b/crates/debugger_ui/src/tests/module_list.rs
@@ -214,12 +214,4 @@ async fn test_module_list(executor: BackgroundExecutor, cx: &mut TestAppContext)
assert_eq!(actual_modules.len(), 2);
assert!(!actual_modules.contains(&changed_module));
diff --git a/crates/debugger_ui/src/tests/stack_frame_list.rs b/crates/debugger_ui/src/tests/stack_frame_list.rs
index 44284e220d7ee5..02b2e3ac635855 100644
--- a/crates/debugger_ui/src/tests/stack_frame_list.rs
+++ b/crates/debugger_ui/src/tests/stack_frame_list.rs
@@ -182,14 +182,6 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
assert_eq!(stack_frames, stack_frame_list.dap_stack_frames(cx));
@@ -450,14 +442,6 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
);
@@ -807,12 +791,4 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
diff --git a/crates/debugger_ui/src/tests/variable_list.rs b/crates/debugger_ui/src/tests/variable_list.rs
index 5abb422ac7bcc3..ca8a425ef8358d 100644
--- a/crates/debugger_ui/src/tests/variable_list.rs
+++ b/crates/debugger_ui/src/tests/variable_list.rs
@@ -215,14 +215,6 @@ async fn test_basic_fetch_initial_scope_and_variables(
/// This tests fetching multiple scopes and variables for them with a single stackframe
@@ -479,14 +471,6 @@ async fn test_fetch_variables_for_multiple_scopes(
// tests that toggling a variable will fetch its children and shows it
@@ -1261,14 +1245,6 @@ async fn test_keyboard_navigation(executor: BackgroundExecutor, cx: &mut TestApp
variable_list.assert_visual_entries(vec!["> Scope 1 <=== selected", "> Scope 2"]);
@@ -1501,14 +1477,6 @@ async fn test_variable_list_only_sends_requests_when_rendering(
assert_eq!(frame_1_variables, variable_list.variables());
assert!(made_scopes_request.load(Ordering::SeqCst));
@@ -1854,12 +1822,4 @@ async fn test_it_fetches_scopes_variables_when_you_select_a_stack_frame(
assert_eq!(variables, frame_2_variables,);
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index 5861825acdb2d4..2f586a5c5c126c 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -28,7 +28,7 @@ use http_client::HttpClient;
use smallvec::SmallVec;
#[cfg(any(test, feature = "test-support"))]
pub use test_context::*;
-use util::ResultExt;
+use util::{ResultExt, debug_panic};
use crate::{
Action, ActionBuildError, ActionRegistry, Any, AnyView, AnyWindowHandle, AppContext, Asset,
@@ -271,6 +271,7 @@ pub struct App {
pub(crate) tracked_entities: FxHashMap<WindowId, FxHashSet<EntityId>>,
#[cfg(any(test, feature = "test-support", debug_assertions))]
pub(crate) name: Option<&'static str>,
+ quitting: bool,
impl App {
@@ -332,6 +333,7 @@ impl App {
layout_id_buffer: Default::default(),
propagate_event: true,
prompt_builder: Some(PromptBuilder::Default),
+ quitting: false,
#[cfg(any(test, feature = "test-support", debug_assertions))]
name: None,
@@ -375,6 +377,7 @@ impl App {
self.windows.clear();
self.window_handles.clear();
self.flush_effects();
+ self.quitting = true;
let futures = futures::future::join_all(futures);
if self
@@ -384,6 +387,8 @@ impl App {
{
log::error!("timed out waiting on app_will_quit");
+ self.quitting = false;
/// Get the id of the current keyboard layout
@@ -1049,6 +1054,9 @@ impl App {
/// Obtains a reference to the executor, which can be used to spawn futures.
pub fn foreground_executor(&self) -> &ForegroundExecutor {
+ panic!("Can't spawn on main thread after on_app_quit")
&self.foreground_executor
@@ -1060,7 +1068,12 @@ impl App {
AsyncFn: AsyncFnOnce(&mut AsyncApp) -> R + 'static,
R: 'static,
{
+ debug_panic!("Can't spawn on main thread after on_app_quit")
let mut cx = self.to_async();
self.foreground_executor
.spawn(async move { f(&mut cx).await })
diff --git a/crates/project/src/debugger/dap_store.rs b/crates/project/src/debugger/dap_store.rs
index c0bf4bb1dd5efe..c2b47ce5ac289f 100644
--- a/crates/project/src/debugger/dap_store.rs
+++ b/crates/project/src/debugger/dap_store.rs
@@ -134,8 +134,6 @@ impl DapStore {
breakpoint_store: Entity<BreakpointStore>,
cx: &mut Context<Self>,
) -> Self {
- cx.on_app_quit(Self::shutdown_sessions).detach();
let locators = HashMap::from_iter([(
"cargo".to_string(),
Arc::new(super::locators::cargo::CargoLocator {}) as _,
diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs
index dde153d9b0b349..ac6f0ad2ec5be6 100644
--- a/crates/project/src/debugger/session.rs
+++ b/crates/project/src/debugger/session.rs
@@ -700,6 +700,7 @@ impl Session {
BreakpointStoreEvent::ActiveDebugLineChanged => {}
.detach();
+ cx.on_app_quit(Self::on_app_quit).detach();
let this = Self {
mode: Mode::Building,
@@ -1510,6 +1511,16 @@ impl Session {
+ fn on_app_quit(&mut self, cx: &mut Context<Self>) -> Task<()> {
+ let debug_adapter = self.adapter_client();
+ cx.background_spawn(async move {
+ if let Some(client) = debug_adapter {
+ client.shutdown().await.log_err();
+ }
+ })
+ }
pub fn shutdown(&mut self, cx: &mut Context<Self>) -> Task<()> {
self.is_session_terminated = true;
self.thread_states.exit_all_threads(); | [
"-use dap::{FakeAdapter, client::SessionId};"
] | [
7
] | {
"additions": 26,
"author": "Anthony-Eid",
"deletions": 162,
"html_url": "https://github.com/zed-industries/zed/pull/29372",
"issue_id": 29372,
"merged_at": "2025-04-25T18:15:10Z",
"omission_probability": 0.1,
"pr_number": 29372,
"repo": "zed-industries/zed",
"title": "debugger: Fix deadlock in on_app_quit with debugger running",
"total_changes": 188
} |
452 | diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index 0d0e2dd08dbd24..f93af157c18157 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -483,7 +483,7 @@ fn render_markdown_code_block(
.expanded_code_blocks
.get(&(message_id, ix))
.copied()
- .unwrap_or(false);
+ .unwrap_or(true);
let codeblock_header_bg = cx
.theme()
@@ -504,51 +504,47 @@ fn render_markdown_code_block(
.children(label)
.child(
h_flex()
+ .visible_on_hover("codeblock_container")
.gap_1()
.child(
- div().visible_on_hover("codeblock_container").child(
- IconButton::new(
- ("copy-markdown-code", ix),
- if codeblock_was_copied {
- IconName::Check
- } else {
- IconName::Copy
- },
- )
- .icon_color(Color::Muted)
- .shape(ui::IconButtonShape::Square)
- .tooltip(Tooltip::text("Copy Code"))
- .on_click({
- let active_thread = active_thread.clone();
- let parsed_markdown = parsed_markdown.clone();
- let code_block_range = metadata.content_range.clone();
- move |_event, _window, cx| {
- active_thread.update(cx, |this, cx| {
- this.copied_code_block_ids.insert((message_id, ix));
-
- let code = parsed_markdown.source()[code_block_range.clone()]
- .to_string();
- cx.write_to_clipboard(ClipboardItem::new_string(code));
-
- cx.spawn(async move |this, cx| {
- cx.background_executor()
- .timer(Duration::from_secs(2))
- .await;
-
- cx.update(|cx| {
- this.update(cx, |this, cx| {
- this.copied_code_block_ids
- .remove(&(message_id, ix));
- cx.notify();
- })
+ IconButton::new(
+ ("copy-markdown-code", ix),
+ if codeblock_was_copied {
+ IconName::Check
+ } else {
+ IconName::Copy
+ },
+ )
+ .icon_color(Color::Muted)
+ .shape(ui::IconButtonShape::Square)
+ .tooltip(Tooltip::text("Copy Code"))
+ .on_click({
+ let active_thread = active_thread.clone();
+ let parsed_markdown = parsed_markdown.clone();
+ let code_block_range = metadata.content_range.clone();
+ move |_event, _window, cx| {
+ active_thread.update(cx, |this, cx| {
+ this.copied_code_block_ids.insert((message_id, ix));
+
+ let code =
+ parsed_markdown.source()[code_block_range.clone()].to_string();
+ cx.write_to_clipboard(ClipboardItem::new_string(code));
+
+ cx.spawn(async move |this, cx| {
+ cx.background_executor().timer(Duration::from_secs(2)).await;
+
+ cx.update(|cx| {
+ this.update(cx, |this, cx| {
+ this.copied_code_block_ids.remove(&(message_id, ix));
+ cx.notify();
})
- .ok();
})
- .detach();
- });
- }
- }),
- ),
+ .ok();
+ })
+ .detach();
+ });
+ }
+ }),
)
.when(
metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK,
@@ -576,7 +572,7 @@ fn render_markdown_code_block(
let is_expanded = this
.expanded_code_blocks
.entry((message_id, ix))
- .or_insert(false);
+ .or_insert(true);
*is_expanded = !*is_expanded;
cx.notify();
});
@@ -2113,13 +2109,15 @@ impl ActiveThread {
}),
transform: Some(Arc::new({
let active_thread = cx.entity();
+ let editor_bg = cx.theme().colors().editor_background;
+
move |el, range, metadata, _, cx| {
let is_expanded = active_thread
.read(cx)
.expanded_code_blocks
.get(&(message_id, range.start))
.copied()
- .unwrap_or(false);
+ .unwrap_or(true);
if is_expanded
|| metadata.line_count
@@ -2135,19 +2133,11 @@ impl ActiveThread {
.w_full()
.h_1_4()
.rounded_b_lg()
- .bg(gpui::linear_gradient(
+ .bg(linear_gradient(
0.,
- gpui::linear_color_stop(
- cx.theme()
- .colors()
- .editor_background,
- 0.,
- ),
- gpui::linear_color_stop(
- cx.theme()
- .colors()
- .editor_background
- .opacity(0.),
+ linear_color_stop(editor_bg, 0.),
+ linear_color_stop(
+ editor_bg.opacity(0.),
1.,
),
)),
| diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index 0d0e2dd08dbd24..f93af157c18157 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -483,7 +483,7 @@ fn render_markdown_code_block(
.expanded_code_blocks
.get(&(message_id, ix))
.copied()
- .unwrap_or(false);
+ .unwrap_or(true);
let codeblock_header_bg = cx
.theme()
@@ -504,51 +504,47 @@ fn render_markdown_code_block(
.children(label)
.child(
h_flex()
+ .visible_on_hover("codeblock_container")
.gap_1()
.child(
- div().visible_on_hover("codeblock_container").child(
- IconButton::new(
- ("copy-markdown-code", ix),
- if codeblock_was_copied {
- IconName::Check
- } else {
- IconName::Copy
- },
- )
- .icon_color(Color::Muted)
- .shape(ui::IconButtonShape::Square)
- .tooltip(Tooltip::text("Copy Code"))
- .on_click({
- let active_thread = active_thread.clone();
- let parsed_markdown = parsed_markdown.clone();
- let code_block_range = metadata.content_range.clone();
- move |_event, _window, cx| {
- this.copied_code_block_ids.insert((message_id, ix));
- let code = parsed_markdown.source()[code_block_range.clone()]
- .to_string();
- cx.write_to_clipboard(ClipboardItem::new_string(code));
- cx.spawn(async move |this, cx| {
- cx.background_executor()
- .timer(Duration::from_secs(2))
- .await;
- cx.update(|cx| {
- this.update(cx, |this, cx| {
- this.copied_code_block_ids
- .remove(&(message_id, ix));
- cx.notify();
- })
+ IconButton::new(
+ ("copy-markdown-code", ix),
+ if codeblock_was_copied {
+ IconName::Check
+ } else {
+ IconName::Copy
+ },
+ )
+ .icon_color(Color::Muted)
+ .shape(ui::IconButtonShape::Square)
+ .tooltip(Tooltip::text("Copy Code"))
+ .on_click({
+ let active_thread = active_thread.clone();
+ let parsed_markdown = parsed_markdown.clone();
+ let code_block_range = metadata.content_range.clone();
+ move |_event, _window, cx| {
+ active_thread.update(cx, |this, cx| {
+ this.copied_code_block_ids.insert((message_id, ix));
+ parsed_markdown.source()[code_block_range.clone()].to_string();
+ cx.write_to_clipboard(ClipboardItem::new_string(code));
+ cx.spawn(async move |this, cx| {
+ cx.background_executor().timer(Duration::from_secs(2)).await;
+ cx.update(|cx| {
+ this.update(cx, |this, cx| {
+ this.copied_code_block_ids.remove(&(message_id, ix));
+ cx.notify();
})
- .ok();
})
- .detach();
- });
- }
- }),
- ),
+ .ok();
+ })
+ .detach();
+ });
+ }
+ }),
)
.when(
metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK,
@@ -576,7 +572,7 @@ fn render_markdown_code_block(
let is_expanded = this
.expanded_code_blocks
.entry((message_id, ix))
+ .or_insert(true);
*is_expanded = !*is_expanded;
cx.notify();
});
@@ -2113,13 +2109,15 @@ impl ActiveThread {
}),
transform: Some(Arc::new({
let active_thread = cx.entity();
+ let editor_bg = cx.theme().colors().editor_background;
move |el, range, metadata, _, cx| {
let is_expanded = active_thread
.read(cx)
.expanded_code_blocks
.get(&(message_id, range.start))
.copied()
- .unwrap_or(false);
+ .unwrap_or(true);
if is_expanded
|| metadata.line_count
@@ -2135,19 +2133,11 @@ impl ActiveThread {
.w_full()
.h_1_4()
.rounded_b_lg()
+ .bg(linear_gradient(
0.,
- .editor_background,
- 0.,
- ),
- .editor_background
- .opacity(0.),
+ linear_color_stop(editor_bg, 0.),
+ linear_color_stop(
+ editor_bg.opacity(0.),
1.,
),
)), | [
"- active_thread.update(cx, |this, cx| {",
"+ let code =",
"- .or_insert(false);",
"- .bg(gpui::linear_gradient("
] | [
37,
74,
106,
132
] | {
"additions": 46,
"author": "danilo-leal",
"deletions": 56,
"html_url": "https://github.com/zed-industries/zed/pull/29424",
"issue_id": 29424,
"merged_at": "2025-04-25T17:39:51Z",
"omission_probability": 0.1,
"pr_number": 29424,
"repo": "zed-industries/zed",
"title": "agent: Make markdown code blocks uncollapsed by default",
"total_changes": 102
} |
453 | diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index b3adfebd78dbb6..6fe509e2851d88 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -2662,19 +2662,21 @@ impl EditorElement {
text_x + layout.width,
))
};
- x_position = if rows.contains(&align_to.row()) {
- x_and_width(&line_layouts[align_to.row().minus(rows.start) as usize])
- } else {
- x_and_width(&layout_line(
- align_to.row(),
- snapshot,
- &self.style,
- editor_width,
- is_row_soft_wrapped,
- window,
- cx,
- ))
- };
+ let line_ix = align_to.row().0.checked_sub(rows.start.0);
+ x_position =
+ if let Some(layout) = line_ix.and_then(|ix| line_layouts.get(ix as usize)) {
+ x_and_width(&layout)
+ } else {
+ x_and_width(&layout_line(
+ align_to.row(),
+ snapshot,
+ &self.style,
+ editor_width,
+ is_row_soft_wrapped,
+ window,
+ cx,
+ ))
+ };
let anchor_x = x_position.unwrap().0;
| diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index b3adfebd78dbb6..6fe509e2851d88 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -2662,19 +2662,21 @@ impl EditorElement {
text_x + layout.width,
))
};
- x_position = if rows.contains(&align_to.row()) {
- x_and_width(&line_layouts[align_to.row().minus(rows.start) as usize])
- } else {
- x_and_width(&layout_line(
- align_to.row(),
- snapshot,
- &self.style,
- editor_width,
- is_row_soft_wrapped,
- window,
- cx,
- ))
- };
+ let line_ix = align_to.row().0.checked_sub(rows.start.0);
+ x_position =
+ if let Some(layout) = line_ix.and_then(|ix| line_layouts.get(ix as usize)) {
+ x_and_width(&layout)
+ } else {
+ x_and_width(&layout_line(
+ align_to.row(),
+ snapshot,
+ &self.style,
+ editor_width,
+ is_row_soft_wrapped,
+ window,
+ cx,
+ ))
+ };
let anchor_x = x_position.unwrap().0; | [] | [] | {
"additions": 15,
"author": "ConradIrwin",
"deletions": 13,
"html_url": "https://github.com/zed-industries/zed/pull/29352",
"issue_id": 29352,
"merged_at": "2025-04-25T17:12:16Z",
"omission_probability": 0.1,
"pr_number": 29352,
"repo": "zed-industries/zed",
"title": "Maybe fix panic",
"total_changes": 28
} |
454 | diff --git a/assets/settings/default.json b/assets/settings/default.json
index 44492b0653e2b4..492a4821981f33 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -167,7 +167,23 @@
// Default: not set, defaults to "bar"
"cursor_shape": null,
// Determines when the mouse cursor should be hidden in an editor or input box.
+ //
+ // 1. Never hide the mouse cursor:
+ // "never"
+ // 2. Hide only when typing:
+ // "on_typing"
+ // 3. Hide on both typing and cursor movement:
+ // "on_typing_and_movement"
"hide_mouse": "on_typing_and_movement",
+ // Determines how snippets are sorted relative to other completion items.
+ //
+ // 1. Place snippets at the top of the completion list:
+ // "top"
+ // 2. Place snippets normally without any preference:
+ // "inline"
+ // 3. Place snippets at the bottom of the completion list:
+ // "bottom"
+ "snippet_sort_order": "inline",
// How to highlight the current line in the editor.
//
// 1. Don't highlight the current line:
diff --git a/crates/editor/src/code_completion_tests.rs b/crates/editor/src/code_completion_tests.rs
index 632b16d4cc258f..866fc4575ff2d9 100644
--- a/crates/editor/src/code_completion_tests.rs
+++ b/crates/editor/src/code_completion_tests.rs
@@ -1,4 +1,7 @@
-use crate::code_context_menus::{CompletionsMenu, SortableMatch};
+use crate::{
+ code_context_menus::{CompletionsMenu, SortableMatch},
+ editor_settings::SnippetSortOrder,
+};
use fuzzy::StringMatch;
use gpui::TestAppContext;
@@ -74,7 +77,7 @@ fn test_sort_matches_local_variable_over_global_variable(_cx: &mut TestAppContex
sort_key: (2, "floorf128"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"foo_bar_qux",
@@ -122,7 +125,7 @@ fn test_sort_matches_local_variable_over_global_variable(_cx: &mut TestAppContex
sort_key: (1, "foo_bar_qux"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"foo_bar_qux",
@@ -185,7 +188,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (0, "while let"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"element_type",
@@ -234,7 +237,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (2, "REPLACEMENT_CHARACTER"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"element_type",
@@ -272,7 +275,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (1, "element_type"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"ElementType",
@@ -335,7 +338,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
sort_key: (2, "unreachable_unchecked"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"unreachable!(…)",
@@ -379,7 +382,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
sort_key: (3, "unreachable_unchecked"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"unreachable!(…)",
@@ -423,7 +426,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
sort_key: (2, "unreachable_unchecked"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"unreachable!(…)",
@@ -467,7 +470,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
sort_key: (2, "unreachable_unchecked"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string.as_str(),
"unreachable!(…)",
@@ -503,7 +506,7 @@ fn test_sort_matches_variable_and_constants_over_function(_cx: &mut TestAppConte
sort_key: (1, "var"), // variable
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.candidate_id, 1,
"Match order not expected"
@@ -539,7 +542,7 @@ fn test_sort_matches_variable_and_constants_over_function(_cx: &mut TestAppConte
sort_key: (2, "var"), // constant
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.candidate_id, 1,
"Match order not expected"
@@ -622,7 +625,7 @@ fn test_sort_matches_jsx_event_handler(_cx: &mut TestAppContext) {
sort_key: (3, "className?"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches[0].string_match.string, "onCut?",
"Match order not expected"
@@ -944,7 +947,7 @@ fn test_sort_matches_jsx_event_handler(_cx: &mut TestAppContext) {
sort_key: (3, "onLoadedData?"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::default());
assert_eq!(
matches
.iter()
@@ -996,7 +999,7 @@ fn test_sort_matches_for_snippets(_cx: &mut TestAppContext) {
sort_key: (2, "println!(…)"),
},
];
- CompletionsMenu::sort_matches(&mut matches, query);
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::Top);
assert_eq!(
matches[0].string_match.string.as_str(),
"println!(…)",
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 8fc7b3c49e2e50..0190caa69fcf4f 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -25,6 +25,7 @@ use task::ResolvedTask;
use ui::{Color, IntoElement, ListItem, Pixels, Popover, Styled, prelude::*};
use util::ResultExt;
+use crate::editor_settings::SnippetSortOrder;
use crate::hover_popover::{hover_markdown_style, open_markdown_url};
use crate::{
CodeActionProvider, CompletionId, CompletionItemKind, CompletionProvider, DisplayRow, Editor,
@@ -184,6 +185,7 @@ pub struct CompletionsMenu {
pub(super) ignore_completion_provider: bool,
last_rendered_range: Rc<RefCell<Option<Range<usize>>>>,
markdown_element: Option<Entity<Markdown>>,
+ snippet_sort_order: SnippetSortOrder,
}
impl CompletionsMenu {
@@ -195,6 +197,7 @@ impl CompletionsMenu {
initial_position: Anchor,
buffer: Entity<Buffer>,
completions: Box<[Completion]>,
+ snippet_sort_order: SnippetSortOrder,
) -> Self {
let match_candidates = completions
.iter()
@@ -217,6 +220,7 @@ impl CompletionsMenu {
resolve_completions: true,
last_rendered_range: RefCell::new(None).into(),
markdown_element: None,
+ snippet_sort_order,
}
}
@@ -226,6 +230,7 @@ impl CompletionsMenu {
choices: &Vec<String>,
selection: Range<Anchor>,
buffer: Entity<Buffer>,
+ snippet_sort_order: SnippetSortOrder,
) -> Self {
let completions = choices
.iter()
@@ -275,6 +280,7 @@ impl CompletionsMenu {
ignore_completion_provider: false,
last_rendered_range: RefCell::new(None).into(),
markdown_element: None,
+ snippet_sort_order,
}
}
@@ -657,7 +663,11 @@ impl CompletionsMenu {
)
}
- pub fn sort_matches(matches: &mut Vec<SortableMatch<'_>>, query: Option<&str>) {
+ pub fn sort_matches(
+ matches: &mut Vec<SortableMatch<'_>>,
+ query: Option<&str>,
+ snippet_sort_order: SnippetSortOrder,
+ ) {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
enum MatchTier<'a> {
WordStartMatch {
@@ -703,7 +713,11 @@ impl CompletionsMenu {
MatchTier::OtherMatch { sort_score }
} else {
let sort_score_int = Reverse(if score >= FUZZY_THRESHOLD { 1 } else { 0 });
- let sort_snippet = Reverse(if mat.is_snippet { 1 } else { 0 });
+ let sort_snippet = match snippet_sort_order {
+ SnippetSortOrder::Top => Reverse(if mat.is_snippet { 1 } else { 0 }),
+ SnippetSortOrder::Bottom => Reverse(if mat.is_snippet { 0 } else { 1 }),
+ SnippetSortOrder::Inline => Reverse(0),
+ };
MatchTier::WordStartMatch {
sort_score_int,
sort_snippet,
@@ -770,7 +784,7 @@ impl CompletionsMenu {
})
.collect();
- Self::sort_matches(&mut sortable_items, query);
+ Self::sort_matches(&mut sortable_items, query, self.snippet_sort_order);
matches = sortable_items
.into_iter()
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 47adc19d433cdd..0c80902eb4f646 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -4714,6 +4714,8 @@ impl Editor {
.as_ref()
.map_or(true, |provider| provider.filter_completions());
+ let snippet_sort_order = EditorSettings::get_global(cx).snippet_sort_order;
+
let id = post_inc(&mut self.next_completion_id);
let task = cx.spawn_in(window, async move |editor, cx| {
async move {
@@ -4761,6 +4763,7 @@ impl Editor {
position,
buffer.clone(),
completions.into(),
+ snippet_sort_order,
);
menu.filter(
@@ -8134,10 +8137,18 @@ impl Editor {
let buffer_id = selection.start.buffer_id.unwrap();
let buffer = self.buffer().read(cx).buffer(buffer_id);
let id = post_inc(&mut self.next_completion_id);
+ let snippet_sort_order = EditorSettings::get_global(cx).snippet_sort_order;
if let Some(buffer) = buffer {
*self.context_menu.borrow_mut() = Some(CodeContextMenu::Completions(
- CompletionsMenu::new_snippet_choices(id, true, choices, selection, buffer),
+ CompletionsMenu::new_snippet_choices(
+ id,
+ true,
+ choices,
+ selection,
+ buffer,
+ snippet_sort_order,
+ ),
));
}
}
diff --git a/crates/editor/src/editor_settings.rs b/crates/editor/src/editor_settings.rs
index 04e477a5ea19ff..1706951dc46397 100644
--- a/crates/editor/src/editor_settings.rs
+++ b/crates/editor/src/editor_settings.rs
@@ -39,6 +39,7 @@ pub struct EditorSettings {
pub go_to_definition_fallback: GoToDefinitionFallback,
pub jupyter: Jupyter,
pub hide_mouse: Option<HideMouseMode>,
+ pub snippet_sort_order: SnippetSortOrder,
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
@@ -239,6 +240,21 @@ pub enum HideMouseMode {
OnTypingAndMovement,
}
+/// Determines how snippets are sorted relative to other completion items.
+///
+/// Default: inline
+#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
+#[serde(rename_all = "snake_case")]
+pub enum SnippetSortOrder {
+ /// Place snippets at the top of the completion list
+ Top,
+ /// Sort snippets normally using the default comparison logic
+ #[default]
+ Inline,
+ /// Place snippets at the bottom of the completion list
+ Bottom,
+}
+
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct EditorSettingsContent {
/// Whether the cursor blinks in the editor.
@@ -254,6 +270,10 @@ pub struct EditorSettingsContent {
///
/// Default: on_typing_and_movement
pub hide_mouse: Option<HideMouseMode>,
+ /// Determines how snippets are sorted relative to other completion items.
+ ///
+ /// Default: inline
+ pub snippet_sort_order: Option<SnippetSortOrder>,
/// How to highlight the current line in the editor.
///
/// Default: all
diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md
index 516ea99159aafe..e397871234bf86 100644
--- a/docs/src/configuring-zed.md
+++ b/docs/src/configuring-zed.md
@@ -592,7 +592,49 @@ List of `string` values
**Options**
-`boolean` values
+1. Never hide the mouse cursor:
+
+```json
+"hide_mouse": "never"
+```
+
+2. Hide only when typing:
+
+```json
+"hide_mouse": "on_typing"
+```
+
+3. Hide on both typing and cursor movement:
+
+```json
+"hide_mouse": "on_typing_and_movement"
+```
+
+## Snippet Sort Order
+
+- Description: Determines how snippets are sorted relative to other completion items.
+- Setting: `snippet_sort_order`
+- Default: `inline`
+
+**Options**
+
+1. Place snippets at the top of the completion list:
+
+```json
+"snippet_sort_order": "top"
+```
+
+2. Place snippets normally without any preference:
+
+```json
+"snippet_sort_order": "inline"
+```
+
+3. Place snippets at the bottom of the completion list:
+
+```json
+"snippet_sort_order": "bottom"
+```
## Editor Scrollbar
| diff --git a/assets/settings/default.json b/assets/settings/default.json
index 44492b0653e2b4..492a4821981f33 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -167,7 +167,23 @@
// Default: not set, defaults to "bar"
"cursor_shape": null,
// Determines when the mouse cursor should be hidden in an editor or input box.
+ // 1. Never hide the mouse cursor:
+ // "never"
+ // 2. Hide only when typing:
+ // "on_typing"
+ // 3. Hide on both typing and cursor movement:
+ // "on_typing_and_movement"
"hide_mouse": "on_typing_and_movement",
+ // Determines how snippets are sorted relative to other completion items.
+ // 1. Place snippets at the top of the completion list:
+ // "top"
+ // 2. Place snippets normally without any preference:
+ // 3. Place snippets at the bottom of the completion list:
+ // "bottom"
+ "snippet_sort_order": "inline",
// How to highlight the current line in the editor.
//
// 1. Don't highlight the current line:
diff --git a/crates/editor/src/code_completion_tests.rs b/crates/editor/src/code_completion_tests.rs
index 632b16d4cc258f..866fc4575ff2d9 100644
--- a/crates/editor/src/code_completion_tests.rs
+++ b/crates/editor/src/code_completion_tests.rs
@@ -1,4 +1,7 @@
-use crate::code_context_menus::{CompletionsMenu, SortableMatch};
+use crate::{
+ code_context_menus::{CompletionsMenu, SortableMatch},
+ editor_settings::SnippetSortOrder,
use fuzzy::StringMatch;
use gpui::TestAppContext;
@@ -74,7 +77,7 @@ fn test_sort_matches_local_variable_over_global_variable(_cx: &mut TestAppContex
sort_key: (2, "floorf128"),
@@ -122,7 +125,7 @@ fn test_sort_matches_local_variable_over_global_variable(_cx: &mut TestAppContex
sort_key: (1, "foo_bar_qux"),
@@ -185,7 +188,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (0, "while let"),
@@ -234,7 +237,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (2, "REPLACEMENT_CHARACTER"),
@@ -272,7 +275,7 @@ fn test_sort_matches_local_variable_over_global_enum(_cx: &mut TestAppContext) {
sort_key: (1, "element_type"),
"ElementType",
@@ -335,7 +338,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
@@ -379,7 +382,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
sort_key: (3, "unreachable_unchecked"),
@@ -423,7 +426,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
@@ -467,7 +470,7 @@ fn test_sort_matches_for_unreachable(_cx: &mut TestAppContext) {
@@ -503,7 +506,7 @@ fn test_sort_matches_variable_and_constants_over_function(_cx: &mut TestAppConte
sort_key: (1, "var"), // variable
@@ -539,7 +542,7 @@ fn test_sort_matches_variable_and_constants_over_function(_cx: &mut TestAppConte
sort_key: (2, "var"), // constant
@@ -622,7 +625,7 @@ fn test_sort_matches_jsx_event_handler(_cx: &mut TestAppContext) {
sort_key: (3, "className?"),
matches[0].string_match.string, "onCut?",
@@ -944,7 +947,7 @@ fn test_sort_matches_jsx_event_handler(_cx: &mut TestAppContext) {
sort_key: (3, "onLoadedData?"),
matches
@@ -996,7 +999,7 @@ fn test_sort_matches_for_snippets(_cx: &mut TestAppContext) {
sort_key: (2, "println!(…)"),
+ CompletionsMenu::sort_matches(&mut matches, query, SnippetSortOrder::Top);
"println!(…)",
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 8fc7b3c49e2e50..0190caa69fcf4f 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -25,6 +25,7 @@ use task::ResolvedTask;
use ui::{Color, IntoElement, ListItem, Pixels, Popover, Styled, prelude::*};
use util::ResultExt;
+use crate::editor_settings::SnippetSortOrder;
use crate::hover_popover::{hover_markdown_style, open_markdown_url};
use crate::{
CodeActionProvider, CompletionId, CompletionItemKind, CompletionProvider, DisplayRow, Editor,
@@ -184,6 +185,7 @@ pub struct CompletionsMenu {
pub(super) ignore_completion_provider: bool,
last_rendered_range: Rc<RefCell<Option<Range<usize>>>>,
markdown_element: Option<Entity<Markdown>>,
+ snippet_sort_order: SnippetSortOrder,
impl CompletionsMenu {
@@ -195,6 +197,7 @@ impl CompletionsMenu {
initial_position: Anchor,
completions: Box<[Completion]>,
let match_candidates = completions
@@ -217,6 +220,7 @@ impl CompletionsMenu {
resolve_completions: true,
@@ -226,6 +230,7 @@ impl CompletionsMenu {
choices: &Vec<String>,
selection: Range<Anchor>,
let completions = choices
@@ -275,6 +280,7 @@ impl CompletionsMenu {
ignore_completion_provider: false,
@@ -657,7 +663,11 @@ impl CompletionsMenu {
)
+ pub fn sort_matches(
+ matches: &mut Vec<SortableMatch<'_>>,
+ query: Option<&str>,
+ ) {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
enum MatchTier<'a> {
WordStartMatch {
@@ -703,7 +713,11 @@ impl CompletionsMenu {
MatchTier::OtherMatch { sort_score }
} else {
let sort_score_int = Reverse(if score >= FUZZY_THRESHOLD { 1 } else { 0 });
- let sort_snippet = Reverse(if mat.is_snippet { 1 } else { 0 });
+ let sort_snippet = match snippet_sort_order {
+ SnippetSortOrder::Top => Reverse(if mat.is_snippet { 1 } else { 0 }),
+ SnippetSortOrder::Inline => Reverse(0),
+ };
MatchTier::WordStartMatch {
sort_score_int,
sort_snippet,
@@ -770,7 +784,7 @@ impl CompletionsMenu {
})
.collect();
- Self::sort_matches(&mut sortable_items, query);
+ Self::sort_matches(&mut sortable_items, query, self.snippet_sort_order);
matches = sortable_items
.into_iter()
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 47adc19d433cdd..0c80902eb4f646 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -4714,6 +4714,8 @@ impl Editor {
.as_ref()
.map_or(true, |provider| provider.filter_completions());
let task = cx.spawn_in(window, async move |editor, cx| {
async move {
@@ -4761,6 +4763,7 @@ impl Editor {
position,
buffer.clone(),
completions.into(),
+ snippet_sort_order,
);
menu.filter(
@@ -8134,10 +8137,18 @@ impl Editor {
let buffer_id = selection.start.buffer_id.unwrap();
let buffer = self.buffer().read(cx).buffer(buffer_id);
if let Some(buffer) = buffer {
*self.context_menu.borrow_mut() = Some(CodeContextMenu::Completions(
- CompletionsMenu::new_snippet_choices(id, true, choices, selection, buffer),
+ CompletionsMenu::new_snippet_choices(
+ id,
+ true,
+ choices,
+ selection,
+ buffer,
+ snippet_sort_order,
+ ),
));
diff --git a/crates/editor/src/editor_settings.rs b/crates/editor/src/editor_settings.rs
index 04e477a5ea19ff..1706951dc46397 100644
--- a/crates/editor/src/editor_settings.rs
+++ b/crates/editor/src/editor_settings.rs
@@ -39,6 +39,7 @@ pub struct EditorSettings {
pub go_to_definition_fallback: GoToDefinitionFallback,
pub jupyter: Jupyter,
+ pub snippet_sort_order: SnippetSortOrder,
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
@@ -239,6 +240,21 @@ pub enum HideMouseMode {
OnTypingAndMovement,
+/// Determines how snippets are sorted relative to other completion items.
+///
+/// Default: inline
+#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
+#[serde(rename_all = "snake_case")]
+pub enum SnippetSortOrder {
+ /// Place snippets at the top of the completion list
+ Top,
+ /// Sort snippets normally using the default comparison logic
+ #[default]
+ Inline,
+ /// Place snippets at the bottom of the completion list
+ Bottom,
+}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct EditorSettingsContent {
/// Whether the cursor blinks in the editor.
@@ -254,6 +270,10 @@ pub struct EditorSettingsContent {
/// Default: on_typing_and_movement
+ /// Determines how snippets are sorted relative to other completion items.
+ ///
+ /// Default: inline
+ pub snippet_sort_order: Option<SnippetSortOrder>,
/// How to highlight the current line in the editor.
/// Default: all
diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md
index 516ea99159aafe..e397871234bf86 100644
--- a/docs/src/configuring-zed.md
+++ b/docs/src/configuring-zed.md
@@ -592,7 +592,49 @@ List of `string` values
**Options**
-`boolean` values
+1. Never hide the mouse cursor:
+"hide_mouse": "never"
+2. Hide only when typing:
+"hide_mouse": "on_typing"
+3. Hide on both typing and cursor movement:
+"hide_mouse": "on_typing_and_movement"
+## Snippet Sort Order
+- Description: Determines how snippets are sorted relative to other completion items.
+- Setting: `snippet_sort_order`
+- Default: `inline`
+**Options**
+1. Place snippets at the top of the completion list:
+"snippet_sort_order": "top"
+2. Place snippets normally without any preference:
+"snippet_sort_order": "inline"
+3. Place snippets at the bottom of the completion list:
+"snippet_sort_order": "bottom"
## Editor Scrollbar | [
"+ // \"inline\"",
"+};",
"- pub fn sort_matches(matches: &mut Vec<SortableMatch<'_>>, query: Option<&str>) {",
"+ SnippetSortOrder::Bottom => Reverse(if mat.is_snippet { 0 } else { 1 }),"
] | [
21,
37,
223,
239
] | {
"additions": 126,
"author": "smitbarmase",
"deletions": 20,
"html_url": "https://github.com/zed-industries/zed/pull/29429",
"issue_id": 29429,
"merged_at": "2025-04-25T17:05:12Z",
"omission_probability": 0.1,
"pr_number": 29429,
"repo": "zed-industries/zed",
"title": "editor: Add setting for snippet sorting behavior for code completion",
"total_changes": 146
} |
455 | diff --git a/crates/zlog/src/filter.rs b/crates/zlog/src/filter.rs
index f260119300d93e..4683b616ccab54 100644
--- a/crates/zlog/src/filter.rs
+++ b/crates/zlog/src/filter.rs
@@ -7,7 +7,7 @@ use std::{
usize,
};
-use crate::{SCOPE_DEPTH_MAX, SCOPE_STRING_SEP_STR, Scope, ScopeAlloc, env_config};
+use crate::{SCOPE_DEPTH_MAX, SCOPE_STRING_SEP_STR, Scope, ScopeAlloc, env_config, private};
use log;
@@ -59,19 +59,15 @@ pub fn is_possibly_enabled_level(level: log::Level) -> bool {
}
pub fn is_scope_enabled(scope: &Scope, module_path: Option<&str>, level: log::Level) -> bool {
- if level <= unsafe { LEVEL_ENABLED_MAX_STATIC } {
- // [FAST PATH]
- // if the message is at or below the minimum printed log level
- // (where error < warn < info etc) then always enable
- return true;
- }
+ // TODO: is_always_allowed_level that checks against LEVEL_ENABLED_MIN_CONFIG
if !is_possibly_enabled_level(level) {
- // [FAST PATH PT. 2]
+ // [FAST PATH]
// if the message is above the maximum enabled log level
// (where error < warn < info etc) then disable without checking
// scope map
return false;
}
+ let is_enabled_by_default = level <= unsafe { LEVEL_ENABLED_MAX_STATIC };
let global_scope_map = SCOPE_MAP.read().unwrap_or_else(|err| {
SCOPE_MAP.clear_poison();
return err.into_inner();
@@ -79,17 +75,16 @@ pub fn is_scope_enabled(scope: &Scope, module_path: Option<&str>, level: log::Le
let Some(map) = global_scope_map.as_ref() else {
// on failure, return false because it's not <= LEVEL_ENABLED_MAX_STATIC
- return false;
+ return is_enabled_by_default;
};
if map.is_empty() {
// if no scopes are enabled, return false because it's not <= LEVEL_ENABLED_MAX_STATIC
- return false;
+ return is_enabled_by_default;
}
let enabled_status = map.is_enabled(&scope, module_path, level);
return match enabled_status {
- // if it isn't configured, then it it's disabled because it's not <= LEVEL_ENABLED_MAX_STATIC
- EnabledStatus::NotConfigured => false,
+ EnabledStatus::NotConfigured => is_enabled_by_default,
EnabledStatus::Enabled => true,
EnabledStatus::Disabled => false,
};
@@ -365,12 +360,18 @@ impl ScopeMap {
break 'search;
}
- if enabled.is_none() && !self.modules.is_empty() && module_path.is_some() {
- let module_path = module_path.unwrap();
- for (module, filter) in &self.modules {
- if module == module_path {
- enabled.replace(*filter);
- break;
+ if let Some(module_path) = module_path {
+ if !self.modules.is_empty() {
+ let crate_name = private::extract_crate_name_from_module_path(module_path);
+ let is_scope_just_crate_name =
+ scope[0].as_ref() == crate_name && scope[1].as_ref() == "";
+ if enabled.is_none() || is_scope_just_crate_name {
+ for (module, filter) in &self.modules {
+ if module == module_path {
+ enabled.replace(*filter);
+ break;
+ }
+ }
}
}
}
@@ -559,8 +560,18 @@ mod tests {
),
EnabledStatus::NotConfigured
);
+ // when scope is just crate name, more specific module path overrides it
assert_eq!(
map.is_enabled(&scope_from_scope_str("a"), Some("a::b::d"), Level::Trace),
+ EnabledStatus::Disabled,
+ );
+ // but when it is scoped, the scope overrides the module path
+ assert_eq!(
+ map.is_enabled(
+ &scope_from_scope_str("a.scope"),
+ Some("a::b::d"),
+ Level::Trace
+ ),
EnabledStatus::Enabled,
);
}
diff --git a/crates/zlog/src/zlog.rs b/crates/zlog/src/zlog.rs
index aed051e10658bd..a9383ec9743721 100644
--- a/crates/zlog/src/zlog.rs
+++ b/crates/zlog/src/zlog.rs
@@ -200,7 +200,7 @@ macro_rules! crate_name {
pub mod private {
use super::*;
- pub const fn extract_crate_name_from_module_path(module_path: &'static str) -> &'static str {
+ pub const fn extract_crate_name_from_module_path(module_path: &str) -> &str {
let mut i = 0;
let mod_path_bytes = module_path.as_bytes();
let mut index = mod_path_bytes.len();
| diff --git a/crates/zlog/src/filter.rs b/crates/zlog/src/filter.rs
index f260119300d93e..4683b616ccab54 100644
--- a/crates/zlog/src/filter.rs
+++ b/crates/zlog/src/filter.rs
@@ -7,7 +7,7 @@ use std::{
usize,
};
-use crate::{SCOPE_DEPTH_MAX, SCOPE_STRING_SEP_STR, Scope, ScopeAlloc, env_config};
+use crate::{SCOPE_DEPTH_MAX, SCOPE_STRING_SEP_STR, Scope, ScopeAlloc, env_config, private};
use log;
@@ -59,19 +59,15 @@ pub fn is_possibly_enabled_level(level: log::Level) -> bool {
}
pub fn is_scope_enabled(scope: &Scope, module_path: Option<&str>, level: log::Level) -> bool {
- if level <= unsafe { LEVEL_ENABLED_MAX_STATIC } {
- // [FAST PATH]
- // if the message is at or below the minimum printed log level
- // (where error < warn < info etc) then always enable
- return true;
- }
+ // TODO: is_always_allowed_level that checks against LEVEL_ENABLED_MIN_CONFIG
if !is_possibly_enabled_level(level) {
- // [FAST PATH PT. 2]
+ // [FAST PATH]
// if the message is above the maximum enabled log level
// (where error < warn < info etc) then disable without checking
// scope map
return false;
+ let is_enabled_by_default = level <= unsafe { LEVEL_ENABLED_MAX_STATIC };
let global_scope_map = SCOPE_MAP.read().unwrap_or_else(|err| {
SCOPE_MAP.clear_poison();
return err.into_inner();
@@ -79,17 +75,16 @@ pub fn is_scope_enabled(scope: &Scope, module_path: Option<&str>, level: log::Le
let Some(map) = global_scope_map.as_ref() else {
// on failure, return false because it's not <= LEVEL_ENABLED_MAX_STATIC
if map.is_empty() {
// if no scopes are enabled, return false because it's not <= LEVEL_ENABLED_MAX_STATIC
let enabled_status = map.is_enabled(&scope, module_path, level);
return match enabled_status {
- // if it isn't configured, then it it's disabled because it's not <= LEVEL_ENABLED_MAX_STATIC
- EnabledStatus::NotConfigured => false,
+ EnabledStatus::NotConfigured => is_enabled_by_default,
EnabledStatus::Enabled => true,
EnabledStatus::Disabled => false,
@@ -365,12 +360,18 @@ impl ScopeMap {
break 'search;
- if enabled.is_none() && !self.modules.is_empty() && module_path.is_some() {
- let module_path = module_path.unwrap();
- for (module, filter) in &self.modules {
- if module == module_path {
- break;
+ if !self.modules.is_empty() {
+ let crate_name = private::extract_crate_name_from_module_path(module_path);
+ let is_scope_just_crate_name =
+ scope[0].as_ref() == crate_name && scope[1].as_ref() == "";
+ if enabled.is_none() || is_scope_just_crate_name {
+ for (module, filter) in &self.modules {
+ if module == module_path {
+ enabled.replace(*filter);
+ break;
+ }
+ }
}
}
@@ -559,8 +560,18 @@ mod tests {
),
EnabledStatus::NotConfigured
+ // when scope is just crate name, more specific module path overrides it
assert_eq!(
map.is_enabled(&scope_from_scope_str("a"), Some("a::b::d"), Level::Trace),
+ EnabledStatus::Disabled,
+ );
+ // but when it is scoped, the scope overrides the module path
+ assert_eq!(
+ map.is_enabled(
+ &scope_from_scope_str("a.scope"),
+ Some("a::b::d"),
+ Level::Trace
+ ),
EnabledStatus::Enabled,
diff --git a/crates/zlog/src/zlog.rs b/crates/zlog/src/zlog.rs
index aed051e10658bd..a9383ec9743721 100644
--- a/crates/zlog/src/zlog.rs
+++ b/crates/zlog/src/zlog.rs
@@ -200,7 +200,7 @@ macro_rules! crate_name {
pub mod private {
use super::*;
+ pub const fn extract_crate_name_from_module_path(module_path: &str) -> &str {
let mut i = 0;
let mod_path_bytes = module_path.as_bytes();
let mut index = mod_path_bytes.len(); | [
"- enabled.replace(*filter);",
"+ if let Some(module_path) = module_path {",
"- pub const fn extract_crate_name_from_module_path(module_path: &'static str) -> &'static str {"
] | [
65,
67,
109
] | {
"additions": 30,
"author": "probably-neb",
"deletions": 19,
"html_url": "https://github.com/zed-industries/zed/pull/29428",
"issue_id": 29428,
"merged_at": "2025-04-25T16:11:59Z",
"omission_probability": 0.1,
"pr_number": 29428,
"repo": "zed-industries/zed",
"title": "zlog: Fix incorrect assumption with filters",
"total_changes": 49
} |
456 | diff --git a/Cargo.lock b/Cargo.lock
index 5edd5eb8864424..82c9756d46db1e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4975,7 +4975,7 @@ dependencies = [
"client",
"collections",
"context_server",
- "dirs 5.0.1",
+ "dirs 4.0.0",
"dotenv",
"env_logger 0.11.8",
"extension",
diff --git a/crates/eval/Cargo.toml b/crates/eval/Cargo.toml
index 21d98167084a51..29ce6d2531fbfc 100644
--- a/crates/eval/Cargo.toml
+++ b/crates/eval/Cargo.toml
@@ -3,8 +3,20 @@ name = "eval"
version = "0.1.0"
publish.workspace = true
edition.workspace = true
+license = "GPL-3.0-or-later"
default-run = "eval"
+[lints]
+workspace = true
+
+[[bin]]
+name = "eval"
+path = "src/eval.rs"
+
+[[bin]]
+name = "explorer"
+path = "src/explorer.rs"
+
[dependencies]
agent.workspace = true
anyhow.workspace = true
@@ -18,7 +30,7 @@ clap.workspace = true
client.workspace = true
collections.workspace = true
context_server.workspace = true
-dirs = "5.0"
+dirs.workspace = true
dotenv.workspace = true
env_logger.workspace = true
extension.workspace = true
@@ -33,7 +45,7 @@ language_model.workspace = true
language_models.workspace = true
languages = { workspace = true, features = ["load-grammars"] }
node_runtime.workspace = true
-pathdiff = "0.2"
+pathdiff.workspace = true
paths.workspace = true
project.workspace = true
prompt_store.workspace = true
@@ -49,16 +61,5 @@ telemetry.workspace = true
toml.workspace = true
unindent.workspace = true
util.workspace = true
-uuid = { version = "1.6", features = ["v4"] }
+uuid.workspace = true
workspace-hack.workspace = true
-
-[[bin]]
-name = "eval"
-path = "src/eval.rs"
-
-[[bin]]
-name = "explorer"
-path = "src/explorer.rs"
-
-[lints]
-workspace = true
| diff --git a/Cargo.lock b/Cargo.lock
index 5edd5eb8864424..82c9756d46db1e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4975,7 +4975,7 @@ dependencies = [
"client",
"collections",
"context_server",
- "dirs 5.0.1",
"dotenv",
"env_logger 0.11.8",
"extension",
diff --git a/crates/eval/Cargo.toml b/crates/eval/Cargo.toml
index 21d98167084a51..29ce6d2531fbfc 100644
--- a/crates/eval/Cargo.toml
+++ b/crates/eval/Cargo.toml
@@ -3,8 +3,20 @@ name = "eval"
version = "0.1.0"
publish.workspace = true
edition.workspace = true
+license = "GPL-3.0-or-later"
default-run = "eval"
+[lints]
+workspace = true
+name = "eval"
+path = "src/eval.rs"
+name = "explorer"
+path = "src/explorer.rs"
[dependencies]
agent.workspace = true
anyhow.workspace = true
@@ -18,7 +30,7 @@ clap.workspace = true
client.workspace = true
collections.workspace = true
context_server.workspace = true
-dirs = "5.0"
dotenv.workspace = true
env_logger.workspace = true
extension.workspace = true
@@ -33,7 +45,7 @@ language_model.workspace = true
language_models.workspace = true
languages = { workspace = true, features = ["load-grammars"] }
node_runtime.workspace = true
+pathdiff.workspace = true
paths.workspace = true
project.workspace = true
prompt_store.workspace = true
@@ -49,16 +61,5 @@ telemetry.workspace = true
toml.workspace = true
unindent.workspace = true
util.workspace = true
-uuid = { version = "1.6", features = ["v4"] }
+uuid.workspace = true
workspace-hack.workspace = true
-path = "src/eval.rs"
-name = "explorer"
-path = "src/explorer.rs"
-[lints]
-workspace = true | [
"+ \"dirs 4.0.0\",",
"+dirs.workspace = true",
"-pathdiff = \"0.2\"",
"-name = \"eval\""
] | [
9,
43,
51,
65
] | {
"additions": 16,
"author": "maxdeviant",
"deletions": 15,
"html_url": "https://github.com/zed-industries/zed/pull/29430",
"issue_id": 29430,
"merged_at": "2025-04-25T16:11:26Z",
"omission_probability": 0.1,
"pr_number": 29430,
"repo": "zed-industries/zed",
"title": "eval: Use workspace dependencies",
"total_changes": 31
} |
457 | diff --git a/.gitignore b/.gitignore
index 93508a6eb7013e..f340e14508a063 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,4 +32,5 @@ Packages
xcuserdata/
# Don't commit any secrets to the repo.
+.env
.env.secret.toml
diff --git a/Cargo.lock b/Cargo.lock
index f06b86159187dc..5edd5eb8864424 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4548,6 +4548,12 @@ dependencies = [
"syn 2.0.100",
]
+[[package]]
+name = "dotenv"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
+
[[package]]
name = "dotenvy"
version = "0.15.7"
@@ -4970,6 +4976,7 @@ dependencies = [
"collections",
"context_server",
"dirs 5.0.1",
+ "dotenv",
"env_logger 0.11.8",
"extension",
"fs",
diff --git a/Cargo.toml b/Cargo.toml
index d90a256a9c67bb..d9bbb0481d0658 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -437,6 +437,7 @@ dashmap = "6.0"
dap-types = { git = "https://github.com/zed-industries/dap-types", rev = "be69a016ba710191b9fdded28c8b042af4b617f7" }
derive_more = "0.99.17"
dirs = "4.0"
+dotenv = "0.15.0"
ec4rs = "1.1"
emojis = "0.6.1"
env_logger = "0.11"
diff --git a/crates/eval/Cargo.toml b/crates/eval/Cargo.toml
index 6c754bf7ff86db..21d98167084a51 100644
--- a/crates/eval/Cargo.toml
+++ b/crates/eval/Cargo.toml
@@ -19,6 +19,7 @@ client.workspace = true
collections.workspace = true
context_server.workspace = true
dirs = "5.0"
+dotenv.workspace = true
env_logger.workspace = true
extension.workspace = true
fs.workspace = true
diff --git a/crates/eval/README.md b/crates/eval/README.md
index 75fe7265fcb090..c1543734b00f33 100644
--- a/crates/eval/README.md
+++ b/crates/eval/README.md
@@ -6,6 +6,8 @@ This eval assumes the working directory is the root of the repository. Run it wi
cargo run -p eval
```
+The eval will optionally read a `.env` file in `crates/eval` if you need it to set environment variables, such as API keys.
+
## Explorer Tool
The explorer tool generates a self-contained HTML view from one or more thread
diff --git a/crates/eval/src/eval.rs b/crates/eval/src/eval.rs
index dcc39592ed65d9..f3a9624553cce7 100644
--- a/crates/eval/src/eval.rs
+++ b/crates/eval/src/eval.rs
@@ -34,9 +34,12 @@ use std::collections::VecDeque;
use std::env;
use std::path::{Path, PathBuf};
use std::rc::Rc;
-use std::sync::Arc;
+use std::sync::{Arc, LazyLock};
use util::ResultExt as _;
+static CARGO_MANIFEST_DIR: LazyLock<PathBuf> =
+ LazyLock::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")));
+
#[derive(Parser, Debug)]
#[command(name = "eval", disable_version_flag = true)]
struct Args {
@@ -57,6 +60,8 @@ struct Args {
}
fn main() {
+ dotenv::from_filename(CARGO_MANIFEST_DIR.join(".env")).ok();
+
env_logger::init();
let system_id = ids::get_or_create_id(&ids::eval_system_id_path()).ok();
| diff --git a/.gitignore b/.gitignore
index 93508a6eb7013e..f340e14508a063 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,4 +32,5 @@ Packages
xcuserdata/
# Don't commit any secrets to the repo.
+.env
.env.secret.toml
diff --git a/Cargo.lock b/Cargo.lock
index f06b86159187dc..5edd5eb8864424 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4548,6 +4548,12 @@ dependencies = [
"syn 2.0.100",
]
+[[package]]
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
[[package]]
name = "dotenvy"
version = "0.15.7"
@@ -4970,6 +4976,7 @@ dependencies = [
"collections",
"context_server",
"dirs 5.0.1",
+ "dotenv",
"env_logger 0.11.8",
"extension",
"fs",
diff --git a/Cargo.toml b/Cargo.toml
index d90a256a9c67bb..d9bbb0481d0658 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -437,6 +437,7 @@ dashmap = "6.0"
dap-types = { git = "https://github.com/zed-industries/dap-types", rev = "be69a016ba710191b9fdded28c8b042af4b617f7" }
derive_more = "0.99.17"
dirs = "4.0"
+dotenv = "0.15.0"
ec4rs = "1.1"
emojis = "0.6.1"
env_logger = "0.11"
diff --git a/crates/eval/Cargo.toml b/crates/eval/Cargo.toml
index 6c754bf7ff86db..21d98167084a51 100644
--- a/crates/eval/Cargo.toml
+++ b/crates/eval/Cargo.toml
@@ -19,6 +19,7 @@ client.workspace = true
collections.workspace = true
context_server.workspace = true
dirs = "5.0"
+dotenv.workspace = true
env_logger.workspace = true
extension.workspace = true
fs.workspace = true
diff --git a/crates/eval/README.md b/crates/eval/README.md
index 75fe7265fcb090..c1543734b00f33 100644
--- a/crates/eval/README.md
+++ b/crates/eval/README.md
@@ -6,6 +6,8 @@ This eval assumes the working directory is the root of the repository. Run it wi
cargo run -p eval
```
+The eval will optionally read a `.env` file in `crates/eval` if you need it to set environment variables, such as API keys.
## Explorer Tool
The explorer tool generates a self-contained HTML view from one or more thread
diff --git a/crates/eval/src/eval.rs b/crates/eval/src/eval.rs
index dcc39592ed65d9..f3a9624553cce7 100644
--- a/crates/eval/src/eval.rs
+++ b/crates/eval/src/eval.rs
@@ -34,9 +34,12 @@ use std::collections::VecDeque;
use std::env;
use std::path::{Path, PathBuf};
use std::rc::Rc;
-use std::sync::Arc;
+use std::sync::{Arc, LazyLock};
use util::ResultExt as _;
+static CARGO_MANIFEST_DIR: LazyLock<PathBuf> =
+ LazyLock::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")));
#[derive(Parser, Debug)]
#[command(name = "eval", disable_version_flag = true)]
struct Args {
@@ -57,6 +60,8 @@ struct Args {
}
fn main() {
+ dotenv::from_filename(CARGO_MANIFEST_DIR.join(".env")).ok();
env_logger::init();
let system_id = ids::get_or_create_id(&ids::eval_system_id_path()).ok(); | [
"+name = \"dotenv\"",
"+version = \"0.15.0\""
] | [
19,
20
] | {
"additions": 18,
"author": "maxdeviant",
"deletions": 1,
"html_url": "https://github.com/zed-industries/zed/pull/29426",
"issue_id": 29426,
"merged_at": "2025-04-25T15:53:03Z",
"omission_probability": 0.1,
"pr_number": 29426,
"repo": "zed-industries/zed",
"title": "eval: Add support for reading from a `.env` file",
"total_changes": 19
} |
458 | diff --git a/crates/agent/src/assistant_configuration/tool_picker.rs b/crates/agent/src/assistant_configuration/tool_picker.rs
index db52fa8b576dd9..2c48792446e5dc 100644
--- a/crates/agent/src/assistant_configuration/tool_picker.rs
+++ b/crates/agent/src/assistant_configuration/tool_picker.rs
@@ -272,7 +272,7 @@ impl PickerDelegate for ToolPickerDelegate {
.get(id.as_ref())
.and_then(|preset| preset.tools.get(&tool.name))
.copied()
- .unwrap_or(false),
+ .unwrap_or(self.profile.enable_all_context_servers),
};
Some(
diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rs
index a907e1d4402725..6f7ee0b7c97c84 100644
--- a/crates/agent/src/thread_store.rs
+++ b/crates/agent/src/thread_store.rs
@@ -494,6 +494,22 @@ impl ThreadStore {
);
});
}
+ // Enable all the tools from all context servers, but disable the ones that are explicitly disabled
+ for (context_server_id, preset) in &profile.context_servers {
+ self.tools.update(cx, |tools, cx| {
+ tools.disable(
+ ToolSource::ContextServer {
+ id: context_server_id.clone().into(),
+ },
+ &preset
+ .tools
+ .iter()
+ .filter_map(|(tool, enabled)| (!enabled).then(|| tool.clone()))
+ .collect::<Vec<_>>(),
+ cx,
+ )
+ })
+ }
} else {
for (context_server_id, preset) in &profile.context_servers {
self.tools.update(cx, |tools, cx| {
| diff --git a/crates/agent/src/assistant_configuration/tool_picker.rs b/crates/agent/src/assistant_configuration/tool_picker.rs
index db52fa8b576dd9..2c48792446e5dc 100644
--- a/crates/agent/src/assistant_configuration/tool_picker.rs
+++ b/crates/agent/src/assistant_configuration/tool_picker.rs
@@ -272,7 +272,7 @@ impl PickerDelegate for ToolPickerDelegate {
.get(id.as_ref())
.and_then(|preset| preset.tools.get(&tool.name))
.copied()
+ .unwrap_or(self.profile.enable_all_context_servers),
};
Some(
diff --git a/crates/agent/src/thread_store.rs b/crates/agent/src/thread_store.rs
index a907e1d4402725..6f7ee0b7c97c84 100644
--- a/crates/agent/src/thread_store.rs
+++ b/crates/agent/src/thread_store.rs
@@ -494,6 +494,22 @@ impl ThreadStore {
);
});
}
+ // Enable all the tools from all context servers, but disable the ones that are explicitly disabled
+ for (context_server_id, preset) in &profile.context_servers {
+ self.tools.update(cx, |tools, cx| {
+ tools.disable(
+ ToolSource::ContextServer {
+ id: context_server_id.clone().into(),
+ },
+ &preset
+ .tools
+ .iter()
+ .filter_map(|(tool, enabled)| (!enabled).then(|| tool.clone()))
+ .collect::<Vec<_>>(),
+ cx,
+ )
+ })
+ }
} else {
for (context_server_id, preset) in &profile.context_servers {
self.tools.update(cx, |tools, cx| { | [
"- .unwrap_or(false),"
] | [
8
] | {
"additions": 17,
"author": "bennetbo",
"deletions": 1,
"html_url": "https://github.com/zed-industries/zed/pull/29414",
"issue_id": 29414,
"merged_at": "2025-04-25T14:19:04Z",
"omission_probability": 0.1,
"pr_number": 29414,
"repo": "zed-industries/zed",
"title": "agent: Allow to explictly disable tools when using `enable_all_context_servers`",
"total_changes": 18
} |
459 | diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index f0035ab1433cc7..0bb6713199ca73 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -64,11 +64,6 @@ impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
const NAME: &'static str = "predict-edits-rate-completions";
}
-pub struct LanguageModelsFeatureFlag {}
-impl FeatureFlag for LanguageModelsFeatureFlag {
- const NAME: &'static str = "language-models";
-}
-
pub struct LlmClosedBetaFeatureFlag {}
impl FeatureFlag for LlmClosedBetaFeatureFlag {
const NAME: &'static str = "llm-closed-beta";
diff --git a/crates/language_models/src/language_models.rs b/crates/language_models/src/language_models.rs
index 4d78e10cba383a..61c5dcf642d157 100644
--- a/crates/language_models/src/language_models.rs
+++ b/crates/language_models/src/language_models.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use client::{Client, UserStore};
use fs::Fs;
use gpui::{App, Context, Entity};
-use language_model::{LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID};
+use language_model::LanguageModelRegistry;
use provider::deepseek::DeepSeekLanguageModelProvider;
pub mod provider;
@@ -35,7 +35,10 @@ fn register_language_model_providers(
client: Arc<Client>,
cx: &mut Context<LanguageModelRegistry>,
) {
- use feature_flags::FeatureFlagAppExt;
+ registry.register_provider(
+ CloudLanguageModelProvider::new(user_store.clone(), client.clone(), cx),
+ cx,
+ );
registry.register_provider(
AnthropicLanguageModelProvider::new(client.http_client(), cx),
@@ -70,23 +73,4 @@ fn register_language_model_providers(
cx,
);
registry.register_provider(CopilotChatLanguageModelProvider::new(cx), cx);
-
- cx.observe_flag::<feature_flags::LanguageModelsFeatureFlag, _>(move |enabled, cx| {
- let user_store = user_store.clone();
- let client = client.clone();
- LanguageModelRegistry::global(cx).update(cx, move |registry, cx| {
- if enabled {
- registry.register_provider(
- CloudLanguageModelProvider::new(user_store.clone(), client.clone(), cx),
- cx,
- );
- } else {
- registry.unregister_provider(
- LanguageModelProviderId::from(ZED_CLOUD_PROVIDER_ID.to_string()),
- cx,
- );
- }
- });
- })
- .detach();
}
| diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index f0035ab1433cc7..0bb6713199ca73 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -64,11 +64,6 @@ impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
const NAME: &'static str = "predict-edits-rate-completions";
-impl FeatureFlag for LanguageModelsFeatureFlag {
- const NAME: &'static str = "language-models";
-}
pub struct LlmClosedBetaFeatureFlag {}
impl FeatureFlag for LlmClosedBetaFeatureFlag {
const NAME: &'static str = "llm-closed-beta";
diff --git a/crates/language_models/src/language_models.rs b/crates/language_models/src/language_models.rs
index 4d78e10cba383a..61c5dcf642d157 100644
--- a/crates/language_models/src/language_models.rs
+++ b/crates/language_models/src/language_models.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use client::{Client, UserStore};
use fs::Fs;
use gpui::{App, Context, Entity};
-use language_model::{LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID};
use provider::deepseek::DeepSeekLanguageModelProvider;
pub mod provider;
@@ -35,7 +35,10 @@ fn register_language_model_providers(
client: Arc<Client>,
cx: &mut Context<LanguageModelRegistry>,
) {
- use feature_flags::FeatureFlagAppExt;
+ registry.register_provider(
+ CloudLanguageModelProvider::new(user_store.clone(), client.clone(), cx),
+ cx,
+ );
registry.register_provider(
AnthropicLanguageModelProvider::new(client.http_client(), cx),
@@ -70,23 +73,4 @@ fn register_language_model_providers(
cx,
);
registry.register_provider(CopilotChatLanguageModelProvider::new(cx), cx);
- cx.observe_flag::<feature_flags::LanguageModelsFeatureFlag, _>(move |enabled, cx| {
- let user_store = user_store.clone();
- let client = client.clone();
- LanguageModelRegistry::global(cx).update(cx, move |registry, cx| {
- if enabled {
- registry.register_provider(
- CloudLanguageModelProvider::new(user_store.clone(), client.clone(), cx),
- LanguageModelProviderId::from(ZED_CLOUD_PROVIDER_ID.to_string()),
- });
- })
- .detach(); | [
"-pub struct LanguageModelsFeatureFlag {}",
"+use language_model::LanguageModelRegistry;",
"- } else {",
"- registry.unregister_provider(",
"- }"
] | [
8,
25,
55,
56,
60
] | {
"additions": 5,
"author": "maxdeviant",
"deletions": 26,
"html_url": "https://github.com/zed-industries/zed/pull/29416",
"issue_id": 29416,
"merged_at": "2025-04-25T14:18:48Z",
"omission_probability": 0.1,
"pr_number": 29416,
"repo": "zed-industries/zed",
"title": "language_models: Remove `language-models` feature flag",
"total_changes": 31
} |
460 | diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs
index 19a5e408b84d51..c53a7dea2bc0f6 100644
--- a/crates/workspace/src/pane.rs
+++ b/crates/workspace/src/pane.rs
@@ -44,8 +44,8 @@ use theme::ThemeSettings;
use ui::{
ButtonSize, Color, ContextMenu, ContextMenuEntry, ContextMenuItem, DecoratedIcon, IconButton,
IconButtonShape, IconDecoration, IconDecorationKind, IconName, IconSize, Indicator, Label,
- PopoverMenu, PopoverMenuHandle, Tab, TabBar, TabPosition, Tooltip, prelude::*,
- right_click_menu,
+ PopoverMenu, PopoverMenuHandle, ScrollableHandle, Tab, TabBar, TabPosition, Tooltip,
+ prelude::*, right_click_menu,
};
use util::{ResultExt, debug_panic, maybe, truncate_and_remove_front};
@@ -2661,12 +2661,22 @@ impl Pane {
tab_bar
}
})
- .children(
- pinned_tabs
- .len()
- .ne(&0)
- .then(|| h_flex().children(pinned_tabs)),
- )
+ .children(pinned_tabs.len().ne(&0).then(|| {
+ let content_width = self
+ .tab_bar_scroll_handle
+ .content_size()
+ .map(|content_size| content_size.size.width)
+ .unwrap_or(px(0.));
+ let viewport_width = self.tab_bar_scroll_handle.viewport().size.width;
+ // We need to check both because offset returns delta values even when the scroll handle is not scrollable
+ let is_scrollable = content_width > viewport_width;
+ let is_scrolled = self.tab_bar_scroll_handle.offset().x < px(0.);
+ h_flex()
+ .children(pinned_tabs)
+ .when(is_scrollable && is_scrolled, |this| {
+ this.border_r_1().border_color(cx.theme().colors().border)
+ })
+ }))
.child(
h_flex()
.id("unpinned tabs")
| diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs
index 19a5e408b84d51..c53a7dea2bc0f6 100644
--- a/crates/workspace/src/pane.rs
+++ b/crates/workspace/src/pane.rs
@@ -44,8 +44,8 @@ use theme::ThemeSettings;
use ui::{
ButtonSize, Color, ContextMenu, ContextMenuEntry, ContextMenuItem, DecoratedIcon, IconButton,
IconButtonShape, IconDecoration, IconDecorationKind, IconName, IconSize, Indicator, Label,
- PopoverMenu, PopoverMenuHandle, Tab, TabBar, TabPosition, Tooltip, prelude::*,
- right_click_menu,
+ PopoverMenu, PopoverMenuHandle, ScrollableHandle, Tab, TabBar, TabPosition, Tooltip,
+ prelude::*, right_click_menu,
};
use util::{ResultExt, debug_panic, maybe, truncate_and_remove_front};
@@ -2661,12 +2661,22 @@ impl Pane {
tab_bar
}
})
- pinned_tabs
- .len()
- .ne(&0)
- .then(|| h_flex().children(pinned_tabs)),
+ .children(pinned_tabs.len().ne(&0).then(|| {
+ let content_width = self
+ .tab_bar_scroll_handle
+ .content_size()
+ .map(|content_size| content_size.size.width)
+ .unwrap_or(px(0.));
+ let viewport_width = self.tab_bar_scroll_handle.viewport().size.width;
+ // We need to check both because offset returns delta values even when the scroll handle is not scrollable
+ let is_scrollable = content_width > viewport_width;
+ let is_scrolled = self.tab_bar_scroll_handle.offset().x < px(0.);
+ h_flex()
+ .when(is_scrollable && is_scrolled, |this| {
+ this.border_r_1().border_color(cx.theme().colors().border)
+ })
+ }))
.child(
h_flex()
.id("unpinned tabs") | [
"- .children(",
"- )",
"+ .children(pinned_tabs)"
] | [
19,
24,
36
] | {
"additions": 18,
"author": "smitbarmase",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29405",
"issue_id": 29405,
"merged_at": "2025-04-25T13:16:13Z",
"omission_probability": 0.1,
"pr_number": 29405,
"repo": "zed-industries/zed",
"title": "workspace: Add right border to pinned tabs only on scroll",
"total_changes": 26
} |
461 | diff --git a/crates/assistant_tool/src/tool_schema.rs b/crates/assistant_tool/src/tool_schema.rs
index c7d7ba1c33e4b4..9d2711ecb17fc7 100644
--- a/crates/assistant_tool/src/tool_schema.rs
+++ b/crates/assistant_tool/src/tool_schema.rs
@@ -35,7 +35,15 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
}
}
- obj.remove("format");
+ const KEYS_TO_REMOVE: [&str; 4] = [
+ "format",
+ "additionalProperties",
+ "exclusiveMinimum",
+ "exclusiveMaximum",
+ ];
+ for key in KEYS_TO_REMOVE {
+ obj.remove(key);
+ }
if let Some(default) = obj.get("default") {
let is_null = default.is_null();
@@ -47,7 +55,7 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
}
// If a type is not specified for an input parameter, add a default type
- if obj.contains_key("description")
+ if matches!(obj.get("description"), Some(Value::String(_)))
&& !obj.contains_key("type")
&& !(obj.contains_key("anyOf")
|| obj.contains_key("oneOf")
@@ -119,14 +127,37 @@ mod tests {
"type": "string"
})
);
+
+ // Ensure that we do not add a type if it is an object
+ let mut json = json!({
+ "description": {
+ "value": "abc",
+ "type": "string"
+ }
+ });
+
+ adapt_to_json_schema_subset(&mut json).unwrap();
+
+ assert_eq!(
+ json,
+ json!({
+ "description": {
+ "value": "abc",
+ "type": "string"
+ }
+ })
+ );
}
#[test]
- fn test_transform_removes_format() {
+ fn test_transform_removes_unsupported_keys() {
let mut json = json!({
"description": "A test field",
"type": "integer",
- "format": "uint32"
+ "format": "uint32",
+ "exclusiveMinimum": 0,
+ "exclusiveMaximum": 100,
+ "additionalProperties": false
});
adapt_to_json_schema_subset(&mut json).unwrap();
| diff --git a/crates/assistant_tool/src/tool_schema.rs b/crates/assistant_tool/src/tool_schema.rs
index c7d7ba1c33e4b4..9d2711ecb17fc7 100644
--- a/crates/assistant_tool/src/tool_schema.rs
+++ b/crates/assistant_tool/src/tool_schema.rs
@@ -35,7 +35,15 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
}
- obj.remove("format");
+ const KEYS_TO_REMOVE: [&str; 4] = [
+ "format",
+ "additionalProperties",
+ "exclusiveMinimum",
+ "exclusiveMaximum",
+ ];
+ for key in KEYS_TO_REMOVE {
+ obj.remove(key);
+ }
if let Some(default) = obj.get("default") {
let is_null = default.is_null();
@@ -47,7 +55,7 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
// If a type is not specified for an input parameter, add a default type
- if obj.contains_key("description")
+ if matches!(obj.get("description"), Some(Value::String(_)))
&& !obj.contains_key("type")
&& !(obj.contains_key("anyOf")
|| obj.contains_key("oneOf")
@@ -119,14 +127,37 @@ mod tests {
"type": "string"
})
);
+ // Ensure that we do not add a type if it is an object
+ let mut json = json!({
+ "description": {
+ "value": "abc",
+ "type": "string"
+ }
+ });
+ adapt_to_json_schema_subset(&mut json).unwrap();
+ assert_eq!(
+ json,
+ json!({
+ "description": {
+ "value": "abc",
+ "type": "string"
+ }
+ })
+ );
}
#[test]
- fn test_transform_removes_format() {
+ fn test_transform_removes_unsupported_keys() {
let mut json = json!({
"description": "A test field",
"type": "integer",
- "format": "uint32"
+ "format": "uint32",
+ "exclusiveMinimum": 0,
+ "exclusiveMaximum": 100,
+ "additionalProperties": false
});
adapt_to_json_schema_subset(&mut json).unwrap(); | [] | [] | {
"additions": 35,
"author": "bennetbo",
"deletions": 4,
"html_url": "https://github.com/zed-industries/zed/pull/29411",
"issue_id": 29411,
"merged_at": "2025-04-25T13:14:16Z",
"omission_probability": 0.1,
"pr_number": 29411,
"repo": "zed-industries/zed",
"title": "agent: Improve MCP tools compatibility with Gemini models",
"total_changes": 39
} |
462 | diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ completion_request.messages.push(request_message);
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index c5035f0827a281..1b25eade5af9a0 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -442,13 +442,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ None
+ } else {
+ Some(google_ai::Content {
+ parts,
+ role: match message.role {
+ Role::User => google_ai::Role::User,
+ Role::Assistant => google_ai::Role::Model,
+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig {
| diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ completion_request.messages.push(request_message);
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index c5035f0827a281..1b25eade5af9a0 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -442,13 +442,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ None
+ } else {
+ Some(google_ai::Content {
+ parts,
+ role: match message.role {
+ Role::User => google_ai::Role::User,
+ Role::Assistant => google_ai::Role::Model,
+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig { | [] | [] | {
"additions": 17,
"author": "gcp-cherry-pick-bot[bot]",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29409",
"issue_id": 29409,
"merged_at": "2025-04-25T12:47:17Z",
"omission_probability": 0.1,
"pr_number": 29409,
"repo": "zed-industries/zed",
"title": "assistant: Fix issue when using inline assistant with Gemini models (cherry-pick #29407)",
"total_changes": 25
} |
463 | diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ completion_request.messages.push(request_message);
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index 152eef13042fa8..be7a98cd7bc390 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -434,13 +434,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ None
+ } else {
+ Some(google_ai::Content {
+ parts,
+ role: match message.role {
+ Role::User => google_ai::Role::User,
+ Role::Assistant => google_ai::Role::Model,
+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig {
| diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index 152eef13042fa8..be7a98cd7bc390 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -434,13 +434,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ None
+ } else {
+ parts,
+ role: match message.role {
+ Role::User => google_ai::Role::User,
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig { | [
"+ completion_request.messages.push(request_message);",
"+ Some(google_ai::Content {",
"+ Role::Assistant => google_ai::Role::Model,",
"+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role"
] | [
10,
35,
39,
40
] | {
"additions": 17,
"author": "gcp-cherry-pick-bot[bot]",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29408",
"issue_id": 29408,
"merged_at": "2025-04-25T12:47:08Z",
"omission_probability": 0.1,
"pr_number": 29408,
"repo": "zed-industries/zed",
"title": "assistant: Fix issue when using inline assistant with Gemini models (cherry-pick #29407)",
"total_changes": 25
} |
464 | diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 3bfa46858cb9e5..9a4d9814e7e486 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1100,7 +1100,7 @@ fn possible_open_target(
for path_with_position in &potential_paths {
let path_to_check = if worktree_root.ends_with(&path_with_position.path) {
- let root_path_with_posiition = PathWithPosition {
+ let root_path_with_position = PathWithPosition {
path: worktree_root.to_path_buf(),
row: path_with_position.row,
column: path_with_position.column,
@@ -1108,11 +1108,11 @@ fn possible_open_target(
match worktree.read(cx).root_entry() {
Some(root_entry) => {
return Task::ready(Some(OpenTarget::Worktree(
- root_path_with_posiition,
+ root_path_with_position,
root_entry.clone(),
)));
}
- None => root_path_with_posiition,
+ None => root_path_with_position,
}
} else {
PathWithPosition {
@@ -1126,18 +1126,20 @@ fn possible_open_target(
}
};
- if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {
- return Task::ready(Some(OpenTarget::Worktree(
- PathWithPosition {
- path: worktree_root.join(&entry.path),
- row: path_to_check.row,
- column: path_to_check.column,
- },
- entry.clone(),
- )));
- } else {
- paths_to_check.push(path_to_check);
+ if path_to_check.path.is_relative() {
+ if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {
+ return Task::ready(Some(OpenTarget::Worktree(
+ PathWithPosition {
+ path: worktree_root.join(&entry.path),
+ row: path_to_check.row,
+ column: path_to_check.column,
+ },
+ entry.clone(),
+ )));
+ }
}
+
+ paths_to_check.push(path_to_check);
}
if !paths_to_check.is_empty() {
| diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 3bfa46858cb9e5..9a4d9814e7e486 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1100,7 +1100,7 @@ fn possible_open_target(
for path_with_position in &potential_paths {
let path_to_check = if worktree_root.ends_with(&path_with_position.path) {
- let root_path_with_posiition = PathWithPosition {
+ let root_path_with_position = PathWithPosition {
path: worktree_root.to_path_buf(),
row: path_with_position.row,
column: path_with_position.column,
@@ -1108,11 +1108,11 @@ fn possible_open_target(
match worktree.read(cx).root_entry() {
Some(root_entry) => {
return Task::ready(Some(OpenTarget::Worktree(
- root_path_with_posiition,
+ root_path_with_position,
root_entry.clone(),
)));
}
- None => root_path_with_posiition,
+ None => root_path_with_position,
} else {
PathWithPosition {
@@ -1126,18 +1126,20 @@ fn possible_open_target(
};
- return Task::ready(Some(OpenTarget::Worktree(
- PathWithPosition {
- path: worktree_root.join(&entry.path),
- row: path_to_check.row,
- column: path_to_check.column,
- },
- entry.clone(),
- )));
- } else {
- paths_to_check.push(path_to_check);
+ if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {
+ return Task::ready(Some(OpenTarget::Worktree(
+ PathWithPosition {
+ path: worktree_root.join(&entry.path),
+ row: path_to_check.row,
+ column: path_to_check.column,
+ },
+ entry.clone(),
+ )));
+ }
}
+
}
if !paths_to_check.is_empty() { | [
"- if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {",
"+ if path_to_check.path.is_relative() {",
"+ paths_to_check.push(path_to_check);"
] | [
31,
42,
55
] | {
"additions": 16,
"author": "SomeoneToIgnore",
"deletions": 14,
"html_url": "https://github.com/zed-industries/zed/pull/29406",
"issue_id": 29406,
"merged_at": "2025-04-25T12:34:09Z",
"omission_probability": 0.1,
"pr_number": 29406,
"repo": "zed-industries/zed",
"title": "When hovering paths in terminal, search worktree entries for relative ones only",
"total_changes": 30
} |
465 | diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ completion_request.messages.push(request_message);
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index c5035f0827a281..1b25eade5af9a0 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -442,13 +442,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ None
+ } else {
+ Some(google_ai::Content {
+ parts,
+ role: match message.role {
+ Role::User => google_ai::Role::User,
+ Role::Assistant => google_ai::Role::Model,
+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig {
| diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs
index 398a6659e13bd6..3c8548022ed3a3 100644
--- a/crates/assistant_context_editor/src/context.rs
+++ b/crates/assistant_context_editor/src/context.rs
@@ -2611,7 +2611,9 @@ impl AssistantContext {
.map(MessageContent::Text),
);
- completion_request.messages.push(request_message);
+ if !request_message.contents_empty() {
+ completion_request.messages.push(request_message);
+ }
}
if let RequestType::SuggestEdits = request_type {
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index c5035f0827a281..1b25eade5af9a0 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -442,13 +442,20 @@ pub fn into_google(
contents: request
.messages
.into_iter()
- .map(|message| google_ai::Content {
- parts: map_content(message.content),
- role: match message.role {
- Role::User => google_ai::Role::User,
- Role::Assistant => google_ai::Role::Model,
- Role::System => google_ai::Role::User, // Google AI doesn't have a system role
- },
+ .filter_map(|message| {
+ let parts = map_content(message.content);
+ if parts.is_empty() {
+ } else {
+ Some(google_ai::Content {
+ parts,
+ Role::User => google_ai::Role::User,
+ Role::Assistant => google_ai::Role::Model,
+ Role::System => google_ai::Role::User, // Google AI doesn't have a system role
+ },
+ })
+ }
})
.collect(),
generation_config: Some(google_ai::GenerationConfig { | [
"+ None",
"+ role: match message.role {"
] | [
33,
37
] | {
"additions": 17,
"author": "bennetbo",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29407",
"issue_id": 29407,
"merged_at": "2025-04-25T12:24:22Z",
"omission_probability": 0.1,
"pr_number": 29407,
"repo": "zed-industries/zed",
"title": "assistant: Fix issue when using inline assistant with Gemini models",
"total_changes": 25
} |
466 | diff --git a/crates/agent/src/inline_prompt_editor.rs b/crates/agent/src/inline_prompt_editor.rs
index 09d867db8b6d01..3c25ffb46ddceb 100644
--- a/crates/agent/src/inline_prompt_editor.rs
+++ b/crates/agent/src/inline_prompt_editor.rs
@@ -13,7 +13,7 @@ use editor::{
Editor, EditorElement, EditorEvent, EditorMode, EditorStyle, GutterDimensions, MultiBuffer,
actions::{MoveDown, MoveUp},
};
-use feature_flags::{FeatureFlagAppExt as _, ZedPro};
+use feature_flags::{FeatureFlagAppExt as _, ZedProFeatureFlag};
use fs::Fs;
use gpui::{
AnyElement, App, ClickEvent, Context, CursorStyle, Entity, EventEmitter, FocusHandle,
@@ -132,7 +132,7 @@ impl<T: 'static> Render for PromptEditor<T> {
let error_message = SharedString::from(error.to_string());
if error.error_code() == proto::ErrorCode::RateLimitExceeded
- && cx.has_flag::<ZedPro>()
+ && cx.has_flag::<ZedProFeatureFlag>()
{
el.child(
v_flex()
@@ -931,7 +931,7 @@ impl PromptEditor<BufferCodegen> {
.update(cx, |editor, _| editor.set_read_only(false));
}
CodegenStatus::Error(error) => {
- if cx.has_flag::<ZedPro>()
+ if cx.has_flag::<ZedProFeatureFlag>()
&& error.error_code() == proto::ErrorCode::RateLimitExceeded
&& !dismissed_rate_limit_notice()
{
diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 34fbecc44bc73c..87b68617376c30 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -2097,7 +2097,7 @@ impl Thread {
}
pub fn auto_capture_telemetry(&mut self, cx: &mut Context<Self>) {
- if !cx.has_flag::<feature_flags::ThreadAutoCapture>() {
+ if !cx.has_flag::<feature_flags::ThreadAutoCaptureFeatureFlag>() {
return;
}
diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rs
index ef7a10e3d00196..85f232fda792c0 100644
--- a/crates/assistant/src/inline_assistant.rs
+++ b/crates/assistant/src/inline_assistant.rs
@@ -18,7 +18,7 @@ use editor::{
},
};
use feature_flags::{
- Assistant2FeatureFlag, FeatureFlagAppExt as _, FeatureFlagViewExt as _, ZedPro,
+ Assistant2FeatureFlag, FeatureFlagAppExt as _, FeatureFlagViewExt as _, ZedProFeatureFlag,
};
use fs::Fs;
use futures::{
@@ -1652,7 +1652,7 @@ impl Render for PromptEditor {
let error_message = SharedString::from(error.to_string());
if error.error_code() == proto::ErrorCode::RateLimitExceeded
- && cx.has_flag::<ZedPro>()
+ && cx.has_flag::<ZedProFeatureFlag>()
{
el.child(
v_flex()
@@ -1966,7 +1966,7 @@ impl PromptEditor {
.update(cx, |editor, _| editor.set_read_only(false));
}
CodegenStatus::Error(error) => {
- if cx.has_flag::<ZedPro>()
+ if cx.has_flag::<ZedProFeatureFlag>()
&& error.error_code() == proto::ErrorCode::RateLimitExceeded
&& !dismissed_rate_limit_notice()
{
diff --git a/crates/debugger_ui/src/debugger_ui.rs b/crates/debugger_ui/src/debugger_ui.rs
index 1630e27d23f176..bb90399837f16f 100644
--- a/crates/debugger_ui/src/debugger_ui.rs
+++ b/crates/debugger_ui/src/debugger_ui.rs
@@ -1,7 +1,7 @@
use dap::debugger_settings::DebuggerSettings;
use debugger_panel::{DebugPanel, ToggleFocus};
use editor::Editor;
-use feature_flags::{Debugger, FeatureFlagViewExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagViewExt};
use gpui::{App, EntityInputHandler, actions};
use new_session_modal::NewSessionModal;
use project::debugger::{self, breakpoint_store::SourceBreakpoint};
@@ -47,7 +47,7 @@ pub fn init(cx: &mut App) {
return;
};
- cx.when_flag_enabled::<Debugger>(window, |workspace, _, _| {
+ cx.when_flag_enabled::<DebuggerFeatureFlag>(window, |workspace, _, _| {
workspace
.register_action(|workspace, _: &ToggleFocus, window, cx| {
workspace.toggle_panel_focus::<DebugPanel>(window, cx);
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 8fc7b3c49e2e50..0951497ac76a0d 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -1,4 +1,4 @@
-use feature_flags::{Debugger, FeatureFlagAppExt as _};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt as _};
use fuzzy::{StringMatch, StringMatchCandidate};
use gpui::{
AnyElement, BackgroundExecutor, Entity, Focusable, FontWeight, ListSizingBehavior,
@@ -812,7 +812,7 @@ impl CodeActionContents {
actions: Option<Rc<[AvailableCodeAction]>>,
cx: &App,
) -> Self {
- if !cx.has_flag::<Debugger>() {
+ if !cx.has_flag::<DebuggerFeatureFlag>() {
if let Some(tasks) = &mut tasks {
tasks
.templates
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index b09adde8c092fe..8069b20109f167 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -71,7 +71,7 @@ use element::{AcceptEditPredictionBinding, LineWithInvisibles, PositionMap, layo
pub use element::{
CursorLayout, EditorElement, HighlightedRange, HighlightedRangeLine, PointForPosition,
};
-use feature_flags::{Debugger, FeatureFlagAppExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt};
use futures::{
FutureExt,
future::{self, Shared, join},
@@ -5159,7 +5159,7 @@ impl Editor {
Self::build_tasks_context(&project, &buffer, buffer_row, tasks, cx)
});
- let debugger_flag = cx.has_flag::<Debugger>();
+ let debugger_flag = cx.has_flag::<DebuggerFeatureFlag>();
Some(cx.spawn_in(window, async move |editor, cx| {
let task_context = match task_context {
@@ -9150,7 +9150,7 @@ impl Editor {
window: &mut Window,
cx: &mut Context<Self>,
) {
- if !cx.has_flag::<Debugger>() {
+ if !cx.has_flag::<DebuggerFeatureFlag>() {
return;
}
let source = self
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index abb7a48dceb06b..d919e24a845e00 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -30,7 +30,7 @@ use crate::{
use buffer_diff::{DiffHunkStatus, DiffHunkStatusKind};
use client::ParticipantIndex;
use collections::{BTreeMap, HashMap};
-use feature_flags::{Debugger, FeatureFlagAppExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt};
use file_icons::FileIcons;
use git::{
Oid,
@@ -547,7 +547,7 @@ impl EditorElement {
register_action(editor, window, Editor::insert_uuid_v4);
register_action(editor, window, Editor::insert_uuid_v7);
register_action(editor, window, Editor::open_selections_in_multibuffer);
- if cx.has_flag::<Debugger>() {
+ if cx.has_flag::<DebuggerFeatureFlag>() {
register_action(editor, window, Editor::toggle_breakpoint);
register_action(editor, window, Editor::edit_log_breakpoint);
register_action(editor, window, Editor::enable_breakpoint);
@@ -7037,7 +7037,7 @@ impl Element for EditorElement {
let mut breakpoint_rows = self.editor.update(cx, |editor, cx| {
editor.active_breakpoints(start_row..end_row, window, cx)
});
- if cx.has_flag::<Debugger>() {
+ if cx.has_flag::<DebuggerFeatureFlag>() {
for display_row in breakpoint_rows.keys() {
active_rows.entry(*display_row).or_default().breakpoint = true;
}
@@ -7060,7 +7060,7 @@ impl Element for EditorElement {
// We add the gutter breakpoint indicator to breakpoint_rows after painting
// line numbers so we don't paint a line number debug accent color if a user
// has their mouse over that line when a breakpoint isn't there
- if cx.has_flag::<Debugger>() {
+ if cx.has_flag::<DebuggerFeatureFlag>() {
let gutter_breakpoint_indicator =
self.editor.read(cx).gutter_breakpoint_indicator.0;
if let Some((gutter_breakpoint_point, _)) =
@@ -7576,7 +7576,7 @@ impl Element for EditorElement {
let show_breakpoints = snapshot
.show_breakpoints
.unwrap_or(gutter_settings.breakpoints);
- let breakpoints = if cx.has_flag::<Debugger>() && show_breakpoints {
+ let breakpoints = if cx.has_flag::<DebuggerFeatureFlag>() && show_breakpoints {
self.layout_breakpoints(
line_height,
start_row..end_row,
diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index 34b4d79f34f639..f0035ab1433cc7 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -64,18 +64,18 @@ impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
const NAME: &'static str = "predict-edits-rate-completions";
}
-pub struct LanguageModels {}
-impl FeatureFlag for LanguageModels {
+pub struct LanguageModelsFeatureFlag {}
+impl FeatureFlag for LanguageModelsFeatureFlag {
const NAME: &'static str = "language-models";
}
-pub struct LlmClosedBeta {}
-impl FeatureFlag for LlmClosedBeta {
+pub struct LlmClosedBetaFeatureFlag {}
+impl FeatureFlag for LlmClosedBetaFeatureFlag {
const NAME: &'static str = "llm-closed-beta";
}
-pub struct ZedPro {}
-impl FeatureFlag for ZedPro {
+pub struct ZedProFeatureFlag {}
+impl FeatureFlag for ZedProFeatureFlag {
const NAME: &'static str = "zed-pro";
}
@@ -85,13 +85,13 @@ impl FeatureFlag for NotebookFeatureFlag {
const NAME: &'static str = "notebooks";
}
-pub struct Debugger {}
-impl FeatureFlag for Debugger {
+pub struct DebuggerFeatureFlag {}
+impl FeatureFlag for DebuggerFeatureFlag {
const NAME: &'static str = "debugger";
}
-pub struct ThreadAutoCapture {}
-impl FeatureFlag for ThreadAutoCapture {
+pub struct ThreadAutoCaptureFeatureFlag {}
+impl FeatureFlag for ThreadAutoCaptureFeatureFlag {
const NAME: &'static str = "thread-auto-capture";
fn enabled_for_staff() -> bool {
diff --git a/crates/language_model_selector/src/language_model_selector.rs b/crates/language_model_selector/src/language_model_selector.rs
index f4710e26b9efe2..e677c3e3da4e0a 100644
--- a/crates/language_model_selector/src/language_model_selector.rs
+++ b/crates/language_model_selector/src/language_model_selector.rs
@@ -1,7 +1,7 @@
use std::sync::Arc;
use collections::{HashSet, IndexMap};
-use feature_flags::{Assistant2FeatureFlag, ZedPro};
+use feature_flags::{Assistant2FeatureFlag, ZedProFeatureFlag};
use gpui::{
Action, AnyElement, AnyView, App, Corner, DismissEvent, Entity, EventEmitter, FocusHandle,
Focusable, Subscription, Task, WeakEntity, action_with_deprecated_aliases,
@@ -584,7 +584,7 @@ impl PickerDelegate for LanguageModelPickerDelegate {
.p_1()
.gap_4()
.justify_between()
- .when(cx.has_flag::<ZedPro>(), |this| {
+ .when(cx.has_flag::<ZedProFeatureFlag>(), |this| {
this.child(match plan {
Plan::ZedPro => Button::new("zed-pro", "Zed Pro")
.icon(IconName::ZedAssistant)
diff --git a/crates/language_models/src/language_models.rs b/crates/language_models/src/language_models.rs
index 880bad6201baf8..4d78e10cba383a 100644
--- a/crates/language_models/src/language_models.rs
+++ b/crates/language_models/src/language_models.rs
@@ -71,7 +71,7 @@ fn register_language_model_providers(
);
registry.register_provider(CopilotChatLanguageModelProvider::new(cx), cx);
- cx.observe_flag::<feature_flags::LanguageModels, _>(move |enabled, cx| {
+ cx.observe_flag::<feature_flags::LanguageModelsFeatureFlag, _>(move |enabled, cx| {
let user_store = user_store.clone();
let client = client.clone();
LanguageModelRegistry::global(cx).update(cx, move |registry, cx| {
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index 4caf91cc2cbf21..f70e72104486bd 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -2,7 +2,7 @@ use anthropic::{AnthropicError, AnthropicModelMode, parse_prompt_too_long};
use anyhow::{Result, anyhow};
use client::{Client, UserStore, zed_urls};
use collections::BTreeMap;
-use feature_flags::{FeatureFlagAppExt, LlmClosedBeta, ZedPro};
+use feature_flags::{FeatureFlagAppExt, LlmClosedBetaFeatureFlag, ZedProFeatureFlag};
use futures::{
AsyncBufReadExt, FutureExt, Stream, StreamExt, TryStreamExt as _, future::BoxFuture,
stream::BoxStream,
@@ -324,7 +324,7 @@ impl LanguageModelProvider for CloudLanguageModelProvider {
);
}
- let llm_closed_beta_models = if cx.has_flag::<LlmClosedBeta>() {
+ let llm_closed_beta_models = if cx.has_flag::<LlmClosedBetaFeatureFlag>() {
zed_cloud_provider_additional_models()
} else {
&[]
@@ -945,7 +945,7 @@ impl Render for ConfigurationView {
),
),
)
- } else if cx.has_flag::<ZedPro>() {
+ } else if cx.has_flag::<ZedProFeatureFlag>() {
Some(
h_flex()
.gap_2()
diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs
index b44cbb5c5e330b..9c80633fb4a812 100644
--- a/crates/title_bar/src/title_bar.rs
+++ b/crates/title_bar/src/title_bar.rs
@@ -18,7 +18,7 @@ use crate::platforms::{platform_linux, platform_mac, platform_windows};
use auto_update::AutoUpdateStatus;
use call::ActiveCall;
use client::{Client, UserStore};
-use feature_flags::{FeatureFlagAppExt, ZedPro};
+use feature_flags::{FeatureFlagAppExt, ZedProFeatureFlag};
use gpui::{
Action, AnyElement, App, Context, Corner, Decorations, Element, Entity, InteractiveElement,
Interactivity, IntoElement, MouseButton, ParentElement, Render, Stateful,
@@ -663,7 +663,7 @@ impl TitleBar {
.anchor(Corner::TopRight)
.menu(move |window, cx| {
ContextMenu::build(window, cx, |menu, _, cx| {
- menu.when(cx.has_flag::<ZedPro>(), |menu| {
+ menu.when(cx.has_flag::<ZedProFeatureFlag>(), |menu| {
menu.action(
format!(
"Current Plan: {}",
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index f351d66e36e013..c151d337a7a03b 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -20,7 +20,7 @@ use command_palette_hooks::CommandPaletteFilter;
use debugger_ui::debugger_panel::DebugPanel;
use editor::ProposedChangesEditorToolbar;
use editor::{Editor, MultiBuffer, scroll::Autoscroll};
-use feature_flags::{Debugger, FeatureFlagAppExt, FeatureFlagViewExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt, FeatureFlagViewExt};
use futures::{StreamExt, channel::mpsc, select_biased};
use git_ui::git_panel::GitPanel;
use git_ui::project_diff::ProjectDiffToolbar;
@@ -279,7 +279,7 @@ fn feature_gate_zed_pro_actions(cx: &mut App) {
filter.hide_action_types(&zed_pro_actions);
});
- cx.observe_flag::<feature_flags::ZedPro, _>({
+ cx.observe_flag::<feature_flags::ZedProFeatureFlag, _>({
move |is_enabled, cx| {
CommandPaletteFilter::update_global(cx, |filter, _cx| {
if is_enabled {
@@ -439,7 +439,7 @@ fn initialize_panels(
workspace.add_panel(channels_panel, window, cx);
workspace.add_panel(chat_panel, window, cx);
workspace.add_panel(notification_panel, window, cx);
- cx.when_flag_enabled::<Debugger>(window, |_, window, cx| {
+ cx.when_flag_enabled::<DebuggerFeatureFlag>(window, |_, window, cx| {
cx.spawn_in(
window,
async move |workspace: gpui::WeakEntity<Workspace>,
| diff --git a/crates/agent/src/inline_prompt_editor.rs b/crates/agent/src/inline_prompt_editor.rs
index 09d867db8b6d01..3c25ffb46ddceb 100644
--- a/crates/agent/src/inline_prompt_editor.rs
+++ b/crates/agent/src/inline_prompt_editor.rs
@@ -13,7 +13,7 @@ use editor::{
Editor, EditorElement, EditorEvent, EditorMode, EditorStyle, GutterDimensions, MultiBuffer,
actions::{MoveDown, MoveUp},
-use feature_flags::{FeatureFlagAppExt as _, ZedPro};
+use feature_flags::{FeatureFlagAppExt as _, ZedProFeatureFlag};
AnyElement, App, ClickEvent, Context, CursorStyle, Entity, EventEmitter, FocusHandle,
@@ -132,7 +132,7 @@ impl<T: 'static> Render for PromptEditor<T> {
let error_message = SharedString::from(error.to_string());
if error.error_code() == proto::ErrorCode::RateLimitExceeded
- && cx.has_flag::<ZedPro>()
+ && cx.has_flag::<ZedProFeatureFlag>()
{
el.child(
v_flex()
@@ -931,7 +931,7 @@ impl PromptEditor<BufferCodegen> {
diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 34fbecc44bc73c..87b68617376c30 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -2097,7 +2097,7 @@ impl Thread {
}
pub fn auto_capture_telemetry(&mut self, cx: &mut Context<Self>) {
- if !cx.has_flag::<feature_flags::ThreadAutoCapture>() {
+ if !cx.has_flag::<feature_flags::ThreadAutoCaptureFeatureFlag>() {
diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rs
index ef7a10e3d00196..85f232fda792c0 100644
--- a/crates/assistant/src/inline_assistant.rs
+++ b/crates/assistant/src/inline_assistant.rs
@@ -18,7 +18,7 @@ use editor::{
},
use feature_flags::{
+ Assistant2FeatureFlag, FeatureFlagAppExt as _, FeatureFlagViewExt as _, ZedProFeatureFlag,
@@ -1652,7 +1652,7 @@ impl Render for PromptEditor {
let error_message = SharedString::from(error.to_string());
if error.error_code() == proto::ErrorCode::RateLimitExceeded
- && cx.has_flag::<ZedPro>()
+ && cx.has_flag::<ZedProFeatureFlag>()
{
el.child(
v_flex()
@@ -1966,7 +1966,7 @@ impl PromptEditor {
diff --git a/crates/debugger_ui/src/debugger_ui.rs b/crates/debugger_ui/src/debugger_ui.rs
index 1630e27d23f176..bb90399837f16f 100644
--- a/crates/debugger_ui/src/debugger_ui.rs
+++ b/crates/debugger_ui/src/debugger_ui.rs
use dap::debugger_settings::DebuggerSettings;
use debugger_panel::{DebugPanel, ToggleFocus};
use editor::Editor;
-use feature_flags::{Debugger, FeatureFlagViewExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagViewExt};
use gpui::{App, EntityInputHandler, actions};
use new_session_modal::NewSessionModal;
use project::debugger::{self, breakpoint_store::SourceBreakpoint};
@@ -47,7 +47,7 @@ pub fn init(cx: &mut App) {
};
- cx.when_flag_enabled::<Debugger>(window, |workspace, _, _| {
+ cx.when_flag_enabled::<DebuggerFeatureFlag>(window, |workspace, _, _| {
workspace
.register_action(|workspace, _: &ToggleFocus, window, cx| {
workspace.toggle_panel_focus::<DebugPanel>(window, cx);
diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs
index 8fc7b3c49e2e50..0951497ac76a0d 100644
--- a/crates/editor/src/code_context_menus.rs
+++ b/crates/editor/src/code_context_menus.rs
@@ -1,4 +1,4 @@
-use feature_flags::{Debugger, FeatureFlagAppExt as _};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt as _};
use fuzzy::{StringMatch, StringMatchCandidate};
AnyElement, BackgroundExecutor, Entity, Focusable, FontWeight, ListSizingBehavior,
@@ -812,7 +812,7 @@ impl CodeActionContents {
actions: Option<Rc<[AvailableCodeAction]>>,
cx: &App,
) -> Self {
if let Some(tasks) = &mut tasks {
tasks
.templates
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index b09adde8c092fe..8069b20109f167 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -71,7 +71,7 @@ use element::{AcceptEditPredictionBinding, LineWithInvisibles, PositionMap, layo
pub use element::{
CursorLayout, EditorElement, HighlightedRange, HighlightedRangeLine, PointForPosition,
FutureExt,
future::{self, Shared, join},
@@ -5159,7 +5159,7 @@ impl Editor {
Self::build_tasks_context(&project, &buffer, buffer_row, tasks, cx)
});
- let debugger_flag = cx.has_flag::<Debugger>();
+ let debugger_flag = cx.has_flag::<DebuggerFeatureFlag>();
Some(cx.spawn_in(window, async move |editor, cx| {
let task_context = match task_context {
@@ -9150,7 +9150,7 @@ impl Editor {
window: &mut Window,
cx: &mut Context<Self>,
) {
let source = self
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index abb7a48dceb06b..d919e24a845e00 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -30,7 +30,7 @@ use crate::{
use buffer_diff::{DiffHunkStatus, DiffHunkStatusKind};
use client::ParticipantIndex;
use collections::{BTreeMap, HashMap};
use file_icons::FileIcons;
use git::{
Oid,
@@ -547,7 +547,7 @@ impl EditorElement {
register_action(editor, window, Editor::insert_uuid_v4);
register_action(editor, window, Editor::insert_uuid_v7);
register_action(editor, window, Editor::open_selections_in_multibuffer);
- if cx.has_flag::<Debugger>() {
+ if cx.has_flag::<DebuggerFeatureFlag>() {
register_action(editor, window, Editor::toggle_breakpoint);
register_action(editor, window, Editor::edit_log_breakpoint);
register_action(editor, window, Editor::enable_breakpoint);
@@ -7037,7 +7037,7 @@ impl Element for EditorElement {
let mut breakpoint_rows = self.editor.update(cx, |editor, cx| {
editor.active_breakpoints(start_row..end_row, window, cx)
});
for display_row in breakpoint_rows.keys() {
active_rows.entry(*display_row).or_default().breakpoint = true;
}
@@ -7060,7 +7060,7 @@ impl Element for EditorElement {
// We add the gutter breakpoint indicator to breakpoint_rows after painting
// line numbers so we don't paint a line number debug accent color if a user
// has their mouse over that line when a breakpoint isn't there
let gutter_breakpoint_indicator =
self.editor.read(cx).gutter_breakpoint_indicator.0;
if let Some((gutter_breakpoint_point, _)) =
@@ -7576,7 +7576,7 @@ impl Element for EditorElement {
let show_breakpoints = snapshot
.show_breakpoints
.unwrap_or(gutter_settings.breakpoints);
- let breakpoints = if cx.has_flag::<Debugger>() && show_breakpoints {
+ let breakpoints = if cx.has_flag::<DebuggerFeatureFlag>() && show_breakpoints {
self.layout_breakpoints(
line_height,
start_row..end_row,
diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index 34b4d79f34f639..f0035ab1433cc7 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -64,18 +64,18 @@ impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag {
const NAME: &'static str = "predict-edits-rate-completions";
-pub struct LanguageModels {}
-impl FeatureFlag for LanguageModels {
+pub struct LanguageModelsFeatureFlag {}
+impl FeatureFlag for LanguageModelsFeatureFlag {
const NAME: &'static str = "language-models";
-pub struct LlmClosedBeta {}
-impl FeatureFlag for LlmClosedBeta {
+pub struct LlmClosedBetaFeatureFlag {}
const NAME: &'static str = "llm-closed-beta";
-pub struct ZedPro {}
-impl FeatureFlag for ZedPro {
+impl FeatureFlag for ZedProFeatureFlag {
const NAME: &'static str = "zed-pro";
@@ -85,13 +85,13 @@ impl FeatureFlag for NotebookFeatureFlag {
const NAME: &'static str = "notebooks";
-pub struct Debugger {}
-impl FeatureFlag for Debugger {
+impl FeatureFlag for DebuggerFeatureFlag {
const NAME: &'static str = "debugger";
-pub struct ThreadAutoCapture {}
+impl FeatureFlag for ThreadAutoCaptureFeatureFlag {
const NAME: &'static str = "thread-auto-capture";
fn enabled_for_staff() -> bool {
diff --git a/crates/language_model_selector/src/language_model_selector.rs b/crates/language_model_selector/src/language_model_selector.rs
index f4710e26b9efe2..e677c3e3da4e0a 100644
--- a/crates/language_model_selector/src/language_model_selector.rs
+++ b/crates/language_model_selector/src/language_model_selector.rs
use std::sync::Arc;
use collections::{HashSet, IndexMap};
-use feature_flags::{Assistant2FeatureFlag, ZedPro};
+use feature_flags::{Assistant2FeatureFlag, ZedProFeatureFlag};
Action, AnyElement, AnyView, App, Corner, DismissEvent, Entity, EventEmitter, FocusHandle,
Focusable, Subscription, Task, WeakEntity, action_with_deprecated_aliases,
@@ -584,7 +584,7 @@ impl PickerDelegate for LanguageModelPickerDelegate {
.p_1()
.gap_4()
.justify_between()
- .when(cx.has_flag::<ZedPro>(), |this| {
+ .when(cx.has_flag::<ZedProFeatureFlag>(), |this| {
this.child(match plan {
Plan::ZedPro => Button::new("zed-pro", "Zed Pro")
.icon(IconName::ZedAssistant)
diff --git a/crates/language_models/src/language_models.rs b/crates/language_models/src/language_models.rs
index 880bad6201baf8..4d78e10cba383a 100644
--- a/crates/language_models/src/language_models.rs
+++ b/crates/language_models/src/language_models.rs
@@ -71,7 +71,7 @@ fn register_language_model_providers(
);
registry.register_provider(CopilotChatLanguageModelProvider::new(cx), cx);
- cx.observe_flag::<feature_flags::LanguageModels, _>(move |enabled, cx| {
+ cx.observe_flag::<feature_flags::LanguageModelsFeatureFlag, _>(move |enabled, cx| {
let user_store = user_store.clone();
let client = client.clone();
LanguageModelRegistry::global(cx).update(cx, move |registry, cx| {
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index 4caf91cc2cbf21..f70e72104486bd 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -2,7 +2,7 @@ use anthropic::{AnthropicError, AnthropicModelMode, parse_prompt_too_long};
use anyhow::{Result, anyhow};
use client::{Client, UserStore, zed_urls};
use collections::BTreeMap;
-use feature_flags::{FeatureFlagAppExt, LlmClosedBeta, ZedPro};
+use feature_flags::{FeatureFlagAppExt, LlmClosedBetaFeatureFlag, ZedProFeatureFlag};
AsyncBufReadExt, FutureExt, Stream, StreamExt, TryStreamExt as _, future::BoxFuture,
stream::BoxStream,
@@ -324,7 +324,7 @@ impl LanguageModelProvider for CloudLanguageModelProvider {
);
- let llm_closed_beta_models = if cx.has_flag::<LlmClosedBeta>() {
+ let llm_closed_beta_models = if cx.has_flag::<LlmClosedBetaFeatureFlag>() {
zed_cloud_provider_additional_models()
} else {
&[]
@@ -945,7 +945,7 @@ impl Render for ConfigurationView {
),
),
)
+ } else if cx.has_flag::<ZedProFeatureFlag>() {
Some(
h_flex()
.gap_2()
diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs
index b44cbb5c5e330b..9c80633fb4a812 100644
--- a/crates/title_bar/src/title_bar.rs
+++ b/crates/title_bar/src/title_bar.rs
@@ -18,7 +18,7 @@ use crate::platforms::{platform_linux, platform_mac, platform_windows};
use auto_update::AutoUpdateStatus;
use call::ActiveCall;
use client::{Client, UserStore};
-use feature_flags::{FeatureFlagAppExt, ZedPro};
+use feature_flags::{FeatureFlagAppExt, ZedProFeatureFlag};
Action, AnyElement, App, Context, Corner, Decorations, Element, Entity, InteractiveElement,
Interactivity, IntoElement, MouseButton, ParentElement, Render, Stateful,
@@ -663,7 +663,7 @@ impl TitleBar {
.anchor(Corner::TopRight)
.menu(move |window, cx| {
ContextMenu::build(window, cx, |menu, _, cx| {
- menu.when(cx.has_flag::<ZedPro>(), |menu| {
+ menu.when(cx.has_flag::<ZedProFeatureFlag>(), |menu| {
menu.action(
format!(
"Current Plan: {}",
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index f351d66e36e013..c151d337a7a03b 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -20,7 +20,7 @@ use command_palette_hooks::CommandPaletteFilter;
use debugger_ui::debugger_panel::DebugPanel;
use editor::ProposedChangesEditorToolbar;
use editor::{Editor, MultiBuffer, scroll::Autoscroll};
-use feature_flags::{Debugger, FeatureFlagAppExt, FeatureFlagViewExt};
+use feature_flags::{DebuggerFeatureFlag, FeatureFlagAppExt, FeatureFlagViewExt};
use futures::{StreamExt, channel::mpsc, select_biased};
use git_ui::git_panel::GitPanel;
use git_ui::project_diff::ProjectDiffToolbar;
@@ -279,7 +279,7 @@ fn feature_gate_zed_pro_actions(cx: &mut App) {
filter.hide_action_types(&zed_pro_actions);
});
+ cx.observe_flag::<feature_flags::ZedProFeatureFlag, _>({
move |is_enabled, cx| {
CommandPaletteFilter::update_global(cx, |filter, _cx| {
if is_enabled {
@@ -439,7 +439,7 @@ fn initialize_panels(
workspace.add_panel(channels_panel, window, cx);
workspace.add_panel(chat_panel, window, cx);
workspace.add_panel(notification_panel, window, cx);
+ cx.when_flag_enabled::<DebuggerFeatureFlag>(window, |_, window, cx| {
cx.spawn_in(
window,
async move |workspace: gpui::WeakEntity<Workspace>, | [
"- Assistant2FeatureFlag, FeatureFlagAppExt as _, FeatureFlagViewExt as _, ZedPro,",
"+impl FeatureFlag for LlmClosedBetaFeatureFlag {",
"+pub struct ZedProFeatureFlag {}",
"+pub struct DebuggerFeatureFlag {}",
"-impl FeatureFlag for ThreadAutoCapture {",
"+pub struct ThreadAutoCaptureFeatureFlag {}",
"- } else if cx.has_flag::<ZedPro>() {",
"- cx.observe_flag::<feature_flags::ZedPro, _>({",
"- cx.when_flag_enabled::<Debugger>(window, |_, window, cx| {"
] | [
52,
214,
220,
231,
237,
238,
304,
348,
357
] | {
"additions": 40,
"author": "maxdeviant",
"deletions": 40,
"html_url": "https://github.com/zed-industries/zed/pull/29392",
"issue_id": 29392,
"merged_at": "2025-04-25T04:07:49Z",
"omission_probability": 0.1,
"pr_number": 29392,
"repo": "zed-industries/zed",
"title": "feature_flags: Add `FeatureFlag` suffix to feature flag types",
"total_changes": 80
} |
467 | diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs
index ef60b0e6c45fb3..3a68546adbcfd7 100644
--- a/crates/agent/src/message_editor.rs
+++ b/crates/agent/src/message_editor.rs
@@ -146,7 +146,7 @@ impl MessageEditor {
_ => {}
}),
cx.observe(&context_store, |this, _, cx| {
- this.handle_context_changed(cx)
+ let _ = this.start_context_load(cx);
}),
];
@@ -286,7 +286,7 @@ impl MessageEditor {
let thread = self.thread.clone();
let git_store = self.project.read(cx).git_store().clone();
let checkpoint = git_store.update(cx, |git_store, cx| git_store.checkpoint(cx));
- let context_task = self.wait_for_context(cx);
+ let context_task = self.load_context(cx);
let window_handle = window.window_handle();
cx.spawn(async move |_this, cx| {
@@ -1010,7 +1010,7 @@ impl MessageEditor {
self.message_or_context_changed(true, cx);
}
- fn handle_context_changed(&mut self, cx: &mut Context<Self>) {
+ fn start_context_load(&mut self, cx: &mut Context<Self>) -> Shared<Task<()>> {
let summaries_task = self.wait_for_summaries(cx);
let load_task = cx.spawn(async move |this, cx| {
// Waits for detailed summaries before `load_context`, as it directly reads these from
@@ -1033,20 +1033,19 @@ impl MessageEditor {
.ok();
});
// Replace existing load task, if any, causing it to be cancelled.
- self.context_load_task = Some(load_task.shared());
+ let load_task = load_task.shared();
+ self.context_load_task = Some(load_task.clone());
+ load_task
}
- fn wait_for_context(&self, cx: &mut Context<Self>) -> Task<Option<ContextLoadResult>> {
- if let Some(context_load_task) = self.context_load_task.clone() {
- cx.spawn(async move |this, cx| {
- context_load_task.await;
- this.read_with(cx, |this, _cx| this.last_loaded_context.clone())
- .ok()
- .flatten()
- })
- } else {
- Task::ready(self.last_loaded_context.clone())
- }
+ fn load_context(&mut self, cx: &mut Context<Self>) -> Task<Option<ContextLoadResult>> {
+ let context_load_task = self.start_context_load(cx);
+ cx.spawn(async move |this, cx| {
+ context_load_task.await;
+ this.read_with(cx, |this, _cx| this.last_loaded_context.clone())
+ .ok()
+ .flatten()
+ })
}
fn message_or_context_changed(&mut self, debounce: bool, cx: &mut Context<Self>) {
| diff --git a/crates/agent/src/message_editor.rs b/crates/agent/src/message_editor.rs
index ef60b0e6c45fb3..3a68546adbcfd7 100644
--- a/crates/agent/src/message_editor.rs
+++ b/crates/agent/src/message_editor.rs
@@ -146,7 +146,7 @@ impl MessageEditor {
_ => {}
cx.observe(&context_store, |this, _, cx| {
- this.handle_context_changed(cx)
+ let _ = this.start_context_load(cx);
];
@@ -286,7 +286,7 @@ impl MessageEditor {
let thread = self.thread.clone();
let git_store = self.project.read(cx).git_store().clone();
let checkpoint = git_store.update(cx, |git_store, cx| git_store.checkpoint(cx));
+ let context_task = self.load_context(cx);
let window_handle = window.window_handle();
cx.spawn(async move |_this, cx| {
@@ -1010,7 +1010,7 @@ impl MessageEditor {
self.message_or_context_changed(true, cx);
- fn handle_context_changed(&mut self, cx: &mut Context<Self>) {
+ fn start_context_load(&mut self, cx: &mut Context<Self>) -> Shared<Task<()>> {
let summaries_task = self.wait_for_summaries(cx);
let load_task = cx.spawn(async move |this, cx| {
// Waits for detailed summaries before `load_context`, as it directly reads these from
@@ -1033,20 +1033,19 @@ impl MessageEditor {
.ok();
});
// Replace existing load task, if any, causing it to be cancelled.
- self.context_load_task = Some(load_task.shared());
+ load_task
- fn wait_for_context(&self, cx: &mut Context<Self>) -> Task<Option<ContextLoadResult>> {
- if let Some(context_load_task) = self.context_load_task.clone() {
- cx.spawn(async move |this, cx| {
- context_load_task.await;
- this.read_with(cx, |this, _cx| this.last_loaded_context.clone())
- .ok()
- .flatten()
- })
- } else {
- Task::ready(self.last_loaded_context.clone())
- }
+ fn load_context(&mut self, cx: &mut Context<Self>) -> Task<Option<ContextLoadResult>> {
+ cx.spawn(async move |this, cx| {
+ context_load_task.await;
+ this.read_with(cx, |this, _cx| this.last_loaded_context.clone())
+ .ok()
+ .flatten()
+ })
fn message_or_context_changed(&mut self, debounce: bool, cx: &mut Context<Self>) { | [
"- let context_task = self.wait_for_context(cx);",
"+ let load_task = load_task.shared();",
"+ self.context_load_task = Some(load_task.clone());",
"+ let context_load_task = self.start_context_load(cx);"
] | [
17,
36,
37,
53
] | {
"additions": 14,
"author": "mgsloan",
"deletions": 15,
"html_url": "https://github.com/zed-industries/zed/pull/29385",
"issue_id": 29385,
"merged_at": "2025-04-25T02:32:53Z",
"omission_probability": 0.1,
"pr_number": 29385,
"repo": "zed-industries/zed",
"title": "Bring back reload of agent context before sending message",
"total_changes": 29
} |
468 | diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 29709490c9973b..34fbecc44bc73c 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -931,26 +931,21 @@ impl Thread {
let mut request = self.to_completion_request(cx);
if model.supports_tools() {
- request.tools = {
- let mut tools = Vec::new();
- tools.extend(
- self.tools()
- .read(cx)
- .enabled_tools(cx)
- .into_iter()
- .filter_map(|tool| {
- // Skip tools that cannot be supported
- let input_schema = tool.input_schema(model.tool_input_format()).ok()?;
- Some(LanguageModelRequestTool {
- name: tool.name(),
- description: tool.description(),
- input_schema,
- })
- }),
- );
-
- tools
- };
+ request.tools = self
+ .tools()
+ .read(cx)
+ .enabled_tools(cx)
+ .into_iter()
+ .filter_map(|tool| {
+ // Skip tools that cannot be supported
+ let input_schema = tool.input_schema(model.tool_input_format()).ok()?;
+ Some(LanguageModelRequestTool {
+ name: tool.name(),
+ description: tool.description(),
+ input_schema,
+ })
+ })
+ .collect();
}
self.stream_completion(request, model, window, cx);
diff --git a/crates/assistant_tool/src/tool_schema.rs b/crates/assistant_tool/src/tool_schema.rs
index 225c1c22efd550..c7d7ba1c33e4b4 100644
--- a/crates/assistant_tool/src/tool_schema.rs
+++ b/crates/assistant_tool/src/tool_schema.rs
@@ -10,6 +10,11 @@ pub fn adapt_schema_to_format(
json: &mut Value,
format: LanguageModelToolSchemaFormat,
) -> Result<()> {
+ if let Value::Object(obj) = json {
+ obj.remove("$schema");
+ obj.remove("title");
+ }
+
match format {
LanguageModelToolSchemaFormat::JsonSchema => Ok(()),
LanguageModelToolSchemaFormat::JsonSchemaSubset => adapt_to_json_schema_subset(json),
@@ -30,10 +35,7 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
}
}
- const KEYS_TO_REMOVE: [&str; 2] = ["format", "$schema"];
- for key in KEYS_TO_REMOVE {
- obj.remove(key);
- }
+ obj.remove("format");
if let Some(default) = obj.get("default") {
let is_null = default.is_null();
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 1eca808f6da6d0..edb435d7d0a0c0 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -110,11 +110,38 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
#[cfg(test)]
mod tests {
+ use super::*;
use client::Client;
use clock::FakeSystemClock;
use http_client::FakeHttpClient;
+ use schemars::JsonSchema;
+ use serde::Serialize;
- use super::*;
+ #[test]
+ fn test_json_schema() {
+ #[derive(Serialize, JsonSchema)]
+ struct GetWeatherTool {
+ location: String,
+ }
+
+ let schema = schema::json_schema_for::<GetWeatherTool>(
+ language_model::LanguageModelToolSchemaFormat::JsonSchema,
+ )
+ .unwrap();
+
+ assert_eq!(
+ schema,
+ serde_json::json!({
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string"
+ }
+ },
+ "required": ["location"],
+ })
+ );
+ }
#[gpui::test]
fn test_builtin_tool_schema_compatibility(cx: &mut App) {
| diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 29709490c9973b..34fbecc44bc73c 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -931,26 +931,21 @@ impl Thread {
let mut request = self.to_completion_request(cx);
if model.supports_tools() {
- request.tools = {
- let mut tools = Vec::new();
- tools.extend(
- self.tools()
- .read(cx)
- .enabled_tools(cx)
- .filter_map(|tool| {
- // Skip tools that cannot be supported
- let input_schema = tool.input_schema(model.tool_input_format()).ok()?;
- Some(LanguageModelRequestTool {
- name: tool.name(),
- description: tool.description(),
- input_schema,
- })
- }),
- );
-
- tools
- };
+ request.tools = self
+ .tools()
+ .read(cx)
+ .enabled_tools(cx)
+ .into_iter()
+ .filter_map(|tool| {
+ // Skip tools that cannot be supported
+ let input_schema = tool.input_schema(model.tool_input_format()).ok()?;
+ Some(LanguageModelRequestTool {
+ name: tool.name(),
+ description: tool.description(),
+ input_schema,
+ })
+ })
+ .collect();
self.stream_completion(request, model, window, cx);
diff --git a/crates/assistant_tool/src/tool_schema.rs b/crates/assistant_tool/src/tool_schema.rs
index 225c1c22efd550..c7d7ba1c33e4b4 100644
--- a/crates/assistant_tool/src/tool_schema.rs
+++ b/crates/assistant_tool/src/tool_schema.rs
@@ -10,6 +10,11 @@ pub fn adapt_schema_to_format(
json: &mut Value,
format: LanguageModelToolSchemaFormat,
) -> Result<()> {
+ if let Value::Object(obj) = json {
+ obj.remove("$schema");
+ obj.remove("title");
match format {
LanguageModelToolSchemaFormat::JsonSchema => Ok(()),
LanguageModelToolSchemaFormat::JsonSchemaSubset => adapt_to_json_schema_subset(json),
@@ -30,10 +35,7 @@ fn adapt_to_json_schema_subset(json: &mut Value) -> Result<()> {
}
- const KEYS_TO_REMOVE: [&str; 2] = ["format", "$schema"];
- for key in KEYS_TO_REMOVE {
- obj.remove(key);
- }
+ obj.remove("format");
if let Some(default) = obj.get("default") {
let is_null = default.is_null();
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 1eca808f6da6d0..edb435d7d0a0c0 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -110,11 +110,38 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
#[cfg(test)]
mod tests {
use client::Client;
use clock::FakeSystemClock;
use http_client::FakeHttpClient;
+ use schemars::JsonSchema;
+ use serde::Serialize;
- use super::*;
+ #[test]
+ fn test_json_schema() {
+ #[derive(Serialize, JsonSchema)]
+ struct GetWeatherTool {
+ location: String,
+ let schema = schema::json_schema_for::<GetWeatherTool>(
+ language_model::LanguageModelToolSchemaFormat::JsonSchema,
+ )
+ .unwrap();
+ assert_eq!(
+ schema,
+ serde_json::json!({
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string"
+ }
+ },
+ "required": ["location"],
+ })
+ );
#[gpui::test]
fn test_builtin_tool_schema_compatibility(cx: &mut App) { | [
"- .into_iter()",
"+ use super::*;",
"+ }"
] | [
14,
82,
95
] | {
"additions": 49,
"author": "maxbrunsfeld",
"deletions": 25,
"html_url": "https://github.com/zed-industries/zed/pull/29381",
"issue_id": 29381,
"merged_at": "2025-04-25T01:09:25Z",
"omission_probability": 0.1,
"pr_number": 29381,
"repo": "zed-industries/zed",
"title": "Remove unnecessary fields from the tool schemas",
"total_changes": 74
} |
469 | diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json
index 0e1163b53e626a..2490ee280a1b35 100644
--- a/assets/keymaps/default-linux.json
+++ b/assets/keymaps/default-linux.json
@@ -352,11 +352,11 @@
"alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
- "ctrl-d": ["editor::SelectNext", { "replace_newest": false }],
- "ctrl-shift-down": ["editor::SelectNext", { "replace_newest": false }], // Add selection to Next Find Match
- "ctrl-shift-up": ["editor::SelectPrevious", { "replace_newest": false }],
- "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }],
- "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }],
+ "ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
+ "ctrl-shift-down": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch
+ "ctrl-shift-up": ["editor::SelectPrevious", { "replace_newest": false }], // editor.action.addSelectionToPreviousFindMatch
+ "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip
+ "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }], // editor.action.moveSelectionToPreviousFindMatch
"ctrl-k ctrl-i": "editor::Hover",
"ctrl-/": ["editor::ToggleComments", { "advance_downwards": false }],
"ctrl-u": "editor::UndoSelection",
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index 742b2a2a98b00c..d27baab097f1fc 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -488,12 +488,15 @@
"alt-shift-down": "editor::DuplicateLineDown",
"ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
"ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
- "cmd-d": ["editor::SelectNext", { "replace_newest": false }], // Add selection to Next Find Match
+ "cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
"cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"cmd-f2": "editor::SelectAllMatches", // Select all occurrences of current word
- "ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": false }],
- "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }],
- "cmd-k ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": true }],
+ "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip
+ // macOS binds `ctrl-cmd-d` to Show Dictionary which breaks these two binds
+ // To use `ctrl-cmd-d` or `ctrl-k ctrl-cmd-d` in Zed you must execute this command and then restart:
+ // defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>'
+ "ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": false }], // editor.action.addSelectionToPreviousFindMatch
+ "cmd-k ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": true }], // editor.action.moveSelectionToPreviousFindMatch
"cmd-k cmd-i": "editor::Hover",
"cmd-/": ["editor::ToggleComments", { "advance_downwards": false }],
"cmd-u": "editor::UndoSelection",
diff --git a/assets/keymaps/linux/sublime_text.json b/assets/keymaps/linux/sublime_text.json
index 8b7cff3a26b3f8..ce7c863a32672c 100644
--- a/assets/keymaps/linux/sublime_text.json
+++ b/assets/keymaps/linux/sublime_text.json
@@ -37,6 +37,8 @@
"ctrl-shift-a": "editor::SelectLargerSyntaxNode",
"ctrl-shift-d": "editor::DuplicateSelection",
"alt-f3": "editor::SelectAllMatches", // find_all_under
+ // "ctrl-f3": "", // find_under (cancels any selections)
+ // "cmd-alt-shift-g": "" // find_under_prev (cancels any selections)
"f9": "editor::SortLinesCaseSensitive",
"ctrl-f9": "editor::SortLinesCaseInsensitive",
"f12": "editor::GoToDefinition",
diff --git a/assets/keymaps/macos/sublime_text.json b/assets/keymaps/macos/sublime_text.json
index df62d01f3fba43..28aa8836715976 100644
--- a/assets/keymaps/macos/sublime_text.json
+++ b/assets/keymaps/macos/sublime_text.json
@@ -38,6 +38,8 @@
"cmd-shift-a": "editor::SelectLargerSyntaxNode",
"cmd-shift-d": "editor::DuplicateSelection",
"ctrl-cmd-g": "editor::SelectAllMatches", // find_all_under
+ // "cmd-alt-g": "", // find_under (cancels any selections)
+ // "cmd-alt-shift-g": "" // find_under_prev (cancels any selections)
"f5": "editor::SortLinesCaseSensitive",
"ctrl-f5": "editor::SortLinesCaseInsensitive",
"shift-f12": "editor::FindAllReferences",
| diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json
index 0e1163b53e626a..2490ee280a1b35 100644
--- a/assets/keymaps/default-linux.json
+++ b/assets/keymaps/default-linux.json
@@ -352,11 +352,11 @@
"alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
- "ctrl-d": ["editor::SelectNext", { "replace_newest": false }],
- "ctrl-shift-down": ["editor::SelectNext", { "replace_newest": false }], // Add selection to Next Find Match
- "ctrl-shift-up": ["editor::SelectPrevious", { "replace_newest": false }],
- "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }],
- "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }],
+ "ctrl-shift-down": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch
+ "ctrl-shift-up": ["editor::SelectPrevious", { "replace_newest": false }], // editor.action.addSelectionToPreviousFindMatch
+ "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip
+ "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }], // editor.action.moveSelectionToPreviousFindMatch
"ctrl-k ctrl-i": "editor::Hover",
"ctrl-/": ["editor::ToggleComments", { "advance_downwards": false }],
"ctrl-u": "editor::UndoSelection",
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index 742b2a2a98b00c..d27baab097f1fc 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -488,12 +488,15 @@
"alt-shift-down": "editor::DuplicateLineDown",
"ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
"ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
- "cmd-d": ["editor::SelectNext", { "replace_newest": false }], // Add selection to Next Find Match
+ "cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
"cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"cmd-f2": "editor::SelectAllMatches", // Select all occurrences of current word
- "ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": false }],
- "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }],
- "cmd-k ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": true }],
+ "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip
+ // macOS binds `ctrl-cmd-d` to Show Dictionary which breaks these two binds
+ // To use `ctrl-cmd-d` or `ctrl-k ctrl-cmd-d` in Zed you must execute this command and then restart:
+ // defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>'
"cmd-k cmd-i": "editor::Hover",
"cmd-/": ["editor::ToggleComments", { "advance_downwards": false }],
"cmd-u": "editor::UndoSelection",
diff --git a/assets/keymaps/linux/sublime_text.json b/assets/keymaps/linux/sublime_text.json
index 8b7cff3a26b3f8..ce7c863a32672c 100644
--- a/assets/keymaps/linux/sublime_text.json
+++ b/assets/keymaps/linux/sublime_text.json
@@ -37,6 +37,8 @@
"ctrl-shift-a": "editor::SelectLargerSyntaxNode",
"ctrl-shift-d": "editor::DuplicateSelection",
"alt-f3": "editor::SelectAllMatches", // find_all_under
+ // "ctrl-f3": "", // find_under (cancels any selections)
"f9": "editor::SortLinesCaseSensitive",
"ctrl-f9": "editor::SortLinesCaseInsensitive",
"f12": "editor::GoToDefinition",
diff --git a/assets/keymaps/macos/sublime_text.json b/assets/keymaps/macos/sublime_text.json
index df62d01f3fba43..28aa8836715976 100644
--- a/assets/keymaps/macos/sublime_text.json
+++ b/assets/keymaps/macos/sublime_text.json
@@ -38,6 +38,8 @@
"cmd-shift-a": "editor::SelectLargerSyntaxNode",
"cmd-shift-d": "editor::DuplicateSelection",
"ctrl-cmd-g": "editor::SelectAllMatches", // find_all_under
+ // "cmd-alt-g": "", // find_under (cancels any selections)
"f5": "editor::SortLinesCaseSensitive",
"ctrl-f5": "editor::SortLinesCaseInsensitive",
"shift-f12": "editor::FindAllReferences", | [
"+ \"ctrl-d\": [\"editor::SelectNext\", { \"replace_newest\": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand",
"+ \"ctrl-cmd-d\": [\"editor::SelectPrevious\", { \"replace_newest\": false }], // editor.action.addSelectionToPreviousFindMatch",
"+ \"cmd-k ctrl-cmd-d\": [\"editor::SelectPrevious\", { \"replace_newest\": true }], // editor.action.moveSelectionToPreviousFindMatch"
] | [
13,
40,
41
] | {
"additions": 16,
"author": "notpeter",
"deletions": 9,
"html_url": "https://github.com/zed-industries/zed/pull/28362",
"issue_id": 28362,
"merged_at": "2025-04-11T20:22:36Z",
"omission_probability": 0.1,
"pr_number": 28362,
"repo": "zed-industries/zed",
"title": "keymap: Document editor::Select* actions (cmd-d, etc)",
"total_changes": 25
} |
470 | diff --git a/crates/language_models/src/provider/anthropic.rs b/crates/language_models/src/provider/anthropic.rs
index 6c8c664a26054a..f255740c035a0d 100644
--- a/crates/language_models/src/provider/anthropic.rs
+++ b/crates/language_models/src/provider/anthropic.rs
@@ -714,39 +714,32 @@ pub fn map_to_language_model_completion_events(
if let Some(tool_use) = state.tool_uses_by_index.get_mut(&index) {
tool_use.input_json.push_str(&partial_json);
- return Some((
- vec![maybe!({
- Ok(LanguageModelCompletionEvent::ToolUse(
+ // Try to convert invalid (incomplete) JSON into
+ // valid JSON that serde can accept, e.g. by closing
+ // unclosed delimiters. This way, we can update the
+ // UI with whatever has been streamed back so far.
+ if let Ok(input) = serde_json::Value::from_str(
+ &partial_json_fixer::fix_json(&tool_use.input_json),
+ ) {
+ return Some((
+ vec![Ok(LanguageModelCompletionEvent::ToolUse(
LanguageModelToolUse {
id: tool_use.id.clone().into(),
name: tool_use.name.clone().into(),
is_input_complete: false,
- input: if tool_use.input_json.is_empty() {
- serde_json::Value::Object(
- serde_json::Map::default(),
- )
- } else {
- serde_json::Value::from_str(
- // Convert invalid (incomplete) JSON into
- // JSON that serde will accept, e.g. by closing
- // unclosed delimiters. This way, we can update
- // the UI with whatever has been streamed back so far.
- &partial_json_fixer::fix_json(
- &tool_use.input_json,
- ),
- )
- .map_err(|err| anyhow!(err))?
- },
+ input,
},
- ))
- })],
- state,
- ));
+ ))],
+ state,
+ ));
+ }
}
}
},
Event::ContentBlockStop { index } => {
if let Some(tool_use) = state.tool_uses_by_index.remove(&index) {
+ let input_json = tool_use.input_json.trim();
+
return Some((
vec![maybe!({
Ok(LanguageModelCompletionEvent::ToolUse(
@@ -754,15 +747,15 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.into(),
name: tool_use.name.into(),
is_input_complete: true,
- input: if tool_use.input_json.is_empty() {
+ input: if input_json.is_empty() {
serde_json::Value::Object(
serde_json::Map::default(),
)
} else {
serde_json::Value::from_str(
- &tool_use.input_json,
+ input_json
)
- .map_err(|err| anyhow!(err))?
+ .map_err(|err| anyhow!("Error parsing tool call input JSON: {err:?} - JSON string was: {input_json:?}"))?
},
},
))
| diff --git a/crates/language_models/src/provider/anthropic.rs b/crates/language_models/src/provider/anthropic.rs
index 6c8c664a26054a..f255740c035a0d 100644
--- a/crates/language_models/src/provider/anthropic.rs
+++ b/crates/language_models/src/provider/anthropic.rs
@@ -714,39 +714,32 @@ pub fn map_to_language_model_completion_events(
if let Some(tool_use) = state.tool_uses_by_index.get_mut(&index) {
tool_use.input_json.push_str(&partial_json);
- return Some((
- vec![maybe!({
- Ok(LanguageModelCompletionEvent::ToolUse(
+ // Try to convert invalid (incomplete) JSON into
+ // valid JSON that serde can accept, e.g. by closing
+ // unclosed delimiters. This way, we can update the
+ // UI with whatever has been streamed back so far.
+ if let Ok(input) = serde_json::Value::from_str(
+ &partial_json_fixer::fix_json(&tool_use.input_json),
+ ) {
+ return Some((
+ vec![Ok(LanguageModelCompletionEvent::ToolUse(
LanguageModelToolUse {
id: tool_use.id.clone().into(),
name: tool_use.name.clone().into(),
is_input_complete: false,
- input: if tool_use.input_json.is_empty() {
- serde_json::Value::Object(
- serde_json::Map::default(),
- } else {
- serde_json::Value::from_str(
- // Convert invalid (incomplete) JSON into
- // JSON that serde will accept, e.g. by closing
- // unclosed delimiters. This way, we can update
- // the UI with whatever has been streamed back so far.
- &partial_json_fixer::fix_json(
- &tool_use.input_json,
- ),
- .map_err(|err| anyhow!(err))?
- },
+ input,
- ))
- })],
- state,
+ ))],
+ state,
+ ));
+ }
}
}
},
Event::ContentBlockStop { index } => {
if let Some(tool_use) = state.tool_uses_by_index.remove(&index) {
+ let input_json = tool_use.input_json.trim();
+
return Some((
vec![maybe!({
Ok(LanguageModelCompletionEvent::ToolUse(
@@ -754,15 +747,15 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.into(),
name: tool_use.name.into(),
is_input_complete: true,
- input: if tool_use.input_json.is_empty() {
+ input: if input_json.is_empty() {
serde_json::Value::Object(
serde_json::Map::default(),
} else {
serde_json::Value::from_str(
- &tool_use.input_json,
+ input_json
- .map_err(|err| anyhow!(err))?
},
)) | [
"- ));",
"+ .map_err(|err| anyhow!(\"Error parsing tool call input JSON: {err:?} - JSON string was: {input_json:?}\"))?"
] | [
45,
75
] | {
"additions": 19,
"author": "rtfeldman",
"deletions": 26,
"html_url": "https://github.com/zed-industries/zed/pull/29295",
"issue_id": 29295,
"merged_at": "2025-04-23T18:08:27Z",
"omission_probability": 0.1,
"pr_number": 29295,
"repo": "zed-industries/zed",
"title": "More graceful invalid JSON handling",
"total_changes": 45
} |
471 | diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 34ccb01d60204b..d47594d6089f71 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -1267,6 +1267,8 @@ impl Thread {
.ok();
}
+ let mut request_assistant_message_id = None;
+
while let Some(event) = events.next().await {
if let Some((_, response_events)) = request_callback_parameters.as_mut() {
response_events
@@ -1278,11 +1280,11 @@ impl Thread {
thread.update(cx, |thread, cx| {
match event {
LanguageModelCompletionEvent::StartMessage { .. } => {
- thread.insert_message(
+ request_assistant_message_id = Some(thread.insert_message(
Role::Assistant,
vec![MessageSegment::Text(String::new())],
cx,
- );
+ ));
}
LanguageModelCompletionEvent::Stop(reason) => {
stop_reason = reason;
@@ -1311,11 +1313,11 @@ impl Thread {
//
// Importantly: We do *not* want to emit a `StreamedAssistantText` event here, as it
// will result in duplicating the text of the chunk in the rendered Markdown.
- thread.insert_message(
+ request_assistant_message_id = Some(thread.insert_message(
Role::Assistant,
vec![MessageSegment::Text(chunk.to_string())],
cx,
- );
+ ));
};
}
}
@@ -1338,25 +1340,25 @@ impl Thread {
//
// Importantly: We do *not* want to emit a `StreamedAssistantText` event here, as it
// will result in duplicating the text of the chunk in the rendered Markdown.
- thread.insert_message(
+ request_assistant_message_id = Some(thread.insert_message(
Role::Assistant,
vec![MessageSegment::Thinking {
text: chunk.to_string(),
signature,
}],
cx,
- );
+ ));
};
}
}
LanguageModelCompletionEvent::ToolUse(tool_use) => {
- let last_assistant_message_id = thread
- .messages
- .iter_mut()
- .rfind(|message| message.role == Role::Assistant)
- .map(|message| message.id)
+ let last_assistant_message_id = request_assistant_message_id
.unwrap_or_else(|| {
- thread.insert_message(Role::Assistant, vec![], cx)
+ let new_assistant_message_id =
+ thread.insert_message(Role::Assistant, vec![], cx);
+ request_assistant_message_id =
+ Some(new_assistant_message_id);
+ new_assistant_message_id
});
let tool_use_id = tool_use.id.clone();
@@ -1775,22 +1777,19 @@ impl Thread {
window: Option<AnyWindowHandle>,
cx: &mut Context<Self>,
) -> bool {
- let canceled = if self.pending_completions.pop().is_some() {
- true
- } else {
- let mut canceled = false;
- for pending_tool_use in self.tool_use.cancel_pending() {
- canceled = true;
- self.tool_finished(
- pending_tool_use.id.clone(),
- Some(pending_tool_use),
- true,
- window,
- cx,
- );
- }
- canceled
- };
+ let mut canceled = self.pending_completions.pop().is_some();
+
+ for pending_tool_use in self.tool_use.cancel_pending() {
+ canceled = true;
+ self.tool_finished(
+ pending_tool_use.id.clone(),
+ Some(pending_tool_use),
+ true,
+ window,
+ cx,
+ );
+ }
+
self.finalize_pending_checkpoint(cx);
canceled
}
diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs
index 6fe86aec3913ed..f971cc803defa3 100644
--- a/crates/language_models/src/provider/copilot_chat.rs
+++ b/crates/language_models/src/provider/copilot_chat.rs
@@ -453,9 +453,11 @@ impl CopilotChatLanguageModel {
}
}
- messages.push(ChatMessage::User {
- content: text_content,
- });
+ if !text_content.is_empty() {
+ messages.push(ChatMessage::User {
+ content: text_content,
+ });
+ }
}
Role::Assistant => {
let mut tool_calls = Vec::new();
| diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs
index 34ccb01d60204b..d47594d6089f71 100644
--- a/crates/agent/src/thread.rs
+++ b/crates/agent/src/thread.rs
@@ -1267,6 +1267,8 @@ impl Thread {
.ok();
+ let mut request_assistant_message_id = None;
while let Some(event) = events.next().await {
if let Some((_, response_events)) = request_callback_parameters.as_mut() {
response_events
@@ -1278,11 +1280,11 @@ impl Thread {
thread.update(cx, |thread, cx| {
match event {
LanguageModelCompletionEvent::StartMessage { .. } => {
- thread.insert_message(
+ request_assistant_message_id = Some(thread.insert_message(
Role::Assistant,
vec![MessageSegment::Text(String::new())],
cx,
- );
+ ));
LanguageModelCompletionEvent::Stop(reason) => {
stop_reason = reason;
@@ -1311,11 +1313,11 @@ impl Thread {
vec![MessageSegment::Text(chunk.to_string())],
@@ -1338,25 +1340,25 @@ impl Thread {
vec![MessageSegment::Thinking {
text: chunk.to_string(),
signature,
}],
LanguageModelCompletionEvent::ToolUse(tool_use) => {
- let last_assistant_message_id = thread
- .messages
- .iter_mut()
- .rfind(|message| message.role == Role::Assistant)
- .map(|message| message.id)
+ let last_assistant_message_id = request_assistant_message_id
.unwrap_or_else(|| {
- thread.insert_message(Role::Assistant, vec![], cx)
+ let new_assistant_message_id =
+ thread.insert_message(Role::Assistant, vec![], cx);
+ request_assistant_message_id =
+ Some(new_assistant_message_id);
+ new_assistant_message_id
});
let tool_use_id = tool_use.id.clone();
@@ -1775,22 +1777,19 @@ impl Thread {
window: Option<AnyWindowHandle>,
cx: &mut Context<Self>,
) -> bool {
- let canceled = if self.pending_completions.pop().is_some() {
- true
- } else {
- let mut canceled = false;
- for pending_tool_use in self.tool_use.cancel_pending() {
- canceled = true;
- self.tool_finished(
- pending_tool_use.id.clone(),
- Some(pending_tool_use),
- true,
- window,
- cx,
- }
- };
+ let mut canceled = self.pending_completions.pop().is_some();
+ canceled = true;
+ self.tool_finished(
+ pending_tool_use.id.clone(),
+ Some(pending_tool_use),
+ true,
+ window,
+ cx,
+ );
+ }
self.finalize_pending_checkpoint(cx);
canceled
}
diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs
index 6fe86aec3913ed..f971cc803defa3 100644
--- a/crates/language_models/src/provider/copilot_chat.rs
+++ b/crates/language_models/src/provider/copilot_chat.rs
@@ -453,9 +453,11 @@ impl CopilotChatLanguageModel {
}
}
- messages.push(ChatMessage::User {
- content: text_content,
- });
+ if !text_content.is_empty() {
+ messages.push(ChatMessage::User {
+ content: text_content,
+ });
+ }
Role::Assistant => {
let mut tool_calls = Vec::new(); | [
"- );",
"- canceled",
"+ for pending_tool_use in self.tool_use.cancel_pending() {"
] | [
91,
93,
97
] | {
"additions": 32,
"author": "agu-z",
"deletions": 31,
"html_url": "https://github.com/zed-industries/zed/pull/29360",
"issue_id": 29360,
"merged_at": "2025-04-24T17:56:47Z",
"omission_probability": 0.1,
"pr_number": 29360,
"repo": "zed-industries/zed",
"title": "agent: Do not reuse assistant message across generations",
"total_changes": 63
} |
472 | diff --git a/crates/project/src/lsp_store/lsp_ext_command.rs b/crates/project/src/lsp_store/lsp_ext_command.rs
index a09cf8e2affec4..91075cd233544a 100644
--- a/crates/project/src/lsp_store/lsp_ext_command.rs
+++ b/crates/project/src/lsp_store/lsp_ext_command.rs
@@ -393,6 +393,7 @@ impl lsp::request::Request for Runnables {
#[serde(rename_all = "camelCase")]
pub struct RunnablesParams {
pub text_document: lsp::TextDocumentIdentifier,
+ #[serde(default)]
pub position: Option<lsp::Position>,
}
@@ -400,7 +401,7 @@ pub struct RunnablesParams {
#[serde(rename_all = "camelCase")]
pub struct Runnable {
pub label: String,
- #[serde(skip_serializing_if = "Option::is_none")]
+ #[serde(default, skip_serializing_if = "Option::is_none")]
pub location: Option<lsp::LocationLink>,
pub kind: RunnableKind,
pub args: RunnableArgs,
@@ -424,26 +425,30 @@ pub enum RunnableKind {
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CargoRunnableArgs {
- #[serde(skip_serializing_if = "HashMap::is_empty")]
+ #[serde(default, skip_serializing_if = "HashMap::is_empty")]
pub environment: HashMap<String, String>,
pub cwd: PathBuf,
/// Command to be executed instead of cargo
+ #[serde(default)]
pub override_cargo: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
+ #[serde(default, skip_serializing_if = "Option::is_none")]
pub workspace_root: Option<PathBuf>,
// command, --package and --lib stuff
+ #[serde(default)]
pub cargo_args: Vec<String>,
// stuff after --
+ #[serde(default)]
pub executable_args: Vec<String>,
}
#[derive(Deserialize, Serialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ShellRunnableArgs {
- #[serde(skip_serializing_if = "HashMap::is_empty")]
+ #[serde(default, skip_serializing_if = "HashMap::is_empty")]
pub environment: HashMap<String, String>,
pub cwd: PathBuf,
pub program: String,
+ #[serde(default)]
pub args: Vec<String>,
}
| diff --git a/crates/project/src/lsp_store/lsp_ext_command.rs b/crates/project/src/lsp_store/lsp_ext_command.rs
index a09cf8e2affec4..91075cd233544a 100644
--- a/crates/project/src/lsp_store/lsp_ext_command.rs
+++ b/crates/project/src/lsp_store/lsp_ext_command.rs
@@ -393,6 +393,7 @@ impl lsp::request::Request for Runnables {
pub struct RunnablesParams {
pub text_document: lsp::TextDocumentIdentifier,
pub position: Option<lsp::Position>,
@@ -400,7 +401,7 @@ pub struct RunnablesParams {
pub struct Runnable {
pub label: String,
pub location: Option<lsp::LocationLink>,
pub kind: RunnableKind,
pub args: RunnableArgs,
@@ -424,26 +425,30 @@ pub enum RunnableKind {
pub struct CargoRunnableArgs {
/// Command to be executed instead of cargo
pub override_cargo: Option<String>,
pub workspace_root: Option<PathBuf>,
// command, --package and --lib stuff
pub cargo_args: Vec<String>,
// stuff after --
pub executable_args: Vec<String>,
pub struct ShellRunnableArgs {
pub program: String,
pub args: Vec<String>, | [] | [] | {
"additions": 9,
"author": "notpeter",
"deletions": 4,
"html_url": "https://github.com/zed-industries/zed/pull/29291",
"issue_id": 29291,
"merged_at": "2025-04-23T20:11:02Z",
"omission_probability": 0.1,
"pr_number": 29291,
"repo": "zed-industries/zed",
"title": "rust-analyzer: Fix for deserialization error of CargoRunnableArgs",
"total_changes": 13
} |
473 | diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs
index b2dac30d0276e6..6b562aec231f83 100644
--- a/crates/terminal/src/terminal.rs
+++ b/crates/terminal/src/terminal.rs
@@ -1547,6 +1547,18 @@ impl Terminal {
}
}
+ pub fn select_word_at_event_position(&mut self, e: &MouseDownEvent) {
+ let position = e.position - self.last_content.terminal_bounds.bounds.origin;
+ let (point, side) = grid_point_and_side(
+ position,
+ self.last_content.terminal_bounds,
+ self.last_content.display_offset,
+ );
+ let selection = Selection::new(SelectionType::Semantic, point, side);
+ self.events
+ .push_back(InternalEvent::SetSelection(Some((selection, point))));
+ }
+
pub fn mouse_drag(
&mut self,
e: &MouseMoveEvent,
diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index ee25792f35e760..c2dbc72b1fe2a4 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1278,6 +1278,11 @@ impl Render for TerminalView {
MouseButton::Right,
cx.listener(|this, event: &MouseDownEvent, window, cx| {
if !this.terminal.read(cx).mouse_mode(event.modifiers.shift) {
+ if this.terminal.read(cx).last_content.selection.is_none() {
+ this.terminal.update(cx, |terminal, _| {
+ terminal.select_word_at_event_position(event);
+ });
+ };
this.deploy_context_menu(event.position, window, cx);
cx.notify();
}
| diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs
index b2dac30d0276e6..6b562aec231f83 100644
--- a/crates/terminal/src/terminal.rs
+++ b/crates/terminal/src/terminal.rs
@@ -1547,6 +1547,18 @@ impl Terminal {
}
}
+ pub fn select_word_at_event_position(&mut self, e: &MouseDownEvent) {
+ let position = e.position - self.last_content.terminal_bounds.bounds.origin;
+ let (point, side) = grid_point_and_side(
+ position,
+ self.last_content.terminal_bounds,
+ self.last_content.display_offset,
+ );
+ let selection = Selection::new(SelectionType::Semantic, point, side);
+ self.events
+ .push_back(InternalEvent::SetSelection(Some((selection, point))));
+ }
+
pub fn mouse_drag(
&mut self,
e: &MouseMoveEvent,
diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index ee25792f35e760..c2dbc72b1fe2a4 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1278,6 +1278,11 @@ impl Render for TerminalView {
MouseButton::Right,
cx.listener(|this, event: &MouseDownEvent, window, cx| {
if !this.terminal.read(cx).mouse_mode(event.modifiers.shift) {
+ if this.terminal.read(cx).last_content.selection.is_none() {
+ this.terminal.update(cx, |terminal, _| {
+ terminal.select_word_at_event_position(event);
+ });
+ };
this.deploy_context_menu(event.position, window, cx);
cx.notify();
} | [] | [] | {
"additions": 17,
"author": "kylelau519",
"deletions": 0,
"html_url": "https://github.com/zed-industries/zed/pull/29131",
"issue_id": 29131,
"merged_at": "2025-04-21T15:39:17Z",
"omission_probability": 0.1,
"pr_number": 29131,
"repo": "zed-industries/zed",
"title": "Add right click in terminal create new selection if none present",
"total_changes": 17
} |
474 | diff --git a/docs/src/languages/rust.md b/docs/src/languages/rust.md
index 7e8de04fcb24e1..752567b7870838 100644
--- a/docs/src/languages/rust.md
+++ b/docs/src/languages/rust.md
@@ -95,6 +95,30 @@ If you want to use a binary in a custom location, you can specify a `path` and o
This `"path"` has to be an absolute path.
+## Alternate Targets
+
+If want rust-analyzer to provide diagnostics for a target other than you current platform (e.g. for windows when running on macOS) you can use the following Zed lsp settings:
+
+```json
+{
+ "lsp": {
+ "rust-analyzer": {
+ "initialization_options": {
+ "cargo": {
+ "target": "x86_64-pc-windows-msvc"
+ }
+ }
+ }
+ }
+}
+```
+
+If you are using `rustup` and you can find a list of available target triples (`aarch64-apple-darwin`, `x86_64-unknown-linux-gnu`, etc) by running:
+
+```sh
+rustup target list --installed
+```
+
## More server configuration
<!--
| diff --git a/docs/src/languages/rust.md b/docs/src/languages/rust.md
index 7e8de04fcb24e1..752567b7870838 100644
--- a/docs/src/languages/rust.md
+++ b/docs/src/languages/rust.md
@@ -95,6 +95,30 @@ If you want to use a binary in a custom location, you can specify a `path` and o
This `"path"` has to be an absolute path.
+## Alternate Targets
+If want rust-analyzer to provide diagnostics for a target other than you current platform (e.g. for windows when running on macOS) you can use the following Zed lsp settings:
+```json
+ "lsp": {
+ "rust-analyzer": {
+ "cargo": {
+ "target": "x86_64-pc-windows-msvc"
+ }
+ }
+ }
+ }
+}
+If you are using `rustup` and you can find a list of available target triples (`aarch64-apple-darwin`, `x86_64-unknown-linux-gnu`, etc) by running:
+```sh
+rustup target list --installed
## More server configuration
<!-- | [
"+{",
"+ \"initialization_options\": {"
] | [
13,
16
] | {
"additions": 24,
"author": "notpeter",
"deletions": 0,
"html_url": "https://github.com/zed-industries/zed/pull/29353",
"issue_id": 29353,
"merged_at": "2025-04-24T17:12:41Z",
"omission_probability": 0.1,
"pr_number": 29353,
"repo": "zed-industries/zed",
"title": "docs: Rust-analyzer example settings for alternate targets",
"total_changes": 24
} |
475 | diff --git a/docs/src/languages/elm.md b/docs/src/languages/elm.md
index 89be4eddc43218..ae9a4c1ffc53a4 100644
--- a/docs/src/languages/elm.md
+++ b/docs/src/languages/elm.md
@@ -38,15 +38,3 @@ Elm language server can be configured in your `settings.json`, e.g.:
```
`elm-format`, `elm-review` and `elm` need to be installed and made available in the environment or configured in the settings. See the [full list of server settings here](https://github.com/elm-tooling/elm-language-server?tab=readme-ov-file#server-settings).
-
-## Known Issues
-
-There is an [upstream issue](https://github.com/elm-tooling/elm-language-server/issues/1311) with `elm-language-server` incorrectly supporting `linked_edits`. It is recommend you disable that feature in your Zed settings.json with:
-
-```
- "languages": {
- "Elm": {
- "linked_edits": false
- }
- }
-```
| diff --git a/docs/src/languages/elm.md b/docs/src/languages/elm.md
index 89be4eddc43218..ae9a4c1ffc53a4 100644
--- a/docs/src/languages/elm.md
+++ b/docs/src/languages/elm.md
@@ -38,15 +38,3 @@ Elm language server can be configured in your `settings.json`, e.g.:
```
`elm-format`, `elm-review` and `elm` need to be installed and made available in the environment or configured in the settings. See the [full list of server settings here](https://github.com/elm-tooling/elm-language-server?tab=readme-ov-file#server-settings).
-## Known Issues
-There is an [upstream issue](https://github.com/elm-tooling/elm-language-server/issues/1311) with `elm-language-server` incorrectly supporting `linked_edits`. It is recommend you disable that feature in your Zed settings.json with:
- "languages": {
- "Elm": {
- "linked_edits": false
- }
- } | [] | [] | {
"additions": 0,
"author": "vojta-horanek",
"deletions": 12,
"html_url": "https://github.com/zed-industries/zed/pull/29350",
"issue_id": 29350,
"merged_at": "2025-04-24T14:54:13Z",
"omission_probability": 0.1,
"pr_number": 29350,
"repo": "zed-industries/zed",
"title": "Remove `linked_edits` issue description from Elm doc",
"total_changes": 12
} |
476 | diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs
index d277697f8bb51b..806350bb36310a 100644
--- a/crates/project/src/lsp_store.rs
+++ b/crates/project/src/lsp_store.rs
@@ -663,6 +663,30 @@ impl LocalLspStore {
"workspace/didChangeConfiguration" => {
// Ignore payload since we notify clients of setting changes unconditionally, relying on them pulling the latest settings.
}
+ "textDocument/rename" => {
+ this.update(&mut cx, |this, _| {
+ if let Some(server) = this.language_server_for_id(server_id)
+ {
+ let options = reg
+ .register_options
+ .map(|options| {
+ serde_json::from_value::<lsp::RenameOptions>(
+ options,
+ )
+ })
+ .transpose()?;
+ let options = match options {
+ None => OneOf::Left(true),
+ Some(options) => OneOf::Right(options),
+ };
+
+ server.update_capabilities(|capabilities| {
+ capabilities.rename_provider = Some(options);
+ })
+ }
+ anyhow::Ok(())
+ })??;
+ }
_ => log::warn!("unhandled capability registration: {reg:?}"),
}
}
@@ -689,6 +713,9 @@ impl LocalLspStore {
Some(())
})?;
}
+ "workspace/didChangeConfiguration" => {
+ // Ignore payload since we notify clients of setting changes unconditionally, relying on them pulling the latest settings.
+ }
"textDocument/rename" => {
this.update(&mut cx, |this, _| {
if let Some(server) = this.language_server_for_id(server_id)
| diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs
index d277697f8bb51b..806350bb36310a 100644
--- a/crates/project/src/lsp_store.rs
+++ b/crates/project/src/lsp_store.rs
@@ -663,6 +663,30 @@ impl LocalLspStore {
"workspace/didChangeConfiguration" => {
// Ignore payload since we notify clients of setting changes unconditionally, relying on them pulling the latest settings.
+ "textDocument/rename" => {
+ this.update(&mut cx, |this, _| {
+ if let Some(server) = this.language_server_for_id(server_id)
+ {
+ let options = reg
+ .register_options
+ .map(|options| {
+ serde_json::from_value::<lsp::RenameOptions>(
+ options,
+ )
+ })
+ .transpose()?;
+ let options = match options {
+ None => OneOf::Left(true),
+ Some(options) => OneOf::Right(options),
+ };
+
+ server.update_capabilities(|capabilities| {
+ capabilities.rename_provider = Some(options);
+ })
+ }
+ anyhow::Ok(())
+ })??;
_ => log::warn!("unhandled capability registration: {reg:?}"),
}
}
@@ -689,6 +713,9 @@ impl LocalLspStore {
Some(())
})?;
+ "workspace/didChangeConfiguration" => {
+ // Ignore payload since we notify clients of setting changes unconditionally, relying on them pulling the latest settings.
"textDocument/rename" => {
this.update(&mut cx, |this, _| {
if let Some(server) = this.language_server_for_id(server_id) | [] | [] | {
"additions": 27,
"author": "osiewicz",
"deletions": 0,
"html_url": "https://github.com/zed-industries/zed/pull/25610",
"issue_id": 25610,
"merged_at": "2025-02-25T23:54:29Z",
"omission_probability": 0.1,
"pr_number": 25610,
"repo": "zed-industries/zed",
"title": "lsp: Add support for dynamic registration of rename capability",
"total_changes": 27
} |
477 | diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index 2f8f58f2a27ac9..eb6e51be2785df 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -1518,8 +1518,6 @@ impl ActiveThread {
return Empty.into_any();
}
- let allow_editing_message = message.role == Role::User;
-
let edit_message_editor = self
.editing_message
.as_ref()
@@ -1752,93 +1750,70 @@ impl ActiveThread {
.pb_4()
.child(
v_flex()
+ .id(("user-message", ix))
.bg(editor_bg_color)
.rounded_lg()
+ .shadow_md()
.border_1()
.border_color(colors.border)
- .shadow_md()
- .child(div().p_2().children(message_content))
- .child(
- h_flex()
- .p_1()
- .border_t_1()
- .border_color(colors.border_variant)
- .justify_end()
- .child(
- h_flex()
- .gap_1()
- .when_some(
- edit_message_editor.clone(),
- |this, edit_message_editor| {
- let focus_handle =
- edit_message_editor.focus_handle(cx);
- this.child(
- Button::new("cancel-edit-message", "Cancel")
- .label_size(LabelSize::Small)
- .key_binding(
- KeyBinding::for_action_in(
- &menu::Cancel,
- &focus_handle,
- window,
- cx,
- )
- .map(|kb| kb.size(rems_from_px(12.))),
- )
- .on_click(
- cx.listener(Self::handle_cancel_click),
- ),
- )
- .child(
- Button::new(
- "confirm-edit-message",
- "Regenerate",
- )
- .disabled(
- edit_message_editor.read(cx).is_empty(cx),
- )
- .label_size(LabelSize::Small)
- .key_binding(
- KeyBinding::for_action_in(
- &menu::Confirm,
- &focus_handle,
- window,
- cx,
- )
- .map(|kb| kb.size(rems_from_px(12.))),
- )
- .on_click(
- cx.listener(Self::handle_regenerate_click),
- ),
+ .hover(|hover| hover.border_color(colors.text_accent.opacity(0.5)))
+ .cursor_pointer()
+ .child(div().p_2().pt_2p5().children(message_content))
+ .when_some(edit_message_editor.clone(), |this, edit_editor| {
+ let focus_handle = edit_editor.focus_handle(cx);
+
+ this.child(
+ h_flex()
+ .p_1()
+ .border_t_1()
+ .border_color(colors.border_variant)
+ .gap_1()
+ .justify_end()
+ .child(
+ Button::new("cancel-edit-message", "Cancel")
+ .label_size(LabelSize::Small)
+ .key_binding(
+ KeyBinding::for_action_in(
+ &menu::Cancel,
+ &focus_handle,
+ window,
+ cx,
)
- },
- )
- .when(
- edit_message_editor.is_none() && allow_editing_message,
- |this| {
- this.child(
- Button::new("edit-message", "Edit Message")
- .label_size(LabelSize::Small)
- .icon(IconName::Pencil)
- .icon_size(IconSize::XSmall)
- .icon_color(Color::Muted)
- .icon_position(IconPosition::Start)
- .on_click(cx.listener({
- let message_segments =
- message.segments.clone();
- move |this, _, window, cx| {
- this.start_editing_message(
- message_id,
- &message_segments,
- window,
- cx,
- );
- }
- })),
+ .map(|kb| kb.size(rems_from_px(12.))),
+ )
+ .on_click(cx.listener(Self::handle_cancel_click)),
+ )
+ .child(
+ Button::new("confirm-edit-message", "Regenerate")
+ .disabled(edit_editor.read(cx).is_empty(cx))
+ .label_size(LabelSize::Small)
+ .key_binding(
+ KeyBinding::for_action_in(
+ &menu::Confirm,
+ &focus_handle,
+ window,
+ cx,
)
- },
- ),
- ),
- ),
+ .map(|kb| kb.size(rems_from_px(12.))),
+ )
+ .on_click(cx.listener(Self::handle_regenerate_click)),
+ ),
+ )
+ })
+ .when(edit_message_editor.is_none(), |this| {
+ this.tooltip(Tooltip::text("Click To Edit"))
+ })
+ .on_click(cx.listener({
+ let message_segments = message.segments.clone();
+ move |this, _, window, cx| {
+ this.start_editing_message(
+ message_id,
+ &message_segments,
+ window,
+ cx,
+ );
+ }
+ })),
),
Role::Assistant => v_flex()
.id(("message-container", ix))
| diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index 2f8f58f2a27ac9..eb6e51be2785df 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -1518,8 +1518,6 @@ impl ActiveThread {
return Empty.into_any();
}
- let allow_editing_message = message.role == Role::User;
-
let edit_message_editor = self
.editing_message
.as_ref()
@@ -1752,93 +1750,70 @@ impl ActiveThread {
.pb_4()
.child(
v_flex()
+ .id(("user-message", ix))
.bg(editor_bg_color)
.rounded_lg()
+ .shadow_md()
.border_1()
.border_color(colors.border)
- .shadow_md()
- .child(div().p_2().children(message_content))
- .child(
- h_flex()
- .border_t_1()
- .border_color(colors.border_variant)
- .justify_end()
- .child(
- h_flex()
- .gap_1()
- .when_some(
- edit_message_editor.clone(),
- |this, edit_message_editor| {
- Button::new("cancel-edit-message", "Cancel")
- .key_binding(
- KeyBinding::for_action_in(
- &menu::Cancel,
- &focus_handle,
- window,
- cx,
- )
- .map(|kb| kb.size(rems_from_px(12.))),
- .on_click(
- cx.listener(Self::handle_cancel_click),
- ),
- )
- .child(
- "confirm-edit-message",
- "Regenerate",
- .disabled(
- edit_message_editor.read(cx).is_empty(cx),
- .label_size(LabelSize::Small)
- .key_binding(
- KeyBinding::for_action_in(
- &menu::Confirm,
- &focus_handle,
- window,
- cx,
- .map(|kb| kb.size(rems_from_px(12.))),
- .on_click(
- cx.listener(Self::handle_regenerate_click),
- ),
+ .hover(|hover| hover.border_color(colors.text_accent.opacity(0.5)))
+ .cursor_pointer()
+ .child(div().p_2().pt_2p5().children(message_content))
+ .when_some(edit_message_editor.clone(), |this, edit_editor| {
+ let focus_handle = edit_editor.focus_handle(cx);
+ h_flex()
+ .border_t_1()
+ .border_color(colors.border_variant)
+ .gap_1()
+ .justify_end()
+ Button::new("cancel-edit-message", "Cancel")
+ &menu::Cancel,
- )
- .when(
- edit_message_editor.is_none() && allow_editing_message,
- |this| {
- Button::new("edit-message", "Edit Message")
- .icon(IconName::Pencil)
- .icon_color(Color::Muted)
- .icon_position(IconPosition::Start)
- .on_click(cx.listener({
- message.segments.clone();
- move |this, _, window, cx| {
- this.start_editing_message(
- &message_segments,
- window,
- cx,
- );
- }
- })),
+ Button::new("confirm-edit-message", "Regenerate")
+ .disabled(edit_editor.read(cx).is_empty(cx))
+ &menu::Confirm,
- ),
- ),
- ),
+ .on_click(cx.listener(Self::handle_regenerate_click)),
+ ),
+ )
+ .on_click(cx.listener({
+ let message_segments = message.segments.clone();
+ move |this, _, window, cx| {
+ this.start_editing_message(
+ message_id,
+ &message_segments,
+ window,
+ cx,
+ );
+ }
+ })),
),
Role::Assistant => v_flex()
.id(("message-container", ix)) | [
"- .p_1()",
"- let focus_handle =",
"- edit_message_editor.focus_handle(cx);",
"- Button::new(",
"+",
"+ this.child(",
"+ .p_1()",
"- .icon_size(IconSize::XSmall)",
"- let message_segments =",
"- message_id,",
"+ .on_click(cx.listener(Self::handle_cancel_click)),",
"+ )",
"+ .when(edit_message_editor.is_none(), |this| {",
"+ this.tooltip(Tooltip::text(\"Click To Edit\"))"
] | [
27,
37,
38,
56,
81,
82,
84,
108,
112,
116,
125,
126,
148,
149
] | {
"additions": 58,
"author": "danilo-leal",
"deletions": 83,
"html_url": "https://github.com/zed-industries/zed/pull/29326",
"issue_id": 29326,
"merged_at": "2025-04-24T14:24:36Z",
"omission_probability": 0.1,
"pr_number": 29326,
"repo": "zed-industries/zed",
"title": "agent: Simplify user message design more",
"total_changes": 141
} |
478 | diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index e2dacc5389d91c..3813ee67fd5f92 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -1,6 +1,7 @@
mod connection_pool;
use crate::api::{CloudflareIpCountryHeader, SystemIdHeader};
+use crate::db::billing_subscription::SubscriptionKind;
use crate::llm::LlmTokenClaims;
use crate::{
AppState, Error, Result, auth,
@@ -178,15 +179,23 @@ impl Session {
Ok(db.has_active_billing_subscription(user_id).await?)
}
- pub async fn current_plan(
- &self,
- _db: &MutexGuard<'_, DbHandle>,
- ) -> anyhow::Result<proto::Plan> {
- if self.is_staff() {
- Ok(proto::Plan::ZedPro)
+ pub async fn current_plan(&self, db: &MutexGuard<'_, DbHandle>) -> anyhow::Result<proto::Plan> {
+ let user_id = self.user_id();
+
+ let subscription = db.get_active_billing_subscription(user_id).await?;
+ let subscription_kind = subscription.and_then(|subscription| subscription.kind);
+
+ let plan = if let Some(subscription_kind) = subscription_kind {
+ match subscription_kind {
+ SubscriptionKind::ZedPro => proto::Plan::ZedPro,
+ SubscriptionKind::ZedProTrial => proto::Plan::ZedProTrial,
+ SubscriptionKind::ZedFree => proto::Plan::Free,
+ }
} else {
- Ok(proto::Plan::Free)
- }
+ proto::Plan::Free
+ };
+
+ Ok(plan)
}
fn user_id(&self) -> UserId {
| diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index e2dacc5389d91c..3813ee67fd5f92 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -1,6 +1,7 @@
mod connection_pool;
use crate::api::{CloudflareIpCountryHeader, SystemIdHeader};
+use crate::db::billing_subscription::SubscriptionKind;
use crate::llm::LlmTokenClaims;
use crate::{
AppState, Error, Result, auth,
@@ -178,15 +179,23 @@ impl Session {
Ok(db.has_active_billing_subscription(user_id).await?)
- pub async fn current_plan(
- &self,
- _db: &MutexGuard<'_, DbHandle>,
- ) -> anyhow::Result<proto::Plan> {
- if self.is_staff() {
- Ok(proto::Plan::ZedPro)
+ pub async fn current_plan(&self, db: &MutexGuard<'_, DbHandle>) -> anyhow::Result<proto::Plan> {
+ let user_id = self.user_id();
+ let subscription = db.get_active_billing_subscription(user_id).await?;
+ let subscription_kind = subscription.and_then(|subscription| subscription.kind);
+ match subscription_kind {
+ SubscriptionKind::ZedPro => proto::Plan::ZedPro,
+ SubscriptionKind::ZedProTrial => proto::Plan::ZedProTrial,
+ SubscriptionKind::ZedFree => proto::Plan::Free,
+ }
} else {
- Ok(proto::Plan::Free)
- }
+ };
+ Ok(plan)
fn user_id(&self) -> UserId { | [
"+ let plan = if let Some(subscription_kind) = subscription_kind {",
"+ proto::Plan::Free"
] | [
28,
37
] | {
"additions": 17,
"author": "maxdeviant",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29341",
"issue_id": 29341,
"merged_at": "2025-04-24T13:04:26Z",
"omission_probability": 0.1,
"pr_number": 29341,
"repo": "zed-industries/zed",
"title": "collab: Return current plan based on subscription status",
"total_changes": 25
} |
479 | diff --git a/Cargo.lock b/Cargo.lock
index cf8833968b644e..d6026ca0f20e58 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -703,9 +703,10 @@ dependencies = [
"anyhow",
"assistant_tool",
"chrono",
+ "client",
+ "clock",
"collections",
"component",
- "feature_flags",
"futures 0.3.31",
"gpui",
"html_to_markdown",
@@ -16626,7 +16627,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "feature_flags",
"futures 0.3.31",
"gpui",
"http_client",
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index 205db386e242db..ea979ec7037a6a 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -23,7 +23,6 @@ use gpui::{
use language::LanguageRegistry;
use language_model::{
AuthenticateError, ConfiguredModel, LanguageModelProviderId, LanguageModelRegistry,
- ZED_CLOUD_PROVIDER_ID,
};
use project::Project;
use prompt_library::{PromptLibrary, open_prompt_library};
@@ -489,8 +488,8 @@ impl AssistantPanel {
// If we're signed out and don't have a provider configured, or we're signed-out AND Zed.dev is
// the provider, we want to show a nudge to sign in.
- let show_zed_ai_notice = client_status.is_signed_out()
- && model.map_or(true, |model| model.provider.id().0 == ZED_CLOUD_PROVIDER_ID);
+ let show_zed_ai_notice =
+ client_status.is_signed_out() && model.map_or(true, |model| model.is_provided_by_zed());
self.show_zed_ai_notice = show_zed_ai_notice;
cx.notify();
diff --git a/crates/assistant_tools/Cargo.toml b/crates/assistant_tools/Cargo.toml
index eaaeff1e47c854..26ddb53d8fc446 100644
--- a/crates/assistant_tools/Cargo.toml
+++ b/crates/assistant_tools/Cargo.toml
@@ -17,7 +17,6 @@ assistant_tool.workspace = true
chrono.workspace = true
collections.workspace = true
component.workspace = true
-feature_flags.workspace = true
futures.workspace = true
gpui.workspace = true
html_to_markdown.workspace = true
@@ -41,6 +40,8 @@ worktree.workspace = true
zed_llm_client.workspace = true
[dev-dependencies]
+client = { workspace = true, features = ["test-support"] }
+clock = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 408d5655b07ac0..2462942c7b40cc 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -29,9 +29,9 @@ use std::sync::Arc;
use assistant_tool::ToolRegistry;
use copy_path_tool::CopyPathTool;
-use feature_flags::FeatureFlagAppExt;
use gpui::App;
use http_client::HttpClientWithUrl;
+use language_model::LanguageModelRegistry;
use move_path_tool::MovePathTool;
use web_search_tool::WebSearchTool;
@@ -83,34 +83,45 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
registry.register_tool(ThinkingTool);
registry.register_tool(FetchTool::new(http_client));
- cx.observe_flag::<feature_flags::ZedProWebSearchTool, _>({
- move |is_enabled, cx| {
- if is_enabled {
- ToolRegistry::global(cx).register_tool(WebSearchTool);
- } else {
- ToolRegistry::global(cx).unregister_tool(WebSearchTool);
+ cx.subscribe(
+ &LanguageModelRegistry::global(cx),
+ move |registry, event, cx| match event {
+ language_model::Event::DefaultModelChanged => {
+ let using_zed_provider = registry
+ .read(cx)
+ .default_model()
+ .map_or(false, |default| default.is_provided_by_zed());
+ if using_zed_provider {
+ ToolRegistry::global(cx).register_tool(WebSearchTool);
+ } else {
+ ToolRegistry::global(cx).unregister_tool(WebSearchTool);
+ }
}
- }
- })
+ _ => {}
+ },
+ )
.detach();
}
#[cfg(test)]
mod tests {
+ use client::Client;
+ use clock::FakeSystemClock;
use http_client::FakeHttpClient;
use super::*;
#[gpui::test]
fn test_builtin_tool_schema_compatibility(cx: &mut App) {
- crate::init(
- Arc::new(http_client::HttpClientWithUrl::new(
- FakeHttpClient::with_200_response(),
- "https://zed.dev",
- None,
- )),
+ settings::init(cx);
+
+ let client = Client::new(
+ Arc::new(FakeSystemClock::new()),
+ FakeHttpClient::with_200_response(),
cx,
);
+ language_model::init(client.clone(), cx);
+ crate::init(client.http_client(), cx);
for tool in ToolRegistry::global(cx).tools() {
let actual_schema = tool
diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index 17a2d811f39a54..772619a8996a7b 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -84,11 +84,6 @@ impl FeatureFlag for ZedPro {
const NAME: &'static str = "zed-pro";
}
-pub struct ZedProWebSearchTool {}
-impl FeatureFlag for ZedProWebSearchTool {
- const NAME: &'static str = "zed-pro-web-search-tool";
-}
-
pub struct NotebookFeatureFlag;
impl FeatureFlag for NotebookFeatureFlag {
diff --git a/crates/language_model/src/registry.rs b/crates/language_model/src/registry.rs
index 62f216094bde62..1f17a6e822acdb 100644
--- a/crates/language_model/src/registry.rs
+++ b/crates/language_model/src/registry.rs
@@ -42,6 +42,10 @@ impl ConfiguredModel {
pub fn is_same_as(&self, other: &ConfiguredModel) -> bool {
self.model.id() == other.model.id() && self.provider.id() == other.provider.id()
}
+
+ pub fn is_provided_by_zed(&self) -> bool {
+ self.provider.id().0 == crate::ZED_CLOUD_PROVIDER_ID
+ }
}
pub enum Event {
diff --git a/crates/web_search/src/web_search.rs b/crates/web_search/src/web_search.rs
index 73ff75b748f509..a131b0de716670 100644
--- a/crates/web_search/src/web_search.rs
+++ b/crates/web_search/src/web_search.rs
@@ -61,4 +61,11 @@ impl WebSearchRegistry {
self.active_provider = Some(provider);
}
}
+
+ pub fn unregister_provider(&mut self, id: WebSearchProviderId) {
+ self.providers.remove(&id);
+ if self.active_provider.as_ref().map(|provider| provider.id()) == Some(id) {
+ self.active_provider = None;
+ }
+ }
}
diff --git a/crates/web_search_providers/Cargo.toml b/crates/web_search_providers/Cargo.toml
index 208cb63593f064..2e052796c48601 100644
--- a/crates/web_search_providers/Cargo.toml
+++ b/crates/web_search_providers/Cargo.toml
@@ -14,7 +14,6 @@ path = "src/web_search_providers.rs"
[dependencies]
anyhow.workspace = true
client.workspace = true
-feature_flags.workspace = true
futures.workspace = true
gpui.workspace = true
http_client.workspace = true
diff --git a/crates/web_search_providers/src/cloud.rs b/crates/web_search_providers/src/cloud.rs
index 8a764b9671c90b..ec1469e0d2ff83 100644
--- a/crates/web_search_providers/src/cloud.rs
+++ b/crates/web_search_providers/src/cloud.rs
@@ -50,9 +50,11 @@ impl State {
}
}
+pub const ZED_WEB_SEARCH_PROVIDER_ID: &'static str = "zed.dev";
+
impl WebSearchProvider for CloudWebSearchProvider {
fn id(&self) -> WebSearchProviderId {
- WebSearchProviderId("zed.dev".into())
+ WebSearchProviderId(ZED_WEB_SEARCH_PROVIDER_ID.into())
}
fn search(&self, query: String, cx: &mut App) -> Task<Result<WebSearchResponse>> {
diff --git a/crates/web_search_providers/src/web_search_providers.rs b/crates/web_search_providers/src/web_search_providers.rs
index d547ee73087652..c2b563e7eb2308 100644
--- a/crates/web_search_providers/src/web_search_providers.rs
+++ b/crates/web_search_providers/src/web_search_providers.rs
@@ -1,10 +1,10 @@
mod cloud;
use client::Client;
-use feature_flags::{FeatureFlagAppExt, ZedProWebSearchTool};
use gpui::{App, Context};
+use language_model::LanguageModelRegistry;
use std::sync::Arc;
-use web_search::WebSearchRegistry;
+use web_search::{WebSearchProviderId, WebSearchRegistry};
pub fn init(client: Arc<Client>, cx: &mut App) {
let registry = WebSearchRegistry::global(cx);
@@ -18,18 +18,27 @@ fn register_web_search_providers(
client: Arc<Client>,
cx: &mut Context<WebSearchRegistry>,
) {
- cx.observe_flag::<ZedProWebSearchTool, _>({
- let client = client.clone();
- move |is_enabled, cx| {
- if is_enabled {
- WebSearchRegistry::global(cx).update(cx, |registry, cx| {
- registry.register_provider(
+ cx.subscribe(
+ &LanguageModelRegistry::global(cx),
+ move |this, registry, event, cx| match event {
+ language_model::Event::DefaultModelChanged => {
+ let using_zed_provider = registry
+ .read(cx)
+ .default_model()
+ .map_or(false, |default| default.is_provided_by_zed());
+ if using_zed_provider {
+ this.register_provider(
cloud::CloudWebSearchProvider::new(client.clone(), cx),
cx,
- );
- });
+ )
+ } else {
+ this.unregister_provider(WebSearchProviderId(
+ cloud::ZED_WEB_SEARCH_PROVIDER_ID.into(),
+ ));
+ }
}
- }
- })
+ _ => {}
+ },
+ )
.detach();
}
| diff --git a/Cargo.lock b/Cargo.lock
index cf8833968b644e..d6026ca0f20e58 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -703,9 +703,10 @@ dependencies = [
"assistant_tool",
"chrono",
+ "client",
+ "clock",
"collections",
"component",
"html_to_markdown",
@@ -16626,7 +16627,6 @@ version = "0.1.0"
dependencies = [
"client",
"http_client",
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index 205db386e242db..ea979ec7037a6a 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -23,7 +23,6 @@ use gpui::{
use language::LanguageRegistry;
use language_model::{
AuthenticateError, ConfiguredModel, LanguageModelProviderId, LanguageModelRegistry,
- ZED_CLOUD_PROVIDER_ID,
};
use project::Project;
use prompt_library::{PromptLibrary, open_prompt_library};
@@ -489,8 +488,8 @@ impl AssistantPanel {
// If we're signed out and don't have a provider configured, or we're signed-out AND Zed.dev is
// the provider, we want to show a nudge to sign in.
- && model.map_or(true, |model| model.provider.id().0 == ZED_CLOUD_PROVIDER_ID);
+ let show_zed_ai_notice =
+ client_status.is_signed_out() && model.map_or(true, |model| model.is_provided_by_zed());
self.show_zed_ai_notice = show_zed_ai_notice;
cx.notify();
diff --git a/crates/assistant_tools/Cargo.toml b/crates/assistant_tools/Cargo.toml
index eaaeff1e47c854..26ddb53d8fc446 100644
--- a/crates/assistant_tools/Cargo.toml
+++ b/crates/assistant_tools/Cargo.toml
@@ -17,7 +17,6 @@ assistant_tool.workspace = true
chrono.workspace = true
collections.workspace = true
component.workspace = true
html_to_markdown.workspace = true
@@ -41,6 +40,8 @@ worktree.workspace = true
zed_llm_client.workspace = true
[dev-dependencies]
+client = { workspace = true, features = ["test-support"] }
+clock = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 408d5655b07ac0..2462942c7b40cc 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -29,9 +29,9 @@ use std::sync::Arc;
use assistant_tool::ToolRegistry;
use copy_path_tool::CopyPathTool;
use gpui::App;
use http_client::HttpClientWithUrl;
use move_path_tool::MovePathTool;
use web_search_tool::WebSearchTool;
@@ -83,34 +83,45 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
registry.register_tool(ThinkingTool);
registry.register_tool(FetchTool::new(http_client));
- ToolRegistry::global(cx).register_tool(WebSearchTool);
- } else {
- ToolRegistry::global(cx).unregister_tool(WebSearchTool);
+ move |registry, event, cx| match event {
+ ToolRegistry::global(cx).register_tool(WebSearchTool);
+ ToolRegistry::global(cx).unregister_tool(WebSearchTool);
#[cfg(test)]
mod tests {
+ use client::Client;
use http_client::FakeHttpClient;
use super::*;
#[gpui::test]
fn test_builtin_tool_schema_compatibility(cx: &mut App) {
- crate::init(
- Arc::new(http_client::HttpClientWithUrl::new(
- FakeHttpClient::with_200_response(),
- "https://zed.dev",
- None,
- )),
+ settings::init(cx);
+ let client = Client::new(
+ Arc::new(FakeSystemClock::new()),
+ FakeHttpClient::with_200_response(),
cx,
);
+ language_model::init(client.clone(), cx);
+ crate::init(client.http_client(), cx);
for tool in ToolRegistry::global(cx).tools() {
let actual_schema = tool
diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs
index 17a2d811f39a54..772619a8996a7b 100644
--- a/crates/feature_flags/src/feature_flags.rs
+++ b/crates/feature_flags/src/feature_flags.rs
@@ -84,11 +84,6 @@ impl FeatureFlag for ZedPro {
const NAME: &'static str = "zed-pro";
-pub struct ZedProWebSearchTool {}
-impl FeatureFlag for ZedProWebSearchTool {
- const NAME: &'static str = "zed-pro-web-search-tool";
-}
-
pub struct NotebookFeatureFlag;
impl FeatureFlag for NotebookFeatureFlag {
diff --git a/crates/language_model/src/registry.rs b/crates/language_model/src/registry.rs
index 62f216094bde62..1f17a6e822acdb 100644
--- a/crates/language_model/src/registry.rs
+++ b/crates/language_model/src/registry.rs
@@ -42,6 +42,10 @@ impl ConfiguredModel {
pub fn is_same_as(&self, other: &ConfiguredModel) -> bool {
self.model.id() == other.model.id() && self.provider.id() == other.provider.id()
+ pub fn is_provided_by_zed(&self) -> bool {
pub enum Event {
diff --git a/crates/web_search/src/web_search.rs b/crates/web_search/src/web_search.rs
index 73ff75b748f509..a131b0de716670 100644
--- a/crates/web_search/src/web_search.rs
+++ b/crates/web_search/src/web_search.rs
@@ -61,4 +61,11 @@ impl WebSearchRegistry {
self.active_provider = Some(provider);
}
+ pub fn unregister_provider(&mut self, id: WebSearchProviderId) {
+ self.providers.remove(&id);
+ if self.active_provider.as_ref().map(|provider| provider.id()) == Some(id) {
+ self.active_provider = None;
+ }
diff --git a/crates/web_search_providers/Cargo.toml b/crates/web_search_providers/Cargo.toml
index 208cb63593f064..2e052796c48601 100644
--- a/crates/web_search_providers/Cargo.toml
+++ b/crates/web_search_providers/Cargo.toml
@@ -14,7 +14,6 @@ path = "src/web_search_providers.rs"
[dependencies]
anyhow.workspace = true
client.workspace = true
http_client.workspace = true
diff --git a/crates/web_search_providers/src/cloud.rs b/crates/web_search_providers/src/cloud.rs
index 8a764b9671c90b..ec1469e0d2ff83 100644
--- a/crates/web_search_providers/src/cloud.rs
+++ b/crates/web_search_providers/src/cloud.rs
@@ -50,9 +50,11 @@ impl State {
+pub const ZED_WEB_SEARCH_PROVIDER_ID: &'static str = "zed.dev";
impl WebSearchProvider for CloudWebSearchProvider {
fn id(&self) -> WebSearchProviderId {
- WebSearchProviderId("zed.dev".into())
fn search(&self, query: String, cx: &mut App) -> Task<Result<WebSearchResponse>> {
diff --git a/crates/web_search_providers/src/web_search_providers.rs b/crates/web_search_providers/src/web_search_providers.rs
index d547ee73087652..c2b563e7eb2308 100644
--- a/crates/web_search_providers/src/web_search_providers.rs
+++ b/crates/web_search_providers/src/web_search_providers.rs
@@ -1,10 +1,10 @@
mod cloud;
use client::Client;
-use feature_flags::{FeatureFlagAppExt, ZedProWebSearchTool};
use gpui::{App, Context};
use std::sync::Arc;
-use web_search::WebSearchRegistry;
+use web_search::{WebSearchProviderId, WebSearchRegistry};
pub fn init(client: Arc<Client>, cx: &mut App) {
let registry = WebSearchRegistry::global(cx);
@@ -18,18 +18,27 @@ fn register_web_search_providers(
client: Arc<Client>,
cx: &mut Context<WebSearchRegistry>,
) {
- cx.observe_flag::<ZedProWebSearchTool, _>({
- let client = client.clone();
- WebSearchRegistry::global(cx).update(cx, |registry, cx| {
- registry.register_provider(
+ move |this, registry, event, cx| match event {
+ this.register_provider(
cloud::CloudWebSearchProvider::new(client.clone(), cx),
cx,
- );
- });
+ )
+ this.unregister_provider(WebSearchProviderId(
+ cloud::ZED_WEB_SEARCH_PROVIDER_ID.into(),
+ )); | [
"- let show_zed_ai_notice = client_status.is_signed_out()",
"-use feature_flags::FeatureFlagAppExt;",
"- cx.observe_flag::<feature_flags::ZedProWebSearchTool, _>({",
"+ use clock::FakeSystemClock;",
"+ self.provider.id().0 == crate::ZED_CLOUD_PROVIDER_ID",
"+ WebSearchProviderId(ZED_WEB_SEARCH_PROVIDER_ID.into())"
] | [
40,
76,
87,
118,
169,
215
] | {
"additions": 67,
"author": "bennetbo",
"deletions": 40,
"html_url": "https://github.com/zed-industries/zed/pull/29273",
"issue_id": 29273,
"merged_at": "2025-04-23T15:30:20Z",
"omission_probability": 0.1,
"pr_number": 29273,
"repo": "zed-industries/zed",
"title": "agent: Expose web search tool to beta users",
"total_changes": 107
} |
480 | diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index 4d38eb28103063..acf7c7973cf660 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -1389,63 +1389,81 @@ impl ProjectPanel {
}
fn add_entry(&mut self, is_dir: bool, window: &mut Window, cx: &mut Context<Self>) {
- if let Some(SelectedEntry {
- worktree_id,
- entry_id,
- }) = self.selection
+ let Some((worktree_id, entry_id)) = self
+ .selection
+ .map(|entry| (entry.worktree_id, entry.entry_id))
+ .or_else(|| {
+ let entry_id = self.last_worktree_root_id?;
+ let worktree_id = self
+ .project
+ .read(cx)
+ .worktree_for_entry(entry_id, cx)?
+ .read(cx)
+ .id();
+
+ self.selection = Some(SelectedEntry {
+ worktree_id,
+ entry_id,
+ });
+
+ Some((worktree_id, entry_id))
+ })
+ else {
+ return;
+ };
+
+ let directory_id;
+ let new_entry_id = self.resolve_entry(entry_id);
+ if let Some((worktree, expanded_dir_ids)) = self
+ .project
+ .read(cx)
+ .worktree_for_id(worktree_id, cx)
+ .zip(self.expanded_dir_ids.get_mut(&worktree_id))
{
- let directory_id;
- let new_entry_id = self.resolve_entry(entry_id);
- if let Some((worktree, expanded_dir_ids)) = self
- .project
- .read(cx)
- .worktree_for_id(worktree_id, cx)
- .zip(self.expanded_dir_ids.get_mut(&worktree_id))
- {
- let worktree = worktree.read(cx);
- if let Some(mut entry) = worktree.entry_for_id(new_entry_id) {
- loop {
- if entry.is_dir() {
- if let Err(ix) = expanded_dir_ids.binary_search(&entry.id) {
- expanded_dir_ids.insert(ix, entry.id);
- }
- directory_id = entry.id;
- break;
- } else {
- if let Some(parent_path) = entry.path.parent() {
- if let Some(parent_entry) = worktree.entry_for_path(parent_path) {
- entry = parent_entry;
- continue;
- }
+ let worktree = worktree.read(cx);
+ if let Some(mut entry) = worktree.entry_for_id(new_entry_id) {
+ loop {
+ if entry.is_dir() {
+ if let Err(ix) = expanded_dir_ids.binary_search(&entry.id) {
+ expanded_dir_ids.insert(ix, entry.id);
+ }
+ directory_id = entry.id;
+ break;
+ } else {
+ if let Some(parent_path) = entry.path.parent() {
+ if let Some(parent_entry) = worktree.entry_for_path(parent_path) {
+ entry = parent_entry;
+ continue;
}
- return;
}
+ return;
}
- } else {
- return;
- };
+ }
} else {
return;
};
- self.marked_entries.clear();
- self.edit_state = Some(EditState {
- worktree_id,
- entry_id: directory_id,
- leaf_entry_id: None,
- is_dir,
- processing_filename: None,
- previously_focused: self.selection,
- depth: 0,
- validation_state: ValidationState::None,
- });
- self.filename_editor.update(cx, |editor, cx| {
- editor.clear(window, cx);
- window.focus(&editor.focus_handle(cx));
- });
- self.update_visible_entries(Some((worktree_id, NEW_ENTRY_ID)), cx);
- self.autoscroll(cx);
- cx.notify();
- }
+ } else {
+ return;
+ };
+
+ self.marked_entries.clear();
+ self.edit_state = Some(EditState {
+ worktree_id,
+ entry_id: directory_id,
+ leaf_entry_id: None,
+ is_dir,
+ processing_filename: None,
+ previously_focused: self.selection,
+ depth: 0,
+ validation_state: ValidationState::None,
+ });
+ self.filename_editor.update(cx, |editor, cx| {
+ editor.clear(window, cx);
+ window.focus(&editor.focus_handle(cx));
+ });
+ self.update_visible_entries(Some((worktree_id, NEW_ENTRY_ID)), cx);
+ self.autoscroll(cx);
+ cx.notify();
}
fn unflatten_entry_id(&self, leaf_entry_id: ProjectEntryId) -> ProjectEntryId {
diff --git a/crates/project_panel/src/project_panel_tests.rs b/crates/project_panel/src/project_panel_tests.rs
index 990b446dcbfb73..65eeae795e5f0a 100644
--- a/crates/project_panel/src/project_panel_tests.rs
+++ b/crates/project_panel/src/project_panel_tests.rs
@@ -4948,6 +4948,71 @@ async fn test_collapse_all_for_entry(cx: &mut gpui::TestAppContext) {
}
}
+#[gpui::test]
+async fn test_create_entries_without_selection(cx: &mut gpui::TestAppContext) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.executor().clone());
+ fs.insert_tree(
+ path!("/root"),
+ json!({
+ "dir1": {
+ "file1.txt": "",
+ },
+ }),
+ )
+ .await;
+
+ let project = Project::test(fs.clone(), [path!("/root").as_ref()], cx).await;
+ let workspace = cx.add_window(|window, cx| Workspace::test_new(project.clone(), window, cx));
+ let cx = &mut VisualTestContext::from_window(*workspace, cx);
+
+ let panel = workspace
+ .update(cx, |workspace, window, cx| {
+ let panel = ProjectPanel::new(workspace, window, cx);
+ workspace.add_panel(panel.clone(), window, cx);
+ panel
+ })
+ .unwrap();
+
+ #[rustfmt::skip]
+ assert_eq!(
+ visible_entries_as_strings(&panel, 0..20, cx),
+ &[
+ separator!("v root"),
+ separator!(" > dir1"),
+ ],
+ "Initial state with nothing selected"
+ );
+
+ panel.update_in(cx, |panel, window, cx| {
+ panel.new_file(&NewFile, window, cx);
+ });
+ panel.update_in(cx, |panel, window, cx| {
+ assert!(panel.filename_editor.read(cx).is_focused(window));
+ });
+ panel
+ .update_in(cx, |panel, window, cx| {
+ panel.filename_editor.update(cx, |editor, cx| {
+ editor.set_text("hello_from_no_selections", window, cx)
+ });
+ panel.confirm_edit(window, cx).unwrap()
+ })
+ .await
+ .unwrap();
+
+ #[rustfmt::skip]
+ assert_eq!(
+ visible_entries_as_strings(&panel, 0..20, cx),
+ &[
+ separator!("v root"),
+ separator!(" > dir1"),
+ separator!(" hello_from_no_selections <== selected <== marked"),
+ ],
+ "A new file is created under the root directory"
+ );
+}
+
fn select_path(panel: &Entity<ProjectPanel>, path: impl AsRef<Path>, cx: &mut VisualTestContext) {
let path = path.as_ref();
panel.update(cx, |panel, cx| {
| diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index 4d38eb28103063..acf7c7973cf660 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -1389,63 +1389,81 @@ impl ProjectPanel {
fn add_entry(&mut self, is_dir: bool, window: &mut Window, cx: &mut Context<Self>) {
- if let Some(SelectedEntry {
- }) = self.selection
+ let Some((worktree_id, entry_id)) = self
+ .selection
+ .map(|entry| (entry.worktree_id, entry.entry_id))
+ let entry_id = self.last_worktree_root_id?;
+ .project
+ .worktree_for_entry(entry_id, cx)?
+ .id();
+ self.selection = Some(SelectedEntry {
+ worktree_id,
+ entry_id,
+ });
+ })
+ else {
+ let directory_id;
+ let new_entry_id = self.resolve_entry(entry_id);
+ if let Some((worktree, expanded_dir_ids)) = self
+ .project
+ .read(cx)
+ .worktree_for_id(worktree_id, cx)
+ .zip(self.expanded_dir_ids.get_mut(&worktree_id))
{
- let directory_id;
- let new_entry_id = self.resolve_entry(entry_id);
- .project
- .read(cx)
- .worktree_for_id(worktree_id, cx)
- {
- let worktree = worktree.read(cx);
- if let Some(mut entry) = worktree.entry_for_id(new_entry_id) {
- if entry.is_dir() {
- if let Err(ix) = expanded_dir_ids.binary_search(&entry.id) {
- expanded_dir_ids.insert(ix, entry.id);
- }
- directory_id = entry.id;
- break;
- } else {
- if let Some(parent_path) = entry.path.parent() {
- entry = parent_entry;
- continue;
- }
+ let worktree = worktree.read(cx);
+ if let Some(mut entry) = worktree.entry_for_id(new_entry_id) {
+ loop {
+ if entry.is_dir() {
+ if let Err(ix) = expanded_dir_ids.binary_search(&entry.id) {
+ expanded_dir_ids.insert(ix, entry.id);
+ }
+ directory_id = entry.id;
+ break;
+ } else {
+ if let Some(parent_path) = entry.path.parent() {
+ if let Some(parent_entry) = worktree.entry_for_path(parent_path) {
+ entry = parent_entry;
+ continue;
}
- return;
}
}
- } else {
- return;
+ }
} else {
return;
};
- self.marked_entries.clear();
- self.edit_state = Some(EditState {
- worktree_id,
- entry_id: directory_id,
- leaf_entry_id: None,
- is_dir,
- processing_filename: None,
- depth: 0,
- validation_state: ValidationState::None,
- self.filename_editor.update(cx, |editor, cx| {
- editor.clear(window, cx);
- window.focus(&editor.focus_handle(cx));
- self.update_visible_entries(Some((worktree_id, NEW_ENTRY_ID)), cx);
- self.autoscroll(cx);
- cx.notify();
+ } else {
+ self.marked_entries.clear();
+ self.edit_state = Some(EditState {
+ worktree_id,
+ entry_id: directory_id,
+ leaf_entry_id: None,
+ is_dir,
+ previously_focused: self.selection,
+ depth: 0,
+ validation_state: ValidationState::None,
+ self.filename_editor.update(cx, |editor, cx| {
+ editor.clear(window, cx);
+ window.focus(&editor.focus_handle(cx));
+ self.update_visible_entries(Some((worktree_id, NEW_ENTRY_ID)), cx);
+ cx.notify();
fn unflatten_entry_id(&self, leaf_entry_id: ProjectEntryId) -> ProjectEntryId {
diff --git a/crates/project_panel/src/project_panel_tests.rs b/crates/project_panel/src/project_panel_tests.rs
index 990b446dcbfb73..65eeae795e5f0a 100644
--- a/crates/project_panel/src/project_panel_tests.rs
+++ b/crates/project_panel/src/project_panel_tests.rs
@@ -4948,6 +4948,71 @@ async fn test_collapse_all_for_entry(cx: &mut gpui::TestAppContext) {
}
+#[gpui::test]
+async fn test_create_entries_without_selection(cx: &mut gpui::TestAppContext) {
+ init_test(cx);
+ let fs = FakeFs::new(cx.executor().clone());
+ fs.insert_tree(
+ path!("/root"),
+ json!({
+ "dir1": {
+ "file1.txt": "",
+ },
+ }),
+ .await;
+ let project = Project::test(fs.clone(), [path!("/root").as_ref()], cx).await;
+ let workspace = cx.add_window(|window, cx| Workspace::test_new(project.clone(), window, cx));
+ let panel = workspace
+ .update(cx, |workspace, window, cx| {
+ let panel = ProjectPanel::new(workspace, window, cx);
+ workspace.add_panel(panel.clone(), window, cx);
+ panel
+ "Initial state with nothing selected"
+ panel.new_file(&NewFile, window, cx);
+ assert!(panel.filename_editor.read(cx).is_focused(window));
+ panel
+ .update_in(cx, |panel, window, cx| {
+ panel.filename_editor.update(cx, |editor, cx| {
+ editor.set_text("hello_from_no_selections", window, cx)
+ });
+ panel.confirm_edit(window, cx).unwrap()
+ .await
+ separator!(" hello_from_no_selections <== selected <== marked"),
+ "A new file is created under the root directory"
+}
fn select_path(panel: &Entity<ProjectPanel>, path: impl AsRef<Path>, cx: &mut VisualTestContext) {
let path = path.as_ref();
panel.update(cx, |panel, cx| { | [
"- worktree_id,",
"- entry_id,",
"+ .or_else(|| {",
"+ let worktree_id = self",
"+ Some((worktree_id, entry_id))",
"- if let Some((worktree, expanded_dir_ids)) = self",
"- .zip(self.expanded_dir_ids.get_mut(&worktree_id))",
"- loop {",
"- if let Some(parent_entry) = worktree.entry_for_path(parent_path) {",
"+ return;",
"- };",
"- previously_focused: self.selection,",
"- }",
"+ processing_filename: None,",
"+ self.autoscroll(cx);",
"+ )",
"+ let cx = &mut VisualTestContext::from_window(*workspace, cx);"
] | [
9,
10,
15,
17,
29,
45,
49,
53,
62,
83,
87,
99,
110,
121,
131,
156,
161
] | {
"additions": 133,
"author": "SomeoneToIgnore",
"deletions": 50,
"html_url": "https://github.com/zed-industries/zed/pull/29336",
"issue_id": 29336,
"merged_at": "2025-04-24T08:46:35Z",
"omission_probability": 0.1,
"pr_number": 29336,
"repo": "zed-industries/zed",
"title": "Allow creating entries when nothing is selected in the project panel",
"total_changes": 183
} |
481 | diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index ee3ddf53d52735..5861825acdb2d4 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -33,12 +33,12 @@ use util::ResultExt;
use crate::{
Action, ActionBuildError, ActionRegistry, Any, AnyView, AnyWindowHandle, AppContext, Asset,
AssetSource, BackgroundExecutor, Bounds, ClipboardItem, CursorStyle, DispatchPhase, DisplayId,
- EventEmitter, FocusHandle, FocusMap, ForegroundExecutor, Global, KeyBinding, Keymap, Keystroke,
- LayoutId, Menu, MenuItem, OwnedMenu, PathPromptOptions, Pixels, Platform, PlatformDisplay,
- PlatformKeyboardLayout, Point, PromptBuilder, PromptHandle, PromptLevel, Render, RenderImage,
- RenderablePromptHandle, Reservation, ScreenCaptureSource, SharedString, SubscriberSet,
- Subscription, SvgRenderer, Task, TextSystem, Window, WindowAppearance, WindowHandle, WindowId,
- WindowInvalidator, current_platform, hash, init_app_menus,
+ EventEmitter, FocusHandle, FocusMap, ForegroundExecutor, Global, KeyBinding, KeyContext,
+ Keymap, Keystroke, LayoutId, Menu, MenuItem, OwnedMenu, PathPromptOptions, Pixels, Platform,
+ PlatformDisplay, PlatformKeyboardLayout, Point, PromptBuilder, PromptHandle, PromptLevel,
+ Render, RenderImage, RenderablePromptHandle, Reservation, ScreenCaptureSource, SharedString,
+ SubscriberSet, Subscription, SvgRenderer, Task, TextSystem, Window, WindowAppearance,
+ WindowHandle, WindowId, WindowInvalidator, current_platform, hash, init_app_menus,
};
mod async_context;
@@ -1859,6 +1859,9 @@ pub struct KeystrokeEvent {
/// The action that was resolved for the keystroke, if any
pub action: Option<Box<dyn Action>>,
+
+ /// The context stack at the time
+ pub context_stack: Vec<KeyContext>,
}
struct NullHttpClient;
diff --git a/crates/gpui/src/key_dispatch.rs b/crates/gpui/src/key_dispatch.rs
index 7a56b0695a47e9..ff42924b7b9c47 100644
--- a/crates/gpui/src/key_dispatch.rs
+++ b/crates/gpui/src/key_dispatch.rs
@@ -121,6 +121,7 @@ pub(crate) struct DispatchResult {
pub(crate) pending: SmallVec<[Keystroke; 1]>,
pub(crate) bindings: SmallVec<[KeyBinding; 1]>,
pub(crate) to_replay: SmallVec<[Replay; 1]>,
+ pub(crate) context_stack: Vec<KeyContext>,
}
type KeyListener = Rc<dyn Fn(&dyn Any, DispatchPhase, &mut Window, &mut App)>;
@@ -411,15 +412,17 @@ impl DispatchTree {
&self,
input: &[Keystroke],
dispatch_path: &SmallVec<[DispatchNodeId; 32]>,
- ) -> (SmallVec<[KeyBinding; 1]>, bool) {
- let context_stack: SmallVec<[KeyContext; 4]> = dispatch_path
+ ) -> (SmallVec<[KeyBinding; 1]>, bool, Vec<KeyContext>) {
+ let context_stack: Vec<KeyContext> = dispatch_path
.iter()
.filter_map(|node_id| self.node(*node_id).context.clone())
.collect();
- self.keymap
+ let (bindings, partial) = self
+ .keymap
.borrow()
- .bindings_for_input(input, &context_stack)
+ .bindings_for_input(input, &context_stack);
+ return (bindings, partial, context_stack);
}
/// dispatch_key processes the keystroke
@@ -436,20 +439,25 @@ impl DispatchTree {
dispatch_path: &SmallVec<[DispatchNodeId; 32]>,
) -> DispatchResult {
input.push(keystroke.clone());
- let (bindings, pending) = self.bindings_for_input(&input, dispatch_path);
+ let (bindings, pending, context_stack) = self.bindings_for_input(&input, dispatch_path);
if pending {
return DispatchResult {
pending: input,
+ context_stack,
..Default::default()
};
} else if !bindings.is_empty() {
return DispatchResult {
bindings,
+ context_stack,
..Default::default()
};
} else if input.len() == 1 {
- return DispatchResult::default();
+ return DispatchResult {
+ context_stack,
+ ..Default::default()
+ };
}
input.pop();
@@ -485,7 +493,7 @@ impl DispatchTree {
) -> (SmallVec<[Keystroke; 1]>, SmallVec<[Replay; 1]>) {
let mut to_replay: SmallVec<[Replay; 1]> = Default::default();
for last in (0..input.len()).rev() {
- let (bindings, _) = self.bindings_for_input(&input[0..=last], dispatch_path);
+ let (bindings, _, _) = self.bindings_for_input(&input[0..=last], dispatch_path);
if !bindings.is_empty() {
to_replay.push(Replay {
keystroke: input.drain(0..=last).next_back().unwrap(),
diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs
index 547dd2628e95b6..2bbb984e504b20 100644
--- a/crates/gpui/src/window.rs
+++ b/crates/gpui/src/window.rs
@@ -1154,6 +1154,7 @@ impl Window {
&mut self,
event: &dyn Any,
action: Option<Box<dyn Action>>,
+ context_stack: Vec<KeyContext>,
cx: &mut App,
) {
let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() else {
@@ -1165,6 +1166,7 @@ impl Window {
&KeystrokeEvent {
keystroke: key_down_event.keystroke.clone(),
action: action.as_ref().map(|action| action.boxed_clone()),
+ context_stack: context_stack.clone(),
},
self,
cx,
@@ -3275,7 +3277,7 @@ impl Window {
}
let Some(keystroke) = keystroke else {
- self.finish_dispatch_key_event(event, dispatch_path, cx);
+ self.finish_dispatch_key_event(event, dispatch_path, self.context_stack(), cx);
return;
};
@@ -3329,13 +3331,18 @@ impl Window {
for binding in match_result.bindings {
self.dispatch_action_on_node(node_id, binding.action.as_ref(), cx);
if !cx.propagate_event {
- self.dispatch_keystroke_observers(event, Some(binding.action), cx);
+ self.dispatch_keystroke_observers(
+ event,
+ Some(binding.action),
+ match_result.context_stack.clone(),
+ cx,
+ );
self.pending_input_changed(cx);
return;
}
}
- self.finish_dispatch_key_event(event, dispatch_path, cx);
+ self.finish_dispatch_key_event(event, dispatch_path, match_result.context_stack, cx);
self.pending_input_changed(cx);
}
@@ -3343,6 +3350,7 @@ impl Window {
&mut self,
event: &dyn Any,
dispatch_path: SmallVec<[DispatchNodeId; 32]>,
+ context_stack: Vec<KeyContext>,
cx: &mut App,
) {
self.dispatch_key_down_up_event(event, &dispatch_path, cx);
@@ -3355,7 +3363,7 @@ impl Window {
return;
}
- self.dispatch_keystroke_observers(event, None, cx);
+ self.dispatch_keystroke_observers(event, None, context_stack, cx);
}
fn pending_input_changed(&mut self, cx: &mut App) {
@@ -3453,7 +3461,12 @@ impl Window {
for binding in replay.bindings {
self.dispatch_action_on_node(node_id, binding.action.as_ref(), cx);
if !cx.propagate_event {
- self.dispatch_keystroke_observers(&event, Some(binding.action), cx);
+ self.dispatch_keystroke_observers(
+ &event,
+ Some(binding.action),
+ Vec::default(),
+ cx,
+ );
continue 'replay;
}
}
diff --git a/crates/language_tools/src/key_context_view.rs b/crates/language_tools/src/key_context_view.rs
index 1a52acfa3dbd6e..68f54e05283412 100644
--- a/crates/language_tools/src/key_context_view.rs
+++ b/crates/language_tools/src/key_context_view.rs
@@ -41,17 +41,17 @@ struct KeyContextView {
impl KeyContextView {
pub fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
- let sub1 = cx.observe_keystrokes(|this, e, window, cx| {
+ let sub1 = cx.observe_keystrokes(|this, e, _, cx| {
let mut pending = this.pending_keystrokes.take().unwrap_or_default();
pending.push(e.keystroke.clone());
let mut possibilities = cx.all_bindings_for_input(&pending);
possibilities.reverse();
- this.context_stack = window.context_stack();
this.last_keystrokes = Some(
json!(pending.iter().map(|p| p.unparse()).join(" "))
.to_string()
.into(),
);
+ this.context_stack = e.context_stack.clone();
this.last_possibilities = possibilities
.into_iter()
.map(|binding| {
@@ -89,6 +89,7 @@ impl KeyContextView {
)
})
.collect();
+ cx.notify();
});
let sub2 = cx.observe_pending_input(window, |this, window, cx| {
this.pending_keystrokes = window
@@ -237,7 +238,7 @@ impl Render for KeyContextView {
.mt_8(),
)
.children({
- window.context_stack().into_iter().enumerate().map(|(i, context)| {
+ self.context_stack.iter().enumerate().map(|(i, context)| {
let primary = context.primary().map(|e| e.key.clone()).unwrap_or_default();
let secondary = context
.secondary()
diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs
index 2b9938923ee01d..1d8ce261cf4485 100644
--- a/crates/workspace/src/pane_group.rs
+++ b/crates/workspace/src/pane_group.rs
@@ -437,8 +437,12 @@ impl PaneAxis {
}
pub fn load(axis: Axis, members: Vec<Member>, flexes: Option<Vec<f32>>) -> Self {
- let flexes = flexes.unwrap_or_else(|| vec![1.; members.len()]);
- // debug_assert!(members.len() == flexes.len());
+ let mut flexes = flexes.unwrap_or_else(|| vec![1.; members.len()]);
+ if flexes.len() != members.len()
+ || (flexes.iter().copied().sum::<f32>() - flexes.len() as f32).abs() >= 0.001
+ {
+ flexes = vec![1.; members.len()];
+ }
let flexes = Arc::new(Mutex::new(flexes));
let bounding_boxes = Arc::new(Mutex::new(vec![None; members.len()]));
| diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs
index ee3ddf53d52735..5861825acdb2d4 100644
--- a/crates/gpui/src/app.rs
+++ b/crates/gpui/src/app.rs
@@ -33,12 +33,12 @@ use util::ResultExt;
use crate::{
Action, ActionBuildError, ActionRegistry, Any, AnyView, AnyWindowHandle, AppContext, Asset,
AssetSource, BackgroundExecutor, Bounds, ClipboardItem, CursorStyle, DispatchPhase, DisplayId,
- EventEmitter, FocusHandle, FocusMap, ForegroundExecutor, Global, KeyBinding, Keymap, Keystroke,
- LayoutId, Menu, MenuItem, OwnedMenu, PathPromptOptions, Pixels, Platform, PlatformDisplay,
- PlatformKeyboardLayout, Point, PromptBuilder, PromptHandle, PromptLevel, Render, RenderImage,
- RenderablePromptHandle, Reservation, ScreenCaptureSource, SharedString, SubscriberSet,
- Subscription, SvgRenderer, Task, TextSystem, Window, WindowAppearance, WindowHandle, WindowId,
- WindowInvalidator, current_platform, hash, init_app_menus,
+ EventEmitter, FocusHandle, FocusMap, ForegroundExecutor, Global, KeyBinding, KeyContext,
+ Keymap, Keystroke, LayoutId, Menu, MenuItem, OwnedMenu, PathPromptOptions, Pixels, Platform,
+ PlatformDisplay, PlatformKeyboardLayout, Point, PromptBuilder, PromptHandle, PromptLevel,
+ SubscriberSet, Subscription, SvgRenderer, Task, TextSystem, Window, WindowAppearance,
};
mod async_context;
@@ -1859,6 +1859,9 @@ pub struct KeystrokeEvent {
/// The action that was resolved for the keystroke, if any
pub action: Option<Box<dyn Action>>,
+
+ /// The context stack at the time
+ pub context_stack: Vec<KeyContext>,
struct NullHttpClient;
diff --git a/crates/gpui/src/key_dispatch.rs b/crates/gpui/src/key_dispatch.rs
index 7a56b0695a47e9..ff42924b7b9c47 100644
--- a/crates/gpui/src/key_dispatch.rs
+++ b/crates/gpui/src/key_dispatch.rs
@@ -121,6 +121,7 @@ pub(crate) struct DispatchResult {
pub(crate) pending: SmallVec<[Keystroke; 1]>,
pub(crate) bindings: SmallVec<[KeyBinding; 1]>,
pub(crate) to_replay: SmallVec<[Replay; 1]>,
+ pub(crate) context_stack: Vec<KeyContext>,
type KeyListener = Rc<dyn Fn(&dyn Any, DispatchPhase, &mut Window, &mut App)>;
@@ -411,15 +412,17 @@ impl DispatchTree {
&self,
input: &[Keystroke],
- ) -> (SmallVec<[KeyBinding; 1]>, bool) {
- let context_stack: SmallVec<[KeyContext; 4]> = dispatch_path
+ ) -> (SmallVec<[KeyBinding; 1]>, bool, Vec<KeyContext>) {
+ let context_stack: Vec<KeyContext> = dispatch_path
.iter()
.filter_map(|node_id| self.node(*node_id).context.clone())
.collect();
- self.keymap
+ let (bindings, partial) = self
+ .keymap
.borrow()
- .bindings_for_input(input, &context_stack)
+ .bindings_for_input(input, &context_stack);
+ return (bindings, partial, context_stack);
/// dispatch_key processes the keystroke
@@ -436,20 +439,25 @@ impl DispatchTree {
) -> DispatchResult {
input.push(keystroke.clone());
- let (bindings, pending) = self.bindings_for_input(&input, dispatch_path);
+ let (bindings, pending, context_stack) = self.bindings_for_input(&input, dispatch_path);
if pending {
pending: input,
} else if !bindings.is_empty() {
bindings,
} else if input.len() == 1 {
- return DispatchResult::default();
+ return DispatchResult {
+ ..Default::default()
+ };
input.pop();
@@ -485,7 +493,7 @@ impl DispatchTree {
) -> (SmallVec<[Keystroke; 1]>, SmallVec<[Replay; 1]>) {
let mut to_replay: SmallVec<[Replay; 1]> = Default::default();
for last in (0..input.len()).rev() {
- let (bindings, _) = self.bindings_for_input(&input[0..=last], dispatch_path);
+ let (bindings, _, _) = self.bindings_for_input(&input[0..=last], dispatch_path);
if !bindings.is_empty() {
to_replay.push(Replay {
keystroke: input.drain(0..=last).next_back().unwrap(),
diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs
index 547dd2628e95b6..2bbb984e504b20 100644
--- a/crates/gpui/src/window.rs
+++ b/crates/gpui/src/window.rs
@@ -1154,6 +1154,7 @@ impl Window {
action: Option<Box<dyn Action>>,
let Some(key_down_event) = event.downcast_ref::<KeyDownEvent>() else {
@@ -1165,6 +1166,7 @@ impl Window {
&KeystrokeEvent {
keystroke: key_down_event.keystroke.clone(),
action: action.as_ref().map(|action| action.boxed_clone()),
+ context_stack: context_stack.clone(),
},
self,
cx,
@@ -3275,7 +3277,7 @@ impl Window {
let Some(keystroke) = keystroke else {
+ self.finish_dispatch_key_event(event, dispatch_path, self.context_stack(), cx);
};
@@ -3329,13 +3331,18 @@ impl Window {
for binding in match_result.bindings {
self.dispatch_action_on_node(node_id, binding.action.as_ref(), cx);
if !cx.propagate_event {
- self.dispatch_keystroke_observers(event, Some(binding.action), cx);
+ self.dispatch_keystroke_observers(
+ event,
+ Some(binding.action),
+ match_result.context_stack.clone(),
+ cx,
+ );
self.pending_input_changed(cx);
return;
- self.finish_dispatch_key_event(event, dispatch_path, cx);
+ self.finish_dispatch_key_event(event, dispatch_path, match_result.context_stack, cx);
self.pending_input_changed(cx);
@@ -3343,6 +3350,7 @@ impl Window {
dispatch_path: SmallVec<[DispatchNodeId; 32]>,
self.dispatch_key_down_up_event(event, &dispatch_path, cx);
@@ -3355,7 +3363,7 @@ impl Window {
- self.dispatch_keystroke_observers(event, None, cx);
+ self.dispatch_keystroke_observers(event, None, context_stack, cx);
fn pending_input_changed(&mut self, cx: &mut App) {
@@ -3453,7 +3461,12 @@ impl Window {
for binding in replay.bindings {
self.dispatch_action_on_node(node_id, binding.action.as_ref(), cx);
if !cx.propagate_event {
- self.dispatch_keystroke_observers(&event, Some(binding.action), cx);
+ self.dispatch_keystroke_observers(
+ &event,
+ Some(binding.action),
+ Vec::default(),
+ cx,
+ );
continue 'replay;
}
diff --git a/crates/language_tools/src/key_context_view.rs b/crates/language_tools/src/key_context_view.rs
index 1a52acfa3dbd6e..68f54e05283412 100644
--- a/crates/language_tools/src/key_context_view.rs
+++ b/crates/language_tools/src/key_context_view.rs
@@ -41,17 +41,17 @@ struct KeyContextView {
impl KeyContextView {
pub fn new(window: &mut Window, cx: &mut Context<Self>) -> Self {
- let sub1 = cx.observe_keystrokes(|this, e, window, cx| {
+ let sub1 = cx.observe_keystrokes(|this, e, _, cx| {
let mut pending = this.pending_keystrokes.take().unwrap_or_default();
pending.push(e.keystroke.clone());
let mut possibilities = cx.all_bindings_for_input(&pending);
possibilities.reverse();
- this.context_stack = window.context_stack();
this.last_keystrokes = Some(
json!(pending.iter().map(|p| p.unparse()).join(" "))
.to_string()
.into(),
);
+ this.context_stack = e.context_stack.clone();
this.last_possibilities = possibilities
.into_iter()
.map(|binding| {
@@ -89,6 +89,7 @@ impl KeyContextView {
)
})
.collect();
+ cx.notify();
});
let sub2 = cx.observe_pending_input(window, |this, window, cx| {
this.pending_keystrokes = window
@@ -237,7 +238,7 @@ impl Render for KeyContextView {
.mt_8(),
)
.children({
- window.context_stack().into_iter().enumerate().map(|(i, context)| {
+ self.context_stack.iter().enumerate().map(|(i, context)| {
let primary = context.primary().map(|e| e.key.clone()).unwrap_or_default();
let secondary = context
.secondary()
diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs
index 2b9938923ee01d..1d8ce261cf4485 100644
--- a/crates/workspace/src/pane_group.rs
+++ b/crates/workspace/src/pane_group.rs
@@ -437,8 +437,12 @@ impl PaneAxis {
pub fn load(axis: Axis, members: Vec<Member>, flexes: Option<Vec<f32>>) -> Self {
- let flexes = flexes.unwrap_or_else(|| vec![1.; members.len()]);
- // debug_assert!(members.len() == flexes.len());
+ let mut flexes = flexes.unwrap_or_else(|| vec![1.; members.len()]);
+ if flexes.len() != members.len()
+ || (flexes.iter().copied().sum::<f32>() - flexes.len() as f32).abs() >= 0.001
+ {
+ flexes = vec![1.; members.len()];
+ }
let flexes = Arc::new(Mutex::new(flexes));
let bounding_boxes = Arc::new(Mutex::new(vec![None; members.len()])); | [
"+ Render, RenderImage, RenderablePromptHandle, Reservation, ScreenCaptureSource, SharedString,",
"+ WindowHandle, WindowId, WindowInvalidator, current_platform, hash, init_app_menus,",
"- self.finish_dispatch_key_event(event, dispatch_path, cx);"
] | [
17,
19,
128
] | {
"additions": 52,
"author": "ConradIrwin",
"deletions": 23,
"html_url": "https://github.com/zed-industries/zed/pull/29324",
"issue_id": 29324,
"merged_at": "2025-04-24T05:34:39Z",
"omission_probability": 0.1,
"pr_number": 29324,
"repo": "zed-industries/zed",
"title": "Fix context_stack race in KeyContextView",
"total_changes": 75
} |
482 | diff --git a/assets/settings/default.json b/assets/settings/default.json
index 4205a473ba2b87..801e54ea3b8420 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -1481,7 +1481,12 @@
"use_multiline_find": false,
"use_smartcase_find": false,
"highlight_on_yank_duration": 200,
- "custom_digraphs": {}
+ "custom_digraphs": {},
+ // Cursor shape for the each mode.
+ // Specify the mode as the key and the shape as the value.
+ // The mode can be one of the following: "normal", "replace", "insert", "visual".
+ // The shape can be one of the following: "block", "bar", "underline", "hollow".
+ "cursor_shape": {}
},
// The server to connect to. If the environment variable
// ZED_SERVER_URL is set, it will override this setting.
diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs
index 7cea48420d52b1..6b61372b64d620 100644
--- a/crates/vim/src/vim.rs
+++ b/crates/vim/src/vim.rs
@@ -1011,6 +1011,7 @@ impl Vim {
}
pub fn cursor_shape(&self, cx: &mut App) -> CursorShape {
+ let cursor_shape = VimSettings::get_global(cx).cursor_shape;
match self.mode {
Mode::Normal => {
if let Some(operator) = self.operator_stack.last() {
@@ -1028,18 +1029,18 @@ impl Vim {
_ => CursorShape::Underline,
}
} else {
- // No operator active -> Block cursor
- CursorShape::Block
+ cursor_shape.normal.unwrap_or(CursorShape::Block)
}
}
- Mode::Replace => CursorShape::Underline,
- Mode::HelixNormal | Mode::Visual | Mode::VisualLine | Mode::VisualBlock => {
- CursorShape::Block
+ Mode::HelixNormal => cursor_shape.normal.unwrap_or(CursorShape::Block),
+ Mode::Replace => cursor_shape.replace.unwrap_or(CursorShape::Underline),
+ Mode::Visual | Mode::VisualLine | Mode::VisualBlock => {
+ cursor_shape.visual.unwrap_or(CursorShape::Block)
}
- Mode::Insert => {
+ Mode::Insert => cursor_shape.insert.unwrap_or({
let editor_settings = EditorSettings::get_global(cx);
editor_settings.cursor_shape.unwrap_or_default()
- }
+ }),
}
}
@@ -1680,6 +1681,27 @@ pub enum UseSystemClipboard {
OnYank,
}
+/// The settings for cursor shape.
+#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
+struct CursorShapeSettings {
+ /// Cursor shape for the normal mode.
+ ///
+ /// Default: block
+ pub normal: Option<CursorShape>,
+ /// Cursor shape for the replace mode.
+ ///
+ /// Default: underline
+ pub replace: Option<CursorShape>,
+ /// Cursor shape for the visual mode.
+ ///
+ /// Default: block
+ pub visual: Option<CursorShape>,
+ /// Cursor shape for the insert mode.
+ ///
+ /// The default value follows the primary cursor_shape.
+ pub insert: Option<CursorShape>,
+}
+
#[derive(Deserialize)]
struct VimSettings {
pub default_mode: Mode,
@@ -1689,6 +1711,7 @@ struct VimSettings {
pub use_smartcase_find: bool,
pub custom_digraphs: HashMap<String, Arc<str>>,
pub highlight_on_yank_duration: u64,
+ pub cursor_shape: CursorShapeSettings,
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
@@ -1700,6 +1723,7 @@ struct VimSettingsContent {
pub use_smartcase_find: Option<bool>,
pub custom_digraphs: Option<HashMap<String, Arc<str>>>,
pub highlight_on_yank_duration: Option<u64>,
+ pub cursor_shape: Option<CursorShapeSettings>,
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
@@ -1758,6 +1782,7 @@ impl Settings for VimSettings {
highlight_on_yank_duration: settings
.highlight_on_yank_duration
.ok_or_else(Self::missing_default)?,
+ cursor_shape: settings.cursor_shape.ok_or_else(Self::missing_default)?,
})
}
}
| diff --git a/assets/settings/default.json b/assets/settings/default.json
index 4205a473ba2b87..801e54ea3b8420 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -1481,7 +1481,12 @@
"use_multiline_find": false,
"use_smartcase_find": false,
"highlight_on_yank_duration": 200,
- "custom_digraphs": {}
+ "custom_digraphs": {},
+ // Cursor shape for the each mode.
+ // The mode can be one of the following: "normal", "replace", "insert", "visual".
+ // The shape can be one of the following: "block", "bar", "underline", "hollow".
+ "cursor_shape": {}
},
// The server to connect to. If the environment variable
// ZED_SERVER_URL is set, it will override this setting.
diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs
index 7cea48420d52b1..6b61372b64d620 100644
--- a/crates/vim/src/vim.rs
+++ b/crates/vim/src/vim.rs
@@ -1011,6 +1011,7 @@ impl Vim {
pub fn cursor_shape(&self, cx: &mut App) -> CursorShape {
+ let cursor_shape = VimSettings::get_global(cx).cursor_shape;
match self.mode {
Mode::Normal => {
if let Some(operator) = self.operator_stack.last() {
@@ -1028,18 +1029,18 @@ impl Vim {
_ => CursorShape::Underline,
}
} else {
- // No operator active -> Block cursor
- CursorShape::Block
+ cursor_shape.normal.unwrap_or(CursorShape::Block)
}
- Mode::Replace => CursorShape::Underline,
- Mode::HelixNormal | Mode::Visual | Mode::VisualLine | Mode::VisualBlock => {
- CursorShape::Block
+ Mode::HelixNormal => cursor_shape.normal.unwrap_or(CursorShape::Block),
+ Mode::Replace => cursor_shape.replace.unwrap_or(CursorShape::Underline),
+ Mode::Visual | Mode::VisualLine | Mode::VisualBlock => {
+ cursor_shape.visual.unwrap_or(CursorShape::Block)
- Mode::Insert => {
+ Mode::Insert => cursor_shape.insert.unwrap_or({
let editor_settings = EditorSettings::get_global(cx);
editor_settings.cursor_shape.unwrap_or_default()
+ }),
}
@@ -1680,6 +1681,27 @@ pub enum UseSystemClipboard {
OnYank,
+/// The settings for cursor shape.
+#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
+struct CursorShapeSettings {
+ /// Cursor shape for the normal mode.
+ pub normal: Option<CursorShape>,
+ /// Cursor shape for the replace mode.
+ /// Default: underline
+ pub replace: Option<CursorShape>,
+ /// Cursor shape for the visual mode.
+ pub visual: Option<CursorShape>,
+ /// Cursor shape for the insert mode.
+ /// The default value follows the primary cursor_shape.
+ pub insert: Option<CursorShape>,
+}
+
#[derive(Deserialize)]
struct VimSettings {
pub default_mode: Mode,
@@ -1689,6 +1711,7 @@ struct VimSettings {
pub use_smartcase_find: bool,
pub custom_digraphs: HashMap<String, Arc<str>>,
pub highlight_on_yank_duration: u64,
+ pub cursor_shape: CursorShapeSettings,
@@ -1700,6 +1723,7 @@ struct VimSettingsContent {
pub use_smartcase_find: Option<bool>,
pub custom_digraphs: Option<HashMap<String, Arc<str>>>,
pub highlight_on_yank_duration: Option<u64>,
+ pub cursor_shape: Option<CursorShapeSettings>,
@@ -1758,6 +1782,7 @@ impl Settings for VimSettings {
highlight_on_yank_duration: settings
.highlight_on_yank_duration
.ok_or_else(Self::missing_default)?,
+ cursor_shape: settings.cursor_shape.ok_or_else(Self::missing_default)?,
}) | [
"+ // Specify the mode as the key and the shape as the value.",
"- }"
] | [
11,
51
] | {
"additions": 38,
"author": "knmts",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/28636",
"issue_id": 28636,
"merged_at": "2025-04-22T00:42:04Z",
"omission_probability": 0.1,
"pr_number": 28636,
"repo": "zed-industries/zed",
"title": "vim: Add cursor shape settings for each vim mode",
"total_changes": 46
} |
483 | diff --git a/crates/agent/src/tool_use.rs b/crates/agent/src/tool_use.rs
index 33472773ee0af2..a6441bb5ae2086 100644
--- a/crates/agent/src/tool_use.rs
+++ b/crates/agent/src/tool_use.rs
@@ -72,6 +72,7 @@ impl ToolUseState {
.map(|tool_use| LanguageModelToolUse {
id: tool_use.id.clone(),
name: tool_use.name.clone().into(),
+ raw_input: tool_use.input.to_string(),
input: tool_use.input.clone(),
is_input_complete: true,
})
diff --git a/crates/google_ai/src/google_ai.rs b/crates/google_ai/src/google_ai.rs
index 9f6045a288aff6..7d39fab67c66da 100644
--- a/crates/google_ai/src/google_ai.rs
+++ b/crates/google_ai/src/google_ai.rs
@@ -338,6 +338,7 @@ pub struct CountTokensResponse {
#[derive(Debug, Serialize, Deserialize)]
pub struct FunctionCall {
pub name: String,
+ pub raw_args: String,
pub args: serde_json::Value,
}
diff --git a/crates/language_model/src/language_model.rs b/crates/language_model/src/language_model.rs
index 8dc641f88c6170..5cf0895f14cfa0 100644
--- a/crates/language_model/src/language_model.rs
+++ b/crates/language_model/src/language_model.rs
@@ -186,6 +186,7 @@ where
pub struct LanguageModelToolUse {
pub id: LanguageModelToolUseId,
pub name: Arc<str>,
+ pub raw_input: String,
pub input: serde_json::Value,
pub is_input_complete: bool,
}
diff --git a/crates/language_models/src/provider/anthropic.rs b/crates/language_models/src/provider/anthropic.rs
index f255740c035a0d..c029cd140288da 100644
--- a/crates/language_models/src/provider/anthropic.rs
+++ b/crates/language_models/src/provider/anthropic.rs
@@ -727,6 +727,7 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.clone().into(),
name: tool_use.name.clone().into(),
is_input_complete: false,
+ raw_input: tool_use.input_json.clone(),
input,
},
))],
@@ -757,6 +758,7 @@ pub fn map_to_language_model_completion_events(
)
.map_err(|err| anyhow!("Error parsing tool call input JSON: {err:?} - JSON string was: {input_json:?}"))?
},
+ raw_input: tool_use.input_json.clone(),
},
))
})],
diff --git a/crates/language_models/src/provider/bedrock.rs b/crates/language_models/src/provider/bedrock.rs
index bb5c10cf93c7a8..edcb6049195596 100644
--- a/crates/language_models/src/provider/bedrock.rs
+++ b/crates/language_models/src/provider/bedrock.rs
@@ -894,6 +894,7 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.into(),
name: tool_use.name.into(),
is_input_complete: true,
+ raw_input: tool_use.input_json.clone(),
input: if tool_use.input_json.is_empty() {
Value::Null
} else {
diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs
index eac138cd61fcf7..6fe86aec3913ed 100644
--- a/crates/language_models/src/provider/copilot_chat.rs
+++ b/crates/language_models/src/provider/copilot_chat.rs
@@ -368,6 +368,7 @@ pub fn map_to_language_model_completion_events(
id: tool_call.id.into(),
name: tool_call.name.as_str().into(),
is_input_complete: true,
+ raw_input: tool_call.arguments.clone(),
input: serde_json::Value::from_str(
&tool_call.arguments,
)?,
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index 152eef13042fa8..c3aeb0a36c221b 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -396,6 +396,7 @@ pub fn into_google(
Some(Part::FunctionCallPart(google_ai::FunctionCallPart {
function_call: google_ai::FunctionCall {
name: tool_use.name.to_string(),
+ raw_args: tool_use.raw_input,
args: tool_use.input,
},
}))
@@ -537,6 +538,10 @@ pub fn map_to_language_model_completion_events(
id,
name,
is_input_complete: true,
+ raw_input: function_call_part
+ .function_call
+ .raw_args
+ .clone(),
input: function_call_part.function_call.args,
},
)));
diff --git a/crates/language_models/src/provider/open_ai.rs b/crates/language_models/src/provider/open_ai.rs
index 11ac5394e603f6..773c372d168c22 100644
--- a/crates/language_models/src/provider/open_ai.rs
+++ b/crates/language_models/src/provider/open_ai.rs
@@ -491,6 +491,7 @@ pub fn map_to_language_model_completion_events(
id: tool_call.id.into(),
name: tool_call.name.as_str().into(),
is_input_complete: true,
+ raw_input: tool_call.arguments.clone(),
input: serde_json::Value::from_str(
&tool_call.arguments,
)?,
| diff --git a/crates/agent/src/tool_use.rs b/crates/agent/src/tool_use.rs
index 33472773ee0af2..a6441bb5ae2086 100644
--- a/crates/agent/src/tool_use.rs
+++ b/crates/agent/src/tool_use.rs
@@ -72,6 +72,7 @@ impl ToolUseState {
.map(|tool_use| LanguageModelToolUse {
id: tool_use.id.clone(),
name: tool_use.name.clone().into(),
+ raw_input: tool_use.input.to_string(),
input: tool_use.input.clone(),
is_input_complete: true,
})
diff --git a/crates/google_ai/src/google_ai.rs b/crates/google_ai/src/google_ai.rs
index 9f6045a288aff6..7d39fab67c66da 100644
--- a/crates/google_ai/src/google_ai.rs
+++ b/crates/google_ai/src/google_ai.rs
@@ -338,6 +338,7 @@ pub struct CountTokensResponse {
#[derive(Debug, Serialize, Deserialize)]
pub struct FunctionCall {
pub name: String,
+ pub raw_args: String,
pub args: serde_json::Value,
diff --git a/crates/language_model/src/language_model.rs b/crates/language_model/src/language_model.rs
index 8dc641f88c6170..5cf0895f14cfa0 100644
--- a/crates/language_model/src/language_model.rs
+++ b/crates/language_model/src/language_model.rs
@@ -186,6 +186,7 @@ where
pub struct LanguageModelToolUse {
pub id: LanguageModelToolUseId,
pub name: Arc<str>,
+ pub raw_input: String,
pub input: serde_json::Value,
pub is_input_complete: bool,
diff --git a/crates/language_models/src/provider/anthropic.rs b/crates/language_models/src/provider/anthropic.rs
index f255740c035a0d..c029cd140288da 100644
--- a/crates/language_models/src/provider/anthropic.rs
+++ b/crates/language_models/src/provider/anthropic.rs
@@ -727,6 +727,7 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.clone().into(),
name: tool_use.name.clone().into(),
is_input_complete: false,
+ raw_input: tool_use.input_json.clone(),
input,
))],
@@ -757,6 +758,7 @@ pub fn map_to_language_model_completion_events(
)
.map_err(|err| anyhow!("Error parsing tool call input JSON: {err:?} - JSON string was: {input_json:?}"))?
},
))
})],
diff --git a/crates/language_models/src/provider/bedrock.rs b/crates/language_models/src/provider/bedrock.rs
index bb5c10cf93c7a8..edcb6049195596 100644
--- a/crates/language_models/src/provider/bedrock.rs
+++ b/crates/language_models/src/provider/bedrock.rs
@@ -894,6 +894,7 @@ pub fn map_to_language_model_completion_events(
id: tool_use.id.into(),
name: tool_use.name.into(),
is_input_complete: true,
input: if tool_use.input_json.is_empty() {
Value::Null
} else {
diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs
index eac138cd61fcf7..6fe86aec3913ed 100644
--- a/crates/language_models/src/provider/copilot_chat.rs
+++ b/crates/language_models/src/provider/copilot_chat.rs
@@ -368,6 +368,7 @@ pub fn map_to_language_model_completion_events(
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rs
index 152eef13042fa8..c3aeb0a36c221b 100644
--- a/crates/language_models/src/provider/google.rs
+++ b/crates/language_models/src/provider/google.rs
@@ -396,6 +396,7 @@ pub fn into_google(
Some(Part::FunctionCallPart(google_ai::FunctionCallPart {
function_call: google_ai::FunctionCall {
name: tool_use.name.to_string(),
+ raw_args: tool_use.raw_input,
args: tool_use.input,
},
}))
@@ -537,6 +538,10 @@ pub fn map_to_language_model_completion_events(
id,
name,
+ raw_input: function_call_part
+ .function_call
+ .raw_args
+ .clone(),
input: function_call_part.function_call.args,
)));
diff --git a/crates/language_models/src/provider/open_ai.rs b/crates/language_models/src/provider/open_ai.rs
index 11ac5394e603f6..773c372d168c22 100644
--- a/crates/language_models/src/provider/open_ai.rs
+++ b/crates/language_models/src/provider/open_ai.rs
@@ -491,6 +491,7 @@ pub fn map_to_language_model_completion_events( | [] | [] | {
"additions": 13,
"author": "nathansobo",
"deletions": 0,
"html_url": "https://github.com/zed-industries/zed/pull/29322",
"issue_id": 29322,
"merged_at": "2025-04-24T02:30:49Z",
"omission_probability": 0.1,
"pr_number": 29322,
"repo": "zed-industries/zed",
"title": "Introduce LanguageModelToolUse::raw_input",
"total_changes": 13
} |
484 | diff --git a/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml b/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml
new file mode 100644
index 00000000000000..a2846e9d15854a
--- /dev/null
+++ b/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml
@@ -0,0 +1,53 @@
+url = "https://github.com/tree-sitter/tree-sitter.git"
+revision = "635c49909ce4aa7f58a9375374f91b1b434f6f9c"
+language_extension = "rs"
+
+prompt = """
+Change `compile_parser_to_wasm` to use `wasi-sdk` instead of emscripten.
+Use `ureq` to download the SDK for the current platform and architecture.
+Extract the archive into a sibling of `lib` inside the `tree-sitter` directory in the cache_dir.
+Compile the parser to wasm using the `bin/clang` executable (or `bin/clang.exe` on windows)
+that's inside of the archive.
+Don't re-download the SDK if that executable already exists.
+
+Use these clang flags: -fPIC -shared -Os -Wl,--export=tree_sitter_{language_name}
+
+Here are the available wasi-sdk assets:
+- wasi-sdk-25.0-x86_64-macos.tar.gz
+- wasi-sdk-25.0-arm64-macos.tar.gz
+- wasi-sdk-25.0-x86_64-linux.tar.gz
+- wasi-sdk-25.0-arm64-linux.tar.gz
+- wasi-sdk-25.0-x86_64-linux.tar.gz
+- wasi-sdk-25.0-arm64-linux.tar.gz
+- wasi-sdk-25.0-x86_64-windows.tar.gz
+"""
+
+[diff_assertions]
+
+modify_function = """
+The patch modifies the `compile_parser_to_wasm` function, removing logic for running `emscripten`,
+and adding logic to download `wasi-sdk`.
+"""
+
+use_listed_assets = """
+The patch implements logic for selecting from the assets listed in the prompt by detecting the
+current platform and architecture.
+"""
+
+add_deps = """
+The patch adds a dependency for `ureq` to the Cargo.toml, and adds an import to the top of `loader/lib.rs`
+If the patch uses any other dependencies (such as `tar` or `flate2`), it also correctly adds them
+to the Cargo.toml and imports them.
+"""
+
+[thread_assertions]
+
+find_specified_function = """
+The agent finds the specified function `compile_parser_to_wasm` in a logical way.
+It does not begin by guessing any paths to files in the codebase, but rather searches for the function by name.
+"""
+
+no_syntax_errors = """
+As it edits the file, the agent never introduces syntax errors. It's ok if there are other compile errors,
+but it should not introduce glaring issues like mismatched curly braces.
+"""
diff --git a/typos.toml b/typos.toml
index 4952c61c6ac202..75f50545d68d88 100644
--- a/typos.toml
+++ b/typos.toml
@@ -45,7 +45,7 @@ extend-exclude = [
# Spellcheck triggers on `|Fixe[sd]|` regex part.
"script/danger/dangerfile.ts",
# Eval examples for prompts and criteria
- "crates/eval/examples/",
+ "crates/eval/src/examples/",
]
[default]
| diff --git a/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml b/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml
new file mode 100644
index 00000000000000..a2846e9d15854a
--- /dev/null
+++ b/crates/eval/src/examples/tree_sitter_drop_emscripten_dep.toml
@@ -0,0 +1,53 @@
+url = "https://github.com/tree-sitter/tree-sitter.git"
+language_extension = "rs"
+prompt = """
+Change `compile_parser_to_wasm` to use `wasi-sdk` instead of emscripten.
+Use `ureq` to download the SDK for the current platform and architecture.
+Extract the archive into a sibling of `lib` inside the `tree-sitter` directory in the cache_dir.
+Compile the parser to wasm using the `bin/clang` executable (or `bin/clang.exe` on windows)
+that's inside of the archive.
+Don't re-download the SDK if that executable already exists.
+Use these clang flags: -fPIC -shared -Os -Wl,--export=tree_sitter_{language_name}
+Here are the available wasi-sdk assets:
+- wasi-sdk-25.0-x86_64-macos.tar.gz
+- wasi-sdk-25.0-x86_64-windows.tar.gz
+[diff_assertions]
+modify_function = """
+The patch modifies the `compile_parser_to_wasm` function, removing logic for running `emscripten`,
+and adding logic to download `wasi-sdk`.
+use_listed_assets = """
+The patch implements logic for selecting from the assets listed in the prompt by detecting the
+current platform and architecture.
+add_deps = """
+The patch adds a dependency for `ureq` to the Cargo.toml, and adds an import to the top of `loader/lib.rs`
+to the Cargo.toml and imports them.
+[thread_assertions]
+find_specified_function = """
+The agent finds the specified function `compile_parser_to_wasm` in a logical way.
+As it edits the file, the agent never introduces syntax errors. It's ok if there are other compile errors,
+but it should not introduce glaring issues like mismatched curly braces.
diff --git a/typos.toml b/typos.toml
index 4952c61c6ac202..75f50545d68d88 100644
--- a/typos.toml
+++ b/typos.toml
@@ -45,7 +45,7 @@ extend-exclude = [
# Spellcheck triggers on `|Fixe[sd]|` regex part.
"script/danger/dangerfile.ts",
# Eval examples for prompts and criteria
- "crates/eval/examples/",
+ "crates/eval/src/examples/",
]
[default] | [
"+revision = \"635c49909ce4aa7f58a9375374f91b1b434f6f9c\"",
"+- wasi-sdk-25.0-arm64-macos.tar.gz",
"+If the patch uses any other dependencies (such as `tar` or `flate2`), it also correctly adds them",
"+It does not begin by guessing any paths to files in the codebase, but rather searches for the function by name.",
"+no_syntax_errors = \"\"\""
] | [
7,
22,
44,
52,
55
] | {
"additions": 54,
"author": "maxbrunsfeld",
"deletions": 1,
"html_url": "https://github.com/zed-industries/zed/pull/29321",
"issue_id": 29321,
"merged_at": "2025-04-24T01:46:38Z",
"omission_probability": 0.1,
"pr_number": 29321,
"repo": "zed-industries/zed",
"title": "Add tree-sitter example to the eval",
"total_changes": 55
} |
485 | diff --git a/Cargo.lock b/Cargo.lock
index 0cae49fa66d0a3..09d309025128b0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18536,9 +18536,9 @@ dependencies = [
[[package]]
name = "zed_llm_client"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c1666cd923c5eb4635f3743e69c6920d0ed71f29b26920616a5d220607df7c4"
+checksum = "cc9ec491b7112cb8c2fba3c17d9a349d8ab695fb1a4ef6c5c4b9fd8d7aa975c1"
dependencies = [
"anyhow",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index ba9fc3673dbb21..00cabcc79b46cb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -606,7 +606,7 @@ wasmtime-wasi = "29"
which = "6.0.0"
wit-component = "0.221"
workspace-hack = "0.1.0"
-zed_llm_client = "0.7.0"
+zed_llm_client = "0.7.1"
zstd = "0.11"
metal = "0.29"
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index b8bc86d406d669..4c581194d3a1c0 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -35,9 +35,9 @@ use strum::IntoEnumIterator;
use thiserror::Error;
use ui::{TintColor, prelude::*};
use zed_llm_client::{
- CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, EXPIRED_LLM_TOKEN_HEADER_NAME,
- MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME, MODEL_REQUESTS_RESOURCE_HEADER_VALUE,
- SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
+ CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, CountTokensBody, CountTokensResponse,
+ EXPIRED_LLM_TOKEN_HEADER_NAME, MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME,
+ MODEL_REQUESTS_RESOURCE_HEADER_VALUE, SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
};
use crate::AllLanguageModelSettings;
@@ -686,7 +686,58 @@ impl LanguageModel for CloudLanguageModel {
match self.model.clone() {
CloudModel::Anthropic(_) => count_anthropic_tokens(request, cx),
CloudModel::OpenAi(model) => count_open_ai_tokens(request, model, cx),
- CloudModel::Google(_model) => async move { Ok(0) }.boxed(),
+ CloudModel::Google(model) => {
+ let client = self.client.clone();
+ let llm_api_token = self.llm_api_token.clone();
+ let request = into_google(request, model.id().into());
+ async move {
+ let http_client = &client.http_client();
+ let token = llm_api_token.acquire(&client).await?;
+
+ let request_builder = http_client::Request::builder().method(Method::POST);
+ let request_builder =
+ if let Ok(completions_url) = std::env::var("ZED_COUNT_TOKENS_URL") {
+ request_builder.uri(completions_url)
+ } else {
+ request_builder.uri(
+ http_client
+ .build_zed_llm_url("/count_tokens", &[])?
+ .as_ref(),
+ )
+ };
+ let request_body = CountTokensBody {
+ provider: zed_llm_client::LanguageModelProvider::Google,
+ model: model.id().into(),
+ provider_request: serde_json::to_value(&google_ai::CountTokensRequest {
+ contents: request.contents,
+ })?,
+ };
+ let request = request_builder
+ .header("Content-Type", "application/json")
+ .header("Authorization", format!("Bearer {token}"))
+ .body(serde_json::to_string(&request_body)?.into())?;
+ let mut response = http_client.send(request).await?;
+ let status = response.status();
+ let mut response_body = String::new();
+ response
+ .body_mut()
+ .read_to_string(&mut response_body)
+ .await?;
+
+ if status.is_success() {
+ let response_body: CountTokensResponse =
+ serde_json::from_str(&response_body)?;
+
+ Ok(response_body.tokens)
+ } else {
+ Err(anyhow!(ApiError {
+ status,
+ body: response_body
+ }))
+ }
+ }
+ .boxed()
+ }
}
}
| diff --git a/Cargo.lock b/Cargo.lock
index 0cae49fa66d0a3..09d309025128b0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18536,9 +18536,9 @@ dependencies = [
[[package]]
name = "zed_llm_client"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c1666cd923c5eb4635f3743e69c6920d0ed71f29b26920616a5d220607df7c4"
+checksum = "cc9ec491b7112cb8c2fba3c17d9a349d8ab695fb1a4ef6c5c4b9fd8d7aa975c1"
dependencies = [
"anyhow",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index ba9fc3673dbb21..00cabcc79b46cb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -606,7 +606,7 @@ wasmtime-wasi = "29"
which = "6.0.0"
wit-component = "0.221"
workspace-hack = "0.1.0"
-zed_llm_client = "0.7.0"
+zed_llm_client = "0.7.1"
zstd = "0.11"
metal = "0.29"
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index b8bc86d406d669..4c581194d3a1c0 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -35,9 +35,9 @@ use strum::IntoEnumIterator;
use thiserror::Error;
use ui::{TintColor, prelude::*};
use zed_llm_client::{
- CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, EXPIRED_LLM_TOKEN_HEADER_NAME,
- MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME, MODEL_REQUESTS_RESOURCE_HEADER_VALUE,
- SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
+ CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, CountTokensBody, CountTokensResponse,
+ EXPIRED_LLM_TOKEN_HEADER_NAME, MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME,
+ MODEL_REQUESTS_RESOURCE_HEADER_VALUE, SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
};
use crate::AllLanguageModelSettings;
@@ -686,7 +686,58 @@ impl LanguageModel for CloudLanguageModel {
match self.model.clone() {
CloudModel::Anthropic(_) => count_anthropic_tokens(request, cx),
CloudModel::OpenAi(model) => count_open_ai_tokens(request, model, cx),
- CloudModel::Google(_model) => async move { Ok(0) }.boxed(),
+ CloudModel::Google(model) => {
+ let client = self.client.clone();
+ let llm_api_token = self.llm_api_token.clone();
+ let request = into_google(request, model.id().into());
+ async move {
+ let token = llm_api_token.acquire(&client).await?;
+ let request_builder = http_client::Request::builder().method(Method::POST);
+ let request_builder =
+ if let Ok(completions_url) = std::env::var("ZED_COUNT_TOKENS_URL") {
+ request_builder.uri(completions_url)
+ } else {
+ request_builder.uri(
+ http_client
+ .build_zed_llm_url("/count_tokens", &[])?
+ .as_ref(),
+ )
+ };
+ let request_body = CountTokensBody {
+ provider: zed_llm_client::LanguageModelProvider::Google,
+ model: model.id().into(),
+ provider_request: serde_json::to_value(&google_ai::CountTokensRequest {
+ contents: request.contents,
+ })?,
+ };
+ .header("Content-Type", "application/json")
+ .header("Authorization", format!("Bearer {token}"))
+ .body(serde_json::to_string(&request_body)?.into())?;
+ let mut response = http_client.send(request).await?;
+ let status = response.status();
+ let mut response_body = String::new();
+ .body_mut()
+ .read_to_string(&mut response_body)
+ .await?;
+ if status.is_success() {
+ let response_body: CountTokensResponse =
+ serde_json::from_str(&response_body)?;
+ Ok(response_body.tokens)
+ } else {
+ Err(anyhow!(ApiError {
+ status,
+ body: response_body
+ }))
+ }
+ }
+ .boxed()
+ }
}
} | [
"+ let http_client = &client.http_client();",
"+ let request = request_builder",
"+ response"
] | [
56,
77,
84
] | {
"additions": 58,
"author": "maxdeviant",
"deletions": 7,
"html_url": "https://github.com/zed-industries/zed/pull/29319",
"issue_id": 29319,
"merged_at": "2025-04-24T01:21:53Z",
"omission_probability": 0.1,
"pr_number": 29319,
"repo": "zed-industries/zed",
"title": "language_models: Count Google AI tokens through LLM service",
"total_changes": 65
} |
486 | diff --git a/assets/prompts/assistant_system_prompt.hbs b/assets/prompts/assistant_system_prompt.hbs
index 1aca0a938be3db..4a3e574e673dd0 100644
--- a/assets/prompts/assistant_system_prompt.hbs
+++ b/assets/prompts/assistant_system_prompt.hbs
@@ -31,6 +31,9 @@ If appropriate, use tool calls to explore the current project, which contains th
- When looking for symbols in the project, prefer the `grep` tool.
- As you learn about the structure of the project, use that information to scope `grep` searches to targeted subtrees of the project.
- Bias towards not asking the user for help if you can find the answer yourself.
+{{! TODO: Only mention tools if they are enabled }}
+- The user might specify a partial file path. If you don't know the full path, use `find_path` (not `grep`) before you read the file.
+- Before you read or edit a file, you must first find the full path. DO NOT ever guess a file path!
## Fixing Diagnostics
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 60c8708e239301..44492b0653e2b4 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -646,7 +646,7 @@
"fetch": true,
"list_directory": false,
"now": true,
- "path_search": true,
+ "find_path": true,
"read_file": true,
"grep": true,
"thinking": true,
@@ -670,7 +670,7 @@
"list_directory": true,
"move_path": false,
"now": false,
- "path_search": true,
+ "find_path": true,
"read_file": true,
"grep": true,
"rename": false,
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 2063c7d2a00b43..1eca808f6da6d0 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -9,12 +9,12 @@ mod delete_path_tool;
mod diagnostics_tool;
mod edit_file_tool;
mod fetch_tool;
+mod find_path_tool;
mod grep_tool;
mod list_directory_tool;
mod move_path_tool;
mod now_tool;
mod open_tool;
-mod path_search_tool;
mod read_file_tool;
mod rename_tool;
mod replace;
@@ -45,11 +45,11 @@ use crate::delete_path_tool::DeletePathTool;
use crate::diagnostics_tool::DiagnosticsTool;
use crate::edit_file_tool::EditFileTool;
use crate::fetch_tool::FetchTool;
+use crate::find_path_tool::FindPathTool;
use crate::grep_tool::GrepTool;
use crate::list_directory_tool::ListDirectoryTool;
use crate::now_tool::NowTool;
use crate::open_tool::OpenTool;
-use crate::path_search_tool::PathSearchTool;
use crate::read_file_tool::ReadFileTool;
use crate::rename_tool::RenameTool;
use crate::symbol_info_tool::SymbolInfoTool;
@@ -58,7 +58,7 @@ use crate::thinking_tool::ThinkingTool;
pub use create_file_tool::CreateFileToolInput;
pub use edit_file_tool::EditFileToolInput;
-pub use path_search_tool::PathSearchToolInput;
+pub use find_path_tool::FindPathToolInput;
pub use read_file_tool::ReadFileToolInput;
pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
@@ -81,7 +81,7 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
registry.register_tool(OpenTool);
registry.register_tool(CodeSymbolsTool);
registry.register_tool(ContentsTool);
- registry.register_tool(PathSearchTool);
+ registry.register_tool(FindPathTool);
registry.register_tool(ReadFileTool);
registry.register_tool(GrepTool);
registry.register_tool(RenameTool);
diff --git a/crates/assistant_tools/src/batch_tool.rs b/crates/assistant_tools/src/batch_tool.rs
index 08f2067ca31e61..c8514f2f9e33cb 100644
--- a/crates/assistant_tools/src/batch_tool.rs
+++ b/crates/assistant_tools/src/batch_tool.rs
@@ -97,7 +97,7 @@ pub struct BatchToolInput {
/// }
/// },
/// {
- /// "name": "path_search",
+ /// "name": "find_path",
/// "input": {
/// "glob": "**/*test*.rs"
/// }
diff --git a/crates/assistant_tools/src/path_search_tool.rs b/crates/assistant_tools/src/find_path_tool.rs
similarity index 92%
rename from crates/assistant_tools/src/path_search_tool.rs
rename to crates/assistant_tools/src/find_path_tool.rs
index 694d89cd307fa4..3b2133bd6054db 100644
--- a/crates/assistant_tools/src/path_search_tool.rs
+++ b/crates/assistant_tools/src/find_path_tool.rs
@@ -12,7 +12,7 @@ use util::paths::PathMatcher;
use worktree::Snapshot;
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
-pub struct PathSearchToolInput {
+pub struct FindPathToolInput {
/// The glob to match against every path in the project.
///
/// <example>
@@ -34,11 +34,11 @@ pub struct PathSearchToolInput {
const RESULTS_PER_PAGE: usize = 50;
-pub struct PathSearchTool;
+pub struct FindPathTool;
-impl Tool for PathSearchTool {
+impl Tool for FindPathTool {
fn name(&self) -> String {
- "path_search".into()
+ "find_path".into()
}
fn needs_confirmation(&self, _: &serde_json::Value, _: &App) -> bool {
@@ -46,7 +46,7 @@ impl Tool for PathSearchTool {
}
fn description(&self) -> String {
- include_str!("./path_search_tool/description.md").into()
+ include_str!("./find_path_tool/description.md").into()
}
fn icon(&self) -> IconName {
@@ -54,11 +54,11 @@ impl Tool for PathSearchTool {
}
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
- json_schema_for::<PathSearchToolInput>(format)
+ json_schema_for::<FindPathToolInput>(format)
}
fn ui_text(&self, input: &serde_json::Value) -> String {
- match serde_json::from_value::<PathSearchToolInput>(input.clone()) {
+ match serde_json::from_value::<FindPathToolInput>(input.clone()) {
Ok(input) => format!("Find paths matching “`{}`”", input.glob),
Err(_) => "Search paths".to_string(),
}
@@ -73,7 +73,7 @@ impl Tool for PathSearchTool {
_window: Option<AnyWindowHandle>,
cx: &mut App,
) -> ToolResult {
- let (offset, glob) = match serde_json::from_value::<PathSearchToolInput>(input) {
+ let (offset, glob) = match serde_json::from_value::<FindPathToolInput>(input) {
Ok(input) => (input.offset, input.glob),
Err(err) => return Task::ready(Err(anyhow!(err))).into(),
};
@@ -144,7 +144,7 @@ mod test {
use util::path;
#[gpui::test]
- async fn test_path_search_tool(cx: &mut TestAppContext) {
+ async fn test_find_path_tool(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.executor());
diff --git a/crates/assistant_tools/src/path_search_tool/description.md b/crates/assistant_tools/src/find_path_tool/description.md
similarity index 84%
rename from crates/assistant_tools/src/path_search_tool/description.md
rename to crates/assistant_tools/src/find_path_tool/description.md
index 8939aec0a973fe..f7a697c467b280 100644
--- a/crates/assistant_tools/src/path_search_tool/description.md
+++ b/crates/assistant_tools/src/find_path_tool/description.md
@@ -1,4 +1,4 @@
-Fast file pattern matching tool that works with any codebase size
+Fast file path pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
- Returns matching file paths sorted alphabetically
diff --git a/crates/assistant_tools/src/grep_tool.rs b/crates/assistant_tools/src/grep_tool.rs
index 32d612c54fec86..91bd78ca5acc34 100644
--- a/crates/assistant_tools/src/grep_tool.rs
+++ b/crates/assistant_tools/src/grep_tool.rs
@@ -20,6 +20,8 @@ use util::paths::PathMatcher;
pub struct GrepToolInput {
/// A regex pattern to search for in the entire project. Note that the regex
/// will be parsed by the Rust `regex` crate.
+ ///
+ /// Do NOT specify a path here! This will only be matched against the code **content**.
pub regex: String,
/// A glob pattern for the paths of files to include in the search.
diff --git a/crates/assistant_tools/src/list_directory_tool/description.md b/crates/assistant_tools/src/list_directory_tool/description.md
index 7fe3a6d441c250..30dcc012ff316c 100644
--- a/crates/assistant_tools/src/list_directory_tool/description.md
+++ b/crates/assistant_tools/src/list_directory_tool/description.md
@@ -1 +1 @@
-Lists files and directories in a given path. Prefer the `grep` or `path_search` tools when searching the codebase.
+Lists files and directories in a given path. Prefer the `grep` or `find_path` tools when searching the codebase.
diff --git a/crates/eval/src/examples/file_search.rs b/crates/eval/src/examples/file_search.rs
index bbee8f008cec83..f4b5f752133d90 100644
--- a/crates/eval/src/examples/file_search.rs
+++ b/crates/eval/src/examples/file_search.rs
@@ -1,5 +1,5 @@
use anyhow::Result;
-use assistant_tools::PathSearchToolInput;
+use assistant_tools::FindPathToolInput;
use async_trait::async_trait;
use regex::Regex;
@@ -15,7 +15,7 @@ impl Example for FileSearchExample {
url: "https://github.com/zed-industries/zed.git".to_string(),
revision: "03ecb88fe30794873f191ddb728f597935b3101c".to_string(),
language_server: None,
- max_assertions: Some(4),
+ max_assertions: Some(3),
}
}
@@ -32,21 +32,18 @@ impl Example for FileSearchExample {
));
let response = cx.run_turn().await?;
- let tool_use = response.expect_tool("path_search", cx)?;
- let input = tool_use.parse_input::<PathSearchToolInput>()?;
+ let tool_use = response.expect_tool("find_path", cx)?;
+ let input = tool_use.parse_input::<FindPathToolInput>()?;
let glob = input.glob;
- cx.assert(
- glob.ends_with(FILENAME),
- format!("glob ends with `{FILENAME}`"),
- )?;
+ cx.assert(glob.ends_with(FILENAME), "glob ends with file name")?;
let without_filename = glob.replace(FILENAME, "");
let matches = Regex::new("(\\*\\*|zed)/(\\*\\*?/)?")
.unwrap()
.is_match(&without_filename);
- cx.assert(matches, "glob starts with either `**` or `zed`")?;
+ cx.assert(matches, "glob starts with `**` or project")?;
Ok(())
}
diff --git a/crates/migrator/src/migrations.rs b/crates/migrator/src/migrations.rs
index ab5be31206f04c..4aeb8697061d77 100644
--- a/crates/migrator/src/migrations.rs
+++ b/crates/migrator/src/migrations.rs
@@ -51,3 +51,9 @@ pub(crate) mod m_2025_04_21 {
pub(crate) use settings::SETTINGS_PATTERNS;
}
+
+pub(crate) mod m_2025_04_23 {
+ mod settings;
+
+ pub(crate) use settings::SETTINGS_PATTERNS;
+}
diff --git a/crates/migrator/src/migrations/m_2025_04_23/settings.rs b/crates/migrator/src/migrations/m_2025_04_23/settings.rs
new file mode 100644
index 00000000000000..54bb9996407dec
--- /dev/null
+++ b/crates/migrator/src/migrations/m_2025_04_23/settings.rs
@@ -0,0 +1,27 @@
+use std::ops::Range;
+use tree_sitter::{Query, QueryMatch};
+
+use crate::MigrationPatterns;
+use crate::patterns::SETTINGS_ASSISTANT_TOOLS_PATTERN;
+
+pub const SETTINGS_PATTERNS: MigrationPatterns =
+ &[(SETTINGS_ASSISTANT_TOOLS_PATTERN, rename_path_search_tool)];
+
+fn rename_path_search_tool(
+ contents: &str,
+ mat: &QueryMatch,
+ query: &Query,
+) -> Option<(Range<usize>, String)> {
+ let tool_name_capture_ix = query.capture_index_for_name("tool_name")?;
+ let tool_name_range = mat
+ .nodes_for_capture_index(tool_name_capture_ix)
+ .next()?
+ .byte_range();
+ let tool_name = contents.get(tool_name_range.clone())?;
+
+ if tool_name == "path_search" {
+ return Some((tool_name_range, "find_path".to_string()));
+ }
+
+ None
+}
diff --git a/crates/migrator/src/migrator.rs b/crates/migrator/src/migrator.rs
index 1a6b9d162ec698..c180ea8e484665 100644
--- a/crates/migrator/src/migrator.rs
+++ b/crates/migrator/src/migrator.rs
@@ -132,6 +132,10 @@ pub fn migrate_settings(text: &str) -> Result<Option<String>> {
migrations::m_2025_04_21::SETTINGS_PATTERNS,
&SETTINGS_QUERY_2025_04_21,
),
+ (
+ migrations::m_2025_04_23::SETTINGS_PATTERNS,
+ &SETTINGS_QUERY_2025_04_23,
+ ),
];
run_migrations(text, migrations)
}
@@ -214,6 +218,10 @@ define_query!(
SETTINGS_QUERY_2025_04_21,
migrations::m_2025_04_21::SETTINGS_PATTERNS
);
+define_query!(
+ SETTINGS_QUERY_2025_04_23,
+ migrations::m_2025_04_23::SETTINGS_PATTERNS
+);
// custom query
static EDIT_PREDICTION_SETTINGS_MIGRATION_QUERY: LazyLock<Query> = LazyLock::new(|| {
@@ -639,7 +647,7 @@ mod tests {
"name": "Custom",
"tools": {
"diagnostics": true,
- "path_search": true,
+ "find_path": true,
"read_file": true
}
}
@@ -650,4 +658,40 @@ mod tests {
None,
)
}
+
+ #[test]
+ fn test_rename_path_search_to_find_path() {
+ assert_migrate_settings(
+ r#"
+ {
+ "assistant": {
+ "profiles": {
+ "default": {
+ "tools": {
+ "path_search": true,
+ "read_file": true
+ }
+ }
+ }
+ }
+ }
+ "#,
+ Some(
+ r#"
+ {
+ "assistant": {
+ "profiles": {
+ "default": {
+ "tools": {
+ "find_path": true,
+ "read_file": true
+ }
+ }
+ }
+ }
+ }
+ "#,
+ ),
+ );
+ }
}
| diff --git a/assets/prompts/assistant_system_prompt.hbs b/assets/prompts/assistant_system_prompt.hbs
index 1aca0a938be3db..4a3e574e673dd0 100644
--- a/assets/prompts/assistant_system_prompt.hbs
+++ b/assets/prompts/assistant_system_prompt.hbs
@@ -31,6 +31,9 @@ If appropriate, use tool calls to explore the current project, which contains th
- When looking for symbols in the project, prefer the `grep` tool.
- As you learn about the structure of the project, use that information to scope `grep` searches to targeted subtrees of the project.
- Bias towards not asking the user for help if you can find the answer yourself.
+{{! TODO: Only mention tools if they are enabled }}
+- The user might specify a partial file path. If you don't know the full path, use `find_path` (not `grep`) before you read the file.
+- Before you read or edit a file, you must first find the full path. DO NOT ever guess a file path!
## Fixing Diagnostics
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 60c8708e239301..44492b0653e2b4 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -646,7 +646,7 @@
"fetch": true,
"list_directory": false,
"now": true,
"thinking": true,
@@ -670,7 +670,7 @@
"list_directory": true,
"move_path": false,
"now": false,
"rename": false,
diff --git a/crates/assistant_tools/src/assistant_tools.rs b/crates/assistant_tools/src/assistant_tools.rs
index 2063c7d2a00b43..1eca808f6da6d0 100644
--- a/crates/assistant_tools/src/assistant_tools.rs
+++ b/crates/assistant_tools/src/assistant_tools.rs
@@ -9,12 +9,12 @@ mod delete_path_tool;
mod diagnostics_tool;
mod edit_file_tool;
mod fetch_tool;
+mod find_path_tool;
mod grep_tool;
mod list_directory_tool;
mod move_path_tool;
mod now_tool;
mod open_tool;
-mod path_search_tool;
mod read_file_tool;
mod rename_tool;
mod replace;
@@ -45,11 +45,11 @@ use crate::delete_path_tool::DeletePathTool;
use crate::diagnostics_tool::DiagnosticsTool;
use crate::edit_file_tool::EditFileTool;
use crate::fetch_tool::FetchTool;
+use crate::find_path_tool::FindPathTool;
use crate::grep_tool::GrepTool;
use crate::list_directory_tool::ListDirectoryTool;
use crate::now_tool::NowTool;
use crate::open_tool::OpenTool;
-use crate::path_search_tool::PathSearchTool;
use crate::read_file_tool::ReadFileTool;
use crate::rename_tool::RenameTool;
use crate::symbol_info_tool::SymbolInfoTool;
@@ -58,7 +58,7 @@ use crate::thinking_tool::ThinkingTool;
pub use create_file_tool::CreateFileToolInput;
pub use edit_file_tool::EditFileToolInput;
-pub use path_search_tool::PathSearchToolInput;
+pub use find_path_tool::FindPathToolInput;
pub use read_file_tool::ReadFileToolInput;
pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
@@ -81,7 +81,7 @@ pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
registry.register_tool(OpenTool);
registry.register_tool(CodeSymbolsTool);
registry.register_tool(ContentsTool);
- registry.register_tool(PathSearchTool);
+ registry.register_tool(FindPathTool);
registry.register_tool(ReadFileTool);
registry.register_tool(GrepTool);
registry.register_tool(RenameTool);
diff --git a/crates/assistant_tools/src/batch_tool.rs b/crates/assistant_tools/src/batch_tool.rs
index 08f2067ca31e61..c8514f2f9e33cb 100644
--- a/crates/assistant_tools/src/batch_tool.rs
+++ b/crates/assistant_tools/src/batch_tool.rs
@@ -97,7 +97,7 @@ pub struct BatchToolInput {
/// },
/// {
- /// "name": "path_search",
+ /// "name": "find_path",
/// "input": {
/// "glob": "**/*test*.rs"
diff --git a/crates/assistant_tools/src/path_search_tool.rs b/crates/assistant_tools/src/find_path_tool.rs
similarity index 92%
rename from crates/assistant_tools/src/path_search_tool.rs
rename to crates/assistant_tools/src/find_path_tool.rs
index 694d89cd307fa4..3b2133bd6054db 100644
--- a/crates/assistant_tools/src/path_search_tool.rs
+++ b/crates/assistant_tools/src/find_path_tool.rs
@@ -12,7 +12,7 @@ use util::paths::PathMatcher;
use worktree::Snapshot;
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
-pub struct PathSearchToolInput {
+pub struct FindPathToolInput {
/// The glob to match against every path in the project.
///
/// <example>
@@ -34,11 +34,11 @@ pub struct PathSearchToolInput {
const RESULTS_PER_PAGE: usize = 50;
-pub struct PathSearchTool;
+pub struct FindPathTool;
-impl Tool for PathSearchTool {
+impl Tool for FindPathTool {
fn name(&self) -> String {
- "path_search".into()
+ "find_path".into()
fn needs_confirmation(&self, _: &serde_json::Value, _: &App) -> bool {
@@ -46,7 +46,7 @@ impl Tool for PathSearchTool {
fn description(&self) -> String {
- include_str!("./path_search_tool/description.md").into()
+ include_str!("./find_path_tool/description.md").into()
fn icon(&self) -> IconName {
@@ -54,11 +54,11 @@ impl Tool for PathSearchTool {
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
- json_schema_for::<PathSearchToolInput>(format)
+ json_schema_for::<FindPathToolInput>(format)
fn ui_text(&self, input: &serde_json::Value) -> String {
- match serde_json::from_value::<PathSearchToolInput>(input.clone()) {
+ match serde_json::from_value::<FindPathToolInput>(input.clone()) {
Ok(input) => format!("Find paths matching “`{}`”", input.glob),
Err(_) => "Search paths".to_string(),
@@ -73,7 +73,7 @@ impl Tool for PathSearchTool {
_window: Option<AnyWindowHandle>,
cx: &mut App,
) -> ToolResult {
- let (offset, glob) = match serde_json::from_value::<PathSearchToolInput>(input) {
+ let (offset, glob) = match serde_json::from_value::<FindPathToolInput>(input) {
Ok(input) => (input.offset, input.glob),
Err(err) => return Task::ready(Err(anyhow!(err))).into(),
};
@@ -144,7 +144,7 @@ mod test {
use util::path;
#[gpui::test]
- async fn test_path_search_tool(cx: &mut TestAppContext) {
+ async fn test_find_path_tool(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.executor());
diff --git a/crates/assistant_tools/src/path_search_tool/description.md b/crates/assistant_tools/src/find_path_tool/description.md
similarity index 84%
rename from crates/assistant_tools/src/path_search_tool/description.md
rename to crates/assistant_tools/src/find_path_tool/description.md
index 8939aec0a973fe..f7a697c467b280 100644
--- a/crates/assistant_tools/src/path_search_tool/description.md
+++ b/crates/assistant_tools/src/find_path_tool/description.md
@@ -1,4 +1,4 @@
-Fast file pattern matching tool that works with any codebase size
+Fast file path pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
- Returns matching file paths sorted alphabetically
diff --git a/crates/assistant_tools/src/grep_tool.rs b/crates/assistant_tools/src/grep_tool.rs
index 32d612c54fec86..91bd78ca5acc34 100644
--- a/crates/assistant_tools/src/grep_tool.rs
+++ b/crates/assistant_tools/src/grep_tool.rs
@@ -20,6 +20,8 @@ use util::paths::PathMatcher;
pub struct GrepToolInput {
/// A regex pattern to search for in the entire project. Note that the regex
/// will be parsed by the Rust `regex` crate.
+ ///
+ /// Do NOT specify a path here! This will only be matched against the code **content**.
pub regex: String,
/// A glob pattern for the paths of files to include in the search.
diff --git a/crates/assistant_tools/src/list_directory_tool/description.md b/crates/assistant_tools/src/list_directory_tool/description.md
index 7fe3a6d441c250..30dcc012ff316c 100644
--- a/crates/assistant_tools/src/list_directory_tool/description.md
+++ b/crates/assistant_tools/src/list_directory_tool/description.md
@@ -1 +1 @@
-Lists files and directories in a given path. Prefer the `grep` or `path_search` tools when searching the codebase.
+Lists files and directories in a given path. Prefer the `grep` or `find_path` tools when searching the codebase.
diff --git a/crates/eval/src/examples/file_search.rs b/crates/eval/src/examples/file_search.rs
index bbee8f008cec83..f4b5f752133d90 100644
--- a/crates/eval/src/examples/file_search.rs
+++ b/crates/eval/src/examples/file_search.rs
@@ -1,5 +1,5 @@
use anyhow::Result;
-use assistant_tools::PathSearchToolInput;
+use assistant_tools::FindPathToolInput;
use async_trait::async_trait;
use regex::Regex;
@@ -15,7 +15,7 @@ impl Example for FileSearchExample {
url: "https://github.com/zed-industries/zed.git".to_string(),
revision: "03ecb88fe30794873f191ddb728f597935b3101c".to_string(),
language_server: None,
- max_assertions: Some(4),
+ max_assertions: Some(3),
@@ -32,21 +32,18 @@ impl Example for FileSearchExample {
));
let response = cx.run_turn().await?;
- let tool_use = response.expect_tool("path_search", cx)?;
- let input = tool_use.parse_input::<PathSearchToolInput>()?;
+ let tool_use = response.expect_tool("find_path", cx)?;
+ let input = tool_use.parse_input::<FindPathToolInput>()?;
let glob = input.glob;
- cx.assert(
- glob.ends_with(FILENAME),
- format!("glob ends with `{FILENAME}`"),
- )?;
+ cx.assert(glob.ends_with(FILENAME), "glob ends with file name")?;
let without_filename = glob.replace(FILENAME, "");
let matches = Regex::new("(\\*\\*|zed)/(\\*\\*?/)?")
.unwrap()
.is_match(&without_filename);
+ cx.assert(matches, "glob starts with `**` or project")?;
Ok(())
diff --git a/crates/migrator/src/migrations.rs b/crates/migrator/src/migrations.rs
index ab5be31206f04c..4aeb8697061d77 100644
--- a/crates/migrator/src/migrations.rs
+++ b/crates/migrator/src/migrations.rs
@@ -51,3 +51,9 @@ pub(crate) mod m_2025_04_21 {
pub(crate) use settings::SETTINGS_PATTERNS;
+ mod settings;
+ pub(crate) use settings::SETTINGS_PATTERNS;
diff --git a/crates/migrator/src/migrations/m_2025_04_23/settings.rs b/crates/migrator/src/migrations/m_2025_04_23/settings.rs
new file mode 100644
index 00000000000000..54bb9996407dec
--- /dev/null
+++ b/crates/migrator/src/migrations/m_2025_04_23/settings.rs
@@ -0,0 +1,27 @@
+use std::ops::Range;
+use crate::MigrationPatterns;
+use crate::patterns::SETTINGS_ASSISTANT_TOOLS_PATTERN;
+pub const SETTINGS_PATTERNS: MigrationPatterns =
+ &[(SETTINGS_ASSISTANT_TOOLS_PATTERN, rename_path_search_tool)];
+fn rename_path_search_tool(
+ contents: &str,
+ mat: &QueryMatch,
+ query: &Query,
+ let tool_name_capture_ix = query.capture_index_for_name("tool_name")?;
+ let tool_name_range = mat
+ .nodes_for_capture_index(tool_name_capture_ix)
+ .next()?
+ .byte_range();
+ let tool_name = contents.get(tool_name_range.clone())?;
+ None
diff --git a/crates/migrator/src/migrator.rs b/crates/migrator/src/migrator.rs
index 1a6b9d162ec698..c180ea8e484665 100644
--- a/crates/migrator/src/migrator.rs
+++ b/crates/migrator/src/migrator.rs
@@ -132,6 +132,10 @@ pub fn migrate_settings(text: &str) -> Result<Option<String>> {
migrations::m_2025_04_21::SETTINGS_PATTERNS,
&SETTINGS_QUERY_2025_04_21,
),
+ (
+ migrations::m_2025_04_23::SETTINGS_PATTERNS,
+ &SETTINGS_QUERY_2025_04_23,
+ ),
];
run_migrations(text, migrations)
@@ -214,6 +218,10 @@ define_query!(
SETTINGS_QUERY_2025_04_21,
migrations::m_2025_04_21::SETTINGS_PATTERNS
);
+define_query!(
+ SETTINGS_QUERY_2025_04_23,
+ migrations::m_2025_04_23::SETTINGS_PATTERNS
+);
// custom query
static EDIT_PREDICTION_SETTINGS_MIGRATION_QUERY: LazyLock<Query> = LazyLock::new(|| {
@@ -639,7 +647,7 @@ mod tests {
"name": "Custom",
"tools": {
"diagnostics": true,
- "path_search": true,
"read_file": true
}
}
@@ -650,4 +658,40 @@ mod tests {
None,
)
+ #[test]
+ fn test_rename_path_search_to_find_path() {
+ assert_migrate_settings(
+ r#"
+ "path_search": true,
+ Some(
+ r#"
+ ),
+ ); | [
"- cx.assert(matches, \"glob starts with either `**` or `zed`\")?;",
"+pub(crate) mod m_2025_04_23 {",
"+use tree_sitter::{Query, QueryMatch};",
"+) -> Option<(Range<usize>, String)> {",
"+ if tool_name == \"path_search\" {",
"+ return Some((tool_name_range, \"find_path\".to_string()));"
] | [
244,
258,
270,
282,
290,
291
] | {
"additions": 107,
"author": "agu-z",
"deletions": 28,
"html_url": "https://github.com/zed-industries/zed/pull/29317",
"issue_id": 29317,
"merged_at": "2025-04-24T00:24:41Z",
"omission_probability": 0.1,
"pr_number": 29317,
"repo": "zed-industries/zed",
"title": "agent: Improve initial file search quality",
"total_changes": 135
} |
487 | diff --git a/crates/assistant_tools/src/create_file_tool.rs b/crates/assistant_tools/src/create_file_tool.rs
index 158991bf6d2a64..7e434f0fc56d0b 100644
--- a/crates/assistant_tools/src/create_file_tool.rs
+++ b/crates/assistant_tools/src/create_file_tool.rs
@@ -24,6 +24,9 @@ pub struct CreateFileToolInput {
///
/// You can create a new file by providing a path of "directory1/new_file.txt"
/// </example>
+ ///
+ /// Make sure to include this field before the `contents` field in the input object
+ /// so that we can display it immediately.
pub path: String,
/// The text contents of the file to create.
diff --git a/crates/assistant_tools/src/edit_file_tool.rs b/crates/assistant_tools/src/edit_file_tool.rs
index f683bd38983771..a5120877c61030 100644
--- a/crates/assistant_tools/src/edit_file_tool.rs
+++ b/crates/assistant_tools/src/edit_file_tool.rs
@@ -26,6 +26,15 @@ use workspace::Workspace;
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct EditFileToolInput {
+ /// A user-friendly markdown description of what's being replaced. This will be shown in the UI.
+ ///
+ /// <example>Fix API endpoint URLs</example>
+ /// <example>Update copyright year in `page_footer`</example>
+ ///
+ /// Make sure to include this field before all the others in the input object
+ /// so that we can display it immediately.
+ pub display_description: String,
+
/// The full path of the file to modify in the project.
///
/// WARNING: When specifying which file path need changing, you MUST
@@ -47,12 +56,6 @@ pub struct EditFileToolInput {
/// </example>
pub path: PathBuf,
- /// A user-friendly markdown description of what's being replaced. This will be shown in the UI.
- ///
- /// <example>Fix API endpoint URLs</example>
- /// <example>Update copyright year in `page_footer`</example>
- pub display_description: String,
-
/// The text to replace.
pub old_string: String,
| diff --git a/crates/assistant_tools/src/create_file_tool.rs b/crates/assistant_tools/src/create_file_tool.rs
index 158991bf6d2a64..7e434f0fc56d0b 100644
--- a/crates/assistant_tools/src/create_file_tool.rs
+++ b/crates/assistant_tools/src/create_file_tool.rs
@@ -24,6 +24,9 @@ pub struct CreateFileToolInput {
/// You can create a new file by providing a path of "directory1/new_file.txt"
+ /// Make sure to include this field before the `contents` field in the input object
pub path: String,
/// The text contents of the file to create.
diff --git a/crates/assistant_tools/src/edit_file_tool.rs b/crates/assistant_tools/src/edit_file_tool.rs
index f683bd38983771..a5120877c61030 100644
--- a/crates/assistant_tools/src/edit_file_tool.rs
+++ b/crates/assistant_tools/src/edit_file_tool.rs
@@ -26,6 +26,15 @@ use workspace::Workspace;
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct EditFileToolInput {
+ /// A user-friendly markdown description of what's being replaced. This will be shown in the UI.
+ /// <example>Fix API endpoint URLs</example>
+ /// <example>Update copyright year in `page_footer`</example>
+ /// Make sure to include this field before all the others in the input object
+ pub display_description: String,
/// The full path of the file to modify in the project.
/// WARNING: When specifying which file path need changing, you MUST
@@ -47,12 +56,6 @@ pub struct EditFileToolInput {
pub path: PathBuf,
- /// A user-friendly markdown description of what's being replaced. This will be shown in the UI.
- ///
- /// <example>Fix API endpoint URLs</example>
- /// <example>Update copyright year in `page_footer`</example>
- pub display_description: String,
/// The text to replace.
pub old_string: String, | [
"+",
"-"
] | [
30,
43
] | {
"additions": 12,
"author": "agu-z",
"deletions": 6,
"html_url": "https://github.com/zed-industries/zed/pull/29308",
"issue_id": 29308,
"merged_at": "2025-04-23T23:16:15Z",
"omission_probability": 0.1,
"pr_number": 29308,
"repo": "zed-industries/zed",
"title": "agent: Encourage model to include displayed fields first",
"total_changes": 18
} |
488 | diff --git a/Cargo.lock b/Cargo.lock
index 1b4e88b2a6e805..0cae49fa66d0a3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2998,7 +2998,6 @@ dependencies = [
"git",
"git_hosting_providers",
"git_ui",
- "google_ai",
"gpui",
"gpui_tokio",
"hex",
diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml
index d6df4be6df0bfe..0fc142212916d7 100644
--- a/crates/collab/Cargo.toml
+++ b/crates/collab/Cargo.toml
@@ -34,7 +34,6 @@ dashmap.workspace = true
derive_more.workspace = true
envy = "0.4.2"
futures.workspace = true
-google_ai.workspace = true
hex.workspace = true
http_client.workspace = true
jsonwebtoken.workspace = true
diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index 76f5f946417687..e2dacc5389d91c 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -3,7 +3,7 @@ mod connection_pool;
use crate::api::{CloudflareIpCountryHeader, SystemIdHeader};
use crate::llm::LlmTokenClaims;
use crate::{
- AppState, Config, Error, RateLimit, Result, auth,
+ AppState, Error, Result, auth,
db::{
self, BufferId, Capability, Channel, ChannelId, ChannelRole, ChannelsForUser,
CreatedChannelMessage, Database, InviteMemberResult, MembershipUpdated, MessageId,
@@ -33,7 +33,6 @@ use chrono::Utc;
use collections::{HashMap, HashSet};
pub use connection_pool::{ConnectionPool, ZedVersion};
use core::fmt::{self, Debug, Formatter};
-use http_client::HttpClient;
use reqwest_client::ReqwestClient;
use rpc::proto::split_repository_update;
use supermaven_api::{CreateExternalUserRequest, SupermavenAdminApi};
@@ -132,7 +131,6 @@ struct Session {
connection_pool: Arc<parking_lot::Mutex<ConnectionPool>>,
app_state: Arc<AppState>,
supermaven_client: Option<Arc<SupermavenAdminApi>>,
- http_client: Arc<dyn HttpClient>,
/// The GeoIP country code for the user.
#[allow(unused)]
geoip_country_code: Option<String>,
@@ -425,17 +423,7 @@ impl Server {
.add_request_handler(forward_mutating_project_request::<proto::GitChangeBranch>)
.add_request_handler(forward_mutating_project_request::<proto::CheckForPushedCommits>)
.add_message_handler(broadcast_project_message_from_host::<proto::AdvertiseContexts>)
- .add_message_handler(update_context)
- .add_request_handler({
- let app_state = app_state.clone();
- move |request, response, session| {
- let app_state = app_state.clone();
- async move {
- count_language_model_tokens(request, response, session, &app_state.config)
- .await
- }
- }
- });
+ .add_message_handler(update_context);
Arc::new(server)
}
@@ -764,7 +752,6 @@ impl Server {
peer: this.peer.clone(),
connection_pool: this.connection_pool.clone(),
app_state: this.app_state.clone(),
- http_client,
geoip_country_code,
system_id,
_executor: executor.clone(),
@@ -3683,100 +3670,6 @@ async fn acknowledge_buffer_version(
Ok(())
}
-async fn count_language_model_tokens(
- request: proto::CountLanguageModelTokens,
- response: Response<proto::CountLanguageModelTokens>,
- session: Session,
- config: &Config,
-) -> Result<()> {
- authorize_access_to_legacy_llm_endpoints(&session).await?;
-
- let rate_limit: Box<dyn RateLimit> = match session.current_plan(&session.db().await).await? {
- proto::Plan::ZedPro => Box::new(ZedProCountLanguageModelTokensRateLimit),
- proto::Plan::Free | proto::Plan::ZedProTrial => {
- Box::new(FreeCountLanguageModelTokensRateLimit)
- }
- };
-
- session
- .app_state
- .rate_limiter
- .check(&*rate_limit, session.user_id())
- .await?;
-
- let result = match proto::LanguageModelProvider::from_i32(request.provider) {
- Some(proto::LanguageModelProvider::Google) => {
- let api_key = config
- .google_ai_api_key
- .as_ref()
- .context("no Google AI API key configured on the server")?;
- google_ai::count_tokens(
- session.http_client.as_ref(),
- google_ai::API_URL,
- api_key,
- serde_json::from_str(&request.request)?,
- )
- .await?
- }
- _ => return Err(anyhow!("unsupported provider"))?,
- };
-
- response.send(proto::CountLanguageModelTokensResponse {
- token_count: result.total_tokens as u32,
- })?;
-
- Ok(())
-}
-
-struct ZedProCountLanguageModelTokensRateLimit;
-
-impl RateLimit for ZedProCountLanguageModelTokensRateLimit {
- fn capacity(&self) -> usize {
- std::env::var("COUNT_LANGUAGE_MODEL_TOKENS_RATE_LIMIT_PER_HOUR")
- .ok()
- .and_then(|v| v.parse().ok())
- .unwrap_or(600) // Picked arbitrarily
- }
-
- fn refill_duration(&self) -> chrono::Duration {
- chrono::Duration::hours(1)
- }
-
- fn db_name(&self) -> &'static str {
- "zed-pro:count-language-model-tokens"
- }
-}
-
-struct FreeCountLanguageModelTokensRateLimit;
-
-impl RateLimit for FreeCountLanguageModelTokensRateLimit {
- fn capacity(&self) -> usize {
- std::env::var("COUNT_LANGUAGE_MODEL_TOKENS_RATE_LIMIT_PER_HOUR_FREE")
- .ok()
- .and_then(|v| v.parse().ok())
- .unwrap_or(600 / 10) // Picked arbitrarily
- }
-
- fn refill_duration(&self) -> chrono::Duration {
- chrono::Duration::hours(1)
- }
-
- fn db_name(&self) -> &'static str {
- "free:count-language-model-tokens"
- }
-}
-
-/// This is leftover from before the LLM service.
-///
-/// The endpoints protected by this check will be moved there eventually.
-async fn authorize_access_to_legacy_llm_endpoints(session: &Session) -> Result<(), Error> {
- if session.is_staff() {
- Ok(())
- } else {
- Err(anyhow!("permission denied"))?
- }
-}
-
/// Get a Supermaven API key for the user
async fn get_supermaven_api_key(
_request: proto::GetSupermavenApiKey,
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index bf6fc5a4e3c22b..b8bc86d406d669 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -686,24 +686,7 @@ impl LanguageModel for CloudLanguageModel {
match self.model.clone() {
CloudModel::Anthropic(_) => count_anthropic_tokens(request, cx),
CloudModel::OpenAi(model) => count_open_ai_tokens(request, model, cx),
- CloudModel::Google(model) => {
- let client = self.client.clone();
- let request = into_google(request, model.id().into());
- let request = google_ai::CountTokensRequest {
- contents: request.contents,
- };
- async move {
- let request = serde_json::to_string(&request)?;
- let response = client
- .request(proto::CountLanguageModelTokens {
- provider: proto::LanguageModelProvider::Google as i32,
- request,
- })
- .await?;
- Ok(response.token_count as usize)
- }
- .boxed()
- }
+ CloudModel::Google(_model) => async move { Ok(0) }.boxed(),
}
}
diff --git a/crates/proto/proto/ai.proto b/crates/proto/proto/ai.proto
index c39345c3c2e875..67c222438731be 100644
--- a/crates/proto/proto/ai.proto
+++ b/crates/proto/proto/ai.proto
@@ -172,19 +172,3 @@ enum LanguageModelRole {
LanguageModelSystem = 2;
reserved 3;
}
-
-message CountLanguageModelTokens {
- LanguageModelProvider provider = 1;
- string request = 2;
-}
-
-message CountLanguageModelTokensResponse {
- uint32 token_count = 1;
-}
-
-enum LanguageModelProvider {
- Anthropic = 0;
- OpenAI = 1;
- Google = 2;
- Zed = 3;
-}
diff --git a/crates/proto/proto/zed.proto b/crates/proto/proto/zed.proto
index ef9f46ac491c79..74db3ce5399177 100644
--- a/crates/proto/proto/zed.proto
+++ b/crates/proto/proto/zed.proto
@@ -206,9 +206,6 @@ message Envelope {
GetImplementation get_implementation = 162;
GetImplementationResponse get_implementation_response = 163;
- CountLanguageModelTokens count_language_model_tokens = 230;
- CountLanguageModelTokensResponse count_language_model_tokens_response = 231;
-
UpdateChannelMessage update_channel_message = 170;
ChannelMessageUpdate channel_message_update = 171;
@@ -397,6 +394,7 @@ message Envelope {
reserved 205 to 206;
reserved 221;
reserved 224 to 229;
+ reserved 230 to 231;
reserved 246;
reserved 270;
reserved 247 to 254;
diff --git a/crates/proto/src/proto.rs b/crates/proto/src/proto.rs
index 2f34bd2cd83db6..03e0bda101f692 100644
--- a/crates/proto/src/proto.rs
+++ b/crates/proto/src/proto.rs
@@ -50,8 +50,6 @@ messages!(
(CloseBuffer, Foreground),
(Commit, Background),
(CopyProjectEntry, Foreground),
- (CountLanguageModelTokens, Background),
- (CountLanguageModelTokensResponse, Background),
(CreateBufferForPeer, Foreground),
(CreateChannel, Foreground),
(CreateChannelResponse, Foreground),
@@ -374,7 +372,6 @@ request_messages!(
(PerformRename, PerformRenameResponse),
(Ping, Ack),
(PrepareRename, PrepareRenameResponse),
- (CountLanguageModelTokens, CountLanguageModelTokensResponse),
(RefreshInlayHints, Ack),
(RefreshCodeLens, Ack),
(RejoinChannelBuffers, RejoinChannelBuffersResponse),
| diff --git a/Cargo.lock b/Cargo.lock
index 1b4e88b2a6e805..0cae49fa66d0a3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2998,7 +2998,6 @@ dependencies = [
"git",
"git_hosting_providers",
"git_ui",
- "google_ai",
"gpui",
"gpui_tokio",
"hex",
diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml
index d6df4be6df0bfe..0fc142212916d7 100644
--- a/crates/collab/Cargo.toml
+++ b/crates/collab/Cargo.toml
@@ -34,7 +34,6 @@ dashmap.workspace = true
derive_more.workspace = true
envy = "0.4.2"
futures.workspace = true
-google_ai.workspace = true
hex.workspace = true
http_client.workspace = true
jsonwebtoken.workspace = true
diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index 76f5f946417687..e2dacc5389d91c 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -3,7 +3,7 @@ mod connection_pool;
use crate::api::{CloudflareIpCountryHeader, SystemIdHeader};
use crate::llm::LlmTokenClaims;
use crate::{
- AppState, Config, Error, RateLimit, Result, auth,
db::{
self, BufferId, Capability, Channel, ChannelId, ChannelRole, ChannelsForUser,
CreatedChannelMessage, Database, InviteMemberResult, MembershipUpdated, MessageId,
@@ -33,7 +33,6 @@ use chrono::Utc;
use collections::{HashMap, HashSet};
pub use connection_pool::{ConnectionPool, ZedVersion};
use core::fmt::{self, Debug, Formatter};
-use http_client::HttpClient;
use reqwest_client::ReqwestClient;
use rpc::proto::split_repository_update;
use supermaven_api::{CreateExternalUserRequest, SupermavenAdminApi};
@@ -132,7 +131,6 @@ struct Session {
connection_pool: Arc<parking_lot::Mutex<ConnectionPool>>,
app_state: Arc<AppState>,
supermaven_client: Option<Arc<SupermavenAdminApi>>,
- http_client: Arc<dyn HttpClient>,
/// The GeoIP country code for the user.
#[allow(unused)]
geoip_country_code: Option<String>,
@@ -425,17 +423,7 @@ impl Server {
.add_request_handler(forward_mutating_project_request::<proto::GitChangeBranch>)
.add_request_handler(forward_mutating_project_request::<proto::CheckForPushedCommits>)
.add_message_handler(broadcast_project_message_from_host::<proto::AdvertiseContexts>)
- .add_message_handler(update_context)
- .add_request_handler({
- let app_state = app_state.clone();
- move |request, response, session| {
- let app_state = app_state.clone();
- async move {
- count_language_model_tokens(request, response, session, &app_state.config)
- .await
- }
- });
+ .add_message_handler(update_context);
Arc::new(server)
@@ -764,7 +752,6 @@ impl Server {
peer: this.peer.clone(),
connection_pool: this.connection_pool.clone(),
app_state: this.app_state.clone(),
- http_client,
geoip_country_code,
system_id,
_executor: executor.clone(),
@@ -3683,100 +3670,6 @@ async fn acknowledge_buffer_version(
Ok(())
-async fn count_language_model_tokens(
- request: proto::CountLanguageModelTokens,
- response: Response<proto::CountLanguageModelTokens>,
- session: Session,
- config: &Config,
-) -> Result<()> {
- authorize_access_to_legacy_llm_endpoints(&session).await?;
- proto::Plan::ZedPro => Box::new(ZedProCountLanguageModelTokensRateLimit),
- proto::Plan::Free | proto::Plan::ZedProTrial => {
- Box::new(FreeCountLanguageModelTokensRateLimit)
- session
- .app_state
- .rate_limiter
- .check(&*rate_limit, session.user_id())
- .await?;
- let result = match proto::LanguageModelProvider::from_i32(request.provider) {
- Some(proto::LanguageModelProvider::Google) => {
- let api_key = config
- .google_ai_api_key
- .as_ref()
- .context("no Google AI API key configured on the server")?;
- google_ai::count_tokens(
- session.http_client.as_ref(),
- google_ai::API_URL,
- serde_json::from_str(&request.request)?,
- )
- .await?
- _ => return Err(anyhow!("unsupported provider"))?,
- response.send(proto::CountLanguageModelTokensResponse {
- token_count: result.total_tokens as u32,
- })?;
- Ok(())
-struct ZedProCountLanguageModelTokensRateLimit;
-impl RateLimit for ZedProCountLanguageModelTokensRateLimit {
- std::env::var("COUNT_LANGUAGE_MODEL_TOKENS_RATE_LIMIT_PER_HOUR")
- .unwrap_or(600) // Picked arbitrarily
- "zed-pro:count-language-model-tokens"
-struct FreeCountLanguageModelTokensRateLimit;
-impl RateLimit for FreeCountLanguageModelTokensRateLimit {
- std::env::var("COUNT_LANGUAGE_MODEL_TOKENS_RATE_LIMIT_PER_HOUR_FREE")
- .unwrap_or(600 / 10) // Picked arbitrarily
- "free:count-language-model-tokens"
-/// This is leftover from before the LLM service.
-///
-/// The endpoints protected by this check will be moved there eventually.
-async fn authorize_access_to_legacy_llm_endpoints(session: &Session) -> Result<(), Error> {
- if session.is_staff() {
- Ok(())
- } else {
- Err(anyhow!("permission denied"))?
/// Get a Supermaven API key for the user
async fn get_supermaven_api_key(
_request: proto::GetSupermavenApiKey,
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index bf6fc5a4e3c22b..b8bc86d406d669 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -686,24 +686,7 @@ impl LanguageModel for CloudLanguageModel {
match self.model.clone() {
CloudModel::Anthropic(_) => count_anthropic_tokens(request, cx),
CloudModel::OpenAi(model) => count_open_ai_tokens(request, model, cx),
- CloudModel::Google(model) => {
- let client = self.client.clone();
- let request = into_google(request, model.id().into());
- let request = google_ai::CountTokensRequest {
- contents: request.contents,
- };
- async move {
- let request = serde_json::to_string(&request)?;
- let response = client
- .request(proto::CountLanguageModelTokens {
- provider: proto::LanguageModelProvider::Google as i32,
- request,
- Ok(response.token_count as usize)
- .boxed()
- }
+ CloudModel::Google(_model) => async move { Ok(0) }.boxed(),
}
diff --git a/crates/proto/proto/ai.proto b/crates/proto/proto/ai.proto
index c39345c3c2e875..67c222438731be 100644
--- a/crates/proto/proto/ai.proto
+++ b/crates/proto/proto/ai.proto
@@ -172,19 +172,3 @@ enum LanguageModelRole {
LanguageModelSystem = 2;
reserved 3;
-message CountLanguageModelTokens {
- LanguageModelProvider provider = 1;
- string request = 2;
-message CountLanguageModelTokensResponse {
- uint32 token_count = 1;
-enum LanguageModelProvider {
- Anthropic = 0;
- OpenAI = 1;
- Google = 2;
- Zed = 3;
diff --git a/crates/proto/proto/zed.proto b/crates/proto/proto/zed.proto
index ef9f46ac491c79..74db3ce5399177 100644
--- a/crates/proto/proto/zed.proto
+++ b/crates/proto/proto/zed.proto
@@ -206,9 +206,6 @@ message Envelope {
GetImplementation get_implementation = 162;
GetImplementationResponse get_implementation_response = 163;
- CountLanguageModelTokens count_language_model_tokens = 230;
- CountLanguageModelTokensResponse count_language_model_tokens_response = 231;
UpdateChannelMessage update_channel_message = 170;
ChannelMessageUpdate channel_message_update = 171;
@@ -397,6 +394,7 @@ message Envelope {
reserved 205 to 206;
reserved 221;
reserved 224 to 229;
+ reserved 230 to 231;
reserved 246;
reserved 270;
reserved 247 to 254;
diff --git a/crates/proto/src/proto.rs b/crates/proto/src/proto.rs
index 2f34bd2cd83db6..03e0bda101f692 100644
--- a/crates/proto/src/proto.rs
+++ b/crates/proto/src/proto.rs
@@ -50,8 +50,6 @@ messages!(
(CloseBuffer, Foreground),
(Commit, Background),
(CopyProjectEntry, Foreground),
- (CountLanguageModelTokens, Background),
- (CountLanguageModelTokensResponse, Background),
(CreateBufferForPeer, Foreground),
(CreateChannel, Foreground),
(CreateChannelResponse, Foreground),
@@ -374,7 +372,6 @@ request_messages!(
(PerformRename, PerformRenameResponse),
(Ping, Ack),
(PrepareRename, PrepareRenameResponse),
- (CountLanguageModelTokens, CountLanguageModelTokensResponse),
(RefreshInlayHints, Ack),
(RefreshCodeLens, Ack),
(RejoinChannelBuffers, RejoinChannelBuffersResponse), | [
"+ AppState, Error, Result, auth,",
"- let rate_limit: Box<dyn RateLimit> = match session.current_plan(&session.db().await).await? {",
"- api_key,",
"- })",
"- .await?;"
] | [
33,
92,
114,
201,
202
] | {
"additions": 4,
"author": "maxdeviant",
"deletions": 151,
"html_url": "https://github.com/zed-industries/zed/pull/29314",
"issue_id": 29314,
"merged_at": "2025-04-23T23:10:47Z",
"omission_probability": 0.1,
"pr_number": 29314,
"repo": "zed-industries/zed",
"title": "collab: Remove `CountLanguageModelTokens` RPC message",
"total_changes": 155
} |
489 | diff --git a/crates/agent/src/ui/animated_label.rs b/crates/agent/src/ui/animated_label.rs
index c08d11e99318d0..c2b4107730da59 100644
--- a/crates/agent/src/ui/animated_label.rs
+++ b/crates/agent/src/ui/animated_label.rs
@@ -73,6 +73,11 @@ impl LabelCommon for AnimatedLabel {
self.base = self.base.buffer_font(cx);
self
}
+
+ fn inline_code(mut self, cx: &App) -> Self {
+ self.base = self.base.inline_code(cx);
+ self
+ }
}
impl RenderOnce for AnimatedLabel {
diff --git a/crates/ui/src/components/label/highlighted_label.rs b/crates/ui/src/components/label/highlighted_label.rs
index 1a6cd89d15a8b7..72f54e08da88f1 100644
--- a/crates/ui/src/components/label/highlighted_label.rs
+++ b/crates/ui/src/components/label/highlighted_label.rs
@@ -78,6 +78,11 @@ impl LabelCommon for HighlightedLabel {
self.base = self.base.buffer_font(cx);
self
}
+
+ fn inline_code(mut self, cx: &App) -> Self {
+ self.base = self.base.inline_code(cx);
+ self
+ }
}
pub fn highlight_ranges(
diff --git a/crates/ui/src/components/label/label.rs b/crates/ui/src/components/label/label.rs
index b278e6dab8b835..019ece023e559b 100644
--- a/crates/ui/src/components/label/label.rs
+++ b/crates/ui/src/components/label/label.rs
@@ -189,6 +189,12 @@ impl LabelCommon for Label {
self.base = self.base.buffer_font(cx);
self
}
+
+ /// Styles the label to look like inline code.
+ fn inline_code(mut self, cx: &App) -> Self {
+ self.base = self.base.inline_code(cx);
+ self
+ }
}
impl RenderOnce for Label {
@@ -206,7 +212,7 @@ impl Component for Label {
Some("A text label component that supports various styles, sizes, and formatting options.")
}
- fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
+ fn preview(_window: &mut Window, cx: &mut App) -> Option<AnyElement> {
Some(
v_flex()
.gap_6()
@@ -235,6 +241,7 @@ impl Component for Label {
single_example("Italic", Label::new("Code Comment").italic().into_any_element()),
single_example("Strikethrough", Label::new("Deprecated Feature").strikethrough().into_any_element()),
single_example("Underline", Label::new("Clickable Link").underline().into_any_element()),
+ single_example("Inline Code", Label::new("fn main() {}").inline_code(cx).into_any_element()),
],
),
example_group_with_title(
diff --git a/crates/ui/src/components/label/label_like.rs b/crates/ui/src/components/label/label_like.rs
index d0a981ae1c1216..1fa6b14c83d835 100644
--- a/crates/ui/src/components/label/label_like.rs
+++ b/crates/ui/src/components/label/label_like.rs
@@ -64,6 +64,9 @@ pub trait LabelCommon {
/// Sets the font to the buffer's
fn buffer_font(self, cx: &App) -> Self;
+
+ /// Styles the label to look like inline code.
+ fn inline_code(self, cx: &App) -> Self;
}
/// A label-like element that can be used to create a custom label when
@@ -183,6 +186,16 @@ impl LabelCommon for LabelLike {
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone());
self
}
+
+ fn inline_code(mut self, cx: &App) -> Self {
+ self.base = self
+ .base
+ .font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
+ .bg(cx.theme().colors().element_background)
+ .rounded_sm()
+ .px_0p5();
+ self
+ }
}
impl ParentElement for LabelLike {
@@ -248,7 +261,7 @@ impl Component for LabelLike {
)
}
- fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
+ fn preview(_window: &mut Window, cx: &mut App) -> Option<AnyElement> {
Some(
v_flex()
.gap_6()
@@ -269,6 +282,7 @@ impl Component for LabelLike {
single_example("Italic", LabelLike::new().italic().child("Italic text").into_any_element()),
single_example("Underline", LabelLike::new().underline().child("Underlined text").into_any_element()),
single_example("Strikethrough", LabelLike::new().strikethrough().child("Strikethrough text").into_any_element()),
+ single_example("Inline Code", LabelLike::new().inline_code(cx).child("const value = 42;").into_any_element()),
],
),
example_group_with_title(
| diff --git a/crates/agent/src/ui/animated_label.rs b/crates/agent/src/ui/animated_label.rs
index c08d11e99318d0..c2b4107730da59 100644
--- a/crates/agent/src/ui/animated_label.rs
+++ b/crates/agent/src/ui/animated_label.rs
@@ -73,6 +73,11 @@ impl LabelCommon for AnimatedLabel {
impl RenderOnce for AnimatedLabel {
diff --git a/crates/ui/src/components/label/highlighted_label.rs b/crates/ui/src/components/label/highlighted_label.rs
index 1a6cd89d15a8b7..72f54e08da88f1 100644
--- a/crates/ui/src/components/label/highlighted_label.rs
+++ b/crates/ui/src/components/label/highlighted_label.rs
@@ -78,6 +78,11 @@ impl LabelCommon for HighlightedLabel {
pub fn highlight_ranges(
diff --git a/crates/ui/src/components/label/label.rs b/crates/ui/src/components/label/label.rs
index b278e6dab8b835..019ece023e559b 100644
--- a/crates/ui/src/components/label/label.rs
+++ b/crates/ui/src/components/label/label.rs
@@ -189,6 +189,12 @@ impl LabelCommon for Label {
impl RenderOnce for Label {
@@ -206,7 +212,7 @@ impl Component for Label {
Some("A text label component that supports various styles, sizes, and formatting options.")
@@ -235,6 +241,7 @@ impl Component for Label {
single_example("Italic", Label::new("Code Comment").italic().into_any_element()),
single_example("Strikethrough", Label::new("Deprecated Feature").strikethrough().into_any_element()),
single_example("Underline", Label::new("Clickable Link").underline().into_any_element()),
+ single_example("Inline Code", Label::new("fn main() {}").inline_code(cx).into_any_element()),
diff --git a/crates/ui/src/components/label/label_like.rs b/crates/ui/src/components/label/label_like.rs
index d0a981ae1c1216..1fa6b14c83d835 100644
--- a/crates/ui/src/components/label/label_like.rs
+++ b/crates/ui/src/components/label/label_like.rs
@@ -64,6 +64,9 @@ pub trait LabelCommon {
/// Sets the font to the buffer's
fn buffer_font(self, cx: &App) -> Self;
+ fn inline_code(self, cx: &App) -> Self;
/// A label-like element that can be used to create a custom label when
@@ -183,6 +186,16 @@ impl LabelCommon for LabelLike {
.font(theme::ThemeSettings::get_global(cx).buffer_font.clone());
+ self.base = self
+ .base
+ .font(theme::ThemeSettings::get_global(cx).buffer_font.clone())
+ .bg(cx.theme().colors().element_background)
+ .rounded_sm()
+ .px_0p5();
impl ParentElement for LabelLike {
@@ -248,7 +261,7 @@ impl Component for LabelLike {
)
@@ -269,6 +282,7 @@ impl Component for LabelLike {
single_example("Italic", LabelLike::new().italic().child("Italic text").into_any_element()),
single_example("Underline", LabelLike::new().underline().child("Underlined text").into_any_element()),
single_example("Strikethrough", LabelLike::new().strikethrough().child("Strikethrough text").into_any_element()),
+ single_example("Inline Code", LabelLike::new().inline_code(cx).child("const value = 42;").into_any_element()), | [] | [] | {
"additions": 33,
"author": "danilo-leal",
"deletions": 2,
"html_url": "https://github.com/zed-industries/zed/pull/29306",
"issue_id": 29306,
"merged_at": "2025-04-23T22:27:56Z",
"omission_probability": 0.1,
"pr_number": 29306,
"repo": "zed-industries/zed",
"title": "ui: Add `inline_code` method to label",
"total_changes": 35
} |
490 | diff --git a/crates/agent/src/assistant_panel.rs b/crates/agent/src/assistant_panel.rs
index a3f6fb56e7046b..c388fcc8eaa224 100644
--- a/crates/agent/src/assistant_panel.rs
+++ b/crates/agent/src/assistant_panel.rs
@@ -12,7 +12,7 @@ use assistant_settings::{AssistantDockPosition, AssistantSettings};
use assistant_slash_command::SlashCommandWorkingSet;
use assistant_tool::ToolWorkingSet;
-use client::zed_urls;
+use client::{UserStore, zed_urls};
use editor::{Anchor, AnchorRangeExt as _, Editor, EditorEvent, MultiBuffer};
use fs::Fs;
use gpui::{
@@ -180,6 +180,7 @@ impl ActiveView {
pub struct AssistantPanel {
workspace: WeakEntity<Workspace>,
+ user_store: Entity<UserStore>,
project: Entity<Project>,
fs: Arc<dyn Fs>,
language_registry: Arc<LanguageRegistry>,
@@ -243,6 +244,7 @@ impl AssistantPanel {
) -> Self {
let thread = thread_store.update(cx, |this, cx| this.create_thread(cx));
let fs = workspace.app_state().fs.clone();
+ let user_store = workspace.app_state().user_store.clone();
let project = workspace.project();
let language_registry = project.read(cx).languages().clone();
let workspace = workspace.weak_handle();
@@ -307,6 +309,7 @@ impl AssistantPanel {
Self {
active_view,
workspace,
+ user_store,
project: project.clone(),
fs: fs.clone(),
language_registry,
@@ -1543,9 +1546,19 @@ impl AssistantPanel {
}
fn render_usage_banner(&self, cx: &mut Context<Self>) -> Option<AnyElement> {
+ let plan = self
+ .user_store
+ .read(cx)
+ .current_plan()
+ .map(|plan| match plan {
+ Plan::Free => zed_llm_client::Plan::Free,
+ Plan::ZedPro => zed_llm_client::Plan::ZedPro,
+ Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial,
+ })
+ .unwrap_or(zed_llm_client::Plan::Free);
let usage = self.thread.read(cx).last_usage()?;
- Some(UsageBanner::new(zed_llm_client::Plan::ZedProTrial, usage).into_any_element())
+ Some(UsageBanner::new(plan, usage).into_any_element())
}
fn render_last_error(&self, cx: &mut Context<Self>) -> Option<AnyElement> {
| diff --git a/crates/agent/src/assistant_panel.rs b/crates/agent/src/assistant_panel.rs
index a3f6fb56e7046b..c388fcc8eaa224 100644
--- a/crates/agent/src/assistant_panel.rs
+++ b/crates/agent/src/assistant_panel.rs
@@ -12,7 +12,7 @@ use assistant_settings::{AssistantDockPosition, AssistantSettings};
use assistant_slash_command::SlashCommandWorkingSet;
use assistant_tool::ToolWorkingSet;
-use client::zed_urls;
+use client::{UserStore, zed_urls};
use editor::{Anchor, AnchorRangeExt as _, Editor, EditorEvent, MultiBuffer};
use fs::Fs;
use gpui::{
@@ -180,6 +180,7 @@ impl ActiveView {
pub struct AssistantPanel {
workspace: WeakEntity<Workspace>,
+ user_store: Entity<UserStore>,
project: Entity<Project>,
fs: Arc<dyn Fs>,
language_registry: Arc<LanguageRegistry>,
@@ -243,6 +244,7 @@ impl AssistantPanel {
) -> Self {
let thread = thread_store.update(cx, |this, cx| this.create_thread(cx));
let fs = workspace.app_state().fs.clone();
+ let user_store = workspace.app_state().user_store.clone();
let project = workspace.project();
let language_registry = project.read(cx).languages().clone();
let workspace = workspace.weak_handle();
@@ -307,6 +309,7 @@ impl AssistantPanel {
Self {
active_view,
workspace,
+ user_store,
project: project.clone(),
fs: fs.clone(),
language_registry,
@@ -1543,9 +1546,19 @@ impl AssistantPanel {
fn render_usage_banner(&self, cx: &mut Context<Self>) -> Option<AnyElement> {
+ .user_store
+ .read(cx)
+ .current_plan()
+ .map(|plan| match plan {
+ Plan::Free => zed_llm_client::Plan::Free,
+ Plan::ZedPro => zed_llm_client::Plan::ZedPro,
+ })
let usage = self.thread.read(cx).last_usage()?;
- Some(UsageBanner::new(zed_llm_client::Plan::ZedProTrial, usage).into_any_element())
+ Some(UsageBanner::new(plan, usage).into_any_element())
fn render_last_error(&self, cx: &mut Context<Self>) -> Option<AnyElement> { | [
"+ let plan = self",
"+ Plan::ZedProTrial => zed_llm_client::Plan::ZedProTrial,",
"+ .unwrap_or(zed_llm_client::Plan::Free);"
] | [
41,
48,
50
] | {
"additions": 15,
"author": "maxdeviant",
"deletions": 2,
"html_url": "https://github.com/zed-industries/zed/pull/29305",
"issue_id": 29305,
"merged_at": "2025-04-23T22:27:11Z",
"omission_probability": 0.1,
"pr_number": 29305,
"repo": "zed-industries/zed",
"title": "agent: Read the user's plan from the `UserStore`",
"total_changes": 17
} |
491 | diff --git a/crates/agent/src/assistant_panel.rs b/crates/agent/src/assistant_panel.rs
index f63bb4824eea25..a434c30ac10521 100644
--- a/crates/agent/src/assistant_panel.rs
+++ b/crates/agent/src/assistant_panel.rs
@@ -16,9 +16,9 @@ use client::zed_urls;
use editor::{Anchor, AnchorRangeExt as _, Editor, EditorEvent, MultiBuffer};
use fs::Fs;
use gpui::{
- Action, Animation, AnimationExt as _, AnyElement, App, AsyncWindowContext, Corner, Entity,
- EventEmitter, FocusHandle, Focusable, FontWeight, KeyContext, Pixels, Subscription, Task,
- UpdateGlobal, WeakEntity, prelude::*, pulsating_between,
+ Action, Animation, AnimationExt as _, AnyElement, App, AsyncWindowContext, ClipboardItem,
+ Corner, Entity, EventEmitter, FocusHandle, Focusable, FontWeight, KeyContext, Pixels,
+ Subscription, Task, UpdateGlobal, WeakEntity, prelude::*, pulsating_between,
};
use language::LanguageRegistry;
use language_model::{LanguageModelProviderTosView, LanguageModelRegistry};
@@ -1605,6 +1605,8 @@ impl AssistantPanel {
h_flex()
.justify_end()
.mt_1()
+ .gap_1()
+ .child(self.create_copy_button(ERROR_MESSAGE))
.child(Button::new("subscribe", "Subscribe").on_click(cx.listener(
|this, _, _, cx| {
this.thread.update(cx, |this, _cx| {
@@ -1651,6 +1653,8 @@ impl AssistantPanel {
h_flex()
.justify_end()
.mt_1()
+ .gap_1()
+ .child(self.create_copy_button(ERROR_MESSAGE))
.child(
Button::new("subscribe", "Update Monthly Spend Limit").on_click(
cx.listener(|this, _, _, cx| {
@@ -1716,6 +1720,8 @@ impl AssistantPanel {
h_flex()
.justify_end()
.mt_1()
+ .gap_1()
+ .child(self.create_copy_button(error_message))
.child(
Button::new("subscribe", call_to_action).on_click(cx.listener(
|this, _, _, cx| {
@@ -1747,6 +1753,7 @@ impl AssistantPanel {
message: SharedString,
cx: &mut Context<Self>,
) -> AnyElement {
+ let message_with_header = format!("{}\n{}", header, message);
v_flex()
.gap_0p5()
.child(
@@ -1761,12 +1768,14 @@ impl AssistantPanel {
.id("error-message")
.max_h_32()
.overflow_y_scroll()
- .child(Label::new(message)),
+ .child(Label::new(message.clone())),
)
.child(
h_flex()
.justify_end()
.mt_1()
+ .gap_1()
+ .child(self.create_copy_button(message_with_header))
.child(Button::new("dismiss", "Dismiss").on_click(cx.listener(
|this, _, _, cx| {
this.thread.update(cx, |this, _cx| {
@@ -1780,6 +1789,15 @@ impl AssistantPanel {
.into_any()
}
+ fn create_copy_button(&self, message: impl Into<String>) -> impl IntoElement {
+ let message = message.into();
+ IconButton::new("copy", IconName::Copy)
+ .on_click(move |_, _, cx| {
+ cx.write_to_clipboard(ClipboardItem::new_string(message.clone()))
+ })
+ .tooltip(Tooltip::text("Copy Error Message"))
+ }
+
fn key_context(&self) -> KeyContext {
let mut key_context = KeyContext::new_with_defaults();
key_context.add("AgentPanel");
| diff --git a/crates/agent/src/assistant_panel.rs b/crates/agent/src/assistant_panel.rs
index f63bb4824eea25..a434c30ac10521 100644
--- a/crates/agent/src/assistant_panel.rs
+++ b/crates/agent/src/assistant_panel.rs
@@ -16,9 +16,9 @@ use client::zed_urls;
use editor::{Anchor, AnchorRangeExt as _, Editor, EditorEvent, MultiBuffer};
use fs::Fs;
use gpui::{
- Action, Animation, AnimationExt as _, AnyElement, App, AsyncWindowContext, Corner, Entity,
- EventEmitter, FocusHandle, Focusable, FontWeight, KeyContext, Pixels, Subscription, Task,
- UpdateGlobal, WeakEntity, prelude::*, pulsating_between,
+ Action, Animation, AnimationExt as _, AnyElement, App, AsyncWindowContext, ClipboardItem,
+ Corner, Entity, EventEmitter, FocusHandle, Focusable, FontWeight, KeyContext, Pixels,
+ Subscription, Task, UpdateGlobal, WeakEntity, prelude::*, pulsating_between,
};
use language::LanguageRegistry;
use language_model::{LanguageModelProviderTosView, LanguageModelRegistry};
@@ -1605,6 +1605,8 @@ impl AssistantPanel {
.child(Button::new("subscribe", "Subscribe").on_click(cx.listener(
@@ -1651,6 +1653,8 @@ impl AssistantPanel {
Button::new("subscribe", "Update Monthly Spend Limit").on_click(
cx.listener(|this, _, _, cx| {
@@ -1716,6 +1720,8 @@ impl AssistantPanel {
+ .child(self.create_copy_button(error_message))
Button::new("subscribe", call_to_action).on_click(cx.listener(
|this, _, _, cx| {
@@ -1747,6 +1753,7 @@ impl AssistantPanel {
message: SharedString,
cx: &mut Context<Self>,
) -> AnyElement {
+ let message_with_header = format!("{}\n{}", header, message);
v_flex()
.gap_0p5()
@@ -1761,12 +1768,14 @@ impl AssistantPanel {
.id("error-message")
.max_h_32()
.overflow_y_scroll()
- .child(Label::new(message)),
+ .child(Label::new(message.clone())),
)
+ .child(self.create_copy_button(message_with_header))
.child(Button::new("dismiss", "Dismiss").on_click(cx.listener(
@@ -1780,6 +1789,15 @@ impl AssistantPanel {
.into_any()
}
+ let message = message.into();
+ IconButton::new("copy", IconName::Copy)
+ .on_click(move |_, _, cx| {
+ cx.write_to_clipboard(ClipboardItem::new_string(message.clone()))
+ })
+ .tooltip(Tooltip::text("Copy Error Message"))
+ }
+
fn key_context(&self) -> KeyContext {
let mut key_context = KeyContext::new_with_defaults();
key_context.add("AgentPanel"); | [
"+ fn create_copy_button(&self, message: impl Into<String>) -> impl IntoElement {"
] | [
72
] | {
"additions": 22,
"author": "osyvokon",
"deletions": 4,
"html_url": "https://github.com/zed-industries/zed/pull/29299",
"issue_id": 29299,
"merged_at": "2025-04-23T22:12:27Z",
"omission_probability": 0.1,
"pr_number": 29299,
"repo": "zed-industries/zed",
"title": "agent: Add \"copy to clipboard\" button to error message popups",
"total_changes": 26
} |
492 | diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index abaae331f57b6a..af0aa5c9759105 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -11798,6 +11798,7 @@ impl Editor {
fn select_next_match_ranges(
this: &mut Editor,
range: Range<usize>,
+ reversed: bool,
replace_newest: bool,
auto_scroll: Option<Autoscroll>,
window: &mut Window,
@@ -11808,7 +11809,11 @@ impl Editor {
if replace_newest {
s.delete(s.newest_anchor().id);
}
- s.insert_range(range.clone());
+ if reversed {
+ s.insert_range(range.end..range.start);
+ } else {
+ s.insert_range(range);
+ }
});
}
@@ -11859,6 +11864,7 @@ impl Editor {
select_next_match_ranges(
self,
next_selected_range,
+ last_selection.reversed,
replace_newest,
autoscroll,
window,
@@ -11917,6 +11923,7 @@ impl Editor {
select_next_match_ranges(
self,
selection.start..selection.end,
+ selection.reversed,
replace_newest,
autoscroll,
window,
@@ -12084,7 +12091,11 @@ impl Editor {
if action.replace_newest {
s.delete(s.newest_anchor().id);
}
- s.insert_range(next_selected_range);
+ if last_selection.reversed {
+ s.insert_range(next_selected_range.end..next_selected_range.start);
+ } else {
+ s.insert_range(next_selected_range);
+ }
});
} else {
select_prev_state.done = true;
diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs
index 98ab7605373fad..cf2f899cda08fe 100644
--- a/crates/editor/src/editor_tests.rs
+++ b/crates/editor/src/editor_tests.rs
@@ -5825,6 +5825,13 @@ async fn test_select_next(cx: &mut TestAppContext) {
cx.update_editor(|e, window, cx| e.select_next(&SelectNext::default(), window, cx))
.unwrap();
cx.assert_editor_state("«abcˇ»\n«abcˇ» «abcˇ»\ndefabc\n«abcˇ»");
+
+ // Test selection direction should be preserved
+ cx.set_state("abc\n«ˇabc» abc\ndefabc\nabc");
+
+ cx.update_editor(|e, window, cx| e.select_next(&SelectNext::default(), window, cx))
+ .unwrap();
+ cx.assert_editor_state("abc\n«ˇabc» «ˇabc»\ndefabc\nabc");
}
#[gpui::test]
@@ -6011,6 +6018,25 @@ let «fooˇ» = 2;
let foo = 2;
let foo = «2ˇ»;"#,
);
+
+ // Test last selection direction should be preserved
+ cx.set_state(
+ r#"let foo = 2;
+let foo = 2;
+let «fooˇ» = 2;
+let «ˇfoo» = 2;
+let foo = 2;"#,
+ );
+
+ cx.update_editor(|e, window, cx| e.select_next(&SelectNext::default(), window, cx))
+ .unwrap();
+ cx.assert_editor_state(
+ r#"let foo = 2;
+let foo = 2;
+let «fooˇ» = 2;
+let «ˇfoo» = 2;
+let «ˇfoo» = 2;"#,
+ );
}
#[gpui::test]
@@ -6138,25 +6164,26 @@ async fn test_select_previous_with_single_selection(cx: &mut TestAppContext) {
cx.update_editor(|e, window, cx| e.select_previous(&SelectPrevious::default(), window, cx))
.unwrap();
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndefabc\nabc");
+ // selection direction is preserved
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndefabc\nabc");
cx.update_editor(|e, window, cx| e.select_previous(&SelectPrevious::default(), window, cx))
.unwrap();
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndefabc\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndefabc\n«ˇabc»");
cx.update_editor(|editor, window, cx| editor.undo_selection(&UndoSelection, window, cx));
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndefabc\nabc");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndefabc\nabc");
cx.update_editor(|editor, window, cx| editor.redo_selection(&RedoSelection, window, cx));
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndefabc\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndefabc\n«ˇabc»");
cx.update_editor(|e, window, cx| e.select_previous(&SelectPrevious::default(), window, cx))
.unwrap();
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndef«abcˇ»\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndef«ˇabc»\n«ˇabc»");
cx.update_editor(|e, window, cx| e.select_previous(&SelectPrevious::default(), window, cx))
.unwrap();
- cx.assert_editor_state("«abcˇ»\n«ˇabc» «abcˇ»\ndef«abcˇ»\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» «ˇabc»\ndef«ˇabc»\n«ˇabc»");
}
#[gpui::test]
| diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index abaae331f57b6a..af0aa5c9759105 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -11798,6 +11798,7 @@ impl Editor {
fn select_next_match_ranges(
this: &mut Editor,
range: Range<usize>,
+ reversed: bool,
replace_newest: bool,
auto_scroll: Option<Autoscroll>,
window: &mut Window,
@@ -11808,7 +11809,11 @@ impl Editor {
if replace_newest {
s.delete(s.newest_anchor().id);
}
- s.insert_range(range.clone());
+ if reversed {
+ s.insert_range(range.end..range.start);
+ } else {
+ s.insert_range(range);
+ }
});
}
@@ -11859,6 +11864,7 @@ impl Editor {
next_selected_range,
@@ -11917,6 +11923,7 @@ impl Editor {
selection.start..selection.end,
+ selection.reversed,
@@ -12084,7 +12091,11 @@ impl Editor {
if action.replace_newest {
s.delete(s.newest_anchor().id);
}
- s.insert_range(next_selected_range);
+ if last_selection.reversed {
+ s.insert_range(next_selected_range.end..next_selected_range.start);
+ } else {
+ s.insert_range(next_selected_range);
+ }
});
} else {
select_prev_state.done = true;
diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs
index 98ab7605373fad..cf2f899cda08fe 100644
--- a/crates/editor/src/editor_tests.rs
+++ b/crates/editor/src/editor_tests.rs
@@ -5825,6 +5825,13 @@ async fn test_select_next(cx: &mut TestAppContext) {
cx.update_editor(|e, window, cx| e.select_next(&SelectNext::default(), window, cx))
cx.assert_editor_state("«abcˇ»\n«abcˇ» «abcˇ»\ndefabc\n«abcˇ»");
+ // Test selection direction should be preserved
+ cx.set_state("abc\n«ˇabc» abc\ndefabc\nabc");
+ cx.assert_editor_state("abc\n«ˇabc» «ˇabc»\ndefabc\nabc");
@@ -6011,6 +6018,25 @@ let «fooˇ» = 2;
let foo = 2;
let foo = «2ˇ»;"#,
);
+ // Test last selection direction should be preserved
+ cx.set_state(
+let foo = 2;"#,
+ cx.assert_editor_state(
+let «ˇfoo» = 2;"#,
@@ -6138,25 +6164,26 @@ async fn test_select_previous_with_single_selection(cx: &mut TestAppContext) {
+ // selection direction is preserved
cx.update_editor(|editor, window, cx| editor.undo_selection(&UndoSelection, window, cx));
cx.update_editor(|editor, window, cx| editor.redo_selection(&RedoSelection, window, cx));
- cx.assert_editor_state("«abcˇ»\n«ˇabc» abc\ndef«abcˇ»\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» abc\ndef«ˇabc»\n«ˇabc»");
- cx.assert_editor_state("«abcˇ»\n«ˇabc» «abcˇ»\ndef«abcˇ»\n«abcˇ»");
+ cx.assert_editor_state("«ˇabc»\n«ˇabc» «ˇabc»\ndef«ˇabc»\n«ˇabc»"); | [
"+ last_selection.reversed,"
] | [
29
] | {
"additions": 46,
"author": "smitbarmase",
"deletions": 8,
"html_url": "https://github.com/zed-industries/zed/pull/29293",
"issue_id": 29293,
"merged_at": "2025-04-23T18:47:17Z",
"omission_probability": 0.1,
"pr_number": 29293,
"repo": "zed-industries/zed",
"title": "editor: Make `SelectNext` and `SelectPrevious` preserve cursor direction",
"total_changes": 54
} |
493 | diff --git a/Cargo.lock b/Cargo.lock
index 56a7696850156d..0c415bdb8c8e5a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18400,9 +18400,9 @@ dependencies = [
[[package]]
name = "zed_llm_client"
-version = "0.6.1"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad17428120f5ca776dc5195e2411a282f5150a26d5536671f8943c622c31274f"
+checksum = "3c1666cd923c5eb4635f3743e69c6920d0ed71f29b26920616a5d220607df7c4"
dependencies = [
"anyhow",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index 891d6a16c934ae..4dcd268965d6b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -605,7 +605,7 @@ wasmtime-wasi = "29"
which = "6.0.0"
wit-component = "0.221"
workspace-hack = "0.1.0"
-zed_llm_client = "0.6.1"
+zed_llm_client = "0.7.0"
zstd = "0.11"
metal = "0.29"
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index b9911d5d46a175..bf6fc5a4e3c22b 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -35,7 +35,7 @@ use strum::IntoEnumIterator;
use thiserror::Error;
use ui::{TintColor, prelude::*};
use zed_llm_client::{
- CURRENT_PLAN_HEADER_NAME, CompletionBody, EXPIRED_LLM_TOKEN_HEADER_NAME,
+ CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, EXPIRED_LLM_TOKEN_HEADER_NAME,
MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME, MODEL_REQUESTS_RESOURCE_HEADER_VALUE,
SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
};
@@ -748,6 +748,7 @@ impl LanguageModel for CloudLanguageModel {
CompletionBody {
thread_id,
prompt_id,
+ mode: Some(CompletionMode::Max),
provider: zed_llm_client::LanguageModelProvider::Anthropic,
model: request.model.clone(),
provider_request: serde_json::to_value(&request)?,
@@ -794,6 +795,7 @@ impl LanguageModel for CloudLanguageModel {
CompletionBody {
thread_id,
prompt_id,
+ mode: Some(CompletionMode::Max),
provider: zed_llm_client::LanguageModelProvider::OpenAi,
model: request.model.clone(),
provider_request: serde_json::to_value(&request)?,
@@ -824,6 +826,7 @@ impl LanguageModel for CloudLanguageModel {
CompletionBody {
thread_id,
prompt_id,
+ mode: Some(CompletionMode::Max),
provider: zed_llm_client::LanguageModelProvider::Google,
model: request.model.clone(),
provider_request: serde_json::to_value(&request)?,
| diff --git a/Cargo.lock b/Cargo.lock
index 56a7696850156d..0c415bdb8c8e5a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18400,9 +18400,9 @@ dependencies = [
[[package]]
name = "zed_llm_client"
-version = "0.6.1"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c1666cd923c5eb4635f3743e69c6920d0ed71f29b26920616a5d220607df7c4"
dependencies = [
"anyhow",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index 891d6a16c934ae..4dcd268965d6b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -605,7 +605,7 @@ wasmtime-wasi = "29"
which = "6.0.0"
wit-component = "0.221"
workspace-hack = "0.1.0"
-zed_llm_client = "0.6.1"
+zed_llm_client = "0.7.0"
zstd = "0.11"
metal = "0.29"
diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs
index b9911d5d46a175..bf6fc5a4e3c22b 100644
--- a/crates/language_models/src/provider/cloud.rs
+++ b/crates/language_models/src/provider/cloud.rs
@@ -35,7 +35,7 @@ use strum::IntoEnumIterator;
use thiserror::Error;
use ui::{TintColor, prelude::*};
use zed_llm_client::{
- CURRENT_PLAN_HEADER_NAME, CompletionBody, EXPIRED_LLM_TOKEN_HEADER_NAME,
+ CURRENT_PLAN_HEADER_NAME, CompletionBody, CompletionMode, EXPIRED_LLM_TOKEN_HEADER_NAME,
MAX_LLM_MONTHLY_SPEND_REACHED_HEADER_NAME, MODEL_REQUESTS_RESOURCE_HEADER_VALUE,
SUBSCRIPTION_LIMIT_RESOURCE_HEADER_NAME,
};
@@ -748,6 +748,7 @@ impl LanguageModel for CloudLanguageModel {
provider: zed_llm_client::LanguageModelProvider::Anthropic,
@@ -794,6 +795,7 @@ impl LanguageModel for CloudLanguageModel {
provider: zed_llm_client::LanguageModelProvider::OpenAi,
@@ -824,6 +826,7 @@ impl LanguageModel for CloudLanguageModel {
provider: zed_llm_client::LanguageModelProvider::Google, | [
"-checksum = \"ad17428120f5ca776dc5195e2411a282f5150a26d5536671f8943c622c31274f\""
] | [
11
] | {
"additions": 7,
"author": "maxdeviant",
"deletions": 4,
"html_url": "https://github.com/zed-industries/zed/pull/29294",
"issue_id": 29294,
"merged_at": "2025-04-23T18:02:03Z",
"omission_probability": 0.1,
"pr_number": 29294,
"repo": "zed-industries/zed",
"title": "language_models: Pass up `mode` for completion requests through Zed",
"total_changes": 11
} |
494 | diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index f0dda422ae22bd..12b5f4290e75fa 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -115,6 +115,7 @@ pub struct TerminalView {
blinking_paused: bool,
blink_epoch: usize,
hover_target_tooltip: Option<String>,
+ hover_tooltip_update: Task<()>,
workspace_id: Option<WorkspaceId>,
show_breadcrumbs: bool,
block_below_cursor: Option<Rc<BlockProperties>>,
@@ -197,6 +198,7 @@ impl TerminalView {
blinking_paused: false,
blink_epoch: 0,
hover_target_tooltip: None,
+ hover_tooltip_update: Task::ready(()),
workspace_id,
show_breadcrumbs: TerminalSettings::get_global(cx).toolbar.breadcrumbs,
block_below_cursor: None,
@@ -844,7 +846,7 @@ fn subscribe_for_terminal_events(
let terminal_events_subscription = cx.subscribe_in(
terminal,
window,
- move |this, _, event, window, cx| match event {
+ move |terminal_view, _, event, window, cx| match event {
Event::Wakeup => {
cx.notify();
cx.emit(Event::Wakeup);
@@ -853,7 +855,7 @@ fn subscribe_for_terminal_events(
}
Event::Bell => {
- this.has_bell = true;
+ terminal_view.has_bell = true;
cx.emit(Event::Wakeup);
}
@@ -862,7 +864,7 @@ fn subscribe_for_terminal_events(
TerminalSettings::get_global(cx).blinking,
TerminalBlink::TerminalControlled
) {
- this.blinking_terminal_enabled = *blinking;
+ terminal_view.blinking_terminal_enabled = *blinking;
}
}
@@ -871,25 +873,46 @@ fn subscribe_for_terminal_events(
}
Event::NewNavigationTarget(maybe_navigation_target) => {
- this.hover_target_tooltip =
- maybe_navigation_target
- .as_ref()
- .and_then(|navigation_target| match navigation_target {
- MaybeNavigationTarget::Url(url) => Some(url.clone()),
- MaybeNavigationTarget::PathLike(path_like_target) => {
- let valid_files_to_open_task = possible_open_target(
- &workspace,
- &path_like_target.terminal_dir,
- &path_like_target.maybe_path,
- cx,
- );
- Some(match smol::block_on(valid_files_to_open_task)? {
- OpenTarget::File(path, _) | OpenTarget::Worktree(path, _) => {
- path.to_string(|path| path.to_string_lossy().to_string())
- }
- })
- }
- });
+ match maybe_navigation_target.as_ref() {
+ None => {
+ terminal_view.hover_target_tooltip = None;
+ terminal_view.hover_tooltip_update = Task::ready(());
+ }
+ Some(MaybeNavigationTarget::Url(url)) => {
+ terminal_view.hover_target_tooltip = Some(url.clone());
+ terminal_view.hover_tooltip_update = Task::ready(());
+ }
+ Some(MaybeNavigationTarget::PathLike(path_like_target)) => {
+ let valid_files_to_open_task = possible_open_target(
+ &workspace,
+ &path_like_target.terminal_dir,
+ &path_like_target.maybe_path,
+ cx,
+ );
+
+ terminal_view.hover_tooltip_update =
+ cx.spawn(async move |terminal_view, cx| {
+ let file_to_open = valid_files_to_open_task.await;
+ terminal_view
+ .update(cx, |terminal_view, _| match file_to_open {
+ Some(
+ OpenTarget::File(path, _)
+ | OpenTarget::Worktree(path, _),
+ ) => {
+ terminal_view.hover_target_tooltip =
+ Some(path.to_string(|path| {
+ path.to_string_lossy().to_string()
+ }));
+ }
+ None => {
+ terminal_view.hover_target_tooltip = None;
+ }
+ })
+ .ok();
+ });
+ }
+ }
+
cx.notify()
}
@@ -897,7 +920,7 @@ fn subscribe_for_terminal_events(
MaybeNavigationTarget::Url(url) => cx.open_url(url),
MaybeNavigationTarget::PathLike(path_like_target) => {
- if this.hover_target_tooltip.is_none() {
+ if terminal_view.hover_target_tooltip.is_none() {
return;
}
let task_workspace = workspace.clone();
@@ -1207,9 +1230,12 @@ fn possible_open_target(
let fs = workspace.read(cx).project().read(cx).fs().clone();
cx.background_spawn(async move {
- for path_to_check in fs_paths_to_check {
- if let Some(metadata) = fs.metadata(&path_to_check.path).await.ok().flatten() {
- return Some(OpenTarget::File(path_to_check, metadata));
+ for mut path_to_check in fs_paths_to_check {
+ if let Some(fs_path_to_check) = fs.canonicalize(&path_to_check.path).await.ok() {
+ if let Some(metadata) = fs.metadata(&fs_path_to_check).await.ok().flatten() {
+ path_to_check.path = fs_path_to_check;
+ return Some(OpenTarget::File(path_to_check, metadata));
+ }
}
}
| diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index f0dda422ae22bd..12b5f4290e75fa 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -115,6 +115,7 @@ pub struct TerminalView {
blinking_paused: bool,
blink_epoch: usize,
hover_target_tooltip: Option<String>,
+ hover_tooltip_update: Task<()>,
workspace_id: Option<WorkspaceId>,
show_breadcrumbs: bool,
block_below_cursor: Option<Rc<BlockProperties>>,
@@ -197,6 +198,7 @@ impl TerminalView {
blinking_paused: false,
blink_epoch: 0,
hover_target_tooltip: None,
+ hover_tooltip_update: Task::ready(()),
workspace_id,
show_breadcrumbs: TerminalSettings::get_global(cx).toolbar.breadcrumbs,
block_below_cursor: None,
@@ -844,7 +846,7 @@ fn subscribe_for_terminal_events(
let terminal_events_subscription = cx.subscribe_in(
terminal,
window,
- move |this, _, event, window, cx| match event {
+ move |terminal_view, _, event, window, cx| match event {
Event::Wakeup => {
cx.notify();
@@ -853,7 +855,7 @@ fn subscribe_for_terminal_events(
Event::Bell => {
- this.has_bell = true;
+ terminal_view.has_bell = true;
@@ -862,7 +864,7 @@ fn subscribe_for_terminal_events(
TerminalSettings::get_global(cx).blinking,
TerminalBlink::TerminalControlled
) {
+ terminal_view.blinking_terminal_enabled = *blinking;
}
@@ -871,25 +873,46 @@ fn subscribe_for_terminal_events(
Event::NewNavigationTarget(maybe_navigation_target) => {
- this.hover_target_tooltip =
- maybe_navigation_target
- .as_ref()
- .and_then(|navigation_target| match navigation_target {
- MaybeNavigationTarget::Url(url) => Some(url.clone()),
- MaybeNavigationTarget::PathLike(path_like_target) => {
- let valid_files_to_open_task = possible_open_target(
- &workspace,
- &path_like_target.terminal_dir,
- &path_like_target.maybe_path,
- cx,
- );
- Some(match smol::block_on(valid_files_to_open_task)? {
- path.to_string(|path| path.to_string_lossy().to_string())
- }
- })
- }
+ match maybe_navigation_target.as_ref() {
+ None => {
+ terminal_view.hover_target_tooltip = None;
+ Some(MaybeNavigationTarget::Url(url)) => {
+ terminal_view.hover_target_tooltip = Some(url.clone());
+ Some(MaybeNavigationTarget::PathLike(path_like_target)) => {
+ let valid_files_to_open_task = possible_open_target(
+ &workspace,
+ &path_like_target.terminal_dir,
+ &path_like_target.maybe_path,
+ cx,
+ );
+ terminal_view.hover_tooltip_update =
+ cx.spawn(async move |terminal_view, cx| {
+ let file_to_open = valid_files_to_open_task.await;
+ terminal_view
+ .update(cx, |terminal_view, _| match file_to_open {
+ Some(
+ OpenTarget::File(path, _)
+ | OpenTarget::Worktree(path, _),
+ ) => {
+ terminal_view.hover_target_tooltip =
+ Some(path.to_string(|path| {
+ path.to_string_lossy().to_string()
+ }));
+ None => {
+ terminal_view.hover_target_tooltip = None;
+ })
+ .ok();
+ });
cx.notify()
@@ -897,7 +920,7 @@ fn subscribe_for_terminal_events(
MaybeNavigationTarget::Url(url) => cx.open_url(url),
MaybeNavigationTarget::PathLike(path_like_target) => {
- if this.hover_target_tooltip.is_none() {
+ if terminal_view.hover_target_tooltip.is_none() {
return;
}
let task_workspace = workspace.clone();
@@ -1207,9 +1230,12 @@ fn possible_open_target(
let fs = workspace.read(cx).project().read(cx).fs().clone();
cx.background_spawn(async move {
- for path_to_check in fs_paths_to_check {
- if let Some(metadata) = fs.metadata(&path_to_check.path).await.ok().flatten() {
- return Some(OpenTarget::File(path_to_check, metadata));
+ for mut path_to_check in fs_paths_to_check {
+ if let Some(fs_path_to_check) = fs.canonicalize(&path_to_check.path).await.ok() {
+ if let Some(metadata) = fs.metadata(&fs_path_to_check).await.ok().flatten() {
+ path_to_check.path = fs_path_to_check;
+ return Some(OpenTarget::File(path_to_check, metadata));
} | [
"- this.blinking_terminal_enabled = *blinking;",
"- OpenTarget::File(path, _) | OpenTarget::Worktree(path, _) => {",
"- });"
] | [
42,
64,
69
] | {
"additions": 52,
"author": "SomeoneToIgnore",
"deletions": 26,
"html_url": "https://github.com/zed-industries/zed/pull/29289",
"issue_id": 29289,
"merged_at": "2025-04-23T16:36:58Z",
"omission_probability": 0.1,
"pr_number": 29289,
"repo": "zed-industries/zed",
"title": "Fix relative paths not properly resolved in the terminal during cmd-click",
"total_changes": 78
} |
495 | diff --git a/crates/debugger_ui/src/session/running.rs b/crates/debugger_ui/src/session/running.rs
index 438ded2e366089..85c2c85f894a93 100644
--- a/crates/debugger_ui/src/session/running.rs
+++ b/crates/debugger_ui/src/session/running.rs
@@ -411,12 +411,12 @@ impl RunningState {
.log_err();
if let Some(thread_id) = thread_id {
- this.select_thread(*thread_id, cx);
+ this.select_thread(*thread_id, window, cx);
}
}
SessionEvent::Threads => {
let threads = this.session.update(cx, |this, cx| this.threads(cx));
- this.select_current_thread(&threads, cx);
+ this.select_current_thread(&threads, window, cx);
}
SessionEvent::CapabilitiesLoaded => {
let capabilities = this.capabilities(cx);
@@ -731,6 +731,7 @@ impl RunningState {
pub fn select_current_thread(
&mut self,
threads: &Vec<(Thread, ThreadStatus)>,
+ window: &mut Window,
cx: &mut Context<Self>,
) {
let selected_thread = self
@@ -743,7 +744,7 @@ impl RunningState {
};
if Some(ThreadId(selected_thread.id)) != self.thread_id {
- self.select_thread(ThreadId(selected_thread.id), cx);
+ self.select_thread(ThreadId(selected_thread.id), window, cx);
}
}
@@ -756,7 +757,7 @@ impl RunningState {
.map(|id| self.session().read(cx).thread_status(id))
}
- fn select_thread(&mut self, thread_id: ThreadId, cx: &mut Context<Self>) {
+ fn select_thread(&mut self, thread_id: ThreadId, window: &mut Window, cx: &mut Context<Self>) {
if self.thread_id.is_some_and(|id| id == thread_id) {
return;
}
@@ -764,8 +765,7 @@ impl RunningState {
self.thread_id = Some(thread_id);
self.stack_frame_list
- .update(cx, |list, cx| list.refresh(cx));
- cx.notify();
+ .update(cx, |list, cx| list.schedule_refresh(true, window, cx));
}
pub fn continue_thread(&mut self, cx: &mut Context<Self>) {
@@ -917,9 +917,9 @@ impl RunningState {
for (thread, _) in threads {
let state = state.clone();
let thread_id = thread.id;
- this = this.entry(thread.name, None, move |_, cx| {
+ this = this.entry(thread.name, None, move |window, cx| {
state.update(cx, |state, cx| {
- state.select_thread(ThreadId(thread_id), cx);
+ state.select_thread(ThreadId(thread_id), window, cx);
});
});
}
diff --git a/crates/debugger_ui/src/session/running/stack_frame_list.rs b/crates/debugger_ui/src/session/running/stack_frame_list.rs
index bbb6e1f68459b5..c9e7a9b11c848c 100644
--- a/crates/debugger_ui/src/session/running/stack_frame_list.rs
+++ b/crates/debugger_ui/src/session/running/stack_frame_list.rs
@@ -1,5 +1,6 @@
use std::path::Path;
use std::sync::Arc;
+use std::time::Duration;
use anyhow::{Result, anyhow};
use dap::StackFrameId;
@@ -28,11 +29,11 @@ pub struct StackFrameList {
_subscription: Subscription,
session: Entity<Session>,
state: WeakEntity<RunningState>,
- invalidate: bool,
entries: Vec<StackFrameEntry>,
workspace: WeakEntity<Workspace>,
selected_stack_frame_id: Option<StackFrameId>,
scrollbar_state: ScrollbarState,
+ _refresh_task: Task<()>,
}
#[allow(clippy::large_enum_variant)]
@@ -68,14 +69,17 @@ impl StackFrameList {
);
let _subscription =
- cx.subscribe_in(&session, window, |this, _, event, _, cx| match event {
- SessionEvent::Stopped(_) | SessionEvent::StackTrace | SessionEvent::Threads => {
- this.refresh(cx);
+ cx.subscribe_in(&session, window, |this, _, event, window, cx| match event {
+ SessionEvent::Threads => {
+ this.schedule_refresh(false, window, cx);
+ }
+ SessionEvent::Stopped(..) | SessionEvent::StackTrace => {
+ this.schedule_refresh(true, window, cx);
}
_ => {}
});
- Self {
+ let mut this = Self {
scrollbar_state: ScrollbarState::new(list.clone()),
list,
session,
@@ -83,10 +87,12 @@ impl StackFrameList {
focus_handle,
state,
_subscription,
- invalidate: true,
entries: Default::default(),
selected_stack_frame_id: None,
- }
+ _refresh_task: Task::ready(()),
+ };
+ this.schedule_refresh(true, window, cx);
+ this
}
#[cfg(test)]
@@ -136,10 +142,32 @@ impl StackFrameList {
self.selected_stack_frame_id
}
- pub(super) fn refresh(&mut self, cx: &mut Context<Self>) {
- self.invalidate = true;
- self.entries.clear();
- cx.notify();
+ pub(super) fn schedule_refresh(
+ &mut self,
+ select_first: bool,
+ window: &mut Window,
+ cx: &mut Context<Self>,
+ ) {
+ const REFRESH_DEBOUNCE: Duration = Duration::from_millis(20);
+
+ self._refresh_task = cx.spawn_in(window, async move |this, cx| {
+ let debounce = this
+ .update(cx, |this, cx| {
+ let new_stack_frames = this.stack_frames(cx);
+ new_stack_frames.is_empty() && !this.entries.is_empty()
+ })
+ .ok()
+ .unwrap_or_default();
+
+ if debounce {
+ cx.background_executor().timer(REFRESH_DEBOUNCE).await;
+ }
+ this.update_in(cx, |this, window, cx| {
+ this.build_entries(select_first, window, cx);
+ cx.notify();
+ })
+ .ok();
+ })
}
pub fn build_entries(
@@ -515,13 +543,7 @@ impl StackFrameList {
}
impl Render for StackFrameList {
- fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
- if self.invalidate {
- self.build_entries(self.entries.is_empty(), window, cx);
- self.invalidate = false;
- cx.notify();
- }
-
+ fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
div()
.size_full()
.p_1()
diff --git a/crates/debugger_ui/src/tests/stack_frame_list.rs b/crates/debugger_ui/src/tests/stack_frame_list.rs
index e6f0a4478f962d..44284e220d7ee5 100644
--- a/crates/debugger_ui/src/tests/stack_frame_list.rs
+++ b/crates/debugger_ui/src/tests/stack_frame_list.rs
@@ -152,7 +152,7 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
cx.run_until_parked();
// select first thread
- active_debug_session_panel(workspace, cx).update_in(cx, |session, _, cx| {
+ active_debug_session_panel(workspace, cx).update_in(cx, |session, window, cx| {
session
.mode()
.as_running()
@@ -162,6 +162,7 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
&running_state
.session()
.update(cx, |session, cx| session.threads(cx)),
+ window,
cx,
);
});
@@ -330,7 +331,7 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
cx.run_until_parked();
// select first thread
- active_debug_session_panel(workspace, cx).update_in(cx, |session, _, cx| {
+ active_debug_session_panel(workspace, cx).update_in(cx, |session, window, cx| {
session
.mode()
.as_running()
@@ -340,6 +341,7 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
&running_state
.session()
.update(cx, |session, cx| session.threads(cx)),
+ window,
cx,
);
});
@@ -704,7 +706,7 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
cx.run_until_parked();
// select first thread
- active_debug_session_panel(workspace, cx).update_in(cx, |session, _, cx| {
+ active_debug_session_panel(workspace, cx).update_in(cx, |session, window, cx| {
session
.mode()
.as_running()
@@ -714,6 +716,7 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
&running_state
.session()
.update(cx, |session, cx| session.threads(cx)),
+ window,
cx,
);
});
diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs
index bfa51335af811c..6a147bbb4e0f69 100644
--- a/crates/project/src/debugger/session.rs
+++ b/crates/project/src/debugger/session.rs
@@ -641,6 +641,7 @@ impl CompletionsQuery {
}
}
+#[derive(Debug)]
pub enum SessionEvent {
Modules,
LoadedSources,
| diff --git a/crates/debugger_ui/src/session/running.rs b/crates/debugger_ui/src/session/running.rs
index 438ded2e366089..85c2c85f894a93 100644
--- a/crates/debugger_ui/src/session/running.rs
+++ b/crates/debugger_ui/src/session/running.rs
@@ -411,12 +411,12 @@ impl RunningState {
.log_err();
if let Some(thread_id) = thread_id {
- this.select_thread(*thread_id, cx);
+ this.select_thread(*thread_id, window, cx);
}
SessionEvent::Threads => {
let threads = this.session.update(cx, |this, cx| this.threads(cx));
+ this.select_current_thread(&threads, window, cx);
SessionEvent::CapabilitiesLoaded => {
let capabilities = this.capabilities(cx);
@@ -731,6 +731,7 @@ impl RunningState {
pub fn select_current_thread(
&mut self,
threads: &Vec<(Thread, ThreadStatus)>,
cx: &mut Context<Self>,
) {
let selected_thread = self
@@ -743,7 +744,7 @@ impl RunningState {
};
if Some(ThreadId(selected_thread.id)) != self.thread_id {
- self.select_thread(ThreadId(selected_thread.id), cx);
+ self.select_thread(ThreadId(selected_thread.id), window, cx);
@@ -756,7 +757,7 @@ impl RunningState {
.map(|id| self.session().read(cx).thread_status(id))
- fn select_thread(&mut self, thread_id: ThreadId, cx: &mut Context<Self>) {
+ fn select_thread(&mut self, thread_id: ThreadId, window: &mut Window, cx: &mut Context<Self>) {
if self.thread_id.is_some_and(|id| id == thread_id) {
return;
@@ -764,8 +765,7 @@ impl RunningState {
self.thread_id = Some(thread_id);
self.stack_frame_list
- .update(cx, |list, cx| list.refresh(cx));
+ .update(cx, |list, cx| list.schedule_refresh(true, window, cx));
pub fn continue_thread(&mut self, cx: &mut Context<Self>) {
@@ -917,9 +917,9 @@ impl RunningState {
for (thread, _) in threads {
let state = state.clone();
let thread_id = thread.id;
- this = this.entry(thread.name, None, move |_, cx| {
+ this = this.entry(thread.name, None, move |window, cx| {
state.update(cx, |state, cx| {
- state.select_thread(ThreadId(thread_id), cx);
+ state.select_thread(ThreadId(thread_id), window, cx);
});
});
diff --git a/crates/debugger_ui/src/session/running/stack_frame_list.rs b/crates/debugger_ui/src/session/running/stack_frame_list.rs
index bbb6e1f68459b5..c9e7a9b11c848c 100644
--- a/crates/debugger_ui/src/session/running/stack_frame_list.rs
+++ b/crates/debugger_ui/src/session/running/stack_frame_list.rs
@@ -1,5 +1,6 @@
use std::path::Path;
use std::sync::Arc;
+use std::time::Duration;
use anyhow::{Result, anyhow};
use dap::StackFrameId;
@@ -28,11 +29,11 @@ pub struct StackFrameList {
_subscription: Subscription,
session: Entity<Session>,
state: WeakEntity<RunningState>,
- invalidate: bool,
entries: Vec<StackFrameEntry>,
workspace: WeakEntity<Workspace>,
selected_stack_frame_id: Option<StackFrameId>,
scrollbar_state: ScrollbarState,
+ _refresh_task: Task<()>,
#[allow(clippy::large_enum_variant)]
@@ -68,14 +69,17 @@ impl StackFrameList {
);
let _subscription =
- cx.subscribe_in(&session, window, |this, _, event, _, cx| match event {
- SessionEvent::Stopped(_) | SessionEvent::StackTrace | SessionEvent::Threads => {
- this.refresh(cx);
+ cx.subscribe_in(&session, window, |this, _, event, window, cx| match event {
+ SessionEvent::Threads => {
+ this.schedule_refresh(false, window, cx);
+ }
+ SessionEvent::Stopped(..) | SessionEvent::StackTrace => {
+ this.schedule_refresh(true, window, cx);
_ => {}
- Self {
+ let mut this = Self {
scrollbar_state: ScrollbarState::new(list.clone()),
list,
session,
@@ -83,10 +87,12 @@ impl StackFrameList {
focus_handle,
state,
_subscription,
entries: Default::default(),
selected_stack_frame_id: None,
+ this.schedule_refresh(true, window, cx);
+ this
#[cfg(test)]
@@ -136,10 +142,32 @@ impl StackFrameList {
self.selected_stack_frame_id
- pub(super) fn refresh(&mut self, cx: &mut Context<Self>) {
- self.invalidate = true;
- self.entries.clear();
+ pub(super) fn schedule_refresh(
+ &mut self,
+ select_first: bool,
+ ) {
+ const REFRESH_DEBOUNCE: Duration = Duration::from_millis(20);
+ self._refresh_task = cx.spawn_in(window, async move |this, cx| {
+ .update(cx, |this, cx| {
+ let new_stack_frames = this.stack_frames(cx);
+ new_stack_frames.is_empty() && !this.entries.is_empty()
+ })
+ .ok()
+ .unwrap_or_default();
+ if debounce {
+ cx.background_executor().timer(REFRESH_DEBOUNCE).await;
+ }
+ this.update_in(cx, |this, window, cx| {
+ this.build_entries(select_first, window, cx);
+ })
+ .ok();
+ })
pub fn build_entries(
@@ -515,13 +543,7 @@ impl StackFrameList {
impl Render for StackFrameList {
- fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
- if self.invalidate {
- self.build_entries(self.entries.is_empty(), window, cx);
- self.invalidate = false;
- cx.notify();
-
+ fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
div()
.size_full()
.p_1()
diff --git a/crates/debugger_ui/src/tests/stack_frame_list.rs b/crates/debugger_ui/src/tests/stack_frame_list.rs
index e6f0a4478f962d..44284e220d7ee5 100644
--- a/crates/debugger_ui/src/tests/stack_frame_list.rs
+++ b/crates/debugger_ui/src/tests/stack_frame_list.rs
@@ -152,7 +152,7 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
@@ -162,6 +162,7 @@ async fn test_fetch_initial_stack_frames_and_go_to_stack_frame(
@@ -330,7 +331,7 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
@@ -340,6 +341,7 @@ async fn test_select_stack_frame(executor: BackgroundExecutor, cx: &mut TestAppC
@@ -704,7 +706,7 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
@@ -714,6 +716,7 @@ async fn test_collapsed_entries(executor: BackgroundExecutor, cx: &mut TestAppCo
diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs
index bfa51335af811c..6a147bbb4e0f69 100644
--- a/crates/project/src/debugger/session.rs
+++ b/crates/project/src/debugger/session.rs
@@ -641,6 +641,7 @@ impl CompletionsQuery {
+#[derive(Debug)]
pub enum SessionEvent {
Modules,
LoadedSources, | [
"- this.select_current_thread(&threads, cx);",
"- invalidate: true,",
"+ _refresh_task: Task::ready(()),",
"+ };",
"+ cx: &mut Context<Self>,",
"+ let debounce = this",
"+ cx.notify();"
] | [
14,
117,
121,
122,
140,
145,
158
] | {
"additions": 55,
"author": "cole-miller",
"deletions": 29,
"html_url": "https://github.com/zed-industries/zed/pull/29282",
"issue_id": 29282,
"merged_at": "2025-04-23T16:12:53Z",
"omission_probability": 0.1,
"pr_number": 29282,
"repo": "zed-industries/zed",
"title": "debugger: Fix stack frame list flickering",
"total_changes": 84
} |
496 | diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 38004378d57887..f0dda422ae22bd 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1020,7 +1020,7 @@ fn possible_open_target(
workspace: &WeakEntity<Workspace>,
cwd: &Option<PathBuf>,
maybe_path: &str,
- cx: &mut Context<TerminalView>,
+ cx: &App,
) -> Task<Option<OpenTarget>> {
let Some(workspace) = workspace.upgrade() else {
return Task::ready(None);
@@ -1061,15 +1061,22 @@ fn possible_open_target(
});
}
}
+
+ let insert_both_paths = original_path != path_with_position;
potential_paths.insert(0, original_path);
- potential_paths.insert(1, path_with_position);
+ if insert_both_paths {
+ potential_paths.insert(1, path_with_position);
+ }
+ // If we won't find paths "easily", we can traverse the entire worktree to look what ends with the potential path suffix.
+ // That will be slow, though, so do the fast checks first.
+ let mut worktree_paths_to_check = Vec::new();
for worktree in &worktree_candidates {
let worktree_root = worktree.read(cx).abs_path();
let mut paths_to_check = Vec::with_capacity(potential_paths.len());
for path_with_position in &potential_paths {
- if worktree_root.ends_with(&path_with_position.path) {
+ let path_to_check = if worktree_root.ends_with(&path_with_position.path) {
let root_path_with_posiition = PathWithPosition {
path: worktree_root.to_path_buf(),
row: path_with_position.row,
@@ -1082,10 +1089,10 @@ fn possible_open_target(
root_entry.clone(),
)));
}
- None => paths_to_check.push(root_path_with_posiition),
+ None => root_path_with_posiition,
}
} else {
- paths_to_check.push(PathWithPosition {
+ PathWithPosition {
path: path_with_position
.path
.strip_prefix(&worktree_root)
@@ -1093,89 +1100,120 @@ fn possible_open_target(
.to_owned(),
row: path_with_position.row,
column: path_with_position.column,
- });
+ }
};
- }
- let mut traversal = worktree
- .read(cx)
- .traverse_from_path(true, true, false, "".as_ref());
- while let Some(entry) = traversal.next() {
- if let Some(path_in_worktree) = paths_to_check
- .iter()
- .find(|path_to_check| entry.path.ends_with(&path_to_check.path))
- {
+ if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {
return Task::ready(Some(OpenTarget::Worktree(
PathWithPosition {
path: worktree_root.join(&entry.path),
- row: path_in_worktree.row,
- column: path_in_worktree.column,
+ row: path_to_check.row,
+ column: path_to_check.column,
},
entry.clone(),
)));
+ } else {
+ paths_to_check.push(path_to_check);
}
}
- }
- if !workspace.read(cx).project().read(cx).is_local() {
- return Task::ready(None);
+ if !paths_to_check.is_empty() {
+ worktree_paths_to_check.push((worktree.clone(), paths_to_check));
+ }
}
- let fs = workspace.read(cx).project().read(cx).fs().clone();
- let paths_to_check = potential_paths
- .into_iter()
- .flat_map(|path_to_check| {
- let mut paths_to_check = Vec::new();
- let maybe_path = &path_to_check.path;
- if maybe_path.starts_with("~") {
- if let Some(home_path) =
- maybe_path
- .strip_prefix("~")
- .ok()
- .and_then(|stripped_maybe_path| {
- Some(dirs::home_dir()?.join(stripped_maybe_path))
- })
- {
- paths_to_check.push(PathWithPosition {
- path: home_path,
- row: path_to_check.row,
- column: path_to_check.column,
- });
- }
- } else {
- paths_to_check.push(PathWithPosition {
- path: maybe_path.clone(),
- row: path_to_check.row,
- column: path_to_check.column,
- });
- if maybe_path.is_relative() {
- if let Some(cwd) = &cwd {
+ // Before entire worktree traversal(s), make an attempt to do FS checks if available.
+ let fs_paths_to_check = if workspace.read(cx).project().read(cx).is_local() {
+ potential_paths
+ .into_iter()
+ .flat_map(|path_to_check| {
+ let mut paths_to_check = Vec::new();
+ let maybe_path = &path_to_check.path;
+ if maybe_path.starts_with("~") {
+ if let Some(home_path) =
+ maybe_path
+ .strip_prefix("~")
+ .ok()
+ .and_then(|stripped_maybe_path| {
+ Some(dirs::home_dir()?.join(stripped_maybe_path))
+ })
+ {
paths_to_check.push(PathWithPosition {
- path: cwd.join(maybe_path),
+ path: home_path,
row: path_to_check.row,
column: path_to_check.column,
});
}
- for worktree in &worktree_candidates {
- paths_to_check.push(PathWithPosition {
- path: worktree.read(cx).abs_path().join(maybe_path),
- row: path_to_check.row,
- column: path_to_check.column,
- });
+ } else {
+ paths_to_check.push(PathWithPosition {
+ path: maybe_path.clone(),
+ row: path_to_check.row,
+ column: path_to_check.column,
+ });
+ if maybe_path.is_relative() {
+ if let Some(cwd) = &cwd {
+ paths_to_check.push(PathWithPosition {
+ path: cwd.join(maybe_path),
+ row: path_to_check.row,
+ column: path_to_check.column,
+ });
+ }
+ for worktree in &worktree_candidates {
+ paths_to_check.push(PathWithPosition {
+ path: worktree.read(cx).abs_path().join(maybe_path),
+ row: path_to_check.row,
+ column: path_to_check.column,
+ });
+ }
}
}
+ paths_to_check
+ })
+ .collect()
+ } else {
+ Vec::new()
+ };
+
+ let worktree_check_task = cx.spawn(async move |cx| {
+ for (worktree, worktree_paths_to_check) in worktree_paths_to_check {
+ let found_entry = worktree
+ .update(cx, |worktree, _| {
+ let worktree_root = worktree.abs_path();
+ let mut traversal = worktree.traverse_from_path(true, true, false, "".as_ref());
+ while let Some(entry) = traversal.next() {
+ if let Some(path_in_worktree) = worktree_paths_to_check
+ .iter()
+ .find(|path_to_check| entry.path.ends_with(&path_to_check.path))
+ {
+ return Some(OpenTarget::Worktree(
+ PathWithPosition {
+ path: worktree_root.join(&entry.path),
+ row: path_in_worktree.row,
+ column: path_in_worktree.column,
+ },
+ entry.clone(),
+ ));
+ }
+ }
+ None
+ })
+ .ok()?;
+ if let Some(found_entry) = found_entry {
+ return Some(found_entry);
}
- paths_to_check
- })
- .collect::<Vec<_>>();
+ }
+ None
+ });
+ let fs = workspace.read(cx).project().read(cx).fs().clone();
cx.background_spawn(async move {
- for path_to_check in paths_to_check {
+ for path_to_check in fs_paths_to_check {
if let Some(metadata) = fs.metadata(&path_to_check.path).await.ok().flatten() {
return Some(OpenTarget::File(path_to_check, metadata));
}
}
- None
+
+ worktree_check_task.await
})
}
| diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 38004378d57887..f0dda422ae22bd 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1020,7 +1020,7 @@ fn possible_open_target(
workspace: &WeakEntity<Workspace>,
cwd: &Option<PathBuf>,
maybe_path: &str,
+ cx: &App,
) -> Task<Option<OpenTarget>> {
let Some(workspace) = workspace.upgrade() else {
return Task::ready(None);
@@ -1061,15 +1061,22 @@ fn possible_open_target(
});
+ let insert_both_paths = original_path != path_with_position;
potential_paths.insert(0, original_path);
- potential_paths.insert(1, path_with_position);
+ if insert_both_paths {
+ }
for worktree in &worktree_candidates {
let worktree_root = worktree.read(cx).abs_path();
let mut paths_to_check = Vec::with_capacity(potential_paths.len());
for path_with_position in &potential_paths {
- if worktree_root.ends_with(&path_with_position.path) {
+ let path_to_check = if worktree_root.ends_with(&path_with_position.path) {
let root_path_with_posiition = PathWithPosition {
path: worktree_root.to_path_buf(),
@@ -1082,10 +1089,10 @@ fn possible_open_target(
root_entry.clone(),
)));
- None => paths_to_check.push(root_path_with_posiition),
} else {
+ PathWithPosition {
path: path_with_position
.path
.strip_prefix(&worktree_root)
@@ -1093,89 +1100,120 @@ fn possible_open_target(
.to_owned(),
column: path_with_position.column,
+ }
};
- }
- let mut traversal = worktree
- .read(cx)
- .traverse_from_path(true, true, false, "".as_ref());
- while let Some(entry) = traversal.next() {
- if let Some(path_in_worktree) = paths_to_check
- .iter()
- .find(|path_to_check| entry.path.ends_with(&path_to_check.path))
- {
return Task::ready(Some(OpenTarget::Worktree(
PathWithPosition {
path: worktree_root.join(&entry.path),
- row: path_in_worktree.row,
- column: path_in_worktree.column,
},
entry.clone(),
)));
+ } else {
+ paths_to_check.push(path_to_check);
- }
- if !workspace.read(cx).project().read(cx).is_local() {
- return Task::ready(None);
+ if !paths_to_check.is_empty() {
+ worktree_paths_to_check.push((worktree.clone(), paths_to_check));
- let fs = workspace.read(cx).project().read(cx).fs().clone();
- .into_iter()
- .flat_map(|path_to_check| {
- let mut paths_to_check = Vec::new();
- let maybe_path = &path_to_check.path;
- if maybe_path.starts_with("~") {
- if let Some(home_path) =
- maybe_path
- .strip_prefix("~")
- .ok()
- .and_then(|stripped_maybe_path| {
- Some(dirs::home_dir()?.join(stripped_maybe_path))
- })
- {
- paths_to_check.push(PathWithPosition {
- path: home_path,
- row: path_to_check.row,
- column: path_to_check.column,
- });
- } else {
- path: maybe_path.clone(),
- row: path_to_check.row,
- column: path_to_check.column,
- if maybe_path.is_relative() {
- if let Some(cwd) = &cwd {
+ // Before entire worktree traversal(s), make an attempt to do FS checks if available.
+ let fs_paths_to_check = if workspace.read(cx).project().read(cx).is_local() {
+ potential_paths
+ .into_iter()
+ .flat_map(|path_to_check| {
+ let mut paths_to_check = Vec::new();
+ let maybe_path = &path_to_check.path;
+ if maybe_path.starts_with("~") {
+ if let Some(home_path) =
+ maybe_path
+ .strip_prefix("~")
+ .ok()
+ .and_then(|stripped_maybe_path| {
+ Some(dirs::home_dir()?.join(stripped_maybe_path))
+ })
+ {
paths_to_check.push(PathWithPosition {
- path: cwd.join(maybe_path),
+ path: home_path,
row: path_to_check.row,
column: path_to_check.column,
});
- for worktree in &worktree_candidates {
- paths_to_check.push(PathWithPosition {
- path: worktree.read(cx).abs_path().join(maybe_path),
- row: path_to_check.row,
- column: path_to_check.column,
- });
+ } else {
+ path: maybe_path.clone(),
+ });
+ if maybe_path.is_relative() {
+ if let Some(cwd) = &cwd {
+ path: cwd.join(maybe_path),
+ for worktree in &worktree_candidates {
+ path: worktree.read(cx).abs_path().join(maybe_path),
+ paths_to_check
+ })
+ .collect()
+ } else {
+ Vec::new()
+ };
+ let found_entry = worktree
+ .update(cx, |worktree, _| {
+ let worktree_root = worktree.abs_path();
+ let mut traversal = worktree.traverse_from_path(true, true, false, "".as_ref());
+ while let Some(entry) = traversal.next() {
+ if let Some(path_in_worktree) = worktree_paths_to_check
+ .iter()
+ .find(|path_to_check| entry.path.ends_with(&path_to_check.path))
+ {
+ return Some(OpenTarget::Worktree(
+ PathWithPosition {
+ path: worktree_root.join(&entry.path),
+ row: path_in_worktree.row,
+ column: path_in_worktree.column,
+ },
+ ));
+ }
+ None
+ })
+ .ok()?;
+ if let Some(found_entry) = found_entry {
+ return Some(found_entry);
- })
- .collect::<Vec<_>>();
+ None
+ });
+ let fs = workspace.read(cx).project().read(cx).fs().clone();
cx.background_spawn(async move {
- for path_to_check in paths_to_check {
+ for path_to_check in fs_paths_to_check {
if let Some(metadata) = fs.metadata(&path_to_check.path).await.ok().flatten() {
return Some(OpenTarget::File(path_to_check, metadata));
- None
+ worktree_check_task.await
})
} | [
"- cx: &mut Context<TerminalView>,",
"+ potential_paths.insert(1, path_with_position);",
"+ // If we won't find paths \"easily\", we can traverse the entire worktree to look what ends with the potential path suffix.",
"+ // That will be slow, though, so do the fast checks first.",
"+ let mut worktree_paths_to_check = Vec::new();",
"+ None => root_path_with_posiition,",
"+ if let Some(entry) = worktree.read(cx).entry_for_path(&path_to_check.path) {",
"- let paths_to_check = potential_paths",
"- }",
"+ paths_to_check.push(PathWithPosition {",
"+ let worktree_check_task = cx.spawn(async move |cx| {",
"+ for (worktree, worktree_paths_to_check) in worktree_paths_to_check {",
"+ entry.clone(),",
"- paths_to_check"
] | [
8,
22,
25,
26,
27,
43,
68,
93,
112,
151,
180,
181,
197,
207
] | {
"additions": 99,
"author": "SomeoneToIgnore",
"deletions": 61,
"html_url": "https://github.com/zed-industries/zed/pull/29274",
"issue_id": 29274,
"merged_at": "2025-04-23T13:13:28Z",
"omission_probability": 0.1,
"pr_number": 29274,
"repo": "zed-industries/zed",
"title": "Lookup relative paths in a worktree more robustly",
"total_changes": 160
} |
497 | diff --git a/packages/community-cli-plugin/README.md b/packages/community-cli-plugin/README.md
index 12fcffb9c026ff..dc4c687208c341 100644
--- a/packages/community-cli-plugin/README.md
+++ b/packages/community-cli-plugin/README.md
@@ -15,7 +15,7 @@ Start the React Native development server.
#### Usage
```sh
-npx react-native start [options]
+npx @react-native-community/cli start [options]
```
#### Options
@@ -37,6 +37,7 @@ npx react-native start [options]
| `--cert <path>` | Specify path to a custom SSL cert. |
| `--config <string>` | Path to the CLI configuration file. |
| `--no-interactive` | Disable interactive mode. |
+| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
### `bundle`
@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
#### Usage
```sh
-npx react-native bundle --entry-file <path> [options]
+npx @react-native-community/cli bundle --entry-file <path> [options]
```
#### Options
diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js
index cd438b2115fe67..7b5ba161dd3c8f 100644
--- a/packages/community-cli-plugin/src/commands/start/index.js
+++ b/packages/community-cli-plugin/src/commands/start/index.js
@@ -95,6 +95,14 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
+ {
+ name: '--client-logs',
+ description:
+ '[Deprecated] Enable plain text JavaScript log streaming for all ' +
+ 'connected apps. This feature is deprecated and will be removed in ' +
+ 'future.',
+ default: false,
+ },
],
};
diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js
index ce4f7bcd9dead4..186237dfa3d444 100644
--- a/packages/community-cli-plugin/src/commands/start/runServer.js
+++ b/packages/community-cli-plugin/src/commands/start/runServer.js
@@ -44,6 +44,7 @@ export type StartCommandArgs = {
config?: string,
projectRoot?: string,
interactive: boolean,
+ clientLogs: boolean,
};
async function runServer(
@@ -96,6 +97,11 @@ async function runServer(
require.resolve(plugin),
);
}
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (!args.clientLogs) {
+ // $FlowIgnore[cannot-write] Assigning to readonly property
+ metroConfig.server.forwardClientLogs = false;
+ }
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js
index ac66be3fbcacd9..b22522666be171 100644
--- a/packages/dev-middleware/src/createDevMiddleware.js
+++ b/packages/dev-middleware/src/createDevMiddleware.js
@@ -11,7 +11,7 @@
import type {CreateCustomMessageHandlerFn} from './inspector-proxy/CustomMessageHandler';
import type {BrowserLauncher} from './types/BrowserLauncher';
-import type {EventReporter} from './types/EventReporter';
+import type {EventReporter, ReportableEvent} from './types/EventReporter';
import type {Experiments, ExperimentsConfig} from './types/Experiments';
import type {Logger} from './types/Logger';
import type {NextHandleFunction} from 'connect';
@@ -81,11 +81,15 @@ export default function createDevMiddleware({
unstable_customInspectorMessageHandler,
}: Options): DevMiddlewareAPI {
const experiments = getExperiments(experimentConfig);
+ const eventReporter = createWrappedEventReporter(
+ unstable_eventReporter,
+ logger,
+ );
const inspectorProxy = new InspectorProxy(
projectRoot,
serverBaseUrl,
- unstable_eventReporter,
+ eventReporter,
experiments,
unstable_customInspectorMessageHandler,
);
@@ -97,7 +101,7 @@ export default function createDevMiddleware({
serverBaseUrl,
inspectorProxy,
browserLauncher: unstable_browserLauncher,
- eventReporter: unstable_eventReporter,
+ eventReporter,
experiments,
logger,
}),
@@ -129,3 +133,32 @@ function getExperiments(config: ExperimentsConfig): Experiments {
enableNetworkInspector: config.enableNetworkInspector ?? false,
};
}
+
+/**
+ * Creates a wrapped EventReporter that locally intercepts events to
+ * log to the terminal.
+ */
+function createWrappedEventReporter(
+ reporter: ?EventReporter,
+ logger: ?Logger,
+): EventReporter {
+ return {
+ logEvent(event: ReportableEvent) {
+ switch (event.type) {
+ case 'fusebox_console_notice':
+ logger?.info(
+ '\n' +
+ '\u001B[7m' +
+ ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
+ 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
+ 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
+ '\u001B[27m' +
+ '\n',
+ );
+ break;
+ }
+
+ reporter?.logEvent(event);
+ },
+ };
+}
diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js
index 88978fea43923e..b4159110cadbbe 100644
--- a/packages/dev-middleware/src/inspector-proxy/Device.js
+++ b/packages/dev-middleware/src/inspector-proxy/Device.js
@@ -41,6 +41,8 @@ const PAGES_POLLING_INTERVAL = 1000;
// more details.
const FILE_PREFIX = 'file://';
+let fuseboxConsoleNoticeLogged = false;
+
type DebuggerConnection = {
// Debugger web socket connection
socket: WS,
@@ -513,6 +515,7 @@ export default class Device {
// created instead of manually checking this on every getPages result.
for (const page of this.#pages.values()) {
if (this.#pageHasCapability(page, 'nativePageReloads')) {
+ this.#logFuseboxConsoleNotice();
continue;
}
@@ -1067,4 +1070,14 @@ export default class Device {
dangerouslyGetSocket(): WS {
return this.#deviceSocket;
}
+
+ // TODO(T214991636): Remove notice
+ #logFuseboxConsoleNotice() {
+ if (fuseboxConsoleNoticeLogged) {
+ return;
+ }
+
+ this.#deviceEventReporter?.logFuseboxConsoleNotice();
+ fuseboxConsoleNoticeLogged = true;
+ }
}
diff --git a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
index b210abf12efaaa..e6b77d4d44a164 100644
--- a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
+++ b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
@@ -212,6 +212,12 @@ class DeviceEventReporter {
});
}
+ logFuseboxConsoleNotice(): void {
+ this.#eventReporter.logEvent({
+ type: 'fusebox_console_notice',
+ });
+ }
+
#logExpiredCommand(pendingCommand: PendingCommand): void {
this.#eventReporter.logEvent({
type: 'debugger_command',
diff --git a/packages/dev-middleware/src/types/EventReporter.js b/packages/dev-middleware/src/types/EventReporter.js
index 8c4bc2b52aed49..59cb9e6aedf880 100644
--- a/packages/dev-middleware/src/types/EventReporter.js
+++ b/packages/dev-middleware/src/types/EventReporter.js
@@ -77,6 +77,9 @@ export type ReportableEvent =
| 'PROTOCOL_ERROR',
>,
}
+ | {
+ type: 'fusebox_console_notice',
+ }
| {
type: 'proxy_error',
status: 'error',
diff --git a/packages/react-native/Libraries/Core/setUpDeveloperTools.js b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
index 5cc39eae9c1274..57f4f5916c262c 100644
--- a/packages/react-native/Libraries/Core/setUpDeveloperTools.js
+++ b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
@@ -42,9 +42,8 @@ if (__DEV__) {
if (!Platform.isTesting) {
const HMRClient = require('../Utilities/HMRClient');
- if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
- HMRClient.unstable_notifyFuseboxConsoleEnabled();
- } else if (console._isPolyfilled) {
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (console._isPolyfilled) {
// We assume full control over the console and send JavaScript logs to Metro.
[
'trace',
diff --git a/packages/react-native/Libraries/Utilities/HMRClient.js b/packages/react-native/Libraries/Utilities/HMRClient.js
index c7832f7bb469e0..9e715ddc19b3a9 100644
--- a/packages/react-native/Libraries/Utilities/HMRClient.js
+++ b/packages/react-native/Libraries/Utilities/HMRClient.js
@@ -26,7 +26,6 @@ let hmrUnavailableReason: string | null = null;
let currentCompileErrorMessage: string | null = null;
let didConnect: boolean = false;
let pendingLogs: Array<[LogLevel, $ReadOnlyArray<mixed>]> = [];
-let pendingFuseboxConsoleNotification = false;
type LogLevel =
| 'trace'
@@ -52,7 +51,6 @@ export type HMRClientNativeInterface = {|
isEnabled: boolean,
scheme?: string,
): void,
- unstable_notifyFuseboxConsoleEnabled(): void,
|};
/**
@@ -142,29 +140,6 @@ const HMRClient: HMRClientNativeInterface = {
}
},
- unstable_notifyFuseboxConsoleEnabled() {
- if (!hmrClient) {
- pendingFuseboxConsoleNotification = true;
- return;
- }
- hmrClient.send(
- JSON.stringify({
- type: 'log',
- level: 'info',
- data: [
- '\n' +
- '\u001B[7m' +
- ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
- 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
- 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
- '\u001B[27m' +
- '\n',
- ],
- }),
- );
- pendingFuseboxConsoleNotification = false;
- },
-
// Called once by the bridge on startup, even if Fast Refresh is off.
// It creates the HMR client but doesn't actually set up the socket yet.
setup(
@@ -341,9 +316,6 @@ function flushEarlyLogs(client: MetroHMRClient) {
pendingLogs.forEach(([level, data]) => {
HMRClient.log(level, data);
});
- if (pendingFuseboxConsoleNotification) {
- HMRClient.unstable_notifyFuseboxConsoleEnabled();
- }
} finally {
pendingLogs.length = 0;
}
diff --git a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
index c4492b845454c1..4d36db2bc525e8 100644
--- a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
+++ b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
@@ -25,7 +25,6 @@ const HMRClientProdShim: HMRClientNativeInterface = {
disable() {},
registerBundle() {},
log() {},
- unstable_notifyFuseboxConsoleEnabled() {},
};
module.exports = HMRClientProdShim;
diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
index 3eb7e7f8b8f352..f134c74246f60d 100644
--- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
+++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
@@ -8942,7 +8942,6 @@ export type HMRClientNativeInterface = {|
isEnabled: boolean,
scheme?: string
): void,
- unstable_notifyFuseboxConsoleEnabled(): void,
|};
declare const HMRClient: HMRClientNativeInterface;
declare module.exports: HMRClient;
| diff --git a/packages/community-cli-plugin/README.md b/packages/community-cli-plugin/README.md
index 12fcffb9c026ff..dc4c687208c341 100644
--- a/packages/community-cli-plugin/README.md
+++ b/packages/community-cli-plugin/README.md
@@ -15,7 +15,7 @@ Start the React Native development server.
+npx @react-native-community/cli start [options]
@@ -37,6 +37,7 @@ npx react-native start [options]
| `--cert <path>` | Specify path to a custom SSL cert. |
| `--config <string>` | Path to the CLI configuration file. |
| `--no-interactive` | Disable interactive mode. |
+| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
### `bundle`
@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
-npx react-native bundle --entry-file <path> [options]
+npx @react-native-community/cli bundle --entry-file <path> [options]
diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js
index cd438b2115fe67..7b5ba161dd3c8f 100644
--- a/packages/community-cli-plugin/src/commands/start/index.js
+++ b/packages/community-cli-plugin/src/commands/start/index.js
@@ -95,6 +95,14 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
+ {
+ name: '--client-logs',
+ description:
+ '[Deprecated] Enable plain text JavaScript log streaming for all ' +
+ 'connected apps. This feature is deprecated and will be removed in ' +
+ 'future.',
+ default: false,
],
diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js
index ce4f7bcd9dead4..186237dfa3d444 100644
--- a/packages/community-cli-plugin/src/commands/start/runServer.js
+++ b/packages/community-cli-plugin/src/commands/start/runServer.js
@@ -44,6 +44,7 @@ export type StartCommandArgs = {
config?: string,
projectRoot?: string,
interactive: boolean,
+ clientLogs: boolean,
async function runServer(
@@ -96,6 +97,11 @@ async function runServer(
require.resolve(plugin),
);
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ // $FlowIgnore[cannot-write] Assigning to readonly property
+ metroConfig.server.forwardClientLogs = false;
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js
index ac66be3fbcacd9..b22522666be171 100644
--- a/packages/dev-middleware/src/createDevMiddleware.js
+++ b/packages/dev-middleware/src/createDevMiddleware.js
@@ -11,7 +11,7 @@
import type {CreateCustomMessageHandlerFn} from './inspector-proxy/CustomMessageHandler';
import type {BrowserLauncher} from './types/BrowserLauncher';
-import type {EventReporter} from './types/EventReporter';
+import type {EventReporter, ReportableEvent} from './types/EventReporter';
import type {Experiments, ExperimentsConfig} from './types/Experiments';
import type {Logger} from './types/Logger';
import type {NextHandleFunction} from 'connect';
@@ -81,11 +81,15 @@ export default function createDevMiddleware({
unstable_customInspectorMessageHandler,
}: Options): DevMiddlewareAPI {
const experiments = getExperiments(experimentConfig);
+ const eventReporter = createWrappedEventReporter(
+ unstable_eventReporter,
+ logger,
+ );
const inspectorProxy = new InspectorProxy(
projectRoot,
serverBaseUrl,
+ eventReporter,
experiments,
unstable_customInspectorMessageHandler,
);
@@ -97,7 +101,7 @@ export default function createDevMiddleware({
serverBaseUrl,
inspectorProxy,
browserLauncher: unstable_browserLauncher,
- eventReporter: unstable_eventReporter,
+ eventReporter,
experiments,
logger,
}),
@@ -129,3 +133,32 @@ function getExperiments(config: ExperimentsConfig): Experiments {
enableNetworkInspector: config.enableNetworkInspector ?? false,
};
+/**
+ * Creates a wrapped EventReporter that locally intercepts events to
+ * log to the terminal.
+ */
+ logger: ?Logger,
+): EventReporter {
+ return {
+ logEvent(event: ReportableEvent) {
+ case 'fusebox_console_notice':
+ '\u001B[7m' +
+ ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
+ 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
+ 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
+ '\u001B[27m' +
+ '\n',
+ );
+ break;
+ }
+ reporter?.logEvent(event);
+ };
+}
diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js
index 88978fea43923e..b4159110cadbbe 100644
--- a/packages/dev-middleware/src/inspector-proxy/Device.js
+++ b/packages/dev-middleware/src/inspector-proxy/Device.js
@@ -41,6 +41,8 @@ const PAGES_POLLING_INTERVAL = 1000;
// more details.
const FILE_PREFIX = 'file://';
type DebuggerConnection = {
// Debugger web socket connection
socket: WS,
@@ -513,6 +515,7 @@ export default class Device {
// created instead of manually checking this on every getPages result.
for (const page of this.#pages.values()) {
if (this.#pageHasCapability(page, 'nativePageReloads')) {
+ this.#logFuseboxConsoleNotice();
continue;
}
@@ -1067,4 +1070,14 @@ export default class Device {
dangerouslyGetSocket(): WS {
return this.#deviceSocket;
+ // TODO(T214991636): Remove notice
+ #logFuseboxConsoleNotice() {
+ if (fuseboxConsoleNoticeLogged) {
+ return;
+ this.#deviceEventReporter?.logFuseboxConsoleNotice();
+ fuseboxConsoleNoticeLogged = true;
diff --git a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
index b210abf12efaaa..e6b77d4d44a164 100644
--- a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
+++ b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
@@ -212,6 +212,12 @@ class DeviceEventReporter {
+ logFuseboxConsoleNotice(): void {
+ this.#eventReporter.logEvent({
+ });
#logExpiredCommand(pendingCommand: PendingCommand): void {
this.#eventReporter.logEvent({
type: 'debugger_command',
diff --git a/packages/dev-middleware/src/types/EventReporter.js b/packages/dev-middleware/src/types/EventReporter.js
index 8c4bc2b52aed49..59cb9e6aedf880 100644
--- a/packages/dev-middleware/src/types/EventReporter.js
+++ b/packages/dev-middleware/src/types/EventReporter.js
@@ -77,6 +77,9 @@ export type ReportableEvent =
| 'PROTOCOL_ERROR',
>,
+ | {
| {
type: 'proxy_error',
status: 'error',
diff --git a/packages/react-native/Libraries/Core/setUpDeveloperTools.js b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
index 5cc39eae9c1274..57f4f5916c262c 100644
--- a/packages/react-native/Libraries/Core/setUpDeveloperTools.js
+++ b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
@@ -42,9 +42,8 @@ if (__DEV__) {
if (!Platform.isTesting) {
const HMRClient = require('../Utilities/HMRClient');
- if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (console._isPolyfilled) {
// We assume full control over the console and send JavaScript logs to Metro.
[
'trace',
diff --git a/packages/react-native/Libraries/Utilities/HMRClient.js b/packages/react-native/Libraries/Utilities/HMRClient.js
index c7832f7bb469e0..9e715ddc19b3a9 100644
--- a/packages/react-native/Libraries/Utilities/HMRClient.js
+++ b/packages/react-native/Libraries/Utilities/HMRClient.js
@@ -26,7 +26,6 @@ let hmrUnavailableReason: string | null = null;
let currentCompileErrorMessage: string | null = null;
let didConnect: boolean = false;
let pendingLogs: Array<[LogLevel, $ReadOnlyArray<mixed>]> = [];
-let pendingFuseboxConsoleNotification = false;
type LogLevel =
| 'trace'
@@ -52,7 +51,6 @@ export type HMRClientNativeInterface = {|
scheme?: string,
/**
@@ -142,29 +140,6 @@ const HMRClient: HMRClientNativeInterface = {
},
- if (!hmrClient) {
- pendingFuseboxConsoleNotification = true;
- return;
- hmrClient.send(
- JSON.stringify({
- data: [
- '\n' +
- '\u001B[7m' +
- ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
- 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
- '\u001B[27m' +
- '\n',
- ],
- }),
- );
- pendingFuseboxConsoleNotification = false;
- },
-
// Called once by the bridge on startup, even if Fast Refresh is off.
// It creates the HMR client but doesn't actually set up the socket yet.
setup(
@@ -341,9 +316,6 @@ function flushEarlyLogs(client: MetroHMRClient) {
pendingLogs.forEach(([level, data]) => {
HMRClient.log(level, data);
- if (pendingFuseboxConsoleNotification) {
} finally {
pendingLogs.length = 0;
diff --git a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
index c4492b845454c1..4d36db2bc525e8 100644
--- a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
+++ b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
@@ -25,7 +25,6 @@ const HMRClientProdShim: HMRClientNativeInterface = {
disable() {},
registerBundle() {},
log() {},
- unstable_notifyFuseboxConsoleEnabled() {},
module.exports = HMRClientProdShim;
diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
index 3eb7e7f8b8f352..f134c74246f60d 100644
--- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
+++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
@@ -8942,7 +8942,6 @@ export type HMRClientNativeInterface = {|
scheme?: string
declare const HMRClient: HMRClientNativeInterface;
declare module.exports: HMRClient; | [
"-npx react-native start [options]",
"+ if (!args.clientLogs) {",
"- unstable_eventReporter,",
"+function createWrappedEventReporter(",
"+ reporter: ?EventReporter,",
"+ switch (event.type) {",
"+ logger?.info(",
"+ '\\n' +",
"+let fuseboxConsoleNoticeLogged = false;",
"- } else if (console._isPolyfilled) {",
"- unstable_notifyFuseboxConsoleEnabled() {",
"- type: 'log',",
"- level: 'info',",
"- 'viewed in React Native DevTools. Tip: Type \\u001B[1mj\\u001B[22m in ' +"
] | [
8,
66,
98,
121,
122,
127,
129,
130,
153,
222,
252,
259,
260,
265
] | {
"additions": 77,
"author": "huntie",
"deletions": 38,
"html_url": "https://github.com/facebook/react-native/pull/49356",
"issue_id": 49356,
"merged_at": "2025-02-12T15:17:13Z",
"omission_probability": 0.1,
"pr_number": 49356,
"repo": "facebook/react-native",
"title": "[0.77] Restore Metro log streaming via CLI flag",
"total_changes": 115
} |
498 | diff --git a/packages/community-cli-plugin/README.md b/packages/community-cli-plugin/README.md
index 12fcffb9c026ff..dc4c687208c341 100644
--- a/packages/community-cli-plugin/README.md
+++ b/packages/community-cli-plugin/README.md
@@ -15,7 +15,7 @@ Start the React Native development server.
#### Usage
```sh
-npx react-native start [options]
+npx @react-native-community/cli start [options]
```
#### Options
@@ -37,6 +37,7 @@ npx react-native start [options]
| `--cert <path>` | Specify path to a custom SSL cert. |
| `--config <string>` | Path to the CLI configuration file. |
| `--no-interactive` | Disable interactive mode. |
+| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
### `bundle`
@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
#### Usage
```sh
-npx react-native bundle --entry-file <path> [options]
+npx @react-native-community/cli bundle --entry-file <path> [options]
```
#### Options
diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js
index cd438b2115fe67..7b5ba161dd3c8f 100644
--- a/packages/community-cli-plugin/src/commands/start/index.js
+++ b/packages/community-cli-plugin/src/commands/start/index.js
@@ -95,6 +95,14 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
+ {
+ name: '--client-logs',
+ description:
+ '[Deprecated] Enable plain text JavaScript log streaming for all ' +
+ 'connected apps. This feature is deprecated and will be removed in ' +
+ 'future.',
+ default: false,
+ },
],
};
diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js
index ce4f7bcd9dead4..186237dfa3d444 100644
--- a/packages/community-cli-plugin/src/commands/start/runServer.js
+++ b/packages/community-cli-plugin/src/commands/start/runServer.js
@@ -44,6 +44,7 @@ export type StartCommandArgs = {
config?: string,
projectRoot?: string,
interactive: boolean,
+ clientLogs: boolean,
};
async function runServer(
@@ -96,6 +97,11 @@ async function runServer(
require.resolve(plugin),
);
}
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (!args.clientLogs) {
+ // $FlowIgnore[cannot-write] Assigning to readonly property
+ metroConfig.server.forwardClientLogs = false;
+ }
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js
index b74d8f30b51430..8ec17f75743e95 100644
--- a/packages/dev-middleware/src/createDevMiddleware.js
+++ b/packages/dev-middleware/src/createDevMiddleware.js
@@ -150,6 +150,17 @@ function createWrappedEventReporter(
`Profiling build target "${event.appId}" registered for debugging`,
);
break;
+ case 'fusebox_console_notice':
+ logger?.info(
+ '\n' +
+ '\u001B[7m' +
+ ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
+ 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
+ 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
+ '\u001B[27m' +
+ '\n',
+ );
+ break;
}
reporter?.logEvent(event);
diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js
index 69bf668c06cfac..b935da37b554f1 100644
--- a/packages/dev-middleware/src/inspector-proxy/Device.js
+++ b/packages/dev-middleware/src/inspector-proxy/Device.js
@@ -41,6 +41,8 @@ const PAGES_POLLING_INTERVAL = 1000;
// more details.
const FILE_PREFIX = 'file://';
+let fuseboxConsoleNoticeLogged = false;
+
type DebuggerConnection = {
// Debugger web socket connection
socket: WS,
@@ -519,6 +521,7 @@ export default class Device {
// created instead of manually checking this on every getPages result.
for (const page of this.#pages.values()) {
if (this.#pageHasCapability(page, 'nativePageReloads')) {
+ this.#logFuseboxConsoleNotice();
continue;
}
@@ -1073,4 +1076,14 @@ export default class Device {
dangerouslyGetSocket(): WS {
return this.#deviceSocket;
}
+
+ // TODO(T214991636): Remove notice
+ #logFuseboxConsoleNotice() {
+ if (fuseboxConsoleNoticeLogged) {
+ return;
+ }
+
+ this.#deviceEventReporter?.logFuseboxConsoleNotice();
+ fuseboxConsoleNoticeLogged = true;
+ }
}
diff --git a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
index 048d0efb56c41f..1d467ce6a1da41 100644
--- a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
+++ b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
@@ -223,6 +223,12 @@ class DeviceEventReporter {
});
}
+ logFuseboxConsoleNotice(): void {
+ this.#eventReporter.logEvent({
+ type: 'fusebox_console_notice',
+ });
+ }
+
#logExpiredCommand(pendingCommand: PendingCommand): void {
this.#eventReporter.logEvent({
type: 'debugger_command',
diff --git a/packages/dev-middleware/src/types/EventReporter.js b/packages/dev-middleware/src/types/EventReporter.js
index 56942f5c569676..1564f3381471c9 100644
--- a/packages/dev-middleware/src/types/EventReporter.js
+++ b/packages/dev-middleware/src/types/EventReporter.js
@@ -82,6 +82,9 @@ export type ReportableEvent =
status: 'success',
...DebuggerSessionIDs,
}
+ | {
+ type: 'fusebox_console_notice',
+ }
| {
type: 'proxy_error',
status: 'error',
diff --git a/packages/react-native/Libraries/Core/setUpDeveloperTools.js b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
index 5cc39eae9c1274..57f4f5916c262c 100644
--- a/packages/react-native/Libraries/Core/setUpDeveloperTools.js
+++ b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
@@ -42,9 +42,8 @@ if (__DEV__) {
if (!Platform.isTesting) {
const HMRClient = require('../Utilities/HMRClient');
- if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
- HMRClient.unstable_notifyFuseboxConsoleEnabled();
- } else if (console._isPolyfilled) {
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (console._isPolyfilled) {
// We assume full control over the console and send JavaScript logs to Metro.
[
'trace',
diff --git a/packages/react-native/Libraries/Utilities/HMRClient.js b/packages/react-native/Libraries/Utilities/HMRClient.js
index c7832f7bb469e0..9e715ddc19b3a9 100644
--- a/packages/react-native/Libraries/Utilities/HMRClient.js
+++ b/packages/react-native/Libraries/Utilities/HMRClient.js
@@ -26,7 +26,6 @@ let hmrUnavailableReason: string | null = null;
let currentCompileErrorMessage: string | null = null;
let didConnect: boolean = false;
let pendingLogs: Array<[LogLevel, $ReadOnlyArray<mixed>]> = [];
-let pendingFuseboxConsoleNotification = false;
type LogLevel =
| 'trace'
@@ -52,7 +51,6 @@ export type HMRClientNativeInterface = {|
isEnabled: boolean,
scheme?: string,
): void,
- unstable_notifyFuseboxConsoleEnabled(): void,
|};
/**
@@ -142,29 +140,6 @@ const HMRClient: HMRClientNativeInterface = {
}
},
- unstable_notifyFuseboxConsoleEnabled() {
- if (!hmrClient) {
- pendingFuseboxConsoleNotification = true;
- return;
- }
- hmrClient.send(
- JSON.stringify({
- type: 'log',
- level: 'info',
- data: [
- '\n' +
- '\u001B[7m' +
- ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
- 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
- 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
- '\u001B[27m' +
- '\n',
- ],
- }),
- );
- pendingFuseboxConsoleNotification = false;
- },
-
// Called once by the bridge on startup, even if Fast Refresh is off.
// It creates the HMR client but doesn't actually set up the socket yet.
setup(
@@ -341,9 +316,6 @@ function flushEarlyLogs(client: MetroHMRClient) {
pendingLogs.forEach(([level, data]) => {
HMRClient.log(level, data);
});
- if (pendingFuseboxConsoleNotification) {
- HMRClient.unstable_notifyFuseboxConsoleEnabled();
- }
} finally {
pendingLogs.length = 0;
}
diff --git a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
index c4492b845454c1..4d36db2bc525e8 100644
--- a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
+++ b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
@@ -25,7 +25,6 @@ const HMRClientProdShim: HMRClientNativeInterface = {
disable() {},
registerBundle() {},
log() {},
- unstable_notifyFuseboxConsoleEnabled() {},
};
module.exports = HMRClientProdShim;
diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
index 96d1f4fd869c05..8ba82c47ca0c15 100644
--- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
+++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
@@ -9001,7 +9001,6 @@ export type HMRClientNativeInterface = {|
isEnabled: boolean,
scheme?: string
): void,
- unstable_notifyFuseboxConsoleEnabled(): void,
|};
declare const HMRClient: HMRClientNativeInterface;
declare module.exports: HMRClient;
| diff --git a/packages/community-cli-plugin/README.md b/packages/community-cli-plugin/README.md
index 12fcffb9c026ff..dc4c687208c341 100644
--- a/packages/community-cli-plugin/README.md
+++ b/packages/community-cli-plugin/README.md
@@ -15,7 +15,7 @@ Start the React Native development server.
-npx react-native start [options]
+npx @react-native-community/cli start [options]
@@ -37,6 +37,7 @@ npx react-native start [options]
| `--cert <path>` | Specify path to a custom SSL cert. |
| `--config <string>` | Path to the CLI configuration file. |
| `--no-interactive` | Disable interactive mode. |
+| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
### `bundle`
@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
-npx react-native bundle --entry-file <path> [options]
+npx @react-native-community/cli bundle --entry-file <path> [options]
diff --git a/packages/community-cli-plugin/src/commands/start/index.js b/packages/community-cli-plugin/src/commands/start/index.js
index cd438b2115fe67..7b5ba161dd3c8f 100644
--- a/packages/community-cli-plugin/src/commands/start/index.js
+++ b/packages/community-cli-plugin/src/commands/start/index.js
@@ -95,6 +95,14 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
+ {
+ name: '--client-logs',
+ description:
+ 'future.',
+ default: false,
],
diff --git a/packages/community-cli-plugin/src/commands/start/runServer.js b/packages/community-cli-plugin/src/commands/start/runServer.js
index ce4f7bcd9dead4..186237dfa3d444 100644
--- a/packages/community-cli-plugin/src/commands/start/runServer.js
+++ b/packages/community-cli-plugin/src/commands/start/runServer.js
@@ -44,6 +44,7 @@ export type StartCommandArgs = {
config?: string,
projectRoot?: string,
interactive: boolean,
+ clientLogs: boolean,
async function runServer(
@@ -96,6 +97,11 @@ async function runServer(
require.resolve(plugin),
);
+ if (!args.clientLogs) {
+ // $FlowIgnore[cannot-write] Assigning to readonly property
+ metroConfig.server.forwardClientLogs = false;
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
diff --git a/packages/dev-middleware/src/createDevMiddleware.js b/packages/dev-middleware/src/createDevMiddleware.js
index b74d8f30b51430..8ec17f75743e95 100644
--- a/packages/dev-middleware/src/createDevMiddleware.js
+++ b/packages/dev-middleware/src/createDevMiddleware.js
@@ -150,6 +150,17 @@ function createWrappedEventReporter(
`Profiling build target "${event.appId}" registered for debugging`,
);
break;
+ case 'fusebox_console_notice':
+ logger?.info(
+ '\n' +
+ '\u001B[7m' +
+ ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
+ 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
+ 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
+ '\u001B[27m' +
+ '\n',
+ );
+ break;
}
reporter?.logEvent(event);
diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js
index 69bf668c06cfac..b935da37b554f1 100644
--- a/packages/dev-middleware/src/inspector-proxy/Device.js
+++ b/packages/dev-middleware/src/inspector-proxy/Device.js
@@ -41,6 +41,8 @@ const PAGES_POLLING_INTERVAL = 1000;
// more details.
const FILE_PREFIX = 'file://';
+let fuseboxConsoleNoticeLogged = false;
type DebuggerConnection = {
// Debugger web socket connection
socket: WS,
@@ -519,6 +521,7 @@ export default class Device {
// created instead of manually checking this on every getPages result.
for (const page of this.#pages.values()) {
if (this.#pageHasCapability(page, 'nativePageReloads')) {
+ this.#logFuseboxConsoleNotice();
continue;
}
@@ -1073,4 +1076,14 @@ export default class Device {
dangerouslyGetSocket(): WS {
return this.#deviceSocket;
+ // TODO(T214991636): Remove notice
+ #logFuseboxConsoleNotice() {
+ if (fuseboxConsoleNoticeLogged) {
+ return;
+ this.#deviceEventReporter?.logFuseboxConsoleNotice();
+ fuseboxConsoleNoticeLogged = true;
}
diff --git a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
index 048d0efb56c41f..1d467ce6a1da41 100644
--- a/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
+++ b/packages/dev-middleware/src/inspector-proxy/DeviceEventReporter.js
@@ -223,6 +223,12 @@ class DeviceEventReporter {
+ logFuseboxConsoleNotice(): void {
+ });
#logExpiredCommand(pendingCommand: PendingCommand): void {
this.#eventReporter.logEvent({
type: 'debugger_command',
diff --git a/packages/dev-middleware/src/types/EventReporter.js b/packages/dev-middleware/src/types/EventReporter.js
index 56942f5c569676..1564f3381471c9 100644
--- a/packages/dev-middleware/src/types/EventReporter.js
+++ b/packages/dev-middleware/src/types/EventReporter.js
@@ -82,6 +82,9 @@ export type ReportableEvent =
status: 'success',
...DebuggerSessionIDs,
+ | {
| {
type: 'proxy_error',
status: 'error',
diff --git a/packages/react-native/Libraries/Core/setUpDeveloperTools.js b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
index 5cc39eae9c1274..57f4f5916c262c 100644
--- a/packages/react-native/Libraries/Core/setUpDeveloperTools.js
+++ b/packages/react-native/Libraries/Core/setUpDeveloperTools.js
@@ -42,9 +42,8 @@ if (__DEV__) {
if (!Platform.isTesting) {
const HMRClient = require('../Utilities/HMRClient');
- if (global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
- } else if (console._isPolyfilled) {
+ // TODO(T214991636): Remove legacy Metro log forwarding
+ if (console._isPolyfilled) {
// We assume full control over the console and send JavaScript logs to Metro.
[
'trace',
diff --git a/packages/react-native/Libraries/Utilities/HMRClient.js b/packages/react-native/Libraries/Utilities/HMRClient.js
index c7832f7bb469e0..9e715ddc19b3a9 100644
--- a/packages/react-native/Libraries/Utilities/HMRClient.js
+++ b/packages/react-native/Libraries/Utilities/HMRClient.js
@@ -26,7 +26,6 @@ let hmrUnavailableReason: string | null = null;
let currentCompileErrorMessage: string | null = null;
let didConnect: boolean = false;
let pendingLogs: Array<[LogLevel, $ReadOnlyArray<mixed>]> = [];
-let pendingFuseboxConsoleNotification = false;
type LogLevel =
| 'trace'
@@ -52,7 +51,6 @@ export type HMRClientNativeInterface = {|
scheme?: string,
/**
@@ -142,29 +140,6 @@ const HMRClient: HMRClientNativeInterface = {
},
- unstable_notifyFuseboxConsoleEnabled() {
- if (!hmrClient) {
- pendingFuseboxConsoleNotification = true;
- return;
- hmrClient.send(
- JSON.stringify({
- type: 'log',
- level: 'info',
- data: [
- '\n' +
- '\u001B[7m' +
- ' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
- 'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
- 'the terminal to open (requires Google Chrome or Microsoft Edge).' +
- '\u001B[27m' +
- ],
- }),
- );
- pendingFuseboxConsoleNotification = false;
- },
-
// Called once by the bridge on startup, even if Fast Refresh is off.
// It creates the HMR client but doesn't actually set up the socket yet.
setup(
@@ -341,9 +316,6 @@ function flushEarlyLogs(client: MetroHMRClient) {
pendingLogs.forEach(([level, data]) => {
HMRClient.log(level, data);
- if (pendingFuseboxConsoleNotification) {
} finally {
pendingLogs.length = 0;
diff --git a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
index c4492b845454c1..4d36db2bc525e8 100644
--- a/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
+++ b/packages/react-native/Libraries/Utilities/HMRClientProdShim.js
@@ -25,7 +25,6 @@ const HMRClientProdShim: HMRClientNativeInterface = {
disable() {},
registerBundle() {},
log() {},
- unstable_notifyFuseboxConsoleEnabled() {},
module.exports = HMRClientProdShim;
diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
index 96d1f4fd869c05..8ba82c47ca0c15 100644
--- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
+++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
@@ -9001,7 +9001,6 @@ export type HMRClientNativeInterface = {|
scheme?: string
declare const HMRClient: HMRClientNativeInterface;
declare module.exports: HMRClient; | [
"+ '[Deprecated] Enable plain text JavaScript log streaming for all ' +",
"+ 'connected apps. This feature is deprecated and will be removed in ' +",
"+ },",
"+ // TODO(T214991636): Remove legacy Metro log forwarding",
"+ this.#eventReporter.logEvent({",
"- '\\n',"
] | [
41,
42,
45,
65,
140,
218
] | {
"additions": 52,
"author": "huntie",
"deletions": 35,
"html_url": "https://github.com/facebook/react-native/pull/49354",
"issue_id": 49354,
"merged_at": "2025-02-12T14:36:53Z",
"omission_probability": 0.1,
"pr_number": 49354,
"repo": "facebook/react-native",
"title": "[0.78] Restore Metro log streaming via CLI flag",
"total_changes": 87
} |
499 | diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor.js b/packages/react-native/scripts/codegen/generate-artifacts-executor.js
index 65cd55a33b4fc5..3c70f325e2254b 100644
--- a/packages/react-native/scripts/codegen/generate-artifacts-executor.js
+++ b/packages/react-native/scripts/codegen/generate-artifacts-executor.js
@@ -1087,13 +1087,13 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
generateRCTModuleProviders(projectRoot, pkgJson, libraries, outputPath);
generateCustomURLHandlers(libraries, outputPath);
generateAppDependencyProvider(outputPath);
+ generateReactCodegenPodspec(
+ projectRoot,
+ pkgJson,
+ outputPath,
+ baseOutputPath,
+ );
}
- generateReactCodegenPodspec(
- projectRoot,
- pkgJson,
- outputPath,
- baseOutputPath,
- );
cleanupEmptyFilesAndFolders(outputPath);
}
| diff --git a/packages/react-native/scripts/codegen/generate-artifacts-executor.js b/packages/react-native/scripts/codegen/generate-artifacts-executor.js
index 65cd55a33b4fc5..3c70f325e2254b 100644
--- a/packages/react-native/scripts/codegen/generate-artifacts-executor.js
+++ b/packages/react-native/scripts/codegen/generate-artifacts-executor.js
@@ -1087,13 +1087,13 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
generateRCTModuleProviders(projectRoot, pkgJson, libraries, outputPath);
generateCustomURLHandlers(libraries, outputPath);
generateAppDependencyProvider(outputPath);
+ generateReactCodegenPodspec(
+ projectRoot,
+ outputPath,
+ baseOutputPath,
+ );
}
- generateReactCodegenPodspec(
- projectRoot,
- outputPath,
- baseOutputPath,
cleanupEmptyFilesAndFolders(outputPath);
} | [
"+ pkgJson,",
"- pkgJson,",
"- );"
] | [
10,
17,
20
] | {
"additions": 6,
"author": "cipolleschi",
"deletions": 6,
"html_url": "https://github.com/facebook/react-native/pull/50646",
"issue_id": 50646,
"merged_at": "2025-04-14T11:34:02Z",
"omission_probability": 0.1,
"pr_number": 50646,
"repo": "facebook/react-native",
"title": "[RN][iOS] Do not generate ReactCodegen.podspec for libraries",
"total_changes": 12
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.