Commit Graph

577 Commits

Author SHA1 Message Date
Mario Zechner
2e1f07bac2 fix(coding-agent): avoid invalid footer home abbreviation
closes #4878
2026-05-23 09:53:36 +02:00
Mario Zechner
c841a6c78f Clean up OAuth device-code callbacks 2026-05-22 15:51:36 +02:00
Mario Zechner
60e2e4332d Merge pull request #4898 from haoqixu/fix-4761
fix(coding-agent): use the right basedir for patterns
2026-05-22 15:22:45 +02:00
haoqixu
baf4028fb9 fix(coding-agent): use the right basedir for patterns 2026-05-22 18:33:26 +08:00
Vegard Stikbakke
c554364c2a feat(ai): refactor device code login for copilot 2026-05-22 08:54:18 +02:00
Sviatoslav Abakumov
088987b200 fix(coding-agent): list themes by content name 2026-05-21 00:10:50 +04:00
Armin Ronacher
849f9d9c5a fix(coding-agent): configure HTTP idle timeout (#4759) 2026-05-20 12:45:00 +02:00
Mario Zechner
b141e1fa24 chore: remove web-ui workspace 2026-05-20 02:26:09 +02:00
Armin Ronacher
ae9450dc51 chore(ts): use source import extensions 2026-05-20 00:04:03 +02:00
Mario Zechner
06c6c324d7 chore: enforce erasable TypeScript syntax 2026-05-19 23:15:39 +02:00
Mario Zechner
b944827623 fix(agent): stop tool preflight after extension abort
closes #4276
2026-05-19 13:10:03 +02:00
Armin Ronacher
f4f0ac7ada feat(coding-agent): show update notes (#4724) 2026-05-19 12:08:13 +02:00
Armin Ronacher
dafcf61a34 fix: align theme truecolor detection 2026-05-18 21:56:48 +02:00
Armin Ronacher
f10cf57e96 feat(coding-agent): improve terminal theme detection 2026-05-18 18:28:08 +02:00
Armin Ronacher
479024603e fix(coding-agent): set explicit theme text colors 2026-05-18 18:04:55 +02:00
Armin Ronacher
a294cdafd9 fix(coding-agent): unblock Windows external editor
closes #4612
2026-05-18 09:49:24 +02:00
Mario Zechner
730f2f1046 Merge pull request #4243 from samjonester/samjonester/config-selector-dynamic-height
config selector: scale maxVisible to terminal height
2026-05-18 01:20:11 +02:00
Mario Zechner
43d3cdd48a fix(coding-agent): use configured model scope cycle hint closes #4508 2026-05-17 00:03:03 +02:00
Mario Zechner
7ddc7dd1ec fix(coding-agent): space interactive errors
closes #4510
2026-05-15 01:10:56 +02:00
Armin Ronacher
e0b5d27af2 chore(deps): replace cli-highlight (#4468) 2026-05-13 12:19:45 +02:00
Armin Ronacher
2829146dde chore(deps): Kill small dependencies (#4467) 2026-05-13 10:44:56 +02:00
Mario Zechner
5998b57958 Merge pull request #4426 from ofa1/fix/restore-tty-on-uncaught-exception
fix(coding-agent): restore terminal on uncaught exception
2026-05-12 23:48:28 +02:00
Mario Zechner
d62c416cfd fix(coding-agent): allow tool expansion during extension confirms
closes #4429
2026-05-12 23:34:57 +02:00
Omair Ahmed
9d84e28692 fix(coding-agent): restore terminal on uncaught exception
When an uncaught exception fires in interactive mode, the process dies with
stdin still in raw mode and the cursor hidden, leaving the user with a
"borked" terminal that needs `stty sane && reset` to recover. The most
common trigger is an extension's async ChildProcess `exit` callback that
throws (e.g. from accessing a stale ctx after session replacement), but
this affects any uncaught throw from anywhere in pi.

Add an uncaughtException handler in registerSignalHandlers that calls
ui.stop() before exiting, mirroring the existing emergencyTerminalExit
pattern. The handler is registered with prependListener and tracked in
signalCleanupHandlers, so it is removed on graceful shutdown the same way
the other handlers are.

Unlike emergencyTerminalExit (used for SIGHUP / dead-terminal EIO), the
terminal is still alive on uncaughtException, so we run the normal
ui.stop() to restore cooked mode, the cursor, bracketed paste mode, and
Kitty / modifyOtherKeys sequences.
2026-05-11 16:27:27 -04:00
Mario Zechner
f8d0fa67dc fix(coding-agent): share theme across package scopes
closes #4333
2026-05-10 18:13:16 +02:00
Armin Ronacher
76131673d3 docs(coding-agent): update theme schema URLs 2026-05-09 23:03:58 +02:00
Mario Zechner
91bacac739 fix(coding-agent): show Option key on macOS
closes #4289
2026-05-08 15:48:20 +02:00
Mario Zechner
dfb9ffa9ee Merge pull request #4299 from aliou/fix/resource-location-in-config-tui
fix(coding-agent): preserve .agents provenance in skill metadata
2026-05-08 15:32:01 +02:00
Mario Zechner
defd7038ab fix(coding-agent): hyperlink update changelog closes #4280 2026-05-08 15:06:57 +02:00
Armin Ronacher
3421726e86 fix(coding-agent): disambiguate resource paths 2026-05-08 00:16:28 +02:00
Mario Zechner
3e5ad67e0f chore: migrate pi packages to earendil works scope 2026-05-07 15:59:42 +02:00
Sam Jones
fcd96df6f2 config selector: scale maxVisible to terminal height
ResourceList hardcoded maxVisible=15, leaving most of the screen
empty on tall terminals. Pass terminalHeight through from
ProcessTerminal.rows and compute maxVisible dynamically, matching
the pattern tree-selector already uses.

Closes #4241
2026-05-06 14:45:13 -04:00
Aliou Diallo
0f95975103 fix(coding-agent): preserve .agents provenance in skill metadata
fixes #3978
2026-05-06 09:40:37 +02:00
Mario Zechner
755da309dd fix(coding-agent): keep pending tool renders after thinking toggle
closes #4167
2026-05-05 13:18:04 +02:00
Armin Ronacher
b5755fd27d feat(oauth): support interactive login selection (#4190) 2026-05-05 13:16:56 +02:00
Armin Ronacher
756b774935 fix(coding-agent): exit on lost terminal
Fixes #4144.
2026-05-04 12:07:16 +02:00
Mario Zechner
4745a95898 feat(ai): add cached codex websocket transport 2026-05-01 13:07:40 +02:00
Mario Zechner
95ae590279 fix(coding-agent): refresh thinking border from extensions
closes #3888
2026-04-30 22:50:00 +02:00
Mario Zechner
cf5ec23240 feat(coding-agent): add provider display names
closes #3956
2026-04-30 00:10:38 +02:00
Mario Zechner
d698647b12 feat(coding-agent): add composable editor factory access
closes #3935
2026-04-29 23:26:25 +02:00
Mario Zechner
39146f3296 fix(coding-agent): clear idle follow-up submissions
closes #3926
2026-04-29 23:16:09 +02:00
Armin Ronacher
c745efc0d0 feat: Update check against pi.dev (#3877) 2026-04-28 12:48:27 +02:00
MC
d6e08b3da0 feat(ai): add Cloudflare Workers AI as a provider (#3851)
* feat(ai): add Cloudflare Workers AI as a provider

Cloudflare Workers AI hosts open-weight LLMs (Kimi K2.6, GPT-OSS,
GLM-4.7, Llama 4, Gemma 4, Nemotron 3) on Cloudflare's GPU network with
an OpenAI-compatible endpoint. Reuses the openai-completions API
protocol; the per-account URL contains a {CLOUDFLARE_ACCOUNT_ID}
placeholder resolved at request time by a small helper.

Pi automatically sets x-session-affinity for prefix caching:
https://developers.cloudflare.com/workers-ai/features/prompt-caching/

Auth: CLOUDFLARE_API_KEY (matches pi's *_API_KEY convention) +
CLOUDFLARE_ACCOUNT_ID. The User-Agent identifies traffic as
'pi-coding-agent' in Cloudflare analytics.

Verified end-to-end against a real Cloudflare account: 17 e2e tests
pass across stream/empty/tokens/unicode/tool-call-without-result/
total-tokens against @cf/moonshotai/kimi-k2.6.

Cloudflare AI Gateway is a separate, larger change (it requires routing
through provider-specific subpaths with the matching API protocol per
upstream) and will land in a follow-up PR.

* refactor(ai): move Cloudflare User-Agent and session-affinity flag to per-model metadata

Instead of conditionally setting them in openai-completions.ts based on
provider detection, declare them as model-level fields in the catalog
(headers + compat). This is consistent with how the github-copilot and
kimi-coding entries already declare their static headers.

  packages/ai/scripts/generate-models.ts: emit headers and compat fields
  on each cloudflare-workers-ai entry (CLOUDFLARE_STATIC_HEADERS).
  packages/ai/src/providers/openai-completions.ts: drop the
  isCloudflareProvider conditional that injected User-Agent and the
  isCloudflareWorkersAI override of sendSessionAffinityHeaders.
  packages/ai/src/models.generated.ts: re-spliced 8 cloudflare-workers-ai
  entries with headers + compat.

Behavior is unchanged - verified via fetch interceptor that User-Agent
and x-session-affinity / session_id / x-client-request-id are still sent
on outbound requests. 5/5 e2e tests pass.
2026-04-27 23:41:54 +02:00
Aliou Diallo
13610d3893 fix(coding-agent): show item count instead of line count in config scroll indicator (#3820) 2026-04-27 23:21:32 +02:00
Mario Zechner
2c08775ee7 fix(coding-agent): fix packaged session selector import 2026-04-27 21:44:00 +02:00
Mario Zechner
aefb0fedfe feat(coding-agent): add warnings.anthropicExtraUsage opt-out
closes #3808
2026-04-27 20:36:00 +02:00
Aliou Diallo
10425abb87 fix(coding-agent): dedupe symlinked resources (#3818)
* fix(coding-agent): dedupe symlinked resources

Fixes #3767

* refactor(coding-agent): extract canonicalizePath util for symlink resolution
2026-04-27 18:33:10 +02:00
Mario Zechner
c19e64a444 fix(coding-agent): refresh title after extension session rename
closes #3686
2026-04-25 17:20:26 +02:00
Armin Ronacher
dcf2651631 feat(coding-agent): Add built-in update command (#3680) 2026-04-25 13:09:33 +02:00
Mario Zechner
6580dae400 feat(coding-agent): allow hiding working loader
closes #3674
2026-04-24 23:17:43 +02:00