Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:03:09.744Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

extension_snippet.rs

27 lines · 687 B · rust
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
Served at tenant.openagents/omega Member data and write actions are omitted.