chore: bump version to 8.12.2

This commit is contained in:
can1357
2026-01-28 17:15:57 +01:00
parent 4d66372720
commit 38f0628496
11 changed files with 70 additions and 58 deletions
+6 -6
View File
@@ -22,7 +22,7 @@
},
"packages/agent": {
"name": "@oh-my-pi/pi-agent-core",
"version": "8.12.1",
"version": "8.12.2",
"dependencies": {
"@oh-my-pi/pi-ai": "workspace:*",
"@oh-my-pi/pi-tui": "workspace:*",
@@ -35,7 +35,7 @@
},
"packages/ai": {
"name": "@oh-my-pi/pi-ai",
"version": "8.12.1",
"version": "8.12.2",
"bin": {
"pi-ai": "./src/cli.ts",
},
@@ -65,7 +65,7 @@
},
"packages/coding-agent": {
"name": "@oh-my-pi/pi-coding-agent",
"version": "8.12.1",
"version": "8.12.2",
"bin": {
"omp": "src/cli.ts",
},
@@ -101,7 +101,7 @@
},
"packages/pi-utils": {
"name": "@oh-my-pi/pi-utils",
"version": "8.12.1",
"version": "8.12.2",
"dependencies": {
"strip-ansi": "^7.1.2",
"winston": "^3.19.0",
@@ -131,7 +131,7 @@
},
"packages/stats": {
"name": "@oh-my-pi/omp-stats",
"version": "8.12.1",
"version": "8.12.2",
"bin": {
"omp-stats": "./src/index.ts",
},
@@ -151,7 +151,7 @@
},
"packages/tui": {
"name": "@oh-my-pi/pi-tui",
"version": "8.12.1",
"version": "8.12.2",
"dependencies": {
"@types/mime-types": "^3.0.1",
"chalk": "^5.6.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/pi-agent-core",
"version": "8.12.1",
"version": "8.12.2",
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
"type": "module",
"main": "./src/index.ts",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/pi-ai",
"version": "8.12.1",
"version": "8.12.2",
"description": "Unified LLM API with automatic model discovery and provider configuration",
"type": "module",
"main": "./src/index.ts",
+2
View File
@@ -2,6 +2,8 @@
## [Unreleased]
## [8.12.2] - 2026-01-28
### Changed
- Replaced ripgrep-based file listing with fs.glob for project scans and find/read tooling
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/pi-coding-agent",
"version": "8.12.1",
"version": "8.12.2",
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
"type": "module",
"ompConfig": {
@@ -12,6 +12,7 @@ export interface HookSelectorOptions {
timeout?: number;
initialIndex?: number;
outline?: boolean;
maxVisible?: number;
}
class OutlinedList extends Container {
@@ -37,6 +38,7 @@ class OutlinedList extends Container {
export class HookSelectorComponent extends Container {
private options: string[];
private selectedIndex: number;
private maxVisible: number;
private listContainer: Container | undefined;
private outlinedList: OutlinedList | undefined;
private onSelectCallback: (option: string) => void;
@@ -56,6 +58,7 @@ export class HookSelectorComponent extends Container {
this.options = options;
this.selectedIndex = Math.min(opts?.initialIndex ?? 0, options.length - 1);
this.maxVisible = Math.max(3, opts?.maxVisible ?? 12);
this.onSelectCallback = onSelect;
this.onCancelCallback = onCancel;
this.baseTitle = title;
@@ -101,13 +104,23 @@ export class HookSelectorComponent extends Container {
private updateList(): void {
const lines: string[] = [];
for (let i = 0; i < this.options.length; i++) {
const startIndex = Math.max(
0,
Math.min(this.selectedIndex - Math.floor(this.maxVisible / 2), this.options.length - this.maxVisible),
);
const endIndex = Math.min(startIndex + this.maxVisible, this.options.length);
for (let i = startIndex; i < endIndex; i++) {
const isSelected = i === this.selectedIndex;
const text = isSelected
? theme.fg("accent", `${theme.nav.cursor} `) + theme.fg("accent", this.options[i])
: ` ${theme.fg("text", this.options[i])}`;
lines.push(text);
}
if (startIndex > 0 || endIndex < this.options.length) {
lines.push(theme.fg("dim", ` (${this.selectedIndex + 1}/${this.options.length})`));
}
if (this.outlinedList) {
this.outlinedList.setLines(lines);
return;
@@ -504,6 +504,7 @@ export class ExtensionUiController {
const { promise, resolve } = Promise.withResolvers<string | undefined>();
this.hookSelectorOverlay?.hide();
this.hookSelectorOverlay = undefined;
const maxVisible = Math.max(4, Math.min(15, this.ctx.ui.terminal.rows - 12));
this.ctx.hookSelector = new HookSelectorComponent(
title,
options,
@@ -520,6 +521,7 @@ export class ExtensionUiController {
timeout: dialogOptions?.timeout,
tui: this.ctx.ui,
outline: dialogOptions?.outline,
maxVisible,
},
);
this.hookSelectorOverlay = this.ctx.ui.showOverlay(this.ctx.hookSelector, this.dialogOverlayOptions);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/pi-utils",
"version": "8.12.1",
"version": "8.12.2",
"description": "Shared utilities for pi packages",
"type": "module",
"main": "./src/index.ts",
+40 -45
View File
@@ -1,6 +1,5 @@
import type * as fsTypes from "node:fs";
import * as fs from "node:fs/promises";
import * as path from "node:path";
import { Glob } from "bun";
export interface GlobPathsOptions {
/** Base directory for glob patterns. Defaults to process.cwd(). */
@@ -19,14 +18,6 @@ export interface GlobPathsOptions {
gitignore?: boolean;
}
function createGlobSignal(signal?: AbortSignal, timeoutMs?: number): AbortSignal | undefined {
const timeoutSignal = timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined;
if (signal && timeoutSignal) {
return AbortSignal.any([signal, timeoutSignal]);
}
return signal ?? timeoutSignal;
}
/** Patterns always excluded (.git is never useful in glob results). */
const ALWAYS_IGNORED = ["**/.git", "**/.git/**"];
@@ -133,30 +124,6 @@ export async function loadGitignorePatterns(baseDir: string): Promise<string[]>
return patterns;
}
function isAsyncIterable<T>(value: unknown): value is AsyncIterable<T> {
return typeof (value as { [Symbol.asyncIterator]?: unknown })?.[Symbol.asyncIterator] === "function";
}
async function collectGlobResults(result: unknown): Promise<string[]> {
const resolved = await Promise.resolve(result);
if (!resolved) {
return [];
}
if (Array.isArray(resolved)) {
return resolved.filter((entry): entry is string => typeof entry === "string");
}
if (isAsyncIterable<string>(resolved)) {
const entries: string[] = [];
for await (const entry of resolved) {
if (typeof entry === "string") {
entries.push(entry);
}
}
return entries;
}
return [];
}
/**
* Resolve filesystem paths matching glob patterns with optional exclude filters.
* Returns paths relative to the provided cwd (or process.cwd()).
@@ -177,17 +144,45 @@ export async function globPaths(patterns: string | string[], options: GlobPathsO
effectiveExclude = [...effectiveExclude, ...gitignorePatterns];
}
const globOptions = {
cwd,
exclude: effectiveExclude,
signal: createGlobSignal(signal, timeoutMs),
dot,
nodir: onlyFiles,
} as fsTypes.GlobOptions;
const result = fs.glob(patterns, globOptions);
const entries = await collectGlobResults(result);
const base = cwd ?? process.cwd();
const allResults: string[] = [];
return entries.map(entry => (path.isAbsolute(entry) ? path.relative(base, entry) : entry));
// Combine timeout and abort signals
const timeoutSignal = timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined;
const combinedSignal =
signal && timeoutSignal ? AbortSignal.any([signal, timeoutSignal]) : (signal ?? timeoutSignal);
for (const pattern of patternArray) {
const glob = new Glob(pattern);
const scanOptions = {
cwd: base,
dot,
onlyFiles,
throwErrorOnBrokenSymlink: false,
};
for await (const entry of glob.scan(scanOptions)) {
if (combinedSignal?.aborted) {
const reason = combinedSignal.reason;
if (reason instanceof Error) throw reason;
throw new DOMException("Aborted", "AbortError");
}
// Check exclusion patterns
const normalized = entry.replace(/\\/g, "/");
let excluded = false;
for (const excludePattern of effectiveExclude) {
const excludeGlob = new Glob(excludePattern);
if (excludeGlob.match(normalized)) {
excluded = true;
break;
}
}
if (!excluded) {
allResults.push(normalized);
}
}
}
return allResults;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/omp-stats",
"version": "8.12.1",
"version": "8.12.2",
"description": "Local observability dashboard for pi AI usage statistics",
"type": "module",
"main": "./src/index.ts",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@oh-my-pi/pi-tui",
"version": "8.12.1",
"version": "8.12.2",
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
"type": "module",
"main": "./src/index.ts",