Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T06:56:31.803Z 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

settings.rs

30 lines · 800 B · rust
1use std::ops::Range;
2use tree_sitter::{Query, QueryMatch};
3
4use crate::MigrationPatterns;
5use crate::patterns::SETTINGS_ASSISTANT_TOOLS_PATTERN;
6
7pub const SETTINGS_PATTERNS: MigrationPatterns = &[(
8    SETTINGS_ASSISTANT_TOOLS_PATTERN,
9    replace_bash_with_terminal_in_profiles,
10)];
11
12fn replace_bash_with_terminal_in_profiles(
13    contents: &str,
14    mat: &QueryMatch,
15    query: &Query,
16) -> Option<(Range<usize>, String)> {
17    let tool_name_capture_ix = query.capture_index_for_name("tool_name")?;
18    let tool_name_range = mat
19        .nodes_for_capture_index(tool_name_capture_ix)
20        .next()?
21        .byte_range();
22    let tool_name = contents.get(tool_name_range.clone())?;
23
24    if tool_name != "bash" {
25        return None;
26    }
27
28    Some((tool_name_range, "terminal".to_string()))
29}
30
Served at tenant.openagents/omega Member data and write actions are omitted.