Commit Graph

8262 Commits

Author SHA1 Message Date
can1357 a82d68ef49 feat(coding-agent): added experimental snapcompact inline imaging for system prompt and tool results
- Added `renderSnapcompactFrames()` and `snapcompactFrameCount()` to @oh-my-pi/snapcompact for paging arbitrary text into PNG image blocks without dim-marker bookkeeping.
- Widened the agent loop's `transformProviderContext` hook to `(context, model) => Context` so per-request transforms can gate on the dispatch model's capabilities.
- Added `SnapcompactInlineTransformer` rendering the system prompt and large historical tool results as snapcompact frames on vision models: vision gate, per-provider image budgets, 3k-token floor, savings-margin gate, skip-last rule, and hash-keyed render caches swept to live tool calls.
- Added default-off `snapcompact.systemPrompt` and `snapcompact.toolResults` settings under a new Context → Experimental group, composed after secret obfuscation in `sdk.ts` so frames are built per-request and never persisted to session.jsonl.
- Added prompt stubs (`snapcompact-system-stub.md`, `snapcompact-system-frames-note.md`, `snapcompact-toolresult-note.md`) and unit tests covering frame paging, no-mutate guarantees, budget caps, gates, and render caching.
2026-06-12 03:27:50 +02:00
Can Bölük 21b1854a9e Merge pull request #2311 from bjin/fix/local-memory-consolidation-instructions
fix(coding-agent): add local memory consolidation instructions
2026-06-12 03:27:26 +02:00
Can Bölük 92a4ab4ad4 Merge branch 'main' into fix/local-memory-consolidation-instructions 2026-06-12 03:26:50 +02:00
Can Bölük dba99e3eb7 Merge pull request #2339 from blingdivinity/fix/edit-block-resolver-shell-rc
fix(natives): resolve bash for extensionless shell rc files (zshrc/.bashrc)
2026-06-12 03:26:13 +02:00
Can Bölük d84b796c5f Merge pull request #2317 from can1357/farm/7d4f8a78/fix-minimax-gpt-oss-reasoning-effort-clamp
fix(catalog): clamp MiniMax M2 / GPT-OSS reasoning_effort on Fireworks
2026-06-12 02:58:50 +02:00
Can Bölük b2e859e691 Merge branch 'main' into farm/7d4f8a78/fix-minimax-gpt-oss-reasoning-effort-clamp 2026-06-12 02:45:25 +02:00
roboomp 4618d8d797 refactor(ai): inlined effort lookups instead of building a new map
Dropped `mapReasoningEffort` and `resolveActiveEffortMap` in both
`openai-completions.ts` and `openai-responses.ts`. Each callsite now chains
two ?? lookups: `compat.reasoningEffortMap?.[k] ?? model.thinking?.effortMap?.[k] ?? k`.
No `Object.keys`, no spread-merged object per request — same precedence
(post-`whenThinking` compat overrides win over catalog-baked thinking map).

Fixes #2315
2026-06-12 00:40:33 +00:00
bling 79fe2134e9 fix(natives): resolved bash for extensionless shell rc files
blockRangeAt inferred no language for files like `zshrc`/`.zshrc`/`.bashrc`
because `Path::extension` returns `None` for bare and dotfile names alike,
so the edit tool's `replace block` / `insert after block` ops were
permanently unresolvable on them — an agent retrying the block op would
loop on the same "could not resolve a syntactic block" error.

from_extension now maps known shell rc/profile basenames (zshrc, zshenv,
zprofile, zlogin, zlogout, zsh_aliases, bashrc, bash_profile, bash_login,
bash_logout, bash_aliases, profile, kshrc, mkshrc, shrc; with or without a
leading dot) to the bash grammar, alongside the existing Makefile/Dockerfile
basename handling. Adds a block-resolution regression test over a zsh
`if [[ … ]]; then … fi` block in `zshrc`/`.zshrc`/`.bashrc`.
2026-06-11 20:36:54 -04:00
Can Bölük 5a2a33658a Merge pull request #2256 from H4vC/accent-colors
session accent: derive from theme mode with collision avoidance
2026-06-12 02:36:45 +02:00
can1357 dd202786b2 test(coding-agent): aligned the settings search Escape test with the global search banner
- Updated `settings-selector-memory-refresh.test.ts` to assert the cross-tab search banner's cursor rendering (`b▌`) instead of the old `Search: b` label when verifying Escape clears the search before closing the selector.
2026-06-12 02:33:49 +02:00
can1357 8fd5171768 ux(coding-agent): capped collapsed bash, ssh, and eval previews to a viewport tail window
- Replaced the fixed `CALL_PREVIEW_MAX_LINES` cap in `render-utils.ts` with a dynamic `previewWindowRows()` (terminal rows minus a chrome reserve); `capPreviewLines` now returns lines untouched when expanded and windows them otherwise.
- Applied the cap in every render state for bash and ssh command previews — streaming and final render identically instead of snapping fully open on completion — and included the preview window in bash's render cache key so terminal resizes invalidate it.
- Capped eval cell code previews via the same window; previously cell code was never capped at all, with `ctrl+o` remaining the only way to uncap.
- Added stream-vs-final parity coverage in `bash-sixel-render.test.ts`, `ssh-render.test.ts`, and the new `eval-code-preview.test.ts`, and a changelog entry.
2026-06-12 02:33:49 +02:00
can1357 7c3407ac65 fix(coding-agent): converted Zod tool-parameter schemas to wire schema in five consumers
- Fixed `/dump` output (`session-dump-format.ts`) and the RPC `get_state` `dumpTools` payload (`rpc-mode.ts`) serializing Zod schema instances — leaking `def`/`shape` internals and stringified methods — by converting parameters through `zodToWireSchema` like providers receive.
- Fixed context-usage token estimation stringifying the Zod `def` tree, which overcounted tool schema tokens in the status line.
- Fixed tool-discovery indexing (`tool-index.ts`) returning empty `schemaKeys` for Zod tools, weakening BM25 ranking; keys are now recovered via wire conversion.
- Fixed the extension inspector panel rendering "(no arguments)" for Zod tools by reading properties off the converted wire schema.
- Added coverage in `tool-index.test.ts` plus new `context-usage.test.ts` and `session-dump-format.test.ts`, and a changelog entry.
2026-06-12 02:33:49 +02:00
can1357 4ad797d274 feat(coding-agent): added global type-to-search across /settings tabs
- Added a `SettingsSearchHeader` banner to `SettingsSelectorComponent`, permanently mounted under the top border and rendering only while a cross-tab search is active.
- Typing now filters settings across every tab via `getSettingItemFilterText` + `fuzzyFilter`, with per-tab first-match ids so Tab jumps between tabs that have matches; non-matching tabs render muted and the pre-search tab is restored on exit.
- Moved the tab bar below the tab content, disabled `SettingsList`'s own type-to-search in favor of the selector-owned global search, and only advertised PgUp/PgDn in the hint when multiple sections exist.
- Wired the new `mutedTab` style into `getTabBarTheme` in `modes/shared.ts`.
2026-06-12 02:33:48 +02:00
can1357 a7cb9c17f8 feat(tui): added selection tracking, layout options, and muted tabs to settings components
- Added `SettingsListOptions` to `SettingsList` with a `layout` override ("auto" sidebar vs "flat" inline headings) and a `typeToSearch: false` switch for hosts that own filtering globally.
- Added `getSelectedItem()` and an `onSelectionChange` callback to `SettingsList`, replaced index-based submenu selection restore with id-based item resolution, and exported `getSettingItemFilterText` for external filtering.
- Padded short section panes to the full viewport in `SettingsList` so the panel height stays constant across sections.
- Added `muted` tabs to `TabBar` (skipped during keyboard navigation, styled via the new `TabBarTheme.mutedTab`), a `setTabs()` replace API that preserves the active tab by id without firing `onTabChange`, a `showHint` toggle for the trailing "(tab to cycle)" hint, and omission of the label prefix when the label is empty.
2026-06-12 02:33:48 +02:00
can1357 870f69b98c docs(ai): added changelog entry for OAuth preflight refresh failure logging 2026-06-12 02:33:48 +02:00
can1357 c276cd6eff feat(coding-agent): reorganized /settings into titled sections with a sidebar layout
Also normalizes setting labels/descriptions and carries the package changelog entries for this batch (adjacent unreleased bullets are not splittable per commit), restoring section placement disturbed by the two prior changelog hunks.
2026-06-12 02:33:48 +02:00
can1357 23a1e244ba fix(coding-agent): froze detached task shimmer once blocks leave the transcript live region 2026-06-12 02:33:48 +02:00
can1357 0325aa25e9 feat(tui): added section headings, split layout, and section paging to SettingsList 2026-06-12 02:33:48 +02:00
can1357 49ad75709b fix(coding-agent): reset Responses provider session on stale replay errors before retrying 2026-06-12 02:33:47 +02:00
can1357 9360d24793 fix(coding-agent): resolved image-generation credentials through the model registry with typed errors 2026-06-12 02:33:47 +02:00
can1357 49cdf56993 fix(coding-agent): resolved Kagi, TTS, and model-discovery bearers through withAuth 2026-06-12 02:33:47 +02:00
can1357 503b2b7156 fix(coding-agent): routed web-search OAuth bearers through withOAuthAccess 2026-06-12 02:33:47 +02:00
can1357 98fddec509 fix(mnemopi): resolved API keys per request through withAuth and typed HTTP errors 2026-06-12 02:33:47 +02:00
can1357 c234d00def fix(coding-agent): handed compaction and summarization per-candidate API-key resolvers 2026-06-12 02:33:47 +02:00
can1357 9629842f33 feat(coding-agent): accepted a model directly in ModelRegistry.resolver 2026-06-12 02:33:46 +02:00
can1357 35e7d2d9d5 fix(agent): accepted ApiKey resolvers in compaction helpers and typed remote-compaction errors 2026-06-12 02:33:46 +02:00
can1357 8c3c68a048 feat(ai): added stateful previous_response_id chaining to the platform Responses provider 2026-06-12 02:33:46 +02:00
can1357 344ac680df feat(ai): added stateful SSE turn chaining to the Codex provider 2026-06-12 02:33:46 +02:00
can1357 c192692971 feat(catalog): added requiresJuiceZeroHack Responses compat flag for GPT-5-family models 2026-06-12 02:33:46 +02:00
can1357 f4504a41cd feat(ai): added withOAuthAccess auth-retry driver for OAuth-access consumers 2026-06-12 02:33:46 +02:00
can1357 e31927eae9 feat(ai): added typed ProviderHttpError with per-provider subclasses 2026-06-12 02:33:45 +02:00
can1357 f27f885eae fix(coding-agent/modes): handled plugin settings failures and Escape close during loading
- Caught and logged npm `PluginManager.list()` rejections in `PluginSettingsComponent`, returning an empty plugin list so the settings tab no longer stays blank when plugin listing fails.
- Added tests covering Escape handling while lists are loading and marketplace rendering when npm listing rejects.
2026-06-12 02:33:45 +02:00
can1357 ad276e931c feat(ai): added Codex Lite options and improved response stream resilience
- Added `responsesLite`, `reasoningContext`, `clientMetadata`, and `onModerationMetadata` options.
- Changed Lite request transformation to default `reasoning.context` to `all_turns`.
- Changed request shaping to strip image `detail` fields and force `parallel_tool_calls` off in Lite mode.
- Fixed streaming behavior by excluding `client_metadata` from websocket append diffs and swallowing moderation metadata errors.
2026-06-12 02:33:45 +02:00
can1357 d7f8c79dd0 fix(ai): synced OAuth credentials with latest SQLite rows before use
- AuthStorage now synchronizes the selected OAuth row from SQLite before returning or force-refreshing credentials.
- Credential preparation was updated to resync the selected credential after invoking `prepareForRequest`, so peer-updated tokens are observed.
- Added an OAuth refresh race test that confirmed peer-updated SQLite rows are returned without extra refresh calls.
2026-06-12 02:33:45 +02:00
can1357 eb966cc6dc fix: handled non-terminal pause_turn stops by resampling interrupted turns
- Mapped Codex `end_turn:false` terminal events to `pause_turn` stop details in response stream parsing.
- Updated `agent-loop` to re-sample `pause_turn` turns, reset on tool calls, and cap continuations at 8.
- Added coverage for pause-turn mapping and continuation-capping in agent and AI stream tests.
2026-06-12 02:33:45 +02:00
Can Bölük 31c5b21204 Merge pull request #2330 from can1357/farm/92afd68d/fix-lsp-format-tabsize-default
fix(lsp): resolve per-file format options from editorconfig and content
2026-06-12 02:33:32 +02:00
can1357 15bddcea80 Merge branch 'main' into farm/92afd68d/fix-lsp-format-tabsize-default 2026-06-12 02:33:19 +02:00
roboomp 0104393fae docs(catalog): removed duplicate changelog note
Removed the #2315 changelog entry from the already-released 15.11.3 section so the fix remains recorded only under Unreleased.

Fixes #2315
2026-06-11 23:42:46 +00:00
roboomp 2a399950fb style: bun run fix 2026-06-11 23:37:54 +00:00
roboomp 2d44d7ff71 fix(ai): overlay compat.reasoningEffortMap onto thinking.effortMap
After PR #2317 moved detected effort maps into model.thinking.effortMap,
the request builders stopped reading the active compat's reasoningEffortMap
at all. That dropped two surfaces:

  1) compat.whenThinking variants whose reasoningEffortMap was applied at
     buildModel time were silently ignored on thinking turns.
  2) Custom raw Model configs that author reasoningEffortMap on compat (no
     buildModel pass) had no path onto the wire.

Introduce a single resolveActiveEffortMap helper in both openai-completions
and openai-responses that overlays the active compat's reasoningEffortMap on
top of model.thinking.effortMap. Default catalog path is unchanged because
the resolved compat.reasoningEffortMap is empty.

Fixes #2315
2026-06-11 23:37:49 +00:00
roboomp efd0812791 fix(catalog): normalized cached restricted thinking efforts
Stale cached or dynamically discovered MiniMax M2 / GPT-OSS rows can carry
explicit pre-fix thinking.efforts with minimal/xhigh. buildModel used to
trust that explicit surface and only backfill wire maps, so those rows could
still make disableReasoning choose minimal and hit Fireworks' none mapping.

Normalize model-defined effort restrictions before returning explicit
thinking metadata, and drop stale effortMap entries that no longer apply to
the normalized effort surface.

Fixes #2315
2026-06-11 23:32:17 +00:00
roboomp e447f07fa3 style: bun run fix 2026-06-11 23:28:07 +00:00
roboomp 392a834036 fix(catalog): moved OpenAI effort maps into thinking metadata
Moved buildOpenAICompat's detected reasoning effort maps into catalog
thinking metadata so request handlers read model.thinking.effortMap instead
of model.compat.reasoningEffortMap. The moved defaults cover Groq Qwen,
DeepSeek-family models, OpenRouter Anthropic adaptive models, and Fireworks'
minimal-to-none mapping.

Explicit provider/user compat reasoningEffortMap values remain supported as
build-time override inputs and are merged into thinking.effortMap, filtered
to the model's declared effort surface. Regenerated models.json carries the
baked maps.

Fixes #2315
2026-06-11 23:28:07 +00:00
roboomp 637df6da4d style: bun run fix 2026-06-11 23:28:07 +00:00
roboomp fe49e66a60 fix(catalog): encoded MiniMax and GPT-OSS effort limits
Moved the MiniMax M2 / GPT-OSS reasoning effort fix out of the
OpenAI-compatible compat map and into catalog thinking metadata. These
families now derive low|medium|high as their supported efforts for
openai-completions models, and regenerated models.json carries the same
limits for bundled entries.

Fireworks' generic minimal -> none map remains unchanged for GLM and other
models that accept the none literal; the affected MiniMax/GPT-OSS models now
pick low from catalog metadata for disableReasoning.

Fixes #2315
2026-06-11 23:28:07 +00:00
roboomp 35131fed09 style: bun run fix 2026-06-11 23:28:07 +00:00
roboomp 9ff4e8c362 fix(catalog): clamped MiniMax M2 / GPT-OSS reasoning_effort on Fireworks
Fireworks-hosted reasoning models share a blanket reasoningEffortMap of
{ minimal: "none" }, but MiniMax M2 (M2/M2.1/M2.5/M2.7) and OpenAI
gpt-oss (Harmony) only accept low|medium|high — so the auto-thinking
classifier's disableReasoning: true path made every turn 400 when the
smol model was fireworks/minimax-m2.7 (or fireworks/gpt-oss-120b).

Added isMinimaxM2FamilyModelId and isOpenAIGptOssModelId identity
predicates in packages/catalog/src/identity/family.ts and routed those
families to a model-family-specific effort map { minimal: "low",
xhigh: "high" } in buildOpenAICompat, ordered before the Fireworks
blanket rule so GLM-5.x and other Fireworks models keep mapping
minimal → none unchanged.

Fixes #2315
2026-06-11 23:28:07 +00:00
Can Bölük 0012133670 Merge pull request #2332 from can1357/farm/270f5057/settings-esc-submenu-back
fix(settings): let Esc close submenus before the settings panel
2026-06-12 01:17:34 +02:00
can1357 d4b2c18b39 Merge branch 'main' into farm/270f5057/settings-esc-submenu-back 2026-06-12 01:15:48 +02:00
can1357 49919bd73f Merge remote-tracking branch 'origin/farm/36668129/fallback-issue-state-reason' 2026-06-12 00:05:04 +02:00