pi-mono/packages/coding-agent/test
Aliou Diallo 39a9784d2a
fix(coding-agent): preserve models when re-registering provider with overrides only (#3651)
Previously, registerProvider() overwrote the stored config for a provider,
so a models registration followed by a baseUrl/headers-only override lost
the models. After refresh(), only the override-only config was replayed,
causing extension-provided models to disappear.

Added upsertRegisteredProvider() that merges defined fields into the
existing stored config instead of replacing it. Fields absent from the
incoming config are preserved from the stored config.

Also adds regression tests for dynamic provider override persistence
across refresh.
2026-04-24 20:15:35 +02:00
..
fixtures fix(coding-agent,tui): drop typebox compiler shim and fix progress 2026-04-22 21:12:20 +02:00
session-manager fix: align OpenAI cache affinity and use uuidv7 session ids 2026-04-14 23:20:13 +02:00
suite fix(coding-agent): preserve in-memory settings on reload 2026-04-23 23:47:49 +02:00
agent-session-auto-compaction-queue.test.ts fix(agent): simplify state API and update consumers fixes #2633 2026-03-30 12:43:34 +02:00
agent-session-branching.test.ts fix(coding-agent): use tool-name allowlists and remove cwd-bound singletons 2026-04-20 22:05:28 +02:00
agent-session-compaction.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
agent-session-concurrent.test.ts test(coding-agent): update stale mocks and fix /clone expectation (#3608) 2026-04-23 20:52:03 +02:00
agent-session-dynamic-provider.test.ts fix(coding-agent): refresh active model after provider updates closes #2291 2026-03-18 01:12:11 +01:00
agent-session-dynamic-tools.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
agent-session-retry.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
agent-session-runtime-events.test.ts fix(coding-agent): handle stale extension contexts 2026-04-23 22:07:13 +02:00
agent-session-stats.test.ts fix(agent): simplify state API and update consumers fixes #2633 2026-03-30 12:43:34 +02:00
agent-session-tree-navigation.test.ts fix(coding-agent): queue messages during branch summarization (#1803) 2026-03-04 08:55:30 +01:00
args.test.ts fix(coding-agent): restore builtin-only tool disabling 2026-04-23 21:36:16 +02:00
assistant-message.test.ts fix(coding-agent): restore assistant/user turn spacing 2026-04-17 00:52:14 +02:00
auth-storage.test.ts fix(coding-agent,ai): show env auth source in /login 2026-04-23 21:19:53 +02:00
bash-close-hang-windows.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
bash-execution-width.test.ts fix(coding-agent): recompute interactive bash preview width closes #2569 2026-03-24 20:09:43 +01:00
block-images.test.ts Add blockImages setting to prevent images from being sent to LLM providers 2026-01-06 11:59:09 +01:00
clipboard-image-bmp-conversion.test.ts fix(coding-agent): convert clipboard BMP images to PNG on paste 2026-01-31 23:24:10 +01:00
clipboard-image.test.ts fix(coding-agent): guard clipboard native load 2026-02-02 00:23:12 +01:00
clipboard.test.ts fix(coding-agent): harden clipboard copy 2026-04-24 12:55:58 +02:00
compaction-extensions-example.test.ts fix(coding-agent): resolve models.json auth per request closes #1835 2026-03-27 00:47:40 +01:00
compaction-extensions.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
compaction-serialization.test.ts fix(coding-agent): truncate tool results in compaction summarization to prevent overflow, fixes #1796 2026-03-06 16:57:14 +01:00
compaction-summary-reasoning.test.ts fix(coding-agent): reuse session thinking for compaction closes #3438 2026-04-20 15:09:50 +02:00
compaction-thinking-model.test.ts fix(coding-agent): use tool-name allowlists and remove cwd-bound singletons 2026-04-20 22:05:28 +02:00
compaction.test.ts fix(coding-agent): preserve kept messages across repeated compaction closes #2608 2026-03-27 03:36:57 +01:00
config.test.ts fix(coding-agent): detect Windows pnpm global installs closes #3378 2026-04-20 15:59:57 +02:00
edit-tool-legacy-input.test.ts fix(coding-agent): coerce stringified JSON edits in edit tool (#3370) 2026-04-18 18:29:23 +02:00
edit-tool-no-full-redraw.test.ts feat(tui,coding-agent): add OSC 9;4 terminal progress indicators 2026-04-22 11:55:52 +02:00
export-html-whitespace.test.ts fix(coding-agent): preserve share page tool output indentation closes #3440 2026-04-20 14:46:37 +02:00
export-html-xss.test.ts fix(coding-agent): sanitize markdown links in exported session HTML (#3532) 2026-04-22 10:53:03 +02:00
extensions-discovery.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
extensions-input-event.test.ts feat(ai,coding-agent): add faux provider and ModelRegistry factories 2026-03-29 21:08:50 +02:00
extensions-runner.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
file-mutation-queue.test.ts fix(coding-agent): simplify edit tool input closes #2639 2026-03-28 22:10:34 +01:00
footer-data-provider.test.ts fix(coding-agent,mom): retry fs watchers on async errors closes #3564 2026-04-22 23:03:19 +02:00
footer-width.test.ts refactor(coding-agent): add runtime host for session switching closes #2024 2026-03-31 13:49:57 +02:00
frontmatter.test.ts Centralize frontmatter parsing + parse frontmatter with yaml library (#728) 2026-01-16 00:31:53 +01:00
git-ssh-url.test.ts fix(coding-agent): tighten git source parsing and local path normalization (fixes #1426) 2026-02-12 21:28:06 +01:00
git-update.test.ts test(coding-agent): stabilize git update branch setup 2026-03-25 22:15:19 +01:00
image-processing.test.ts fix(coding-agent): enforce safe auto-resized image limits closes #2055 2026-03-22 21:48:34 +01:00
image-resize-callers.test.ts fix(coding-agent): enforce safe auto-resized image limits closes #2055 2026-03-22 21:48:34 +01:00
initial-message.test.ts refactor(coding-agent): replace AgentSessionRuntimeHost with closure-based AgentSessionRuntime 2026-04-03 20:14:12 +02:00
interactive-mode-anthropic-warning.test.ts fix(coding-agent): warn on Anthropic subscription auth 2026-04-08 18:46:40 +02:00
interactive-mode-clone-command.test.ts test(coding-agent): update stale mocks and fix /clone expectation (#3608) 2026-04-23 20:52:03 +02:00
interactive-mode-compaction.test.ts test(coding-agent): update stale mocks and fix /clone expectation (#3608) 2026-04-23 20:52:03 +02:00
interactive-mode-import-command.test.ts fix(coding-agent): parse quoted import paths and missing files 2026-04-17 00:02:14 +02:00
interactive-mode-status.test.ts fix(coding-agent): strip trailing index.js|ts from extension labels in startup banner (#3596) 2026-04-23 21:03:26 +02:00
interactive-mode-suspend.test.ts fix(coding-agent): handle ctrl+z on windows closes #3191 2026-04-16 12:33:47 +02:00
keybindings-migration.test.ts refactor(coding-agent): replace AgentSessionRuntimeHost with closure-based AgentSessionRuntime 2026-04-03 20:14:12 +02:00
model-registry.test.ts fix(coding-agent): preserve models when re-registering provider with overrides only (#3651) 2026-04-24 20:15:35 +02:00
model-resolver.test.ts fix(models): align minimax and zai defaults (#2445) 2026-03-20 10:00:57 +01:00
oauth-selector.test.ts fix(coding-agent): show models.json auth in login selector 2026-04-24 17:28:40 +02:00
package-command-paths.test.ts fix(coding-agent): update project npm packages 2026-03-20 19:36:06 +01:00
package-manager-ssh.test.ts fix(coding-agent): tighten git source parsing and local path normalization (fixes #1426) 2026-02-12 21:28:06 +01:00
package-manager.test.ts fix(coding-agent): avoid cmd.exe for git installs on windows closes #3642 2026-04-24 13:56:10 +02:00
path-utils.test.ts handle lower case am/pm in macos screenshot names (#3194) 2026-04-15 12:00:46 +02:00
plan-mode-utils.test.ts feat(plan-mode): enhanced plan mode with explicit step tracking (#694) 2026-01-13 17:53:11 +01:00
print-mode.test.ts test(coding-agent): update stale mocks and fix /clone expectation (#3608) 2026-04-23 20:52:03 +02:00
prompt-templates.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
resource-loader.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
rpc-client-clone.test.ts fix(coding-agent): split /clone from /fork UX 2026-04-20 14:33:32 +02:00
rpc-example.ts Update RPC example to use RpcClient 2025-12-09 14:44:13 +01:00
rpc-jsonl.test.ts fix(coding-agent): use strict JSONL framing fixes #1911 2026-03-07 14:34:27 +01:00
rpc-prompt-response-semantics.test.ts test(coding-agent): update stale mocks and fix /clone expectation (#3608) 2026-04-23 20:52:03 +02:00
rpc.test.ts fix(coding-agent): rpc test needs prompt before checking session file 2026-02-04 13:27:54 +01:00
sdk-codex-cache-probe-tool-loop.ts feat(ai,coding-agent): add faux provider and ModelRegistry factories 2026-03-29 21:08:50 +02:00
sdk-openrouter-attribution.test.ts fix(coding-agent): add OpenRouter attribution headers 2026-04-20 14:14:36 +02:00
sdk-session-manager.test.ts fix(coding-agent): use tool-name allowlists and remove cwd-bound singletons 2026-04-20 22:05:28 +02:00
sdk-skills.test.ts fix(coding-agent): unify source provenance, closes #1734 2026-03-23 02:02:42 +01:00
session-cwd.test.ts fix(coding-agent): handle missing session cwd 2026-04-05 21:24:32 +02:00
session-info-modified-timestamp.test.ts fix(coding-agent,tui): stabilize windows shell/path handling 2026-03-14 05:36:21 +01:00
session-selector-path-delete.test.ts fix(coding-agent): handle symlinked session selector paths closes #3364 2026-04-20 16:25:12 +02:00
session-selector-rename.test.ts fix(keybindings): migrate to namespaced ids closes #2391 2026-03-20 01:55:30 +01:00
session-selector-search.test.ts feat(coding-agent): add named-only filter toggle to /resume picker (#1128) 2026-02-01 19:03:38 +01:00
settings-manager-bug.test.ts refactor(coding-agent): improve settings storage semantics and error handling 2026-02-17 00:08:32 +01:00
settings-manager.test.ts fix(coding-agent): expand ~ in sessionDir 2026-04-22 00:21:57 +02:00
skills.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
stdout-cleanliness.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
streaming-render-debug.ts Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
system-prompt.test.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
test-harness.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
test-harness.ts feat(ai,coding-agent): add faux provider and ModelRegistry factories 2026-03-29 21:08:50 +02:00
test-theme-colors.ts Improve light theme color contrast for WCAG compliance (#682) 2026-01-13 13:03:04 +01:00
theme-export.test.ts fix(coding-agent): resolve theme export variables closes #2707 2026-03-31 14:41:50 +02:00
tool-execution-component.test.ts fix(typebox): migrate to v1 with extension compat (#3474) 2026-04-22 19:59:33 +02:00
tools.test.ts fix(coding-agent): resolve shell config from session settings 2026-04-20 22:32:11 +02:00
tree-selector.test.ts feat(coding-agent): add label timestamps to the session tree (#2691) 2026-03-30 15:56:37 +02:00
trigger-compact-extension.test.ts fix: expose abort signal to extensions closes #2660 2026-03-28 22:25:06 +01:00
truncate-to-width.test.ts fix: TUI crash with Unicode characters in branch selector 2025-12-05 11:59:39 +01:00
user-message.test.ts fix(coding-agent): stabilize user message OSC 133 padding closes #3090 2026-04-17 00:22:39 +02:00
utilities.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00