pi-mono/packages/coding-agent/src
Julien Chaumond bb25a3944c
feat(coding-agent): allow comments and trailing commas in models.json (#4162)
* feat(coding-agent): allow comments and trailing commas in models.json

Run user-supplied models.json through a small `stripJsonComments` helper
before JSON.parse so users can annotate their config and leave trailing
commas without breaking the loader.

Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>

* fix(coding-agent): strip comments before trailing commas in models.json

The single-pass regex couldn't see a trailing comma when a `//` comment sat
between the comma and its closer. Split into two passes: strip comments
first, then strip trailing commas on the cleaned input.

Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>

---------

Co-authored-by: julien-agent <Agents+cyolo@huggingface.co>
2026-05-04 22:44:35 +02:00
..
bun fix(coding-agent,ai): fallback to /proc/self/environ in Bun sandbox (#3801) 2026-04-27 18:36:53 +02:00
cli fix(coding-agent): handle frontmatter prompts in print mode 2026-05-04 22:37:38 +02:00
core feat(coding-agent): allow comments and trailing commas in models.json (#4162) 2026-05-04 22:44:35 +02:00
modes fix(coding-agent): exit on lost terminal 2026-05-04 12:07:16 +02:00
utils fix(coding-agent): repair self-update detection 2026-05-01 18:08:02 +02:00
cli.ts fix(coding-agent): disable undici body/headers idle timeouts on global dispatcher 2026-04-27 20:42:37 +02:00
config.ts refactor(coding-agent): inline npm command parsing 2026-05-01 18:52:54 +02:00
index.ts fix(coding-agent,ai): show env auth source in /login 2026-04-23 21:19:53 +02:00
main.ts feat: add model thinking level metadata 2026-05-02 01:21:06 +02:00
migrations.ts fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists 2026-04-20 22:05:28 +02:00
package-manager-cli.ts fix(coding-agent): repair self-update detection 2026-05-01 18:08:02 +02:00