8000 [pull] main from can1357:main by pull[bot] · Pull Request #98 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c0a2671
fix(coding-agent): bound subagent runs that only emit incremental yields
pedropaulovc Sep 17, 2026
ffbb7cb
docs(coding-agent): attribute the yield-loop changelog entry to PR #1…
pedropaulovc Sep 17, 2026
facc0f9
edit: reject stale-anchor remaps that cross into a sibling construct
pedropaulovc Sep 17, 2026
760d5df
edit: enforce the seen-line guard by default
pedropaulovc Sep 17, 2026
1742368
changelog: attribute the edit seen-line and stale-remap fixes to PR #…
pedropaulovc Sep 17, 2026
0ec579e
Merge pull request #12369 from pedropaulovc/fix/edit-unseen-anchor-an…
H4vC Sep 17, 2026
40a27c1
Merge branch 'main' into fix/subagent-yield-loop
H4vC Sep 17, 2026
a43a9ef
Merge pull request #12351 from pedropaulovc/fix/subagent-yield-loop
H4vC Sep 17, 2026
4476c5d
refactor(tui): restructured TUI layout and utilities for hub consistency
can1357 Sep 17, 2026
59522e8
feat(coding-agent/session): added per-session token rate tracking
can1357 Sep 17, 2026
82e86c0
test(coding-agent): used TempDir utility for temporary test files
can1357 Sep 17, 2026
2fc6bd3
feat(pi-edit): added path attribute to edit payloads and support for …
can1357 Sep 17, 2026
f22b19b
refactor: restructured UI and domain layers to use shared utilities
can1357 Sep 17, 2026
872babf
feat(coding-agent/prompts): updated parent IRC wait interrupt prompt
can1357 Sep 17, 2026
b9d7ee8
refactor(coding-agent): reorganized session event handling avoid stalls
can1357 Sep 17, 2026
ef0431e
fix(coding-agent): fixed subagents leaving parent messages queued aft…
can1357 Sep 17, 2026
b58fed9
feat(tui/tools): made JSON tree use hooked root connectors and omit e…
can1357 Sep 17, 2026
033f063
feat: added streaming CLI command with redaction and UI paint listener
can1357 Sep 17, 2026
49c0916
feat(coding-agent): added extension tracking fast-fail to relay probing
can1357 Sep 17, 2026
14a40b1
feat(tui/tools): added memoized native inspection for edit arguments
can1357 Sep 17, 2026
147b7db
feat(coding-agent): added interactive TUI and stencil.so authenticati…
can1357 Sep 17, 2026
e49c632
perf(tui): cut per-keystroke and per-frame render waste
Sep 17, 2026
4c49e43
perf(all): round-2 hot-path wins with benches
Sep 17, 2026
67c8e67
perf(agent,catalog,utils,coding-agent): memoize hot paths, throttle p…
Sep 17, 2026
e63470b
fix(utils): use uniform tuple encoding for which cache key
Sep 17, 2026
4c64078
fix(edit): reduced edit auto-repair timeout to 20 seconds and added t…
can1357 Sep 17, 2026
7fdc587
chore: rewrite changelogs
can1357 Sep 17, 2026
fe27648
perf(agent): added stamp memoization for tool schema injection and tests
can1357 Sep 17, 2026
7881f00
perf(agent): optimized proxy tool call parsing using streaming JSON
can1357 Sep 17, 2026
7cbe487
perf(catalog): implemented deterministic override handling for taxonomy
can1357 Sep 17, 2026
13d03be
perf(coding-agent): restructured line counting and stats handling
can1357 Sep 17, 2026
7331540
perf(utils): restructured utils for streamlined JSON and cache logic
can1357 Sep 17, 2026
e587a0a
chore: bump version to 18.2.5
can1357 Sep 17, 2026
34cdcc3
ci: applied workspace clippy policy to pi-diff and pi-edit
can1357 Sep 17, 2026
3727311
fix(coding-agent): registered the Stream settings section and realign…
can1357 Sep 17, 2026
35fcfb2
fix(auth-broker): use node:fs for token and config reads on Windows
Sep 17, 2026
e705eb1
fix(auth-broker): strip BOM before parsing account-pool JSON
Sep 17, 2026
62a4aa9
Merge pull request #12390 from can1357/fix/auth-broker-windows-token-io
H4vC Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ jobs:
# Cargo honors that via `[lints]`, Bazel via the clippy-ported config.
- name: Clippy (workspace lint policy on opted-in crates)
run: |
bazelisk query "kind('rust_library|rust_shared_library', //crates/pi-ast/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-vcs/... + //crates/pi-voice/... + //crates/pi-walker/...)" \
bazelisk query "kind('rust_library|rust_shared_library', //crates/pi-ast/... + //crates/pi-diff/... + //crates/pi-edit/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-vcs/... + //crates/pi-voice/... + //crates/pi-walker/...)" \
| xargs bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=clippy-strict --
- name: Clippy (default lints elsewhere)
run: |
bazelisk query "kind('rust_library|rust_shared_library', //crates/... - (//crates/pi-ast/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-vcs/... + //crates/pi-voice/... + //crates/pi-walker/...) - //crates/pi-builtins/... - //crates/vendor/brush-core/...)" \
bazelisk query "kind('rust_library|rust_shared_library', //crates/... - (//crates/pi-ast/... + //crates/pi-diff/... + //crates/pi-edit/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-vcs/... + //crates/pi-voice/... + //crates/pi-walker/...) - //crates/pi-builtins/... - //crates/vendor/brush-core/...)" \
| xargs bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=clippy --
- name: Clippy (manifest allows on ported pi-builtins)
run: |
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [
resolver = "3"

[workspace.package]
version = "18.2.4"
version = "18.2.5"
edition = "2024"
license = "MIT"
authors = ["Stencil Labs, Inc."]
Expand Down
92 changes: 46 additions & 46 deletions bun.lock

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions crates/pi-edit/src/modes/hashline/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use super::{
messages::{
RECOVERY_EXTERNAL_WARNING, RECOVERY_LINE_REMAP_WARNING, RECOVERY_SESSION_CHAIN_WARNING,
},
syntax::node_chain,
types::{Anchor, Cursor, Edit, ParsedRange, PasteTarget},
};
use crate::{
Expand Down Expand Up @@ -300,6 +301,68 @@ fn remap_edits(previous: &str, current: &str, edits: &[Edit]) -> Option<(Vec<Edi
Some((remapped, first))
}

/// Identity of the constructs enclosing `line`: each node's kind paired with
/// the trimmed text of the row it opens, innermost first.
///
/// Positions are useless here — the point is to tell "the list under key `a`"
/// apart from an identically shaped list under key `b`, so the opening row's
/// content carries the identity.
fn enclosing_context(lines: &[String], path: &str, line: u32) -> Vec<(String, String)> {
node_chain(lines, path, line)
.into_iter()
.filter_map(|span| {
let opener = lines.get((span.start_line - 1) as usize)?;
Some((span.kind, opener.trim().to_owned()))
})
.collect()
}

/// Whether every remapped anchor still sits in the construct it was authored
/// against.
///
/// The line map is built from a text diff, which only aligns equal rows: an
/// anchor whose row is repeated in the file can therefore map onto the
/// identical row of a sibling construct with a uniform offset and matching
/// neighbors, and the edit lands in the wrong block while every positional
/// check passes. Comparing the enclosing constructs by content rejects those
/// landings. Unparsed or non-source targets report no chain on either side and
/// stay allowed.
fn context_preserved(
previous: &str,
current: &str,
path: &Path,
authored: &[Edit],
remapped: &[Edit],
) -> bool {
let Some(path) = path.to_str() else {
return true;
};
let previous_lines = previous.split('\n').map(str::to_owned).collect::<Vec<_>>();
let current_lines = current.split('\n').map(str::to_owned).collect::<Vec<_>>();
let mut checked = HashSet::new();
for (authored, remapped) in authored.iter().zip(remapped) {
// The offset is uniform across a remapped patch, so the endpoints of a
// span pin the interior: parsing every line of a wide CUT would not.
let authored = edit_anchors(authored);
let remapped = edit_anchors(remapped);
let edges = [(authored.first(), remapped.first()), (authored.last(), remapped.last())];
for (authored, remapped) in edges {
let (Some(authored), Some(remapped)) = (authored, remapped) else {
continue;
};
if !checked.insert((authored.line, remapped.line)) {
continue;
}
if enclosing_context(&previous_lines, path, authored.line)
!= enclosing_context(&current_lines, path, remapped.line)
{
return false;
}
}
}
true
}

/// Attempt to rebase stale anchors from a retained snapshot onto current text.
pub fn try_recover(
store: &EditStore,
Expand All @@ -319,6 +382,9 @@ pub fn try_recover(
let Some((edits, offset)) = remap_edits(&snapshot.text, args.current_text, args.edits) else {
return Ok(None);
};
if !context_preserved(&snapshot.text, args.current_text, args.path, args.edits, &edits) {
return Ok(None);
}
let Ok(applied) = apply_edits(args.current_text, &edits, ApplyOptions {
clipboard: args.clipboard.take(),
path: args.path.to_str(),
Expand Down
22 changes: 10 additions & 12 deletions crates/pi-ed 10000 it/src/modes/sloppy/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use std::{
};

use super::{
parse::{has_marker_lines, missing_unmarked_lines, operation_payload, parse_operations},
parse::{
edit_header, has_marker_lines, missing_unmarked_lines, operation_payload, parse_operations,
},
types::{
ATOMICITY_NOTICE, Candidate, CandidateResult, EdgeGaps, LiteralFallback, MAX_CANDIDATES,
MAX_COMBINATIONS, NormalizedText, Occurrence, Operation, OperationRewrite, ParsedPattern,
Expand Down Expand Up @@ -911,7 +913,7 @@ fn no_match_error(
let corrected = operation.pattern_text.replacen(literal, &closest.0, 1);
format!(
"Copy-ready corrected operation:\n{}",
operation_payload(operation, if operation.all { "*" } else { "" }, Some(&corrected))
operation_payload(operation, path, operation.all, Some(&corrected))
)
} else if standalone {
"No copy-ready correction — the closest current text is only a fuzzy match. Re-read the \
Expand Down Expand Up @@ -1180,15 +1182,15 @@ pub(crate) fn locate(
format!(
"Near line {}:\n{}",
line_number_at(content, candidate.start),
operation_payload(operation, "", None)
operation_payload(operation, path, false, None)
)
})
.collect::<Vec<_>>()
.join("\n\n");
let all_retry = if same_rewrite_for_all(pattern, operation, &candidates) {
format!(
"All candidates receive the same rewrite; retry every match:\n{}\n\n",
operation_payload(operation, "*", None)
operation_payload(operation, path, true, None)
)
} else {
String::new()
Expand Down Expand Up @@ -2244,7 +2246,7 @@ fn apply_operations(
context: &mut ApplyContext<'_>,
) -> Result<String, EditError> {
let payload = fnv_payload(input);
let operations = parse_operations(input, content)?;
let operations = parse_operations(input, content, context.path)?;
let mut removed = vec![None; operations.len()];
let mut planned = Vec::new();
let mut recovery_notes = Vec::new();
Expand Down Expand Up @@ -2446,11 +2448,7 @@ fn apply_operations(
{
let one_line = base.split_whitespace().collect::<Vec<_>>().join(" ");
let repeated = vec![one_line; pattern.selection_ranges.len()];
let header = if operation.all {
"<SM:EDIT all>"
} else {
"<SM:EDIT>"
};
let header = edit_header(context.path, operation.all);
let candidate = &candidates[0];
return Err(EditError::matched(
[
Expand Down Expand Up @@ -2633,9 +2631,9 @@ fn apply_operations(
previous.operation_number,
current.operation_number,
previous.operation_number,
operation_payload(&operations[previous.operation_number - 1], "", None),
operation_payload(&operations[previous.operation_number - 1], context.path, false, None),
6421 current.operation_number,
operation_payload(&operations[current.operation_number - 1], "", None)
operation_payload(&operations[current.operation_number - 1], context.path, false, None)
)));
}
let mut result = content.to_owned();
Expand Down
Loading
Loading
0