Commit Graph

4873 Commits

Author SHA1 Message Date
Can Bölük 3c024aa5ce Merge pull request #1687 from can1357/farm/802d1a6a/update-bypass-bun-manifest-cache
fix(update): bypass bun manifest cache so omp update sees fresh releases
2026-06-02 09:22:33 +03:00
roboomp a3fbeb4a0a style: bun run fix 2026-06-02 06:19:00 +00:00
roboomp 9abce6e974 fix(update): pinned npm registry and bypassed bun cache for omp update
omp resolves the update target by querying https://registry.npmjs.org/ directly, but `bun install -g pkg@<version>` would then consult bun's on-disk manifest snapshot AND honour the user's npm-mirror configuration (corporate proxy, Taobao, …). Either source can lag the upstream registry by minutes-to-hours, in which case bun rejects the version with `No version matching "X" found for specifier "@oh-my-pi/pi-coding-agent" (but package exists)` even though the registry omp just queried is serving it.

The bun install step now runs with both `--no-cache` (skip the manifest snapshot) and `--registry=https://registry.npmjs.org/` (pin the official catalog regardless of bunfig/.npmrc) so the install observes the same registry state the version check used. The registry URL is centralised in an `NPM_REGISTRY` constant shared by `getLatestRelease` and `buildBunInstallArgs`.

Fixes #1686
2026-06-02 06:18:54 +00:00
Can Bölük 7b20de4ef1 Merge pull request #1587 from devxplay-forks/feat/raw-paste
feat(clipboard): add raw text paste functionality with keyboard shortcut
2026-06-02 09:18:16 +03:00
Can Bölük 38360c0c3c Merge pull request #1311 from jiwangyihao/acp-terminal-release-content
fix(acp): show live execute tool details
2026-06-02 09:17:58 +03:00
Can Bölük 12970e2412 Merge pull request #1646 from can1357/farm/2a94e89d/honor-todo-clear-delay
fix(tui): honor todo auto-clear delay
2026-06-02 09:11:07 +03:00
Can Bölük 94177c2ab0 Merge branch 'main' into farm/3a53b91e/fix-exit-cursor-position 2026-06-02 08:55:01 +03:00
Can Bölük 2909b068d1 Merge branch 'main' into farm/d05e786c/cannot-log-out-opencode 2026-06-02 08:52:53 +03:00
Can Bölük 858b758ee3 Merge pull request #1669 from can1357/farm/cc346f1b/fix-resume-decline-fork-exit
fix(coding-agent): exited cleanly when declining cross-project resume fork
2026-06-02 08:52:05 +03:00
Can Bölük 1f0e0a490b Merge branch 'main' into farm/cc346f1b/fix-resume-decline-fork-exit 2026-06-02 08:49:46 +03:00
can1357 384a206737 refactor(task): replaced numeric-prefix ids with name-first agent output ids
- Changed `AgentOutputManager` to use requested names verbatim, adding `-2`/`-3` suffixes only on repeats (e.g. `Anna`, `Anna-2`).
- Renamed main agent id from `0-Main` to `Main`; nested ids now use dot notation without numeric prefix (e.g. `Parent.Child`).
- Updated task widget to render dotted hierarchy as `Parent>Child` breadcrumb without leading index.
- Resume scan now tracks seen names instead of a counter to avoid clobbering prior outputs.
2026-06-02 06:50:03 +02:00
can1357 c4e157590e feat(eval): replaced fixed concurrency cap with task.maxConcurrency bridge
- Removed the `concurrency` argument from `parallel()` and `pipeline()` in both JS and Python runtimes.
- Added `__concurrency__` bridge to resolve the pool ceiling live from `task.maxConcurrency` (default 32; 0 = unbounded).
- Eval fan-outs now run as wide as a `task` tool batch instead of being capped at 16.
2026-06-02 06:49:15 +02:00
can1357 a25b4dc2cc docs(coding-agent/prompts): added shared executor reuse guidance to eval tool
- Encouraged staging helpers, datasets, and clients once, then fanning out subagents that call them directly.
- Clarified that re-importing, re-fetching, or serializing across the task boundary is unnecessary.
2026-06-02 06:43:58 +02:00
can1357 a4dc8b597d docs(coding-agent/prompts): reworked orchestrator prompt for trivial inline edits and batching
- Updated the role contract to allow direct trivial edits while reserving substantial work for subagents.
- Reinforced that parallel work must be fanned out broadly and that one-off task dispatches are disallowed.
- Clarified that subagents make edits only, while the orchestrator runs verification for changed files.
2026-06-02 06:33:30 +02:00
can1357 1fcb49601a fix(coding-agent): synchronized preview diff updates to settle before rendering
- Tracked the latest in-flight preview diff recompute in ToolExecutionComponent and exposed it through a new whenPreviewSettled method.
- Updated component paths that trigger preview recomputation to retain the returned promise instead of fire-and-forget calls.
- Updated the streaming preview height test to await settled diff recomputation before assertions, eliminating requestRender race-based flakes.
2026-06-02 06:27:09 +02:00
can1357 5caed570ce fix(settings): added reloadForCwd to re-scope project settings on cwd change
- Added `Settings.reloadForCwd` to mutate the live instance in place, so `/move` and cross-project resume pick up the destination project's `.claude/settings.yml` and path-scoped `enabledModels`/`disabledProviders`.
- Wired `reloadForCwd` into `applyCwdChange` (interactive mode) and the `--resume` startup path so settings always follow the active working directory.
- Added tests covering path-scoped re-resolution, no-op on same directory, and disk-backed project layer load/drop.
2026-06-02 06:00:45 +02:00
can1357 7b3ea248d4 feat(coding-agent): enabled cross-project resume with folder/all scope fallback
- Enabled resume picker to preload sessions and toggle folder/all scope with Tab.
- Enabled resume flow to fall back to all-project sessions and switch cwd on resume.
- Added centralized applyCwdChange to refresh caches, commands, and UI after cwd updates.
- Updated session restoration to adopt restored session cwd and sessionDir when present.
2026-06-02 05:53:57 +02:00
can1357 b522fde56d perf(sqlite-reader): replaced full COUNT(*) scan with bounded row probing
- Added ROW_COUNT_PROBE_CAP to limit rows scanned when counting tables, preventing JS thread freezes on large databases.
- Used sqlite_stat1 estimates for tables exceeding the cap; exact counts only for provably small tables.
- Introduced TableRowCount type with exact/estimate/atLeast variants reflected in rendered output.
2026-06-02 05:24:21 +02:00
can1357 783971f575 fix(history-storage): restored session_id column and prompt-history ranking
- Fixed `session_id` never being created or populated; every history row had `NULL` for session.
- Added schema migration (`ALTER TABLE history ADD COLUMN session_id`) for pre-existing databases.
- Wired interactive mode to call `setSessionResolver(...)` so prompts are stamped with the active session at submission time.
- Re-enabled session ranking in `--resume` and in-session pickers via `matchingSessionIds()`, merging fuzzy and prompt-history signals.
2026-06-02 05:15:56 +02:00
can1357 8cd8fd9b70 fix(coding-agent/tools): aligned screenshot file extensions with saved buffer format
- Computed screenshot destination extensions from the MIME type of bytes being written.
- Updated auto-generated paths in screenshot and temp directories to use the matching extension.
2026-06-02 04:36:21 +02:00
roboomp aeea2c8a8a fix(coding-agent): preserved noninteractive cross-project resume failures
Separated the fork prompt result into accepted, declined, and unavailable states.
Interactive declines now return cleanly through runRootCommand, while non-TTY
invocations continue to fail with a diagnostic instead of silently exiting 0.

Updated regression coverage for both branches.

Fixes #1668
2026-06-01 22:36:10 +00:00
roboomp cea19b6ebf fix(coding-agent): exited cleanly when declining cross-project resume fork
createSessionManager threw `Session "X" is in another project (Y).` when
the user answered "n" to the fork prompt, and runRootCommand never caught
it. The throw bubbled up as an Uncaught Exception with a stack trace.

Return undefined from the decline branch instead, and treat
`typeof parsed.resume === "string" && !sessionManager` in runRootCommand
as a user cancellation: print a dimmed "Resume cancelled" message and
return cleanly (exit 0), mirroring how the picker UI handles
"No session selected".

Fixes #1668
2026-06-01 22:31:26 +00:00
roboomp 12cfdd68b1 fix(auth): limited logout to stored credentials
Filtered the logout selector to credentials that /logout can actually remove and reported ambient env/config auth when direct logout cannot clear it. Added selector coverage for env-only OpenCode providers.\n\nFixes #1658
2026-06-01 19:14:28 +00:00
can1357 96fd4c0f4f test(coding-agent): removed warm-cache refresh performance test case
- Removed the status-line context cache test that benchmarked warm-cache refreshes on a 200-message session.
2026-06-01 20:42:22 +02:00
can1357 7a8c879f9a test(bash-executor): replaced fixed sleep timers with event-driven sync
- Replaced `Bun.sleep(50)` with `Promise.withResolvers` resolved on first chunk to avoid races.
- Used a filesystem marker file to detect shell startup before aborting in persistent-session test.
- Prevents flaky failures where aborts arrived before shell setup completed.
2026-06-01 20:33:43 +02:00
can1357 47690d6495 Merge remote-tracking branch 'origin/farm/f765e67b/esc-keeps-autocomplete-dismissal' 2026-06-01 20:33:08 +02:00
can1357 503d29f408 fix(eval): resolved TDZ crash by splitting eval renderer into eval-render.ts
- Extracted TUI rendering from `eval.ts` into a dependency-light `eval-render.ts` to break the circular initialization chain.
- `renderers.ts` now imports `evalToolRenderer` from `eval-render` directly, avoiding re-entry into the root barrel while `eval.ts` is still initializing.
- `eval.ts` re-exports `evalToolRenderer` and `EVAL_DEFAULT_PREVIEW_LINES` for backward compatibility.
- Increased first-event timeout test budget from 50ms to 5000ms to prevent CI scheduler jitter from tripping the watchdog on success cases.
2026-06-01 20:31:46 +02:00
can1357 c069136eca refactor(exec): extracted eval-backends module and improved shell quarantine
- Moved EvalBackendsAllowance and related functions to a dedicated eval-backends.ts module.
- Replaced ad-hoc brokenShellSessions tracking with a quarantineShellSession helper that also awaits the abort cleanup promise.
- Applied quarantine on timeout and cancellation paths, not just errors.
2026-06-01 20:15:21 +02:00
roboomp 27f4965e00 fix(coding-agent): stop ESC from aborting agent run while @ autocomplete is open
When the autocomplete popup is visible, ESC unconditionally falls through
to the editor base class so it can dismiss the popup. Only an ESC with no
popup visible reaches onEscape and routes to the global interrupt handler.

Removed the shouldBypassAutocompleteOnEscape callback that paved over the
popup-dismissal path whenever the agent was busy (streaming, bash, /btw,
auto-compaction, etc.) — that is precisely the moment the user is most
likely to hit ESC while the popup is open, and dismissing-then-aborting in
one keystroke is a footgun, not a feature. Two-press semantics now match
the standard TUI/IDE pattern: first ESC closes the popup, second ESC
aborts.

Tests cover both branches in custom-editor-keybindings.test.ts and the
input-controller escape suite no longer asserts the dead callback.

Fixes #1655
2026-06-01 17:26:10 +00:00
can1357 cfea72f0f2 chore: bump version to 15.7.6 2026-06-01 19:24:27 +02:00
can1357 fbdc064186 feat(lsp): added session-scoped LSP diagnostics deduplication
- Added `DiagnosticsLedger` to track diagnostics already surfaced per file, suppressing repeats within a session.
- Wired dedup into both edit and write tools via a `transformDiagnostics` hook on the writethrough pipeline.
- Added `lsp.diagnosticsDeduplicate` setting (default: true) to control the behavior.
2026-06-01 18:04:05 +02:00
Can Bölük 3106cf6240 Merge pull request #1598 from ForeverYoungPp/fix/acp-mcp-tool-activation
fix(coding-agent/acp): MCP tools registered but never activated for ACP sessions
2026-06-01 18:30:20 +03:00
Can Bölük a0836b6687 Fix Claude Code command discovery and eval timeout behavior
Fixed the Claude Code slash command discovery to load subdirectory commands recursively and added namespace aliases for colon-namespaced workflows. Updated the timeout behavior for the eval tool to better handle cell execution without premature termination.
2026-06-01 17:24:09 +02:00
Can Bölük be022d8a89 Merge branch 'main' into farm/ad674fba/fix-claude-subdir-commands 2026-06-01 18:23:10 +03:00
Can Bölük 112602cda3 Merge branch 'main' into farm/a22ef9df/raise-discovered-model-max-tokens 2026-06-01 18:22:11 +03:00
Can Bölük b2175bf581 Merge pull request #1555 from can1357/farm/aeb6ba9d/make-indicator-glyphs-and-colorizing-con
feat(theme): make spinner frames overridable per custom theme
2026-06-01 18:21:11 +03:00
Can Bölük 164ecbe2e0 Merge pull request #1619 from can1357/farm/f5ca35c4/prevent-overlimit-prompts
fix(agent): compact before oversized prompts
2026-06-01 18:19:27 +03:00
can1357 dbd9489010 refactor(eval): changed timeout from inactivity to wall-clock budget
- Only bridge heartbeats (`agent()`/`llm()`) now re-arm the watchdog; compute, stdout, `log()`/`phase()`, and ordinary tool calls count against the budget.
- Emitted an immediate heartbeat at bridge call start to avoid early abort near budget edge.
- Removed `idle` flag and "of inactivity" suffix from timeout annotation strings.
- Updated docs, prompts, and comments to reflect the new wall-clock semantics.
2026-06-01 17:17:00 +02:00
Can Bölük 52a29e5df5 Merge branch 'main' into feat/assistant-thinking-renderer 2026-06-01 18:16:42 +03:00
Can Bölük 890d63fdb1 Merge branch 'main' into fix-ask-option-descriptions 2026-06-01 18:14:42 +03:00
roboomp 1ed0b8d740 fix(tui): honored todo clear delay
Applied tasks.todoClearDelay to the interactive Todos panel without mutating the session todo history used by the model.

Added regression coverage for instant, delayed, and disabled auto-clear behavior.

Fixes #1644
2026-06-01 15:12:53 +00:00
can1357 e18e4ada71 fix(eval): keep idle watchdog armed during in-flight agent()/llm() calls
The per-cell `timeout` is an inactivity budget that only re-arms on status
events, but host-side bridge calls can run long stretches with no
intermediate status (a subagent's time-to-first-token on a reasoning
model, a long quiet nested tool, or an entire oneshot llm() request).
The watchdog mistook that for a stall and aborted working subagents
mid-flight.

Pump a lightweight heartbeat while a bridge call awaits, re-arming the
watchdog through the existing emitStatus -> onStatus channel. The
heartbeat is a pure keepalive: forwarded to bump the timer but never
stored or rendered, so a genuinely stalled cell is still interrupted
once the call settles.

- eval/heartbeat.ts: withBridgeHeartbeat() + EVAL_HEARTBEAT_OP
- agent-bridge/llm-bridge: wrap runSubprocess / completeSimple
- js+py executors: forward heartbeat to onStatus, drop from displayOutputs
- tools/eval.ts: bump on heartbeat, skip persist/render
2026-06-01 16:38:32 +02:00
can1357 f9d094de60 perf(coding-agent): aligned spinner and shimmer animations to the TUI 60fps render interval
- Tool execution now renders every 16ms and advances spinner glyphs only every 80ms using a tracked last-advance timestamp.
- Output block shimmer ticks were reduced to 16ms so border-frame updates align with the 60fps cadence for smoother animation.
2026-06-01 16:07:54 +02:00
can1357 da58949320 chore: bump version to 15.7.5 2026-06-01 15:04:12 +02:00
can1357 ff2de07e78 test(coding-agent): added workspaceTree fixture to system prompt tests
- Introduced helper `createEmptyWorkspaceTree` to reduce duplication.
- Populated missing `workspaceTree` field in test contexts for `buildSystemPrompt`.
2026-06-01 14:43:12 +02:00
can1357 e78b66fc6f test(coding-agent): updated fixtures with missing ui and context mocks
- Added `setEagerNativeScrollbackRebuild` mock to `ui` objects in test fixtures.
- Added `pendingTools` map to context fixtures missing it.
2026-06-01 14:42:58 +02:00
can1357 0c6c6fb92f Merge remote-tracking branch 'origin/farm/5636bafd/dedupe-streaming-assistant-tail' 2026-06-01 14:39:34 +02:00
can1357 77d417f706 Merge remote-tracking branch 'origin/farm/b84f19f4/mcp-reconnect-backoff' 2026-06-01 14:38:37 +02:00
can1357 f1237131bd Merge remote-tracking branch 'origin/farm/59c71bcd/isolate-tiny-model-process' 2026-06-01 14:37:59 +02:00
can1357 b37c20cb10 Merge remote-tracking branch 'origin/farm/55028c01/local-plan-md-unreachable-macos' 2026-06-01 14:37:35 +02:00