Commit 1d9360e
committed
Fix the mid-session connect-a-new-provider flow crashing on a live terminal
Choosing "connect a new provider" from the running model picker
called connectProviderInline without a renderer override, so it fell
through to creating its own CliRenderer while the session's own was
still live. Two renderers cannot share one terminal's stdin, so every
real invocation failed with "stdin is already used by another
CliRenderer" — invisible in the existing tests because they always
supply a headless renderer override, masking the default path.
The picker now hands connectProviderInline the session's own
renderer, paused for the duration and resumed on completion, instead
of letting it create one. That required provider-setup's teardown to
stop unconditionally destroying whatever renderer it was given, since
a caller-supplied renderer (a test harness, or here a live session's
own) is owned by that caller, not by the setup form borrowing it.1 parent f712dda commit 1d9360e
3 files changed
Lines changed: 45 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
274 | 287 | | |
275 | 288 | | |
276 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
608 | 612 | | |
609 | 613 | | |
610 | 614 | | |
| |||
1075 | 1079 | | |
1076 | 1080 | | |
1077 | 1081 | | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1082 | 1088 | | |
1083 | 1089 | | |
1084 | 1090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1984 | 1984 | | |
1985 | 1985 | | |
1986 | 1986 | | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1987 | 1992 | | |
1988 | 1993 | | |
1989 | | - | |
1990 | | - | |
1991 | | - | |
1992 | | - | |
1993 | | - | |
1994 | | - | |
1995 | | - | |
1996 | | - | |
1997 | | - | |
1998 | | - | |
1999 | | - | |
2000 | | - | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
2001 | 2011 | | |
2002 | 2012 | | |
2003 | 2013 | | |
| |||
0 commit comments