assistant2: Add debug logging for initialization issues (#23722)

This PR adds some logging so we can debug the issues some folks have
been having with Assistant2 not getting initialized properly.

All the logs are prefixed with `[assistant2-debug]` so they're easier to
pick out of the logs, as well as find them later to clean up once we've
diagnosed the issue.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-01-27 11:27:59 -05:00 committed by GitHub
parent 98ea0587df
commit ad49f71e6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -440,12 +440,14 @@ fn initialize_panels(
};
let (assistant_panel, assistant2_panel) = if is_assistant2_enabled {
log::info!("[assistant2-debug] initializing Assistant2");
let assistant2_panel = assistant2::AssistantPanel::load(
workspace_handle.clone(),
prompt_builder,
cx.clone(),
)
.await?;
log::info!("[assistant2-debug] finished initializing Assistant2");
(None, Some(assistant2_panel))
} else {
@ -461,6 +463,7 @@ fn initialize_panels(
workspace_handle.update_in(&mut cx, |workspace, window, cx| {
if let Some(assistant2_panel) = assistant2_panel {
log::info!("[assistant2-debug] adding Assistant2 panel");
workspace.add_panel(assistant2_panel, window, cx);
}