@oh-my-pi/pi-coding-agent 15.9.3 → 15.9.67
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 +74 -1
- package/dist/types/cli/classify-install-target.d.ts +5 -1
- package/dist/types/config/keybindings.d.ts +4 -1
- package/dist/types/config/settings-schema.d.ts +24 -5
- package/dist/types/edit/file-snapshot-store.d.ts +1 -1
- package/dist/types/eval/__tests__/kernel-spawn.test.d.ts +1 -0
- package/dist/types/eval/backend.d.ts +6 -6
- package/dist/types/eval/bridge-timeout.d.ts +27 -0
- package/dist/types/eval/idle-timeout.d.ts +16 -14
- package/dist/types/eval/js/executor.d.ts +3 -3
- package/dist/types/eval/py/executor.d.ts +2 -2
- package/dist/types/eval/py/spawn-options.d.ts +58 -0
- package/dist/types/modes/components/assistant-message.d.ts +16 -0
- package/dist/types/modes/components/copy-selector.d.ts +22 -0
- package/dist/types/modes/components/custom-editor.d.ts +3 -1
- package/dist/types/modes/components/error-banner.d.ts +11 -0
- package/dist/types/modes/components/model-selector.d.ts +1 -0
- package/dist/types/modes/components/tool-execution.d.ts +15 -0
- package/dist/types/modes/components/transcript-container.d.ts +1 -0
- package/dist/types/modes/components/user-message.d.ts +1 -1
- package/dist/types/modes/controllers/command-controller.d.ts +0 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/image-references.d.ts +17 -0
- package/dist/types/modes/interactive-mode.d.ts +8 -1
- package/dist/types/modes/types.d.ts +8 -1
- package/dist/types/modes/utils/copy-targets.d.ts +53 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -0
- package/dist/types/session/blob-store.d.ts +12 -11
- package/dist/types/session/session-manager.d.ts +5 -3
- package/dist/types/system-prompt.d.ts +2 -0
- package/dist/types/tiny/title-client.d.ts +16 -1
- package/dist/types/tool-discovery/mode.d.ts +8 -0
- package/dist/types/tools/archive-reader.d.ts +5 -1
- package/dist/types/tools/eval-render.d.ts +8 -0
- package/dist/types/tools/render-utils.d.ts +25 -0
- package/dist/types/tui/code-cell.d.ts +6 -0
- package/dist/types/tui/hyperlink.d.ts +12 -0
- package/dist/types/tui/output-block.d.ts +11 -0
- package/dist/types/web/search/render.d.ts +1 -2
- package/package.json +9 -9
- package/src/autoresearch/dashboard.ts +11 -21
- package/src/cli/classify-install-target.ts +31 -5
- package/src/cli/claude-trace-cli.ts +13 -1
- package/src/cli/plugin-cli.ts +45 -0
- package/src/cli/web-search-cli.ts +0 -1
- package/src/config/keybindings.ts +58 -1
- package/src/config/model-registry.ts +54 -4
- package/src/config/settings-schema.ts +25 -5
- package/src/debug/raw-sse.ts +18 -4
- package/src/edit/file-snapshot-store.ts +1 -1
- package/src/edit/index.ts +1 -1
- package/src/edit/renderer.ts +7 -7
- package/src/edit/streaming.ts +1 -1
- package/src/eval/__tests__/agent-bridge.test.ts +100 -27
- package/src/eval/__tests__/bridge-timeout.test.ts +64 -0
- package/src/eval/__tests__/idle-timeout.test.ts +26 -12
- package/src/eval/__tests__/kernel-spawn.test.ts +103 -0
- package/src/eval/__tests__/llm-bridge.test.ts +10 -10
- package/src/eval/__tests__/shared-executors.test.ts +2 -2
- package/src/eval/agent-bridge.ts +4 -5
- package/src/eval/backend.ts +6 -6
- package/src/eval/bridge-timeout.ts +44 -0
- package/src/eval/idle-timeout.ts +33 -15
- package/src/eval/js/executor.ts +10 -10
- package/src/eval/llm-bridge.ts +4 -5
- package/src/eval/py/executor.ts +6 -6
- package/src/eval/py/kernel.ts +11 -1
- package/src/eval/py/spawn-options.ts +126 -0
- package/src/eval/py/tool-bridge.ts +43 -5
- package/src/export/ttsr.ts +9 -0
- package/src/extensibility/custom-commands/bundled/ci-green/index.ts +31 -2
- package/src/extensibility/extensions/runner.ts +2 -0
- package/src/internal-urls/docs-index.generated.ts +9 -8
- package/src/lsp/client.ts +80 -2
- package/src/lsp/index.ts +38 -4
- package/src/lsp/render.ts +3 -3
- package/src/main.ts +8 -2
- package/src/modes/components/agent-dashboard.ts +13 -4
- package/src/modes/components/assistant-message.ts +44 -1
- package/src/modes/components/copy-selector.ts +249 -0
- package/src/modes/components/custom-editor.ts +14 -2
- package/src/modes/components/error-banner.ts +33 -0
- package/src/modes/components/extensions/extension-list.ts +17 -8
- package/src/modes/components/history-search.ts +19 -11
- package/src/modes/components/model-selector.ts +125 -29
- package/src/modes/components/oauth-selector.ts +28 -12
- package/src/modes/components/session-observer-overlay.ts +13 -15
- package/src/modes/components/session-selector.ts +24 -13
- package/src/modes/components/tool-execution.ts +71 -13
- package/src/modes/components/transcript-container.ts +93 -32
- package/src/modes/components/tree-selector.ts +19 -7
- package/src/modes/components/user-message-selector.ts +25 -14
- package/src/modes/components/user-message.ts +9 -2
- package/src/modes/controllers/command-controller.ts +0 -116
- package/src/modes/controllers/event-controller.ts +67 -12
- package/src/modes/controllers/input-controller.ts +33 -1
- package/src/modes/controllers/selector-controller.ts +38 -1
- package/src/modes/image-references.ts +111 -0
- package/src/modes/interactive-mode.ts +52 -17
- package/src/modes/theme/theme.ts +46 -10
- package/src/modes/types.ts +11 -2
- package/src/modes/utils/copy-targets.ts +254 -0
- package/src/modes/utils/ui-helpers.ts +23 -2
- package/src/prompts/ci-green-request.md +5 -3
- package/src/prompts/system/project-prompt.md +1 -0
- package/src/prompts/tools/ast-edit.md +1 -1
- package/src/prompts/tools/ast-grep.md +1 -1
- package/src/prompts/tools/read.md +1 -1
- package/src/prompts/tools/search.md +1 -1
- package/src/sdk.ts +17 -9
- package/src/session/agent-session.ts +43 -14
- package/src/session/blob-store.ts +96 -9
- package/src/session/session-manager.ts +19 -10
- package/src/slash-commands/builtin-registry.ts +3 -11
- package/src/system-prompt.ts +4 -0
- package/src/task/render.ts +38 -11
- package/src/tiny/title-client.ts +7 -1
- package/src/tool-discovery/mode.ts +24 -0
- package/src/tools/archive-reader.ts +339 -31
- package/src/tools/bash.ts +18 -8
- package/src/tools/browser/render.ts +5 -4
- package/src/tools/debug.ts +3 -3
- package/src/tools/eval-render.ts +24 -9
- package/src/tools/eval.ts +14 -19
- package/src/tools/fetch.ts +34 -14
- package/src/tools/gh.ts +65 -11
- package/src/tools/index.ts +6 -8
- package/src/tools/read.ts +65 -19
- package/src/tools/render-utils.ts +46 -0
- package/src/tools/search-tool-bm25.ts +4 -6
- package/src/tools/search.ts +60 -11
- package/src/tools/ssh.ts +21 -8
- package/src/tools/write.ts +17 -8
- package/src/tui/code-cell.ts +19 -4
- package/src/tui/hyperlink.ts +42 -7
- package/src/tui/output-block.ts +14 -0
- package/src/web/search/index.ts +2 -2
- package/src/web/search/render.ts +23 -55
- package/dist/types/eval/heartbeat.d.ts +0 -45
- package/src/eval/__tests__/heartbeat.test.ts +0 -84
- package/src/eval/heartbeat.ts +0 -74
- /package/dist/types/eval/__tests__/{heartbeat.test.d.ts → bridge-timeout.test.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,79 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [15.9.67] - 2026-06-06
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added `timeout-pause` and `timeout-resume` eval bridge status events emitted around `agent()`/`llm()` operations
|
|
9
|
+
- Added a `/copy` picker: `/copy` now opens a fullscreen, outlined tree of recent assistant messages with their code blocks nested beneath (like `/tree`). Navigate with ↑↓, and Enter copies the highlighted node — a whole message, an individual code block, "All N blocks", or a bash/eval command interleaved with the assistant turn that issued it. A live preview pane shows the selected target, wrapping prose and syntax-highlighting code/commands.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Changed eval timeout accounting so delegated bridge calls now suspend the cell watchdog and start a fresh timeout window when runtime control returns
|
|
14
|
+
- Changed `IdleTimeout` to support reference-counted pauses so overlapping delegated bridge calls keep timeout paused until all calls complete
|
|
15
|
+
- Changed the default `app.message.followUp` binding from `Ctrl+Enter` alone to `[Ctrl+Q, Ctrl+Enter]` so the follow-up shortcut works in Windows Terminal, which does not deliver a distinct `Ctrl+Enter` event to console apps. `Ctrl+Q` mirrors the GitHub Copilot CLI default for the same action; existing remaps in `~/.omp/agent/keybindings.yml` are untouched, and if another user-remapped action already claims `Ctrl+Q`, that user binding wins while follow-up keeps `Ctrl+Enter`. `Ctrl+Q` is also reserved by `ExtensionRunner` so an extension cannot register that chord and be silently overwritten by the built-in follow-up handler ([#1903](https://github.com/can1357/oh-my-pi/issues/1903)).
|
|
16
|
+
- Changed all scrollable TUI pickers and viewports to render through the shared `ScrollView` right-edge scrollbar for a uniform look, replacing their ad-hoc `(N/M)` / `[a-b/total]` text indicators (search hints and the tree filter-mode label are preserved). Covers the session/resume picker, model selector, OAuth provider selector, history search, session tree selector, agent dashboard list, extension list, user-message selector, the raw SSE debug viewer, the autoresearch dashboard overlay, and the session observer overlay.
|
|
17
|
+
- Changed the `/model` and `/switch` selectors to dim and skip models whose context windows are smaller than the current chat context.
|
|
18
|
+
- Changed `/copy` command targets to appear inline with recent assistant messages instead of as a separate "Last bash command" row at the end of the picker.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Fixed the idle `Working...` loader freezing on ED3-risk terminals with unobservable native scrollback by keeping foreground live-region rendering enabled from `agent_start` until `agent_end`, before the first assistant or tool event arrives.
|
|
23
|
+
- Fixed framed tool output blocks rendering one column inset inside tool boxes; modern bordered blocks now span the same width as legacy background-filled tool boxes.
|
|
24
|
+
- Fixed potential `TimeoutError` aborts for short `timeout` eval cells during long bridged `agent()`/`llm()` work where no progress events are emitted until completion
|
|
25
|
+
- Fixed retry recovery to allow automatic retries without switching models when `retry.modelFallback` is disabled.
|
|
26
|
+
- Fixed `ttsr.enabled: false` being ignored at runtime. TTSR rules were still being registered with `TtsrManager.addRule` and matched against stream deltas even when the global toggle was off, so disabling TTSR did not suppress rule injection or stream abort. The manager now gates `addRule`, `hasRules`, and `#matchBuffer` on the enabled flag, so disabling fully short-circuits the TTSR path. Condition rules fall through to the rulebook bucket instead of being silently swallowed. ([#1767](https://github.com/can1357/oh-my-pi/issues/1767))
|
|
27
|
+
- Fixed the Python eval kernel hanging on Windows during `import pandas` / `import numpy`, with SIGINT unable to recover the cell. `PythonKernel.start()` spawned the runner with `windowsHide: true`, which in Bun maps to the Win32 `CREATE_NO_WINDOW` flag and detaches the long-lived child from any inherited console — so native extensions like `numpy/_core/_multiarray_umath.pyd` (and its bundled OpenBLAS/SLEEF thread-pool init) could deadlock inside `LoadLibraryExW`, and `GenerateConsoleCtrlEvent`-based SIGINT delivery silently became a no-op. The kernel now hides its window only when the host itself has no console to share (service / piped launch); an interactive TUI launch lets the kernel inherit the parent's console, matching the behavior of `python.exe` invoked from `cmd.exe` ([#1960](https://github.com/can1357/oh-my-pi/issues/1960)).
|
|
28
|
+
- Fixed `task` renderer crashing the TUI with `TypeError: completeData?.map is not a function` when a subagent's `extractedToolData.yield` slot held a non-array value. `renderAgentResult` (and the live-progress sibling) cast the slot to `Array<{ data }>` and called `?.map`, but optional chaining short-circuits only on `null`/`undefined`, so a plain object made `.map` `undefined` and threw — taking down every `review` task render. Both sites now go through `normalizeYieldData`, which wraps a single object as a 1-element array and drops primitives ([#1987](https://github.com/can1357/oh-my-pi/issues/1987))
|
|
29
|
+
- Fixed `sdk-async-job-manager-singleton` tests flaking under the full parallel suite. The four `createAgentSession`-based cases ran on the default 5000ms per-test timeout, which two real session startups can exceed when `test:ts` saturates the machine across packages; on timeout the still-running test body and `afterEach` reset raced, surfacing a spurious "Unhandled error between tests" on the `AsyncJobManager.instance()` assertion. They now carry an explicit 60000ms timeout, matching the convention used by the other session-creating tests in this suite.
|
|
30
|
+
- Fixed streaming `eval`, `bash`, `ssh`, and `task` call previews overflowing the live transcript viewport and cutting off their top while pending. A volatile tool block taller than the viewport could strand its scrolled-off head out of native scrollback on ED3-risk terminals (committed nowhere, repainted nowhere) until the result landed. The pending `eval` source preview now follows the streaming edge in a bounded 12-line tail window (newest lines pinned to the bottom, "… N earlier lines" on top) so you can watch the code being written without the box overflowing; `bash`/`ssh` commands and `task` context use a bounded head+tail window. `Ctrl+O` still lifts the cap for a full view.
|
|
31
|
+
- Fixed the streaming `write` call preview ignoring `Ctrl+O` so the expand toggle was a no-op while a file was being written. Unlike the `eval`/`bash`/`ssh`/`task` streaming previews, `formatStreamingContent` never received the `expanded` flag, leaving the preview pinned to a bounded 12-line tail window even after pressing `Ctrl+O` — so on a large write you could not widen past the streaming edge until the tool result landed. The preview now lifts the cap to the full file (head through tail) when expanded, matching the documented streaming-preview behavior of the other tools.
|
|
32
|
+
- Fixed turn-ending provider errors rendering twice — once as the transcript's inline `Error: …` line and again in the pinned banner above the editor (added in 15.9.5). The inline line is now suppressed while the same error is mirrored in the banner and restored to the transcript when the banner clears at the next turn, so the error stays in history without the duplicate render at the error moment.
|
|
33
|
+
|
|
34
|
+
### Removed
|
|
35
|
+
|
|
36
|
+
- Removed the `/copy last|code|all|cmd` subcommands; every copy target is now reachable by picking it in the `/copy` tree.
|
|
37
|
+
|
|
38
|
+
## [15.9.5] - 2026-06-05
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Added a persistent error banner pinned above the editor when an assistant turn ends on a provider error (e.g. Anthropic's "Output blocked by content filtering policy"). The transcript `Error: …` line scrolls away as the conversation grows, so terminal turns that ended on a stream error could pass unnoticed; the banner stays in the fixed region above the input and is cleared when the next turn starts.
|
|
43
|
+
|
|
44
|
+
- Added bold, underlined, clickable `[Image #N]` placeholders in the draft editor and sent user-message bubbles, backed by extension-bearing blob-store sidecar files so terminal `file://` links open in image viewers.
|
|
45
|
+
- Added the active model identifier (`provider/id`) to the system prompt's `<workstation>` block so the agent knows which model it is running as. Gated by the new `includeModelInPrompt` setting (default on); the base prompt is rebuilt on a mid-session model switch so the surfaced identifier stays current.
|
|
46
|
+
- Added `OLLAMA_HOST` support for implicit local Ollama discovery when `OLLAMA_BASE_URL` is unset, so OMP picks up the same host setting used by Ollama.
|
|
47
|
+
- Added `OLLAMA_CONTEXT_LENGTH` as a positive-integer context-window override for implicit local Ollama discovery, so users can correct OMP context budgeting without writing per-model overrides.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- Changed `tools.discoveryMode` to default to `auto`, which keeps discovery off for small tool sets and automatically switches to MCP-only tool discovery when more than 40 tools are registered.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- Fixed user-message rendering to materialize image links from embedded image blocks when rebuilding chat output, so image placeholders remain clickable after replayed or restored messages
|
|
56
|
+
- Fixed queued/steering user messages carrying a pasted image rendering out of order — sometimes dropping the user bubble *below* the very tool output it was sent to steer. `EventController.#handleMessageStart` awaited async image-link materialization between the user `message_start` and `addMessageToChat`; since `AgentSession.#emit` dispatches TUI listeners fire-and-forget, that mid-handler yield let the next synchronously-handled events (assistant `message_start`, tool execution start/end) append their components first, scrambling transcript order and live-region block boundaries. The bubble is now appended synchronously, with clickable image links still materialized via the synchronous blob-store fallback.
|
|
57
|
+
- Fixed tool execution cards to finalize promptly when a turn is abandoned or completed so stale streaming previews and frozen spinner frames no longer keep transcript rows in the live region
|
|
58
|
+
- Fixed `read` and `search` TUI rendering to emit OSC 8 hyperlinks for HTTP URLs, `local://` resources backed by files, and filesystem search targets, including line-specific links for search match rows.
|
|
59
|
+
- Fixed aborted streaming assistant messages staying frozen before their red "Operation aborted" label when status rows were appended underneath on ED3-risk terminals.
|
|
60
|
+
- Fixed `omp` / `omp -c` stacking a fresh welcome screen and transcript on top of the previous run's leftover terminal scrollback. The cold-launch transcript render was the only session-load path that did not pass `clearTerminalHistory`, so the TUI's scrollback-preserving initial paint left the prior run's welcome + conversation above the new one; the cold launch now clears native scrollback before painting, matching every in-process session switch.
|
|
61
|
+
- Fixed a long streamed assistant reply dropping its earlier lines on ED3-risk terminals (Ghostty/kitty/iTerm2) once it grew past the viewport — the head scrolled off the top and never reached scrollback, so the reply rendered as a ~viewport-tall circular buffer of only its latest lines. `AssistantMessageComponent` now reports itself as an append-only transcript block and `TranscriptContainer` surfaces the resulting commit-safe boundary, so the renderer commits the scrolled-off head to native scrollback instead of discarding it (volatile tool previews stay deferred as before).
|
|
62
|
+
|
|
63
|
+
### Security
|
|
64
|
+
|
|
65
|
+
- Blocked OSC 8 hyperlink wrapping for URI targets containing terminal control bytes to avoid rendering malformed control-sequence links
|
|
66
|
+
|
|
67
|
+
## [15.9.4] - 2026-06-05
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- Fixed chat transcript updates after submitting input so frozen scrollback is only thawed when native scrollback replay succeeds, preventing misplaced or duplicated rows when the viewport is not at the tail
|
|
72
|
+
- Fixed `read` of `.zip` archives to list the central directory without inflating every member, so large or corrupt zip payloads no longer freeze directory reads; member contents are inflated only when a specific entry is read.
|
|
73
|
+
- Fixed the Python `eval` kernel being hard-killed (and its persistent session state lost) when a cell blocked in `parallel()` / `agent()` was interrupted. Each `agent()`/`tool.*` call blocks a kernel worker thread in a synchronous `urllib` request to the host bridge, and `parallel()`'s `ThreadPoolExecutor` exit joins those threads — so the kernel cannot unwind a `KeyboardInterrupt` until every in-flight bridge call returns. A wide subagent fan-out's teardown routinely outlasted the kernel's 5s SIGINT-escalation window, so the kernel was force-killed (surfacing `[kernel] Python kernel shutdown`) while the subagents were still winding down. The host bridge now resolves an in-flight call the instant the cell's signal aborts, so the kernel unwinds cleanly and keeps its state; the already-signaled subagent continues tearing down in the background.
|
|
74
|
+
- Fixed `github` tool `run_watch` op ignoring the explicit `repo` argument and silently watching the cwd-inferred repository in nested/umbrella workspaces. `executeRunWatch` passed `undefined` for the user-supplied `repo` to `resolveGitHubRepo`, so a call like `{op: "run_watch", repo: "owner/cxf", branch: "main"}` fell back to `gh repo view` in cwd and streamed `watching <sha> on <cwd-repo>` against the wrong repository. The explicit `repo` now takes precedence over the cwd inference, and the no-`branch`/no-`run` path refuses to derive the watched commit from `git HEAD` unless the cwd actually points at the resolved repo — otherwise it raises a `ToolError` telling the caller to pass `branch` or `run` instead of silently rebinding to an unrelated commit ([#1949](https://github.com/can1357/oh-my-pi/issues/1949)).
|
|
75
|
+
- Fixed `omp plugin install <local-path>` failing with `Invalid package name: .` (and similar) for cwd-relative (`.`, `./pkg`), absolute (`/abs`, `C:\…`, `\\unc`), and tilde-prefixed (`~/pkg`) specs. `classifyInstallTarget` now returns a `local` arm in addition to `marketplace`/`npm`, and `plugin install` routes those specs to `PluginManager.link()` — the same code path as `omp plugin link`. ([#1945](https://github.com/can1357/oh-my-pi/issues/1945))
|
|
76
|
+
- Fixed the `web_search` result renderer capping the synthesized answer at 12 lines even when expanded, while the Sources list expanded in full — so a long answer stayed truncated ("… N more lines") after `Ctrl+O`, making the expand toggle look like a no-op and dwarfing the answer next to its sources. The answer now renders the full text (markdown-formatted) when expanded and a short markdown preview when collapsed, matching the sources' collapse/expand behavior. The answer is also rendered through the Markdown component instead of dimmed raw lines, so headings, bold, lists, and code in the answer display formatted.
|
|
77
|
+
|
|
5
78
|
## [15.9.3] - 2026-06-05
|
|
6
79
|
|
|
7
80
|
### Fixed
|
|
@@ -9361,4 +9434,4 @@ Initial public release.
|
|
|
9361
9434
|
- Git branch display in footer
|
|
9362
9435
|
- Message queueing during streaming responses
|
|
9363
9436
|
- OAuth integration for Gmail and Google Calendar access
|
|
9364
|
-
- HTML export with syntax highlighting and collapsible sections
|
|
9437
|
+
- HTML export with syntax highlighting and collapsible sections
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ClassifiedInstallTarget = {
|
|
2
|
+
type: "local";
|
|
3
|
+
path: string;
|
|
4
|
+
} | {
|
|
2
5
|
type: "marketplace";
|
|
3
6
|
name: string;
|
|
4
7
|
marketplace: string;
|
|
@@ -6,3 +9,4 @@ export declare function classifyInstallTarget(spec: string, knownMarketplaces: S
|
|
|
6
9
|
type: "npm";
|
|
7
10
|
spec: string;
|
|
8
11
|
};
|
|
12
|
+
export declare function classifyInstallTarget(spec: string, knownMarketplaces: Set<string>): ClassifiedInstallTarget;
|
|
@@ -224,7 +224,7 @@ export declare const KEYBINDINGS: {
|
|
|
224
224
|
readonly description: "Open external editor";
|
|
225
225
|
};
|
|
226
226
|
readonly "app.message.followUp": {
|
|
227
|
-
readonly defaultKeys: "ctrl+enter";
|
|
227
|
+
readonly defaultKeys: ["ctrl+q", "ctrl+enter"];
|
|
228
228
|
readonly description: "Send follow-up message";
|
|
229
229
|
};
|
|
230
230
|
readonly "app.message.dequeue": {
|
|
@@ -329,6 +329,9 @@ export declare class KeybindingsManager extends TuiKeybindingsManager {
|
|
|
329
329
|
* Reload keybindings from the config file.
|
|
330
330
|
*/
|
|
331
331
|
reload(): void;
|
|
332
|
+
setUserBindings(userBindings: KeybindingsConfig): void;
|
|
333
|
+
getKeys(keybinding: Keybinding): KeyId[];
|
|
334
|
+
getResolvedBindings(): KeybindingsConfig;
|
|
332
335
|
/**
|
|
333
336
|
* Get the effective resolved bindings (defaults + user overrides).
|
|
334
337
|
*/
|
|
@@ -659,7 +659,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
659
659
|
readonly ui: {
|
|
660
660
|
readonly tab: "appearance";
|
|
661
661
|
readonly label: "Terminal Hyperlinks";
|
|
662
|
-
readonly description: "Wrap
|
|
662
|
+
readonly description: "Wrap paths and URLs in OSC 8 hyperlinks for terminal-native click-to-open (auto: detect support; off: never; always: unconditional)";
|
|
663
663
|
};
|
|
664
664
|
};
|
|
665
665
|
readonly "display.tabWidth": {
|
|
@@ -745,6 +745,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
745
745
|
readonly description: "Render full tool descriptions in the system prompt instead of a tool name list";
|
|
746
746
|
};
|
|
747
747
|
};
|
|
748
|
+
readonly includeModelInPrompt: {
|
|
749
|
+
readonly type: "boolean";
|
|
750
|
+
readonly default: true;
|
|
751
|
+
readonly ui: {
|
|
752
|
+
readonly tab: "model";
|
|
753
|
+
readonly label: "Include Model In Prompt";
|
|
754
|
+
readonly description: "Surface the active model identifier in the system prompt so the agent knows which model it is";
|
|
755
|
+
};
|
|
756
|
+
};
|
|
748
757
|
readonly temperature: {
|
|
749
758
|
readonly type: "number";
|
|
750
759
|
readonly default: -1;
|
|
@@ -1018,6 +1027,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1018
1027
|
readonly description: "Maximum wait between retries, in ms. When the provider asks us to wait longer than this and no credential or model fallback succeeds, the request fails fast instead of sleeping (e.g. 3-hour Anthropic rate-limit windows).";
|
|
1019
1028
|
};
|
|
1020
1029
|
};
|
|
1030
|
+
readonly "retry.modelFallback": {
|
|
1031
|
+
readonly type: "boolean";
|
|
1032
|
+
readonly default: true;
|
|
1033
|
+
readonly ui: {
|
|
1034
|
+
readonly tab: "model";
|
|
1035
|
+
readonly label: "Retry Model Fallback";
|
|
1036
|
+
readonly description: "Allow retry recovery to switch to configured fallback models";
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1021
1039
|
readonly "retry.fallbackChains": {
|
|
1022
1040
|
readonly type: "record";
|
|
1023
1041
|
readonly default: Record<string, string[]>;
|
|
@@ -2177,7 +2195,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2177
2195
|
readonly ui: {
|
|
2178
2196
|
readonly tab: "editing";
|
|
2179
2197
|
readonly label: "Hash Lines";
|
|
2180
|
-
readonly description: "Include snapshot-tag headers and line numbers in read output for hashline edit mode (
|
|
2198
|
+
readonly description: "Include snapshot-tag headers and line numbers in read output for hashline edit mode ([PATH#TAG] plus LINE:content)";
|
|
2181
2199
|
};
|
|
2182
2200
|
};
|
|
2183
2201
|
readonly "read.defaultLimit": {
|
|
@@ -2828,12 +2846,12 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2828
2846
|
};
|
|
2829
2847
|
readonly "tools.discoveryMode": {
|
|
2830
2848
|
readonly type: "enum";
|
|
2831
|
-
readonly values: readonly ["off", "mcp-only", "all"];
|
|
2832
|
-
readonly default: "
|
|
2849
|
+
readonly values: readonly ["auto", "off", "mcp-only", "all"];
|
|
2850
|
+
readonly default: "auto";
|
|
2833
2851
|
readonly ui: {
|
|
2834
2852
|
readonly tab: "tools";
|
|
2835
2853
|
readonly label: "Tool Discovery";
|
|
2836
|
-
readonly description: "Hide tools behind a search tool to save tokens. 'mcp-only' hides MCP tools; 'all' hides all non-essential built-ins too.";
|
|
2854
|
+
readonly description: "Hide tools behind a search tool to save tokens. 'auto' hides MCP tools once the tool set has more than 40 tools; 'mcp-only' always hides MCP tools; 'all' hides all non-essential built-ins too.";
|
|
2837
2855
|
};
|
|
2838
2856
|
};
|
|
2839
2857
|
readonly "tools.essentialOverride": {
|
|
@@ -3893,6 +3911,7 @@ export interface RetrySettings {
|
|
|
3893
3911
|
maxRetries: number;
|
|
3894
3912
|
baseDelayMs: number;
|
|
3895
3913
|
maxDelayMs: number;
|
|
3914
|
+
modelFallback: boolean;
|
|
3896
3915
|
}
|
|
3897
3916
|
export interface MemoriesSettings {
|
|
3898
3917
|
enabled: boolean;
|
|
@@ -12,7 +12,7 @@ import { InMemorySnapshotStore } from "@oh-my-pi/hashline";
|
|
|
12
12
|
/**
|
|
13
13
|
* Upper bound on the file size we snapshot. A section tag is a content hash of
|
|
14
14
|
* the *whole* file, so minting one means holding the full normalized text in
|
|
15
|
-
* the store. Files above this cap emit no
|
|
15
|
+
* the store. Files above this cap emit no `[path#tag]` header — line-anchored
|
|
16
16
|
* editing of multi-megabyte files is out of scope under the full-content model.
|
|
17
17
|
*/
|
|
18
18
|
export declare const SNAPSHOT_MAX_BYTES: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,12 +9,12 @@ export interface ExecutorBackendExecOptions {
|
|
|
9
9
|
signal?: AbortSignal;
|
|
10
10
|
session: ToolSession;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* driven entirely by `signal`, which the eval tool arms as
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* and as cold-start headroom; they MUST
|
|
17
|
-
* timer from it.
|
|
12
|
+
* Runtime-work budget in milliseconds (the cell's `timeout`). Cancellation is
|
|
13
|
+
* driven entirely by `signal`, which the eval tool arms as a watchdog that
|
|
14
|
+
* pauses on bridge timeout-control status events and fires a `TimeoutError`
|
|
15
|
+
* reason only while the Python/JS runtime owns control. Backends use this
|
|
16
|
+
* value only for timeout-annotation text and as cold-start headroom; they MUST
|
|
17
|
+
* NOT derive a competing wall-clock timer from it.
|
|
18
18
|
*/
|
|
19
19
|
idleTimeoutMs: number;
|
|
20
20
|
reset: boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timeout suspension for in-flight host-side eval bridge calls.
|
|
3
|
+
*
|
|
4
|
+
* The eval watchdog caps a cell's `timeout` as a budget on the cell runtime's
|
|
5
|
+
* own work. Host-side `agent()` / `parallel()` / `llm()` bridge calls hand
|
|
6
|
+
* control to the outer TypeScript process, where the Python kernel or JS VM is
|
|
7
|
+
* only waiting for a result. While that delegated work is in flight, the cell
|
|
8
|
+
* timeout must be ignored completely; once the bridge returns and the runtime is
|
|
9
|
+
* back in control, the watchdog starts a fresh timeout window.
|
|
10
|
+
*
|
|
11
|
+
* Bridge helpers express that handoff with synthetic pause/resume status events
|
|
12
|
+
* on the existing `emitStatus → onStatus` path. Consumers MUST treat these as
|
|
13
|
+
* timeout-control events only: update the watchdog and drop them from rendered
|
|
14
|
+
* or persisted cell output.
|
|
15
|
+
*/
|
|
16
|
+
import type { JsStatusEvent } from "./js/shared/types";
|
|
17
|
+
/** Synthetic status op emitted when a bridge call leaves the cell runtime. */
|
|
18
|
+
export declare const EVAL_TIMEOUT_PAUSE_OP = "timeout-pause";
|
|
19
|
+
/** Synthetic status op emitted when a bridge call returns control to the runtime. */
|
|
20
|
+
export declare const EVAL_TIMEOUT_RESUME_OP = "timeout-resume";
|
|
21
|
+
/** Whether a status event is pure eval-timeout control and should not render. */
|
|
22
|
+
export declare function isEvalTimeoutControlEvent(event: JsStatusEvent): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Run {@link operation} while suspending the eval watchdog through
|
|
25
|
+
* {@link emitStatus}. A no-op wrapper when no status sink is wired.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withBridgeTimeoutPause<T>(emitStatus: ((event: JsStatusEvent) => void) | undefined, operation: () => Promise<T>): Promise<T>;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Watchdog for eval cell work.
|
|
3
3
|
*
|
|
4
|
-
* A cell's `timeout`
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
* long-running fanout that keeps reporting progress (e.g. `agent()` status
|
|
9
|
-
* updates, `log()`/`phase()`) never trips the timeout, while a genuinely
|
|
10
|
-
* stalled cell still gets interrupted.
|
|
4
|
+
* A cell's `timeout` bounds time while the Python kernel or JS VM is in control.
|
|
5
|
+
* Host-side bridge calls can {@link pause} the watchdog so delegated
|
|
6
|
+
* `agent()`/`parallel()`/`llm()` work is ignored completely, then {@link resume}
|
|
7
|
+
* starts a fresh timeout window once the runtime gets control back.
|
|
11
8
|
*
|
|
12
|
-
* The timer self-reschedules instead of being torn down
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* The active timer self-reschedules instead of being torn down on every
|
|
10
|
+
* activity event, so frequent activity costs one timestamp write per event.
|
|
11
|
+
* Pause is reference-counted because `parallel()` can have multiple bridge calls
|
|
12
|
+
* in flight at once.
|
|
15
13
|
*/
|
|
16
14
|
export declare class IdleTimeout {
|
|
17
15
|
#private;
|
|
18
16
|
constructor(idleMs: number);
|
|
19
|
-
/** Aborts with a `TimeoutError` reason once the
|
|
17
|
+
/** Aborts with a `TimeoutError` reason once the active timeout window is exhausted. */
|
|
20
18
|
get signal(): AbortSignal;
|
|
21
|
-
/** Configured
|
|
19
|
+
/** Configured active timeout window in milliseconds. */
|
|
22
20
|
get idleMs(): number;
|
|
23
|
-
/** Record activity, pushing the
|
|
21
|
+
/** Record runtime activity, pushing the active deadline forward by `idleMs`. */
|
|
24
22
|
bump(): void;
|
|
23
|
+
/** Suspend timeout accounting while control is delegated to host-side work. */
|
|
24
|
+
pause(): void;
|
|
25
|
+
/** Resume timeout accounting with a fresh timeout window. */
|
|
26
|
+
resume(): void;
|
|
25
27
|
/** Stop the watchdog. Safe to call multiple times. */
|
|
26
28
|
dispose(): void;
|
|
27
29
|
[Symbol.dispose](): void;
|
|
@@ -6,9 +6,9 @@ export interface JsExecutorOptions {
|
|
|
6
6
|
timeoutMs?: number;
|
|
7
7
|
deadlineMs?: number;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* timeout-annotation text when the caller drives cancellation via
|
|
11
|
-
*
|
|
9
|
+
* Runtime-work budget (ms). Used for worker cold-start headroom and
|
|
10
|
+
* timeout-annotation text when the caller drives cancellation via the eval
|
|
11
|
+
* watchdog `signal` instead of `deadlineMs`/`timeoutMs`. Never arms a timer.
|
|
12
12
|
*/
|
|
13
13
|
idleTimeoutMs?: number;
|
|
14
14
|
onChunk?: (chunk: string) => Promise<void> | void;
|
|
@@ -10,8 +10,8 @@ export interface PythonExecutorOptions {
|
|
|
10
10
|
/** Absolute wall-clock deadline in milliseconds since epoch */
|
|
11
11
|
deadlineMs?: number;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* caller drives cancellation via
|
|
13
|
+
* Runtime-work budget (ms). Used only for timeout-annotation text when the
|
|
14
|
+
* caller drives cancellation via the eval watchdog `signal` instead of a
|
|
15
15
|
* wall-clock `deadlineMs`/`timeoutMs`. Does not arm a timer.
|
|
16
16
|
*/
|
|
17
17
|
idleTimeoutMs?: number;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decide whether the long-lived Python kernel subprocess should be spawned
|
|
3
|
+
* with `windowsHide: true`.
|
|
4
|
+
*
|
|
5
|
+
* On Windows, Bun maps `windowsHide: true` to the `CREATE_NO_WINDOW` flag,
|
|
6
|
+
* which detaches the child from any inherited console. The Python kernel
|
|
7
|
+
* runs user code that imports NumPy/pandas; those native extensions
|
|
8
|
+
* (`numpy/_core/_multiarray_umath.pyd` + bundled OpenBLAS/SLEEF thread-pool
|
|
9
|
+
* init) can deadlock inside `LoadLibraryExW` when no console is attached,
|
|
10
|
+
* and a console-less child cannot receive SIGINT via
|
|
11
|
+
* `GenerateConsoleCtrlEvent` (the recovery path the host relies on). See
|
|
12
|
+
* issue #1960.
|
|
13
|
+
*
|
|
14
|
+
* So on Windows we hide only when the host itself has no console to share.
|
|
15
|
+
* In any launch where a console is attached — even one with every stdio
|
|
16
|
+
* stream redirected — the kernel inherits the parent's console, matching
|
|
17
|
+
* `python.exe` invoked from `cmd.exe`, which keeps native imports and
|
|
18
|
+
* SIGINT recovery working.
|
|
19
|
+
*
|
|
20
|
+
* Short-lived helper subprocesses elsewhere in the codebase (LSP probes,
|
|
21
|
+
* git, plugin installs) keep `windowsHide: true` because they don't load
|
|
22
|
+
* complex native modules and the brief console flash would be user-visible
|
|
23
|
+
* noise.
|
|
24
|
+
*/
|
|
25
|
+
export declare function shouldHideKernelWindow(opts: {
|
|
26
|
+
platform: NodeJS.Platform;
|
|
27
|
+
hostHasInheritableConsole: boolean;
|
|
28
|
+
}): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* TTY-based fallback used when the Win32 console probe is unavailable.
|
|
31
|
+
*
|
|
32
|
+
* Returns `true` if any of stdin/stdout/stderr is currently a TTY. This
|
|
33
|
+
* correctly detects the common interactive launches and the partial-
|
|
34
|
+
* redirection cases (`omp -p > out.txt`, `< in.txt`, `2> err.log`) where at
|
|
35
|
+
* least one stream stays bound to the terminal. The all-stdio-redirected
|
|
36
|
+
* case (`< in > out 2> err` from a console) is the reason we prefer the
|
|
37
|
+
* Win32 probe over this fallback whenever possible.
|
|
38
|
+
*/
|
|
39
|
+
export declare function consoleAttachedViaTTY(opts: {
|
|
40
|
+
stdinIsTTY: boolean;
|
|
41
|
+
stdoutIsTTY: boolean;
|
|
42
|
+
stderrIsTTY: boolean;
|
|
43
|
+
}): boolean;
|
|
44
|
+
/** Reset the cached Win32 probe result. Test-only; not part of the public surface. */
|
|
45
|
+
export declare function __resetWindowsConsoleProbeCache(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the host process owns a console its children can inherit.
|
|
48
|
+
*
|
|
49
|
+
* - On Windows, the authoritative signal is `GetConsoleWindow()`. It returns
|
|
50
|
+
* a non-NULL HWND whenever the process has a console attached, regardless
|
|
51
|
+
* of how the standard streams are redirected — so an `omp -p ... < in.txt
|
|
52
|
+
* > out.txt 2> err.log` launched from a real Windows Terminal session is
|
|
53
|
+
* correctly classified as console-attached and the kernel keeps its
|
|
54
|
+
* inheritable console.
|
|
55
|
+
* - On any other platform, or if the FFI probe fails, fall back to the
|
|
56
|
+
* TTY-OR heuristic. That still catches the common interactive cases.
|
|
57
|
+
*/
|
|
58
|
+
export declare function hostHasInheritableConsole(): boolean;
|
|
@@ -13,6 +13,22 @@ export declare class AssistantMessageComponent extends Container {
|
|
|
13
13
|
constructor(message?: AssistantMessage, hideThinkingBlock?: boolean, onImageUpdate?: (() => void) | undefined, thinkingRenderers?: readonly AssistantThinkingRenderer[], imageBudget?: ImageBudget | undefined);
|
|
14
14
|
invalidate(): void;
|
|
15
15
|
setHideThinkingBlock(hide: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Toggle suppression of the inline `Error: …` line while the same error is
|
|
18
|
+
* pinned in the banner above the editor. Re-renders so the change is visible.
|
|
19
|
+
*/
|
|
20
|
+
setErrorPinned(pinned: boolean): void;
|
|
21
|
+
isTranscriptBlockFinalized(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Assistant text/thinking streams in append-only: earlier rendered rows never
|
|
24
|
+
* re-layout, new content only grows the block at the bottom. The transcript
|
|
25
|
+
* reports this so the renderer may commit scrolled-off head rows of a long
|
|
26
|
+
* streamed reply to native scrollback instead of dropping them (see
|
|
27
|
+
* `NativeScrollbackLiveRegion#getNativeScrollbackCommitSafeEnd`). Volatile
|
|
28
|
+
* blocks (tool previews that collapse) intentionally do not implement this.
|
|
29
|
+
*/
|
|
30
|
+
isTranscriptBlockAppendOnly(): boolean;
|
|
31
|
+
markTranscriptBlockFinalized(): void;
|
|
16
32
|
setToolResultImages(toolCallId: string, images: ImageContent[]): void;
|
|
17
33
|
setUsageInfo(usage: Usage): void;
|
|
18
34
|
updateContent(message: AssistantMessage): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Component } from "@oh-my-pi/pi-tui";
|
|
2
|
+
import type { CopyTarget } from "../utils/copy-targets";
|
|
3
|
+
export interface CopySelectorCallbacks {
|
|
4
|
+
/** A copy target was chosen — copy its `content`. */
|
|
5
|
+
onPick: (target: CopyTarget) => void;
|
|
6
|
+
/** The picker was dismissed. */
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fullscreen `/copy` picker rendered as a `/tree`-style tree inside one
|
|
11
|
+
* outlined box: a title, the tree of copy targets (recent assistant messages
|
|
12
|
+
* with their code blocks nested beneath), a live preview of the highlighted
|
|
13
|
+
* node, and a keybinding footer. Every node copies its `content` on Enter.
|
|
14
|
+
*/
|
|
15
|
+
export declare class CopySelectorComponent implements Component {
|
|
16
|
+
#private;
|
|
17
|
+
private readonly callbacks;
|
|
18
|
+
constructor(roots: CopyTarget[], callbacks: CopySelectorCallbacks);
|
|
19
|
+
invalidate(): void;
|
|
20
|
+
handleInput(keyData: string): void;
|
|
21
|
+
render(width: number): string[];
|
|
22
|
+
}
|
|
@@ -6,8 +6,10 @@ type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.cl
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class CustomEditor extends Editor {
|
|
8
8
|
#private;
|
|
9
|
+
imageLinks?: readonly (string | undefined)[];
|
|
9
10
|
/** Gradient-highlight the "ultrathink" / "orchestrate" / "workflow" keywords as the user types
|
|
10
|
-
* them, skipping any occurrence inside code spans, fenced blocks, or XML sections.
|
|
11
|
+
* them, skipping any occurrence inside code spans, fenced blocks, or XML sections. Also make
|
|
12
|
+
* pasted image placeholders visually distinct and hyperlink them once their blob file exists. */
|
|
11
13
|
decorateText: (text: string) => string;
|
|
12
14
|
onEscape?: () => void;
|
|
13
15
|
onClear?: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from "@oh-my-pi/pi-tui";
|
|
2
|
+
/**
|
|
3
|
+
* A persistent error banner pinned above the editor. Unlike the transcript
|
|
4
|
+
* "Error: …" line (which scrolls away as the conversation grows), this stays in
|
|
5
|
+
* the fixed region directly above the input so a turn that ended on a provider
|
|
6
|
+
* error — e.g. Anthropic's "Output blocked by content filtering policy" — cannot
|
|
7
|
+
* be missed. It is cleared when the next turn starts.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ErrorBannerComponent extends Container {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
@@ -20,6 +20,7 @@ export declare class ModelSelectorComponent extends Container {
|
|
|
20
20
|
constructor(tui: TUI, _currentModel: Model | undefined, settings: Settings, modelRegistry: ModelRegistry, scopedModels: ReadonlyArray<ScopedModelItem>, onSelect: RoleSelectCallback, onCancel: () => void, options?: {
|
|
21
21
|
temporaryOnly?: boolean;
|
|
22
22
|
initialSearchInput?: string;
|
|
23
|
+
currentContextTokens?: number;
|
|
23
24
|
});
|
|
24
25
|
handleInput(keyData: string): void;
|
|
25
26
|
getSearchInput(): Input;
|
|
@@ -52,6 +52,21 @@ export declare class ToolExecutionComponent extends Container {
|
|
|
52
52
|
details?: any;
|
|
53
53
|
isError?: boolean;
|
|
54
54
|
}, isPartial?: boolean, _toolCallId?: string): void;
|
|
55
|
+
/**
|
|
56
|
+
* Whether this block has reached a terminal state for transcript freezing.
|
|
57
|
+
* Reports `false` while it can still visually change so the
|
|
58
|
+
* {@link TranscriptContainer} keeps it inside the repaintable live region:
|
|
59
|
+
* a foreground tool awaiting its result, or one streaming partial output.
|
|
60
|
+
* A final (non-partial) result, a background-async tool the agent has moved
|
|
61
|
+
* past, or an explicit {@link seal} flips it to `true`.
|
|
62
|
+
*/
|
|
63
|
+
isTranscriptBlockFinalized(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Mark the tool terminal even though no result arrived (the turn aborted or
|
|
66
|
+
* abandoned it) and stop animating, so it can freeze and stops pinning the
|
|
67
|
+
* transcript live region.
|
|
68
|
+
*/
|
|
69
|
+
seal(): void;
|
|
55
70
|
/**
|
|
56
71
|
* Stop spinner animation and cleanup resources.
|
|
57
72
|
*/
|
|
@@ -26,6 +26,7 @@ export declare class TranscriptContainer extends Container implements NativeScro
|
|
|
26
26
|
invalidate(): void;
|
|
27
27
|
clear(): void;
|
|
28
28
|
getNativeScrollbackLiveRegionStart(): number | undefined;
|
|
29
|
+
getNativeScrollbackCommitSafeEnd(): number | undefined;
|
|
29
30
|
/**
|
|
30
31
|
* Retire all frozen snapshots so the next render reflects each block's current
|
|
31
32
|
* state. Call at reconciliation checkpoints (prompt submit) where the whole
|
|
@@ -3,6 +3,6 @@ import { Container } from "@oh-my-pi/pi-tui";
|
|
|
3
3
|
* Component that renders a user message
|
|
4
4
|
*/
|
|
5
5
|
export declare class UserMessageComponent extends Container {
|
|
6
|
-
constructor(text: string, synthetic?: boolean);
|
|
6
|
+
constructor(text: string, synthetic?: boolean, imageLinks?: readonly (string | undefined)[]);
|
|
7
7
|
render(width: number): string[];
|
|
8
8
|
}
|
|
@@ -13,7 +13,6 @@ export declare class CommandController {
|
|
|
13
13
|
handleDumpCommand(): void;
|
|
14
14
|
handleDebugTranscriptCommand(): Promise<void>;
|
|
15
15
|
handleShareCommand(): Promise<void>;
|
|
16
|
-
handleCopyCommand(sub?: string): void;
|
|
17
16
|
handleSessionCommand(): Promise<void>;
|
|
18
17
|
handleJobsCommand(): Promise<void>;
|
|
19
18
|
handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
|
|
@@ -35,6 +35,7 @@ export declare class SelectorController {
|
|
|
35
35
|
}): void;
|
|
36
36
|
showPluginSelector(mode?: "install" | "uninstall"): Promise<void>;
|
|
37
37
|
showUserMessageSelector(): void;
|
|
38
|
+
showCopySelector(): void;
|
|
38
39
|
showTreeSelector(): void;
|
|
39
40
|
showSessionSelector(): Promise<void>;
|
|
40
41
|
handleResumeSession(sessionPath: string): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import { type BlobPutResult } from "../session/blob-store";
|
|
3
|
+
type ImageBlobWriter = (data: Buffer, options?: {
|
|
4
|
+
extension?: string;
|
|
5
|
+
}) => Promise<BlobPutResult>;
|
|
6
|
+
type ImageBlobWriterSync = (data: Buffer, options?: {
|
|
7
|
+
extension?: string;
|
|
8
|
+
}) => BlobPutResult;
|
|
9
|
+
export interface ImageReferenceRenderers {
|
|
10
|
+
renderText: (text: string) => string;
|
|
11
|
+
renderReference: (label: string, index: number) => string;
|
|
12
|
+
}
|
|
13
|
+
export declare function renderImageReferences(text: string, renderers: ImageReferenceRenderers): string;
|
|
14
|
+
export declare function imageReferenceHyperlink(label: string, index: number, imageLinks: readonly (string | undefined)[] | undefined, renderLabel: (text: string) => string): string;
|
|
15
|
+
export declare function materializeImageReferenceLinks(images: readonly ImageContent[] | undefined, putBlob: ImageBlobWriter): Promise<(string | undefined)[] | undefined>;
|
|
16
|
+
export declare function materializeImageReferenceLinksSync(images: readonly ImageContent[] | undefined, putBlob: ImageBlobWriterSync): (string | undefined)[] | undefined;
|
|
17
|
+
export {};
|
|
@@ -56,6 +56,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
56
56
|
todoContainer: Container;
|
|
57
57
|
btwContainer: Container;
|
|
58
58
|
omfgContainer: Container;
|
|
59
|
+
errorBannerContainer: Container;
|
|
59
60
|
editor: CustomEditor;
|
|
60
61
|
editorContainer: Container;
|
|
61
62
|
hookWidgetContainerAbove: Container;
|
|
@@ -77,6 +78,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
77
78
|
todoPhases: TodoPhase[];
|
|
78
79
|
hideThinkingBlock: boolean;
|
|
79
80
|
pendingImages: ImageContent[];
|
|
81
|
+
pendingImageLinks: (string | undefined)[];
|
|
80
82
|
compactionQueuedMessages: CompactionQueuedMessage[];
|
|
81
83
|
pendingTools: Map<string, ToolExecutionHandle>;
|
|
82
84
|
pendingBashComponents: BashExecutionComponent[];
|
|
@@ -136,6 +138,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
136
138
|
startPendingSubmission(input: {
|
|
137
139
|
text: string;
|
|
138
140
|
images?: ImageContent[];
|
|
141
|
+
imageLinks?: (string | undefined)[];
|
|
139
142
|
customType?: string;
|
|
140
143
|
display?: boolean;
|
|
141
144
|
}): SubmittedUserInput;
|
|
@@ -162,6 +165,8 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
162
165
|
dim?: boolean;
|
|
163
166
|
}): void;
|
|
164
167
|
showError(message: string): void;
|
|
168
|
+
showPinnedError(message: string): void;
|
|
169
|
+
clearPinnedError(): void;
|
|
165
170
|
showWarning(message: string): void;
|
|
166
171
|
ensureLoadingAnimation(): void;
|
|
167
172
|
setWorkingMessage(message?: string): void;
|
|
@@ -177,6 +182,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
177
182
|
isKnownSlashCommand(text: string): boolean;
|
|
178
183
|
addMessageToChat(message: AgentMessage, options?: {
|
|
179
184
|
populateHistory?: boolean;
|
|
185
|
+
imageLinks?: readonly (string | undefined)[];
|
|
180
186
|
}): Component[];
|
|
181
187
|
renderSessionContext(sessionContext: SessionContext, options?: {
|
|
182
188
|
updateFooter?: boolean;
|
|
@@ -184,6 +190,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
184
190
|
}): void;
|
|
185
191
|
renderInitialMessages(prebuiltContext?: SessionContext, options?: {
|
|
186
192
|
preserveExistingChat?: boolean;
|
|
193
|
+
clearTerminalHistory?: boolean;
|
|
187
194
|
}): void;
|
|
188
195
|
getUserMessageText(message: Message): string;
|
|
189
196
|
findLastAssistantMessage(): AssistantMessage | undefined;
|
|
@@ -192,7 +199,6 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
192
199
|
handleDumpCommand(): void;
|
|
193
200
|
handleDebugTranscriptCommand(): Promise<void>;
|
|
194
201
|
handleShareCommand(): Promise<void>;
|
|
195
|
-
handleCopyCommand(sub?: string): void;
|
|
196
202
|
handleTodoCommand(args: string): Promise<void>;
|
|
197
203
|
handleSessionCommand(): Promise<void>;
|
|
198
204
|
handleJobsCommand(): Promise<void>;
|
|
@@ -229,6 +235,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
229
235
|
}): void;
|
|
230
236
|
showPluginSelector(mode?: "install" | "uninstall"): void;
|
|
231
237
|
showUserMessageSelector(): void;
|
|
238
|
+
showCopySelector(): void;
|
|
232
239
|
showTreeSelector(): void;
|
|
233
240
|
showSessionSelector(): void;
|
|
234
241
|
handleResumeSession(sessionPath: string): Promise<void>;
|