fix(onboard): correct channel selector default to 'Done' item
The hardcoded .default(11) became stale when Lark/Feishu was added at index 11, shifting 'Done — finish setup' to index 12. The wizard now pre-selects the wrong channel instead of 'Done'. Use options.len() - 1 so the default always tracks the last item regardless of how many channels exist. Fixes #913 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
3a19d6cd98
commit
8f8641d9fb
1 changed files with 1 additions and 1 deletions
|
|
@ -2695,7 +2695,7 @@ fn setup_channels() -> Result<ChannelsConfig> {
|
|||
let choice = Select::new()
|
||||
.with_prompt(" Connect a channel (or Done to continue)")
|
||||
.items(&options)
|
||||
.default(11)
|
||||
.default(options.len() - 1)
|
||||
.interact()?;
|
||||
|
||||
match choice {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue