@selesai/code 0.13.11 → 0.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/dist/bun/cli.d.ts +0 -2
- package/dist/bun/cli.js +0 -10
- package/dist/bun/register-bedrock.d.ts +0 -1
- package/dist/bun/register-bedrock.js +0 -3
- package/dist/bun/restore-sandbox-env.d.ts +0 -16
- package/dist/bun/restore-sandbox-env.js +0 -35
- package/dist/cli/args.d.ts +0 -59
- package/dist/cli/args.js +0 -428
- package/dist/cli/args.test.d.ts +0 -1
- package/dist/cli/args.test.js +0 -32
- package/dist/cli/config-selector.d.ts +0 -15
- package/dist/cli/config-selector.js +0 -30
- package/dist/cli/credential-print.d.ts +0 -22
- package/dist/cli/credential-print.js +0 -116
- package/dist/cli/file-processor.d.ts +0 -14
- package/dist/cli/file-processor.js +0 -69
- package/dist/cli/initial-message.d.ts +0 -17
- package/dist/cli/initial-message.js +0 -21
- package/dist/cli/list-models.d.ts +0 -8
- package/dist/cli/list-models.js +0 -97
- package/dist/cli/project-trust.d.ts +0 -9
- package/dist/cli/project-trust.js +0 -47
- package/dist/cli/session-picker.d.ts +0 -9
- package/dist/cli/session-picker.js +0 -35
- package/dist/cli/startup-ui.d.ts +0 -22
- package/dist/cli/startup-ui.js +0 -172
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -17
- package/dist/config.d.ts +0 -181
- package/dist/config.js +0 -788
- package/dist/core/agent-session-auto-handoff.test.d.ts +0 -1
- package/dist/core/agent-session-auto-handoff.test.js +0 -183
- package/dist/core/agent-session-runtime.d.ts +0 -118
- package/dist/core/agent-session-runtime.js +0 -305
- package/dist/core/agent-session-services.d.ts +0 -84
- package/dist/core/agent-session-services.js +0 -132
- package/dist/core/agent-session-skill-block.test.d.ts +0 -1
- package/dist/core/agent-session-skill-block.test.js +0 -19
- package/dist/core/agent-session.d.ts +0 -712
- package/dist/core/agent-session.js +0 -3031
- package/dist/core/agents.d.ts +0 -52
- package/dist/core/agents.js +0 -237
- package/dist/core/auth-guidance.d.ts +0 -4
- package/dist/core/auth-guidance.js +0 -20
- package/dist/core/auth-storage.d.ts +0 -61
- package/dist/core/auth-storage.js +0 -249
- package/dist/core/bash-executor.d.ts +0 -31
- package/dist/core/bash-executor.js +0 -110
- package/dist/core/built-in-extensions.d.ts +0 -2
- package/dist/core/built-in-extensions.js +0 -2
- package/dist/core/cache-stats.d.ts +0 -48
- package/dist/core/cache-stats.js +0 -100
- package/dist/core/compaction/branch-summarization.d.ts +0 -97
- package/dist/core/compaction/branch-summarization.js +0 -246
- package/dist/core/compaction/compaction.d.ts +0 -141
- package/dist/core/compaction/compaction.js +0 -659
- package/dist/core/compaction/index.d.ts +0 -6
- package/dist/core/compaction/index.js +0 -6
- package/dist/core/compaction/utils.d.ts +0 -37
- package/dist/core/compaction/utils.js +0 -141
- package/dist/core/defaults.d.ts +0 -3
- package/dist/core/defaults.js +0 -10
- package/dist/core/diagnostics.d.ts +0 -15
- package/dist/core/diagnostics.js +0 -1
- package/dist/core/event-bus.d.ts +0 -8
- package/dist/core/event-bus.js +0 -24
- package/dist/core/exec.d.ts +0 -28
- package/dist/core/exec.js +0 -74
- package/dist/core/experimental.d.ts +0 -5
- package/dist/core/experimental.js +0 -7
- package/dist/core/export-html/ansi-to-html.d.ts +0 -21
- package/dist/core/export-html/ansi-to-html.js +0 -248
- package/dist/core/export-html/index.d.ts +0 -36
- package/dist/core/export-html/index.js +0 -225
- package/dist/core/export-html/template.css +0 -1066
- package/dist/core/export-html/template.html +0 -55
- package/dist/core/export-html/template.js +0 -1864
- package/dist/core/export-html/tool-renderer.d.ts +0 -33
- package/dist/core/export-html/tool-renderer.js +0 -107
- package/dist/core/export-html/vendor/highlight.min.js +0 -1213
- package/dist/core/export-html/vendor/marked.min.js +0 -78
- package/dist/core/extensions/index.d.ts +0 -11
- package/dist/core/extensions/index.js +0 -8
- package/dist/core/extensions/loader.d.ts +0 -22
- package/dist/core/extensions/loader.js +0 -632
- package/dist/core/extensions/loader.test.d.ts +0 -1
- package/dist/core/extensions/loader.test.js +0 -21
- package/dist/core/extensions/runner.d.ts +0 -176
- package/dist/core/extensions/runner.js +0 -1016
- package/dist/core/extensions/types.d.ts +0 -1313
- package/dist/core/extensions/types.js +0 -44
- package/dist/core/extensions/wrapper.d.ts +0 -19
- package/dist/core/extensions/wrapper.js +0 -40
- package/dist/core/footer-data-provider.d.ts +0 -63
- package/dist/core/footer-data-provider.js +0 -337
- package/dist/core/git-command.d.ts +0 -8
- package/dist/core/git-command.js +0 -48
- package/dist/core/handoff.d.ts +0 -11
- package/dist/core/handoff.js +0 -49
- package/dist/core/http-dispatcher.d.ts +0 -21
- package/dist/core/http-dispatcher.js +0 -90
- package/dist/core/index.d.ts +0 -12
- package/dist/core/index.js +0 -12
- package/dist/core/keybindings.d.ts +0 -421
- package/dist/core/keybindings.js +0 -295
- package/dist/core/llama/client.d.ts +0 -66
- package/dist/core/llama/client.js +0 -308
- package/dist/core/llama/huggingface.d.ts +0 -22
- package/dist/core/llama/huggingface.js +0 -140
- package/dist/core/llama/index.d.ts +0 -2
- package/dist/core/llama/index.js +0 -207
- package/dist/core/llama/provider.d.ts +0 -11
- package/dist/core/llama/provider.js +0 -143
- package/dist/core/llama/ui.d.ts +0 -41
- package/dist/core/llama/ui.js +0 -415
- package/dist/core/messages.d.ts +0 -76
- package/dist/core/messages.js +0 -122
- package/dist/core/model-config.d.ts +0 -547
- package/dist/core/model-config.js +0 -278
- package/dist/core/model-registry.d.ts +0 -45
- package/dist/core/model-registry.js +0 -107
- package/dist/core/model-resolver.d.ts +0 -122
- package/dist/core/model-resolver.js +0 -558
- package/dist/core/model-runtime.d.ts +0 -86
- package/dist/core/model-runtime.js +0 -472
- package/dist/core/models-store.d.ts +0 -16
- package/dist/core/models-store.js +0 -44
- package/dist/core/output-guard.d.ts +0 -6
- package/dist/core/output-guard.js +0 -88
- package/dist/core/package-manager.d.ts +0 -221
- package/dist/core/package-manager.js +0 -2232
- package/dist/core/package-manager.test.d.ts +0 -1
- package/dist/core/package-manager.test.js +0 -58
- package/dist/core/project-trust.d.ts +0 -14
- package/dist/core/project-trust.js +0 -58
- package/dist/core/prompt-templates.d.ts +0 -53
- package/dist/core/prompt-templates.js +0 -235
- package/dist/core/provider-attribution.d.ts +0 -3
- package/dist/core/provider-attribution.js +0 -71
- package/dist/core/provider-composer.d.ts +0 -54
- package/dist/core/provider-composer.js +0 -387
- package/dist/core/radius.d.ts +0 -1
- package/dist/core/radius.js +0 -1
- package/dist/core/remote-catalog-provider.d.ts +0 -4
- package/dist/core/remote-catalog-provider.js +0 -119
- package/dist/core/resolve-config-value.d.ts +0 -29
- package/dist/core/resolve-config-value.js +0 -246
- package/dist/core/resource-loader.d.ts +0 -256
- package/dist/core/resource-loader.js +0 -974
- package/dist/core/runtime-credentials.d.ts +0 -16
- package/dist/core/runtime-credentials.js +0 -41
- package/dist/core/sdk.d.ts +0 -107
- package/dist/core/sdk.js +0 -279
- package/dist/core/session-cwd.d.ts +0 -18
- package/dist/core/session-cwd.js +0 -37
- package/dist/core/session-manager.d.ts +0 -355
- package/dist/core/session-manager.js +0 -1339
- package/dist/core/settings-manager-auto-handoff.test.d.ts +0 -1
- package/dist/core/settings-manager-auto-handoff.test.js +0 -42
- package/dist/core/settings-manager.d.ts +0 -350
- package/dist/core/settings-manager.js +0 -1076
- package/dist/core/skills.d.ts +0 -70
- package/dist/core/skills.js +0 -401
- package/dist/core/slash-commands.d.ts +0 -14
- package/dist/core/slash-commands.js +0 -27
- package/dist/core/source-info.d.ts +0 -17
- package/dist/core/source-info.js +0 -18
- package/dist/core/system-prompt.d.ts +0 -30
- package/dist/core/system-prompt.js +0 -129
- package/dist/core/system-prompt.test.d.ts +0 -1
- package/dist/core/system-prompt.test.js +0 -94
- package/dist/core/telemetry.d.ts +0 -2
- package/dist/core/telemetry.js +0 -8
- package/dist/core/timings.d.ts +0 -9
- package/dist/core/timings.js +0 -40
- package/dist/core/tools/bash.d.ts +0 -86
- package/dist/core/tools/bash.js +0 -409
- package/dist/core/tools/edit-diff.d.ts +0 -105
- package/dist/core/tools/edit-diff.js +0 -423
- package/dist/core/tools/edit.d.ts +0 -50
- package/dist/core/tools/edit.js +0 -285
- package/dist/core/tools/file-mutation-queue.d.ts +0 -5
- package/dist/core/tools/file-mutation-queue.js +0 -51
- package/dist/core/tools/find.d.ts +0 -34
- package/dist/core/tools/find.js +0 -304
- package/dist/core/tools/grep.d.ts +0 -36
- package/dist/core/tools/grep.js +0 -303
- package/dist/core/tools/index.d.ts +0 -42
- package/dist/core/tools/index.js +0 -119
- package/dist/core/tools/ls.d.ts +0 -36
- package/dist/core/tools/ls.js +0 -166
- package/dist/core/tools/output-accumulator.d.ts +0 -51
- package/dist/core/tools/output-accumulator.js +0 -183
- package/dist/core/tools/path-utils.d.ts +0 -9
- package/dist/core/tools/path-utils.js +0 -98
- package/dist/core/tools/powershell.d.ts +0 -15
- package/dist/core/tools/powershell.js +0 -38
- package/dist/core/tools/powershell.test.d.ts +0 -1
- package/dist/core/tools/powershell.test.js +0 -20
- package/dist/core/tools/read-vision.test.d.ts +0 -1
- package/dist/core/tools/read-vision.test.js +0 -122
- package/dist/core/tools/read.d.ts +0 -46
- package/dist/core/tools/read.js +0 -327
- package/dist/core/tools/render-utils.d.ts +0 -23
- package/dist/core/tools/render-utils.js +0 -64
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -13
- package/dist/core/tools/tool-definition-wrapper.js +0 -35
- package/dist/core/tools/truncate.d.ts +0 -69
- package/dist/core/tools/truncate.js +0 -214
- package/dist/core/tools/write.d.ts +0 -25
- package/dist/core/tools/write.js +0 -198
- package/dist/core/trust-manager.d.ts +0 -35
- package/dist/core/trust-manager.js +0 -201
- package/dist/core/usage-totals.d.ts +0 -20
- package/dist/core/usage-totals.js +0 -61
- package/dist/core/vision-caption.d.ts +0 -30
- package/dist/core/vision-caption.js +0 -62
- package/dist/defaults/models.json +0 -335
- package/dist/defaults/settings.json +0 -61
- package/dist/extensions/agent-browser.test.ts +0 -371
- package/dist/extensions/agent-browser.ts +0 -160
- package/dist/extensions/auto-session-name.test.ts +0 -169
- package/dist/extensions/auto-session-name.ts +0 -100
- package/dist/extensions/context-compaction-reminder.test.ts +0 -82
- package/dist/extensions/context-compaction-reminder.ts +0 -28
- package/dist/extensions/copy-turn.test.ts +0 -383
- package/dist/extensions/copy-turn.ts +0 -146
- package/dist/extensions/cost-reconcile.test.ts +0 -272
- package/dist/extensions/cost-reconcile.ts +0 -264
- package/dist/extensions/grep-app/index.test.ts +0 -406
- package/dist/extensions/grep-app/index.ts +0 -216
- package/dist/extensions/handoff-new.test.ts +0 -434
- package/dist/extensions/handoff-new.ts +0 -129
- package/dist/extensions/herdr-agent-state.ts +0 -310
- package/dist/extensions/inline-skills.test.ts +0 -204
- package/dist/extensions/inline-skills.ts +0 -102
- package/dist/extensions/package.json +0 -32
- package/dist/extensions/pi-hermes-memory/CHANGELOG.md +0 -371
- package/dist/extensions/pi-hermes-memory/LICENSE +0 -21
- package/dist/extensions/pi-hermes-memory/README.md +0 -643
- package/dist/extensions/pi-hermes-memory/docs/0.1/TASKS.md +0 -197
- package/dist/extensions/pi-hermes-memory/docs/0.2/PLAN.md +0 -290
- package/dist/extensions/pi-hermes-memory/docs/0.2/TASKS.md +0 -134
- package/dist/extensions/pi-hermes-memory/docs/0.2/TEST-PLAN.md +0 -216
- package/dist/extensions/pi-hermes-memory/docs/0.3/PLAN.md +0 -330
- package/dist/extensions/pi-hermes-memory/docs/0.3/TASKS.md +0 -125
- package/dist/extensions/pi-hermes-memory/docs/0.4/PLAN.md +0 -160
- package/dist/extensions/pi-hermes-memory/docs/0.4/TASKS.md +0 -113
- package/dist/extensions/pi-hermes-memory/docs/0.6/CHANGELOG.md +0 -57
- package/dist/extensions/pi-hermes-memory/docs/0.6/PLAN.md +0 -202
- package/dist/extensions/pi-hermes-memory/docs/0.6/TASKS.md +0 -144
- package/dist/extensions/pi-hermes-memory/docs/0.7/PLAN.md +0 -349
- package/dist/extensions/pi-hermes-memory/docs/0.7/TASKS.md +0 -110
- package/dist/extensions/pi-hermes-memory/docs/PUBLISHING.md +0 -149
- package/dist/extensions/pi-hermes-memory/docs/ROADMAP.md +0 -468
- package/dist/extensions/pi-hermes-memory/docs/images/memory-architecture.svg +0 -1
- package/dist/extensions/pi-hermes-memory/docs/images/pi-logo.svg +0 -22
- package/dist/extensions/pi-hermes-memory/docs/images/pi_memory.png +0 -0
- package/dist/extensions/pi-hermes-memory/docs/images/pi_memory.svg +0 -19
- package/dist/extensions/pi-hermes-memory/docs/images/security-flow.svg +0 -1
- package/dist/extensions/pi-hermes-memory/docs/images/session-lifecycle.svg +0 -1
- package/dist/extensions/pi-hermes-memory/docs/images/source-architecture.svg +0 -1
- package/dist/extensions/pi-hermes-memory/docs/mermaid/memory-architecture.mmd +0 -49
- package/dist/extensions/pi-hermes-memory/docs/mermaid/security-flow.mmd +0 -40
- package/dist/extensions/pi-hermes-memory/docs/mermaid/session-lifecycle.mmd +0 -56
- package/dist/extensions/pi-hermes-memory/docs/mermaid/source-architecture.mmd +0 -54
- package/dist/extensions/pi-hermes-memory/package-lock.json +0 -3799
- package/dist/extensions/pi-hermes-memory/package.json +0 -66
- package/dist/extensions/pi-hermes-memory/scripts/check-min-sdk.mjs +0 -99
- package/dist/extensions/pi-hermes-memory/scripts/ensure-dev.mjs +0 -57
- package/dist/extensions/pi-hermes-memory/src/auto-consolidation-warning.ts +0 -6
- package/dist/extensions/pi-hermes-memory/src/config.ts +0 -178
- package/dist/extensions/pi-hermes-memory/src/constants.ts +0 -424
- package/dist/extensions/pi-hermes-memory/src/extension-root-migration.ts +0 -639
- package/dist/extensions/pi-hermes-memory/src/handlers/auto-consolidate.ts +0 -401
- package/dist/extensions/pi-hermes-memory/src/handlers/background-review.ts +0 -297
- package/dist/extensions/pi-hermes-memory/src/handlers/child-process-watchdog.mjs +0 -90
- package/dist/extensions/pi-hermes-memory/src/handlers/correction-detector.ts +0 -300
- package/dist/extensions/pi-hermes-memory/src/handlers/index-sessions.ts +0 -86
- package/dist/extensions/pi-hermes-memory/src/handlers/insights.ts +0 -78
- package/dist/extensions/pi-hermes-memory/src/handlers/interview.ts +0 -37
- package/dist/extensions/pi-hermes-memory/src/handlers/learn-memory.ts +0 -186
- package/dist/extensions/pi-hermes-memory/src/handlers/message-parts.ts +0 -27
- package/dist/extensions/pi-hermes-memory/src/handlers/pi-child-process.ts +0 -485
- package/dist/extensions/pi-hermes-memory/src/handlers/preview-context.ts +0 -105
- package/dist/extensions/pi-hermes-memory/src/handlers/review-memory-ops.ts +0 -506
- package/dist/extensions/pi-hermes-memory/src/handlers/session-backfill.ts +0 -145
- package/dist/extensions/pi-hermes-memory/src/handlers/session-flush.ts +0 -151
- package/dist/extensions/pi-hermes-memory/src/handlers/session-live-index.ts +0 -94
- package/dist/extensions/pi-hermes-memory/src/handlers/skills-command.ts +0 -1334
- package/dist/extensions/pi-hermes-memory/src/handlers/standing-pin.ts +0 -111
- package/dist/extensions/pi-hermes-memory/src/handlers/switch-project.ts +0 -75
- package/dist/extensions/pi-hermes-memory/src/handlers/sync-markdown-memories.ts +0 -266
- package/dist/extensions/pi-hermes-memory/src/index.ts +0 -378
- package/dist/extensions/pi-hermes-memory/src/lifecycle-timing.ts +0 -54
- package/dist/extensions/pi-hermes-memory/src/paths.ts +0 -61
- package/dist/extensions/pi-hermes-memory/src/project-context.ts +0 -13
- package/dist/extensions/pi-hermes-memory/src/project-memory-migration.ts +0 -93
- package/dist/extensions/pi-hermes-memory/src/project.ts +0 -157
- package/dist/extensions/pi-hermes-memory/src/prompt-context.ts +0 -55
- package/dist/extensions/pi-hermes-memory/src/store/atomic-lock-coordinator.ts +0 -375
- package/dist/extensions/pi-hermes-memory/src/store/canonical-storage-path.ts +0 -54
- package/dist/extensions/pi-hermes-memory/src/store/content-scanner.ts +0 -101
- package/dist/extensions/pi-hermes-memory/src/store/db.ts +0 -1180
- package/dist/extensions/pi-hermes-memory/src/store/fts-query.ts +0 -101
- package/dist/extensions/pi-hermes-memory/src/store/markdown-mutation-lock.ts +0 -38
- package/dist/extensions/pi-hermes-memory/src/store/memory-lookup.ts +0 -24
- package/dist/extensions/pi-hermes-memory/src/store/memory-store.ts +0 -1191
- package/dist/extensions/pi-hermes-memory/src/store/recovery-maintenance.ts +0 -66
- package/dist/extensions/pi-hermes-memory/src/store/schema.ts +0 -118
- package/dist/extensions/pi-hermes-memory/src/store/session-anchor-search.ts +0 -472
- package/dist/extensions/pi-hermes-memory/src/store/session-indexer.ts +0 -511
- package/dist/extensions/pi-hermes-memory/src/store/session-parser.ts +0 -213
- package/dist/extensions/pi-hermes-memory/src/store/session-search.ts +0 -234
- package/dist/extensions/pi-hermes-memory/src/store/skill-store.ts +0 -950
- package/dist/extensions/pi-hermes-memory/src/store/skill-utils.ts +0 -133
- package/dist/extensions/pi-hermes-memory/src/store/sqlite-memory-store.ts +0 -1002
- package/dist/extensions/pi-hermes-memory/src/store/sqlite-native.ts +0 -241
- package/dist/extensions/pi-hermes-memory/src/store/standing-instructions.ts +0 -247
- package/dist/extensions/pi-hermes-memory/src/tools/memory-search-tool.ts +0 -95
- package/dist/extensions/pi-hermes-memory/src/tools/memory-tool.ts +0 -469
- package/dist/extensions/pi-hermes-memory/src/tools/session-search-tool.ts +0 -246
- package/dist/extensions/pi-hermes-memory/src/tools/shared-output-view.ts +0 -170
- package/dist/extensions/pi-hermes-memory/src/tools/skill-tool.ts +0 -333
- package/dist/extensions/pi-hermes-memory/src/tools/tool-result-views.ts +0 -105
- package/dist/extensions/pi-hermes-memory/src/types.ts +0 -214
- package/dist/extensions/pi-hermes-memory/tests/config.test.ts +0 -434
- package/dist/extensions/pi-hermes-memory/tests/extension-root-migration.test.ts +0 -368
- package/dist/extensions/pi-hermes-memory/tests/handlers/auto-consolidate.test.ts +0 -984
- package/dist/extensions/pi-hermes-memory/tests/handlers/background-review.test.ts +0 -950
- package/dist/extensions/pi-hermes-memory/tests/handlers/correction-detector.test.ts +0 -671
- package/dist/extensions/pi-hermes-memory/tests/handlers/insights.test.ts +0 -157
- package/dist/extensions/pi-hermes-memory/tests/handlers/interview.test.ts +0 -127
- package/dist/extensions/pi-hermes-memory/tests/handlers/pi-child-process.test.ts +0 -905
- package/dist/extensions/pi-hermes-memory/tests/handlers/preview-context.test.ts +0 -152
- package/dist/extensions/pi-hermes-memory/tests/handlers/prompt-context.test.ts +0 -166
- package/dist/extensions/pi-hermes-memory/tests/handlers/resources-discover.test.ts +0 -71
- package/dist/extensions/pi-hermes-memory/tests/handlers/review-memory-ops.test.ts +0 -614
- package/dist/extensions/pi-hermes-memory/tests/handlers/session-backfill.test.ts +0 -192
- package/dist/extensions/pi-hermes-memory/tests/handlers/session-flush.test.ts +0 -677
- package/dist/extensions/pi-hermes-memory/tests/handlers/session-live-index.test.ts +0 -225
- package/dist/extensions/pi-hermes-memory/tests/handlers/skills-command.test.ts +0 -827
- package/dist/extensions/pi-hermes-memory/tests/handlers/standing-pin.test.ts +0 -134
- package/dist/extensions/pi-hermes-memory/tests/handlers/sync-markdown-memories.test.ts +0 -491
- package/dist/extensions/pi-hermes-memory/tests/handlers/system-prompt.test.ts +0 -199
- package/dist/extensions/pi-hermes-memory/tests/handlers/thinking-max.test.ts +0 -64
- package/dist/extensions/pi-hermes-memory/tests/index.test.ts +0 -30
- package/dist/extensions/pi-hermes-memory/tests/integration/flow.test.ts +0 -126
- package/dist/extensions/pi-hermes-memory/tests/lifecycle-timing.test.ts +0 -76
- package/dist/extensions/pi-hermes-memory/tests/paths.test.ts +0 -23
- package/dist/extensions/pi-hermes-memory/tests/project-memory-migration.test.ts +0 -80
- package/dist/extensions/pi-hermes-memory/tests/project-rebinding.test.ts +0 -115
- package/dist/extensions/pi-hermes-memory/tests/project.test.ts +0 -120
- package/dist/extensions/pi-hermes-memory/tests/run-all-timeout.test.ts +0 -107
- package/dist/extensions/pi-hermes-memory/tests/run-all.sh +0 -45
- package/dist/extensions/pi-hermes-memory/tests/store/atomic-lock-coordinator.test.ts +0 -381
- package/dist/extensions/pi-hermes-memory/tests/store/content-scanner.test.ts +0 -388
- package/dist/extensions/pi-hermes-memory/tests/store/db.test.ts +0 -1046
- package/dist/extensions/pi-hermes-memory/tests/store/markdown-mutation-lock.test.ts +0 -34
- package/dist/extensions/pi-hermes-memory/tests/store/memory-store.test.ts +0 -2150
- package/dist/extensions/pi-hermes-memory/tests/store/recovery-maintenance.test.ts +0 -170
- package/dist/extensions/pi-hermes-memory/tests/store/session-anchor-search.test.ts +0 -210
- package/dist/extensions/pi-hermes-memory/tests/store/session-indexer.test.ts +0 -643
- package/dist/extensions/pi-hermes-memory/tests/store/session-parser.test.ts +0 -282
- package/dist/extensions/pi-hermes-memory/tests/store/session-search.test.ts +0 -287
- package/dist/extensions/pi-hermes-memory/tests/store/skill-store.test.ts +0 -678
- package/dist/extensions/pi-hermes-memory/tests/store/skill-utils.test.ts +0 -21
- package/dist/extensions/pi-hermes-memory/tests/store/sqlite-lazy-load.test.ts +0 -78
- package/dist/extensions/pi-hermes-memory/tests/store/sqlite-memory-store.test.ts +0 -543
- package/dist/extensions/pi-hermes-memory/tests/store/sqlite-native.test.ts +0 -164
- package/dist/extensions/pi-hermes-memory/tests/store/standing-instructions.test.ts +0 -171
- package/dist/extensions/pi-hermes-memory/tests/tools/memory-search-tool.test.ts +0 -84
- package/dist/extensions/pi-hermes-memory/tests/tools/memory-tool.test.ts +0 -709
- package/dist/extensions/pi-hermes-memory/tests/tools/session-search-tool.test.ts +0 -345
- package/dist/extensions/pi-hermes-memory/tests/tools/shared-output-view.test.ts +0 -362
- package/dist/extensions/pi-hermes-memory/tests/tools/skill-tool.test.ts +0 -478
- package/dist/extensions/pi-hermes-memory/tests/tools/tool-result-renderer-wiring.test.ts +0 -40
- package/dist/extensions/pi-hermes-memory/tsconfig.json +0 -19
- package/dist/extensions/pi-intercom/CHANGELOG.md +0 -321
- package/dist/extensions/pi-intercom/LICENSE +0 -21
- package/dist/extensions/pi-intercom/README.md +0 -598
- package/dist/extensions/pi-intercom/banner.png +0 -0
- package/dist/extensions/pi-intercom/broker/broker.ts +0 -1721
- package/dist/extensions/pi-intercom/broker/client-liveness.test.ts +0 -173
- package/dist/extensions/pi-intercom/broker/client.test.ts +0 -83
- package/dist/extensions/pi-intercom/broker/client.ts +0 -793
- package/dist/extensions/pi-intercom/broker/extension-state.ts +0 -197
- package/dist/extensions/pi-intercom/broker/extension.test.ts +0 -486
- package/dist/extensions/pi-intercom/broker/framing.test.ts +0 -114
- package/dist/extensions/pi-intercom/broker/framing.ts +0 -115
- package/dist/extensions/pi-intercom/broker/paths.test.ts +0 -153
- package/dist/extensions/pi-intercom/broker/paths.ts +0 -134
- package/dist/extensions/pi-intercom/broker/protocol.ts +0 -208
- package/dist/extensions/pi-intercom/broker/runtime-claim.test.ts +0 -34
- package/dist/extensions/pi-intercom/broker/runtime-claim.ts +0 -21
- package/dist/extensions/pi-intercom/broker/spawn.test.ts +0 -252
- package/dist/extensions/pi-intercom/broker/spawn.ts +0 -420
- package/dist/extensions/pi-intercom/config.test.ts +0 -104
- package/dist/extensions/pi-intercom/config.ts +0 -163
- package/dist/extensions/pi-intercom/cwd.test.ts +0 -40
- package/dist/extensions/pi-intercom/cwd.ts +0 -31
- package/dist/extensions/pi-intercom/extension-api.ts +0 -84
- package/dist/extensions/pi-intercom/format-context.test.ts +0 -31
- package/dist/extensions/pi-intercom/format-context.ts +0 -32
- package/dist/extensions/pi-intercom/index.ts +0 -2821
- package/dist/extensions/pi-intercom/intercom.integration.test.ts +0 -4232
- package/dist/extensions/pi-intercom/package.json +0 -49
- package/dist/extensions/pi-intercom/project-agent.test.ts +0 -145
- package/dist/extensions/pi-intercom/project-agent.ts +0 -324
- package/dist/extensions/pi-intercom/reply-tracker.test.ts +0 -239
- package/dist/extensions/pi-intercom/reply-tracker.ts +0 -160
- package/dist/extensions/pi-intercom/skills/pi-intercom/SKILL.md +0 -452
- package/dist/extensions/pi-intercom/test/inline-message.test.ts +0 -184
- package/dist/extensions/pi-intercom/test/overlay-width.test.ts +0 -66
- package/dist/extensions/pi-intercom/types.ts +0 -165
- package/dist/extensions/pi-intercom/ui/compose.ts +0 -143
- package/dist/extensions/pi-intercom/ui/inline-message.ts +0 -118
- package/dist/extensions/pi-intercom/ui/session-list.ts +0 -166
- package/dist/extensions/pi-rewind-hook/README.md +0 -248
- package/dist/extensions/pi-rewind-hook/index.ts +0 -1575
- package/dist/extensions/pi-rewind-hook/package.json +0 -31
- package/dist/extensions/pi-subagents/.github/assets/subagent-fleet-inspector.png +0 -0
- package/dist/extensions/pi-subagents/.github/workflows/release.yml +0 -28
- package/dist/extensions/pi-subagents/.github/workflows/test.yml +0 -51
- package/dist/extensions/pi-subagents/.greptile/config.json +0 -33
- package/dist/extensions/pi-subagents/.greptile/files.json +0 -8
- package/dist/extensions/pi-subagents/.greptile/rules.md +0 -16
- package/dist/extensions/pi-subagents/.oxlintrc.json +0 -43
- package/dist/extensions/pi-subagents/AGENTS.md +0 -5
- package/dist/extensions/pi-subagents/CHANGELOG.md +0 -2249
- package/dist/extensions/pi-subagents/LICENSE +0 -21
- package/dist/extensions/pi-subagents/README.md +0 -126
- package/dist/extensions/pi-subagents/VISION.md +0 -81
- package/dist/extensions/pi-subagents/agents/delegate.md +0 -14
- package/dist/extensions/pi-subagents/agents/oracle.md +0 -78
- package/dist/extensions/pi-subagents/agents/researcher.md +0 -52
- package/dist/extensions/pi-subagents/agents/reviewer.md +0 -89
- package/dist/extensions/pi-subagents/agents/scout.md +0 -50
- package/dist/extensions/pi-subagents/agents/worker.md +0 -60
- package/dist/extensions/pi-subagents/async-retention-discovery-worker.mjs +0 -180
- package/dist/extensions/pi-subagents/docs/agents.md +0 -375
- package/dist/extensions/pi-subagents/docs/configuration.md +0 -508
- package/dist/extensions/pi-subagents/docs/extension-api.md +0 -443
- package/dist/extensions/pi-subagents/docs/missions.md +0 -121
- package/dist/extensions/pi-subagents/docs/models.md +0 -258
- package/dist/extensions/pi-subagents/docs/observability.md +0 -262
- package/dist/extensions/pi-subagents/docs/tool-reference.md +0 -482
- package/dist/extensions/pi-subagents/docs/watchdog.md +0 -176
- package/dist/extensions/pi-subagents/docs/workflows.md +0 -475
- package/dist/extensions/pi-subagents/index.ts +0 -10
- package/dist/extensions/pi-subagents/inspector-runner.mjs +0 -11
- package/dist/extensions/pi-subagents/install.mjs +0 -94
- package/dist/extensions/pi-subagents/package-lock.json +0 -1872
- package/dist/extensions/pi-subagents/package.json +0 -109
- package/dist/extensions/pi-subagents/prompts/council.md +0 -60
- package/dist/extensions/pi-subagents/prompts/gather-context-and-clarify.md +0 -13
- package/dist/extensions/pi-subagents/prompts/parallel-cleanup.md +0 -59
- package/dist/extensions/pi-subagents/prompts/parallel-research.md +0 -50
- package/dist/extensions/pi-subagents/prompts/parallel-review.md +0 -58
- package/dist/extensions/pi-subagents/prompts/review-loop.md +0 -47
- package/dist/extensions/pi-subagents/skills/council-mode/SKILL.md +0 -59
- package/dist/extensions/pi-subagents/skills/council-mode/references/pass-contracts.md +0 -150
- package/dist/extensions/pi-subagents/skills/pi-subagents/SKILL.md +0 -103
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +0 -70
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/execution-controls.md +0 -539
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +0 -161
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/multi-lane-orchestration.md +0 -51
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +0 -295
- package/dist/extensions/pi-subagents/skills/pi-subagents/references/review-and-validation.md +0 -73
- package/dist/extensions/pi-subagents/src/agents/agent-management.ts +0 -1336
- package/dist/extensions/pi-subagents/src/agents/agent-memory.ts +0 -254
- package/dist/extensions/pi-subagents/src/agents/agent-refinements.ts +0 -624
- package/dist/extensions/pi-subagents/src/agents/agent-scope.ts +0 -6
- package/dist/extensions/pi-subagents/src/agents/agent-selection.ts +0 -25
- package/dist/extensions/pi-subagents/src/agents/agent-serializer.ts +0 -176
- package/dist/extensions/pi-subagents/src/agents/agents.ts +0 -2794
- package/dist/extensions/pi-subagents/src/agents/builtin-names.ts +0 -9
- package/dist/extensions/pi-subagents/src/agents/chain-serializer.ts +0 -280
- package/dist/extensions/pi-subagents/src/agents/frontmatter.ts +0 -153
- package/dist/extensions/pi-subagents/src/agents/identity.ts +0 -30
- package/dist/extensions/pi-subagents/src/agents/proactive-skills.ts +0 -194
- package/dist/extensions/pi-subagents/src/agents/runtime-agent-events.ts +0 -70
- package/dist/extensions/pi-subagents/src/agents/runtime-agent-registry.ts +0 -425
- package/dist/extensions/pi-subagents/src/agents/skills.ts +0 -754
- package/dist/extensions/pi-subagents/src/api/agents.ts +0 -12
- package/dist/extensions/pi-subagents/src/api/background-work.ts +0 -206
- package/dist/extensions/pi-subagents/src/api/capability-ceiling.ts +0 -17
- package/dist/extensions/pi-subagents/src/api/control-channel.ts +0 -4
- package/dist/extensions/pi-subagents/src/api/delegation.ts +0 -112
- package/dist/extensions/pi-subagents/src/api/external-job-provider.ts +0 -195
- package/dist/extensions/pi-subagents/src/api/external-runs.ts +0 -282
- package/dist/extensions/pi-subagents/src/api/intercom-bridge.ts +0 -3
- package/dist/extensions/pi-subagents/src/api/pi-args.ts +0 -5
- package/dist/extensions/pi-subagents/src/api/preflight.ts +0 -497
- package/dist/extensions/pi-subagents/src/api/project-panes.ts +0 -32
- package/dist/extensions/pi-subagents/src/api/shared-types.ts +0 -24
- package/dist/extensions/pi-subagents/src/extension/config.ts +0 -235
- package/dist/extensions/pi-subagents/src/extension/control-notices.ts +0 -58
- package/dist/extensions/pi-subagents/src/extension/doctor.ts +0 -278
- package/dist/extensions/pi-subagents/src/extension/fanout-child.ts +0 -205
- package/dist/extensions/pi-subagents/src/extension/index.ts +0 -1093
- package/dist/extensions/pi-subagents/src/extension/public-execution.ts +0 -209
- package/dist/extensions/pi-subagents/src/extension/rpc.ts +0 -860
- package/dist/extensions/pi-subagents/src/extension/schemas.ts +0 -415
- package/dist/extensions/pi-subagents/src/extension/steering-notices.ts +0 -35
- package/dist/extensions/pi-subagents/src/extension/subagent-guide.ts +0 -39
- package/dist/extensions/pi-subagents/src/extension/tool-description.ts +0 -204
- package/dist/extensions/pi-subagents/src/extension/tool-result.ts +0 -19
- package/dist/extensions/pi-subagents/src/inspectors/herdr/actions.ts +0 -235
- package/dist/extensions/pi-subagents/src/inspectors/herdr/client.ts +0 -130
- package/dist/extensions/pi-subagents/src/inspectors/herdr/focus.ts +0 -55
- package/dist/extensions/pi-subagents/src/inspectors/herdr/inspector-runner.ts +0 -147
- package/dist/extensions/pi-subagents/src/inspectors/herdr/project-panes.ts +0 -730
- package/dist/extensions/pi-subagents/src/inspectors/herdr/session-roots-codec.ts +0 -42
- package/dist/extensions/pi-subagents/src/inspectors/herdr/shell-command.ts +0 -16
- package/dist/extensions/pi-subagents/src/integrations/herdr-status.ts +0 -396
- package/dist/extensions/pi-subagents/src/intercom/intercom-bridge.ts +0 -191
- package/dist/extensions/pi-subagents/src/intercom/native-supervisor-channel.ts +0 -812
- package/dist/extensions/pi-subagents/src/intercom/result-intercom.ts +0 -423
- package/dist/extensions/pi-subagents/src/missions/actions.ts +0 -433
- package/dist/extensions/pi-subagents/src/missions/goal-driver.ts +0 -164
- package/dist/extensions/pi-subagents/src/missions/lifecycle.ts +0 -367
- package/dist/extensions/pi-subagents/src/missions/store.ts +0 -584
- package/dist/extensions/pi-subagents/src/missions/types.ts +0 -190
- package/dist/extensions/pi-subagents/src/missions/workflow-state.ts +0 -260
- package/dist/extensions/pi-subagents/src/policy/authority.ts +0 -46
- package/dist/extensions/pi-subagents/src/profiles/profiles.ts +0 -662
- package/dist/extensions/pi-subagents/src/runs/background/active-async-capacity.ts +0 -498
- package/dist/extensions/pi-subagents/src/runs/background/active-run-index.ts +0 -139
- package/dist/extensions/pi-subagents/src/runs/background/async-execution.ts +0 -2000
- package/dist/extensions/pi-subagents/src/runs/background/async-job-tracker.ts +0 -781
- package/dist/extensions/pi-subagents/src/runs/background/async-resume.ts +0 -627
- package/dist/extensions/pi-subagents/src/runs/background/async-retention.ts +0 -903
- package/dist/extensions/pi-subagents/src/runs/background/async-status-snapshot.ts +0 -48
- package/dist/extensions/pi-subagents/src/runs/background/async-status.ts +0 -745
- package/dist/extensions/pi-subagents/src/runs/background/auto-drain.ts +0 -68
- package/dist/extensions/pi-subagents/src/runs/background/chain-append.ts +0 -321
- package/dist/extensions/pi-subagents/src/runs/background/chain-root-attachment.ts +0 -270
- package/dist/extensions/pi-subagents/src/runs/background/completion-batcher.ts +0 -168
- package/dist/extensions/pi-subagents/src/runs/background/completion-dedupe.ts +0 -58
- package/dist/extensions/pi-subagents/src/runs/background/completion-replay.ts +0 -287
- package/dist/extensions/pi-subagents/src/runs/background/control-channel.ts +0 -768
- package/dist/extensions/pi-subagents/src/runs/background/fleet-view.ts +0 -620
- package/dist/extensions/pi-subagents/src/runs/background/index-segment.ts +0 -59
- package/dist/extensions/pi-subagents/src/runs/background/inspect-rpc.ts +0 -443
- package/dist/extensions/pi-subagents/src/runs/background/notify.ts +0 -594
- package/dist/extensions/pi-subagents/src/runs/background/owned-process-tree.ts +0 -104
- package/dist/extensions/pi-subagents/src/runs/background/parallel-groups.ts +0 -45
- package/dist/extensions/pi-subagents/src/runs/background/process-terminal.ts +0 -294
- package/dist/extensions/pi-subagents/src/runs/background/result-delivery-ownership.ts +0 -45
- package/dist/extensions/pi-subagents/src/runs/background/result-files.ts +0 -519
- package/dist/extensions/pi-subagents/src/runs/background/result-watcher.ts +0 -792
- package/dist/extensions/pi-subagents/src/runs/background/resume-guidance.ts +0 -56
- package/dist/extensions/pi-subagents/src/runs/background/retained-children.ts +0 -135
- package/dist/extensions/pi-subagents/src/runs/background/run-id-query.ts +0 -7
- package/dist/extensions/pi-subagents/src/runs/background/run-id-resolver.ts +0 -175
- package/dist/extensions/pi-subagents/src/runs/background/run-status.ts +0 -694
- package/dist/extensions/pi-subagents/src/runs/background/scheduled-runs.ts +0 -908
- package/dist/extensions/pi-subagents/src/runs/background/stale-run-reconciler.ts +0 -410
- package/dist/extensions/pi-subagents/src/runs/background/steering.ts +0 -239
- package/dist/extensions/pi-subagents/src/runs/background/subagent-runner.ts +0 -5626
- package/dist/extensions/pi-subagents/src/runs/background/subagent-wait.ts +0 -725
- package/dist/extensions/pi-subagents/src/runs/background/terminal-run-index.ts +0 -138
- package/dist/extensions/pi-subagents/src/runs/background/top-level-async.ts +0 -14
- package/dist/extensions/pi-subagents/src/runs/background/wait-completions.ts +0 -196
- package/dist/extensions/pi-subagents/src/runs/background/wait-config.ts +0 -50
- package/dist/extensions/pi-subagents/src/runs/background/wait-subscriptions.ts +0 -348
- package/dist/extensions/pi-subagents/src/runs/background/wait-tool.ts +0 -49
- package/dist/extensions/pi-subagents/src/runs/foreground/async-dismiss-action.ts +0 -86
- package/dist/extensions/pi-subagents/src/runs/foreground/async-steering-action.ts +0 -262
- package/dist/extensions/pi-subagents/src/runs/foreground/async-stop-action.ts +0 -86
- package/dist/extensions/pi-subagents/src/runs/foreground/execution.ts +0 -2430
- package/dist/extensions/pi-subagents/src/runs/foreground/foreground-control.ts +0 -153
- package/dist/extensions/pi-subagents/src/runs/foreground/foreground-history.ts +0 -160
- package/dist/extensions/pi-subagents/src/runs/foreground/prompt-audit.ts +0 -172
- package/dist/extensions/pi-subagents/src/runs/foreground/subagent-executor.ts +0 -6918
- package/dist/extensions/pi-subagents/src/runs/foreground/workflow-detach-reconcile.ts +0 -299
- package/dist/extensions/pi-subagents/src/runs/foreground/workflow-foreground-steering.ts +0 -188
- package/dist/extensions/pi-subagents/src/runs/shared/abort-recovery.ts +0 -119
- package/dist/extensions/pi-subagents/src/runs/shared/acceptance.ts +0 -1448
- package/dist/extensions/pi-subagents/src/runs/shared/agent-contract.ts +0 -38
- package/dist/extensions/pi-subagents/src/runs/shared/async-status-projection.ts +0 -597
- package/dist/extensions/pi-subagents/src/runs/shared/background-process-options.ts +0 -9
- package/dist/extensions/pi-subagents/src/runs/shared/capability-ceiling.ts +0 -209
- package/dist/extensions/pi-subagents/src/runs/shared/chain-outputs.ts +0 -116
- package/dist/extensions/pi-subagents/src/runs/shared/child-identity.ts +0 -51
- package/dist/extensions/pi-subagents/src/runs/shared/child-launch-plan.ts +0 -151
- package/dist/extensions/pi-subagents/src/runs/shared/child-protocol.ts +0 -415
- package/dist/extensions/pi-subagents/src/runs/shared/completion-evidence.ts +0 -89
- package/dist/extensions/pi-subagents/src/runs/shared/completion-guard.ts +0 -252
- package/dist/extensions/pi-subagents/src/runs/shared/context-mode.ts +0 -44
- package/dist/extensions/pi-subagents/src/runs/shared/dynamic-fanout.ts +0 -297
- package/dist/extensions/pi-subagents/src/runs/shared/extension-bindings.ts +0 -78
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-contract.ts +0 -138
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-preflight.ts +0 -122
- package/dist/extensions/pi-subagents/src/runs/shared/external-cli-runner.ts +0 -429
- package/dist/extensions/pi-subagents/src/runs/shared/external-job-bridge.ts +0 -460
- package/dist/extensions/pi-subagents/src/runs/shared/external-job-runner.ts +0 -389
- package/dist/extensions/pi-subagents/src/runs/shared/fast-mode-extension.ts +0 -10
- package/dist/extensions/pi-subagents/src/runs/shared/host-step-status.ts +0 -231
- package/dist/extensions/pi-subagents/src/runs/shared/lane-metadata.ts +0 -105
- package/dist/extensions/pi-subagents/src/runs/shared/launch-cwd.ts +0 -16
- package/dist/extensions/pi-subagents/src/runs/shared/llm-intent-arbiter.ts +0 -302
- package/dist/extensions/pi-subagents/src/runs/shared/long-running-guard.ts +0 -221
- package/dist/extensions/pi-subagents/src/runs/shared/mcp-config-sources.ts +0 -422
- package/dist/extensions/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +0 -483
- package/dist/extensions/pi-subagents/src/runs/shared/mcp-direct-tool-grant.ts +0 -194
- package/dist/extensions/pi-subagents/src/runs/shared/model-exclusions.ts +0 -305
- package/dist/extensions/pi-subagents/src/runs/shared/model-fallback.ts +0 -578
- package/dist/extensions/pi-subagents/src/runs/shared/model-scope.ts +0 -205
- package/dist/extensions/pi-subagents/src/runs/shared/mutation-evidence.ts +0 -199
- package/dist/extensions/pi-subagents/src/runs/shared/nested-events.ts +0 -1086
- package/dist/extensions/pi-subagents/src/runs/shared/nested-path.ts +0 -52
- package/dist/extensions/pi-subagents/src/runs/shared/nested-render.ts +0 -127
- package/dist/extensions/pi-subagents/src/runs/shared/orca-progress-tabs.ts +0 -499
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-handoff.ts +0 -692
- package/dist/extensions/pi-subagents/src/runs/shared/parallel-utils.ts +0 -279
- package/dist/extensions/pi-subagents/src/runs/shared/permissions.ts +0 -99
- package/dist/extensions/pi-subagents/src/runs/shared/pi-args.ts +0 -1044
- package/dist/extensions/pi-subagents/src/runs/shared/pi-spawn.ts +0 -163
- package/dist/extensions/pi-subagents/src/runs/shared/process-signal.ts +0 -32
- package/dist/extensions/pi-subagents/src/runs/shared/run-fanout-budget.ts +0 -280
- package/dist/extensions/pi-subagents/src/runs/shared/run-history.ts +0 -201
- package/dist/extensions/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.ts +0 -71
- package/dist/extensions/pi-subagents/src/runs/shared/session-lease.ts +0 -293
- package/dist/extensions/pi-subagents/src/runs/shared/single-output.ts +0 -304
- package/dist/extensions/pi-subagents/src/runs/shared/spawn-budget.ts +0 -128
- package/dist/extensions/pi-subagents/src/runs/shared/structured-output.ts +0 -196
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-control.ts +0 -290
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.ts +0 -808
- package/dist/extensions/pi-subagents/src/runs/shared/subagent-startup-retry.ts +0 -116
- package/dist/extensions/pi-subagents/src/runs/shared/task-intent.ts +0 -197
- package/dist/extensions/pi-subagents/src/runs/shared/tool-availability.ts +0 -81
- package/dist/extensions/pi-subagents/src/runs/shared/tool-budget.ts +0 -80
- package/dist/extensions/pi-subagents/src/runs/shared/tool-timeout.ts +0 -93
- package/dist/extensions/pi-subagents/src/runs/shared/usage-budget.ts +0 -65
- package/dist/extensions/pi-subagents/src/runs/shared/workflow-graph.ts +0 -225
- package/dist/extensions/pi-subagents/src/runs/shared/worktree-cleanup-plan.ts +0 -847
- package/dist/extensions/pi-subagents/src/runs/shared/worktree.ts +0 -802
- package/dist/extensions/pi-subagents/src/shared/accessible-dir.ts +0 -47
- package/dist/extensions/pi-subagents/src/shared/agent-stream-options.ts +0 -5
- package/dist/extensions/pi-subagents/src/shared/artifacts.ts +0 -281
- package/dist/extensions/pi-subagents/src/shared/atomic-json.ts +0 -81
- package/dist/extensions/pi-subagents/src/shared/capacity-resilient-json.ts +0 -102
- package/dist/extensions/pi-subagents/src/shared/child-session-name.ts +0 -46
- package/dist/extensions/pi-subagents/src/shared/child-transcript.ts +0 -264
- package/dist/extensions/pi-subagents/src/shared/completion-owner.ts +0 -14
- package/dist/extensions/pi-subagents/src/shared/display-text.ts +0 -150
- package/dist/extensions/pi-subagents/src/shared/extension-context.ts +0 -24
- package/dist/extensions/pi-subagents/src/shared/file-coalescer.ts +0 -49
- package/dist/extensions/pi-subagents/src/shared/file-system-retry.ts +0 -95
- package/dist/extensions/pi-subagents/src/shared/fork-context.ts +0 -305
- package/dist/extensions/pi-subagents/src/shared/formatters.ts +0 -146
- package/dist/extensions/pi-subagents/src/shared/jsonl-writer.ts +0 -81
- package/dist/extensions/pi-subagents/src/shared/launch-contract.ts +0 -135
- package/dist/extensions/pi-subagents/src/shared/model-info.ts +0 -101
- package/dist/extensions/pi-subagents/src/shared/node-executable.ts +0 -21
- package/dist/extensions/pi-subagents/src/shared/post-exit-stdio-guard.ts +0 -85
- package/dist/extensions/pi-subagents/src/shared/prompt-resources.ts +0 -11
- package/dist/extensions/pi-subagents/src/shared/pruned-fork.ts +0 -450
- package/dist/extensions/pi-subagents/src/shared/session-file-trust.ts +0 -19
- package/dist/extensions/pi-subagents/src/shared/session-identity.ts +0 -10
- package/dist/extensions/pi-subagents/src/shared/session-tokens.ts +0 -55
- package/dist/extensions/pi-subagents/src/shared/settings.ts +0 -409
- package/dist/extensions/pi-subagents/src/shared/shortcuts.ts +0 -17
- package/dist/extensions/pi-subagents/src/shared/status-format.ts +0 -55
- package/dist/extensions/pi-subagents/src/shared/thinking-ceiling.ts +0 -52
- package/dist/extensions/pi-subagents/src/shared/types.ts +0 -2834
- package/dist/extensions/pi-subagents/src/shared/utf8.ts +0 -11
- package/dist/extensions/pi-subagents/src/shared/utils.ts +0 -590
- package/dist/extensions/pi-subagents/src/shared/watch-strategy.ts +0 -10
- package/dist/extensions/pi-subagents/src/shared/workflow-child-permit.ts +0 -207
- package/dist/extensions/pi-subagents/src/slash/delegation-adapters.ts +0 -426
- package/dist/extensions/pi-subagents/src/slash/delegation-json.ts +0 -108
- package/dist/extensions/pi-subagents/src/slash/delegation-request.ts +0 -162
- package/dist/extensions/pi-subagents/src/slash/prompt-template-bridge.ts +0 -419
- package/dist/extensions/pi-subagents/src/slash/prompt-workflows.ts +0 -287
- package/dist/extensions/pi-subagents/src/slash/selector.ts +0 -147
- package/dist/extensions/pi-subagents/src/slash/slash-bridge.ts +0 -192
- package/dist/extensions/pi-subagents/src/slash/slash-commands.ts +0 -1345
- package/dist/extensions/pi-subagents/src/slash/slash-live-state.ts +0 -310
- package/dist/extensions/pi-subagents/src/slash/subagents-admin.ts +0 -435
- package/dist/extensions/pi-subagents/src/tui/fleet-status.ts +0 -905
- package/dist/extensions/pi-subagents/src/tui/fleet-transcript.ts +0 -536
- package/dist/extensions/pi-subagents/src/tui/fleet.ts +0 -1436
- package/dist/extensions/pi-subagents/src/tui/render-helpers.ts +0 -111
- package/dist/extensions/pi-subagents/src/tui/render.ts +0 -3146
- package/dist/extensions/pi-subagents/src/types/pi-runtime-compat.d.ts +0 -8
- package/dist/extensions/pi-subagents/src/watchdog/change-signature.ts +0 -260
- package/dist/extensions/pi-subagents/src/watchdog/child-status.ts +0 -205
- package/dist/extensions/pi-subagents/src/watchdog/emission-guard.ts +0 -123
- package/dist/extensions/pi-subagents/src/watchdog/lsp-diagnostics.ts +0 -538
- package/dist/extensions/pi-subagents/src/watchdog/model-selection.ts +0 -167
- package/dist/extensions/pi-subagents/src/watchdog/permission-arbiter.ts +0 -154
- package/dist/extensions/pi-subagents/src/watchdog/register-child.ts +0 -117
- package/dist/extensions/pi-subagents/src/watchdog/register-main.ts +0 -440
- package/dist/extensions/pi-subagents/src/watchdog/render.ts +0 -54
- package/dist/extensions/pi-subagents/src/watchdog/review.ts +0 -303
- package/dist/extensions/pi-subagents/src/watchdog/runtime.ts +0 -868
- package/dist/extensions/pi-subagents/src/watchdog/scope.ts +0 -62
- package/dist/extensions/pi-subagents/src/watchdog/settings.ts +0 -568
- package/dist/extensions/pi-subagents/src/watchdog/tool-actions.ts +0 -155
- package/dist/extensions/pi-subagents/src/watchdog/turn-delta.ts +0 -161
- package/dist/extensions/pi-subagents/src/watchdog/types.ts +0 -198
- package/dist/extensions/pi-subagents/src/watchdog/warning-format.ts +0 -73
- package/dist/extensions/pi-subagents/src/workflows/chat-progress.ts +0 -151
- package/dist/extensions/pi-subagents/src/workflows/host-command.ts +0 -235
- package/dist/extensions/pi-subagents/src/workflows/scripted-workflow.ts +0 -2183
- package/dist/extensions/pi-subagents/src/workflows/workflow-child-summary.ts +0 -121
- package/dist/extensions/pi-subagents/src/workflows/workflow-preflight.ts +0 -270
- package/dist/extensions/pi-subagents/src/workflows/workflow-receipt.ts +0 -330
- package/dist/extensions/pi-subagents/src/workflows/workflow-resources.ts +0 -150
- package/dist/extensions/pi-subagents/src/workflows/workflow-settlement.ts +0 -246
- package/dist/extensions/pi-subagents/test/e2e/real-session-subagent.test.ts +0 -224
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/cli.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/restore-sandbox-env.d.ts +0 -17
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/args.d.ts +0 -57
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/config-selector.d.ts +0 -16
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/file-processor.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/initial-message.d.ts +0 -18
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/list-models.d.ts +0 -9
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/project-trust.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/session-picker.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/startup-ui.d.ts +0 -20
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/config.d.ts +0 -96
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session-runtime.d.ts +0 -119
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session-services.d.ts +0 -85
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session.d.ts +0 -620
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/auth-guidance.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/auth-storage.d.ts +0 -56
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/bash-executor.d.ts +0 -32
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/cache-stats.d.ts +0 -49
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/branch-summarization.d.ts +0 -93
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/compaction.d.ts +0 -128
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/index.d.ts +0 -7
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/utils.d.ts +0 -38
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/defaults.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/diagnostics.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/event-bus.d.ts +0 -9
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/exec.d.ts +0 -29
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/experimental.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/ansi-to-html.d.ts +0 -22
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/index.d.ts +0 -37
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/tool-renderer.d.ts +0 -34
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/index.d.ts +0 -12
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/loader.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/runner.d.ts +0 -171
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/types.d.ts +0 -1261
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/wrapper.d.ts +0 -20
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/footer-data-provider.d.ts +0 -54
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/http-dispatcher.d.ts +0 -22
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/index.d.ts +0 -13
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/keybindings.d.ts +0 -358
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/messages.d.ts +0 -77
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-config.d.ts +0 -512
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-registry.d.ts +0 -43
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-resolver.d.ts +0 -121
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-runtime.d.ts +0 -82
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/models-store.d.ts +0 -17
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/output-guard.d.ts +0 -7
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/package-manager.d.ts +0 -210
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/project-trust.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/prompt-templates.d.ts +0 -54
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/provider-attribution.d.ts +0 -4
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/provider-composer.d.ts +0 -55
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/radius.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/remote-catalog-provider.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/resolve-config-value.d.ts +0 -30
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/resource-loader.d.ts +0 -206
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/runtime-credentials.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/sdk.d.ts +0 -106
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/session-cwd.d.ts +0 -19
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/session-manager.d.ts +0 -356
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/settings-manager.d.ts +0 -297
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/skills.d.ts +0 -60
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/slash-commands.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/source-info.d.ts +0 -18
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/system-prompt.d.ts +0 -28
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/telemetry.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/timings.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/bash.d.ts +0 -68
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/edit-diff.d.ts +0 -106
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/edit.d.ts +0 -51
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/file-mutation-queue.d.ts +0 -6
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/find.d.ts +0 -35
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/grep.d.ts +0 -37
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/index.d.ts +0 -40
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/ls.d.ts +0 -37
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/output-accumulator.d.ts +0 -52
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/path-utils.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/read.d.ts +0 -35
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/render-utils.d.ts +0 -24
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/tool-definition-wrapper.d.ts +0 -14
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/truncate.d.ts +0 -70
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/write.d.ts +0 -26
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/trust-manager.d.ts +0 -36
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/usage-totals.d.ts +0 -19
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/index.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/client.d.ts +0 -61
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/huggingface.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/index.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/provider.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/ui.d.ts +0 -42
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/index.d.ts +0 -35
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/main.d.ts +0 -12
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/migrations.d.ts +0 -33
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/index.d.ts +0 -9
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/armin.d.ts +0 -34
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/assistant-message.d.ts +0 -22
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/bash-execution.d.ts +0 -34
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/config-selector.d.ts +0 -102
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-editor.d.ts +0 -21
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-entry.d.ts +0 -19
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-message.d.ts +0 -20
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/diff.d.ts +0 -12
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-editor.d.ts +0 -22
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-input.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-selector.d.ts +0 -26
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/first-time-setup.d.ts +0 -25
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/footer.d.ts +0 -32
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/index.d.ts +0 -34
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/keybinding-hints.d.ts +0 -13
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/login-dialog.d.ts +0 -52
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/model-selector.d.ts +0 -54
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/oauth-selector.d.ts +0 -33
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -42
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/session-selector.d.ts +0 -95
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/settings-selector.d.ts +0 -77
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/status-indicator.d.ts +0 -28
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/thinking-selector.d.ts +0 -11
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/tool-execution.d.ts +0 -63
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/tree-selector.d.ts +0 -94
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/trust-selector.d.ts +0 -23
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/user-message.d.ts +0 -14
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/interactive-mode.d.ts +0 -394
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/model-search.d.ts +0 -12
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/theme/theme-controller.d.ts +0 -29
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/theme/theme.d.ts +0 -120
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/print-mode.d.ts +0 -28
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/jsonl.d.ts +0 -17
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-client.d.ts +0 -246
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-mode.d.ts +0 -20
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-types.d.ts +0 -457
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/package-manager-cli.d.ts +0 -8
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/rpc-entry.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/ansi.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/changelog.d.ts +0 -22
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/child-process.d.ts +0 -18
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard-image.d.ts +0 -11
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard.d.ts +0 -4
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/deprecation.d.ts +0 -4
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/exif-orientation.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/frontmatter.d.ts +0 -8
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/fs-watch.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/git.d.ts +0 -26
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/html.d.ts +0 -7
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-convert.d.ts +0 -10
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-process.d.ts +0 -18
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize-core.d.ts +0 -30
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize-worker.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize.d.ts +0 -16
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/json.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/mime.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/open-browser.d.ts +0 -9
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/paths.d.ts +0 -31
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/photon.d.ts +0 -21
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/shell.d.ts +0 -31
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/sleep.d.ts +0 -5
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/syntax-highlight.d.ts +0 -12
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/tools-manager.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/version-check.d.ts +0 -15
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/windows-self-update.d.ts +0 -3
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/index.mjs +0 -84
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/package.json +0 -14
- package/dist/extensions/pi-subagents/test/integration/acceptance-file-report.test.ts +0 -472
- package/dist/extensions/pi-subagents/test/integration/async-execution.test.ts +0 -6672
- package/dist/extensions/pi-subagents/test/integration/async-job-tracker.test.ts +0 -1997
- package/dist/extensions/pi-subagents/test/integration/async-status.test.ts +0 -1300
- package/dist/extensions/pi-subagents/test/integration/detect-error.test.ts +0 -249
- package/dist/extensions/pi-subagents/test/integration/doctor-executor.test.ts +0 -128
- package/dist/extensions/pi-subagents/test/integration/error-handling.test.ts +0 -281
- package/dist/extensions/pi-subagents/test/integration/external-cli-runner.test.ts +0 -167
- package/dist/extensions/pi-subagents/test/integration/foreground-result-size.test.ts +0 -188
- package/dist/extensions/pi-subagents/test/integration/fork-context-execution.test.ts +0 -1352
- package/dist/extensions/pi-subagents/test/integration/intercom-result-delivery.test.ts +0 -1947
- package/dist/extensions/pi-subagents/test/integration/orca-progress-tabs.test.ts +0 -214
- package/dist/extensions/pi-subagents/test/integration/render-fork-badge.test.ts +0 -1408
- package/dist/extensions/pi-subagents/test/integration/render-widget.test.ts +0 -2091
- package/dist/extensions/pi-subagents/test/integration/result-watcher.test.ts +0 -2442
- package/dist/extensions/pi-subagents/test/integration/session-tokens.test.ts +0 -62
- package/dist/extensions/pi-subagents/test/integration/single-execution.test.ts +0 -9007
- package/dist/extensions/pi-subagents/test/integration/slash-commands.test.ts +0 -1516
- package/dist/extensions/pi-subagents/test/integration/slash-live-state.test.ts +0 -166
- package/dist/extensions/pi-subagents/test/integration/template-resolution.test.ts +0 -344
- package/dist/extensions/pi-subagents/test/integration/top-level-async.test.ts +0 -43
- package/dist/extensions/pi-subagents/test/support/cursor-smoke-inputs.ts +0 -51
- package/dist/extensions/pi-subagents/test/support/helpers.ts +0 -225
- package/dist/extensions/pi-subagents/test/support/isolated-temp-root.mjs +0 -9
- package/dist/extensions/pi-subagents/test/support/mock-pi-script.mjs +0 -432
- package/dist/extensions/pi-subagents/test/support/mock-pi.ts +0 -159
- package/dist/extensions/pi-subagents/test/support/node-command.ts +0 -15
- package/dist/extensions/pi-subagents/test/support/real-session-child-cli.mjs +0 -185
- package/dist/extensions/pi-subagents/test/support/real-session-runner.ts +0 -311
- package/dist/extensions/pi-subagents/test/support/register-loader.mjs +0 -16
- package/dist/extensions/pi-subagents/test/support/session-lease-child.mjs +0 -42
- package/dist/extensions/pi-subagents/test/support/ts-loader.mjs +0 -100
- package/dist/extensions/pi-subagents/test/unit/abort-recovery.test.ts +0 -152
- package/dist/extensions/pi-subagents/test/unit/acceptance.test.ts +0 -1475
- package/dist/extensions/pi-subagents/test/unit/accessible-dir.test.ts +0 -82
- package/dist/extensions/pi-subagents/test/unit/active-async-capacity.test.ts +0 -415
- package/dist/extensions/pi-subagents/test/unit/agent-contract.test.ts +0 -14
- package/dist/extensions/pi-subagents/test/unit/agent-disabled.test.ts +0 -213
- package/dist/extensions/pi-subagents/test/unit/agent-discovery-cache.test.ts +0 -232
- package/dist/extensions/pi-subagents/test/unit/agent-eject-disable.test.ts +0 -343
- package/dist/extensions/pi-subagents/test/unit/agent-frontmatter.test.ts +0 -2304
- package/dist/extensions/pi-subagents/test/unit/agent-management.test.ts +0 -1195
- package/dist/extensions/pi-subagents/test/unit/agent-memory.test.ts +0 -420
- package/dist/extensions/pi-subagents/test/unit/agent-overrides.test.ts +0 -1153
- package/dist/extensions/pi-subagents/test/unit/agent-refinements.test.ts +0 -178
- package/dist/extensions/pi-subagents/test/unit/agent-scope.test.ts +0 -20
- package/dist/extensions/pi-subagents/test/unit/agent-selection.test.ts +0 -88
- package/dist/extensions/pi-subagents/test/unit/agent-stream-options.test.ts +0 -14
- package/dist/extensions/pi-subagents/test/unit/anti-slop-oxlint.test.ts +0 -98
- package/dist/extensions/pi-subagents/test/unit/artifacts.test.ts +0 -78
- package/dist/extensions/pi-subagents/test/unit/async-execution.test.ts +0 -254
- package/dist/extensions/pi-subagents/test/unit/async-interrupt-action.test.ts +0 -1022
- package/dist/extensions/pi-subagents/test/unit/async-permission-session.test.ts +0 -100
- package/dist/extensions/pi-subagents/test/unit/async-recovery-descriptor.test.ts +0 -188
- package/dist/extensions/pi-subagents/test/unit/async-resume.test.ts +0 -976
- package/dist/extensions/pi-subagents/test/unit/async-retention.test.ts +0 -632
- package/dist/extensions/pi-subagents/test/unit/async-status-projection.test.ts +0 -246
- package/dist/extensions/pi-subagents/test/unit/async-status-snapshot.test.ts +0 -204
- package/dist/extensions/pi-subagents/test/unit/atomic-json.test.ts +0 -176
- package/dist/extensions/pi-subagents/test/unit/authority-policy.test.ts +0 -22
- package/dist/extensions/pi-subagents/test/unit/auto-drain.test.ts +0 -83
- package/dist/extensions/pi-subagents/test/unit/background-process-options.test.ts +0 -17
- package/dist/extensions/pi-subagents/test/unit/background-work.test.ts +0 -365
- package/dist/extensions/pi-subagents/test/unit/capability-ceiling-agent-allowlist.test.ts +0 -102
- package/dist/extensions/pi-subagents/test/unit/capability-ceiling-pi-args.test.ts +0 -84
- package/dist/extensions/pi-subagents/test/unit/capability-ceiling.test.ts +0 -68
- package/dist/extensions/pi-subagents/test/unit/capacity-resilient-json.test.ts +0 -155
- package/dist/extensions/pi-subagents/test/unit/chain-append.test.ts +0 -283
- package/dist/extensions/pi-subagents/test/unit/chain-root-attachment.test.ts +0 -236
- package/dist/extensions/pi-subagents/test/unit/chain-serializer.test.ts +0 -229
- package/dist/extensions/pi-subagents/test/unit/child-launch-plan.test.ts +0 -94
- package/dist/extensions/pi-subagents/test/unit/child-protocol.test.ts +0 -202
- package/dist/extensions/pi-subagents/test/unit/child-session-name.test.ts +0 -50
- package/dist/extensions/pi-subagents/test/unit/child-transcript.test.ts +0 -267
- package/dist/extensions/pi-subagents/test/unit/close-grace-timer.test.ts +0 -101
- package/dist/extensions/pi-subagents/test/unit/compaction-resume.test.ts +0 -98
- package/dist/extensions/pi-subagents/test/unit/completion-batcher.test.ts +0 -230
- package/dist/extensions/pi-subagents/test/unit/completion-dedupe.test.ts +0 -35
- package/dist/extensions/pi-subagents/test/unit/completion-evidence.test.ts +0 -150
- package/dist/extensions/pi-subagents/test/unit/completion-guard.test.ts +0 -715
- package/dist/extensions/pi-subagents/test/unit/completion-replay.test.ts +0 -305
- package/dist/extensions/pi-subagents/test/unit/config-dir-runtime.test.ts +0 -107
- package/dist/extensions/pi-subagents/test/unit/control-channel.test.ts +0 -630
- package/dist/extensions/pi-subagents/test/unit/control-notices.test.ts +0 -110
- package/dist/extensions/pi-subagents/test/unit/cursor-smoke-inputs.test.ts +0 -77
- package/dist/extensions/pi-subagents/test/unit/default-extensions.test.ts +0 -219
- package/dist/extensions/pi-subagents/test/unit/delegation-api.test.ts +0 -588
- package/dist/extensions/pi-subagents/test/unit/doctor.test.ts +0 -201
- package/dist/extensions/pi-subagents/test/unit/dynamic-fanout.test.ts +0 -219
- package/dist/extensions/pi-subagents/test/unit/ensure-accessible-dir.test.ts +0 -125
- package/dist/extensions/pi-subagents/test/unit/extension-bindings.test.ts +0 -79
- package/dist/extensions/pi-subagents/test/unit/extension-context.test.ts +0 -27
- package/dist/extensions/pi-subagents/test/unit/external-cli-runner.test.ts +0 -339
- package/dist/extensions/pi-subagents/test/unit/external-job-runner.test.ts +0 -961
- package/dist/extensions/pi-subagents/test/unit/external-runs.test.ts +0 -261
- package/dist/extensions/pi-subagents/test/unit/extra-agent-dirs.test.ts +0 -88
- package/dist/extensions/pi-subagents/test/unit/fast-mode-extension.test.ts +0 -27
- package/dist/extensions/pi-subagents/test/unit/file-coalescer.test.ts +0 -83
- package/dist/extensions/pi-subagents/test/unit/file-system-retry.test.ts +0 -64
- package/dist/extensions/pi-subagents/test/unit/fleet-status.test.ts +0 -1356
- package/dist/extensions/pi-subagents/test/unit/fleet-transcript.test.ts +0 -435
- package/dist/extensions/pi-subagents/test/unit/fleet.test.ts +0 -1773
- package/dist/extensions/pi-subagents/test/unit/foreground-control.test.ts +0 -125
- package/dist/extensions/pi-subagents/test/unit/foreground-tool-call-compaction.test.ts +0 -115
- package/dist/extensions/pi-subagents/test/unit/fork-cache-key.test.ts +0 -91
- package/dist/extensions/pi-subagents/test/unit/fork-context.test.ts +0 -588
- package/dist/extensions/pi-subagents/test/unit/formatters.test.ts +0 -14
- package/dist/extensions/pi-subagents/test/unit/get-final-output.test.ts +0 -149
- package/dist/extensions/pi-subagents/test/unit/herdr-inspector-bootstrap.test.ts +0 -101
- package/dist/extensions/pi-subagents/test/unit/herdr-inspector.test.ts +0 -458
- package/dist/extensions/pi-subagents/test/unit/herdr-session-roots-codec.test.ts +0 -63
- package/dist/extensions/pi-subagents/test/unit/herdr-shell-command.test.ts +0 -59
- package/dist/extensions/pi-subagents/test/unit/herdr-status-bridge.test.ts +0 -716
- package/dist/extensions/pi-subagents/test/unit/host-command.test.ts +0 -157
- package/dist/extensions/pi-subagents/test/unit/host-peer-runtime-imports.test.ts +0 -157
- package/dist/extensions/pi-subagents/test/unit/host-step-status.test.ts +0 -98
- package/dist/extensions/pi-subagents/test/unit/index-child-registration.test.ts +0 -1311
- package/dist/extensions/pi-subagents/test/unit/index-segment.test.ts +0 -96
- package/dist/extensions/pi-subagents/test/unit/inspect-rpc.test.ts +0 -617
- package/dist/extensions/pi-subagents/test/unit/intercom-bridge.test.ts +0 -220
- package/dist/extensions/pi-subagents/test/unit/jsonl-writer.test.ts +0 -119
- package/dist/extensions/pi-subagents/test/unit/llm-intent-arbiter.test.ts +0 -226
- package/dist/extensions/pi-subagents/test/unit/mcp-direct-tool-grant.test.ts +0 -155
- package/dist/extensions/pi-subagents/test/unit/mission-goal-driver.test.ts +0 -180
- package/dist/extensions/pi-subagents/test/unit/mission-lifecycle.test.ts +0 -300
- package/dist/extensions/pi-subagents/test/unit/mission-store.test.ts +0 -470
- package/dist/extensions/pi-subagents/test/unit/mock-pi.test.ts +0 -22
- package/dist/extensions/pi-subagents/test/unit/model-exclusions.test.ts +0 -258
- package/dist/extensions/pi-subagents/test/unit/model-fallback.test.ts +0 -903
- package/dist/extensions/pi-subagents/test/unit/model-info.test.ts +0 -162
- package/dist/extensions/pi-subagents/test/unit/model-scope-settings.test.ts +0 -101
- package/dist/extensions/pi-subagents/test/unit/model-scope.test.ts +0 -198
- package/dist/extensions/pi-subagents/test/unit/mutation-evidence.test.ts +0 -177
- package/dist/extensions/pi-subagents/test/unit/native-supervisor-channel.test.ts +0 -796
- package/dist/extensions/pi-subagents/test/unit/nested-control.test.ts +0 -655
- package/dist/extensions/pi-subagents/test/unit/nested-events.test.ts +0 -492
- package/dist/extensions/pi-subagents/test/unit/node-executable.test.ts +0 -26
- package/dist/extensions/pi-subagents/test/unit/notify.test.ts +0 -751
- package/dist/extensions/pi-subagents/test/unit/orca-progress-tabs.test.ts +0 -545
- package/dist/extensions/pi-subagents/test/unit/owned-process-tree.test.ts +0 -69
- package/dist/extensions/pi-subagents/test/unit/package-manifest.test.ts +0 -241
- package/dist/extensions/pi-subagents/test/unit/parallel-handoff.test.ts +0 -563
- package/dist/extensions/pi-subagents/test/unit/parallel-utils.test.ts +0 -269
- package/dist/extensions/pi-subagents/test/unit/path-handling.test.ts +0 -108
- package/dist/extensions/pi-subagents/test/unit/path-resolution.test.ts +0 -103
- package/dist/extensions/pi-subagents/test/unit/permissions.test.ts +0 -46
- package/dist/extensions/pi-subagents/test/unit/pi-args-permission-system.test.ts +0 -437
- package/dist/extensions/pi-subagents/test/unit/pi-args.test.ts +0 -2241
- package/dist/extensions/pi-subagents/test/unit/pi-coding-agent-dir.test.ts +0 -461
- package/dist/extensions/pi-subagents/test/unit/pi-spawn.test.ts +0 -375
- package/dist/extensions/pi-subagents/test/unit/preflight.test.ts +0 -958
- package/dist/extensions/pi-subagents/test/unit/proactive-skills.test.ts +0 -118
- package/dist/extensions/pi-subagents/test/unit/process-terminal.test.ts +0 -257
- package/dist/extensions/pi-subagents/test/unit/profiles.test.ts +0 -372
- package/dist/extensions/pi-subagents/test/unit/project-panes-public-api.test.ts +0 -285
- package/dist/extensions/pi-subagents/test/unit/prompt-template-bridge.test.ts +0 -244
- package/dist/extensions/pi-subagents/test/unit/prompt-workflows.test.ts +0 -167
- package/dist/extensions/pi-subagents/test/unit/pruned-fork.test.ts +0 -214
- package/dist/extensions/pi-subagents/test/unit/public-execution.test.ts +0 -182
- package/dist/extensions/pi-subagents/test/unit/reads-resolution.test.ts +0 -66
- package/dist/extensions/pi-subagents/test/unit/recursion-guard.test.ts +0 -265
- package/dist/extensions/pi-subagents/test/unit/render-helpers.test.ts +0 -560
- package/dist/extensions/pi-subagents/test/unit/result-delivery-ownership.test.ts +0 -34
- package/dist/extensions/pi-subagents/test/unit/result-files.test.ts +0 -501
- package/dist/extensions/pi-subagents/test/unit/result-intercom.test.ts +0 -258
- package/dist/extensions/pi-subagents/test/unit/retained-children.test.ts +0 -191
- package/dist/extensions/pi-subagents/test/unit/rpc.test.ts +0 -1124
- package/dist/extensions/pi-subagents/test/unit/run-fanout-budget.test.ts +0 -191
- package/dist/extensions/pi-subagents/test/unit/run-id-resolver.test.ts +0 -247
- package/dist/extensions/pi-subagents/test/unit/run-status.test.ts +0 -1477
- package/dist/extensions/pi-subagents/test/unit/runtime-acknowledged-extensions.test.ts +0 -52
- package/dist/extensions/pi-subagents/test/unit/runtime-agent-registration.test.ts +0 -332
- package/dist/extensions/pi-subagents/test/unit/scheduled-runs.test.ts +0 -816
- package/dist/extensions/pi-subagents/test/unit/scheduled-store-root.test.ts +0 -67
- package/dist/extensions/pi-subagents/test/unit/schemas.test.ts +0 -655
- package/dist/extensions/pi-subagents/test/unit/scripted-workflow.test.ts +0 -2501
- package/dist/extensions/pi-subagents/test/unit/selector.test.ts +0 -57
- package/dist/extensions/pi-subagents/test/unit/session-lease.test.ts +0 -339
- package/dist/extensions/pi-subagents/test/unit/single-output.test.ts +0 -361
- package/dist/extensions/pi-subagents/test/unit/skills-fallback.test.ts +0 -709
- package/dist/extensions/pi-subagents/test/unit/slash-bridge.test.ts +0 -115
- package/dist/extensions/pi-subagents/test/unit/spawn-budget.test.ts +0 -124
- package/dist/extensions/pi-subagents/test/unit/stale-run-reconciler.test.ts +0 -440
- package/dist/extensions/pi-subagents/test/unit/status-format.test.ts +0 -26
- package/dist/extensions/pi-subagents/test/unit/steering-action.test.ts +0 -435
- package/dist/extensions/pi-subagents/test/unit/steering-notices.test.ts +0 -58
- package/dist/extensions/pi-subagents/test/unit/steering.test.ts +0 -211
- package/dist/extensions/pi-subagents/test/unit/streamed-progress-bounds.test.ts +0 -78
- package/dist/extensions/pi-subagents/test/unit/subagent-action-recovery.test.ts +0 -85
- package/dist/extensions/pi-subagents/test/unit/subagent-control.test.ts +0 -329
- package/dist/extensions/pi-subagents/test/unit/subagent-guide.test.ts +0 -37
- package/dist/extensions/pi-subagents/test/unit/subagent-prompt-runtime.test.ts +0 -1510
- package/dist/extensions/pi-subagents/test/unit/subagent-startup-retry.test.ts +0 -104
- package/dist/extensions/pi-subagents/test/unit/subagent-wait.test.ts +0 -1367
- package/dist/extensions/pi-subagents/test/unit/task-intent.test.ts +0 -126
- package/dist/extensions/pi-subagents/test/unit/temp-paths.test.ts +0 -97
- package/dist/extensions/pi-subagents/test/unit/thinking-ceiling.test.ts +0 -73
- package/dist/extensions/pi-subagents/test/unit/timeout-defaults.test.ts +0 -138
- package/dist/extensions/pi-subagents/test/unit/tool-budget.test.ts +0 -67
- package/dist/extensions/pi-subagents/test/unit/tool-description.test.ts +0 -309
- package/dist/extensions/pi-subagents/test/unit/tool-timeout.test.ts +0 -108
- package/dist/extensions/pi-subagents/test/unit/total-cost.test.ts +0 -61
- package/dist/extensions/pi-subagents/test/unit/ts-loader.test.ts +0 -33
- package/dist/extensions/pi-subagents/test/unit/types-fork-preamble.test.ts +0 -23
- package/dist/extensions/pi-subagents/test/unit/wait-completions.test.ts +0 -76
- package/dist/extensions/pi-subagents/test/unit/wait-subscriptions.test.ts +0 -664
- package/dist/extensions/pi-subagents/test/unit/watch-strategy.test.ts +0 -24
- package/dist/extensions/pi-subagents/test/unit/watchdog-change-signature.test.ts +0 -434
- package/dist/extensions/pi-subagents/test/unit/watchdog-child-status.test.ts +0 -110
- package/dist/extensions/pi-subagents/test/unit/watchdog-emission-guard.test.ts +0 -62
- package/dist/extensions/pi-subagents/test/unit/watchdog-lsp-diagnostics.test.ts +0 -144
- package/dist/extensions/pi-subagents/test/unit/watchdog-model-selection.test.ts +0 -121
- package/dist/extensions/pi-subagents/test/unit/watchdog-permission-arbiter.test.ts +0 -115
- package/dist/extensions/pi-subagents/test/unit/watchdog-render.test.ts +0 -76
- package/dist/extensions/pi-subagents/test/unit/watchdog-review.test.ts +0 -327
- package/dist/extensions/pi-subagents/test/unit/watchdog-runtime.test.ts +0 -1072
- package/dist/extensions/pi-subagents/test/unit/watchdog-scope.test.ts +0 -33
- package/dist/extensions/pi-subagents/test/unit/watchdog-settings.test.ts +0 -322
- package/dist/extensions/pi-subagents/test/unit/watchdog-tool-actions.test.ts +0 -91
- package/dist/extensions/pi-subagents/test/unit/watchdog-turn-delta.test.ts +0 -130
- package/dist/extensions/pi-subagents/test/unit/widget-nested-render.test.ts +0 -171
- package/dist/extensions/pi-subagents/test/unit/windows-hide-spawn.test.ts +0 -49
- package/dist/extensions/pi-subagents/test/unit/workflow-chat-progress.test.ts +0 -551
- package/dist/extensions/pi-subagents/test/unit/workflow-detach-reconcile.test.ts +0 -777
- package/dist/extensions/pi-subagents/test/unit/workflow-graph.test.ts +0 -134
- package/dist/extensions/pi-subagents/test/unit/workflow-launch-params.test.ts +0 -358
- package/dist/extensions/pi-subagents/test/unit/workflow-preflight.test.ts +0 -155
- package/dist/extensions/pi-subagents/test/unit/workflow-receipt.test.ts +0 -461
- package/dist/extensions/pi-subagents/test/unit/workflow-resources.test.ts +0 -98
- package/dist/extensions/pi-subagents/test/unit/workflow-resume-hint.test.ts +0 -365
- package/dist/extensions/pi-subagents/test/unit/worktree-cleanup-plan.test.ts +0 -349
- package/dist/extensions/pi-subagents/test/unit/worktree.test.ts +0 -695
- package/dist/extensions/pi-subagents/test/unit/writer-budget-guidance.test.ts +0 -25
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/effect/index.ts +0 -13
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/effect/rules/no-service-constructor-imports.ts +0 -52
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/index.ts +0 -41
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-chained-type-assertions.ts +0 -77
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-conditional-empty-object-spread.ts +0 -49
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-known-value-widening.ts +0 -247
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-module-mocking.ts +0 -91
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-object-parameters.ts +0 -126
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-reflect-apply.ts +0 -28
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-reflect-get.ts +0 -28
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-runtime-typeof.ts +0 -67
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-shape-in-symbol-names.ts +0 -39
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-unknown-parameters.ts +0 -83
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-unknown-returns.ts +0 -115
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-unknown-type-aliases.ts +0 -72
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-unsafe-dictionary-type.ts +0 -134
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/no-widen-then-assert.ts +0 -366
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/rules/require-safety-comment-for-type-assertion.ts +0 -62
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/shared/dictionary-types.ts +0 -502
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/shared/lexical-type-parameters.ts +0 -60
- package/dist/extensions/pi-subagents/tools/oxlint/anti-slop/shared/reflect-method.ts +0 -35
- package/dist/extensions/pi-subagents/tsconfig.json +0 -15
- package/dist/extensions/pi-tool-display/CHANGELOG.md +0 -329
- package/dist/extensions/pi-tool-display/LICENSE +0 -21
- package/dist/extensions/pi-tool-display/README.md +0 -417
- package/dist/extensions/pi-tool-display/config/config.example.json +0 -40
- package/dist/extensions/pi-tool-display/index.ts +0 -3
- package/dist/extensions/pi-tool-display/package-lock.json +0 -2555
- package/dist/extensions/pi-tool-display/package.json +0 -86
- package/dist/extensions/pi-tool-display/src/agent-dir.ts +0 -35
- package/dist/extensions/pi-tool-display/src/ansi-utils.ts +0 -116
- package/dist/extensions/pi-tool-display/src/bash-display.ts +0 -213
- package/dist/extensions/pi-tool-display/src/capabilities.ts +0 -88
- package/dist/extensions/pi-tool-display/src/config-modal.ts +0 -541
- package/dist/extensions/pi-tool-display/src/config-store.ts +0 -304
- package/dist/extensions/pi-tool-display/src/debug-logger.ts +0 -150
- package/dist/extensions/pi-tool-display/src/diff-presentation.ts +0 -72
- package/dist/extensions/pi-tool-display/src/diff-renderer.ts +0 -2517
- package/dist/extensions/pi-tool-display/src/disposable.ts +0 -34
- package/dist/extensions/pi-tool-display/src/extension-lifecycle.ts +0 -14
- package/dist/extensions/pi-tool-display/src/index.ts +0 -109
- package/dist/extensions/pi-tool-display/src/line-width-safety.ts +0 -93
- package/dist/extensions/pi-tool-display/src/modal-icons.ts +0 -57
- package/dist/extensions/pi-tool-display/src/pending-diff-preview.ts +0 -370
- package/dist/extensions/pi-tool-display/src/presets.ts +0 -117
- package/dist/extensions/pi-tool-display/src/render-utils.ts +0 -186
- package/dist/extensions/pi-tool-display/src/settings-inspector-modal.ts +0 -475
- package/dist/extensions/pi-tool-display/src/thinking-label.ts +0 -343
- package/dist/extensions/pi-tool-display/src/tool-call-box.ts +0 -181
- package/dist/extensions/pi-tool-display/src/tool-metadata.ts +0 -139
- package/dist/extensions/pi-tool-display/src/tool-overrides.ts +0 -2168
- package/dist/extensions/pi-tool-display/src/types.ts +0 -109
- package/dist/extensions/pi-tool-display/src/user-message-box-markdown.ts +0 -64
- package/dist/extensions/pi-tool-display/src/user-message-box-native.ts +0 -66
- package/dist/extensions/pi-tool-display/src/user-message-box-patch.ts +0 -72
- package/dist/extensions/pi-tool-display/src/user-message-box-renderer.ts +0 -419
- package/dist/extensions/pi-tool-display/src/user-message-box-utils.ts +0 -106
- package/dist/extensions/pi-tool-display/src/write-display-utils.ts +0 -31
- package/dist/extensions/pi-tool-display/src/zellij-modal.ts +0 -1027
- package/dist/extensions/pi-tool-display/tests/active-backlog-red.test.ts +0 -65
- package/dist/extensions/pi-tool-display/tests/ansi-utils.test.ts +0 -345
- package/dist/extensions/pi-tool-display/tests/bash-display.test.ts +0 -442
- package/dist/extensions/pi-tool-display/tests/capabilities-edge.test.ts +0 -360
- package/dist/extensions/pi-tool-display/tests/capabilities.test.ts +0 -54
- package/dist/extensions/pi-tool-display/tests/config-modal.test.ts +0 -360
- package/dist/extensions/pi-tool-display/tests/config-store.test.ts +0 -87
- package/dist/extensions/pi-tool-display/tests/custom-tool-overrides.test.ts +0 -415
- package/dist/extensions/pi-tool-display/tests/debug-logger-edge.test.ts +0 -630
- package/dist/extensions/pi-tool-display/tests/debug-logger.test.ts +0 -62
- package/dist/extensions/pi-tool-display/tests/diff-renderer-ansi.test.ts +0 -55
- package/dist/extensions/pi-tool-display/tests/diff-renderer-edge.test.ts +0 -886
- package/dist/extensions/pi-tool-display/tests/diff-renderer-numbering.test.ts +0 -135
- package/dist/extensions/pi-tool-display/tests/diff-renderer-width.test.ts +0 -454
- package/dist/extensions/pi-tool-display/tests/diff-renderer-wrap.test.ts +0 -169
- package/dist/extensions/pi-tool-display/tests/index-integration.test.ts +0 -354
- package/dist/extensions/pi-tool-display/tests/pending-diff-preview.test.ts +0 -79
- package/dist/extensions/pi-tool-display/tests/presets-edge.test.ts +0 -229
- package/dist/extensions/pi-tool-display/tests/presets.test.ts +0 -26
- package/dist/extensions/pi-tool-display/tests/reload-behavior.test.ts +0 -1241
- package/dist/extensions/pi-tool-display/tests/render-utils.test.ts +0 -710
- package/dist/extensions/pi-tool-display/tests/settings-inspector.test.ts +0 -450
- package/dist/extensions/pi-tool-display/tests/thinking-label-edge.test.ts +0 -904
- package/dist/extensions/pi-tool-display/tests/thinking-label.test.ts +0 -72
- package/dist/extensions/pi-tool-display/tests/tool-call-box.test.ts +0 -105
- package/dist/extensions/pi-tool-display/tests/tool-overrides-config.test.ts +0 -613
- package/dist/extensions/pi-tool-display/tests/tool-overrides-mcp.test.ts +0 -499
- package/dist/extensions/pi-tool-display/tests/tool-overrides-registration.test.ts +0 -315
- package/dist/extensions/pi-tool-display/tests/tool-overrides-write-meta.test.ts +0 -68
- package/dist/extensions/pi-tool-display/tests/tool-ui-utils.test.ts +0 -413
- package/dist/extensions/pi-tool-display/tests/user-message-box-performance-red.test.ts +0 -176
- package/dist/extensions/pi-tool-display/tests/user-message-box.test.ts +0 -908
- package/dist/extensions/pi-tool-display/tests/zellij-modal.test.ts +0 -848
- package/dist/extensions/pi-tool-display/tool-display-api-consumer.d.ts +0 -30
- package/dist/extensions/pi-tool-display/tool-display-api-consumer.js +0 -40
- package/dist/extensions/pi-web-agent/CHANGELOG.md +0 -410
- package/dist/extensions/pi-web-agent/README.md +0 -131
- package/dist/extensions/pi-web-agent/package.json +0 -33
- package/dist/extensions/pi-web-agent/src/backends/config.ts +0 -262
- package/dist/extensions/pi-web-agent/src/backends/doctor.ts +0 -272
- package/dist/extensions/pi-web-agent/src/backends/factory.ts +0 -242
- package/dist/extensions/pi-web-agent/src/backends/settings-reader.ts +0 -25
- package/dist/extensions/pi-web-agent/src/cache/ttl-cache.ts +0 -28
- package/dist/extensions/pi-web-agent/src/changelog-notice.ts +0 -136
- package/dist/extensions/pi-web-agent/src/commands/web-agent-config.ts +0 -1082
- package/dist/extensions/pi-web-agent/src/extension.ts +0 -163
- package/dist/extensions/pi-web-agent/src/extract/readability.ts +0 -126
- package/dist/extensions/pi-web-agent/src/fetch/browser-resolution.ts +0 -199
- package/dist/extensions/pi-web-agent/src/fetch/firecrawl-fetch.ts +0 -100
- package/dist/extensions/pi-web-agent/src/fetch/headless-fetch.ts +0 -117
- package/dist/extensions/pi-web-agent/src/fetch/http-fetch.ts +0 -67
- package/dist/extensions/pi-web-agent/src/orchestration/answer-synthesizer.ts +0 -60
- package/dist/extensions/pi-web-agent/src/orchestration/candidate-selector.ts +0 -51
- package/dist/extensions/pi-web-agent/src/orchestration/direct-url.ts +0 -29
- package/dist/extensions/pi-web-agent/src/orchestration/evidence-quality.ts +0 -108
- package/dist/extensions/pi-web-agent/src/orchestration/evidence-ranker.ts +0 -47
- package/dist/extensions/pi-web-agent/src/orchestration/index.ts +0 -28
- package/dist/extensions/pi-web-agent/src/orchestration/query-planner.ts +0 -47
- package/dist/extensions/pi-web-agent/src/orchestration/research-orchestrator.ts +0 -441
- package/dist/extensions/pi-web-agent/src/orchestration/research-types.ts +0 -71
- package/dist/extensions/pi-web-agent/src/orchestration/research-worker.ts +0 -206
- package/dist/extensions/pi-web-agent/src/orchestration/source-profile.ts +0 -105
- package/dist/extensions/pi-web-agent/src/orchestration/stop-decider.ts +0 -81
- package/dist/extensions/pi-web-agent/src/orchestration/url.ts +0 -35
- package/dist/extensions/pi-web-agent/src/presentation/config-store.ts +0 -210
- package/dist/extensions/pi-web-agent/src/presentation/config.ts +0 -75
- package/dist/extensions/pi-web-agent/src/presentation/explore-presentation.ts +0 -73
- package/dist/extensions/pi-web-agent/src/presentation/fetch-presentation.ts +0 -54
- package/dist/extensions/pi-web-agent/src/presentation/search-presentation.ts +0 -53
- package/dist/extensions/pi-web-agent/src/presentation/select-view.ts +0 -20
- package/dist/extensions/pi-web-agent/src/presentation/types.ts +0 -63
- package/dist/extensions/pi-web-agent/src/readers/github-reader.ts +0 -150
- package/dist/extensions/pi-web-agent/src/readers/limits.ts +0 -3
- package/dist/extensions/pi-web-agent/src/readers/pdf-reader.ts +0 -87
- package/dist/extensions/pi-web-agent/src/readers/resolver.ts +0 -25
- package/dist/extensions/pi-web-agent/src/readers/types.ts +0 -11
- package/dist/extensions/pi-web-agent/src/readers/youtube-reader.ts +0 -79
- package/dist/extensions/pi-web-agent/src/search/brave.ts +0 -114
- package/dist/extensions/pi-web-agent/src/search/duckduckgo.ts +0 -99
- package/dist/extensions/pi-web-agent/src/search/exa.ts +0 -109
- package/dist/extensions/pi-web-agent/src/search/fanout.ts +0 -154
- package/dist/extensions/pi-web-agent/src/search/searxng.ts +0 -96
- package/dist/extensions/pi-web-agent/src/search/tavily.ts +0 -113
- package/dist/extensions/pi-web-agent/src/search/youcom.ts +0 -109
- package/dist/extensions/pi-web-agent/src/tools/web-explore.ts +0 -71
- package/dist/extensions/pi-web-agent/src/tools/web-fetch-headless.ts +0 -31
- package/dist/extensions/pi-web-agent/src/tools/web-fetch.ts +0 -31
- package/dist/extensions/pi-web-agent/src/tools/web-search.ts +0 -170
- package/dist/extensions/pi-web-agent/src/types.ts +0 -103
- package/dist/extensions/pi-zentui/.editorconfig +0 -12
- package/dist/extensions/pi-zentui/.github/CODEOWNERS +0 -1
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/bug_report.yml +0 -110
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/config_question.yml +0 -56
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/feature_request.yml +0 -63
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/rendering_issue.yml +0 -106
- package/dist/extensions/pi-zentui/.github/ISSUE_TEMPLATE/runtime_detection.yml +0 -103
- package/dist/extensions/pi-zentui/.github/dependabot.yml +0 -47
- package/dist/extensions/pi-zentui/.github/pull_request_template.md +0 -34
- package/dist/extensions/pi-zentui/.github/release.yml +0 -18
- package/dist/extensions/pi-zentui/.github/workflows/ci.yml +0 -79
- package/dist/extensions/pi-zentui/.github/workflows/publish.yml +0 -63
- package/dist/extensions/pi-zentui/AGENTS.md +0 -107
- package/dist/extensions/pi-zentui/CONTRIBUTING.md +0 -68
- package/dist/extensions/pi-zentui/LICENSE +0 -21
- package/dist/extensions/pi-zentui/README.md +0 -188
- package/dist/extensions/pi-zentui/SECURITY.md +0 -18
- package/dist/extensions/pi-zentui/assets/main-cover.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/editor-accent-rail.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/editor-minimalist.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/editor-opencode-copy-friendly.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/editor-opencode.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/user-message-compact.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/user-message-framed-copy-friendly.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/user-message-framed.png +0 -0
- package/dist/extensions/pi-zentui/assets/screenshots/user-message-labeled.png +0 -0
- package/dist/extensions/pi-zentui/assets/zentui.png +0 -0
- package/dist/extensions/pi-zentui/biome.json +0 -31
- package/dist/extensions/pi-zentui/docs/configuration.md +0 -509
- package/dist/extensions/pi-zentui/docs/footer-format.md +0 -162
- package/dist/extensions/pi-zentui/extensions/zentui/accent-rail-editor.ts +0 -99
- package/dist/extensions/pi-zentui/extensions/zentui/accent-rail-layout-patch.ts +0 -457
- package/dist/extensions/pi-zentui/extensions/zentui/completion-menu.ts +0 -157
- package/dist/extensions/pi-zentui/extensions/zentui/config.ts +0 -2100
- package/dist/extensions/pi-zentui/extensions/zentui/editor-metadata-format.ts +0 -321
- package/dist/extensions/pi-zentui/extensions/zentui/editor-transfer.ts +0 -73
- package/dist/extensions/pi-zentui/extensions/zentui/extension-status.ts +0 -89
- package/dist/extensions/pi-zentui/extensions/zentui/footer-format.ts +0 -364
- package/dist/extensions/pi-zentui/extensions/zentui/footer-layout.ts +0 -122
- package/dist/extensions/pi-zentui/extensions/zentui/footer.ts +0 -812
- package/dist/extensions/pi-zentui/extensions/zentui/format.ts +0 -620
- package/dist/extensions/pi-zentui/extensions/zentui/git.ts +0 -384
- package/dist/extensions/pi-zentui/extensions/zentui/icons.ts +0 -252
- package/dist/extensions/pi-zentui/extensions/zentui/index.ts +0 -1416
- package/dist/extensions/pi-zentui/extensions/zentui/interaction-summary.ts +0 -1049
- package/dist/extensions/pi-zentui/extensions/zentui/live-context.ts +0 -75
- package/dist/extensions/pi-zentui/extensions/zentui/minimalist-editor.ts +0 -463
- package/dist/extensions/pi-zentui/extensions/zentui/package-version.ts +0 -651
- package/dist/extensions/pi-zentui/extensions/zentui/project-refresh.ts +0 -120
- package/dist/extensions/pi-zentui/extensions/zentui/project-state.ts +0 -59
- package/dist/extensions/pi-zentui/extensions/zentui/prototype-patch-registry.ts +0 -166
- package/dist/extensions/pi-zentui/extensions/zentui/repository-root.ts +0 -98
- package/dist/extensions/pi-zentui/extensions/zentui/runtime.ts +0 -841
- package/dist/extensions/pi-zentui/extensions/zentui/selector-border.ts +0 -93
- package/dist/extensions/pi-zentui/extensions/zentui/session-lifecycle.ts +0 -60
- package/dist/extensions/pi-zentui/extensions/zentui/settings-command.ts +0 -1796
- package/dist/extensions/pi-zentui/extensions/zentui/settings-previews.ts +0 -128
- package/dist/extensions/pi-zentui/extensions/zentui/state.ts +0 -94
- package/dist/extensions/pi-zentui/extensions/zentui/style.ts +0 -424
- package/dist/extensions/pi-zentui/extensions/zentui/telemetry.ts +0 -82
- package/dist/extensions/pi-zentui/extensions/zentui/ui.ts +0 -1290
- package/dist/extensions/pi-zentui/extensions/zentui/user-message-osc.ts +0 -248
- package/dist/extensions/pi-zentui/extensions/zentui/user-message-styles.ts +0 -215
- package/dist/extensions/pi-zentui/extensions/zentui/user-message.ts +0 -206
- package/dist/extensions/pi-zentui/extensions/zentui/working-line-messages.ts +0 -24
- package/dist/extensions/pi-zentui/extensions/zentui/working-line-spinners.ts +0 -54
- package/dist/extensions/pi-zentui/extensions/zentui/working-line.ts +0 -1433
- package/dist/extensions/pi-zentui/package-lock.json +0 -5311
- package/dist/extensions/pi-zentui/package.json +0 -60
- package/dist/extensions/pi-zentui/test/accent-rail-editor.test.ts +0 -232
- package/dist/extensions/pi-zentui/test/accent-rail-layout-patch.test.ts +0 -669
- package/dist/extensions/pi-zentui/test/completion-menu.test.ts +0 -265
- package/dist/extensions/pi-zentui/test/config.test.ts +0 -3119
- package/dist/extensions/pi-zentui/test/editor-metadata-format.test.ts +0 -405
- package/dist/extensions/pi-zentui/test/editor-transfer.test.ts +0 -260
- package/dist/extensions/pi-zentui/test/editor-viewport-indicators.test.ts +0 -1286
- package/dist/extensions/pi-zentui/test/extension-compliance.test.ts +0 -7196
- package/dist/extensions/pi-zentui/test/extension-status.test.ts +0 -182
- package/dist/extensions/pi-zentui/test/fixtures/starship-nerd-font-symbols.toml +0 -172
- package/dist/extensions/pi-zentui/test/footer-format.test.ts +0 -431
- package/dist/extensions/pi-zentui/test/footer-layout.test.ts +0 -113
- package/dist/extensions/pi-zentui/test/footer-repository-path.test.ts +0 -123
- package/dist/extensions/pi-zentui/test/format.test.ts +0 -927
- package/dist/extensions/pi-zentui/test/git.test.ts +0 -212
- package/dist/extensions/pi-zentui/test/icons.test.ts +0 -69
- package/dist/extensions/pi-zentui/test/interaction-summary.test.ts +0 -1402
- package/dist/extensions/pi-zentui/test/live-context-integration.test.ts +0 -378
- package/dist/extensions/pi-zentui/test/live-context.test.ts +0 -139
- package/dist/extensions/pi-zentui/test/minimalist-editor.test.ts +0 -811
- package/dist/extensions/pi-zentui/test/package-version.test.ts +0 -321
- package/dist/extensions/pi-zentui/test/project-refresh.test.ts +0 -250
- package/dist/extensions/pi-zentui/test/project-state.test.ts +0 -159
- package/dist/extensions/pi-zentui/test/repository-root.test.ts +0 -108
- package/dist/extensions/pi-zentui/test/responsive-dependencies.test.ts +0 -825
- package/dist/extensions/pi-zentui/test/runtime.test.ts +0 -183
- package/dist/extensions/pi-zentui/test/session-lifecycle.test.ts +0 -40
- package/dist/extensions/pi-zentui/test/settings-command.test.ts +0 -1381
- package/dist/extensions/pi-zentui/test/settings-previews.test.ts +0 -347
- package/dist/extensions/pi-zentui/test/state.test.ts +0 -84
- package/dist/extensions/pi-zentui/test/telemetry-lifecycle-integration.test.ts +0 -276
- package/dist/extensions/pi-zentui/test/telemetry.test.ts +0 -105
- package/dist/extensions/pi-zentui/test/turn-summary-lifecycle.integration.test.ts +0 -327
- package/dist/extensions/pi-zentui/test/user-message-osc.test.ts +0 -164
- package/dist/extensions/pi-zentui/test/user-message-styles.test.ts +0 -292
- package/dist/extensions/pi-zentui/test/working-line-lifecycle.integration.test.ts +0 -730
- package/dist/extensions/pi-zentui/test/working-line-messages.test.ts +0 -34
- package/dist/extensions/pi-zentui/test/working-line.test.ts +0 -1990
- package/dist/extensions/pi-zentui/tsconfig.json +0 -16
- package/dist/extensions/ponytail/index.js +0 -176
- package/dist/extensions/ponytail/package.json +0 -8
- package/dist/extensions/ponytail/ponytail-config.cjs +0 -151
- package/dist/extensions/ponytail/ponytail-instructions.cjs +0 -112
- package/dist/extensions/ponytail/test/extension.test.js +0 -299
- package/dist/extensions/ponytail/test/helpers.test.js +0 -312
- package/dist/extensions/question/batch.ts +0 -103
- package/dist/extensions/question/constants.ts +0 -31
- package/dist/extensions/question/helpers.ts +0 -58
- package/dist/extensions/question/index.ts +0 -688
- package/dist/extensions/question/navigation.ts +0 -14
- package/dist/extensions/question/package.json +0 -19
- package/dist/extensions/question/question-list.ts +0 -533
- package/dist/extensions/question/row-layout.ts +0 -165
- package/dist/extensions/question/schemas.ts +0 -43
- package/dist/extensions/question/selection-mode.ts +0 -47
- package/dist/extensions/question/shortcuts.ts +0 -44
- package/dist/extensions/question/tests/batch.test.ts +0 -113
- package/dist/extensions/question/tests/exp.test.ts +0 -70
- package/dist/extensions/question/tests/exp2.test.ts +0 -59
- package/dist/extensions/question/tests/exp3.test.ts +0 -47
- package/dist/extensions/question/tests/helpers.test.ts +0 -93
- package/dist/extensions/question/tests/question-list.test.ts +0 -694
- package/dist/extensions/question/tests/row-layout.test.ts +0 -215
- package/dist/extensions/question/tests/schemas.test.ts +0 -53
- package/dist/extensions/question/tests/selection-mode.test.ts +0 -54
- package/dist/extensions/question/tests/shortcuts.test.ts +0 -107
- package/dist/extensions/question/tests/wizard.test.ts +0 -839
- package/dist/extensions/question/tests/zz-ig3.test.ts +0 -20
- package/dist/extensions/question/tests/zz-probe.test.ts +0 -29
- package/dist/extensions/question/types.ts +0 -132
- package/dist/extensions/rtk.test.ts +0 -320
- package/dist/extensions/rtk.ts +0 -123
- package/dist/extensions/test-resolve-hook-impl.mjs +0 -7
- package/dist/extensions/test-resolve-hook.mjs +0 -7
- package/dist/extensions/tokenin-onboarding.ts +0 -883
- package/dist/extensions/tps.test.ts +0 -38
- package/dist/extensions/tps.ts +0 -349
- package/dist/extensions/undo.test.ts +0 -720
- package/dist/extensions/undo.ts +0 -298
- package/dist/extensions/web-agent-onboarding.test.ts +0 -415
- package/dist/extensions/web-agent-onboarding.ts +0 -222
- package/dist/index.d.ts +0 -36
- package/dist/index.js +0 -48
- package/dist/main.d.ts +0 -11
- package/dist/main.js +0 -768
- package/dist/migrations.d.ts +0 -32
- package/dist/migrations.js +0 -280
- package/dist/modes/index.d.ts +0 -8
- package/dist/modes/index.js +0 -7
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/components/armin.d.ts +0 -33
- package/dist/modes/interactive/components/armin.js +0 -332
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -21
- package/dist/modes/interactive/components/assistant-message.js +0 -142
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -33
- package/dist/modes/interactive/components/bash-execution.js +0 -174
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -15
- package/dist/modes/interactive/components/bordered-loader.js +0 -53
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -15
- package/dist/modes/interactive/components/branch-summary-message.js +0 -43
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -15
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -44
- package/dist/modes/interactive/components/config-selector.d.ts +0 -101
- package/dist/modes/interactive/components/config-selector.js +0 -760
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -13
- package/dist/modes/interactive/components/countdown-timer.js +0 -32
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -20
- package/dist/modes/interactive/components/custom-editor.js +0 -69
- package/dist/modes/interactive/components/custom-entry.d.ts +0 -18
- package/dist/modes/interactive/components/custom-entry.js +0 -51
- package/dist/modes/interactive/components/custom-message.d.ts +0 -21
- package/dist/modes/interactive/components/custom-message.js +0 -86
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -22
- package/dist/modes/interactive/components/daxnuts.js +0 -139
- package/dist/modes/interactive/components/diff.d.ts +0 -11
- package/dist/modes/interactive/components/diff.js +0 -132
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -14
- package/dist/modes/interactive/components/dynamic-border.js +0 -20
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -4
- package/dist/modes/interactive/components/earendil-announcement.js +0 -39
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -20
- package/dist/modes/interactive/components/extension-editor.js +0 -97
- package/dist/modes/interactive/components/extension-input.d.ts +0 -22
- package/dist/modes/interactive/components/extension-input.js +0 -60
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -25
- package/dist/modes/interactive/components/extension-selector.js +0 -82
- package/dist/modes/interactive/components/first-time-setup.d.ts +0 -24
- package/dist/modes/interactive/components/first-time-setup.js +0 -116
- package/dist/modes/interactive/components/footer.d.ts +0 -31
- package/dist/modes/interactive/components/footer.js +0 -221
- package/dist/modes/interactive/components/index.d.ts +0 -33
- package/dist/modes/interactive/components/index.js +0 -34
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -12
- package/dist/modes/interactive/components/keybinding-hints.js +0 -35
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -51
- package/dist/modes/interactive/components/login-dialog.js +0 -187
- package/dist/modes/interactive/components/model-selector.d.ts +0 -63
- package/dist/modes/interactive/components/model-selector.js +0 -321
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -32
- package/dist/modes/interactive/components/oauth-selector.js +0 -162
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -41
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -301
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -22
- package/dist/modes/interactive/components/session-selector-search.js +0 -154
- package/dist/modes/interactive/components/session-selector.d.ts +0 -94
- package/dist/modes/interactive/components/session-selector.js +0 -866
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -103
- package/dist/modes/interactive/components/settings-selector.js +0 -726
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -9
- package/dist/modes/interactive/components/show-images-selector.js +0 -38
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -16
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -46
- package/dist/modes/interactive/components/startup-box.d.ts +0 -38
- package/dist/modes/interactive/components/startup-box.js +0 -90
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -30
- package/dist/modes/interactive/components/status-indicator.js +0 -64
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -10
- package/dist/modes/interactive/components/theme-selector.js +0 -49
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -10
- package/dist/modes/interactive/components/thinking-selector.js +0 -51
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -62
- package/dist/modes/interactive/components/tool-execution.js +0 -325
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -93
- package/dist/modes/interactive/components/tree-selector.js +0 -1244
- package/dist/modes/interactive/components/trust-selector.d.ts +0 -22
- package/dist/modes/interactive/components/trust-selector.js +0 -90
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -29
- package/dist/modes/interactive/components/user-message-selector.js +0 -113
- package/dist/modes/interactive/components/user-message.d.ts +0 -13
- package/dist/modes/interactive/components/user-message.js +0 -41
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -23
- package/dist/modes/interactive/components/visual-truncate.js +0 -32
- package/dist/modes/interactive/external-editor.d.ts +0 -11
- package/dist/modes/interactive/external-editor.js +0 -36
- package/dist/modes/interactive/interactive-mode.d.ts +0 -447
- package/dist/modes/interactive/interactive-mode.js +0 -5489
- package/dist/modes/interactive/model-catalog-refresh.d.ts +0 -6
- package/dist/modes/interactive/model-catalog-refresh.js +0 -33
- package/dist/modes/interactive/model-search.d.ts +0 -11
- package/dist/modes/interactive/model-search.js +0 -14
- package/dist/modes/interactive/theme/dark.json +0 -90
- package/dist/modes/interactive/theme/light.json +0 -89
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -39
- package/dist/modes/interactive/theme/theme-controller.js +0 -124
- package/dist/modes/interactive/theme/theme-schema.json +0 -348
- package/dist/modes/interactive/theme/theme.d.ts +0 -121
- package/dist/modes/interactive/theme/theme.js +0 -1090
- package/dist/modes/print-mode.d.ts +0 -27
- package/dist/modes/print-mode.js +0 -141
- package/dist/modes/rpc/jsonl.d.ts +0 -16
- package/dist/modes/rpc/jsonl.js +0 -48
- package/dist/modes/rpc/rpc-client.d.ts +0 -438
- package/dist/modes/rpc/rpc-client.js +0 -712
- package/dist/modes/rpc/rpc-mode.d.ts +0 -19
- package/dist/modes/rpc/rpc-mode.js +0 -1459
- package/dist/modes/rpc/rpc-types.d.ts +0 -902
- package/dist/modes/rpc/rpc-types.js +0 -7
- package/dist/package-manager-cli.d.ts +0 -7
- package/dist/package-manager-cli.js +0 -789
- package/dist/rpc-entry.d.ts +0 -2
- package/dist/rpc-entry.js +0 -9
- package/dist/skills/agent-browser/SKILL.md +0 -53
- package/dist/skills/batch-grill-me/SKILL.md +0 -20
- package/dist/skills/brandkit/SKILL.md +0 -800
- package/dist/skills/design-references/SKILL.md +0 -32
- package/dist/skills/design-references/references/clickhouse/DESIGN.md +0 -544
- package/dist/skills/design-taste-frontend/SKILL.md +0 -1208
- package/dist/skills/design-taste-frontend-v1/SKILL.md +0 -228
- package/dist/skills/full-output-enforcement/SKILL.md +0 -51
- package/dist/skills/gpt-taste/SKILL.md +0 -76
- package/dist/skills/grill-me/SKILL.md +0 -11
- package/dist/skills/handoff/SKILL.md +0 -17
- package/dist/skills/handoff-text/SKILL.md +0 -15
- package/dist/skills/high-end-visual-design/SKILL.md +0 -100
- package/dist/skills/image-to-code/SKILL.md +0 -1230
- package/dist/skills/imagegen-frontend-mobile/SKILL.md +0 -1467
- package/dist/skills/imagegen-frontend-web/SKILL.md +0 -989
- package/dist/skills/implanger/SKILL.md +0 -70
- package/dist/skills/improve-codebase/REFERENCE.md +0 -78
- package/dist/skills/improve-codebase/SKILL.md +0 -180
- package/dist/skills/industrial-brutalist-ui/SKILL.md +0 -94
- package/dist/skills/minimalist-ui/SKILL.md +0 -87
- package/dist/skills/pi-subagents/SKILL.md +0 -50
- package/dist/skills/pi-subagents/references/constraints-and-recipes.md +0 -274
- package/dist/skills/pi-subagents/references/execution-controls.md +0 -463
- package/dist/skills/pi-subagents/references/management-authoring-rpc.md +0 -161
- package/dist/skills/pi-subagents/references/multi-lane-orchestration.md +0 -39
- package/dist/skills/pi-subagents/references/prompting-and-roles.md +0 -267
- package/dist/skills/planger/SKILL.md +0 -167
- package/dist/skills/ponytail/SKILL.md +0 -121
- package/dist/skills/ponytail-audit/SKILL.md +0 -42
- package/dist/skills/ponytail-debt/SKILL.md +0 -45
- package/dist/skills/ponytail-gain/SKILL.md +0 -51
- package/dist/skills/ponytail-help/SKILL.md +0 -72
- package/dist/skills/ponytail-review/SKILL.md +0 -58
- package/dist/skills/redesign-existing-projects/SKILL.md +0 -180
- package/dist/skills/selesai-handoff/SKILL.md +0 -21
- package/dist/skills/stitch-design-taste/SKILL.md +0 -186
- package/dist/skills/unlazy/CHANGELOG.md +0 -109
- package/dist/skills/unlazy/CONTRIBUTING.md +0 -63
- package/dist/skills/unlazy/LICENSE +0 -21
- package/dist/skills/unlazy/README.md +0 -228
- package/dist/skills/unlazy/SECURITY.md +0 -60
- package/dist/skills/unlazy/SKILL.md +0 -93
- package/dist/skills/unlazy/package.json +0 -13
- package/dist/skills/unlazy/references/dispatch.md +0 -79
- package/dist/skills/unlazy/references/gates.md +0 -132
- package/dist/skills/unlazy/references/method.md +0 -49
- package/dist/skills/unlazy/references/orchestration.md +0 -98
- package/dist/skills/unlazy/references/parallel.md +0 -111
- package/dist/skills/unlazy/references/token-economy.md +0 -39
- package/dist/skills/unlazy/research/validation-protocol.md +0 -81
- package/dist/skills/unlazy/scripts/dispatch-check.mjs +0 -108
- package/dist/skills/unlazy/scripts/gate-check.mjs +0 -879
- package/dist/skills/unlazy/scripts/gate-lint.mjs +0 -178
- package/dist/skills/unlazy/scripts/lib/check-supervisor.mjs +0 -46
- package/dist/skills/unlazy/scripts/lib/dispatch.mjs +0 -283
- package/dist/skills/unlazy/scripts/lib/gates.mjs +0 -625
- package/dist/skills/unlazy/scripts/lib/process-tree.mjs +0 -161
- package/dist/skills/unlazy/scripts/lib/regex-worker.mjs +0 -9
- package/dist/skills/unlazy/templates/PLAN.md +0 -65
- package/dist/skills/unlazy/templates/gates-leaf.md +0 -51
- package/dist/skills/unlazy/templates/gates-node.md +0 -50
- package/dist/skills/unlazy/tests/contract-tests.mjs +0 -127
- package/dist/skills/unlazy/tests/dispatch-tests.mjs +0 -296
- package/dist/skills/unlazy/tests/hardening-tests.mjs +0 -900
- package/dist/skills/unlazy/tests/lint-tests.mjs +0 -242
- package/dist/skills/unlazy/tests/run-tests.mjs +0 -360
- package/dist/skills/unlazy/tests/self-check.mjs +0 -152
- package/dist/skills/unlazy/tests/stress-tests.mjs +0 -165
- package/dist/skills/web-design-guidelines/SKILL.md +0 -41
- package/dist/skills/workflow/SKILL.md +0 -95
- package/dist/themes/adventure.json +0 -84
- package/dist/themes/adwaita-dark.json +0 -84
- package/dist/themes/arcoiris.json +0 -84
- package/dist/themes/arthur.json +0 -84
- package/dist/themes/atom.json +0 -84
- package/dist/themes/aura.json +0 -84
- package/dist/themes/black-metal-bathory.json +0 -84
- package/dist/themes/black-metal-burzum.json +0 -84
- package/dist/themes/black-metal-khold.json +0 -84
- package/dist/themes/box.json +0 -84
- package/dist/themes/brogrammer.json +0 -84
- package/dist/themes/carbonfox.json +0 -84
- package/dist/themes/catppuccin-mocha.json +0 -84
- package/dist/themes/citruszest.json +0 -84
- package/dist/themes/cursor-dark.json +0 -84
- package/dist/themes/cutie-pro.json +0 -84
- package/dist/themes/dark-modern.json +0 -84
- package/dist/themes/dark-pastel.json +0 -84
- package/dist/themes/dimmed-monokai.json +0 -84
- package/dist/themes/doom-peacock.json +0 -84
- package/dist/themes/dracula-plus.json +0 -84
- package/dist/themes/dracula.json +0 -80
- package/dist/themes/earthsong.json +0 -84
- package/dist/themes/everforest-dark-hard.json +0 -84
- package/dist/themes/everforest-dark.json +0 -80
- package/dist/themes/fahrenheit.json +0 -84
- package/dist/themes/flatland.json +0 -84
- package/dist/themes/flexoki-dark.json +0 -84
- package/dist/themes/front-end-delight.json +0 -84
- package/dist/themes/fun-forrest.json +0 -84
- package/dist/themes/galizur.json +0 -84
- package/dist/themes/github-dark-colorblind.json +0 -84
- package/dist/themes/github-dark-high-contrast.json +0 -84
- package/dist/themes/glacier.json +0 -84
- package/dist/themes/gruber-darker.json +0 -84
- package/dist/themes/gruvbox-dark-hard.json +0 -84
- package/dist/themes/gruvbox-dark.json +0 -84
- package/dist/themes/gruvbox-material.json +0 -84
- package/dist/themes/guezwhoz.json +0 -84
- package/dist/themes/hacktober.json +0 -84
- package/dist/themes/hardcore.json +0 -84
- package/dist/themes/havn-skumring.json +0 -84
- package/dist/themes/ic-orange-ppl.json +0 -84
- package/dist/themes/iterm2-smoooooth.json +0 -84
- package/dist/themes/iterm2-tango-dark.json +0 -84
- package/dist/themes/japanesque.json +0 -84
- package/dist/themes/jellybeans.json +0 -84
- package/dist/themes/kanagawa-wave.json +0 -84
- package/dist/themes/kurokula.json +0 -84
- package/dist/themes/later-this-evening.json +0 -84
- package/dist/themes/lovelace.json +0 -84
- package/dist/themes/material-darker.json +0 -84
- package/dist/themes/matte-black.json +0 -84
- package/dist/themes/mellow.json +0 -84
- package/dist/themes/miasma.json +0 -84
- package/dist/themes/nord.json +0 -80
- package/dist/themes/nvim-dark.json +0 -84
- package/dist/themes/one-dark.json +0 -80
- package/dist/themes/popping-and-locking.json +0 -84
- package/dist/themes/rose-pine.json +0 -80
- package/dist/themes/sea-shells.json +0 -84
- package/dist/themes/sleepy-hollow.json +0 -84
- package/dist/themes/smyck.json +0 -84
- package/dist/themes/solarized-dark.json +0 -80
- package/dist/themes/tokyo-night.json +0 -80
- package/dist/themes/tomorrow-night-bright.json +0 -84
- package/dist/themes/tomorrow-night-burns.json +0 -84
- package/dist/themes/tomorrow-night.json +0 -84
- package/dist/themes/twilight.json +0 -84
- package/dist/themes/vague.json +0 -84
- package/dist/themes/vesper.json +0 -84
- package/dist/themes/xcode-dark-hc.json +0 -84
- package/dist/utils/abort.d.ts +0 -4
- package/dist/utils/abort.js +0 -47
- package/dist/utils/ansi.d.ts +0 -1
- package/dist/utils/ansi.js +0 -51
- package/dist/utils/changelog.d.ts +0 -21
- package/dist/utils/changelog.js +0 -164
- package/dist/utils/child-process.d.ts +0 -17
- package/dist/utils/child-process.js +0 -105
- package/dist/utils/clipboard-image.d.ts +0 -10
- package/dist/utils/clipboard-image.js +0 -250
- package/dist/utils/clipboard-native.d.ts +0 -10
- package/dist/utils/clipboard-native.js +0 -19
- package/dist/utils/clipboard.d.ts +0 -3
- package/dist/utils/clipboard.js +0 -140
- package/dist/utils/deprecation.d.ts +0 -3
- package/dist/utils/deprecation.js +0 -12
- package/dist/utils/exif-orientation.d.ts +0 -4
- package/dist/utils/exif-orientation.js +0 -157
- package/dist/utils/frontmatter.d.ts +0 -7
- package/dist/utils/frontmatter.js +0 -25
- package/dist/utils/fs-watch.d.ts +0 -4
- package/dist/utils/fs-watch.js +0 -24
- package/dist/utils/git.d.ts +0 -25
- package/dist/utils/git.js +0 -194
- package/dist/utils/html.d.ts +0 -6
- package/dist/utils/html.js +0 -39
- package/dist/utils/image-convert.d.ts +0 -9
- package/dist/utils/image-convert.js +0 -44
- package/dist/utils/image-process.d.ts +0 -17
- package/dist/utils/image-process.js +0 -82
- package/dist/utils/image-resize-core.d.ts +0 -29
- package/dist/utils/image-resize-core.js +0 -123
- package/dist/utils/image-resize-worker.d.ts +0 -1
- package/dist/utils/image-resize-worker.js +0 -30
- package/dist/utils/image-resize.d.ts +0 -15
- package/dist/utils/image-resize.js +0 -96
- package/dist/utils/json.d.ts +0 -2
- package/dist/utils/json.js +0 -6
- package/dist/utils/mime.d.ts +0 -2
- package/dist/utils/mime.js +0 -132
- package/dist/utils/open-browser.d.ts +0 -8
- package/dist/utils/open-browser.js +0 -21
- package/dist/utils/paths.d.ts +0 -30
- package/dist/utils/paths.js +0 -91
- package/dist/utils/photon.d.ts +0 -20
- package/dist/utils/photon.js +0 -120
- package/dist/utils/pi-user-agent.d.ts +0 -1
- package/dist/utils/pi-user-agent.js +0 -4
- package/dist/utils/shell.d.ts +0 -33
- package/dist/utils/shell.js +0 -215
- package/dist/utils/sleep.d.ts +0 -4
- package/dist/utils/sleep.js +0 -16
- package/dist/utils/syntax-highlight.d.ts +0 -11
- package/dist/utils/syntax-highlight.js +0 -117
- package/dist/utils/thinking-tags.d.ts +0 -6
- package/dist/utils/thinking-tags.js +0 -62
- package/dist/utils/tools-manager.d.ts +0 -7
- package/dist/utils/tools-manager.js +0 -402
- package/dist/utils/version-check.d.ts +0 -19
- package/dist/utils/version-check.js +0 -72
- package/dist/utils/windows-self-update.d.ts +0 -2
- package/dist/utils/windows-self-update.js +0 -76
|
@@ -1,3119 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
chmodSync,
|
|
3
|
-
existsSync,
|
|
4
|
-
lstatSync,
|
|
5
|
-
mkdirSync,
|
|
6
|
-
mkdtempSync,
|
|
7
|
-
readdirSync,
|
|
8
|
-
readFileSync,
|
|
9
|
-
readlinkSync,
|
|
10
|
-
rmSync,
|
|
11
|
-
statSync,
|
|
12
|
-
symlinkSync,
|
|
13
|
-
writeFileSync,
|
|
14
|
-
} from "node:fs";
|
|
15
|
-
import { tmpdir } from "node:os";
|
|
16
|
-
import { join } from "node:path";
|
|
17
|
-
import { visibleWidth } from "@earendil-works/pi-tui";
|
|
18
|
-
import { describe, expect, it } from "vitest";
|
|
19
|
-
import {
|
|
20
|
-
DEFAULT_COMPACT_FOOTER_FORMAT,
|
|
21
|
-
DEFAULT_EDITOR_METADATA_FORMAT,
|
|
22
|
-
defaultConfig,
|
|
23
|
-
ensureConfigExists,
|
|
24
|
-
FOOTER_FORMAT_VARIABLES,
|
|
25
|
-
getExtensionStatusColorMode,
|
|
26
|
-
getExtensionStatusPlacement,
|
|
27
|
-
hasUnsupportedComponentStyle,
|
|
28
|
-
mergeConfig,
|
|
29
|
-
saveAccentRailEditorStylePatch,
|
|
30
|
-
saveColorSourcesPatch,
|
|
31
|
-
saveContextStylePatch,
|
|
32
|
-
saveContextThresholdsPatch,
|
|
33
|
-
saveEditorBorderColorMode,
|
|
34
|
-
saveEditorComponentPatch,
|
|
35
|
-
saveEditorModelLabel,
|
|
36
|
-
saveEditorStyle,
|
|
37
|
-
saveExtensionStatusColorMode,
|
|
38
|
-
saveExtensionStatusDefaultPlacement,
|
|
39
|
-
saveExtensionStatusPlacement,
|
|
40
|
-
saveFooterComponentPatch,
|
|
41
|
-
saveFooterFormatPatch,
|
|
42
|
-
saveFooterSegmentsPatch,
|
|
43
|
-
saveGitBranchPatch,
|
|
44
|
-
saveGitCommitPatch,
|
|
45
|
-
saveGitMetricsPatch,
|
|
46
|
-
saveMinimalistEditorStylePatch,
|
|
47
|
-
saveMinimalistPatch,
|
|
48
|
-
savePathDisplayPatch,
|
|
49
|
-
savePolishedCopyFriendlyEditorStylePatch,
|
|
50
|
-
savePolishedEditorStylePatch,
|
|
51
|
-
saveResponsiveFooterPatch,
|
|
52
|
-
saveSelectorBordersComponentPatch,
|
|
53
|
-
saveSeparatorPatch,
|
|
54
|
-
saveStarshipFooterStylePatch,
|
|
55
|
-
saveUiFeaturesPatch,
|
|
56
|
-
saveUserMessagesComponentPatch,
|
|
57
|
-
saveWorkingLineComponentPatch,
|
|
58
|
-
} from "../extensions/zentui/config";
|
|
59
|
-
import {
|
|
60
|
-
colorize,
|
|
61
|
-
renderChromeBorder,
|
|
62
|
-
renderStyle,
|
|
63
|
-
renderStyleForSource,
|
|
64
|
-
renderTerminalStyle,
|
|
65
|
-
} from "../extensions/zentui/style";
|
|
66
|
-
|
|
67
|
-
function configTempFiles(dir: string, filename = "zentui.json"): string[] {
|
|
68
|
-
return readdirSync(dir).filter(
|
|
69
|
-
(name) => name.startsWith(`.${filename}.`) && name.endsWith(".tmp"),
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function withConfig(
|
|
74
|
-
initial: Record<string, unknown> | undefined,
|
|
75
|
-
assertions: (path: string, dir: string) => void,
|
|
76
|
-
): void {
|
|
77
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
78
|
-
const path = join(dir, "zentui.json");
|
|
79
|
-
try {
|
|
80
|
-
if (initial !== undefined) writeFileSync(path, `${JSON.stringify(initial, null, 2)}\n`);
|
|
81
|
-
assertions(path, dir);
|
|
82
|
-
} finally {
|
|
83
|
-
rmSync(dir, { recursive: true, force: true });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// biome-ignore lint/suspicious/noExplicitAny: Tests intentionally inspect arbitrary JSON fixture shapes.
|
|
88
|
-
function readRaw(path: string): Record<string, any> {
|
|
89
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
describe("canonical config resolution", () => {
|
|
93
|
-
it("provides complete canonical defaults and the established palette defaults", () => {
|
|
94
|
-
const config = mergeConfig({});
|
|
95
|
-
expect(config.components).toEqual({
|
|
96
|
-
editor: {
|
|
97
|
-
enabled: false,
|
|
98
|
-
style: "opencode",
|
|
99
|
-
colorSource: "theme",
|
|
100
|
-
borderColorMode: "adaptive",
|
|
101
|
-
modelLabel: "name",
|
|
102
|
-
viewportIndicators: false,
|
|
103
|
-
styles: {
|
|
104
|
-
opencode: {
|
|
105
|
-
metadataFormat: DEFAULT_EDITOR_METADATA_FORMAT,
|
|
106
|
-
completionMenu: "native",
|
|
107
|
-
},
|
|
108
|
-
"opencode-copy-friendly": {
|
|
109
|
-
metadataFormat: DEFAULT_EDITOR_METADATA_FORMAT,
|
|
110
|
-
completionMenu: "native",
|
|
111
|
-
},
|
|
112
|
-
"accent-rail": {
|
|
113
|
-
rail: "▎",
|
|
114
|
-
asciiRail: "|",
|
|
115
|
-
transparent: false,
|
|
116
|
-
},
|
|
117
|
-
minimalist: {
|
|
118
|
-
pathDisplay: "compact",
|
|
119
|
-
contextFormat: "percent",
|
|
120
|
-
contextGauge: true,
|
|
121
|
-
showSessionName: true,
|
|
122
|
-
showTimer: true,
|
|
123
|
-
showCost: true,
|
|
124
|
-
showGit: true,
|
|
125
|
-
contextThresholds: { warning: 70, error: 90 },
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
userMessages: {
|
|
130
|
-
enabled: true,
|
|
131
|
-
style: "labeled",
|
|
132
|
-
colorSource: "theme",
|
|
133
|
-
styles: { framed: {}, "framed-copy-friendly": {}, compact: {}, labeled: {} },
|
|
134
|
-
},
|
|
135
|
-
workingLine: {
|
|
136
|
-
enabled: true,
|
|
137
|
-
turnSummary: true,
|
|
138
|
-
spinner: "star-bloom",
|
|
139
|
-
spinnerIntervalMs: 100,
|
|
140
|
-
animateSpinnerColor: false,
|
|
141
|
-
textIntervalMs: 60,
|
|
142
|
-
textAnimation: "classic",
|
|
143
|
-
colorSource: "theme",
|
|
144
|
-
messages: {
|
|
145
|
-
custom: true,
|
|
146
|
-
values: [...defaultConfig.components.workingLine.messages.values],
|
|
147
|
-
},
|
|
148
|
-
segments: { tool: true, elapsed: true, thought: true, tokens: true },
|
|
149
|
-
},
|
|
150
|
-
selectorBorders: { enabled: true, style: "zentui", colorSource: "theme" },
|
|
151
|
-
footer: {
|
|
152
|
-
style: "native",
|
|
153
|
-
colorSource: "theme",
|
|
154
|
-
modelLabel: "name",
|
|
155
|
-
styles: {
|
|
156
|
-
starship: {
|
|
157
|
-
format: "",
|
|
158
|
-
responsive: true,
|
|
159
|
-
compactFormat: DEFAULT_COMPACT_FOOTER_FORMAT,
|
|
160
|
-
compactMaxLines: "unlimited",
|
|
161
|
-
separator: "none",
|
|
162
|
-
contextStyle: "text",
|
|
163
|
-
contextThresholds: { warning: 70, error: 90 },
|
|
164
|
-
pathDisplay: { mode: "basename", depth: 2 },
|
|
165
|
-
segments: defaultConfig.footerSegments,
|
|
166
|
-
gitBranch: { maxLength: "full" },
|
|
167
|
-
gitCommit: { hashLength: 7, onlyDetached: true, showTag: true },
|
|
168
|
-
gitMetrics: { onlyNonzero: true, ignoreSubmodules: false },
|
|
169
|
-
extensionStatuses: {
|
|
170
|
-
defaultPlacement: "right",
|
|
171
|
-
placements: {},
|
|
172
|
-
colorModes: {},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
});
|
|
178
|
-
expect(config.projectRefreshIntervalMs).toBe(30_000);
|
|
179
|
-
expect(config.icons.cacheHit).toBe("c");
|
|
180
|
-
expect(config.colors).toEqual(defaultConfig.colors);
|
|
181
|
-
expect(defaultConfig.components).toEqual(config.components);
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
it("normalizes Opencode completion menus independently", () => {
|
|
185
|
-
const config = mergeConfig({
|
|
186
|
-
components: {
|
|
187
|
-
editor: {
|
|
188
|
-
styles: {
|
|
189
|
-
opencode: { completionMenu: "native" },
|
|
190
|
-
"opencode-copy-friendly": { completionMenu: "invalid" },
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
expect(config.components.editor.styles.opencode.completionMenu).toBe("native");
|
|
196
|
-
expect(config.components.editor.styles["opencode-copy-friendly"].completionMenu).toBe(
|
|
197
|
-
"native",
|
|
198
|
-
);
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
it("normalizes the canonical accent-rail style and its editor-owned roles", () => {
|
|
202
|
-
const config = mergeConfig({
|
|
203
|
-
colors: { editorRail: "bright-green", editorAccent: "error" },
|
|
204
|
-
components: {
|
|
205
|
-
editor: {
|
|
206
|
-
style: "accent-rail",
|
|
207
|
-
styles: { "accent-rail": { rail: "!", asciiRail: ":", transparent: true } },
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
expect(config.components.editor.style).toBe("accent-rail");
|
|
212
|
-
expect(config.components.editor.styles["accent-rail"]).toEqual({
|
|
213
|
-
rail: "!",
|
|
214
|
-
asciiRail: ":",
|
|
215
|
-
transparent: true,
|
|
216
|
-
});
|
|
217
|
-
expect(config.colors.editorRail).toBe("bright-green");
|
|
218
|
-
expect(config.colors.editorAccent).toBe("error");
|
|
219
|
-
|
|
220
|
-
const invalid = mergeConfig({
|
|
221
|
-
components: {
|
|
222
|
-
editor: {
|
|
223
|
-
styles: { "accent-rail": { rail: "", asciiRail: 1, transparent: "yes" } },
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
});
|
|
227
|
-
expect(invalid.components.editor.styles["accent-rail"]).toEqual({
|
|
228
|
-
rail: "▎",
|
|
229
|
-
asciiRail: "|",
|
|
230
|
-
transparent: false,
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
it("bridges explicit legacy branch colors into the independent Editor branch role", () => {
|
|
235
|
-
expect(mergeConfig({}).colors.editorGitBranch).toBeUndefined();
|
|
236
|
-
|
|
237
|
-
const legacyDefault = mergeConfig({ colors: { gitBranch: "bold purple" } }).colors;
|
|
238
|
-
expect(legacyDefault.gitBranch).toBe("bold purple");
|
|
239
|
-
expect(legacyDefault.editorGitBranch).toBe("bold purple");
|
|
240
|
-
|
|
241
|
-
const legacyCustom = mergeConfig({ colors: { gitBranch: "success" } }).colors;
|
|
242
|
-
expect(legacyCustom.gitBranch).toBe("success");
|
|
243
|
-
expect(legacyCustom.editorGitBranch).toBe("success");
|
|
244
|
-
|
|
245
|
-
const independent = mergeConfig({
|
|
246
|
-
colors: { gitBranch: "success", editorGitBranch: "accent" },
|
|
247
|
-
}).colors;
|
|
248
|
-
expect(independent.gitBranch).toBe("success");
|
|
249
|
-
expect(independent.editorGitBranch).toBe("accent");
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
it("ignores stale fixed-editor config forms without exposing runtime fields", () => {
|
|
253
|
-
const config = mergeConfig({
|
|
254
|
-
fixedEditor: { enabled: true, mouseScroll: false },
|
|
255
|
-
layout: { fixedEditor: { enabled: "yes", copyNotice: false }, futureLayout: true },
|
|
256
|
-
});
|
|
257
|
-
expect(config).not.toHaveProperty("fixedEditor");
|
|
258
|
-
expect(config).not.toHaveProperty("layout");
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
it("migrates every released legacy field leaf-by-leaf", () => {
|
|
262
|
-
const config = mergeConfig({
|
|
263
|
-
features: {
|
|
264
|
-
editor: false,
|
|
265
|
-
statusLine: false,
|
|
266
|
-
viewportIndicators: false,
|
|
267
|
-
copyFriendly: true,
|
|
268
|
-
},
|
|
269
|
-
colorSources: { editor: "terminal", userMessages: "terminal", starship: "terminal" },
|
|
270
|
-
editorBorderColorMode: "adaptive",
|
|
271
|
-
editorModelLabel: "name",
|
|
272
|
-
editorMetadataFormat: "$model",
|
|
273
|
-
contextThresholds: { warning: 55, error: 88 },
|
|
274
|
-
footerFormat: "$cwd",
|
|
275
|
-
responsiveFooter: false,
|
|
276
|
-
compactFooterFormat: "$context",
|
|
277
|
-
compactFooterMaxLines: 3,
|
|
278
|
-
separator: "dot",
|
|
279
|
-
contextStyle: "gauge",
|
|
280
|
-
pathDisplay: { mode: "full", depth: 2 },
|
|
281
|
-
footerSegments: { cwd: false, modelInfo: true },
|
|
282
|
-
gitBranch: { maxLength: 18 },
|
|
283
|
-
gitCommit: { hashLength: 12, onlyDetached: false, showTag: false },
|
|
284
|
-
gitMetrics: { onlyNonzero: false, ignoreSubmodules: true },
|
|
285
|
-
extensionStatuses: {
|
|
286
|
-
defaultPlacement: "middle",
|
|
287
|
-
placements: { alpha: "left" },
|
|
288
|
-
colorModes: { alpha: "original" },
|
|
289
|
-
},
|
|
290
|
-
});
|
|
291
|
-
const { editor, userMessages, selectorBorders, footer } = config.components;
|
|
292
|
-
const starship = footer.styles.starship;
|
|
293
|
-
expect([editor.enabled, userMessages.enabled, selectorBorders.enabled]).toEqual([
|
|
294
|
-
false,
|
|
295
|
-
false,
|
|
296
|
-
false,
|
|
297
|
-
]);
|
|
298
|
-
expect(editor.viewportIndicators).toBe(false);
|
|
299
|
-
expect(editor.style).toBe("opencode-copy-friendly");
|
|
300
|
-
expect(userMessages).toMatchObject({ enabled: false, style: "framed-copy-friendly" });
|
|
301
|
-
expect([editor.colorSource, selectorBorders.colorSource]).toEqual(["terminal", "terminal"]);
|
|
302
|
-
expect(userMessages.colorSource).toBe("terminal");
|
|
303
|
-
expect(footer.colorSource).toBe("terminal");
|
|
304
|
-
expect(editor.borderColorMode).toBe("adaptive");
|
|
305
|
-
expect([editor.modelLabel, footer.modelLabel]).toEqual(["name", "name"]);
|
|
306
|
-
expect(editor.styles.opencode.metadataFormat).toBe("$model");
|
|
307
|
-
expect(editor.styles.minimalist.contextThresholds).toEqual({ warning: 55, error: 88 });
|
|
308
|
-
expect(starship).toMatchObject({
|
|
309
|
-
format: "$cwd",
|
|
310
|
-
responsive: false,
|
|
311
|
-
compactFormat: "$context",
|
|
312
|
-
compactMaxLines: 3,
|
|
313
|
-
separator: "dot",
|
|
314
|
-
contextStyle: "gauge",
|
|
315
|
-
contextThresholds: { warning: 55, error: 88 },
|
|
316
|
-
pathDisplay: { mode: "full", depth: 2 },
|
|
317
|
-
gitBranch: { maxLength: 18 },
|
|
318
|
-
gitCommit: { hashLength: 12, onlyDetached: false, showTag: false },
|
|
319
|
-
gitMetrics: { onlyNonzero: false, ignoreSubmodules: true },
|
|
320
|
-
extensionStatuses: {
|
|
321
|
-
defaultPlacement: "middle",
|
|
322
|
-
placements: { alpha: "left" },
|
|
323
|
-
colorModes: { alpha: "original" },
|
|
324
|
-
},
|
|
325
|
-
});
|
|
326
|
-
expect(starship.segments).toMatchObject({ cwd: false, modelInfo: true });
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
it("gives canonical leaves precedence, including false and invalid-but-present values", () => {
|
|
330
|
-
const config = mergeConfig({
|
|
331
|
-
features: { editor: true, copyFriendly: true, viewportIndicators: false },
|
|
332
|
-
colorSources: { editor: "terminal" },
|
|
333
|
-
editorBorderColorMode: "adaptive",
|
|
334
|
-
editorMetadataFormat: "$legacy",
|
|
335
|
-
components: {
|
|
336
|
-
editor: {
|
|
337
|
-
enabled: false,
|
|
338
|
-
style: "unknown",
|
|
339
|
-
colorSource: "unknown",
|
|
340
|
-
styles: {
|
|
341
|
-
polished: { copyFriendly: "yes" },
|
|
342
|
-
},
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
});
|
|
346
|
-
expect(config.components.editor.enabled).toBe(false);
|
|
347
|
-
expect(config.components.editor.style).toBe("opencode");
|
|
348
|
-
expect(config.components.editor.colorSource).toBe("theme");
|
|
349
|
-
// Missing canonical siblings still migrate independently.
|
|
350
|
-
expect(config.components.editor.viewportIndicators).toBe(false);
|
|
351
|
-
expect(config.components.editor.borderColorMode).toBe("adaptive");
|
|
352
|
-
expect(config.components.editor.styles.opencode.metadataFormat).toBe("$legacy");
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
it("normalizes every canonical minimalist leaf without reviving branch-only inputs", () => {
|
|
356
|
-
for (const pathDisplay of ["compact", "project", "full"]) {
|
|
357
|
-
expect(
|
|
358
|
-
mergeConfig({
|
|
359
|
-
components: { editor: { styles: { minimalist: { pathDisplay } } } },
|
|
360
|
-
}).components.editor.styles.minimalist.pathDisplay,
|
|
361
|
-
).toBe(pathDisplay);
|
|
362
|
-
}
|
|
363
|
-
for (const pathDisplay of ["basename", "", 1, null, true]) {
|
|
364
|
-
expect(
|
|
365
|
-
mergeConfig({
|
|
366
|
-
editorStyles: { minimalist: { pathDisplay: "full" } },
|
|
367
|
-
components: { editor: { styles: { minimalist: { pathDisplay } } } },
|
|
368
|
-
}).components.editor.styles.minimalist.pathDisplay,
|
|
369
|
-
).toBe("compact");
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
for (const contextFormat of ["percent", "percent-total"]) {
|
|
373
|
-
expect(
|
|
374
|
-
mergeConfig({
|
|
375
|
-
components: { editor: { styles: { minimalist: { contextFormat } } } },
|
|
376
|
-
}).components.editor.styles.minimalist.contextFormat,
|
|
377
|
-
).toBe(contextFormat);
|
|
378
|
-
}
|
|
379
|
-
for (const contextFormat of ["tokens", "", 1, null, true]) {
|
|
380
|
-
expect(
|
|
381
|
-
mergeConfig({
|
|
382
|
-
editorStyles: { minimalist: { contextFormat: "percent-total" } },
|
|
383
|
-
components: { editor: { styles: { minimalist: { contextFormat } } } },
|
|
384
|
-
}).components.editor.styles.minimalist.contextFormat,
|
|
385
|
-
).toBe("percent");
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
const valid = mergeConfig({
|
|
389
|
-
components: {
|
|
390
|
-
editor: {
|
|
391
|
-
styles: {
|
|
392
|
-
minimalist: {
|
|
393
|
-
contextGauge: true,
|
|
394
|
-
showSessionName: false,
|
|
395
|
-
showTimer: false,
|
|
396
|
-
showCost: false,
|
|
397
|
-
showGit: false,
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
},
|
|
402
|
-
}).components.editor.styles.minimalist;
|
|
403
|
-
expect(valid).toMatchObject({
|
|
404
|
-
contextGauge: true,
|
|
405
|
-
showSessionName: false,
|
|
406
|
-
showTimer: false,
|
|
407
|
-
showCost: false,
|
|
408
|
-
showGit: false,
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
const invalid = mergeConfig({
|
|
412
|
-
editorStyles: {
|
|
413
|
-
minimalist: {
|
|
414
|
-
contextGauge: true,
|
|
415
|
-
showSessionName: false,
|
|
416
|
-
showTimer: false,
|
|
417
|
-
showCost: false,
|
|
418
|
-
showGit: false,
|
|
419
|
-
},
|
|
420
|
-
},
|
|
421
|
-
components: {
|
|
422
|
-
editor: {
|
|
423
|
-
styles: {
|
|
424
|
-
minimalist: {
|
|
425
|
-
contextGauge: "yes",
|
|
426
|
-
showSessionName: "yes",
|
|
427
|
-
showTimer: null,
|
|
428
|
-
showCost: 0,
|
|
429
|
-
showGit: "no",
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
},
|
|
434
|
-
}).components.editor.styles.minimalist;
|
|
435
|
-
expect(invalid).toEqual(defaultConfig.components.editor.styles.minimalist);
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
it("ignores branch-only editorStyle/editorStyles and safely defaults closed style IDs", () => {
|
|
439
|
-
const config = mergeConfig({
|
|
440
|
-
editorStyle: "minimalist",
|
|
441
|
-
editorStyles: { minimalist: { showGit: false } },
|
|
442
|
-
components: {
|
|
443
|
-
editor: { style: "future" },
|
|
444
|
-
userMessages: { style: "future" },
|
|
445
|
-
selectorBorders: { style: "future" },
|
|
446
|
-
footer: { style: "future" },
|
|
447
|
-
},
|
|
448
|
-
});
|
|
449
|
-
expect(config.components.editor.style).toBe("opencode");
|
|
450
|
-
expect(config.components.editor.styles.minimalist.showGit).toBe(true);
|
|
451
|
-
expect(config.components.userMessages.style).toBe("labeled");
|
|
452
|
-
expect(config.components.selectorBorders.style).toBe("zentui");
|
|
453
|
-
expect(config.components.footer.style).toBe("native");
|
|
454
|
-
});
|
|
455
|
-
|
|
456
|
-
it("does not treat native as a User-message style", () => {
|
|
457
|
-
expect(
|
|
458
|
-
mergeConfig({ components: { userMessages: { style: "native" } } }).components.userMessages
|
|
459
|
-
.style,
|
|
460
|
-
).toBe("labeled");
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
it("normalizes nested canonical leaves without falling through to contradictory legacy leaves", () => {
|
|
464
|
-
const config = mergeConfig({
|
|
465
|
-
contextThresholds: { warning: 20, error: 80 },
|
|
466
|
-
pathDisplay: { mode: "full", depth: 4 },
|
|
467
|
-
components: {
|
|
468
|
-
editor: {
|
|
469
|
-
styles: { minimalist: { contextThresholds: { warning: "bad" } } },
|
|
470
|
-
},
|
|
471
|
-
footer: {
|
|
472
|
-
styles: {
|
|
473
|
-
starship: {
|
|
474
|
-
contextThresholds: { warning: "bad" },
|
|
475
|
-
pathDisplay: { mode: "bad" },
|
|
476
|
-
},
|
|
477
|
-
},
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
});
|
|
481
|
-
expect(config.components.editor.styles.minimalist.contextThresholds).toEqual({
|
|
482
|
-
warning: 70,
|
|
483
|
-
error: 80,
|
|
484
|
-
});
|
|
485
|
-
expect(config.components.footer.styles.starship.contextThresholds).toEqual({
|
|
486
|
-
warning: 70,
|
|
487
|
-
error: 80,
|
|
488
|
-
});
|
|
489
|
-
expect(config.components.footer.styles.starship.pathDisplay).toEqual({
|
|
490
|
-
mode: "basename",
|
|
491
|
-
depth: 4,
|
|
492
|
-
});
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
it("projects the intentionally lossy flat compatibility view from canonical sources", () => {
|
|
496
|
-
const config = mergeConfig({
|
|
497
|
-
components: {
|
|
498
|
-
editor: {
|
|
499
|
-
enabled: false,
|
|
500
|
-
style: "minimalist",
|
|
501
|
-
colorSource: "terminal",
|
|
502
|
-
modelLabel: "name",
|
|
503
|
-
styles: { opencode: { copyFriendly: true, metadataFormat: "$model" } },
|
|
504
|
-
},
|
|
505
|
-
userMessages: {
|
|
506
|
-
enabled: true,
|
|
507
|
-
colorSource: "theme",
|
|
508
|
-
styles: { framed: { copyFriendly: false } },
|
|
509
|
-
},
|
|
510
|
-
selectorBorders: { enabled: true, colorSource: "theme" },
|
|
511
|
-
footer: {
|
|
512
|
-
modelLabel: "id",
|
|
513
|
-
colorSource: "terminal",
|
|
514
|
-
styles: { starship: { contextThresholds: { warning: 40, error: 60 } } },
|
|
515
|
-
},
|
|
516
|
-
},
|
|
517
|
-
});
|
|
518
|
-
const starship = config.components.footer.styles.starship;
|
|
519
|
-
expect(config.footerFormat).toBe(starship.format);
|
|
520
|
-
expect(config.responsiveFooter).toBe(starship.responsive);
|
|
521
|
-
expect(config.compactFooterFormat).toBe(starship.compactFormat);
|
|
522
|
-
expect(config.compactFooterMaxLines).toBe(starship.compactMaxLines);
|
|
523
|
-
expect(config.separator).toBe(starship.separator);
|
|
524
|
-
expect(config.contextStyle).toBe(starship.contextStyle);
|
|
525
|
-
expect(config.contextThresholds).toBe(starship.contextThresholds);
|
|
526
|
-
expect(config.pathDisplay).toBe(starship.pathDisplay);
|
|
527
|
-
expect(config.footerSegments).toBe(starship.segments);
|
|
528
|
-
expect(config.gitBranch).toBe(starship.gitBranch);
|
|
529
|
-
expect(config.gitCommit).toBe(starship.gitCommit);
|
|
530
|
-
expect(config.gitMetrics).toBe(starship.gitMetrics);
|
|
531
|
-
expect(config.extensionStatuses).toBe(starship.extensionStatuses);
|
|
532
|
-
expect(config.features).toEqual({
|
|
533
|
-
editor: false,
|
|
534
|
-
statusLine: false,
|
|
535
|
-
viewportIndicators: false,
|
|
536
|
-
});
|
|
537
|
-
expect(config.colorSources).toEqual({
|
|
538
|
-
starship: "terminal",
|
|
539
|
-
editor: "terminal",
|
|
540
|
-
userMessages: "theme",
|
|
541
|
-
});
|
|
542
|
-
expect(config.editorModelLabel).toBe("name");
|
|
543
|
-
expect(config.contextThresholds).toEqual({ warning: 40, error: 60 });
|
|
544
|
-
});
|
|
545
|
-
|
|
546
|
-
it("does not mutate the parsed record", () => {
|
|
547
|
-
const parsed = {
|
|
548
|
-
features: { editor: false },
|
|
549
|
-
components: { editor: { styles: { opencode: { copyFriendly: true } } } },
|
|
550
|
-
};
|
|
551
|
-
const before = structuredClone(parsed);
|
|
552
|
-
mergeConfig(parsed);
|
|
553
|
-
expect(parsed).toEqual(before);
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
it("retains root parsing behavior for intervals, icons, colors, and telemetry variables", () => {
|
|
557
|
-
const config = mergeConfig({
|
|
558
|
-
projectRefreshIntervalMs: 100,
|
|
559
|
-
icons: { mode: "ascii", cwd: "DIR" },
|
|
560
|
-
colors: { gitBranch: "syntaxKeyword", editorAccent: "accent" },
|
|
561
|
-
});
|
|
562
|
-
expect(config.projectRefreshIntervalMs).toBe(5_000);
|
|
563
|
-
expect(config.icons.cwd).toBe("DIR");
|
|
564
|
-
expect(config.colors.gitBranch).toBe("syntaxKeyword");
|
|
565
|
-
expect(config.colors.editorAccent).toBe("accent");
|
|
566
|
-
expect(FOOTER_FORMAT_VARIABLES).toEqual(
|
|
567
|
-
expect.arrayContaining(["cache_read", "cache_write", "subscription", "auto_compaction"]),
|
|
568
|
-
);
|
|
569
|
-
});
|
|
570
|
-
});
|
|
571
|
-
|
|
572
|
-
describe("working-line config", () => {
|
|
573
|
-
it("defaults to cloned custom presets and migrates legacy modes without losing values", () => {
|
|
574
|
-
const first = mergeConfig({}).components.workingLine.messages;
|
|
575
|
-
const second = mergeConfig({}).components.workingLine.messages;
|
|
576
|
-
expect(first).toEqual({
|
|
577
|
-
custom: true,
|
|
578
|
-
values: defaultConfig.components.workingLine.messages.values,
|
|
579
|
-
});
|
|
580
|
-
expect(first.values).not.toBe(second.values);
|
|
581
|
-
expect(first.values).not.toBe(defaultConfig.components.workingLine.messages.values);
|
|
582
|
-
expect(
|
|
583
|
-
mergeConfig({ components: { workingLine: { messages: { mode: "native", values: [] } } } })
|
|
584
|
-
.components.workingLine.messages,
|
|
585
|
-
).toEqual({ custom: false, values: defaultConfig.components.workingLine.messages.values });
|
|
586
|
-
expect(
|
|
587
|
-
mergeConfig({ components: { workingLine: { messages: { mode: "replace", values: [] } } } })
|
|
588
|
-
.components.workingLine.messages,
|
|
589
|
-
).toEqual({ custom: true, values: defaultConfig.components.workingLine.messages.values });
|
|
590
|
-
expect(
|
|
591
|
-
mergeConfig({
|
|
592
|
-
components: { workingLine: { messages: { mode: "replace", values: [" Custom "] } } },
|
|
593
|
-
}).components.workingLine.messages,
|
|
594
|
-
).toEqual({ custom: true, values: ["Custom"] });
|
|
595
|
-
const appendValues = Array.from({ length: 32 }, (_, index) => `legacy-${index}`);
|
|
596
|
-
const append = mergeConfig({
|
|
597
|
-
components: { workingLine: { messages: { mode: "append", values: appendValues } } },
|
|
598
|
-
}).components.workingLine.messages;
|
|
599
|
-
expect(append.custom).toBe(true);
|
|
600
|
-
expect(append.values).toEqual([
|
|
601
|
-
...defaultConfig.components.workingLine.messages.values,
|
|
602
|
-
...appendValues,
|
|
603
|
-
]);
|
|
604
|
-
expect(append.values).toHaveLength(48);
|
|
605
|
-
});
|
|
606
|
-
|
|
607
|
-
it("gives canonical custom presence precedence and preserves explicit empty values", () => {
|
|
608
|
-
expect(
|
|
609
|
-
mergeConfig({
|
|
610
|
-
components: {
|
|
611
|
-
workingLine: { messages: { custom: false, mode: "append", values: [] } },
|
|
612
|
-
},
|
|
613
|
-
}).components.workingLine.messages,
|
|
614
|
-
).toEqual({ custom: false, values: [] });
|
|
615
|
-
expect(
|
|
616
|
-
mergeConfig({
|
|
617
|
-
components: { workingLine: { messages: { custom: "bad", mode: "native" } } },
|
|
618
|
-
}).components.workingLine.messages,
|
|
619
|
-
).toEqual({ custom: true, values: defaultConfig.components.workingLine.messages.values });
|
|
620
|
-
expect(
|
|
621
|
-
mergeConfig({ components: { workingLine: { messages: { values: [] } } } }).components
|
|
622
|
-
.workingLine.messages,
|
|
623
|
-
).toEqual({ custom: true, values: [] });
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
it.each([
|
|
627
|
-
[30, 30],
|
|
628
|
-
[1000, 1000],
|
|
629
|
-
[29, 100],
|
|
630
|
-
[1001, 100],
|
|
631
|
-
[60.5, 100],
|
|
632
|
-
["60", 100],
|
|
633
|
-
[Number.NaN, 100],
|
|
634
|
-
[Number.MAX_SAFE_INTEGER, 100],
|
|
635
|
-
] as const)(
|
|
636
|
-
"migrates legacy Working-line interval %s to spinner speed %s ms",
|
|
637
|
-
(intervalMs, expected) => {
|
|
638
|
-
expect(
|
|
639
|
-
mergeConfig({ components: { workingLine: { intervalMs } } }).components.workingLine
|
|
640
|
-
.spinnerIntervalMs,
|
|
641
|
-
).toBe(expected);
|
|
642
|
-
expect(
|
|
643
|
-
mergeConfig({ components: { workingLine: { intervalMs } } }).components.workingLine
|
|
644
|
-
.textIntervalMs,
|
|
645
|
-
).toBe(60);
|
|
646
|
-
},
|
|
647
|
-
);
|
|
648
|
-
|
|
649
|
-
it.each([
|
|
650
|
-
[30, 30],
|
|
651
|
-
[1000, 1000],
|
|
652
|
-
[29, 60],
|
|
653
|
-
[1001, 60],
|
|
654
|
-
[60.5, 60],
|
|
655
|
-
["60", 60],
|
|
656
|
-
] as const)("normalizes canonical text speed %s to %s ms", (textIntervalMs, expected) => {
|
|
657
|
-
expect(
|
|
658
|
-
mergeConfig({ components: { workingLine: { textIntervalMs } } }).components.workingLine
|
|
659
|
-
.textIntervalMs,
|
|
660
|
-
).toBe(expected);
|
|
661
|
-
});
|
|
662
|
-
|
|
663
|
-
it("gives canonical spinner speed presence precedence over legacy input", () => {
|
|
664
|
-
expect(
|
|
665
|
-
mergeConfig({
|
|
666
|
-
components: { workingLine: { intervalMs: 180, spinnerIntervalMs: 160 } },
|
|
667
|
-
}).components.workingLine.spinnerIntervalMs,
|
|
668
|
-
).toBe(160);
|
|
669
|
-
expect(
|
|
670
|
-
mergeConfig({
|
|
671
|
-
components: { workingLine: { intervalMs: 180, spinnerIntervalMs: "bad" } },
|
|
672
|
-
}).components.workingLine.spinnerIntervalMs,
|
|
673
|
-
).toBe(100);
|
|
674
|
-
});
|
|
675
|
-
|
|
676
|
-
it("defaults malformed or missing Turn summary to true and preserves explicit false", () => {
|
|
677
|
-
expect(mergeConfig({}).components.workingLine.turnSummary).toBe(true);
|
|
678
|
-
expect(
|
|
679
|
-
mergeConfig({ components: { workingLine: { turnSummary: "bad" } } }).components.workingLine
|
|
680
|
-
.turnSummary,
|
|
681
|
-
).toBe(true);
|
|
682
|
-
expect(
|
|
683
|
-
mergeConfig({ components: { workingLine: { turnSummary: false } } }).components.workingLine
|
|
684
|
-
.turnSummary,
|
|
685
|
-
).toBe(false);
|
|
686
|
-
});
|
|
687
|
-
|
|
688
|
-
it("saves Turn summary while preserving unknown config", () => {
|
|
689
|
-
withConfig(
|
|
690
|
-
{ components: { workingLine: { unknown: { keep: true } } }, topLevel: "keep" },
|
|
691
|
-
(path) => {
|
|
692
|
-
const config = saveWorkingLineComponentPatch({ turnSummary: false }, path);
|
|
693
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
694
|
-
expect(config.components.workingLine.turnSummary).toBe(false);
|
|
695
|
-
expect(raw.components.workingLine.turnSummary).toBe(false);
|
|
696
|
-
expect(raw.components.workingLine.unknown).toEqual({ keep: true });
|
|
697
|
-
expect(raw.topLevel).toBe("keep");
|
|
698
|
-
},
|
|
699
|
-
);
|
|
700
|
-
});
|
|
701
|
-
|
|
702
|
-
it("parses Pulse without changing established Working-line defaults", () => {
|
|
703
|
-
expect(mergeConfig({}).components.workingLine.spinner).toBe("star-bloom");
|
|
704
|
-
expect(
|
|
705
|
-
mergeConfig({
|
|
706
|
-
components: { workingLine: { spinner: "pulse", spinnerIntervalMs: 180 } },
|
|
707
|
-
}).components.workingLine,
|
|
708
|
-
).toMatchObject({ spinner: "pulse", spinnerIntervalMs: 180, textIntervalMs: 60 });
|
|
709
|
-
});
|
|
710
|
-
|
|
711
|
-
it("normalizes each independent field, messages, and palette override", () => {
|
|
712
|
-
const config = mergeConfig({
|
|
713
|
-
components: {
|
|
714
|
-
workingLine: {
|
|
715
|
-
enabled: true,
|
|
716
|
-
spinner: "pinwheel",
|
|
717
|
-
spinnerIntervalMs: 160,
|
|
718
|
-
animateSpinnerColor: true,
|
|
719
|
-
textIntervalMs: 40,
|
|
720
|
-
textAnimation: "kitt",
|
|
721
|
-
colorSource: "terminal",
|
|
722
|
-
messages: {
|
|
723
|
-
mode: "replace",
|
|
724
|
-
values: [" One ", "One", "\x1b[31mTwo\x1b[0m", "\n"],
|
|
725
|
-
},
|
|
726
|
-
segments: { tool: false, elapsed: true, thought: true, tokens: false },
|
|
727
|
-
},
|
|
728
|
-
},
|
|
729
|
-
colors: {
|
|
730
|
-
workingLineLow: "fg:240",
|
|
731
|
-
workingLineMid: "cyan",
|
|
732
|
-
workingLineHigh: "bold cyan",
|
|
733
|
-
editorAccent: "red",
|
|
734
|
-
},
|
|
735
|
-
});
|
|
736
|
-
expect(config.components.workingLine).toEqual({
|
|
737
|
-
enabled: true,
|
|
738
|
-
turnSummary: true,
|
|
739
|
-
spinner: "pinwheel",
|
|
740
|
-
spinnerIntervalMs: 160,
|
|
741
|
-
animateSpinnerColor: true,
|
|
742
|
-
textIntervalMs: 40,
|
|
743
|
-
textAnimation: "kitt",
|
|
744
|
-
colorSource: "terminal",
|
|
745
|
-
messages: { custom: true, values: ["One", "Two"] },
|
|
746
|
-
segments: { tool: false, elapsed: true, thought: true, tokens: false },
|
|
747
|
-
});
|
|
748
|
-
expect(config.colors).toMatchObject({
|
|
749
|
-
workingLineLow: "fg:240",
|
|
750
|
-
workingLineMid: "cyan",
|
|
751
|
-
workingLineHigh: "bold cyan",
|
|
752
|
-
editorAccent: "red",
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
|
-
|
|
756
|
-
it("falls back malformed leaves independently and enforces message caps", () => {
|
|
757
|
-
const values = Array.from({ length: 40 }, (_, index) => `${index}:${"界".repeat(30)}`);
|
|
758
|
-
const component = mergeConfig({
|
|
759
|
-
components: {
|
|
760
|
-
workingLine: {
|
|
761
|
-
enabled: "yes",
|
|
762
|
-
spinner: "future",
|
|
763
|
-
intervalMs: 29,
|
|
764
|
-
animateSpinnerColor: "yes",
|
|
765
|
-
textAnimation: "pulse",
|
|
766
|
-
colorSource: "editor",
|
|
767
|
-
messages: { mode: "rotate", values },
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
|
-
colors: { workingLineLow: "not-a-color" },
|
|
771
|
-
}).components.workingLine;
|
|
772
|
-
expect(component).toMatchObject({
|
|
773
|
-
enabled: true,
|
|
774
|
-
spinner: "star-bloom",
|
|
775
|
-
spinnerIntervalMs: 100,
|
|
776
|
-
animateSpinnerColor: false,
|
|
777
|
-
textIntervalMs: 60,
|
|
778
|
-
textAnimation: "classic",
|
|
779
|
-
colorSource: "theme",
|
|
780
|
-
messages: { custom: true },
|
|
781
|
-
segments: { tool: true, elapsed: true, thought: true, tokens: true },
|
|
782
|
-
});
|
|
783
|
-
expect(component.messages.values).toHaveLength(40);
|
|
784
|
-
expect(component.messages.values.every((value) => value.length > 0)).toBe(true);
|
|
785
|
-
expect(component.messages.values.every((value) => visibleWidth(value) <= 43)).toBe(true);
|
|
786
|
-
});
|
|
787
|
-
|
|
788
|
-
it("saves nested patches, copies arrays, and preserves unknown fields", () => {
|
|
789
|
-
withConfig(
|
|
790
|
-
{
|
|
791
|
-
unknownTop: true,
|
|
792
|
-
components: {
|
|
793
|
-
workingLine: {
|
|
794
|
-
future: { keep: true },
|
|
795
|
-
intervalMs: 180,
|
|
796
|
-
messages: { mode: "append", futureMessages: true, values: ["Old"] },
|
|
797
|
-
},
|
|
798
|
-
},
|
|
799
|
-
},
|
|
800
|
-
(path) => {
|
|
801
|
-
const values = [" New ", "New", "Other"];
|
|
802
|
-
const saved = saveWorkingLineComponentPatch(
|
|
803
|
-
{
|
|
804
|
-
spinner: "braille",
|
|
805
|
-
spinnerIntervalMs: 60,
|
|
806
|
-
animateSpinnerColor: true,
|
|
807
|
-
messages: { custom: true, values },
|
|
808
|
-
segments: { elapsed: false },
|
|
809
|
-
},
|
|
810
|
-
path,
|
|
811
|
-
);
|
|
812
|
-
values[0] = "mutated";
|
|
813
|
-
const raw = readRaw(path);
|
|
814
|
-
expect(saved.components.workingLine).toMatchObject({
|
|
815
|
-
spinner: "braille",
|
|
816
|
-
spinnerIntervalMs: 60,
|
|
817
|
-
animateSpinnerColor: true,
|
|
818
|
-
textIntervalMs: 60,
|
|
819
|
-
messages: { custom: true, values: ["New", "Other"] },
|
|
820
|
-
segments: { tool: true, elapsed: false, thought: true, tokens: true },
|
|
821
|
-
});
|
|
822
|
-
expect(raw.unknownTop).toBe(true);
|
|
823
|
-
expect(raw.components.workingLine.future).toEqual({ keep: true });
|
|
824
|
-
expect(raw.components.workingLine.messages.futureMessages).toBe(true);
|
|
825
|
-
expect(raw.components.workingLine.messages.values).toEqual(["New", "Other"]);
|
|
826
|
-
expect(raw.components.workingLine.messages.custom).toBe(true);
|
|
827
|
-
expect(raw.components.workingLine.messages).not.toHaveProperty("mode");
|
|
828
|
-
expect(raw.components.workingLine).not.toHaveProperty("intervalMs");
|
|
829
|
-
},
|
|
830
|
-
);
|
|
831
|
-
});
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
describe("Phase 4 style migration", () => {
|
|
835
|
-
it.each([
|
|
836
|
-
[true, "opencode-copy-friendly"],
|
|
837
|
-
[false, "opencode"],
|
|
838
|
-
["invalid", "opencode"],
|
|
839
|
-
] as const)("maps a present nested Editor flag %s deterministically", (copyFriendly, style) => {
|
|
840
|
-
const config = mergeConfig({
|
|
841
|
-
features: { copyFriendly: true },
|
|
842
|
-
components: {
|
|
843
|
-
editor: { style: "polished", styles: { polished: { copyFriendly } } },
|
|
844
|
-
},
|
|
845
|
-
});
|
|
846
|
-
expect(config.components.editor.style).toBe(style);
|
|
847
|
-
});
|
|
848
|
-
|
|
849
|
-
it.each([
|
|
850
|
-
[true, "framed-copy-friendly"],
|
|
851
|
-
[false, "framed"],
|
|
852
|
-
["invalid", "framed"],
|
|
853
|
-
] as const)("maps a present nested message flag %s deterministically", (copyFriendly, style) => {
|
|
854
|
-
const config = mergeConfig({
|
|
855
|
-
features: { editor: true, copyFriendly: true },
|
|
856
|
-
components: {
|
|
857
|
-
userMessages: {
|
|
858
|
-
enabled: true,
|
|
859
|
-
style: "framed",
|
|
860
|
-
styles: { framed: { copyFriendly } },
|
|
861
|
-
},
|
|
862
|
-
},
|
|
863
|
-
});
|
|
864
|
-
expect(config.components.userMessages).toMatchObject({ style, enabled: true });
|
|
865
|
-
});
|
|
866
|
-
|
|
867
|
-
it("maps the released feature flag to copy-friendly Editor and messages", () => {
|
|
868
|
-
const migrated = mergeConfig({ features: { copyFriendly: true } });
|
|
869
|
-
expect(migrated.components.editor.style).toBe("opencode-copy-friendly");
|
|
870
|
-
expect(migrated.components.userMessages).toMatchObject({
|
|
871
|
-
style: "framed-copy-friendly",
|
|
872
|
-
enabled: true,
|
|
873
|
-
});
|
|
874
|
-
|
|
875
|
-
const regular = mergeConfig({ features: { copyFriendly: false } });
|
|
876
|
-
expect(regular.components.editor.style).toBe("opencode");
|
|
877
|
-
expect(regular.components.userMessages).toMatchObject({ style: "labeled", enabled: true });
|
|
878
|
-
expect(migrated.features).not.toHaveProperty("copyFriendly");
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
it.each([
|
|
882
|
-
[undefined, true, "opencode-copy-friendly"],
|
|
883
|
-
[undefined, false, "opencode"],
|
|
884
|
-
[undefined, "invalid", "opencode"],
|
|
885
|
-
["future", true, "opencode-copy-friendly"],
|
|
886
|
-
["future", false, "opencode"],
|
|
887
|
-
["future", "invalid", "opencode"],
|
|
888
|
-
] as const)(
|
|
889
|
-
"resolves absent or invalid Editor style %s from nested flag %s",
|
|
890
|
-
(rawStyle, copyFriendly, expected) => {
|
|
891
|
-
const config = mergeConfig({
|
|
892
|
-
features: { copyFriendly: copyFriendly !== true },
|
|
893
|
-
components: {
|
|
894
|
-
editor: {
|
|
895
|
-
...(rawStyle === undefined ? {} : { style: rawStyle }),
|
|
896
|
-
styles: { polished: { copyFriendly } },
|
|
897
|
-
},
|
|
898
|
-
},
|
|
899
|
-
});
|
|
900
|
-
expect(config.components.editor.style).toBe(expected);
|
|
901
|
-
},
|
|
902
|
-
);
|
|
903
|
-
|
|
904
|
-
it.each([
|
|
905
|
-
[undefined, true, "framed-copy-friendly"],
|
|
906
|
-
[undefined, false, "framed"],
|
|
907
|
-
[undefined, "invalid", "framed"],
|
|
908
|
-
["future", true, "framed-copy-friendly"],
|
|
909
|
-
["future", false, "framed"],
|
|
910
|
-
["future", "invalid", "framed"],
|
|
911
|
-
] as const)(
|
|
912
|
-
"resolves absent or invalid message style %s from nested flag %s",
|
|
913
|
-
(rawStyle, copyFriendly, expectedStyle) => {
|
|
914
|
-
const config = mergeConfig({
|
|
915
|
-
features: { editor: true, copyFriendly: copyFriendly !== true },
|
|
916
|
-
components: {
|
|
917
|
-
userMessages: {
|
|
918
|
-
enabled: true,
|
|
919
|
-
...(rawStyle === undefined ? {} : { style: rawStyle }),
|
|
920
|
-
styles: { framed: { copyFriendly } },
|
|
921
|
-
},
|
|
922
|
-
},
|
|
923
|
-
});
|
|
924
|
-
expect(config.components.userMessages).toMatchObject({
|
|
925
|
-
style: expectedStyle,
|
|
926
|
-
enabled: true,
|
|
927
|
-
});
|
|
928
|
-
},
|
|
929
|
-
);
|
|
930
|
-
|
|
931
|
-
it("treats ambiguous explicit styles without nested flags as authoritative", () => {
|
|
932
|
-
const config = mergeConfig({
|
|
933
|
-
features: { editor: true, copyFriendly: true },
|
|
934
|
-
components: {
|
|
935
|
-
editor: { style: "opencode" },
|
|
936
|
-
userMessages: { enabled: true, style: "framed" },
|
|
937
|
-
},
|
|
938
|
-
});
|
|
939
|
-
expect(config.components.editor.style).toBe("opencode");
|
|
940
|
-
expect(config.components.userMessages).toMatchObject({ style: "framed", enabled: true });
|
|
941
|
-
});
|
|
942
|
-
|
|
943
|
-
it("uses released flags for absent or invalid styles without nested flags", () => {
|
|
944
|
-
for (const style of [undefined, "future"] as const) {
|
|
945
|
-
const config = mergeConfig({
|
|
946
|
-
features: { editor: true, copyFriendly: true },
|
|
947
|
-
components: {
|
|
948
|
-
editor: style === undefined ? {} : { style },
|
|
949
|
-
userMessages: style === undefined ? { enabled: true } : { enabled: true, style },
|
|
950
|
-
},
|
|
951
|
-
});
|
|
952
|
-
expect(config.components.editor.style).toBe("opencode-copy-friendly");
|
|
953
|
-
expect(config.components.userMessages).toMatchObject({
|
|
954
|
-
style: "framed-copy-friendly",
|
|
955
|
-
enabled: true,
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
|
|
960
|
-
it.each([
|
|
961
|
-
["minimalist", "compact"],
|
|
962
|
-
["opencode-copy-friendly", "labeled"],
|
|
963
|
-
["opencode", "framed-copy-friendly"],
|
|
964
|
-
] as const)("preserves unambiguous explicit styles %s and %s", (editorStyle, messageStyle) => {
|
|
965
|
-
const config = mergeConfig({
|
|
966
|
-
features: { copyFriendly: true },
|
|
967
|
-
components: {
|
|
968
|
-
editor: {
|
|
969
|
-
style: editorStyle,
|
|
970
|
-
styles: { opencode: { copyFriendly: true } },
|
|
971
|
-
},
|
|
972
|
-
userMessages: {
|
|
973
|
-
enabled: true,
|
|
974
|
-
style: messageStyle,
|
|
975
|
-
styles: { framed: { copyFriendly: true } },
|
|
976
|
-
},
|
|
977
|
-
},
|
|
978
|
-
});
|
|
979
|
-
expect(config.components.editor.style).toBe(editorStyle);
|
|
980
|
-
expect(config.components.userMessages).toMatchObject({ style: messageStyle, enabled: true });
|
|
981
|
-
});
|
|
982
|
-
|
|
983
|
-
it("seeds and parses polished metadata independently", () => {
|
|
984
|
-
const seeded = mergeConfig({ editorMetadataFormat: "$legacy" });
|
|
985
|
-
expect(seeded.components.editor.styles.opencode.metadataFormat).toBe("$legacy");
|
|
986
|
-
expect(seeded.components.editor.styles["opencode-copy-friendly"].metadataFormat).toBe(
|
|
987
|
-
"$legacy",
|
|
988
|
-
);
|
|
989
|
-
const independent = mergeConfig({
|
|
990
|
-
editorMetadataFormat: "$flat",
|
|
991
|
-
components: {
|
|
992
|
-
editor: {
|
|
993
|
-
styles: {
|
|
994
|
-
polished: { metadataFormat: "$regular" },
|
|
995
|
-
"opencode-copy-friendly": { metadataFormat: "$low" },
|
|
996
|
-
},
|
|
997
|
-
},
|
|
998
|
-
},
|
|
999
|
-
});
|
|
1000
|
-
expect(independent.components.editor.styles.opencode.metadataFormat).toBe("$regular");
|
|
1001
|
-
expect(independent.components.editor.styles["opencode-copy-friendly"].metadataFormat).toBe(
|
|
1002
|
-
"$low",
|
|
1003
|
-
);
|
|
1004
|
-
});
|
|
1005
|
-
|
|
1006
|
-
it("deletes only obsolete owning leaves on explicit style saves", () => {
|
|
1007
|
-
withConfig(
|
|
1008
|
-
{
|
|
1009
|
-
features: { copyFriendly: true },
|
|
1010
|
-
components: {
|
|
1011
|
-
editor: {
|
|
1012
|
-
styles: {
|
|
1013
|
-
polished: { copyFriendly: true, sibling: "keep" },
|
|
1014
|
-
future: { keep: true },
|
|
1015
|
-
},
|
|
1016
|
-
},
|
|
1017
|
-
userMessages: {
|
|
1018
|
-
styles: { framed: { copyFriendly: true, sibling: "keep" }, future: { keep: true } },
|
|
1019
|
-
},
|
|
1020
|
-
},
|
|
1021
|
-
},
|
|
1022
|
-
(path) => {
|
|
1023
|
-
saveEditorComponentPatch({ style: "opencode" }, path);
|
|
1024
|
-
const afterEditor = readRaw(path);
|
|
1025
|
-
expect(afterEditor.components.editor.styles.polished).toMatchObject({ sibling: "keep" });
|
|
1026
|
-
expect(afterEditor.components.editor.styles.polished).not.toHaveProperty("copyFriendly");
|
|
1027
|
-
expect(afterEditor.components.editor.styles.opencode).toHaveProperty("metadataFormat");
|
|
1028
|
-
expect(afterEditor.components.userMessages.styles.framed).toMatchObject({
|
|
1029
|
-
copyFriendly: true,
|
|
1030
|
-
sibling: "keep",
|
|
1031
|
-
});
|
|
1032
|
-
|
|
1033
|
-
saveUserMessagesComponentPatch({ style: "framed" }, path);
|
|
1034
|
-
const raw = readRaw(path);
|
|
1035
|
-
expect(raw.components.editor.styles.polished).toMatchObject({ sibling: "keep" });
|
|
1036
|
-
expect(raw.components.editor.styles.polished).not.toHaveProperty("copyFriendly");
|
|
1037
|
-
expect(raw.components.userMessages.styles.framed).toMatchObject({ sibling: "keep" });
|
|
1038
|
-
expect(raw.components.userMessages.styles.framed).not.toHaveProperty("copyFriendly");
|
|
1039
|
-
expect(raw.components.editor.styles.future).toEqual({ keep: true });
|
|
1040
|
-
expect(raw.components.userMessages.styles.future).toEqual({ keep: true });
|
|
1041
|
-
expect(raw.features.copyFriendly).toBe(true);
|
|
1042
|
-
const reloaded = mergeConfig(raw);
|
|
1043
|
-
expect(reloaded.components.editor.style).toBe("opencode");
|
|
1044
|
-
expect(reloaded.components.userMessages).toMatchObject({ style: "framed", enabled: true });
|
|
1045
|
-
},
|
|
1046
|
-
);
|
|
1047
|
-
});
|
|
1048
|
-
|
|
1049
|
-
it.each(["framed", "framed-copy-friendly"] as const)(
|
|
1050
|
-
"cleans only the obsolete nested flag when explicitly saving %s",
|
|
1051
|
-
(style) => {
|
|
1052
|
-
withConfig(
|
|
1053
|
-
{
|
|
1054
|
-
features: { copyFriendly: true },
|
|
1055
|
-
components: {
|
|
1056
|
-
userMessages: {
|
|
1057
|
-
styles: {
|
|
1058
|
-
framed: { copyFriendly: true, sibling: "keep" },
|
|
1059
|
-
future: { keep: true },
|
|
1060
|
-
},
|
|
1061
|
-
futureComponent: "keep",
|
|
1062
|
-
},
|
|
1063
|
-
},
|
|
1064
|
-
},
|
|
1065
|
-
(path) => {
|
|
1066
|
-
saveUserMessagesComponentPatch({ style }, path);
|
|
1067
|
-
const raw = readRaw(path);
|
|
1068
|
-
expect(raw.components.userMessages.style).toBe(style);
|
|
1069
|
-
expect(raw.components.userMessages.styles.framed).toEqual({ sibling: "keep" });
|
|
1070
|
-
expect(raw.components.userMessages.styles.future).toEqual({ keep: true });
|
|
1071
|
-
expect(raw.components.userMessages.futureComponent).toBe("keep");
|
|
1072
|
-
expect(raw.features.copyFriendly).toBe(true);
|
|
1073
|
-
expect(mergeConfig(raw).components.userMessages.style).toBe(style);
|
|
1074
|
-
},
|
|
1075
|
-
);
|
|
1076
|
-
},
|
|
1077
|
-
);
|
|
1078
|
-
|
|
1079
|
-
it.each([
|
|
1080
|
-
[
|
|
1081
|
-
"Editor",
|
|
1082
|
-
"editor",
|
|
1083
|
-
(path: string) => saveEditorComponentPatch({ enabled: false }, path),
|
|
1084
|
-
(path: string) => saveEditorComponentPatch({ style: "opencode" }, path),
|
|
1085
|
-
"opencode",
|
|
1086
|
-
],
|
|
1087
|
-
[
|
|
1088
|
-
"User messages",
|
|
1089
|
-
"userMessages",
|
|
1090
|
-
(path: string) => saveUserMessagesComponentPatch({ enabled: false }, path),
|
|
1091
|
-
(path: string) => saveUserMessagesComponentPatch({ style: "framed" }, path),
|
|
1092
|
-
"framed",
|
|
1093
|
-
],
|
|
1094
|
-
[
|
|
1095
|
-
"Selector borders",
|
|
1096
|
-
"selectorBorders",
|
|
1097
|
-
(path: string) => saveSelectorBordersComponentPatch({ enabled: false }, path),
|
|
1098
|
-
(path: string) => saveSelectorBordersComponentPatch({ style: "zentui" }, path),
|
|
1099
|
-
"zentui",
|
|
1100
|
-
],
|
|
1101
|
-
[
|
|
1102
|
-
"Footer",
|
|
1103
|
-
"footer",
|
|
1104
|
-
(path: string) => saveFooterComponentPatch({ colorSource: "terminal" }, path),
|
|
1105
|
-
(path: string) => saveFooterComponentPatch({ style: "starship" }, path),
|
|
1106
|
-
"starship",
|
|
1107
|
-
],
|
|
1108
|
-
] as const)(
|
|
1109
|
-
"preserves an unknown raw %s style until its owning style is explicitly selected",
|
|
1110
|
-
(_label, owner, saveUnrelated, saveStyle, expectedStyle) => {
|
|
1111
|
-
withConfig(
|
|
1112
|
-
{
|
|
1113
|
-
components: {
|
|
1114
|
-
[owner]: {
|
|
1115
|
-
style: `future-${owner}`,
|
|
1116
|
-
futureOption: "keep",
|
|
1117
|
-
styles: { future: { keep: true } },
|
|
1118
|
-
},
|
|
1119
|
-
},
|
|
1120
|
-
},
|
|
1121
|
-
(path) => {
|
|
1122
|
-
const unrelatedConfig = saveUnrelated(path);
|
|
1123
|
-
expect(hasUnsupportedComponentStyle(unrelatedConfig, owner)).toBe(true);
|
|
1124
|
-
const preserved = readRaw(path);
|
|
1125
|
-
expect(preserved.components[owner].style).toBe(`future-${owner}`);
|
|
1126
|
-
expect(preserved.components[owner].futureOption).toBe("keep");
|
|
1127
|
-
expect(preserved.components[owner].styles.future).toEqual({ keep: true });
|
|
1128
|
-
|
|
1129
|
-
const replacedConfig = saveStyle(path);
|
|
1130
|
-
expect(hasUnsupportedComponentStyle(replacedConfig, owner)).toBe(false);
|
|
1131
|
-
const replaced = readRaw(path);
|
|
1132
|
-
expect(replaced.components[owner].style).toBe(expectedStyle);
|
|
1133
|
-
expect(replaced.components[owner].futureOption).toBe("keep");
|
|
1134
|
-
expect(replaced.components[owner].styles.future).toEqual({ keep: true });
|
|
1135
|
-
},
|
|
1136
|
-
);
|
|
1137
|
-
},
|
|
1138
|
-
);
|
|
1139
|
-
});
|
|
1140
|
-
|
|
1141
|
-
describe("canonical snapshot persistence", () => {
|
|
1142
|
-
it("materializes every component from legacy inputs and preserves unknown data", () => {
|
|
1143
|
-
withConfig(
|
|
1144
|
-
{
|
|
1145
|
-
unknownTop: { keep: true },
|
|
1146
|
-
features: { editor: false, copyFriendly: true },
|
|
1147
|
-
colorSources: { editor: "terminal" },
|
|
1148
|
-
components: {
|
|
1149
|
-
futureDomain: { keep: true },
|
|
1150
|
-
editor: {
|
|
1151
|
-
futureComponent: true,
|
|
1152
|
-
styles: {
|
|
1153
|
-
futureStyle: { keep: true },
|
|
1154
|
-
polished: { futurePolished: true },
|
|
1155
|
-
},
|
|
1156
|
-
},
|
|
1157
|
-
footer: {
|
|
1158
|
-
styles: {
|
|
1159
|
-
starship: {
|
|
1160
|
-
futureStarship: true,
|
|
1161
|
-
pathDisplay: { futurePath: true },
|
|
1162
|
-
extensionStatuses: { futureStatuses: true },
|
|
1163
|
-
},
|
|
1164
|
-
},
|
|
1165
|
-
},
|
|
1166
|
-
},
|
|
1167
|
-
},
|
|
1168
|
-
(path) => {
|
|
1169
|
-
const config = saveEditorComponentPatch({ enabled: true }, path);
|
|
1170
|
-
const raw = readRaw(path);
|
|
1171
|
-
expect(Object.keys(raw.components)).toEqual(
|
|
1172
|
-
expect.arrayContaining([
|
|
1173
|
-
"editor",
|
|
1174
|
-
"userMessages",
|
|
1175
|
-
"workingLine",
|
|
1176
|
-
"selectorBorders",
|
|
1177
|
-
"footer",
|
|
1178
|
-
"futureDomain",
|
|
1179
|
-
]),
|
|
1180
|
-
);
|
|
1181
|
-
expect(raw.components.editor.enabled).toBe(true);
|
|
1182
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
1183
|
-
expect(raw.components.selectorBorders.enabled).toBe(false);
|
|
1184
|
-
expect(raw.components.editor.style).toBe("opencode-copy-friendly");
|
|
1185
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
1186
|
-
expect(raw.components.editor.colorSource).toBe("terminal");
|
|
1187
|
-
expect(raw.components.selectorBorders.colorSource).toBe("terminal");
|
|
1188
|
-
expect(raw.features).toEqual({ editor: false, copyFriendly: true });
|
|
1189
|
-
expect(raw.unknownTop).toEqual({ keep: true });
|
|
1190
|
-
expect(raw.components.futureDomain).toEqual({ keep: true });
|
|
1191
|
-
expect(raw.components.editor.futureComponent).toBe(true);
|
|
1192
|
-
expect(raw.components.editor.styles.futureStyle).toEqual({ keep: true });
|
|
1193
|
-
expect(raw.components.editor.styles.polished.futurePolished).toBe(true);
|
|
1194
|
-
expect(raw.components.footer.styles.starship.futureStarship).toBe(true);
|
|
1195
|
-
expect(raw.components.footer.styles.starship.pathDisplay.futurePath).toBe(true);
|
|
1196
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.futureStatuses).toBe(true);
|
|
1197
|
-
expect(config).toEqual(mergeConfig(raw));
|
|
1198
|
-
},
|
|
1199
|
-
);
|
|
1200
|
-
});
|
|
1201
|
-
|
|
1202
|
-
it("prevents legacy edits from recoupling surfaces after the first save", () => {
|
|
1203
|
-
withConfig({ features: { editor: false, copyFriendly: true } }, (path) => {
|
|
1204
|
-
saveEditorComponentPatch({ enabled: true }, path);
|
|
1205
|
-
const raw = readRaw(path);
|
|
1206
|
-
expect(raw.components.editor.enabled).toBe(true);
|
|
1207
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
1208
|
-
expect(raw.components.selectorBorders.enabled).toBe(false);
|
|
1209
|
-
expect(raw.components.editor.style).toBe("opencode-copy-friendly");
|
|
1210
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
1211
|
-
raw.features.editor = true;
|
|
1212
|
-
raw.features.copyFriendly = false;
|
|
1213
|
-
writeFileSync(path, `${JSON.stringify(raw, null, 2)}\n`);
|
|
1214
|
-
const reloaded = mergeConfig(readRaw(path));
|
|
1215
|
-
expect(reloaded.components.editor.enabled).toBe(true);
|
|
1216
|
-
expect(reloaded.components.userMessages.enabled).toBe(false);
|
|
1217
|
-
expect(reloaded.components.selectorBorders.enabled).toBe(false);
|
|
1218
|
-
expect(reloaded.components.editor.style).toBe("opencode-copy-friendly");
|
|
1219
|
-
expect(reloaded.components.userMessages.enabled).toBe(false);
|
|
1220
|
-
});
|
|
1221
|
-
});
|
|
1222
|
-
|
|
1223
|
-
it("supports every typed component saver without discarding inactive styles", () => {
|
|
1224
|
-
withConfig(undefined, (path) => {
|
|
1225
|
-
savePolishedEditorStylePatch({ metadataFormat: "$provider", completionMenu: "native" }, path);
|
|
1226
|
-
savePolishedCopyFriendlyEditorStylePatch(
|
|
1227
|
-
{ metadataFormat: "$model", completionMenu: "palette" },
|
|
1228
|
-
path,
|
|
1229
|
-
);
|
|
1230
|
-
saveAccentRailEditorStylePatch({ transparent: true }, path);
|
|
1231
|
-
saveMinimalistEditorStylePatch({ showGit: false, contextGauge: true }, path);
|
|
1232
|
-
saveUserMessagesComponentPatch({ enabled: false, colorSource: "terminal" }, path);
|
|
1233
|
-
saveSelectorBordersComponentPatch({ enabled: false, colorSource: "terminal" }, path);
|
|
1234
|
-
saveFooterComponentPatch({ style: "native", modelLabel: "name" }, path);
|
|
1235
|
-
saveStarshipFooterStylePatch(
|
|
1236
|
-
{ separator: "chevron", pathDisplay: { mode: "full", depth: 2 } },
|
|
1237
|
-
path,
|
|
1238
|
-
);
|
|
1239
|
-
const config = mergeConfig(readRaw(path));
|
|
1240
|
-
expect(config.components.editor.styles.opencode).toEqual({
|
|
1241
|
-
metadataFormat: "$provider",
|
|
1242
|
-
completionMenu: "native",
|
|
1243
|
-
});
|
|
1244
|
-
expect(config.components.editor.styles["opencode-copy-friendly"]).toEqual({
|
|
1245
|
-
metadataFormat: "$model",
|
|
1246
|
-
completionMenu: "palette",
|
|
1247
|
-
});
|
|
1248
|
-
expect(config.components.editor.styles["accent-rail"]).toMatchObject({
|
|
1249
|
-
transparent: true,
|
|
1250
|
-
});
|
|
1251
|
-
expect(config.components.editor.styles.minimalist).toMatchObject({
|
|
1252
|
-
showGit: false,
|
|
1253
|
-
contextGauge: true,
|
|
1254
|
-
});
|
|
1255
|
-
expect(config.components.userMessages).toMatchObject({
|
|
1256
|
-
enabled: false,
|
|
1257
|
-
colorSource: "terminal",
|
|
1258
|
-
});
|
|
1259
|
-
expect(config.components.selectorBorders).toMatchObject({
|
|
1260
|
-
enabled: false,
|
|
1261
|
-
colorSource: "terminal",
|
|
1262
|
-
});
|
|
1263
|
-
expect(config.components.footer).toMatchObject({ style: "native", modelLabel: "name" });
|
|
1264
|
-
expect(config.components.footer.styles.starship).toMatchObject({
|
|
1265
|
-
separator: "chevron",
|
|
1266
|
-
pathDisplay: { mode: "full", depth: 2 },
|
|
1267
|
-
});
|
|
1268
|
-
});
|
|
1269
|
-
});
|
|
1270
|
-
|
|
1271
|
-
it("preserves stale fixed-editor keys during an unrelated explicit save", () => {
|
|
1272
|
-
const stale = {
|
|
1273
|
-
fixedEditor: { enabled: true, legacyUnknown: true },
|
|
1274
|
-
layout: { fixedEditor: { mouseScroll: false }, futureLayout: true },
|
|
1275
|
-
};
|
|
1276
|
-
withConfig(stale, (path) => {
|
|
1277
|
-
saveFooterComponentPatch({ style: "hidden" }, path);
|
|
1278
|
-
const raw = readRaw(path);
|
|
1279
|
-
expect(raw.fixedEditor).toEqual(stale.fixedEditor);
|
|
1280
|
-
expect(raw.layout).toEqual(stale.layout);
|
|
1281
|
-
expect(raw.components.footer.style).toBe("hidden");
|
|
1282
|
-
});
|
|
1283
|
-
});
|
|
1284
|
-
});
|
|
1285
|
-
|
|
1286
|
-
describe("compatibility saver recipes", () => {
|
|
1287
|
-
it("writes canonical paths only and updates all historically coupled destinations", () => {
|
|
1288
|
-
withConfig(
|
|
1289
|
-
{
|
|
1290
|
-
features: { editor: true, statusLine: true, copyFriendly: false },
|
|
1291
|
-
colorSources: { editor: "theme", starship: "theme", userMessages: "theme" },
|
|
1292
|
-
editorModelLabel: "id",
|
|
1293
|
-
footerFormat: "$legacy",
|
|
1294
|
-
unknown: true,
|
|
1295
|
-
},
|
|
1296
|
-
(path) => {
|
|
1297
|
-
const legacyBefore = structuredClone(readRaw(path));
|
|
1298
|
-
saveColorSourcesPatch(
|
|
1299
|
-
{ editor: "terminal", starship: "terminal", userMessages: "terminal" },
|
|
1300
|
-
path,
|
|
1301
|
-
);
|
|
1302
|
-
saveUiFeaturesPatch({ editor: false, statusLine: false, viewportIndicators: false }, path);
|
|
1303
|
-
saveEditorModelLabel("name", path);
|
|
1304
|
-
saveEditorStyle("minimalist", path);
|
|
1305
|
-
saveMinimalistPatch({ showTimer: false, showGit: false }, path);
|
|
1306
|
-
saveEditorBorderColorMode("adaptive", path);
|
|
1307
|
-
saveFooterFormatPatch("$cwd", path);
|
|
1308
|
-
saveResponsiveFooterPatch(
|
|
1309
|
-
{ responsiveFooter: false, compactFooterFormat: "$context", compactFooterMaxLines: 3 },
|
|
1310
|
-
path,
|
|
1311
|
-
);
|
|
1312
|
-
saveSeparatorPatch("dot", path);
|
|
1313
|
-
saveContextStylePatch("text+gauge", path);
|
|
1314
|
-
saveContextThresholdsPatch({ warning: 45, error: 75 }, path);
|
|
1315
|
-
savePathDisplayPatch({ mode: "full", depth: 3 }, path);
|
|
1316
|
-
saveFooterSegmentsPatch({ modelInfo: true, tokens: false }, path);
|
|
1317
|
-
saveGitBranchPatch({ maxLength: 24 }, path);
|
|
1318
|
-
saveGitCommitPatch({ onlyDetached: false, showTag: false }, path);
|
|
1319
|
-
saveGitMetricsPatch({ onlyNonzero: false, ignoreSubmodules: true }, path);
|
|
1320
|
-
saveExtensionStatusDefaultPlacement("middle", path);
|
|
1321
|
-
saveExtensionStatusPlacement("alpha", "left", path);
|
|
1322
|
-
saveExtensionStatusColorMode("alpha", "original", path);
|
|
1323
|
-
const raw = readRaw(path);
|
|
1324
|
-
const config = mergeConfig(raw);
|
|
1325
|
-
expect(raw.features).toEqual(legacyBefore.features);
|
|
1326
|
-
expect(raw.colorSources).toEqual(legacyBefore.colorSources);
|
|
1327
|
-
expect(raw.editorModelLabel).toBe("id");
|
|
1328
|
-
expect(raw.footerFormat).toBe("$legacy");
|
|
1329
|
-
expect(raw.unknown).toBe(true);
|
|
1330
|
-
expect(raw).not.toHaveProperty("editorStyle");
|
|
1331
|
-
expect(raw).not.toHaveProperty("editorStyles");
|
|
1332
|
-
expect(config.components.editor).toMatchObject({
|
|
1333
|
-
enabled: false,
|
|
1334
|
-
style: "minimalist",
|
|
1335
|
-
colorSource: "terminal",
|
|
1336
|
-
borderColorMode: "adaptive",
|
|
1337
|
-
modelLabel: "name",
|
|
1338
|
-
viewportIndicators: false,
|
|
1339
|
-
});
|
|
1340
|
-
expect(config.components.userMessages).toMatchObject({
|
|
1341
|
-
enabled: false,
|
|
1342
|
-
colorSource: "terminal",
|
|
1343
|
-
});
|
|
1344
|
-
expect(config.components.selectorBorders).toMatchObject({
|
|
1345
|
-
enabled: false,
|
|
1346
|
-
colorSource: "terminal",
|
|
1347
|
-
});
|
|
1348
|
-
expect(config.components.editor.styles.minimalist).toMatchObject({
|
|
1349
|
-
showTimer: false,
|
|
1350
|
-
showGit: false,
|
|
1351
|
-
contextThresholds: { warning: 45, error: 75 },
|
|
1352
|
-
});
|
|
1353
|
-
expect(config.components.footer).toMatchObject({
|
|
1354
|
-
style: "native",
|
|
1355
|
-
colorSource: "terminal",
|
|
1356
|
-
modelLabel: "name",
|
|
1357
|
-
});
|
|
1358
|
-
expect(config.components.footer.styles.starship).toMatchObject({
|
|
1359
|
-
format: "$cwd",
|
|
1360
|
-
responsive: false,
|
|
1361
|
-
compactFormat: "$context",
|
|
1362
|
-
compactMaxLines: 3,
|
|
1363
|
-
separator: "dot",
|
|
1364
|
-
contextStyle: "text+gauge",
|
|
1365
|
-
contextThresholds: { warning: 45, error: 75 },
|
|
1366
|
-
pathDisplay: { mode: "full", depth: 3 },
|
|
1367
|
-
segments: { modelInfo: true, tokens: false },
|
|
1368
|
-
gitBranch: { maxLength: 24 },
|
|
1369
|
-
gitCommit: { onlyDetached: false, showTag: false },
|
|
1370
|
-
gitMetrics: { onlyNonzero: false, ignoreSubmodules: true },
|
|
1371
|
-
extensionStatuses: {
|
|
1372
|
-
defaultPlacement: "middle",
|
|
1373
|
-
placements: { alpha: "left" },
|
|
1374
|
-
colorModes: { alpha: "original" },
|
|
1375
|
-
},
|
|
1376
|
-
});
|
|
1377
|
-
},
|
|
1378
|
-
);
|
|
1379
|
-
});
|
|
1380
|
-
|
|
1381
|
-
it("materializes a complete snapshot when a compatibility saver creates the file", () => {
|
|
1382
|
-
withConfig(undefined, (path) => {
|
|
1383
|
-
saveUiFeaturesPatch({ editor: false }, path);
|
|
1384
|
-
const raw = readRaw(path);
|
|
1385
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
1386
|
-
expect(Object.keys(raw.components).sort()).toEqual([
|
|
1387
|
-
"editor",
|
|
1388
|
-
"footer",
|
|
1389
|
-
"selectorBorders",
|
|
1390
|
-
"userMessages",
|
|
1391
|
-
"workingLine",
|
|
1392
|
-
]);
|
|
1393
|
-
expect(raw.components.editor.enabled).toBe(false);
|
|
1394
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
1395
|
-
expect(raw.components.selectorBorders.enabled).toBe(false);
|
|
1396
|
-
expect(raw).not.toHaveProperty("features");
|
|
1397
|
-
});
|
|
1398
|
-
});
|
|
1399
|
-
});
|
|
1400
|
-
|
|
1401
|
-
describe("mergeConfig", () => {
|
|
1402
|
-
it("defaults project refresh polling to 30 seconds and Starship styles", () => {
|
|
1403
|
-
const config = mergeConfig({});
|
|
1404
|
-
expect(config.projectRefreshIntervalMs).toBe(30_000);
|
|
1405
|
-
expect(config.icons.cacheHit).toBe("c");
|
|
1406
|
-
expect(config.icons.editorPrompt).toBe("");
|
|
1407
|
-
expect(config.colors.gitBranch).toBe("bold purple");
|
|
1408
|
-
expect(config.colors.packageVersion).toBe("208");
|
|
1409
|
-
expect(config.colors.gitCommit).toBe("bold green");
|
|
1410
|
-
expect(config.colors.gitMetricsAdded).toBe("bold green");
|
|
1411
|
-
expect(config.colors.gitMetricsDeleted).toBe("bold red");
|
|
1412
|
-
expect(config.colors.sessionName).toBe("bold green");
|
|
1413
|
-
expect(config.colors.contextNormal).toBe("bright-black");
|
|
1414
|
-
expect(config.colors.tokens).toBe("bright-black");
|
|
1415
|
-
expect(config.colors.extensionStatus).toBe("bright-black");
|
|
1416
|
-
expect(config.colors.editorAccent).toBeUndefined();
|
|
1417
|
-
expect(config.colors.editorRail).toBeUndefined();
|
|
1418
|
-
expect(config.colors.editorPrompt).toBeUndefined();
|
|
1419
|
-
expect(config.colors.editorBorder).toBeUndefined();
|
|
1420
|
-
expect(config.colorSources).toEqual({
|
|
1421
|
-
starship: "theme",
|
|
1422
|
-
editor: "theme",
|
|
1423
|
-
userMessages: "theme",
|
|
1424
|
-
});
|
|
1425
|
-
expect(config.features).toEqual({
|
|
1426
|
-
editor: false,
|
|
1427
|
-
statusLine: false,
|
|
1428
|
-
viewportIndicators: false,
|
|
1429
|
-
});
|
|
1430
|
-
expect(config.footerSegments).toEqual({
|
|
1431
|
-
cwd: true,
|
|
1432
|
-
sessionName: true,
|
|
1433
|
-
gitBranch: true,
|
|
1434
|
-
gitStatus: true,
|
|
1435
|
-
runtime: true,
|
|
1436
|
-
modelInfo: false,
|
|
1437
|
-
context: true,
|
|
1438
|
-
gitCounts: false,
|
|
1439
|
-
sessionDuration: false,
|
|
1440
|
-
username: false,
|
|
1441
|
-
time: false,
|
|
1442
|
-
os: false,
|
|
1443
|
-
packageVersion: false,
|
|
1444
|
-
gitCommit: false,
|
|
1445
|
-
gitMetrics: true,
|
|
1446
|
-
tokens: true,
|
|
1447
|
-
cost: true,
|
|
1448
|
-
});
|
|
1449
|
-
expect(config.extensionStatuses).toEqual({
|
|
1450
|
-
defaultPlacement: "right",
|
|
1451
|
-
placements: {},
|
|
1452
|
-
colorModes: {},
|
|
1453
|
-
});
|
|
1454
|
-
});
|
|
1455
|
-
|
|
1456
|
-
it("registers the canonical telemetry variables without aliases", () => {
|
|
1457
|
-
expect(FOOTER_FORMAT_VARIABLES).toEqual(
|
|
1458
|
-
expect.arrayContaining(["cache_read", "cache_write", "subscription", "auto_compaction"]),
|
|
1459
|
-
);
|
|
1460
|
-
expect(FOOTER_FORMAT_VARIABLES).not.toContain("experimental");
|
|
1461
|
-
});
|
|
1462
|
-
|
|
1463
|
-
it("defaults footerFormat to empty string", () => {
|
|
1464
|
-
expect(mergeConfig({}).footerFormat).toBe("");
|
|
1465
|
-
expect(defaultConfig.footerFormat).toBe("");
|
|
1466
|
-
});
|
|
1467
|
-
|
|
1468
|
-
it("accepts a custom footerFormat string", () => {
|
|
1469
|
-
expect(mergeConfig({ footerFormat: "$cwd on $git_branch $fill $cost" }).footerFormat).toBe(
|
|
1470
|
-
"$cwd on $git_branch $fill $cost",
|
|
1471
|
-
);
|
|
1472
|
-
});
|
|
1473
|
-
|
|
1474
|
-
it("defaults and normalizes responsive footer settings", () => {
|
|
1475
|
-
expect(DEFAULT_COMPACT_FOOTER_FORMAT).toBe(
|
|
1476
|
-
"$cwd$wrap(in $session_name)$wrap(on $git_branch) $git_status$wrap$context$wrap_sep$tokens",
|
|
1477
|
-
);
|
|
1478
|
-
expect(mergeConfig({})).toMatchObject({
|
|
1479
|
-
responsiveFooter: true,
|
|
1480
|
-
compactFooterFormat: DEFAULT_COMPACT_FOOTER_FORMAT,
|
|
1481
|
-
compactFooterMaxLines: "unlimited",
|
|
1482
|
-
});
|
|
1483
|
-
expect(
|
|
1484
|
-
mergeConfig({
|
|
1485
|
-
responsiveFooter: false,
|
|
1486
|
-
compactFooterFormat: "$cwd$wrap$context",
|
|
1487
|
-
compactFooterMaxLines: "unlimited",
|
|
1488
|
-
}),
|
|
1489
|
-
).toMatchObject({
|
|
1490
|
-
responsiveFooter: false,
|
|
1491
|
-
compactFooterFormat: "$cwd$wrap$context",
|
|
1492
|
-
compactFooterMaxLines: "unlimited",
|
|
1493
|
-
});
|
|
1494
|
-
for (const compactFooterMaxLines of [1, 2, 3, "unlimited"] as const) {
|
|
1495
|
-
expect(mergeConfig({ compactFooterMaxLines }).compactFooterMaxLines).toBe(
|
|
1496
|
-
compactFooterMaxLines,
|
|
1497
|
-
);
|
|
1498
|
-
}
|
|
1499
|
-
for (const value of [0, 4, "2", null, false]) {
|
|
1500
|
-
expect(mergeConfig({ compactFooterMaxLines: value }).compactFooterMaxLines).toBe("unlimited");
|
|
1501
|
-
}
|
|
1502
|
-
expect(mergeConfig({ responsiveFooter: "false" }).responsiveFooter).toBe(true);
|
|
1503
|
-
expect(mergeConfig({ compactFooterFormat: "" }).compactFooterFormat).toBe(
|
|
1504
|
-
DEFAULT_COMPACT_FOOTER_FORMAT,
|
|
1505
|
-
);
|
|
1506
|
-
});
|
|
1507
|
-
|
|
1508
|
-
it("persists responsive footer patches without replacing unrelated keys", () => {
|
|
1509
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-responsive-config-"));
|
|
1510
|
-
const path = join(dir, "zentui.json");
|
|
1511
|
-
try {
|
|
1512
|
-
writeFileSync(path, JSON.stringify({ unknown: { keep: true }, footerFormat: "$cwd" }));
|
|
1513
|
-
const config = saveResponsiveFooterPatch(
|
|
1514
|
-
{ responsiveFooter: false, compactFooterMaxLines: 3 },
|
|
1515
|
-
path,
|
|
1516
|
-
);
|
|
1517
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1518
|
-
expect(raw.unknown).toEqual({ keep: true });
|
|
1519
|
-
expect(raw.footerFormat).toBe("$cwd");
|
|
1520
|
-
expect(raw.components.footer.styles.starship).toMatchObject({
|
|
1521
|
-
format: "$cwd",
|
|
1522
|
-
responsive: false,
|
|
1523
|
-
compactMaxLines: 3,
|
|
1524
|
-
});
|
|
1525
|
-
expect(config.responsiveFooter).toBe(false);
|
|
1526
|
-
expect(config.compactFooterMaxLines).toBe(3);
|
|
1527
|
-
} finally {
|
|
1528
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1529
|
-
}
|
|
1530
|
-
});
|
|
1531
|
-
|
|
1532
|
-
it("defaults editorMetadataFormat and preserves non-empty strings", () => {
|
|
1533
|
-
expect(defaultConfig.editorMetadataFormat).toBe(DEFAULT_EDITOR_METADATA_FORMAT);
|
|
1534
|
-
for (const value of [undefined, null, 123, true, ""]) {
|
|
1535
|
-
expect(mergeConfig({ editorMetadataFormat: value }).editorMetadataFormat).toBe(
|
|
1536
|
-
DEFAULT_EDITOR_METADATA_FORMAT,
|
|
1537
|
-
);
|
|
1538
|
-
}
|
|
1539
|
-
expect(mergeConfig({ editorMetadataFormat: "$model · $provider" }).editorMetadataFormat).toBe(
|
|
1540
|
-
"$model · $provider",
|
|
1541
|
-
);
|
|
1542
|
-
expect(mergeConfig({ editorMetadataFormat: " " }).editorMetadataFormat).toBe(" ");
|
|
1543
|
-
});
|
|
1544
|
-
|
|
1545
|
-
it("ignores non-string footerFormat values", () => {
|
|
1546
|
-
expect(mergeConfig({ footerFormat: 123 }).footerFormat).toBe("");
|
|
1547
|
-
expect(mergeConfig({ footerFormat: null }).footerFormat).toBe("");
|
|
1548
|
-
expect(mergeConfig({ footerFormat: true }).footerFormat).toBe("");
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
it("accepts custom project refresh intervals and 0 to disable polling", () => {
|
|
1552
|
-
expect(mergeConfig({ projectRefreshIntervalMs: 60_000 }).projectRefreshIntervalMs).toBe(60_000);
|
|
1553
|
-
expect(mergeConfig({ projectRefreshIntervalMs: 0 }).projectRefreshIntervalMs).toBe(0);
|
|
1554
|
-
});
|
|
1555
|
-
|
|
1556
|
-
it("clamps short project refresh intervals up to 5 seconds", () => {
|
|
1557
|
-
expect(mergeConfig({ projectRefreshIntervalMs: 100 }).projectRefreshIntervalMs).toBe(5_000);
|
|
1558
|
-
expect(mergeConfig({ projectRefreshIntervalMs: 4_999 }).projectRefreshIntervalMs).toBe(5_000);
|
|
1559
|
-
expect(mergeConfig({ projectRefreshIntervalMs: 5_000 }).projectRefreshIntervalMs).toBe(5_000);
|
|
1560
|
-
});
|
|
1561
|
-
|
|
1562
|
-
it("ignores invalid project refresh intervals", () => {
|
|
1563
|
-
expect(mergeConfig({ projectRefreshIntervalMs: "30000" }).projectRefreshIntervalMs).toBe(
|
|
1564
|
-
30_000,
|
|
1565
|
-
);
|
|
1566
|
-
expect(
|
|
1567
|
-
mergeConfig({ projectRefreshIntervalMs: Number.POSITIVE_INFINITY }).projectRefreshIntervalMs,
|
|
1568
|
-
).toBe(30_000);
|
|
1569
|
-
});
|
|
1570
|
-
|
|
1571
|
-
it("defaults separator style to none and accepts supported values", () => {
|
|
1572
|
-
expect(mergeConfig({}).separator).toBe("none");
|
|
1573
|
-
expect(defaultConfig.separator).toBe("none");
|
|
1574
|
-
for (const separator of ["pipe", "dot", "chevron", "none"] as const) {
|
|
1575
|
-
expect(mergeConfig({ separator }).separator).toBe(separator);
|
|
1576
|
-
}
|
|
1577
|
-
});
|
|
1578
|
-
|
|
1579
|
-
it("falls back to none for invalid separator styles", () => {
|
|
1580
|
-
for (const separator of ["arrow", "", 123, null, true]) {
|
|
1581
|
-
expect(mergeConfig({ separator }).separator).toBe("none");
|
|
1582
|
-
}
|
|
1583
|
-
});
|
|
1584
|
-
|
|
1585
|
-
it("saves separator style without erasing unknown config", () => {
|
|
1586
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1587
|
-
const path = join(dir, "zentui.json");
|
|
1588
|
-
try {
|
|
1589
|
-
writeFileSync(path, `${JSON.stringify({ unknown: true, contextStyle: "gauge" }, null, 2)}\n`);
|
|
1590
|
-
|
|
1591
|
-
const config = saveSeparatorPatch("chevron", path);
|
|
1592
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1593
|
-
|
|
1594
|
-
expect(config.separator).toBe("chevron");
|
|
1595
|
-
expect(raw.unknown).toBe(true);
|
|
1596
|
-
expect(raw.contextStyle).toBe("gauge");
|
|
1597
|
-
expect(raw.separator).toBeUndefined();
|
|
1598
|
-
expect(raw.components.footer.styles.starship).toMatchObject({
|
|
1599
|
-
contextStyle: "gauge",
|
|
1600
|
-
separator: "chevron",
|
|
1601
|
-
});
|
|
1602
|
-
} finally {
|
|
1603
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1604
|
-
}
|
|
1605
|
-
});
|
|
1606
|
-
|
|
1607
|
-
it("defaults context style/thresholds and accepts valid overrides", () => {
|
|
1608
|
-
expect(mergeConfig({}).contextStyle).toBe("text");
|
|
1609
|
-
expect(mergeConfig({}).contextThresholds).toEqual({ warning: 70, error: 90 });
|
|
1610
|
-
expect(mergeConfig({ contextStyle: "gauge" }).contextStyle).toBe("gauge");
|
|
1611
|
-
expect(mergeConfig({ contextStyle: "text+gauge" }).contextStyle).toBe("text+gauge");
|
|
1612
|
-
expect(mergeConfig({ contextStyle: "bars" }).contextStyle).toBe("text");
|
|
1613
|
-
expect(
|
|
1614
|
-
mergeConfig({ contextThresholds: { warning: 50, error: 80 } }).contextThresholds,
|
|
1615
|
-
).toEqual({ warning: 50, error: 80 });
|
|
1616
|
-
expect(
|
|
1617
|
-
mergeConfig({ contextThresholds: { warning: 90, error: 70 } }).contextThresholds,
|
|
1618
|
-
).toEqual({ warning: 70, error: 90 });
|
|
1619
|
-
});
|
|
1620
|
-
|
|
1621
|
-
it("defaults editorModelLabel to name and accepts valid overrides", () => {
|
|
1622
|
-
expect(mergeConfig({}).editorModelLabel).toBe("name");
|
|
1623
|
-
expect(mergeConfig({ editorModelLabel: "name" }).editorModelLabel).toBe("name");
|
|
1624
|
-
expect(mergeConfig({ editorModelLabel: "id" }).editorModelLabel).toBe("id");
|
|
1625
|
-
expect(mergeConfig({ editorModelLabel: "title" }).editorModelLabel).toBe("name");
|
|
1626
|
-
});
|
|
1627
|
-
|
|
1628
|
-
it("saves minimalist patches while preserving unknown nested config", () => {
|
|
1629
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1630
|
-
const path = join(dir, "zentui.json");
|
|
1631
|
-
try {
|
|
1632
|
-
writeFileSync(
|
|
1633
|
-
path,
|
|
1634
|
-
JSON.stringify({
|
|
1635
|
-
unknownTop: true,
|
|
1636
|
-
editorStyles: {
|
|
1637
|
-
unknownStyle: { keep: true },
|
|
1638
|
-
minimalist: { unknownNested: "keep", showGit: true },
|
|
1639
|
-
},
|
|
1640
|
-
}),
|
|
1641
|
-
);
|
|
1642
|
-
const config = saveMinimalistPatch(
|
|
1643
|
-
{
|
|
1644
|
-
pathDisplay: "full",
|
|
1645
|
-
contextFormat: "percent-total",
|
|
1646
|
-
showSessionName: false,
|
|
1647
|
-
showGit: false,
|
|
1648
|
-
},
|
|
1649
|
-
path,
|
|
1650
|
-
);
|
|
1651
|
-
expect(config.editorStyles.minimalist.pathDisplay).toBe("full");
|
|
1652
|
-
expect(config.editorStyles.minimalist.contextFormat).toBe("percent-total");
|
|
1653
|
-
expect(config.editorStyles.minimalist.showSessionName).toBe(false);
|
|
1654
|
-
expect(config.editorStyles.minimalist.showGit).toBe(false);
|
|
1655
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1656
|
-
expect(raw).toMatchObject({
|
|
1657
|
-
unknownTop: true,
|
|
1658
|
-
editorStyles: {
|
|
1659
|
-
unknownStyle: { keep: true },
|
|
1660
|
-
minimalist: { unknownNested: "keep", showGit: true },
|
|
1661
|
-
},
|
|
1662
|
-
});
|
|
1663
|
-
expect(raw.components.editor.styles.minimalist).toMatchObject({
|
|
1664
|
-
pathDisplay: "full",
|
|
1665
|
-
contextFormat: "percent-total",
|
|
1666
|
-
showSessionName: false,
|
|
1667
|
-
showGit: false,
|
|
1668
|
-
});
|
|
1669
|
-
} finally {
|
|
1670
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1671
|
-
}
|
|
1672
|
-
});
|
|
1673
|
-
|
|
1674
|
-
it("saves editor style without erasing sibling config", () => {
|
|
1675
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1676
|
-
const path = join(dir, "zentui.json");
|
|
1677
|
-
try {
|
|
1678
|
-
writeFileSync(path, JSON.stringify({ unknown: { keep: true }, editorModelLabel: "name" }));
|
|
1679
|
-
const minimalist = saveEditorStyle("minimalist", path);
|
|
1680
|
-
let raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1681
|
-
expect(raw.unknown).toEqual({ keep: true });
|
|
1682
|
-
expect(raw.editorModelLabel).toBe("name");
|
|
1683
|
-
expect(raw.editorStyle).toBeUndefined();
|
|
1684
|
-
expect(raw.components.editor.style).toBe("minimalist");
|
|
1685
|
-
expect(minimalist.editorStyle).toBe("minimalist");
|
|
1686
|
-
|
|
1687
|
-
const accentRail = saveEditorStyle("accent-rail", path);
|
|
1688
|
-
raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1689
|
-
expect(accentRail.editorStyle).toBe("accent-rail");
|
|
1690
|
-
expect(raw.components.editor.style).toBe("accent-rail");
|
|
1691
|
-
expect(raw.components.editor.styles["accent-rail"]).toEqual({
|
|
1692
|
-
rail: "▎",
|
|
1693
|
-
asciiRail: "|",
|
|
1694
|
-
transparent: false,
|
|
1695
|
-
});
|
|
1696
|
-
|
|
1697
|
-
const polished = saveEditorStyle("opencode", path);
|
|
1698
|
-
raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1699
|
-
expect(polished.editorStyle).toBe("opencode");
|
|
1700
|
-
expect(raw.unknown).toEqual({ keep: true });
|
|
1701
|
-
expect(raw.editorModelLabel).toBe("name");
|
|
1702
|
-
expect(raw.components.editor.style).toBe("opencode");
|
|
1703
|
-
} finally {
|
|
1704
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1705
|
-
}
|
|
1706
|
-
});
|
|
1707
|
-
|
|
1708
|
-
it("defaults and normalizes editor border color mode", () => {
|
|
1709
|
-
expect(defaultConfig.editorBorderColorMode).toBe("adaptive");
|
|
1710
|
-
expect(mergeConfig({}).editorBorderColorMode).toBe("adaptive");
|
|
1711
|
-
expect(mergeConfig({ editorBorderColorMode: "static" }).editorBorderColorMode).toBe("static");
|
|
1712
|
-
expect(mergeConfig({ editorBorderColorMode: "adaptive" }).editorBorderColorMode).toBe(
|
|
1713
|
-
"adaptive",
|
|
1714
|
-
);
|
|
1715
|
-
for (const value of ["dynamic", "", 1, null, true]) {
|
|
1716
|
-
expect(mergeConfig({ editorBorderColorMode: value }).editorBorderColorMode).toBe("adaptive");
|
|
1717
|
-
}
|
|
1718
|
-
});
|
|
1719
|
-
|
|
1720
|
-
it("saves editor border color mode without erasing sibling config", () => {
|
|
1721
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1722
|
-
const path = join(dir, "zentui.json");
|
|
1723
|
-
try {
|
|
1724
|
-
writeFileSync(
|
|
1725
|
-
path,
|
|
1726
|
-
`${JSON.stringify({ unknown: { keep: true }, editorModelLabel: "name" }, null, 2)}\n`,
|
|
1727
|
-
);
|
|
1728
|
-
|
|
1729
|
-
const config = saveEditorBorderColorMode("adaptive", path);
|
|
1730
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1731
|
-
expect(raw.unknown).toEqual({ keep: true });
|
|
1732
|
-
expect(raw.editorModelLabel).toBe("name");
|
|
1733
|
-
expect(raw.editorBorderColorMode).toBeUndefined();
|
|
1734
|
-
expect(raw.components.editor.borderColorMode).toBe("adaptive");
|
|
1735
|
-
expect(config.editorBorderColorMode).toBe("adaptive");
|
|
1736
|
-
expect(config.editorModelLabel).toBe("name");
|
|
1737
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
1738
|
-
} finally {
|
|
1739
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1740
|
-
}
|
|
1741
|
-
});
|
|
1742
|
-
|
|
1743
|
-
it("defaults pathDisplay and accepts mode/depth overrides", () => {
|
|
1744
|
-
expect(mergeConfig({}).pathDisplay).toEqual({ mode: "basename", depth: 2 });
|
|
1745
|
-
expect(mergeConfig({ pathDisplay: { mode: "full" } }).pathDisplay).toEqual({
|
|
1746
|
-
mode: "full",
|
|
1747
|
-
depth: 2,
|
|
1748
|
-
});
|
|
1749
|
-
expect(mergeConfig({ pathDisplay: { mode: "full", depth: 3 } }).pathDisplay).toEqual({
|
|
1750
|
-
mode: "full",
|
|
1751
|
-
depth: 3,
|
|
1752
|
-
});
|
|
1753
|
-
expect(mergeConfig({ pathDisplay: { mode: "repository", depth: 2 } }).pathDisplay).toEqual({
|
|
1754
|
-
mode: "repository",
|
|
1755
|
-
depth: 2,
|
|
1756
|
-
});
|
|
1757
|
-
expect(
|
|
1758
|
-
mergeConfig({
|
|
1759
|
-
components: { footer: { styles: { starship: { pathDisplay: { mode: "repository" } } } } },
|
|
1760
|
-
}).components.footer.styles.starship.pathDisplay,
|
|
1761
|
-
).toEqual({ mode: "repository", depth: 2 });
|
|
1762
|
-
expect(mergeConfig({ pathDisplay: { mode: "fish", depth: -3 } }).pathDisplay).toEqual({
|
|
1763
|
-
mode: "basename",
|
|
1764
|
-
depth: 2,
|
|
1765
|
-
});
|
|
1766
|
-
expect(mergeConfig({ pathDisplay: { depth: 12.8 } }).pathDisplay).toEqual({
|
|
1767
|
-
mode: "basename",
|
|
1768
|
-
depth: 5,
|
|
1769
|
-
});
|
|
1770
|
-
expect(mergeConfig({ pathDisplay: "full" }).pathDisplay).toEqual({
|
|
1771
|
-
mode: "basename",
|
|
1772
|
-
depth: 2,
|
|
1773
|
-
});
|
|
1774
|
-
expect(
|
|
1775
|
-
mergeConfig({ pathDisplay: { mode: "full", depth: Number.POSITIVE_INFINITY } }).pathDisplay,
|
|
1776
|
-
).toEqual({ mode: "full", depth: 2 });
|
|
1777
|
-
});
|
|
1778
|
-
|
|
1779
|
-
it("saves pathDisplay patches and keeps unknown keys", () => {
|
|
1780
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1781
|
-
const path = join(dir, "zentui.json");
|
|
1782
|
-
try {
|
|
1783
|
-
writeFileSync(
|
|
1784
|
-
path,
|
|
1785
|
-
`${JSON.stringify(
|
|
1786
|
-
{
|
|
1787
|
-
unknown: true,
|
|
1788
|
-
pathDisplay: {
|
|
1789
|
-
mode: "basename",
|
|
1790
|
-
depth: 3,
|
|
1791
|
-
futureKey: "future",
|
|
1792
|
-
},
|
|
1793
|
-
},
|
|
1794
|
-
null,
|
|
1795
|
-
2,
|
|
1796
|
-
)}
|
|
1797
|
-
`,
|
|
1798
|
-
);
|
|
1799
|
-
|
|
1800
|
-
const config = savePathDisplayPatch({ mode: "full" }, path);
|
|
1801
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1802
|
-
|
|
1803
|
-
expect(config.pathDisplay).toEqual({ mode: "full", depth: 3 });
|
|
1804
|
-
expect(raw.unknown).toBe(true);
|
|
1805
|
-
expect(raw.pathDisplay).toEqual({
|
|
1806
|
-
mode: "basename",
|
|
1807
|
-
depth: 3,
|
|
1808
|
-
futureKey: "future",
|
|
1809
|
-
});
|
|
1810
|
-
expect(raw.components.footer.styles.starship.pathDisplay).toEqual({
|
|
1811
|
-
mode: "full",
|
|
1812
|
-
depth: 3,
|
|
1813
|
-
});
|
|
1814
|
-
|
|
1815
|
-
const depthConfig = savePathDisplayPatch({ depth: 1 }, path);
|
|
1816
|
-
expect(depthConfig.pathDisplay).toEqual({ mode: "full", depth: 1 });
|
|
1817
|
-
} finally {
|
|
1818
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1819
|
-
}
|
|
1820
|
-
});
|
|
1821
|
-
|
|
1822
|
-
it("defaults git branch length to full and accepts positive integer values", () => {
|
|
1823
|
-
expect(mergeConfig({}).gitBranch).toEqual({ maxLength: "full" });
|
|
1824
|
-
expect(defaultConfig.gitBranch).toEqual({ maxLength: "full" });
|
|
1825
|
-
for (const maxLength of [1, 10, 17, 20, 30, 40, 50, 10_000]) {
|
|
1826
|
-
expect(mergeConfig({ gitBranch: { maxLength } }).gitBranch).toEqual({ maxLength });
|
|
1827
|
-
}
|
|
1828
|
-
expect(mergeConfig({ gitBranch: { maxLength: "full" } }).gitBranch).toEqual({
|
|
1829
|
-
maxLength: "full",
|
|
1830
|
-
});
|
|
1831
|
-
});
|
|
1832
|
-
|
|
1833
|
-
it("falls back to full for invalid git branch lengths", () => {
|
|
1834
|
-
for (const maxLength of [0, -1, 1.5, "10", "short", null, true]) {
|
|
1835
|
-
expect(mergeConfig({ gitBranch: { maxLength } }).gitBranch).toEqual({
|
|
1836
|
-
maxLength: "full",
|
|
1837
|
-
});
|
|
1838
|
-
}
|
|
1839
|
-
expect(mergeConfig({ gitBranch: 20 }).gitBranch).toEqual({ maxLength: "full" });
|
|
1840
|
-
});
|
|
1841
|
-
|
|
1842
|
-
it("saves git branch length without erasing unknown config", () => {
|
|
1843
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
1844
|
-
const path = join(dir, "zentui.json");
|
|
1845
|
-
try {
|
|
1846
|
-
writeFileSync(
|
|
1847
|
-
path,
|
|
1848
|
-
`${JSON.stringify({ unknown: true, gitBranch: { maxLength: 17, future: true } }, null, 2)}\n`,
|
|
1849
|
-
);
|
|
1850
|
-
|
|
1851
|
-
const config = saveGitBranchPatch({ maxLength: 30 }, path);
|
|
1852
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
1853
|
-
expect(config.gitBranch).toEqual({ maxLength: 30 });
|
|
1854
|
-
expect(raw.unknown).toBe(true);
|
|
1855
|
-
expect(raw.gitBranch).toEqual({ maxLength: 17, future: true });
|
|
1856
|
-
expect(raw.components.footer.styles.starship.gitBranch).toEqual({ maxLength: 30 });
|
|
1857
|
-
} finally {
|
|
1858
|
-
rmSync(dir, { recursive: true, force: true });
|
|
1859
|
-
}
|
|
1860
|
-
});
|
|
1861
|
-
|
|
1862
|
-
it("defaults icon mode to ascii and accepts nerd/ascii", () => {
|
|
1863
|
-
expect(mergeConfig({}).icons.mode).toBe("ascii");
|
|
1864
|
-
expect(mergeConfig({ icons: { mode: "ascii" } }).icons.mode).toBe("ascii");
|
|
1865
|
-
expect(mergeConfig({ icons: { mode: "nerd" } }).icons.mode).toBe("nerd");
|
|
1866
|
-
expect(mergeConfig({ icons: { mode: "emoji" } }).icons.mode).toBe("ascii");
|
|
1867
|
-
expect(mergeConfig({ icons: { mode: "ascii" } }).icons.cwd).toBe("");
|
|
1868
|
-
expect(mergeConfig({ icons: { mode: "ascii", cwd: "DIR" } }).icons.cwd).toBe("DIR");
|
|
1869
|
-
});
|
|
1870
|
-
|
|
1871
|
-
it("accepts Starship colors and old color key aliases", () => {
|
|
1872
|
-
expect(mergeConfig({ colors: { gitBranch: "bold purple" } }).colors.gitBranch).toBe(
|
|
1873
|
-
"bold purple",
|
|
1874
|
-
);
|
|
1875
|
-
expect(mergeConfig({ colors: { packageVersion: "bold green" } }).colors.packageVersion).toBe(
|
|
1876
|
-
"bold green",
|
|
1877
|
-
);
|
|
1878
|
-
expect(mergeConfig({ colors: { gitCommit: "bold yellow" } }).colors.gitCommit).toBe(
|
|
1879
|
-
"bold yellow",
|
|
1880
|
-
);
|
|
1881
|
-
expect(mergeConfig({ colors: { gitMetricsAdded: "green" } }).colors.gitMetricsAdded).toBe(
|
|
1882
|
-
"green",
|
|
1883
|
-
);
|
|
1884
|
-
expect(mergeConfig({ colors: { gitMetricsDeleted: "red" } }).colors.gitMetricsDeleted).toBe(
|
|
1885
|
-
"red",
|
|
1886
|
-
);
|
|
1887
|
-
expect(mergeConfig({ colors: { git: "syntaxKeyword" } }).colors.gitBranch).toBe(
|
|
1888
|
-
"syntaxKeyword",
|
|
1889
|
-
);
|
|
1890
|
-
expect(mergeConfig({ colors: { extensionStatus: "warning" } }).colors.extensionStatus).toBe(
|
|
1891
|
-
"warning",
|
|
1892
|
-
);
|
|
1893
|
-
expect(mergeConfig({ colors: { extensionStatus: "neon" } }).colors.extensionStatus).toBe(
|
|
1894
|
-
defaultConfig.colors.extensionStatus,
|
|
1895
|
-
);
|
|
1896
|
-
});
|
|
1897
|
-
|
|
1898
|
-
it("accepts extension status placement and color mode config", () => {
|
|
1899
|
-
const config = mergeConfig({
|
|
1900
|
-
extensionStatuses: {
|
|
1901
|
-
defaultPlacement: "middle",
|
|
1902
|
-
placements: {
|
|
1903
|
-
alpha: "left",
|
|
1904
|
-
beta: "off",
|
|
1905
|
-
gamma: "right",
|
|
1906
|
-
},
|
|
1907
|
-
colorModes: {
|
|
1908
|
-
alpha: "original",
|
|
1909
|
-
beta: "zentui",
|
|
1910
|
-
},
|
|
1911
|
-
},
|
|
1912
|
-
});
|
|
1913
|
-
|
|
1914
|
-
expect(config.extensionStatuses).toEqual({
|
|
1915
|
-
defaultPlacement: "middle",
|
|
1916
|
-
placements: {
|
|
1917
|
-
alpha: "left",
|
|
1918
|
-
beta: "off",
|
|
1919
|
-
gamma: "right",
|
|
1920
|
-
},
|
|
1921
|
-
colorModes: {
|
|
1922
|
-
alpha: "original",
|
|
1923
|
-
beta: "zentui",
|
|
1924
|
-
},
|
|
1925
|
-
});
|
|
1926
|
-
});
|
|
1927
|
-
|
|
1928
|
-
it("normalizes invalid extension status placement config", () => {
|
|
1929
|
-
expect(
|
|
1930
|
-
mergeConfig({
|
|
1931
|
-
extensionStatuses: {
|
|
1932
|
-
defaultPlacement: "center",
|
|
1933
|
-
placements: {
|
|
1934
|
-
alpha: "left",
|
|
1935
|
-
beta: "center",
|
|
1936
|
-
gamma: 1,
|
|
1937
|
-
},
|
|
1938
|
-
colorModes: {
|
|
1939
|
-
alpha: "original",
|
|
1940
|
-
beta: "muted",
|
|
1941
|
-
gamma: 1,
|
|
1942
|
-
},
|
|
1943
|
-
},
|
|
1944
|
-
}).extensionStatuses,
|
|
1945
|
-
).toEqual({
|
|
1946
|
-
defaultPlacement: "right",
|
|
1947
|
-
placements: { alpha: "left" },
|
|
1948
|
-
colorModes: { alpha: "original" },
|
|
1949
|
-
});
|
|
1950
|
-
expect(mergeConfig({ extensionStatuses: { placements: "none" } }).extensionStatuses).toEqual({
|
|
1951
|
-
defaultPlacement: "right",
|
|
1952
|
-
placements: {},
|
|
1953
|
-
colorModes: {},
|
|
1954
|
-
});
|
|
1955
|
-
});
|
|
1956
|
-
|
|
1957
|
-
it("accepts optional editor and user-message chrome color overrides", () => {
|
|
1958
|
-
const config = mergeConfig({
|
|
1959
|
-
colors: {
|
|
1960
|
-
editorAccent: "bold purple",
|
|
1961
|
-
editorBorder: "#89b4fa",
|
|
1962
|
-
editorModel: "accent",
|
|
1963
|
-
editorProvider: "text",
|
|
1964
|
-
editorThinking: "muted",
|
|
1965
|
-
editorThinkingMinimal: "thinkingMinimal",
|
|
1966
|
-
editorThinkingLow: "thinkingLow",
|
|
1967
|
-
editorThinkingMedium: "thinkingMedium",
|
|
1968
|
-
editorThinkingHigh: "thinkingHigh",
|
|
1969
|
-
editorThinkingXhigh: "thinkingXhigh",
|
|
1970
|
-
editorThinkingMax: "thinkingMax",
|
|
1971
|
-
},
|
|
1972
|
-
});
|
|
1973
|
-
|
|
1974
|
-
expect(config.colors.editorAccent).toBe("bold purple");
|
|
1975
|
-
expect(config.colors.editorBorder).toBe("#89b4fa");
|
|
1976
|
-
expect(config.colors.editorModel).toBe("accent");
|
|
1977
|
-
expect(config.colors.editorProvider).toBe("text");
|
|
1978
|
-
expect(config.colors.editorThinking).toBe("muted");
|
|
1979
|
-
expect(config.colors.editorThinkingMinimal).toBe("thinkingMinimal");
|
|
1980
|
-
expect(config.colors.editorThinkingLow).toBe("thinkingLow");
|
|
1981
|
-
expect(config.colors.editorThinkingMedium).toBe("thinkingMedium");
|
|
1982
|
-
expect(config.colors.editorThinkingHigh).toBe("thinkingHigh");
|
|
1983
|
-
expect(config.colors.editorThinkingXhigh).toBe("thinkingXhigh");
|
|
1984
|
-
expect(config.colors.editorThinkingMax).toBe("thinkingMax");
|
|
1985
|
-
});
|
|
1986
|
-
|
|
1987
|
-
it("ignores invalid known values at runtime instead of trusting zentui.json", () => {
|
|
1988
|
-
const config = mergeConfig({
|
|
1989
|
-
projectRefreshIntervalMs: "fast",
|
|
1990
|
-
icons: {
|
|
1991
|
-
cwd: 42,
|
|
1992
|
-
git: "git",
|
|
1993
|
-
cacheHit: "CH",
|
|
1994
|
-
editorPrompt: ">",
|
|
1995
|
-
},
|
|
1996
|
-
colors: {
|
|
1997
|
-
cwd: 123,
|
|
1998
|
-
gitStatus: "not-a-color",
|
|
1999
|
-
separator: "dimmed",
|
|
2000
|
-
editorAccent: "neon",
|
|
2001
|
-
editorPrompt: "accent",
|
|
2002
|
-
editorBorder: "also-neon",
|
|
2003
|
-
editorThinkingHigh: "thinkingHigh",
|
|
2004
|
-
},
|
|
2005
|
-
colorSources: {
|
|
2006
|
-
starship: "neon",
|
|
2007
|
-
editor: "terminal",
|
|
2008
|
-
},
|
|
2009
|
-
});
|
|
2010
|
-
|
|
2011
|
-
expect(config.projectRefreshIntervalMs).toBe(defaultConfig.projectRefreshIntervalMs);
|
|
2012
|
-
expect(config.icons.cwd).toBe(defaultConfig.icons.cwd);
|
|
2013
|
-
expect(config.icons.git).toBe("git");
|
|
2014
|
-
expect(config.icons.cacheHit).toBe("CH");
|
|
2015
|
-
expect(config.icons.editorPrompt).toBe(">");
|
|
2016
|
-
expect(config.colors.cwd).toBe(defaultConfig.colors.cwd);
|
|
2017
|
-
expect(config.colors.gitStatus).toBe(defaultConfig.colors.gitStatus);
|
|
2018
|
-
expect(config.colors.separator).toBe("dimmed");
|
|
2019
|
-
expect(config.colors.editorAccent).toBeUndefined();
|
|
2020
|
-
expect(config.colors.editorPrompt).toBe("accent");
|
|
2021
|
-
expect(config.colors.editorBorder).toBeUndefined();
|
|
2022
|
-
expect(config.colors.editorThinkingHigh).toBe("thinkingHigh");
|
|
2023
|
-
expect(config.colorSources).toEqual({
|
|
2024
|
-
starship: "theme",
|
|
2025
|
-
editor: "terminal",
|
|
2026
|
-
userMessages: "theme",
|
|
2027
|
-
});
|
|
2028
|
-
});
|
|
2029
|
-
|
|
2030
|
-
it("accepts valid color source preferences and ignores invalid values", () => {
|
|
2031
|
-
expect(
|
|
2032
|
-
mergeConfig({ colorSources: { starship: "terminal", editor: "theme" } }).colorSources,
|
|
2033
|
-
).toEqual({ starship: "terminal", editor: "theme", userMessages: "theme" });
|
|
2034
|
-
expect(
|
|
2035
|
-
mergeConfig({ colorSources: { starship: "neon", userMessages: "terminal" } }).colorSources,
|
|
2036
|
-
).toEqual({ starship: "theme", editor: "theme", userMessages: "terminal" });
|
|
2037
|
-
});
|
|
2038
|
-
|
|
2039
|
-
it("accepts valid UI feature preferences and ignores invalid values", () => {
|
|
2040
|
-
expect(mergeConfig({ features: { editor: false } }).features).toEqual({
|
|
2041
|
-
editor: false,
|
|
2042
|
-
statusLine: false,
|
|
2043
|
-
viewportIndicators: false,
|
|
2044
|
-
});
|
|
2045
|
-
expect(
|
|
2046
|
-
mergeConfig({
|
|
2047
|
-
features: {
|
|
2048
|
-
editor: "off",
|
|
2049
|
-
statusLine: false,
|
|
2050
|
-
copyFriendly: true,
|
|
2051
|
-
viewportIndicators: false,
|
|
2052
|
-
},
|
|
2053
|
-
}).features,
|
|
2054
|
-
).toEqual({
|
|
2055
|
-
editor: false,
|
|
2056
|
-
statusLine: false,
|
|
2057
|
-
viewportIndicators: false,
|
|
2058
|
-
});
|
|
2059
|
-
expect(
|
|
2060
|
-
mergeConfig({ features: { copyFriendly: "on", viewportIndicators: "off" } }).features,
|
|
2061
|
-
).toEqual({ editor: false, statusLine: false, viewportIndicators: false });
|
|
2062
|
-
});
|
|
2063
|
-
|
|
2064
|
-
it("accepts valid footer segment preferences and ignores invalid values", () => {
|
|
2065
|
-
expect(
|
|
2066
|
-
mergeConfig({ footerSegments: { cwd: false, modelInfo: true, tokens: false } })
|
|
2067
|
-
.footerSegments,
|
|
2068
|
-
).toEqual({
|
|
2069
|
-
cwd: false,
|
|
2070
|
-
sessionName: true,
|
|
2071
|
-
gitBranch: true,
|
|
2072
|
-
gitStatus: true,
|
|
2073
|
-
runtime: true,
|
|
2074
|
-
modelInfo: true,
|
|
2075
|
-
context: true,
|
|
2076
|
-
gitCounts: false,
|
|
2077
|
-
sessionDuration: false,
|
|
2078
|
-
username: false,
|
|
2079
|
-
time: false,
|
|
2080
|
-
os: false,
|
|
2081
|
-
packageVersion: false,
|
|
2082
|
-
gitCommit: false,
|
|
2083
|
-
gitMetrics: true,
|
|
2084
|
-
tokens: false,
|
|
2085
|
-
cost: true,
|
|
2086
|
-
});
|
|
2087
|
-
expect(
|
|
2088
|
-
mergeConfig({
|
|
2089
|
-
footerSegments: { cost: "off", gitBranch: false, gitStatus: false, modelInfo: "on" },
|
|
2090
|
-
}).footerSegments,
|
|
2091
|
-
).toEqual({
|
|
2092
|
-
cwd: true,
|
|
2093
|
-
sessionName: true,
|
|
2094
|
-
gitBranch: false,
|
|
2095
|
-
gitStatus: false,
|
|
2096
|
-
runtime: true,
|
|
2097
|
-
modelInfo: false,
|
|
2098
|
-
context: true,
|
|
2099
|
-
gitCounts: false,
|
|
2100
|
-
sessionDuration: false,
|
|
2101
|
-
username: false,
|
|
2102
|
-
time: false,
|
|
2103
|
-
os: false,
|
|
2104
|
-
packageVersion: false,
|
|
2105
|
-
gitCommit: false,
|
|
2106
|
-
gitMetrics: true,
|
|
2107
|
-
tokens: true,
|
|
2108
|
-
cost: true,
|
|
2109
|
-
});
|
|
2110
|
-
});
|
|
2111
|
-
|
|
2112
|
-
it("normalizes session-name preferences", () => {
|
|
2113
|
-
expect(mergeConfig({ colors: { sessionName: "success" } }).colors.sessionName).toBe("success");
|
|
2114
|
-
expect(mergeConfig({ footerSegments: { sessionName: false } }).footerSegments.sessionName).toBe(
|
|
2115
|
-
false,
|
|
2116
|
-
);
|
|
2117
|
-
expect(mergeConfig({ colors: { sessionName: "not-a-color" } }).colors.sessionName).toBe(
|
|
2118
|
-
"bold green",
|
|
2119
|
-
);
|
|
2120
|
-
expect(mergeConfig({ footerSegments: { sessionName: "on" } }).footerSegments.sessionName).toBe(
|
|
2121
|
-
true,
|
|
2122
|
-
);
|
|
2123
|
-
});
|
|
2124
|
-
|
|
2125
|
-
it("saves color source patches without erasing unknown user config", () => {
|
|
2126
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2127
|
-
const path = join(dir, "zentui.json");
|
|
2128
|
-
try {
|
|
2129
|
-
writeFileSync(
|
|
2130
|
-
path,
|
|
2131
|
-
`${JSON.stringify(
|
|
2132
|
-
{
|
|
2133
|
-
unknown: true,
|
|
2134
|
-
icons: { git: "git" },
|
|
2135
|
-
colors: {
|
|
2136
|
-
futureKey: "future",
|
|
2137
|
-
cwd: "bold cyan",
|
|
2138
|
-
gitBranch: "syntaxKeyword",
|
|
2139
|
-
cost: "success",
|
|
2140
|
-
},
|
|
2141
|
-
colorSources: { editor: "terminal" },
|
|
2142
|
-
},
|
|
2143
|
-
null,
|
|
2144
|
-
2,
|
|
2145
|
-
)}\n`,
|
|
2146
|
-
);
|
|
2147
|
-
|
|
2148
|
-
const config = saveColorSourcesPatch({ starship: "terminal" }, path);
|
|
2149
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2150
|
-
|
|
2151
|
-
expect(config.colorSources).toEqual({
|
|
2152
|
-
starship: "terminal",
|
|
2153
|
-
editor: "terminal",
|
|
2154
|
-
userMessages: "theme",
|
|
2155
|
-
});
|
|
2156
|
-
expect(raw.unknown).toBe(true);
|
|
2157
|
-
expect(raw.icons.git).toBe("git");
|
|
2158
|
-
expect(raw.colors.cwd).toBe("bold cyan");
|
|
2159
|
-
expect(raw.colors.futureKey).toBe("future");
|
|
2160
|
-
expect(raw.colors.gitBranch).toBe("syntaxKeyword");
|
|
2161
|
-
expect(raw.colors.cost).toBe("success");
|
|
2162
|
-
expect(raw.colorSources).toEqual({ editor: "terminal" });
|
|
2163
|
-
expect(raw.components.footer.colorSource).toBe("terminal");
|
|
2164
|
-
expect(raw.components.editor.colorSource).toBe("terminal");
|
|
2165
|
-
} finally {
|
|
2166
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2167
|
-
}
|
|
2168
|
-
});
|
|
2169
|
-
|
|
2170
|
-
it("preserves invalid and unknown color source data on disk while normalizing runtime", () => {
|
|
2171
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2172
|
-
const path = join(dir, "zentui.json");
|
|
2173
|
-
try {
|
|
2174
|
-
writeFileSync(
|
|
2175
|
-
path,
|
|
2176
|
-
`${JSON.stringify(
|
|
2177
|
-
{
|
|
2178
|
-
colorSources: {
|
|
2179
|
-
starship: "neon",
|
|
2180
|
-
editor: "terminal",
|
|
2181
|
-
userMessages: "invalid",
|
|
2182
|
-
extra: "terminal",
|
|
2183
|
-
},
|
|
2184
|
-
},
|
|
2185
|
-
null,
|
|
2186
|
-
2,
|
|
2187
|
-
)}\n`,
|
|
2188
|
-
);
|
|
2189
|
-
|
|
2190
|
-
const config = saveColorSourcesPatch({ userMessages: "terminal" }, path);
|
|
2191
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2192
|
-
|
|
2193
|
-
expect(config.colorSources).toEqual({
|
|
2194
|
-
starship: "theme",
|
|
2195
|
-
editor: "terminal",
|
|
2196
|
-
userMessages: "terminal",
|
|
2197
|
-
});
|
|
2198
|
-
expect(raw.colorSources).toEqual({
|
|
2199
|
-
starship: "neon",
|
|
2200
|
-
editor: "terminal",
|
|
2201
|
-
userMessages: "invalid",
|
|
2202
|
-
extra: "terminal",
|
|
2203
|
-
});
|
|
2204
|
-
expect(raw.components.userMessages.colorSource).toBe("terminal");
|
|
2205
|
-
} finally {
|
|
2206
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2207
|
-
}
|
|
2208
|
-
});
|
|
2209
|
-
|
|
2210
|
-
it("writes only the requested settings when creating zentui.json", () => {
|
|
2211
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2212
|
-
const path = join(dir, "zentui.json");
|
|
2213
|
-
try {
|
|
2214
|
-
const config = saveColorSourcesPatch({ starship: "terminal" }, path);
|
|
2215
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2216
|
-
|
|
2217
|
-
expect(config.colorSources).toEqual({
|
|
2218
|
-
starship: "terminal",
|
|
2219
|
-
editor: "theme",
|
|
2220
|
-
userMessages: "theme",
|
|
2221
|
-
});
|
|
2222
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2223
|
-
expect(raw.components.footer.colorSource).toBe("terminal");
|
|
2224
|
-
expect(raw.components.editor.colorSource).toBe("theme");
|
|
2225
|
-
expect(raw.components.userMessages.colorSource).toBe("theme");
|
|
2226
|
-
} finally {
|
|
2227
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2228
|
-
}
|
|
2229
|
-
});
|
|
2230
|
-
|
|
2231
|
-
it("saves UI feature patches without erasing unknown user config", () => {
|
|
2232
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2233
|
-
const path = join(dir, "zentui.json");
|
|
2234
|
-
try {
|
|
2235
|
-
writeFileSync(
|
|
2236
|
-
path,
|
|
2237
|
-
`${JSON.stringify(
|
|
2238
|
-
{
|
|
2239
|
-
unknown: true,
|
|
2240
|
-
features: {
|
|
2241
|
-
editor: true,
|
|
2242
|
-
futureKey: "future",
|
|
2243
|
-
},
|
|
2244
|
-
},
|
|
2245
|
-
null,
|
|
2246
|
-
2,
|
|
2247
|
-
)}\n`,
|
|
2248
|
-
);
|
|
2249
|
-
|
|
2250
|
-
const config = saveUiFeaturesPatch({ statusLine: false, viewportIndicators: false }, path);
|
|
2251
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2252
|
-
|
|
2253
|
-
expect(config.features).toEqual({
|
|
2254
|
-
editor: true,
|
|
2255
|
-
statusLine: false,
|
|
2256
|
-
viewportIndicators: false,
|
|
2257
|
-
});
|
|
2258
|
-
expect(raw.unknown).toBe(true);
|
|
2259
|
-
expect(raw.features).toEqual({ editor: true, futureKey: "future" });
|
|
2260
|
-
expect(raw.components.editor.enabled).toBe(true);
|
|
2261
|
-
expect(raw.components.editor.viewportIndicators).toBe(false);
|
|
2262
|
-
expect(raw.components.footer.style).toBe("native");
|
|
2263
|
-
} finally {
|
|
2264
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2265
|
-
}
|
|
2266
|
-
});
|
|
2267
|
-
|
|
2268
|
-
it("writes only the requested UI feature setting when creating zentui.json", () => {
|
|
2269
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2270
|
-
const path = join(dir, "zentui.json");
|
|
2271
|
-
try {
|
|
2272
|
-
const config = saveUiFeaturesPatch({ editor: false }, path);
|
|
2273
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2274
|
-
|
|
2275
|
-
expect(config.features).toEqual({
|
|
2276
|
-
editor: false,
|
|
2277
|
-
statusLine: false,
|
|
2278
|
-
viewportIndicators: false,
|
|
2279
|
-
});
|
|
2280
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2281
|
-
expect(raw.components.editor.enabled).toBe(false);
|
|
2282
|
-
expect(raw.components.userMessages.enabled).toBe(false);
|
|
2283
|
-
expect(raw.components.selectorBorders.enabled).toBe(false);
|
|
2284
|
-
} finally {
|
|
2285
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2286
|
-
}
|
|
2287
|
-
});
|
|
2288
|
-
|
|
2289
|
-
it("saves footer segment patches without erasing unknown user config", () => {
|
|
2290
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2291
|
-
const path = join(dir, "zentui.json");
|
|
2292
|
-
try {
|
|
2293
|
-
writeFileSync(
|
|
2294
|
-
path,
|
|
2295
|
-
`${JSON.stringify(
|
|
2296
|
-
{
|
|
2297
|
-
unknown: true,
|
|
2298
|
-
footerSegments: {
|
|
2299
|
-
cwd: true,
|
|
2300
|
-
futureKey: "future",
|
|
2301
|
-
},
|
|
2302
|
-
},
|
|
2303
|
-
null,
|
|
2304
|
-
2,
|
|
2305
|
-
)}\n`,
|
|
2306
|
-
);
|
|
2307
|
-
|
|
2308
|
-
const config = saveFooterSegmentsPatch({ modelInfo: true, tokens: false, cost: false }, path);
|
|
2309
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2310
|
-
|
|
2311
|
-
expect(config.footerSegments).toEqual({
|
|
2312
|
-
cwd: true,
|
|
2313
|
-
sessionName: true,
|
|
2314
|
-
gitBranch: true,
|
|
2315
|
-
gitStatus: true,
|
|
2316
|
-
runtime: true,
|
|
2317
|
-
modelInfo: true,
|
|
2318
|
-
context: true,
|
|
2319
|
-
gitCounts: false,
|
|
2320
|
-
sessionDuration: false,
|
|
2321
|
-
username: false,
|
|
2322
|
-
time: false,
|
|
2323
|
-
os: false,
|
|
2324
|
-
packageVersion: false,
|
|
2325
|
-
gitCommit: false,
|
|
2326
|
-
gitMetrics: true,
|
|
2327
|
-
tokens: false,
|
|
2328
|
-
cost: false,
|
|
2329
|
-
});
|
|
2330
|
-
expect(raw.unknown).toBe(true);
|
|
2331
|
-
expect(raw.footerSegments).toEqual({ cwd: true, futureKey: "future" });
|
|
2332
|
-
expect(raw.components.footer.styles.starship.segments).toMatchObject({
|
|
2333
|
-
cwd: true,
|
|
2334
|
-
modelInfo: true,
|
|
2335
|
-
tokens: false,
|
|
2336
|
-
cost: false,
|
|
2337
|
-
});
|
|
2338
|
-
expect(mergeConfig(raw).footerSegments.modelInfo).toBe(true);
|
|
2339
|
-
|
|
2340
|
-
const disabled = saveFooterSegmentsPatch({ modelInfo: false }, path);
|
|
2341
|
-
const disabledRaw = JSON.parse(readFileSync(path, "utf8"));
|
|
2342
|
-
expect(disabled.footerSegments.modelInfo).toBe(false);
|
|
2343
|
-
expect(mergeConfig(disabledRaw).footerSegments.modelInfo).toBe(false);
|
|
2344
|
-
expect(disabledRaw.unknown).toBe(true);
|
|
2345
|
-
expect(disabledRaw.footerSegments).toEqual({ cwd: true, futureKey: "future" });
|
|
2346
|
-
expect(disabledRaw.components.footer.styles.starship.segments).toMatchObject({
|
|
2347
|
-
modelInfo: false,
|
|
2348
|
-
tokens: false,
|
|
2349
|
-
cost: false,
|
|
2350
|
-
});
|
|
2351
|
-
} finally {
|
|
2352
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2353
|
-
}
|
|
2354
|
-
});
|
|
2355
|
-
|
|
2356
|
-
it("writes only the requested footer segment setting when creating zentui.json", () => {
|
|
2357
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2358
|
-
const path = join(dir, "zentui.json");
|
|
2359
|
-
try {
|
|
2360
|
-
const config = saveFooterSegmentsPatch({ runtime: false }, path);
|
|
2361
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2362
|
-
|
|
2363
|
-
expect(config.footerSegments).toEqual({
|
|
2364
|
-
cwd: true,
|
|
2365
|
-
sessionName: true,
|
|
2366
|
-
gitBranch: true,
|
|
2367
|
-
gitStatus: true,
|
|
2368
|
-
runtime: false,
|
|
2369
|
-
modelInfo: false,
|
|
2370
|
-
context: true,
|
|
2371
|
-
gitCounts: false,
|
|
2372
|
-
sessionDuration: false,
|
|
2373
|
-
username: false,
|
|
2374
|
-
time: false,
|
|
2375
|
-
os: false,
|
|
2376
|
-
packageVersion: false,
|
|
2377
|
-
gitCommit: false,
|
|
2378
|
-
gitMetrics: true,
|
|
2379
|
-
tokens: true,
|
|
2380
|
-
cost: true,
|
|
2381
|
-
});
|
|
2382
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2383
|
-
expect(raw.components.footer.styles.starship.segments.runtime).toBe(false);
|
|
2384
|
-
} finally {
|
|
2385
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2386
|
-
}
|
|
2387
|
-
});
|
|
2388
|
-
|
|
2389
|
-
it("toggles and persists the packageVersion footer segment", () => {
|
|
2390
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2391
|
-
const path = join(dir, "zentui.json");
|
|
2392
|
-
try {
|
|
2393
|
-
const config = saveFooterSegmentsPatch({ packageVersion: true }, path);
|
|
2394
|
-
expect(config.footerSegments.packageVersion).toBe(true);
|
|
2395
|
-
|
|
2396
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2397
|
-
expect(raw.components.footer.styles.starship.segments.packageVersion).toBe(true);
|
|
2398
|
-
|
|
2399
|
-
const reloaded = mergeConfig(raw);
|
|
2400
|
-
expect(reloaded.footerSegments.packageVersion).toBe(true);
|
|
2401
|
-
} finally {
|
|
2402
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2403
|
-
}
|
|
2404
|
-
});
|
|
2405
|
-
|
|
2406
|
-
it("toggles and persists gitCommit and gitMetrics footer segments", () => {
|
|
2407
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2408
|
-
const path = join(dir, "zentui.json");
|
|
2409
|
-
try {
|
|
2410
|
-
const config = saveFooterSegmentsPatch({ gitCommit: true, gitMetrics: true }, path);
|
|
2411
|
-
expect(config.footerSegments.gitCommit).toBe(true);
|
|
2412
|
-
expect(config.footerSegments.gitMetrics).toBe(true);
|
|
2413
|
-
|
|
2414
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2415
|
-
expect(raw.components.footer.styles.starship.segments).toMatchObject({
|
|
2416
|
-
gitCommit: true,
|
|
2417
|
-
gitMetrics: true,
|
|
2418
|
-
});
|
|
2419
|
-
|
|
2420
|
-
const reloaded = mergeConfig(raw);
|
|
2421
|
-
expect(reloaded.footerSegments.gitCommit).toBe(true);
|
|
2422
|
-
expect(reloaded.footerSegments.gitMetrics).toBe(true);
|
|
2423
|
-
} finally {
|
|
2424
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2425
|
-
}
|
|
2426
|
-
});
|
|
2427
|
-
|
|
2428
|
-
it("gitCommit config defaults and normalizes hashLength", () => {
|
|
2429
|
-
expect(defaultConfig.gitCommit).toEqual({ hashLength: 7, onlyDetached: true, showTag: true });
|
|
2430
|
-
expect(mergeConfig({ gitCommit: { hashLength: 3 } }).gitCommit.hashLength).toBe(4);
|
|
2431
|
-
expect(mergeConfig({ gitCommit: { hashLength: 100 } }).gitCommit.hashLength).toBe(40);
|
|
2432
|
-
expect(mergeConfig({ gitCommit: { hashLength: 10 } }).gitCommit.hashLength).toBe(10);
|
|
2433
|
-
expect(mergeConfig({ gitCommit: { onlyDetached: false } }).gitCommit.onlyDetached).toBe(false);
|
|
2434
|
-
expect(mergeConfig({ gitCommit: { showTag: false } }).gitCommit.showTag).toBe(false);
|
|
2435
|
-
// Missing fields fall back to defaults.
|
|
2436
|
-
expect(mergeConfig({ gitCommit: {} }).gitCommit).toEqual({
|
|
2437
|
-
hashLength: 7,
|
|
2438
|
-
onlyDetached: true,
|
|
2439
|
-
showTag: true,
|
|
2440
|
-
});
|
|
2441
|
-
});
|
|
2442
|
-
|
|
2443
|
-
it("gitMetrics config defaults", () => {
|
|
2444
|
-
expect(defaultConfig.gitMetrics).toEqual({ onlyNonzero: true, ignoreSubmodules: false });
|
|
2445
|
-
expect(mergeConfig({ gitMetrics: { onlyNonzero: false } }).gitMetrics.onlyNonzero).toBe(false);
|
|
2446
|
-
expect(
|
|
2447
|
-
mergeConfig({ gitMetrics: { ignoreSubmodules: true } }).gitMetrics.ignoreSubmodules,
|
|
2448
|
-
).toBe(true);
|
|
2449
|
-
});
|
|
2450
|
-
|
|
2451
|
-
it("writes and reads back footerFormat", () => {
|
|
2452
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2453
|
-
const path = join(dir, "zentui.json");
|
|
2454
|
-
try {
|
|
2455
|
-
const config = saveFooterFormatPatch("$cwd on $git_branch $fill $cost", path);
|
|
2456
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2457
|
-
|
|
2458
|
-
expect(config.footerFormat).toBe("$cwd on $git_branch $fill $cost");
|
|
2459
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2460
|
-
expect(raw.components.footer.styles.starship.format).toBe("$cwd on $git_branch $fill $cost");
|
|
2461
|
-
} finally {
|
|
2462
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2463
|
-
}
|
|
2464
|
-
});
|
|
2465
|
-
|
|
2466
|
-
it("clears footerFormat when saving empty string", () => {
|
|
2467
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2468
|
-
const path = join(dir, "zentui.json");
|
|
2469
|
-
try {
|
|
2470
|
-
const config = saveFooterFormatPatch("", path);
|
|
2471
|
-
expect(config.footerFormat).toBe("");
|
|
2472
|
-
} finally {
|
|
2473
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2474
|
-
}
|
|
2475
|
-
});
|
|
2476
|
-
|
|
2477
|
-
it("saves extension status placement when creating zentui.json", () => {
|
|
2478
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2479
|
-
const path = join(dir, "zentui.json");
|
|
2480
|
-
try {
|
|
2481
|
-
const config = saveExtensionStatusPlacement("plugin.key", "middle", path);
|
|
2482
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2483
|
-
|
|
2484
|
-
expect(config.extensionStatuses.placements).toEqual({ "plugin.key": "middle" });
|
|
2485
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2486
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.placements).toEqual({
|
|
2487
|
-
"plugin.key": "middle",
|
|
2488
|
-
});
|
|
2489
|
-
} finally {
|
|
2490
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2491
|
-
}
|
|
2492
|
-
});
|
|
2493
|
-
|
|
2494
|
-
it("saves extension status color mode when creating zentui.json", () => {
|
|
2495
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2496
|
-
const path = join(dir, "zentui.json");
|
|
2497
|
-
try {
|
|
2498
|
-
const config = saveExtensionStatusColorMode("plugin.key", "original", path);
|
|
2499
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2500
|
-
|
|
2501
|
-
expect(config.extensionStatuses.colorModes).toEqual({ "plugin.key": "original" });
|
|
2502
|
-
expect(Object.keys(raw)).toEqual(["components"]);
|
|
2503
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.colorModes).toEqual({
|
|
2504
|
-
"plugin.key": "original",
|
|
2505
|
-
});
|
|
2506
|
-
} finally {
|
|
2507
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2508
|
-
}
|
|
2509
|
-
});
|
|
2510
|
-
|
|
2511
|
-
it("saves extension status color mode without erasing placement config", () => {
|
|
2512
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2513
|
-
const path = join(dir, "zentui.json");
|
|
2514
|
-
try {
|
|
2515
|
-
writeFileSync(
|
|
2516
|
-
path,
|
|
2517
|
-
`${JSON.stringify(
|
|
2518
|
-
{
|
|
2519
|
-
unknown: true,
|
|
2520
|
-
colors: { futureKey: "future" },
|
|
2521
|
-
extensionStatuses: {
|
|
2522
|
-
defaultPlacement: "left",
|
|
2523
|
-
futureKey: "future",
|
|
2524
|
-
placements: {
|
|
2525
|
-
alpha: "right",
|
|
2526
|
-
invalid: "center",
|
|
2527
|
-
},
|
|
2528
|
-
colorModes: {
|
|
2529
|
-
alpha: "zentui",
|
|
2530
|
-
invalid: "muted",
|
|
2531
|
-
},
|
|
2532
|
-
},
|
|
2533
|
-
},
|
|
2534
|
-
null,
|
|
2535
|
-
2,
|
|
2536
|
-
)}\n`,
|
|
2537
|
-
);
|
|
2538
|
-
|
|
2539
|
-
const config = saveExtensionStatusColorMode("beta", "original", path);
|
|
2540
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2541
|
-
|
|
2542
|
-
expect(config.extensionStatuses).toEqual({
|
|
2543
|
-
defaultPlacement: "left",
|
|
2544
|
-
placements: { alpha: "right" },
|
|
2545
|
-
colorModes: { alpha: "zentui", beta: "original" },
|
|
2546
|
-
});
|
|
2547
|
-
expect(raw.unknown).toBe(true);
|
|
2548
|
-
expect(raw.colors.futureKey).toBe("future");
|
|
2549
|
-
expect(raw.extensionStatuses.futureKey).toBe("future");
|
|
2550
|
-
expect(raw.extensionStatuses.placements).toEqual({
|
|
2551
|
-
alpha: "right",
|
|
2552
|
-
invalid: "center",
|
|
2553
|
-
});
|
|
2554
|
-
expect(raw.extensionStatuses.colorModes).toEqual({
|
|
2555
|
-
alpha: "zentui",
|
|
2556
|
-
invalid: "muted",
|
|
2557
|
-
});
|
|
2558
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.colorModes).toEqual({
|
|
2559
|
-
alpha: "zentui",
|
|
2560
|
-
beta: "original",
|
|
2561
|
-
});
|
|
2562
|
-
} finally {
|
|
2563
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2564
|
-
}
|
|
2565
|
-
});
|
|
2566
|
-
|
|
2567
|
-
it("saves extension status placement without erasing unknown user config", () => {
|
|
2568
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-config-"));
|
|
2569
|
-
const path = join(dir, "zentui.json");
|
|
2570
|
-
try {
|
|
2571
|
-
writeFileSync(
|
|
2572
|
-
path,
|
|
2573
|
-
`${JSON.stringify(
|
|
2574
|
-
{
|
|
2575
|
-
unknown: true,
|
|
2576
|
-
colors: { futureKey: "future" },
|
|
2577
|
-
extensionStatuses: {
|
|
2578
|
-
defaultPlacement: "left",
|
|
2579
|
-
futureKey: "future",
|
|
2580
|
-
placements: {
|
|
2581
|
-
alpha: "right",
|
|
2582
|
-
invalid: "center",
|
|
2583
|
-
},
|
|
2584
|
-
},
|
|
2585
|
-
},
|
|
2586
|
-
null,
|
|
2587
|
-
2,
|
|
2588
|
-
)}\n`,
|
|
2589
|
-
);
|
|
2590
|
-
|
|
2591
|
-
const config = saveExtensionStatusPlacement("beta", "off", path);
|
|
2592
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2593
|
-
|
|
2594
|
-
expect(config.extensionStatuses).toEqual({
|
|
2595
|
-
defaultPlacement: "left",
|
|
2596
|
-
placements: { alpha: "right", beta: "off" },
|
|
2597
|
-
colorModes: {},
|
|
2598
|
-
});
|
|
2599
|
-
expect(raw.unknown).toBe(true);
|
|
2600
|
-
expect(raw.colors.futureKey).toBe("future");
|
|
2601
|
-
expect(raw.extensionStatuses.futureKey).toBe("future");
|
|
2602
|
-
expect(raw.extensionStatuses.placements).toEqual({
|
|
2603
|
-
alpha: "right",
|
|
2604
|
-
invalid: "center",
|
|
2605
|
-
});
|
|
2606
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.placements).toEqual({
|
|
2607
|
-
alpha: "right",
|
|
2608
|
-
beta: "off",
|
|
2609
|
-
});
|
|
2610
|
-
} finally {
|
|
2611
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2612
|
-
}
|
|
2613
|
-
});
|
|
2614
|
-
});
|
|
2615
|
-
|
|
2616
|
-
describe("renderTerminalStyle", () => {
|
|
2617
|
-
it("renders Starship bold green with terminal palette ANSI codes", () => {
|
|
2618
|
-
expect(renderTerminalStyle("bold green", " v22.0.0")).toBe("\u001b[1;32m v22.0.0\u001b[0m");
|
|
2619
|
-
});
|
|
2620
|
-
|
|
2621
|
-
it("supports 256-color, fg/bg aliases, dimmed, and Starship hex styles", () => {
|
|
2622
|
-
expect(renderTerminalStyle("bold 149", "C")).toBe("\u001b[1;38;5;149mC\u001b[0m");
|
|
2623
|
-
expect(renderTerminalStyle("bold fg:202", "Haxe")).toBe("\u001b[1;38;5;202mHaxe\u001b[0m");
|
|
2624
|
-
expect(renderTerminalStyle("red dimmed", "Java")).toBe("\u001b[31;2mJava\u001b[0m");
|
|
2625
|
-
expect(renderTerminalStyle("bg:blue fg:bright-green", "ok")).toBe("\u001b[44;92mok\u001b[0m");
|
|
2626
|
-
expect(renderTerminalStyle("bold #FFAFF3", "Gleam")).toBe(
|
|
2627
|
-
"\u001b[1;38;2;255;175;243mGleam\u001b[0m",
|
|
2628
|
-
);
|
|
2629
|
-
});
|
|
2630
|
-
});
|
|
2631
|
-
|
|
2632
|
-
describe("style rendering", () => {
|
|
2633
|
-
const theme = {
|
|
2634
|
-
fg(token: string, text: string) {
|
|
2635
|
-
return `<${token}>${text}</${token}>`;
|
|
2636
|
-
},
|
|
2637
|
-
};
|
|
2638
|
-
|
|
2639
|
-
it("uses theme tokens when provided to colorize", () => {
|
|
2640
|
-
expect(colorize(theme, "accent", "hello")).toBe("<accent>hello</accent>");
|
|
2641
|
-
});
|
|
2642
|
-
|
|
2643
|
-
it("falls back to plain text for invalid theme tokens", () => {
|
|
2644
|
-
const throwingTheme = {
|
|
2645
|
-
fg(token: string, text: string) {
|
|
2646
|
-
if (token === "text") return `<text>${text}</text>`;
|
|
2647
|
-
throw new Error(`Unknown color: ${token}`);
|
|
2648
|
-
},
|
|
2649
|
-
};
|
|
2650
|
-
|
|
2651
|
-
expect(colorize(throwingTheme, "doesNotExist", "hello")).toBe("hello");
|
|
2652
|
-
expect(renderStyle(throwingTheme, "doesNotExist", "hello")).toBe("hello");
|
|
2653
|
-
expect(renderStyleForSource(throwingTheme, "theme", "doesNotExist", "hello")).toBe("hello");
|
|
2654
|
-
});
|
|
2655
|
-
|
|
2656
|
-
it("maps Starship modifiers to safe theme colors when the theme rejects unknown tokens", () => {
|
|
2657
|
-
const strictTheme = {
|
|
2658
|
-
fg(token: string, text: string) {
|
|
2659
|
-
if (!["muted", "syntaxKeyword", "text"].includes(token)) {
|
|
2660
|
-
throw new Error(`Unknown theme color: ${token}`);
|
|
2661
|
-
}
|
|
2662
|
-
return `<${token}>${text}</${token}>`;
|
|
2663
|
-
},
|
|
2664
|
-
bold(text: string) {
|
|
2665
|
-
return `<bold>${text}</bold>`;
|
|
2666
|
-
},
|
|
2667
|
-
};
|
|
2668
|
-
|
|
2669
|
-
expect(renderStyleForSource(strictTheme, "theme", "dimmed", "tokens")).toBe(
|
|
2670
|
-
"<muted>tokens</muted>",
|
|
2671
|
-
);
|
|
2672
|
-
expect(renderStyleForSource(strictTheme, "theme", "bold purple", "git")).toBe(
|
|
2673
|
-
"<syntaxKeyword><bold>git</bold></syntaxKeyword>",
|
|
2674
|
-
);
|
|
2675
|
-
expect(renderStyleForSource(strictTheme, "theme", "unknownColor", "text")).toBe("text");
|
|
2676
|
-
});
|
|
2677
|
-
|
|
2678
|
-
it("supports hex colors", () => {
|
|
2679
|
-
expect(colorize(theme, "#89b4fa", "hello")).toBe("\u001b[38;2;137;180;250mhello\u001b[39m");
|
|
2680
|
-
});
|
|
2681
|
-
|
|
2682
|
-
it("supports short #rgb hex colors by expanding to rrggbb", () => {
|
|
2683
|
-
expect(colorize(theme, "#89b", "hello")).toBe("\u001b[38;2;136;153;187mhello\u001b[39m");
|
|
2684
|
-
expect(renderTerminalStyle("bold #89b", "x")).toBe("\u001b[1;38;2;136;153;187mx\u001b[0m");
|
|
2685
|
-
});
|
|
2686
|
-
|
|
2687
|
-
it("renders Starship styles before falling back to theme tokens", () => {
|
|
2688
|
-
expect(renderStyle(theme, "bold purple", "git")).toBe("\u001b[1;35mgit\u001b[0m");
|
|
2689
|
-
expect(renderStyle(theme, "syntaxKeyword", "git")).toBe("<syntaxKeyword>git</syntaxKeyword>");
|
|
2690
|
-
});
|
|
2691
|
-
|
|
2692
|
-
it("renders theme-source Starship colors through Pi theme tokens", () => {
|
|
2693
|
-
expect(renderStyleForSource(theme, "theme", "bold cyan", "cwd")).toBe(
|
|
2694
|
-
"<syntaxFunction>cwd</syntaxFunction>",
|
|
2695
|
-
);
|
|
2696
|
-
expect(renderStyleForSource(theme, "theme", "bold purple", "git")).toBe(
|
|
2697
|
-
"<syntaxKeyword>git</syntaxKeyword>",
|
|
2698
|
-
);
|
|
2699
|
-
expect(renderStyleForSource(theme, "theme", "bold red", "!")).toBe("<error>!</error>");
|
|
2700
|
-
expect(renderStyleForSource(theme, "theme", "dimmed", "tokens")).toBe("<muted>tokens</muted>");
|
|
2701
|
-
expect(renderStyleForSource(theme, "theme", "bold green", "cost")).toBe(
|
|
2702
|
-
"<success>cost</success>",
|
|
2703
|
-
);
|
|
2704
|
-
expect(renderStyleForSource(theme, "theme", "syntaxKeyword", "git")).toBe(
|
|
2705
|
-
"<syntaxKeyword>git</syntaxKeyword>",
|
|
2706
|
-
);
|
|
2707
|
-
});
|
|
2708
|
-
|
|
2709
|
-
it("keeps explicit terminal styles available for terminal source", () => {
|
|
2710
|
-
expect(renderStyleForSource(theme, "terminal", "bold purple", "git")).toBe(
|
|
2711
|
-
"\u001b[1;35mgit\u001b[0m",
|
|
2712
|
-
);
|
|
2713
|
-
expect(renderStyleForSource(theme, "theme", "fg:202", "git")).toBe(
|
|
2714
|
-
"\u001b[38;5;202mgit\u001b[0m",
|
|
2715
|
-
);
|
|
2716
|
-
});
|
|
2717
|
-
|
|
2718
|
-
it("renders theme borders with borderMuted and terminal borders with bright black", () => {
|
|
2719
|
-
const thinkingTheme = {
|
|
2720
|
-
fg(token: string, text: string) {
|
|
2721
|
-
return `<${token}>${text}</${token}>`;
|
|
2722
|
-
},
|
|
2723
|
-
};
|
|
2724
|
-
|
|
2725
|
-
expect(renderChromeBorder(thinkingTheme, "theme", "bright-black", "────")).toBe(
|
|
2726
|
-
"<borderMuted>────</borderMuted>",
|
|
2727
|
-
);
|
|
2728
|
-
expect(renderChromeBorder(thinkingTheme, "terminal", "bright-black", "────")).toBe(
|
|
2729
|
-
"\u001b[90m────\u001b[0m",
|
|
2730
|
-
);
|
|
2731
|
-
});
|
|
2732
|
-
});
|
|
2733
|
-
|
|
2734
|
-
describe("bounded settings persistence", () => {
|
|
2735
|
-
function withConfig(initial: Record<string, unknown>, assertions: (path: string) => void): void {
|
|
2736
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-bounded-config-"));
|
|
2737
|
-
const path = join(dir, "zentui.json");
|
|
2738
|
-
try {
|
|
2739
|
-
writeFileSync(path, `${JSON.stringify(initial, null, 2)}\n`);
|
|
2740
|
-
assertions(path);
|
|
2741
|
-
} finally {
|
|
2742
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
it("saves editorModelLabel while preserving unrelated root config", () => {
|
|
2747
|
-
withConfig({ editorModelLabel: "id", unknown: { keep: true } }, (path) => {
|
|
2748
|
-
const config = saveEditorModelLabel("name", path);
|
|
2749
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2750
|
-
expect(config.editorModelLabel).toBe("name");
|
|
2751
|
-
expect(raw.editorModelLabel).toBe("id");
|
|
2752
|
-
expect(raw.unknown).toEqual({ keep: true });
|
|
2753
|
-
expect(raw.components.editor.modelLabel).toBe("name");
|
|
2754
|
-
expect(raw.components.footer.modelLabel).toBe("name");
|
|
2755
|
-
});
|
|
2756
|
-
});
|
|
2757
|
-
|
|
2758
|
-
it("saves git commit booleans while preserving hashLength and unknown siblings", () => {
|
|
2759
|
-
withConfig(
|
|
2760
|
-
{
|
|
2761
|
-
unknown: true,
|
|
2762
|
-
gitCommit: { hashLength: 12, onlyDetached: true, showTag: true, future: "keep" },
|
|
2763
|
-
},
|
|
2764
|
-
(path) => {
|
|
2765
|
-
const config = saveGitCommitPatch({ onlyDetached: false, showTag: false }, path);
|
|
2766
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2767
|
-
expect(config.gitCommit).toEqual({ hashLength: 12, onlyDetached: false, showTag: false });
|
|
2768
|
-
expect(raw.gitCommit).toEqual({
|
|
2769
|
-
hashLength: 12,
|
|
2770
|
-
onlyDetached: true,
|
|
2771
|
-
showTag: true,
|
|
2772
|
-
future: "keep",
|
|
2773
|
-
});
|
|
2774
|
-
expect(raw.components.footer.styles.starship.gitCommit).toEqual({
|
|
2775
|
-
hashLength: 12,
|
|
2776
|
-
onlyDetached: false,
|
|
2777
|
-
showTag: false,
|
|
2778
|
-
});
|
|
2779
|
-
expect(raw.unknown).toBe(true);
|
|
2780
|
-
},
|
|
2781
|
-
);
|
|
2782
|
-
});
|
|
2783
|
-
|
|
2784
|
-
it("saves git metrics booleans while preserving unknown siblings", () => {
|
|
2785
|
-
withConfig(
|
|
2786
|
-
{ unknown: true, gitMetrics: { onlyNonzero: true, ignoreSubmodules: false, future: 1 } },
|
|
2787
|
-
(path) => {
|
|
2788
|
-
const config = saveGitMetricsPatch({ onlyNonzero: false, ignoreSubmodules: true }, path);
|
|
2789
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2790
|
-
expect(config.gitMetrics).toEqual({ onlyNonzero: false, ignoreSubmodules: true });
|
|
2791
|
-
expect(raw.gitMetrics).toEqual({
|
|
2792
|
-
onlyNonzero: true,
|
|
2793
|
-
ignoreSubmodules: false,
|
|
2794
|
-
future: 1,
|
|
2795
|
-
});
|
|
2796
|
-
expect(raw.components.footer.styles.starship.gitMetrics).toEqual({
|
|
2797
|
-
onlyNonzero: false,
|
|
2798
|
-
ignoreSubmodules: true,
|
|
2799
|
-
});
|
|
2800
|
-
expect(raw.unknown).toBe(true);
|
|
2801
|
-
},
|
|
2802
|
-
);
|
|
2803
|
-
});
|
|
2804
|
-
|
|
2805
|
-
it("saves default extension placement while preserving keyed and unknown config", () => {
|
|
2806
|
-
withConfig(
|
|
2807
|
-
{
|
|
2808
|
-
unknown: true,
|
|
2809
|
-
extensionStatuses: {
|
|
2810
|
-
defaultPlacement: "right",
|
|
2811
|
-
placements: { alpha: "left" },
|
|
2812
|
-
colorModes: { alpha: "original" },
|
|
2813
|
-
future: "keep",
|
|
2814
|
-
},
|
|
2815
|
-
},
|
|
2816
|
-
(path) => {
|
|
2817
|
-
const config = saveExtensionStatusDefaultPlacement("middle", path);
|
|
2818
|
-
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
2819
|
-
expect(config.extensionStatuses).toEqual({
|
|
2820
|
-
defaultPlacement: "middle",
|
|
2821
|
-
placements: { alpha: "left" },
|
|
2822
|
-
colorModes: { alpha: "original" },
|
|
2823
|
-
});
|
|
2824
|
-
expect(raw.extensionStatuses.future).toBe("keep");
|
|
2825
|
-
expect(raw.extensionStatuses.placements).toEqual({ alpha: "left" });
|
|
2826
|
-
expect(raw.extensionStatuses.colorModes).toEqual({ alpha: "original" });
|
|
2827
|
-
expect(raw.components.footer.styles.starship.extensionStatuses.defaultPlacement).toBe(
|
|
2828
|
-
"middle",
|
|
2829
|
-
);
|
|
2830
|
-
expect(raw.unknown).toBe(true);
|
|
2831
|
-
},
|
|
2832
|
-
);
|
|
2833
|
-
});
|
|
2834
|
-
});
|
|
2835
|
-
|
|
2836
|
-
describe("startup and file safety", () => {
|
|
2837
|
-
it("does not create, rewrite, or materialize config at startup", () => {
|
|
2838
|
-
withConfig(undefined, (path) => {
|
|
2839
|
-
ensureConfigExists(path);
|
|
2840
|
-
expect(existsSync(path)).toBe(false);
|
|
2841
|
-
});
|
|
2842
|
-
withConfig({ features: { editor: false }, unknown: true }, (path) => {
|
|
2843
|
-
const before = readFileSync(path, "utf8");
|
|
2844
|
-
ensureConfigExists(path);
|
|
2845
|
-
expect(readFileSync(path, "utf8")).toBe(before);
|
|
2846
|
-
expect(readRaw(path)).not.toHaveProperty("components");
|
|
2847
|
-
});
|
|
2848
|
-
});
|
|
2849
|
-
|
|
2850
|
-
it("refuses corrupt config without changing bytes or leaving a temporary file", () => {
|
|
2851
|
-
withConfig(undefined, (path, dir) => {
|
|
2852
|
-
const original = "{ invalid json\n";
|
|
2853
|
-
writeFileSync(path, original);
|
|
2854
|
-
expect(() => saveSeparatorPatch("dot", path)).toThrow(
|
|
2855
|
-
/Refusing to save Zentui config.*corrupt/,
|
|
2856
|
-
);
|
|
2857
|
-
expect(readFileSync(path, "utf8")).toBe(original);
|
|
2858
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2859
|
-
});
|
|
2860
|
-
});
|
|
2861
|
-
|
|
2862
|
-
it("creates a missing config atomically and returns the re-merged file", () => {
|
|
2863
|
-
withConfig(undefined, (path, dir) => {
|
|
2864
|
-
const config = saveFooterFormatPatch("$cwd", path);
|
|
2865
|
-
const raw = readRaw(path);
|
|
2866
|
-
expect(raw.components.footer.styles.starship.format).toBe("$cwd");
|
|
2867
|
-
expect(raw).not.toHaveProperty("fixedEditor");
|
|
2868
|
-
expect(raw).not.toHaveProperty("layout.fixedEditor");
|
|
2869
|
-
expect(config).toEqual(mergeConfig(raw));
|
|
2870
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2871
|
-
});
|
|
2872
|
-
});
|
|
2873
|
-
|
|
2874
|
-
it("preserves destination mode during atomic replacement", () => {
|
|
2875
|
-
withConfig({ separator: "pipe" }, (path, dir) => {
|
|
2876
|
-
chmodSync(path, 0o600);
|
|
2877
|
-
saveSeparatorPatch("dot", path);
|
|
2878
|
-
expect(statSync(path).mode & 0o777).toBe(0o600);
|
|
2879
|
-
expect(readRaw(path).components.footer.styles.starship.separator).toBe("dot");
|
|
2880
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2881
|
-
});
|
|
2882
|
-
});
|
|
2883
|
-
|
|
2884
|
-
it("updates a symlink target atomically without replacing the symlink", () => {
|
|
2885
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-symlink-config-"));
|
|
2886
|
-
const targetDir = join(dir, "target");
|
|
2887
|
-
const targetPath = join(targetDir, "actual.json");
|
|
2888
|
-
const linkPath = join(dir, "zentui.json");
|
|
2889
|
-
try {
|
|
2890
|
-
mkdirSync(targetDir);
|
|
2891
|
-
writeFileSync(targetPath, `${JSON.stringify({ unknown: true }, null, 2)}\n`);
|
|
2892
|
-
chmodSync(targetPath, 0o600);
|
|
2893
|
-
symlinkSync(targetPath, linkPath);
|
|
2894
|
-
const originalLink = readlinkSync(linkPath);
|
|
2895
|
-
const config = saveSeparatorPatch("chevron", linkPath);
|
|
2896
|
-
const raw = readRaw(targetPath);
|
|
2897
|
-
expect(lstatSync(linkPath).isSymbolicLink()).toBe(true);
|
|
2898
|
-
expect(readlinkSync(linkPath)).toBe(originalLink);
|
|
2899
|
-
expect(raw.unknown).toBe(true);
|
|
2900
|
-
expect(raw.components.footer.styles.starship.separator).toBe("chevron");
|
|
2901
|
-
expect(config).toEqual(mergeConfig(raw));
|
|
2902
|
-
expect(statSync(targetPath).mode & 0o777).toBe(0o600);
|
|
2903
|
-
expect(configTempFiles(targetDir, "actual.json")).toEqual([]);
|
|
2904
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2905
|
-
} finally {
|
|
2906
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2907
|
-
}
|
|
2908
|
-
});
|
|
2909
|
-
|
|
2910
|
-
it("refuses a dangling symlink without changing it", () => {
|
|
2911
|
-
const dir = mkdtempSync(join(tmpdir(), "zentui-dangling-config-"));
|
|
2912
|
-
const targetDir = join(dir, "target");
|
|
2913
|
-
const missingTarget = join(targetDir, "missing.json");
|
|
2914
|
-
const linkPath = join(dir, "zentui.json");
|
|
2915
|
-
try {
|
|
2916
|
-
mkdirSync(targetDir);
|
|
2917
|
-
symlinkSync(missingTarget, linkPath);
|
|
2918
|
-
const originalLink = readlinkSync(linkPath);
|
|
2919
|
-
expect(() => saveSeparatorPatch("dot", linkPath)).toThrow(/Refusing to save Zentui config/);
|
|
2920
|
-
expect(lstatSync(linkPath).isSymbolicLink()).toBe(true);
|
|
2921
|
-
expect(readlinkSync(linkPath)).toBe(originalLink);
|
|
2922
|
-
expect(existsSync(missingTarget)).toBe(false);
|
|
2923
|
-
expect(configTempFiles(targetDir, "missing.json")).toEqual([]);
|
|
2924
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2925
|
-
} finally {
|
|
2926
|
-
rmSync(dir, { recursive: true, force: true });
|
|
2927
|
-
}
|
|
2928
|
-
});
|
|
2929
|
-
|
|
2930
|
-
it("keeps the destination and leaves no temp file when serialization input is invalid", () => {
|
|
2931
|
-
withConfig({ unknown: true }, (path, dir) => {
|
|
2932
|
-
const original = readFileSync(path, "utf8");
|
|
2933
|
-
expect(() => saveContextThresholdsPatch({ warning: 1n as never }, path)).toThrow();
|
|
2934
|
-
expect(readFileSync(path, "utf8")).toBe(original);
|
|
2935
|
-
expect(configTempFiles(dir)).toEqual([]);
|
|
2936
|
-
});
|
|
2937
|
-
});
|
|
2938
|
-
});
|
|
2939
|
-
|
|
2940
|
-
describe("Opencode and Footer follow-up migration", () => {
|
|
2941
|
-
it("resolves canonical and alias editor metadata in documented precedence", () => {
|
|
2942
|
-
const config = mergeConfig({
|
|
2943
|
-
editorMetadataFormat: "$flat",
|
|
2944
|
-
components: {
|
|
2945
|
-
editor: {
|
|
2946
|
-
styles: {
|
|
2947
|
-
opencode: { metadataFormat: "$canonical" },
|
|
2948
|
-
polished: { metadataFormat: "$alias" },
|
|
2949
|
-
"polished-copy-friendly": { metadataFormat: "$alias-copy" },
|
|
2950
|
-
},
|
|
2951
|
-
},
|
|
2952
|
-
},
|
|
2953
|
-
});
|
|
2954
|
-
expect(config.components.editor.styles.opencode.metadataFormat).toBe("$canonical");
|
|
2955
|
-
expect(config.components.editor.styles["opencode-copy-friendly"].metadataFormat).toBe(
|
|
2956
|
-
"$alias-copy",
|
|
2957
|
-
);
|
|
2958
|
-
expect(
|
|
2959
|
-
mergeConfig({
|
|
2960
|
-
editorMetadataFormat: "$flat",
|
|
2961
|
-
components: { editor: { styles: { polished: { metadataFormat: "$alias" } } } },
|
|
2962
|
-
}).components.editor.styles.opencode.metadataFormat,
|
|
2963
|
-
).toBe("$alias");
|
|
2964
|
-
});
|
|
2965
|
-
|
|
2966
|
-
it("resolves Footer style from valid style, enabled, released statusLine, then default", () => {
|
|
2967
|
-
expect(
|
|
2968
|
-
mergeConfig({
|
|
2969
|
-
features: { statusLine: false },
|
|
2970
|
-
components: { footer: { style: "hidden", enabled: true } },
|
|
2971
|
-
}).components.footer.style,
|
|
2972
|
-
).toBe("hidden");
|
|
2973
|
-
expect(
|
|
2974
|
-
mergeConfig({
|
|
2975
|
-
features: { statusLine: true },
|
|
2976
|
-
components: { footer: { style: "future", enabled: false } },
|
|
2977
|
-
}).components.footer.style,
|
|
2978
|
-
).toBe("native");
|
|
2979
|
-
expect(mergeConfig({ features: { statusLine: false } }).components.footer.style).toBe("native");
|
|
2980
|
-
expect(mergeConfig({}).components.footer.style).toBe("native");
|
|
2981
|
-
expect(mergeConfig({ components: { footer: { style: "hidden" } } }).features.statusLine).toBe(
|
|
2982
|
-
false,
|
|
2983
|
-
);
|
|
2984
|
-
});
|
|
2985
|
-
|
|
2986
|
-
it("saves Footer styles canonically and removes only obsolete enabled", () => {
|
|
2987
|
-
withConfig(
|
|
2988
|
-
{
|
|
2989
|
-
features: { statusLine: true, future: "keep" },
|
|
2990
|
-
components: {
|
|
2991
|
-
footer: {
|
|
2992
|
-
enabled: true,
|
|
2993
|
-
future: "keep",
|
|
2994
|
-
styles: { starship: { format: "$cwd", future: "keep" }, future: { keep: true } },
|
|
2995
|
-
},
|
|
2996
|
-
},
|
|
2997
|
-
},
|
|
2998
|
-
(path) => {
|
|
2999
|
-
saveFooterComponentPatch({ style: "hidden" }, path);
|
|
3000
|
-
const raw = readRaw(path);
|
|
3001
|
-
expect(raw.components.footer.style).toBe("hidden");
|
|
3002
|
-
expect(raw.components.footer).not.toHaveProperty("enabled");
|
|
3003
|
-
expect(raw.components.footer.future).toBe("keep");
|
|
3004
|
-
expect(raw.components.footer.styles.starship).toMatchObject({
|
|
3005
|
-
format: "$cwd",
|
|
3006
|
-
future: "keep",
|
|
3007
|
-
});
|
|
3008
|
-
expect(raw.components.footer.styles.future).toEqual({ keep: true });
|
|
3009
|
-
expect(raw.features).toEqual({ statusLine: true, future: "keep" });
|
|
3010
|
-
},
|
|
3011
|
-
);
|
|
3012
|
-
});
|
|
3013
|
-
|
|
3014
|
-
it("keeps saveUiFeaturesPatch as a Starship/Native compatibility API", () => {
|
|
3015
|
-
withConfig({ components: { footer: { style: "hidden" } } }, (path) => {
|
|
3016
|
-
expect(saveUiFeaturesPatch({ statusLine: true }, path).components.footer.style).toBe(
|
|
3017
|
-
"starship",
|
|
3018
|
-
);
|
|
3019
|
-
expect(saveUiFeaturesPatch({ statusLine: false }, path).components.footer.style).toBe(
|
|
3020
|
-
"native",
|
|
3021
|
-
);
|
|
3022
|
-
});
|
|
3023
|
-
});
|
|
3024
|
-
|
|
3025
|
-
it("ignores inherited extension-status overrides and validates runtime mutations", () => {
|
|
3026
|
-
const config = structuredClone(defaultConfig);
|
|
3027
|
-
const statuses = config.components.footer.styles.starship.extensionStatuses;
|
|
3028
|
-
statuses.placements = Object.create({ constructor: "left" }) as Record<
|
|
3029
|
-
string,
|
|
3030
|
-
(typeof statuses.placements)[string]
|
|
3031
|
-
>;
|
|
3032
|
-
statuses.colorModes = Object.create({ constructor: "original" }) as Record<
|
|
3033
|
-
string,
|
|
3034
|
-
(typeof statuses.colorModes)[string]
|
|
3035
|
-
>;
|
|
3036
|
-
expect(getExtensionStatusPlacement(config, "constructor")).toBe("right");
|
|
3037
|
-
expect(getExtensionStatusColorMode(config, "constructor")).toBe("zentui");
|
|
3038
|
-
|
|
3039
|
-
Object.defineProperty(statuses.placements, "constructor", {
|
|
3040
|
-
value: "left",
|
|
3041
|
-
enumerable: true,
|
|
3042
|
-
configurable: true,
|
|
3043
|
-
});
|
|
3044
|
-
Object.defineProperty(statuses.colorModes, "constructor", {
|
|
3045
|
-
value: "original",
|
|
3046
|
-
enumerable: true,
|
|
3047
|
-
configurable: true,
|
|
3048
|
-
});
|
|
3049
|
-
expect(getExtensionStatusPlacement(config, "constructor")).toBe("left");
|
|
3050
|
-
expect(getExtensionStatusColorMode(config, "constructor")).toBe("original");
|
|
3051
|
-
|
|
3052
|
-
(statuses as unknown as { defaultPlacement: string }).defaultPlacement = "center";
|
|
3053
|
-
(statuses.placements as unknown as Record<string, string>).alpha = "explode";
|
|
3054
|
-
(statuses.colorModes as unknown as Record<string, string>).alpha = "rainbow";
|
|
3055
|
-
expect(getExtensionStatusPlacement(config, "missing")).toBe("right");
|
|
3056
|
-
expect(getExtensionStatusPlacement(config, "alpha")).toBe("right");
|
|
3057
|
-
expect(getExtensionStatusColorMode(config, "alpha")).toBe("zentui");
|
|
3058
|
-
});
|
|
3059
|
-
|
|
3060
|
-
it("marks only explicit non-empty unknown canonical component styles", () => {
|
|
3061
|
-
const future = mergeConfig({
|
|
3062
|
-
components: {
|
|
3063
|
-
editor: { style: "future-editor" },
|
|
3064
|
-
userMessages: { style: "future-messages" },
|
|
3065
|
-
selectorBorders: { style: "future-selectors" },
|
|
3066
|
-
footer: { style: "future-footer" },
|
|
3067
|
-
},
|
|
3068
|
-
});
|
|
3069
|
-
for (const owner of ["editor", "userMessages", "selectorBorders", "footer"] as const) {
|
|
3070
|
-
expect(hasUnsupportedComponentStyle(future, owner)).toBe(true);
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
for (const style of [undefined, "", " ", null, false, {}, []]) {
|
|
3074
|
-
const ordinary = mergeConfig({ components: { editor: { style } } });
|
|
3075
|
-
expect(hasUnsupportedComponentStyle(ordinary, "editor")).toBe(false);
|
|
3076
|
-
}
|
|
3077
|
-
expect(
|
|
3078
|
-
hasUnsupportedComponentStyle(
|
|
3079
|
-
mergeConfig({ components: { editor: { style: "polished" } } }),
|
|
3080
|
-
"editor",
|
|
3081
|
-
),
|
|
3082
|
-
).toBe(false);
|
|
3083
|
-
});
|
|
3084
|
-
|
|
3085
|
-
it.each([
|
|
3086
|
-
[true, "starship"],
|
|
3087
|
-
[false, "native"],
|
|
3088
|
-
] as const)(
|
|
3089
|
-
"makes compatibility statusLine=%s authoritative over unknown Footer state",
|
|
3090
|
-
(statusLine, expectedStyle) => {
|
|
3091
|
-
withConfig(
|
|
3092
|
-
{
|
|
3093
|
-
features: { statusLine: !statusLine, future: "keep" },
|
|
3094
|
-
components: {
|
|
3095
|
-
footer: {
|
|
3096
|
-
style: "future-footer",
|
|
3097
|
-
enabled: true,
|
|
3098
|
-
future: "keep",
|
|
3099
|
-
styles: {
|
|
3100
|
-
starship: { format: "$cwd" },
|
|
3101
|
-
future: { keep: true },
|
|
3102
|
-
},
|
|
3103
|
-
},
|
|
3104
|
-
},
|
|
3105
|
-
},
|
|
3106
|
-
(path) => {
|
|
3107
|
-
const config = saveUiFeaturesPatch({ statusLine }, path);
|
|
3108
|
-
const raw = readRaw(path);
|
|
3109
|
-
expect(config.components.footer.style).toBe(expectedStyle);
|
|
3110
|
-
expect(raw.components.footer.style).toBe(expectedStyle);
|
|
3111
|
-
expect(raw.components.footer).not.toHaveProperty("enabled");
|
|
3112
|
-
expect(raw.components.footer.future).toBe("keep");
|
|
3113
|
-
expect(raw.components.footer.styles.future).toEqual({ keep: true });
|
|
3114
|
-
expect(raw.features).toEqual({ statusLine: !statusLine, future: "keep" });
|
|
3115
|
-
},
|
|
3116
|
-
);
|
|
3117
|
-
},
|
|
3118
|
-
);
|
|
3119
|
-
});
|