Commit ef97ca1
Address PR feedback on external-session titling
- `generateExternalSessionTitle` returned a promise that resolved before
generation had run, because `_generateTitleSoon` starts the work
fire-and-forget. The awaited loop in `_titleUntitledExternalSessions`
therefore launched both model calls concurrently and
`whenDeferredWorkSettled()` reported completion while generation and
persistence were still in flight, breaking the lane's serialization
contract. Split out `_startTitleGeneration`, which returns the tracked
promise, and await it on the external-session path.
- `listSessions` marked the first listing as served from its rejection
handler too, so deferred maintenance could start after a failed listing
and compete with the retry the gate exists to protect. Keep in-flight
cleanup on both paths but only set the flag on fulfillment.
- `agentHostMain` marked startup complete while the configured WebSocket
server was still being created and wired, so deferred work could begin
concurrently with that remaining startup. Mark completion once the
optional startup promise settles, keeping its non-fatal error handling.
Adds a regression test for the failed-listing gate, and tightens the
existing titling tests to assert the awaited-generation contract without
polling.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 61fd0b9 commit ef97ca1
5 files changed
Lines changed: 75 additions & 21 deletions
File tree
- src/vs/platform/agentHost
- node
- test/node
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
460 | 463 | | |
461 | 464 | | |
| 465 | + | |
| 466 | + | |
462 | 467 | | |
463 | 468 | | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | 469 | | |
469 | 470 | | |
470 | 471 | | |
| |||
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | 440 | | |
438 | | - | |
| 441 | + | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
| |||
517 | 520 | | |
518 | 521 | | |
519 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
520 | 535 | | |
521 | 536 | | |
522 | 537 | | |
523 | | - | |
| 538 | + | |
524 | 539 | | |
525 | 540 | | |
526 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1903 | 1903 | | |
1904 | 1904 | | |
1905 | 1905 | | |
1906 | | - | |
1907 | | - | |
1908 | 1906 | | |
1909 | | - | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
1910 | 1917 | | |
1911 | 1918 | | |
1912 | 1919 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
1091 | | - | |
| 1091 | + | |
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
| 1114 | + | |
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
1118 | | - | |
| 1118 | + | |
| 1119 | + | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3007 | 3007 | | |
3008 | 3008 | | |
3009 | 3009 | | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | | - | |
3016 | | - | |
3017 | 3010 | | |
3018 | 3011 | | |
3019 | 3012 | | |
| |||
3145 | 3138 | | |
3146 | 3139 | | |
3147 | 3140 | | |
| 3141 | + | |
3148 | 3142 | | |
3149 | | - | |
3150 | 3143 | | |
3151 | 3144 | | |
3152 | 3145 | | |
3153 | | - | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
3154 | 3151 | | |
| 3152 | + | |
3155 | 3153 | | |
3156 | 3154 | | |
3157 | 3155 | | |
| |||
4448 | 4446 | | |
4449 | 4447 | | |
4450 | 4448 | | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
4451 | 4481 | | |
4452 | 4482 | | |
4453 | 4483 | | |
| |||
0 commit comments