@oh-my-pi/pi-coding-agent 15.11.6 → 15.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/dist/cli.js +114 -71
- package/dist/types/cli/bench-cli.d.ts +78 -0
- package/dist/types/commands/bench.d.ts +29 -0
- package/dist/types/config/model-resolver.d.ts +3 -2
- package/dist/types/config/settings-schema.d.ts +72 -0
- package/dist/types/edit/renderer.d.ts +1 -0
- package/dist/types/modes/components/oauth-selector.d.ts +10 -1
- package/dist/types/modes/components/settings-selector.d.ts +8 -1
- package/dist/types/modes/components/snapcompact-shape-preview.d.ts +31 -0
- package/dist/types/modes/components/tool-execution.d.ts +13 -9
- package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +3 -0
- package/dist/types/modes/setup-wizard/scenes/types.d.ts +10 -1
- package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +3 -0
- package/dist/types/session/snapcompact-inline.d.ts +2 -0
- package/dist/types/tools/bash.d.ts +2 -0
- package/dist/types/tools/eval-render.d.ts +1 -0
- package/dist/types/tools/renderers.d.ts +13 -0
- package/dist/types/tools/ssh.d.ts +1 -0
- package/package.json +11 -11
- package/src/cli/bench-cli.ts +437 -0
- package/src/cli-commands.ts +1 -0
- package/src/commands/bench.ts +42 -0
- package/src/config/model-registry.ts +52 -5
- package/src/config/model-resolver.ts +36 -5
- package/src/config/settings-schema.ts +92 -0
- package/src/edit/renderer.ts +5 -0
- package/src/hindsight/client.ts +26 -1
- package/src/hindsight/state.ts +6 -2
- package/src/internal-urls/docs-index.generated.ts +1 -1
- package/src/mcp/transports/stdio.ts +81 -7
- package/src/modes/components/oauth-selector.ts +67 -7
- package/src/modes/components/settings-selector.ts +27 -0
- package/src/modes/components/snapcompact-shape-preview-doc.md +11 -0
- package/src/modes/components/snapcompact-shape-preview.ts +192 -0
- package/src/modes/components/tool-execution.ts +18 -10
- package/src/modes/controllers/input-controller.ts +8 -6
- package/src/modes/controllers/selector-controller.ts +4 -2
- package/src/modes/interactive-mode.ts +24 -0
- package/src/modes/setup-wizard/index.ts +1 -0
- package/src/modes/setup-wizard/scenes/glyph.ts +24 -6
- package/src/modes/setup-wizard/scenes/providers.ts +36 -2
- package/src/modes/setup-wizard/scenes/sign-in.ts +10 -1
- package/src/modes/setup-wizard/scenes/theme.ts +28 -1
- package/src/modes/setup-wizard/scenes/types.ts +10 -1
- package/src/modes/setup-wizard/scenes/web-search.ts +22 -6
- package/src/modes/setup-wizard/wizard-overlay.ts +38 -1
- package/src/modes/utils/context-usage.ts +1 -1
- package/src/prompts/bench.md +7 -0
- package/src/sdk.ts +1 -0
- package/src/session/agent-session.ts +5 -0
- package/src/session/snapcompact-inline.ts +11 -19
- package/src/tools/bash.ts +3 -0
- package/src/tools/eval-render.ts +4 -0
- package/src/tools/renderers.ts +13 -0
- package/src/tools/ssh.ts +3 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ResolvedThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import type { Api, ApiKeyResolver, AssistantMessageEventStream, Context, Model, SimpleStreamOptions } from "@oh-my-pi/pi-ai";
|
|
3
|
+
import type { CanonicalModelVariant } from "@oh-my-pi/pi-catalog/identity";
|
|
4
|
+
import type { ApiKeyResolverModel } from "../config/api-key-resolver";
|
|
5
|
+
import { type CanonicalModelQueryOptions } from "../config/model-registry";
|
|
6
|
+
import { Settings } from "../config/settings";
|
|
7
|
+
export interface BenchCommandArgs {
|
|
8
|
+
models: string[];
|
|
9
|
+
flags: {
|
|
10
|
+
runs?: number;
|
|
11
|
+
maxTokens?: number;
|
|
12
|
+
prompt?: string;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface BenchModelRegistry {
|
|
17
|
+
getAll(): Model<Api>[];
|
|
18
|
+
getApiKey(model: Model<Api>, sessionId?: string): Promise<string | undefined>;
|
|
19
|
+
resolver(model: ApiKeyResolverModel, sessionId?: string): ApiKeyResolver;
|
|
20
|
+
resolveCanonicalModel?(canonicalId: string, options?: CanonicalModelQueryOptions): Model<Api> | undefined;
|
|
21
|
+
getCanonicalVariants?(canonicalId: string, options?: CanonicalModelQueryOptions): CanonicalModelVariant[];
|
|
22
|
+
getCanonicalId?(model: Model<Api>): string | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface BenchRuntime {
|
|
25
|
+
modelRegistry: BenchModelRegistry;
|
|
26
|
+
settings?: Settings;
|
|
27
|
+
close?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export interface BenchRunSuccess {
|
|
30
|
+
ok: true;
|
|
31
|
+
ttftMs: number;
|
|
32
|
+
durationMs: number;
|
|
33
|
+
outputTokens: number;
|
|
34
|
+
/** Generation throughput measured over the post-first-token window. */
|
|
35
|
+
tokensPerSecond: number;
|
|
36
|
+
}
|
|
37
|
+
export interface BenchRunFailure {
|
|
38
|
+
ok: false;
|
|
39
|
+
error: string;
|
|
40
|
+
}
|
|
41
|
+
export type BenchRunResult = BenchRunSuccess | BenchRunFailure;
|
|
42
|
+
export interface BenchAverages {
|
|
43
|
+
ttftMs: number;
|
|
44
|
+
durationMs: number;
|
|
45
|
+
outputTokens: number;
|
|
46
|
+
tokensPerSecond: number;
|
|
47
|
+
}
|
|
48
|
+
export interface BenchModelReport {
|
|
49
|
+
/** Selector as the user typed it (e.g. "opus" or "gemini-3.5:low"). */
|
|
50
|
+
selector: string;
|
|
51
|
+
/** Resolved `provider/id`. */
|
|
52
|
+
model: string;
|
|
53
|
+
/** Explicit thinking level from a `:level` selector suffix; undefined = provider default. */
|
|
54
|
+
thinking?: ResolvedThinkingLevel;
|
|
55
|
+
results: BenchRunResult[];
|
|
56
|
+
/** Averages over successful runs; null when every run failed. */
|
|
57
|
+
average: BenchAverages | null;
|
|
58
|
+
}
|
|
59
|
+
export interface BenchSummary {
|
|
60
|
+
runs: number;
|
|
61
|
+
maxTokens: number;
|
|
62
|
+
models: BenchModelReport[];
|
|
63
|
+
failures: number;
|
|
64
|
+
}
|
|
65
|
+
type BenchStreamSimple = (model: Model<Api>, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream;
|
|
66
|
+
export interface BenchDependencies {
|
|
67
|
+
createRuntime?: () => Promise<BenchRuntime>;
|
|
68
|
+
randomSessionId?: () => string;
|
|
69
|
+
writeStdout?: (text: string) => void;
|
|
70
|
+
writeStderr?: (text: string) => void;
|
|
71
|
+
setExitCode?: (code: number) => void;
|
|
72
|
+
streamSimple?: BenchStreamSimple;
|
|
73
|
+
now?: () => number;
|
|
74
|
+
stdoutIsTTY?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare function formatBenchTable(summary: BenchSummary): string;
|
|
77
|
+
export declare function runBenchCommand(command: BenchCommandArgs, deps?: BenchDependencies): Promise<BenchSummary>;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Command } from "@oh-my-pi/pi-utils/cli";
|
|
2
|
+
export default class Bench extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
models: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
6
|
+
description: string;
|
|
7
|
+
required: true;
|
|
8
|
+
multiple: true;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
static flags: {
|
|
12
|
+
runs: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"integer"> & {
|
|
13
|
+
description: string;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
"max-tokens": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"integer"> & {
|
|
17
|
+
description: string;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
prompt: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
json: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
static examples: string[];
|
|
28
|
+
run(): Promise<void>;
|
|
29
|
+
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Layering:
|
|
5
5
|
* - `matchModel` is the single matching engine. Order: exact `provider/id`
|
|
6
|
-
* reference (with OpenRouter routed/date fallbacks) →
|
|
7
|
-
* exact
|
|
6
|
+
* reference (with variant-alias and OpenRouter routed/date fallbacks) →
|
|
7
|
+
* exact canonical id → exact bare id → retired variant alias →
|
|
8
|
+
* provider-scoped fuzzy → substring with alias-vs-dated pick.
|
|
8
9
|
* - `parseModelPatternWithContext`/`parseModelPattern` layer the selector
|
|
9
10
|
* grammar on top: trailing `:level` thinking suffixes (`splitThinkingSuffix`)
|
|
10
11
|
* and `@upstream` provider routing (`splitUpstreamRouting`).
|
|
@@ -1771,6 +1771,78 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1771
1771
|
readonly description: "Experimental: render large historical tool results as dense PNG image(s) instead of text (vision models only). Saves tokens on accumulated read/search output.";
|
|
1772
1772
|
};
|
|
1773
1773
|
};
|
|
1774
|
+
readonly "snapcompact.shape": {
|
|
1775
|
+
readonly type: "enum";
|
|
1776
|
+
readonly values: readonly ["auto", ...("5x8-bw" | "5x8-sent" | "6x12-dim" | "6x6u-bw" | "6x6u-sent" | "8on16-bw" | "8x13-bw" | "8x8r-bw" | "8x8r-sent" | "8x8u-bw" | "8x8u-sent" | "doc-8on16-bw" | "doc-8on16-sent" | "doc-8on16-sent-dim")[]];
|
|
1777
|
+
readonly default: "auto";
|
|
1778
|
+
readonly ui: {
|
|
1779
|
+
readonly tab: "context";
|
|
1780
|
+
readonly group: "Experimental";
|
|
1781
|
+
readonly label: "Snapcompact Shape";
|
|
1782
|
+
readonly description: "Frame shape snapcompact prints text with (compaction archive and inline imaging). Auto picks a shape tuned for the current model.";
|
|
1783
|
+
readonly options: readonly [{
|
|
1784
|
+
readonly value: "auto";
|
|
1785
|
+
readonly label: "Auto";
|
|
1786
|
+
readonly description: "Picks a shape tuned for the current model, falling back to its provider family.";
|
|
1787
|
+
}, {
|
|
1788
|
+
readonly value: "8x8r-bw";
|
|
1789
|
+
readonly label: "8x8 repeated, black";
|
|
1790
|
+
readonly description: "unscii square cell, black ink, every line printed twice with the copy on a pale highlight band.";
|
|
1791
|
+
}, {
|
|
1792
|
+
readonly value: "8x8r-sent";
|
|
1793
|
+
readonly label: "8x8 repeated, sentence hues";
|
|
1794
|
+
readonly description: "Repeated grid with ink cycling six hues at sentence boundaries.";
|
|
1795
|
+
}, {
|
|
1796
|
+
readonly value: "8x8u-bw";
|
|
1797
|
+
readonly label: "8x8, black";
|
|
1798
|
+
readonly description: "Plain unscii square cell, single-printed lines, black ink.";
|
|
1799
|
+
}, {
|
|
1800
|
+
readonly value: "8x8u-sent";
|
|
1801
|
+
readonly label: "8x8, sentence hues";
|
|
1802
|
+
readonly description: "Plain unscii square cell with sentence-hue ink.";
|
|
1803
|
+
}, {
|
|
1804
|
+
readonly value: "6x6u-bw";
|
|
1805
|
+
readonly label: "6x6 dense, black";
|
|
1806
|
+
readonly description: "unscii squeezed to 6x6 — densest readable cell, fewest frames — in black ink.";
|
|
1807
|
+
}, {
|
|
1808
|
+
readonly value: "6x6u-sent";
|
|
1809
|
+
readonly label: "6x6 dense, sentence hues";
|
|
1810
|
+
readonly description: "Densest cell with sentence-hue ink.";
|
|
1811
|
+
}, {
|
|
1812
|
+
readonly value: "5x8-bw";
|
|
1813
|
+
readonly label: "5x8 legacy, black";
|
|
1814
|
+
readonly description: "Original X.org 5x8 glyphs on the 2576px frame, black ink.";
|
|
1815
|
+
}, {
|
|
1816
|
+
readonly value: "5x8-sent";
|
|
1817
|
+
readonly label: "5x8 legacy, sentence hues";
|
|
1818
|
+
readonly description: "The original snapcompact shape (pre-shape-table sessions rendered this).";
|
|
1819
|
+
}, {
|
|
1820
|
+
readonly value: "6x12-dim";
|
|
1821
|
+
readonly label: "6x12, dimmed stopwords";
|
|
1822
|
+
readonly description: "X.org 6x12 glyphs, black ink, function words dimmed gray.";
|
|
1823
|
+
}, {
|
|
1824
|
+
readonly value: "8x13-bw";
|
|
1825
|
+
readonly label: "8x13, black";
|
|
1826
|
+
readonly description: "X.org 8x13 glyphs, black ink.";
|
|
1827
|
+
}, {
|
|
1828
|
+
readonly value: "8on16-bw";
|
|
1829
|
+
readonly label: "8x13 on 16px pitch, black";
|
|
1830
|
+
readonly description: "8x13 glyphs on an 8x16 cell (extra leading), black ink.";
|
|
1831
|
+
}, {
|
|
1832
|
+
readonly value: "doc-8on16-bw";
|
|
1833
|
+
readonly label: "Doc 8on16, black";
|
|
1834
|
+
readonly description: "Two word-wrapped newspaper columns of 8x13 glyphs on a 16px pitch, black ink.";
|
|
1835
|
+
}, {
|
|
1836
|
+
readonly value: "doc-8on16-sent";
|
|
1837
|
+
readonly label: "Doc 8on16, sentence hues";
|
|
1838
|
+
readonly description: "Two-column doc layout with sentence-hue ink.";
|
|
1839
|
+
}, {
|
|
1840
|
+
readonly value: "doc-8on16-sent-dim";
|
|
1841
|
+
readonly label: "Doc 8on16, sentence hues + dimmed stopwords";
|
|
1842
|
+
readonly description: "Two-column doc layout, sentence-hue ink, function words dimmed gray.";
|
|
1843
|
+
}];
|
|
1844
|
+
};
|
|
1845
|
+
};
|
|
1774
1846
|
readonly "branchSummary.enabled": {
|
|
1775
1847
|
readonly type: "boolean";
|
|
1776
1848
|
readonly default: false;
|
|
@@ -93,6 +93,7 @@ export interface EditRenderContext {
|
|
|
93
93
|
}
|
|
94
94
|
export declare const editToolRenderer: {
|
|
95
95
|
mergeCallAndResult: boolean;
|
|
96
|
+
provisionalPendingPreview: boolean;
|
|
96
97
|
renderCall(args: EditRenderArgs, options: RenderResultOptions & {
|
|
97
98
|
renderContext?: EditRenderContext;
|
|
98
99
|
}, uiTheme: Theme): Component;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import { Container, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
2
2
|
import type { AuthStorage } from "../../session/auth-storage";
|
|
3
3
|
/**
|
|
4
4
|
* Component that renders an OAuth provider selector.
|
|
@@ -11,4 +11,13 @@ export declare class OAuthSelectorComponent extends Container {
|
|
|
11
11
|
});
|
|
12
12
|
stopValidation(): void;
|
|
13
13
|
handleInput(keyData: string): void;
|
|
14
|
+
/** Move the selection one step for a wheel notch (clamped, no wrap). */
|
|
15
|
+
handleWheel(delta: -1 | 1): void;
|
|
16
|
+
/**
|
|
17
|
+
* Route an SGR mouse report at component-local coordinates. Provider rows
|
|
18
|
+
* start LIST_ROW_OFFSET lines into the render; the ScrollView window shows
|
|
19
|
+
* #visibleCount rows from #scrollStart. Wheel moves the selection, motion
|
|
20
|
+
* drives the hover band, and a left click selects and confirms like Enter.
|
|
21
|
+
*/
|
|
22
|
+
routeMouse(event: SgrMouseEvent, line: number, _col: number): void;
|
|
14
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { Effort } from "@oh-my-pi/pi-ai";
|
|
3
|
-
import { type Component } from "@oh-my-pi/pi-tui";
|
|
3
|
+
import { type Component, type ImageBudget } from "@oh-my-pi/pi-tui";
|
|
4
|
+
import type { ShapeTarget } from "@oh-my-pi/snapcompact";
|
|
4
5
|
import { type SettingPath } from "../../config/settings";
|
|
5
6
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../config/settings-schema";
|
|
6
7
|
/**
|
|
@@ -16,6 +17,12 @@ export interface SettingsRuntimeContext {
|
|
|
16
17
|
availableThemes: string[];
|
|
17
18
|
/** Working directory for plugins tab */
|
|
18
19
|
cwd: string;
|
|
20
|
+
/** Active model (api + id); resolves what the snapcompact `auto` shape maps to. */
|
|
21
|
+
model?: ShapeTarget;
|
|
22
|
+
/** Shared TUI image budget (graphics ids + transmit-once) for image previews. */
|
|
23
|
+
imageBudget?: ImageBudget;
|
|
24
|
+
/** Schedules a re-render after async preview work completes. */
|
|
25
|
+
requestRender?: () => void;
|
|
19
26
|
}
|
|
20
27
|
/** Status line settings subset for preview */
|
|
21
28
|
export interface StatusLinePreviewSettings {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live preview for the `snapcompact.shape` setting: renders a sample session
|
|
3
|
+
* transcript through the real snapcompact rasterizer as a miniature page and
|
|
4
|
+
* shows it zoomed, so cell size, ink hues, highlight bands, and dim tool-result
|
|
5
|
+
* spans are legible at terminal scale.
|
|
6
|
+
*
|
|
7
|
+
* The mini-frame (a {@link SRC_FRAME_PX}px page) is upscaled with
|
|
8
|
+
* nearest-neighbor so the glyph pixels stay crisp when the terminal scales the
|
|
9
|
+
* placement box. Graphics display requires the Kitty unicode-placeholder path —
|
|
10
|
+
* `renderImage` returning `lines` is the gate — because the bordered settings
|
|
11
|
+
* frame re-fits every row, which direct cursor-positioned placements (iTerm2,
|
|
12
|
+
* Sixel, Kitty `a=p`) do not survive. Everything else falls back to the stats
|
|
13
|
+
* line plus a dim notice.
|
|
14
|
+
*/
|
|
15
|
+
import { type Component, type ImageBudget } from "@oh-my-pi/pi-tui";
|
|
16
|
+
import { type ShapeTarget } from "@oh-my-pi/snapcompact";
|
|
17
|
+
export interface SnapcompactShapePreviewOptions {
|
|
18
|
+
/** Active model (api + id); resolves what `auto` maps to for this reader. */
|
|
19
|
+
model?: ShapeTarget;
|
|
20
|
+
/** Shared TUI image budget: stable graphics ids, transmit-once, exit cleanup. */
|
|
21
|
+
imageBudget?: ImageBudget;
|
|
22
|
+
/** Schedules a re-render once an async sample render completes. */
|
|
23
|
+
requestRender?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare class SnapcompactShapePreview implements Component {
|
|
26
|
+
#private;
|
|
27
|
+
constructor(currentValue: string, options?: SnapcompactShapePreviewOptions);
|
|
28
|
+
/** Track the highlighted option; the next render reflects it. */
|
|
29
|
+
setValue(value: string): void;
|
|
30
|
+
render(width: number): readonly string[];
|
|
31
|
+
}
|
|
@@ -74,15 +74,19 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
74
74
|
isTranscriptBlockFinalized(): boolean;
|
|
75
75
|
/**
|
|
76
76
|
* Whether this still-live block's settled rows may enter native scrollback
|
|
77
|
-
* (see `FinalizableBlock.isTranscriptBlockCommitStable`).
|
|
78
|
-
*
|
|
79
|
-
* (edit
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
77
|
+
* (see `FinalizableBlock.isTranscriptBlockCommitStable`). Classification is
|
|
78
|
+
* per renderer (`ToolRenderer.provisionalPendingPreview`): tail-window
|
|
79
|
+
* streaming views (edit's streamed-diff tail, bash/ssh command caps, eval
|
|
80
|
+
* cells) are re-anchored top-first by the result render, so promoting
|
|
81
|
+
* their visually static head — e.g. an edit preview idling on its last
|
|
82
|
+
* frame while the apply + LSP pass runs — would strand a stale copy of
|
|
83
|
+
* the call box above the final block the moment the result lands. Every
|
|
84
|
+
* other pending preview streams top-anchored append-shaped rows the
|
|
85
|
+
* result render preserves (a task call's context/assignment markdown, a
|
|
86
|
+
* write's content), so it stays commit-eligible — a call taller than the
|
|
87
|
+
* viewport scrolls into native history mid-stream instead of reading as
|
|
88
|
+
* cut off until the result. Expanded blocks always stream top-anchored
|
|
89
|
+
* (the over-tall write/eval scrollback contract). Displaceable waiting
|
|
86
90
|
* polls are removed wholesale by the next poll and must never commit.
|
|
87
91
|
*/
|
|
88
92
|
isTranscriptBlockCommitStable(): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
1
2
|
import type { SetupSceneHost, SetupTab } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* "Sign in" panel: lets the user authenticate one or more model providers via
|
|
@@ -15,5 +16,7 @@ export declare class SignInTab implements SetupTab {
|
|
|
15
16
|
dispose(): void;
|
|
16
17
|
invalidate(): void;
|
|
17
18
|
handleInput(data: string): void;
|
|
19
|
+
/** Forward mouse to the provider selector; pointer is inert during an active login or code prompt. */
|
|
20
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
18
21
|
render(width: number): readonly string[];
|
|
19
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import type { Component, SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
2
2
|
import type { InteractiveModeContext } from "../../types";
|
|
3
3
|
export type SetupSceneResult = "done" | "skipped";
|
|
4
4
|
export interface SetupSceneHost {
|
|
@@ -14,6 +14,13 @@ export interface SetupSceneController extends Component {
|
|
|
14
14
|
onMount?(): void | Promise<void>;
|
|
15
15
|
onUnmount?(): void;
|
|
16
16
|
dispose?(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Route an SGR mouse report (tracking is on while the wizard holds the
|
|
19
|
+
* alternate screen). `line`/`col` are 0-based within this controller's
|
|
20
|
+
* last rendered output. When absent, the wizard falls back to synthesizing
|
|
21
|
+
* arrow keys from wheel notches.
|
|
22
|
+
*/
|
|
23
|
+
routeMouse?(event: SgrMouseEvent, line: number, col: number): void;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* A single panel inside a tabbed setup scene. The host scene owns the tab bar
|
|
@@ -32,6 +39,8 @@ export interface SetupTab {
|
|
|
32
39
|
invalidate(): void;
|
|
33
40
|
/** Called when the tab becomes active (including initial mount). */
|
|
34
41
|
onActivate?(): void;
|
|
42
|
+
/** Mouse routing at tab-local coordinates; see {@link SetupSceneController.routeMouse}. */
|
|
43
|
+
routeMouse?(event: SgrMouseEvent, line: number, col: number): void;
|
|
35
44
|
dispose(): void;
|
|
36
45
|
}
|
|
37
46
|
export interface SetupScene {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
1
2
|
import type { SetupSceneHost, SetupTab } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* "Web search" panel: picks the provider the web_search tool should prefer and
|
|
@@ -14,6 +15,8 @@ export declare class WebSearchTab implements SetupTab {
|
|
|
14
15
|
constructor(host: SetupSceneHost);
|
|
15
16
|
onActivate(): void;
|
|
16
17
|
handleInput(data: string): void;
|
|
18
|
+
/** Wheel moves the highlight; hover lights the row under the pointer; click confirms it. */
|
|
19
|
+
routeMouse(event: SgrMouseEvent, line: number, _col: number): void;
|
|
17
20
|
invalidate(): void;
|
|
18
21
|
dispose(): void;
|
|
19
22
|
render(width: number): readonly string[];
|
|
@@ -19,6 +19,8 @@ export type SnapcompactSystemPromptMode = "none" | "agents-md" | "all";
|
|
|
19
19
|
export interface SnapcompactInlineOptions {
|
|
20
20
|
renderSystemPrompt: SnapcompactSystemPromptMode;
|
|
21
21
|
renderToolResults: boolean;
|
|
22
|
+
/** Frame variant override; `"auto"`/omitted picks the provider's eval winner. */
|
|
23
|
+
shape?: snapcompact.ShapeVariantName | "auto";
|
|
22
24
|
}
|
|
23
25
|
/** Tool-result swap candidate, in context order. */
|
|
24
26
|
export interface InlineToolResultCandidate {
|
|
@@ -124,6 +124,7 @@ export declare function createShellRenderer<TArgs>(config: ShellRendererConfig<T
|
|
|
124
124
|
}, uiTheme: Theme, args?: TArgs): Component;
|
|
125
125
|
mergeCallAndResult: boolean;
|
|
126
126
|
inline: boolean;
|
|
127
|
+
provisionalPendingPreview: boolean;
|
|
127
128
|
};
|
|
128
129
|
export declare const bashToolRenderer: {
|
|
129
130
|
renderCall(args: BashRenderArgs, options: RenderResultOptions, uiTheme: Theme): Component;
|
|
@@ -139,5 +140,6 @@ export declare const bashToolRenderer: {
|
|
|
139
140
|
}, uiTheme: Theme, args?: BashRenderArgs | undefined): Component;
|
|
140
141
|
mergeCallAndResult: boolean;
|
|
141
142
|
inline: boolean;
|
|
143
|
+
provisionalPendingPreview: boolean;
|
|
142
144
|
};
|
|
143
145
|
export {};
|
|
@@ -21,5 +21,18 @@ export type ToolRenderer = {
|
|
|
21
21
|
mergeCallAndResult?: boolean;
|
|
22
22
|
/** Render without background box, inline in the response flow */
|
|
23
23
|
inline?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Collapsed pending preview is provisional — a tail-window or otherwise
|
|
26
|
+
* re-anchored view the result render replaces wholesale (an edit's
|
|
27
|
+
* streamed-diff tail, bash/ssh command caps, eval cells whose outputs
|
|
28
|
+
* interleave under each cell). Its rows must never commit to native
|
|
29
|
+
* scrollback mid-run; see
|
|
30
|
+
* `ToolExecutionComponent.isTranscriptBlockCommitStable`. Absent = the
|
|
31
|
+
* pending preview streams top-anchored append-shaped rows the result
|
|
32
|
+
* render preserves (task context/assignment, write content), which stay
|
|
33
|
+
* commit-eligible so a call taller than the viewport scrolls into history
|
|
34
|
+
* instead of reading as cut off.
|
|
35
|
+
*/
|
|
36
|
+
provisionalPendingPreview?: boolean;
|
|
24
37
|
};
|
|
25
38
|
export declare const toolRenderers: Record<string, ToolRenderer>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "15.11.
|
|
4
|
+
"version": "15.11.7",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"@agentclientprotocol/sdk": "0.22.1",
|
|
48
48
|
"@babel/parser": "^7.29.7",
|
|
49
49
|
"@mozilla/readability": "^0.6.0",
|
|
50
|
-
"@oh-my-pi/hashline": "15.11.
|
|
51
|
-
"@oh-my-pi/omp-stats": "15.11.
|
|
52
|
-
"@oh-my-pi/pi-agent-core": "15.11.
|
|
53
|
-
"@oh-my-pi/pi-ai": "15.11.
|
|
54
|
-
"@oh-my-pi/pi-catalog": "15.11.
|
|
55
|
-
"@oh-my-pi/pi-mnemopi": "15.11.
|
|
56
|
-
"@oh-my-pi/pi-natives": "15.11.
|
|
57
|
-
"@oh-my-pi/pi-tui": "15.11.
|
|
58
|
-
"@oh-my-pi/pi-utils": "15.11.
|
|
59
|
-
"@oh-my-pi/snapcompact": "15.11.
|
|
50
|
+
"@oh-my-pi/hashline": "15.11.7",
|
|
51
|
+
"@oh-my-pi/omp-stats": "15.11.7",
|
|
52
|
+
"@oh-my-pi/pi-agent-core": "15.11.7",
|
|
53
|
+
"@oh-my-pi/pi-ai": "15.11.7",
|
|
54
|
+
"@oh-my-pi/pi-catalog": "15.11.7",
|
|
55
|
+
"@oh-my-pi/pi-mnemopi": "15.11.7",
|
|
56
|
+
"@oh-my-pi/pi-natives": "15.11.7",
|
|
57
|
+
"@oh-my-pi/pi-tui": "15.11.7",
|
|
58
|
+
"@oh-my-pi/pi-utils": "15.11.7",
|
|
59
|
+
"@oh-my-pi/snapcompact": "15.11.7",
|
|
60
60
|
"@opentelemetry/api": "^1.9.1",
|
|
61
61
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
62
62
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|