@mrclrchtr/supi-code-intelligence 4.6.0 → 4.8.0
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/node_modules/@mrclrchtr/supi-code-runtime/README.md +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -15
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -6
- package/node_modules/@mrclrchtr/supi-core/README.md +26 -34
- package/node_modules/@mrclrchtr/supi-core/package.json +4 -7
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -6
- package/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -20
- package/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +7 -1
- package/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -1
- package/node_modules/@mrclrchtr/supi-core/src/context.ts +1 -9
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +4 -6
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +54 -28
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +91 -125
- package/node_modules/@mrclrchtr/supi-core/src/settings.ts +10 -7
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/README.md +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -15
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -6
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/README.md +26 -34
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +4 -7
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -6
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -20
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +7 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context.ts +1 -9
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/index.ts +4 -6
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +54 -28
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +91 -125
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings.ts +10 -7
- package/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +361 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +46 -238
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +25 -33
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/README.md +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +1 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/README.md +26 -34
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +4 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -20
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +7 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/context.ts +1 -9
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/index.ts +4 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +54 -28
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +91 -125
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings.ts +10 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/outline-html-sql.ts +1 -1
- package/package.json +5 -5
- package/src/config.ts +19 -16
- package/src/substrate/lsp/settings.ts +90 -91
- package/src/tool/find/execute.ts +5 -8
- package/src/tool/graph/execute.ts +1 -1
- package/src/tool/health/execute.ts +2 -5
- package/src/tool/inspect/execute.ts +5 -7
- package/src/tool/orientation/execute.ts +4 -5
- package/src/tool/refactor-apply/execute.ts +4 -5
- package/src/tool/refactor-plan/execute.ts +7 -9
- package/src/tool/result/errors.ts +2 -82
- package/src/ui/tui/common.ts +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +0 -120
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +0 -75
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -42
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -221
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +0 -357
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -11
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +0 -36
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +0 -31
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +0 -16
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +0 -287
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +0 -41
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +0 -57
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -36
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -201
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +0 -134
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +0 -44
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +0 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +0 -170
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +0 -15
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/prompt-surface.ts +0 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +0 -93
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/report.ts +0 -121
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +0 -71
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +0 -8
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +0 -76
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +0 -487
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +0 -33
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +0 -11
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +0 -68
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +0 -60
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +0 -42
- package/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +0 -45
- package/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +0 -120
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +0 -75
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -42
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -221
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +0 -357
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -11
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +0 -36
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +0 -31
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +0 -16
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +0 -287
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +0 -41
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +0 -57
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -36
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -201
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +0 -134
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +0 -44
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +0 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +0 -170
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +0 -15
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/prompt-surface.ts +0 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +0 -93
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/report.ts +0 -121
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +0 -71
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +0 -8
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +0 -76
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +0 -487
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +0 -33
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +0 -11
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +0 -68
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +0 -60
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +0 -42
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +0 -45
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-refresh.ts +0 -234
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostics.ts +0 -99
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/suppression-diagnostics.ts +0 -60
- package/node_modules/@mrclrchtr/supi-lsp/src/index.ts +0 -41
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/README.md +0 -120
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +0 -75
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -42
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/config.ts +0 -221
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config/prompt-surface.ts +0 -357
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/config.ts +0 -11
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-provider-registry.ts +0 -36
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +0 -31
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/context.ts +0 -16
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +0 -287
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +0 -41
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +0 -57
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -36
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -201
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/model-selection.ts +0 -134
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +0 -44
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path.ts +0 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +0 -170
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/project.ts +0 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/prompt-surface.ts +0 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +0 -93
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/report.ts +0 -121
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +0 -71
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +0 -8
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-registry.ts +0 -76
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-schema.ts +0 -487
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/settings.ts +0 -33
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/spinner-frames.ts +0 -11
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/status-spinner.ts +0 -68
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/terminal.ts +0 -60
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +0 -42
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/workspace/context.ts +0 -45
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/context/context-messages.ts +0 -119
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/progress-widget.ts +0 -189
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/scoped-settings-list.ts +0 -373
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-action-menu.ts +0 -102
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-command.ts +0 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-submenus.ts +0 -141
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings/settings-ui.ts +0 -118
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +0 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/tool-framework.ts +0 -192
- package/src/tool/infra/error-results.ts +0 -19
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
// Scoped settings list component for SuPi settings overlay.
|
|
2
|
-
//
|
|
3
|
-
// Replaces pi-tui's generic SettingsList with a source-aware list that
|
|
4
|
-
// renders source badges, dispatches Enter / Space / action-menu semantics,
|
|
5
|
-
// and delegates custom-field submenus.
|
|
6
|
-
|
|
7
|
-
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
8
|
-
import { Input, Key, matchesKey, truncateToWidth } from "@earendil-works/pi-tui";
|
|
9
|
-
import type { ThemeAccessor } from "./settings-action-menu.ts";
|
|
10
|
-
import {
|
|
11
|
-
buildActionMenu,
|
|
12
|
-
createActionMenuComponent,
|
|
13
|
-
getConcreteChoices,
|
|
14
|
-
} from "./settings-action-menu.ts";
|
|
15
|
-
import type { SettingsScope, SettingsSection } from "./settings-registry.ts";
|
|
16
|
-
import type { ScopedFieldValue, SettingsFieldAction } from "./settings-schema.ts";
|
|
17
|
-
import { createInputSubmenu, createModelPickerSubmenu } from "./settings-submenus.ts";
|
|
18
|
-
|
|
19
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
20
|
-
// Scoped settings list
|
|
21
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
22
|
-
|
|
23
|
-
interface ScopedRow {
|
|
24
|
-
flatId: string;
|
|
25
|
-
sectionLabel: string;
|
|
26
|
-
field: ScopedFieldValue;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface SubmenuState {
|
|
30
|
-
component: {
|
|
31
|
-
render: (w: number) => string[];
|
|
32
|
-
invalidate?: () => void;
|
|
33
|
-
handleInput?: (data: string) => void;
|
|
34
|
-
};
|
|
35
|
-
onDone: () => void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class ScopedSettingsList {
|
|
39
|
-
private sections: SettingsSection[];
|
|
40
|
-
private scope: SettingsScope;
|
|
41
|
-
private cwd: string;
|
|
42
|
-
private ctx: ExtensionContext | undefined;
|
|
43
|
-
private theme: ThemeAccessor;
|
|
44
|
-
private tui: { requestRender: () => void };
|
|
45
|
-
private onCancel: () => void;
|
|
46
|
-
private onError?: (message: string) => void;
|
|
47
|
-
private rows: ScopedRow[] = [];
|
|
48
|
-
private selectedIndex = 0;
|
|
49
|
-
private submenu: SubmenuState | null = null;
|
|
50
|
-
private searchInput?: Input;
|
|
51
|
-
private searchQuery = "";
|
|
52
|
-
private cachedWidth?: number;
|
|
53
|
-
private cachedLines?: string[];
|
|
54
|
-
|
|
55
|
-
// biome-ignore lint/complexity/useMaxParams: component constructor needs all dependencies upfront for immutable wiring
|
|
56
|
-
constructor(
|
|
57
|
-
sections: SettingsSection[],
|
|
58
|
-
scope: SettingsScope,
|
|
59
|
-
cwd: string,
|
|
60
|
-
ctx: ExtensionContext | undefined,
|
|
61
|
-
theme: ThemeAccessor,
|
|
62
|
-
tui: { requestRender: () => void },
|
|
63
|
-
onCancel: () => void,
|
|
64
|
-
onError?: (message: string) => void,
|
|
65
|
-
) {
|
|
66
|
-
this.sections = sections;
|
|
67
|
-
this.scope = scope;
|
|
68
|
-
this.cwd = cwd;
|
|
69
|
-
this.ctx = ctx;
|
|
70
|
-
this.theme = theme;
|
|
71
|
-
this.tui = tui;
|
|
72
|
-
this.onCancel = onCancel;
|
|
73
|
-
this.onError = onError;
|
|
74
|
-
this.rebuildRows();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
reload(scope: SettingsScope, cwd: string, ctx?: ExtensionContext): void {
|
|
78
|
-
this.scope = scope;
|
|
79
|
-
this.cwd = cwd;
|
|
80
|
-
this.ctx = ctx;
|
|
81
|
-
this.rebuildRows();
|
|
82
|
-
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.rows.length - 1));
|
|
83
|
-
this.invalidate();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
invalidate(): void {
|
|
87
|
-
this.cachedWidth = undefined;
|
|
88
|
-
this.cachedLines = undefined;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
render(width: number): string[] {
|
|
92
|
-
if (this.cachedLines && this.cachedWidth === width) return this.cachedLines;
|
|
93
|
-
if (this.submenu) {
|
|
94
|
-
this.cachedWidth = width;
|
|
95
|
-
this.cachedLines = this.submenu.component.render(width);
|
|
96
|
-
return this.cachedLines;
|
|
97
|
-
}
|
|
98
|
-
this.cachedWidth = width;
|
|
99
|
-
this.cachedLines = this.renderList(width);
|
|
100
|
-
return this.cachedLines;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
private renderList(width: number): string[] {
|
|
104
|
-
const lines: string[] = [];
|
|
105
|
-
if (this.searchInput) {
|
|
106
|
-
lines.push(...this.searchInput.render(width));
|
|
107
|
-
lines.push("");
|
|
108
|
-
}
|
|
109
|
-
const displayRows = this.filteredRows();
|
|
110
|
-
if (displayRows.length === 0) {
|
|
111
|
-
lines.push(
|
|
112
|
-
this.theme.fg(
|
|
113
|
-
"dim",
|
|
114
|
-
this.searchQuery ? " No matching settings" : " No settings available",
|
|
115
|
-
),
|
|
116
|
-
);
|
|
117
|
-
lines.push("");
|
|
118
|
-
lines.push(this.renderHint(width));
|
|
119
|
-
return lines;
|
|
120
|
-
}
|
|
121
|
-
const maxVisible = Math.min(displayRows.length + 2, 20);
|
|
122
|
-
const start = Math.max(
|
|
123
|
-
0,
|
|
124
|
-
Math.min(this.selectedIndex - Math.floor(maxVisible / 2), displayRows.length - maxVisible),
|
|
125
|
-
);
|
|
126
|
-
const end = Math.min(start + maxVisible, displayRows.length);
|
|
127
|
-
for (let i = start; i < end; i++) {
|
|
128
|
-
const row = displayRows[i];
|
|
129
|
-
if (!row) continue;
|
|
130
|
-
const isSelected = i === this.selectedIndex;
|
|
131
|
-
const prefix = isSelected ? "› " : " ";
|
|
132
|
-
const section = this.theme.fg("dim", `${row.sectionLabel}: `);
|
|
133
|
-
const label = isSelected
|
|
134
|
-
? this.theme.fg("accent", row.field.field.label)
|
|
135
|
-
: this.theme.fg("text", row.field.field.label);
|
|
136
|
-
lines.push(truncateToWidth(`${prefix}${section}${label} ${row.field.displayValue}`, width));
|
|
137
|
-
}
|
|
138
|
-
if (start > 0 || end < displayRows.length) {
|
|
139
|
-
lines.push(this.theme.fg("dim", ` (${this.selectedIndex + 1}/${displayRows.length})`));
|
|
140
|
-
}
|
|
141
|
-
lines.push("");
|
|
142
|
-
lines.push(this.renderHint(width));
|
|
143
|
-
return lines;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
private renderHint(_width: number): string {
|
|
147
|
-
const hints = [];
|
|
148
|
-
if (this.searchInput) hints.push("Type to search");
|
|
149
|
-
hints.push("Enter actions", "Space cycle", "Esc close");
|
|
150
|
-
return this.theme.fg("dim", hints.join(" · "));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
handleInput(data: string): void {
|
|
154
|
-
if (this.submenu) {
|
|
155
|
-
this.submenu.component.handleInput?.(data);
|
|
156
|
-
this.invalidate();
|
|
157
|
-
this.tui.requestRender();
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (matchesKey(data, Key.escape)) {
|
|
161
|
-
this.onCancel();
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (matchesKey(data, Key.up)) {
|
|
165
|
-
this.moveSelection(-1);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (matchesKey(data, Key.down)) {
|
|
169
|
-
this.moveSelection(1);
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
if (matchesKey(data, Key.enter)) {
|
|
173
|
-
this.activateSelected();
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (data === " ") {
|
|
177
|
-
this.cycleSelected();
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (this.searchInput) {
|
|
181
|
-
const sanitized = data.replace(/ /g, "");
|
|
182
|
-
if (sanitized) {
|
|
183
|
-
this.searchInput.handleInput(sanitized);
|
|
184
|
-
this.searchQuery = this.searchInput.getValue();
|
|
185
|
-
this.selectedIndex = 0;
|
|
186
|
-
this.invalidate();
|
|
187
|
-
this.tui.requestRender();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
private moveSelection(delta: number): void {
|
|
193
|
-
const rows = this.filteredRows();
|
|
194
|
-
if (rows.length === 0) return;
|
|
195
|
-
this.selectedIndex =
|
|
196
|
-
delta < 0
|
|
197
|
-
? this.selectedIndex <= 0
|
|
198
|
-
? rows.length - 1
|
|
199
|
-
: this.selectedIndex - 1
|
|
200
|
-
: this.selectedIndex >= rows.length - 1
|
|
201
|
-
? 0
|
|
202
|
-
: this.selectedIndex + 1;
|
|
203
|
-
this.invalidate();
|
|
204
|
-
this.tui.requestRender();
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
enableSearch(): void {
|
|
208
|
-
if (!this.searchInput) this.searchInput = new Input();
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
private rebuildRows(): void {
|
|
212
|
-
const rows: ScopedRow[] = [];
|
|
213
|
-
for (const section of this.sections) {
|
|
214
|
-
for (const value of section.loadValues(this.scope, this.cwd, this.ctx)) {
|
|
215
|
-
rows.push({
|
|
216
|
-
flatId: `${section.id}.${value.field.key}`,
|
|
217
|
-
sectionLabel: section.label,
|
|
218
|
-
field: value,
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
this.rows = rows;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
private filteredRows(): ScopedRow[] {
|
|
226
|
-
if (!this.searchQuery) return this.rows;
|
|
227
|
-
const q = this.searchQuery.toLowerCase();
|
|
228
|
-
return this.rows.filter(
|
|
229
|
-
(r) =>
|
|
230
|
-
r.field.field.label.toLowerCase().includes(q) ||
|
|
231
|
-
r.field.field.key.toLowerCase().includes(q) ||
|
|
232
|
-
r.field.displayValue.toLowerCase().includes(q),
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
private activateSelected(): void {
|
|
237
|
-
const rows = this.filteredRows();
|
|
238
|
-
const row = rows[this.selectedIndex];
|
|
239
|
-
if (!row) return;
|
|
240
|
-
|
|
241
|
-
const menu = buildActionMenu(row.field, this.scope);
|
|
242
|
-
if (menu.length === 0) return;
|
|
243
|
-
this.submenu = {
|
|
244
|
-
component: createActionMenuComponent(menu, this.doneAction(row), this.theme),
|
|
245
|
-
onDone: () => {
|
|
246
|
-
this.submenu = null;
|
|
247
|
-
this.invalidate();
|
|
248
|
-
this.tui.requestRender();
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
this.invalidate();
|
|
252
|
-
this.tui.requestRender();
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
private doneAction(row: ScopedRow): (action?: string) => void {
|
|
256
|
-
return (action) => {
|
|
257
|
-
this.submenu = null;
|
|
258
|
-
if (!action) {
|
|
259
|
-
this.invalidate();
|
|
260
|
-
this.tui.requestRender();
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
if (action === "inherit") {
|
|
264
|
-
this.dispatchAction(row.flatId, { kind: "inherit" });
|
|
265
|
-
} else if (action === "resetToDefault") {
|
|
266
|
-
this.dispatchAction(row.flatId, { kind: "resetToDefault" });
|
|
267
|
-
} else if (action === "edit") {
|
|
268
|
-
this.openFreeInputSubmenu(row);
|
|
269
|
-
} else if (action.startsWith("set:")) {
|
|
270
|
-
this.dispatchAction(row.flatId, { kind: "set", value: action.slice(4) });
|
|
271
|
-
}
|
|
272
|
-
this.invalidate();
|
|
273
|
-
this.tui.requestRender();
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
private cycleSelected(): void {
|
|
278
|
-
const rows = this.filteredRows();
|
|
279
|
-
const row = rows[this.selectedIndex];
|
|
280
|
-
if (!row) return;
|
|
281
|
-
const choices = getConcreteChoices(row.field.field);
|
|
282
|
-
if (choices.length === 0) return;
|
|
283
|
-
const idx = choices.indexOf(row.field.editValue);
|
|
284
|
-
const next = choices[idx < 0 ? 0 : (idx + 1) % choices.length] ?? choices[0];
|
|
285
|
-
if (next) this.dispatchAction(row.flatId, { kind: "set", value: next });
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
private openFreeInputSubmenu(row: ScopedRow): void {
|
|
289
|
-
const cleanValue = row.field.editValue;
|
|
290
|
-
if (row.field.field.kind === "custom" && row.field.field.submenu) {
|
|
291
|
-
const comp = row.field.field.submenu(
|
|
292
|
-
cleanValue,
|
|
293
|
-
(selectedValue) => {
|
|
294
|
-
this.submenu = null;
|
|
295
|
-
if (selectedValue !== undefined) {
|
|
296
|
-
this.dispatchAction(row.flatId, { kind: "set", value: selectedValue });
|
|
297
|
-
} else {
|
|
298
|
-
this.reload(this.scope, this.cwd, this.ctx);
|
|
299
|
-
}
|
|
300
|
-
this.invalidate();
|
|
301
|
-
this.tui.requestRender();
|
|
302
|
-
},
|
|
303
|
-
this.scope,
|
|
304
|
-
this.cwd,
|
|
305
|
-
this.ctx,
|
|
306
|
-
);
|
|
307
|
-
this.submenu = {
|
|
308
|
-
component: comp,
|
|
309
|
-
onDone: () => {
|
|
310
|
-
this.submenu = null;
|
|
311
|
-
this.reload(this.scope, this.cwd, this.ctx);
|
|
312
|
-
this.invalidate();
|
|
313
|
-
this.tui.requestRender();
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
} else if (row.field.field.kind === "modelPicker") {
|
|
317
|
-
this.submenu = {
|
|
318
|
-
component: createModelPickerSubmenu(
|
|
319
|
-
cleanValue,
|
|
320
|
-
(v) => {
|
|
321
|
-
this.submenu = null;
|
|
322
|
-
if (v !== undefined) this.dispatchAction(row.flatId, { kind: "set", value: v });
|
|
323
|
-
this.invalidate();
|
|
324
|
-
this.tui.requestRender();
|
|
325
|
-
},
|
|
326
|
-
this.ctx,
|
|
327
|
-
row.field.field,
|
|
328
|
-
),
|
|
329
|
-
onDone: () => {
|
|
330
|
-
this.submenu = null;
|
|
331
|
-
this.invalidate();
|
|
332
|
-
this.tui.requestRender();
|
|
333
|
-
},
|
|
334
|
-
};
|
|
335
|
-
} else {
|
|
336
|
-
const label =
|
|
337
|
-
row.field.field.kind === "stringList"
|
|
338
|
-
? "Enter values (comma-separated):"
|
|
339
|
-
: `Enter ${row.field.field.label.toLowerCase()}:`;
|
|
340
|
-
this.submenu = {
|
|
341
|
-
component: createInputSubmenu(cleanValue, label, (v) => {
|
|
342
|
-
this.submenu = null;
|
|
343
|
-
if (v !== undefined) this.dispatchAction(row.flatId, { kind: "set", value: v });
|
|
344
|
-
this.invalidate();
|
|
345
|
-
this.tui.requestRender();
|
|
346
|
-
}),
|
|
347
|
-
onDone: () => {
|
|
348
|
-
this.submenu = null;
|
|
349
|
-
this.invalidate();
|
|
350
|
-
this.tui.requestRender();
|
|
351
|
-
},
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
this.invalidate();
|
|
355
|
-
this.tui.requestRender();
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
private dispatchAction(flatId: string, action: SettingsFieldAction): void {
|
|
359
|
-
const dotIndex = flatId.indexOf(".");
|
|
360
|
-
if (dotIndex === -1) return;
|
|
361
|
-
const sectionId = flatId.slice(0, dotIndex);
|
|
362
|
-
const fieldKey = flatId.slice(dotIndex + 1);
|
|
363
|
-
const section = this.sections.find((s) => s.id === sectionId);
|
|
364
|
-
if (!section) return;
|
|
365
|
-
try {
|
|
366
|
-
section.handleAction(this.scope, this.cwd, fieldKey, action, this.ctx);
|
|
367
|
-
} catch (err) {
|
|
368
|
-
this.onError?.(err instanceof Error ? err.message : String(err));
|
|
369
|
-
}
|
|
370
|
-
this.reload(this.scope, this.cwd, this.ctx);
|
|
371
|
-
this.tui.requestRender();
|
|
372
|
-
}
|
|
373
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
// Action menu component for SuPi settings rows.
|
|
2
|
-
//
|
|
3
|
-
// Builds context-sensitive action menus for scoped settings rows: concrete
|
|
4
|
-
// value choices, Inherit from global, Use default, and Reset to default.
|
|
5
|
-
|
|
6
|
-
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
7
|
-
import { Container, type SelectItem, SelectList, Text } from "@earendil-works/pi-tui";
|
|
8
|
-
import type { SettingsScope } from "./settings-registry.ts";
|
|
9
|
-
import type { ScopedFieldValue, SettingsField } from "./settings-schema.ts";
|
|
10
|
-
|
|
11
|
-
/** Theme accessor type matching the TUI custom() theme parameter. */
|
|
12
|
-
export type ThemeAccessor = Parameters<Parameters<ExtensionContext["ui"]["custom"]>[0]>[1];
|
|
13
|
-
|
|
14
|
-
/** One selectable action in the row action menu. */
|
|
15
|
-
export interface ActionMenuItem {
|
|
16
|
-
value: string;
|
|
17
|
-
label: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Build the action menu for a settings row given its field state and scope.
|
|
22
|
-
*
|
|
23
|
-
* Menu items include concrete value choices (for cycling fields), edit actions
|
|
24
|
-
* (for free-input fields), and scope-aware Inherit/Reset-to-default actions.
|
|
25
|
-
*/
|
|
26
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: 5-way branch on field kind + 3-way on scope/source is the natural discriminator for per-kind row actions
|
|
27
|
-
export function buildActionMenu(field: ScopedFieldValue, scope: SettingsScope): ActionMenuItem[] {
|
|
28
|
-
const menu: ActionMenuItem[] = [];
|
|
29
|
-
|
|
30
|
-
if (field.field.kind === "custom") {
|
|
31
|
-
if (field.field.submenu) menu.push({ value: "edit", label: "Edit…" });
|
|
32
|
-
} else {
|
|
33
|
-
const choices = getConcreteChoices(field.field);
|
|
34
|
-
if (choices.length > 0) {
|
|
35
|
-
for (const choice of choices) menu.push({ value: `set:${choice}`, label: choice });
|
|
36
|
-
} else if (field.field.kind === "number") menu.push({ value: "edit", label: "Edit value…" });
|
|
37
|
-
else if (field.field.kind === "string") menu.push({ value: "edit", label: "Edit value…" });
|
|
38
|
-
else if (field.field.kind === "stringList") menu.push({ value: "edit", label: "Edit values…" });
|
|
39
|
-
else if (field.field.kind === "modelPicker")
|
|
40
|
-
menu.push({ value: "edit", label: "Choose model…" });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (scope === "project") {
|
|
44
|
-
if (field.source === "project") {
|
|
45
|
-
const label = field.inheritanceSource === "global" ? "Inherit from global" : "Use default";
|
|
46
|
-
menu.push({ value: "inherit", label });
|
|
47
|
-
}
|
|
48
|
-
} else if (field.source === "global") {
|
|
49
|
-
menu.push({ value: "resetToDefault", label: "Reset to default" });
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return menu;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Return the concrete string choices for a field that supports Space cycling.
|
|
57
|
-
* Returns an empty array for fields that use free-text input or submenus.
|
|
58
|
-
*/
|
|
59
|
-
export function getConcreteChoices(field: SettingsField): string[] {
|
|
60
|
-
switch (field.kind) {
|
|
61
|
-
case "boolean":
|
|
62
|
-
return ["on", "off"];
|
|
63
|
-
case "enum":
|
|
64
|
-
return field.values;
|
|
65
|
-
case "number":
|
|
66
|
-
return field.values ?? [];
|
|
67
|
-
default:
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Create a pi-tui SelectList-backed action menu component.
|
|
74
|
-
*/
|
|
75
|
-
export function createActionMenuComponent(
|
|
76
|
-
menu: ActionMenuItem[],
|
|
77
|
-
done: (action?: string) => void,
|
|
78
|
-
theme: ThemeAccessor,
|
|
79
|
-
) {
|
|
80
|
-
const items: SelectItem[] = menu.map((m) => ({ value: m.value, label: m.label }));
|
|
81
|
-
const container = new Container();
|
|
82
|
-
container.addChild(new Text(theme.fg("accent", " Actions"), 1, 0));
|
|
83
|
-
const selectList = new SelectList(items, Math.min(items.length + 2, 15), {
|
|
84
|
-
selectedPrefix: (t) => theme.fg("accent", t),
|
|
85
|
-
selectedText: (t) => theme.fg("accent", t),
|
|
86
|
-
description: (t) => theme.fg("muted", t),
|
|
87
|
-
scrollInfo: (t) => theme.fg("dim", t),
|
|
88
|
-
noMatch: (t) => theme.fg("warning", t),
|
|
89
|
-
});
|
|
90
|
-
selectList.onSelect = (item) => done(item.value);
|
|
91
|
-
selectList.onCancel = () => done();
|
|
92
|
-
container.addChild(selectList);
|
|
93
|
-
container.addChild(new Text(theme.fg("dim", " ↑↓ navigate • enter select • esc cancel"), 1, 0));
|
|
94
|
-
return {
|
|
95
|
-
render: (width: number) => container.render(width),
|
|
96
|
-
invalidate: () => container.invalidate(),
|
|
97
|
-
handleInput: (data: string) => {
|
|
98
|
-
selectList.handleInput(data);
|
|
99
|
-
return true;
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// /supi-settings command registration.
|
|
2
|
-
//
|
|
3
|
-
// Thin wrapper that registers the command and delegates to openSettingsOverlay.
|
|
4
|
-
|
|
5
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
6
|
-
import { openSettingsOverlay } from "./settings-ui.ts";
|
|
7
|
-
|
|
8
|
-
export function registerSettingsCommand(pi: ExtensionAPI): void {
|
|
9
|
-
pi.registerCommand("supi-settings", {
|
|
10
|
-
description: "Manage SuPi extension settings",
|
|
11
|
-
handler: async (_args, ctx) => {
|
|
12
|
-
openSettingsOverlay(pi, ctx);
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// Event-backed settings contribution types for SuPi extensions.
|
|
2
|
-
//
|
|
3
|
-
// Extensions contribute declarative settings sections through PI's shared
|
|
4
|
-
// event bus. The public helper is registerDeclarativeSettings(pi, ...); this module
|
|
5
|
-
// owns the internal collector protocol used by /supi-settings.
|
|
6
|
-
|
|
7
|
-
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
8
|
-
import type { ScopedFieldValue, SettingsFieldAction } from "./settings-schema.ts";
|
|
9
|
-
|
|
10
|
-
export const SUPI_SETTINGS_COLLECT_EVENT = "supi:settings:collect";
|
|
11
|
-
|
|
12
|
-
export type SettingsScope = "project" | "global";
|
|
13
|
-
|
|
14
|
-
export interface SettingsSection {
|
|
15
|
-
/** Stable contribution identifier — e.g. "lsp", "claude-md". */
|
|
16
|
-
id: string;
|
|
17
|
-
/** Human-readable label shown in the UI. */
|
|
18
|
-
label: string;
|
|
19
|
-
/** Load current ScopedFieldValue[] for the given scope. */
|
|
20
|
-
loadValues: (scope: SettingsScope, cwd: string, ctx?: ExtensionContext) => ScopedFieldValue[];
|
|
21
|
-
/** Handle a user action on a field in the selected scope. */
|
|
22
|
-
handleAction: (
|
|
23
|
-
scope: SettingsScope,
|
|
24
|
-
cwd: string,
|
|
25
|
-
fieldKey: string,
|
|
26
|
-
action: SettingsFieldAction,
|
|
27
|
-
ctx?: ExtensionContext,
|
|
28
|
-
) => void;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface SettingsContributionCollector {
|
|
32
|
-
add(section: SettingsSection): void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface SettingsCollectionDiagnostic {
|
|
36
|
-
kind: "warning";
|
|
37
|
-
message: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface SettingsCollectionResult {
|
|
41
|
-
sections: SettingsSection[];
|
|
42
|
-
diagnostics: SettingsCollectionDiagnostic[];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function isSettingsContributionCollector(
|
|
46
|
-
value: unknown,
|
|
47
|
-
): value is SettingsContributionCollector {
|
|
48
|
-
return (
|
|
49
|
-
typeof value === "object" &&
|
|
50
|
-
value !== null &&
|
|
51
|
-
typeof (value as { add?: unknown }).add === "function"
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Create a collector with last-wins duplicate handling and warning diagnostics. */
|
|
56
|
-
export function createSettingsContributionCollector(): SettingsContributionCollector & {
|
|
57
|
-
result(): SettingsCollectionResult;
|
|
58
|
-
} {
|
|
59
|
-
const sections = new Map<string, SettingsSection>();
|
|
60
|
-
const diagnostics: SettingsCollectionDiagnostic[] = [];
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
add(section: SettingsSection): void {
|
|
64
|
-
if (sections.has(section.id)) {
|
|
65
|
-
diagnostics.push({
|
|
66
|
-
kind: "warning",
|
|
67
|
-
message: `Duplicate SuPi settings contribution "${section.id}"; using the last contribution.`,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
sections.set(section.id, section);
|
|
71
|
-
},
|
|
72
|
-
result(): SettingsCollectionResult {
|
|
73
|
-
return { sections: Array.from(sections.values()), diagnostics: [...diagnostics] };
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|