synic 0bfbd39ebc
fix(sidebar): fix various focus errors ()
This fixes a bunch of errors I was getting when switching away from the
avante sidebar and then back. Sometimes the sidebar would lose track of
the various windows, and you'd get errors like this:

```
|| stack traceback:
|| 	...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2350: in function <...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2349>
|| Error detected while processing BufLeave Autocommands for "<buffer=294>":
|| Error executing lua callback: ...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2398: attempt to index field 'selected_files_container' (a nil value)
```

Or this one:

```
|| stack traceback:
|| 	...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2350: in function <...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2349>
|| Error detected while processing BufLeave Autocommands for "<buffer=294>":
|| Error executing lua callback: ...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:2398: attempt to index field 'selected_files_container' (a nil value)
```

This change does the following:

1. Proper order of cleanup in `reset()`
2. Proper cleanup in `create_selected_files_container()`
2025-02-11 13:42:23 +08:00
..
2025-02-11 01:43:01 +08:00
2025-02-11 01:43:01 +08:00
2025-02-06 19:13:47 +08:00
2025-02-06 19:13:47 +08:00
2024-11-23 21:49:33 +08:00
2024-11-23 20:23:05 +08:00
2025-02-05 22:39:54 +08:00
2024-12-13 23:24:29 +08:00