Skip to repository content36 lines · 1.1 KB · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T02:54:53.542Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
copilot_ui.rs
1mod sign_in;
2
3use std::sync::Arc;
4
5use copilot::GlobalCopilotAuth;
6use gpui::AppContext;
7use language::language_settings::AllLanguageSettings;
8use project::DisableAiSettings;
9use settings::SettingsStore;
10pub use sign_in::{
11 ConfigurationMode, ConfigurationView, CopilotCodeVerification, initiate_sign_in,
12 initiate_sign_out, reinstall_and_sign_in,
13};
14use ui::App;
15use workspace::AppState;
16
17pub fn init(app_state: &Arc<AppState>, cx: &mut App) {
18 let disable_ai = cx.read_global(|settings: &SettingsStore, _| {
19 settings.get::<DisableAiSettings>(None).disable_ai
20 });
21 let provider = cx.read_global(|settings: &SettingsStore, _| {
22 settings
23 .get::<AllLanguageSettings>(None)
24 .edit_predictions
25 .provider
26 });
27 if !disable_ai && provider == settings::EditPredictionProvider::Copilot {
28 GlobalCopilotAuth::set_global(
29 app_state.languages.next_language_server_id(),
30 app_state.fs.clone(),
31 app_state.node_runtime.clone(),
32 cx,
33 );
34 }
35}
36