Skip to repository content27 lines · 687 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T02:03:09.744Z 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
extension_snippet.rs
1use std::path::PathBuf;
2use std::sync::Arc;
3
4use anyhow::Result;
5use extension::{ExtensionHostProxy, ExtensionSnippetProxy};
6use gpui::App;
7
8use crate::SnippetRegistry;
9
10pub fn init(cx: &mut App) {
11 let proxy = ExtensionHostProxy::default_global(cx);
12 proxy.register_snippet_proxy(SnippetRegistryProxy {
13 snippet_registry: SnippetRegistry::global(cx),
14 });
15}
16
17struct SnippetRegistryProxy {
18 snippet_registry: Arc<SnippetRegistry>,
19}
20
21impl ExtensionSnippetProxy for SnippetRegistryProxy {
22 fn register_snippet(&self, path: &PathBuf, snippet_contents: &str) -> Result<()> {
23 self.snippet_registry
24 .register_snippets(path, snippet_contents)
25 }
26}
27