8000 [pull] main from can1357:main by pull[bot] · Pull Request #133 · 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
40 commits
Select commit Hold shift + click to select a range
ecbb787
fix(agent): deliver identical passive tool context once per batch
andrebrait Sep 28, 2026
97ba15f
fix(coding-agent): drop repeated tool_call context across handlers of…
andrebrait Sep 28, 2026
3c25fbe
docs: scope passive-context dedup to identical per-call values
andrebrait Sep 28, 2026
e3ebce5
perf: reduced streaming, transcript, and tool hot-path overhead
Sep 28, 2026
689a341
docs: credited #13650 in changelogs
Sep 28, 2026
9cc652b
fix(tui): kept lone-surrogate tail chunks off the code-point trim path
Sep 28, 2026
acea72f
feat(catalog): route Command Code GPT models through the Responses API
riicodespretty Sep 28, 2026
b6528f1
feat(ai): report Command Code usage limits
riicodespretty Sep 28, 2026
4455091
fix(catalog): refresh Command Code model metadata from command-code@1…
riicodespretty Sep 28, 2026
df59f47
feat(catalog): add Command Code's typesafe/jev decision model
riicodespretty Sep 28, 2026
d5e51d7
feat(catalog): validate Command Code API keys at login
riicodespretty Sep 28, 2026
363c87b
chore(catalog): regenerate bundled Command Code models
riicodespretty Sep 28, 2026
44e695b
docs: describe Command Code routing, judge model, and usage limits
riicodespretty Sep 28, 2026
aa50c55
refactor(catalog): simplify Command Code refresh
riicodespretty Sep 28, 2026
56ab23e
docs(changelog): credit the Command Code refresh PR
riicodespretty Sep 28, 2026
b82a60f
revert(tui): dropped the ConPTY write-path byte-length change
Sep 28, 2026
76fe9f2
fix(agent): dedup passive context ignoring surrounding whitespace; at…
Sep 28, 2026
52aaae2
Merge PR #13633: fix(agent): deliver identical passive tool context o…
H4vC Sep 28, 2026
00dea89
Merge PR #13650: perf: tui perf fixes (@H4vC)
H4vC Sep 28, 2026
3b9e426
feat(catalog): renamed Codex image model and added compatibility alias
can1357 Sep 28, 2026
64e3998
feat(shell): added git worktree add builtin with copy-on-write cloning
can1357 Sep 28, 2026
2f4a2e1
feat: added speculative task launches for batch task calls
can1357 Sep 28, 2026
184d455
feat(pi-vcs/git): improved git status handling and refreshed UI cachi…
can1357 Sep 28, 2026
9856625
fix(coding-agent): reduced model picker latency by avoiding unnecessa…
can1357 Sep 28, 2026
ec1fe88
fix(catalog): make Command Code login validation optional
riicodespretty Sep 28, 2026
3971346
fix(ai): keep Command Code keys usable when a usage route answers 403
riicodespretty Sep 28, 2026
b30c4bf
fix(catalog): keep Command Code GPT rows off hosted image and named t…
riicodespretty Sep 28, 2026
cddad30
fix(coding-agent): send required tool_choice when a host rejects name…
riicodespretty Sep 28, 2026
15b14bb
docs(catalog): cite command-code@1.67.0 in Command Code comments
riicodespretty Sep 28, 2026
97d7f56
feat(catalog/compat): added support for Anthropic Sonnet 5.5 model an…
can1357 Sep 28, 2026
78166b3
test(agent): typed stream-session it.each rows as mutable arrays
can1357 Sep 28, 2026
431cf6b
style(vcs): rewrapped git cli doc comments for rustfmt
can1357 Sep 28, 2026
93fec3c
chore: bump version to 18.4.3
can1357 Sep 28, 2026
398b835
Merge remote-tracking branch 'origin/main' into feat/commandcode-prov…
riicodespretty Sep 28, 2026
4f34844
fix(catalog): address the second Command Code review round
riicodespretty Sep 28, 2026
a3f157e
docs(changelog): cover the second Command Code review round
riicodespretty Sep 28, 2026
90c2be6
docs: refresh the Command Code provider paragraph
riicodespretty Sep 28, 2026
b37bd76
docs(changelog): name the 10 routed Command Code GPT models
riicodespretty Sep 28, 2026
01068eb
fix(ai): keep Command Code usage reports schema-valid and org-scoped
Sep 29, 2026
33f887a
Merge PR #13666: feat: refresh the Command Code provider (@riicodespr…
H4vC Sep 29, 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
Diff view
25 changes: 13 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 @@ -25,7 +25,7 @@ members = [
resolver = "3"

[workspace.package]
version = "18.4.2"
version = "18.4.3"
edition = "2024"
license = "MIT"
authors = ["Stencil Labs, Inc."]
Expand Down
12 changes: 6 additions & 6 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

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.

74 changes: 63 additions & 11 deletions crates/pi-edit/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
use std::{
collections::{BTreeSet, HashMap},
path::{Path, PathBuf},
sync::Arc,
sync::{Arc, LazyLock},
};

use parking_lot::Mutex;
use regex::Regex;
use xxhash_rust::{xxh32::xxh32, xxh64::xxh64};
use xxhash_rust::{xxh32::Xxh32, xxh64::xxh64};

/// Retained path count before LRU eviction.
pub const DEFAULT_MAX_PATHS: usize = 256;
Expand Down Expand Up @@ -67,29 +67,41 @@ impl Clipboard {
}

/// Compute the four-hex uppercase hashline content tag.
///
/// Hashes the text with trailing spaces, tabs, and CRs stripped from every
/// line. Unchanged runs between stripped spans are fed straight from `text`, so
/// no normalized copy is built.
pub fn file_hash(text: &str) -> String {
let mut normalized = String::with_capacity(text.len());
let bytes = text.as_bytes();
let mut hasher = Xxh32::new(0);
let mut run_start = 0;
let mut line_start = 0;
for segment in text.split_inclusive('\n') {
let (line, newline) = segment
.strip_suffix('\n')
.map_or((segment, ""), |line| (line, "\n"));
normalized.push_str(line.trim_end_matches([' ', '\t', '\r']));
normalized.push_str(newline);
let line = segment.strip_suffix('\n').unwrap_or(segment);
let kept = line.trim_end_matches([' ', '\t', '\r']).len();
if kept < line.len() {
hasher.update(&bytes[run_start..line_start + kept]);
run_start = line_start + line.len();
}
line_start += segment.len();
}
format!("{:04X}", xxh32(normalized.as_bytes(), 0) & 0xffff)
hasher.update(&bytes[run_start..]);
format!("{:04X}", hasher.digest() & 0xffff)
}

/// Compute a stable 64-bit key for raw patch input.
pub fn payload_hash(text: &str) -> u64 {
xxh64(text.as_bytes(), 0)
}

static SEEN_LINE_PREFIX_RE: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"^[ *]?(\d+)(?:-(\d+))?:").expect("valid hashline prefix regex"));

/// Parse displayed boundary line numbers from a hashline-formatted body.
pub fn seen_lines_from_body(body: &str) -> Vec<u32> {
let prefix = Regex::new(r"^[ *]?(\d+)(?:-(\d+))?:").expect("valid hashline prefix regex");
let mut seen = Vec::new();
for row in body.split('\n') {
let Some(captures) = prefix.captures(row) else {
let Some(captures) = SEEN_LINE_PREFIX_RE.captures(row) else {
continue;
};
if let Ok(line) = captures[1].parse() {
Expand Down Expand Up @@ -403,6 +415,46 @@ mod tests {
assert_eq!(file_hash(""), "5D05");
}

/// Hashes a normalized copy — the reference `file_hash` must stay
/// bit-identical to.
fn file_hash_of_normalized_copy(text: &str) -> String {
let mut normalized = String::with_capacity(text.len());
for segment in text.split_inclusive('\n') {
let (line, newline) = segment
.strip_suffix('\n')
.map_or((segment, ""), |line| (line, "\n"));
normalized.push_str(line.trim_end_matches([' ', '\t', '\r']));
normalized.push_str(newline);
}
format!("{:04X}", xxhash_rust::xxh32::xxh32(normalized.as_bytes(), 0) & 0xffff)
}

#[test]
fn file_hash_streams_the_normalized_text() {
let long_line = "x".repeat(100);
let cases = [
String::new(),
"\n".to_owned(),
"\r\n".to_owned(),
" \t\r".to_owned(),
"no final newline".to_owned(),
"no final newline with trailing space \t".to_owned(),
"crlf\r\nlines\r\nend\r\n".to_owned(),
"crlf without final\r\nnewline\r".to_owned(),
"trailing \nwhitespace\t\t\n only indent kept\n \n\t\n".to_owned(),
"lone\rcarriage\r\rreturns \r\r\n".to_owned(),
"mixed 😀 \t\r\nünïcödé \n中文\r".to_owned(),
format!("{long_line} \n{long_line}\r\n{long_line}\n{long_line}\t"),
(0..200)
.map(|n| format!("line {n}{}", ["", " ", "\t", "\r", " \r"][n % 5]))
.collect::<Vec<_>>()
.join("\n"),
];
for text in &cases {
assert_eq!(file_hash(text), file_hash_of_normalized_copy(text), "{text:?}");
}
}

#[test]
fn snapshots_deduplicate_promote_and_union_seen_lines() {
let store = EditStore::new();
Expand Down
1 change: 1 addition & 0 deletions crates/pi-shell/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ rust_library(
deps = all_crate_deps(normal = True) + [
":build_script",
"//crates/pi-builtins",
"//crates/pi-vcs",
"//crates/pi-vfs",
"//crates/vendor/brush-core",
"//crates/vendor/brush-parser",
Expand Down
1 change: 1 addition & 0 deletions crates/pi-shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ workspace = true
anyhow.workspace = true
bytes.workspace = true
pi-builtins.workspace = true
pi-vcs.workspace = true
pi-vfs.workspace = true
brush-core.workspace = true
brush-parser.workspace = true
Expand Down
Loading
Loading
0