8000 [pull] main from can1357:main by pull[bot] · Pull Request #94 · 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
41 commits
Select commit Hold shift + click to select a range
4269b01
fix(coding-agent): latch Windows title static on native-path failure,…
Sep 16, 2026
0bac7da
fix(coding-agent): address codex nits on windows title fallback
Sep 16, 2026
8c4c403
fix(coding-agent): reset changelog to main, drop stale title entries
Sep 16, 2026
24964b6
fix(coding-agent): make title dedupe test host-agnostic
Sep 16, 2026
bf3192a
Merge remote-tracking branch 'origin/main' into feat/title-windows-sp…
Sep 16, 2026
791990c
fix(agent): retain cancelled jobs until execution settles
iliaal Sep 16, 2026
c748471
perf(edit): cache retained snapshot UTF-16 accounting
iliaal Sep 16, 2026
800dd48
docs: add PR attribution to changelog
iliaal Sep 16, 2026
5e0abcd
docs: add PR attribution to changelog
iliaal Sep 16, 2026
571767b
Merge pull request #12254 from H4vC/feat/title-windows-spinner-pulse
H4vC Sep 16, 2026
498e3a7
Merge pull request #12278 from iliaal/fix/audit-cancel-reap
H4vC Sep 16, 2026
dea7be7
Merge branch 'main' into perf/audit-snapshot-accounting
H4vC Sep 16, 2026
ac70773
Merge pull request #12279 from iliaal/perf/audit-snapshot-accounting
H4vC Sep 16, 2026
9dd4b93
fix(edit): reject invalid UTF-8 before staging edits
iliaal Sep 16, 2026
5960043
docs: add PR attribution to changelog
iliaal Sep 16, 2026
354f1cd
fix(edit): keep delete and create-exists working on invalid UTF-8
Sep 16, 2026
cd37a99
fix(shell): report accurate macOS process enumeration counts
iliaal Sep 16, 2026
e550dd8
docs(changelog): record macOS process discovery fix
iliaal Sep 16, 2026
38ab0ac
fix(edit): address review nits on invalid-UTF-8 bypass
Sep 16, 2026
90d7ea5
fix(edit): keep streaming REM preview on invalid UTF-8
Sep 16, 2026
7a2628a
fix(edit): preserve patch guards and respect operation order
iliaal Sep 16, 2026
8df0db2
test(edit): cover streaming deletion previews and rejection guards
iliaal Sep 16, 2026
f65f330
docs(changelog): add PR attribution
iliaal Sep 16, 2026
f45673f
Merge pull request #12277 from iliaal/fix/audit-utf8-edit
H4vC Sep 16, 2026
ff90d21
Merge pull request #12290 from iliaal/fix/audit-macos-pid-count
H4vC Sep 16, 2026
1d2c43a
fix(coding-agent/tools): fixed element handle passing to tab.evaluate…
can1357 Sep 16, 2026
8cc328a
fix(extensions): retained hooks in restricted and revived children
can1357 Sep 16, 2026
1a22361
feat(auth): added masked provider login prompts
can1357 Sep 16, 2026
5df7d13
feat(ai): added async model header resolution for auth, streaming, ca…
can1357 Sep 16, 2026
50cd279
feat(session): added transaction support and atomic rename for sessio…
can1357 Sep 16, 2026
dbd4691
feat(browser): added robust handle adoption with world verification
can1357 Sep 16, 2026
f3d2876
docs(meta): documented credential handling, theme export, extension l…
can1357 Sep 16, 2026
ee0c472
fix(ui): resolved theme live binding and status-line luminance instab…
can1357 Sep 16, 2026
1660855
chore(deps): cleaned unused modules from config, markdown and tests
can1357 Sep 16, 2026
f5d9499
refactor(config): restructured config to async header resolver with a…
8000 can1357 Sep 16, 2026
119e76f
feat(tools): added async header resolution to image and tts tools
can1357 Sep 16, 2026
85e16ef
chore(test): standardized scheduler mocking monotonic timers for testing
can1357 Sep 16, 2026
fc8959c
refactor(config): added dynamic header resolution and timeout handling
can1357 Sep 16, 2026
287410f
feat(coding-agent): added model mention autocomplete registry support
can1357 Sep 16, 2026
9f5b017
chore: bump version to 18.2.3
can1357 Sep 17, 2026
a2d8306
fix(coding-agent): split model mention syntax out of the session regi…
can1357 Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
142 changes: 71 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

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.2"
version = "18.2.3"
edition = "2024"
license = "MIT"
authors = ["Stencil Labs, Inc."]
Expand Down
48 changes: 24 additions & 24 deletions bun.lock

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

10 changes: 10 additions & 0 deletions crates/pi-edit/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ pub enum EditError {
/// invalid op, auto-generated target, no-op, …).
#[error("{0}")]
Apply(String),
/// The target is not valid UTF-8 and the operation needs its text.
/// Existence-only operations (delete, create-existence checks) bypass
/// decoding and never produce this.
#[error("{display} is not valid UTF-8 at byte {valid_up_to}; refusing to edit")]
InvalidUtf8 { display: String, valid_up_to: usize },
/// A search anchor could not be located in the target text.
#[error("{0}")]
Match(String),
Expand Down Expand Up @@ -56,6 +61,11 @@ impl EditError {
Self::Match(message.into())
}

/// Whether this rejects an undecodable target.
pub const fn is_invalid_utf8(&self) -> bool {
matches!(self, Self::InvalidUtf8 { .. })
}

/// Whether this is `File not found` (ENOENT) for the given path.
pub fn is_not_found(&self) -> bool {
matches!(self, Self::Io { source, .. } if source.kind() == std::io::ErrorKind::NotFound)
Expand Down
5 changes: 4 additions & 1 deletion crates/pi-edit/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ impl FileCache {
{
return Err(EditError::apply(message));
}
let raw = String::from_utf8_lossy(&bytes).into_owned();
let raw = String::from_utf8(bytes).map_err(|err| EditError::InvalidUtf8 {
display: resolved.display.clone(),
valid_up_to: err.utf8_error().valid_up_to(),
})?;
let is_notebook = notebook::is_notebook_path(&resolved.absolute);
let (bom, text) = if is_notebook {
let editable = notebook::notebook_to_editable_text(&raw, &resolved.display)
Expand Down
62 changes: 58 additions & 4 deletions crates/pi-edit/src/modes/hashline/patcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,40 @@ pub(crate) fn recover_target(
let display = path.to_string_lossy().into_owned();
(section.with_path(&display), Resolved { absolute: path, display })
}
/// Stage a whole-file delete for a target whose bytes cannot be decoded:
/// existence is proven, but there is no content to diff or snapshot.
#[allow(
clippy::too_many_arguments,
reason = "delete staging threads section, resolution, dedup, and clipboard state"
)]
fn undecodable_delete_staged(
section: &PatchSection,
resolved: &Resolved,
original_path: &str,
tag: &str,
mut warnings: Vec<String>,
canonical_paths: &mut HashMap<std::path::PathBuf, String>,
clipboard: &Clipboard,
) -> Result<StagedFile, EditError> {
if section.path != original_path {
warnings.push(path_recovered_from_tag_message(original_path, &section.path, tag));
}
if let Some(previous) = canonical_paths
.insert(crate::path_policy::canonical_key(&resolved.absolute), original_path.to_owned())
{
return Err(EditError::apply(format!(
"Multiple hashline sections resolve to the same file ({previous} and {original_path}). \
Merge their ops under one header before applying."
)));
}
let mut item =
StagedFile::new(section.path.clone(), resolved.absolute.clone(), EngineFileOp::Delete);
item.header = HeaderKind::HashlineTag;
item.warnings = warnings;
item.record_snapshot = true;
item.clipboard_after = Some(clipboard.fork());
Ok(item)
}

/// Stage every parsed hashline section atomically.
pub fn stage_patch(
Expand All @@ -325,12 +359,32 @@ pub fn stage_patch(
};
let initial = files.resolve(&original.path, false)?;
let (section, resolved) = recover_target(original, &initial, files, store);
let read = files.try_read(&resolved)?.ok_or_else(|| {
EditError::apply(format!(
// Whole-file delete needs existence, not text, so an undecodable file
// stages without its content; anything else still rejects.
let undecodable_delete = matches!(parsed.file_op, Some(FileOp::Rem));
let read = match files.try_read(&resolved) {
Ok(read) => read,
Err(err) if err.is_invalid_utf8() && undecodable_delete => None,
Err(err) => return Err(err),
};
let Some(read) = read else {
if undecodable_delete && files.exists(&resolved.absolute) {
staged.push(undecodable_delete_staged(
&section,
&resolved,
&original.path,
tag,
parsed.warnings.clone(),
&mut canonical_paths,
&clipboard.fork(),
)?);
continue;
}
return Err(EditError::apply(format!(
"File not found: {}. Use the write tool to create new files.",
section.path
))
})?;
)));
};
if section.path != original.path {
// Warning is attached below once parser/apply warnings are collected.
}
Expand Down
29 changes: 26 additions & 3 deletions crates/pi-edit/src/modes/hashline/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,32 @@ fn preview_section(
let initial = files.resolve(&section.path, false)?;
let (target, resolved) = recover_target(section, &initial, files, store);
result.display.clone_from(&target.path);
let read = files.try_read(&resolved)?.ok_or_else(|| {
crate::error::EditError::apply(format!("File not found: {}", target.path))
})?;
let read = match files.try_read(&resolved) {
Ok(Some(read)) => read,
Ok(None) => {
return Err(crate::error::EditError::apply(format!("File not found: {}", target.path)));
},
// Whole-file delete preview needs existence, not text. Streaming
// sections parse partially, so a trailing-incomplete section must
// not claim the delete preview; the drop at preview_patch already
// hides the last section while more payload may arrive.
Err(err) if err.is_invalid_utf8() => {
let is_delete = !streaming
|| parse_patch_streaming(&target.diff)
.is_ok_and(|parsed| !parsed.edits.is_empty() || parsed.file_op.is_some());
let is_delete = is_delete
&& target.parse().is_ok_and(|parsed| {
target.file_hash.is_some() && matches!(parsed.file_op, Some(FileOp::Rem))
});
if !is_delete {
return Err(err);
}
result.op = Some(EngineFileOp::Delete);
result.diff = Some(String::new());
return Ok(());
},
Err(err) => return Err(err),
};
if streaming {
let (diff, first) = streaming_diff(&target, &read.text, clipboard)
.map_err(crate::error::EditError::apply)?;
Expand Down
Loading
Loading
0